Closed playduck closed 1 year ago
I actually wanted to upload a project pico-st7735-demo, which was not done yet (well, the repo is there, but the content is still on my machine). I'll have to test if my version compiles and push the version. It basically moves the demo code from the lib to demonstrate the usage. But I think you are close already.
The only difference I see at first glance is that I use
add_subdirectory(pico-st7735)
instead of
add_subdirectory(pico-st7735/lib-st7735)
maybe you want to try this.
I just tried that (with clearing the cache). It unfortunately results in the same behavior.
Hm, I will check tomorrow. (BTW: cool projects in your repos :-)
I updated this library. Note that the library now has a tft-initialization-routine which you should call from your code.
Also, the demo-code is now in https://github.com/bablokb/pico-st7735-demo. This repo shows how to include the lib as a submodule.
Please check if this solves your problems.
Yes, the new repo worked as expected! Thank you.
I don't know why my solution didn't seem to work but i'll take it.
I'm trying to use this library as a module for a project. I'm using it as a git submodule, thus the folder structure is identical to this repository.
The file structure looks something like this:
I've left out most files, I hope the idea is clear.
I'm trying to build and link the library from the topmost CMakeLists file.
Here I'm defining all parameters like
SPI_TFT_PORT
,SPI_TFT_CS
and so on.Then I'm including the subdirectory
add_subdirectory(pico-st7735/lib-st7735)
. After that simple linking ittarget_link_libraries(${PROJECT_NAME} lib-st7735)
.The library is built successfully at
/build/pico/st7735/lib-st7735/liblib-st7735.a
The process fails however at the linker stage whereby numerous errors to undefined references are found (for example to
TFT_BlackTab_Initialize()
, this function and others are definitely included in the compilation).Does the library support to be built this way or am I doing something wrong/is there a problem on my end?
The full top-level CMakeLists.txt file i'm using: