aboutsummaryrefslogtreecommitdiff
path: root/stm/pyexec.c
diff options
context:
space:
mode:
authorDamien George2014-02-23 00:31:11 +0000
committerDamien George2014-02-23 00:31:11 +0000
commit790eed6f93dc12df40715ad1062b5ce01badcbd9 (patch)
treee5016be46f1cc5cfa3be763f25a9ca2be03f1782 /stm/pyexec.c
parentee462489f1da5ea332851843d10541594f6fc7b0 (diff)
stm: Make pendsv_nlr_jump work when debugging is enabled.
Stack layout is different when -g used, so need to handle the pendsv jump differently. Addresses Issue #315.
Diffstat (limited to 'stm/pyexec.c')
-rw-r--r--stm/pyexec.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/stm/pyexec.c b/stm/pyexec.c
index 16a399ce0..207f2234f 100644
--- a/stm/pyexec.c
+++ b/stm/pyexec.c
@@ -245,6 +245,24 @@ void pyexec_repl(void) {
stdout_tx_str("Micro Python build <git hash> on 25/1/2014; " MICROPY_HW_BOARD_NAME " with STM32F405RG\r\n");
stdout_tx_str("Type \"help()\" for more information.\r\n");
+ // to test ctrl-C
+ /*
+ {
+ uint32_t x[4] = {0x424242, 0xdeaddead, 0x242424, 0xdeadbeef};
+ for (;;) {
+ nlr_buf_t nlr;
+ printf("pyexec_repl: %p\n", x);
+ usb_vcp_set_interrupt_char(VCP_CHAR_CTRL_C);
+ if (nlr_push(&nlr) == 0) {
+ for (;;) {
+ }
+ } else {
+ printf("break\n");
+ }
+ }
+ }
+ */
+
vstr_t line;
vstr_init(&line, 32);