View ASM  variables in expressions window

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

View ASM  variables in expressions window

3,276 Views
Aili
Contributor II
Hi,
 
I am using CW 8.1 for 56F803 using USBTAP. I am new to CW. In the expressions window, I can view the variable defined in C. However, when I put the variables defined in asm to expressions window, it says "undefined identifier in expression". These variables are defined in asm file and "extern" keyword is used in C file. The program also gives correct result.  Is there a way to display the global variables that are defined in assemble code? Thanks.
 
Liping
Labels (1)
Tags (1)
0 Kudos
Reply
6 Replies

678 Views
trytohelp
NXP Employee
NXP Employee
Hi,
 
It seems to be a limitations.
I remember this problem has been reported some times ago.
I will check with the compiler team.
It seems the debug information are not generated for variables defined in assembly.
Keep you informed.
 
Pascal
0 Kudos
Reply

678 Views
Aili
Contributor II
Hi,
 
Thank you for your reply. I am studying the code written by someone else. The original code has lots of variables defined in Assembly with fixed addresses. Is there a statement in C that can define variable with fixed address. I am not familiar with CodeWarrior for 56F800, but I know TI Code Composer Studio  can use "pragma DATA_SECTION(variable, "section name")" to define it.
 
Liping
0 Kudos
Reply

678 Views
trytohelp
NXP Employee
NXP Employee
Hi,
 
I received feedback from our development tool.
They need to investigate the problem.
I will log it in our bug tracking system.
If you want have information about the problem I recommend you to log it in our CRM.
See below details:
Please use Freescale on line support web page.
  - Go to following URL: http://www.freescale.com/TechSupport
  - Click on Submit a Service Request to create a new one or Manage Existing Service Request.
  - You will come to a login page.
  - You can submit your request through the web from there or view the activities of a SR.
Pascal 
0 Kudos
Reply

678 Views
Aili
Contributor II
Hi,
 
Thank you so much for your kindly hellp. The ways you showed me to difine variables in C are also very helpful.  I submitted a service request a few days ago, and they sent me a screen shot of using 56F800E simulator that  works. However, I can not make it work using 56F803. I submitted a simple example project using 56F803 to them and got no reply so far.
 
Liping
 
 
0 Kudos
Reply

678 Views
trytohelp
NXP Employee
NXP Employee
Hi,
 
I logged the problem in our bug base under the number MTWX28268.
The problem will be investigated by the development team.
you will receive info when the problem will be fixed.
 
Regards
Pascal
0 Kudos
Reply

678 Views
trytohelp
NXP Employee
NXP Employee
Hi,
 
There is a simple way to do that:
 
#define TMRA_BASE 0x1100
#define TMRA0_SCR  (*((volatile unsigned char*) (TMRA_BASE+0x7)))

int main(void)
{

 TMRA0_SCR = 24;
}

The second solution is to use a pragma define_section.
For details I suggest you to refer to the 56800x_Build_Tools_Reference.pdf and perfrom a find with define_section.
You will find some information and example using this pragma.

The third solution is to ...extract of 56800x_Build_Tools_Reference.pdf  manual.
Specifying Variable Addresses in C
The user can tell the compiler to specify the address of a variable in a C file using the :
operator. The constant value following the : operator is the word address of the global
variable (i.e., int OneReg : 0xBCD ; specifies that the global variable OneReg
resides at word address 0xBCD).
NOTE The Linker does not reserve space for global variables declared with the :
operator.

Hope this will help you.
Pascal

0 Kudos
Reply