![]() |
STM32Cube
Version 2.0
Create Projects for STM32F2 Series with STM32Cube HAL and STM32CubeMX
|
The section Troubleshooting gives you hints for fixing issues that could occur when using STM32CubeMX.
There is no functionality implemented in the 'main' thread, but adding new peripherals with STM32CubeMX exceeds already the available stack for the 'main' thread. Is this correct?
The Cortex-M4 and Cortex-M7 implement an FPU and a context switch requires already significant stack space. In addition, the STM32Cube HAL uses structures that are allocated at the stack. Therefore, the recommended setting for the Main Thread stack size is 1024 bytes.
The application uses CMSIS-RTOS RTX but during execution it shows sporadic problems and sometimes stops working.
CMSIS-RTOS RTX requires that the System Tick Interrupt has the lowest priority. When working with 4-bit group priority, the setting for TICK_INT_PRIORITY should be 0x0F. Verify the section System Configuration in the file stm32fxxx_hal_conf.h. When using STM32CubeMX for configuration, refer to Add CMSIS-RTOS RTX for more information.
Certain components (mainly Board Support) already contain initialization code and do not require to be configured with STM32CubeMX. After adding such a component through the Run-Time Environment, the build process fails indicating undefined identifiers. Example:
The file stm32f7xx_hal_conf.h needs to be manually updated to enable the missing peripheral. Open the file in the editor and un-comment the module (in this case the UART module).
The CMSIS-RTOS RTX real-time operating system requires control of the SysTick_Handler function. Remove the function SysTick_Handler in the module stm32fxxx_it.c and add the code below to your project:
CMSIS-Driver implement their own interrupt service routines. However, STM32CubeMX adds interrupt service routines for the peripherals that are configured.
It is required to remove the interrupt service routine from the file stm32fxxx_it.c as shown below for the I2C interrupt handler.
The #define symbols DATA_IN_ExtSRAM and DATA_IN_ExtSDRAM configure the external memory bus interface in the CMSIS-CORE file system_stm32fxxx.c. Access to the external memory must be setup using these define symbols to ensure that the compiler initialization that executes before 'main' can access external (or off-chip) RAM.
This problem occurs when a project folder name contains a blank or space (' '). It is a known limitation of the current implementation and will be fixed in MDK v5.17.
STM32CubeMX may freeze after using the menu command Project - Generate Report and the button Open Folder.
Work-around: open the folder manually using the Windows Explorer.