Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Error when using STM32duino core (Read 558 times)
JoeMcC
Junior Member
**
Offline



Posts: 27
Error when using STM32duino core
Jul 13th, 2019 at 2:35pm
 
Hello, long time user of Vm, thank you again, it's fantastic.

Using IDE Arduino 1.6/1.8
I installed the STM32duino core and everything went fine.
I choose the 'board' Nucleo 64 and the options are filled out correctly.

Vmicro -> New Arduino Project -> 'test2'

I then get the msg below

Err Dialog Box says:
"The project 'test2' contains a device 'ATSAM3X8E'  which is not supported by Atmel Studio. Please select
another device.

I do not know why I am getting this as the correct device is set up in Vm.

Any help is appreciated.

Joe
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10573
United Kingdom
Re: Error when using STM32duino core
Reply #1 - Jul 13th, 2019 at 2:57pm
 
Thanks for the post

This means that you are using atmel studio with non-atmel hardware which is not something atmel want you to do. I recommend VS2017.

The issue might be that you did not install support for  32 bit boards when you installed atmel studio


Back to top
 
WWW  
IP Logged
 
JoeMcC
Junior Member
**
Offline



Posts: 27
Re: Error when using STM32duino core
Reply #2 - Aug 4th, 2019 at 2:56am
 
Ok, thanks.

Now I see you recommended VS 2017 but I just installed VS 2019 (community) I am getting compile errors which make zero sense to me.


"Compiling debug version of 'Blink' for 'Nucleo-64'
C:\Arduino\java\bin>if not exist "C:\Users\Joe\Documents\Arduino\STM32_Blink\Blink/build_opt.h" mkdir "C:\Users\Joe\AppData\Local\Temp\VMBuilds\Blink\STM32_Nucleo_64\Debug"   & type NUL  1>"C:\Users\Joe\AppData\Local\Temp\VMBuilds\Blink\STM32_Nucleo_64\Debug/build_op
t.h"

arm-none-eabi-gcc*: error: #line: No such file or directory

arm-none-eabi-gcc*: error: 1: No such file or directory
Error compiling variant"


I can compile successfully in the arduino ide.

I think I saw something about a work around. Don't know if it was for this problem though.

Any help is appreciated.
~Joe
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10573
United Kingdom
Re: Error when using STM32duino core
Reply #3 - Aug 4th, 2019 at 12:36pm
 
STM is supported but there are a lot of packages, options and combinations. We need know the board support json url you used to get the package and also the information in the yellow box above shows us what you have selected.

Thanks
Back to top
 
WWW  
IP Logged
 
JoeMcC
Junior Member
**
Offline



Posts: 27
Re: Error when using STM32duino core
Reply #4 - Aug 4th, 2019 at 2:20pm
 
Sorry about that attached is the file.

Thank you.
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10573
United Kingdom
Re: Error when using STM32duino core
Reply #5 - Aug 4th, 2019 at 4:09pm
 
The first build for the Nucleo or when clicking Rebuild failed. Clicking Build again then worked correctly. The STm32 core supports an options header that you can add to your own code to set #defines and other properties that are documented for use with the core. If an options header has not been added to the local project then the core attempts to create a default header using a pre-build event (hook). Visual micro was running the event to late, after the deep search library discover, so the default header was missing when deep search attempted to run the toolchain.

Whilst you have not said that the Build worked subsequent times or not but this issue would have caused confusion.

The issue is resolved in the LATEST - 1908.4.0 release here.

https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

Please post another build output if it fails after applying the update.

Thanks
Back to top
 
WWW  
IP Logged
 
JoeMcC
Junior Member
**
Offline



Posts: 27
Re: Error when using STM32duino core
Reply #6 - Aug 4th, 2019 at 10:03pm
 
I am still getting the error I did install the latest release of Visual Micro.

If I hit the build btn it gives me the same error I don't ever get a successful build.

Thanks for your help.

~Joe
Back to top
« Last Edit: Aug 4th, 2019 at 10:05pm by JoeMcC »  

 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10573
United Kingdom
Re: Error when using STM32duino core
Reply #7 - Aug 4th, 2019 at 10:56pm
 
Yes it doesn't make sense. This is the command that is failing. You can run it from cmd.exe, its external compile command.

Does this happen in a new empty project?
Does this happen in Release mode?

Code (C++):
"C:\Users\Joe\AppData\Local\arduino15\packages\STM32\tools\arm-none-eabi-gcc\8.2.1-1.7/bin/arm-none-eabi-gcc" -mcpu=cortex-m0 -mthumb "@C:\Users\Joe\AppData\Local\Temp\VMBuilds\Blink\STM32_Nucleo_64\Debug/build_opt.h" -c -Os -w -std=gnu11 -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -MMD "-IC:\Users\Joe\Documents\Arduino\STM32_Blink\Blink" "-IC:\Users\Joe\AppData\Local\arduino15\packages\STM32\hardware\stm32\1.6.1\cores\arduino/avr" "-IC:\Users\Joe\AppData\Local\arduino15\packages\STM32\hardware\stm32\1.6.1\cores\arduino/stm32" "-IC:\Users\Joe\AppData\Local\arduino15\packages\STM32\hardware\stm32\1.6.1\cores\arduino/stm32/LL" "-IC:\Users\Joe\AppData\Local\arduino15\packages\STM32\hardware\stm32\1.6.1\cores\arduino/stm32/usb" "-IC:\Users\Joe\AppData\Local\arduino15\packages\STM32\hardware\stm32\1.6.1\cores\arduino/stm32/usb/hid" "-IC:\Users\Joe\AppData\Local\arduino15\packages\STM32\hardware\stm32\1.6.1\cores\arduino/stm32/usb/cdc" "-IC:\Users\Joe\AppData\Local\arduino15\packages\STM32\hardware\stm32\1.6.1\system/Drivers/STM32F0xx_HAL_Driver/Inc/" "-IC:\Users\Joe\AppData\Local\arduino15\packages\STM32\hardware\stm32\1.6.1\system/Drivers/STM32F0xx_HAL_Driver/Src/" "-IC:\Users\Joe\AppData\Local\arduino15\packages\STM32\hardware\stm32\1.6.1\system/STM32F0xx/" "-IC:\Users\Joe\AppData\Local\arduino15\packages\STM32\hardware\stm32\1.6.1\system/Middlewares/ST/STM32_USB_Device_Library/Core/Inc" "-IC:\Users\Joe\AppData\Local\arduino15\packages\STM32\hardware\stm32\1.6.1\system/Middlewares/ST/STM32_USB_Device_Library/Core/Src" -DSTM32F0xx -DARDUINO=10809 -DARDUINO_NUCLEO_F030R8 -DARDUINO_ARCH_STM32 -DBOARD_NAME=\"NUCLEO_F030R8\" -DSTM32F030x8 -DHAL_UART_MODULE_ENABLED "-IC:\Users\Joe\AppData\Local\arduino15\packages\STM32\tools\CMSIS\5.5.1/CMSIS/Core/Include/" "-IC:\Users\Joe\AppData\Local\arduino15\packages\STM32\hardware\stm32\1.6.1\system/Drivers/CMSIS/Device/ST/STM32F0xx/Include/" "-IC:\Users\Joe\AppData\Local\arduino15\packages\STM32\hardware\stm32\1.6.1\system/Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/" -I"C:\Users\Joe\AppData\Local\arduino15\packages\STM32\hardware\stm32\1.6.1\cores\arduino" -I"C:\Users\Joe\AppData\Local\arduino15\packages\STM32\hardware\stm32\1.6.1\variants\NUCLEO_F030R8" "C:\Users\Joe\AppData\Local\arduino15\packages\STM32\hardware\stm32\1.6.1\variants\NUCLEO_F030R8\PeripheralPins.c" -o "C:\Users\Joe\AppData\Local\Temp\VMBCore\arduino16x\1e63c173c9fa22b08f3d1cbf207a1898\core\..\variant\PeripheralPins.c.o" 

Back to top
« Last Edit: Aug 4th, 2019 at 10:57pm by Visual Micro »  
WWW  
IP Logged
 
JoeMcC
Junior Member
**
Offline



Posts: 27
Re: Error when using STM32duino core
Reply #8 - Aug 5th, 2019 at 12:56am
 
I started a new project.  It is building successfully under debug and release.
Thanks for your help.

~Joe
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10573
United Kingdom
Re: Error when using STM32duino core
Reply #9 - Aug 5th, 2019 at 3:38pm
 
Great.

I guess there was a file such as board.txt or something causing confusion in the other project. It is possible to zip the project folder of the broken project and email or post so I can see what the problem was? Email address in the yellow box above.
Back to top
 
WWW  
IP Logged
 
JoeMcC
Junior Member
**
Offline



Posts: 27
Re: Error when using STM32duino core
Reply #10 - Aug 5th, 2019 at 10:36pm
 
So the project that was working quit working with the same error. The zip file of the project is attached.

Thank you,
~Joe
Back to top
 

STM32_Blink.zip (12959 KB | 4 )
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10573
United Kingdom
Re: Error when using STM32duino core
Reply #11 - Aug 6th, 2019 at 12:38am
 
Thanks, since creating the new project you added the stm32 special opt.h with -D compiler defines. This is obviously invalid code used in a special way by the stm core.

Visual Micro writes original source line numbers to files in the pre-build temp folder such as #line 1. This then caused the stm tool to pass an invalid compiler define.

The "work in progress 1908.5.4" build no longer adds line numbers to header files so your project will build correctly.

https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES
Back to top
 
WWW  
IP Logged
 
JoeMcC
Junior Member
**
Offline



Posts: 27
Re: Error when using STM32duino core
Reply #12 - Aug 6th, 2019 at 1:20am
 
That fixed it Boss, good job. I owe you a beer.
Thx
~Joe
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print