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
Normal Topic Projects in folder with a space won´t build (Read 14 times)
Acuario
Senior Member
****
Offline


Posts: 266
Location: Spain
Joined: Aug 28th, 2015
Projects in folder with a space won´t build
Today at 5:30am
Print Post  
I have a project that is in a folder that has a space in it.
The build fails as it looks like the path is not being included in quotes.

I first found the problem with an older version of VM, it failed to upload supporting files due to the space.

Upgrading to the latest VM and to project no longer built.

I have now removed the .sln, .vcxproj, .filters and .user file and renamed the folder without a space and re-opened the Arduino project to recreate the removed files.

Without the space the project builds correctly.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12261
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Projects in folder with a space won´t build
Reply #1 - Today at 5:46am
Print Post  
The quotes are designed into the cores in the platform.txt that installs with whatever package you are using. There are a couple of packages that have missing quotes. We report them to the author when we know which one(s)

We always need the output requested in yellow at the top of the page because that shows us what we need to see.
  
Back to top
IP Logged
 
Acuario
Senior Member
****
Offline


Posts: 266
Location: Spain
Joined: Aug 28th, 2015
Re: Projects in folder with a space won´t build
Reply #2 - Today at 7:35am
Print Post  
Hi Tim,
the problem appears to be in the recipe hooks. 
I put together a quick 4 line project that runs a pre-build script:

In board.txt:
Code
Select All
# Increment version before build
recipe.hooks.sketch.prebuild.1.pattern=cmd.exe /c {build.project_path}\version.bat {build.project_path}\fwversion.h
 


In version.bat

Code
Select All
@echo off
setlocal EnableDelayedExpansion
set "file=%~1"
set "major="
set "minor="
set "version="
for /F "tokens=1,2,3" %%A in (%file%) do (
	if "%%B"=="FWMAJOR" set "major=%%C"
if "%%B"=="FWMINOR" set "minor=%%C"
if "%%B"=="FWVERSION" set "version=%%C" )

for /F "tokens=1,2 delims=." %%A in ("!version!") do (
	set "oldmajor=%%A"
)

if "!major!" NEQ "!oldmajor!" ( set /a minor=0 ) else ( set /a minor+=1 )
(
	echo #define FWMAJOR !major!
	echo #define FWMINOR !minor!
	echo #define FWVERSION !major!.!minor!
) > "%file%" 




Output:

# recipe.hooks.sketch.prebuild.1.pattern
Exec: C:\Users\nigel\AppData\Local\Temp\VMBuilds\Test Space\esp32_esp32s3\Release\.vm_sys\cmd_exec.bat
C:\Arduino\Avionics\Test Space\version.bat C:\Arduino\Avionics\Test Space\fwversion.h
"C:\Users\nigel\AppData\Local\Temp\VMBuilds\Test Space\esp32_esp32s3\Release\.vm_sys\cmd_exec.bat"
   C:\Arduino\Avionics\Test is not recognized as an internal or external command
   operable program or batch file

Supporting files
With the supporting files upload, this fails with the following error:

LITTLEFS Creating Image...
[LITTLEFS] data   : C:\Arduino\Avionics\Test Space\data
[LITTLEFS] offset : 0
[LITTLEFS] size   : 128
[LITTLEFS] page   : 256
[LITTLEFS] block  : 4096
"c:\program files\microsoft visual studio\2022\professional\common7\ide\extensions\hvnkygxf.dmf\Micro Platforms\visualmicro\tools\espressif\fs\mklittlefs.exe" -c "C:\Arduino\Avionics\Test Space\data" -p 256 -b 4096 -s 131072 "C:\Users\nigel\AppData\Local\Temp\VMBuilds\Test Space\esp32_esp32s3\Release\bce8ecd06ccdf1507ccd2590a6c8d6a1/Test Space.ino.littlefs.bin"
/test.html
LITTLEFS Uploading Image...
[LITTLEFS] upload : C:\Users\nigel\AppData\Local\Temp\VMBuilds\Test Space\esp32_esp32s3\Release\bce8ecd06ccdf1507ccd2590a6c8d6a1/Test Space.ino.littlefs.bin
[LITTLEFS] IP     : 192.168.0.212
"python.exe" s\espota.py" -i 192.168.0.212 -p 3232 -s -f C:\Users\nigel\AppData\Local\Temp\VMBuilds\Test Space\esp32_esp32s3\Release\bce8ecd06ccdf1507ccd2590a6c8d6a1/Test Space.ino.littlefs.bin
 
LITTLEFS Upload failed!
usage*: espota.py [-h] [-i ESP_IP] [-I HOST_IP] [-p ESP_PORT] [-P HOST_PORT]
   [-a AUTH] [-m] [-f FILE] [-s] [-d] [-r] [-t TIMEOUT]
espota.py*: error: unrecognized arguments: Space\esp32_esp32s3\Release\bce8ecd06ccdf1507ccd2590a6c8d6a1\Test Space.ino.littlefs.bin

Let me know if you need the full output but I think this pretty much identifies where the problems are.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint