Hacker News new | ask | show | jobs
by estimator7292 241 days ago
Honestly I'd be willing to blame GCC for that one. IME its output is atrocious for embedded stuff. Few optimizations for the chips I use and absolute nonsense assembly trying to emulate CPU instructions GCC doesn't know exist in hardware. Binaries are regularly 3x larger than they should be. It's so awful I had to end up writing my tight loops in straight assembly because GCC couldn't handle incrementing a damn pointer in a sane way.
2 comments

I haven't found that it's that bad but I have seen that IAR is a bit better at optimising for code side, to the tune of ~10-20% or so.
True. Always use -Os. Knows nothing about internal crc functionality. Many things need manual assembly.

I've tried sdcc, but this was atrocious in array access for 8bit Atmel. Only solved with asm