-
Notifications
You must be signed in to change notification settings - Fork 33
fix(linker): correct cross-toolchain memory map inconsistencies #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -45,7 +45,7 @@ _Min_Stack_Size = 0x800; /* required amount of stack */ | |||||
| MEMORY | ||||||
| { | ||||||
| ROM (xrw) : ORIGIN = 0x34000400, LENGTH = 511K | ||||||
| RAM (xrw) : ORIGIN = 0x34020000, LENGTH = 1536K | ||||||
| RAM (xrw) : ORIGIN = 0x34080000, LENGTH = 1536K | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am also questioning the length of this memory area in secure AXISRAM1. This overlaps with the FSBL in secure AXISRAM2, starting at address According to Table 2. Memory map and peripheral register boundary addresses of RM0486, rev. 4, the secure AXISRAM1 region ends at address STM32CubeN6/Projects/STM32N6570-DK/Examples/PWR/PWR_STANDBY/README.md Lines 13 to 14 in 8ab3b64
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @ALABSTM, you were right here. I rechecked the example-specific MDK scatter file and the RAM window for this PWR application is 0x34080000-0x340FFFFF, not 1536KB up to 0x341FFFFF. I have now updated both GCC and IAR for PWR_STANDBY and PWR_STANDBY_RTC to the same 512KB range, which also removes the overlap with the FSBL in AXISRAM2. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi @94xhn, I built the With regards,
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for checking it with STM32CubeIDE and for the approval. That build result is useful confirmation of the corrected RAM range. |
||||||
| } | ||||||
|
|
||||||
| /* Sections */ | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -45,7 +45,7 @@ _Min_Stack_Size = 0x800; /* required amount of stack */ | |
| MEMORY | ||
| { | ||
| ROM (xrw) : ORIGIN = 0x34000400, LENGTH = 511K | ||
| RAM (xrw) : ORIGIN = 0x34020000, LENGTH = 1536K | ||
| RAM (xrw) : ORIGIN = 0x34080000, LENGTH = 1536K | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same remark about the
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Applied the same correction to the RTC sibling as well: GCC and IAR now both use RAM 0x34080000-0x340FFFFF, matching the MDK scatter file there too. |
||
| } | ||
|
|
||
| /* Sections */ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Strange that the memory is not split between
ROMandRAMas done for the two other IDEs. It is the case in a similar application, as shown below.STM32CubeN6/Projects/NUCLEO-N657X0-Q/Applications/ThreadX/Tx_SecureLEDToggle_TrustZone/STM32CubeIDE/AppliNonSecure/STM32N657X0HXQ_LRUN.ld
Lines 47 to 48 in 8ab3b64
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I aligned the GCC script with that split now. The non-secure window is defined as ROM 0x241A0000-0x241BFFFF plus RAM 0x241C0000-0x241FFFFF, matching the example's IAR file, MDK scatter file, and README.