feat(bsp): New bsp for ch32 has been added.

1.Add the general part bsp of ch32 (including system clock, software interrupts, interrupt controllers, etc.). Supports V00X/V10X/V20X/V30X (Although the V00X series is supported, the sram of the chip is too small and it is not recommended for use).
This commit is contained in:
MacRsh
2025-07-10 01:08:03 +08:00
parent 2d234791cc
commit 8b077d287c
14 changed files with 423 additions and 71 deletions

View File

@@ -0,0 +1,46 @@
/**
* @copyright (c) 2024, MacRsh
*
* @license SPDX-License-Identifier: Apache-2.0
*
* @date 2024-06-12 MacRsh First version
*/
#ifndef __MR_BOARD_H__
#define __MR_BOARD_H__
#include <mr_config.h>
#if defined(MR_USE_SERIES_V00X)
#include "ch32v00x.h"
#elif defined(MR_USE_SERIES_V10X)
#include "ch32v10x.h"
#elif defined(MR_USE_SERIES_V20X)
#include "ch32v20x.h"
#elif defined(MR_USE_SERIES_V30X)
#include "ch32v30x.h"
#else
#error "Series not supported"
#endif /* defined(MR_USE_SERIES_V00X) */
#include "core_riscv.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/**
* @addtogroup Board
* @{
*/
/**
* @brief This function initializes the board systick.
*/
void mr_board_systick_init(void);
/** @} */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __MR_BOARD_H__ */