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
|
||||
ICETIME_OPTS=-d up5k
|
||||
FN=bldc
|
||||
FLASH_SIZE=524288
|
||||
|
||||
${FN}.bin: ${FN}.asc
|
||||
icepack ${FN}.asc ${FN}.bin
|
||||
${FN}_filled.bin: ${FN}.bin
|
||||
python3 -c "import sys; sys.stdout.buffer.write(b'\xff'*${FLASH_SIZE})" > $@;
|
||||
dd if=$< of=$@ conv=notrunc
|
||||
|
||||
${FN}.json: ${FN}.v
|
||||
./run_yosys.sh ${FN}
|
||||
|
@ -16,7 +18,12 @@ ${FN}.asc: ${FN}.json ${FN}.pcf
|
|||
#${FN}.rpt: ${FN}.pcf ${FN}.txt
|
||||
# icetime $ICETIME_OPTS -p "${FN}.pcf" -mtr "${FN}.rpt" "${FN}.txt"
|
||||
|
||||
clean:
|
||||
rm ${FN}.json ${FN}.asc ${FN}.bin
|
||||
${FN}.bin: ${FN}.asc
|
||||
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