This the repository used for the development of the Tetris project, associated to the course of AOS at the Polimi.
Follow this guide to install correctly the board. Clone the repository of Miosix. Copy this repository inside the miosix-kernel/ path. Substitute the main.cpp file with this one and use the command
make to compile the executable.
After installing the driver for your target device use Openocd to open a connection with it by typing
openocd -f stm32l4nucleo.cfg In this repository is already present the configuration file needed to launch Openocd on the STM32 NUCLEO-L476RG.
For debugging purposes modify the file .gdbinit, and then launch gdb with
arm-miosix-eabi-gdb main.elf --command=.gdbinit
In order to access what the board prints on screen you should use
screen /dev/ttyACM0 115200 then you can exit by pressing Ctrl+A -> k -> y.
Modify in the file miosix-kernel/miosix/config/arch/cortexM4_stm32l4/stm32l476rg_nucleo/board_settings.h as in the following:
const unsigned int defaultSerialSpeed=115200;
We have used also this guide for the serial programming part.