-
Notifications
You must be signed in to change notification settings - Fork 226
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
Add linker script for external ram #1090
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
|
||
SECTIONS { | ||
.external.data : | ||
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. To support 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. Yes, I know. I just want to first understand if I took everything into account for bss, at least 😅 |
||
{ | ||
_external_data_start = ABSOLUTE(.); | ||
_external_no_heap_start = ABSOLUTE(.); | ||
. = ALIGN(4); | ||
*(.external.data .external.data.*) | ||
_external_data_end = ABSOLUTE(.); | ||
} > psram_seg AT > RODATA | ||
|
||
.external.bss (NOLOAD) : | ||
{ | ||
_external_bss_start = ABSOLUTE(.); | ||
. = ALIGN(4); | ||
*(.external.bss .external.bss.*) | ||
_external_bss_end = ABSOLUTE(.); | ||
} > psram_seg | ||
|
||
.external.noinit (NOLOAD) : | ||
{ | ||
. = ALIGN(4); | ||
*(.external.noinit .external.noinit.*) | ||
} > psram_seg | ||
|
||
/* must be last segment using psram_seg */ | ||
.external_heap_start (NOLOAD) : | ||
{ | ||
. = ALIGN (4); | ||
_external_heap_start = ABSOLUTE(.); | ||
} > psram_seg | ||
} | ||
|
||
_external_ram_start = ABSOLUTE(ORIGIN(psram_seg)); | ||
_external_ram_end = ABSOLUTE(ORIGIN(psram_seg)+LENGTH(psram_seg)); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
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 don't think we need this dummy section |
||
* This section is required to skip flash rodata sections, because `psram_seg` | ||
* and `drom_seg` are on the same bus | ||
*/ | ||
|
||
SECTIONS { | ||
.ext_ram_dummy (NOLOAD) : | ||
{ | ||
. = ORIGIN(psram_seg) + (_rodata_reserved_end - _rodata_dummy_start); | ||
|
||
/* Prepare the alignment of the section above | ||
*/ | ||
|
||
. = ALIGN(0x10000); | ||
} > psram_seg | ||
} | ||
INSERT BEFORE .external.data; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ SECTIONS { | |
{ | ||
. = ALIGN(4); | ||
*( .rodata_wlog_*.* ) | ||
_rodata_reserved_end = ABSOLUTE(.); | ||
. = ALIGN(4); | ||
} > RODATA | ||
} |
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.
I don't think we should have that +0x20 here - it's used for mapped flash