VS Arduino
Visual Micro >> General Board >> Error when using STM32duino core
https://www.visualmicro.com/forums/YaBB.pl?num=1563024921

Message started by JoeMcC on Jul 13th, 2019 at 1:35pm

Title: Error when using STM32duino core
Post by JoeMcC on Jul 13th, 2019 at 1: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

Title: Re: Error when using STM32duino core
Post by Visual Micro on Jul 13th, 2019 at 1: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



Title: Re: Error when using STM32duino core
Post by JoeMcC on Aug 4th, 2019 at 1: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_opt.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

Title: Re: Error when using STM32duino core
Post by Visual Micro on Aug 4th, 2019 at 11:36am
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

Title: Re: Error when using STM32duino core
Post by JoeMcC on Aug 4th, 2019 at 1:20pm
Sorry about that attached is the file.

Thank you.
https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=Verbose_Build_Options.txt ( 46 KB | 0 Downloads )

Title: Re: Error when using STM32duino core
Post by Visual Micro on Aug 4th, 2019 at 3: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

Title: Re: Error when using STM32duino core
Post by JoeMcC on Aug 4th, 2019 at 9: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

https://www.visualmicro.com/forums/YaBB.pl?action=downloadfile;file=Build_output_004.txt ( 48 KB | 1 Download )

Title: Re: Error when using STM32duino core
Post by Visual Micro on Aug 4th, 2019 at 9: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"

Title: Re: Error when using STM32duino core
Post by JoeMcC on Aug 4th, 2019 at 11:56pm
I started a new project.  It is building successfully under debug and release.
Thanks for your help.

~Joe

Title: Re: Error when using STM32duino core
Post by Visual Micro on Aug 5th, 2019 at 2: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.

Title: Re: Error when using STM32duino core
Post by JoeMcC on Aug 5th, 2019 at 9:36pm
So the project that was working quit working with the same error. The zip file of the project is attached.

Thank you,
~Joe
STM32_Blink.zip (Attachment deleted)

Title: Re: Error when using STM32duino core
Post by Visual Micro on Aug 5th, 2019 at 11:38pm
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

Title: Re: Error when using STM32duino core
Post by JoeMcC on Aug 6th, 2019 at 12:20am
That fixed it Boss, good job. I owe you a beer.
Thx
~Joe

VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.