Closed medexs closed 10 months ago
Added generic targets for source files compilation - object files have to be in the same path as their source files. So the build/
directory is no longer necessary, because we know all locations of object files.
Next, I added option for linker that deletes unused sections.
I also added more comments.
I had to delete the --gc-sections
option for linker, because it also deletes sections that are used. This is due to the mem.ld
linker script, where both .text
and .data
sections start at address 0 and thus the linker doesn't correctly detect unused sections. This option works well only for unused functions.
There is problem with
build/
directory if it does not exist. There is also room for other improvements.