Preserve EEPROM with Codewarrior and Cyclone Pro MC9S12A128B AEFSKIPERASING doesn't work

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

Preserve EEPROM with Codewarrior and Cyclone Pro MC9S12A128B AEFSKIPERASING doesn't work

1,369 Views
gb3
Contributor I

Good morning.

I have already seen this topic

 

 

usb BDM. How to program flash & leave Eeprom as is

 

but in my casse it doesn't work.

 

I want to debug my firmware with Cyclone Pro and I use Codewarrior 5.9.0. I want to preserve my EEPROM data

 

I deleted this entry in Mcu03CB. fpp file :  MODULEIMPORT MC9S12_EEPROM_EETS2K_W_HIDDEN          -> EEPROM is blanked and debugger doesn't work correctly = program doesn't run

 

I deleted Mass erase EEPROM section in erase_unsecure_hcs12 -> debugger doesn't work: it seems to program the micro but debugging is impossible and program doesn't run

 

In debugging Memory map, in CyclonePro Menu (Truetime simulator) I set EEPROM entry active = NO   -> there is no effect

 

With Cyclone PRO I load SAP Image but the algorithm for MC9S12A128B hasn't got "Protect EEPROM " command

 

I inserted in Startup script AEFSKIPERASING command but it doesn't work

 

 

Can you help me?

 

 

Thank you very much

Labels (1)
0 Kudos
5 Replies

646 Views
kef
Specialist I

1) Exact command is

FLASH AEFSKIPERASING n

, where n is NV memory block number, which you should see via Flash... menu somewhere under Multilink/Cyclone menu. I think n=0 must be EEPROM block, but you should verify that.

2) What cmd file did you put AEF... line to? There can be several xxxxx_startup.cmd files. Make sure xxxx matches the the name of your connection.

0 Kudos

646 Views
gb3
Contributor I

"What cmd file did you put AEF... line to? There can be several xxxxx_startup.cmd files. Make sure xxxx matches the the name of your connection."

I refer to startup.cmd that is inserted in Debugger\P&E BDM folder.

Here there are STARTUP, RESET PRELOAD and so on...

I have no xxx_startup.cmd but only startup.cmd

From my last test, I see that EEPROM doesn't erase in one of my project while in another one EEPROM is blanked, even if the debugger configurations and the micro controller (MC9SA128B) are the same . At the beginning of the main I control if EEPROM is corrupted and if so I load EEPROM with defaults. So in one case when I launch debugging session I find EEPROM corrupted while in the other case I don't loss my EEPROM parameters

Any ideas?

Thanl you

0 Kudos

646 Views
kef
Specialist I

Your project folders should contain cmd subfolder, in which you should find xxx_startup.cmd. Of course it might be that one, who created your project, did some smart changed to debugger settings of your project...

0 Kudos

646 Views
gb3
Contributor I

Sorry but with my last tests I found different approach to this problem.

The situation is the following: when I launch debugging in Codewarrior 5.1 and Cyclone PRO. I don't receive any warning message so I think that programming is ok, but actually program isn't loaded correctly. In particular debug is impossible ( I click on Run or Halt button, but micro doesn't work, i.e. in halt micro restart automatically for example) and my data stored in EEPROM are lost.

It's for this reason that I ask if there is a method in order to preserve EEPROM. Actually for MC9s12A128B EEPROM isn't deleted during debugging: in fact if create a SAP Image you must specify a particular algorithm for erase EEPROM.

So why Cyclone PRO doesn't work in debugging with Codewarrior? Softec indart works perfectly

0 Kudos

646 Views
RadekS
NXP Employee
NXP Employee

There is a way to avoid erasing EEPROM while programming the Flash module.

  In True-Time Simulator & Real-Time Debugger window of CodeWarrior, go to main menu and then File -> Configuration...

  Select Load tab, click on Advanced and select the modules you do not want to erase.

Print screen is attached for any case.DFLASH.PNG

Note: Picture show different MCU, but principle is the same.


0 Kudos