Skip to content

Commit

Permalink
Merge pull request #54 from gd32-rust/compare
Browse files Browse the repository at this point in the history
Add comparisons for gd32c1 and gd32e1 too
  • Loading branch information
qwandor authored Jan 10, 2024
2 parents f7462e9 + c7daedd commit 95482fe
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ all: patch svd2rust

SHELL := /usr/bin/env bash

CRATES ?= gd32e1 gd32c1 gd32e2 gd32e5 gd32f1 gd32f2 gd32f3
CRATES ?= gd32c1 gd32e1 gd32e2 gd32e5 gd32f1 gd32f2 gd32f3

# All yaml files in devices/ will be used to patch an SVD
YAMLS := $(foreach crate, $(CRATES), \
Expand Down
16 changes: 8 additions & 8 deletions gd32_part_table.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@
#
# This data is used to generate more informative crate READMEs.

gd32e1:
gd32e103:
url: https://www.gigadevice.com/products/microcontrollers/gd32/arm-cortex-m4/value-line/gd32e103-series/
rm: GD32E103
rm_title: GD32E103
rm_url: https://www.gigadevice.com/manual/gd32e103xx-user-manual/
members:
- GD32E103
gd32c1:
gd32c103:
url: https://www.gigadevice.com/products/microcontrollers/gd32/arm-cortex-m4/value-line/gd32c103-series/
Expand All @@ -37,6 +29,14 @@ gd32c1:
rm_url: https://gd32mcu.com/download/down/document_id/382/path_type/1
members:
- GD32C113
gd32e1:
gd32e103:
url: https://www.gigadevice.com/products/microcontrollers/gd32/arm-cortex-m4/value-line/gd32e103-series/
rm: GD32E103
rm_title: GD32E103
rm_url: https://www.gigadevice.com/manual/gd32e103xx-user-manual/
members:
- GD32E103
gd32e2:
gd32e230:
url: https://www.gigadevice.com/products/microcontrollers/gd32/arm-cortex-m23/value-line/gd32e230-series/
Expand Down
6 changes: 6 additions & 0 deletions scripts/htmlcomparesvdall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ set -euxo pipefail
mkdir -p html/gd32
python3 scripts/htmlcomparesvd.py html/gd32 svd/gd32*.svd.patched

mkdir -p html/gd32c1
python3 scripts/htmlcomparesvd.py html/gd32c1 svd/gd32c1*.svd.patched
mkdir -p html/gd32e1
python3 scripts/htmlcomparesvd.py html/gd32e1 svd/gd32e1*.svd.patched
mkdir -p html/gd32e2
python3 scripts/htmlcomparesvd.py html/gd32e2 svd/gd32e2*.svd.patched
mkdir -p html/gd32e5
Expand Down Expand Up @@ -42,6 +46,8 @@ cat > html/comparisons.html <<EOF
<h1>Device families</h1>
<ul>
<li><a href="gd32/index.html">GD32 overview</a></li>
<li><a href="gd32c1/index.html">GD32C1</a></li>
<li><a href="gd32e1/index.html">GD32E1</a></li>
<li><a href="gd32e2/index.html">GD32E2</a></li>
<li><a href="gd32e5/index.html">GD32E5</a></li>
<li><a href="gd32f1/index.html">GD32F1</a></li>
Expand Down
4 changes: 2 additions & 2 deletions scripts/makecrates.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
SVD2RUST_VERSION = "0.30.1"

CRATE_DOC_FEATURES = {
"gd32e1": ["rt", "gd32e103"],
"gd32c1": ["rt", "gd32c103", "gd32c113"],
"gd32e1": ["rt", "gd32e103"],
"gd32e2": ["rt", "gd32e230", "gd32e231"],
"gd32e5": ["rt", "gd32e503", "gd32e508"],
"gd32f1": ["rt", "gd32f130", "gd32f190"],
Expand All @@ -30,8 +30,8 @@
}

CRATE_DOC_TARGETS = {
"gd32e1": "thumbv7m-none-eabi",
"gd32c1": "thumbv7m-none-eabi",
"gd32e1": "thumbv7m-none-eabi",
"gd32e2": "thumbv8m.base-none-eabi",
"gd32e5": "thumbv8m.base-none-eabi",
"gd32f1": "thumbv7m-none-eabi",
Expand Down
4 changes: 2 additions & 2 deletions svd/extract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
# SPDX-License-Identifier: MIT OR Apache-2.0

# Copy GD32 SVD files and give them lower-case names.
cp vendor/GD32E10x.svd gd32e103.svd

cp vendor/GD32C10x.svd gd32c103.svd
cp vendor/GD32C11x.svd gd32c113.svd

cp vendor/GD32E10x.svd gd32e103.svd

cp vendor/GD32E230.svd gd32e230.svd
cp vendor/GD32E231.svd gd32e231.svd

Expand Down

0 comments on commit 95482fe

Please sign in to comment.