This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Build problem with pca10001 ble_app_proximity project

Hello,

I am trying to build the nrf51822/Board/pca10001/s110/ble_app_proximity project, with gcc ... I have created a makefile based on the button_radio_example makefile (which works well!). It is the first time I use the s110 softdevice.

I have a problem at the link level: RAM overflowed with stack Here is the command line generated by the makefile: "gcc-arm-none-eabi-4_8-2013q4/bin/arm-none-eabi-gcc" -L"gcc-arm-none-eabi-4_8-2013q4/arm-none-eabi/lib/armv6-m" -L"gcc-arm-none-eabi-4_8-2013q4/lib/gcc/arm-none-eabi//armv6-m" -Xlinker -Map=_build/ble_app_proximity_gcc_s110_xxaa.map -mcpu=cortex-m0 -mthumb -mabi=aapcs -L ../../../../..//Source//templates/gcc/ -Tgcc_nrf51_s110_xxaa.ld _build/main.o _build/ble_tps.o _build/ble_ias.o _build/ble_lls.o _build/ble_bas.o _build/ble_ias_c.o _build/ble_advdata.o _build/ble_srv_common.o _build/ble_conn_params.o _build/app_timer.o _build/softdevice_handler.o _build/ble_bondmngr.o _build/pstorage.o _build/crc16.o _build/app_button.o _build/app_gpiote.o _build/ble_error_log.o _build/ble_debug_assert_handler.o _build/system_nrf51.o _build/gcc_startup_nrf51.o -o _build/ble_app_proximity_gcc_s110_xxaa.out gcc-arm-none-eabi-4_8-2013q4/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld: region RAM overflowed with stack collect2: error: ld returned 1 exit status

I have attached the map file. Any ideas are welcome !

Thanks,

Olivier

ble_app_proximity_gcc_s110_xxaa.txt

  • That is real time support !!! ;-)

    Compile is ok now. Link failed. /home/ols/projects/meb/gcc-arm-none-eabi-4_8-2013q4/bin/arm-none-eabi-gcc -mthumb -mcpu=cortex-m0 -march=armv6-m -L /home/ols/projects/meb/nrf51/nrf51-pure-gcc-setup/template/ -T gcc_nrf51_s110.ld -Wl,-Map=_build/ble_app_proximity_s110.Map _build/startup_nrf51.os _build/system_nrf51.o _build/main.o -o _build/ble_app_proximity_s110.elf _build/main.o: In function alert_led_blink_stop': main.c:(.text+0xb6): undefined reference toapp_timer_stop' _build/main.o: In function alert_signal': main.c:(.text+0x128): undefined reference toapp_timer_start' _build/main.o: In function `adv_led_blink_stop': ... Should I link against a library or should I compile other files as: Source/app_common/app_timer.c, ... ?

    Olivier

  • If you use my Makefile, you don't have to add the path to the file; it should be sufficient to just add the file name app_timer.c to APPLICATIONS_SRCS. There are quite a lot of files needed to compile even the basic BLE examples, but if you add one by one until the link errors disappear, everything should work in the end.

  • Link is ok and I have my bin file, which I can download into the board. Now, I want to load the softdevice into the boardd But I only have hex file: ./s110/v_5.2.1/s110_nrf51822_5.2.1_softdevice.hex ./s110/v_6.0.0/s110_nrf51822_6.0.0_softdevice.hex

  • Did you look at the README of the repository? Take a look at the flash-softdevice make target. The basic summary is that you can do make flash-softdevice SOFTDEVICE=../path/to/softdevice/hex/file/without/spaces.hex from your project folder to flash it. As you can see in Makefile.posix, this will use objcopy to split the hex, convert it to bin and then load it using the regular J-Link tools.

  • When I am doing: make flash-softdevice SOFTDEVICE=/home/ols/projects/meb/nrf51822/SoftDevices/s110/v_5.2.1/s110_nrf51822_5.2.1_softdevice.hex I have: Script file read successfully. Emulator with USB serial number 480205110 selected. DLL version V4.80, compiled Dec 20 2013 19:40:51 Firmware: J-Link OB-SAM3U128 V1 compiled Dec 11 2013 20:20:11 Hardware: V1.00 S/N: 480205110 VTarget = 3.300V Info: Could not measure total IR len. TDO is constant high. Info: Could not measure total IR len. TDO is constant high. No devices found on JTAG chain. Trying to find device on SWD. Info: Found SWD-DP with ID 0x0BB11477 Info: Found Cortex-M0 r0p0, Little endian. Info: FPUnit: 4 code (BP) slots and 0 literal slots Cortex-M0 identified. Target interface speed: 100 kHz Processing script file...

    Writing 00000001 -> 4001E504

    Loading binary file... [_build/s110_nrf51822_5.2.1_softdevice_mainpart.bin] Writing bin data into target memory @ 0x00000000.

    ****** Error: Communication timed out: Requested 4 bytes, received 0 bytes !

    Loading binary file... [_build/s110_nrf51822_5.2.1_softdevice_uicr.bin] Writing bin data into target memory @ 0x10001000.

    Reset delay: 0 ms Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.

    Script processing completed.

    make: [flash-softdevice] Error 1 (ignored)

    What I have missed ?

    Olivier

Related