So I reinstalled my riscv compiler on both MacOS and inside a Ubuntu VM and got a similar error. I made sure to also tried setting the arch=i_zicsr to include the extension the error printout was complaining about.
I ended up trying to adjust the arch inside the makesife in chipwhisperer/firmware/MCU/neorv32/Makefile.neorv32 by setting “march=rv32i_zicsr” and got a different error (below). It seems this error was caused by an implicit function declaration in syscalls.c inside the neorv32 directory. I added #include “neorv32_uart.h” and this seemed to fix the issue. I think it works now.
In addition to this, when trying the demo glitch loop in lab Fault1.1, got got an error that appears to be related to this post: Husky: No Trigger Seen.
SS_VER set to SS_VER_2_1
SS_VER set to SS_VER_2_1
riscv32-unknown-elf-gcc () 14.2.0
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
mkdir -p objdir-CW308_NEORV32
.
Welcome to another exciting ChipWhisperer target build!!
.
.
Compiling:
Compiling:
-en simpleserial-glitch.c ...
-en .././simpleserial/simpleserial.c ...
.
.
Compiling:
Compiling:
-en .././hal/hal.c ...
-en .././hal//neorv32/neorv32_cfs.c ...
.
.
Compiling:
Compiling:
-en .././hal//neorv32/neorv32_cpu.c ...
-en .././hal//neorv32/neorv32_gpio.c ...
.
-e Done!
Compiling:
.
-en .././hal//neorv32/neorv32_gptmr.c ...
Compiling:
-en .././hal//neorv32/neorv32_mtime.c ...
.
-e Done!
-e Done!
Compiling:
.
-en .././hal//neorv32/neorv32_neoled.c ...
Compiling:
-e Done!
-en .././hal//neorv32/neorv32_pwm.c ...
.
-e Done!
-e Done!
Compiling:
-e Done!
-en .././hal//neorv32/neorv32_rte.c ...
.
-e Done!
Compiling:
-e Done!
-en .././hal//neorv32/neorv32_slink.c ...
.
-e Done!
Compiling:
.
-en .././hal//neorv32/neorv32_spi.c ...
Compiling:
-en .././hal//neorv32/neorv32_trng.c ...
.
Compiling:
.
-en .././hal//neorv32/neorv32_twi.c ...
Compiling:
-en .././hal//neorv32/neorv32_uart.c ...
.
Compiling:
.
-en .././hal//neorv32/neorv32_wdt.c ...
Compiling:
-en .././hal//neorv32/neorv32_xip.c ...
.
Compiling:
.
-en .././hal//neorv32/neorv32_xirq.c ...
Compiling:
-en .././hal//neorv32/neorv32_hal.c ...
.
Compiling:
.
-en .././hal//neorv32/syscalls.c ...
-e Done!
-e Done!
Assembling: .././hal//neorv32/crt0.S
riscv32-unknown-elf-gcc -c -march=rv32i_zicsr -mabi=ilp32 -I. -x assembler-with-cpp -Wall -ffunction-sections -fdata-sections -nostartfiles -mno-fdiv -Wl,--gc-sections -lm -lc -lgcc -lc -falign-functions=4 -falign-labels=4 -falign-loops=4 -falign-jumps=4 -DF_CPU=7372800 -Wa,-gstabs,-adhlns=objdir-CW308_NEORV32/crt0.lst -I.././simpleserial/ -I.././hal/ -I.././hal/ -I.././hal//neorv32 -I.././simpleserial/ -I.././crypto/ .././hal//neorv32/crt0.S -o objdir-CW308_NEORV32/crt0.o
-e Done!
.././hal//neorv32/syscalls.c:103:6: warning: "/*" within comment [-Wcomment]
103 | //*(volatile int *)EXIT_REG = exit_status;
.././hal//neorv32/syscalls.c:134:19: warning: 'struct timeb' declared inside parameter list will not be visible outside of this definition or declaration
134 | int _ftime(struct timeb *tp)
| ^~~~~
.././hal//neorv32/syscalls.c: In function '_write':
.././hal//neorv32/syscalls.c:248:9: error: implicit declaration of function 'neorv32_uart0_putc'; did you mean 'neorv32_uart0_printf'? [-Wimplicit-function-declaration]
248 | neorv32_uart0_putc(*(char *)(ptr++));
| ^~~~~~~~~~~~~~~~~~
| neorv32_uart0_printf
.././hal//neorv32/syscalls.c: In function '_sbrk':
.././hal//neorv32/syscalls.c:266:22: warning: comparison between two arrays [-Warray-compare]
266 | if (__heap_start == __heap_end) {
| ^~
.././hal//neorv32/syscalls.c:266:22: note: use '&__heap_start[0] == &__heap_end[0]' to compare the addresses
-e Done!
make: *** [.././Makefile.inc:506: objdir-CW308_NEORV32/syscalls.o] Error 1
make: *** Waiting for unfinished jobs....
-e Done!
-e Done!
-e Done!
-e Done!
-e Done!
-e Done!
---------------------------------------------------------------------------
CalledProcessError Traceback (most recent call last)
Cell In[9], line 1
----> 1 get_ipython().run_cell_magic('bash', '-s "$PLATFORM" "$SS_VER"', 'cd ../../../firmware/mcu/simpleserial-glitch\nmake PLATFORM=$1 CRYPTO_TARGET=NONE SS_VER=$2 -j\n')
File ~/.cwvenv/lib/python3.10/site-packages/IPython/core/interactiveshell.py:2543, in InteractiveShell.run_cell_magic(self, magic_name, line, cell)
2541 with self.builtin_trap:
2542 args = (magic_arg_s, cell)
-> 2543 result = fn(*args, **kwargs)
2545 # The code below prevents the output from being displayed
2546 # when using magics with decorator @output_can_be_silenced
2547 # when the last Python token in the expression is a ';'.
2548 if getattr(fn, magic.MAGIC_OUTPUT_CAN_BE_SILENCED, False):
File ~/.cwvenv/lib/python3.10/site-packages/IPython/core/magics/script.py:159, in ScriptMagics._make_script_magic.<locals>.named_script_magic(line, cell)
157 else:
158 line = script
--> 159 return self.shebang(line, cell)
File ~/.cwvenv/lib/python3.10/site-packages/IPython/core/magics/script.py:336, in ScriptMagics.shebang(self, line, cell)
331 if args.raise_error and p.returncode != 0:
332 # If we get here and p.returncode is still None, we must have
333 # killed it but not yet seen its return code. We don't wait for it,
334 # in case it's stuck in uninterruptible sleep. -9 = SIGKILL
335 rc = p.returncode or -9
--> 336 raise CalledProcessError(rc, cell)
CalledProcessError: Command 'b'cd ../../../firmware/mcu/simpleserial-glitch\nmake PLATFORM=$1 CRYPTO_TARGET=NONE SS_VER=$2 -j\n'' returned non-zero exit status 2.