Errors while building in VSCode

I’ve installed PlatformIO in VSCode and I’m trying to compile the Marlin firmware within it. When I hit build, it tries to download a few packages but the process exits with an error. Since this is a known issue, I tried Step 2 of the FAQ but that didn’t help either. When I try to download the files manually, I get a Forbidden! error (with curl it simply creates a zero bytes files). How do I fix this?

Edit: This is the output at the terminal:

Executing task: C:\Users\Hrishikesh\.platformio\penv\Scripts\platformio.exe run --target clean <


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

PackageManager: Installing toolchain-gccarmnoneeabi @ >=1.60301.0
Downloading  [#-----------------------------------]    3%  00:05:14
Downloading...
Error: Please read http://bit.ly/package-manager-ioerror
Warning! Package Mirror: ("Connection broken: ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None)", ConnectionResetError(10054, 'An existing connection was forcibly 
closed by the remote host', None, 10054, None))
Looking for another mirror...
Error: Could not install 'toolchain-gccarmnoneeabi' with version requirements '>=1.60301.0' for your system 'windows_x86'.

Please try this solution -> http://bit.ly/faq-package-manager
The terminal process terminated with exit code: 1

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

Which files/packages are you trying to download? What curl command line? Maybe a server is down, or something on your end is blocking it.

My bad! I’ve edited the Q with the output I see on the terminal. Trying to install toolchain-gccarmnoneeabi . Not sure if that is the only one it will need. I’m on a Windows 10 machine with Norton Security installed but I’ve explicitly marked the files, folders and executables as safe. Tried this command:

curl -L "https://dl.bintray.com/platformio/dl-packages/toolchain-gccarmnoneeabi-windows_amd64-1.80301.190214.tar.gz" -o toolchain-gccarmnoneeabi-windows_amd64-1.80301.190214.tar.gz

1 Like

I get a slightly different URL when browsing dl-packages, but still no luck… usually just get a file saying ‘Forbidden’.

@ivankravets Do you know why it’s not possible to download anything from https://dl.bintray.com/platformio/dl-packages/ or https://dl.bintray.com/platformio/dl-platforms/ via the web browser or curl?

1 Like

I was able to get it to work I think, on a fresh install on windows.

[env:nxp]
platform = https://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/0.1.2.zip
board = nxp_lpc1768
framework = arduino

PS C:\Users\jnr28\Documents\PlatformIO\Projects\test> pio run -v
Processing nxp (platform: https://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/0.1.2.zip; board: nxp_lpc1768; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------
CONFIGURATION: https://docs.platformio.org/page/boards/nxplpc-arduino-lpc176x/nxp_lpc1768.html
PLATFORM: NXP Arduino LPC176x 0.1.1 (https://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/0.1.2.zip) > 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.2.3 
 - toolchain-gccarmnoneeabi 1.90201.191206 (9.2.1)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 5 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
arm-none-eabi-g++ -o .pio\build\nxp\src\main.cpp.o -c -std=gnu++17 -fno-rtti -fno-exceptions -fno-use-cxa-atexit -fno-common -fno-threadsafe-statics -Os -ffunction-sections -fdata-sections -fsingle-precision-constant -Wall -mthumb --specs=nano.specs --specs=nosys.specs -mcpu=cortex-m3 -DLPC176X_FRAMEWORK -DTARGET_LPC1768 -DF_CPU=100000000L -DMCU_LPC1768 -DPIO_PLATFORM_VERSION=1001UL -DPIO_FRAMEWORK_VERSION=2003UL -DPLATFORMIO=40304 -DARDUINO_ARCH_LPC176X -DARDUINOLPC=10805 -Iinclude -Isrc -IC:\Users\jnr28\.platformio\packages\framework-arduino-lpc176x\cores\arduino -IC:\Users\jnr28\.platformio\packages\framework-arduino-lpc176x\system\CMSIS\include -IC:\Users\jnr28\.platformio\packages\framework-arduino-lpc176x\system\CMSIS\lib -IC:\Users\jnr28\.platformio\packages\framework-arduino-lpc176x\system\lpc176x src\main.cpp
PS C:\Users\jnr28\Documents\PlatformIO\Projects\test> pio update
Updating contrib-piohome                 @ 3.2.2          [Up-to-date]
Updating contrib-pysite                  @ 2.37.191020    [Up-to-date]
Updating tool-unity                      @ 1.20500.200322 [Up-to-date]
Updating tool-scons                      @ 3.30102.0      [Up-to-date]

Platform Manager
================
Platform Atmel AVR
--------
Updating atmelavr                        @ 2.1.0          [Up-to-date]
Updating toolchain-atmelavr              @ 1.50400.190710 [Up-to-date]
Updating framework-arduino-avr           @ 5.0.0          [Up-to-date]
Platform NXP Arduino LPC176x
--------
Updating nxplpc-arduino-lpc176x          @ 0.1.1          [Detached]
Updating toolchain-gccarmnoneeabi        @ 1.90201.191206 [Up-to-date]
Updating framework-arduino-lpc176x       @ 0.2.3          [Up-to-date]


Library Manager
===============
Library Storage: C:\Users\jnr28\.platformio\lib

Possibly try “pio update” from the command line? Try installing “atmelsam” or “ststm32” as they also rely on “toolchain-gccarmnoneeabi”?

EDIT:
That last bit might not help. It seems “ststm32” relies on an older version of “toolchain-gccarmnoneeabi”
The package server that my system reached out to seems to be working ok though.

PS C:\Users\jnr28\Documents\PlatformIO\Projects\test> pio platform install ststm32
PlatformManager: Installing ststm32
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
ststm32 @ 6.1.0 has been successfully installed!
PackageManager: Installing toolchain-gccarmnoneeabi @ >=1.60301.0,<1.80000.0
Downloading  [####################################]  100%
Unpacking  [####################################]  100%
toolchain-gccarmnoneeabi @ 1.70201.0 has been successfully installed!
The platform 'ststm32' has been successfully installed!
The rest of packages will be installed automatically depending on your build environment.
PS C:\Users\jnr28\Documents\PlatformIO\Projects\test> 
1 Like

Ok Try this!:

pio platform uninstall nxplpc-arduino-lpc176x
pio platform install https://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/0.1.2.zip
pio platform update

This is what mine looks like now:

Platform NXP Arduino LPC176x
--------
Updating nxplpc-arduino-lpc176x          @ 0.1.1          [Detached]
Updating toolchain-gccarmnoneeabi        @ 1.90201.191206 [Up-to-date]

Then this happens on “pio run”

PackageManager: Installing framework-arduino-lpc176x @ >=0.2.2
Downloading...
framework-arduino-lpc176x @ 0.2.3 has been successfully installed!

Then it appears to finish compiling successfully.

Glad it’s working for you now.

What’s the problem re: nxplpc-arduino-lpc176x? From the looks of it, you’re specifically installing 0.1.2.zip, which for some silly reason still says it’s 0.1.1 when you check the manifest in the zip file. :man_facepalming: I presume your platformio.ini specifies that some version of framework-arduino-lpc176x greater or equal to 0.2.2 is required, hence the install of 0.2.3 when you try to build / run it.

1 Like

There is a problem with our account on Bintray. We work with their technical support. Nevertheless, PlatformIO has decentralized architecture and all packages are mirrored. So, if one mirror goes offline the other will replace it.

If we talk about your issue the problem is linked with a custom nxp_lpc1768 dev-platform. Not all packages are mirrored. However, this issue also should be fixed soon with the new PlatformIO Universal Registry where community will be able to publish own dev-platforms and tools. We will mirror them automatically. The new registry is already in testing. We hope to launch it this month.

2 Likes

This seemed to work!

1 Like