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

custom service, trouble compiling and running.

I'm using a nRF51822 with 256KB flash and 16KB RAM, SoftDevice v5.2.1, uVision 4.71.2.0

I can compile and run the heart rate sensor, and it will become detected by mastercontrolpanel, so my chip and circuit works

I can run a few hello world UART demos I wrote myself, without any BLE compiled in, and see the UART output through my serial terminal.

But I recently tried to add in my own BLE service. At first it would not compile. It complained about...

.\keilbuild\fw_test.axf: Error: L6406E: No space in execution regions with .ANY selector matching libspace.o(.bss).
.\keilbuild\fw_test.axf: Error: L6406E: No space in execution regions with .ANY selector matching ble_dis.o(.data).
.\keilbuild\fw_test.axf: Error: L6406E: No space in execution regions with .ANY selector matching ble_conn_params.o(.bss).
.\keilbuild\fw_test.axf: Error: L6406E: No space in execution regions with .ANY selector matching ble_bondmngr.o(.data).
.\keilbuild\fw_test.axf: Error: L6406E: No space in execution regions with .ANY selector matching ble_conn_params.o(.data).
.\keilbuild\fw_test.axf: Error: L6406E: No space in execution regions with .ANY selector matching test.o(.data).
.\keilbuild\fw_test.axf: Error: L6406E: No space in execution regions with .ANY selector matching ble_stack_handler.o(.data).
.\keilbuild\fw_test.axf: Error: L6406E: No space in execution regions with .ANY selector matching ble_radio_notification.o(.data).
.\keilbuild\fw_test.axf: Error: L6406E: No space in execution regions with .ANY selector matching system_nrf51.o(.data).
.\keilbuild\fw_test.axf: Error: L6406E: No space in execution regions with .ANY selector matching udebug.o(.data).
.\keilbuild\fw_test.axf: Error: L6406E: No space in execution regions with .ANY selector matching r2bt_initers.o(.data).
.\keilbuild\fw_test.axf: Error: L6406E: No space in execution regions with .ANY selector matching ble_error_log.o(.data).
.\keilbuild\fw_test.axf: Error: L6406E: No space in execution regions with .ANY selector matching ble_flash.o(.data).
.\keilbuild\fw_test.axf: Error: L6407E: Sections of aggregate size 0x134 bytes could not fit into .ANY selector(s).

Which I guessed was something to do with the IRAM size (guessed by Googling the problem), so I increased the IRAM size from 0x2000 to 0x2400, and the errors went away. It can now compile.

I can load the code using nRFgo Studio and my J-Link LITE Cortex M.

But it does not even get to the first printf statement, I never see anything being output through the UART.

I cannot start debugging in uVision for some reason, it says "No Algorithm found for: 00014000H - 000196CBH", so I cannot determine what my code is actually doing.

Please help. I need to know some common mistakes that I could have made.

Related