嵌入式技术william hill官网
直播中

万航渡路

8年用户 1331经验值
擅长:电源/新能源
私信 关注
[问答]

怎么解决studio编译nrf52832 bsp示例程序启动softdevice错误的问题呢?

会当我没有使用softdevice的时候,编译是没有问题的,烧录开发板也是经常使用的。使用nimble,也是没有问题的

// 错误
arm-none-eabi-gcc "../packages/nrf5x_sdk-v16.1.0/components/libraries/util/app_error_weak.c"
../packages/nrf5x_sdk-v16.1.0/components/libraries/util/app_error_weak.c:47:54: error: operator '&&' has no right operand
47 | #if defined(SOFTDEVICE_PRESENT) && SOFTDEVICE_PRESENT
// 代码
#if defined(SOFTDEVICE_PRESENT) && SOFTDEVICE_PRESENT
#include "nrf_sdm.h"
#endif

即使我解决这里,后面就会出现如下问题:

make -j16 all
linking...
d:/sjinstall/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/10.2.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ./packages/nrf5x_sdk-v16.1.0/components/softdevice/common/nrf_sdh.o:D:\SJ\OneDrive\lichi\NRF52832\SOURCE\nrf52832_test\Debug/../packages/nrf5x_sdk-v16.1.0/components/softdevice/common/nrf_sdh.c:83: undefined reference to __start_sdh_req_observers' d:/sjinstall/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/10.2.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ./packages/nrf5x_sdk-v16.1.0/components/softdevice/common/nrf_sdh.o:(.rodata.sdh_req_observers+0x4): undefined reference to __stop_sdh_req_observers'
d:/sjinstall/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/10.2.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ./packages/nrf5x_sdk-v16.1.0/components/softdevice/common/nrf_sdh.o:D:\SJ\OneDrive\lichi\NRF52832\SOURCE\nrf52832_test\Debug/../packages/nrf5x_sdk-v16.1.0/components/softdevice/common/nrf_sdh.c:86: undefined reference to __start_sdh_state_observers' d:/sjinstall/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/10.2.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ./packages/nrf5x_sdk-v16.1.0/components/softdevice/common/nrf_sdh.o:(.rodata.sdh_state_observers+0x4): undefined reference to __stop_sdh_state_observers'
d:/sjinstall/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/10.2.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ./packages/nrf5x_sdk-v16.1.0/components/softdevice/common/nrf_sdh.o:D:\SJ\OneDrive\lichi\NRF52832\SOURCE\nrf52832_test\Debug/../packages/nrf5x_sdk-v16.1.0/components/softdevice/common/nrf_sdh.c:89: undefined reference to __start_sdh_stack_observers' d:/sjinstall/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/10.2.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ./packages/nrf5x_sdk-v16.1.0/components/softdevice/common/nrf_sdh.o:(.rodata.sdh_stack_observers+0x4): undefined reference to __stop_sdh_stack_observers'
d:/sjinstall/rt-threadstudio/repo/extract/toolchain_support_packages/arm/gnu_tools_for_arm_embedded_processors/10.2.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: ./board/board.o: in function rt_hw_board_init': D:\SJ\OneDrive\lichi\NRF52832\SOURCE\nrf52832_test\Debug/../board/board.c:126: undefined reference to Image$$
RW_IRAM1

Base' collect2.exe: error: ld returned 1 exit status make: *** [makefile:72: rtthread.elf] Error 1 "make -j16 all" terminated with exit code 2. Build might be incomplete. 麻烦哪位大佬给我解答疑惑,谢谢

更多回帖

发帖
×
20
完善资料,
赚取积分