Debug Flash Script Overriding "Protect Internal Flash Memory Area" Settings

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

Debug Flash Script Overriding "Protect Internal Flash Memory Area" Settings

Jump to solution
233 Views
Avinpat123
Contributor II

Hi,

We are currently testing an application jump from App1 to App2 on the FRDM-S32K344.

Our application layout is:

  • App1 Start Address: 0x00400000

  • App2 Start Address: 0x00500000

For debugging, we are using separate debug configurations with flash memory protection enabled.

  • When debugging App1, the memory protection range is configured as:

    • 0x00500000 to 0x005FFFFF (to protect App2)

  • When debugging App2, the memory protection range is configured as:

    • 0x00400000 to 0x004FFFFF (to protect App1)

However, during programming through the debug configuration, we observe that the protected flash region is still being erased, even though the memory protection range has been configured.

Could anyone clarify the following?

  1. Is the Flash Programmer expected to honor the configured memory protection ranges during erase/program operations?

  2. Is there any additional configuration required to prevent the protected flash region from being erased?

  3. Has anyone successfully used memory protection to preserve another application while programming only one application on the FRDM-S32K344?

  4. Logs and LD files are attached for your ref.
  5. we are using on board PE debugger

Any guidance or recommendations would be greatly appreciated.

Thank you.

Avinpat123_1-1782731681359.pngAvinpat123_2-1782731701712.png

 

 

0 Kudos
Reply
1 Solution
161 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @Avinpat123 

 

I did quick test in the same version of S32 Design Studio to be sure it is working. I used the same setup – one application forced to 0x40_0000 while 0x50_0000 area is configured to be preserved and second application forced to 0x50_0000 while 0x40_0000 area is configured to be preserved:

lukaszadrapa_0-1782806057006.pnglukaszadrapa_1-1782806066832.png

 

Here are the logs which shows that this configuration is taken into account:

lukaszadrapa_2-1782806088016.png

 

lukaszadrapa_3-1782806099015.png

 

And I can see in the memory that the content is really preserved, so it works as expected.

 

I  saw in your screenshots that you configured the address range but the “Preserve this range” check box is not enabled. Isn’t that the problem?

lukaszadrapa_4-1782806120945.png

 

Regards,

Lukas

View solution in original post

0 Kudos
Reply
2 Replies
162 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi @Avinpat123 

 

I did quick test in the same version of S32 Design Studio to be sure it is working. I used the same setup – one application forced to 0x40_0000 while 0x50_0000 area is configured to be preserved and second application forced to 0x50_0000 while 0x40_0000 area is configured to be preserved:

lukaszadrapa_0-1782806057006.pnglukaszadrapa_1-1782806066832.png

 

Here are the logs which shows that this configuration is taken into account:

lukaszadrapa_2-1782806088016.png

 

lukaszadrapa_3-1782806099015.png

 

And I can see in the memory that the content is really preserved, so it works as expected.

 

I  saw in your screenshots that you configured the address range but the “Preserve this range” check box is not enabled. Isn’t that the problem?

lukaszadrapa_4-1782806120945.png

 

Regards,

Lukas

0 Kudos
Reply
100 Views
Avinpat123
Contributor II

Hi @ lukaszadrapa 
Thanks for the reply yes as you told check box was the issue now it is working fine

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2387729%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EDebug%20Flash%20Script%20Overriding%20%22Protect%20Internal%20Flash%20Memory%20Area%22%20Settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2387729%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EWe%20are%20currently%20testing%20an%20application%20jump%20from%20%3CSTRONG%3EApp1%3C%2FSTRONG%3E%20to%20%3CSTRONG%3EApp2%3C%2FSTRONG%3E%20on%20the%20%3CSTRONG%3EFRDM-S32K344%3C%2FSTRONG%3E.%3C%2FP%3E%3CP%3EOur%20application%20layout%20is%3A%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%3E%3CSTRONG%3EApp1%20Start%20Address%3A%3C%2FSTRONG%3E%200x00400000%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3E%3CSTRONG%3EApp2%20Start%20Address%3A%3C%2FSTRONG%3E%200x00500000%3C%2FP%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3EFor%20debugging%2C%20we%20are%20using%20separate%20debug%20configurations%20with%20flash%20memory%20protection%20enabled.%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%3EWhen%20debugging%20%3CSTRONG%3EApp1%3C%2FSTRONG%3E%2C%20the%20memory%20protection%20range%20is%20configured%20as%3A%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%3E0x00500000%20to%200x005FFFFF%20(to%20protect%20App2)%3C%2FP%3E%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3CLI%3E%3CP%3EWhen%20debugging%20%3CSTRONG%3EApp2%3C%2FSTRONG%3E%2C%20the%20memory%20protection%20range%20is%20configured%20as%3A%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%3E0x00400000%20to%200x004FFFFF%20(to%20protect%20App1)%3C%2FP%3E%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3EHowever%2C%20during%20programming%20through%20the%20debug%20configuration%2C%20we%20observe%20that%20the%20protected%20flash%20region%20is%20still%20being%20erased%2C%20even%20though%20the%20memory%20protection%20range%20has%20been%20configured.%3C%2FP%3E%3CP%3ECould%20anyone%20clarify%20the%20following%3F%3C%2FP%3E%3COL%3E%3CLI%3E%3CP%3EIs%20the%20Flash%20Programmer%20expected%20to%20honor%20the%20configured%20memory%20protection%20ranges%20during%20erase%2Fprogram%20operations%3F%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EIs%20there%20any%20additional%20configuration%20required%20to%20prevent%20the%20protected%20flash%20region%20from%20being%20erased%3F%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EHas%20anyone%20successfully%20used%20memory%20protection%20to%20preserve%20another%20application%20while%20programming%20only%20one%20application%20on%20the%20FRDM-S32K344%3F%3C%2FP%3E%3C%2FLI%3E%3CLI%3ELogs%20and%20LD%20files%20are%20attached%20for%20your%20ref.%3C%2FLI%3E%3CLI%3Ewe%20are%20using%20on%20board%20PE%20debugger%3C%2FLI%3E%3C%2FOL%3E%3CP%3EAny%20guidance%20or%20recommendations%20would%20be%20greatly%20appreciated.%3C%2FP%3E%3CP%3EThank%20you.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Avinpat123_1-1782731681359.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Avinpat123_1-1782731681359.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Avinpat123_1-1782731681359.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F390588i8BE80DC37F58641A%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Avinpat123_1-1782731681359.png%22%20alt%3D%22Avinpat123_1-1782731681359.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Avinpat123_2-1782731701712.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Avinpat123_2-1782731701712.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Avinpat123_2-1782731701712.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F390589i08674831AD3AF807%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Avinpat123_2-1782731701712.png%22%20alt%3D%22Avinpat123_2-1782731701712.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2388151%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Debug%20Flash%20Script%20Overriding%20%22Protect%20Internal%20Flash%20Memory%20Area%22%20Settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2388151%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F252395%22%20target%3D%22_blank%22%3E%40Avinpat123%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EI%20did%20quick%20test%20in%20the%20same%20version%20of%20S32%20Design%20Studio%20to%20be%20sure%20it%20is%20working.%20I%20used%20the%20same%20setup%20%E2%80%93%20one%20application%20forced%20to%200x40_0000%20while%200x50_0000%20area%20is%20configured%20to%20be%20preserved%20and%20second%20application%20forced%20to%200x50_0000%20while%200x40_0000%20area%20is%20configured%20to%20be%20preserved%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22lukaszadrapa_0-1782806057006.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22lukaszadrapa_0-1782806057006.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22lukaszadrapa_0-1782806057006.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F390688i6D1D79243FB6D4FF%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22lukaszadrapa_0-1782806057006.png%22%20alt%3D%22lukaszadrapa_0-1782806057006.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22lukaszadrapa_1-1782806066832.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22lukaszadrapa_1-1782806066832.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22lukaszadrapa_1-1782806066832.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F390689i5C5C6D45A01B8C8B%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22lukaszadrapa_1-1782806066832.png%22%20alt%3D%22lukaszadrapa_1-1782806066832.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EHere%20are%20the%20logs%20which%20shows%20that%20this%20configuration%20is%20taken%20into%20account%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22lukaszadrapa_2-1782806088016.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22lukaszadrapa_2-1782806088016.png%22%20style%3D%22width%3A%20367px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22lukaszadrapa_2-1782806088016.png%22%20style%3D%22width%3A%20367px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F390690i77E4540AB7F99749%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22lukaszadrapa_2-1782806088016.png%22%20alt%3D%22lukaszadrapa_2-1782806088016.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22lukaszadrapa_3-1782806099015.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22lukaszadrapa_3-1782806099015.png%22%20style%3D%22width%3A%20364px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22lukaszadrapa_3-1782806099015.png%22%20style%3D%22width%3A%20364px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F390691iED0C2AF5DBCAD5CF%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22lukaszadrapa_3-1782806099015.png%22%20alt%3D%22lukaszadrapa_3-1782806099015.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EAnd%20I%20can%20see%20in%20the%20memory%20that%20the%20content%20is%20really%20preserved%2C%20so%20it%20works%20as%20expected.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EI%26nbsp%3B%20saw%20in%20your%20screenshots%20that%20you%20configured%20the%20address%20range%20but%20the%20%E2%80%9CPreserve%20this%20range%E2%80%9D%20check%20box%20is%20not%20enabled.%20Isn%E2%80%99t%20that%20the%20problem%3F%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22lukaszadrapa_4-1782806120945.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22lukaszadrapa_4-1782806120945.png%22%20style%3D%22width%3A%20260px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22lukaszadrapa_4-1782806120945.png%22%20style%3D%22width%3A%20260px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F390692i0B9B1AF2F855B0C9%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22lukaszadrapa_4-1782806120945.png%22%20alt%3D%22lukaszadrapa_4-1782806120945.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3ELukas%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2388763%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20Debug%20Flash%20Script%20Overriding%20%22Protect%20Internal%20Flash%20Memory%20Area%22%20Settings%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2388763%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%40%26nbsp%3Blukaszadrapa%26nbsp%3B%3CBR%20%2F%3EThanks%20for%20the%20reply%20yes%20as%20you%20told%20check%20box%20was%20the%20issue%20now%20it%20is%20working%20fine%3C%2FP%3E%3C%2FLINGO-BODY%3E