Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

search inside this forum
S12Z Command Line Programming and Running
chris l. Apr 13, 2015 at 09:30 AM (09:30 hours)
Staff: Takao Y.

  • Hi, 

    I'm having issues programming and running my firmware in one step. I've been able to invoke Cyclone_Progs12zz.exe, select the *s12zp file and .elf program file, then use EM and PM. Once programmed I hit the reset button on my eval board and the program runs fine. This is assurance that my source code, drivers, and connections to the CYCLONE PRO through USB is working correctly

    --

    Now I want to do the same thing through the command line prompt. I'm invoking the following from a .bat file. My params are for the CM and SS files in the .CFG file below...

    --

    "%prog_path%csaps12zz" config.cfg "/PARAM1=%par1%" "/PARAM2=%par2%" INTERFACE=CYCLONE PORT=USB1 /logfile ProgramLog.log

    --

    ; LAST USED CONFIGURATION FILE =
    ; LAST USED ALGORITHM FILE = C:\PEMicro\cyclone_pro\Algorithms\S12Z\freescale_9s12zvl32_1x16x16k_all.s12zp
    ; LAST USED S RECORD FILE =
    ; LAST USED IMAGE FILE = C:\Users\me\Desktop\sap.SAP
    ; LAST USED PORT =
    ;
    ; Automatically generated configuration file
    ; For in-circuit programming S12Z Target
    ; FREQUENCY 8000000
    ;
    :PROVIDEPOWER 0
    :SAPGUIVERSION 332E3631
    :POWEROFFONEXIT 1
    :NEWIMAGE
    :DESCRIBEIMAGE MY Prog
    CM /PARAM1
    SS /PARAM2
    EM
    PM
    VM
    RE
    DE 5000
    GO

    --

    This yields the following .LOG file

    Pre-processed line 11 Ok ::PROVIDEPOWER 0
    Pre-processed line 12 Ok ::SAPGUIVERSION 332E3631
    Pre-processed line 13 Ok ::POWEROFFONEXIT 1
    Pre-processed line 14 Ok ::NEWIMAGE
    Pre-processed line 15 Ok ::DESCRIBEIMAGE MY Prog
    CYCLONE detected - Flash Version 8.63


    REM>; LAST USED CONFIGURATION FILE =

    REM>; LAST USED ALGORITHM FILE = C:\PEMicro\cyclone_pro\Algorithms\S12Z\freescale_9s12zvl32_1x16x16k_all.s12zp

    REM>; LAST USED S RECORD FILE =

    REM>; LAST USED IMAGE FILE = C:\Users\me\Desktop\sap.SAP

    REM>; LAST USED PORT =

    REM>;

    REM>; Automatically generated configuration file

    REM>; For in-circuit programming S12Z Target

    REM>; FREQUENCY 8000000

    REM>;

    REM>:PROVIDEPOWER 0

    REM>:SAPGUIVERSION 332E3631

    REM>:POWEROFFONEXIT 1

    REM>:NEWIMAGE

    REM>:DESCRIBEIMAGE MY Prog
    CMD>CM C:\PEMicro\cyclone_pro\Algorithms\S12Z\freescale_9s12zvl32_1x16x16k_all.s12zp ; [Script Line = CM /PARAM1]
    Initializing. -Initialized.
    ;version 1.03, 6/27/2014, Copyright P&E Microcomputer Systems, www.pemicro.com [freescale_9s12zvl32_pflash]
    ;device freescale, 9s12zvl32, 1x16x16k, desc=all
    ;begin_cs device=$00100000, length=$00008000, ram=$00001000Done.
    CMD>SS C:\my company\PROJECTS\Software\LEDController\App\elffile.elf ; [Script Line = SS /PARAM2]
    CMD>EM
    Configuring Erase command...Done.

    CMD>PM
    Checking range of S records. -Checked.
    Preparing data .... Address $ WARNING - ELF file does not contain DWARF 2.0 debug_abbrev section
    Debug information will not be loaded
    Processing Object File Data ... FF8000FFFE00. Done.
    CMD>VM
    Configuring Verify Module ... Done.
    CMD>RE
    CMD>DE 5000
    Delaying. -Done.
    CMD>GO

    REM>

    All programming steps have been pre-processed.

    Preparing CYCLONE Internal Flash....done.

    Programming CYCLONE Internal Memory... Address $ $F0110000$F0110E60$F011119F Done.

    --

    I've confirmed that if I do this the image is stored on the CYCLONE Pro correctly, I then have to hit the reset button on the CYCLONE Pro, then hit the start button, then I hit the reset button on the evaluation board and it works correctly.

    My question is how I can directly program and run the software without having to hit the reset and enter button on the cyclone pro.

    I was under the impression that the RE & GO command would program the software and run it immediately.

    Thank you for any help,

    Chris




    Comments

  • Greetings,

    The RESET command is misleading in that the board will still be in debug mode. It will reset your target, re-enter background debug mode, and let the target run. Note, this is different than power-on-reset and running the code.

    When you power cycle the cyclone, the cyclone is no longer holding your target in debug mode. When you power cycle your board, it is restarting without being in debug mode.

    Since the cyclone max has no control over your power, it cannot power-on-reset for you so you will need to manually power cycle the board after programming.

    My suggestion is remove RESET and GO from your command list. When the cyclone is done programming, disconnect the cyclone from your target and power cycle your target.

    I have discussed this issue with the design engineers in the past and we hope to fix the misleading command names and hopefully get rid of this confusion in the near future.


    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