Coder Social home page Coder Social logo

Adafruit_GFX.h always needed about tm16xx HOT 4 OPEN

maxint-rd avatar maxint-rd commented on May 25, 2024
Adafruit_GFX.h always needed

from tm16xx.

Comments (4)

maxint-rd avatar maxint-rd commented on May 25, 2024 1

Today I ran into a similar problem. When compiling for an ATtiny44A (using ATtinyCore), the latest version of Adafruit GFX along with Adafruit BusIO wouldn't compile due to some missing definition in the latter part. As my project didn't use any GFX functionality I removed the TM16xxMatrixGFX files to get TM16xx compiled without issue.

At the moment I think moving TM16xxMatrixGFX into a separate library might be a good solution to reduce dependencies and avoid compilation errors on MCU's that are not supported by Adafruit GFX. I think there are plenty of people that only use this library for 7-segment displays and don't use the dot-matrix functionality.

from tm16xx.

ev-olution avatar ev-olution commented on May 25, 2024

I was getting same error with TMS1640. Downloaded this library: https://github.com/adafruit/Adafruit-GFX-Library . And now I get another error: "C:......Adafruit-GFX-Library-master\Adafruit_GrayOLED.h:30:10: fatal error: Adafruit_I2CDevice.h: No such file or directory"

Not sure why these errors exist as these libraries are not used.

UPDATE:
I have downloaded this library: https://github.com/adafruit/Adafruit_BusIO . And added missing files from this downloaded zip file to "C:......Documents\Arduino\libraries\Adafruit-GFX-Library-master" directory. Now it compiles without any error messages. Still not sure why this was required...

from tm16xx.

maxint-rd avatar maxint-rd commented on May 25, 2024

Hello, you raise a good point. Thanks!
At the moment I don't know how to dynamically skip including the part of the library that you don't need. As far as I can see the Arduino IDE first builds the library by compiling all cpp files in the folder. After that the sketch .ino is compiled.
I think a work around can be to delete the library files you don't need (TM16xxMatrixGFX.cpp and TM16xxMatrixGFX.h) or to rename them to .txt

The dependencies of the Adafruit GFX library has changed over the past years and now it indeed requires some other Adafruit support files. I think the reason is that they made their library more hardware-independent.

Edit: BTW. When linking the libraries and the sketch, the linker skips linking those parts that are not used, to keep your binary small and not use excess flah space. A library is often compiled just once to speed up subsequent builds, but as time of compiling the library it doesn't know which sections your sketch is using or not.

(See also first posts of this issue ).

from tm16xx.

ev-olution avatar ev-olution commented on May 25, 2024

Thanks for your library! It works to me with a trick from my previous post. And your library is super helpful for my current project. I am using it to drive WINRISE HBS640 driver. Works perfectly with your TMS1640 library.

from tm16xx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.