Permalink
Browse files

bug fixes in Arduino AVR port, thanks to Damien Hardy.

  • Loading branch information...
Mikael BRIDAY
Mikael BRIDAY committed Oct 13, 2017
1 parent ac009e4 commit ceefe2f5b2002ab1ae7eb1a084a7f5e09f4fcd60
View
@@ -5,7 +5,7 @@ This directory shows some examples for 8 bits AVR targets, including some Arduin
For all these examples, the Gcc cross-compiler is required.
##avr-gcc cross-compiler
**Linux** (Debian/Ubuntu) -> `sudo apt-get install avr-lic gcc-avr avrdude`
**Linux** (Debian/Ubuntu) -> `sudo apt-get install avr-libc gcc-avr avrdude`
**MacOSX** -> AVR CrossPack ([http://www.obdev.at/products/crosspack/download.html]())
@@ -22,20 +22,15 @@ The commands builds the binary file (both the `.elf` and `.hex` files).
#flash
***DEPRECATED***
Use the `avrdude` utility, that comes with Arduino.
The serial device name should be defined in the oil file (`CPU -> OS -> ARDUINO section`). For example:
```sh
avrdude -c wiring -p m2560 -D -P /dev/ttyACM0 -U flash:w:trampuinoSerial.hex
```
` PORT = "/dev/tty.usbmodem1411";`
where:
$make -s flash
or using `avrdude` directly:
`$avrdude -c arduino -p m328p -P /dev/tty.usbmodem1421 -U flash:w:AVRTrampolineBin.hex`
In this example:
* `-p m328p` is for the ATMega328p
* `-c avrispmkII` is the (ISP programmer on the Arduino Uno) on the USB interface.
* `-p m2560 ` is for the ATMega2560p
* `-c wiring ` is the (ISP programmer on the Arduino Mega) on the USB interface.
Type 'avrdude -c toto' to get the full programer list
* `-P` the device name used in the Arduino User Interface.
* `-P` the device name used in the Arduino User Interface (COMmunication port)
@@ -1,25 +1,17 @@
/* Running the following example:
* just call goil a first time using the command line:
* goil --target=avr/arduino --templates=../../../../goil/templates/ blink.oil
* you may have to update ARDUINO section (l.20) for your configuration.
* goil --target=avr/arduino/mega --templates=../../../../goil/templates/ blink.oil
* you may have to update ARDUINO section (l.13) for your configuration.
*
* Then a Makefile is generated. Just type:
* make -s
* To clean the project, call:
* make clean
* It will remove all generated files, except the Makefile.
* to flash to the Arduino:
* make -s flash
* It will use the PORT defined in the ARDUINO part.
*/
OIL_VERSION = "2.5" : "test" ;
CPU test {
OS config {
STATUS = STANDARD;
ARDUINO = TRUE {
SERIAL = TRUE; //use the serial interface
PORT = "/dev/tty.usbmodem1411"; //serial port (flash)
};
BUILD = TRUE {
TRAMPOLINE_BASE_PATH = "../../../..";
@@ -1,25 +1,17 @@
/* Running the following example:
* just call goil a first time using the command line:
* goil --target=avr/arduino --templates=../../../../goil/templates/ extInterrupt.oil
* you may have to update ARDUINO section (l.20) for your configuration.
* goil --target=avr/arduino/mega --templates=../../../../goil/templates/ extInterrupt.oil
* you may have to update ARDUINO section (l.13) for your configuration.
*
* Then a Makefile is generated. Just type:
* make -s
* To clean the project, call:
* make clean
* It will remove all generated files, except the Makefile.
* to flash to the Arduino:
* make -s flash
* It will use the PORT defined in the ARDUINO part.
*/
OIL_VERSION = "2.5" : "test" ;
CPU test {
OS config {
STATUS = STANDARD;
ARDUINO = TRUE {
SERIAL = TRUE; //use the serial interface
PORT = "/dev/tty.usbmodem1411"; //serial port (flash)
};
BUILD = TRUE {
TRAMPOLINE_BASE_PATH = "../../../..";
@@ -1,25 +1,17 @@
/* Running the following example:
* just call goil a first time using the command line:
* goil --target=avr/arduino --templates=../../../../goil/templates/ serial.oil
* you may have to update ARDUINO section (l.20) for your configuration.
* goil --target=avr/arduino/mega --templates=../../../../goil/templates/ serial.oil
* you may have to update ARDUINO section (l.13) for your configuration.
*
* Then a Makefile is generated. Just type:
* make -s
* To clean the project, call:
* make clean
* It will remove all generated files, except the Makefile.
* to flash to the Arduino:
* make -s flash
* It will use the PORT defined in the ARDUINO part.
*/
OIL_VERSION = "2.5" : "test" ;
CPU test {
OS config {
STATUS = STANDARD;
ARDUINO = TRUE {
SERIAL = TRUE; //use the serial interface
PORT = "/dev/tty.usbmodem1411"; //serial port (flash)
};
BUILD = TRUE {
TRAMPOLINE_BASE_PATH = "../../../..";
@@ -1,25 +1,17 @@
/* Running the following example:
* just call goil a first time using the command line:
* goil --target=avr/arduino --templates=../../../../goil/templates/ blink.oil
* you may have to update ARDUINO section (l.20) for your configuration.
* goil --target=avr/arduino/uno --templates=../../../../goil/templates/ blink.oil
* you may have to update ARDUINO section (l.13) for your configuration.
*
* Then a Makefile is generated. Just type:
* make -s
* To clean the project, call:
* make clean
* It will remove all generated files, except the Makefile.
* to flash to the Arduino:
* make -s flash
* It will use the PORT defined in the ARDUINO part.
*/
OIL_VERSION = "2.5" : "test" ;
CPU test {
OS config {
STATUS = STANDARD;
ARDUINO = TRUE {
SERIAL = TRUE; //use the serial interface
PORT = "/dev/tty.usbmodem1411"; //serial port (flash)
SERIAL = TRUE; //use the serial interface
};
BUILD = TRUE {
TRAMPOLINE_BASE_PATH = "../../../..";
@@ -1,25 +1,17 @@
/* Running the following example:
* just call goil a first time using the command line:
* goil --target=avr/arduino --templates=../../../../goil/templates/ extInterrupt.oil
* you may have to update ARDUINO section (l.20) for your configuration.
* goil --target=avr/arduino/uno --templates=../../../../goil/templates/ extInterrupt.oil
* you may have to update ARDUINO section (l.13) for your configuration.
*
* Then a Makefile is generated. Just type:
* make -s
* To clean the project, call:
* make clean
* It will remove all generated files, except the Makefile.
* to flash to the Arduino:
* make -s flash
* It will use the PORT defined in the ARDUINO part.
*/
OIL_VERSION = "2.5" : "test" ;
CPU test {
OS config {
STATUS = STANDARD;
ARDUINO = TRUE {
SERIAL = TRUE; //use the serial interface
PORT = "/dev/tty.usbmodem1411"; //serial port (flash)
};
BUILD = TRUE {
TRAMPOLINE_BASE_PATH = "../../../..";
@@ -1,25 +1,17 @@
/* Running the following example:
* just call goil a first time using the command line:
* goil --target=avr/arduino --templates=../../../../goil/templates/ serial.oil
* you may have to update ARDUINO section (l.20) for your configuration.
* goil --target=avr/arduino/uno --templates=../../../../goil/templates/ serial.oil
* you may have to update ARDUINO section (l.13) for your configuration.
*
* Then a Makefile is generated. Just type:
* make -s
* To clean the project, call:
* make clean
* It will remove all generated files, except the Makefile.
* to flash to the Arduino:
* make -s flash
* It will use the PORT defined in the ARDUINO part.
*/
OIL_VERSION = "2.5" : "test" ;
CPU test {
OS config {
STATUS = STANDARD;
ARDUINO = TRUE {
SERIAL = TRUE; //use the serial interface
PORT = "/dev/tty.usbmodem1411"; //serial port (flash)
};
BUILD = TRUE {
TRAMPOLINE_BASE_PATH = "../../../..";
@@ -54,13 +54,11 @@ IMPLEMENTATION Trampoline {
OS {
BOOLEAN [
TRUE {
//port to flash Arduino => marche pas!
STRING PORT = "/dev/ttyUSB0";
//BOOLEAN SPI = FALSE;
//BOOLEAN I2C = FALSE;
//BOOLEAN SERVO = FALSE;
BOOLEAN SERIAL = FALSE;
//BOOLEAN PWM = TRUE;
//BOOLEAN NRF24 = FALSE;
//BOOLEAN TINYRTC = FALSE;
//BOOLEAN TIME = FALSE;
@@ -14,6 +14,15 @@ CPU avrArduino {
CPU arduino {
POSTBUILD all {
COMMAND buildbin {
TYPE = COPIER;
INPUT = TARGET;
OUTPUT = ".hex";
PREOPTION = "-O ihex";
};
};
POSTCOMMAND flash {
COMMAND flash {
MESSAGE = "Flashing";

0 comments on commit ceefe2f

Please sign in to comment.