[Solved] Arduino Core for STM32 v2018.1.18 Problem

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______________

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
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 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
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
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
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
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
Mon Jan 22, 2018 6:30 am
please, could you test in the windows search bar:
“cmd”
and then
“cmd.exe”

fpiSTM
Mon Jan 22, 2018 8:11 am
[djw – 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
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
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:

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.


fpiSTM
Mon Jan 22, 2018 4:26 pm
There is no link with JSON file.
The input JSON file is only to install the required packages in Arduino local user path.

This line of code is in the platform.txt:
recipe.hooks.prebuild.1.pattern.windows=cmd /c "if not exist {build.opt.sourcepath} mkdir {build.path}\sketch & type NUL > {build.opt.path}"


djw
Mon Jan 22, 2018 5:20 pm
Windoze makes us all nuts,…
The error changes:

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_613137 -warnings=none -build-cache C:\Users\Dan\AppData\Local\Temp\arduino_cache_437889 -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_613137 -warnings=none -build-cache C:\Users\Dan\AppData\Local\Temp\arduino_cache_437889 -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_613137\sketch & type NUL > C:\Users\Dan\AppData\Local\Temp\arduino_build_613137/sketch/build_opt.h"
The filename, directory name, or volume label syntax is incorrect.

exit status 1
Error compiling for board Nucleo-64.


mrburnette
Mon Jan 22, 2018 6:22 pm
[fpiSTM – Mon Jan 22, 2018 4:26 pm] –

Windows will make me crazy :mrgreen:

I was a MCSE for years and Win 7 to Win 8 then Win 8.1 totally pissed me off. I made the Linux jump when Microsoft trashed my nicely hacked Windows 8.1 with the infamous Win 10 download. The rollback never worked correctly and I figured if I was going to have to reinstall anyway that Linux would be my choice. That was 2 years ago and I have never looked back.

Ray


Rick Kimball
Mon Jan 22, 2018 7:19 pm
[mrburnette – Mon Jan 22, 2018 6:22 pm] –

[fpiSTM – Mon Jan 22, 2018 4:26 pm] –

Windows will make me crazy :mrgreen:

I was a MCSE for years and Win 7 to Win 8 then Win 8.1 totally pissed me off.

I love it when the cult members see the light : )


Pito
Mon Jan 22, 2018 8:09 pm
Market share desktops/notebooks: Win 88.9%, Linux 2.3%.. :)

zmemw16
Mon Jan 22, 2018 8:30 pm
you could be a hard sell :!:
:D

fpiSTM
Mon Jan 22, 2018 9:37 pm
I’ve tested and reproduce the issue…
So, the good line, to deal properly with space in path variable, is/should be/must be/I pray:
recipe.hooks.prebuild.1.pattern.windows=cmd /c if not exist "{build.opt.sourcepath}" mkdir "{build.path}\sketch" & type NUL > "{build.opt.path}"

mrburnette
Mon Jan 22, 2018 10:31 pm
[fpiSTM – Mon Jan 22, 2018 9:37 pm] –

That’s why I prefer use Linux also… but need to also support win too…. :roll: for the 88.9%

If we only supported Linux, there would be lots more Linux users! :lol:

Ray


mrburnette
Mon Jan 22, 2018 10:33 pm
[Pito – Mon Jan 22, 2018 8:09 pm] –
Market share desktops/notebooks: Win 88.9%, Linux 2.3%.. :)

Sounds like the ratio of non-rich vs the very rich.
But the ratio does not itself make the wealthy bad (people.)


zmemw16
Mon Jan 22, 2018 10:36 pm
smart maybe :?:

djw
Mon Jan 22, 2018 11:27 pm
WooooooooHooooooo!
It works! YES
Nothing better than pounding Windoze into submission.
Thank you very much for your diligence, and for working to bring these
STM boards to the Arduino IDE.
Dan

RogerClark
Tue Jan 23, 2018 12:37 am
[djw – Mon Jan 22, 2018 11:27 pm] –
WooooooooHooooooo!
It works! YES
Nothing better than pounding Windoze into submission.
Thank you very much for your diligence, and for working to bring these
STM boards to the Arduino IDE.
Dan

Hi Dan

I’ll set the title to [Solved ……. ] but can you tell us how you fixed it.


fpiSTM
Tue Jan 23, 2018 5:23 am
Sum up of the solution:

Add to the windows environment variable %PATH%:
C:\windows\system32;


RogerClark
Tue Jan 23, 2018 5:28 am
Ah OK.

Its the new build options / recipe hook changes that were the problem

Thanks


fpiSTM
Tue Jan 23, 2018 5:35 am
[RogerClark – Tue Jan 23, 2018 5:28 am] –
Ah OK.

Its the new build options / recipe hook changes that were the problem

Thanks

yes :roll:
Now it should be ok. I will add to my test list test as standard user (non admin) with the Arduino default installation path.


Leave a Reply

Your email address will not be published. Required fields are marked *