2019-06-20 09:16 AM
Hello,
I'm working on a webcam like application using the stm32f4discovery (stm32f407vg mcu).
I've generated the the project with CubeMX following the indications in AN5052 (Digital camera interface (DCMI) for STM32 MCUs).
Once I compile it (it is a Makefile project) it ends up with undeclared symbols errors.
The first missing symbol is the one which defines the MCU (i.e. STM32F40_41xxx), which is weird since CubeMX is well aware of the MCU I'm using and it could define it for me. However, I can easily fix this by defining it. But then other five undeclared symbols appear: DCMI_ESCR_LSC_Pos, DCMI_ESCR_LEC_Pos, DCMI_ESCR_FEC_Pos, DCMI_CWSIZE_VLINE_Pos, DCMI_CWSTRT_VST_Pos.
So why are these symbols undefined? Are them supposed to be defined by me based on the camera specification? Is there anything wrong in the project settings?
2019-06-21 01:45 AM
So, it was the CubeMXF4 package broken (maybe because the 1.24.1 patch folder is named the same as the 1.24.0 "STM32Cube_FW_F4_V1.24.0"?). I downloaded and decompressed it manually and now those errors are gone......but another one appeared, now it is a conflicting types error...fixed it and a number of undefined reference error appear....
I recognize the hard work and the validity of the CubeMX tool, but the reliability have to be improved. If I develop a project from scratch, I have a clear picture of any component of the project, but if CubeMX is supposed to do it for me, it has to do it for real. Not do it with a number of problems that I have to go into the same level of detail as it was developed from scratch.
2019-06-21 02:18 AM
So it was the system_stm32f4xx.c
Now if I generate the project with CubeMX, then I fix the Makefile which have the -IDrivers/CMSIS/Include line doubled (see the code snippet)
C_INCLUDES = \
-IInc \
-IDrivers/STM32F4xx_HAL_Driver/Inc \
-IDrivers/STM32F4xx_HAL_Driver/Inc/Legacy \
-IDrivers/CMSIS/Device/ST/STM32F4xx/Include \
-IDrivers/CMSIS/Include
-IDrivers/CMSIS/Include
Then I change the system_stm32f4xx.c file with the one contained into: Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates it compiles with no error. Now I don't know if the code actually works, but at least it compiles the (almost) empty main().