Remix.run Logo
adiabatichottub 6 hours ago

> From an embedded developer's perspective, Arduino is awful.

Specific AVR Arduino annoyances I remember:

* Strings loaded to RAM instead of program memory, so you use up all your RAM if you have a lot of text. Easily fixed with a macro

* serial.println blocks, so your whole program has to stop and wait for the string to be transmitted. Easily fixed with a buffer and ISR

* Floating-point used everywhere, because fuck you

* No printf(). It's in avr-libc, and it's easy plumbed in, but the first C/C++ function that everybody ever learned to use was somehow too complicated or something.

* A hacked-together preprocessor that concatenated everything, which meant you could only have your includes in one place, thus breaking perfectly good, portable code.

I think they ultimately did a disservice to novice programmers by giving them something that was almost a standard C++ environment, but just not quite.

kevin_thibedeau 4 hours ago | parent [-]

> Strings loaded to RAM

Modern AVRs have program memory mapped into the RAM address space. The GCC linker scripts for the parts that support this put strings into .rodata within that memory region, obviating the need for special macros to retrieve them. However, you won't find this on most of the usual suspects in the Arduino AVR ecosystem.