candle-usb / candleLight_fw

gs_usb compatible firmware for candleLight, cantact and canable
Other
662 stars 292 forks source link

main: provide weak symbols for _close, _lseek, _read, _write #182

Closed marckleinebudde closed 5 months ago

marckleinebudde commented 6 months ago

This increases the size of the binary in a stm32f072 a bit:

before:

Memory region         Used Size  Region Size  %age Used
           FLASH:       17296 B       128 KB     13.20%
             RAM:        4268 B        16 KB     26.05%

after:

Memory region         Used Size  Region Size  %age Used
           FLASH:       17312 B       128 KB     13.21%
             RAM:        4268 B        16 KB     26.05%

Closes: https://github.com/candle-usb/candleLight_fw/issues/164

marckleinebudde commented 6 months ago

Please merge https://github.com/candle-usb/candleLight_fw/pull/183 first, so that the uncrustify check is happy.

fenugrec commented 5 months ago

Awesome. It may be possible to do some linker trickery to have those symbols overlap, but I don't think it's worth the trouble just to save 16 bytes. Merged, thanks !