I am working with Jamie Allen on the next generation of the Pduino firmware that is meant to be used for all sorts of software packages. We want to include software PWM, pulseIn, and servo logic, but its looking like its going to be tough to fit all that into the ATMega8's code space.
Does anyone have any advice as to how to reduce the size? Does Arduino already use the -Os gcc flag (optimize for size)?
I'm glad you're working on pduino "next generation"
arduino has the -Os flag but there is some strange issue with linking that we are still investigating.
We could just shift to plain c for the pduino firmware... i see it as something you provide pre complied
and people find it pre installed on any arduino they buy.
we can add a menu item to arduino 0005 that will download the firmware into the board in case it is erased.
I am still thinking that we can get this to work in Arduino code. Then maybe some assembly hacker can make it really fast. But the plans you mention above sound good.
I did find only those! Why I need them? Someone would ask! I need them for buildng my own IDE for Arduino. Work is allmost done i just need compiling commands becouse i don't want to use make! Thanks for help!
Wolf Paulus mentions a small hack to save 450 bytes - remove the legacy serial code support in arduino/lib/targets/arduino/wiring.c
Arduino's standard library still supports some legacy serial code, which can be removed by editing arduino/lib/targets/arduino/wiring.c (Arduino Version 0006):
Start commenting out code at line 241, insert /* just before void beginSerial(long baud)
This will reduce the size of a deployable program and increase the available memory for custom code by 450 Bytes, which doesn't sound like much but is equivalent to 6.3%.