Please enable JavaScript to view this site.

winIDEA Help

Version: 9.21.242

Navigation: Storage programming > How-to guides

Scroll Prev Top Next More

Erasing a specific Flash Memory region

In this topic:

Requirements

Python script example

Configuration steps

 

 

Introduction

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.

 

i-icon

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.

 

 

Requirements

winIDEA IDE 9.12 / 9.17 / 9.21

BlueBox

Active Probe / Debug Adapter

 

 

Python script example

Script should be used as a reference and changed according to the required operation. Use test_storage_erase.py script.

 

 

Configuration steps

To run the script in winIDEA, follow these steps:

 

number1

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

 

number2

Enable Flash programming in Hardware / Options / Programming for selected Flash device.

 

number3

Establish the Debug session.

Debug status must be STOP.

 

Number4

Select your Python script in Tools / External Scripts.

 

 

More resources

Python in winIDEA

isys::CStorageDeviceController - winIDEA SDK User's Guide

Copyright © 2024 TASKING Germany GmbH