STM32CubeIDE failed to download Segment[0] when code size reaches 50% of flash
I working with the stm32cubeide version 1.9.0, stlink-v3 debugger and the stm32l4r9 with 1M flash. Everything was going fine until the code size reached 128 sectors ( ~ 50% of the flash). I'm now getting the following error when I attempt to download and debug the application:
STMicroelectronics ST-LINK GDB server. Version 6.1.0
Copyright (c) 2022, 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
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
Debugger connected
Waiting for debugger connection...
-------------------------------------------------------------------
STM32CubeProgrammer v2.10.0
-------------------------------------------------------------------
Log output file: /tmp/STM32CubeProgrammer_ZLtEAK.log
ST-LINK SN : 005500333137511533333639
ST-LINK FW : V3J9M3B5S1
Board : STLINK-V3SET
Voltage : 3.35V
JTAG freq : 21333 KHz
Connect mode: Under Reset
Reset mode : Hardware reset
Device ID : 0x470
Revision ID : Rev W
Device name : STM32L4Rxxx/STM32L4Sxxx
Flash size : 1 MBytes
Device type : MCU
Device CPU : Cortex-M4
BL Version : --
Debug in Low Power mode enabled
Memory Programming ...
Opening and parsing file: ST-LINK_GDB_server_GjIRXM.srec
File : ST-LINK_GDB_server_GjIRXM.srec
Size : 512.24 KB
Address : 0x08000000
Erasing memory corresponding to segment 0:
Erasing internal memory sectors [0 128]
Download in Progress:
Error: failed to download Segment[0]
Error: failed to download the File
Note: If I reduce the code size to 126 sectors or less, then I can download debug as expected.
Any ideas
