Neorv32 FPGA file

Hello, hopefully a quick question. I was interested in trying to load an updated version of the neorv32 softcore from the neorv32 builds. I struggled to get the toolchain to work but I found a cached file from their GitHub action run, so I grabbed that. Theoretically it should be the file I need.

Issue: the loading always fails (error below)

SCOPETYPE = 'OPENADC'
PLATFORM = 'CW308_NEORV32'
SS_VER = 'SS_VER_2_1'
%run "../../Setup_Scripts/Setup_Generic.ipynb"
neorv = cw.programmers.Neorv32Programmer(scope)
fw_path = "../../../firmware/mcu/simpleserial-glitch-tiny-aes/simpleserial-glitch-tiny-aes-{}.bin".format(PLATFORM)
neorv.open_port()
neorv.program(fw_path, bsfile="neorv32_iCE40CW312_MinimalBoot.bit")
neorv.close_port()
---------------------------------------------------------------------------
OSError                                   Traceback (most recent call last)
Cell In[8], line 4
      2 fw_path = "../../../firmware/mcu/simpleserial-glitch-tiny-aes/simpleserial-glitch-tiny-aes-{}.bin".format(PLATFORM)
      3 neorv.open_port()
----> 4 neorv.program(fw_path, bsfile="neorv32_iCE40CW312_MinimalBoot.bit")
      5 neorv.close_port()

File ~/Projects/ChipWhisperer/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_neorv32.py:75, in close_on_fail.<locals>.func_wrapper(self, *args, **kwargs)
     72 @wraps(func)
     73 def func_wrapper(self, *args, **kwargs):
     74     try:
---> 75         return func(self, *args, **kwargs)
     76     except:
     77         self.close_port()

File ~/Projects/ChipWhisperer/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_neorv32.py:230, in Neorv32Programmer.program(self, romfilename, bsfile, check_rom_size)
    227 target_logger.debug(b"Start Message from Bootlader: " + start_msg)
    229 # Check the menu worked
--> 230 self.do_cmd("h", expected="Available CMDs:\r\n h: Help\r\n r: Restart\r\n u: Upload\r\n")
    232 # Upload
    233 self.do_cmd("u", "Awaiting neorv32_exe.bin... ")

File ~/Projects/ChipWhisperer/chipwhisperer/software/chipwhisperer/hardware/naeusb/programmer_neorv32.py:194, in Neorv32Programmer.do_cmd(self, cmd, expected, flush_first, flush_wait, cmd_wait, resp_read_len)
    191 target_logger.debug(b"Response to '" + cmd + b"': " + resp)
    193 if bytes(expected, "ascii") not in resp:
--> 194     raise IOError(b"Sync error with bootloader - invalid response to '" + cmd + b"' command (%b)"%resp)
    196 return resp.decode('ascii')

OSError: b"Sync error with bootloader - invalid response to 'h' command (Aborted.\r\n\r\nType 'h' for help.\r\nCMD:> )"

Hi,

That is the correct way to specify a bitfile; you can confirm this by pointing explicitly to the neorv32 bitfile that we include:

neorv.open_port()
neorv.program("firmware/mcu/simpleserial-aes/simpleserial-aes-CW308_NEORV32.bin", bsfile='software/chipwhisperer/hardware/firmware/cwtargetice40/neorv32_iCE40CW312_MinimalBoot_directclk_7370KHz.bit')
neorv.close_port()

Which means there is some issue with their github actions bitfile.

We will look into sorting out how to build a functional neorv32 core for our target board from scratch, but I can’t promise a fast answer for that.

J-P

1 Like

Do you know if there has been any update on this?

Not yet, I hope to get to it within a week.

Was there any progress on this?

Not yet, and I can’t promise a date for it.