Debug MC9S12XEP100 with CodeWarrior 5.2

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

Debug MC9S12XEP100 with CodeWarrior 5.2

1,196 Views
sjehring
Contributor I

Hello everyone,

i try to debug a custom board with a MC9S12XEP100 using the PE Micro MULTILINK UNIVERSAL and Codewarrior Development Studio for the S12(X) Version 5.2 build 151127. My OS is Windows 10.

In the IDE i choose P&E USB BDM Multilink and run Debug. Code Load seems to be successfull and the device is started.  Then I get the ILLEGAL_BP Statement. I'm not able to halt the device or stop at a breakpoint.

With Codewarrior 5.1 and the old indart-ONE Debugger the same project works fine.

After that I retried with the MULTILINK and I get another behavior. Now Code Load Fails with following error:

   "Error while writing to 7F10..8110"

For Details see have a look at the logs below.

I also tried creating a new Project. With no changes made it produced the same output.

I also installed latest Driver for MULTILINK, reinstalled CodeWarior, tried the "Patch for (S)12(X) 3rd Party Software " (FAQ ID # 211 at PEmicro) and tried another PC. There were no behavior changes.

As anyone an idea why the behavior changed for the same Project ?

From where does the Debugger get the Information shown after Block Module Name

0  DFLASH          FFFFFF -1FFFFFD   Skipped - Unselected
   1  PFLASH          FFFFFF -1FFFFFD   Skipped - Unselected
   2  PFLASH          FFFFFF -1FFFFFD   Skipped - Unselected
   3  PFLASH          FFFFFF -1FFFFFD   Skipped - Unselected

and why does this output Change without changing the Project ?

0  DFLASH             800 -1F0BFF   Blank - Unselected
   1  PFLASH            4000 -  7FFF   Blank - Unselected
   2  PFLASH            C000 -  FFFF   Blank - Unselected
   3  PFLASH          C08000 -FFBFFF   Blank - Unselected

What does the following output mean ?

FP: Call of a command not implemented!
Please modify "flags" in DFLASH module INFO applet.

Thanks in advance.

Below you find the different log outputs:

I get the following log with MULTILINK Debugger:

executing C_layout.hwl
!OPEN source 0 0 60 39
NO CONNECTION
!Source < attributes TOOLTIP on,TOOLTIP_FORMAT signed,TOOLTIP_MODE details,FREEZE off,MARKS off
!OPEN assembly 60 0 40 31
!Assembly < attributes ADR on,CODE off,ABSADR on,SYMB off,FORMAT Auto,FREEZE off,TOPPC 0x4022
!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,MODE automatic,UPDATERATE 10,SHOW_ADDRESSSPACE 0,ADDRESS 0xF8
!OPEN data 0 56 60 22
!Data:1 < attributes SCOPE global,COMPLEMENT None,FORMAT Hex,MODE automatic,SORT NotSort,UPDATERATE 5,NAMEWIDTH 16
!OPEN data 40 0 52 88
!Data:2 < attributes SCOPE local,COMPLEMENT None,FORMAT signed,MODE periodical,SORT NotSort,UPDATERATE 5,NAMEWIDTH 16
!OPEN command 60 78 40 22
!Command < attributes CACHESIZE 1000
!bckcolor 50331647
!font 'Courier New' 9 BLACK
!AUTOSIZE on
!ACTIVATE "Command" "Register" "Assembly" "Memory" "Procedure" "Data:1" "Source" "Data:2"
done C_layout.hwl
Loading Target ...
IO registers loaded for MC9S12XEP100 from C:\usersprogram\Freescale\CWS12v5.2\prog\REG\MCU02D3.REG
P&E Interface detected - Flash Version 10.18
executing .\cmd\P&E_Multilink_USB_startup.cmd
!// At startup the commands written below will be executed
Target Ready
done .\cmd\P&E_Multilink_USB_startup.cmd
Startup command file correctly executed.
executing .\cmd\P&E_Multilink_USB_preload.cmd
!// Before load the commands written below will be executed
done .\cmd\P&E_Multilink_USB_preload.cmd
Preload command file correctly executed.
FP: FLASH parameters loaded for MC9S12XEP100_V1(NVMIF2 rev 1,1,1,1) from C:\usersprogram\Freescale\CWS12v5.2\prog\FPP\mcu02D3.fpp
executing .\cmd\P&E_Multilink_USB_reset.cmd
!// After reset the commands written below will be executed
done .\cmd\P&E_Multilink_USB_reset.cmd
Reset command file correctly executed.
Block Module Name      Address Range   Status
   0  DFLASH          FFFFFF -1FFFFFD   Skipped - Unselected
   1  PFLASH          FFFFFF -1FFFFFD   Skipped - Unselected
   2  PFLASH          FFFFFF -1FFFFFD   Skipped - Unselected
   3  PFLASH          FFFFFF -1FFFFFD   Skipped - Unselected
FP: Call of a command not implemented!
Please modify "flags" in DFLASH module INFO applet.
FP: Call of a command not implemented!
Please modify "flags" in PFLASH module INFO applet.
FP: Call of a command not implemented!
Please modify "flags" in PFLASH module INFO applet.
FP: Call of a command not implemented!
Please modify "flags" in PFLASH module INFO applet.
Block Module Name      Address Range   Status
   0  DFLASH          FFFFFF -1FFFFFD   Skipped - Selected
   1  PFLASH          FFFFFF -1FFFFFD   Skipped - Selected
   2  PFLASH          FFFFFF -1FFFFFD   Skipped - Selected
   3  PFLASH          FFFFFF -1FFFFFD   Skipped - Selected
executing .\cmd\P&E_Multilink_USB_vppon.cmd
!// Before programming the flash, the commands written below will be executed
done .\cmd\P&E_Multilink_USB_vppon.cmd
Vppon command file correctly executed.
FP: The ERASE command is not performed for the DFLASH flash module (AEFSKIPERASING) => Skipped.
FP: The ERASE command is not performed for the PFLASH flash module (AEFSKIPERASING) => Skipped.
FP: The ERASE command is not performed for the PFLASH flash module (AEFSKIPERASING) => Skipped.
FP: The ERASE command is not performed for the PFLASH flash module (AEFSKIPERASING) => Skipped.
executing .\cmd\P&E_Multilink_USB_vppoff.cmd
!// After programming the flash, the commands written below will be executed
done .\cmd\P&E_Multilink_USB_vppoff.cmd
Vppoff command file correctly executed.
FP: Arm FLASH for loading.
executing .\cmd\P&E_Multilink_USB_vppon.cmd
!// Before programming the flash, the commands written below will be executed
done .\cmd\P&E_Multilink_USB_vppon.cmd
Vppon command file correctly executed.
executing .\cmd\P&E_Multilink_USB_vppoff.cmd
!// After programming the flash, the commands written below will be executed
done .\cmd\P&E_Multilink_USB_vppoff.cmd
Vppoff command file correctly executed.
FP: FLASH disarmed.
executing .\cmd\P&E_Multilink_USB_reset.cmd
!// After reset the commands written below will be executed
done .\cmd\P&E_Multilink_USB_reset.cmd
Reset command file correctly executed.
executing .\cmd\P&E_Multilink_USB_postload.cmd
!// After load the commands written below will be executed
RESET
done .\cmd\P&E_Multilink_USB_postload.cmd
Postload command file correctly executed.
main 0xFBBB78'L T
STARTED
RUNNING
ILLEGAL_BP
With Codewarrior 5.1 and the inDart-One Debugger, I was able to debug this project. It produced the following log:
executing C_layout.hwl
!OPEN source 0 0 60 39
NO CONNECTION
!Source < attributes TOOLTIP on,TOOLTIP_FORMAT signed,TOOLTIP_MODE details,FREEZE off,MARKS off
!OPEN assembly 60 0 40 31
!Assembly < attributes ADR on,CODE off,ABSADR on,SYMB off,FORMAT Auto,FREEZE off,TOPPC 0x4022
!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,MODE automatic,UPDATERATE 10,SHOW_ADDRESSSPACE 0,ADDRESS 0xF8
!OPEN data 0 56 60 22
!Data:1 < attributes SCOPE global,COMPLEMENT None,FORMAT Hex,MODE automatic,SORT NotSort,UPDATERATE 5,NAMEWIDTH 16
!OPEN data 40 0 52 88
!Data:2 < attributes SCOPE local,COMPLEMENT None,FORMAT signed,MODE periodical,SORT NotSort,UPDATERATE 5,NAMEWIDTH 16
!OPEN command 60 78 40 22
!Command < attributes CACHESIZE 1000
!bckcolor 50331647
!font 'Courier New' 9 BLACK
!AUTOSIZE on
!ACTIVATE "Command" "Register" "Assembly" "Memory" "Procedure" "Data:1" "Source" "Data:2"
done C_layout.hwl
Loading Target ...
IO registers loaded for MC9S12XEP100 from C:\Programme\Freescale\CWS12v5.1\prog\REG\MCU02D3.REG
New BDM communication frequency: (~3.99MHz)
executing .\cmd\SofTec_HCS12_startup.cmd
!// At startup the commands written below will be executed
Startup command file correctly executed.
Target Ready
done .\cmd\SofTec_HCS12_startup.cmd
Startup command file correctly executed.
executing SofTec_HCS12.hwc
done SofTec_HCS12.hwc
executing .\cmd\SofTec_HCS12_preload.cmd
!// Before load the commands written below will be executed
done .\cmd\SofTec_HCS12_preload.cmd
Preload command file correctly executed.
executing .\cmd\SofTec_HCS12_reset.cmd
!// After reset the commands written below will be executed
done .\cmd\SofTec_HCS12_reset.cmd
Reset command file correctly executed.
FP: FLASH parameters loaded for MC9S12XEP100_V1(NVMIF2 rev 1,1,1,1) from C:\Programme\Freescale\CWS12v5.1\prog\FPP\mcu02D3.fpp
      MCU clock speed: 3981000 Hz
Block Module Name      Address Range   Status
   0  DFLASH             800 -1F0BFF   Programmed - Unselected
   1  PFLASH            4000 -  7FFF   Programmed - Unselected
   2  PFLASH            C000 -  FFFF   Programmed - Unselected
   3  PFLASH          C08000 -FFBFFF   Programmed - Unselected
FP: The UNPROTECT command is not available for the DFLASH flash module => Skipped.
FP: The UNPROTECT command is not available for the PFLASH flash module => Skipped.
FP: The UNPROTECT command is not available for the PFLASH flash module => Skipped.
FP: The UNPROTECT command is not available for the PFLASH flash module => Skipped.
executing .\cmd\SofTec_HCS12_Vppon.cmd
!// Before programming the flash, the commands written below will be executed
done .\cmd\SofTec_HCS12_Vppon.cmd
Vppon command file correctly executed.
executing .\cmd\SofTec_HCS12_Vppoff.cmd
!// After programming the flash, the commands written below will be executed
done .\cmd\SofTec_HCS12_Vppoff.cmd
Vppoff command file correctly executed.
FP: Arm FLASH for loading.
executing .\cmd\SofTec_HCS12_Vppon.cmd
!// Before programming the flash, the commands written below will be executed
done .\cmd\SofTec_HCS12_Vppon.cmd
Vppon command file correctly executed.
executing .\cmd\SofTec_HCS12_Vppoff.cmd
!// After programming the flash, the commands written below will be executed
done .\cmd\SofTec_HCS12_Vppoff.cmd
Vppoff command file correctly executed.
FP: FLASH disarmed.
executing .\cmd\SofTec_HCS12_reset.cmd
!// After reset the commands written below will be executed
ILLEGAL_BP
done .\cmd\SofTec_HCS12_reset.cmd
Reset command file correctly executed.
executing C:\SGAH_Nachlauf\bin\HBK_SG_AH_Euro_VI.xpr
!Data:2 < ADDXPR ONLY_ADD_IF_NEW "Y_DigIn_26"
RESET
done C:\SGAH_Nachlauf\bin\HBK_SG_AH_Euro_VI.xpr
executing .\cmd\SofTec_HCS12_postload.cmd
!// After load the commands written below will be executed
done .\cmd\SofTec_HCS12_postload.cmd
Postload command file correctly executed.
main 0xFBB6E7'L T
STARTED
RUNNING
New BDM communication frequency: (~49.87MHz)
Breakpoint
After the try with the old Debugger at another PC, I tried the MULTILINK again with same Project as used first time with this Debugger (first log).
The following is logged:
executing C_layout.hwl
!OPEN source 0 0 60 39
NO CONNECTION
!Source < attributes TOOLTIP on,TOOLTIP_FORMAT signed,TOOLTIP_MODE details,FREEZE off,MARKS off
!OPEN assembly 60 0 40 31
!Assembly < attributes ADR on,CODE off,ABSADR on,SYMB off,FORMAT Auto,FREEZE off,TOPPC 0x4022
!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,MODE automatic,UPDATERATE 10,SHOW_ADDRESSSPACE 0,ADDRESS 0xF8
!OPEN data 0 56 60 22
!Data:1 < attributes SCOPE global,COMPLEMENT None,FORMAT Hex,MODE automatic,SORT NotSort,UPDATERATE 5,NAMEWIDTH 16
!OPEN data 40 0 52 88
!Data:2 < attributes SCOPE local,COMPLEMENT None,FORMAT signed,MODE periodical,SORT NotSort,UPDATERATE 5,NAMEWIDTH 16
!OPEN command 60 78 40 22
!Command < attributes CACHESIZE 1000
!bckcolor 50331647
!font 'Courier New' 9 BLACK
!AUTOSIZE on
!ACTIVATE "Command" "Register" "Assembly" "Memory" "Procedure" "Data:1" "Source" "Data:2"
done C_layout.hwl
Loading Target ...
IO registers loaded for MC9S12XEP100 from C:\usersprogram\Freescale\CWS12v5.2\prog\REG\MCU02D3.REG
P&E Interface detected - Flash Version 10.18
executing .\cmd\P&E_Multilink_USB_startup.cmd
!// At startup the commands written below will be executed
Target Ready
done .\cmd\P&E_Multilink_USB_startup.cmd
Startup command file correctly executed.
executing .\cmd\P&E_Multilink_USB_preload.cmd
!// Before load the commands written below will be executed
done .\cmd\P&E_Multilink_USB_preload.cmd
Preload command file correctly executed.
FP: FLASH parameters loaded for MC9S12XEP100_V1(NVMIF2 rev 1,1,1,1) from C:\usersprogram\Freescale\CWS12v5.2\prog\FPP\mcu02D3.fpp
executing .\cmd\P&E_Multilink_USB_reset.cmd
!// After reset the commands written below will be executed
done .\cmd\P&E_Multilink_USB_reset.cmd
Reset command file correctly executed.
      MCU clock speed: 284201000 Hz
Block Module Name      Address Range   Status
   0  DFLASH             800 -1F0BFF   Blank - Unselected
   1  PFLASH            4000 -  7FFF   Blank - Unselected
   2  PFLASH            C000 -  FFFF   Blank - Unselected
   3  PFLASH          C08000 -FFBFFF   Blank - Unselected
FP: The UNPROTECT command is not available for the DFLASH flash module => Skipped.
FP: The UNPROTECT command is not available for the PFLASH flash module => Skipped.
FP: The UNPROTECT command is not available for the PFLASH flash module => Skipped.
FP: The UNPROTECT command is not available for the PFLASH flash module => Skipped.
executing .\cmd\P&E_Multilink_USB_vppon.cmd
!// Before programming the flash, the commands written below will be executed
done .\cmd\P&E_Multilink_USB_vppon.cmd
Vppon command file correctly executed.
FP: No programming voltage
FP: No programming voltage
FP: No programming voltage
FP: No programming voltage
executing .\cmd\P&E_Multilink_USB_vppoff.cmd
!// After programming the flash, the commands written below will be executed
done .\cmd\P&E_Multilink_USB_vppoff.cmd
Vppoff command file correctly executed.
FP: Arm FLASH for loading.
executing .\cmd\P&E_Multilink_USB_vppon.cmd
!// Before programming the flash, the commands written below will be executed
done .\cmd\P&E_Multilink_USB_vppon.cmd
Vppon command file correctly executed.
<Timeout>executing .\cmd\P&E_Multilink_USB_vppoff.cmd
!// After programming the flash, the commands written below will be executed
RUNNING
done .\cmd\P&E_Multilink_USB_vppoff.cmd
Vppoff command file correctly executed.
FP: FLASH disarmed.
executing .\cmd\P&E_Multilink_USB_reset.cmd
!// After reset the commands written below will be executed
ILLEGAL_BP
done .\cmd\P&E_Multilink_USB_reset.cmd
Reset command file correctly executed.
executing .\cmd\P&E_Multilink_USB_postload.cmd
!// After load the commands written below will be executed
RESET
done .\cmd\P&E_Multilink_USB_postload.cmd
Postload command file correctly executed.
RUNNING
0 Kudos
1 Reply

1,073 Views
sjehring
Contributor I

With some help I found a solution. I added an 1k resistor between Reset and TVCC. Now Debugging works realiable.

0 Kudos