Browser Data: signed types

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

Browser Data: signed types

跳至解决方案
3,152 次查看
BasePointer
Contributor II
Hi,
 
I changed standard settings as "Generate Browser Data From: Language Parser" in Build Extras.
But the browser shows all elements of my struct as if all of them were signed as you can see at attached browser.jpg file.
 
How can I solve this problem?
 
Regards.
 
标签 (1)
标记 (1)
0 项奖励
回复
1 解答
1,557 次查看
CrasyCat
Specialist III
Hello
 
Then you have to submit a service request through our on line support for that.
To log the issue with Freescale please go to following URL:
    http://www.freescale.com/webapp/sps/site/homepage.jsp?nodeId=054670&tid=FSH
and click on "Submit a service request"
 
Make sure to specify which version of the tools you are using and attach a reproducible case (whole project with source files, header files, .prm file and .mcp file.
I would recommend you to use the Pack and Go wizard to make sure you deliver all useful info.
 
Just select Help -> "Pack and Go" in the IDE and follow the instructions on the screen.
 
CrasyCat

在原帖中查看解决方案

0 项奖励
回复
5 回复数
1,557 次查看
CrasyCat
Specialist III
Hello
 
Which CPU are you targeting?
- Which version of CodeWarrior are you using?
  To retrieve that info:
    - Start CodeWarrior
    - Select Help -> About Freescale CodeWarrior
    - Click on "Install Products"
    - CodeWarrior version used is displayed on top in the Installed Products dialog.
 
CrasyCat
0 项奖励
回复
1,557 次查看
BasePointer
Contributor II
Hi,
 
My target CPU is MC9S08LC60 that is not released yet.
I have installed LC60_SP_ALPHAv4 patch to CW v5.1 to be able to work with LC60.
I don't know there is a patch also for v5.1.
 
Installed Products:
 CodeWarrior Development Studio for Freescale HC08 v3.1 Service Pack LC60 ALPHA, build 060110
 CodeWarrior Development Studio for Freescale HC08 5.1, build 6124.
 CodeWarrior Development Studio for Freescale HC08 5.1 Compiler Patch 1, build 6192.
 CodeWarrior Development Studio for Freescale HC08 v5.1, Service Pack AP64/AP64A, build 060824.
 CodeWarrior Development Studio for Freescale HC08 v5.1, Service Pack ASAZ60A, build 060810.
 CodeWarrior Development Studio for Freescale HC08 v5.1, Service Pack EY16A, build 060821.
 CodeWarrior Development Studio for Freescale HC08 v5.1, Service Pack GP_GT, build 060829.
 CodeWarrior Development Studio for Freescale HC08 v5.1, Service Pack GT16A, build 060630.
 CodeWarrior Development Studio for Freescale HC08 v5.1, Service Pack JB8, build 060727.
 CodeWarrior Development Studio for Freescale HC08 v5.1, Service Pack JR12, build 060821.
 CodeWarrior Development Studio for Freescale HC08 v5.1, Service Pack JW32, build 060721.
 CodeWarrior Development Studio for Freescale HC08 v5.1, Service Pack QD4, build 061215.
 CodeWarrior Development Studio for Freescale HC08 v5.1, Service Pack QY4A, build 060609.
0 项奖励
回复
1,557 次查看
CrasyCat
Specialist III
Hello
 
I assume you have problem with variables defined as char. The HC08 compiler uses unsigned char per default, but the Language Parser does not know about that.
 
You may want to try the following:
  - Add option -Ldf (log Predefined  defines to file) to the Compiler to HC08 command line.
  - Build at least one C source file. The compiler will generate a file predef.h in the bin directory.
    The generated file will contain all predefined macros defined by the compiler according to
    your configuration.
  - You can remove the option -Ldf from the command line now.
  - In the "Build Extra" panel specify that file as Macro File.
 Is the parser working better?
 
I did try to reproduce the problem on my installation. All variable defines as char are displayed as char in the browser window.
 
Are you sure your variables are not defined as signed char?
Did you try to generate the preprocessor listing to see the real definition of the variables?
 
CrasyCat
0 项奖励
回复
1,557 次查看
BasePointer
Contributor II
Hi,
Here is my TObis defination:
typedef struct
{
 unsigned char OBIS_INDEX;
 unsigned char ONCEKI;
 unsigned int  LAST_PARAM;
} TObis;

I always use "signed" or "unsigned" keywords in my variable definations.
Here is another type TAdmin defination:
typedef struct
{
 unsigned long   HASP_ID; // 4 byte
 unsigned int    UserID;  // 2 byte
 unsigned long   Seed;    // 4 byte
 unsigned long   Serial;  // 4 byte
 unsigned char   RC;      // 1 byte
 unsigned char   FCS;     // 1 byte
} TAdmin; // total: 16 byte
For the result see attached browser2.gif file.
 
I produced predef.h and showed it to build extras as macro file "{Project}bin\predef.h". Yes really parser works better now, but all variable still seem as signed :smileysad:
 
Here is a preprocessor output of a module from my project:
/*       87 */  typedef struct
/*       88 */  {
/*       89 */  unsigned long HASP_ID ;
/*       90 */  unsigned int UserID ;
/*       91 */  unsigned long Seed ;
/*       92 */  unsigned long Serial ;
/*       93 */  unsigned char RC ;
/*       94 */  unsigned char FCS ;
/*       95 */  } TAdmin ;

Message Edited by BasePointer on 2007-01-0402:32 PM

Message Edited by BasePointer on 2007-01-0402:35 PM

Message Edited by BasePointer on 2007-01-0402:36 PM

0 项奖励
回复
1,558 次查看
CrasyCat
Specialist III
Hello
 
Then you have to submit a service request through our on line support for that.
To log the issue with Freescale please go to following URL:
    http://www.freescale.com/webapp/sps/site/homepage.jsp?nodeId=054670&tid=FSH
and click on "Submit a service request"
 
Make sure to specify which version of the tools you are using and attach a reproducible case (whole project with source files, header files, .prm file and .mcp file.
I would recommend you to use the Pack and Go wizard to make sure you deliver all useful info.
 
Just select Help -> "Pack and Go" in the IDE and follow the instructions on the screen.
 
CrasyCat
0 项奖励
回复