Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 5 months ago.
Getting started with mbed-STM32F103C8T6
Hello,
I tried to compile this example:
https://developer.mbed.org/users/hudakz/code/STM32F103C8T6_Hello
but get a lot of compilation errors: Error: Class "RCC_OscInitTypeDef" has no member "HSEPredivValue" in "mbed-STM32F103C8T6/SysClockConf.cpp", Line: 37, Col: 24 Error: Identifier "RCC_HSE_PREDIV_DIV1" is undefined in "mbed-STM32F103C8T6/SysClockConf.cpp", Line: 37, Col: 41 Error: Class "RCC_PLLInitTypeDef" has no member "PLLMUL" in "mbed-STM32F103C8T6/SysClockConf.cpp", Line: 40, Col: 28 Error: Identifier "RCC_PLL_MUL9" is undefined in "mbed-STM32F103C8T6/SysClockConf.cpp", Line: 40, Col: 37 Error: Identifier "RCC_ADCPCLK2_DIV6" is undefined in "mbed-STM32F103C8T6/SysClockConf.cpp", Line: 61, Col: 40 Error: Identifier "RCC_USBCLKSOURCE_PLL_DIV1_5" is undefined in "mbed-STM32F103C8T6/SysClockConf.cpp", Line: 62, Col: 40 Info: Unable to download. Fix the reported errors...
Can anyone give mit a hint what I make wrong.
Thanks, Peter
2 Answers
7 years, 5 months ago.
Hello Peter,
Try to update the mbed
library (right click on the 'mbed' item and then select 'Update...'
in the popup menu) in your project and then compile. If it doesn't help repeat the same thing for the mbed-STM32F103C8T6
library.
Hello Zoltan,
I updated. Now I have this errors:
Error: Class "RCC_OscInitTypeDef" has no member "HSEPredivValue" in "mbed-STM32F103C8T6/SysClockConf.cpp", Line: 39, Col: 24 Error: Identifier "RCC_HSE_PREDIV_DIV1" is undefined in "mbed-STM32F103C8T6/SysClockConf.cpp", Line: 39, Col: 41 Error: Class "RCC_PLLInitTypeDef" has no member "PLLMUL" in "mbed-STM32F103C8T6/SysClockConf.cpp", Line: 42, Col: 28 Error: Identifier "RCC_PLL_MUL9" is undefined in "mbed-STM32F103C8T6/SysClockConf.cpp", Line: 42, Col: 37 Error: Identifier "RCC_ADCPCLK2_DIV6" is undefined in "mbed-STM32F103C8T6/SysClockConf.cpp", Line: 51, Col: 40 Error: Identifier "RCC_USBCLKSOURCE_PLL_DIV1_5" is undefined in "mbed-STM32F103C8T6/SysClockConf.cpp", Line: 52, Col: 40 Info: Unable to download. Fix the reported errors...
What can I do?
Best regards, Peter
posted by 30 Jun 2017Hello Peter,
It seems that you haven't added the NUCLEO-F103RB board to your targets yet. To fix this, open the project in the online compiler and check the button located in the top-right corner. Most likely it says NUCLEO-L432KC (the only platform indicated on your profile page at the present). Click on that button and then in the popup menu click on Add platform. A new page opens listing all supported mbed boards. Click on the NUCLEO-F103RB board. Once the specification page is opened, click on the orange button Add to your mbed compiler located on the right side. Then go back to your compiler page and click again on the "NUCLEO-L432KC" button (located in the top-right corner). This time the popup menu should offer your also the NUCLEO-F103RB board. So select that and to confirm, click on the Select platform button located in top-right corner. Now repeat the compilation for this target board. It should work fine.
Hello Zoltan, this was the right hint. Now I can compile. Thanks!
Is there a way to put the "standard" mbed boot loader on the board to allow updating the user app via usb file system?
Alternatively can you recommend a basic IDE which allows debugging, running on Linux and where the exported software can be directly used? What would be your first option?
Thanks, Peter
posted by 04 Jul 2017Hello Peter,
Devan Lai has done a good job to support STM32F103C8T6's easy firmware upload:
https://developer.mbed.org/users/devanlai/code/USBDevice_STM32F103/
https://developer.mbed.org/users/devanlai/code/STM32F103C8T6_WebUSBDFU/
The following link could be of help to choose an offline IDE :
https://developer.mbed.org/questions/76831/Offline-CompileDebugger-Best-free-soluti/
Zoltan
posted by 09 Jul 20175 years, 12 months ago.
If you, like me encountered this thread after googling the error:
an error
Error: Class "RCC_OscInitTypeDef" has no member "HSEPredivValue" in "mbed-STM32F103C8T6/SysClockConf.cpp", Line: 39, Col: 24
Then it's likely you don't have the correct target board set. You must have the Nucleo-F103RB set as the target.
It currently shows this in the top right of the web IDE, It should look like this: