[Solved] Arduino Core for STM32 v2018.1.18 Problem

Please post bugs and enhancements for the STM core here
djw
Posts: 10
Joined: Sat Nov 25, 2017 5:23 pm

[Solved] Arduino Core for STM32 v2018.1.18 Problem

Post by djw » Sun Jan 21, 2018 4:33 pm

The recent release which includes support for STM32F446 fails to compile on my system.
I have uninstalled and reinstalled the Arduino IDE, installed the SAM/DUE, and also the JSON
from the GitHub site:
https://raw.githubusercontent.com/stm32 ... index.json

Compiling even an empty *.ino yields:
exec: "cmd": executable file not found in %PATH%
Error compiling for board Nucleo-64.

______VERBOSE______________

Code: Select all

Arduino: 1.8.5 (Windows 7), Board: "Nucleo-64, Nucleo F446RE, Mass Storage, Generic Serial, None, Smallest (-Os default)"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Dan\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Dan\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Dan\Documents\Arduino\libraries -fqbn=STM32:stm32:Nucleo_64:pnum=NUCLEO_F446RE,upload_method=MassStorage,xserial=generic,usb=none,opt=osstd -ide-version=10805 -build-path C:\Users\Dan\AppData\Local\Temp\arduino_build_21592 -warnings=none -build-cache C:\Users\Dan\AppData\Local\Temp\arduino_cache_156192 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.CMSIS.path=C:\Users\Dan\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\Dan\AppData\Local\Arduino15\packages\STM32\tools\arm-none-eabi-gcc\6-2017-q2-update -prefs=runtime.tools.STM32Tools.path=C:\Users\Dan\AppData\Local\Arduino15\packages\STM32\tools\STM32Tools\2017.9.22 -verbose C:\Users\Dan\AppData\Local\Temp\untitled1006899379.tmp\sketch_jan21a\sketch_jan21a.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Dan\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Dan\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Dan\Documents\Arduino\libraries -fqbn=STM32:stm32:Nucleo_64:pnum=NUCLEO_F446RE,upload_method=MassStorage,xserial=generic,usb=none,opt=osstd -ide-version=10805 -build-path C:\Users\Dan\AppData\Local\Temp\arduino_build_21592 -warnings=none -build-cache C:\Users\Dan\AppData\Local\Temp\arduino_cache_156192 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.CMSIS.path=C:\Users\Dan\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\Dan\AppData\Local\Arduino15\packages\STM32\tools\arm-none-eabi-gcc\6-2017-q2-update -prefs=runtime.tools.STM32Tools.path=C:\Users\Dan\AppData\Local\Arduino15\packages\STM32\tools\STM32Tools\2017.9.22 -verbose C:\Users\Dan\AppData\Local\Temp\untitled1006899379.tmp\sketch_jan21a\sketch_jan21a.ino
Using board 'Nucleo_64' from platform in folder: C:\Users\Dan\AppData\Local\Arduino15\packages\STM32\hardware\stm32\2018.1.18
Using core 'arduino' from platform in folder: C:\Users\Dan\AppData\Local\Arduino15\packages\STM32\hardware\stm32\2018.1.18
cmd /c "if not exist C:\Users\Dan\AppData\Local\Temp\untitled1006899379.tmp\sketch_jan21a/build_opt.h mkdir C:\Users\Dan\AppData\Local\Temp\arduino_build_21592\sketch & type NUL > C:\Users\Dan\AppData\Local\Temp\arduino_build_21592/sketch/build_opt.h"
exec: "cmd": executable file not found in %PATH%
Error compiling for board Nucleo-64.

fpiSTM
Posts: 314
Joined: Fri Sep 16, 2016 12:33 pm
Location: Le Mans, France

Re: Arduino Core for STM32 v2018.1.18 Problem

Post by fpiSTM » Sun Jan 21, 2018 7:39 pm

Hi,

FYI, you don't need to install the SAM/Due, all required dependencies are installed thanks the json.

It seems strange that the batch command prompt is not is the %PATH% environment.
On win7, it should be in

Code: Select all

c:\windows\system32\cmd.exe[/code

Doing some search, I think I've found your issue. You run Arduino as a normal user. It seems that Arduino required to be run as Administrator.
Could you try, please.

djw
Posts: 10
Joined: Sat Nov 25, 2017 5:23 pm

Re: Arduino Core for STM32 v2018.1.18 Problem

Post by djw » Mon Jan 22, 2018 1:09 am

Thank you for helping with the diagnosis:
Running as admin did not correct the issue.
Also note that the JSON file for release 7 worked correctly.
dan

djw
Posts: 10
Joined: Sat Nov 25, 2017 5:23 pm

Re: Arduino Core for STM32 v2018.1.18 Problem

Post by djw » Mon Jan 22, 2018 1:49 am

My intuition is that sometime between running the release 7 and now 8, somehow I F'd up my system settings.
What should the path look like? at least the entry for the cmd?
It is a mystery to me, but inadvertent changes don't always manifest immediately.

djw
Posts: 10
Joined: Sat Nov 25, 2017 5:23 pm

Re: Arduino Core for STM32 v2018.1.18 Problem

Post by djw » Mon Jan 22, 2018 2:01 am

Just for fun I switched to the Arduino DUE to test the IDE
I compiles fine.
C:\Windows\System32 is present in the PATH

Hum,.... very frustrating

fpiSTM
Posts: 314
Joined: Fri Sep 16, 2016 12:33 pm
Location: Le Mans, France

Re: Arduino Core for STM32 v2018.1.18 Problem

Post by fpiSTM » Mon Jan 22, 2018 5:32 am

Dan,
the last version include a prebuild recipe in platform.txt which call some commands.
That's why "cmd.exe" is required.
It's strange running Arduino as administrator doest not work.
This kind of issue with Arduino on windows is not a newer one... I will made some test on my side with a "standard" user.

fpiSTM
Posts: 314
Joined: Fri Sep 16, 2016 12:33 pm
Location: Le Mans, France

Re: Arduino Core for STM32 v2018.1.18 Problem

Post by fpiSTM » Mon Jan 22, 2018 6:30 am

please, could you test in the windows search bar:
"cmd"
and then
"cmd.exe"

fpiSTM
Posts: 314
Joined: Fri Sep 16, 2016 12:33 pm
Location: Le Mans, France

Re: Arduino Core for STM32 v2018.1.18 Problem

Post by fpiSTM » Mon Jan 22, 2018 8:11 am

djw wrote:
Mon Jan 22, 2018 2:01 am
C:\Windows\System32 is present in the PATH
Check also where it is defined in the environment variables: user profile or system.

djw
Posts: 10
Joined: Sat Nov 25, 2017 5:23 pm

Re: Arduino Core for STM32 v2018.1.18 Problem

Post by djw » Mon Jan 22, 2018 2:23 pm

Hey! Success!

These were variables:
User
C:\Users\Dan\AppData\Local\Programs\Python\Python36-32\Scripts\;C:\Users\Dan\AppData\Local\Programs\Python\Python36-32\;C:\MinGW\bin;C:\Users\Dan\AppData\Local\Programs\Python\Python36-32\Scripts
System
C:\ProgramData\Oracle\Java\javapath;c:\Software\octave3.6.4\bin;C:\Program Files (x86)\Qucs\bin;%SystemRoot%\System32\Wbem;C:\Program Files (x86)\HP SimplePass\x64;C:\Program Files (x86)\HP SimplePass\;;C:\WinAVR-20100110\bin;C:\WinAVR-20100110\utils\bin;C:\Program Files (x86)\mingw32\bin;c:\iverilog\bin;c:\iverilog\gtkwave\bin;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\PuTTY\

I added to the USER PATH C:\Windows\System32; to replace %SystemRoot%\System32\Wbem; in the System variables.
I did NOT see an explicit %SystemRoot%\System32; anywhere else,.....
Thanks so much for the assistance and doing all the work on STM32 cores.
Dan

djw
Posts: 10
Joined: Sat Nov 25, 2017 5:23 pm

Re: Arduino Core for STM32 v2018.1.18 Problem

Post by djw » Mon Jan 22, 2018 2:34 pm

Another PATH problem?
The empty .ino compiled and uploaded. (NULL) program
When I tried Blink, I get this error:

Code: Select all

Arduino: 1.8.5 (Windows 7), Board: "Nucleo-64, Nucleo F446RE, Mass Storage, Generic Serial, None, Smallest (-Os default)"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Dan\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Dan\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Dan\Documents\Arduino\libraries -fqbn=STM32:stm32:Nucleo_64:pnum=NUCLEO_F446RE,upload_method=MassStorage,xserial=generic,usb=none,opt=osstd -ide-version=10805 -build-path C:\Users\Dan\AppData\Local\Temp\arduino_build_945959 -warnings=none -build-cache C:\Users\Dan\AppData\Local\Temp\arduino_cache_460896 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.STM32Tools.path=C:\Users\Dan\AppData\Local\Arduino15\packages\STM32\tools\STM32Tools\2017.9.22 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\Dan\AppData\Local\Arduino15\packages\STM32\tools\arm-none-eabi-gcc\6-2017-q2-update -prefs=runtime.tools.CMSIS.path=C:\Users\Dan\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0 -verbose C:\Program Files (x86)\Arduino\examples\01.Basics\Blink\Blink.ino
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Dan\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Dan\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Dan\Documents\Arduino\libraries -fqbn=STM32:stm32:Nucleo_64:pnum=NUCLEO_F446RE,upload_method=MassStorage,xserial=generic,usb=none,opt=osstd -ide-version=10805 -build-path C:\Users\Dan\AppData\Local\Temp\arduino_build_945959 -warnings=none -build-cache C:\Users\Dan\AppData\Local\Temp\arduino_cache_460896 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.STM32Tools.path=C:\Users\Dan\AppData\Local\Arduino15\packages\STM32\tools\STM32Tools\2017.9.22 -prefs=runtime.tools.arm-none-eabi-gcc.path=C:\Users\Dan\AppData\Local\Arduino15\packages\STM32\tools\arm-none-eabi-gcc\6-2017-q2-update -prefs=runtime.tools.CMSIS.path=C:\Users\Dan\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0 -verbose C:\Program Files (x86)\Arduino\examples\01.Basics\Blink\Blink.ino
Using board 'Nucleo_64' from platform in folder: C:\Users\Dan\AppData\Local\Arduino15\packages\STM32\hardware\stm32\2018.1.18
Using core 'arduino' from platform in folder: C:\Users\Dan\AppData\Local\Arduino15\packages\STM32\hardware\stm32\2018.1.18
cmd /c "if not exist C:\Program Files (x86)\Arduino\examples\01.Basics\Blink/build_opt.h mkdir C:\Users\Dan\AppData\Local\Temp\arduino_build_945959\sketch & type NUL > C:\Users\Dan\AppData\Local\Temp\arduino_build_945959/sketch/build_opt.h"
'Files' is not recognized as an internal or external command,

operable program or batch file.

The system cannot find the path specified.

exit status 1
Error compiling for board Nucleo-64.
---------------------------------
I think the C:\Program Files (x86) is incorrect, the space must be removed????? Or some % magic applied??? This may be a
JSON problem???

Post Reply