2026-05-01 2:08 PM
Hello, I am following this guide:
How to integrate TouchGFX and camera middleware on an STM32N6570-DK
and seem to be getting an I2C1 undefined reference (below). Is there something I need to change? I have I2C2 enabled in my .ioc, but don't see anything about enabling I2C1
C:/TouchGFXProjects/VisionControlboard/STM32CubeIDE/Appli/Debug/../Middlewares/stm32-mw-camera/cmw_camera_customized.c:1951:(.text.CMW_CAMERA_IMX335_Init+0x144): undefined reference to `BSP_I2C1_Init'
C:/ST/STM32CubeIDE_2.0.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/TouchGFXProjects/VisionControlboard/STM32CubeIDE/Appli/Debug/../Middlewares/stm32-mw-camera/cmw_camera_customized.c:1951:(.text.CMW_CAMERA_IMX335_Init+0x148): undefined reference to `BSP_I2C1_DeInit'
C:/ST/STM32CubeIDE_2.0.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/TouchGFXProjects/VisionControlboard/STM32CubeIDE/Appli/Debug/../Middlewares/stm32-mw-camera/cmw_camera_customized.c:1951:(.text.CMW_CAMERA_IMX335_Init+0x14c): undefined reference to `BSP_I2C1_ReadReg16'
C:/ST/STM32CubeIDE_2.0.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/TouchGFXProjects/VisionControlboard/STM32CubeIDE/Appli/Debug/../Middlewares/stm32-mw-camera/cmw_camera_customized.c:1951:(.text.CMW_CAMERA_IMX335_Init+0x150): undefined reference to `BSP_I2C1_WriteReg16'
C:/ST/STM32CubeIDE_2.0.0/STM32CubeIDE/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.14.3.rel1.win32_1.0.100.202602081740/tools/bin/../lib/gcc/arm-none-eabi/14.3.1/../../../../arm-none-eabi/bin/ld.exe: C:/TouchGFXProjects/VisionControlboard/STM32CubeIDE/Appli/Debug/../Middlewares/stm32-mw-camera/cmw_camera_customized.c:1951:(.text.CMW_CAMERA_IMX335_Init+0x154): undefined reference to `BSP_GetTick'
Thank you
Solved! Go to Solution.
2026-05-04 4:23 AM
Dear Coccarbine,
From your log, I can see that the build completed successfully. The issue you are experiencing appears to be related to the linker, which indicates that it can see the function declarations but cannot find their definitions.
Also, the article does not include any I2C configuration in STM32CubeMX, since the camera middleware uses the I2C support provided by the BSP. Therefore, please make sure that you have completed the step of importing the required file into you STM32CubeIDE project tree, stm32n6570_discovery_bus.c, as shown in the screenshot down below.
Best regards,
Oumaima
T.O.M.A.S – Technically Oriented Microcontrollers Application Support
2026-05-04 4:23 AM
Dear Coccarbine,
From your log, I can see that the build completed successfully. The issue you are experiencing appears to be related to the linker, which indicates that it can see the function declarations but cannot find their definitions.
Also, the article does not include any I2C configuration in STM32CubeMX, since the camera middleware uses the I2C support provided by the BSP. Therefore, please make sure that you have completed the step of importing the required file into you STM32CubeIDE project tree, stm32n6570_discovery_bus.c, as shown in the screenshot down below.
Best regards,
Oumaima
T.O.M.A.S – Technically Oriented Microcontrollers Application Support
2026-05-15 2:52 PM - edited 2026-05-15 2:54 PM
Hi Oumaima,
Thank you for your assistance; I discovered that I had the BSP included improperly.
I was also wondering if you have come across a black camera feed - I have gone through this guide twice, and both times after I program the FSBL, Appli, and assets I seem to get only a black camera feed. There are no build errors, and I have verified the camera works using a different example template.
Thank you,
Ed
2026-05-18 2:42 AM
Dear Ed,
Are you sure that you have enabled the RIF for the DCMIPP peripheral in the .ioc file?
Otherwise, if the issue persists, could you please check the debug session and identify exactly where the code is getting stuck? Knowing the precise point would help us a lot.
Finally, if possible, please share your project so I can test it on our side and get back to you as soon as the issue is resolved.
Best regards,
Oumaima
2026-05-18 3:01 PM
Hi Oumaima,
I verified RIF for DCMIPP is enabled. I was able to debug the Camera thread in the Appli, but I did not see any errors that were obvious. I will keep looking at it. Please see link below for my current project.
https://app.box.com/s/zaf5m05bsy70pxiq8alrkeqr1q1mfb7g
Kind regards,
Ed