How to erase a specific Flash Memory region
In this topic:
This topic describes how to erase a part of a Flash memory with a Python script. Erasing just a portion of a Flash memory device can be achieved with a Python script via winIDEA SDK.
The granularity of the erased section depends on the target device. The smallest size of Flash memory that can be erased is defined with the Flash sector size. To get accurate information about sector sizes of your Flash device, refer to the microcontroller or Flash reference manual. |
•winIDEA IDE 9.12 / 9.17 / 9.21
•BlueBox
•Active Probe / Debug Adapter
Script should be used as a reference and changed according to the required operation. Use test_storage_erase.py script.
To run the script in winIDEA, follow these steps:
Modify the script according to the required configuration and save it in the same folder as winIDEA workspace. |
The Flash device name should be the same as it is displayed in the Hardware menu. Example: ST STM32H7xxxl_2048KB
Enable Flash programming in Hardware | Options | Programming for selected Flash device. |
Establish the Debug session. |
Debug status must be STOP.
Select your Python script in Tools | External Scripts. |
•isys::CStorageDeviceController - winIDEA SDK User's Guide