Skip to content

Commit

Permalink
main: provide weak symbols for _close, _lseek, _read, _write
Browse files Browse the repository at this point in the history
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: #164
  • Loading branch information
marckleinebudde committed Jun 4, 2024
1 parent eab3d53 commit acb299e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit acb299e

Please sign in to comment.