Go Down

Topic: AVR Studio 5 and Arduino integration (Read 5 times) previous topic - next topic


As far as I see the .pde files are straight .c or .cpp and if you rename it, the work is done.

But this isn't the main point. Much more important is

  • what does the boot loader and how to integrate its functionality in AVR Studio?
    Certainly you (or we) need another piece of hardware that communicates via the JTAG interface.

  • what is initiated in the Arduino before void setup{} is run

To get all of this done, I advice to make a project and involve somebody else.
2b || !2b
Shakespeare, Hamlet


Have you seen http://arduino.cc/en/Hacking/BuildProcess ?

( and related documents in http://arduino.cc/en/Hacking )

There is main() defined off in the arduino core that calls init functions before setup().

The bootloader is not directly involved in any arduino functionality.  If you have a real device programmer, you can skip learning anything at all about the bootloader.  Otherwise, the bootloader implements a stripped-down implementation of the stk500 (version 1) upload protocol.  Avr Studio should also support this (but I'm not sure that it will work with the "reduced" version that is optiboot.)



You can see an example of how to use Arduino from AVS 4 in this link http://download.lpmagazine.org/es/2010/Linux_06_2010_ES.pdf on pages 20-23. It is written in Spanish, but perrhaps you could be able to decode the most important information.

The paper also show how you can tranfer your code almost without any modification between both systems. So you can use the IDE that you prefer or need in any moment a simple and fast Arduino IDE or a more deep and heavy AVS 4.

I hope it could help.



I recently started with c and i really liked AVR Studio for it's editor's auto complete function witch helps alot
'cause i'm new in c.
I also liked the debugger and the ability to monitor the 328p output and input ports in debugging.

So when i made Blink in c i wanted to upload the .hex file to arduino using it's boot-loader.
I used http://www.ngcoders.com/downloads/arduino-hex-uploader-and-programmer. Great Job!!

i followed the instructions and got it working! it preserves the bootloader in flash so my arduino
is still compatible with the IDE.

Next step was to be able to upload the .hex file created in AVR Studio 5 from within it's enviroment.
Well... AVR Studio 5 has an option in the tools menu to add external tools..hehee....

so i did add an external tool named Arduino Uno Upload.

in the Command field i added avrdude located in the ArduinoUploader directory
in the Arguments field i added :

-F -v -pm328p -cstk500v1 -P\\.\COM7 -b115200 -D -Uflash:w:"$(ProjectDir)Debug\$(ItemFileName).hex":i

the arguments were copy-pasted from the ArduinoUploader.exe after it worked on its own.
(I'm not sure what every argument actually does)

the $(ProjectDir)Debug\$(ItemFileName).hex part of it makes sure the .hex file of the current file edited is uploaded.

checked ''use output window''

added a button for the tool just created on the toolbar and voila.... One button Arduino Upload!!
just like the Arduino IDE does!

If shit didn't happen..
..you would explode..


Have you seen this before?

I think it already does what you want.
Rather people think you to be a fool than you open your mouth and confirm it.

Go Up