Skip to content

Commit de9a6c8

Browse files
authored
Merge pull request #3186 from rhgndf/nanoch32v305
Add nanoch32v305
2 parents a72f039 + aeb21c2 commit de9a6c8

File tree

24 files changed

+93
-25
lines changed

24 files changed

+93
-25
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ body:
8686

8787
- type: checkboxes
8888
attributes:
89-
label: I have checked existing issues, dicussion and documentation
89+
label: I have checked existing issues, discussion and documentation
9090
description: You agree to check all the resources above before opening a new issue.
9191
options:
92-
- label: I confirm I have checked existing issues, dicussion and documentation.
92+
- label: I confirm I have checked existing issues, discussion and documentation.
9393
required: true

.github/workflows/ci_set_matrix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
family_list = {
1818
"broadcom_32bit": ["arm-gcc"],
1919
"broadcom_64bit": ["aarch64-gcc"],
20-
"ch32v10x ch32v20x ch32v307 fomu gd32vf103": ["riscv-gcc"],
20+
"ch32v10x ch32v20x ch32v30x fomu gd32vf103": ["riscv-gcc"],
2121
"da1469x": ["arm-gcc"],
2222
"imxrt": ["arm-gcc", "arm-clang"],
2323
"kinetis_k kinetis_kl kinetis_k32l2": ["arm-gcc", "arm-clang"],

docs/reference/boards.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,5 +326,6 @@ ch32v103r_r1_1v0 CH32V103R-R1-1v1 ch32v10x https://github.com/openwch/ch32v10
326326
ch32v203c_r0_1v0 CH32V203C-R0-1v0 ch32v20x https://github.com/openwch/ch32v20x/tree/main/SCHPCB/CH32V203C-R0
327327
ch32v203g_r0_1v0 CH32V203G-R0-1v0 ch32v20x https://github.com/openwch/ch32v20x/tree/main/SCHPCB/CH32V203C-R0
328328
nanoch32v203 nanoCH32V203 ch32v20x https://github.com/wuxx/nanoCH32V203
329-
ch32v307v_r1_1v0 CH32V307V-R1-1v0 ch32v307 https://github.com/openwch/ch32v307/tree/main/SCHPCB/CH32V307V-R1-1v0
329+
nanoch32v305 nanoCH32V305 ch32v30x https://github.com/wuxx/nanoCH32V305
330+
ch32v307v_r1_1v0 CH32V307V-R1-1v0 ch32v30x https://github.com/openwch/ch32v307/tree/main/SCHPCB/CH32V307V-R1-1v0
330331
================ ================ ======== ===================================================================== ======

hw/bsp/ch32v307/boards/ch32v307v_r1_1v0/board.cmake

Lines changed: 0 additions & 4 deletions
This file was deleted.

hw/bsp/ch32v307/boards/ch32v307v_r1_1v0/board.mk

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
set(LD_FLASH_SIZE 256K)
2+
set(LD_RAM_SIZE 64K)
3+
4+
function(update_board TARGET)
5+
endfunction()
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
LDFLAGS += \
2+
-Wl,--defsym=__FLASH_SIZE=256K \
3+
-Wl,--defsym=__RAM_SIZE=64K \
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
set(LD_FLASH_SIZE 128K)
2+
set(LD_RAM_SIZE 32K)
3+
4+
function(update_board TARGET)
5+
endfunction()
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
* The MIT License (MIT)
3+
*
4+
* Copyright (c) 2023 Ha Thach (tinyusb.org) for Adafruit Industries
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in
14+
* all copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22+
* THE SOFTWARE.
23+
*/
24+
25+
/* metadata:
26+
name: nanoCH32V305
27+
url: https://github.com/wuxx/nanoCH32V305
28+
*/
29+
30+
#ifndef BOARD_H_
31+
#define BOARD_H_
32+
33+
#ifdef __cplusplus
34+
extern "C" {
35+
#endif
36+
37+
#define LED_PORT GPIOA
38+
#define LED_PIN GPIO_Pin_3
39+
#define LED_STATE_ON 0
40+
#define LED_CLOCK_EN() RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE)
41+
42+
// TODO UART port
43+
44+
#ifdef __cplusplus
45+
}
46+
#endif
47+
48+
#endif

0 commit comments

Comments
 (0)