Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

search inside this forum
flashing elf without deleting first one DEVKIT-MPC5748G
Kfir B. Jun 11, 2017 at 03:12 AM (03:12 hours)
Staff: Takao Y.

  • I am trying to flash two elf files with overlapping section, but S32 is alaways deleting the full flash.

    When I tried flashing two elf files at once the overlapping parts get messed pu:
    elf1:
    S319011CF0000000000201002FB00000000001002E16006600004C
    S315011CF01401002FB80000000001002DB0006600009D
    elf2:
    S319011CF000000000020100836C0000000001008092006600006E
    S315011CF01401008374000000000100802C00660000BE

    Result in memory (read from memory and written manually in ~srec format):
    S319011CF0001000000201000320040000000100001208660000
    S315011CF01401000330000000000000000000660000

    How can I do that?




    Comments

  • Greetings,

    Are you just flash programming, or do you expect to also debug afterwards within S32?

    Did you do the compilation yourself, if so, then you should probably look into combining the projects before compilation.


    Takao Yamada

  • Hi Takao,

    Thanks very much.
    I have another person comiling, it's a system like CI for the flashing.

    Than the code is being tested with S32.
    When reading the memory from S32 we see that the data is this memory is as shown above.

    It seems that writing the data twice from two different elf files creates the issue, it seems that the data is not overwritten but is being NOR'd or something.

  • Greetings,

    You should understand that ECC is probably causing your problem. Each 8-byte block has a CRC that can only be written once. Attempting to overwrite or write a blank byte within this block will cause a programming error. You should read more about this in your chip's reference manual.


    Takao Yamada

  • But with serial bootloader I can update the flash, does the ECC gets updated as well?

    If so, why can't we do it from the debugger?

  • Greetings,

    You have to erase the block to be able to reprogram a block. The serial bootloader is probably doing exactly that. But you do not want to erase because you want to program both ELF files.

    Again, programming two ELF files that have the potential to overwrite or program within the same 8-byte block is not going to work. The person who compiled it should understand that and needs to make modifications. There is nothing much you can do otherwise.


    Takao Yamada

  • But with serial bootloader I can update the flash, does the ECC gets updated as well?

    If so, why can't we do it from the debugger?

  • Greetings,

    Erasing will reset the ECC. Programming the 8-byte block the first time sets the ECC.


    Takao Yamada

  • But how can I erase block using PE micro with S32 while flashing elf files?

  • Greetings,

    You cannot program 2 ELF files in consecutive debug sessions within S32 Power IDE. Each time you start a debug session it will erase the entire flash. It is not meant to be a flash programming software.

    We sell our software utilities that gives you more control of how you flash program the device. You can look into our PROG for PPCNEXUS software where you can attempt to flash program both ELF files:
    http://www.pemicro.com/products/product_viewDetails.cfm?product_id=15320089


    Takao Yamada

  • Will it work with DEVKIT-MPC5748G usb debug?

  • Greetings,

    That is how I use it, so yes it is supported.


    Takao Yamada

  • Thanks very much Takao for the detailed and fast response.

    Excellent news, Can you please supply to me the script for flashing multiple files?
    I will purchase the progger of course

  • Another question, and I hope this is the correct place, do you have a bootloader for it?

  • Greetings,

    You do not want to start scripting yet. The PROG software comes with two software: PROG PPCNEXUS and CPROG PPCNEXUS. The PROG is a UI software that allows for step-by-step programming which I highly advise you to start with to ensure that all steps are working and the memory is programmed how you like it.

    Then you can start scripting by reading the CPROG user manual to understand what kind of commands and parameters are available to semi-automate the programming process. Going straight into scripting is not a great idea.


    Takao Yamada

  • That is good advice, thanks, can you supply me the script so later I will have a start position for the scripting part?

  • Greetings,

    The board should already come with our bootloader in there. But if you need updated firmware here it is:

    -> pemicro.com\opensda
    -> Firmware_apps.zip
    -> DEBUG-OPENSDA-E200_Pemicro_v110.SDA


    Takao Yamada

  • Greetings,

    The CPROG user manual already gives examples of how to use it. I will not be supplying scripts for customers.


    Takao Yamada

  • Hi

    I get activation code is not valid for this software,

    I have code for: PKGPPCNEXUS_Starter
    and after installation I input it in:PROGPPCNEXUS...

    What to do?

  • Greetings,

    Do not use the starter edition of the software. It will not allow you to program 2 ELF files.

    Wait until your order is completed and the new software is sent to you with the new installation code from your invoice. Patience, as our sales department needs to complete the paperwork to process your order.


    Takao Yamada

  • Greetings,

    Any luck with the new software?


    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