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

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

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

ソリューションへジャンプ
4,157件の閲覧回数
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 件の賞賛
返信
1 解決策
4,120件の閲覧回数
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

元の投稿で解決策を見る

2 返答(返信)
4,121件の閲覧回数
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

4,128件の閲覧回数
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

%3CLINGO-SUB%20id%3D%22lingo-sub-1904487%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ES12Z%20-%20%E3%83%AA%E3%83%B3%E3%82%AB%20%E3%83%91%E3%83%A9%E3%83%A1%E3%83%BC%E3%82%BF%20%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%20(*.prm)%20%E3%81%AE%E6%83%85%E5%A0%B1%E3%81%AF%E3%81%A9%E3%81%93%E3%81%A7%E5%85%A5%E6%89%8B%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%99%E3%81%8B%E3%80%82%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1904487%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF%3CBR%20%2F%3EMM9Z1x638%20MCU%E3%81%AE%E3%83%95%E3%82%A1%E3%83%BC%E3%83%A0%E3%82%A6%E3%82%A7%E3%82%A2%E3%82%92CodeWarrior%E3%81%A7%E9%96%8B%E7%99%BA%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%E3%83%97%E3%83%AD%E3%82%B8%E3%82%A7%E3%82%AF%E3%83%88%E3%81%AE%E4%B8%80%E9%83%A8%E3%81%AF%E3%80%81EEPROM(MCU%E3%81%AB%E7%B5%B1%E5%90%88)%E3%81%AE%E7%89%B9%E5%AE%9A%E3%81%AE%E3%82%A2%E3%83%89%E3%83%AC%E3%82%B9%E3%81%AB%E3%83%87%E3%83%BC%E3%82%BF%E3%82%92%E9%85%8D%E7%BD%AE%E3%81%99%E3%82%8B%E3%81%93%E3%81%A8%E3%81%A7%E3%81%99%E3%80%82%E3%80%8C%23pragma%20DATA_SEG%20EEPROM_DATA%E3%80%8D%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8B%E3%81%A8%E3%80%81EEPROM%E3%81%AB%E3%82%B0%E3%83%AD%E3%83%BC%E3%83%90%E3%83%AB%E3%83%87%E3%83%BC%E3%82%BF%E6%A7%8B%E9%80%A0%E3%82%92%E9%85%8D%E7%BD%AE%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%99%E3%80%82%E3%81%97%E3%81%8B%E3%81%97%E3%80%81%E3%81%93%E3%81%AE%E3%82%88%E3%81%86%E3%81%AB%E3%81%AF%E3%80%81%E3%83%AA%E3%83%B3%E3%82%AB%E3%81%AF%E9%96%8B%E5%A7%8B%E3%82%A2%E3%83%89%E3%83%AC%E3%82%B9%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6%E6%B1%BA%E5%AE%9A%E3%81%97%E3%80%81%E7%A7%81%E3%81%AF%E3%81%9D%E3%82%8C%E3%82%92%E8%A3%85%E3%81%86%E3%81%93%E3%81%A8%E3%81%AF%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%9B%E3%82%93%E3%80%82%3C%2FP%3E%3CP%3EGNU%20C%E3%83%84%E3%83%BC%E3%83%AB%E3%83%81%E3%82%A7%E3%83%BC%E3%83%B3%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8B%E5%A0%B4%E5%90%88%E3%81%AF%E3%80%81%E7%89%B9%E5%AE%9A%E3%81%AE%E3%82%A2%E3%83%89%E3%83%AC%E3%82%B9%E3%81%AB%E9%85%8D%E7%BD%AE%E3%81%99%E3%82%8B%E3%81%9F%E3%82%81%E3%81%AE%E3%83%A9%E3%83%99%E3%83%AB%E3%82%92%E3%83%AA%E3%83%B3%E3%82%AB%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%97%E3%83%88%E3%81%A7%E5%AE%9A%E7%BE%A9%E3%81%97%E3%81%BE%E3%81%99%E3%80%82CodeWarrior%E3%82%92%E4%BD%BF%E7%94%A8%E3%81%99%E3%82%8B%E3%81%A8%E3%80%81%E3%83%AA%E3%83%B3%E3%82%AB%E3%81%AE*%20.prm%E3%82%B3%E3%83%9E%E3%83%B3%E3%83%89%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB%E3%81%97%E3%81%8B%E8%A6%8B%E3%81%A4%E3%81%8B%E3%82%8A%E3%81%BE%E3%81%9B%E3%82%93%E3%81%A7%E3%81%97%E3%81%9F%E3%80%82%E3%81%9D%E3%81%AE%E6%A7%8B%E6%96%87%E3%81%AB%E9%96%A2%E3%81%99%E3%82%8B%E6%83%85%E5%A0%B1%E3%81%AF%E3%81%A9%E3%81%93%E3%81%AB%E3%81%82%E3%82%8A%E3%81%BE%E3%81%99%E3%81%8B(%E4%BE%8B%3A%E3%83%A9%E3%83%99%E3%83%AB%E3%81%AE%E5%AE%9A%E7%BE%A9)%3F%E3%82%B3%E3%83%B3%E3%83%91%E3%82%A4%E3%83%A9%E3%83%9E%E3%83%8B%E3%83%A5%E3%82%A2%E3%83%AB%E3%81%A7%E3%81%AF%E3%80%81%E3%81%93%E3%81%AE%E3%83%89%E3%82%AD%E3%83%A5%E3%83%A1%E3%83%B3%E3%83%88%E3%80%8CCodeWarrior%20Development%20Studio%20for%20Microcontrollers%20V10.x%20Targeting%20Manual%E3%80%8D%E3%82%92%E5%8F%82%E7%85%A7%E3%81%97%E3%81%A6%E3%81%84%E3%81%BE%E3%81%99%E3%80%82%E3%81%97%E3%81%8B%E3%81%97%E3%80%81%E7%A7%81%E3%81%AF%E3%81%93%E3%81%AE%E6%96%87%E6%9B%B8%E3%82%92%E8%A6%8B%E3%81%A4%E3%81%91%E3%82%8B%E3%81%93%E3%81%A8%E3%81%8C%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%9B%E3%82%93%E3%80%82%3C%2FP%3E%3CP%3E%E3%82%88%E3%82%8D%E3%81%97%E3%81%8F%E3%81%8A%E9%A1%98%E3%81%84%E3%81%84%E3%81%9F%E3%81%97%E3%81%BE%E3%81%99%E3%80%82%3C%2FP%3E%3C%2FLINGO-BODY%3E