Skip to content
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

Fixed defmt on direct-boot mode #179

Merged
merged 1 commit into from
Sep 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions esp32c3-hal/ld/db-riscv-link.x
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,16 @@ SECTIONS
_ebss = .;
} > REGION_BSS

/* ### .uninit */
.uninit (NOLOAD) : ALIGN(4)
{
. = ALIGN(4);
__suninit = .;
*(.uninit .uninit.*);
. = ALIGN(4);
__euninit = .;
} > REGION_BSS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpicking but maybe we should define an alias in db-esp32c3-memory.x like it's done for other regions - doesn't change anything but would look more consistent

Copy link
Contributor Author

@TheButlah TheButlah Sep 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I merely reposted the original solution from @9names, I have no experience with linker scripts so I'm not sure how to do that 😅

Feel free to modify the PR though!


/* fictitious region that represents the memory available for the heap */
.heap (NOLOAD) :
{
Expand All @@ -135,7 +145,7 @@ SECTIONS
} > REGION_RTC_FAST
_fast_text_size = _ertc_fast_text - _srtc_fast_text + 8;

.rtc_fast.data : AT(_text_size + _rodata_size + _data_size + _rwtext_size + _fast_text_size)
.rtc_fast.data : AT(_text_size + _rodata_size + _data_size + _rwtext_size + _fast_text_size)
{
_rtc_fast_data_start = ABSOLUTE(.);
*(.rtc_fast.data .rtc_fast.data.*)
Expand All @@ -144,15 +154,15 @@ SECTIONS
} > REGION_RTC_FAST
_rtc_fast_data_size = _rtc_fast_data_end - _rtc_fast_data_start + 8;

.rtc_fast.bss (NOLOAD) : ALIGN(4)
.rtc_fast.bss (NOLOAD) : ALIGN(4)
{
_rtc_fast_bss_start = ABSOLUTE(.);
*(.rtc_fast.bss .rtc_fast.bss.*)
. = ALIGN(4);
_rtc_fast_bss_end = ABSOLUTE(.);
} > REGION_RTC_FAST

.rtc_fast.noinit (NOLOAD) : ALIGN(4)
.rtc_fast.noinit (NOLOAD) : ALIGN(4)
{
*(.rtc_fast.noinit .rtc_fast.noinit.*)
} > REGION_RTC_FAST
Expand Down Expand Up @@ -224,4 +234,4 @@ then modify your build script to compile the C code _without_ the
-fPIC flag. See the documentation of the `gcc::Config.fpic` method for
details.");

/* Do not exceed this mark in the error messages above | */
/* Do not exceed this mark in the error messages above | */