small medium large xlarge

Back to: All Forums  Arduino
18 Oct 2010, 10:29
Sven Riedel (8 posts)

In the Advanced Programming appending, I think, you say that new/free can’t currently be used due to gcc limitations. Does this extend to all dynamic memory management, or are malloc/realloc/calloc/free usable?

Furthermore, is it possible to drop down to assembler in arduino if things get really hairy? While I realize that this would absolutely burst the bindings of the book, do you have any pointers to resources for this?

21 Oct 2010, 15:17
Maik Schmidt (120 posts)

Hi Sven!

malloc() and free() are available, but you don’t need them very often when programming small systems such as an Arduino. Still at you can find an example showing how they work.

Using assembler is no problem. Have a look at the Arduino’s standard library (for example at hardware/arduino/cores/arduino/wiring.c) to learn how to use the asm directive.

Best, Maik

You must be logged in to comment