Skip to content

Commit a4a730d

Browse files
committed
fix(boards): build the bitstream before a custom upload command
A custom commands.upload replaces apio's native 'apio upload' entirely, and native upload is what builds+programs in one step. The pre-step (generateCode) only writes main.v and the constraint file, never the bitstream. So a custom upload that just runs openFPGALoader was firing before anything produced _build/default/hardware.*, and openFPGALoader reported 'fail to open ...hardware.bit' even though the path was correct (this, not the path, was the real ColorLight-i5 upload failure). Prepend '{APIO_CMD} build' to the upload command of the six affected boards (iCESugar-Pro and ColorLight-i5-v7.0, x3 cables). runSequential stops at the first non-zero exit, so a failed build never tries to program; the extra build is idempotent (apio cache) if the user already pressed Build. Verified live: without the step openFPGALoader hits the exact 'No such file'; with it apio build produces the bitstream and it is found.
1 parent e311f36 commit a4a730d

6 files changed

Lines changed: 6 additions & 0 deletions

File tree

app/resources/boards/ColorLight-i5-v7.0_(FT2232H)/info.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
},
1919
"commands": {
2020
"upload": [
21+
"{APIO_CMD} build",
2122
"{APIO_CMD} raw -- openFPGALoader -c ft2232 --freq 30000000 -v --file-type bin \"{BITSTREAM}\""
2223
]
2324
}

app/resources/boards/ColorLight-i5-v7.0_(FT232H)/info.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
},
1919
"commands": {
2020
"upload": [
21+
"{APIO_CMD} build",
2122
"{APIO_CMD} raw -- openFPGALoader -c ft232 --freq 30000000 -v --file-type bin \"{BITSTREAM}\""
2223
]
2324
}

app/resources/boards/ColorLight-i5-v7.0_(USB-Blaster)/info.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
},
1919
"commands": {
2020
"upload": [
21+
"{APIO_CMD} build",
2122
"{APIO_CMD} raw -- openFPGALoader -c usb-blaster -v --file-type bin \"{BITSTREAM}\""
2223
]
2324
}

app/resources/boards/iCESugar-Pro_(FT2232H)/info.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
},
1919
"commands": {
2020
"upload": [
21+
"{APIO_CMD} build",
2122
"{APIO_CMD} raw -- openFPGALoader -c ft2232 --freq 30000000 -v --file-type bin \"{BITSTREAM}\""
2223
]
2324
}

app/resources/boards/iCESugar-Pro_(FT232H)/info.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
},
1919
"commands": {
2020
"upload": [
21+
"{APIO_CMD} build",
2122
"{APIO_CMD} raw -- openFPGALoader -c ft232 --freq 30000000 -v --file-type bin \"{BITSTREAM}\""
2223
]
2324
}

app/resources/boards/iCESugar-Pro_(USB-Blaster)/info.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
},
1919
"commands": {
2020
"upload": [
21+
"{APIO_CMD} build",
2122
"{APIO_CMD} raw -- openFPGALoader -c usb-blaster -v --file-type bin \"{BITSTREAM}\""
2223
]
2324
}

0 commit comments

Comments
 (0)