AnsweredAssumed Answered

Why Relocation causes issue

Question asked by joe hinkle on Feb 7, 2017
Latest reply on Feb 8, 2017 by joe hinkle

My project uses a K64 and several K17.

 

When developing, I use JTAG with the code located at 0

 

When running the application (not development), it is run so JTAG can NOT be connected (secure mode) with the K17 code relocated at 0x4000 and the K64 code relocated to 0x10000.

 

Both sets of code are compiled in debug with no optimization - just relocation

 

I can run the code all day in development code -- runs perfectly.

 

the same code, recompiled to run relocated (they have bootloaders) - don't operate thee same.

 

The K17 output SPI data that I capture.  The SPI data output in relocated code is different than that from the zero base code.

 

My thoughts are memory corruption someplace but I can't identify any suspect code that would cause it.

 

Any ideas on difference in code generated to run at zero (0) that that being relocated would be appreciated.

 

I added an embedded debugger into each micro so that I can query memory while it is in secure mode and relocated.

 

Thanks in advance for any comments.

 

Joe

Outcomes