VladKosten / GD32F450

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GD32F450

Description

This is a ready to use environment for the GD32F450 microcontroller. Just clone, Prepare the environment and start coding.

Features

  • CMake build system
  • Debugging with OpenOCD
  • Ready to use VSCode configuration
  • Ready to use CMake configuration
  • Ready to use OpenOCD configuration
  • (*t-linkV2.1 work correctly)
  • GigaDevices Framework (Standard Peripheral Library). Doc and example

Dependencies

VsCode requirement extensions

Install dependencies on Ubuntu

  1. Install VSCode:
sudo snap install --classic code
  1. Install the GNU Arm Embedded Toolchain:
sudo apt install gcc-arm-none-eabi
  1. Install CMake:
sudo apt install cmake
  1. Install Ninja:
sudo apt install ninja-build
  1. Install OpenOCD:
sudo apt install openocd

Install dependencies on Windows

I don't have a Windows machine to test the installation, but you can find the installation instructions on the official websites of the tools.
I have recommended the use Chocolatey to install the tools on Windows.

How to use

  1. Clone the repository
  2. Install the dependencies and the required extensions for VSCode (if you don't have them already)
  3. Open the project with VSCode
  4. Press Ctrl+Shift+B and select CMake Configure Project:Debug(Release)
  5. Press Ctrl+Shift+B and select CMake Build Project to build the project(Ninja build system)
  6. To flash the microcontroller, press Ctrl+Shift+B and select Flash with OpenOCD (You need to have OpenOCD installed)
  7. To debug the microcontroller, press F5 or select Debug -> Debug(Attach)

About


Languages

Language:C 98.7%Language:Assembly 0.9%Language:CMake 0.4%