Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

search inside this forum
Program 2 files at one time
Mark W. Nov 7, 2014 at 10:28 AM (10:28 hours)
Staff: Takao Y.

  • Hello,

    I need to download two different files into a Kinetis K60 chip at one time. One file is the Boot and the other is the application.

    I am using my own VB6 program which calls the "C:\pemicro\cyclone_max\CSAPacmpZ.exe INTERFACE=CYCLONEMAX PORT=USB1 PCI_DELAY 31 " & "C:\ats\newethernet\NewEthernet.cfg"


    The NewEthernet.cfg is as follows:
    ; LAST USED CONFIGURATION FILE =
    ; LAST USED ALGORITHM FILE = C:\PEMicro\cyclone_max\Algorithms_Kinetis\freescale_k60dn512m10_1x32x128k_pflash.arp
    ; LAST USED S RECORD FILE = C:\ats\NewEthernet\boot_intflash.afx.S19
    ; LAST USED IMAGE FILE =
    ; LAST USED PORT = USB1 : TESTENG
    ;
    ; Automatically generated configuration file
    ; For in-circuit programming ARM CORTEX Target
    ; PCI_DELAY 31
    ;COMMSMODE 0
    :USESWD 0
    ;
    :SAPGUIVERSION 332E3539
    :NEWIMAGE
    :DESCRIBEIMAGE 11/7/2014 Kinetis_Boot
    CM C:\PEMicro\cyclone_max\Algorithms_Kinetis\freescale_k60dn512m10_1x32x128k_pflash.arp
    SS C:\ats\NewEthernet\boot_intflash.afx.S19
    EN ;Erase if not Blank
    BM ;Blank Check Module
    PM ;Program Module
    VM ;Verify Module
    VC ;Verify Checksum


    Then I use the "C:\pemicro\cyclone_max\sap_launch.exe port=USB1" to download the boot file into the chip


    This process works fine.

    What do I need to do to is be able to load both the boot and the application into the Cyclone Max and then in one step
    Program the Kinetis chip with both files.

    The application file is: "intflash_d.afx.S19"
    The boot file is: "boot_intflash.afx.S19"

    The boot file starts at address 0000
    The application file starts at address hex 18410


    I have one more problem.
    There is no problem using a 9" ribbon cable between the 20 pin connector on the cyclone max and my UUT, but when I use a
    36" ribbon cable it doesn't work.
    Is there a limit on the length?
    What can I do? I have numerous test systems where the cyclone max is about 30" from the UUT's.
    I have no problen using the cyclone max to program a coldfire chip through the 26 pin connector with a 36" cable.

    Thank you,
    Mark Wolkon




    Comments

  • Greetings,

    Concerning the length of the ribbon cable, yes there will be issues with longer cables due to introduction of noise. You should add shielding to this cable to reduce the noise. You could try lowering the debug shift frequency within your settings to slow down the communication speed, but that also means slowing down your programming speed.

    Concerning programming both boot and app in one go, all you do is append more commands to your list. For example:

    CM Pflash Algo
    SS My_Boot.S19
    EN ;Erase if not Blank
    BM ;Blank Check Module
    PM ;Program Module
    VM ;Verify Module
    VC ;Verify Checksum
    CM Cflash Algo
    SS My_CFLASH.S19
    EN ;Erase if not Blank
    BM ;Blank Check Module
    PM ;Program Module
    VM ;Verify Module
    VC ;Verify Checksum


    Takao Yamada

  • Wouldn't the 2nd EN erase the first file loaded?

    And how would I specify the starting starting address of the application?
    Mark Wolkon

  • Greetings,

    Each algorithm has the correct flash range so a Pflash algorithm cannot erase a location in CFLASH, and vice versa.

    There is no need to specify the starting address. The algorithm handles that already, unless you create your S19 or ELF file not based on the address that is specified in the chip's reference manual. Let me know if that is the case.


    Takao Yamada

  • What algorithm should I use for the cflash?

  • Greetings,

    I should have done a little more research before giving you my previous answer. Your chip only has PFLASH. No other section of flash. So since you plan on programming the same location, this is an example of what you should do:

    CM Pflash Algo
    SS My_Boot.S19
    EN ;Erase if not Blank
    BM ;Blank Check Module
    PM ;Program Module
    VM ;Verify Module
    VC ;Verify Checksum
    SS My_App.S19
    PM ;Program Module
    VM ;Verify Module

  • I tried this, the cyclone max programs with Success, but When I cycle power to run the app in the device, it still looks like only the first boot program is running, not the full application.

  • Greetings,

    Use the PROG software that came with your Cyclone software package and see if you are able to program it step-by-step instead of automating it in a standalone image. Also, use the PROG software to upload module which reads your flash content and saves it into an S19 file. Look at the file and make sure you are actually programming the correct data.

    Have you ever gotten your App and Boot to work in the past?


    Takao Yamada

  • I will need to get assistance from the person who wrote the boot & App to try what you suggested, but to answer your question, the boot gets put in through the cyclone max and the application gets put in through the ethernet connection on the UUT. That process works fine.

    We are trying to eliminate the need to download the application over the ethernet and do it all in one process through the cyclone max.

  • I need to install the 2nd application at hex 18000.  This is the address the bootloader jumps to to start the second application.

  • Greetings,

    That is fine because it is within the flash range. Now the question is did your compiler create an S19 file at that location? Or you are telling me you need a way to convert your S19 file to start at 0x18000? If you need to move it, use our command-line MoveS19 utility:
    http://www.pemicro.com/downloads/download_file.cfm?download_id=110


    Takao Yamada

  • No, I don't need to convert it, it must be loaded in flash starting at address 0x18000.

    I need a way of telling the programmer to start loading in the 2nd app in flash at address 0x18000.

  • Greetings,

    I do not think you understand how this works. The algorithm has a specific flash range which is the full range of the PFLASH. Your S19 file has a flash range as well. If this flash range fits within the PFLASH algo range, then it will work fine. You do not have to specify any address. It is all based on your S19 file.

    Please read how srecords work and you will understand that the starting address is already within your S19 file. Now if that starting address in the S19 file is not what you wanted, then you either have to recompile your code at the new address, or you can use our move19 utility to change it.


    Takao Yamada

  • Greetings,

    Were you able to resolve your issue?


    Takao Yamada

  • Not yet, we are still working on it.

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