Skip to content

Cannot upgrade platformio lib to pio pkg to install library EspSoftwareSerial #4410

Description

@Erriez

Configuration

Operating system: Ubuntu 22.04

PlatformIO Version: PlatformIO Core, version 6.1.4

Description of problem

I'm porting CI build scripts from legacy platformio lib to pio pkg install, but does not work for a specific library.

Background: The developer of library EspSoftwareSerial@6.16.1 introduced a filename conflict src/SoftwareSerial.[c|h] as this library can only be used for ESP targets, not AVR. For this reason, it cannot be installed globally. A workaround was to install this library directly in the ESP libraries framework directory: .platformio/packages/framework-arduinoespressif32/libraries/EspSoftwareSerial/.

Legacy code (worked):

$ platformio lib --storage-dir ~/.platformio/packages/framework-arduinoespressif32/libraries install "EspSoftwareSerial@6.16.1"

Install ESPSoftwareSerial into framework-arduinoespressif32 to prevent conflicts with generic name SoftwareSerial

WARNING: This command is deprecated and will be removed in the next releases. 
Please use `pio pkg install` instead.

Library Manager: Installing EspSoftwareSerial @ 6.16.1
Unpacking  [####################################]  100%
Library Manager: EspSoftwareSerial@6.16.1 has been installed!

New code (does not work):

$ pio pkg install --storage-dir ~/.platformio/packages/framework-arduinoespressif32/libraries --library "EspSoftwareSerial@6.16.1"

Error: Not a PlatformIO project. `platformio.ini` file has not been found in current working directory
(/home/user/Arduino/libraries/ErriezLibrary). 
To initialize new project please use `platformio project init` command

Steps to Reproduce

Execute the commands above.

If problems with PlatformIO Build System:

The content of platformio.ini:
Not applicable, building directly an Arduino IDE sketch from the commandline.

Source file to reproduce issue:
See above.

Any suggestions how to proceed?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions