Reset command to Tower K60

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

Reset command to Tower K60

Jump to solution
1,285 Views
mra59
Contributor II

Hello

I' using the CW 10.2 as IDE and a Tower system equipped with K60 Kinetis as target.

I' debugging my firmware in the INTERNAL_RAM of the K60: when I need to start again from the beginning I use the "Reset" function of the IDE, the K60 is halted but the editor window in the CW IDE shows the message "No source available for "0x00013214 (0x00013214)() ".

The only way to start again to debug is download again the whole firmware.

The Reset vector in RAM is properly set pointing to the beginning of my firmware.

How can I solve this problem?

Mauro Righetto


Labels (1)
0 Kudos
1 Solution
775 Views
BlackNight
NXP Employee
NXP Employee

Hi Mauro,

yes, early S12 devices were using an old flash technology which only had few write cycles. This is definitely not the case any more. I'm using S08, ColdFire and Kinetis devices in my university classes, with many flash programming cylces (as you can imagine). The S08 boards have been used for years, with many programming cycles, and I think none of the boards ever reached the limit. You are right that downloading to RAM is faster. But it does not offset the problems with it, which is basically you are not developing what you will have at the end. And especially with the smaller devices not having enough RAM for the program, downloading to RAM is not an option. I rather program it the way I will have it at the end. But this is a choice every developer has to make.

About the reset: I assume you are executing a script as part of the reset (in the reset dialog)? It is probably named init_kinetis.tcl or similar.  That might have another impact too. And there is an option to run out of reset:

run out of reset.png

Hope this helps,

Erich

View solution in original post

0 Kudos
5 Replies
775 Views
BlackNight
NXP Employee
NXP Employee

If you do a reset, it will fetch from the reset vector. If you do not have the vector table in FLASH (where the CPU is looking for it), then you will get that 'no source available', because indeed you do not have a source file for that vector source code.

As Jim said: you need to have things in flash.

I hope this makes it clear,

Erich

0 Kudos
775 Views
mra59
Contributor II

Hello Erich

what you write is true, but you need to know something else about my test conditions.

I'm debugging my firmware application in RAM but the flash memory of my MCU has been already programmed with a code quite similar to the actual one I'm testing in RAM.

This means that there is a valid code in Flash so that I expected that, after pressing the reset icon, the MPU fetch the reset vector address (0x0000_0004) in the PC and then start the execution from that address code. The same behaviour I see when I give power to the MPU without using the CodeWarrior IDE: the program in flash memory is executed and the MPU works as expected.

So, why I get the error message instead of starting the code inside the flash memory?

A second little question: I'm debugging my code in RAM because I thought it was faster to download the code into RAM than erasing/writing the Flash memory (as I alsway did with previous microntroller I used in the past like HC12) and also taking in count that flash memory has a limited number of erase cycles: do you think that nowaday, using Kinetis microcontroller, these concepts are no more valid?

Many thanks for your fast help and for your competence.

Regards

Mauro Righetto

.

0 Kudos
776 Views
BlackNight
NXP Employee
NXP Employee

Hi Mauro,

yes, early S12 devices were using an old flash technology which only had few write cycles. This is definitely not the case any more. I'm using S08, ColdFire and Kinetis devices in my university classes, with many flash programming cylces (as you can imagine). The S08 boards have been used for years, with many programming cycles, and I think none of the boards ever reached the limit. You are right that downloading to RAM is faster. But it does not offset the problems with it, which is basically you are not developing what you will have at the end. And especially with the smaller devices not having enough RAM for the program, downloading to RAM is not an option. I rather program it the way I will have it at the end. But this is a choice every developer has to make.

About the reset: I assume you are executing a script as part of the reset (in the reset dialog)? It is probably named init_kinetis.tcl or similar.  That might have another impact too. And there is an option to run out of reset:

run out of reset.png

Hope this helps,

Erich

0 Kudos
775 Views
mra59
Contributor II

Hello Erich

again many thanks for your answer.

Regards

Mauro Righetto

0 Kudos
775 Views
JimDon
Senior Contributor III

You can't reset like that from RAM. If you want to reset and start again, you need to use the flash build.

0 Kudos