Jerauld Numata

Bootloader questions for HCS08AW

Discussion created by Jerauld Numata on Mar 24, 2009
Latest reply on Mar 26, 2009 by Jerauld Numata

I am trying to get a bootloader for field upgrading of my MC9S08AW32 app and have some questions.  I have read AN2295 and have built the latest project for the 9S08.

For starters I just built the bootloader and tried to establish communication with the master gui app.

1) The bootloader builds, but when I try to load and run it using a P&E Multilink BDM, it breaks, with the following displayed in the command window:


Frequency change to ~7902832hz.
Frequency change to ~0hz.
Frequency change to ~3790830hz.



I started the master gui app and it runs and displays:

Parsed S-record lines: 220   Bytes total:6873

Source address range: 0x8000-0xFFFF

Waiting for HS(S)08 reset ACK...


Restarting the BDM still does not change the above behavior

1) What do I need to do to get it to run?

2) Inspecting the included mc9s08aw60.prm, there are lines

I was expecting these to be set to protect the bootloader.  What do there parameters have to be to protect the bootloader, while implementing the interrupt vector re-mapping?

3) If I want to build the bootloader into my app so that it will be loaded as a single file, what changes to the interrupt vector table or other changes to the prm file have to be accomplished, and still be compatible with the initializer?

My current .prm file is:

SEGMENTS /* Here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. */
    Z_RAM                    =  READ_WRITE   0x0070 TO 0x00FF;
    RAM                      =  READ_WRITE   0x0100 TO 0x086F;
    ROM                      =  READ_ONLY    0x8000 TO 0xFF8F;
    ROM1                     =  READ_ONLY    0xFF90 TO 0xFFCB;
 /* INTVECTS                 =  READ_ONLY    0xFFCC TO 0xFFFF; Reserved for Interrupt Vectors */

PLACEMENT /* Here all predefined and user segments are placed into the SEGMENTS defined above. */
    DEFAULT_RAM                         /* non-zero page variables */
                                        INTO  RAM;

    _PRESTART,                          /* startup code */
    STARTUP,                            /* startup data structures */
    ROM_VAR,                            /* constant variables */
    STRINGS,                            /* string literals */
    VIRTUAL_TABLE_SEGMENT,              /* C++ virtual table segment */
    COPY                                /* copy down information: how to initialize variables */
                                        INTO  ROM; /* ,ROM1: To use "ROM1" as well, pass the option -OnB=b to the compiler */

    _DATA_ZEROPAGE,                     /* zero page variables */
    MY_ZEROPAGE                         INTO  Z_RAM;


//VECTOR 0 _Startup     /* Reset vector: this is the default entry point for an application. */


4) For the MC9S08AW32, is the "FC Protocol, Version 2, HC9S08", the applicable version?

5) When using a 16 Mhz external oscillator, and ICG, is there still the ability to trim the baud rate clock?