Electronics > Microcontrollers
This code is so broken it some how fixes itself.
eutectique:
--- Quote from: paulca on February 14, 2023, 06:25:46 pm ---However, most things get allocated in RAM_D1 'above' it.
--- End quote ---
What are these things? What the map file shows? Any insights from arm-none-eabi-objdump -h yourfile.elf ? Are some symbols matching .data.* pattern located in RAM_D1 and some in DTCMRAM?
BTW, your linker script does not have section RAM_D1. Are you sure about it?
paulca:
--- Quote from: eutectique on February 14, 2023, 06:58:05 pm ---
--- Quote from: paulca on February 14, 2023, 06:25:46 pm ---However, most things get allocated in RAM_D1 'above' it.
--- End quote ---
What are these things? What the map file shows? Any insights from arm-none-eabi-objdump -h yourfile.elf ? Are some symbols matching .data.* pattern located in RAM_D1 and some in DTCMRAM?
BTW, your linker script does not have section RAM_D1. Are you sure about it?
--- End quote ---
Sorry, there are two linkers. The other one is attached,.
The "other" things are general variables, buffers, (.bss and .data I will assume)
The idea is to create an labelled section like .dtcm and allocate some of the buffers in there.
eutectique:
--- Quote from: paulca on February 14, 2023, 07:37:34 pm ---The idea is to create an labelled section like .dtcm and allocate some of the buffers in there.
--- End quote ---
Ok, then create it!
Add the following to the linker script:
--- Code: ---.dtcm_section {
KEEP(*dtcm*)
} > DTCMRAM
--- End code ---
and the following, as suggested by Nominal Animal, to your source code:
--- Code: ---static type arrayname[count] __attribute__((section "dtcm"));
--- End code ---
paulca:
Thanks! Got it working.
Adding /modified a few bits though.
--- Code: --- __attribute__((section(".dtcm_section"))) static uint32_t rx1Buffer[8];
__attribute__((section(".dtcm_section"))) static uint32_t rx2Buffer[8];
__attribute__((section(".dtcm_section"))) static uint32_t tx1Buffer[8] ;
__attribute__((section(".dtcm_section"))) static uint32_t tx2Buffer[8];
--- End code ---
--- Code: --- .dtcm_section :
{
. = ALIGN(4);
KEEP(*dtcm*)
. = ALIGN(4);
} > DTCMRAM
--- End code ---
I might test how much impact it has with the scope next time I'm checking the performance/timing.
Navigation
[0] Message Index
[*] Previous page
Go to full version