Skip to content

Hug Report for CircuitPython BareMetal on Raspberry Pi Zero W and Interrupt Step-Over #5864

@TheMindVirus

Description

@TheMindVirus

CircuitPython version

Adafruit CircuitPython 7.2.0-alpha.1-95-g936c9b205n 2022-01-13;
Raspberry Pi Zero W with bcm2835;
BoardID:raspberrypi_zero_w

Code/REPL

print("Hello World!")
input(">>>")

Behavior

REPL Lock-up with no errors or traceback, potentially ARM1176 Interrupt being called and returning to the same place in a loop.
The stack trace and other information matches that for the Pi Zero 2W: Deep Dive w/Scott: Pi Zero 2W + CircuitPython #adafruit

Description

This happens whenever the normal procedure is followed (kernel7.img) for adding CircuitPython BareMetal to an existing installation of Raspberry Pi OS (and it has also been observed to do the same with flashing the disk.img.zip version).
Please see the CircuitPython on Raspberry Pi (Bare Metal / No OS) Adafruit Learn Guide written by Scott for how to get started.

As soon as you press enter over a serial terminal to write something in the REPL, it stops accepting user input and displays no error messages. Some research prior to seeing this suggests that interrupts are being triggered and are not returning to the correct place in memory after they complete. Please additionally see: https://github.com/themindvirus/pix-ies/tree/step-over for more.

The Pi Zero W, Pi Zero 2W, Pi 4 etc. have different generations of processor on board and also both have a different boot procedure and Interrupt Vector Table. The attached example is for the Pi 4 with other branches for Pi Zero, but I'm currently working on re-writing it for ARM1176 instead of Cortex-A72 or Cortex A53. Some assistance on creating an actual PR for this would be appreciated.

Additional information

OBS Studio REPL

REPL

Pepper's Ghost REPL

CircuitPython-PeppersGhost

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions