Error compiling simple blink sketch for stm32

Post here first, or if you can't find a relevant section!
Post Reply
theodosis
Posts: 2
Joined: Wed Oct 07, 2020 3:15 pm

Error compiling simple blink sketch for stm32

Post by theodosis »

Greetings to the team. It is my first time posting here, as well as my first time I am trying to leave arduino boards behind.
I am trying to troubleshoot a black pill board with stm32f103c8 chip on it.
After I uploaded the HID 2.2.2 bootloader provided in the following link https://github.com/Serasidis/STM32_HID_ ... r/releases
I installed the stm32 boards package with arduino board manager.
As soon as I try to compile anything Ii get the following error message:

Arduino: 1.8.13 (Windows 7), Board: "Generic STM32F1 series, BluePill F103C6 (32K), STM32CubeProgrammer (SWD), Enabled (generic 'Serial'), None, Low/Full Speed, Smallest (-Os default), Newlib Nano (default)"


C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\ProgramData\MATLAB\SupportPackages\R2018b\3P.instrset\arduinoide.instrset\idepkgs\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\ProgramData\MATLAB\SupportPackages\R2018b\3P.instrset\arduinoide.instrset\idepkgs\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\theodosis\Documents\Arduino\libraries -fqbn=STM32:stm32:GenF1:pnum=BLUEPILL_F103C6,upload_method=swdMethod,xserial=generic,usb=none,xusb=FS,opt=osstd,rtlib=nano -ide-version=10813 -build-path C:\Users\theodosis\AppData\Local\Temp\ArduinoServer\MW -warnings=none -build-cache C:\Users\THEODO~1\AppData\Local\Temp\arduino_cache_151583 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.xpack-arm-none-eabi-gcc.path=C:\ProgramData\MATLAB\SupportPackages\R2018b\3P.instrset\arduinoide.instrset\idepkgs\packages\STM32\tools\xpack-arm-none-eabi-gcc\9.2.1-1.1 -prefs=runtime.tools.xpack-arm-none-eabi-gcc-9.2.1-1.1.path=C:\ProgramData\MATLAB\SupportPackages\R2018b\3P.instrset\arduinoide.instrset\idepkgs\packages\STM32\tools\xpack-arm-none-eabi-gcc\9.2.1-1.1 -prefs=runtime.tools.STM32Tools.path=C:\ProgramData\MATLAB\SupportPackages\R2018b\3P.instrset\arduinoide.instrset\idepkgs\packages\STM32\tools\STM32Tools\1.4.0 -prefs=runtime.tools.STM32Tools-1.4.0.path=C:\ProgramData\MATLAB\SupportPackages\R2018b\3P.instrset\arduinoide.instrset\idepkgs\packages\STM32\tools\STM32Tools\1.4.0 -prefs=runtime.tools.CMSIS.path=C:\ProgramData\MATLAB\SupportPackages\R2018b\3P.instrset\arduinoide.instrset\idepkgs\packages\STM32\tools\CMSIS\5.5.1 -prefs=runtime.tools.CMSIS-5.5.1.path=C:\ProgramData\MATLAB\SupportPackages\R2018b\3P.instrset\arduinoide.instrset\idepkgs\packages\STM32\tools\CMSIS\5.5.1 -verbose C:\Users\THEODO~1\AppData\Local\Temp\arduino_modified_sketch_425418\Blink.ino

C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\ProgramData\MATLAB\SupportPackages\R2018b\3P.instrset\arduinoide.instrset\idepkgs\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\ProgramData\MATLAB\SupportPackages\R2018b\3P.instrset\arduinoide.instrset\idepkgs\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\theodosis\Documents\Arduino\libraries -fqbn=STM32:stm32:GenF1:pnum=BLUEPILL_F103C6,upload_method=swdMethod,xserial=generic,usb=none,xusb=FS,opt=osstd,rtlib=nano -ide-version=10813 -build-path C:\Users\theodosis\AppData\Local\Temp\ArduinoServer\MW -warnings=none -build-cache C:\Users\THEODO~1\AppData\Local\Temp\arduino_cache_151583 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.xpack-arm-none-eabi-gcc.path=C:\ProgramData\MATLAB\SupportPackages\R2018b\3P.instrset\arduinoide.instrset\idepkgs\packages\STM32\tools\xpack-arm-none-eabi-gcc\9.2.1-1.1 -prefs=runtime.tools.xpack-arm-none-eabi-gcc-9.2.1-1.1.path=C:\ProgramData\MATLAB\SupportPackages\R2018b\3P.instrset\arduinoide.instrset\idepkgs\packages\STM32\tools\xpack-arm-none-eabi-gcc\9.2.1-1.1 -prefs=runtime.tools.STM32Tools.path=C:\ProgramData\MATLAB\SupportPackages\R2018b\3P.instrset\arduinoide.instrset\idepkgs\packages\STM32\tools\STM32Tools\1.4.0 -prefs=runtime.tools.STM32Tools-1.4.0.path=C:\ProgramData\MATLAB\SupportPackages\R2018b\3P.instrset\arduinoide.instrset\idepkgs\packages\STM32\tools\STM32Tools\1.4.0 -prefs=runtime.tools.CMSIS.path=C:\ProgramData\MATLAB\SupportPackages\R2018b\3P.instrset\arduinoide.instrset\idepkgs\packages\STM32\tools\CMSIS\5.5.1 -prefs=runtime.tools.CMSIS-5.5.1.path=C:\ProgramData\MATLAB\SupportPackages\R2018b\3P.instrset\arduinoide.instrset\idepkgs\packages\STM32\tools\CMSIS\5.5.1 -verbose C:\Users\THEODO~1\AppData\Local\Temp\arduino_modified_sketch_425418\Blink.ino

Using board 'GenF1' from platform in folder: C:\ProgramData\MATLAB\SupportPackages\R2018b\3P.instrset\arduinoide.instrset\idepkgs\packages\STM32\hardware\stm32\1.9.0

Using core 'arduino' from platform in folder: C:\ProgramData\MATLAB\SupportPackages\R2018b\3P.instrset\arduinoide.instrset\idepkgs\packages\STM32\hardware\stm32\1.9.0

"C:\\ProgramData\\MATLAB\\SupportPackages\\R2018b\\3P.instrset\\arduinoide.instrset\\idepkgs\\packages\\STM32\\tools\\STM32Tools\\1.4.0/tools/win/busybox.exe" sh "C:\\ProgramData\\MATLAB\\SupportPackages\\R2018b\\3P.instrset\\arduinoide.instrset\\idepkgs\\packages\\STM32\\hardware\\stm32\\1.9.0\\system/extras/prebuild.sh" "C:\\Users\\theodosis\\AppData\\Local\\Temp\\ArduinoServer\\MW" "C:\\Users\\THEODO~1\\AppData\\Local\\Temp\\arduino_modified_sketch_425418"

Detecting libraries used...

"C:\\ProgramData\\MATLAB\\SupportPackages\\R2018b\\3P.instrset\\arduinoide.instrset\\idepkgs\\packages\\STM32\\tools\\xpack-arm-none-eabi-gcc\\9.2.1-1.1/bin/arm-none-eabi-g++" -mcpu=cortex-m3 -mthumb "@C:\\Users\\theodosis\\AppData\\Local\\Temp\\ArduinoServer\\MW/sketch/build_opt.h" -c -Os -w -std=gnu++14 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -fno-use-cxa-atexit "-IC:\\Users\\THEODO~1\\AppData\\Local\\Temp\\arduino_modified_sketch_425418" "-IC:\\ProgramData\\MATLAB\\SupportPackages\\R2018b\\3P.instrset\\arduinoide.instrset\\idepkgs\\packages\\STM32\\hardware\\stm32\\1.9.0\\cores\\arduino/avr" "-IC:\\ProgramData\\MATLAB\\SupportPackages\\R2018b\\3P.instrset\\arduinoide.instrset\\idepkgs\\packages\\STM32\\hardware\\stm32\\1.9.0\\cores\\arduino/stm32" "-IC:\\ProgramData\\MATLAB\\SupportPackages\\R2018b\\3P.instrset\\arduinoide.instrset\\idepkgs\\packages\\STM32\\hardware\\stm32\\1.9.0\\cores\\arduino/stm32/LL" "-IC:\\ProgramData\\MATLAB\\SupportPackages\\R2018b\\3P.instrset\\arduinoide.instrset\\idepkgs\\packages\\STM32\\hardware\\stm32\\1.9.0\\cores\\arduino/stm32/usb" "-IC:\\ProgramData\\MATLAB\\SupportPackages\\R2018b\\3P.instrset\\arduinoide.instrset\\idepkgs\\packages\\STM32\\hardware\\stm32\\1.9.0\\cores\\arduino/stm32/OpenAMP" "-IC:\\ProgramData\\MATLAB\\SupportPackages\\R2018b\\3P.instrset\\arduinoide.instrset\\idepkgs\\packages\\STM32\\hardware\\stm32\\1.9.0\\cores\\arduino/stm32/usb/hid" "-IC:\\ProgramData\\MATLAB\\SupportPackages\\R2018b\\3P.instrset\\arduinoide.instrset\\idepkgs\\packages\\STM32\\hardware\\stm32\\1.9.0\\cores\\arduino/stm32/usb/cdc" "-IC:\\ProgramData\\MATLAB\\SupportPackages\\R2018b\\3P.instrset\\arduinoide.instrset\\idepkgs\\packages\\STM32\\hardware\\stm32\\1.9.0\\system/Drivers/STM32F1xx_HAL_Driver/Inc" "-IC:\\ProgramData\\MATLAB\\SupportPackages\\R2018b\\3P.instrset\\arduinoide.instrset\\idepkgs\\packages\\STM32\\hardware\\stm32\\1.9.0\\system/Drivers/STM32F1xx_HAL_Driver/Src" "-IC:\\ProgramData\\MATLAB\\SupportPackages\\R2018b\\3P.instrset\\arduinoide.instrset\\idepkgs\\packages\\STM32\\hardware\\stm32\\1.9.0\\system/STM32F1xx" "-IC:\\ProgramData\\MATLAB\\SupportPackages\\R2018b\\3P.instrset\\arduinoide.instrset\\idepkgs\\packages\\STM32\\hardware\\stm32\\1.9.0\\system/Middlewares/ST/STM32_USB_Device_Library/Core/Inc" "-IC:\\ProgramData\\MATLAB\\SupportPackages\\R2018b\\3P.instrset\\arduinoide.instrset\\idepkgs\\packages\\STM32\\hardware\\stm32\\1.9.0\\system/Middlewares/ST/STM32_USB_Device_Library/Core/Src" "-IC:\\ProgramData\\MATLAB\\SupportPackages\\R2018b\\3P.instrset\\arduinoide.instrset\\idepkgs\\packages\\STM32\\hardware\\stm32\\1.9.0\\system/Middlewares/OpenAMP" "-IC:\\ProgramData\\MATLAB\\SupportPackages\\R2018b\\3P.instrset\\arduinoide.instrset\\idepkgs\\packages\\STM32\\hardware\\stm32\\1.9.0\\system/Middlewares/OpenAMP/open-amp/lib/include" "-IC:\\ProgramData\\MATLAB\\SupportPackages\\R2018b\\3P.instrset\\arduinoide.instrset\\idepkgs\\packages\\STM32\\hardware\\stm32\\1.9.0\\system/Middlewares/OpenAMP/libmetal/lib/include" "-IC:\\ProgramData\\MATLAB\\SupportPackages\\R2018b\\3P.instrset\\arduinoide.instrset\\idepkgs\\packages\\STM32\\hardware\\stm32\\1.9.0\\system/Middlewares/OpenAMP/virtual_driver" -w -x c++ -E -CC -DSTM32F1xx -DARDUINO=10813 -DARDUINO_BLUEPILL_F103C6 -DARDUINO_ARCH_STM32 "-DBOARD_NAME=\"BLUEPILL_F103C6\"" -DSTM32F103x6 -DHAL_UART_MODULE_ENABLED "-IC:\\ProgramData\\MATLAB\\SupportPackages\\R2018b\\3P.instrset\\arduinoide.instrset\\idepkgs\\packages\\STM32\\tools\\CMSIS\\5.5.1/CMSIS/Core/Include/" "-IC:\\ProgramData\\MATLAB\\SupportPackages\\R2018b\\3P.instrset\\arduinoide.instrset\\idepkgs\\packages\\STM32\\hardware\\stm32\\1.9.0\\system/Drivers/CMSIS/Device/ST/STM32F1xx/Include/" "-IC:\\ProgramData\\MATLAB\\SupportPackages\\R2018b\\3P.instrset\\arduinoide.instrset\\idepkgs\\packages\\STM32\\hardware\\stm32\\1.9.0\\system/Drivers/CMSIS/Device/ST/STM32F1xx/Source/Templates/gcc/" "-IC:\\ProgramData\\MATLAB\\SupportPackages\\R2018b\\3P.instrset\\arduinoide.instrset\\idepkgs\\packages\\STM32\\tools\\CMSIS\\5.5.1/CMSIS/DSP/Include" "-IC:\\ProgramData\\MATLAB\\SupportPackages\\R2018b\\3P.instrset\\arduinoide.instrset\\idepkgs\\packages\\STM32\\hardware\\stm32\\1.9.0\\cores\\arduino" "-IC:\\ProgramData\\MATLAB\\SupportPackages\\R2018b\\3P.instrset\\arduinoide.instrset\\idepkgs\\packages\\STM32\\hardware\\stm32\\1.9.0\\variants\\PILL_F103XX" "C:\\Users\\theodosis\\AppData\\Local\\Temp\\ArduinoServer\\MW\\sketch\\Blink.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE

Alternatives for bits/c++config.h: []

ResolveLibrary(bits/c++config.h)

-> candidates: []

In file included from c:\programdata\matlab\supportpackages\r2018b\3p.instrset\arduinoide.instrset\idepkgs\packages\stm32\tools\xpack-arm-none-eabi-gcc\9.2.1-1.1\arm-none-eabi\include\c++\9.2.1\stdlib.h:36,

from C:\ProgramData\MATLAB\SupportPackages\R2018b\3P.instrset\arduinoide.instrset\idepkgs\packages\STM32\hardware\stm32\1.9.0\cores\arduino/wiring.h:24,

from C:\ProgramData\MATLAB\SupportPackages\R2018b\3P.instrset\arduinoide.instrset\idepkgs\packages\STM32\hardware\stm32\1.9.0\cores\arduino/Arduino.h:36,

from C:\Users\theodosis\AppData\Local\Temp\ArduinoServer\MW\sketch\Blink.ino.cpp:1:

c:\programdata\matlab\supportpackages\r2018b\3p.instrset\arduinoide.instrset\idepkgs\packages\stm32\tools\xpack-arm-none-eabi-gcc\9.2.1-1.1\arm-none-eabi\include\c++\9.2.1\cstdlib:41:10: fatal error: bits/c++config.h: No such file or directory

41 | #include <bits/c++config.h>

| ^~~~~~~~~~~~~~~~~~

compilation terminated.

exit status 1

Error compiling for board Generic STM32F1 series.


While installing the board package I used the following URl: https://raw.githubusercontent.com/stm32 ... index.json

Everything worked perfectly. Also installing the bootloader I used the st-link v2 and the stm cube programmer.

To my understanding there may have occured a problem with packages installed by MATLAB. Matlab support fot arduino and Matlab support for stm packages.
So, with that in mind i went to the specific path C:\ProgramData\MATLAB\SupportPackages\R2018b, and I deleted the SupportPackages folder. After though restarting the arduino IDE once again the probleblem hadn't been solved.

Is there a way of changing the path that board manager saves files? Had anyone came to something similar?

I am asking these because arduino saved board packages inside the aforementioned path provided. In some way it installed all packages inside the matlab supportpackages pre-existed folder. When i deleted that folder also the stm32 package has been deleted from inside the IDE. I had to isntall it once again.

Please, respond. I need your help.
If there is something else that I could provided you with don't hesitate to leave a reply.
Thank you
User avatar
fpiSTM
Posts: 1758
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Error compiling simple blink sketch for stm32

Post by fpiSTM »

Hi,

I'm little bit confused.
You have installed the Arduino for matlab and since that you got errors ?

Could you be more precise by adding some link of all stuff you installed and how, please?
theodosis
Posts: 2
Joined: Wed Oct 07, 2020 3:15 pm

Re: Error compiling simple blink sketch for stm32

Post by theodosis »

Hi and thanks for the answer. Of course sorry for not explainning that in more detail.
These are two completely different things. In the past I had installed arduino package support for matlab. What happened is that matlab saved these packages in a folder with the following path : C:\ProgramData\MATLAB\SupportPackages\R2018b

Right now what hapened is that after installing the stm package in the arduino board manager for compiling stm products in arduino IDE, the board manager saved these in the already pre-existed folder of matlab (probably because it had already the extension SupportPackages?)

Whenever I am trying to compile anything I get the error message shown above, in my original made post. I tried deleting this extension and folder in the PogramData called SupportPackages, hoping that arduino board manager would make a new extension file but once again it installed all the stm packages in the same path C:\ProgramData\MATLAB\SupportPackages\R2018b.
User avatar
fpiSTM
Posts: 1758
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: Error compiling simple blink sketch for stm32

Post by fpiSTM »

Well, in that case I could not help as it relies how Arduino handle this.
Is there a Specific Arduino IDE customize by Matlab?
Could you point of what you have installed ?
Post Reply

Return to “General discussion”