After adding "custom" framework source file not detected

So, I added a new framework, by copying the arduinoavr one and changing it’s name to test the procedure.

I followed @ivankravets instructions from this topic. I’m pretty sure I did all the steps. And I also added support for the new framework in the project’s local libs.

But when I try to build my project with this new framework (the board has the framework added to it’s list aswell), I get two errors:

1- Framework incompatible library /Users/gianpaolo/.platformio/packages/framework-sotem/libraries/Bridge (this goes on for all the libs)

2- Error: Nothing to build. Please put your source code files to '/Users/gianpaolo/Dev/Xenitt/SOTEM/testemisor/src'

If I change the environment to a board using framework-arduinoavr like the UNO, it builds fine. I’ don’t know what I’m missing.

This is the full build output in any case:

14:10:03 Building the project | Processing...
[ Deviot 1.2.5 ] testemisor.ino
[Thu Oct 20 14:10:03 2016] Processing sotem (platform: atmelavr, board: sotem, framework: sotem)
--------------------------------------------------------------------------------
Framework incompatible library /Users/gianpaolo/.platformio/packages/framework-sotem/libraries/Bridge
Framework incompatible library /Users/gianpaolo/.platformio/packages/framework-sotem/libraries/EEPROM
Framework incompatible library /Users/gianpaolo/.platformio/packages/framework-sotem/libraries/Esplora
Framework incompatible library /Users/gianpaolo/.platformio/packages/framework-sotem/libraries/Ethernet
Framework incompatible library /Users/gianpaolo/.platformio/packages/framework-sotem/libraries/Firmata
Framework incompatible library /Users/gianpaolo/.platformio/packages/framework-sotem/libraries/GSM
Framework incompatible library /Users/gianpaolo/.platformio/packages/framework-sotem/libraries/HID
Framework incompatible library /Users/gianpaolo/.platformio/packages/framework-sotem/libraries/Keyboard
Framework incompatible library /Users/gianpaolo/.platformio/packages/framework-sotem/libraries/LiquidCrystal
Framework incompatible library /Users/gianpaolo/.platformio/packages/framework-sotem/libraries/Mouse
Framework incompatible library /Users/gianpaolo/.platformio/packages/framework-sotem/libraries/RobotIRremote
Framework incompatible library /Users/gianpaolo/.platformio/packages/framework-sotem/libraries/Robot_Control
Framework incompatible library /Users/gianpaolo/.platformio/packages/framework-sotem/libraries/Robot_Motor
Framework incompatible library /Users/gianpaolo/.platformio/packages/framework-sotem/libraries/SD
Framework incompatible library /Users/gianpaolo/.platformio/packages/framework-sotem/libraries/SPI
Framework incompatible library /Users/gianpaolo/.platformio/packages/framework-sotem/libraries/Scheduler
Framework incompatible library /Users/gianpaolo/.platformio/packages/framework-sotem/libraries/Servo
Framework incompatible library /Users/gianpaolo/.platformio/packages/framework-sotem/libraries/SoftwareSerial
Framework incompatible library /Users/gianpaolo/.platformio/packages/framework-sotem/libraries/SpacebrewYun
Framework incompatible library /Users/gianpaolo/.platformio/packages/framework-sotem/libraries/Stepper
Framework incompatible library /Users/gianpaolo/.platformio/packages/framework-sotem/libraries/TFT
Framework incompatible library /Users/gianpaolo/.platformio/packages/framework-sotem/libraries/Temboo
Framework incompatible library /Users/gianpaolo/.platformio/packages/framework-sotem/libraries/USBHost
Framework incompatible library /Users/gianpaolo/.platformio/packages/framework-sotem/libraries/WiFi
Framework incompatible library /Users/gianpaolo/.platformio/packages/framework-sotem/libraries/Wire
More details about "Library Compatibility Mode": http://docs.platformio.org/en/stable/librarymanager/ldf.html#ldf-compat-mode
Collected 3 compatible libraries
Looking for dependencies...
Project does not have dependencies
Error: Nothing to build. Please put your source code files to '/Users/gianpaolo/Dev/Xenitt/SOTEM/testemisor/src' folder
========================== [ERROR] Took 0.76 seconds ==========================

================================== [SUMMARY] ==================================
Environment sotem   [ERROR]
Environment uno [SKIP]
========================== [ERROR] Took 0.76 seconds ==========================
14:10:04 ERROR | it took 1.04s

Help much appreciated! Thanks!

What does mean SOTEM? Where can I see the source code? Temporary please take a look at Library Dependency Finder (LDF) — PlatformIO v6.1 documentation

It’s just the name of the overall project I am working on, I’m testing to add a new framework because I’ll need to tweak the arduino core a bit and I don’t want to mess with the defaults. Also, the source code is not the issue, I get the same output with a clean project without any libraries and just consisting of empty setup() and loop().

Adding lib_compat_mode = 0 clears the library warnings. The library warnings don’t make much sense to me anyways, considering the frameworks are identical. excepto for the name.

I’ll go through the steps once again just in case.

Upon further experimentation, changing the source file from .ino to .cpp, it is now detected. I had to add #include "Arduino.h and in combination with lib_compat_mode = 0, the building process behaves normally.

My guess for the source code error is there’s another configuration in the platform, regarding the file types it’s child frameworks can handle?

Regarding the library warnings, no clue yet.

See
https://github.com/platformio/platformio/blob/develop/platformio/builder/tools/platformio.py#L249

How about to use Arduino framework but to have an own core? We will merge your core with existing framework source code.

I guess that’s a great idea to have it run “clean”. Adding the framework makes a little more sense to me since the new element is upper in the tree and easier to find and /or realize it’s user added. l’d still be interesting to identify the origin of the library warning.

I’ll report back after I test adding the core to arduinoavr, thanks a lot!

I’ve just published source code of Arduino Framework GitHub - platformio/platformio-pkg-framework-arduinoavr: Please forward all issues to https://github.com/platformio/platform-atmelavr

Pleaase make PR to it.

Added the (dirty) hacked core and it works!. I’m not sure a pull request is useful, I only specifically modified ‘delayMicroseconds()’ to the one implemented in the teensy core (it supports more frequencies) and I don’t know if it breaks other micros. Unless you wanted me to pr something else and I didn’t understand.

Thanks a lot!

I understand now what do you mean. I thought that you developed new framework that is similar to Arduino :slight_smile:

Please skip my posts with PR above.

1 Like