Detailed description
- No new feature implemented.
- This pull request is aimed at flash size/footprint reduction.
- Repeated parts of message strings in stm32l4 & samx5x could be output via
%sof tc_printf/gdb_voutf/vasprintf, and this allows GCC to fold string literal constants, saving 200 bytes in.rodata.
Disclaimer: I don't have targets handled by stm32l4 code available (and certainly not samx5x), so I can't runtime-test whether the probe now crashes at this stack depth etc.
Additionally, I didn't find a tc_puts() or something similar to print simple \n0円-terminated string literals. GCC is known to optimise such calls of printf("...\n") to puts("...") (see gimple_fold_builtin_printf()). Some of the changes could be alternatively split into two print statements, the second printing the common/folded message part.
Your checklist for this pull request
- I've read the Code of Conduct
- I've read the guidelines for contributing to this repository
- It builds for hardware native (
make PROBE_HOST=native) - It builds as BMDA (
make PROBE_HOST=hosted) - I've tested it to the best of my ability
- My commit messages provide a useful short description of what the commits do