HOWTO: MPC5777C - Low/Mid Flash block erase via PE Micro

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HOWTO: MPC5777C - Low/Mid Flash block erase via PE Micro

HOWTO: MPC5777C - Low/Mid Flash block erase via PE Micro

PE Micro is not able erase unused FLASH block - typically if your application resist in Large block and Low/Mid block is used for data storage. As a workaround you can flash empty s-record into desired area. 

  • Create new empty project for MPC5777C for flashing custom .srecord
  • Copy empty s-record (in attachment) into project folder. If you need different address range or s-record values - feel free modify attached python script and generate your own s-record. 
  • Open debug configuration and modify C/C++ Application to empty s-recordpastedImage_1.png
  • Add custom flash algorithm nxp_mpc5777c_1x32x64k_eeprom_highspeed.pcp via Debug -> Advanced Options. Scripts are lcated in [S32DS_INSTALL_DIR]\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.7.3.201803261737\win32\gdi\P&E\pastedImage_2.pngpastedImage_3.png
  • Start debug session. You can check if memory is rewritten properly (in this case I write zeroes to Low/Mid block): pastedImage_4.png
Labels (1)
Attachments
%3CLINGO-SUB%20id%3D%22lingo-sub-1123596%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHOWTO%3A%20MPC5777C%20-%20Low%2FMid%20Flash%20block%20erase%20via%20PE%20Micro%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1123596%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EPE%20Micro%20is%20not%20able%20erase%20unused%20FLASH%20block%20-%20typically%20if%20your%20application%20resist%20in%20Large%20block%20and%20Low%2FMid%20block%20is%20used%20for%20data%20storage.%20As%20a%20workaround%20you%20can%20flash%20empty%20s-record%20into%20desired%20area.%26nbsp%3B%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CUL%3E%3CLI%3ECreate%20new%20empty%20project%20for%20MPC5777C%20for%20flashing%20custom%20.srecord%3C%2FLI%3E%3CLI%3ECopy%20empty%20s-record%20(in%20attachment)%20into%20project%20folder.%20If%20you%20need%20different%20address%20range%20or%20s-record%20values%20-%20feel%20free%20modify%20attached%20python%20script%20and%20generate%20your%20own%20s-record.%26nbsp%3B%3C%2FLI%3E%3CLI%3EOpen%20debug%20configuration%20and%20modify%20C%2FC%2B%2B%20Application%20to%20empty%20s-record%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_1.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_1.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F28189i8CFD505DA12425A7%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_1.png%22%20alt%3D%22pastedImage_1.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3EAdd%20custom%20flash%20algorithm%20nxp_mpc5777c_1x32x64k_eeprom_highspeed.pcp%20via%20Debug%20-%26gt%3B%20Advanced%20Options.%20Scripts%20are%20lcated%20in%20%5BS32DS_INSTALL_DIR%5D%5Ceclipse%5Cplugins%5Ccom.pemicro.debug.gdbjtag.ppc_1.7.3.201803261737%5Cwin32%5Cgdi%5CP%26amp%3BE%5C%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_2.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_2.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F30439i826363DAA854A955%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_2.png%22%20alt%3D%22pastedImage_2.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_3.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_3.png%22%20style%3D%22width%3A%20362px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F30440i89BBC54181273E9D%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_3.png%22%20alt%3D%22pastedImage_3.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FLI%3E%3CLI%3EStart%20debug%20session.%20You%20can%20check%20if%20memory%20is%20rewritten%20properly%20(in%20this%20case%20I%20write%20zeroes%20to%20Low%2FMid%20block)%3A%26nbsp%3B%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_4.png%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22pastedImage_4.png%22%20style%3D%22width%3A%20812px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F30441iDE681580BC0D6749%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22pastedImage_4.png%22%20alt%3D%22pastedImage_4.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FLI%3E%3C%2FUL%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1123596%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EDebugging%20-%20Flash%20Programming%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
No ratings
Version history
Last update:
‎05-23-2018 07:04 AM
Updated by: