updated firmware upload script with optiboot install #featureadd

This commit is contained in:
pyr0ball 2021-08-25 18:09:20 -07:00
parent d61034ca8d
commit 3be286b1de
4 changed files with 2495 additions and 6 deletions

View file

@ -2430,3 +2430,14 @@ part parent "m328"
"x x x x x x x x x x x x i i i i";
;
;
# Linux GPIO definitions for avrdude & Raspberry Picoweb
programmer
id = "pi_spi";
desc = "Use the Linux sysfs interface to bitbang GPIO lines";
type = "linuxgpio";
reset = 12;
sck = 24;
mosi = 23;
miso = 18;
;

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,32 @@
:107E000001C0ABC0112484B7882361F0982F9A7009
:107E1000923041F081FF02C097EF94BF282E80E09E
:107E2000BFD0EEC085E08093810082E08093C000E7
:107E300088E18093C10089E18093C40086E080934B
:107E4000C2008EE0ADD0259A84E028E13EEF91E0BB
:107E5000309385002093840096BBB09BFECF1D9A83
:107E6000A8954091C00047FD02C0815089F78CD091
:107E7000813461F489D0182F99D01238E9F0113883
:107E800011F488E001C083E078D064C0823411F43A
:107E900084E103C0853419F485E090D05BC085355A
:107EA00039F472D0C82F70D0D82FCC0FDD1F51C03D
:107EB000863521F484E082D080E0E6CF843661F517
:107EC00063D062D0D82E60D0F82E00E011E05CD0F4
:107ED000F80181938F01DE12FACF68D0F5E4FF122A
:107EE00001C0FFCF40E050E063E0CE0136D07E011C
:107EF00000E011E0F801419151918F0161E0C7016B
:107F00002CD0F2E0EF0EF11CD012F4CF40E050E0A4
:107F100065E0CE0122D01EC0843771F435D034D054
:107F2000F82E32D043D08E01F80185918F0125D0F3
:107F3000FA94F110F9CF0EC0853739F437D08EE1BD
:107F40001CD085E91AD086E19FCF813511F488E0F5
:107F500027D02CD080E111D08ACFFC010A0167BF65
:107F6000E895112407B600FCFDCF667029F0452B7B
:107F700019F481E187BFE89508959091C00095FFBD
:107F8000FCCF8093C60008958091C00087FFFCCF8E
:107F90008091C00084FD01C0A8958091C60008951D
:107FA000E0E6F0E098E1908380830895EDDF803291
:107FB00019F088E0F5DFFFCF84E1DFCFCF93C82F42
:0A7FC000E3DFC150E9F7CF91F1CFE4
:027FFE00000879
:0400000300007E007B
:00000001FF

View file

@ -19,16 +19,19 @@ Usage:
EOF
# Default values
serialdevice=COM3
serialdevice=/dev/ttyUSB0
board=m328pb
lowfuse=0xE2
highfuse=0xD6
exfuse=0xF6
firmwarebin=Pyr0_Piezo_Sensor_m328pb_v2.x.x.hex
firmwarebin=../firmware/Compiled-Firmware/pyr0_piezo_firmware_v2.3.2.hex
# Programming functions
program-icsp() {
avrdude -c avrisp -p $board -b19200 -P$serialdevice -U lfuse:w:$lowfuse:m -U hfuse:w:$highfuse:m -U efuse:w:$exfuse:m -U flash:w:$firmwarebin -v
#avrdude -c avrisp -p $board -b19200 -P$serialdevice -U lfuse:w:$lowfuse:m -U hfuse:w:$highfuse:m -U efuse:w:$exfuse:m -U flash:w:$firmwarebin -v
avrdude -Cbootloader/MiniCire-avrdude.conf -v -patmega328pb -cstk500v1 -P$serialdevice -b19200 -e -Ulock:w:0x3f:m -Uefuse:w:0b11110110:m -Uhfuse:w:0xd6:m -Ulfuse:w:0xe2:m
avrdude -Cbootloader/MiniCire-avrdude.conf -v -patmega328pb -cstk500v1 -P$serialdevice -b19200 -Uflash:w:bootloader/optiboot_flash_atmega328pb_UART0_38400_8000000L.hex:i -Ulock:w:0x0f:m
avrdude -Cbootloader/MiniCire-avrdude.conf -v -c stk500v1 -p $board -b19200 -P$serialdevice -U flash:w:$firmwarebin
}
program-uart() {
@ -43,11 +46,11 @@ while getopts ":b:d:f:i:u" opt
h) echo "$usage"
exit
;;
b) board="$2";
b) board="$@";
shift ;;
d) serialdevice="$2";
d) serialdevice="$@";
shift ;;
f) firmwarebin="$2";
f) firmwarebin="$@";
shift ;;
i) program-icsp
shift ;;