From 790eed6f93dc12df40715ad1062b5ce01badcbd9 Mon Sep 17 00:00:00 2001 From: Damien George Date: Sun, 23 Feb 2014 00:31:11 +0000 Subject: 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. --- stm/pyexec.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'stm/pyexec.c') 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 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); -- cgit v1.2.3