From acb299e240b62fc95bb63959a6b25fbd2b27322e Mon Sep 17 00:00:00 2001 From: Marc Kleine-Budde Date: Mon, 3 Jun 2024 16:50:40 +0200 Subject: [PATCH] main: provide weak symbols for _close, _lseek, _read, _write 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 --- src/main.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main.c b/src/main.c index c647cf9f..6abebf27 100644 --- a/src/main.c +++ b/src/main.c @@ -51,6 +51,15 @@ static void SystemClock_Config(void); static USBD_GS_CAN_HandleTypeDef hGS_CAN; static USBD_HandleTypeDef hUSB = {0}; +void __weak _close(void) { +} +void __weak _lseek(void) { +} +void __weak _read(void) { +} +void __weak _write(void) { +} + int main(void) { HAL_Init();