PlatformIO Community

PIO lib dependencies - need help!


I have an arduino program that is divided into 2 parts: software that is hardware agnostic, works on both the arduino and on the desktop. And then I have hardware specific software: software that uses the arduino libraries.

I want to test the software agnostic stuff on my pc, and test the hardware specific software(firmware) on the arduino. I am using the unit testing framework for plus.

Here is my lib folder structure:

lib ->
-----------| -> belt
-----------| -> firmware
---------------| -> arduinocontroller.h
---------------| -> arduinocontroller.cpp
-----------| -> software
---------------| -> mainbelt.h

There are 2 problems here: 1) mainbelt.h requires arduinocontroller.h 2) when I try and include any header file from the lib folder into my unit tests, it says that the header files doesn’t exist(no such file or directory).

What is the proper way to set this up?


Could you provide a simple project to reproduce this issue?