Bootloader

Jeroen.Vandezande
 
Avatar
 
Subject:

Bootloader

 · 
Posted: 07.02.2014 - 13:13  ·  #1
Hi,

I want to implement a classic bootloader in AVRCo.
Suppose I will use the UART for comunications with the outside world that will upload the .hex file from a PC
So I want to upgrade the entire application not some parts of it.
I was wondering what i need to do with the FlashInitPage procedure.
You need to give it an address of a page and the value passed needs to be a constant not a variable.
But I want to flash all pages, So can I use this procedure in a loop?

I would like a bit more info on how to upgrade the entire flash memory from within the bootloader.

Thank you.

Jeroen Vandezande
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: Bootloader

 · 
Posted: 07.02.2014 - 13:41  ·  #2
Hello Jeroen,

yes, must erase each page step by step.

rolf
Jeroen.Vandezande
 
Avatar
 
Subject:

Re: Bootloader

 · 
Posted: 07.02.2014 - 14:01  ·  #3
Hi Rolf,

How do you switch to the next page?
The functions FlashWritePage, FlashErasePage, FlashProgPage all work on a specific flash page, so when I am done with one, how do I select the next flash page?
Mario
Benutzer
Avatar
Gender: n/a
Age: 50
Posts: 15
Registered: 06 / 2012
Subject:

Re: Bootloader

 · 
Posted: 07.02.2014 - 14:04  ·  #4
Hi,
I think if you want to implement a classic bootloader it's better to use the FlashDownload Monitor. It's described in the AVR Standard Driver manual at 3.50.5.3. .
So you only have to implement the procedures FlashLoaderInit, FlashLoaderRecv, FlashLoaderTransm and (optional) FlashLoaderExit.
See the example in .\E-Lab\AVRco\Demos\SelfProg.

Best regards
Mario
Jeroen.Vandezande
 
Avatar
 
Subject:

Re: Bootloader

 · 
Posted: 07.02.2014 - 14:06  ·  #5
Hi Mario,


Thank you very much!!!!
Somehow I missed that part of the manual, my bad...
That is exactly what I was looking for.

Best Regards,

Jeroen
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 15 · Cache Hits: 14   93   107 · Page-Gen-Time: 0.03372s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI