HCS08_OpenSourceBDM.ini

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

HCS08_OpenSourceBDM.ini

8,114 次查看
admin
Specialist II
Hi guys,
As I get into the Real-Time Debugger I am getting this Unknown$1301 in the status bar
 
 
then I also got this error
 
 
It looks like the debugger is running this file -> HCS08_OpenSourceBDM.ini
 
This is what I found in the file
 
===========================================
 
 
[HCS08 Open Source BDM]
COMSETTINGS=SETCOMM DRIVER PROTOCOL NOPERIODICAL
NV_PARAMETER_FILE=J:\Freescale\prog\fpp\Mcu1019.fpp
NV_SAVE_WSP=0
NV_AUTO_ID=0
ISRDISABLEDSTEP=0
FLASHTRIMONLOAD=1
 
 

[HCS08 Open Source BDM_GDI_SETTINGS]
CMDFILE0=CMDFILE STARTUP OFF ".\cmd\HCS08_OpenSourceBDM_startup.cmd"
CMDFILE1=CMDFILE RESET OFF ".\cmd\HCS08_OpenSourceBDM_reset.cmd"
CMDFILE2=CMDFILE PRELOAD OFF ".\cmd\HCS08_OpenSourceBDM_preload.cmd"
CMDFILE3=CMDFILE POSTLOAD OFF ".\cmd\HCS08_OpenSourceBDM_postload.cmd"
CMDFILE4=CMDFILE UNSECURE ON ".\cmd\HCS08_OpenSourceBDM_Erase_Unsecure.cmd"
MULPARTID0=PARTID0009 MCUID0
MULPARTID1=PARTID0000 MCUID0
CMDFILE5=CMDFILE VPPON OFF "vppon.cmd"
CMDFILE6=CMDFILE VPPOFF OFF "vppoff.cmd"
CHIPSECURE=CHIPSECURE SETUP 0xFFBF 0x3 0x2
DBG0=DBG GENERAL DISARM_ON PROTECT_OFF ANALYZE_ON STEPATRUN_ON
DBG1=DBG PREDEFINED SELECT 0
DBG2=DBG PREDEFINED DBGENGINE END STOP 0x0
DBG3=DBG USER 0x0 0x0
NV_PARAMETER_FILE=J:\Freescale\prog\FPP\mcu1301.fpp
NV_SAVE_WSP=0
NV_AUTO_ID=1
COMDEVICE=SETCOMM COMPORT LPT "OSBDM #1"
MCUID=0x1301
HCS08DBGMODULEADR=0x1810
ISRDISABLEDSTEP=1
FLASHTRIMONLOAD=1
========================================================
 
I have tried to change the red text aboce to mcu1019 but I still get this error
 
 
Why is the
 
NV_PARAMETER_FILE=J:\Freescale\prog\FPP\mcu1301.fpp
MCUID=0x1301
 
in the HCS08_OpenSourceBDM.ini ? Is that correct?
 
 
标记 (2)
0 项奖励
回复
10 回复数

1,846 次查看
admin
Specialist II
 
I have tried to edit the HCS08_OpenSourceBDM.ini file and change the value to 1019, then click on debug but I still get this error
 


when I re-opened the HCS08_OpenSourceBDM.ini file, it shows

NV_PARAMETER_FILE=J:\Freescale\prog\FPP\mcu1019.fpp

MCUID=0x1301

The MCUID has reverted back to 1301 byitself!
 
I think the MCUID=0x1301 in the HCS08_OpenSourceBDM.ini is whats causing this Unknown($1301) and this error message



Any thoughts??



Message Edited by Learner on 2008-01-16 02:48 AM

Message Edited by Learner on 2008-01-16 02:48 AM
0 项奖励
回复

1,846 次查看
admin
Specialist II
Just want to add, when I select MCU/Connection in the compiler, the HCS08_OpenSourceBDM.ini is created and the content is shown below

===================================================================
[Environment Variables]
GENPATH={Project}Sources;{Compiler}lib\hc08c\device\src;{Compiler}lib\hc08c\device\include;{Compiler}lib\hc08c\device\asm_include;{Compiler}lib\hc08c\src;{Compiler}lib\hc08c\include;{Compiler}lib\hc08c\lib
LIBPATH={Compiler}lib\hc08c\device\include;{Compiler}lib\hc08c\include
OBJPATH={Project}bin
TEXTPATH={Project}bin
ABSPATH={Project}bin

[HI-WAVE]
Target=HCS08OpenSourceBDM
Layout=ASM_layout.hwl
LoadDialogOptions=AUTOERASEANDFLASH NORUNAFTERLOAD

[HCS08 Open Source BDM]
COMSETTINGS=SETCOMM DRIVER NOPROTOCOL NOPERIODICAL

[HCS08 Open Source BDM_GDI_SETTINGS]
CMDFILE0=CMDFILE STARTUP ON ".\cmd\HCS08_OpenSourceBDM_startup.cmd"
CMDFILE1=CMDFILE RESET ON ".\cmd\HCS08_OpenSourceBDM_reset.cmd"
CMDFILE2=CMDFILE PRELOAD ON ".\cmd\HCS08_OpenSourceBDM_preload.cmd"
CMDFILE3=CMDFILE POSTLOAD ON ".\cmd\HCS08_OpenSourceBDM_postload.cmd"
CMDFILE4=CMDFILE UNSECURE ON ".\cmd\HCS08_OpenSourceBDM_Erase_Unsecure.cmd"
MCUID=0x1019
==========================================================================




This content changes to whats shown below after I click on debug
==========================================================================
[Environment Variables]
GENPATH={Project}Sources;{Compiler}lib\hc08c\device\src;{Compiler}lib\hc08c\device\include;{Compiler}lib\hc08c\device\asm_include;{Compiler}lib\hc08c\src;{Compiler}lib\hc08c\include;{Compiler}lib\hc08c\lib
LIBPATH={Compiler}lib\hc08c\device\include;{Compiler}lib\hc08c\include
OBJPATH={Project}bin
TEXTPATH={Project}bin
ABSPATH={Project}bin

[HI-WAVE]
Target=HCS08OpenSourceBDM
Layout=ASM_layout.hwl
LoadDialogOptions=AUTOERASEANDFLASH NORUNAFTERLOAD

[HCS08 Open Source BDM]
COMSETTINGS=SETCOMM DRIVER NOPROTOCOL NOPERIODICAL

[HCS08 Open Source BDM_GDI_SETTINGS]
CMDFILE0=CMDFILE STARTUP ON ".\cmd\HCS08_OpenSourceBDM_startup.cmd"
CMDFILE1=CMDFILE RESET ON ".\cmd\HCS08_OpenSourceBDM_reset.cmd"
CMDFILE2=CMDFILE PRELOAD ON ".\cmd\HCS08_OpenSourceBDM_preload.cmd"
CMDFILE3=CMDFILE POSTLOAD ON ".\cmd\HCS08_OpenSourceBDM_postload.cmd"
CMDFILE4=CMDFILE UNSECURE ON ".\cmd\HCS08_OpenSourceBDM_Erase_Unsecure.cmd"
MCUID=0x1301

CMDFILE5=CMDFILE VPPON ON "vppon.cmd"
CMDFILE6=CMDFILE VPPOFF ON "vppoff.cmd"
CHIPSECURE=CHIPSECURE SETUP 0xFFBF 0x3 0x2
HCS08DBGMODULEADR=0x1810
DBG0=DBG GENERAL DISARM_ON PROTECT_OFF ANALYZE_ON STEPATRUN_ON
DBG1=DBG PREDEFINED SELECT 0
DBG2=DBG PREDEFINED DBGENGINE END STOP 0x0
DBG3=DBG USER 0x0 0x0
=======================================================================



So somehow CW5.1 & CW6.1 is automatically assuming the QG8 is something else once it gets into the Debugger???

0 项奖励
回复

1,846 次查看
CompilerGuru
NXP Employee
NXP Employee
Hi learner,

did you try to see what the output is when you enable logging?
Usually the commands is
>protocol on
entered on the command line, after that try to connect and see what the debugger actually gets.
That may help more than to look at the project files.

Daniel
0 项奖励
回复

1,846 次查看
admin
Specialist II
Hi Daniel,
This is what I get when I go

HCS08 Open Source BDM > Connect (Show Protocol ticked)

===============================================
Communication settings:
SETCOMM DRIVER PROTOCOL NOPERIODICAL
Communication settings:
SETCOMM COMPORT LPT "OSBDM #1"
GDI:   DiGdiClose(TRUE)
Communication settings:
SETCOMM DRIVER PROTOCOL NOPERIODICAL
Loading Communication DLL
 ==> J:\Freescale\prog\gdi\OSBDM_S08.dll
GDI:   DiGdiOpen()==> DI_OK
GDI:   DiGdiVersion()==> DI_ERR_NOTSUPPORTED
GDI:   DiGdiAddCallBack(8192)==> DI_OK
GDI:   DiGdiAddCallBack(16384)==> DI_OK
GDI:   DiCommGetAcceptableSettings()==> 5
GDI:   DiCommGetAcceptableSettings()==> 0
GDI:   DiCommGetAcceptableSettings()==> 5
Communication settings:
SETCOMM COMPORT LPT "OSBDM #1"
Initializing STARTUP command file:
CMDFILE STARTUP ON ".\cmd\HCS08_OpenSourceBDM_startup.cmd"
Initializing RESET command file:
CMDFILE RESET ON ".\cmd\HCS08_OpenSourceBDM_reset.cmd"
Initializing PRELOAD command file:
CMDFILE PRELOAD ON ".\cmd\HCS08_OpenSourceBDM_preload.cmd"
Initializing POSTLOAD command file:
CMDFILE POSTLOAD ON ".\cmd\HCS08_OpenSourceBDM_postload.cmd"
GDI:   DiDirectAddMenuItem()==> DI_OK
GDI:   DiGdiInitIO()
GDI DLL called: DI_CB_MTWKS_EXTENSION_Callback(MTWKS_CB_HCS08AUTOCONFIG)
GDI:   Reading From Memory Address: 0x01806, count: 2
GDI:   DiMemoryRead()==> DI_OK
GDI:   00 00

Micro Name: Unknown($1301)

GDI DLL called: DI_CB_MTWKS_EXTENSION_Callback(MTWKS_CB_CONNECTIONOK)
GDI:   DiGdiVersion()==> DI_ERR_NOTSUPPORTED
GDI:   DiGdiAddCallBack(8192)==> DI_OK
GDI:   DiGdiAddCallBack(16384)==> DI_OK
GDI:   DiCommGetAcceptableSettings()==> 5
GDI:   DiCommGetAcceptableSettings()==> 0
GDI:   DiCommGetAcceptableSettings()==> 5
Communication settings:
SETCOMM COMPORT LPT "OSBDM #1"

GDI DLL called: DI_CB_MTWKS_EXTENSION_Callback(MTWKS_CB_UPDATEVIEW)

GDI DLL called: DI_CB_MTWKS_EXTENSION_Callback(MTWKS_CB_HASVERSIONCMD)

GDI DLL called: DI_CB_MTWKS_EXTENSION_Callback(MTWKS_CB_ACCESSWHILERUNNING)

GDI DLL called: DI_CB_MTWKS_EXTENSION_Callback(MTWKS_CB_GETSTATUSWHENSTOPPED)
==> DI_OK
Initializing STARTUP command file:
CMDFILE STARTUP ON ".\cmd\HCS08_OpenSourceBDM_startup.cmd"
Initializing RESET command file:
CMDFILE RESET ON ".\cmd\HCS08_OpenSourceBDM_reset.cmd"
Initializing PRELOAD command file:
CMDFILE PRELOAD ON ".\cmd\HCS08_OpenSourceBDM_preload.cmd"
Initializing POSTLOAD command file:
CMDFILE POSTLOAD ON ".\cmd\HCS08_OpenSourceBDM_postload.cmd"
Initializing VPPON command file. Command File not yet defined (use default settings).
CMDFILE VPPON ON "vppon.cmd"
Initializing VPPOFF command file. Command File not yet defined (use default settings).
CMDFILE VPPOFF ON "vppoff.cmd"
GDI:   DiDirectAddMenuItem()==> DI_OK
Initializing UNSECURE command file:
CMDFILE UNSECURE ON ".\cmd\HCS08_OpenSourceBDM_Erase_Unsecure.cmd"
GDI:   Reading From Memory Address: 0x01810, count: 4
GDI:   DiMemoryRead()==> DI_OK
GDI:   00 00 00 00
GDI:   Reading From Memory Address: 0x01816, count: 2
GDI:   DiMemoryRead()==> DI_OK
GDI:   00 00
GDI:   DiDirectAddMenuItem()==> DI_OK
Startup Command File execution: .\cmd\HCS08_OpenSourceBDM_startup.cmd
executing .\cmd\HCS08_OpenSourceBDM_startup.cmd

!// At startup the commands written below will be executed
Initializing STARTUP command file:
CMDFILE STARTUP ON ".\cmd\HCS08_OpenSourceBDM_startup.cmd"
Initializing RESET command file:
CMDFILE RESET ON ".\cmd\HCS08_OpenSourceBDM_reset.cmd"
Initializing PRELOAD command file:
CMDFILE PRELOAD ON ".\cmd\HCS08_OpenSourceBDM_preload.cmd"
Initializing POSTLOAD command file:
CMDFILE POSTLOAD ON ".\cmd\HCS08_OpenSourceBDM_postload.cmd"
Initializing VPPON command file:
CMDFILE VPPON ON "vppon.cmd"
Initializing VPPOFF command file:
CMDFILE VPPOFF ON "vppoff.cmd"
GDI:   DiDirectAddMenuItem()==> DI_OK
Initializing UNSECURE command file:
CMDFILE UNSECURE ON ".\cmd\HCS08_OpenSourceBDM_Erase_Unsecure.cmd"
GDI:   Reading From Memory Address: 0x01810, count: 4
GDI:   DiMemoryRead()==> DI_OK
GDI:   00 00 00 00
GDI:   Reading From Memory Address: 0x01816, count: 2
GDI:   DiMemoryRead()==> DI_OK
GDI:   00 00
GDI:   DiDirectAddMenuItem()==> DI_OK
Startup Command File execution: .\cmd\HCS08_OpenSourceBDM_startup.cmd
Could not open command file: .\cmd\HCS08_OpenSourceBDM_startup.cmd
Startup command file correctly executed.
GDI:   Reading Register PC (id:0):
GDI:   DiRegisterRead()==> DI_OK
GDI:   PC (id:0) -> 0x00
GDI:   Reading From Memory Address: 0x00, count: 256
GDI:   DiMemoryRead()==> DI_OK
GDI:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
GDI:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
GDI:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
GDI:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
GDI:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
GDI:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
GDI:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
GDI:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
GDI:   Reading Register SP (id:1):
GDI:   DiRegisterRead()==> DI_OK
GDI:   SP (id:1) -> 0x00
GDI:   Reading Register A (id:2):
GDI:   DiRegisterRead()==> DI_OK
GDI:   A (id:2) -> 0x00
GDI:   Reading Register H (id:4):
GDI:   DiRegisterRead()==> DI_OK
GDI:   H (id:4) -> 0x00
GDI:   Reading Register X (id:3):
GDI:   DiRegisterRead()==> DI_OK
GDI:   X (id:3) -> 0x00
GDI:   Reading Register CCR (id:5):
GDI:   DiRegisterRead()==> DI_OK
GDI:   CCR (id:5) -> 0x00
GDI:   Reading From Memory Address: 0x00, count: 256
GDI:   DiMemoryRead()==> DI_OK
GDI:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
GDI:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
GDI:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
GDI:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
GDI:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
GDI:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
GDI:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
GDI:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
GDI:   Reading Register PC (id:0):
GDI:   DiRegisterRead()==> DI_OK
GDI:   PC (id:0) -> 0x00
Target Ready
GDI:   Reading Register PC (id:0):
GDI:   DiRegisterRead()==> DI_OK
GDI:   PC (id:0) -> 0x00
GDI:   Reading From Memory Address: 0x00, count: 256
GDI:   DiMemoryRead()==> DI_OK
GDI:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
GDI:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
GDI:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
GDI:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
GDI:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
GDI:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
GDI:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
GDI:   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
GDI:   Reading Register SP (id:1):
GDI:   DiRegisterRead()==> DI_OK
GDI:   SP (id:1) -> 0x00
GDI:   Reading Register A (id:2):
GDI:   DiRegisterRead()==> DI_OK
GDI:   A (id:2) -> 0x00
GDI:   Reading Register H (id:4):
GDI:   DiRegisterRead()==> DI_OK
GDI:   H (id:4) -> 0x00
GDI:   Reading Register X (id:3):
GDI:   DiRegisterRead()==> DI_OK
GDI:   X (id:3) -> 0x00
GDI:   Reading Register CCR (id:5):
GDI:   DiRegisterRead()==> DI_OK
GDI:   CCR (id:5) -> 0x00
done .\cmd\HCS08_OpenSourceBDM_startup.cmd

Startup command file correctly executed.

===============================================
0 项奖励
回复

1,846 次查看
CompilerGuru
NXP Employee
NXP Employee
As you see, the gdi based debugger returns for all queries that they worked fine and that the result is 0.
Well, that does not look that correct....
The debugger is trying to detect the device by reading SDIDH, SDIDL:
Code:
GDI:   Reading From Memory Address: 0x01806, count: 2GDI:   DiMemoryRead()==> DI_OKGDI:   00 00

 
That SDIDH == 0 && SDIDL == 0 does not find the right device but instead this bogus "Unknown($1301)"
is not the problem, the problem is that the pod does not report anything from the actual target but instead
constantly claims it would Smiley Sad.

Daniel
0 项奖励
回复

1,846 次查看
admin
Specialist II
Hi Daniel,
So what could be causing this problem? Corrupt firmware/not installed into the debugger module? Debugger not communicating with the target properly due to sync/timing issue?

Actually CW5.1/6.1 did manage to match the correct device a couple of times randomly, and the

Select Derivative option showed up in the HCS08 Open Source BDM menu, also the MC9S08QG8 was shown on the status bar instead of Unknown($1301). However, I was still unable to load into flash......

What do you suggest that I can do/test to pin point the cause of this problem?

And what can I do to solve this problem?

Is this an issue of not in the Background Debug mode ? How can I tell if I am in the mode or not??

Thanks!




Message Edited by Learner on 2008-01-17 12:31 AM
0 项奖励
回复

1,846 次查看
admin
Specialist II
Just out of curiosity, does anyone have the OSBDM working with CW5.1 or CW6.1? Does anyone gets the same error I am getting?? I am just wondering if the error I am getting is due to my OSBDM debugger module or its actually a OSBDM firmware bug?

It seems that this is some sort of cummunication problem between the OSBDM and the QG8, could this be a timing/sync problem therefore the data sent and received are incorrect??
0 项奖励
回复

1,846 次查看
admin
Specialist II
Just want to report back, I followed the DEMO9S08QG8_SCH_C.pdf and added a pull-up resistor to the BKGD pin and now I am able to read and write to the memory, registors, have tested with turn on and off LEDs on Port B.

The steps are

1. Ground BKGD pin with pull up resistor
2. Click on Debug in IDE
3. HCS08 Open Source BDM Setup window opens
4. Power off and on QG8, unground BKGD pin and connect to pin 1 of BDM port
5. click OK on the HCS08 Open Source BDM Setup window
6. Debugger loads cmd files......e.g (HCS08_OpenSourceBDM_Erase_Unsecure.cmd)
7. Error message
 
8.Source window loads and display main.dbg file
9. WB 0x2..0x3 0xFF
10. Able to turn on/off LEDs on Port B

I think the debugger is communicating to the QG8 to some extent but not fully functional, I still get this Unknown($1301)



Does anyone know what ILLEGAL_BP means?

When I click on HCS08 Open Source BDM -> Flash

I get this



then this



then this



So I can not load into Flash still....

any ideas?
0 项奖励
回复

1,845 次查看
peg
Senior Contributor IV
Hi Learner,

Please do not post the same thing in multiple locations.
If you are following up multiple threads, put it on the most suitable thread then place only a link on the others so the issue can be followed up by others all in the same place. This also serves people searching in the future better.

Deliberately floating your threads to the top by making additional postings especially in multiple locations will be frowned upon and only serve to make it less likely for you to recieve help from the more experienced users you are probably seeking out here.

Please followup this thread here.



Message Edited by peg on 2008-01-30 07:03 PM
0 项奖励
回复

1,846 次查看
admin
Specialist II
Sorry about that, I thought it would be helpful for anyone in my situation to get an update of what's happening if they did not see my reply on the other thread. Will use links as suggested instead in the future, did not mean to float the thread on purpose in any way.
0 项奖励
回复