Skip to content

sergey12malyshev/Pac-ManGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

214 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GameBox

Game console project on STM32 controller and ILI9341 display. Contains two games: pac-man and arkanoid

Tools

Compiler

GCC (gcc-arm-none-eabi) version 5.4.1 20160919

Setting up the build system in WINDOWS10

  1. Download GNU Arm Embedded Toolchain https://developer.arm.com/downloads/-/gnu-rm#:~:text=The%20GNU%20Arm%20Embedded%20Toolchain,Arm%20Cortex%2DR%20processor%20families or https://launchpad.net/gcc-arm-embedded/+download

  2. Download Windows Build Tools binaries (Make, cp, rm, echo, sh...) https://github.com/xpack-dev-tools/windows-build-tools-xpack/releases/

  3. Add paths to the PATH environment variable in Windows

Подробная статья: https://habr.com/ru/articles/673522/

RTOS

Prototreads AD v1.4

https://dunkels.com/adam/pt/

Code editor

VS Code file Pac-ManGame.code-workspace

Build

To make the release project , run makeProject.bat (OR make -j cmd command)

To make the debug project , run makeProjectDebug.bat (OR make -j1 debug cmd command)

To clean the project, run makeClean.bat (OR make clean)

Debugging

Open On-Chip Debugger (OCD) 0.10.0-00113-g0f83948 + GNU gdb (GNU Tools for ARM Embedded Processors) 7.10.1.20160923-cvs

Run runOpenODC.bat and run terminal: telnet localhost 4444

Run runGDBserver.bat

Programm firmware

Connect ST-Link V2 to SWD connector. Run programFlash.bat

Update firmware use system bootloader (DFU Mode)

Go to the device menu: MENU->UPDATE or CLI-> LOAD command to launch the system bootloader. Connect to PC via USB Type C. Run updateFirmware.cmd or launch STM32CubeProgrammer (select the desired COM-port and download the firmware).

Command Line Interface

UART 115200 Baud rate

Connect: PA10 - RX / PA9 - TX

Terminal configuration file: utils\TERATERM.INI

Enter help command

Static code analyzer

Cppcheck 2.10 https://cppcheck.sourceforge.io/

Run RunStaticAnalysisCODE.cmd

It is possible to output the analysis result to a file

Unit tests

Simple unit tests are implemented in the file "unit_test.с". Unit tests are launched if the RUN_UNIT_TEST key is set or when building Debug

Peripheral setup

STM32 CubeMX

(Checkboxes checked: Enable Full Assert и Set All Free Pins as Analog)

Hardware

  • Black pill STM32F103C8T6 (ARM Cortex-M3; 72 МГц; FLASH 64 кБ; ОЗУ 20 кБ)
  • 2.8 TFT SPI 240x320 display (ILI9341)
  • Buttons К1116КП2 (Hall effect sensor) or classic buttons
  • TP4056 charge module with protection
  • Battery 18650 li-ion
  • CH340N USB-UART module
  • Active buzzer
  • Printed circuit board for soldering double-sided 7*9cm
  • P-MOSFET
  • USB-UART module (Optional for updating firmware via USB Type-C and working with CLI)

*See Altium directory

Be sure to check the BOOT0 output status on the debug board!

Case

Case models have been added to the project in the format .stl

gcc-arm-none-eabi

The magic name of the compiler gcc-arm-none-eabi means the following:

gcc - compiler name;

arm - processor architecture;

none - the compiler does not contribute any additional bootstrap code from itself;

eabi - code conforms to the EABI specification.

https://tuxotronic.org/post/arm-none-eabi/

About repo

Work in the repository is carried out through the Git-flow branching model

About

Game console project on STM32 and GCC compiler

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages