Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) Error when using STM32duino core (Read 4643 times)
JoeMcC
Junior Member
**
Offline


Posts: 27
Joined: Oct 30th, 2016
Error when using STM32duino core
Jul 13th, 2019 at 1:35pm
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error when using STM32duino core
Reply #1 - Jul 13th, 2019 at 1:57pm
Print Post  
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
Joined: Oct 30th, 2016
Re: Error when using STM32duino core
Reply #2 - Aug 4th, 2019 at 1:56am
Print Post  
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  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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error when using STM32duino core
Reply #3 - Aug 4th, 2019 at 11:36am
Print Post  
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
Joined: Oct 30th, 2016
Re: Error when using STM32duino core
Reply #4 - Aug 4th, 2019 at 1:20pm
Print Post  
Sorry about that attached is the file.

Thank you.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error when using STM32duino core
Reply #5 - Aug 4th, 2019 at 3:09pm
Print Post  
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
Joined: Oct 30th, 2016
Re: Error when using STM32duino core
Reply #6 - Aug 4th, 2019 at 9:03pm
Print Post  
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
« Last Edit: Aug 4th, 2019 at 9:05pm by JoeMcC »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error when using STM32duino core
Reply #7 - Aug 4th, 2019 at 9:56pm
Print Post  
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 \8.2.1-1.7/bin/arm-none-eabi-gcc" -mcpu=cortex-m0 -mthumb .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" s\arduino/avr" s\arduino/stm32" s\arduino/stm32/LL" s\arduino/stm32/usb" s\arduino/stm32/usb/hid" s\arduino/stm32/usb/cdc" em/Drivers/STM32F0xx_HAL_Driver/Inc/" em/Drivers/STM32F0xx_HAL_Driver/Src/" em/STM32F0xx/" em/Middlewares/ST/STM32_USB_Device_Library/Core/Inc" em/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 ore/Include/" em/Drivers/CMSIS/Device/ST/STM32F0xx/Include/" em/Drivers/CMSIS/Device/ST/STM32F0xx/Source/Templates/gcc/" s\arduino" ants\NUCLEO_F030R8" ts\NUCLEO_F030R8\PeripheralPins.c" -o 1898\core\..\variant\PeripheralPins.c.o" [/code]
« Last Edit: Aug 4th, 2019 at 9:57pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
JoeMcC
Junior Member
**
Offline


Posts: 27
Joined: Oct 30th, 2016
Re: Error when using STM32duino core
Reply #8 - Aug 4th, 2019 at 11:56pm
Print Post  
I started a new project.  It is building successfully under debug and release. 
Thanks for your help.

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error when using STM32duino core
Reply #9 - Aug 5th, 2019 at 2:38pm
Print Post  
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
Joined: Oct 30th, 2016
Re: Error when using STM32duino core
Reply #10 - Aug 5th, 2019 at 9:36pm
Print Post  
So the project that was working quit working with the same error. The zip file of the project is attached.

Thank you,
~Joe
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error when using STM32duino core
Reply #11 - Aug 5th, 2019 at 11:38pm
Print Post  
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
Joined: Oct 30th, 2016
Re: Error when using STM32duino core
Reply #12 - Aug 6th, 2019 at 12:20am
Print Post  
That fixed it Boss, good job. I owe you a beer.
Thx
~Joe
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint