Differential FW update

for GPRS application

  • 1
  • 2
  • Seite 2 von 2
Marco
Benutzer
Avatar
Geschlecht: keine Angabe
Herkunft: Italy
Beiträge: 270
Dabei seit: 10 / 2004
Betreff:

Re: Differential FW update

 · 
Gepostet: 11.03.2012 - 11:28 Uhr  ·  #9
Hi,
just to have a practical view of the problem, I have attacched the flash images (not HEX files) of an AVRco demo, App2313.

If you open the two TXT files with the WinMerge utility (http://winmerge.org),
you can see the differences which happens when you simply add this procedure
Procedure StartBand2();
and call it in a single point of the main loop.

Marco

ps:
To see the differences between files, is better if you edit-options and in the
Editor-categories you set View-line-differences at Character-level.
Der an diesem Beitrag angefügte Anhang ist entweder nur im eingeloggten Zustand sichtbar oder die Berechtigung Deiner Benutzergruppe ist nicht ausreichend.
Merlin
Administrator
Avatar
Geschlecht:
Alter: 25
Beiträge: 1473
Dabei seit: 03 / 2005
Betreff:

Re: Differential FW update

 · 
Gepostet: 11.03.2012 - 16:41 Uhr  ·  #10
Hi Marco.

Zitat

c) If I must modify an existent procedure and it becomes bigger, I think it's hard reduce it to situation b) isn't easier to fully place it in the free area on top ?


In principle, yes, but that would presume that AVRCo allows you to put new functions at top of memory and leave gaps for smaller/removed functions, neither of which is true.

Your example is quite illuminating, isn't it? Why are there so many differences for such a small change? It is because of where the procedure is placed. If it were at top of memory, and the original call existed (maybe to a different procedure) there would be very few changes, but because it is not, all of the relative calls to system functions for any function before the added function also change (they now have to jump over the new procedure). If the function is at bottom of memory (first rather than last) it is no better since every page would change! And indeed, the addition af an extra line to call the new funtion has the same effect! it displaces every line after it, meaning every page boundary changes.

Regards

Merlin.
rh
Administrator
Avatar
Geschlecht:
Herkunft: Germany
Alter: 25
Homepage: e-lab.de
Beiträge: 5558
Dabei seit: 03 / 2002
Betreff:

Re: Differential FW update

 · 
Gepostet: 11.03.2012 - 17:50 Uhr  ·  #11
Hello Marco,

there is only one (difficult and dangereous) way to handle this using the {$Phase addr} {$Dephase} switch around of a procedure/function or a block of procedures/functions. This switch places the concerned functions to an absolute address, at best at a flashpage boundary. But this is difficult to handle in order to avoid code overlapping or big code holes.
Furthermore if functions are appended the calling code must also updated. So also the calling block must be updateable in the same way.
Code
{$Phase $6000}
procedure PhaseTest;
begin
  ...
  ...
end;
{$Dephase}

rolf
Merlin
Administrator
Avatar
Geschlecht:
Alter: 25
Beiträge: 1473
Dabei seit: 03 / 2005
Betreff:

Re: Differential FW update

 · 
Gepostet: 12.03.2012 - 09:38 Uhr  ·  #12
Hi Rolf/Marco

Any solution will of course be difficult/dangerous, but probably stll worth doing for Marco. The {$Phase} method holds promise, I think.
Marco
Benutzer
Avatar
Geschlecht: keine Angabe
Herkunft: Italy
Beiträge: 270
Dabei seit: 10 / 2004
Betreff:

Re: Differential FW update

 · 
Gepostet: 13.03.2012 - 14:18 Uhr  ·  #13
Yes,
I think it's something on which I can start some experiments...

Regards,
Marco
  • 1
  • 2
  • Seite 2 von 2
Gewählte Zitate für Mehrfachzitierung:   0

Registrierte in diesem Topic

Aktuell kein registrierter in diesem Bereich

Die Statistik zeigt, wer in den letzten 5 Minuten online war. Erneuerung alle 90 Sekunden.
MySQL Queries: 15 · Cache Hits: 14   94   108 · Page-Gen-Time: 0.033793s · Speichernutzung: 2 MB · GZIP: ein · Viewport: SMXL-HiDPI