{"action":"opened","number":4304,"pull_request":{"url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/pulls/4304","id":146341548,"html_url":"https://github.com/zephyrproject-rtos/zephyr/pull/4304","diff_url":"https://github.com/zephyrproject-rtos/zephyr/pull/4304.diff","patch_url":"https://github.com/zephyrproject-rtos/zephyr/pull/4304.patch","issue_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/4304","number":4304,"state":"open","locked":false,"title":"Python-based flashing","user":{"login":"mbolivar","id":35088,"avatar_url":"https://avatars3.githubusercontent.com/u/35088?v=4","gravatar_id":"","url":"https://api.github.com/users/mbolivar","html_url":"https://github.com/mbolivar","followers_url":"https://api.github.com/users/mbolivar/followers","following_url":"https://api.github.com/users/mbolivar/following{/other_user}","gists_url":"https://api.github.com/users/mbolivar/gists{/gist_id}","starred_url":"https://api.github.com/users/mbolivar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbolivar/subscriptions","organizations_url":"https://api.github.com/users/mbolivar/orgs","repos_url":"https://api.github.com/users/mbolivar/repos","events_url":"https://api.github.com/users/mbolivar/events{/privacy}","received_events_url":"https://api.github.com/users/mbolivar/received_events","type":"User","site_admin":false},"body":"Reimplement the flash scripts in pure Python, and use this in the flash target. This is a step towards removing the dependency on a shell when flashing and debugging, which will help on Windows post-CMake.\r\n\r\nTo fall back on the shell scripts, set USE_ZEPHYR_FLASH_DEBUG_SHELL to any nonempty value for now.\r\n\r\nThe Python script initially behaves as much as possible like the shell scripts. It thus uses the current environment variables, and contains Linux-specific behavior for some flash backends (those used in em_starterkit, arduino_due, and boards using nrfjprog).\r\n\r\nThis series enables the following future work:\r\n\r\n- reimplement 'debug' and 'debugserver' in Python, to allow deleting the shell scripts\r\n- make the script DT-aware (critical in some situations, e.g. when CONFIG_FLASH_LOAD_OFFSET is used)\r\n- call the script with command line arguments rather than using environment variables","created_at":"2017-10-12T23:50:20Z","updated_at":"2017-10-12T23:50:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/pulls/4304/commits","review_comments_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/pulls/4304/comments","review_comment_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/4304/comments","statuses_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/statuses/392a59b877101f4246bb089c6e10bdd68d25e393","head":{"label":"mbolivar:python-flash-scripts","ref":"python-flash-scripts","sha":"392a59b877101f4246bb089c6e10bdd68d25e393","user":{"login":"mbolivar","id":35088,"avatar_url":"https://avatars3.githubusercontent.com/u/35088?v=4","gravatar_id":"","url":"https://api.github.com/users/mbolivar","html_url":"https://github.com/mbolivar","followers_url":"https://api.github.com/users/mbolivar/followers","following_url":"https://api.github.com/users/mbolivar/following{/other_user}","gists_url":"https://api.github.com/users/mbolivar/gists{/gist_id}","starred_url":"https://api.github.com/users/mbolivar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbolivar/subscriptions","organizations_url":"https://api.github.com/users/mbolivar/orgs","repos_url":"https://api.github.com/users/mbolivar/repos","events_url":"https://api.github.com/users/mbolivar/events{/privacy}","received_events_url":"https://api.github.com/users/mbolivar/received_events","type":"User","site_admin":false},"repo":{"id":81252146,"name":"zephyr","full_name":"mbolivar/zephyr","owner":{"login":"mbolivar","id":35088,"avatar_url":"https://avatars3.githubusercontent.com/u/35088?v=4","gravatar_id":"","url":"https://api.github.com/users/mbolivar","html_url":"https://github.com/mbolivar","followers_url":"https://api.github.com/users/mbolivar/followers","following_url":"https://api.github.com/users/mbolivar/following{/other_user}","gists_url":"https://api.github.com/users/mbolivar/gists{/gist_id}","starred_url":"https://api.github.com/users/mbolivar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbolivar/subscriptions","organizations_url":"https://api.github.com/users/mbolivar/orgs","repos_url":"https://api.github.com/users/mbolivar/repos","events_url":"https://api.github.com/users/mbolivar/events{/privacy}","received_events_url":"https://api.github.com/users/mbolivar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mbolivar/zephyr","description":"My Zephyr tree for upstreaming","fork":true,"url":"https://api.github.com/repos/mbolivar/zephyr","forks_url":"https://api.github.com/repos/mbolivar/zephyr/forks","keys_url":"https://api.github.com/repos/mbolivar/zephyr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mbolivar/zephyr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mbolivar/zephyr/teams","hooks_url":"https://api.github.com/repos/mbolivar/zephyr/hooks","issue_events_url":"https://api.github.com/repos/mbolivar/zephyr/issues/events{/number}","events_url":"https://api.github.com/repos/mbolivar/zephyr/events","assignees_url":"https://api.github.com/repos/mbolivar/zephyr/assignees{/user}","branches_url":"https://api.github.com/repos/mbolivar/zephyr/branches{/branch}","tags_url":"https://api.github.com/repos/mbolivar/zephyr/tags","blobs_url":"https://api.github.com/repos/mbolivar/zephyr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mbolivar/zephyr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mbolivar/zephyr/git/refs{/sha}","trees_url":"https://api.github.com/repos/mbolivar/zephyr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mbolivar/zephyr/statuses/{sha}","languages_url":"https://api.github.com/repos/mbolivar/zephyr/languages","stargazers_url":"https://api.github.com/repos/mbolivar/zephyr/stargazers","contributors_url":"https://api.github.com/repos/mbolivar/zephyr/contributors","subscribers_url":"https://api.github.com/repos/mbolivar/zephyr/subscribers","subscription_url":"https://api.github.com/repos/mbolivar/zephyr/subscription","commits_url":"https://api.github.com/repos/mbolivar/zephyr/commits{/sha}","git_commits_url":"https://api.github.com/repos/mbolivar/zephyr/git/commits{/sha}","comments_url":"https://api.github.com/repos/mbolivar/zephyr/comments{/number}","issue_comment_url":"https://api.github.com/repos/mbolivar/zephyr/issues/comments{/number}","contents_url":"https://api.github.com/repos/mbolivar/zephyr/contents/{+path}","compare_url":"https://api.github.com/repos/mbolivar/zephyr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mbolivar/zephyr/merges","archive_url":"https://api.github.com/repos/mbolivar/zephyr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mbolivar/zephyr/downloads","issues_url":"https://api.github.com/repos/mbolivar/zephyr/issues{/number}","pulls_url":"https://api.github.com/repos/mbolivar/zephyr/pulls{/number}","milestones_url":"https://api.github.com/repos/mbolivar/zephyr/milestones{/number}","notifications_url":"https://api.github.com/repos/mbolivar/zephyr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mbolivar/zephyr/labels{/name}","releases_url":"https://api.github.com/repos/mbolivar/zephyr/releases{/id}","deployments_url":"https://api.github.com/repos/mbolivar/zephyr/deployments","created_at":"2017-02-07T20:42:30Z","updated_at":"2017-06-07T18:39:06Z","pushed_at":"2017-10-12T23:34:42Z","git_url":"git://github.com/mbolivar/zephyr.git","ssh_url":"git@github.com:mbolivar/zephyr.git","clone_url":"https://github.com/mbolivar/zephyr.git","svn_url":"https://github.com/mbolivar/zephyr","homepage":"","size":87512,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"zephyrproject-rtos:master","ref":"master","sha":"a73d3737f18c3b93100a152fb88f1965a7cc393e","user":{"login":"zephyrproject-rtos","id":19595895,"avatar_url":"https://avatars2.githubusercontent.com/u/19595895?v=4","gravatar_id":"","url":"https://api.github.com/users/zephyrproject-rtos","html_url":"https://github.com/zephyrproject-rtos","followers_url":"https://api.github.com/users/zephyrproject-rtos/followers","following_url":"https://api.github.com/users/zephyrproject-rtos/following{/other_user}","gists_url":"https://api.github.com/users/zephyrproject-rtos/gists{/gist_id}","starred_url":"https://api.github.com/users/zephyrproject-rtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zephyrproject-rtos/subscriptions","organizations_url":"https://api.github.com/users/zephyrproject-rtos/orgs","repos_url":"https://api.github.com/users/zephyrproject-rtos/repos","events_url":"https://api.github.com/users/zephyrproject-rtos/events{/privacy}","received_events_url":"https://api.github.com/users/zephyrproject-rtos/received_events","type":"Organization","site_admin":false},"repo":{"id":59771425,"name":"zephyr","full_name":"zephyrproject-rtos/zephyr","owner":{"login":"zephyrproject-rtos","id":19595895,"avatar_url":"https://avatars2.githubusercontent.com/u/19595895?v=4","gravatar_id":"","url":"https://api.github.com/users/zephyrproject-rtos","html_url":"https://github.com/zephyrproject-rtos","followers_url":"https://api.github.com/users/zephyrproject-rtos/followers","following_url":"https://api.github.com/users/zephyrproject-rtos/following{/other_user}","gists_url":"https://api.github.com/users/zephyrproject-rtos/gists{/gist_id}","starred_url":"https://api.github.com/users/zephyrproject-rtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zephyrproject-rtos/subscriptions","organizations_url":"https://api.github.com/users/zephyrproject-rtos/orgs","repos_url":"https://api.github.com/users/zephyrproject-rtos/repos","events_url":"https://api.github.com/users/zephyrproject-rtos/events{/privacy}","received_events_url":"https://api.github.com/users/zephyrproject-rtos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zephyrproject-rtos/zephyr","description":"Primary GIT Repository for the Zephyr Project","fork":false,"url":"https://api.github.com/repos/zephyrproject-rtos/zephyr","forks_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/forks","keys_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/teams","hooks_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/hooks","issue_events_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/events{/number}","events_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/events","assignees_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/assignees{/user}","branches_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/branches{/branch}","tags_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/tags","blobs_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/git/refs{/sha}","trees_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/statuses/{sha}","languages_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/languages","stargazers_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/stargazers","contributors_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/contributors","subscribers_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/subscribers","subscription_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/subscription","commits_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/commits{/sha}","git_commits_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/git/commits{/sha}","comments_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/comments{/number}","issue_comment_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/comments{/number}","contents_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/contents/{+path}","compare_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/merges","archive_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/downloads","issues_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues{/number}","pulls_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/pulls{/number}","milestones_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/milestones{/number}","notifications_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/labels{/name}","releases_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/releases{/id}","deployments_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/deployments","created_at":"2016-05-26T17:54:19Z","updated_at":"2017-10-12T12:37:32Z","pushed_at":"2017-10-12T23:25:03Z","git_url":"git://github.com/zephyrproject-rtos/zephyr.git","ssh_url":"git@github.com:zephyrproject-rtos/zephyr.git","clone_url":"https://github.com/zephyrproject-rtos/zephyr.git","svn_url":"https://github.com/zephyrproject-rtos/zephyr","homepage":"http://zephyrproject.org/doc","size":90212,"stargazers_count":381,"watchers_count":381,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":301,"mirror_url":null,"open_issues_count":690,"forks":301,"open_issues":690,"watchers":381,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zephyrproject-rtos/zephyr/pulls/4304"},"html":{"href":"https://github.com/zephyrproject-rtos/zephyr/pull/4304"},"issue":{"href":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/4304"},"comments":{"href":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/4304/comments"},"review_comments":{"href":"https://api.github.com/repos/zephyrproject-rtos/zephyr/pulls/4304/comments"},"review_comment":{"href":"https://api.github.com/repos/zephyrproject-rtos/zephyr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zephyrproject-rtos/zephyr/pulls/4304/commits"},"statuses":{"href":"https://api.github.com/repos/zephyrproject-rtos/zephyr/statuses/392a59b877101f4246bb089c6e10bdd68d25e393"}},"author_association":"COLLABORATOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":9,"additions":746,"deletions":0,"changed_files":3}}
{"actor":{"display_login":"mbolivar"}}