cancel
Showing results for 
Search instead for 
Did you mean: 

Can't run basic example in CubeIDE on Mac OS Error: failed to erase memory - Encountered Error when

Hello,

I'm trying to run an example in CubeIDE 1.13.1, but receive the following error. Strangely, executing that binary from the command line in terminal does work...

 

STMicroelectronics ST-LINK GDB server. Version 7.4.0

Copyright (c) 2023, STMicroelectronics. All rights reserved.

 

Starting server with the following options:

Persistent Mode : Disabled

Logging Level : 1

Listen Port Number : 61234

Status Refresh Delay : 15s

Verbose Mode : Disabled

SWD Debug : Enabled

InitWhile : Enabled

 

Waiting for debugger connection...

Debugger connected

Waiting for debugger connection...

Debugger connected

Waiting for debugger connection...

-------------------------------------------------------------------

STM32CubeProgrammer v2.14.0

-------------------------------------------------------------------

 

 

 

Log output file: /tmp/STM32CubeProgrammer_932A7A.log

ST-LINK SN : 066EFF525282494867242444

ST-LINK FW : V2J42M27

Board : NUCLEO-F446RE

Voltage : 3.25V

SWD freq : 4000 KHz

Connect mode: Under Reset

Reset mode : Hardware reset

Device ID : 0x421

Revision ID : Rev A

Device name : STM32F446xx

Flash size : 512 KBytes (default)

Device type : MCU

Device CPU : Cortex-M4

BL Version : 0x0

 

 

 

Memory Programming ...

Opening and parsing file: ST-LINK_GDB_server_hAMQNL.srec

File : ST-LINK_GDB_server_hAMQNL.srec

Size : 398.77 KB

Address : 0x08000000

 

 

Erasing memory corresponding to segment 0:

Error: failed to erase memory

 

 

Error: failed to erase memory

Encountered Error when opening /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.macos64_2.1.0.202305091550/tools/bin/STM32_Programmer_CLI

Error in STM32CubeProgrammer

Shutting down...

Exit.

 

1 ACCEPTED SOLUTION

Accepted Solutions

So this actually ended up being that the board was previously used and returned to Mouser...
All write protect bits were set... SPRMOD was also changed from the default. Opening up STM32Prog and resetting things from there worked and the board can now be flashed.

View solution in original post

2 REPLIES 2
RhSilicon
Lead

Try version 1.12.1

So this actually ended up being that the board was previously used and returned to Mouser...
All write protect bits were set... SPRMOD was also changed from the default. Opening up STM32Prog and resetting things from there worked and the board can now be flashed.