Bootloader with DZ60

Discussion created by Francois on Feb 24, 2010
Latest reply on Jul 26, 2010 by bigmac



I'm new with DZ 60 and I've found several very interested informations on the forum but I've a little problem

for building a serial bootloader. I'm not very familiar with assembler and prefer C. 


1) We want to send the .mot (or .s19) file to SCI1 (full duplex) with terminal (or hyperterminal) on Windows.

We use XON/XOFF software protocol to wait for programmation of Flash.

I've built that bootloader (~800 bytes) and I must copy it in Ram then jump to it.

My problem is that all the long jumps in that bootloader are directed in ROM and not in RAM.

I've use the maximum of INLINE functions but relatives jumps are 128 bytes at maximum.

How can I change the adresses of these long jumps ? Or how can I force the compiler not to use 

long jumps ?

I thought to write this bootloader for the RAM and then place it into ROM, is it the good solution.

How can I shift a part of code from an adress to an other one ?

(After, I'll have to build an other bootloader for half duplex ModBus protocol but it'll be very similar)


2) When programming my device, the eeprom is always cleared (set to 0xFF)

I've tried the following but without succes :

- set the option for non programming EEPROM,

- indicate not to program the 0x1400 0x1800 area

- save the EEPROM contents when preload (the .s19 file is correctly stored)

but, in postload, when I recall the .s19 file, it doesn't load 

How can I recall my previous eeprom parameters ?


3) When I stop the debugger, it opens the file at the stop point, is there a way not to open this file 

and to stay in the current displayed file ?


Excuse me for my poor knowledge of DZ 60 and my poor english, if you need further informations,

don't hesitate to ask me