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 compiling STM32L452RE code with latest VSMicro release (Read 1684 times)
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Error compiling STM32L452RE code with latest VSMicro release
Feb 26th, 2021 at 12:54pm
Print Post  
Hi, After updating to the latest verison, i am getting this error from the build system:

Quote:

-gcc\9.2.1-1.1/bin/arm-none-eabi-g++" -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb t.h" -c -g -Og -Wall -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 -MMD "-IC:\Users\Richa\Documents\Github\Remote-Train-Sensor\Software\SAIN" res\arduino/avr" res\arduino/stm32" res\arduino/stm32/LL" res\arduino/stm32/usb" res\arduino/stm32/OpenAMP" res\arduino/stm32/usb/hid" res\arduino/stm32/usb/cdc" stem/Drivers/STM32L4xx_HAL_Driver/Inc" stem/Drivers/STM32L4xx_HAL_Driver/Src" stem/STM32L4xx" stem/Middlewares/ST/STM32_USB_Device_Library/Core/Inc" stem/Middlewares/ST/STM32_USB_Device_Library/Core/Src" stem/Middlewares/OpenAMP" stem/Middlewares/OpenAMP/open-amp/lib/include" stem/Middlewares/OpenAMP/libmetal/lib/include" stem/Middlewares/OpenAMP/virtual_driver" -DSTM32L4xx -DARDUINO=108010 -DARDUINO_NUCLEO_L452RE -DARDUINO_ARCH_STM32 -DBOARD_NAME=\"NUCLEO_L452RE\" -DSTM32L452xx -DHAL_UART_MODULE_ENABLED /Core/Include/" stem/Drivers/CMSIS/Device/ST/STM32L4xx/Include/" stem/Drivers/CMSIS/Device/ST/STM32L4xx/Source/Templates/gcc/" /DSP/Include" -I"C:\Users\Richa\DOCUME~1\Github\REMOTE~1\Software\SAIN" res\arduino"  -Og  -g3 -DVM_DEBUG_GDB riants\NUCLEO_L452RE"  -o o"
 
arm-none-eabi-g++*: error: #line: No such file or directory
Error compiling .ino project source
Build failed for project 'PROJ'
 
arm-none-eabi-g++*: error: 1: No such file or directory


I have sent the full build information via email as a support request.

Thanks!
« Last Edit: Feb 26th, 2021 at 12:56pm by Bambo »  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2175
Joined: Feb 13th, 2019
Re: Error compiling STM32L452RE code with latest VSMicro release
Reply #1 - Feb 26th, 2021 at 3:39pm
Print Post  
Thanks for the report.

It seems to be an issue with the prebuild hook execution, as only the SrcWrapper.cpp is found as additional code, the build_opt.h isn't (from the full log)

If you run Build > Clean Solution, and then run the below command (the recipe.hooks.prebuild.1.pattern):
ols/win/busybox.exe" sh em/extras/prebuild.sh" "C:\Users\Richa\AppData\Local\Temp\VMBuilds\SAIN\STM32_Nucleo_64\Debug" "C:\Users\Richa\Documents\Github\Remote-Train-Sensor\Software\SAIN"

This will generate files in the <buildfolder>\sketch\ folder -- are both build_opt.h and SrcWrapper.cpp present?
  
Back to top
 
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Error compiling STM32L452RE code with latest VSMicro release
Reply #2 - Feb 26th, 2021 at 5:01pm
Print Post  
Simon@Visual Micro wrote on Feb 26th, 2021 at 3:39pm:
Thanks for the report.

It seems to be an issue with the prebuild hook execution, as only the SrcWrapper.cpp is found as additional code, the build_opt.h isn't (from the full log)

If you run Build > Clean Solution, and then run the below command (the recipe.hooks.prebuild.1.pattern):
ols/win/busybox.exe" sh em/extras/prebuild.sh" "C:\Users\Richa\AppData\Local\Temp\VMBuilds\SAIN\STM32_Nucleo_64\Debug" "C:\Users\Richa\Documents\Github\Remote-Train-Sensor\Software\SAIN"

This will generate files in the <buildfolder>\sketch\ folder -- are both build_opt.h and SrcWrapper.cpp present?


Hi, there is only 1 file in the directory and it is called ScrWrapper.cpp
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2175
Joined: Feb 13th, 2019
Re: Error compiling STM32L452RE code with latest VSMicro release
Reply #3 - Feb 26th, 2021 at 5:46pm
Print Post  
Thanks for confirming, this is the root of the problem, as the file is referenced later in the build process.

The tool being used is part of the STM32 core, and it calls the script within the core\system\extras\prebuild.sh....  Do you have a file in your sketch folder called build_opt.h?
  
Back to top
 
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Error compiling STM32L452RE code with latest VSMicro release
Reply #4 - Feb 26th, 2021 at 5:53pm
Print Post  
Simon@Visual Micro wrote on Feb 26th, 2021 at 5:46pm:
Thanks for confirming, this is the root of the problem, as the file is referenced later in the build process.

The tool being used is part of the STM32 core, and it calls the script within the core\system\extras\prebuild.sh....  Do you have a file in your sketch folder called build_opt.h?


Yep, there is a file called build_opt.h in the root dir of the sketch
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2175
Joined: Feb 13th, 2019
Re: Error compiling STM32L452RE code with latest VSMicro release
Reply #5 - Feb 26th, 2021 at 6:01pm
Print Post  
Ok thanks, so that's why the prebuild script isn't generating one.... (from reading the .sh script)

Is the build_opt.h copied into the build folder when you do a build?

If Yes - can you send the build_opt.h file after the build has finished so we can review?
  
Back to top
 
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Error compiling STM32L452RE code with latest VSMicro release
Reply #6 - Feb 26th, 2021 at 6:10pm
Print Post  
Simon@Visual Micro wrote on Feb 26th, 2021 at 6:01pm:
Ok thanks, so that's why the prebuild script isn't generating one.... (from reading the .sh script)

Is the build_opt.h copied into the build folder when you do a build?

If Yes - can you send the build_opt.h file after the build has finished so we can review?


Yes the build_opt.h file is copied into the build folder. The first line of the file is not present in the original one (starting with #line 1).

Code
Select All
#line 1 "C:\\Users\\Richa\\Documents\\Github\\YY\\Software\\YY\\build_opt.h"
-DHAL_MODULE_ENABLED
-DHAL_SAI_MODULE_ENABLED
-DHAL_TIM_MODULE_ENABLED
-DHAL_ADC_MODULE_ENABLED
-DHAL_MMC_MODULE_ENABLED
-DHAL_SD_MODULE_ENABLED
-DHAL_GPIO_MODULE_ENABLED
-DHAL_EXTI_MODULE_ENABLED
-DHAL_I2C_MODULE_ENABLED
-DHAL_DMA_MODULE_ENABLED
-DHAL_RCC_MODULE_ENABLED
-DHAL_FLASH_MODULE_ENABLED
-DHAL_PWR_MODULE_ENABLED
-DHAL_CORTEX_MODULE_ENABLED 

  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2175
Joined: Feb 13th, 2019
Re: Error compiling STM32L452RE code with latest VSMicro release
Reply #7 - Feb 26th, 2021 at 6:12pm
Print Post  
Thanks for the detail, we can replicate this now and will update as soon as a fix is available.
  
Back to top
 
IP Logged
 
Bambo
Member
***
Offline


Posts: 146
Location: Liverpool, UK
Joined: Jan 13th, 2020
Re: Error compiling STM32L452RE code with latest VSMicro release
Reply #8 - Feb 26th, 2021 at 6:16pm
Print Post  
Simon@Visual Micro wrote on Feb 26th, 2021 at 6:12pm:
Thanks for the detail, we can replicate this now and will update as soon as a fix is available.


Thanks Simon!
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2175
Joined: Feb 13th, 2019
Re: Error compiling STM32L452RE code with latest VSMicro release
Reply #9 - Feb 26th, 2021 at 7:41pm
Print Post  
Please try the 21.01.06.5 build released at the below board, this should resolve the issue for this package:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint