{"action":"created","issue":{"url":"https://api.github.com/repos/micropython/micropython/issues/1065","labels_url":"https://api.github.com/repos/micropython/micropython/issues/1065/labels{/name}","comments_url":"https://api.github.com/repos/micropython/micropython/issues/1065/comments","events_url":"https://api.github.com/repos/micropython/micropython/issues/1065/events","html_url":"https://github.com/micropython/micropython/pull/1065","id":54323852,"number":1065,"title":"The CC3200 port is ready to go live","user":{"login":"danicampora","id":7749335,"avatar_url":"https://avatars.githubusercontent.com/u/7749335?v=3","gravatar_id":"","url":"https://api.github.com/users/danicampora","html_url":"https://github.com/danicampora","followers_url":"https://api.github.com/users/danicampora/followers","following_url":"https://api.github.com/users/danicampora/following{/other_user}","gists_url":"https://api.github.com/users/danicampora/gists{/gist_id}","starred_url":"https://api.github.com/users/danicampora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danicampora/subscriptions","organizations_url":"https://api.github.com/users/danicampora/orgs","repos_url":"https://api.github.com/users/danicampora/repos","events_url":"https://api.github.com/users/danicampora/events{/privacy}","received_events_url":"https://api.github.com/users/danicampora/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":21,"created_at":"2015-01-14T13:50:22Z","updated_at":"2015-01-25T19:19:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/micropython/micropython/pulls/1065","html_url":"https://github.com/micropython/micropython/pull/1065","diff_url":"https://github.com/micropython/micropython/pull/1065.diff","patch_url":"https://github.com/micropython/micropython/pull/1065.patch"},"body":"There are still things to do, like adding Python bindings for SPI and I2C, but the core functionality is in. The REPL can be accessed over telnet and UART, and the file system is accessible through the FTP server running on the board. There are 2 drives, a 128KB one located in the serial flash and another on the SD card (if inserted). With the release image there are currently 72KB of RAM available for the MicroPython heap and 6.5KB reserved for the stack. The goal is to still have around 64K of heap available after adding SPI, I2C and hardware timers support. The rest should be implemented in Python depending on the specific needs of each project."},"comment":{"url":"https://api.github.com/repos/micropython/micropython/issues/comments/71387148","html_url":"https://github.com/micropython/micropython/pull/1065#issuecomment-71387148","issue_url":"https://api.github.com/repos/micropython/micropython/issues/1065","id":71387148,"user":{"login":"danicampora","id":7749335,"avatar_url":"https://avatars.githubusercontent.com/u/7749335?v=3","gravatar_id":"","url":"https://api.github.com/users/danicampora","html_url":"https://github.com/danicampora","followers_url":"https://api.github.com/users/danicampora/followers","following_url":"https://api.github.com/users/danicampora/following{/other_user}","gists_url":"https://api.github.com/users/danicampora/gists{/gist_id}","starred_url":"https://api.github.com/users/danicampora/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danicampora/subscriptions","organizations_url":"https://api.github.com/users/danicampora/orgs","repos_url":"https://api.github.com/users/danicampora/repos","events_url":"https://api.github.com/users/danicampora/events{/privacy}","received_events_url":"https://api.github.com/users/danicampora/received_events","type":"User","site_admin":false},"created_at":"2015-01-25T19:19:47Z","updated_at":"2015-01-25T19:19:47Z","body":"What happens is the following: when I press CTRL-C, the code in pyexec.c jumps to:\r\n```c\r\n        // uncaught exception\r\n        // FIXME it could be that an interrupt happens just before we disable it here\r\n        mp_hal_set_interrupt_char(-1); // disable interrupt\r\n        // print EOF after normal output\r\n        if (exec_flags & EXEC_FLAG_PRINT_EOF) {\r\n            stdout_tx_strn(\"\\x04\", 1);\r\n        }\r\n        // check for SystemExit\r\n        if (mp_obj_is_subclass_fast(mp_obj_get_type((mp_obj_t)nlr.ret_val), &mp_type_SystemExit)) {\r\n            // at the moment, the value of SystemExit is unused\r\n            ret = PYEXEC_FORCED_EXIT;\r\n        } else {\r\n            mp_obj_print_exception(printf_wrapper, NULL, (mp_obj_t)nlr.ret_val);\r\n            if (mp_obj_is_subclass_fast(mp_obj_get_type((mp_obj_t)nlr.ret_val), &mp_type_KeyboardInterrupt)) {\r\n                ret = PYEXEC_KB_EXIT;\r\n            } else {\r\n                ret = 0;\r\n            }\r\n        }\r\n```\r\n`mp_type_KeyboardInterrupt` is not a subclass of `mp_type_SystemExit`, so the check for SystemExit fails, thats why I added the else block afterwards. I made I mistake with my previous comments, the truth is that without the added code, interrupting a 'main.py' script with CTRL-C causes the output of `__fatal_error(\"could not run MAIN.PY\");`\r\n\r\nProbably is because I have a bug in my implementation of the `interrupt char` for the CC3200, but I was not able to see the issue. Let's have another look....\r\n"}}