- This topic has 1 reply, 2 voices, and was last updated 7 years, 12 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Home › Forums › Mastering STM32 book support forum › Issues with the importing cubeMX section
Dear Carmine,
Thank you for your hard work on this book, it has been an absolutely amazing recourse!
However, when I attempted to follow the instructions to import a cubeMX project into eclipse, I was not able to build the project.
1) The instructions are missing the information for importing the Inc and Src folder which contains the main function, stm32f4xx_hal_msp inits and the stm32f4xx_it file. This is also where all the code created by cubemx is, so it is crucial. I simply replaced the files in the eclipse include and src folders.
Then, once i built the project I got a whole lot of build errors…
For some reason the definition for HAL_StatusTypeDef was not present in the scope of the file, so I included stm32f4xxx_hal_def.h in the file.
Now the project succesfully builds, However once I programm it to the stm32f4disco board I am using, the debugger immediatly jumps to the hardwarefault handler…
Any ideas of what I could have done wrong/is not correct?
Thank you
Well, there are two things to check:
– Ensure that the macro identifying your STM32 MCU (e.g. STM32F401xE for an STM32F401RE MCU) is defined at project level.
– Ensure that the assembly file containing the vector table (startup_stm32xxxx.s) is added to your project, and rename the file extension from lower “s” to capital “S”.