Go Down

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


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.


Coding Badly


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.



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.



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?



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

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131