MC13213 SRB: How to produce .s19 file?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MC13213 SRB: How to produce .s19 file?

Jump to solution
2,296 Views
lex4098
Contributor III
Hello,

this is a newbie speaking.

I refer to MC13213 SRB, so the CPU is HC9S08GT60.
I use Codewarrior 5.7.0.

I am working with a MC13213 SRB board in a lab.

This board has not a BDM cable, has not a serial interface.
So I can not use BDM debugger, I can not use serial monitor.

The board has a USB interface that I use to flash some freescale .s19 files using
test tool's embedded bootloader. This procedure seems to work only with
freescale files.


My question:
How can i produce a *working* .s19 file to simply upload into the board?
What is the correct procedure for this?


I searched anywhere in freescale docs, but cant find this info.

Best Regards,
lex4098
Labels (1)
Tags (1)
0 Kudos
1 Solution
726 Views
lex4098
Contributor III
thank you peg,

I find a Project.abs.s19 file in the bin directory.

Now: this should is the right file to flash onto the board, isn't it?
(BTW, I also have a .bbl file inside the project)

So i move it into the s19 subfolder of Test Tool's directory.

However, I try to flash it (using Embedded Bootloader applet in the Test Tool application)
but I get an error like : "Firmware download failed - mismatch found on address=0xFFD0".

I find this answer
"I suspect that the MyApp programs do not know about the bootloader, and need to have the
vector data moved to where the chip has relocated the vectors."
here: http://forums.freescale.com/freescale/board/message?board.id=CWCOMM&message.id=349
but have no idea on how to solve this using C.

Best Regards and thank you,
lex4098

View solution in original post

0 Kudos
3 Replies
726 Views
peg
Senior Contributor IV
Hi lex,
 
Take a look in the bin directory under your project it may well be there if not take a look at this advice:
 
 
727 Views
lex4098
Contributor III
thank you peg,

I find a Project.abs.s19 file in the bin directory.

Now: this should is the right file to flash onto the board, isn't it?
(BTW, I also have a .bbl file inside the project)

So i move it into the s19 subfolder of Test Tool's directory.

However, I try to flash it (using Embedded Bootloader applet in the Test Tool application)
but I get an error like : "Firmware download failed - mismatch found on address=0xFFD0".

I find this answer
"I suspect that the MyApp programs do not know about the bootloader, and need to have the
vector data moved to where the chip has relocated the vectors."
here: http://forums.freescale.com/freescale/board/message?board.id=CWCOMM&message.id=349
but have no idea on how to solve this using C.

Best Regards and thank you,
lex4098
0 Kudos
726 Views
CecchiSandrone
Contributor II
I have exactly this problem too. Maybe is it useful to post the .prm file?

Code:
/************************************************************************************* This file contains some basic linker parameters.** The linker file is made so it matches architecture for the Freescale HCS08 GB60/GT60 ucontroller* to be used in the 802.15.4/Zigbee project. * * This version must be used if the Embedded Bootloader from version 5.00 is on the board. Use old linker file if* you have an older version of the Embedded Bootloader (freeloader) versions before 5.00.** Author(s):  Michael V. Christensen** (c) Copyright 2004, Freescale Semiconductor, Inc. All rights reserved.** Freescale Confidential Proprietary* Digianswer Confidential** No part of this document must be reproduced in any form - including copied,* transcribed, printed or by any electronic means - without specific written* permission from Freescale.** Last Inspected: 29-03-01* Last Tested:*************************************************************************************/NAMES// Do not remove this block/section.// Description: The NAMES block contains a list of binary files building the application. This block// is mandatory and can only be specified once in a prm file.// Additional files may be specified by the option -Add. The object files specified with the option// -Add are linked before the files mentioned in the NAMES block. With the option -Add, additional// files can be added to a project without modifying the link parameter file.// If all binary files should be specified by the command line option -add, then an empty NAMES// block (just NAMES END) must be present in the link parameter file. Object files added with this// option are linked before the object files specified in the NAMES block.END// **************************************************************************// Memory map for HCS08 GB60/GT60. All memory areas are define below i.e. registers and stack etc.// are shown.// Options// READ_WRITE is for normal variables// READ_ONLY is for const variables and code// NO_INIT is for uninitialized variables.// Note!// "RES_" means that the system is not allowed to use the specified memory.SECTIONS    // Port registers    DIRECT_PAGE_REGISTERS       = READ_WRITE 0x0000 TO 0x007F; // HW registers - This section contains often used port registers    // Fast direct addressable memory    DIRECT_ADDRESSING_MEMORY    = READ_WRITE 0x0080 TO 0x00FF; // "Fast" RAM memory    // 802.15.4/App. stack memory    APP_STACK_RAM               = READ_WRITE 0x0100 TO 0x025F; // RAM memory        // 802.15.4/App. general memory   APP_RAM                     = READ_WRITE 0x0260  TO 0x0102F; // RAM memory         CODE_EXECUTION_FROM_RAM0    = READ_WRITE 0x1030  TO 0x01077; // RAM memory        RST_APP_VAR                 = NO_INIT    0x01078 TO 0x01078; // July 28th 05,Lakshmi    // Reserve space for NV RAM pointer    // The pointer is initialized by code.    MAC_NV_RAM_POINTER_RAM      = NO_INIT    0x01078 TO 0x01079; // RAM memory    ZS_NV_RAM_POINTER_RAM       = NO_INIT    0x0107A TO 0x0107D; // RAM memory    NVM_SCRATCHPAD_POINTER_RAM  = NO_INIT    0x0107E TO 0x0107F; // RAM memory        // 802.15.4/App. startup structure flash memory    APP_STARTUP_STRUC_FLASH     = READ_ONLY 0x01080 TO 0x10AF; // Flash memory    // 802.15.4/App. flash memory - section 1    APP_CODE                    = READ_ONLY 0x010B0 TO 0x17FF; // Flash memory        //High page registers    HIGH_PAGE_REGISTERS         = READ_WRITE 0x1800 TO 0x182B; // HW registers - High page register section    APP_CODE_1                  = READ_ONLY 0x0182C TO 0x19FF;    // BootLoader/802.15.4/App. NV RAM flash memory.    // Initialized by 802.15.4.    NVM_SCRATCHPAD              = READ_ONLY 0x01A00 TO 0x1BFF; // Flash memory        BOOTLOADER_MAC_NV_RAM       = READ_ONLY 0x01C00 TO 0x1C8C; // Flash memory    BOOTLOADER_PHY_NV_RAM       = READ_ONLY 0x01C8D TO 0x1CBB; // Flash memory    BOOTLOADER_APP_NV_RAM       = READ_ONLY 0x01CBC TO 0x1DFF; // Flash memory        BOOTLOADER_ZDO_NV_RAM_INIT  = READ_ONLY 0x1E00 TO 0x1E95; // Flash memory    NVM_ZIGBEE_DATA_SECTION0    = READ_ONLY 0x1E96 TO 0x1FFF; // Flash memory    NVM_ZIGBEE_SECTION0_ID      = READ_ONLY 0x1FFA TO 0x1FFF; // Flash memory        NVM_ZIGBEE_DATA_SECTION1    = READ_ONLY 0x02000 TO 0x21FF; // Flash memory    NVM_ZIGBEE_SECTION1_ID      = READ_ONLY 0x021FA TO 0x21FF; // Flash memory              // 802.15.4/App. flash memory - section 2    APP_CODE_2                  = READ_ONLY 0x02200 TO 0xFFAF; // Flash memory    RES_NV_REGISTERS_FLASH      = READ_ONLY  0xFFB0 TO 0xFFBF; // None-volatile registers    RES_IRQ_VECTORS_TABLE_FLASH = READ_ONLY  0xFFC0 TO 0xFFFD; // ISR vectors    // Note! 802.15.4/App. does not have its own reset vector.    RES_RESET_VECTOR_FLASH     = READ_ONLY  0xFFFE TO 0xFFFF; // System reset vectorEND// **************************************************************************// Here it is listed how the variables and code must be allocated.PLACEMENT    MY_ZEROPAGE                 INTO DIRECT_ADDRESSING_MEMORY;    DEFAULT_RAM                 INTO APP_RAM;    DEFAULT_ROM                 INTO APP_CODE,APP_CODE_1, APP_CODE_2;    .startData                  INTO APP_STARTUP_STRUC_FLASH;        RST_APP_VARIABLE      INTO RST_APP_VAR;        CODE_EXECUTION_FROM_RAM     INTO CODE_EXECUTION_FROM_RAM0;    ZS_NV_RAM_POINTER           INTO ZS_NV_RAM_POINTER_RAM;    MAC_NV_RAM_POINTER          INTO MAC_NV_RAM_POINTER_RAM;        NVM_SCRATCHPAD_POINTER      INTO NVM_SCRATCHPAD_POINTER_RAM;            NVM_SCRATCHPAD_DATA0        INTO NVM_SCRATCHPAD;            BOOTLOADER_MAC_NV_DATA0     INTO BOOTLOADER_MAC_NV_RAM;    BOOTLOADER_PHY_NV_DATA0     INTO BOOTLOADER_PHY_NV_RAM;    BOOTLOADER_APP_NV_DATA0     INTO BOOTLOADER_APP_NV_RAM;        BOOTLOADER_ZDO_NV_DATA      INTO BOOTLOADER_ZDO_NV_RAM_INIT;    NVM_ZIGBEE_DATA0            INTO NVM_ZIGBEE_DATA_SECTION0;    NVM_ZIGBEE_DATA0_INIT       INTO NVM_ZIGBEE_SECTION0_ID;        NVM_ZIGBEE_DATA1            INTO NVM_ZIGBEE_DATA_SECTION1;    NVM_ZIGBEE_DATA1_INIT       INTO NVM_ZIGBEE_SECTION1_ID;    NV_REGISTERS_SECTION        INTO RES_NV_REGISTERS_FLASH;    SSTACK                      INTO APP_STACK_RAM;    IRQ_VECTOR_SECTION         INTO RES_IRQ_VECTORS_TABLE_FLASH;END// **************************************************************************VECTOR 0 _Startup /* reset vector: this is the default entry point for a C/C++ application. *///VECTOR 0 Entry  /* reset vector: this is the default entry point for a Assembly application. *///INIT Entry      /* for assembly applications: that this is as well the initialization entry point */