View previous topic :: View next topic |
Author |
Message |
njepsen
Joined: 13 Aug 2007 Posts: 469
|
Posted: Sat Jul 22, 2017 11:05 pm Post subject: Bootloader update |
|
|
I am using a modified version of Josef's bootloader; I want to update the bootloader itself from an SD card.
I cant decide if this is possible or not, and if so, where to start.
(the reason for this is i want to send an SD card to a user many many hundreds of miles away, to update the bootloader)
(BASCOM-AVR version : 2.0.7.9 , Latest : 2.0.7.8 ) _________________ Neil |
|
Back to top |
|
|
enniom
Joined: 20 Oct 2009 Posts: 537
|
|
Back to top |
|
|
njepsen
Joined: 13 Aug 2007 Posts: 469
|
Posted: Sun Jul 23, 2017 6:26 am Post subject: |
|
|
hi enniom, and thaks for your reply.
i know about this post, but my question is can i replace the bootloader itself, not the run time code ..the bootloader? _________________ Neil |
|
Back to top |
|
|
i.dobson
Joined: 05 Jan 2006 Posts: 1570 Location: Basel, Switzerland
|
Posted: Sun Jul 23, 2017 6:51 am Post subject: |
|
|
Hi,
I'm not sure if you can update the bootloader with a bootloader. You'd have to do something really trickly along the lines of having 2 bootloaders.
1) Bootloader that can update the main application
2) A tiny bootloader (maybe at the very end of the bootloader) that can update the application bootloader.
From my experience the bootloader should be as simple as possible and tested, tested, tested until your 100% sure it's bug free. That way your sure you'll never have to change it. I have a device that's been out in the field for about 4 years with over 1000 installations and although I've updated the main application several times the bootloader hasn't changed. On a few occasions we've had to reprogram the complete AVR on site and my service guys carry a "stand alone ISP" to allow them to do this. Here's the link:
https://www.olimex.com/Products/AVR/Programmers/AVR-ISP500-TINY/
Using it is very simple:
1) Plug into USB port on PC (it now appears as a small flash drive)
2) Copy required files onto flash drive
3) Attach to the ISP
4) Press button on the ISP and wait until the LED lights up green.
Regards
Ian Dobson _________________ Walking on water and writing software to specification is easy if they're frozen. |
|
Back to top |
|
|
njepsen
Joined: 13 Aug 2007 Posts: 469
|
Posted: Sun Jul 23, 2017 7:14 am Post subject: |
|
|
hi Ian,
thats exactly the info i needed. Thanks.
i have about 40 devices out in the feild, and they each have a hex bootloder that works ok but is slow., If i need to update formware, i FTP a new hex file plus a 16bit crc. But id like to update them with a bootloader that will accept a bin file, which is/only 13 as long. My hex file is 74k and takes a while over the cellular network. The best solution would be to update the bootloader OTA, but your little gadget is a possibilty i think. _________________ Neil |
|
Back to top |
|
|
njepsen
Joined: 13 Aug 2007 Posts: 469
|
Posted: Sun Jul 23, 2017 7:15 am Post subject: |
|
|
hi Ian,
thats exactly the info i needed. Thanks.
i have about 40 devices out in the feild, and they each have a hex bootloder that works ok but is slow., If i need to update formware, i FTP a new hex file plus a 16bit crc. But id like to update them with a bootloader that will accept a bin file, which is/only 13 as long. My hex file is 74k and takes a while over the cellular network. The best solution would be to update the bootloader OTA, but your little gadget is a possibilty i think. _________________ Neil |
|
Back to top |
|
|
i.dobson
Joined: 05 Jan 2006 Posts: 1570 Location: Basel, Switzerland
|
Posted: Sun Jul 23, 2017 7:24 am Post subject: |
|
|
Hi,
We even sent one of these boxes to a customer (high security zone where the service guys have no access and the customer didn't want to remove the devices from the area) and they where surprised how easy/quick it was.
Regards
Ian Dobson _________________ Walking on water and writing software to specification is easy if they're frozen. |
|
Back to top |
|
|
njepsen
Joined: 13 Aug 2007 Posts: 469
|
Posted: Sun Jul 23, 2017 7:27 am Post subject: |
|
|
thats what i was thinking. _________________ Neil |
|
Back to top |
|
|
six1
Joined: 27 Feb 2009 Posts: 553
|
Posted: Sun Jul 23, 2017 8:45 am Post subject: |
|
|
Hi Neil,
for a project of mine, i was using an external serial flash "ESF" with 512KB. (AT45DB041B)
There is one emergency System Backup flashed, which can be reflased into Mega by pressing button on reset i.e.
Sending new system will be flashed first into ESF. After whole transmission into ESF, Data is checked (CRC...) and if it was ok, it is flased into Mega.
Best, michael _________________ For technical reasons, the signature is on the back of this message. |
|
Back to top |
|
|
|