PlattformIO - detected unknown package

Hi there,
I ran into issue with using platformio when attempting to build target for LPC1768.

I enter the nix shell and execute. However I get an error.

$ nix-shell -p platformio
[nix-shell:~/Marlin]$ pio run
Processing LPC1768 (platform: https://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/0.1.3.zip; board: nxp_lpc1768; framework: arduino)
---------------------------------------------------------------------------------------------------------------------
PackageManager: Installing toolchain-gccarmnoneeabi @ >=1.90000

Error: Detected unknown package 'toolchain-gccarmnoneeabi

Any idea what causes the error? I looked at strace and the error happens inside child process. If necessary I can attach the full strace.

[pid  8665] getsockopt(4, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
   10 [pid  8665] getsockname(4, {sa_family=AF_INET, sin_port=htons(45910), sin_addr=inet_addr("10.0.0.35")}, [16]) =
       0
    9 [pid  8665] getpeername(4, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("88.198.170.159")}, [16])
       = 0
    8 [pid  8665] close(4)                    = 0
    7 [pid  8665] flock(3, LOCK_UN)           = 0
    6 [pid  8665] close(3)                    = 0
    5 [pid  8665] stat("/home/cylon2p0/.platformio/packages.lock", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
    4 [pid  8665] unlink("/home/cylon2p0/.platformio/packages.lock") = 0
    3 [pid  8665] stat("/home/cylon2p0/.platformio/packages.lock", 0x7ffce8dfe9d0) = -1 ENOENT (No such file or direc
      tory)
    2 [pid  8665] chdir("/home/cylon2p0/Marlin") = 0
    1 [pid  8665] ioctl(2, TCGETS, 0x7ffce8dfffd0) = -1 ENOTTY (Inappropriate ioctl for device)
16386 [pid  8665] write(2, "Error: Detected unknown package 'toolchain-gccarmnoneeabi'\n", 59Error: Detected unknown
      package 'toolchain-gccarmnoneeabi'
    1 ) = 59
    2 [pid  8665] getcwd("/home/cylon2p0/Marlin", 1024) = 22
    3 [pid  8665] stat("/home/cylon2p0/Marlin/platformio.ini", {st_mode=S_IFREG|0644, st_size=9417, ...}) = 0
    4 [pid  8665] stat("/home/cylon2p0/Marlin/platformio.ini", {st_mode=S_IFREG|0644, st_size=9417, ...}) = 0
    5 [pid  8665] stat("/home/cylon2p0/.platformio", {st_mode=S_IFDIR|0755, st_size=78, ...}) = 0
    6 [pid  8665] getcwd("/home/cylon2p0/Marlin", 1024) = 22

I ran successfully PlatformIO on archlinux so this is probably something specific to NixOS.

I run stable 20.09.

Hi, I’ve seen this problem today when I tried to install PlatformIO, except with with the atmelavr package. Here’s what I did:

  1. add the master channel sudo nix-channel --add https://github.com/NixOS/nixpkgs/archive/master.tar.gz nixpkgs-git;
  2. sudo nix-channel --update;
  3. sudo nix-env -f '<nixpkgs-git>' -iA platformio to install it from the latest git version.
 $ pio project init --ide vim --board uno
Please wait while upgrading PlatformIO...
PlatformIO has been successfully upgraded to 5.0.4!

********************************************************************************
If you like PlatformIO, please:
- follow us on Twitter to stay up-to-date on the latest project news > https://twitter.com/PlatformIO_Org
- star it on GitHub > https://github.com/platformio/platformio
- try PlatformIO IDE for embedded development > https://platformio.org/platformio-ide
********************************************************************************


The current working directory /home/antoine/Code/Projet will be used for the project.

The next files/directories have been created in /home/antoine/Code/Projet
include - Put project header files here
lib - Put here project specific (private) libraries
src - Put project source files here
platformio.ini - Project Configuration File
Platform Manager: Installing atmelavr
Platform Manager: atmelavr @ 3.3.0 has been installed!
Tool Manager: Installing platformio/toolchain-atmelavr @ ~1.70300.0
Downloading  [####################################]  100%          
Unpacking  [####################################]  100%          
Tool Manager: toolchain-atmelavr @ 1.70300.191015 has been installed!
The platform 'atmelavr' has been successfully installed!
The rest of the packages will be installed later depending on your build environment.

Project has been successfully updated including configuration files for `vim` IDE.
                                                                                                          
 $ pio run                                                                                                                          
Processing uno (platform: atmelavr; board: uno)
-------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/atmelavr/uno.html
PLATFORM: Atmel AVR (3.3.0) > Arduino Uno
HARDWARE: ATMEGA328P 16MHz, 2KB RAM, 31.50KB Flash
DEBUG: Current (avr-stub) On-board (avr-stub, simavr)
PACKAGES: 
 - toolchain-atmelavr 1.70300.191015 (7.3.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Compiling .pio/build/uno/src/main.o
avr-as: unrecognized option '-x'
*** [.pio/build/uno/src/main.o] Error 1
==== [FAILED] Took 0.78 seconds ====

And now I don’t have the same error! Let me know how that works for you.

1 Like

Thanks @afontain. Updating to the latest version solved the issue.

It also seems that I didn’t attach the version with this issue and one that solves it.
PlatformIO, version 4.3.4 → version 5.0.4

For the record, I’ve also solved my second issue. It was because I
named the assembly file with “.asm” extension instead of “.S”.

1 Like