Include libraries from github

lib_deps can only handle one library, not multiple ones, as discussed in How can I create a repository with multiple libraries in it on GitHub and use them in a project?. For that, the repository should also only contain that single library.

Because the PlatformIO core looks for a PlatformIO compatible manifest file (library.json, library.properties, package.json) in the downloaded content to find the actual root of the package, and it finds it in Firmata, and hence takes this as the root directory.

The library you link to is already in the Arduino core for the PIC32 devices, so it also automatically available in PlatformIO which uses that same core. There is no need to download it, just use it.

You will find that if you e.g. do a normal platformio.ini of

[env:mega_pic32]
platform = microchippic32
board = mega_pic32
framework = arduino

and code

#include <Arduino.h>
#include <DSPI.h>

void setup() {}
void loop() {}

that the library will be found without problems.

Scanning dependencies...
Dependency Graph
|-- <DSPI>
Building in release mode
Compiling .pio/build/mega_pic32/src/main.cpp.o
..
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [          ]   2.4% (used 3100 bytes from 131072 bytes)
Flash: [          ]   0.8% (used 4216 bytes from 520192 bytes)
================================= [SUCCESS] Took 3.82 seconds =================================