2024-07-12 04:37 AM - edited 2024-07-12 04:39 AM
It is a common requirement to have an area of RAM that is not cleared or otherwise initialised by the startup code; eg,
to mention but two.
Currently, this means making manual edits to the linker script - which get overwritten with every 'Generate'. :frowning_face:
So how about adding a "noinit section" option in the Project 'Linker Settings':
Or making the generated linker script have areas which will not get overwritten - as in the generated 'C' code.
(I've tagged this as 'Bug Report' because the forum insists on having a tag, but none of the available tags is relevant! 'Bug Report' seems the least worst.)
2024-07-12 05:02 AM - edited 2024-07-12 05:03 AM
> Or making the generated linker script have areas which will not get overwritten
Maybe easier and faster can be to write a KB article about implementing a no-init RAM section. This not necessarily can be a piece of the "main" RAM. Some STM32s have the backup RAM, or several SRAM units that are not referenced in the "standard" link script. These can be used for no-init data as well.
2024-07-12 06:06 AM
I'm waiting many years to have posibility to define new section and menage them in MX or IDE.
2024-07-12 06:18 AM - edited 2024-07-12 06:28 AM
Manage sections in a GUI? Do you mean, a GUI for GNU ld scripts? This is possible, as an Eclipse add-on.
You can propose this in the common Eclipse CDT forum, even sponsor this idea to show your motivation and support.
A simpler variant can be like the linker option dialogs in Keil MDK and IAR IDE: a couple of input fields, like ROM1, ROM2, RAM1, RAM2... address & size, with "no init" check boxes. These fields generate defined symbols prepended to a common link script with conditional ifdef's. ... and so on.
2024-07-12 06:22 AM - edited 2024-07-12 06:23 AM
Done by many people In many ways, Compatitors creates this long time ago.
I have my own solution for this :D
2024-07-12 07:05 AM
@Andrew Neil wrote:Currently, this means making manual edits to the linker script - which get overwritten with every 'Generate'. :frowning_face:
Actually, it seems that's not true - 'Generate' does not (necessarily?) overwrite the linker script.
2024-07-12 07:31 AM - edited 2024-07-12 07:31 AM
@Radosław wrote:I'm waiting many years to have posibility to define new section and menage them in MX or IDE.
For the newer STM32U5 family (at least), they seem to be moving in that direction:
2024-07-12 07:47 AM - edited 2024-07-12 07:48 AM
This is for cortex M33 to configure secure and non secure regions.
But for all STM32 should be posibility to define memory regions, and sections.
In CMSIS startups provide posobility to initialize or clearing multiple sections. It not hard do generate proper linker script from MX.
I personally don't use MX, So i create linker script from configuration file by preprocessor.
Very often I need section located just after vector table.
There only few things are nessesary.
1. name of section
2, memory region for LMA address
3, memory region for VMA address.
4. defining is this section is Initialized, zero or no init
5. adding NOLOAD
6. adding KEEP
2024-07-12 07:57 AM - edited 2024-07-12 07:57 AM
My point is that ST has already (for some families) implemented a GUI for editing memory sections that drives linker script generation - so what Andrew (or your own thread hijacking feature request) is asking for is a natural extension of something that already exists, not a complete rewrite of their flow.