Please enable JavaScript to view this site.

winIDEA Help

Version: 9.21.239

Navigation: Storage programming > How-to guides

Scroll Prev Top Next More

Erasing a specific Flash Memory region

In this topic:



Python script example



This topic describes how to erase a part of a Flash memory with a Python script.




winIDEA IDE 9.12 / 9.17 / 9.21


Active Probe / Debug Adapter




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.



Python script example

Script should be used as a reference and changed according to the required operation. Use 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.



More resources

Python in winIDEA

isys::CStorageDeviceController - winIDEA SDK Documentation

Copyright © 2024 TASKING Germany GmbH