This repository provides example projects, build support and integration for using tcMenu and related libraries outside the Arduino ecosystem. Supported environments include:
- PlatformIO
- Raspberry Pi Pico SDK
- ESP-IDF
- STM32Cube
- Arduino (almost all boards should work properly)
- mbed 6.0 (archived but probably workable for most cases)
The goal is to make tcMenu libraries usable from native vendor toolchains while maintaining source compatibility with Arduino. Below are the ways you can get TcMenu working quickly in a professional environment:
- Local library development, for those who prefer to have the library source local.
- PlatformIO project the root directory contains a PlatformIO starter project for local libraries.
- Pico SDK for CMake using local libraries. README.md
- Pico SDK for CMake using auto-downloaded libraries. README.md
- ESP32 IDF5 for CMake with scripts and two examples. cmakeEsp32
- STM32Cube Examples require local libraries so do this first and then see https://github.com/TcMenu/stm32-examples for the rest.
You can choose to use this shell directly, or take inspiration from it and roll your own core project. To use with PlatformIO simply open the top-level directory in a suitable IDE, as it has a platformio.ini. To use with CMake, simply open the cmakeProject or cmakeEsp32 directory with a suitable IDE.
Although this is mainly aimed at users and developers of tcMenu based applications, it also serves as a getting started point for you to develop source and build both libraries within an IDE using platformIO or PicoSDK Cmake.
NOTE: For PicoSDK, you have two options, you can either install the libraries as shown below, or you can set build USE_LOCAL_LIBRARIES to OFF and CMake will automatically check out the libraries below.
- https://github.com/TcMenu/TaskManagerIO
- https://github.com/TcMenu/tcMenuLib
- https://github.com/TcMenu/IoAbstraction
- https://github.com/TcMenu/tcUnicodeHelper
- https://github.com/TcMenu/LiquidCrystalIO
- https://github.com/TcMenu/TcMenuLog
From the cmakeProject directory
mkdir lib
cd lib
git clone https://github.com/TcMenu/TaskManagerIO.git
git clone https://github.com/TcMenu/IoAbstraction.git
git clone https://github.com/TcMenu/tcMenuLib.git tcMenu
git clone https://github.com/TcMenu/tcUnicodeHelper.git
git clone https://github.com/TcMenu/LiquidCrystalIO.git
git clone https://github.com/TcMenu/TcMenuLog.git
cd ..
mkdir mbed_lib
git clone https://github.com/TcMenu/Adafruit-GFX-mbed-fork.git
Just import the platformio.ini into your IDE and build.
The unit testing runs natively on the host platform. We've made an IoAbstraction platform for it that minimally mocks GPIO, I2C and SPI.
To run the tests, in the top level CMakeLists.txt enable unit testing: -DBUILD_NATIVE_TESTS=ON. This the project to unit testing mode turning off other board specific code.
The getting started guide is here.
When the local libraries flag is on -DUSE_LOCAL_LIBRARIES=ON it requires libraries be installed as above.
When the local libraries flag is off -DUSE_LOCAL_LIBRARIES=OFF CMake will download the libraries.
The getting started guide is here.
- Follow the steps above to check out the libraries locally
- Clone the examples repository which includes two examples and instructions to get started: https://github.com/TcMenu/stm32-examples