fAiL-ix / gd32vf103

This is a standalone CMake library version of the RISCV firmware provided by Gigadevice.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GD32VF103 Firmware Lib

This is a standalone CMake library version of the RISCV firmware provided by Gigadevice.

This is a kind of minimal version to get the gd32v up and running without using the complete standard peripheral library.

Dependencies

For this library to work you need to provide some code in your project.

You need to:

  • Set the SystemCoreClock to the used system clock
  • Provide a SystemInit() function
    • This function should at least set the SystemCoreClock

Using this Library

To use this library in your project, clone this repository somewhere into your project. Then add the library as a subdirectory and link target in your projects CMakeLists.txt.

add_subdirectory(path/to/this/lib) CMake Doc

target_link_libraries(<your target> gd32vf103) CMake Doc

You also have to define your target board type which is done by defining one of those variables:

  • GD32VF103C_START
  • GD32VF103R_START
  • GD32VF103T_START
  • GD32VF103V_EVAL

To define it you can add target_compile_definitions to your project.

target_compile_definitions(gd32vf103 PUBLIC GD32VF103V_EVAL) CMake Doc

About

This is a standalone CMake library version of the RISCV firmware provided by Gigadevice.


Languages

Language:C 84.1%Language:Assembly 13.8%Language:C++ 1.3%Language:CMake 0.8%