STM32L496ZG-NUCLEO-144 X-CUBE-SBSFU using USB_OTG_FS Virtual Com Port instead of YMODEM over UART
Hello everyone,
Thank you for clicking this post. I am new to the community and ecosystem. Here's my task, I am trying to use the X-CUBE-SBSFU libraries to perform a secure firmware update procedure. I am using the STM32L496ZG-NUCLEO-144 board to test before applying it to our hardware.
There exists the 32L496G discovery project in the XCUBE-SBSFU example projects. I was able to flash the NUCELO board with this and use the project over UART and an FTDI to usb serial adaptor. Great.
Now I want to rewrite the communication layer in the SBSFU example to use the USB_OTG_FS virtual com port using the USB CDC libraries instead of UART.
I have an example project build with the ".ioc" graphical tool where I can successfully print hello world over the virtual com port. I noticed some Middlewares/ST/STM32_USB_Device_Library and USB_DEVICE folders in the hello world project so I copied them into the SBSFU application folder.
I also selected project->properties->MCU GCC Compiler and added the following to the include paths:
"${workspace_loc:/${ProjName}/USB_DEVICE/App}"
"${workspace_loc:/${ProjName}/USB_DEVICE/Target}"
"${workspace_loc:/${ProjName}/Middlewares/ST/STM32_USB_Device_Library/Core/Inc}"
"${workspace_loc:/${ProjName}/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc}"
So that the files and folders I copied into the SBSFU project are linked.
Then I got an error that some PCD calls were not working so I edited the stm32l4xx_hal_conf.h file to include "#define HAL_PCD_MODULE_ENABLED"
I still am getting the following error:
/Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.9-2020-q2-update.macos64_1.5.0.202011040924/tools/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld: USB_DEVICE/Target/usbd_conf.o: in function `USBD_LL_Transmit
/Downloads/STM32CubeExpansion_SBSFU_V2.4.0/Projects/32L496GDISCOVERY/Applications/2_Images/2_Images_SBSFU/SW4STM32/STM32L496G-Discovery_2_Images_SBSFU/Debug/../USB_DEVICE/Target/usbd_conf.c:750: undefined reference to `HAL_PCD_EP_Transmit'
One thing I have noticed is in my 2_Image_SBSFU project, under Drivers/STM32L4XX_HAL_Driver the stm32l4xx_hal_pcd.c files are not showing up.
Any help or guidance would be greatly appreciated.
Thanks
