{"action":"created","issue":{"url":"https://api.github.com/repos/micropython/micropython/issues/1055","labels_url":"https://api.github.com/repos/micropython/micropython/issues/1055/labels{/name}","comments_url":"https://api.github.com/repos/micropython/micropython/issues/1055/comments","events_url":"https://api.github.com/repos/micropython/micropython/issues/1055/events","html_url":"https://github.com/micropython/micropython/pull/1055","id":53975118,"number":1055,"title":"[pre-review] bare-arm: Make runnable port.","user":{"login":"pfalcon","id":500451,"avatar_url":"https://avatars.githubusercontent.com/u/500451?v=3","gravatar_id":"","url":"https://api.github.com/users/pfalcon","html_url":"https://github.com/pfalcon","followers_url":"https://api.github.com/users/pfalcon/followers","following_url":"https://api.github.com/users/pfalcon/following{/other_user}","gists_url":"https://api.github.com/users/pfalcon/gists{/gist_id}","starred_url":"https://api.github.com/users/pfalcon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfalcon/subscriptions","organizations_url":"https://api.github.com/users/pfalcon/orgs","repos_url":"https://api.github.com/users/pfalcon/repos","events_url":"https://api.github.com/users/pfalcon/events{/privacy}","received_events_url":"https://api.github.com/users/pfalcon/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-10T23:17:11Z","updated_at":"2015-01-11T18:29:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/micropython/micropython/pulls/1055","html_url":"https://github.com/micropython/micropython/pull/1055","diff_url":"https://github.com/micropython/micropython/pull/1055.diff","patch_url":"https://github.com/micropython/micropython/pull/1055.patch"},"body":"Patch which addresses #1053. It's made against bare-arm to show what kind of changes were required. I'd like to confirm list of steps to make this mergeable:\r\n\r\n1. As discussed in #1053, we want to leave bare-arm as is. Then, this should be a new port dir, initially based off bare-arm still. Suggestion for name are welcome just \"bare\"? Or \"minimal\"?\r\n2. I don't want to base, or relate this port to \"unix\" port in any way. This is intended to show a bare embedded port, with additional feature of being able to be compiled in \"emulation\" mode on POSIX system (where UART will be emulated by tty, configured suitably).\r\n3. As a workaround to various small&dirty issues, this port is intended to be limited to 32-bit.\r\n\r\nSo, let me know if this sounds ok to create a \"production\" branch.\r\n"},"comment":{"url":"https://api.github.com/repos/micropython/micropython/issues/comments/69504933","html_url":"https://github.com/micropython/micropython/pull/1055#issuecomment-69504933","issue_url":"https://api.github.com/repos/micropython/micropython/issues/1055","id":69504933,"user":{"login":"pfalcon","id":500451,"avatar_url":"https://avatars.githubusercontent.com/u/500451?v=3","gravatar_id":"","url":"https://api.github.com/users/pfalcon","html_url":"https://github.com/pfalcon","followers_url":"https://api.github.com/users/pfalcon/followers","following_url":"https://api.github.com/users/pfalcon/following{/other_user}","gists_url":"https://api.github.com/users/pfalcon/gists{/gist_id}","starred_url":"https://api.github.com/users/pfalcon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pfalcon/subscriptions","organizations_url":"https://api.github.com/users/pfalcon/orgs","repos_url":"https://api.github.com/users/pfalcon/repos","events_url":"https://api.github.com/users/pfalcon/events{/privacy}","received_events_url":"https://api.github.com/users/pfalcon/received_events","type":"User","site_admin":false},"created_at":"2015-01-11T18:29:39Z","updated_at":"2015-01-11T18:29:39Z","body":"> By \"runnable\" do you mean that it'll actually run on some hardware (eg a qemu simulated board), or that it's \"almost runnable\" and still requires at least UART.\r\n\r\nYes, so idea of \"runnable\" is that it has I/O support, and minimal way of that is UART. So, to make it actually run, UART support for particular hardware needs to be implemented. But once that is done (2 functions to send/receive a character), it results in working minimal interpreter (with GC, etc). UART emulation for POSIX tty device is provided. I also used such port as a basis of Leaflabs Maple port (which, besides this change, is very hacky). Having a qemu cortex-m port would be also nice, that's why I pinged @errordeveloper in another ticket.\r\n\r\n> For the \"emulation\" mode (ie not cross compiled), will it create an executable?\r\n\r\nSure, normal x86 executable, which requires setting tty to a mode equivalent to \"raw UART\" mode to be usable:\r\n\r\n~~~~\r\nstty raw opost -echo\r\nbuild/firmware.elf\r\necho Resetting terminal...\r\nsleep 1\r\nreset\r\n~~~~\r\n"}}