Compilation Error with USB Keyboard Example on STM32 Nucleo F303K8 in Mbed
I've been trying to compile a simple USB Keyboard example for my STM32 Nucleo F303K8, following the guides from Mbed and Hackerspace NTNU.
My
main.cpp
file is as follows:
However, when I try to compile, I encounter this error:
The error presents itself in both the Mbed Online Compiler and locally using the PlatformIO plugin for VSCode. Surprisingly, excluding the USBDevice library from Mbed allows successful compilation of code in both IDEs.
Is there any information about why this occurrence is happening? Is it necessary for me to incorporate another library or dependency?Solution:Jump to solution
Hey @Sterling The error you're encountering, indicates that your USB Device library is missing necessary definitions for USB handling specific to your STM32 Nucleo F303K8. This kind of error usually occurs when the required USB HAL is not included or configured properly in your project.
Inorder to resolve this,ensure that your USB support is correctly set up in your Mbed environment, as the STM32F3 series requires specific configurations.And secondly,if you are using the older version of Mbed, try to update it to the latest version....
2 Replies
Solution
Hey @Sterling The error you're encountering, indicates that your USB Device library is missing necessary definitions for USB handling specific to your STM32 Nucleo F303K8. This kind of error usually occurs when the required USB HAL is not included or configured properly in your project.
Inorder to resolve this,ensure that your USB support is correctly set up in your Mbed environment, as the STM32F3 series requires specific configurations.And secondly,if you are using the older version of Mbed, try to update it to the latest version.
Alright man, I will get moving on this 🙏