Generate a usable binary file for flashrom
This commit is contained in:
parent
9ae99282b2
commit
af286d07ca
17
rtl/Makefile
17
rtl/Makefile
|
@ -3,9 +3,11 @@
|
||||||
NEXTPNR_OPTS=--up5k --package sg48
|
NEXTPNR_OPTS=--up5k --package sg48
|
||||||
ICETIME_OPTS=-d up5k
|
ICETIME_OPTS=-d up5k
|
||||||
FN=bldc
|
FN=bldc
|
||||||
|
FLASH_SIZE=524288
|
||||||
|
|
||||||
${FN}.bin: ${FN}.asc
|
${FN}_filled.bin: ${FN}.bin
|
||||||
icepack ${FN}.asc ${FN}.bin
|
python3 -c "import sys; sys.stdout.buffer.write(b'\xff'*${FLASH_SIZE})" > $@;
|
||||||
|
dd if=$< of=$@ conv=notrunc
|
||||||
|
|
||||||
${FN}.json: ${FN}.v
|
${FN}.json: ${FN}.v
|
||||||
./run_yosys.sh ${FN}
|
./run_yosys.sh ${FN}
|
||||||
|
@ -16,7 +18,12 @@ ${FN}.asc: ${FN}.json ${FN}.pcf
|
||||||
#${FN}.rpt: ${FN}.pcf ${FN}.txt
|
#${FN}.rpt: ${FN}.pcf ${FN}.txt
|
||||||
# icetime $ICETIME_OPTS -p "${FN}.pcf" -mtr "${FN}.rpt" "${FN}.txt"
|
# icetime $ICETIME_OPTS -p "${FN}.pcf" -mtr "${FN}.rpt" "${FN}.txt"
|
||||||
|
|
||||||
clean:
|
${FN}.bin: ${FN}.asc
|
||||||
rm ${FN}.json ${FN}.asc ${FN}.bin
|
icepack ${FN}.asc ${FN}.bin
|
||||||
|
|
||||||
flash: $FN.bin
|
|
||||||
|
clean:
|
||||||
|
rm ${FN}.json ${FN}.asc ${FN}.bin ${FN}_filled.bin
|
||||||
|
|
||||||
|
flash: ${FN}_filled.bin
|
||||||
|
flashrom -p ft2232_spi:type=232H,port=A -w "${FN}_filled.bin"
|
||||||
|
|
Loading…
Reference in New Issue