Codewarrior does not let me load program into a DEMO9S08LC60 board

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

Codewarrior does not let me load program into a DEMO9S08LC60 board

4,171件の閲覧回数
quevedo
Contributor V

I hope someone can help me with this.

 

I tried to load a program into my DEMO9S08LC60 board, and while transferring the code, the CodeWarrior locked up. I had to restart my machine (Windows XP). When I tried to load again using the "True-Time Simulator & Real-Time Debugger" again, I got the following messages, in sequence:

 

-  Warning: Loading a new application will stop the execution of the current one (2 options: OK and Cancel, I chose OK)

- Error: While in RUN mode, the emulator can only execute the STOP and RESET commands (1 option: OK)

- Error: Failed to load "...(project path)\bin\Project.abs", Error: failed to set program counter for this ELF file (1 option: OK)

 

And that's it, nothing loaded.

 

I tried to reinstall CodeWarrior , and the errors continue showing up. Is there a problem with garbage loaded in the Flash memory of my microcontroller? If so, how can I restore it to normal function?

 

Thanks in advance

ラベル(1)
タグ(1)
0 件の賞賛
返信
7 返答(返信)

1,546件の閲覧回数
J2MEJediMaster
Specialist I

Did you ever have a successful download? If not, check the jumpers on the board to confirm that the board is in the Host mode and not the Standalone mode. If you did have a succesful download, make sure that your program is not using the PT6 line. All of this information came from the MC9S08LC60 User's Manual.

 

---Tom

0 件の賞賛
返信

1,546件の閲覧回数
quevedo
Contributor V
Actually the board was working fine just before the crash of the CodeWarrior. I had loaded the same program and it was working. Then, I have made a modification, which did not affect the PT6 line, and tried to load it again. During the code transfer, the CodeWarrior crashed, and I was forced to reboot. After that, I started to get the messages mentioned in my first post.
0 件の賞賛
返信

1,546件の閲覧回数
J2MEJediMaster
Specialist I

With your board connected, go into the True-Time Simulator/Debugger. It will attempt to download and fail, correct? In the Debugger, choose the menu that specifies your board's processor, (MC9S08LC60) and the connection interface. From this menu, choose Unsecure, which should mass-erase and clear the secure flash bits. Hopefully you will be able to program the Flash from this point.

 

---Tom

0 件の賞賛
返信

1,546件の閲覧回数
quevedo
Contributor V

I have read your instructions and I could not find the Unsecure option. I will try and describe in details what happens. By the way I am using CW Special edition, v.6.2.2

 

I created a brand-new project for testing the board. It just blinks one of the LEDs (using Processor Expert). Then I click on the Debug button at CodeWarrior to generate code and open the debugger. Then a window called "Target Connection" opens, with the options for Hardware Model, where I select the DEMO9S08LC60 board, and then de device code is pre-selected as MC9S08LC60. There is also an option called "Connection mode" where I can select between Normal (target will be reset) and Hot plug-in (non intrusive, target will not be reset). I chose the Normal option (default). Also, there is a button called "Communication / Advanced Settings", which opens another window.

 

This new window has the options "BDC Clock (CLKSW)" with options "use alternate frequency (CLKSW = 0)" and "use system bus frequency (CLKSW = 1)". I kept the last option, as default. Also, a check box for "Flash mass erase", which I checked, and another checkbox called "enable fast programming", which I kept unchecked. I click on the OK button and get back to the first window.

 

Then I click on Connect button. I noticed a big time delay, 2 or 3 seconds, before anything else happens. Then I get the messages cited in my original post. Below follows a transcription of the "Command" window:

--------------------------------------------------------------------------------------------

executing C_layout.hwl

!OPEN source 0 0 60 39
NO CONNECTION
!Source < attributes MARKS off
!OPEN assembly 60 0 40 31
!Assembly < attributes ADR on,CODE off,ABSADR on,SYMB off,TOPPC 0xF88C
!OPEN procedure 0 39 60 17
!Procedure < attributes VALUES on,TYPES off
!OPEN register 60 31 40 25
!Register < attributes FORMAT AUTO,COMPLEMENT None
!OPEN memory 60 56 40 22
!Memory < attributes FORMAT hex,COMPLEMENT None,WORD 1,ASC on,ADR on,ADDRESS 0x80
!OPEN data 0 56 60 22
!Data:1 < attributes SCOPE global,COMPLEMENT None,FORMAT Symb,MODE automatic,UPDATERATE 10,NAMEWIDTH 16
!OPEN data 0 78 60 22
!Data:2 < attributes SCOPE local,COMPLEMENT None,FORMAT Symb,MODE automatic,UPDATERATE 10,NAMEWIDTH 16
!OPEN command 60 78 40 22
!Command < attributes CACHESIZE 1000
!bckcolor 50331647
!font 'Courier New' 9 BLACK
!AUTOSIZE on
!ACTIVATE Data:2 Command Procedure Data:1 Source Register Assembly Memory 
done C_layout.hwl

Loading Target ...
IO registers loaded for MC9S08LC60 from C:\Arquivos de programas\Freescale\CodeWarrior for Microcontrollers V6.2\prog\REG\MCU101C.REG
The device has been reset
New BDM communication frequency: (~4294.967MHz)
executing .\cmd\SofTec_HCS08_startup.cmd

!// At startup the commands written below will be executed
RUNNING
done .\cmd\SofTec_HCS08_startup.cmd

Startup command file correctly executed.
The device has been reset
STOPPING
executing .\cmd\SofTec_HCS08_preload.cmd

!// Before load the commands written below will be executed
The device has been reset
RUNNING
done .\cmd\SofTec_HCS08_preload.cmd

Preload command file correctly executed.
executing .\cmd\SofTec_HCS08_postload.cmd

!// After load the commands written below will be executed
No Link To Target
done .\cmd\SofTec_HCS08_postload.cmd

Postload command file correctly executed.

in>

-------------------------------------------------------------------------------------

In the Procedure window, there is one line saying "No program counter"

 

I have been using this board for quite some time, without any problems. This happened just after the debugger freeze.

 

Quevedo

0 件の賞賛
返信

1,546件の閲覧回数
kef
Specialist I

I'm not sure behaves CW6.2 the same with all S08 targets or not, but using DEMOQE board as a target, after I click Run in IDE, debugger unsecures secured target without any question.

 

Quick check for this is to start Expert Programmer from debugger, doubleclick SD (secure device) and exit back to debugger. As a result debugger is no more able to read MCU resources, MCU is secured. If you enter Expert Programmer again, programmer will say that MCU is secured and ask for permission to unsecure. But when I run debugger from IDE, debugger doesn't ask for this permissin. The evidence that target got unsecured can be found in Command window.

0 件の賞賛
返信

1,546件の閲覧回数
quevedo
Contributor V

The DEMO9S08LC60 board uses the Softec USB BDM, while the DEMOQE uses the P&E USB BDM, thus the connection window is different.

 

I could not find Expert Programmer in my debugger. One more thing I noticed about my problem: If I cancel the program transfer (choosing thje Cancel option in the first dialogues, mentioned in my first post), I get a series of "The device has been reset" messages in the command window . If I try to stop the processor with the Stop button, I get the STOPPING message, and then one more "The device has been reset" and then the RUNNING message, and the series of repeated messages again. In the register window, I notice that the SP, HX and PC registers all have the value BEEF, and A and SR registers have the value EF. In the Assembly window, the following show up:

BEEF STX ,X

BEF0 STX, X

BEF1 STX ,X

and same in the following addresses. Same instruction repeated in address before BEEF also. The BEEF address is highlighted.

 

By the way, I have tried to connect this board in another computer with CW installed. Same thing happened. And my DEMOQE board works just fine. 

 

Any ideas?

 

Quevedo

Message Edited by quevedo on 2009-10-08 12:33 PM
0 件の賞賛
返信

1,546件の閲覧回数
kef
Specialist I

I guess your LC60 got secured. The question is how to unsecure it using Softec connection. I don't know the answer. Did you look at Softec page, maybe they have some unsecure utility, like P&E have for their USB-ML-12 BDM pods and various DEMO boards? I would expect to find such utility on CDs that came with your DEMO board. If not, then I would submit service request for your product here:

 

https://www.freescale.com/webapp/servicerequest.create_SR.framework

0 件の賞賛
返信