Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

search inside this forum
Error during programming Freescale MPC5606B use ICDPPCNEXUS DEBUGGER
Raghav P. Nov 15, 2015 at 11:55 PM (23:55 hours)
Staff: Takao Y.

  • Hello,

    When i try to flash the code in the status window i get :

    Error : Error in ONCE status register during instruction execution

    Code Window :
    XXXX Bus Error - No Opcode

    When i close the ICDPPCNEXUS and reopen and flash then i dont get this error.
    Only when i reflash many times in the same cycle then i get the above error very often.

    And i am also not able to reset the micro due to below error :

    Reset script not found (C:\devtools\Freescale\cp_mpc5xxx_2.10\pemicro\resetscript.mac)

    Regards,
    Raghavendra




    Comments

  • Greetings,

    Concerning reset problems, you should go to Configuration Menu -> Automated script options -> Run script file. Here you need to select the correct .MAC file. The path that you have set here probably does not exist. You may need to look for the resetscript.mac in your computer. Did you move your CW install to a different path?

    Concerning the Error in ONCE, you should lower the debug shift frequency before you click on connect. This will slow down the communication speed to establish a better connection. You may also want to add a reset delay in the connection settings if you have a reset circuitry on your board. This allows the external reset signal to complete its toggling before the P&E interface starts connecting to your chip.


    Takao Yamada

    • Hello Takao Yamada,

      Could you please explain me the difference between softwares ICDPPCNEXUS and cprogppcnexus or progppcnexus.

      I by mistakenly used progppcnexus and i erased and program the flash and i could see the Reset LED always on after power up and it goes off when i connect the debugger but when i flash through ICDPPCNEXUS and say go and stop then again the Reset LED is on the dev board which is connect to RESET pin of the micro. So i think somewhere i followed a wrong procedure.

      Please let me the recommend guidelines for flashing and debugging the software.

      This is the first time i am using the PEMicro.

      I am using MPC5606B which is of one core.

      Regards,
      Raghavendra P

  • Hello,

    Many thanks for your information.

    I am not able to find the resetscript.mac in the below path in my machine where i have installed PEMicro :

    C:\PEMicro\pemicro

    Could you please guide me where i can get the resetscript file for MPC5606B


    For the ONCE Error,

    I have selected the BDM_Speed = 31-BDM CLOCK FREQ = 781250 Hz [which i see to be the lowest in the drop dowm] Please correct me if i am wrong.

    I tried with a reset delay of 10ms in the connection settings but still i get the ONCE error

    I am using the default PowerPC Debug Settings under the configuration tab.

    The full name of the Tool which i used for flashing/Debuging is :

    ICDPPCNEXUS Debugger for CodeWarrior 128k Starter Edition - Version 1.34.00.01


    Development Board : TRK-MPC5606B
    Debugger: PEMICRO Multi Universal FX Debugger
    IDE : Eclipse
    Compiler : GHS Compiler


    Regards,
    Raghavendra P

  • And Also, After flashing the ELF file :

    1) When I place a breakpoint in the main( ) function, the Status Window indicates "Waiting for keystroke or breakpoint...", and it spins indefinitely.

    2) I consistently get the following error message: "Error: Error in ONCE status register during instruction execution." once i stop the run.

  • Greetings,

    You probably should be reading the HELP file to understand how our tools work.

    First, the difference between PROG and CPROG is that CPROG is the command-line flash programmer. This means you can create a script to flash program a device. This CPROG is used within ICD software to flash program your chip before starting the debug session. This is done by calling the High-level load (you can type HLOAD in the console or click on the HLOAD button). PROG is the flash programming software with a UI to allow you to call commands one by one instead of scripting it and running it automatically. It is useful when you are getting programming issues.

    Once you flash your device, you just have to hit the "RESET" button or call the reset command in the console.

    Just note, that within Codewarrior when you try to debug it will call our ICD software and automatically try to flash program your chip with resetscript.mac by using the S19 generated by the Codewarrior compiler.

    If you run into issues stepping, breakpoints, or running then you have either communication problems, did not flash program correctly, or a watchdog/system-bus-chip is resetting your chip.


    Takao Yamada

    • Hello,

      Many thanks for your information.

      So i should always use ICDPROGNEXUS for flashing and debugging.

      But when i hit the reset it says it cannot find resetscript.mac and this file is not present in the PEMIcro folder.

      How do i solve below problem :


      1) When I place a breakpoint in the main( ) function, the Status Window indicates "Waiting for keystroke or breakpoint...", and it spins indefinitely.

      2) I consistently get the following error message: "Error: Error in ONCE status register during instruction execution." once i stop the run.

      Also,
      How do i verify that the flash was successful and watchdog/system bus chip is not reseting the chip.

      How do i debug and solve communication problems?

      Regards,
      Raghavendra

  • Greetings,

    The reset script is crucial and most likely the cause of all of your problems. For now, change your reset script to "mpc5600_z0h_vle.mac". You will need to find this in the same folder where the ICD and PROG software is located.

    Without the reset script, the watchdog is still enabled, the RAM is not initialized, the MMU is not set, and you will special purpose registers not initialized. You must have the script running. Once you select the reset script, click on reset and start your debug session.

    If you have further questions, please read the help file. All of this information is in there. It seems you are running in blindly.


    Takao Yamada

    • Hello,


      Many thanks for your information.

      Sorry if i ask you a lot of questions but i have very little time to read the whole help.

      So can i use mpc5600_z0h_vle.mac for MPC5606B ? Is it compatible? I could not find a resetscript for MPC5606B in the path.

      You said for now to use mpc5600_z0h_vle.mac, so do you mean i cannot use this for later?

      I am using the Eclipse with GHS compiler environment as First setup.
      Codewarrior is just a backup.


      Regards,
      Raghavendra P

  • Greetings,

    Yes please use the mpc5600_z0h_vle.mac and of course it is compatible otherwise I would not tell you to use it! You are going to have to trust me, considering I am the one who maintains the whole ICD PPCNEXUS software and all of the .mac files.

    You should use the macro for now and you should figure out why you cannot find the resetscript.mac file. Did you actually install this Codewarrior or did you copy/paste or move it somewhere else? Did you do a search on your computer for this file?


    Takao Yamada

    • Hello Takao Yamada,

      Many thanks for your response.

      So today morning i tried with the mpc5600_z0h_vle.mac and it was successful and after that upon many flashing and resetting there was no ONCE Status register errors. So i proceeded with the debug by putting brake point into the main and i observed that the control stepping was not proper because it was looping in a file staring from 1st statement to the last statement and gain in the same file the control stays instead of jumping back to main function. The debug control flow was not proper.

      So i shut dowm the ICDProg and opened CodeWarrior 10.6 which had IDE+GCC+PEMicro interface. So built the project and was successful in analyzing the code here. Now i shut down the CodeWarrior 10.6 and open only the ICDPROGNEXUS and i tried to flash the file which i had built in the CodeWarrior 10.6 and strangely the flashing in not happening due to ONCE Status error even after multiple times try. Below is the log report :
      I dont know what happend to it when i changed to CodeWarrior

  • Opening log file C:\Users\RP0C55258\workspace\Eclipse\FSK_LED_EXAMPLE\Debug\TEST.LOG
    >reset
    Starting reset script (C:\PEMicro\pemicro\mpc5600_z0h_vle.mac) ...
    >quiet on
    >
    >REM This script is compatible with all MPC56xx devices using the Z0H core.
    >REM This script performs minimal intialization because these devices do
    >REM not have a MMU.
    >
    >REM Supported devices include MPC560xB/C, MPC560xP, and MPC560xS devices.
    >
    >reset
    >
    >rem Set up the pins
    >rem Address bus PCR 4 - 27 43
    >rem configure address bus pins
    >mm.l $c3f90048 $04400440
    >mm.l $c3f9004c $04400440
    >mm.l $c3f90050 $04400440
    >mm.l $c3f90054 $04400440
    >mm.l $c3f90058 $04400440
    >mm.l $c3f9005c $04400440
    >mm.l $c3f90060 $04400440
    >mm.l $c3f90064 $04400440
    >mm.l $c3f90068 $04400440
    >mm.l $c3f9006c $04400440
    >mm.l $c3f90070 $04400440
    >mm.l $c3f90074 $04400440
    >
    >rem Data bus PCR 28-59
    >rem configure data bus pins
    >mm.l $c3f90078 $04400440
    >mm.l $c3f9007c $04400440
    >mm.l $c3f90080 $04400440
    >mm.l $c3f90084 $04400440
    >mm.l $c3f90088 $04400440
    >mm.l $c3f9008c $04400440
    >mm.l $c3f90090 $04400440
    >mm.l $c3f90094 $04400440
    >rem These next 8 are not required for 16-bit address bus.
    >mm.l $c3f90098 $04400440
    >mm.l $c3f9009c $04400440
    >mm.l $c3f900a0 $04400440
    >mm.l $c3f900a4 $04400440
    >mm.l $c3f900a8 $04400440
    >mm.l $c3f900ac $04400440
    >mm.l $c3f900b0 $04400440
    >mm.l $c3f900b4 $04400440
    >
    >rem config minimum bus control pins
    >rem RD/WR & BDIP PCR 62/63
    >mm.l $c3f900bc $04400440
    >
    >rem WE[0-4] PCR 64-67
    >mm.l $c3f900c0 $04430443
    >mm.l $c3f900c4 $04430443
    >
    >rem OE & TS
    >mm.l $c3f900c8 $04430443
    >
    >rem configure the chip selects
    >rem CS[0-3]
    >mm.l $c3f90040 $04430443
    >mm.l $c3f90044 $04430443
    >
    >REM Set up Memory Controller CS0 @ $3ff8_0000
    >mm.l $c3f84010 $3ff80001
    >mm.l $c3f84014 $fff800F0
    >
    >REM Set up Memory Controller CS0 @ $3ff8_0000 - 16-bit Access
    >REM mm.l $c3f84010 $3ff80001
    >REM mm.l $c3f84014 $fff800F0
    >
    >rem Set up Memory Controller CS1 @ $2000_0000
    >mm.l $c3f84018 $20000001
    >mm.l $c3f8401c $fff800F0
    >
    >rem CLKOUT
    >mm.w $c3f9020a $02c0
    >
    >REM Disable SWT Watchdog Timer
    >mm.l $fff38010 $0000c520
    >mm.l $fff38010 $0000d928
    >mm.l $fff38000 $ff00000A
    >
    >REM ----------------------------------------------------------------------------
    >REM Set up all interrupt vectors and initialize with branch to itself instructio
    >REM set IVPR (IVORs are hardwired and do not need to be configured)
    >REM -----------------------
    >spr 63t $40000000
    >
    >REM spr 400t $8000
    >REM spr 401t $8010
    >REM spr 402t $8020
    >REM spr 403t $8030
    >REM spr 404t $8040
    >REM spr 405t $8050
    >REM spr 406t $8060
    >REM spr 407t $8070
    >REM spr 408t $8080
    >REM spr 409t $8090
    >REM spr 410t $80a0
    >REM spr 411t $80b0
    >REM spr 412t $80c0
    >REM spr 413t $80d0
    >REM spr 414t $80e0
    >REM spr 415t $80f0
    >REM spr 528t $8100
    >REM spr 529t $8110
    >REM spr 530t $8120
    >
    >meminit.l $40000000 $40017FFF ; Initialize up to 96K of L2SRAM with junk data
    Initializing RAM from $40000000 to $40017FFF.
    >; Requires version >= 0.11 of debugger
    >
    >ClearSPR
    >
    >REM General Special Purpose Registers
    >
    >AddSPR XER 1T :Integer Exception Register
    >AddSPR LR 8T :Link Register
    >AddSPR CTR 9T :Count Register
    >
    >REM Exception Handling and Control Registers
    >
    >AddSPR SPRG0 272T :Special Purpose Register 0
    >AddSPR SPRG1 273T :Special Purpose Register 1
    >AddSPR BUCSR 1013T :Branch Unit Control/Status
    >AddSPR SRR0 26T :Save and Restore 0
    >AddSPR SRR1 27T :Save and Restore 1
    >AddSPR CSRR0 58T :Critical Save and Restore 0
    >AddSPR CSRR1 59T :Critical Save and Restore 1
    >AddSPR DSRR0 574T :Debug Save and Restore 0
    >AddSPR DSRR1 575T :Debug Save and Restore 1
    >AddSPR ESR 62T :Exception Syndrome Register
    >AddSPR MCSR 572T :Machine Check Syndrome Register
    >AddSPR DEAR 61T :Data Exception Address Register
    >AddSPR IVPR 63T :Interrupt Vector Prefix
    >
    >AddSPR IVOR0 400T :Interrupt Vector Offset 0
    >AddSPR IVOR1 401T :Interrupt Vector Offset 1
    >AddSPR IVOR2 402T :Interrupt Vector Offset 2
    >AddSPR IVOR3 403T :Interrupt Vector Offset 3
    >AddSPR IVOR4 404T :Interrupt Vector Offset 4
    >AddSPR IVOR5 405T :Interrupt Vector Offset 5
    >AddSPR IVOR6 406T :Interrupt Vector Offset 6
    >AddSPR IVOR7 407T :Interrupt Vector Offset 7
    >AddSPR IVOR8 408T :Interrupt Vector Offset 8
    >AddSPR IVOR9 409T :Interrupt Vector Offset 9
    >AddSPR IVOR10 410T :Interrupt Vector Offset 10
    >AddSPR IVOR11 411T :Interrupt Vector Offset 11
    >AddSPR IVOR12 412T :Interrupt Vector Offset 12
    >AddSPR IVOR13 413T :Interrupt Vector Offset 13
    >AddSPR IVOR14 414T :Interrupt Vector Offset 14
    >AddSPR IVOR15 415T :Interrupt Vector Offset 15
    >AddSPR IVOR32 528T :Interrupt Vector Offset 32
    >AddSPR IVOR33 529T :Interrupt Vector Offset 33
    >AddSPR IVOR34 530T :Interrupt Vector Offset 34
    >

  • >rem Processor Control Registers
    >
    >AddSPR PID0 48T :Process ID Register
    >AddSPR PVR 287T :Processor Version Register
    >AddSPR PIR 286T :Processor ID Register
    >AddSPR SVR 1023T :System Version Register
    >AddSPR HID0 1008T :Hardware Implementation 1
    >AddSPR HID1 1009T :Hardware Implementation 2
    >
    >REM Debug Registers
    >
    >AddSPR DBCR0 308T :Debug Control 0
    >AddSPR DBCR1 309T :Debug Control 1
    >AddSPR DBCR2 310T :Debug Control 2
    >AddSPR DBSR 304T :Debug Status Register
    >AddSPR IAC1 312T :Inst Address Compare 1
    >AddSPR IAC2 313T :Inst Address Compare 2
    >AddSPR IAC3 314T :Inst Address Compare 3
    >AddSPR IAC4 315T :Inst Address Compare 4
    >AddSPR DAC1 316T :Data Address Compare 1
    >AddSPR DAC2 317T :Data Address Compare 2
    >
    >REM Memory Management Registers
    >
    >AddSPR MMUCFG 1015T :MMU Configuration
    >
    >REM Cache Registers
    >
    >AddSPR L1CFG0 515T :L1 Cache Configuration
    >
    >quiet off ; turn memory refresh back on
    >
    Reset script (C:\PEMicro\pemicro\mpc5600_z0h_vle.mac) completed.
    Error : Error in ONCE status register during instruction execution.
    Error : Error in ONCE status register during instruction execution.
    Error : Error in ONCE status register during instruction execution.
    Error : Error in ONCE status register during instruction execution.

    >HLoad
    C:\Users\RP0C55258\workspace\Eclipse\FSK_LED_EXAMPLE\Debug\FSK_LED_EXAMPLE.elf detected as file type 'ELF/DWARF'.
    >pc 00003000 ;Setting PC to Elf/Dwarf entry point of application.
    Error : Error in ONCE status register during instruction execution.
    Error : Error in ONCE status register during instruction execution.
    Error : Error in ONCE status register during instruction execution.
    Error : Error in ONCE status register during instruction execution.

    >REM ;Use the "Gotil main" command to run to the "main" routine. Requires debug information.
    693 source line records in 101 files.
    64 symbols defined.
    9428 object bytes loaded.
    File loaded properly.
    Downloading object data ... $00003300$00003D00$00004700$0000502CDone.
    Download time was 0.26s
    Error : Error in ONCE status register during instruction execution.
    Error : Error in ONCE status register during instruction execution.
    Error : Error in ONCE status register during instruction execution.
    Error : Error in ONCE status register during instruction execution.
    Error : Error in ONCE status register during instruction execution.

  • Just for your information :

    Today morning I executed Freescale LED_Example of the MPC5606Bkit with the Codewarrior + GCC + PEMicro Setup (everything in built in the CodeWarror 10.6 package) and it worked perfectly fine.

    The main issue is below environment, Both these environment are showing undesired behaviour and it is difficult to validate correctness :

    Eclipse + GHS Compiler + Trace32 with Lauterbaugh

    Eclipse + GHS Compiler + PEMicro Universal Multi FX with ICDPROGNEXUS

  • Greetings,

    The moment you have Error in Once, you need to power cycle your board and restart the debug session. Basically communication has been lost and the multilink cannot get any status from the chip.

    On all of these experiments you tested on your TRK-MPC5606B board?

    Did you not also mention that the problem also occurs if you try ICD PPCNEXUS with the S19 or ELF file you used in Codewarrior for your project? Could you run the LED Example again in Codewarrior, then use ICDPPCNEXUS to debug the LED project. I want to make sure that the LED example works in both Codewarrior and ICD PPCNEXUS. If we can establish this, then we can rule out ICD PPCNEXUS or your multilink as the problem.


    Takao Yamada

    • Hello,

      Yes i am trying everything on the TRK5606B Board.

      In the codewarrior there is no problem with PEMIcro interface it works fine.The problem arised when i closed and open the ICDPrognexus afresh

      I tried starting the ICDPROGNEXUS many times by power reset and by running the reset script but still everytime i get the ONCE register error.

      Tricky thing is that this happend when i ran the Codewarrior for the first time and did debug through in its inbuilt pemicro interface.

      After when i close it then i start the ICDPROGNEXUS afresh then i face this problem.

      I dont know if Codewarrior did something?

      Tomorrow i will do try it once again

      Regards,
      Raghavendra P

    • Hello,

      I tried once again with ICDPPCNEXUS Debugger for CodeWarrior 128k Starter Edition - Version 1.34.00.01 and always i get ONCE status register error.

      But when run with ICDPPCNEXUS Debugger 64k Starter Edition - Version 5.60.00.00 then it works fine and i dont get ONCE status register error.

      Could you let me know the difference between this two versions and what might be issue with the earlier one.

      Regards,
      Raghavendra P

  • Greetings,

    If you go to our website for ICDPPCNEXUS, you can find the version info:
    http://www.pemicro.com/products/product_viewDetails.cfm?product_id=15320116

    Here I do my best to always report the changes made in each version to help you and myself understand the differences.

    The only thing that may affect you is if you have a MPC5606BK, instead of MPC5606B. I believe this is the case but please check your silicon mask and see if the "K" is mentioned.

    Please also look out for my download that I have sent you. See if it solves your issue.


    Takao Yamada

    • Hello,

      I confirmed it is MPC5606B.

      Have you sent me the download link to my email id or you have attached here?

      I could not find it here.

      Regards,
      Raghav

    • Hello,

      Which software do you recommend to me to use for MPC5606B

      ICDPPCNEXUS Debugger for CodeWarrior 128k Starter Edition - Version 1.34.00.01

      or

      ICDPPCNEXUS Debugger 64k Starter Edition - Version 5.60.00.00


      Regards,
      Raghavendra P

  • Greetings,

    You should have gotten an email indicating that you have a download from P&E.

    I recommend you always try to use the latest version. But please check your email and you will find an update to your Codewarrior.


    Takao Yamada

    • Hello,

      Many thanks for the information.

      Could you please let me know under what all conditions i get below issue :

      - When I place a breakpoint in the main( ) function, the Status Window indicates "Waiting for keystroke or breakpoint...", and it spins indefinitely.

      The reason i ask this is that i have 2 setup with PEMicro Multilink FX debugger + ICDPROGNEXUS one in each machine, when i flash the same elf file in both the setup then i dont get above said problem in firstsetup but in the second set up i get above problem. I checked in both the setup the setting were the same and identical.



      Regards,
      Raghavendra P

  • Greetings,

    Are you sure you are using the same ICD software version, or same multilink firmware? Make sure you are actually flash programming your device. Within ICD software, look for the PROG software. Open PROG and use show module on both machines. Do you see data?

    By the way, the software is called ICD PPCNEXUS and PROG PPCNEXUS. There is no ICDPROGNEXUS.


    Takao Yamada

  • Greetings,

    Any update on this?


    Takao Yamada

Add comment


   Want to comment? Please login or create a new PEMicro account.







© 2017 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement