Hi everyone! I'm trying to program my MPW2-board G...
# caravel-board
n
Hi everyone! I'm trying to program my MPW2-board GPIOs. I have done what is in https://github.com/efabless/caravel_board/blob/main/README.md: after installing the toolchain I tried pip3 install pyftdi, cd firmware/blink, make clean flash, but the make statement gives an error like ".*orig can´t be read*". So, I've tried to manually program the board by mean of the caravel_hkflash.py blink.hex statement, but it retrieves mfg=ffff, product=ff, project ID=ffffffff, and the board remains with the same blinking program as when it is powered on. Any ideas? Thank you in advance!
I have also tried to compile the Makefile on https://github.com/efabless/caravel/tree/main/verilog/dv/caravel/mgmt_soc/gpio_mgmt, but I have the error iverilog not found. When I try to flash the board with the gpio_mgmt.hex I have the same error I had befor with blink.hex
@Matt Venn @Tim Edwards @jeffdi
m
I'm already asking for you
Will update when I know more
n
Thank you Matt!
👍 1
t
@Nico Calarco: The ".orig" error is something that I have also found in the code (@jeffdi: attn); this seems to be an OS-dependent
sed
syntax issue. The Makefile recipe has
Copy code
%.hex: %.elf
        $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-unknown-elf-objcopy -O verilog $< $@
        sed -i '.orig' -e 's/@1000/@0000/g' $@
but for my OS (Fedora) version of
sed
there is no allowed space after the
-i
argument, so it has to be edited to
Copy code
%.hex: %.elf
        $(TOOLCHAIN_PATH)$(TOOLCHAIN_PREFIX)-unknown-elf-objcopy -O verilog $< $@
        sed -i'.orig' -e 's/@1000/@0000/g' $@
Other things to note: Always use files in
firmware_vex/
for MPW-two, not
firmware/
. For running in simulation in the caravel repository,
iverilog
is called without a path, so whereever it is located must be in your
PATH
environment variable. There are various reasons why Caravel returns
0xff
values for all data from the SPI; basically it means that the SPI isn't communicating, which can be for any number of reasons having to do with anything in the chain from the USB driver on the host computer to the FTDI chip on the board to the SPI on caravel itself. For a Caravel chip that has been programmed to run any GPIO configuration that is not compatible with the SPI operation (that is, overwrites the GPIO configuration on pins 1 to 4), the SPI will become unreachable directly after power-up, and the only solution to that is a rather tedious operation of unplugging the board from power, then with the reset button on the board pressed down, plug the power back in. Then run the
make flash
while the button is still pressed down (this is harder than it sounds). Once the
make flash
is running and indicates that the flash is being erased, you can let go of the button.
@Matt Venn: Memorize my response. These questions are going to get asked a lot.
m
Already on it via a new document
n
Ok Tim, thank you very much! There are a lot of things to do. First I gonna try to solve the compiling issues. After that I will try to flash the board with the reset button trick. Just for being sure, here is a photo of my board: I guess I have to solder a button in the place of "sw1", right?
t
Ah, yes, that's one of the things we didn't get assembled. I hope we did send you a button?
n
Don't worry! I just ask to confirm the place. I solder one 🙂