September 10, 2012

View your Arduino sketch as assembly code

 Arduino enthusiast Duane at the rcarduino blog has documented some fascinating insights into how the Arduino IDE converts our sketches into the raw assembly code that is executed by the microcontroller. Why would you want to do this? Some Arduino instructions may be similar in size within your sketch, however one may require many more instructions than the other when converted to assembly. Duane's prime example of this is a++ and b++ - if a is a global integer, the compiler could generate up to six times more code to deal with it than if it was a local variable.


So after analysing your code in more detail, you can find bloated parts of code and consider how to simplify them. The main benefits of doing so will be increasing the speed of operating, and reducing the total memory required. For a complete tutorial on how to extract the assembly code click here. Plus we're on twitter and Google+ - so follow us for news and product updates as well. 

When your projects outgrow the normal Arduino-compatible boards, running out of program and flash memory space, or you're stacking on Ethernet and microSD shields, or all at once - it's time to upgrade to the Freetronics EtherMega:


Quite simple the EtherMega is the fully-loaded Arduino-compatible board on the market today. Apart from being completely Arduino Mega2560-compatible, it includes full Ethernet interface, a microSD card socket, full USB interface, optional Power-over-Ethernet support and still has a circuit prototyping area with extra I2C interface pins. So if your project is breaking the limits, upgrade to the EtherMega today. 


2018/07/23

sile said:

i want to generate the assembly code(abc.asm)file from the abc.ino file of my arduino project. is it possible to do so? if possible how?
Thanks for your help.

2018/07/23

Daniel said:

Have a look at this link for more details: https://www.youtube.com/watch?v=3ZgXSqfEZiw

Leave a comment

Comments have to be approved before showing up.