-
Notifications
You must be signed in to change notification settings - Fork 1k
Error management: save space when core logs are not enabled #1739
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Frederic Pillon <[email protected]>
Signed-off-by: Frederic Pillon <[email protected]>
ABOSTM
approved these changes
Jun 13, 2022
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.
LGTM
ABOSTM
reviewed
Jun 16, 2022
...STM32MP1xx/MP153AAC_MP153CAC_MP153DAC_MP153FAC_MP157AAC_MP157CAC_MP157DAC_MP157FAC/README.md
Outdated
Show resolved
Hide resolved
When core logs are not enable, NDEBUG is defined and used to prevent print from Error_Handler thanks to core_debug. Remove CORE_DEBUG usage. Signed-off-by: Frederic Pillon <[email protected]>
Append -fmacro-prefix-map option to change __FILE__ absolute path of the board platform folder to a relative path by using '.'. (i.e. the folder containing boards.txt) Signed-off-by: Frederic Pillon <[email protected]>
ABOSTM
approved these changes
Jun 16, 2022
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.
LGTM
/cc @massonal FYI |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR refactor the core debug log management:
CORE_DEBUG
usage as replaced by the menu.When core logs are not enable,
NDEBUG
is defined and used to prevent print fromError_Handler
thanks tocore_debug.
Build result of AnalogReadSerial.ino for NucleoWL55JC1
Finally, to reduce const char array size from .rodata and also having the same binary size whatever the core location.
__FILE__
has been shorten to be relative to the core path using-fmacro-prefix-map
option. It simply replaces absolute core path by.
See https://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html
Ex:
to:
__FILE__
:N.B. to check .rodata contents:
arm-none-eabi-objdump.exe -s -j .rodata *.elf
N.B.2: huge size of the binary is mainly due to the libc
printf()
usage. Maybe a tiny printf implementation could be done to decrease it.