cancel
Showing results for 
Search instead for 
Did you mean: 

Not initialized RAM segment on STM32H7 dualcore

ABarbieri1177
Associate II

I successfully create 0x40 bytes on "not initialized" area on top of AXI RAM (0x24000000) for CORE M7 and on top of AHB SRAM1 (0x30000000) in order to info about a fault immediately before reset MCU (for example if a trap of NULL pointer is triggered).

On AXI RAM no problem, but on AHB SRAM1 I don't get the same data I put before reset. If I move (by linker scripts) the M4 data from AHB SRAM1 to AXI RAM I don't get problems.

Situation is:

  • Clean project generated by CUBEMX
  • No cache enable
  • Simple modification of linker script

I also note that if I use only uint32_t data, I don't get problems!

Any ideas about?

Attached the example!

My M4 linker script (only important parts)

MEMORY
{
  ERRORS_M4 (xrw)    : ORIGIN = 0x10000000, LENGTH = 0x40 
  RAM (xrw)      : ORIGIN = 0x10000040, LENGTH = 288K - 0x40
  FLASH (rx)      : ORIGIN = 0x08100000, LENGTH = 1024K
}
.
.
.
.errors (NOLOAD) :
{
  . = ALIGN(4);
  *(.errors)         /* .errors sections */
  . = ALIGN(4);
} >ERRORS_M4

Struct declaration:

#pragma pack(1)
		typedef struct
		{
			char     module[50];
			uint16_t line;
			uint32_t address;
			uint32_t date_time;
			uint32_t crc;
		} RECORD;
#pragma pack()
 
static RECORD Error_Ram_Record __attribute__((section(".errors")));

1 REPLY 1
ABarbieri1177
Associate II

Anyone of ST can explain me why this behavior? I did many other test and I can't get an answer! I also posted a source code example: what can I do more?

Please ST help me!