I am trying to replace the standard startup code to save flash space.
I've put the new startup.s
in my core
directory and added the -nostartfiles
parameter to the linker reciepe in my platform.txt
.
When I compile with the IDE, it does not include my start code at all.
When I use Atmel Studio or a makefile, the code assembles and is included just fine.
How can I get the Arduino IDE to use my new start up code?
1 Answer 1
The Arduino builder is case sensitive and will only see files that end in .S
and not files that end in .s
.
Renaming the new start up file to startup.S
and then deleting the precomplied core archive fixed the problem.
Note that committing this change to git slightly complicated!
.o
file. For example, the AVR start code lives in thehardware/tools/avr/lib
tree ascrtXXXX.o
where the subsirectory and theXXXX
depends on the selected platform/board/chip/variant. This file is automagically included by the linker is-nostartfiles
is not specified.