Skip to content

Commit

Permalink
Fix SVD refrence
Browse files Browse the repository at this point in the history
  • Loading branch information
maxgerhardt committed Sep 16, 2024
1 parent cf94192 commit 2e177e7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion boards/genericCH32V317TCU6.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"wch-link"
],
"openocd_config": "wch-riscv.cfg",
"svd_path": "CH32V307xx.svd"
"svd_path": "CH32V317xx.svd"
},
"frameworks": [
"noneos-sdk",
Expand Down
2 changes: 1 addition & 1 deletion boards/genericCH32V317VCT6.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"wch-link"
],
"openocd_config": "wch-riscv.cfg",
"svd_path": "CH32V307xx.svd"
"svd_path": "CH32V317xx.svd"
},
"frameworks": [
"noneos-sdk",
Expand Down
2 changes: 1 addition & 1 deletion boards/genericCH32V317WCU6.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"wch-link"
],
"openocd_config": "wch-riscv.cfg",
"svd_path": "CH32V307xx.svd"
"svd_path": "CH32V317xx.svd"
},
"frameworks": [
"noneos-sdk",
Expand Down
7 changes: 6 additions & 1 deletion misc/scripts/gen_boarddefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ def exact_series(self) -> str:
if self.name.lower().startswith("ch32v317"):
return "ch32v307"
return self.name[0:len("ch32vxxx")]

def get_svd_file(self) -> str:
if self.name.lower().startswith("ch32v317"):
return "CH32V317xx.svd"
return self.exact_series().upper() + "xx.svd"

chip_db: List[ChipInfo] = [
# CH56x (configurable SRAM size, data flash)
Expand Down Expand Up @@ -281,7 +286,7 @@ def create_board_json(info: ChipInfo, board_name:str, output_path: str, patch_in
"wch-link"
],
"openocd_config": "wch-riscv.cfg",
"svd_path": info.exact_series().upper() + "xx.svd"
"svd_path": info.get_svd_file()
},
"frameworks": [
"noneos-sdk"
Expand Down

0 comments on commit 2e177e7

Please sign in to comment.