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

run code section from RAM instead of flash on gcc windows platform for nrf52840

i tried with blinky example like thiis

#pragma long_calls 


__attribute__((used, long_calls, section(".data"))) int main(void)
{
/* Configure board. */
bsp_board_init(BSP_INIT_LEDS);

/* Toggle LEDs. */
while (true)
{
for (int i = 0; i < LEDS_NUMBER; i++)
{
bsp_board_led_invert(i);
nrf_delay_ms(500);
}
}

but we get  memory  relocation truncated  error 

bilnkyoutsdh/Applications/main.c:66:(.data+0x6): relocation truncated to fit: R_ARM_THM_CALL against symbol `bsp_board_init' defined in .text.bsp_board_init section in _build/nrf52840_xxaa_boards.c.o
bilnkyoutsdh/Applications/main.c:73:(.data+0x12): relocation truncated to fit: R_ARM_THM_CALL against symbol `bsp_board_led_invert' defined in .text.bsp_board_led_invert section in _build/nrf52840_xxaa_boards.c.o
collect2.exe: error: ld returned 1 exit status

we also set pragma  and look  gcc ARM documentaion but get same error i think my gcc is not supported this .

can any one please how to solve this on gcc windows platform

Parents Reply Children
No Data
Related