This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nrf51822 Gazell lib linker error

Hi Nordic,

I am having a problem with linking against either of the gazell gcc libs (gzll_gcc.a or gzll_sd_resources_gcc.a).

I'm using Yotta (MBED) and have taken the example main_device_ack_payload.cpp straight from the example dir of the NRF51-STK v10. It says that it cannot find the references to nrf_gzll_init(), nrf_gzll_set_max_tx_attempts() etc. As you can see, it is clear that gzll_sd_resources_gcc.a is included as a lib but still it's not working...

I have tried to look at your example to understand if you are using flags that I'm not (like -lnosys). But no matter what I do it's the same thing.

Please, do you have the slightest idea why it's not finding the references?

Kind regards Anders

[120/120] Linking CXX executable source/nrf51822mkit
FAILED: : && /usr/local/bin/arm-none-eabi-g++  -lnosys -fno-exceptions -fno-unwind-tables -Wl,--gc-sections -Wl,--sort-common -Wl,--sort-section=alignment -Wl,-wrap,main -mcpu=cortex-m0 -mthumb -T"/Users/anders/mbed/nrf51822mkit/yotta_targets/nordic-nrf51822-gcc/CMake/../ld/NRF51822_16K_S130.ld" -Wl,-Map,source/nrf51822mkit.map -Wl,--start-group source/CMakeFiles/nrf51822mkit.dir/Users/anders/mbed/nrf51822mkit/source/nrf_gzp_host_nrf51.c.o source/CMakeFiles/nrf51822mkit.dir/Users/anders/mbed/nrf51822mkit/source/nrf_gzp.c.o source/CMakeFiles/nrf51822mkit.dir/Users/anders/mbed/nrf51822mkit/source/main_device_ack_payload.cpp.o  ym/mbed-drivers/source/mbed-drivers.a /Users/anders/mbed/nrf51822mkit/source/../precompiled/gzll_sd_resources_gcc.a ym/mbed-hal/source/mbed-hal.a ym/cmsis-core/source/cmsis-core.a ym/minar/source/minar.a ym/core-util/source/core-util.a ym/mbed-hal-nordic/yotta_dummy_lib_mbed_hal_nordic/mbed-hal-nordic.a ym/cmsis-core-nordic/yotta_dummy_lib_cmsis_core_nordic/cmsis-core-nordic.a ym/minar-platform/yotta_dummy_lib_minar_platform/minar-platform.a ym/mbed-hal-nrf51822-mcu/existing/mbed-hal-nrf51822-mcu.a ym/cmsis-core-nrf51822/source/cmsis-core-nrf51822.a ym/minar-platform-mbed/source/minar-platform-mbed.a ym/mbed-hal-mkit/source/mbed-hal-mkit.a ym/nrf51-sdk/source/nrf51-sdk.a ym/mbed-drivers/source/mbed-drivers.a ym/mbed-hal/source/mbed-hal.a ym/cmsis-core/source/cmsis-core.a ym/minar/source/minar.a ym/core-util/source/core-util.a ym/mbed-hal-nordic/yotta_dummy_lib_mbed_hal_nordic/mbed-hal-nordic.a ym/cmsis-core-nordic/yotta_dummy_lib_cmsis_core_nordic/cmsis-core-nordic.a ym/minar-platform/yotta_dummy_lib_minar_platform/minar-platform.a ym/mbed-hal-nrf51822-mcu/existing/mbed-hal-nrf51822-mcu.a ym/cmsis-core-nrf51822/source/cmsis-core-nrf51822.a ym/minar-platform-mbed/source/minar-platform-mbed.a ym/mbed-hal-mkit/source/mbed-hal-mkit.a ym/nrf51-sdk/source/nrf51-sdk.a ym/compiler-polyfill/yotta_dummy_lib_compiler_polyfill/compiler-polyfill.a ym/ualloc/source/ualloc.a ym/dlmalloc/source/dlmalloc.a -Wl,-wrap,_malloc_r -Wl,-wrap,_calloc_r -Wl,-wrap,_realloc_r -Wl,-wrap,_free_r -Wl,-wrap,_sbrk_r  -lstdc++ -lsupc++ -lm -lc -lgcc -lstdc++ -lsupc++ -lm -lc -lgcc -Wl,--end-group  --specs=nano.specs -o source/nrf51822mkit && cd /Users/anders/mbed/nrf51822mkit/build/mkit-gcc/source && arm-none-eabi-objcopy -O ihex nrf51822mkit nrf51822mkit.hex && python /Users/anders/mbed/nrf51822mkit/yotta_targets/nordic-nrf51822-gcc/CMake/../scripts/merge_hex.py /Users/anders/mbed/nrf51822mkit/yotta_targets/nordic-nrf51822-gcc/CMake/../softdevice/s110_nrf51822_8.0.0_softdevice.hex nrf51822mkit.hex nrf51822mkit-combined.hex && cd /Users/anders/mbed/nrf51822mkit/build/mkit-gcc/source && python /Users/anders/mbed/nrf51822mkit/yotta_targets/nordic-nrf51822-gcc/CMake/../scripts/memory_info.py nrf51822mkit 1024 && cd /Users/anders/mbed/nrf51822mkit/build/mkit-gcc/source && /usr/local/bin/arm-none-eabi-objcopy -O binary nrf51822mkit nrf51822mkit.bin
source/CMakeFiles/nrf51822mkit.dir/Users/anders/mbed/nrf51822mkit/source/main_device_ack_payload.cpp.o: In function `app_start(int, char**)':
/Users/anders/mbed/nrf51822mkit/source/main_device_ack_payload.cpp:87: undefined reference to `nrf_gzll_init(nrf_gzll_mode_t)'
/Users/anders/mbed/nrf51822mkit/source/main_device_ack_payload.cpp:90: undefined reference to `nrf_gzll_set_max_tx_attempts(unsigned short)'
/Users/anders/mbed/nrf51822mkit/source/main_device_ack_payload.cpp:94: undefined reference to `nrf_gzll_add_packet_to_tx_fifo(unsigned long, unsigned char*, unsigned long)'
/Users/anders/mbed/nrf51822mkit/source/main_device_ack_payload.cpp:97: undefined reference to `nrf_gzll_enable()'
/Users/anders/mbed/nrf51822mkit/source/../precompiled/gzll_sd_resources_gcc.a(nrf_gzll.o): In function `nrf_gzll_disable':
nrf_gzll.c:(.text+0x40): undefined reference to `nrf_gzll_disabled'
/Users/anders/mbed/nrf51822mkit/source/../precompiled/gzll_sd_resources_gcc.a(nrf_gzll.o): In function `notification_cb':
nrf_gzll.c:(.text+0x7b0): undefined reference to `nrf_gzll_device_tx_success'
nrf_gzll.c:(.text+0x7da): undefined reference to `nrf_gzll_device_tx_failed'
nrf_gzll.c:(.text+0x802): undefined reference to `nrf_gzll_host_rx_data_ready'
nrf_gzll.c:(.text+0x808): undefined reference to `nrf_gzll_disabled'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
error: command ['ninja'] failed
Related