Custom bord on nrf51822, standart blinky-compiles, but not work

Hello frends! Im trying switch from old scool stye developing (nrfSDK->arm-gcc->open OCD->st link V2) to nrf  Connect SDK. My first goal - run blinky on custom board. And im have some problems. Blinky compiles without errors, but MS VS code show me errors in main.c - GPIO_DT_SPEC_GET. Im read about similar errors, but on this point not understand where is dig.
Chip - nrf51822 qfaa. When im use old way - my custom board works property.

my prj config, defconfig and board file. OS -Win 10, nrf Connect SDK - 2.2.0

CONFIG_GPIO=y

CONFIG_SOC_SERIES_NRF51X=y
CONFIG_SOC_NRF51822_QFAA=y
CONFIG_BOARD_MYTAG=y

# Enable MPU
CONFIG_ARM_MPU=y

# Enable hardware stack protection
CONFIG_HW_STACK_PROTECTION=y

// Copyright (c) 2023 Nordic Semiconductor ASA
// SPDX-License-Identifier: Apache-2.0

/dts-v1/;
#include <nordic/nrf51822_qfaa.dtsi>

&gpio0 {
	status = "okay";
};

/ {
	model = "MyTag";
	compatible = "nordic-semiconductor,mytag";

	chosen {
		zephyr,sram = &sram0;
		zephyr,flash = &flash0;
		zephyr,code-partition = &slot0_partition;
	};

	leds{

		compatible = "gpio-leds";
		led0: led_0 {
			gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
			label = "My  led";
		};
	};

	aliases {
		led0 = &led0;
	};
	

};




&flash0 {
	partitions {
		compatible = "fixed-partitions";
		#address-cells = <1>;
		#size-cells = <1>;

		boot_partition: partition@0 {
			label = "mcuboot";
			reg = <0x0 0x8000>;
		};
		slot0_partition: partition@8000 {
			label = "image-0";
			reg = <0x8000 0x1a000>;
		};
		slot1_partition: partition@22000 {
			label = "image-1";
			reg = <0x22000 0x1a000>;
		};
		scratch_partition: partition@3c000 {
			label = "image-scratch";
			reg = <0x3c000 0x2000>;
		};
		storage_partition: partition@3e000 {
			label = "storage";
			reg = <0x3e000 0x2000>;
		};
	};
};

Parents
  • Hello. I still don't give up. I'm switching to Connect SDK 2.3.0 and don't have any errors. No underline. I now flash my nrf with west flash --runner pyocd. Trying to debug in VS CODE. The process starts normally. But after a few seconds, a "timeout" error occurs. I am trying to debug with arm-non-ebai-gdb. It works correctly, but I can't hit the breakpoints. I think it may be the wrong clock settings. Maybe someone managed to set up debugging with st-link? Below are my settings of launch.json

    {
    	"version": "0.2.0",
    	"configurations": [
    		 {
    			"cwd": "${workspaceRoot}",
    			"executable": "./blinky/build/zephyr/zephyr.elf",
    			"name": "Debug (OpenOCD)",
    			"request": "launch",
    			"type": "cortex-debug",
    			"servertype": "openocd",
    			"interface": "swd",
    
    			"device": "nrf51",
    			"configFiles": [
    				"interface/stlink-v2.cfg",
    				"target/nrf51.cfg"
    			],
    			"searchDir": [],
    			"runToEntryPoint": "main",
    			"serverLaunchTimeout": 20000,
    			"debugServerPath": "openocd.exe",
    			"showDevDebugOutput": "raw"}
    		// },
    		// {
    		// 	"type": "nrf-connect",
    		// 	"request": "launch",
    		// 	"name": "Launch build",
    		// 	"config": "",//"${workspaceFolder}/blinky/build_1",
    		// 	"runToEntryPoint": "main"
    		// }
    
    	// "name": "GDB",
    	// "type": "gdb",
    	// "request": "launch",
    	// "cwd": "${workspaceRoot}",
    	// "target": "${workspaceRoot}./blinky/build_1/zephyr/zephyr.elf",
    	// "gdbpath" : "C:/gcc-arm-none-eabi-4_9/bin/arm-none-eabi-gdb.exe",
    	// "autorun": [
        //     "target remote localhost:3333",
        //     "symbol-file ./blinky/build_1/zephyr/zephyr.elf",
        //     "monitor reset"
        //     ]}
    	
    	]
    }
Reply
  • Hello. I still don't give up. I'm switching to Connect SDK 2.3.0 and don't have any errors. No underline. I now flash my nrf with west flash --runner pyocd. Trying to debug in VS CODE. The process starts normally. But after a few seconds, a "timeout" error occurs. I am trying to debug with arm-non-ebai-gdb. It works correctly, but I can't hit the breakpoints. I think it may be the wrong clock settings. Maybe someone managed to set up debugging with st-link? Below are my settings of launch.json

    {
    	"version": "0.2.0",
    	"configurations": [
    		 {
    			"cwd": "${workspaceRoot}",
    			"executable": "./blinky/build/zephyr/zephyr.elf",
    			"name": "Debug (OpenOCD)",
    			"request": "launch",
    			"type": "cortex-debug",
    			"servertype": "openocd",
    			"interface": "swd",
    
    			"device": "nrf51",
    			"configFiles": [
    				"interface/stlink-v2.cfg",
    				"target/nrf51.cfg"
    			],
    			"searchDir": [],
    			"runToEntryPoint": "main",
    			"serverLaunchTimeout": 20000,
    			"debugServerPath": "openocd.exe",
    			"showDevDebugOutput": "raw"}
    		// },
    		// {
    		// 	"type": "nrf-connect",
    		// 	"request": "launch",
    		// 	"name": "Launch build",
    		// 	"config": "",//"${workspaceFolder}/blinky/build_1",
    		// 	"runToEntryPoint": "main"
    		// }
    
    	// "name": "GDB",
    	// "type": "gdb",
    	// "request": "launch",
    	// "cwd": "${workspaceRoot}",
    	// "target": "${workspaceRoot}./blinky/build_1/zephyr/zephyr.elf",
    	// "gdbpath" : "C:/gcc-arm-none-eabi-4_9/bin/arm-none-eabi-gdb.exe",
    	// "autorun": [
        //     "target remote localhost:3333",
        //     "symbol-file ./blinky/build_1/zephyr/zephyr.elf",
        //     "monitor reset"
        //     ]}
    	
    	]
    }
Children
No Data
Related