Processor Expert generated code changes during debug session

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

Processor Expert generated code changes during debug session

Jump to solution
802 Views
marcos1
Contributor II

I started a Processor Expert project but I'm having some difficulties with it.

 

When I generate the code and look at the sources everything seems to be generated as it is set up in the GUI.

When I build the project it still is.

When I start a debug session though I noticed the files get overwritten.

 

Namely (on a MC56F84789) I:

- changed the QSCI2 clock rate to the system clock

- added User code after PE initialization (in the build options tab)

 

Both are generated in the code and are still there after building the project.

When starting a debug session, though

- QSCI2 clock rate is being set to 2x the system clock

- my initialization code is being removed

 

The GUI still shows my settings though.

I only happened to notice this, because the file was still open in my editor and it informed me that the file has been changed.

 

John Winters

Labels (1)
1 Solution
708 Views
marcos1
Contributor II

I was able to figure out what went wrong.

When creating a debug configuration I accidentally selected the LDM version instead of the SDM version.

If I do this, the code is being changed reproducibly when starting a debug session.

If I use the SDM version everything works as expected and I can leave the 'build before debug' settings in their default state.

I don't really know what is behind the SDM and LDM concept, but this is the reason my project got messed up.

View solution in original post

0 Kudos
4 Replies
708 Views
BlackNight
NXP Employee
NXP Employee

Have you disabled code generation while build and the 'build before debug' setting?

See

Speeding up the Debug Launch in CodeWarrior | MCU on Eclipse

I hope this helps,

Erich

708 Views
marcos1
Contributor II

No, both are enabled.

0 Kudos
708 Views
BlackNight
NXP Employee
NXP Employee

I would disable them, if only for speeding up things.

Let me know if this solves your problem.

709 Views
marcos1
Contributor II

I was able to figure out what went wrong.

When creating a debug configuration I accidentally selected the LDM version instead of the SDM version.

If I do this, the code is being changed reproducibly when starting a debug session.

If I use the SDM version everything works as expected and I can leave the 'build before debug' settings in their default state.

I don't really know what is behind the SDM and LDM concept, but this is the reason my project got messed up.

0 Kudos