Reset command to Tower K60

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Reset command to Tower K60

ソリューションへジャンプ
1,312件の閲覧回数
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


ラベル(1)
0 件の賞賛
1 解決策
802件の閲覧回数
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 件の賞賛
5 返答(返信)
802件の閲覧回数
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 件の賞賛
802件の閲覧回数
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 件の賞賛
803件の閲覧回数
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 件の賞賛
802件の閲覧回数
mra59
Contributor II

Hello Erich

again many thanks for your answer.

Regards

Mauro Righetto

0 件の賞賛
802件の閲覧回数
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 件の賞賛