Skip to content

Conversation

@dallmair
Copy link
Contributor

Interesting: The new toolchain implements better optimizations. Size diff of the binaries:

File name Size diff in bytes
BRAINv3.3.bin -120
DAP103-BLUEPILL-DFU.bin -64
DAP103-BLUEPILL.bin -60
DAP103-DFU.bin -68
DAP103-NUCLEO-STBOOT.bin -64
DAP103.bin -64
DAP42.bin -100
DAP42DC.bin -100
DAP42K6U.bin -96
KITCHEN42.bin -112

Linking with libnosys generates a warning and a note from libc for each
of the following functions:

* _close_r
* _fstat_r
* _isatty_r
* _lseek_r
* _read_r

The messages are:

```
in function `_close_r': closer.c:(.text._close_r+0xc): warning: _close is not implemented and will always fail
note: the message above does not take linker garbage collection into account
```

Removing libnosys gets rid of these messages, and the compiler still
generates the same output.
@devanlai
Copy link
Owner

Thanks for the PR @dallmair.

I'm currently away from my home lab, so I won't be able to test this for a bit. If I haven't moved it forward a week from now, please feel free to follow up and remind me to try it out.

@dallmair
Copy link
Contributor Author

Thanks for the heads-up @devanlai.

Copy link
Owner

@devanlai devanlai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, looks good to me.

@devanlai devanlai merged commit ee9aae4 into devanlai:master Sep 21, 2024
@dallmair dallmair deleted the update-toolchain branch September 21, 2024 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants