Help with SKR 1.3 platformIO build failures

I finally got my control board and I’m trying to compile/build and upload the firmware for it. I’m trying to use the firmware from this thread: MPCNC Build Complete (until my next good idea) - #47 by blomsd

While I’m somewhat familiar with arduino’s sketch environment, trying to use PlatformIO has been frustrating to say the least. I could not get Atom to work at all, it would just lock up and shut down when I tried to do anything, so I am using Visual Studio.

My board is connected and I was able to upload a base copy of Marlin 2.0 to it without issue, so I know the connection is good.

Any attempts to build or upload the firmware from the above forum link results in the error below, I’ve been rooting through files & lines for the last four hours, googling everything I could to try to get to the bottom of this, but I’ve come up dry. Can anyone point me in the right direction?

Executing task in folder MPCNC-SKR1.3-TMC2208UART-master: C:\Users\Ray.platformio\penv\Scripts\platformio.exe run <

Processing LPC1768 (platform: https://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/master.zip; framework: arduino; board: nxp_lpc1768)

Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: https://docs.platformio.org/page/boards/nxplpc-arduino-lpc176x/nxp_lpc1768.html
PLATFORM: NXP Arduino LPC176x 0.1.0 > NXP LPC1768
HARDWARE: LPC1768 100MHz, 31.97KB RAM, 464KB Flash
DEBUG: Current (cmsis-dap) On-board (cmsis-dap) External (blackmagic, jlink)
PACKAGES:

  • framework-arduino-lpc176x 0.1.3
  • toolchain-gccarmnoneeabi 1.90201.191206 (9.2.1)
    Converting Marlin.ino
    LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
    LDF Modes: Finder ~ off, Compatibility ~ strict
    LibraryManager: Installing Adafruit NeoPixel
    Using cache: C:\Users\Ray.platformio.cache\15\b58c51ea6e656569f518a720d934cc15
    Unpacking…
    FileNotFoundError: [Errno 2] No such file or directory: ‘C:\Users\Ray\Desktop\Motion Control\Arduino Programming\SKR V1_3 MPCNC Firmware\MPCNC-SKR1.3-TMC2208UART-master\.pio\libdeps\LPC1768\_tmp_installing-dhf1x79x-package\Adafruit_NeoPixel-master\examples\StrandtestArduinoBLECallback\StrandtestArduinoBLECallback.ino’:
    File “C:\Users\Ray.platformio\penv\lib\site-packages\platformio\builder\main.py”, line 168:
    env.SConscript(“$BUILD_SCRIPT”)
    File “C:\Users\Ray.platformio\packages\tool-scons\script..\engine\SCons\Script\SConscript.py”, line 597:
    return _SConscript(self.fs, *files, **subst_kw)
    File “C:\Users\Ray.platformio\packages\tool-scons\script..\engine\SCons\Script\SConscript.py”, line 286:
    exec(compile(scriptdata, scriptname, ‘exec’), call_stack[-1].globals)
    File “C:\Users\Ray.platformio\platforms\nxplpc-arduino-lpc176x@src-48df7c40646077dcb9b837ea66aff7b8\builder\main.py”, line 148:
    target_elf = env.BuildProgram()
    File “C:\Users\Ray.platformio\packages\tool-scons\script..\engine\SCons\Environment.py”, line 219:
    return self.method(*nargs, **kwargs)
    File “C:\Users\Ray.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py”, line 62:
    env.ProcessProjectDeps()
    File “C:\Users\Ray.platformio\packages\tool-scons\script..\engine\SCons\Environment.py”, line 219:
    return self.method(*nargs, **kwargs)
    File “C:\Users\Ray.platformio\penv\lib\site-packages\platformio\builder\tools\platformio.py”, line 131:
    project_lib_builder = env.ConfigureProjectLibBuilder()
    File “C:\Users\Ray.platformio\packages\tool-scons\script..\engine\SCons\Environment.py”, line 219:
    return self.method(*nargs, **kwargs)
    File “C:\Users\Ray.platformio\penv\lib\site-packages\platformio\builder\tools\piolib.py”, line 1036:
    project.install_dependencies()
    File “C:\Users\Ray.platformio\penv\lib\site-packages\platformio\builder\tools\piolib.py”, line 868:
    lm.install(uri)
    File “C:\Users\Ray.platformio\penv\lib\site-packages\platformio\managers\lib.py”, line 281:
    force=force,
    File “C:\Users\Ray.platformio\penv\lib\site-packages\platformio\managers\package.py”, line 702:
    pkg_dir = self._install_from_url(name, url, requirements, track=True)
    File “C:\Users\Ray.platformio\penv\lib\site-packages\platformio\managers\package.py”, line 482:
    self.unpack(dlpath, tmp_dir)
    File “C:\Users\Ray.platformio\penv\lib\site-packages\platformio\managers\package.py”, line 222:
    return fu.unpack(dest_dir, with_progress=False)
    File “C:\Users\Ray.platformio\penv\lib\site-packages\platformio\unpacker.py”, line 149:
    self._unpacker.extract_item(item, dest_dir)
    File “C:\Users\Ray.platformio\penv\lib\site-packages\platformio\unpacker.py”, line 39:
    self._afo.extract(item, dest_dir)
    File “C:\Users\Ray.platformio\python37\lib\zipfile.py”, line 1602:
    return self._extract_member(member, path, pwd)
    File “C:\Users\Ray.platformio\python37\lib\zipfile.py”, line 1673:
    open(targetpath, “wb”) as target:
    ================================================================================================== [FAILED] Took 0.99 seconds ==================================================================================================

Environment Status Duration


megaatmega2560 IGNORED
megaatmega1280 IGNORED
at90usb1286_cdc IGNORED
at90usb1286_dfu IGNORED
DUE IGNORED
DUE_USB IGNORED
DUE_debug IGNORED
LPC1768 FAILED 00:00:00.993
LPC1769 IGNORED
melzi IGNORED
melzi_optiboot IGNORED
rambo IGNORED
sanguino_atmega644p IGNORED
sanguino_atmega1284p IGNORED
STM32F103RE IGNORED
STM32F103RC_fysetc IGNORED
STM32F103RC_bigtree IGNORED
STM32F103RC_bigtree_USB IGNORED
STM32F4 IGNORED
STM32F7 IGNORED
ARMED IGNORED
STM32F103VE_longer IGNORED
mks_robin IGNORED
mks_robin_lite IGNORED
mks_robin_mini IGNORED
mks_robin_nano IGNORED
jgaurora_a5s_a1 IGNORED
STM32F407VE_black IGNORED
BIGTREE_SKR_PRO IGNORED
BIGTREE_BTT002 IGNORED
teensy31 IGNORED
teensy35 IGNORED
STM32F103CB_malyan IGNORED
esp32 IGNORED
fysetc_f6_13 IGNORED
linux_native IGNORED
SAMD51_grandcentral_m4 IGNORED
include_tree IGNORED
============================================================================================= 1 failed, 0 succeeded in 00:00:00.993 =============================================================================================
The terminal process “C:\Users\Ray.platformio\penv\Scripts\platformio.exe ‘run’” terminated with exit code: 1.

Terminal will be reused by tasks, press any key to close it.

Don’t try to upload directly with that board (at least until you have a good process going). You should be able to compile it without uploading it and then copy the bin to the sd card.

Try a clean though (I think it is a trash can in the gui). Then try to build again.

What firmware are you trying to build? Dual endstops? Which drivers?

Try this firmware. It’s based on 2.0.5.3 and @blomsd version. Should build with PlatformIO just fine.

Curtis,
That firmware seems to build & upload just fine. Thank you for the help. I won’t be able to get the board wired up tonight, but I hope to be able to test it in the morning.

Jeffeb3,
I have tried a clean on the firmware I was trying to use, but it didn’t seem to change anything.
I’m looking to duplicate the blomsd build: SKR 1.3 w/ 2208 UART, dual endstops, & TFT35 V2.0 display.

1 Like

@ockray83 if you’re doing the same build, here’s updated firmware for the TFT35 v2.0 as well and will build in PlatformIO.

This has all @jeffeb3 latest updates and it works great. I believe this may be the V1 standard at some point, at least I hope so. Been using it for a few days now without issue and all the improvements really help.

1 Like

Darn. I have a version for 2209s for 2.0.6, but not for 2208s. Glad you got something working.

I hooked up some motors on the bench this morning and everything moves as it should. I struggled to get the board talking with repetier, which refused to connect no matter what settings I used. Without changing anything CNCJS worked fine though. I also tested the touch screen and its working fine as far as I can test now.

Hopefully I’ll be able to finish up the wiring this evening.

Thanks again for the help. I’m sure I’ll have some tweaking to do once I get the board on the router, but this was a big step forward.

Everything is wired up and all the motors are spinning the correct directions. So nice to see the router doing more than collecting dust, waiting for the controller to arrive.

My only issue now is with the endstops. Mine are wired N/C and I believe the firmware is configured for N/O: Giving a home command for an axis with endstops depressed will result in the axis moving until the switches are released.

Unless I’m mistaken, this should be a simple matter of changing a couple of lines in configuration and reuploading, correct?

You just need to change ENDSTOP_INVERTING in the Configuration.h file. That should have you squared away. You can check their status with M119 as well.

That did it. I’ve got the endstops functioning as they should. Thank you for pointing me in the right direction on the endstop inversion.

Looks like tomorrow this thing might make its first cuts!

I tried this touch panel update today and while it loaded fine, I was met with a constant beeping error on the home screen that begins with “M22…something” but the scrolling ticker screen would reset itself so fast I could never catch the other digits. I couldn’t find the screen/icons to zero my axes either, everything seemed to be centered around a 3d printer build, so I’ve reverted back to the older firmware for now.

The older firmware seems to be fine other than my attempt to use the pause function during a cut earlier today. I just wanted to test the function but upon resuming, the router decided to make its own path, arcing away from the home/zero position, right off the workpiece.

Did I do something wrong in the update that resulted in the errors/default icons? I used the folder labeled “unified menu material theme” since it seemed to contain some of the customized bmp files.

Should have been 3 things copied to root of your SD card.

  • TFT35 dir from the unified theme
  • “…\BIGTREETECH-TouchScreenFirmware\TFT\src\User\config.ini”
  • “…\BIGTREETECH-TouchScreenFirmware.pio\build\BIGTREE_TFT35_V2_0\BIQU_TFT35_APP1_V2.0.26.x.bin”

Then restart the TFT and let everything load. Will take some time to complete.

I don’t have a README yet with useful instructions, but these files are what were in my repo on the loki branch, and are now in the V1 main branch:

You need to unzip the TFT35, and copy that folder, the bin, and the .ini onto the SD card. Put the SD card in and reset. It should take a few minutes to copy everything, and when it’s done it should boot to cnc mode.

1 Like

I tried copying those files from the link Curtis provided and got a default looking 3d printer control screen.

I just tried the files from the link you provided and I got the same result, but in the middle of the updating process, I did notice the screen calling out invalid keywords, such as Laser and Touchplate.

Ok. I can check it out later tonight.

It’s a v2.0 TFT screen so needs a different bin file.

You need to compile the firmware in PlatformIO. Then you will have the proper bin file. After compiling, copy the three items listed below to the root of the SD card. All will be found in your BIGTREETECH-TouchScreenFirmware folder.

  • “…\BIGTREETECH-TouchScreenFirmware\Copy to SD Card root directory to update - Unified Menu Material theme\TFT35”
  • “…\BIGTREETECH-TouchScreenFirmware\TFT\src\User\config.ini”
  • “…\BIGTREETECH-TouchScreenFirmware\.pio\build\BIGTREE_TFT35_V2_0\BIQU_TFT35_APP1_V2.0.26.x.bin”

Here’s the precompiled files needed if you have issues with PlatformIO:

1 Like

I added the V2.0 bin.

1 Like

Thanks for the precompiled files, I tried compiling them myself first but ran into errors.

I uploaded the files you provided and I’ve finally got the touch screen updated.

1 Like

I am getting these errors trying to run (Build) or Even upload any help will be appriecated
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Try the new cross-platform PowerShell https://aka.ms/pscore6

PS C:\Users\N\Desktop\N CNC\V509 2.0.7.2\V1CNC_Skr1p3_DualLR_2209-2.0.7.2-src\Marlin_V1CNC_Skr1p3_DualLR_2209_2.0.7.2_509-src\Marlin> platformio run -e LPC1768
Processing LPC1768 (platform: https://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/0.1.3.zip; board: nxp_lpc-----------------------------------------------------------------------------------------------------------------s.py’: [Errno 2] No such file or directory
========================================== [FAILED] Took 0.09 seconds ==========================================

Environment Status Duration


LPC1768 FAILED 00:00:00.091
===================================== 1 failed, 0 succeeded in 00:00:00.091 =====================================PS C:\Users\N\Desktop\N CNC\V509 2.0.7.2\V1CNC_Skr1p3_DualLR_2209-2.0.7.2-src\Marlin_V1CNC_Skr1p3_DualLR_2209_2.0.7.2_509-src\Marlin> echo “done” >“C:\Users\N\AppData\Local\Temp\ipc”
PS C:\Users\N\Desktop\N CNC\V509 2.0.7.2\V1CNC_Skr1p3_DualLR_2209-2.0.7.2-src\Marlin_V1CNC_Skr1p3_DualLR_2209_2.0.7.2_509-src\Marlin> platformio run -e LPC1768
Processing LPC1768 (platform: https://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/0.1.3.zip; board: nxp_lpc-----------------------------------------------------------------------------------------------------------------C:\Users\N.platformio\python3\python.exe: can’t open file ‘C:\Users\N.platformio\packages\tool-scons\scons.py’: [Errno 2] No such file or directory
========================================== [FAILED] Took 0.09 seconds ==========================================

Environment Status Duration


LPC1768 FAILED 00:00:00.092
===================================== 1 failed, 0 succeeded in 00:00:00.092 =====================================PS C:\Users\N\Desktop\N CNC\V509 2.0.7.2\V1CNC_Skr1p3_DualLR_2209-2.0.7.2-src\Marlin_V1CNC_Skr1p3_DualLR_2209_2.0.7.2_509-src\Marlin> echo “done” >“C:\Users\N\AppData\Local\Temp\ipc”
PS C:\Users\N\Desktop\N CNC\V509 2.0.7.2\V1CNC_Skr1p3_DualLR_2209-2.0.7.2-src\Marlin_V1CNC_Skr1p3_DualLR_2209_2.0.7.2_509-src\Marlin>

I am using Visual Studio Code