Run/Debug without writing to flash?

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

Run/Debug without writing to flash?

997 Views
jerrylian
Contributor IV

Is it possible to debug/run by downloading to processor, but without writing to flash?

* I am learning CodeWarrior for Kinetis processor 

* It seems to me that:

--- Modified codes has to be downloaded and written to flash, then we can debug/run "modified" version.

--- If I un-check "download", the debug/run will still run original codes in flash, not the modified codes.

The problem is: write to flash is always slow!

Is it possible that: modified codes are downloaded to the processor RAM and run right away, without writing to flash?

Labels (1)
Tags (1)
0 Kudos
Reply
4 Replies

806 Views
jerrylian
Contributor IV

Thanks for all suggestions!

* Erich: your solution is good, but can't solve the main problem: writing to flash is slow!

* Kerry: so I prefer your solution --- download to RAM instead of FLASH.

Now the question:

-----  how can I instruct CodeWarrior to download to RAM, instead of FLASH?

0 Kudos
Reply

806 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Jerry,

  When you create the codewarrior project, you will find there a selection of RAM or FLASH.

  If you choose RAM, code will download to RAM:

pastedImage_1.png

   But please note, if you download to RAM, after the board is power off, the code will disappear, so if you want the chip still have problem after power off, you should download to the flash.

Wish it helps you!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

806 Views
BlackNight
NXP Employee
NXP Employee

Hi Jerry,

you might check the setting in https://mcuoneclipse.com/2012/10/30/speeding-up-the-debug-launch-in-codewarrior/  to speed up the debug process overall. The other suggestion I have is to disable the verify:

pastedImage_2.png

Other than that, you might use a fast debug probe (e.g. Segger J-Link).

I hope this helps,

Erich

0 Kudos
Reply

806 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Jerry,

   If your project is very small, you can just download it to the RAM instead of the flash.

  But if your code is very large, and larger than the RAM size, you'd better download to the flash and debug it, then this debug result will be more credible.

Wish it helps you!


Have a great day,
Kerry

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply