Firmware build fails with library

Posted on
  • 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.


    1 Attachment

  • Sat 2020.03.21

    Hi, @Jonaswinz, as previously mentioned in this post from a week ago:

    ESP32 fatal error: Arduino.h (Led Matrix 64x64)
    http://forum.espruino.com/conversations/344551/

    the above description is a continuation and nearly mirrors the content posted in that thread. This is a firmware build issue with ESP32. Wouldn't posting as a follow-up to that thread be the best location for your request as this forum topic is for those that have created a solution and are providing that content for others to enjoy the fruits of your labor?

    The heading for this topic is shown on the right hand side:

    'Projects: Share what you're working on!'

    http://forum.espruino.com/microcosms/139/

    and not, how to resolve an issue I have.



    While is is understandable that there may be frustrations building firmware should that not be your cup-of-tea, and while there are a couple of individuals like yourself that are attempting to create a solution on an unsupported board, the communitiy of Espruino developers consists primarily of those that support @Gordon and his extraordinary efforts with owning an Espruino flashed on an official supported board.

    http://www.espruino.com/Order



    I looked over that library, and I will agree that making use of the existing functionality would be a great accomplishment, if it can be pared down and reworked to fit within the memory requirements. With the struggles realized so far, wouldn't re-writing each method be a faster alternative to reach that goal?

    Has an attempt been made, creating a very small test library addition with maybe one or two methods using the file format and structure both C and C++ utilize, and learn from the individual build errors moving forward as opposed to attempting a large multi method, multi header first attempt?



    In addition, @allObjects has done extensive code module development using the Graphics class and made several observations in his #4 post there. As I read that, based on his experience, to overcome the flicker issue is likely going to need a major re-write anyway.

  • @Jonaswinz can you push the changes to a branch in your Espruino fork?

  • @Jonaswinz
    Are you working with something like this https://www.aliexpress.com/item/32653944927.html ?
    AFAIK, you would first need a driver for this board before using something like SmartMatrix
    For ESP32 there was a solution from ESP_SPRITE, see https://esp32.com/viewtopic.php?f=17&t=3188
    I've got it working for Espruino some time ago, see https://github.com/jumjum123/EspruinoExtensions/tree/master/Family/ESP32/LED32x64
    Did not follow , but have in mind to need a ESP32 board with PSRAM

  • @Robin
    I am sorry. I understand the "Share what you're working on!" a bit like "I need some help with my project".
    The existing official espruino boards dont fit my needs (ble and wifi), and therefor the only board I can use is the ESP32.
    I thought I could "easily" adapt the smartmatrix library to espruino (save some time), but mabe you are right and I have to dig deeper.

    @MaBe
    Yes I will

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Firmware build fails with library

Posted by Avatar for Jonaswinz @Jonaswinz

Actions