luni64 / VisualTeensy

VisualCode projects for PJRC Teensy boards
Other
119 stars 11 forks source link

Error Building Existing Project #62

Closed eethann closed 3 years ago

eethann commented 3 years ago

I followed the instructions in the wiki to import an existing project (see https://github.com/eethann/O_C-HemisphereSuite/tree/production/software/o_c_REV). I selected the Arduino builder after opening that directory. When I try to build using the Build task in terminal, I get the following error:

> Executing task: & 'C:/Program Files (x86)/Arduino/tools/VisualTeensy/make.exe' all   <

make: *** No rule to make target 'all'.  Stop.
The terminal process "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -Command & 'C:/Program Files (x86)/Arduino/tools/VisualTeensy/make.exe' all  " terminated with exit code: 1.

The generated makefile looks like this:

#******************************************************************************
# Generated by VisualTeensy (https:\\github.com\luni64\VisualTeensy)   {DateTime.Now.ToShortDateString()} {DateTime.Now.ToShortTimeString()}
#
# Board              Teensy 3.2 \ 3.1
# USB Type           MIDI
# CPU Speed          120 MHz (overclock)
# Optimize           Faster
# Keyboard Layout    US English
#
# #******************************************************************************
SHELL            := cmd.exe
export SHELL

SKETCH_NAME      := o_c_REV.ino

BOARD_ID         := TEENSY32
MCU              := mk20dx256

BUILDER_BASE     := "C:\Program Files (x86)\Arduino"
FLAGS            := -verbose=1 -warnings=all
FQBN             := teensy:avr:teensy31:usb=midi,speed=120,opt=o2std,keys=en-us
BUILD_PATH       := "C:\Users\ethan\Documents\projects\oc_hemispheres\O_C-HemisphereSuite\software\o_c_REV\.vsteensy\build"
BUILD_CACHE      := "C:\Users\ethan\Documents\projects\oc_hemispheres\O_C-HemisphereSuite\software\o_c_REV\.vsteensy\cache"
HARDWARE         := -hardware="C:\Program Files (x86)\Arduino/hardware"
TOOLS            := -tools="C:\Program Files (x86)\Arduino\tools-builder"

LIBRARIES        := -built-in-libraries="C:\Program Files (x86)\Arduino/libraries"
LIBRARIES        := -libraries="C:\Users\ethan\Documents\Arduino\libraries"
UPL_PJRC_B       := C:\PROGRA~2\Arduino\hardware\tools
UPL_TYCMD_B      := C:\PROGRA~2\Arduino\hardware\tools
UPL_CLICMD_B     := 

tasks.json looks like this:

{
  "tasks": [
    {
      "label": "Build",
      "group": {
        "kind": "build",
        "isDefault": true
      },
      "command": "C:/Program Files (x86)/Arduino/tools/VisualTeensy/make.exe",
      "args": [
        "all",
        "",
        ""
      ]
    },
    {
      "label": "Clean",
      "group": {
        "kind": "build",
        "isDefault": true
      },
      "command": "C:/Program Files (x86)/Arduino/tools/VisualTeensy/make.exe",
      "args": [
        "clean"
      ]
    },
    {
      "label": "Upload (TyCommander)",
      "group": {
        "kind": "build",
        "isDefault": true
      },
      "command": "C:/Program Files (x86)/Arduino/tools/VisualTeensy/make.exe",
      "args": [
        "uploadTy",
        "",
        ""
      ]
    }
  ],
  "version": "2.0.0",
  "type": "shell",
  "problemMatcher": "$gcc",
  "presentation": {
    "echo": true,
    "clear": true,
    "reveal": "always",
    "focus": false,
    "panel": "shared",
    "showReuseMessage": false
  }
}

Any ideas?

luni64 commented 3 years ago

One of the last releases introduced a bug leading to a non complete makefile in builder mode. Should be fixed in v1.3.2.
Compiles here with settings T3.2, 120MHz, USB midi

luni64 commented 3 years ago

Sorry v1.3.2 was merged incorrectly. Please use v1.3.3

eethann commented 3 years ago

Works! Really great utility, thank you so much for building and sharing. So much better than Arduino IDE but without having to migrate whole legacy apps to platform.io.

One thing I'm seeing is that the Teensy PJRC loader still starts up even though only the Ty loader was given. I can run the Ty loader using upload, but the PJRC loader is run by default as part of the build task.

luni64 commented 3 years ago

One thing I'm seeing is that the Teensy PJRC loader still starts up even though only the Ty loader was given. I can run the Ty loader using upload, but the PJRC loader is run by default as part of the build task.

This is done by the builder, Can't change it from VisualTeensy. You might have a look at platform.txt maybe it is defined somewhere in this file.