Here's my own boot loader (a cut-down public version) http://aspisys.com/code/hc08/tboot.html.
It reads plain S19 files directly from a terminal. No need for special app on PC side. Just connect with an RS-232 terminal at the given baud rate (adjustable, usually 38400 bps).
It can program the full QE128 memory. The paged memory uses S2 records with the extra byte denoting the page.
You write your application as if stand-alone but simply avoid the boot loader ROM space. Vectors should go to their natural location as the boot loader will relocate them for you.
I've been using it for years without problems.
To assemble you will also need my ASM8 assembler -- the latest version -- which can found here: ASM8 HC08/9S08 Assembler
(Click on the title to download.) Inside the archive you should find all needed include files (qe128.inc, common.inc, macros.inc).
Let me know if you have problems.
Hope this helps.
Message Edited by ok2ucx on 2008-02-04 02:13 PM
hc08sprg-s08qe-alpha-1.exe.zip
AN2295-Bootloader-Control-beta-1.exe.zip
Hi Henry
If you could please send me a copy of your bootloader, that would be great. (russell@et.co.za)
thank-you very much
Russell
Some more QE family AN2295 bootloader updates for the testing available here:
http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&message.id=14668#M14668
Regards, Pavel
I'm working on a wireless bootloader, with a propietary wireless protocol. I'm trying to emulate rs232 over wireless, to use bootloader from an2295 and gui/master from the same an.
I'm working on source of an2295 for qe64. I can't understand these lines:
main:
IFDEF IRQOPTION
BIH PVEC0 ; if IRQ high, jump directly to real app.
ENDIF
LDA SRS ; fetch RESET status reg.
TSTA ; check if zero (this happens if RESET pulse is too short)
BEQ slfprg ; if so, jump to self programming
AND #%11000000 ; mask only POR and PIN RESET source
BNE slfprg ; any of these sources, go to self programming
PVEC0: JMP VEC0 ; jump to relocated application!
VEC0, relocated application jump to main but main is also main of the bootloader, how can it goes to main of my new software?
If I use more space for my personal bootloader (I've to put the code for the transceiver) i.e. 2 KB where I have to put the new REL_VECT? thank you.
Hallo,
this is perfectly OK. paged AC and QE devices (with Flash 64kB up) do not have vector relocation feature implemented, thus these must be redirected the same way as on older HC08s (see AN2295, protocol version 1 for details). AC128 and QE128 are using protocol version 0x0A.
The initial values of redirected tables are stored in
APL_VECT_ROM: SECTION
in 0xFBA0 - 0xFBFF memory area.
This area is not protected and is (during bootloading) reprogrammed with new vectors (actually JMP vector - 3 bytes sequence for each redirected vector) pointing to the user application. VEC0 points to the reset vector of the application and that's why it is also used during startup when bootloader decides to run the user application. Initial values (before any bootloading) are going to bootloader reset, so such blank device (with bootloader only) restarts bootloader again and again.
---
You can move REL_VECT in erase page multiples, actually you need to touch:
ASM file:
- REL_VECT value define: (REL_VECT EQU $FBA0)
- protection boundary: (MY_NVPROT DC.B %11111101)
PRM file:
APLVECTROM = READ_ONLY 0xFBA0 TO 0xFBFF;
Hope it's clear.
Pavel