What is the correct way to assign a variable to a specific address with CW 10.xx?  In classic CW the following works "  int    variable name    @0x0070;  "  Importing the project into CW10 give syntax errors

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

What is the correct way to assign a variable to a specific address with CW 10.xx?  In classic CW the following works "  int    variable name    @0x0070;  "  Importing the project into CW10 give syntax errors

跳至解决方案
1,063 次查看
ISUEE
Contributor I

I am importing a project from classic CW to CW 10.  With classic CW the following assigns a global variable to a designated address

 

#pragma   DATA_SEG  RAM

int     variable_name      @0x0070;

 

The CW 10.  gives syntax errors and bad character sequence encountered: @

 

What is the correct method of assigning a variable to a specific address with CW 10.

 

Thanks in advance.

标签 (1)
标记 (3)
0 项奖励
回复
1 解答
823 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

which CW10 version do you work with? if you use CW10.4 with 8/16bit MCU, this will not produce this message.

and is CW10.4 is our recommendation. here is the 10.4 webpage and download:

https://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=CW-MICROCONTROLLERS

在原帖中查看解决方案

0 项奖励
回复
5 回复数
824 次查看
ZhangJennie
NXP TechSupport
NXP TechSupport

which CW10 version do you work with? if you use CW10.4 with 8/16bit MCU, this will not produce this message.

and is CW10.4 is our recommendation. here is the 10.4 webpage and download:

https://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=CW-MICROCONTROLLERS

0 项奖励
回复
823 次查看
ISUEE
Contributor I

Thanks to all for the help and responses.  Updated to version 10.4 from 10.2 and the errors are gone.

0 项奖励
回复
823 次查看
TICS_Fiona
NXP Employee
NXP Employee

This code is built well in my CW10.4. What's the your CodeWarrior version? Could you please attach a simple project to help us reproudce this error? Thanks!

823 次查看
JimDon
Senior Contributor III

What MCU is it?

0 项奖励
回复
823 次查看
JimDon
Senior Contributor III

Try generating a project for that MCU then see how interrupt vectors are places.

0 项奖励
回复