Include Raspberry compiler in the Arduino IDE


My project consists to create an Raspberry package (cores, variants, libraries...) for Arduino IDE. I just started this, and I created «pinMode(int, int)», «digitalWrite(int pin, int val)» and «digitalRead(int pin)» functions, but when I try to compile this in the Arduino IDE, the editor returned this error:

/home/faf/.arduino15/packages/industrialshields/tools/arm-gnueabihf-gcc/10.2-2020.11/bin/../lib/gcc/arm-none-linux-gnueabihf/10.2.1/../../../../arm-none-linux-gnueabihf/bin/ld: /tmp/arduino_build_166344/sketch/sketch_jan20a.ino.cpp.o: in function `setup()':
/home/faf/Projects/arduino-boards/arch/armgnueabihf/Tests/sketch_jan20a/sketch_jan20a.ino:3: undefined reference to `pinMode(int, int)'
collect2: error: ld returned 1 exit status
exit status 1
Error al compilar per a la placa Raspberry Pi.

My function are initialized correctly in Arduino.h:

#ifndef __ARDUINO_H__
#define __ARDUINO_H__

void pinMode(int, int);
void digitalWrite(int, int);
int digitalRead(int);

void setup(void);
void loop(void);

And if I try to compile this functions normally with gcc and it compile correctly. Any idea about I how can solve this issue.

Those are only function declarations. You didn't provide any definitions, thus the compilation error.

You might take a look at this package for Raspberry Pi to see what others have done in this area:

I forgot to copy the definitions, sorry ... Finally, I was able to fix the problem indicates that my program was written in C and C++. Thanks for your help.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.