ChipWhisperer arm-none-eabi-gcc not found

Hello, I am trying to troubleshoot an issue I am having when running the make file for simpleserial-base. I have downloaded gcc-arm-none-eabi-5_4-2016q3-20160926-win32 and set it to my environment path. When I try to run jupyter lab with ChipWhisperer bash on my Windows OS I get these errors:

%%bash -s "$PLATFORM"
cd C:/Users/codyb/ChipWhisperer5_64/cw/home/portable/chipwhisperer/hardware/victims/firmware/simpleserial-base-lab2
make PLATFORM=$1 CRYPTO_TARGET=NONE
/bin/bash: line 1: cd: C:/Users/codyb/ChipWhisperer5_64/cw/home/portable/chipwhisperer/hardware/victims/firmware/simpleserial-base-lab2: No such file or directory
SS_VER set to SS_VER_1_1
make clean_objs .dep 
make[1]: Entering directory '/mnt/c/Users/codyb/ChipWhisperer5_64/cw/home/portable/chipwhisperer/hardware/victims/firmware/simpleserial-base-lab2'
SS_VER set to SS_VER_1_1
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-CWNANO/*.o
rm -f -- objdir-CWNANO/*.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
mkdir -p .dep
make[1]: Leaving directory '/mnt/c/Users/codyb/ChipWhisperer5_64/cw/home/portable/chipwhisperer/hardware/victims/firmware/simpleserial-base-lab2'
make begin gccversion build sizeafter fastnote end
make[1]: Entering directory '/mnt/c/Users/codyb/ChipWhisperer5_64/cw/home/portable/chipwhisperer/hardware/victims/firmware/simpleserial-base-lab2'
SS_VER set to SS_VER_1_1
.
Welcome to another exciting ChipWhisperer target build!!
sh: 1: arm-none-eabi-gcc: not found
make[1]: *** [.././Makefile.inc:383: gccversion] Error 127
make: *** [.././Makefile.inc:324: all] Error 2
make[1]: Leaving directory '/mnt/c/Users/codyb/ChipWhisperer5_64/cw/home/portable/chipwhisperer/hardware/victims/firmware/simpleserial-base-lab2'
Unexpected exception formatting exception. Falling back to standard exception
Traceback (most recent call last):
  File "d:\pythonnew\python39\lib\site-packages\IPython\core\interactiveshell.py", line 3433, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "C:\Users\codyb\AppData\Local\Temp\ipykernel_9688\3955814668.py", line 1, in <module>
    get_ipython().run_cell_magic('bash', '-s "$PLATFORM"', 'cd C:/Users/codyb/ChipWhisperer5_64/cw/home/portable/chipwhisperer/hardware/victims/firmware/simpleserial-base-lab2\nmake PLATFORM=$1 CRYPTO_TARGET=NONE\n')
  File "d:\pythonnew\python39\lib\site-packages\IPython\core\interactiveshell.py", line 2417, in run_cell_magic
    result = fn(*args, **kwargs)
  File "d:\pythonnew\python39\lib\site-packages\IPython\core\magics\script.py", line 153, in named_script_magic
    return self.shebang(line, cell)
  File "d:\pythonnew\python39\lib\site-packages\IPython\core\magics\script.py", line 305, in shebang
    raise CalledProcessError(rc, cell)
subprocess.CalledProcessError: Command 'b'cd C:/Users/codyb/ChipWhisperer5_64/cw/home/portable/chipwhisperer/hardware/victims/firmware/simpleserial-base-lab2\nmake PLATFORM=$1 CRYPTO_TARGET=NONE\n'' returned non-zero exit status 2.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "d:\pythonnew\python39\lib\site-packages\IPython\core\interactiveshell.py", line 2052, in showtraceback
    stb = self.InteractiveTB.structured_traceback(
  File "d:\pythonnew\python39\lib\site-packages\IPython\core\ultratb.py", line 1112, in structured_traceback
    return FormattedTB.structured_traceback(
  File "d:\pythonnew\python39\lib\site-packages\IPython\core\ultratb.py", line 1006, in structured_traceback
    return VerboseTB.structured_traceback(
  File "d:\pythonnew\python39\lib\site-packages\IPython\core\ultratb.py", line 859, in structured_traceback
    formatted_exception = self.format_exception_as_a_whole(etype, evalue, etb, number_of_lines_of_context,
  File "d:\pythonnew\python39\lib\site-packages\IPython\core\ultratb.py", line 812, in format_exception_as_a_whole
    frames.append(self.format_record(r))
  File "d:\pythonnew\python39\lib\site-packages\IPython\core\ultratb.py", line 730, in format_record
    result += ''.join(_format_traceback_lines(frame_info.lines, Colors, self.has_colors, lvals))
  File "d:\pythonnew\python39\lib\site-packages\stack_data\utils.py", line 144, in cached_property_wrapper
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "d:\pythonnew\python39\lib\site-packages\stack_data\core.py", line 720, in lines
    pieces = self.included_pieces
  File "d:\pythonnew\python39\lib\site-packages\stack_data\utils.py", line 144, in cached_property_wrapper
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "d:\pythonnew\python39\lib\site-packages\stack_data\core.py", line 663, in included_pieces
    scope_pieces = self.scope_pieces
  File "d:\pythonnew\python39\lib\site-packages\stack_data\utils.py", line 144, in cached_property_wrapper
    value = obj.__dict__[self.func.__name__] = self.func(obj)
  File "d:\pythonnew\python39\lib\site-packages\stack_data\core.py", line 600, in scope_pieces
    scope_start, scope_end = self.source.line_range(self.scope)
  File "d:\pythonnew\python39\lib\site-packages\stack_data\core.py", line 164, in line_range
    return line_range(self.asttext(), node)
  File "d:\pythonnew\python39\lib\site-packages\executing\executing.py", line 428, in asttext
    self._asttext = ASTText(self.text, tree=self.tree, filename=self.filename)
  File "d:\pythonnew\python39\lib\site-packages\asttokens\asttokens.py", line 307, in __init__
    super(ASTText, self).__init__(source_text, filename)
  File "d:\pythonnew\python39\lib\site-packages\asttokens\asttokens.py", line 44, in __init__
    source_text = six.ensure_text(source_text)
AttributeError: module 'six' has no attribute 'ensure_text'

When trying to use Ubuntu, following the intructions from this page: https://chipwhisperer.readthedocs.io/en/latest/linux-install.html
As well as pip installing ChipWhisperer and Jupiter-notebook, when trying to run this code:

import chipwhisperer as cw
try:
    if not scope.connectStatus:
        scope.con()
except NameError:
    scope = cw.scope()

try:
    target = cw.target(scope)
except IOError:
    print("INFO: Caught exception on reconnecting to target - attempting to reconnect to scope first.")
    print("INFO: This is a work-around when USB has died without Python knowing. Ignore errors above this line.")
    scope = cw.scope()
    target = cw.target(scope)
print("INFO: Found ChipWhispereršŸ˜")
if "STM" in PLATFORM or PLATFORM == "CWLITEARM" or PLATFORM == "CWNANO":
    prog = cw.programmers.STM32FProgrammer
elif PLATFORM == "CW303" or PLATFORM == "CWLITEXMEGA":
    prog = cw.programmers.XMEGAProgrammer
else:
    prog = None

import time
time.sleep(0.05)
scope.default_setup()
def reset_target(scope):
    if PLATFORM == "CW303" or PLATFORM == "CWLITEXMEGA":
        scope.io.pdic = 'low'
        time.sleep(0.05)
        scope.io.pdic = 'high_z' #XMEGA doesn't like pdic driven high
        time.sleep(0.05)
    else:
        scope.io.nrst = 'low'
        time.sleep(0.05)
        scope.io.nrst = 'high_z'
        time.sleep(0.05)

I get these errors:

NameError                                 Traceback (most recent call last)
<ipython-input-21-e9b975336738> in <module>
      2 try:
----> 3     if not scope.connectStatus:
      4         scope.con()

NameError: name 'scope' is not defined

During handling of the above exception, another exception occurred:

AttributeError                            Traceback (most recent call last)
<ipython-input-21-e9b975336738> in <module>
      4         scope.con()
      5 except NameError:
----> 6     scope = cw.scope()
      7 
      8 try:

AttributeError: module 'chipwhisperer' has no attribute 'scope'

Any help with either the Windows issue or Ubuntu issue would be greatly appreciated.

How are you running Jupyter Lab? Is it via a bash like terminal?

That first error is normal (AFAIK, thereā€™s no way to check if a variable exists without Exceptions), but I donā€™t think Iā€™ve seen that second one. Did you get any errors when running:

python -m pip install -e .
python -m pip install -r jupyter/requirements.txt

Alex