micropython/tools
Damien George d92694c3e8 tools: Only issue a single Ctrl-C when entering raw REPL.
A long time ago when there was only the `stm` port, Ctrl-C would trigger a
preemptive NLR jump to break out of running code.  Then in commit
124df6f8d0 a more general approach to
asynchronous `KeyboardInterrupt` exceptions was implemented, and `stmhal`
supported both approaches, with the general (soft) interrupt taking
priority.

Then in commit bc1488a05f `pyboard.py` was
updated with a corresponding change to make it issue a double Ctrl-C to
break out of any existing code when entering the raw REPL (two Ctrl-C
characters were sent in order to more reliably trigger the preemptive NLR
jump).

No other port has preemptive NLR jumps and so a double Ctrl-C doesn't
really behave any differently to a single Ctrl-C: with USB CDC the double
Ctrl-C would most likely be in the same USB packet and so processed in the
same low-level USB callback, so it's just setting the keyboard interrupt
flag twice in a row.  The VM/runtime then just sees one keyboard interrupt
and acts as though only one Ctrl-C was sent.

This commit changes the double Ctrl-C to a single Ctrl-C in `pyboard.py`
and `mpremote`.  That keeps things as simple as they need to be.

Signed-off-by: Damien George <damien@micropython.org>
2024-10-15 11:40:08 +11:00
..
autobuild esp32/boards: Remove all IDF3 variants. 2024-08-20 12:49:12 +10:00
mpremote tools: Only issue a single Ctrl-C when entering raw REPL. 2024-10-15 11:40:08 +11:00
.gitattributes micropython-upip: Mark as binary file and re-commit. 2015-06-06 23:09:23 +03:00
boardgen.py all: Remove the "STATIC" macro and just use "static" instead. 2024-03-07 14:20:42 +11:00
cc1 tools: Add C middle-processor to make builtin tables proper hash tables. 2015-12-31 00:24:33 +00:00
ci.sh zephyr: Upgrade to Zephyr v3.7.0. 2024-10-02 07:49:53 +10:00
codeformat.py nrf/modules/machine: Enable code formatting. 2024-03-26 12:49:09 +11:00
codestats.sh all: Prune trailing whitespace. 2024-03-07 16:25:17 +11:00
dfu.py tools/dfu.py: Make tool work with python3 when parsing DFU files. 2021-11-01 15:46:59 +11:00
file2h.py all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
gen-changelog.sh tools/gen-changelog.sh: Exclude "-preview" tags from generated log. 2024-01-05 15:06:14 +11:00
gen-cpydiff.py docs: Add note about position-only arguments in CPython vs MicroPython. 2024-01-25 11:56:38 +11:00
hci_trace_to_pcap.py extmod/modbluetooth: Make all HCI transports trace in the same format. 2023-04-26 11:37:20 +10:00
insert-usb-ids.py all: Fix strings with backslash by using raw string literals. 2023-05-02 11:55:02 +10:00
makemanifest.py tools/makemanifest.py: Generate working code for empty manifests. 2024-06-05 14:07:26 +02:00
manifestfile.py tools/manifestfile.py: Fix freeze() when script is an empty iterable. 2024-03-25 13:41:37 +11:00
metrics.py tools/metrics.py: Add VIRT_RV32 to the code size metrics. 2024-09-23 13:03:26 +10:00
mpy-tool.py tools/mpy-tool.py: Support freezing rv32imc native code. 2024-09-04 16:46:39 +10:00
mpy_bin2res.py tools/mpy_bin2res: Tools to convert binary resources to Python module. 2017-07-27 14:41:27 +03:00
mpy_cross_all.py all: Remove MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE. 2021-09-16 16:04:03 +10:00
mpy_ld.py tools/mpy_ld.py: Support jumping more than 2k on armv6m architectures. 2024-09-19 14:52:58 +10:00
pyboard.py tools: Only issue a single Ctrl-C when entering raw REPL. 2024-10-15 11:40:08 +11:00
pydfu.py all: Fix various spelling mistakes found by codespell 2.2.6. 2023-10-03 11:24:50 +11:00
uf2conv.py all: Fix strings with backslash by using raw string literals. 2023-05-02 11:55:02 +10:00
uf2families.json tools/uf2conv.py: Update to latest version. 2022-02-02 23:43:58 +11:00
uncrustify.cfg all: Fix spelling mistakes based on codespell check. 2023-04-27 18:03:06 +10:00
verifygitlog.py CODECONVENTIONS: Require that commits be signed-off by the author. 2023-05-08 12:20:56 +10:00