Go Down

Topic: Compiling and uploading code without an IDE (Read 655 times) previous topic - next topic

aerosam

Hi everyone

These are my first forays into embedded programming.
Is it possible to cross-compile the code and push it into an Arduino UNO/Mega without using the ide.
I know that it uses the avr-gcc cross-compiler, but how do i push the binaries/hex into the board.

Thanks
Sam

Coding Badly


retrolefty

Quote
but how do i push the binaries/hex into the board.


The included AVRDUDE is the tool used to upload a hex file to an attached board.


Lefty

dominikh

Example usage:

avrdude -p atmega328p -D -Uflash:w:"main.hex" -v -v -F -c avrisp -P /dev/ttyACM0









-p atmega328p Upload to an Arduino Uno, which comes with an ATmega328p
-D "Disable auto erase for flash memory" - Actually I have no idea why I am using that option...
-Uflash:w:"main.hex" Upload main.hex to flash memory
-v -v Very verbose output
-F ignore invalid signatures - This is because due to the Arduino bootloader, the signature avrdude is expecting isn't the right one
-c avrisp The type of the programmer - avrisp works for the Arduino
-P /dev/ttyACM0 Path to the programmer device. On Windows/Mac this will look different.

aerosam

Thanks

Suppose i have a custom board for an embedded application, using let's say LPC1768 or STM32F2 ARM cortex M3 series of processors.
How would i port binary.hex code onto it?
Which compilers would you recommend?

Regds
Sam

putyn

for the ARM there is an IDE that look similar to arduino ide and lets you program the ARM using a language close to the one used in arduino check here for more detaisl http://leaflabs.com/devices/maple/

Go Up