Can’t build SimpleSerial-base NANO

I tried to build a Firmware Build tutorial (SimpleSerial-base) (on Mac 10.15.2) give following error.

-MacBook-Air:simpleserial-base aji$ make PLATFORM=CWNANO CRYPTO_TARGET=NONE

rm -f – simpleserial-base-CWNANO.hex

rm -f – simpleserial-base-CWNANO.eep

rm -f – simpleserial-base-CWNANO.cof

rm -f – simpleserial-base-CWNANO.elf

rm -f – simpleserial-base-CWNANO.map

rm -f – simpleserial-base-CWNANO.sym

rm -f – simpleserial-base-CWNANO.lss

rm -f – objdir/*.o

rm -f – objdir/*.lst

rm -f – simpleserial-base.s simpleserial.s stm32f0_hal_nano.s stm32f0_hal_lowlevel.s

rm -f – simpleserial-base.d simpleserial.d stm32f0_hal_nano.d stm32f0_hal_lowlevel.d

rm -f – simpleserial-base.i simpleserial.i stm32f0_hal_nano.i stm32f0_hal_lowlevel.i

.

-------- begin --------

arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]

Copyright © 2019 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.

.

Compiling C: simpleserial-base.c

arm-none-eabi-gcc -c -mcpu=cortex-m0 -I. -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -mthumb -mfloat-abi=soft -ffunction-sections -gdwarf-2 -DSS_VER=SS_VER_1_1 -DSTM32F030x6 -DSTM32F0 -DSTM32 -DDEBUG -DHAL_TYPE=HAL_stm32f0_nano -DPLATFORM=CWNANO -DF_CPU=7372800UL -Os -funsigned-char -funsigned-bitfields -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=objdir/simpleserial-base.lst -I…/./simpleserial/ -I…/./hal -I…/./hal/stm32f0 -I…/./hal/stm32f0/CMSIS -I…/./hal/stm32f0/CMSIS/core -I…/./hal/stm32f0/CMSIS/device -I…/./hal/stm32f0/Legacy -I…/./crypto/ -std=gnu99 -MMD -MP -MF .dep/simpleserial-base.o.d simpleserial-base.c -o objdir/simpleserial-base.o

arm-none-eabi-gcc: error: unrecognized -march target: core2

arm-none-eabi-gcc: note: valid arguments are: armv4 armv4t armv5t armv5te armv5tej armv6 armv6j armv6k armv6z armv6kz armv6zk armv6t2 armv6-m armv6s-m armv7 armv7-a armv7ve armv7-r armv7-m armv7e-m armv8-a armv8.1-a armv8.2-a armv8.3-a armv8.4-a armv8.5-a armv8-m.base armv8-m.main armv8-r iwmmxt iwmmxt2

arm-none-eabi-gcc: error: missing argument to ’ -march=

arm-none-eabi-gcc: error: unrecognized command line option ’ -mssse3

make: *** […/./Makefile.inc:480: objdir/simpleserial-base.o] Error 1

This is most likely an issue with the compiler version.
In our 5.1.3 VM build we use:

arm-none-eabi-gcc (15:5.4.1+svn241155-1) 5.4.1 20160919
Copyright (C) 2015 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.

Hi,

There’s a bunch of compiler flags that appear to be for x86 compiling, not Arm compiling. First check that you’re running the correct code base:

$ git config --get remote.origin.url

should show something containing newaetech/chipwhisperer.

If you’re got the correct code base, I’m guessing one of the internal variables is getting overwritten somehow. Can you run the following:

$ unset CFLAGS; unset CPPFLAGS; make PLATFORM=CWNANO CRYPTO_TARGET=NONE

and let me know if that works.

Thanks,

Alex