Open mcuee opened 1 year ago
Not impressed that they're not paying attention to the license. Even removed the copyrights!
Not impressed that they're not paying attention to the license. Even removed the copyrights!
Indeed.
Somehow the factory hex file wokes but none my build hex file work.
I use a Nano and follow the following instruction to build LGTISP which seems to work fine. https://github.com/dbuezas/lgt8fx/tree/master/lgt8f/libraries/LarduinoISP
PS C:\work\avr\avrdude_test\avrdude_bin> .\avrdude -c avrisp -P COM12 -p lgt8f328p -U .\optiboot_lgt8f328p.hex
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e950f (probably lgt8f328p)
avrdude: Note: flash memory has been specified, an erase cycle will be performed.
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file .\optiboot_lgt8f328p.hex for flash
with 1002 bytes in 3 sections within [0, 0x77ff]
using 9 pages and 150 pad bytes
avrdude: writing 1002 bytes flash ...
Writing | ################################################## | 100% 0.38 s
avrdude: 1002 bytes of flash written
avrdude: verifying flash memory against .\optiboot_lgt8f328p.hex
Reading | ################################################## | 100% 0.06 s
avrdude: 1002 bytes of flash verified
avrdude done. Thank you.
PS C:\work\avr\avrdude_test\avrdude_bin> .\avrdude -c arduino -P COM19 -b 57600 -p lgt8f328p
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e950f (probably lgt8f328p)
avrdude done. Thank you.
PS C:\work\avr\avrdude_test\avrdude_bin> .\avrdude -c avrisp -P COM12 -p lgt8f328p
-U .\optiboot_lgt8f328p_build1.hex -qq && echo OK
OK
PS C:\work\avr\avrdude_test\avrdude_bin> .\avrdude -c arduino -P COM19 -b 57600 -p lgt8f328p
avrdude error: programmer is not responding
avrdude warning: attempt 1 of 10: not in sync: resp=0x00
PS C:\work\avr\avrdude_test\avrdude_bin> .\avrdude -c avrisp -P COM12 -p lgt8f328p
-U .\optiboot_lgt8f328p_build2.hex -qq && echo OK
OK
PS C:\work\avr\avrdude_test\avrdude_bin> .\avrdude -c arduino -P COM19 -b 57600 -p lgt8f328p
avrdude error: programmer is not responding
avrdude warning: attempt 1 of 10: not in sync: resp=0x00
PS C:\work\avr\avrdude_test\avrdude_bin> .\avrdude -c avrisp -P COM12 -p lgt8f328p
-U .\optiboot_lgt8f328p_build3.hex -qq && echo OK
OK
PS C:\work\avr\avrdude_test\avrdude_bin> .\avrdude -c arduino -P COM19 -b 57600 -p lgt8f328p
avrdude error: programmer is not responding
avrdude warning: attempt 1 of 10: not in sync: resp=0x00
I found a mistake in my build that frequency should be 16MHz. But it still does not work.
I will give up for now. Hopefully someone else who is more familiar with the chip can chime in and help out.
This is with WinAVR.
$ avr-gcc -v
Using built-in specs.
Target: avr
Configured with: ../gcc-4.3.3/configure --enable-win32-registry=WinAVR-20100110 --with-gmp=/usr/local --with-mpfr=/usr/local --prefix=/c/WinAVR --target=avr --enable-languages=c,c++,objc --with-dwarf2 --enable-doc --disable-shared --disable-libada --disable-libssp --disable-nls --with-pkgversion='WinAVR 20100110' --with-bugurl='URL:http://sourceforge.net/tracker/?atid=520074&group_id=68108&func=browse'
Thread model: single
gcc version 4.3.3 (WinAVR 20100110)
$ make lgt8f328p
BAUD RATE CHECK: Desired: 57600, Real: 57142, UBRRL = 34, Error=0.7%
avr-gcc -g -Wall -Os -fno-inline-small-functions -fno-split-wide-types -mshort-calls -mmcu=atmega328p -DF_CPU=16000000L -DBAUD_RATE=57600 -DLED_START_FLASHES=3 -DEXT_OSC=0 '-DVIRTUAL_BOOT_PARTITION' -c -o optiboot.o optiboot.c
avr-gcc -g -Wall -Os -fno-inline-small-functions -fno-split-wide-types -mshort-calls -mmcu=atmega328p -DF_CPU=16000000L -DBAUD_RATE=57600 -DLED_START_FLASHES=3 -DEXT_OSC=0 '-DVIRTUAL_BOOT_PARTITION' -Wl,--section-start=.bootv=0x0 -Wl,--section-start=.text=0x7400 -Wl,--section-start=.version=0x77fe -Wl,--relax -nostartfiles -nostdlib -o optiboot_lgt8f328p.elf optiboot.o
avr-size optiboot_lgt8f328p.elf
text data bss dec hex filename
996 0 0 996 3e4 optiboot_lgt8f328p.elf
avr-objcopy -j .bootv -j .text -j .data -j .version --set-section-flags .version=alloc,load --set-section-flags .bootv=alloc,load -O ihex optiboot_lgt8f328p.elf optiboot_lgt8f328p.hex
avr-objdump -h -S optiboot_lgt8f328p.elf > optiboot_lgt8f328p.lst
$ cat optiboot_lgt8f328p.hex
:040000000C94003A22
:1074000011248FEF98E09EBF8DBF94B714BE892FD3
:107410008D7011F0892FE0D190E89093F20083E90C
:107420008093F2009093610081E08093610096BFA9
:107430008CE486BF85E08093810088E18093C10061
:1074400086E08093C20080E18093C4008DE0AED1DD
:10745000259A96E020E33CEF51E040E2309385002E
:107460002093840056BBB09BFECF85B1842785B99D
:10747000A895915099F7662477244301CC24DD2404
:1074800064E9A62E51E0252E312C412C512C7DD1C2
:10749000813461F47AD1182F8FD1123829F1113843
:1074A00011F485E001C083E068D164C1823411F435
:1074B00084E103C0853419F485E086D15BC185354C
:1074C00079F463D1E82EFF2460D1082F10E0102F4B
:1074D00000270E291F29000F111F6ED168014AC114
:1074E000863521F484E070D180E0DECF843609F067
:1074F000C5C04BD190E0F82EEE2447D1E80EF11C28
:1075000044D1B82EE70100E011E03FD1F8018193AA
:107510008F012197D1F711BC8D2D992782BD82B59E
:1075200086958695282FD401C301022E04C0B695F6
:10753000A795979587950A94D2F780FD15C0F6E434
:10754000BF1691F4D201C10104C0880F991FAA1F70
:10755000BB1F2A95D2F7682A792A8A2A9B2AAFBAB2
:1075600082E98FBB0000000027D1E5E4BE16B1F42C
:10757000960110C021BD2F5F3F4F832F992782BDF9
:10758000C050DF4F888180BDF4E0FFBB82E08FBB3D
:10759000CF5FD040CE15DF0568F3DBC0C114D10446
:1075A00009F04EC06091000170910101872F90E0B9
:1075B000982F8827262F30E0822B932B90938501DC
:1075C000809384014091020150910301852F90E046
:1075D000982F8827242F30E0822B932B90938701BC
:1075E00080938601209118018091190190E0982FD5
:1075F000882730E0822B932B909389018093880118
:1076000020911A0180911B0190E0982F882730E08B
:10761000822B932B90938B0180938A0160931801A6
:107620007093190140931A0150931B018CE08093D1
:107630000001A092010110920201EAE3E09303012C
:10764000E0E0F1E011BC808180BD81E081BD8181FD
:1076500080BD82E081BD828180BD83E081BD838168
:1076600080BD8E2F8C0D81BD84EA8FBB82EA8FBBDB
:10767000349681E0E038F80729F77CC0843709F0B8
:107680006BC083D090E0F82EEE247FD0E80EF11C82
:107690007CD0182F91D0153489F4E6018701C1BD43
:1076A00021968D2F992782BDE1E0EFBB00000000FD
:1076B00080B563D00150104091F74BC0E6018701BF
:1076C000209729F480918401909185013CC0C130BC
:1076D000D10529F480918401909185010FC0C230B9
:1076E000D10529F480918601909187012CC0C33087
:1076F000D10539F48091860190918701892F9927CE
:1077000022C0C831D10529F4809188019091890166
:107710001AC0C931D10529F480918801909189015D
:10772000EDCFCA31D10529F480918A0190918B0166
:107730000AC0CB31D10529F480918A0190918B0147
:10774000DDCFFE018491219618D00150104009F040
:10775000B7CFCE0CDF1C0EC0853739F42DD08EE1AB
:107760000CD085E90AD08FE09FCE813511F48CE0F2
:107770001DD022D080E101D08ACE982F8091C00008
:1077800085FFFCCF9093C60008958091C00087FFCD
:10779000FCCF8091C00084FD01C0A8958091C600F7
:1077A00008959AE29A95F1F708950895E0E6F0E0D9
:1077B00098E1908380830895E8DF803219F08DE0AE
:1077C000F5DFFFCF84E1D9CF1F93182FDEDF1150F3
:1077D000E9F7F2DF1F910895282E80E0E7DFECE063
:0477E000FF270994E2
:0277FE00000584
:040000030000740085
:00000001FF
The above seems to be the same as factory hex file. https://github.com/LGTMCU/Larduino_HSP/blob/master/hardware/LGT/avr/bootloaders/lgt8fx8p/optiboot_lgt8f328p.hex
:040000000C94003A22
:1074000011248FEF98E09EBF8DBF94B714BE892FD3
:107410008D7011F0892FE0D190E89093F20083E90C
:107420008093F2009093610081E08093610096BFA9
:107430008CE486BF85E08093810088E18093C10061
:1074400086E08093C20080E18093C4008DE0AED1DD
:10745000259A96E020E33CEF51E040E2309385002E
:107460002093840056BBB09BFECF85B1842785B99D
:10747000A895915099F7662477244301CC24DD2404
:1074800064E9A62E51E0252E312C412C512C7DD1C2
:10749000813461F47AD1182F8FD1123829F1113843
:1074A00011F485E001C083E068D164C1823411F435
:1074B00084E103C0853419F485E086D15BC185354C
:1074C00079F463D1E82EFF2460D1082F10E0102F4B
:1074D00000270E291F29000F111F6ED168014AC114
:1074E000863521F484E070D180E0DECF843609F067
:1074F000C5C04BD190E0F82EEE2447D1E80EF11C28
:1075000044D1B82EE70100E011E03FD1F8018193AA
:107510008F012197D1F711BC8D2D992782BD82B59E
:1075200086958695282FD401C301022E04C0B695F6
:10753000A795979587950A94D2F780FD15C0F6E434
:10754000BF1691F4D201C10104C0880F991FAA1F70
:10755000BB1F2A95D2F7682A792A8A2A9B2AAFBAB2
:1075600082E98FBB0000000027D1E5E4BE16B1F42C
:10757000960110C021BD2F5F3F4F832F992782BDF9
:10758000C050DF4F888180BDF4E0FFBB82E08FBB3D
:10759000CF5FD040CE15DF0568F3DBC0C114D10446
:1075A00009F04EC06091000170910101872F90E0B9
:1075B000982F8827262F30E0822B932B90938501DC
:1075C000809384014091020150910301852F90E046
:1075D000982F8827242F30E0822B932B90938701BC
:1075E00080938601209118018091190190E0982FD5
:1075F000882730E0822B932B909389018093880118
:1076000020911A0180911B0190E0982F882730E08B
:10761000822B932B90938B0180938A0160931801A6
:107620007093190140931A0150931B018CE08093D1
:107630000001A092010110920201EAE3E09303012C
:10764000E0E0F1E011BC808180BD81E081BD8181FD
:1076500080BD82E081BD828180BD83E081BD838168
:1076600080BD8E2F8C0D81BD84EA8FBB82EA8FBBDB
:10767000349681E0E038F80729F77CC0843709F0B8
:107680006BC083D090E0F82EEE247FD0E80EF11C82
:107690007CD0182F91D0153489F4E6018701C1BD43
:1076A00021968D2F992782BDE1E0EFBB00000000FD
:1076B00080B563D00150104091F74BC0E6018701BF
:1076C000209729F480918401909185013CC0C130BC
:1076D000D10529F480918401909185010FC0C230B9
:1076E000D10529F480918601909187012CC0C33087
:1076F000D10539F48091860190918701892F9927CE
:1077000022C0C831D10529F4809188019091890166
:107710001AC0C931D10529F480918801909189015D
:10772000EDCFCA31D10529F480918A0190918B0166
:107730000AC0CB31D10529F480918A0190918B0147
:10774000DDCFFE018491219618D00150104009F040
:10775000B7CFCE0CDF1C0EC0853739F42DD08EE1AB
:107760000CD085E90AD08FE09FCE813511F48CE0F2
:107770001DD022D080E101D08ACE982F8091C00008
:1077800085FFFCCF9093C60008958091C00087FFCD
:10779000FCCF8091C00084FD01C0A8958091C600F7
:1077A00008959AE29A95F1F708950895E0E6F0E0D9
:1077B00098E1908380830895E8DF803219F08DE0AE
:1077C000F5DFFFCF84E1D9CF1F93182FDEDF1150F3
:1077D000E9F7F2DF1F910895282E80E0E7DFECE063
:0477E000FF270994E2
:0277FE00000584
:040000030000740085
:00000001FF
And finaly it works.
PS C:\work\avr\avrdude_test\avrdude_bin> .\avrdude -c avrisp -P COM12 -p lgt8f328p -U .\optiboot_lgt8f328p_winavr.hex
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e950f (probably lgt8f328p)
avrdude: Note: flash memory has been specified, an erase cycle will be performed.
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file .\optiboot_lgt8f328p_winavr.hex for flash
with 1002 bytes in 3 sections within [0, 0x77ff]
using 9 pages and 150 pad bytes
avrdude: writing 1002 bytes flash ...
Writing | ################################################## | 100% 0.38 s
avrdude: 1002 bytes of flash written
avrdude: verifying flash memory against .\optiboot_lgt8f328p_winavr.hex
Reading | ################################################## | 100% 0.06 s
avrdude: 1002 bytes of flash verified
avrdude done. Thank you.
PS C:\work\avr\avrdude_test\avrdude_bin> .\avrdude -c urclock -P COM19 -b 57600 -p lgt8f328p -xshowall -xbootsize=3072
avrdude: AVR device initialized and ready to accept instructions
0 0000-00-00 00.00 application 0 store 0 meta 0 boot 3072 x0.0 ......... vector 0 (RESET) LGT8F328P
PS C:\work\avr\avrdude_test\avrdude_bin> .\avrdude -c urclock -P COM19 -b 57600 -p lgt8f328p -U .\Blink.ino.lgt8fx8p.hex -xbootsize=3072
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e950f (probably lgt8f328p)
avrdude: Note: flash memory has been specified, an erase cycle will be performed.
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file .\Blink.ino.lgt8fx8p.hex for flash
with 1052 bytes in 1 section within [0, 0x41b]
using 9 pages and 100 pad bytes
avrdude: preparing flash input for device bootloader
avrdude: writing 1052 bytes flash ...
Writing | ################################################## | 100% 0.37 s
avrdude: 1052 bytes of flash written
avrdude: verifying flash memory against .\Blink.ino.lgt8fx8p.hex
Reading | ################################################## | 100% 0.28 s
avrdude: 1052 bytes of flash verified
avrdude done. Thank you.
PS C:\work\avr\avrdude_test\avrdude_bin> .\avrdude -c urclock -P COM19 -b 57600 -p lgt8f328p -xshowall -xbootsize=3072
avrdude: AVR device initialized and ready to accept instructions
0 2022-06-04 20.56 Blink.ino.lgt8fx8p.hex 1052 store 28610 meta 34 boot 3072 x0.0 ......... vector 0 (RESET) LGT8F328P
I have also build the hex file with Atmel toolchain based on avr-gcc 5.4.0 and 7.3.0, as well as MSYS2 avr-gcc 8.5.0, only the avr-gcc 5.4.0 based version works.
PS C:\work\avr\avrdude_test\avrdude_bin> cat .\optiboot_lgt8f328p_gcc540.hex
:040000000C94003A22
:1074000000D01F92CDB7DEB711248FEF98E09EBF5A
:107410008DBF84B714BE982F9D7009F006D280E806
:107420008093F20093E99093F2008093610091E0E1
:107430009093610086BF8CE486BF85E080938100D5
:1074400088E18093C10096E09093C20090E1909310
:10745000C400809360008DE080936000259A86E0F0
:1074600040E35CEF31E020E25093850040938400DC
:1074700036BBB09BFECF95B1922795B9A8958150A8
:1074800099F71B821A82812C912C54012224239477
:1074900022E0322E412C512C320143949CD1813474
:1074A00061F499D1182FA8D1123811F1113811F4C3
:1074B00085E001C083E088D184C1823411F484E185
:1074C00003C0853419F485E0A3D17BC1853561F40F
:1074D00082D1898380D13981232F30E0382B220F4C
:1074E000331F3B832A836CC1863521F484E090D11D
:1074F00080E0E1CF843609F0C9C06DD1C82E6BD1D0
:10750000D12CDC2CCC24C80ED11C65D189838601FA
:10751000E12CFF24F3945FD1F70181937F010150A7
:107520001109C9F711BC2A813B81832F992782BD9C
:1075300082B586958695B501A401082E04C076957E
:107540006795579547950A94D2F740FD16C0398143
:10755000363499F4A301920104C0220F331F441F53
:10756000551F8A95D2F7822A932AA42AB52A84E93C
:107570008FBB82E98FBB000000003ED139813534DA
:10758000F9F44A815B81C40ED51EE0E0F1E04A8146
:107590005B814C155D0509F414C18A819B810196BC
:1075A0009B838A838A81815081BD2A813B81832F7D
:1075B000992782BD819180BD34E03FBB3FBAE7CFC0
:1075C0008A819B81892B09F045C040910101842F5C
:1075D00090E0982F882750910001852B909385018A
:1075E0008093840120910301822F90E0982F8827B7
:1075F00030910201832B90938701809386018091C3
:10760000190190E0982F882760911801862B90939C
:1076100089018093880180911B0190E0982F882731
:1076200060911A01862B90938B0180938A0150936D
:1076300018014093190130931A0120931B018CE02B
:107640008093000184E980930101109202018AE392
:1076500080930301E0E0F1E011BC808180BD21BC9A
:10766000818180BD31BC828180BD93E091BD8381E9
:1076700080BD8A818E0F81BD24EA2FBB32EA3FBBD9
:107680003496E03841E0F40739F79BC0843709F0BD
:1076900086C0A1D0082F10E0102F00279CD0080F23
:1076A000111D99D0F82EA8D055E46801F5121BC021
:1076B000EA80FB808FEFE81AF80A8FEF8E0D81BD0C
:1076C0008F2D992782BD2FBA0000000080B57CD095
:1076D00091E0C91AD10871F7EA81FB81E00FF11F2F
:1076E000FB83EA836EC0EA80FB80E114F10429F495
:1076F000809184019091850142C0F1E0EF16F10480
:1077000029F4809184019091850111C022E0E21654
:10771000F10429F4809186019091870130C033E013
:10772000E316F10431F48091860190918701892F4D
:1077300026C048E1E416F10429F480918801909173
:1077400089011DC059E1E516F10429F480918801F1
:1077500090918901ECCF8AE1E816F10429F4809137
:107760008A0190918B010BC09BE1E916F10429F489
:1077700080918A0190918B01DACFF7018491FFEF1C
:10778000EF1AFF0A21D021E0C21AD10809F0ADCFCB
:107790004A815B81400F511F5B834A8312C085374A
:1077A00039F42AD08EE110D085E90ED08FE083CE57
:1077B000813531F488E1809360008CE08093600033
:1077C0001BD080E101D06ACE9091C00095FFFCCF24
:1077D0008093C60008958091C00087FFFCCF809100
:1077E000C00084FD01C0A8958091C60008959AE26A
:1077F0009A95F1F708950895EEDF803239F088E127
:10780000809360008DE080936000FFCF84E1DCCF47
:10781000CF93C82FE0DFC150E9F7CF91EDCFE0E67D
:10782000F0E098E1908380830895282EE0E6F0E070
:0C78300088E180831082ECE0FF270994BF
:0277FE00000584
:040000030000740085
:00000001FF
PS C:\work\avr\avrdude_test\avrdude_bin> .\avrdude -c avrisp -P COM12 -p lgt8f328p -U .\optiboot_lgt8f328p_gcc540.hex
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e950f (probably lgt8f328p)
avrdude: Note: flash memory has been specified, an erase cycle will be performed.
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file .\optiboot_lgt8f328p_gcc540.hex for flash
with 1088 bytes in 2 sections within [0, 0x783b]
using 10 pages and 192 pad bytes
avrdude: writing 1088 bytes flash ...
Writing | ################################################## | 100% 0.38 s
avrdude: 1088 bytes of flash written
avrdude: verifying flash memory against .\optiboot_lgt8f328p_gcc540.hex
Reading | ################################################## | 100% 0.06 s
avrdude: 1088 bytes of flash verified
avrdude done. Thank you.
PS C:\work\avr\avrdude_test\avrdude_bin> .\avrdude -c arduino -P COM19 -b 57600 -p lgt8f328p -D -U .\Blink.ino.lgt8fx8p.hex
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e950f (probably lgt8f328p)
avrdude: reading input file .\Blink.ino.lgt8fx8p.hex for flash
with 1052 bytes in 1 section within [0, 0x41b]
using 9 pages and 100 pad bytes
avrdude: writing 1052 bytes flash ...
Writing | ################################################## | 100% 0.40 s
avrdude: 1052 bytes of flash written
avrdude: verifying flash memory against .\Blink.ino.lgt8fx8p.hex
Reading | ################################################## | 100% 0.28 s
avrdude: 1052 bytes of flash verified
avrdude done. Thank you.
Here are the major changes by the vendor from an older version of optiboot (v5.0). There are also quite some changes if you compare the source codes. https://code.google.com/archive/p/optiboot/downloads https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/optiboot/optiboot-v5.0.zip
1) the header file is provided by the vendor here. https://github.com/LGTMCU/Larduino_HSP/blob/master/hardware/LGT/avr/bootloaders/lgt8fx8p/lgtx8p.h
2) initialization sequences https://github.com/LGTMCU/Larduino_HSP/blob/master/hardware/LGT/avr/bootloaders/lgt8fx8p/optiboot.c#L458-L468
// WDT clock by 32KHz IRC
PMCR = 0x80;
PMCR = 0x93;
// system clock: 16MHz system clock
CLKPR = 0x80;
CLKPR = 0x01;
// enable 1KB E2PROM (for LGT8F328P)
ECCR = 0x80;
ECCR = 0x4C;
3) Makefile changes here. https://github.com/LGTMCU/Larduino_HSP/blob/master/hardware/LGT/avr/bootloaders/lgt8fx8p/Makefile#L336-L354
# LGT8F328P
#
lgt8f328p: EXT_OSC ?= 0
lgt8f328p: TARGET = lgt8f328p
lgt8f328p: MCU_TARGET = atmega328p
lgt8f328p: CFLAGS += $(COMMON_OPTIONS)
#lgt8f328p: CFLAGS += $(COMMON_OPTIONS) '-DSOFT_UART'
lgt8f328p: CFLAGS += '-DVIRTUAL_BOOT_PARTITION'
lgt8f328p: AVR_FREQ ?= 16000000L
lgt8f328p: LDSECTIONS = -Wl,--section-start=.bootv=0x0
lgt8f328p: LDSECTIONS += -Wl,--section-start=.text=0x7400 -Wl,--section-start=.version=0x77fe
lgt8f328p: $(PROGRAM)_lgt8f328p.elf
lgt8f328p: $(PROGRAM)_lgt8f328p.hex
lgt8f328p: $(PROGRAM)_lgt8f328p.lst
lgt8f328p_isp: lgt8f328p
lgt8f328p_isp: TARGET = lgt8f328p
lgt8f328p_isp: MCU_TARGET = atmega323p
lgt8f328p_isp: isp
4) Watchdog related changes.
5) GUID
6) EEPROM related changes
BTW, even though 2KB EEPROM are reserved, the bootloader does not support EEPROM read/write.
PS C:\work\avr\avrdude_test\avrdude_bin> .\avrdude -c urclock -P COM19 -b 57600 -p lgt8f328p
-U .\Blink.ino.lgt8fx8p.hex -xbootsize=3072
avrdude: AVR device initialized and ready to accept instructions
avrdude: device signature = 0x1e950f (probably lgt8f328p)
avrdude: Note: flash memory has been specified, an erase cycle will be performed.
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file .\Blink.ino.lgt8fx8p.hex for flash
with 1052 bytes in 1 section within [0, 0x41b]
using 9 pages and 100 pad bytes
avrdude: preparing flash input for device bootloader
avrdude: writing 1052 bytes flash ...
Writing | ################################################## | 100% 0.37 s
avrdude: 1052 bytes of flash written
avrdude: verifying flash memory against .\Blink.ino.lgt8fx8p.hex
Reading | ################################################## | 100% 0.29 s
avrdude: 1052 bytes of flash verified
avrdude done. Thank you.
PS C:\work\avr\avrdude_test\avrdude_bin> .\avrdude -c urclock -P COM19 -b 57600 -p lgt8f328p -qqt
avrdude> dump eeprom 0 0x10
avrdude error: bootloader might not have paged EEPROM read; try -xeepromrw if it has
avrdude error: bootloader might not have EEPROM access; try -xeepromrw if it has
avrdude error: unable to read eeprom page at addr 0x0000
avrdude error: (dump) error reading eeprom address 0x00000 of part LGT8F328P
read operation not supported on memory type eeprom
avrdude> dump flash 0 0x10
0000 0c 94 66 00 0c 94 78 00 0c 94 78 00 0c 94 78 00 | .f. .x. .x. .x.|
avrdude> dump flash 0x7400 0x10
7400 11 24 8f ef 98 e0 9e bf 8d bf 94 b7 14 be 89 2f |.$............./|
avrdude> dump flash 0x73c0 0x40
73c0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................|
73d0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff 42 6c |..............Bl|
73e0 69 6e 6b 2e 69 6e 6f 2e 6c 67 74 38 66 78 38 70 |ink.ino.lgt8fx8p|
73f0 2e 68 65 78 00 e6 07 06 04 14 38 1c 04 c2 6f 17 |.hex......8...o.|
avrdude> quit
https://github.com/L10N37/tehUberChip_Another_PSX_Modchip/tree/main/UberNee/FlashingGuide
Try my flashing guide here for this project.
The following bootloader works fine but I think the source code in the repo does not match the bootloader hex file. https://github.com/LGTMCU/Larduino_HSP/tree/master/hardware/LGT/avr/bootloaders/lgt8fx8p