My project: I want to use a 64x64 Led matrix on my esp32. I previously used the smartmatrix libray (https://github.com/pixelmatix/SmartMatrix) with the arduino bootloader. This worked fine. Because of the other parts of my project I switched to Espruino. Currently there is no support for 64x64 Hub75e led matrix by the graphics library of espruino.
I came accross the tutorial to extend the espruino firmware with own c code (https://www.espruino.com/Extending+Espruino+1). I had the idea to include the awesome smartmatrix library to the espruino firmware. Following this tutorial I added my own library to the build (libs/smartmatrix) and include the "SmartMatrix3.c" (inside jswrap_smartmatrix.c) from there. I also added the library to the makefile of the firmware to include it in the build:
Line 576-580 in the Makefile:
DEFINES += -DSMARTMATRIX
INCLUDE += -I$(ROOT)/libs/smartmatrix
WRAPPERSOURCES += libs/smartmatrix/jswrap_smartmatrix.c
I also managed to include the Arduino.h and pins_arduino.h (smartmatrix uses it)
But If I want to build the firmware with:
source scripts/provision.sh ESP32
make clean && BOARD=ESP32 SMARTMATRIX=1 make
The Build fails! (see Make_output.txt and MatrixCommon.h)
After some research I found out that the MatrixCommon.h maybe get compiled in C not C++. But how can I tell the make command to compile it in c++ ?
You can download the whole output text and project: https://drive.google.com/open?id=1vbG4zvenzEVJQdQchtOwsvJmBxBOPwYP
I dont know If someone understand my problem. Please share your thougts.