How do I disable the "Always Erase and Program flash without asking" option in the Hardware Connection Advanced Programming Options?

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

How do I disable the "Always Erase and Program flash without asking" option in the Hardware Connection Advanced Programming Options?

1,632 Views
mjosborne
Contributor II

Hi there,

 

we just updated from 10.2 to 10.6 for a MCF5271 project and have noticed the following: when we download to RAM for debugging it always attempts to write to flash.  To update I created a new workspace and imported the 10.2 project into 10.6 without any errors.

 

I found this setting enabled in the Hardware Connection Advanced Programming Options: "Always Erase and Program flash without asking.", and I can't disable it:

17725_17725.pngAdvanced_Programming_Options.png

I'm guessing this is the issue; I tried modifying the .launch and ReferencedRSESystems files but the values are overwritten by the IDE.  Any ideas?

 

UPDATE:

========

OK, I've verified that we are loading our app into RAM, it's just hard to see with the IDE trying to write to Flash every time we want to debug from RAM. 

We can reliably debug from RAM using (a single) hardware breakpoint. 

However, when we try and work around this issue (a single hardware breakpoint) by using software breakpoints we are able to reach the software breakpoint once, but the next time we reach it we end up in the MQX (3.8) _int_unexpected_isr.  When I inspect the RAM memory where the software breakpoint is at program start-up compared to after the first breakpoint I don't see a difference and it matches the compiled code.


The exception is "Illegal instruction". For example, when I put software breakpoints at 145, 146, 147 in the following (from listing):

;  145:

0x00025E72  0x242F0084               move.l   132(a7),d2

0x00025E76  0x2202                   move.l   d2,d1

0x00025E78  0x92AF0020               sub.l    32(a7),d1

;  146:

0x00025E7C  0x2F420020               move.l   d2,32(a7)

;  147:

;  148:

;  149:

0x00025E80  0x0C8400000001           cmpi.l   #1,d4                 ; '....'

0x00025E86  0x6312                   bls.s    *+20                  ; 0x00025e9a

The exception occurs at the second breakpoint with the PC being 0x25E7A, and there is no sign of an illegal instruction (memory matches the listing) but it seems like there's an alignment issue?

 

So, what's up with CW 10.6 debugging MQX 3.8 & software breakpoints? 

Are the debug settings getting messed up because it's trying to write to Flash and then thinks we're running from Flash?

There were no changes to our projects/source files, we only updated the IDE from 10.2 to 10.6 and everything worked in 10.2...

 

I just noticed in the release notes that 10.6 doesn't support MQX 3.8!  Does this explain the software breakpoint issue?

Please provide more information regarding this limitation, and what is required to support MQX 3.8. 

Can I work around this issue by pointing the 10.6 IDE at the 10.2 assembler/compiler/linker?

Labels (1)
0 Kudos
6 Replies

963 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hello Matt,

CW10.6 + MQX3.8 can not work normal. MQX 3.8 was developed to work with CW MCU v10.1. It is not supported in CW MCU v10.6.

for the moment. MQX 4.0 ~ MQX4.1 can support CW10.6, please use new version instead,

https://freescale.flexnetoperations.com/control/frse/product?child_plneID=683961&ver=CURRENT

Best Regards.

ZhangJun

=====================================

this answer is for you. if it helps, please click on "Correct Answer" button.

0 Kudos

963 Views
mjosborne
Contributor II

Hello,

can we please get assistance with these issues. 

We have upgraded to MQX 4.1 and we still have issues with our MCF5271 project using CW 10.6.

It seems fairly clear that there are two issues with CW 10.6 MCF5271 support (same project in CW 10.2 works fine) :

1. It always tries to program Flash (even when there is none), and this option (Always Erase and Program flash without asking) can't be disabled.

2. Software breakpoints don't work when instruction caching is enabled (generates illegal instruction exception).

0 Kudos

963 Views
mjosborne
Contributor II

These are still open issues for us:

i) How to disable the "Always Erase and Program flash without asking" option,

ii) How to fix the issue where CodeWarrior 10.6 software breakpoints cannot be used when instruction caching (MCF527x) is enabled.

We've been experiencing these issues since December and would like to resolve them as soon as possible!

0 Kudos

963 Views
mjosborne
Contributor II

We have updated to MQX 4 with CW 10.6 for our MCF5271 based project and are still seeing these issues.


Can someone please determine why the "Always Erase and Program flash without asking" option cannot be disabled, it really slows down the debugging process (when debugging we're running out of external RAM, so there's no Flash to program)?

Also, we have updated the post MQX 3.8 Compatibility with CodeWarrior 10.6 - Reliable Controls with new information. The issue appears to be specifically related to having MCF5271 instruction caching enabled when using CW 10.6.  CW 10.2 works fine (software breakpoints) with MQX 3.8 and 4, CW 10.6 doesn't work for either.

0 Kudos

963 Views
mjosborne
Contributor II

Oh, and how do we disable the Hardware Connection Advanced Programming Options: "Always Erase and Program flash without asking."?

0 Kudos

963 Views
mjosborne
Contributor II

Hi ZhangJun,

yes I do see that but I need to know why it is not supported; specifically why software breakpoints aren't working and what we can do to get them working.

We currently have multiple projects that require us to support CW 7.1, 10.2 and now 10.6 with 3 different versions of MQX: 3.6, 3.8.1, and 4.1; the tools not being backwards compatible is creating a lot of work for us. 

We would prefer to make some MQX 3.8.1 modifications to work around the software breakpoint issue rather than moving a stable project to a new MQX version.

Thanks,

Matt

0 Kudos