Setting up on linux

To get started under linux mint:

Preinstall some required tools:

apt-get install git cmake gcc g++ libsdl2-dev

Grab the 32blit repo:

git clone https://github.com/pimoroni/32blit-beta

Compile away:

cd 32blit-beta/examples
cd palette-cycle
mkdir build
cd build
cmake ..
make

run your example locally
./palette-cycle

4 Likes

And for building to run on the 32blit itself:

Install arm compiling tools

apt-get install gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib dfu-util

Compile is only slightly different

 cd 32blit-beta/examples
 cd palette-cycle
 mkdir build.stm32
 cd build.stm32
 cmake .. -DCMAKE_TOOLCHAIN_FILE=../../../32blit.toolchain
 make

Make sure the 32blit unit is in DFU mode ( hold X and Y then press reset),
it will just show blank screen. Note this is done over USB, no need for an ST Link cable.

sudo dfu-util -a 0 -s 0x08000000 -D palette-cycle.bin

After that, press reset to run the code on the 32blit.

3 Likes