Some problems with STM32Cube after updating software
- March 7, 2022
- 7 replies
- 4153 views
Hello,
I haven't used STM32Cube for a long time because I was busy with other things.
For software and hardware development I use STM32Cube under Linux and the board NUCLEO-H743ZI2 as hardware platform.
Since I wanted to create an project from scratch, I started with updates of the entire STM32Cube (STM32CubeIDE to 1.8.0 and the repositories to v1.9.1) before I started the project with the command "New STM32 Project from an Existing STM32CubeMX Configuration File (.ioc)". "ST-LINK" has also been updated to version "V3J9M3".
When setting up and editing the project, I proceeded as in the past.
1. Although I have activated and set up a SPI interfaces in the STM32CubeMX, which I called from the STM32CubeIDE, after generating code, the line '#include "spi.h"' is always missing in "main.c". I have to add it manually otherwise the compiler reports an error.
2. When debugging, the code always gets stuck in one of the hardware initialization calls: either in the procedure "SCB_EnableDCache()", "HAL_Init()" or others that follow them. If I go through these procedures step by step, the debugger sometimes doesn't hang. Even if I disable instruction and data cache in STM32CubeMX and regenerate the code, the debugger gets stuck in the "SystemClock_Config()" call in the line "if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)".
What is going wrong? Am I doing something wrong?
I am sending my IOC file in the attachment. Maybe someone can help me to find the error if I put one in there.
Thanks in advance,
Michael
