it works
This commit is contained in:
commit
2bf7b300f9
5 changed files with 3021 additions and 0 deletions
18
src/blink/build.sh
Executable file
18
src/blink/build.sh
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
TDIR=$(mktemp -d)
|
||||
BUILD=./build
|
||||
mkdir -p $BUILD
|
||||
avr-gcc -mmcu=atmega328p -DF_CPU=16000000L \
|
||||
-DARDUINO=10607 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR \
|
||||
-I/home/plex/.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino \
|
||||
-I/home/plex/.arduino15/packages/arduino/hardware/avr/1.8.6/variants/eightanaloginputs \
|
||||
main.c -o $BUILD/main.elf
|
||||
avr-objcopy -O ihex -R .eeprom $BUILD/main.elf $BUILD/main.hex
|
||||
|
||||
avr-size -A $BUILD/main.elf
|
||||
avrdude \
|
||||
"-C/home/plex/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino17/etc/avrdude.conf" -v -V \
|
||||
-patmega328p -carduino -P/dev/ttyUSB0 -b57600 -D \
|
||||
-Uflash:w:$BUILD/main.hex:i
|
||||
|
BIN
src/blink/build/main.elf
Executable file
BIN
src/blink/build/main.elf
Executable file
Binary file not shown.
10
src/blink/build/main.hex
Normal file
10
src/blink/build/main.hex
Normal file
|
@ -0,0 +1,10 @@
|
|||
:100000000C9434000C943E000C943E000C943E0082
|
||||
:100010000C943E000C943E000C943E000C943E0068
|
||||
:100020000C943E000C943E000C943E000C943E0058
|
||||
:100030000C943E000C943E000C943E000C943E0048
|
||||
:100040000C943E000C943E000C943E000C943E0038
|
||||
:100050000C943E000C943E000C943E000C943E0028
|
||||
:100060000C943E000C943E0011241FBECFEFD8E04C
|
||||
:10007000DEBFCDBF0E9440000C9445000C940000F0
|
||||
:0E008000CF93DF93CDB7DEB7FFCFF894FFCF5D
|
||||
:00000001FF
|
2985
src/blink/build/main.o
Normal file
2985
src/blink/build/main.o
Normal file
File diff suppressed because it is too large
Load diff
8
src/blink/main.c
Normal file
8
src/blink/main.c
Normal file
|
@ -0,0 +1,8 @@
|
|||
#define F_CPU 16000000UL // CPU Frequency
|
||||
#include <avr/io.h>
|
||||
#include <util/delay.h>
|
||||
|
||||
int main(void) {
|
||||
while (1) {
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue