2383869_en-US

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

2383869_en-US

2383869_en-US

How to Disable Mass Erase on the FRDM-A-S32K344

have created two applications for the FRDM-A-S32K344. One application is located at address 0x00400000, and the other is located at address 0x00500000.

When I flash one of the applications using the onboard debugger, it performs a mass erase and removes the other application as well.

How can I disable mass erase and configure the debugger to erase only a specific flash region or section during programming?

ganavi1_0-1782105971120.png


Re: How to Disable Mass Erase on the FRDM-A-S32K344

Hello,

OK, So you are able to load both binaries at once successfully.

But, you didn't mention that you will use bootloader.

What you actually want
Reset → Bootloader runs → wait for SW2 → jump to App
 

When using Launch Group in S32DS, each debug configuration loads its ELF and the last one determines the current PC. Therefore, the application entry point overrides the bootloader, causing it to be skipped.

To ensure correct bootloader execution, use a single debug configuration that loads both images but starts execution from the bootloader reset vector. Also disable “Run to main” to avoid skipping startup code.

After a real reset the S32K3 always starts execution from the predefined boot address (internal flash at 0x00400000), and the first valid image (typically your bootloader) is executed.

However, during debugging with S32DS, this behavior can be overridden by the debugger, which may set the program counter to the application entry point after loading ELF files, effectively bypassing the bootloader.

Best regards,

Peter

Re: How to Disable Mass Erase on the FRDM-A-S32K344

Hello,

Thank you for the suggestion.

I created a Launch Group and added both the Bootloader and Application ELF debug configurations. However, when I start the debug session, it appears that only the application code is running, and the bootloader execution is being bypassed. My requirement is for the bootloader to execute first after reset and then jump to the application only when SW2 is pressed.

Could you please advise if there are any additional Launch Group settings or debugger configurations required to ensure the bootloader runs before the application?

I am using on board debugger in FRDM-A-S32K344

ganavi1_0-1782121473794.png


Re: How to Disable Mass Erase on the FRDM-A-S32K344

Hello,

In Debug Configurations, you can create a Launch Group and simply add all the ELF files you want to load. This lets you load multiple images (e.g. bootloader + application) in one go.

Best regards,

Peter

Re: How to Disable Mass Erase on the FRDM-A-S32K344

Hello

Can you explain how to configure S32DS so that both ELF files are loaded, but the PC is set to the bootloader Reset_Handler at 0x00400000 instead of the application entry point? 

Tags (1)
No ratings
Version history
Last update:
3 hours ago
Updated by: