Getting started

Using pre-built binaries

Pre built binaries are available in the release page. The release package is designed to support cross platform, multi configuration, projects out of the box:

  • For each of the platforms below:

    • ARM Cortex-M0

    • ARM Cortex-M3

    • ARM Cortex-M4

    • ARM Cortex-M7

    • ARM Cortex-M23

    • ARM Cortex-M33

    • ARM Cortex-M35P

    • ARM Cortex-M55

    • ARM Cortex-M85

    • RISC-V RV32IMC

    • CH32V307 (include accessors, testbench is here)

    • STM32L5 (include accessors, testbench is here)

    • STM32U5 (include accessors, testbench is here)

    • Linux (include RAM based accessors, for dev/debug purposes only)

  • The following binaries are included:

    • Debug

    • Size optimized

Building

Prerequisites:
  • Recent compilers (tested on gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 and arm-none-eabi-gcc (xPack GNU Arm Embedded GCC x86_64) 14.2.1 20241119)

  • CMake 3.30 or newer (might also be called cmakesetup, cmake-gui or ccmake depending on the installed version and system)

  • C build system CMake can target (make, Apple Xcode, MinGW, …)

This builds for all supported platforms, result is in “dist” folder:

./build-release

If you want to build just for linux, result is in “build/linux” folder:

./buildit on/linux debug

Linking with lean-ftl

You can verify support for your platform by compiling main.c from the example/hello folder:

#include <lean-ftl.h>
#include <stdio.h>

int main(int argc, char * argv[])
{
  printf("Hello from lean-ftl %lu\n", lftl_version_timestamp());
}
7z x  ~/Downloads/lean-ftl-v0.0.4.7z
gcc examples/hello/main.c -o hello -Idist/debug/liblean-ftl/include \
  -Ldist/debug/liblean-ftl/build/linux/liblean-ftl -llean-ftl
./hello

You should get something like:

Hello from lean-ftl 0.0.4

Troubleshooting

lean-ftl.h: No such file or directory: lean-ftl.h is probably not in your include path. If you are using cmake, the folder which contains lean-ftl.h shall appear in the call to target_include_directories.

cannot find -llean-ftl: No such file or directory: liblean-ftl.a is probably not in your library include path. If you are using cmake, the folder which contains liblean-ftl.a shall appear in the call to target_link_libraries.