Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: GlasgowEmbedded/glasgow
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: ca37b73bce67
Choose a base ref
...
head repository: GlasgowEmbedded/glasgow
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b2d99e65df94
Choose a head ref
  • 2 commits
  • 5 files changed
  • 1 contributor

Commits on Jan 14, 2020

  1. applet.interface.uart: add repl command.

    Useful for playing with binary interfaces over UART, for example
    MCU bootloaders.
    whitequark committed Jan 14, 2020
    Copy the full SHA
    99bc27d View commit details
  2. Copy the full SHA
    b2d99e6 View commit details
2 changes: 1 addition & 1 deletion docs/archive
1 change: 1 addition & 0 deletions software/glasgow/applet/all.py
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@
from .program.avr.spi import ProgramAVRSPIApplet
from .program.ice40_flash import ProgramICE40FlashApplet
from .program.ice40_sram import ProgramICE40SRAMApplet
from .program.m16c import ProgramM16CApplet
from .program.mec16xx import ProgramMEC16xxApplet
from .program.nrf24lx1 import ProgramNRF24Lx1Applet
from .program.xc6s import ProgramXC6SApplet
6 changes: 6 additions & 0 deletions software/glasgow/applet/interface/uart/__init__.py
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@
import asyncio
from nmigen.compat import *

from ....support.pyrepl import *
from ....support.endpoint import *
from ....gateware.pads import *
from ....gateware.uart import *
@@ -207,6 +208,9 @@ def add_interact_arguments(cls, parser):
"socket", help="connect UART to a socket")
ServerEndpoint.add_argument(p_socket, "endpoint")

p_repl = p_operation.add_parser(
"repl", help="drop into Python shell; use `iface` to communicate")

async def _monitor_errors(self, device):
cur_bit_cyc = await device.read_register(self.__addr_bit_cyc, width=4)
cur_errors = 0
@@ -334,6 +338,8 @@ async def interact(self, device, args, uart):
await self._interact_pty(uart)
if args.operation == "socket":
await self._interact_socket(uart, args.endpoint)
if args.operation == "repl":
await AsyncInteractiveConsole(locals={"iface":uart}).interact()

# -------------------------------------------------------------------------------------------------

Loading