toolchain
toolchain copied to clipboard
Add compiler option to for uncached object placement
If will be good if we can add compiler option for ARC to group all variables that are declared with __attribute__((uncached))
into a single sections ".ucdata"
and ".ucbss"
(similar to ".sbss"
or ".sdata"
) so it will be possible to make section placement in linker script and handle cache alignment issue.
Doesn't section
attribute solve this issue?
Some how yes. But in code the need to track all variables with uncached access gets risen. I mean if I typedef volatile __attribute__((uncached)) int uncached_int;
, then in all places new type is used programmer need's not to forget to place section
attribute, otherwise code get's screwed up. The better way will be having an option, so section attribute is added automatically to all variables declared with __attribute__((uncached))
.
I mean it will be good to have an option so section
attribute to be added implicitly for all variables that are declared with uncached
attribute. Similar to MetaWare compiler Uncached_in_own_section
.
It is just an idea. I just thought about -fdata-sections
, so .ucdata.
or .ucbss.
can be appended. But I do not fully understand the effort that is needed to get such enchantment.
Shouldn't be too much of a hassle.
Hi @petrokarashchenko sorry for not solving this in 2020.09 as this one doesn't seem as a low-hanging fruit. Moving to the next release with hope to spend more time on that looking forward.