If your time is really that worthless, please let me know and I'll send you some contract work I need done
Please let me know if you have any. Be aware that my time will be costly.
I am forced to write my own USB stack because of the sheer bloat of ST's libraries. 99% of the flash for just the boilerplate... You got to be kidding me.
Who cares? Use the 32 KB chip like I mentioned, and then swap out to the 16 KB part for production?
Or, just... don't swap it out. The
32K part is
seven cents more expensive in singles than the
16K part on DigiKey. Give me your address and I'll personally cut you a check for the price difference.
My own startup code takes about 500 bytes if bypassing newlib's _start. Calling _start (to properly initialize the C and C++ runtime) the code grew to 1.5k though.
Most ARM Cortex-M0 MCUs have a vector table that takes 1K alone. That's not even counting
code.
If any serial port driver takes more than 1K it needs to be taken out the back and shot. Ditto startup code.
This isn't an 8051-type CISC-style processor, this is a 32-bit ARM microcontroller. A UART library that weighs in at 1K on an ARM chip is equivalent to 500 RISC instructions. You think you could write a software-buffered, interrupt-based UART library in less than 500 RISC instructions? Something that actually handles and reports all the error conditions? I'm not talking about a three-function Init()/Read()/Write() blocking driver.
Unless you're stuck on an island with the 16 KB chips, I really see no point to getting pedantic over this stuff.
But I get the feeling that I'm in the minority in this thread. Still, I wish someone could articulate specific reasons why anyone should care about spending time trimming down this stuff.
Different strokes, I guess....