DEVKIT-ZVL128 is not working with Simple Serial Bootloader.

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

DEVKIT-ZVL128 is not working with Simple Serial Bootloader.

Jump to solution
1,491 Views
churyjeong
Contributor II

Dear NXP engineer. 

Recently, I have purchased DEVKIT-ZVL128 to learn LIN bootloader. 

And before running "LIN bootloader", when I run "Simple_Serial_Bootloader_for_S12Z", I met the build error like below. 

The sample code for "Serial_bootloader", I have downloaded the following link: 

Simple Serial Bootloader for S12Z - AN draft 

Question 1) 

How can I fix the error ? 

Question 2) 

The "Simple_Serial_Bootloader_for_S12Z" seems to support lots of S12Z derivatives(S12ZVL,..)

For each derivatives, what should I change to support the S12Z derivatives. 

For example, what should be changed between S12ZVL32 and S12ZVL128 ? 

Build Log messages: 

**** Build of configuration FLASH-P for project Simple_Serial_Bootloader_for_S12Z ****

"D:\\100_freescale\\CW MCU v11.0\\gnu\\bin\\mingw32-make" -j8 all
'Building target: Simple_Serial_Bootloader_for_S12Z.elf'
'Executing target #11 Simple_Serial_Bootloader_for_S12Z.elf'
'Invoking: S12Z Linker'
"D:/100_freescale/CW MCU v11.0/MCU/S12lisa_Tools/Build_Tools/linker" -ArgFile"Simple_Serial_Bootloader_for_S12Z.args" -O"Simple_Serial_Bootloader_for_S12Z.elf"
D:/1_Daesung/02_Projects/00_HSL/01_SW/00_Bootloader/00_NXP_Ref/Simple_Serial_Bootloader_for_S12Z/Simple_Serial_Bootloader_for_S12Z/Project_Settings/Linker_Files/bootloader-persistent.prm
Command Line: '-ArgFile"Simple_Serial_Bootloader_for_S12Z.args" -O"Simple_Serial_Bootloader_for_S12Z.elf"'
Linking D:/1_Daesung/02_Projects/00_HSL/01_SW/00_Bootloader/00_NXP_Ref/Simple_Serial_Bootloader_for_S12Z/Simple_Serial_Bootloader_for_S12Z/Project_Settings/Linker_Files/bootloader-persistent.prm
Reading file 'D:/1_Daesung/02_Projects/00_HSL/01_SW/00_Bootloader/00_NXP_Ref/Simple_Serial_Bootloader_for_S12Z/Simple_Serial_Bootloader_for_S12Z/FLASH/Sources/Bootloader_c.obj'
Reading file 'D:/1_Daesung/02_Projects/00_HSL/01_SW/00_Bootloader/00_NXP_Ref/Simple_Serial_Bootloader_for_S12Z/Simple_Serial_Bootloader_for_S12Z/FLASH/Sources/Errors_c.obj'
Reading file 'D:/1_Daesung/02_Projects/00_HSL/01_SW/00_Bootloader/00_NXP_Ref/Simple_Serial_Bootloader_for_S12Z/Simple_Serial_Bootloader_for_S12Z/FLASH/Sources/SCI_c.obj'
Reading file 'D:/1_Daesung/02_Projects/00_HSL/01_SW/00_Bootloader/00_NXP_Ref/Simple_Serial_Bootloader_for_S12Z/Simple_Serial_Bootloader_for_S12Z/FLASH/Sources/Srec_c.obj'
Reading file 'D:/1_Daesung/02_Projects/00_HSL/01_SW/00_Bootloader/00_NXP_Ref/Simple_Serial_Bootloader_for_S12Z/Simple_Serial_Bootloader_for_S12Z/FLASH/Sources/eeprom_S12Z_c.obj'
Reading file 'D:/1_Daesung/02_Projects/00_HSL/01_SW/00_Bootloader/00_NXP_Ref/Simple_Serial_Bootloader_for_S12Z/Simple_Serial_Bootloader_for_S12Z/FLASH/Sources/flash_S12Z_c.obj'
Reading file 'D:/1_Daesung/02_Projects/00_HSL/01_SW/00_Bootloader/00_NXP_Ref/Simple_Serial_Bootloader_for_S12Z/Simple_Serial_Bootloader_for_S12Z/FLASH/Sources/main_c.obj'
Reading file 'D:/1_Daesung/02_Projects/00_HSL/01_SW/00_Bootloader/00_NXP_Ref/Simple_Serial_Bootloader_for_S12Z/Simple_Serial_Bootloader_for_S12Z/FLASH/Project_Settings/Startup_Code/Dispatcher_c.obj'
Reading file 'D:/1_Daesung/02_Projects/00_HSL/01_SW/00_Bootloader/00_NXP_Ref/Simple_Serial_Bootloader_for_S12Z/Simple_Serial_Bootloader_for_S12Z/FLASH/Project_Settings/Startup_Code/starts12z_c.obj'
Reading file 'D:/1_Daesung/02_Projects/00_HSL/01_SW/00_Bootloader/00_NXP_Ref/Simple_Serial_Bootloader_for_S12Z/Simple_Serial_Bootloader_for_S12Z/FLASH/Lib/mc9s12zvl128_c.obj'
Reading file 'D:/100_freescale/CW MCU v11.0/MCU/S12lisa_Support/s12lisac/lib_small/ansii.lib'
ERROR L1102: Out of allocation space in segment ROM at address 0xFFFC86
Generating MAP file 'D:\1_Daesung\02_Projects\00_HSL\01_SW\00_Bootloader\00_NXP_Ref\Simple_Serial_Bootloader_for_S12Z\Simple_Serial_Bootloader_for_S12Z\FLASH\Simple_Serial_Bootloader_for_S12Z.map'
SmartLinker: *** 1 error(s), 0 warning(s), 0 information message(s) ***
*** command line: '-ArgFile"Simple_Serial_Bootloader_for_S12Z.args" -O"Simple_Serial_Bootloader_for_S12Z.elf"' ***
SmartLinker: *** Error occurred while processing! ***
mingw32-make: *** [Simple_Serial_Bootloader_for_S12Z.elf] Error 1

1 Solution
1,036 Views
churyjeong
Contributor II

Very good comments.

After changing link file, like you mentioned, (I exptended ROM size 4K to 8Kbytes), and I did not update BL_FPROT in Config.h, because the protection area was set to 8K already. So I don't think the change is necessary. 

Thanks for your comments. 

View solution in original post

0 Kudos
5 Replies
1,036 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Just a comment:

I assume, you have the CodeWarrior 11.0.

This error does not appear when you use version of CodeWarrior 10.7.

Best regards,

Diana

1,036 Views
churyjeong
Contributor II

Yes, right, 

I'm using CW version 11.0. 

0 Kudos
1,036 Views
RadekS
NXP Employee
NXP Employee

Hello Chury,

The “ERROR L1102: Out of allocation space in segment ROM at address 0xFFFC86” told you that there isn’t enough space at ROM segment.

 

You may change ROM segment size.

Please edit bootloader-persistent.prm or bootloader-rewritable.prm file for increasing ROM segment size (according to your built configuration – per Figure 4).

If you will change bootloader size for example to 16kB (0xFFC000 TO 0xFFFDFF;), you should also check/modify your BL_FPROT settings in Config.h. Of course, this change should also propagate into your application linker file (ROM will be there only up to 0xFFBFF7)

 

Or, you may change Optimization level – this may save several bytes. On another side, the project debugging may be tricky with such feature.

CW-Project Optimization.png

 

If you will use S12ZVL32 instead S12ZVL128, you should edit FLASH_START_ADD definition in Config.h. Of course, also the main application project linker file must reflect that derivative change…

Please be aware that S12ZVL32 has just 1kB of RAM. In that case, we cannot use this bootloader in rewritable built configuration.

If your modified bootloader will use any derivative specific registers (like physical layers, HVI inputs,…), you should also change original mc9s12zvl128.h and mc9s12zvl128.c files per your derivative. See chapter 3.2

I hope it helps you.

Best regards

Radek

1,037 Views
churyjeong
Contributor II

Very good comments.

After changing link file, like you mentioned, (I exptended ROM size 4K to 8Kbytes), and I did not update BL_FPROT in Config.h, because the protection area was set to 8K already. So I don't think the change is necessary. 

Thanks for your comments. 

0 Kudos
1,036 Views
RadekS
NXP Employee
NXP Employee

Hello Chury,

My comments were rather general. Modify BL_FPROT value is not necessary for your specific case.

You are right, the default BL_FPROT in Config.h is set to 8kB. It is due to the fact, that this option is common for both built options. Correctly it should be rather built configuration dependent (like BOOTLODER_REWRITABLE), but I didn’t want to complicate it so much.

 

I am glad that it works correctly on your side.

BR

Radek