-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add libc rom linker files #11
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
Conversation
👋 Hello erhankur, we appreciate your contribution to this project! Click to see more instructions ...
Review and merge process you can expect ...
|
LGTM otherwise! |
Maybe it would be a good idea to add an explicit statement in the description (somewhere else? maybe readme) that these functions are “pure” and do not require initialization of internal libc structures for their work? (unlike time, alloc, io) |
@antmak thank you for your review. We will have more rom linker files to add. I am leaving the updating of the README for details to you. Probably you have more to say than I do. |
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.
Sorry guys for post-merge comments
@@ -0,0 +1,63 @@ | |||
/** | |||
* These are the newlib functions present in ESP32-S2 ROM. | |||
* See also esp32s2.rom.newlib-data.ld for the list of .data/.bss symbols used by these functions. |
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.
@erhankur @antmak Looks like for esp32s2 we also need esp32s2.rom.newlib-data.ld
with symbols used by these functions. If functions used by stub does not need these symbols so we need to update these header comment.
@@ -0,0 +1,74 @@ | |||
/* These are the newlib functions present in ESP32 ROM. | |||
They should not be used when compiling with PSRAM cache workaround enabled. | |||
See also esp32.rom.newlib-data.ld for the list of .data/.bss symbols |
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.
@erhankur @antmak Looks like for esp32s2 we also need esp32.rom.newlib-data.ld
with symbols used by these functions. If functions used by stub does not need these symbols so we need to update these header comment.
/* These are the newlib functions present in ESP32 ROM. | ||
They should not be used when compiling with PSRAM cache workaround enabled. | ||
See also esp32.rom.newlib-data.ld for the list of .data/.bss symbols | ||
used by these functions, and esp32.rom.newlib-nano.ld for "nano" versions |
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.
Remove esp32.rom.newlib-nano.ld
reference
which declares strong symbols. This is done so that ROM functions are always | ||
used instead of the ones provided by libc.a. | ||
|
||
Time functions were moved to the esp32.rom.newlib-time.ld file. |
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.
we have no esp32.rom.newlib-time.ld
in the lib
This PR adds missing ROM libc linker files for all supported chips.