AnsweredAssumed Answered

Strange problem of MC56F8006 with CW10.4 and Processor Expert

Question asked by Yichi ZHANG on May 23, 2013
Latest reply on May 30, 2013 by xiangjun.rong

I am using CW10.4 on Windows 8, it is my first time working with DSC and I found a very strange problem.


When I creat an empty Processor Expert project and directly run the project I got the following assembly code:

PE_low_level_init(); jsr 0x003a70 

The address of PE_low_level_init() is 0xB8.

There will be an error: No source available for "0x454321 (0x454321)() "


I then found if I put something before PE_low_level_init, for example uint8_t i;

The assembly code:

adda #0x000002,SP PE_low_level_init(); cmp Y1,A        X:(R0)+,C mpy A1,Y0,B        A,X:(R0)+ 

The jsr is gone so the program can be executed but nothing initialized.


If I put uint8_t i = 0; before PE_low_level_init, the generated code is:

adda #0x000002,SP uint8_t i = 0; cmp Y1,A        X:(R0)+,C add B,A           A,X:(R0)+ PE_low_level_init(); jsr 0x0000b8 


Another strange thing I noticed is that if I put

uint8_t msg[] = "hello world"; 

at the beginning of main.

Then read the variable in the debug mode.

I got : "he!\0o world\0"


Can any give a hint on that?