{"action":"created","issue":{"url":"https://api.github.com/repos/micropython/micropython/issues/3578","repository_url":"https://api.github.com/repos/micropython/micropython","labels_url":"https://api.github.com/repos/micropython/micropython/issues/3578/labels{/name}","comments_url":"https://api.github.com/repos/micropython/micropython/issues/3578/comments","events_url":"https://api.github.com/repos/micropython/micropython/issues/3578/events","html_url":"https://github.com/micropython/micropython/pull/3578","id":290282034,"number":3578,"title":"ports/esp32 add support for the ulp","user":{"login":"andynd","id":14838994,"avatar_url":"https://avatars2.githubusercontent.com/u/14838994?v=4","gravatar_id":"","url":"https://api.github.com/users/andynd","html_url":"https://github.com/andynd","followers_url":"https://api.github.com/users/andynd/followers","following_url":"https://api.github.com/users/andynd/following{/other_user}","gists_url":"https://api.github.com/users/andynd/gists{/gist_id}","starred_url":"https://api.github.com/users/andynd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andynd/subscriptions","organizations_url":"https://api.github.com/users/andynd/orgs","repos_url":"https://api.github.com/users/andynd/repos","events_url":"https://api.github.com/users/andynd/events{/privacy}","received_events_url":"https://api.github.com/users/andynd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-01-21T15:42:00Z","updated_at":"2018-04-05T15:13:05Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/micropython/micropython/pulls/3578","html_url":"https://github.com/micropython/micropython/pull/3578","diff_url":"https://github.com/micropython/micropython/pull/3578.diff","patch_url":"https://github.com/micropython/micropython/pull/3578.patch"},"body":"add machine.ULP() with functions load_binary, set_wakeup_period and run.\r\nadd constant machine.ULP().COPROC_RESERVE_MEM\r\nadd README.ulp.md with ulp examples"},"comment":{"url":"https://api.github.com/repos/micropython/micropython/issues/comments/378971093","html_url":"https://github.com/micropython/micropython/pull/3578#issuecomment-378971093","issue_url":"https://api.github.com/repos/micropython/micropython/issues/3578","id":378971093,"user":{"login":"mattytrentini","id":194201,"avatar_url":"https://avatars1.githubusercontent.com/u/194201?v=4","gravatar_id":"","url":"https://api.github.com/users/mattytrentini","html_url":"https://github.com/mattytrentini","followers_url":"https://api.github.com/users/mattytrentini/followers","following_url":"https://api.github.com/users/mattytrentini/following{/other_user}","gists_url":"https://api.github.com/users/mattytrentini/gists{/gist_id}","starred_url":"https://api.github.com/users/mattytrentini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattytrentini/subscriptions","organizations_url":"https://api.github.com/users/mattytrentini/orgs","repos_url":"https://api.github.com/users/mattytrentini/repos","events_url":"https://api.github.com/users/mattytrentini/events{/privacy}","received_events_url":"https://api.github.com/users/mattytrentini/received_events","type":"User","site_admin":false},"created_at":"2018-04-05T15:13:05Z","updated_at":"2018-04-05T15:13:05Z","author_association":"NONE","body":"Sorry for the lack of updates @andynd. It was easy enough to build with your changes and the code looks like a nice clean wrapper around the ESP-IDF. It's structured as I would expect ('ULP' module in machine, methods matching the ESP-IDF). \r\n\r\nI'm now at the point of actually trying to do _something useful by using the ULP_ and this is where I'm starting to struggle. \r\n\r\nThere's a fair bit to pull together; installing the ULP toolkit, writing some ULP assembly, compiling it and creating a python example that loads and interacts with the ULP. Although your code looks fine - and could probably be integrated as-is - I feel that we're currently setting a pretty high barrier to entry for someone to _use_ the ULP from MicroPython, mostly due to a lack of documentation and examples.\r\n\r\nFor example, `set_wakeup_period` isn't documented, nor is it clear how to drive the processor into deep sleep mode - a very common use-case for ULP usage. It's also not clear how the entry point (the undocumented first parameter to `load_binary` and `run`) operate in MicroPython - most C examples refer to RTC_SLOW_MEM and an address defined in the ULP assembly, `ulp_entry`. Your example sets a 0 offset which is fine but doesn't seem common.\r\n\r\nSince we're not providing much documentation about the ULP in general at this stage, we should probably at least also include a link to the [ESP-IDF ULP documentation](http://esp-idf.readthedocs.io/en/latest/api-guides/ulp.html).\r\n\r\nAll that said, I'm ok with this being merged - it's exposing the ESP-IDF neatly! - but I think that we should consider this a _start_ and build on it, particularly with examples and documentation. Of course, that doesn't have to come from you @andynd and I'm grateful you've taken the initiative to expose the ULP functionality.\r\n\r\n@dpgeorge do you agree? Are you ok with merging this? "}}
{"actor":{"display_login":"mattytrentini"}}