memory map with 56F8367

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

memory map with 56F8367

1,635 Views
Ben
Senior Contributor I

I developed a project on 56F8367 with CW 10.4.

Running the code with the debugger (USB TAP ONCE) everything looks good.

However, when I run the project in stand-alone mode (internal Flash), it behaves strange.

Main software loop is working, but it looks that the software is trying to access a wrong RAM aria for reading / writing data.

For example: sending data over serial bus - works good in debug mode, but in stand-alone mode I am getting wrong data.

I can not debug it with the debugger, as in debug mode it works good.

I suspect that the memory map in debug and in "normal run" modes are not the same, and maybe I should define something.

Any idea? Please h e l p ...

Ben

Labels (1)
0 Kudos
5 Replies

1,283 Views
FTSolutions
Contributor III

Some questions to help with understanding the overall project situation -

1.  Are both Release and Debug versions using the same data model (sdm | ldm) build configuration (affect data pointer size and addressing range in code)

2. Are both using the same linker .cmd file?  IF not, why? 

3. Are you accessing/using external memory and/or memory mapped devices with /CSx chip select signals?   I have found, reported, issues with certain external I/O CS address spaces not working properly with respect to wait states, and it might be possible that when being slowly paced by USBTAP in debug mode it slows things enough to seem to work, but not when running full speed.

4. Are you using the Freescale "Beans" in your project?   Do you have "Freeze Generated Code" selected?, Maybe forcing a complete rebuild/regen for the release version is needed?

5.  What sorts of timers & other interrupts are you using - maybe your full speed operation is allowing interrupts to stack up and overflow how much available stack space you've alloted?

some of these may/may not apply to your situation, but to help understand possible causes, it is necessary to ask questions that touch on some of the usual suspects..

Mike

0 Kudos

1,283 Views
ankur_vcns_apps
NXP Employee
NXP Employee

Hi FTSolutions

I am using CW8.3 and observing the same issues. the same are also reproducable with CW10.5. Can you please let me know the settings required for release and debug version binaries and how to make them. I tried exploring the two codewarriors but could not find the required steps.

0 Kudos

1,283 Views
Ben
Senior Contributor I

Thanks Mike, I'll recheck it all according to your guiding points.

0 Kudos

1,283 Views
FTSolutions
Contributor III

Another (perhaps very important) items to consider is that when you download and and run in debug mode, the debugger settings generally take care of zeroing out initial values of variables - not just ones that may be taken care of by compiler as typically done with any declared as static -   so, if your code has uninitialized pointer or buffer issues, it may be getting masked/corrected for you in the debug version, but the release version download will not have that luxury...

0 Kudos

1,283 Views
Ben
Senior Contributor I

Mike, I gave-up, nothing helped.

So - I uninstalled old CW SW, installed 10.5 with  SP, rebuilt the project with PE and copied my code.

everything is working now, inc. stand-alone mode.

Thank you for trying to help.

0 Kudos