2025-02-06 02:57 AM
Issue Description
I am experiencing a debugging issue with a project generated using TouchGFX Designer 4.24.2 for STM32H7B3I-DK, running on STM32CubeIDE 1.17.0. When I attempt to start debugging, I get the following error:
Failed to execute MI command:
load C:\TouchGFXProjects\Test01\STM32CubeIDE\Debug\STM32CubeIDE.elf
Error message from debugger back end: Load failed
Tests Performed
Flashing and debugging function properly.
Observations
Questions
Any help or suggestions would be greatly appreciated.
Solved! Go to Solution.
2025-02-06 07:18 AM - edited 2025-02-06 08:43 AM
# Issue Resolved: Debugging & Graphical Corruption in TouchGFX with STM32H7B3I-DK
I encountered an issue when debugging a TouchGFX project for the **STM32H7B3I-DK** using **STM32CubeIDE 1.17.0** and **TouchGFX Designer 4.24.2**. Initially, when launching the project from **TouchGFX Designer**, the debugger failed to load the `.elf` file, and when flashing the `.hex`, the application would run, but the **graphics were corrupted**.
---
## Solution
### 1. Modify the Linker File (`STM32H7B3LIHXQ_FLASH.ld`)
- I changed the memory sections for:
- `FontFlashSection`
- `TextFlashSection`
- These were originally set to `OSPI`, and I changed them to `FLASH`.
- This ensures that assets are stored in the **internal flash** instead of external **OSPI** memory.
### 2. Update TouchGFX Designer Settings
- Previously, in **Default Image Configuration**, the **Section** and **Extra Section** were set to `ExtFlashSection`.
- I changed both to `IntFlashSection`.
---
## Results
- Debugging now works properly in STM32CubeIDE.
- The graphical corruption issue is completely resolved.
- The application runs as expected on the STM32H7B3I-DK.
---
## Recommendations
If anyone else encounters similar issues, I recommend:
- Checking the **memory mappings** in the linker script.
- Ensuring **TouchGFX assets** are stored in the correct flash memory.
Hope this helps!
2025-02-06 07:18 AM - edited 2025-02-06 08:43 AM
# Issue Resolved: Debugging & Graphical Corruption in TouchGFX with STM32H7B3I-DK
I encountered an issue when debugging a TouchGFX project for the **STM32H7B3I-DK** using **STM32CubeIDE 1.17.0** and **TouchGFX Designer 4.24.2**. Initially, when launching the project from **TouchGFX Designer**, the debugger failed to load the `.elf` file, and when flashing the `.hex`, the application would run, but the **graphics were corrupted**.
---
## Solution
### 1. Modify the Linker File (`STM32H7B3LIHXQ_FLASH.ld`)
- I changed the memory sections for:
- `FontFlashSection`
- `TextFlashSection`
- These were originally set to `OSPI`, and I changed them to `FLASH`.
- This ensures that assets are stored in the **internal flash** instead of external **OSPI** memory.
### 2. Update TouchGFX Designer Settings
- Previously, in **Default Image Configuration**, the **Section** and **Extra Section** were set to `ExtFlashSection`.
- I changed both to `IntFlashSection`.
---
## Results
- Debugging now works properly in STM32CubeIDE.
- The graphical corruption issue is completely resolved.
- The application runs as expected on the STM32H7B3I-DK.
---
## Recommendations
If anyone else encounters similar issues, I recommend:
- Checking the **memory mappings** in the linker script.
- Ensuring **TouchGFX assets** are stored in the correct flash memory.
Hope this helps!