Before we delve into the creation of custom projects let us first look at how we build and load those projects to the unit. The Logue-SDK comes with an example custom oscillator called waves which we will use for our demo.
1 – Building a Project
In order to build any project for the unit we require certain files. Those are project.mk, manifest.json, a Makefile, and of course the source code. We’ll look at what these files do in more detail in the next article, for now it’s enough to know that the Makefile is a project-build automation tool that controls the generation of executables and other non-source files of a program from the program’s source files. It uses project.mk to simplify customisation, and manifest.json to detail properties and parameters of the project.
First, we want to open the following subdirectory in MSYS;
logue-sdk/platform/nutekt-digital/demos/waves
This is where the project files are stored. You’ll see the Makefile, manifest.json, and project.mk here, as well as C++ source code and header files, and also two other folders which contain the non-source files we need to build the end product.
In the Mintty terminal of MSYS run the command;
make
You should see the following output or similar in the terminal window.
$ make
Compiler Options
../../../../tools/gcc/gcc-arm-none-eabi-5_4-2016q3/bin/arm-none-eabi-gcc -c -mcpu=cortex-m4 -mthumb -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -DTHUMB_PRESENT -g -Os -mlittle-endian -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fsingle-precision-constant -fcheck-new -std=c11 -mstructure-size-boundary=8 -W -Wall -Wextra -Wa,-alms=./build/lst/ -DSTM32F446xE -DCORTEX_USE_FPU=TRUE -DARM_MATH_CM4 -D__FPU_PRESENT -I. -I./inc -I./inc/api -I../../inc -I../../inc/dsp -I../../inc/utils -I../../../ext/CMSIS/CMSIS/Include
Compiling _unit.c
Compiling waves.cpp
Linking build/waves.elf
Creating build/waves.hex
Creating build/waves.bin
Creating build/waves.dmp
text data bss dec hex filename
2040 4 144 2188 88c build/waves.elf
Creating build/waves.list
Packaging to ./waves.ntkdigunit
Done
There should now be a new folder called “build” in the waves directory, as well as a waves.ntkdigunit file. This is the end product and what we will be loading onto the Nu:Tekt.
Next, we want to load the .ntkdigunit to the unit. There are two ways we can do this. We can use the Librarian, or the logue-cli. We’re going to do it both ways, and this will also provide us an opportunity to demonstrate unloading unit files and using CLI commands.