PlatformIO Community

Compiling project


#1

Hello all,

I am completly new to the Atom/Platformio enviroment.

And I have a problem with a project from git to compile it.

I am running this on W10

I have installed Atom + Platformio IDE
Also I have installed the command palette and Git(clone) plugin.

This is the project on git: https://github.com/RobertFach/panobot.git

I can prefectly clone this project to my PC, once compiling it Im getting errors’s.
“Error 1” ???

Where can I find the error log?


#2

Can you open a new terminal and execute pio run -v in it for verbose compilation? Also just to be sure you imported this subfolder as the PlatformIO project, right?


#3

Hi,

Yes I have this subfolder imported as my project.

Running the command in terminal gives this at the end of the compile:

In file included from lib\ArduinoMenu library_ID1468\src/menuIO/encoderIn.h:18:0,
from src\panobot.cpp:36:
lib\PCINT r-site.net_ID1503\src/pcint.h:96:14: warning: ‘void PCint(uint8_t)’ declared ‘static’ but never defined [-Wunused-function]
static void PCint(uint8_t port);
^
*** [.pioenvs\megaatmega2560\src\panobot.cpp.o] Error 1


#4

Can you upload the full upload to pastebin.com? This warning shouldn’t be the actual error, it should be in panobot.cpp.


#5

Hi, Thanks for the reply and help :slight_smile:

I am new to pastebin, what do I have to upload? (what files)


#6

Oh sorry, meant to say “upload log”. Execute pio run -v and upload that full text output


#7

Ok, but where can I find the specific log file? what is it called?
Sorry for the noob questions.


#8

When you execute it in the shell you can select all -> copy then paste. I’ve just downloaded the repo myself and see that the error is

from src\panobot.cpp:36:
lib\PCINT r-site.net_ID1503\src/pcint.h: At global scope:
lib\PCINT r-site.net_ID1503\src/pcint.h:55:128: error: narrowing conversion of '-1' from 'int' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]
const uint8_t pcintPinMap[3][8] PROGMEM={{53,52,51,50,10,11,12,13},{0,15,14,-1,-1,-1,-1,-1},{A8,A9,A10,A11,A12,A13,A14,A15}};
^
lib\PCINT r-site.net_ID1503\src/pcint.h:55:128: error: narrowing conversion of '-1' from 'int' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]
lib\PCINT r-site.net_ID1503\src/pcint.h:55:128: error: narrowing conversion of '-1' from 'int' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]
lib\PCINT r-site.net_ID1503\src/pcint.h:55:128: error: narrowing conversion of '-1' from 'int' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]
lib\PCINT r-site.net_ID1503\src/pcint.h:55:128: error: narrowing conversion of '-1' from 'int' to 'uint8_t {aka unsigned char}' inside { } [-Wnarrowing]

I.e. someone put a -1 in an array of unsigned 8-bit integers… I’ll see what fix makes sense, probably should be 255.


#9

This is a known issue with the used “PCINT r-site.net” library, https://github.com/neu-rah/PCINT/issues/4.


#10

Okay, go into the lib\PCINT r-site.net_ID1503\src folder. In the CPP file, change if (p==-1) to if (p==0xff). In the .H file, change every occurrence of -1 in that array to 0xff. Now it compiles.


#11

It works! :stuck_out_tongue: now to see if the upload runs in the device.

And it works!

May I thank you sir…