Re: Linker file
Posted: Fri Mar 03, 2023 1:02 pm
(.upper_text) is not needed. I did try to get the linker to use the section if the section .text_main is full. But that didn't work. Hence the __attribute__ for each function. So this is a leftover.
But I did try a little bit more and with some small modifcations:
```
.text_main : ALIGN(4)
{
*(EXCLUDE_FILE(*FreeRTOS*).text* )
*(.rodata .rodata.* .constdata .constdata.*)
. = ALIGN(4);
_etext = . ;
} > PROGRAM_FLASH
```
and
```
.upper_text : ALIGN(4)
{
*FreeRTOS* (.text*)
. = ALIGN(4);
} > PROGRAM_FLASH
```
I get 9,12 KB of FreeRTOS placed in the upper section. These files won't change. And there should be some more system files to fill up the upper section.
But I did try a little bit more and with some small modifcations:
```
.text_main : ALIGN(4)
{
*(EXCLUDE_FILE(*FreeRTOS*).text* )
*(.rodata .rodata.* .constdata .constdata.*)
. = ALIGN(4);
_etext = . ;
} > PROGRAM_FLASH
```
and
```
.upper_text : ALIGN(4)
{
*FreeRTOS* (.text*)
. = ALIGN(4);
} > PROGRAM_FLASH
```
I get 9,12 KB of FreeRTOS placed in the upper section. These files won't change. And there should be some more system files to fill up the upper section.