Linker file

Discussions related to the firmware code development
DL4LEX
Posts: 62
Joined: Sat Nov 16, 2019 3:09 pm

Re: Linker file

Post by DL4LEX » 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.

VK3KYY
Posts: 7475
Joined: Sat Nov 16, 2019 3:25 am
Location: Melbourne, Australia

Re: Linker file

Post by VK3KYY » Fri Mar 03, 2023 9:12 pm

Thanks

Putting FreeRTOS in this section is a good idea.
Possibly some other functions that do not change, e.g the USB driver can also be placed in this block, but perhaps they need more space

BTW.
I did not test whether uploading using the CPS allow this block


FYI

I hope to release the sources for the current beta release this weekend, but I will not add these new changes because it would need another beta release to guarantee the linker change definitely had no effect on the operation


I.e The current beta version becomes the release version

Post Reply