Repository navigation
apm32: link newlib-nano in make builds - #4378
Conversation
family.mk linked full newlib while family.cmake passes --specs=nano.specs. On apm32f103_dev_board (20 KB RAM) that costs ~2.8 KB of RAM (mallocr, locale, impure, findfp), so the make build of net_lwip_webserver overflowed RAM by 744 bytes while the CMake build fit. Pass --specs=nano.specs in both apm32 families, as family.cmake and the stm32 families do.
|
No actionable comments were generated in the recent review.
|
[Medium impact] This PR appears safe to merge; no actionable issues were found.
|
Code sizeNothing to measure: no code change, or no snapshot build leg selected. |
Hardware-in-the-loop (HIL) Test ReportNo HIL run for this push (no affected boards, or hardware testing did not run). |
Summary
The apm32
family.mkfiles linked full newlib, whilefamily.cmakepasses--specs=nano.specs. Onapm32f103_dev_board(20 KB RAM), full newlib adds about 2.8 KB of RAM (mallocr,locale,impure,findfp). The make build ofnet_lwip_webserverthen overflowed RAM by 744 bytes, while the CMake build fit.This adds
--specs=nano.specsto the make LDFLAGS ofapm32f10xandapm32f0xx, asfamily.cmakeand the stm32 families already do.Found through the random make job
build---one-random-make-apm32f10x-large-arm-gccon #4373. It fails on master too.Fixes #4330
Verification
net_lwip_webserveronapm32f103_dev_board, make: master overflows RAM by 744 B. With this change it links at 19520 B of 20480 B, the same as the CMake build, and the map shows newlib-nano.tools/build.py -s make, all examples:apm32f103_dev_board: 31 OK;apm32f107_dev_board: 42 OK;apm32f072_dev_board: 32 OK.