Debug Arduino with Proteus
by seer on Oct.17, 2011, under Uncategorized
Arduino is easy to use. But it may be hard to debug. Here is a simple tutorial of debugging it in Proteus.
Arduino IDE can generate hex and elf files of the sketch in verifying process. But in default they will be built in the temporary folder of the system which is hard to be found. I found a way to change the build path of the Arduino to make it much easier to be found.
First the actual location of the preference file is described in another preference file in “arduino IDE path/lib/preferences.txt”. I think the Arduino just inherits it from processing, so the location described is the Processing’s one. But Arduino’s file is in the similar path.
Then open the right preferences file. And add the build path you want.
Then the build file of the sketch will appear here.
So we can create a Proteus project and add an ATmega328. Set the program file correctly and adjust the clock frequency to 16M.
Finally you can start you project, switch file to your sketch and set breakpoints as you wish to debug the program freely.
Update: BareboneArduino in Proteus from Cooper Maa








February 1st, 2012 on 3:32 am
Where could I get the arduino files?
I download arduino proteus design from tinyurl.com/3lncep3 then I open it using Portable Porteus Professional 7.6 and I run it, but it shows error like this:
x Unable to open HEX file ‘Blink\Blink.cpp.hex’
! [AVR LOAD] No program code loaded
x Real Time Simulation failed to start
could you help me?
February 1st, 2012 on 1:43 pm
edit setting of the AVR chip by double click it. Compile your Arduino project and find the hex file, then change the file location in Proteus to it.
February 8th, 2012 on 9:36 pm
Yeah it works!
Thank you!
Anw for any of you wants to download the software full and clear step by step here :http://www.4shared.com/file/DAUDcW80/Proteus_78.htm
February 8th, 2012 on 9:55 pm
But why I cannot design it in ARES?
After I compile and simulate in Proteus, it cannot be saved….
February 8th, 2012 on 10:01 pm
Do you have any idea why it cant be saved?
April 25th, 2012 on 6:13 am
what about running proteus on mac?
April 26th, 2012 on 9:37 am
PlayonMac can run Proteus perfectly.