LIN bootloader for MC9S12ZVL32

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

LIN bootloader for MC9S12ZVL32

1,519 Views
Pavani
Contributor I

Hello,

Currently I am working on LIN bootloader for MC9S12ZVL32 and this is new for me. I haven't worked on it before. Can you provide me with an example code and documents related to it. Also can we use NXP open bus software for this controller? Thanks in advance.

0 Kudos
Reply
2 Replies

1,493 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hello @Pavani,

You can refer to AN5389 S12Z MagniV LIN Bootloader

https://www.nxp.com/docs/en/application-note/AN5389.pdf

There is S12ZVL128 SW:

https://www.nxp.com/docs/en/application-note-software/AN5389SW.zip

 

Regarding the UDS Unified Bootloader, it is ported to S12ZVML128 only.

Please create a ticket if you need more information about it, or to get the NXP Open Bus SW.

 

Thank you,

BR, Daniel

 

0 Kudos
Reply

947 Views
kongst
Contributor I

hello Mr.

 

by refering to the AN5389SW, i develop the bootloder funtion now.

but have some issue, need your help.

 

i can successfully implement the funtion -> FTMRZ_Erase_Flash_RAM();

 

but when funtion finished, and back to ROM, the program will be died. i donot know why?

need your suggestions, thanks.

 

if(!u8flashErased) /* If the flash hasn't been erased, erase it */
{
RTI_Disable(); /* Stop the RTI timer, no timeout required anymore */
 
FTMRZ_Erase_Flash_RAM(); /* Jump to RAM and Erase Flash, return to Flash when done. */
//FTMRZ_Erase_Flash();
 
u8flashErased = 1; /* Indicate that flash has been erased */
}

prm as below:

/* This is a linker parameter file for the MC9S12ZVL128 */
NAMES END /* CodeWarrior will pass all the needed files to the linker by command line. But here you may add your own files too. */

SEGMENTS /* Here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. */

/* Register space */
/* IO_SEG = PAGED 0x000000 TO 0x000FFF; intentionally not defined */

/* RAM */
SHADOW_RAM_S = READ_WRITE 0x001000 TO 0x0013FF; // 512 for functions that will be copied to RAM
RAM = READ_WRITE 0x001400 TO 0x001FFF;
// SHADOW_RAM_S = READ_WRITE 0x001C00 TO 0x001FFF; // 512 for functions that will be copied to RAM
// RAM = READ_WRITE 0x001000 TO 0x001BFF;

/* EEPROM */
EEPROM = READ_ONLY 0x100000 TO 0x1003FF;

/* non-paged FLASHs */
ROM = READ_ONLY 0xFFF400 TO 0xFFF9FF; // 1.5K for the bootloader FLASH-ONLY functions. Each 0x200 is 512
SHADOW_ROM_S = READ_ONLY 0xFFFA00 TO 0xFFFDFF; // 512 for funtions that will be copied to RAM
/* VECTORS = READ_ONLY 0xFFFE00 TO 0xFFFFFF; intentionally not defined: used for VECTOR commands below */
//OSVECTORS = READ_ONLY 0xFFFE10 TO 0xFFFFFF; /* OSEK interrupt vectors (use your vector.o) */
END

PLACEMENT /* here all predefined and user segments are placed into the SEGMENTS defined above. */
_PRESTART, /* Used in HIWARE format: jump to _Startup at the code start */
STARTUP, /* startup data structures */
ROM_VAR, /* constant variables */
STRINGS, /* string literals */
VIRTUAL_TABLE_SEGMENT, /* C++ virtual table segment */
//.ostext, /* OSEK */
NON_BANKED, /* runtime routines which must not be banked */
DEFAULT_ROM,
COPY INTO ROM;
SHADOW_ROM INTO SHADOW_ROM_S;

//.stackstart, /* eventually used for OSEK kernel awareness: Main-Stack Start */
SSTACK, /* allocate stack first to avoid overwriting variables on overflow */
//.stackend, /* eventually used for OSEK kernel awareness: Main-Stack End */
DEFAULT_RAM INTO RAM;
SHADOW_RAM INTO SHADOW_RAM_S; /* Reserve Shadow ROM to copy flash related functions here */


//.vectors INTO OSVECTORS; /* OSEK */
END

ENTRIES /* keep the following unreferenced variables */
/* OSEK: always allocate the vector table and all dependent objects */
//_vectab OsBuildNumber _OsOrtiStackStart _OsOrtiStart
END

STACKSIZE 0x100

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 an Assembly application. */
//INIT Entry /* for assembly applications: that this is as well the initialization entry point */

 

0 Kudos
Reply