Skip to content

Commit

Permalink
adding possibility to specify multiple builders for a board using the…
Browse files Browse the repository at this point in the history
… same build system, with different parameters
  • Loading branch information
sylefeb committed Jul 13, 2024
1 parent dfcfb30 commit 69e7552
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 3 deletions.
11 changes: 9 additions & 2 deletions bin/silice-make.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,10 @@ def colored(str,clr,attrs=0):
if len(args.tool.split(":")) > 1:
target_builder_tool = args.tool.split(":")[1]
for builder in target_variant['builders']:
if builder['builder'] == target_builder_name:
builder_name_prop = 'builder'
if 'name' in builder:
builder_name_prop = 'name'
if builder[builder_name_prop] == target_builder_name:
if target_builder_tool == None:
target_builder = builder
break
Expand All @@ -214,7 +217,11 @@ def colored(str,clr,attrs=0):
sys.exit(-1)
else:
target_builder = target_variant['builders'][0]
print('using build system ',colored(target_builder['builder'],'cyan'))

builder_name_prop = 'builder'
if 'name' in target_builder:
builder_name_prop = 'name'
print('using build system ',colored(target_builder[builder_name_prop],'cyan'))

# framework file
framework_file = os.path.realpath(os.path.join(board_path,target_variant['framework']))
Expand Down
22 changes: 22 additions & 0 deletions frameworks/boards/brot/board.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,28 @@
],
"builders": [
{
"name": "edalize",
"builder" : "edalize",
"description": "Build using Edalize",
"tool": "icestorm",
"tool_options": [
{
"icepack_options": ["-s"],
"yosys_synth_options": ["-dsp","-abc9","-device u","-top top"],
"nextpnr_options": ["--up5k", "--freq 12", "--package sg48", "-r"],
"pnr": "next"
}
],
"bitstream" : "build.bin",
"constraints": [{"name": "brot.pcf", "file_type": "PCF"}],
"program": [
{"cmd" : "cp", "args" : "build.bin build.dfu"},
{"cmd" : "dfu-suffix", "args" : "-v 1d50 -p 6146 -a build.dfu"},
{"cmd" : "dfu-util", "args" : "-a 0 -D build.dfu"}
]
},
{
"name": "edalize_relut",
"builder" : "edalize",
"description": "Build using Edalize",
"tool": "icestorm",
Expand Down
2 changes: 1 addition & 1 deletion get_started_mingw64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pacman -S --noconfirm --needed ${MINGW_PACKAGE_PREFIX}-glfw

# -------------- retrieve oss-cad-suite package --------------
OSS_CAD_MONTH=07
OSS_CAD_DAY=08
OSS_CAD_DAY=13
OSS_CAD_YEAR=2024
OSS_PACKAGE=oss-cad-suite-windows-x64-$OSS_CAD_YEAR$OSS_CAD_MONTH$OSS_CAD_DAY.exe

Expand Down

0 comments on commit 69e7552

Please sign in to comment.