diff --git a/VisualTeensy/Embedded/makefile_builder b/VisualTeensy/Embedded/makefile_builder index 77f0b7f..4a8940e 100644 --- a/VisualTeensy/Embedded/makefile_builder +++ b/VisualTeensy/Embedded/makefile_builder @@ -11,7 +11,7 @@ UPL_CLICMD := $(UPL_CLICMD_B)/teensy_loader_cli -mmcu=$(MCU) -v $(TARGET_HEX) .PHONY: all upload uploadTy uploadCLI clean all: - $(BUILDER) $(FLAGS) -build-path=$(BUILD_PATH) -fqbn=$(FQBN) $(HARDWARE) $(TOOLS) $(LIBRARIES) $(SKETCH_NAME) + $(BUILDER) $(FLAGS) -build-path=$(BUILD_PATH) -build-cache=$(BUILD_CACHE) -fqbn=$(FQBN) $(HARDWARE) $(TOOLS) $(LIBRARIES) $(SKETCH_NAME) upload: all $(UPL_PJRC) @@ -22,18 +22,11 @@ uploadTy: all uploadCLI: all @$(UPL_CLICMD) -clean: +clean: @echo Cleaning user binaries... - @if exist $(BUILD_PATH)/core rd /s/q "$(BUILD_PATH)/core" - @if exist $(BUILD_PATH)/libraries rd /s/q "$(BUILD_PATH)/libraries" - @if exist $(BUILD_PATH)/pch rd /s/q "$(BUILD_PATH)/pch" - @if exist $(BUILD_PATH)/preproc rd /s/q "$(BUILD_PATH)/preproc" - @if exist $(BUILD_PATH)/sketch rd /s/q "$(BUILD_PATH)/sketch" - - @if exist "$(BUILD_PATH)/*.eep" del $(subst /,\,$(BUILD_PATH)/*.eep) - @if exist "$(BUILD_PATH)/*.elf" del $(subst /,\,$(BUILD_PATH)/*.elf) - @if exist "$(BUILD_PATH)/*.lst" del $(subst /,\,$(BUILD_PATH)/*.lst) - @if exist "$(BUILD_PATH)/*.sym" del $(subst /,\,$(BUILD_PATH)/*.sym) - @if exist "$(BUILD_PATH)/*.json" del $(subst /,\,$(BUILD_PATH)/*.json) - @if exist "$(BUILD_PATH)/*.cache" del $(subst /,\,$(BUILD_PATH)/*.cache) + @if exist .vsteensy\build rd /s/q .vsteensy\build + @md .vsteensy\build + + @if exist .vsteensy\cache rd /s/q .vsteensy\cache" + @md .vsteensy\cache @echo done diff --git a/VisualTeensy/Properties/AssemblyInfo.cs b/VisualTeensy/Properties/AssemblyInfo.cs index cc86fdc..963d1ad 100644 --- a/VisualTeensy/Properties/AssemblyInfo.cs +++ b/VisualTeensy/Properties/AssemblyInfo.cs @@ -50,7 +50,7 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.9.9.1")] +[assembly: AssemblyVersion("0.9.9.2")] [assembly: AssemblyFileVersion("0.0.0.0")] [assembly: NeutralResourcesLanguage("en")] diff --git a/vtCore/Implementation/Project Generators/Makefiles/Makefile_Builder.cs b/vtCore/Implementation/Project Generators/Makefiles/Makefile_Builder.cs index 944bc22..a60049e 100644 --- a/vtCore/Implementation/Project Generators/Makefiles/Makefile_Builder.cs +++ b/vtCore/Implementation/Project Generators/Makefiles/Makefile_Builder.cs @@ -35,14 +35,14 @@ static public string generate(IProject project, LibManager libManager, SetupData mf.Append(makeEntry("BOARD_ID := ", "build.board", options) + "\n"); mf.Append(makeEntry("MCU := ", "build.mcu", options) + "\n\n"); - mf.Append($"BUILDER_BASE := {setup.arduinoBase}\n"); + mf.Append($"BUILDER_BASE := \"{setup.arduinoBase}\"\n"); mf.Append($"FLAGS := -verbose=1 -warnings=all\n"); - mf.Append($"FQBN := {cfg.selectedBoard.fqbn}\n"); - mf.Append($"BUILD_PATH := $(abspath .vsTeensy/build)\n"); + mf.Append($"FQBN := {cfg.selectedBoard.fqbn}\n"); + mf.Append($"BUILD_PATH := \"{Path.Combine(project.path,".vsteensy/build")}\"\n").Replace("/","\\"); + mf.Append($"BUILD_CACHE := \"{Path.Combine(project.path,".vsteensy/cache")}\"\n").Replace("/", "\\"); - mf.Append($"HARDWARE := -hardware=\"{setup.arduinoBase}/hardware\"\n"); - // mf.Append($"TOOLS := \"{Helpers.getShortPath(setup.arduinoBase+"\\tools-builder")}\"\n\n"); + mf.Append($"HARDWARE := -hardware=\"{setup.arduinoBase}/hardware\"\n"); mf.Append($"TOOLS := -tools=\"{(setup.arduinoBase + "\\tools-builder")}\"\n\n"); mf.Append($"LIBRARIES := -built-in-libraries=\"{setup.arduinoBase}/libraries\"\n"); diff --git a/vtCore/Implementation/Project Generators/Starter.cs b/vtCore/Implementation/Project Generators/Starter.cs index 8eb7b4d..b04b9d9 100644 --- a/vtCore/Implementation/Project Generators/Starter.cs +++ b/vtCore/Implementation/Project Generators/Starter.cs @@ -8,7 +8,7 @@ static public void start_vsCode(string folder, string file) { var vsCode = new Process(); vsCode.StartInfo.FileName = "cmd"; - vsCode.StartInfo.Arguments = $"/c code \"{folder}\" {file}"; + vsCode.StartInfo.Arguments = $"/c code \"{folder}\" \"{file}\""; vsCode.StartInfo.WorkingDirectory = folder; vsCode.StartInfo.UseShellExecute = false; vsCode.StartInfo.CreateNoWindow = true;