I'm using the CC1310 Launchpad and running the 15.4 stack collector example. I wanted a better way to stream data, so have tried to initialise the UART.
What I found, however, is that when I put in place this code:
/* Initialise UART */ char test[] = "Success!"; UART_init(); UART_Params_init(&uartParams); uartParams.baudRate = 115200; uartParams.writeDataMode = UART_DATA_BINARY; uartParams.readDataMode = UART_DATA_BINARY; uartParams.readReturnMode = UART_RETURN_FULL; uartParams.readEcho = UART_ECHO_OFF; uartHandle = UART_open(Board_UART0, &uartParams); if (!uartHandle) { //LCD_WRITE_STRING("UART_open failed", 10); }else{ UART_write(uartHandle, test, sizeof(test)); }
I get an error:
#10099-D: program will not fit into available memory. placement with alignment fails for section ".const" size 0x865 .
Looking at my compilation log, it shows:
"../cc1310lp.cmd", line 100: error #10099-D: program will not fit into available memory. placement with alignment fails for section ".const" size 0x865 . Available memory ranges: FLASH size: 0xe000 unused: 0x7e7 max hole: 0x5cb error #10010: errors encountered during linking; "collector_cc13xx_lp.out" not built >> Compilation failure makefile:167: recipe for target 'collector_cc13xx_lp.out' failed gmake: *** [collector_cc13xx_lp.out] Error 1 gmake: Target 'all' not remade because of errors.
What could be causing this? Surely an example like this (made to expand on) can't already be close to the maximum memory?