Help to building firmware

Hi,
I am facing problems building firmware in the tutorial 1 - Connecting to Hardware.ipynb in jupyter . First of all I am using:
-ChipWhisperer-Lite Capture
-CW308 UFO Baseboard
-CW308T-STM32F3
And I try with the code

%%bash
cd …/hardware/victims/firmware/simpleserial-base/
make PLATFORM=CW308_STM32F3 CRYPTO_TARGET=NONE

and I got the error like:


and with:
CalledProcessError: Command ‘b’#pwd\ncd …/hardware/victims/firmware/simpleserial-base/\nmake PLATFORM=CW308_STM32F3 CRYPTO_TARGET=NONE\n’’ returned non-zero exit status 2.
(Sorry that I can only post one photo here.)

I have install the Chipwhisperer following the Windows Installer, but still don’t know the reason.

Hi,

If you change %%bash to %%sh, does that fix your issue?

Alex

Hi,

I have exactly the same issue that she describes.
I have change the %%bash to %%sh, unfortunately that doesn’t fix the problem, has anyone an other idea please ?

Gabriel

Hi,

What operation system and install method have you used?

Can you run

%%bash
echo $PATH

and post the output as well?

Alex

Hi!
I have installed it in my local disk C, with a Windows 11Professional Operation System,& I have followed the “Windows Bundled Installer” step in the chipwhisperer official website documentation.

OK Here is a capture of the executed command :

Hope that it’s helpful.

Thank you for your help.

Hi! Just to tell you that it’s okay my problem is fix :grinning:, it was simply an error of writing in the code. (about adding the target reference name properly in the line make plateform…)

Good to hear you got it working.

Alex

Hi,
I am facing a new problems building firmware in the tutorial 1 - Connecting to Hardware.ipynb in jupyter.

I try with the code:
gmake PLATFORM=CW308_STM32F3 CRYPTO_TARGET=NONE

and I got the error:
SS_VER set to SS_VER_1_1
SS_VER set to SS_VER_1_1
SS_VER set to SS_VER_1_1
SS_VER set to SS_VER_1_1
gmake[1]: ‘.dep’ is up to date.
SS_VER set to SS_VER_1_1
SS_VER set to SS_VER_1_1
.
Welcome to another exciting ChipWhisperer target build!!
arm-none-eabi-gcc (GNU Arm Embedded Toolchain 10-2020-q4-major) 10.2.1 20201103 (release)
Copyright (C) 2020 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_STM32F3
.
Compiling:
-en simpleserial-base.c …
-e Done!
.
Compiling:
-en …/./simpleserial/simpleserial.c …
-e Done!
.
Compiling:
-en …/./hal/stm32f3/stm32f3_hal.c …
-e Done!
.
Compiling:
-en …/./hal/stm32f3/stm32f3_hal_lowlevel.c …
-e Done!
.
Compiling:
-en …/./hal/stm32f3/stm32f3_sysmem.c …
-e Done!
.
Assembling: …/./hal/stm32f3/stm32f3_startup.S
arm-none-eabi-gcc -c -mcpu=cortex-m4 -I. -x assembler-with-cpp -mthumb -mfloat-abi=soft -fmessage-length=0 -ffunction-sections -DF_CPU=7372800 -Wa,-gstabs,-adhlns=objdir-CW308_STM32F3/stm32f3_startup.lst -I…/./simpleserial/ -I…/./simpleserial/ -I…/./hal -I…/./hal/stm32f3 -I…/./hal/stm32f3/CMSIS -I…/./hal/stm32f3/CMSIS/core -I…/./hal/stm32f3/CMSIS/device -I…/./hal/stm32f4/Legacy -I…/./crypto/ …/./hal/stm32f3/stm32f3_startup.S -o objdir-CW308_STM32F3/stm32f3_startup.o
.
LINKING:
-en simpleserial-base-CW308_STM32F3.elf …
arm-none-eabi-gcc: fatal error: /usr/local/Cellar/arm-none-eabi-gcc/10-2020-q4-major/gcc/bin/…/lib/gcc/arm-none-eabi/10.2.1/…/…/…/…/arm-none-eabi/lib/nano.specs: attempt to rename spec ‘link’ to already defined spec ‘nano_link’
compilation terminated.
gmake[1]: *** […/./Makefile.inc:495: simpleserial-base-CW308_STM32F3.elf] Error 1
gmake: *** […/./Makefile.inc:347: all] Error 2

The problem may appear on line 35 of the file/hal/stm32f3/Makefile.stm32f3:
LDFLAGS += --specs=nano.specs --specs=nosys.specs -T $(HALPATH)/stm32f3/LinkerScript.ld -Wl,–gc-sections -lm

Make version is as follows:
gmake -v
GNU Make 4.4.1
Built for x86_64-apple-darwin22.3.0
Copyright (C) 1988-2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later https://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

I don’t know how to solve this problem.
Thanks;

Hi,

Try removing the --specs=nano.specs from the makefile.

Alex

I tried to delete the – specs=nano. specs – specs=nosys. specs field, but I still encountered an error:
❯ gmake PLATFORM=CW308_STM32F3 CRYPTO_TARGET=NONE
SS_VER set to SS_VER_1_1
SS_VER set to SS_VER_1_1
SS_VER set to SS_VER_1_1
SS_VER set to SS_VER_1_1
gmake[1]: ‘.dep’ is up to date.
SS_VER set to SS_VER_1_1
SS_VER set to SS_VER_1_1
.
Welcome to another exciting ChipWhisperer target build!!
arm-none-eabi-gcc (GNU Arm Embedded Toolchain 10-2020-q4-major) 10.2.1 20201103 (release)
Copyright (C) 2020 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_STM32F3
.
Compiling:
-en simpleserial-base.c …
-e Done!
.
Compiling:
-en …/./simpleserial/simpleserial.c …
-e Done!
.
Compiling:
-en …/./hal/stm32f3/stm32f3_hal.c …
-e Done!
.
Compiling:
-en …/./hal/stm32f3/stm32f3_hal_lowlevel.c …
-e Done!
.
Compiling:
-en …/./hal/stm32f3/stm32f3_sysmem.c …
-e Done!
.
Assembling: …/./hal/stm32f3/stm32f3_startup.S
arm-none-eabi-gcc -c -mcpu=cortex-m4 -I. -x assembler-with-cpp -mthumb -mfloat-abi=soft -fmessage-length=0 -ffunction-sections -DF_CPU=7372800 -Wa,-gstabs,-adhlns=objdir-CW308_STM32F3/stm32f3_startup.lst -I…/./simpleserial/ -I…/./simpleserial/ -I…/./hal -I…/./hal/stm32f3 -I…/./hal/stm32f3/CMSIS -I…/./hal/stm32f3/CMSIS/core -I…/./hal/stm32f3/CMSIS/device -I…/./hal/stm32f4/Legacy -I…/./crypto/ …/./hal/stm32f3/stm32f3_startup.S -o objdir-CW308_STM32F3/stm32f3_startup.o
.
LINKING:
-en simpleserial-base-CW308_STM32F3.elf …
/usr/local/Cellar/arm-none-eabi-gcc/10-2020-q4-major/gcc/bin/…/lib/gcc/arm-none-eabi/10.2.1/…/…/…/…/arm-none-eabi/bin/ld: error: linker script file ‘…/./hal/stm32f3/LinkerScript.ld’ appears multiple times
collect2: error: ld returned 1 exit status
gmake[1]: *** […/./Makefile.inc:495: simpleserial-base-CW308_STM32F3.elf] Error 1
gmake: *** […/./Makefile.inc:347: all] Error 2

Can you try rerunning the build with DEBUG=TRUE?

For me it worked when i changed it to
%%sh
cd …/hardware/victims/firmware/simpleserial-base/
make PLATFORM=CWNANO CRYPTO_TARGET=NONE

This will still cause errors:

❯ gmake PLATFORM=CW308_STM32F3 CRYPTO_TARGET=NONE DEBUG=TRUE
SS_VER set to SS_VER_1_1
SS_VER set to SS_VER_1_1
SS_VER set to SS_VER_1_1
SS_VER set to SS_VER_1_1
gmake[1]: ‘.dep’ is up to date.
SS_VER set to SS_VER_1_1
SS_VER set to SS_VER_1_1
.
Welcome to another exciting ChipWhisperer target build!!
arm-none-eabi-gcc (GNU Arm Embedded Toolchain 10-2020-q4-major) 10.2.1 20201103 (release)
Copyright (C) 2020 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_STM32F3
.
Compiling:
-en simpleserial-base.c …
arm-none-eabi-gcc: error: unrecognized debug output level ‘TRUE’
gmake[1]: *** […/./Makefile.inc:504: objdir-CW308_STM32F3/simpleserial-base.o] Error 1
gmake: *** […/./Makefile.inc:347: all] Error 2

Hello!
I have a similar problem when running:

%%bash
cd …/firmware/mcu/simpleserial-base/
make PLATFORM= CRYPTO_TARGET=NONE

SS_VER set to SS_VER_1_1
…/./hal/Makefile.hal:303: *** Invalid or empty PLATFORM: . Known platforms:
±------------------------------------------------------+
| PLATFORM | DESCRIPTION |
+=======================================================+
| MOST COMMON TARGETS |
+=======================================================+
±------------------------------------------------------+
| CWLITEARM | CW-Lite Arm (Alias for CW308_STM32F3) |
±------------------------------------------------------+
| CWNANO | CW-Lite Nano (STM32F0_NANO) |
±------------------------------------------------------+
| CWHUSKY | CW-Husky (Alias for CW312_SAM4S) |
±------------------------------------------------------+
+=======================================================+
| AVR/XMEGA Targets (8-Bit RISC) |
+=======================================================+
±------------------------------------------------------+
| CWLITEXMEGA | CW-Lite XMEGA (Alias for CW303) |
±------------------------------------------------------+
| CW301_AVR | Multi-Target Board, AVR Target |
±------------------------------------------------------+
| CW303 | XMEGA Target (CWLite), Also works |
| | for CW308T-XMEGA |
±------------------------------------------------------+
| CW304 | ATMega328P (NOTDUINO), Also works |
| | for CW308T-AVR |
±------------------------------------------------------+
| CW308_MEGARF | ATMega2564RFR2 Target for CW308T |
±------------------------------------------------------+
+=======================================================+

  • ARM Cortex-M Targets (Generic) |
    +=======================================================+
    ±------------------------------------------------------+
    | CWLITEARM | CW-Lite Arm (Alias for CW308_STM32F3) |
    ±------------------------------------------------------+
    | CWNANO | CW-Lite Nano (STM32F0_NANO) |
    ±------------------------------------------------------+
    | CWHUSKY | CW-Husky (Alias for CW312_SAM4S) |
    ±------------------------------------------------------+
    | CW308_STM32F0 | CW308T-STM32F0 (ST Micro STM32F0) |
    ±------------------------------------------------------+
    | CW308_STM32F1 | CW308T-STM32F1 (ST Micro STM32F1) |
    ±------------------------------------------------------+
    | CW308_STM32F2 | CW308T-STM32F2 (ST Micro STM32F2) |
    ±------------------------------------------------------+
    | CW308_STM32F3 | CW308T-STM32F3 (ST Micro STM32F3) |
    ±------------------------------------------------------+
    | CW308_STM32F4 | CW308T-STM32F4 (ST Micro STM32F405) |
    ±------------------------------------------------------+
    +=======================================================+
  • ARM Cortex-M Targets (Support CRYPTO_TARGET=HWAES) |
    +=======================================================+
    ±------------------------------------------------------+
    | CW308_CC2538 | CW308T-CC2538 (TI CC2538) |
    ±------------------------------------------------------+
    | CW308_ | CW308T-EFM32GG11 |
    | EFM32GG11 | (Silicon Labs Giant Gecko) |
    ±------------------------------------------------------+
    | CW308_ | CW-Lite EFM32TG11B |
    | EFM32TG11B | (Silicon Labs Tiny Geko) |
    ±------------------------------------------------------+
    | CW308_ | CW308T-EFR32MG21 (A version without |
    | EFR32MG21A | ‘secure vault’) |
    ±------------------------------------------------------+
    | CW308_ | CW308T-IMXRT1062 (iMX RT1062) |
    | IMXRT1062 | NXP “Cross-Over” Microcontroller |
    ±------------------------------------------------------+
    | CW308_K24F | CW308T-K24F (NXP Kinetis K24F) |
    ±------------------------------------------------------+
    | CW308_K82F | CW308T-K82F (NXP Kinetis K82F) |
    ±------------------------------------------------------+
    | CW308_LPC55S6X| CW308T-LPC55S69 (NXP LPC55S69) |
    ±------------------------------------------------------+
    | CW308_NRF52 | CW308T-NRF52840 (Nordic Semi) |
    ±------------------------------------------------------+
    | CW308_PSOC62 | CW308T-PSOC62 (Cypress PSOC 62) |
    ±------------------------------------------------------+
    | CW308_SAM4L | CW308T-SAM4L (Atmel SAM4L) |
    ±------------------------------------------------------+
    | CW308_SAML11 | CW-Lite SAML11 (Atmel SAML11) |
    ±------------------------------------------------------+
    | CW308_STM32F2 | CW308T-STM32F2HWC (ST Micro STM32F215)|
    ±------------------------------------------------------+
    | CW308_STM32F4 | CW308T-STM32F4HWC (ST Micro STM32F415)|
    ±------------------------------------------------------+
    | CW308_STM32L4 | CW308T-STM32L4 (ST Micro STM32L443) |
    ±------------------------------------------------------+
    | CW308_STM32L5 | CW308T-STM32L5HWC (ST Micro STM32L562)|
    ±------------------------------------------------------+
    | CW312_SAM4S | CW308T-SAM4S (Microchip SAM4S) |
    ±------------------------------------------------------+
    +=======================================================+
  • Other 32-bit Architecture |
    +=======================================================+
    ±------------------------------------------------------+
    | CW308_AURIX | CW-Lite AURIX (Infineon TC233A) |
    ±------------------------------------------------------+
    | CW308_FE310 | CW308T-FE310-G002 (RISC-V) |
    ±------------------------------------------------------+
    | CW308_ | CW308T-MPC5676R (NXP MPC5676R) |
    | MPC5676R | |
    ±--------------|---------------------------------------+
    | CW308_NEORV32 | CW308/CW312-iCE40 with neorv32 |
    | | (RISC-V) soft-core processor. |
    ±--------------|---------------------------------------+
    | CW305_IBEX | CW305 or CW312-A35 with Ibex |
    | | (RISC-V) soft-core processor. |
    ±--------------|---------------------------------------+

Options to define platform:
(1) Run make with PLATFORM specified as follows:
make PLATFORM=CW304

(2) Save a file called Makefile.platform with contents:
PLATFORM=CW304
. Stop.

CalledProcessError Traceback (most recent call last)
Cell In[9], line 1
----> 1 get_ipython().run_cell_magic(‘bash’, ‘’, ‘cd …/firmware/mcu/simpleserial-base/\nmake PLATFORM= CRYPTO_TARGET=NONE\n’)

File ~\ChipWhisperer\cwenv\Lib\site-packages\IPython\core\interactiveshell.py:2542, in InteractiveShell.run_cell_magic(self, magic_name, line, cell)
2540 with self.builtin_trap:
2541 args = (magic_arg_s, cell)
→ 2542 result = fn(*args, **kwargs)
2544 # The code below prevents the output from being displayed
2545 # when using magics with decorator @output_can_be_silenced
2546 # when the last Python token in the expression is a ‘;’.
2547 if getattr(fn, magic.MAGIC_OUTPUT_CAN_BE_SILENCED, False):

File ~\ChipWhisperer\cwenv\Lib\site-packages\IPython\core\magics\script.py:159, in ScriptMagics._make_script_magic..named_script_magic(line, cell)
157 else:
158 line = script
→ 159 return self.shebang(line, cell)

File ~\ChipWhisperer\cwenv\Lib\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-base/\nmake PLATFORM= CRYPTO_TARGET=NONE\n’’ returned non-zero exit status 2.

When I run

%%bash
echo $PATH

The output is:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Users/nicol/ChipWhisperer/cwenv/Scripts:/mnt/c/Windows/system32:/mnt/c/Windows:/mnt/c/Windows/System32/Wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0/:/mnt/c/Windows/System32/OpenSSH/:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/mnt/c/Aldec/Active-HDL-Student-Edition/bin:/mnt/c/Program Files/Git/cmd:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/PuTTY/:/mnt/c/msys64/mingw64/bin:/mnt/c/MinGW/bin:/mnt/c/Program Files/usbipd-win/:/mnt/c/Users/nicol/AppData/Local/Programs/Python/Python310/Scripts/:/mnt/c/Users/nicol/AppData/Local/Programs/Python/Python310/:/mnt/c/Users/nicol/AppData/Local/Microsoft/WindowsApps:/mnt/c/intelFPGA_pro/21.2/modelsim_ase/win32aloem:/mnt/c/MinGW/bin:/mnt/c/Users/nicol/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/msys64/usr/bin:/mnt/c/avr8-gnu-toolchain-win32_x86_64/bin:/snap/bin

Helppp

You need to set the platform in your build command.

I did, but this error shows up:

code running (also tryed with CW303):

%%bash
cd …/firmware/mcu/simpleserial-base/
make PLATFORM= CWLITEXMEGA

output:

SS_VER set to SS_VER_1_1
…/./hal/Makefile.hal:303: *** Invalid or empty PLATFORM: . Known platforms:
±------------------------------------------------------+
| PLATFORM | DESCRIPTION |
+=======================================================+
| MOST COMMON TARGETS |
+=======================================================+
±------------------------------------------------------+
| CWLITEARM | CW-Lite Arm (Alias for CW308_STM32F3) |
±------------------------------------------------------+
| CWNANO | CW-Lite Nano (STM32F0_NANO) |
±------------------------------------------------------+
| CWHUSKY | CW-Husky (Alias for CW312_SAM4S) |
±------------------------------------------------------+
+=======================================================+
| AVR/XMEGA Targets (8-Bit RISC) |
+=======================================================+
±------------------------------------------------------+
| CWLITEXMEGA | CW-Lite XMEGA (Alias for CW303) |
±------------------------------------------------------+
| CW301_AVR | Multi-Target Board, AVR Target |
±------------------------------------------------------+
| CW303 | XMEGA Target (CWLite), Also works |
| | for CW308T-XMEGA |
±------------------------------------------------------+
| CW304 | ATMega328P (NOTDUINO), Also works |
| | for CW308T-AVR |
±------------------------------------------------------+
| CW308_MEGARF | ATMega2564RFR2 Target for CW308T |
±------------------------------------------------------+
+=======================================================+

  • ARM Cortex-M Targets (Generic) |
    +=======================================================+
    ±------------------------------------------------------+
    | CWLITEARM | CW-Lite Arm (Alias for CW308_STM32F3) |
    ±------------------------------------------------------+
    | CWNANO | CW-Lite Nano (STM32F0_NANO) |
    ±------------------------------------------------------+
    | CWHUSKY | CW-Husky (Alias for CW312_SAM4S) |
    ±------------------------------------------------------+
    | CW308_STM32F0 | CW308T-STM32F0 (ST Micro STM32F0) |
    ±------------------------------------------------------+
    | CW308_STM32F1 | CW308T-STM32F1 (ST Micro STM32F1) |
    ±------------------------------------------------------+
    | CW308_STM32F2 | CW308T-STM32F2 (ST Micro STM32F2) |
    ±------------------------------------------------------+
    | CW308_STM32F3 | CW308T-STM32F3 (ST Micro STM32F3) |
    ±------------------------------------------------------+
    | CW308_STM32F4 | CW308T-STM32F4 (ST Micro STM32F405) |
    ±------------------------------------------------------+
    +=======================================================+
  • ARM Cortex-M Targets (Support CRYPTO_TARGET=HWAES) |
    +=======================================================+
    ±------------------------------------------------------+
    | CW308_CC2538 | CW308T-CC2538 (TI CC2538) |
    ±------------------------------------------------------+
    | CW308_ | CW308T-EFM32GG11 |
    | EFM32GG11 | (Silicon Labs Giant Gecko) |
    ±------------------------------------------------------+
    | CW308_ | CW-Lite EFM32TG11B |
    | EFM32TG11B | (Silicon Labs Tiny Geko) |
    ±------------------------------------------------------+
    | CW308_ | CW308T-EFR32MG21 (A version without |
    | EFR32MG21A | ‘secure vault’) |
    ±------------------------------------------------------+
    | CW308_ | CW308T-IMXRT1062 (iMX RT1062) |
    | IMXRT1062 | NXP “Cross-Over” Microcontroller |
    ±------------------------------------------------------+
    | CW308_K24F | CW308T-K24F (NXP Kinetis K24F) |
    ±------------------------------------------------------+
    | CW308_K82F | CW308T-K82F (NXP Kinetis K82F) |
    ±------------------------------------------------------+
    | CW308_LPC55S6X| CW308T-LPC55S69 (NXP LPC55S69) |
    ±------------------------------------------------------+
    | CW308_NRF52 | CW308T-NRF52840 (Nordic Semi) |
    ±------------------------------------------------------+
    | CW308_PSOC62 | CW308T-PSOC62 (Cypress PSOC 62) |
    ±------------------------------------------------------+
    | CW308_SAM4L | CW308T-SAM4L (Atmel SAM4L) |
    ±------------------------------------------------------+
    | CW308_SAML11 | CW-Lite SAML11 (Atmel SAML11) |
    ±------------------------------------------------------+
    | CW308_STM32F2 | CW308T-STM32F2HWC (ST Micro STM32F215)|
    ±------------------------------------------------------+
    | CW308_STM32F4 | CW308T-STM32F4HWC (ST Micro STM32F415)|
    ±------------------------------------------------------+
    | CW308_STM32L4 | CW308T-STM32L4 (ST Micro STM32L443) |
    ±------------------------------------------------------+
    | CW308_STM32L5 | CW308T-STM32L5HWC (ST Micro STM32L562)|
    ±------------------------------------------------------+
    | CW312_SAM4S | CW308T-SAM4S (Microchip SAM4S) |
    ±------------------------------------------------------+
    +=======================================================+
  • Other 32-bit Architecture |
    +=======================================================+
    ±------------------------------------------------------+
    | CW308_AURIX | CW-Lite AURIX (Infineon TC233A) |
    ±------------------------------------------------------+
    | CW308_FE310 | CW308T-FE310-G002 (RISC-V) |
    ±------------------------------------------------------+
    | CW308_ | CW308T-MPC5676R (NXP MPC5676R) |
    | MPC5676R | |
    ±--------------|---------------------------------------+
    | CW308_NEORV32 | CW308/CW312-iCE40 with neorv32 |
    | | (RISC-V) soft-core processor. |
    ±--------------|---------------------------------------+
    | CW305_IBEX | CW305 or CW312-A35 with Ibex |
    | | (RISC-V) soft-core processor. |
    ±--------------|---------------------------------------+

Options to define platform:
(1) Run make with PLATFORM specified as follows:
make PLATFORM=CW304

(2) Save a file called Makefile.platform with contents:
PLATFORM=CW304
. Stop.

CalledProcessError Traceback (most recent call last)
Cell In[7], line 1
----> 1 get_ipython().run_cell_magic(‘bash’, ‘’, ‘cd …/firmware/mcu/simpleserial-base/\nmake PLATFORM= CWLITEXMEGA\n’)

File ~\ChipWhisperer\cwenv\Lib\site-packages\IPython\core\interactiveshell.py:2542, in InteractiveShell.run_cell_magic(self, magic_name, line, cell)
2540 with self.builtin_trap:
2541 args = (magic_arg_s, cell)
→ 2542 result = fn(*args, **kwargs)
2544 # The code below prevents the output from being displayed
2545 # when using magics with decorator @output_can_be_silenced
2546 # when the last Python token in the expression is a ‘;’.
2547 if getattr(fn, magic.MAGIC_OUTPUT_CAN_BE_SILENCED, False):

File ~\ChipWhisperer\cwenv\Lib\site-packages\IPython\core\magics\script.py:159, in ScriptMagics._make_script_magic..named_script_magic(line, cell)
157 else:
158 line = script
→ 159 return self.shebang(line, cell)

File ~\ChipWhisperer\cwenv\Lib\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-base/\nmake PLATFORM= CWLITEXMEGA\n’’ returned non-zero exit status 2.

The platform in your build command is blank. You need to set it to something.

Not sure what you mean, I read:

Options to define platform:
(1) Run make with PLATFORM specified as follows:
make PLATFORM=CW304

So I tryed with make PLATFORM= CWLITEXMEGA, PLATFORM= CW303, and any other platform name of the list but none of these work. Can you provide me an example?

I have Chipwhisperer Lite 2 parts with the xmega target.

Solved, the correct answer was:

%%bash
cd …/firmware/mcu/simpleserial-base/
make PLATFORM=CWLITEXMEGA CRYPTO_TARGET=NONE

Thanks