-
Notifications
You must be signed in to change notification settings - Fork 0
/
ARDUINO_MAN.txt
executable file
·31 lines (21 loc) · 1006 Bytes
/
ARDUINO_MAN.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/-------------------- Atmega8535 -------------------------/
/* compilation using avr-gcc */
avr-gcc -g -Os -mmcu=atmega8535 -c lasertrans.c
avr-gcc -g -mmcu=atmega8535 -o lasertrans.elf lasertrans.o
avr-objcopy -j .text -j .data -O ihex lasertrans.elf lasertrans.hex
/* loading hex (USBasp)*/
avrdude -p m8535 -P usb -c usbasp -v -U flash:w:lasertrans.hex:i
/--------------- ARDUINO (ATMEGA2560) --------------------/
/* compilation using avr-gcc */
avr-gcc -Os -DF_CPU=16000000UL -mmcu=atmega2560 -c -o reciever.o reciever.c
avr-gcc -mmcu=atmega2560 reciever.o -o reciever
avr-objcopy -O ihex -R .eeprom reciever reciever.hex
/* loading hex (wiring) */
avrdude -C/usr/share/arduino/hardware/tools/avrdude.conf -v -v -v -v -patmega2560 -cwiring -P/dev/ttyUSB0 -b115200 -D -Uflash:w:reciever.hex:i
/* how to restore insertion (using USBasp) */
0. Connect USBasp to Arduino
1. Open Arduino IDE
2. Set Tools > Board > [board]
3. Set Tools > Programmer > USBasp
4. Tools > Burn Bootloader
5. PROFIT!