This demo should help you to organize your project with awesome PlatformIO IDE.
- It automates installing everything - just open folder with this project in vscode, and agree to install all it offers.
- It contains working LittlevGL demo, runnable on PC (via SDL drivers).
- It has example, how to make multiple build targets. For example:
nativeto quickly prototype interfaces on PC- other, to build firmware for bare metal
Important! native build (emulator with SDL2 drivers) was tested in
linux only! But you still can build MCU targets. If anyone interested to
improve other OS support (Windows, macOS) - PR welcome.
https://code.visualstudio.com/ - follow instructions there, if you don't have vscode yet.
Linux (Ubuntu, Debian, ...)
sudo apt-get install gcc-multilib g++-multilib libsdl2-dev:i386Note:
- We use 32-bits build for more correct memory stat info. You can
disable this in
platformio.ini(see comments inside), and uselibsdl2-devinstead. - If you have conflicts on
libsdl2-dev:i386install, remove 64-bits version and dependencies first.
MacOS
Use Homebrew:
brew install sdl2Windows
Use MSYS2
pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-SDL2Add the path to your Mingw-w64 bin folder to the Windows PATH environment
variable (usually C:\msys64\mingw64\bin). See instruction, 4.
If you plan to upload firmware & debug hardware, read notes in PlatformIO install docs.
- Clone this repository or download as zip.
- In vscode, open folder via
File->Open Folder...menu.- If you do it first time - agree, when it suggests to install PlatformIO plugin, and wait when PlatformIO then install build tools and package dependencies.
- Build / execute:
- Simulator:
Terminal->Run Task...->PlatformIO: Execute (native) - Bare metal:
Terminal->Run Build Task...->PlatformIO: Build (stm32f429_disco)
- Simulator: