Go Down

Topic: Uploading troubles to 1284p (Read 10997 times) previous topic - next topic

000

@nick
Freaking Hell!!! Ur bootloader hex file worked  XD
did 10 uploads no troubles watsover.... :D U are real life saver... :D U solved the thing which was driving me nuts...
Did u change the bootloader?

One more thing... :)
Quote
Now we'll install the bootloader upload sketch onto the Uno and run it (set the serial monitor to 115200 baud).

http://gammon.com.au/Arduino/Atmega_Board_Detector.zip


Plz edit the given link with the bootloader one in your tutorial page... :)

Nick Gammon


@ nick
Tried uploading larger sketches?


Not yet.

Quote
and Is the bootloader uploaded by your https://github.com/nickgammon/arduino_sketches/tree/master/Atmega_Board_Programmer same as the one provided by maniacbug?


It is the file optiboot_atmega1284p.hex from maniacbug's GitHub page. Slightly modified to change some of the consecutive 0xFF bytes to be 0x00 because of the problem with uploading a lot of consecutive 0xFFs to the Uno using the standard Optiboot (known bug there).
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Nick Gammon


Plz edit the given link with the bootloader one in your tutorial page... :)


Fixed thx.

Quote
Freaking Hell!!! Ur bootloader hex file worked


Strange. I expected more teething problems. ;)

Well, glad it worked.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Nick Gammon


Did u change the bootloader?


Not apart from the change made so it would actually upload to the programming Uno.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

000

@Nick Was comparing the chip fuse with maniacbugs (which I did earlier) and yours

Maniacbug
Code: [Select]
Atmega fuse calculator.
Written by Nick Gammon.
Entered programming mode OK.
Signature = 0x1E 0x97 0x05
Processor = ATmega1284P
Flash memory size = 262144
LFuse = 0xFF
HFuse = 0xDE
EFuse = 0xFD
Lock byte = 0xCF
OCD Enable.............................. [ ]
JTAG Enable............................. [ ]
Enable Serial (ICSP) Programming........ [X]
Watchdog Timer Always On................ [ ]
Preserve EEPROM through chip erase...... [ ]
Boot into bootloader.................... [X]
Divide clock by 8....................... [ ]
Clock output............................ [ ]
Bootloader size: 1024 bytes.
Start-up time: SUT0: [X]  SUT1: [X] (see datasheet)
Clock source: low-power crystal.
Brownout detection at: 2.7V.


Nicks Bootloader
Code: [Select]

Atmega fuse calculator.
Written by Nick Gammon.
Entered programming mode OK.
Signature = 0x1E 0x97 0x05
Processor = ATmega1284P
Flash memory size = 131072
LFuse = 0xFF
HFuse = 0xDE
EFuse = 0xFD
Lock byte = 0xEF
OCD Enable.............................. [ ]
JTAG Enable............................. [ ]
Enable Serial (ICSP) Programming........ [X]
Watchdog Timer Always On................ [ ]
Preserve EEPROM through chip erase...... [ ]
Boot into bootloader.................... [X]
Divide clock by 8....................... [ ]
Clock output............................ [ ]
Bootloader size: 1024 bytes.
Start-up time: SUT0: [X]  SUT1: [X] (see datasheet)
Clock source: low-power crystal.
Brownout detection at: 2.7V.



Lock byte and Flash memory sizes are different..

000

Board detector output files Comparison

With Maniac bugs bootloader
Code: [Select]
Atmega chip detector.
Entered programming mode OK.
Signature = 1E 97 05
Processor = ATmega1284P
Flash memory size = 262144
LFuse = FF
HFuse = DE
EFuse = FD
Lock byte = CF
Bootloader in use: Yes
EEPROM preserved through erase: No
Watchdog timer always on: No
Bootloader is 1024 bytes starting at 3FC00

Bootloader:

3FC00: 0F 92 CD B7 DE B7 11 24 84 B7 14 BE 81 FF F1 D0
3FC10: 85 E0 80 93 81 00 82 E0 80 93 C0 00 88 E1 80 93
3FC20: C1 00 86 E0 80 93 C2 00 80 E1 80 93 C4 00 8E E0
3FC30: CA D0 20 9A 26 E0 80 E3 9C EF 31 E0 90 93 85 00
3FC40: 80 93 84 00 36 BB B0 9B FE CF 18 9A A8 95 21 50
3FC50: A9 F7 00 E0 10 E0 EE 24 E3 94 E1 E1 DE 2E F3 E0
3FC60: FF 2E A5 D0 81 34 71 F4 A2 D0 89 83 B2 D0 89 81
3FC70: 82 38 09 F4 8B C0 81 38 11 F4 84 E0 01 C0 83 E0
3FC80: 8F D0 8B C0 82 34 11 F4 84 E1 03 C0 85 34 19 F4
3FC90: 85 E0 A7 D0 82 C0 85 35 91 F4 89 D0 A8 2E BB 24
3FCA0: 86 D0 08 2F 10 E0 10 2F 00 27 0A 29 1B 29 81 2F
3FCB0: 88 1F 88 27 88 1F 8B BF 00 0F 11 1F 6D C0 86 35
3FCC0: 21 F4 84 E0 8E D0 80 E0 DB CF 84 36 09 F0 40 C0
3FCD0: 6E D0 6D D0 C8 2E 6B D0 80 EE 00 30 18 07 18 F4
3FCE0: F8 01 F7 BE E8 95 A1 2C 51 E0 B5 2E 60 D0 F5 01
3FCF0: 81 93 5F 01 CE 16 D1 F7 F0 EE 00 30 1F 07 18 F0
3FD00: F8 01 F7 BE E8 95 65 D0 07 B6 00 FC FD CF F8 01
3FD10: A0 E0 B1 E0 2C 91 30 E0 11 96 8C 91 11 97 90 E0
3FD20: 98 2F 88 27 82 2B 93 2B 12 96 0C 01 E7 BE E8 95
3FD30: 11 24 32 96 82 E0 A0 30 B8 07 61 F7 85 E0 F8 01
3FD40: 87 BF E8 95 07 B6 00 FC FD CF D7 BE E8 95 25 C0
3FD50: 84 37 A9 F4 2C D0 2B D0 B8 2E 29 D0 3A D0 CB 2C
3FD60: 48 01 F4 01 86 91 1C D0 08 94 81 1C 91 1C CA 94
3FD70: C1 F7 0F 5F 1F 4F BA 94 0B 0D 11 1D 0E C0 85 37
3FD80: 39 F4 27 D0 8E E1 0C D0 87 E9 0A D0 85 E0 78 CF
3FD90: 81 35 11 F4 88 E0 17 D0 1C D0 80 E1 01 D0 61 CF
3FDA0: 90 91 C0 00 95 FF FC CF 80 93 C6 00 08 95 80 91
3FDB0: C0 00 87 FF FC CF 80 91 C0 00 84 FD 01 C0 A8 95
3FDC0: 80 91 C6 00 08 95 E0 E6 F0 E0 98 E1 90 83 80 83
3FDD0: 08 95 ED DF 80 32 19 F0 88 E0 F5 DF FF CF 84 E1
3FDE0: DF CF CF 93 C8 2F E3 DF C1 50 E9 F7 F2 DF CF 91
3FDF0: 08 95 80 E0 E8 DF EE 27 FF 27 09 94 FF FF FF FF
3FE00: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FE10: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FE20: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FE30: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FE40: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FE50: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FE60: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FE70: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FE80: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FE90: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FEA0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FEB0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FEC0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FED0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FEE0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FEF0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FF00: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FF10: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FF20: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FF30: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FF40: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FF50: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FF60: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FF70: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FF80: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FF90: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FFA0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FFB0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FFC0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FFD0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FFE0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
3FFF0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

MD5 sum of bootloader = 71 DD C2 84 64 C4 73 27 D2 33 01 1E FA E1 24 4B

First 256 bytes of program memory:

0: 0C 94 87 00 0C 94 B2 00 0C 94 B2 00 0C 94 B2 00
10: 0C 94 B2 00 0C 94 B2 00 0C 94 B2 00 0C 94 B2 00
20: 0C 94 B2 00 0C 94 B2 00 0C 94 B2 00 0C 94 B2 00
30: 0C 94 B2 00 0C 94 B2 00 0C 94 B2 00 0C 94 B2 00
40: 0C 94 B2 00 0C 94 B2 00 0C 94 7B 12 0C 94 B2 00
50: 0C 94 66 14 0C 94 FC 14 0C 94 B2 00 0C 94 B2 00
60: 0C 94 B2 00 0C 94 B2 00 0C 94 B2 00 0C 94 B2 00
70: 0C 94 9F 14 0C 94 49 15 0C 94 B2 00 0C 94 B2 00
80: 0C 94 B2 00 0C 94 B2 00 0C 94 B2 00 00 00 21 00
90: 24 00 27 00 2A 00 00 00 22 00 25 00 28 00 2B 00
A0: 00 00 20 00 23 00 26 00 29 00 02 02 02 02 02 02
B0: 02 02 04 04 04 04 04 04 04 04 03 03 03 03 03 03
C0: 03 03 01 01 01 01 01 01 01 01 01 02 04 08 10 20
D0: 40 80 01 02 04 08 10 20 40 80 01 02 04 08 10 20
E0: 40 80 01 02 04 08 10 20 40 80 00 00 00 01 02 00
F0: 08 09 00 00 00 00 04 03 07 06 00 00 00 00 00 00


continued onto next post (Char limit)  :)

000

And Nicks bootloader (Working..)

Code: [Select]

Atmega chip detector.
Entered programming mode OK.
Signature = 1E 97 05
Processor = ATmega1284P
Flash memory size = 131072
LFuse = FF
HFuse = DE
EFuse = FD
Lock byte = EF
Bootloader in use: Yes
EEPROM preserved through erase: No
Watchdog timer always on: No
Bootloader is 1024 bytes starting at 1FC00

Bootloader:

1FC00: 0F 92 CD B7 DE B7 11 24 84 B7 14 BE 81 FF F1 D0
1FC10: 85 E0 80 93 81 00 82 E0 80 93 C0 00 88 E1 80 93
1FC20: C1 00 86 E0 80 93 C2 00 80 E1 80 93 C4 00 8E E0
1FC30: CA D0 20 9A 26 E0 80 E3 9C EF 31 E0 90 93 85 00
1FC40: 80 93 84 00 36 BB B0 9B FE CF 18 9A A8 95 21 50
1FC50: A9 F7 00 E0 10 E0 EE 24 E3 94 E1 E1 DE 2E F3 E0
1FC60: FF 2E A5 D0 81 34 71 F4 A2 D0 89 83 B2 D0 89 81
1FC70: 82 38 09 F4 8B C0 81 38 11 F4 84 E0 01 C0 83 E0
1FC80: 8F D0 8B C0 82 34 11 F4 84 E1 03 C0 85 34 19 F4
1FC90: 85 E0 A7 D0 82 C0 85 35 91 F4 89 D0 A8 2E BB 24
1FCA0: 86 D0 08 2F 10 E0 10 2F 00 27 0A 29 1B 29 81 2F
1FCB0: 88 1F 88 27 88 1F 8B BF 00 0F 11 1F 6D C0 86 35
1FCC0: 21 F4 84 E0 8E D0 80 E0 DB CF 84 36 09 F0 40 C0
1FCD0: 6E D0 6D D0 C8 2E 6B D0 80 EE 00 30 18 07 18 F4
1FCE0: F8 01 F7 BE E8 95 A1 2C 51 E0 B5 2E 60 D0 F5 01
1FCF0: 81 93 5F 01 CE 16 D1 F7 F0 EE 00 30 1F 07 18 F0
1FD00: F8 01 F7 BE E8 95 65 D0 07 B6 00 FC FD CF F8 01
1FD10: A0 E0 B1 E0 2C 91 30 E0 11 96 8C 91 11 97 90 E0
1FD20: 98 2F 88 27 82 2B 93 2B 12 96 0C 01 E7 BE E8 95
1FD30: 11 24 32 96 82 E0 A0 30 B8 07 61 F7 85 E0 F8 01
1FD40: 87 BF E8 95 07 B6 00 FC FD CF D7 BE E8 95 25 C0
1FD50: 84 37 A9 F4 2C D0 2B D0 B8 2E 29 D0 3A D0 CB 2C
1FD60: 48 01 F4 01 86 91 1C D0 08 94 81 1C 91 1C CA 94
1FD70: C1 F7 0F 5F 1F 4F BA 94 0B 0D 11 1D 0E C0 85 37
1FD80: 39 F4 27 D0 8E E1 0C D0 87 E9 0A D0 85 E0 78 CF
1FD90: 81 35 11 F4 88 E0 17 D0 1C D0 80 E1 01 D0 61 CF
1FDA0: 90 91 C0 00 95 FF FC CF 80 93 C6 00 08 95 80 91
1FDB0: C0 00 87 FF FC CF 80 91 C0 00 84 FD 01 C0 A8 95
1FDC0: 80 91 C6 00 08 95 E0 E6 F0 E0 98 E1 90 83 80 83
1FDD0: 08 95 ED DF 80 32 19 F0 88 E0 F5 DF FF CF 84 E1
1FDE0: DF CF CF 93 C8 2F E3 DF C1 50 E9 F7 F2 DF CF 91
1FDF0: 08 95 80 E0 E8 DF EE 27 FF 27 09 94 FF FF FF FF
1FE00: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FE10: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FE20: 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FE30: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FE40: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FE50: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FE60: 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FE70: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FE80: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FE90: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FEA0: 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FEB0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FEC0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FED0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FEE0: 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FEF0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FF00: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FF10: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FF20: 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FF30: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FF40: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FF50: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FF60: 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FF70: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FF80: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FF90: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FFA0: 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FFB0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FFC0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FFD0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FFE0: 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
1FFF0: FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

MD5 sum of bootloader = 77 2F 81 F1 7F 1E 46 93 97 B4 54 23 4C 44 72 68

First 256 bytes of program memory:

0: 0C 94 85 00 0C 94 A5 00 0C 94 A5 00 0C 94 A5 00
10: 0C 94 A5 00 0C 94 A5 00 0C 94 A5 00 0C 94 A5 00
20: 0C 94 A5 00 0C 94 A5 00 0C 94 A5 00 0C 94 A5 00
30: 0C 94 A5 00 0C 94 A5 00 0C 94 A5 00 0C 94 A5 00
40: 0C 94 A5 00 0C 94 A5 00 0C 94 C1 00 0C 94 A5 00
50: 0C 94 A5 00 0C 94 A5 00 0C 94 A5 00 0C 94 A5 00
60: 0C 94 A5 00 0C 94 A5 00 0C 94 A5 00 0C 94 A5 00
70: 0C 94 A5 00 0C 94 A5 00 0C 94 A5 00 0C 94 A5 00
80: 0C 94 A5 00 0C 94 A5 00 0C 94 A5 00 00 00 21 00
90: 24 00 27 00 2A 00 00 00 22 00 25 00 28 00 2B 00
A0: 00 00 20 00 23 00 26 00 29 00 02 02 02 02 02 02
B0: 02 02 04 04 04 04 04 04 04 04 03 03 03 03 03 03
C0: 03 03 01 01 01 01 01 01 01 01 01 02 04 08 10 20
D0: 40 80 01 02 04 08 10 20 40 80 01 02 04 08 10 20
E0: 40 80 01 02 04 08 10 20 40 80 00 00 00 01 02 00
F0: 08 09 00 00 00 00 04 03 07 06 00 00 00 00 00 00


Quote
It is the file optiboot_atmega1284p.hex from maniacbug's GitHub page. Slightly modified to change some of the consecutive 0xFF bytes to be 0x00 because of the problem with uploading a lot of consecutive 0xFFs to the Uno using the standard Optiboot (known bug there).


Maybe this was the problem?? or Fuse settings difference was also there in Lock byte and Flash memory sizes :)

Nick Gammon


Lock byte and Flash memory sizes are different..


I had a bug in my sketches (now corrected) where it thought the 1284 had 256 Kb of memory. Of course, it has 128 Kb of memory. So that is just a bug on my part.

The lock bits aren't that important (well, they *are* important) but the difference shouldn't affect uploading. I just turned on the bit which lets the sketch read the memory of the bootloader.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

Nick Gammon

Come to think of it, I found a rogue line in maniacbug's bootloader, which I deleted:

Code: [Select]
:020000000504F5  <----- delete this line
:020000021000EC
:10FC00000F92CDB7DEB7112484B714BE81FFF1D0B7
:10FC100085E08093810082E08093C00088E180933A
:10FC2000C10086E08093C20080E18093C4008EE032
:10FC3000CAD0209A26E080E39CEF31E090938500C3
:10FC40008093840036BBB09BFECF189AA8952150B4
:10FC5000A9F700E010E0EE24E394E1E1DE2EF3E00A
:10FC6000FF2EA5D0813471F4A2D08983B2D08981CE
:10FC7000823809F48BC0813811F484E001C083E03C
:10FC80008FD08BC0823411F484E103C0853419F421
:10FC900085E0A7D082C0853591F489D0A82EBB24F9
:10FCA00086D0082F10E0102F00270A291B29812F4A
:10FCB000881F8827881F8BBF000F111F6DC08635D6
:10FCC00021F484E08ED080E0DBCF843609F040C0A0
:10FCD0006ED06DD0C82E6BD080EE0030180718F4AF
:10FCE000F801F7BEE895A12C51E0B52E60D0F501E2
:10FCF00081935F01CE16D1F7F0EE00301F0718F0A8
:10FD0000F801F7BEE89565D007B600FCFDCFF80115
:10FD1000A0E0B1E02C9130E011968C91119790E029
:10FD2000982F8827822B932B12960C01E7BEE8951B
:10FD30001124329682E0A030B80761F785E0F8011F
:10FD400087BFE89507B600FCFDCFD7BEE89525C074
:10FD50008437A9F42CD02BD0B82E29D03AD0CB2C74
:10FD60004801F40186911CD00894811C911CCA940E
:10FD7000C1F70F5F1F4FBA940B0D111D0EC08537D1
:10FD800039F427D08EE10CD087E90AD085E078CF0E
:10FD9000813511F488E017D01CD080E101D061CF0B
:10FDA0009091C00095FFFCCF8093C600089580918C
:10FDB000C00087FFFCCF8091C00084FD01C0A895E2
:10FDC0008091C6000895E0E6F0E098E1908380839A
:10FDD0000895EDDF803219F088E0F5DFFFCF84E190
:10FDE000DFCFCF93C82FE3DFC150E9F7F2DFCF9128
:0CFDF000089580E0E8DFEE27FF2709946B
:040000031000FC00ED
:00000001FF


I couldn't see the point of that, so that was the only real change I made.

Oh yes, and the changes to the 0xFF I mentioned, are really an artifact of my conversion process. They weren't in the original bootloader file anyway.
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

000

@ Nick that could have been the problem I guess... Anyways mine is working nicely now... :D Thanks a lot again...
@ All I would suggest Nick hex file for bootloaders on ATmega1284p :)

000

Oh... God!!! Why me???  =( The issue is back... :(

Code: [Select]
avrdude: stk500_getsync(): not in sync: resp=0x00

and I am back to square one... :( 
It was fun while it worked... :(

Nick Gammon

We seem to have more than one issue here. On the one hand, the bootloader uploader worked.

On the other, your particular installations seems a bit flaky.

To save me re-reading 4 or 5 pages, can you just remind me of your hardware setup? Or take a photo, preferably?
Please post technical questions on the forum, not by personal message. Thanks!

More info:
http://www.gammon.com.au/electronics

000

Idiot... I am an idiot... found the problem I forgot to change the boards to Atmega1284 in IDE last time I uploaded. thats why this time I got sync errors... I was toggling between Duemolanove and Atmega1284 so last time I forgot to change it back... SO new bootloader has actually solved the problem... :D I am so relieved now!!! :D
Thanx again for Nick and Crossroads for your helps... :)

CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

PeterVH


Come to think of it, I found a rogue line in maniacbug's bootloader, which I deleted:

Code: [Select]
:020000000504F5  <----- delete this line
:020000021000EC
:10FC00000F92CDB7DEB7112484B714BE81FFF1D0B7
...
:00000001FF



This is the boot code version number. I think it is not supposed to be at that location. See optiboot.c and the Makefile: the version is meant to be in a section named "version".
All targets in the optiboot makefile that do not specify -DBIGBOOT have an option like this in the LDSECTIONS variable:
Code: [Select]
   -Wl,--section-start=.text=0x7e00  -Wl,--section-start=.version=0x7ffe
which makes the version section start 2 bytes before the end of the 512 byte range in which the bootloader should fit.

For some reason the big bootloaders do not have this option.
I added such an option for the atmega1284:

atmega1284: LDSECTIONS  = -Wl,--section-start=.text=0x1fc00 -Wl,--section-start=.version=0x1fffe

(version section starts at the end of the 1024 bytes in which the big bootloader should fit)

If I make the bootloader again, the version number ends up nicely at address 1FFFE and the hex file looks like this:

Code: [Select]

:020000021000EC
:10FC0000112484B714BE81FFF3D085E08093810076
...
:10FDE0001F93182FE3DF1150E9F7F2DF1F910895F9
:0AFDF00080E0E8DFEE27FF2709940A
:02FFFE000504F8
:040000031000FC00ED
:00000001FF


(I did not post the complete hex as all byte are different from the original hex file and I have no 1284 to test this)

Go Up