cancel
Showing results for 
Search instead for 
Did you mean: 

stm32cubeide : debug launch fails on LOAD, file not specified

Stm32User
Associate II

Windows 10, stm32cubeide V1.1.0, Segger J-Trace

I tried to port a working TrueStudio V9.2.0 project into stm32cubeide V1.1.0 but this didn't work so I created a blank project and copied in all the source files and setup.

Some of the setup screens for the debug configuration have changed

This is the original debug init commands from the working TS project.

# Default GDB command file (FLASH) for SEGGER J-LINK and STMicroelectronics STM32L071RZ microcontroller.

#Set RTT Addr

#eval "monitor exec SetRTTAddr %p",&_SEGGER_RTT

# Set character encoding

set host-charset CP1252

set target-charset CP1252

# Set JTAG speed to 30 kHz

monitor speed 30

# Set GDBServer to little endian

monitor endian little

# Reset the chip to get to a known state.

monitor reset

# Set auto JTAG speed

monitor speed auto

# Setup GDB FOR FASTER DOWNLOADS

set remote memory-write-packet-size 1024

set remote memory-write-packet-size fixed

# Enable flash download

monitor flash download = 1

# Load the program executable

load 

 I get errors on all commented lines so I removed the comments and edited to this

set host-charset CP1252

set target-charset CP1252

monitor speed 30

monitor endian little

monitor reset

monitor speed auto

set remote memory-write-packet-size 1024

set remote memory-write-packet-size fixed

monitor flash download = 1

load 

I now get one error on the load

0690X00000AqXNgQAN.jpg

My debug configuration is as follows

0690X00000AqXOoQAN.jpg

0690X00000AqXP8QAN.jpg

0690X00000AqXPNQA3.jpg

0690X00000AqXPmQAN.jpg

The file SLX_LOGGER.elf is present in the DEBUG sub folder but for some reason it cannot load this file. This project works in TrueStudio.

Any ideas ?

3 REPLIES 3
SChri.1795
Associate II

Check your log file in the debug console. Look for the STM32CubeProgrammer v2.2.0

heading.

Below that heading I have an issue where the ST-Link can not read the DevID of the attached board:

Connect mode: Under Reset

Reset mode : Hardware reset

Cannot identify the device

Error: unknown or unsupported device (DevID = 0x0000)

Just to verify that you do not have the same issue as I have reported on MAC's

Stm32User
Associate II

I have moved on a stage.

The path and .elf file name are not being passed for some reason, even though they are setup in the debug config tabs above.

if I add the following debug init command, the file is loaded into the target and the target is reset...

-file-exec-and-symbols Debug/ SLX_LOGGER.elf

...however the launch only reaches 93% and the RESUME button is grayed out.

To fix this I needed to uncheck RESUME in RUNTIME OPTIONS in the debug config.

My program now runs but only one thread is running. Also it seems to bomb out with an error "failed to find bounds of function"

I have noticed that the TARGET section of the PROJECT PROPERTIES COMPILER has been removed. The instruction set is set to THUMB instead of THUMB2 and I have no idea of the ENDIANESS. These controls don't seem to be there now.

Anyone ?

I am wondering if this stuff is supposed to be setup from CUBE. Which is fine if your starting afresh. But if you already have a project ?

I would not let that tool near a mature project.

Stm32User
Associate II

I have got this working now, basically by generating a cube blank project.

The new IDE generates an XML file called PROJECTNAME Debug.launch

I copied this file into my real project and edited some paths and it works reliably.

I still have the problem that only the IDLE thread is displayed in the DEBUG window. My hardware is running properly so all threads are running.

What is the procedure for adding thread awareness to this IDE ? I am using SEGGER.