Skip to content

Commit

Permalink
Fix multiple wrong F405 definitions that declared F407
Browse files Browse the repository at this point in the history
  • Loading branch information
maxgerhardt committed Aug 14, 2023
1 parent 3424e66 commit 8df3968
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 43 deletions.
4 changes: 2 additions & 2 deletions boards/genericGD32F405RG.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"build": {
"core": "gd32",
"cpu": "cortex-m4",
"extra_flags": "-DGD32F4 -DGD32F407 -DGD32F4xx",
"extra_flags": "-DGD32F4 -DGD32F405 -DGD32F4xx",
"f_cpu": "168000000L",
"mcu": "gd32f405rgt6",
"spl_series": "GD32F4xx",
"series": "GD32F407"
"series": "GD32F405"
},
"debug": {
"jlink_device": "GD32F405RG",
Expand Down
4 changes: 2 additions & 2 deletions boards/genericGD32F405RK.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"build": {
"core": "gd32",
"cpu": "cortex-m4",
"extra_flags": "-DGD32F4 -DGD32F407 -DGD32F4xx",
"extra_flags": "-DGD32F4 -DGD32F405 -DGD32F4xx",
"f_cpu": "168000000L",
"mcu": "gd32f405rkt6",
"spl_series": "GD32F4xx",
"series": "GD32F407"
"series": "GD32F405"
},
"debug": {
"jlink_device": "GD32F405RK",
Expand Down
4 changes: 2 additions & 2 deletions boards/genericGD32F405VE.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"build": {
"core": "gd32",
"cpu": "cortex-m4",
"extra_flags": "-DGD32F4 -DGD32F407 -DGD32F4xx",
"extra_flags": "-DGD32F4 -DGD32F405 -DGD32F4xx",
"f_cpu": "168000000L",
"mcu": "gd32f405vet6",
"spl_series": "GD32F4xx",
"series": "GD32F407"
"series": "GD32F405"
},
"debug": {
"jlink_device": "GD32F405VE",
Expand Down
4 changes: 2 additions & 2 deletions boards/genericGD32F405VG.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"build": {
"core": "gd32",
"cpu": "cortex-m4",
"extra_flags": "-DGD32F4 -DGD32F407 -DGD32F4xx",
"extra_flags": "-DGD32F4 -DGD32F405 -DGD32F4xx",
"f_cpu": "168000000L",
"mcu": "gd32f405vgt6",
"spl_series": "GD32F4xx",
"series": "GD32F407"
"series": "GD32F405"
},
"debug": {
"jlink_device": "GD32F405VG",
Expand Down
4 changes: 2 additions & 2 deletions boards/genericGD32F405VK.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"build": {
"core": "gd32",
"cpu": "cortex-m4",
"extra_flags": "-DGD32F4 -DGD32F407 -DGD32F4xx",
"extra_flags": "-DGD32F4 -DGD32F405 -DGD32F4xx",
"f_cpu": "168000000L",
"mcu": "gd32f405vkt6",
"spl_series": "GD32F4xx",
"series": "GD32F407"
"series": "GD32F405"
},
"debug": {
"jlink_device": "GD32F405VK",
Expand Down
4 changes: 2 additions & 2 deletions boards/genericGD32F405ZE.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"build": {
"core": "gd32",
"cpu": "cortex-m4",
"extra_flags": "-DGD32F4 -DGD32F407 -DGD32F4xx",
"extra_flags": "-DGD32F4 -DGD32F405 -DGD32F4xx",
"f_cpu": "168000000L",
"mcu": "gd32f405zet6",
"spl_series": "GD32F4xx",
"series": "GD32F407"
"series": "GD32F405"
},
"debug": {
"jlink_device": "GD32F405ZE",
Expand Down
4 changes: 2 additions & 2 deletions boards/genericGD32F405ZG.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"build": {
"core": "gd32",
"cpu": "cortex-m4",
"extra_flags": "-DGD32F4 -DGD32F407 -DGD32F4xx",
"extra_flags": "-DGD32F4 -DGD32F405 -DGD32F4xx",
"f_cpu": "168000000L",
"mcu": "gd32f405zgt6",
"spl_series": "GD32F4xx",
"series": "GD32F407"
"series": "GD32F405"
},
"debug": {
"jlink_device": "GD32F405ZG",
Expand Down
22 changes: 3 additions & 19 deletions misc/scripts/board_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@
# however tightly-coupled memory SRAM (TCMSRAM) needs to be separated from that.

class GD32MCUInfo:
def __init__(self, name, series, line, speed_mhz, flash_kb, sram_kb, core_type) -> None:
def __init__(self, name, series, speed_mhz, flash_kb, sram_kb, core_type) -> None:
self.name : str = name
self.name_no_package = self.name[:-2]
self.series = series
self.line = line
self.speed_mhz = speed_mhz
self.flash_kb = flash_kb
self.sram_kb = sram_kb
Expand Down Expand Up @@ -479,7 +478,7 @@ def read_csv(filename, core_type) -> List[GD32MCUInfo]:
csv_reader_object = csv.DictReader(csvfile, delimiter=',')
for row in csv_reader_object:
print(row)
mcu = GD32MCUInfo(row["Part No."], row["Series"], row["Line"], int(row["Speed"]), int(row["Flash"][:-1]), int(row["SRAM"][:-1]), core_type)
mcu = GD32MCUInfo(row["Part No."], row["Series"], int(row["Speed"]), int(row["Flash"][:-1]), int(row["SRAM"][:-1]), core_type)
mcus.append(mcu)
return mcus

Expand Down Expand Up @@ -517,23 +516,8 @@ def main():
# these are probabl "upcoming" MCUs.
# filter them from the list for now.
mcus = list(filter(lambda x: x.series != "GD32E232", mcus))

print(get_info_for_mcu_name("GD32F303CC", mcus))
print(get_info_for_mcu_name("GD32F350CB", mcus))
print(get_info_for_mcu_name("GD32F103C8", mcus))
print(get_info_for_mcu_name("GD32F205RE", mcus))
print(get_info_for_mcu_name("GD32E230C4", mcus))

#return
#print_board_files_mcus = ["GD32F303CC", "GD32F350CB", "GD32F450IG", "GD32E103C8"]
#print(get_info_for_mcu_name("GD32F450IG", mcus))
#print_board_files_mcus = ["GD32F450IG", "GD32F405RG"]
#print_board_files_mcus = ["GD32F103C8", "GD32F205RE"]
#print_board_files_mcus = ["GD32E231C8T6"]
#print_board_files_mcus = ["GD32E507ZE"]
#print_board_files_mcus = ["GD32E507ZE"]
#print_board_files_mcus = ["GD32L233CBT6"]
print_board_files_mcus = ["GD32C103CBT6"]
print_board_files_mcus = ["GD32F405RG"]

for mcu in print_board_files_mcus:
output_filename, board_def = get_info_for_mcu_name(mcu, mcus).generate_board_def()
Expand Down
20 changes: 10 additions & 10 deletions misc/scripts/gd32_cortex_m4_devs.csv
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,16 @@ GD32F405IEH6,GD32F405,High Performance,168,512K,192K,Download,Purchase
GD32F405IGH6,GD32F405,High Performance,168,1024K,192K,Download,Purchase
GD32F405IKH6,GD32F405,High Performance,168,3072K,192K,Download,Purchase
GD32F405RET6,GD32F405,High Performance,168,512K,192K,Download,Purchase
GD32F405RGT6,GD32F407,High Performance,168,1024k,192K,Download,Purchase
GD32F405RKT6,GD32F407,High Performance,168,3072k,192K,Download,Purchase
GD32F405VEH6,GD32F407,High Performance,168,512k,192K,Download,Purchase
GD32F405VET6,GD32F407,High Performance,168,512k,192K,Download,Purchase
GD32F405VGH6,GD32F407,High Performance,168,1024K,192K,Download,Purchase
GD32F405VGT6,GD32F407,High Performance,168,1024k,192K,Download,Purchase
GD32F405VKH6,GD32F407,High Performance,168,3072K,192K,Download,Purchase
GD32F405VKT6,GD32F407,High Performance,168,3072k,192K,Download,Purchase
GD32F405ZET6,GD32F407,High Performance,168,512K,192K,Download,Purchase
GD32F405ZGT6,GD32F407,High Performance,168,1024K,192K,Download,Purchase
GD32F405RGT6,GD32F405,High Performance,168,1024k,192K,Download,Purchase
GD32F405RKT6,GD32F405,High Performance,168,3072k,192K,Download,Purchase
GD32F405VEH6,GD32F405,High Performance,168,512k,192K,Download,Purchase
GD32F405VET6,GD32F405,High Performance,168,512k,192K,Download,Purchase
GD32F405VGH6,GD32F405,High Performance,168,1024K,192K,Download,Purchase
GD32F405VGT6,GD32F405,High Performance,168,1024k,192K,Download,Purchase
GD32F405VKH6,GD32F405,High Performance,168,3072K,192K,Download,Purchase
GD32F405VKT6,GD32F405,High Performance,168,3072k,192K,Download,Purchase
GD32F405ZET6,GD32F405,High Performance,168,512K,192K,Download,Purchase
GD32F405ZGT6,GD32F405,High Performance,168,1024K,192K,Download,Purchase
GD32F405ZKT6,GD32F405,High Performance,168,3072K,192K,Download,Purchase
GD32F407IEH6,GD32F407,High Performance,168,512K,192K,Download,Purchase
GD32F407IGH6,GD32F407,High Performance,168,1024K,192K,Download,Purchase
Expand Down

0 comments on commit 8df3968

Please sign in to comment.