2021-05-19 03:37 PM
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
Solved! Go to Solution.
2021-05-20 05:59 AM
Attached notes may help
Paul
2021-05-20 05:59 AM
Attached notes may help
Paul
2021-05-20 06:00 AM
2021-05-20 03:00 PM
@Community member Thank you for the resources them, I am reviewing them and integrating that into my application.
2023-08-10 02:17 AM
Hi GJose,
How are you doing?
Are you able to finish the task?
I stuck in couple of issues. would you be able to help me?
I'm trying port STM32G071RB to STM32G0B1RE and need to change com layer to usb cdc from uart.
1. The example projects are working as expected but causing issues when I change Symbol to STM32G0B1xx instead STM32G071xx in STM32CubeIDE->Properties->Paths and Symbols tab. The reason I would need to change is to use USD DRD and its drives code. Here the SBSFU application loading from uart itsself failing and its triggering hard fault after loading UserApplication.
2024-11-19 11:36 PM
Hi, I am also working on the sbsfu on stm32l496, but the generated .bin and .sbf are not working. Can you help me out? It generates the .sbf and bin.