S12Z - Where can I find information on the linker parameter file (*.prm)?

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

S12Z - Where can I find information on the linker parameter file (*.prm)?

Jump to solution
129 Views
Sep95
Contributor I

Hello,
I'm developing firmware for MM9Z1x638 MCU using CodeWarrior. One part of the project is placing data at a specific address in EEPROM (integrated in MCU). Using "#pragma DATA_SEG EEPROM_DATA" I'm able to place a global data structure in EEPROM. But this way, linker decides about the start address and I cannot pretend it.

If I would use GNU C toolchain I would define a label in the linker script for placement at a specific address. Using CodeWarrior I could only find a *.prm command file for linker. Where can I find information on its syntax (e.g. defining labels)? In the compiler manual the document "CodeWarrior Development Studio for Microcontrollers V10.x Targeting Manual" is referenced for this purpose. But I cannot find this document.

Thanks in advance.

0 Kudos
Reply
1 Solution
92 Views
stanish
NXP Employee
NXP Employee

Hello,

#pragma DATA_SEG EEPROM_DATA is recommended approach.

You can define multiple segments for each object to be placed at specific address.

There is an alternative way using @ operator - this bypasses the .prm file and alocate an absolute address section at defined address.

#include <hidef.h> /* for EnableInterrupts macro */
#include "derivative.h" /* include peripheral declarations */

#define EEPROM_TEST 0x10008
unsigned int EE_Test  @EEprom_TEST;

In Map file you should see this:

stanish_0-1720611177057.png

 

hope it helps.

Stan

View solution in original post

2 Replies
93 Views
stanish
NXP Employee
NXP Employee

Hello,

#pragma DATA_SEG EEPROM_DATA is recommended approach.

You can define multiple segments for each object to be placed at specific address.

There is an alternative way using @ operator - this bypasses the .prm file and alocate an absolute address section at defined address.

#include <hidef.h> /* for EnableInterrupts macro */
#include "derivative.h" /* include peripheral declarations */

#define EEPROM_TEST 0x10008
unsigned int EE_Test  @EEprom_TEST;

In Map file you should see this:

stanish_0-1720611177057.png

 

hope it helps.

Stan

106 Views
lama
NXP TechSupport
NXP TechSupport

Hi,

There are compiler and target manual in the installation directory.

c:\......\CW MCU v11.1\MCU\Help\PDF\

I have also asked our CW expert for additional info.

Best regards,

Ladislav