Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service

search inside this forum
boot / app flash
Bill S. migrated on Dec 31, 2013 at 11:00 AM
No staff assigned yet

  • I'm building a system with a bootloader down low in FLASH and a reloadable application up higher in FLASH.  The standard P&E FLASH routines are erasing the boot loader every time I reprogram the application.  This isn't an issue in the real world since we won't be using teh debugger to program the application,  but during program development I need to be able to have both the boot loader and the application resident simultaneously.  

    I understand the solution is to read out the boot loader before erasing the flash, erase, then re-write the boot loader, then write the application. Does anyone have an example script file that does this? I'm using mpc5500_booke.mac if it matters.

    Thanks,

    Bill




    Comments

  • Hmmmm,   anyone?  Anyone?  Bueler?



  • Bill,

    There are two solutions to this issue. Both can be implemented in PROGPCCNEXUS and CPROGPPCNEXUS.

    1. Use the Erase Block command to selectively erase only the regions of flash where your application code resides.

    2. Modify the flash algorithm with a preserve range command so that it saves your bootloader code, erases the flash, and then restores the code.
    http://www.pemicro.com/blog/post.cfm/new-flash-programming-feature-preserve-range" target="_blank">http://www.pemicro.com/blog/post.cfm/new-f...-preserve-range

    -Johnny
    P&E Technical Support

  • Thanks Johnny.  Can I do this from ICDPPCNexus? 

    I found the programming algorithm file - Freescale_MPC5554_1x32x512k_Freescale_H7F_32_Driver.PCP. I can modify a copy of it it to not erase the boot loader. Now how do I select which flash algorithm is used? I will need to use the original flash algorithm when I program the boot loader into flash, and the modified algorithm when I program the application.

    Thanks again,

    Bill

  • You should have two separate algorithms - the default and one that preservers 
    part of your data. There is actually a way to specify what flash algorithm to
    use inside the ICD debugger. After you load the initialization script for your
    device, launch the High Level Load dialog from the tool bar (should be the
    third button from the left with the letters HL). Within the dialog, click on
    browse next to "Load a single debug/binary file" and select your S19/ELF file.
    Then select "Program binary image into Flash using Algorithm" and pick the
    appropriate algorithm.

    -Johnny
    P&E Technical Support

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