Pages: [1]   Go Down
Author Topic: Compiling and uploading code without an IDE  (Read 596 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 1
Posts: 41
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 197
Posts: 12744
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


avrdude
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17261
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Germany
Offline Offline
Newbie
*
Karma: 1
Posts: 34
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Newbie
*
Karma: 1
Posts: 41
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Romania
Offline Offline
Full Member
***
Karma: 0
Posts: 174
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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/
Logged


Pages: [1]   Go Up
Jump to: