From 7d3e764a14ae761d215e0d02f79258d9290624d1 Mon Sep 17 00:00:00 2001 From: Manfred Steiner Date: Thu, 5 Sep 2024 08:22:31 +0200 Subject: [PATCH] Nano-644 software/bootloader-arduino$ (release/2024-09-05_075521) --- software/bootloader-arduino/Makefile | 5 +- .../bootloader-arduino_nano-644.elf | Bin 0 -> 9288 bytes .../bootloader-arduino_nano-644.hex | 99 ++++++++++++++++++ software/bootloader-arduino/src/main.c | 30 ++++-- 4 files changed, 123 insertions(+), 11 deletions(-) create mode 100755 software/bootloader-arduino/release/2024-09-05_075521/bootloader-arduino_nano-644.elf create mode 100644 software/bootloader-arduino/release/2024-09-05_075521/bootloader-arduino_nano-644.hex diff --git a/software/bootloader-arduino/Makefile b/software/bootloader-arduino/Makefile index 00872f0..a82f6c2 100644 --- a/software/bootloader-arduino/Makefile +++ b/software/bootloader-arduino/Makefile @@ -64,7 +64,7 @@ info: @avr-size --mcu=$(DEVICE) --format=avr dist/$(NAME).elf .depend: $(SRC) $(HDR) - $(CC) --mcu=$(DEVICE) -MM $(SRC) | sed --regexp-extended 's/^(.*\.o)\: src\/(.*)(\.cpp|\.c) (.*)/build\/\2\.o\: src\/\2\3 \4/g' > .depend + $(CC) -mmcu=$(DEVICE) -MM $(SRC) | sed --regexp-extended 's/^(.*\.o)\: src\/(.*)(\.cpp|\.c) (.*)/build\/\2\.o\: src\/\2\3 \4/g' > .depend -include .depend @@ -114,6 +114,9 @@ isp-644p: isp-flash-644p: dist/$(NAME).elf all avrdude -c usbasp -p m644p -e -U flash:w:$< +isp-read-flash-644p: + avrdude -c usbasp -p m644p -U flash:r:/tmp/flash-nano-644__$(shell date +"%Y-%m-%d_%H%M%S") + flash-644p: dist/$(NAME).elf all avrdude -c arduino -p m644p -P /dev/ttyUSB0 -b 115200 -e -U flash:w:$< diff --git a/software/bootloader-arduino/release/2024-09-05_075521/bootloader-arduino_nano-644.elf b/software/bootloader-arduino/release/2024-09-05_075521/bootloader-arduino_nano-644.elf new file mode 100755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UuCwzMCnuODxHR}(hzblFp1-{I}nYv|P1%b13~ zNdJ$A`Ysl2)$e0mlhwZu;reRd%8X@#Q8|w46vl>;(chNn2VKJHSc4DUZ}a2P-;n5s zUfc*kW$pJl?e9`D^hVJ-s?WoRzvF)%a~6T=hkEINpnEBOY^s|?yLUMI^tw8sU3fNQ z?cdO@S!id%YixQ>&<}mQ0DxYmx?N~T_hb5@*O71fHIM3E&t&YV-Uzwgj&iO$`x`vk g%dn50E$BB;@|SKE=-GoGZ`pFj{$39T>h$sc8%^3eRR910 literal 0 HcmV?d00001 diff --git a/software/bootloader-arduino/release/2024-09-05_075521/bootloader-arduino_nano-644.hex b/software/bootloader-arduino/release/2024-09-05_075521/bootloader-arduino_nano-644.hex new file mode 100644 index 0000000..1e3ad2b --- /dev/null +++ b/software/bootloader-arduino/release/2024-09-05_075521/bootloader-arduino_nano-644.hex @@ -0,0 +1,99 @@ +:10E000000C9449700C945B700C945B700C945B7076 +:10E010000C945B700C945B700C945B700C945B7054 +:10E020000C945B700C945B700C945B700C945B7044 +:10E030000C945B700C945B700C945B700C945B7034 +:10E040000C945B700C945B700C945B700C945B7024 +:10E050000C945B700C945B700C945B700C945B7014 +:10E060000C945B700C945B700C945B700C945B7004 +:10E070000C945B700C945B700C945B7030373A3589 +:10E08000353A323100536570202035203230323439 +:10E09000000011241FBECFEFD0E1DEBFCDBF22E0D4 +:10E0A000A0E0B1E001C01D92AC30B207E1F70E94E0 +:10E0B00040710C9405730C9400709091C00095FF12 +:10E0C000FCCF8093C6000895CF93982F85958595B2 +:10E0D00085958595805D9F709A3014F0C7E501C0E5 +:10E0E000C0E3C90F0E945D708C2FCF910C945D70BE +:10E0F000CF92DF92EF92FF92C12CD12C76018091CA +:10E10000C00087FD15C08FEFC81AD80AE80AF80AC0 +:10E1100081EBC81681E7D8068BE0E806F10478F3B6 +:10E1200017B818B8E0910001F09101010995E7CF07 +:10E130008091C600FF90EF90DF90CF900895CF932D +:10E140000E947870C82F0E945D70C13614F089EA71 +:10E1500003C0C0331CF080ED8C0F01C08C2FCF9119 +:10E160000895CF930E949F70C82F0E949F7090E1E6 +:10E17000C99F800D1124CF910895CF93C82FCC2330 +:10E1800021F00E947870C150FACFCF910895CF93BB +:10E19000C82F0E947870803251F484E10E945D7033 +:10E1A0008C2F0E945D7080E1CF910C945D70809106 +:10E1B00002018F5F80930201853041F417B818B8CF +:10E1C000E0910001F0910101CF910994CF91089560 +:10E1D0000E947870803231F484E10E945D7080E1A9 +:10E1E0000C945D70809102018F5F809302018530F5 +:10E1F00039F417B818B8E0910001F09101010994C1 +:10E200000895CF93DF9300D000D0CDB7DEB7198249 +:10E210001A821B821C8289819A81AB81BC81811503 +:10E220009042A140B10580F48091C00087FD0CC0F0 +:10E2300089819A81AB81BC810196A11DB11D898321 +:10E240009A83AB83BC83E7CF0F900F900F900F9012 +:10E25000DF91CF910895CF93C82F429A0E94017108 +:10E26000439A0E94017118B8CC2341F0449A0E944D +:10E27000017144980E940171C150F6CFCF91089569 +:10E28000000018B88CE987B982E08093C0008CE068 +:10E290008093C4001092C50088E18093C10086E09D +:10E2A0008093C20098E09093C9008093CA0084E0F4 +:10E2B0000E942B7113E001E0E5E0FE2EF1E1EF2E6C +:10E2C0000E947870803309F447C0813319F50E94A9 +:10E2D00078708032B9F484E10E945D7081E40E941C +:10E2E0005D7086E50E945D7082E50E945D7080E24F +:10E2F0000E945D7089E40E945D7083E50E945D70FC +:10E3000080E56AC1809102018F5F809302018530B0 +:10E31000B9F66FC1803439F40E9478708638E0F025 +:10E320000E94787019C0813491F40E94787080380E +:10E3300011F481EF44C0813811F481E040C082388B +:10E3400011F480E13CC08839C9F583E038C08234DB +:10E3500031F484E10E94BD700E94E870B1CF853431 +:10E3600011F485E0F7CF982F9D7F9035A9F3813583 +:10E3700099F3853549F40E94787080930A020E94CF +:10E38000787080930B02E8CF8635E1F40E947870B4 +:10E39000803389F40E9478700E947870C82F0E94A0 +:10E3A0007870C11102C08EE10AC0C13011F486E953 +:10E3B00006C08AE004C083E00E94BD7080E00E9435 +:10E3C000C7707ECF843609F0A5C00E947870809314 +:10E3D00009020E94787080930802809107028E7F64 +:10E3E000809307020E947870853429F48091070297 +:10E3F000816080930702C6E0D1E06E01209108029F +:10E4000030910902C601865091408217930730F47B +:10E410000E947870F60181936F01F0CF0E947870AE +:10E42000803209F0DFC02091070280910A029091AA +:10E430000B02880F991F90930B0280930A0220FF12 +:10E4400023C0E6E0F1E02091080230910902CF01FB +:10E45000865091408217930708F05AC0F999FECF71 +:10E4600080910A0290910B0292BD81BD819180BD85 +:10E47000FA9AF99A80910A0290910B020196909370 +:10E480000B0280930A02DFCF8091080280FF09C04F +:10E49000809108029091090201969093090280935D +:10E4A0000802F89440910A0250910B02F999FECFAC +:10E4B00007B600FCFDCFFA0110935700E89507B6A8 +:10E4C00000FCFDCF20E030E0FA01E20FF31F89816C +:10E4D00090E0982F88276881860F911D0C0100938A +:10E4E0005700E89511242E5F3F4F22962115F1E049 +:10E4F0003F0751F73093050120930401FA01F09290 +:10E500005700E89507B600FCFDCFE0925700E8956C +:10E5100084E162C0843709F04FC00E947870809314 +:10E5200009020E9478708093080280910A029091FB +:10E530000B02880F991F90930B0280930A020E948E +:10E54000787090910702853411F4916001C09E7F2C +:10E55000909307020E947870803209F03FC084E1F6 +:10E560000E945D70C0E0D0E08091080290910902A5 +:10E57000C817D90798F58091070280FF0BC0F99959 +:10E58000FECF80910A0290910B0292BD81BDF89A54 +:10E5900080B505C0E0910A02F0910B0284910E94BF +:10E5A0005D7080910A0290910B02019690930B028C +:10E5B00080930A022196D8CF853719F50E9478708A +:10E5C000803281F484E10E945D708EE10E945D7072 +:10E5D00086E90E945D708AE00E945D7080E10E9481 +:10E5E0005D706ECE809102018F5F80930201853055 +:10E5F00009F417B818B8E0910001F09101010995EC +:0EE600005FCE863709F05CCED9CEF894FFCFFE +:040000030000E00019 +:00000001FF diff --git a/software/bootloader-arduino/src/main.c b/software/bootloader-arduino/src/main.c index 3ca14b3..ff7c2ef 100644 --- a/software/bootloader-arduino/src/main.c +++ b/software/bootloader-arduino/src/main.c @@ -55,6 +55,9 @@ char gethex(void); void puthex(char); void flash_led(uint8_t); +volatile const char DATE [] PROGMEM = __DATE__; +volatile const char TIME [] PROGMEM = __TIME__; + #ifdef DEBUG_UART1 int uart_putchar(char c, FILE *stream) { if (c == '\n') { @@ -287,12 +290,14 @@ int main () { } } else { // Write to FLASH one page at a time - if (address.byte[1] > 127) { - //Only possible with m128, m256 will need 3rd address byte. FIXME - // RAMPZ = 0x01; - } else { - // RAMPZ = 0x00; - } + #ifdef RAMPZ + if (address.byte[1] > 127) { + //Only possible with m128, m256 will need 3rd address byte. FIXME + RAMPZ = 0x01; + } else { + RAMPZ = 0x00; + } + #endif // address * 2 -> byte location address.word = address.word << 1; @@ -372,10 +377,15 @@ int main () { address.word++; } else { - if (!flags.rampz) { - putch(pgm_read_byte_near(address.word)); - // putch(pgm_read_byte_far(address.word + 0x10000)); - } + #ifdef RAMPZ + if (!flags.rampz) { + putch(pgm_read_byte_near(address.word)); + } else { + putch(pgm_read_byte_far(address.word + 0x10000)); + } + #else + putch(pgm_read_byte_near(address.word)); + #endif address.word++; } } -- 2.39.5