Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Bootloader secrets I do not understand

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive
View previous topic :: View next topic  
Author Message
Arera

Bascom Member



Joined: 23 Sep 2007
Posts: 386
Location: Wuppertal, Germany

germany.gif
PostPosted: Fri Jun 13, 2014 1:37 pm    Post subject: Bootloader secrets I do not understand Reply with quote

Hi all,

my DIY bootloader does not work....
I copy the new prog to an EEPROM and flash from there. Works so far.

Here's my problem:

If the lenght of the prog (the used flash) changes, I noticed that the .hex changes at adresee h003E /h003F.
After bootloding from my EEPROM (it contains the proper values, promised), these values read not the values I wrote?!

If I use the MCS-bootloader, these adresses change to the proper values.
I noticed, that the MCS-BL appends a couple of h1A-bytes. should I do the same, and how?

(BASCOM-AVR version : 2.0.7.7 )
Back to top
View user's profile
Arera

Bascom Member



Joined: 23 Sep 2007
Posts: 386
Location: Wuppertal, Germany

germany.gif
PostPosted: Tue Jun 17, 2014 4:23 pm    Post subject: Reply with quote

I admitt: My question is a bit messy...
I found out by myself what was missing:
I left out all the indented lines, which leads to wired behavior. Thanks to the 71 viewers anyway!

write_EEPROM_to_flash:
Spmcrval = 3 : Gosub Do_spm ' erase the first page
Spmcrval = 17 : Gosub Do_spm ' re-enable page

for x = 0 to number_of_Pages
load the buffer
gosub writepage
next x

Wrd = 0 'Z pointer needs wrd to be 0
Spmcrval = 5 : Gosub Do_spm 'write page
Spmcrval = 17 : Gosub Do_spm ' re-enable page

Goto _reset
Back to top
View user's profile
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum