{"action":"created","comment":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/comments/230050895","pull_request_review_id":170693763,"id":230050895,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMDA1MDg5NQ==","diff_hunk":"@@ -610,24 +610,71 @@ def _get_mem_specs(self, memories, cmsis_part, exception_text):\n                 continue\n         raise ConfigException(exception_text)\n \n-    @property\n-    def rom(self):\n-        \"\"\"Get rom information as a pair of start_addr, size\"\"\"\n+    def _get_all_rom_regions(self, all_regions=False):\n+        \"\"\"Get information of all available rom regions as a pair of [Region, [start_addr, size]]\"\"\"\n         # Override rom_start/rom_size\n         #\n         # This is usually done for a target which:\n         # 1. Doesn't support CMSIS pack, or\n         # 2. Supports TrustZone and user needs to change its flash partition\n+        rom_regions = {}\n+        # Counter to keep track of ROM memories supported by target\n+        rom_active_memories = 0\n+        rom_memories = ['IROM1', 'PROGRAM_FLASH', 'IROM2']\n         cmsis_part = self._get_cmsis_part()\n-        rom_start, rom_size = self._get_mem_specs(\n-            [\"IROM1\", \"PROGRAM_FLASH\"],\n-            cmsis_part,\n-            \"Not enough information in CMSIS packs to build a bootloader \"\n-            \"project\"\n-        )\n-        rom_start = int(getattr(self.target, \"mbed_rom_start\", False) or rom_start, 0)\n-        rom_size = int(getattr(self.target, \"mbed_rom_size\", False) or rom_size, 0)\n-        return (rom_start, rom_size)\n+        for memory in rom_memories:\n+            try:\n+                rom_start, rom_size = self._get_mem_specs(\n+                memory.split(),\n+                cmsis_part,\n+                \"Not enough information in CMSIS packs to build a bootloader \"\n+                \"project\"\n+                )\n+                rom_start = int(rom_start, 0)\n+                rom_size = int(rom_size, 0)\n+                if all_regions == False:\n+                    return rom_start, rom_size\n+                if memory=='IROM1' or memory=='PROGRAM_FLASH':\n+                    memory = 'ROM'\n+                else:\n+                    rom_active_memories += 1\n+                    memory = 'ROM'+str(rom_active_memories)\n+                rom_regions[memory] = [rom_start, rom_size]\n+            except ConfigException:\n+                continue         \n+        return rom_regions\n+\n+    def _get_all_ram_regions(self):\n+        \"\"\"Get information of all available ram regions as a pair of [Region, [start_addr, size]]\"\"\"","path":"tools/config/__init__.py","position":51,"original_position":51,"commit_id":"3fa430d8fe56f697f2b738fb4ac0cadb557996d0","original_commit_id":"3fa430d8fe56f697f2b738fb4ac0cadb557996d0","user":{"login":"theotherjimmy","id":685409,"node_id":"MDQ6VXNlcjY4NTQwOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/685409?v=4","gravatar_id":"","url":"https://api.github.com/users/theotherjimmy","html_url":"https://github.com/theotherjimmy","followers_url":"https://api.github.com/users/theotherjimmy/followers","following_url":"https://api.github.com/users/theotherjimmy/following{/other_user}","gists_url":"https://api.github.com/users/theotherjimmy/gists{/gist_id}","starred_url":"https://api.github.com/users/theotherjimmy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theotherjimmy/subscriptions","organizations_url":"https://api.github.com/users/theotherjimmy/orgs","repos_url":"https://api.github.com/users/theotherjimmy/repos","events_url":"https://api.github.com/users/theotherjimmy/events{/privacy}","received_events_url":"https://api.github.com/users/theotherjimmy/received_events","type":"User","site_admin":false},"body":"Please reword this docstring to mention that this is a mapping/dictionary, and not a list of lists of lists.","created_at":"2018-11-01T14:01:24Z","updated_at":"2018-11-01T14:07:31Z","html_url":"https://github.com/ARMmbed/mbed-os/pull/8607#discussion_r230050895","pull_request_url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/8607","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/comments/230050895"},"html":{"href":"https://github.com/ARMmbed/mbed-os/pull/8607#discussion_r230050895"},"pull_request":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/8607"}}},"pull_request":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/8607","id":227446632,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3NDQ2NjMy","html_url":"https://github.com/ARMmbed/mbed-os/pull/8607","diff_url":"https://github.com/ARMmbed/mbed-os/pull/8607.diff","patch_url":"https://github.com/ARMmbed/mbed-os/pull/8607.patch","issue_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/8607","number":8607,"state":"open","locked":false,"title":"Fetch ram/rom start/size","user":{"login":"aashishc1988","id":39925152,"node_id":"MDQ6VXNlcjM5OTI1MTUy","avatar_url":"https://avatars2.githubusercontent.com/u/39925152?v=4","gravatar_id":"","url":"https://api.github.com/users/aashishc1988","html_url":"https://github.com/aashishc1988","followers_url":"https://api.github.com/users/aashishc1988/followers","following_url":"https://api.github.com/users/aashishc1988/following{/other_user}","gists_url":"https://api.github.com/users/aashishc1988/gists{/gist_id}","starred_url":"https://api.github.com/users/aashishc1988/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aashishc1988/subscriptions","organizations_url":"https://api.github.com/users/aashishc1988/orgs","repos_url":"https://api.github.com/users/aashishc1988/repos","events_url":"https://api.github.com/users/aashishc1988/events{/privacy}","received_events_url":"https://api.github.com/users/aashishc1988/received_events","type":"User","site_admin":false},"body":"Fetch rom/ram start/size information and create defines for the same.\r\n\r\n\r\n    [x ] Fix\r\n    [ ] Refactor\r\n    [ ] Target update\r\n    [ ] Functionality change\r\n    [ ] Docs update\r\n    [ ] Test update\r\n    [ ] Breaking change\r\n\r\n","created_at":"2018-10-31T21:24:01Z","updated_at":"2018-11-01T14:07:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1bb5ba9a31901b0217f61a5f5ec5543fae22bfac","assignee":null,"assignees":[],"requested_reviewers":[{"login":"deepikabhavnani","id":28542450,"node_id":"MDQ6VXNlcjI4NTQyNDUw","avatar_url":"https://avatars3.githubusercontent.com/u/28542450?v=4","gravatar_id":"","url":"https://api.github.com/users/deepikabhavnani","html_url":"https://github.com/deepikabhavnani","followers_url":"https://api.github.com/users/deepikabhavnani/followers","following_url":"https://api.github.com/users/deepikabhavnani/following{/other_user}","gists_url":"https://api.github.com/users/deepikabhavnani/gists{/gist_id}","starred_url":"https://api.github.com/users/deepikabhavnani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deepikabhavnani/subscriptions","organizations_url":"https://api.github.com/users/deepikabhavnani/orgs","repos_url":"https://api.github.com/users/deepikabhavnani/repos","events_url":"https://api.github.com/users/deepikabhavnani/events{/privacy}","received_events_url":"https://api.github.com/users/deepikabhavnani/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":147112891,"node_id":"MDU6TGFiZWwxNDcxMTI4OTE=","url":"https://api.github.com/repos/ARMmbed/mbed-os/labels/needs:%20review","name":"needs: review","color":"fbca04","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/8607/commits","review_comments_url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/8607/comments","review_comment_url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/8607/comments","statuses_url":"https://api.github.com/repos/ARMmbed/mbed-os/statuses/3fa430d8fe56f697f2b738fb4ac0cadb557996d0","head":{"label":"aashishc1988:ram_rom_fetch","ref":"ram_rom_fetch","sha":"3fa430d8fe56f697f2b738fb4ac0cadb557996d0","user":{"login":"aashishc1988","id":39925152,"node_id":"MDQ6VXNlcjM5OTI1MTUy","avatar_url":"https://avatars2.githubusercontent.com/u/39925152?v=4","gravatar_id":"","url":"https://api.github.com/users/aashishc1988","html_url":"https://github.com/aashishc1988","followers_url":"https://api.github.com/users/aashishc1988/followers","following_url":"https://api.github.com/users/aashishc1988/following{/other_user}","gists_url":"https://api.github.com/users/aashishc1988/gists{/gist_id}","starred_url":"https://api.github.com/users/aashishc1988/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aashishc1988/subscriptions","organizations_url":"https://api.github.com/users/aashishc1988/orgs","repos_url":"https://api.github.com/users/aashishc1988/repos","events_url":"https://api.github.com/users/aashishc1988/events{/privacy}","received_events_url":"https://api.github.com/users/aashishc1988/received_events","type":"User","site_admin":false},"repo":{"id":136076186,"node_id":"MDEwOlJlcG9zaXRvcnkxMzYwNzYxODY=","name":"mbed-os","full_name":"aashishc1988/mbed-os","private":false,"owner":{"login":"aashishc1988","id":39925152,"node_id":"MDQ6VXNlcjM5OTI1MTUy","avatar_url":"https://avatars2.githubusercontent.com/u/39925152?v=4","gravatar_id":"","url":"https://api.github.com/users/aashishc1988","html_url":"https://github.com/aashishc1988","followers_url":"https://api.github.com/users/aashishc1988/followers","following_url":"https://api.github.com/users/aashishc1988/following{/other_user}","gists_url":"https://api.github.com/users/aashishc1988/gists{/gist_id}","starred_url":"https://api.github.com/users/aashishc1988/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aashishc1988/subscriptions","organizations_url":"https://api.github.com/users/aashishc1988/orgs","repos_url":"https://api.github.com/users/aashishc1988/repos","events_url":"https://api.github.com/users/aashishc1988/events{/privacy}","received_events_url":"https://api.github.com/users/aashishc1988/received_events","type":"User","site_admin":false},"html_url":"https://github.com/aashishc1988/mbed-os","description":"ARM Mbed OS is a platform operating system designed for the internet of things","fork":true,"url":"https://api.github.com/repos/aashishc1988/mbed-os","forks_url":"https://api.github.com/repos/aashishc1988/mbed-os/forks","keys_url":"https://api.github.com/repos/aashishc1988/mbed-os/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aashishc1988/mbed-os/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aashishc1988/mbed-os/teams","hooks_url":"https://api.github.com/repos/aashishc1988/mbed-os/hooks","issue_events_url":"https://api.github.com/repos/aashishc1988/mbed-os/issues/events{/number}","events_url":"https://api.github.com/repos/aashishc1988/mbed-os/events","assignees_url":"https://api.github.com/repos/aashishc1988/mbed-os/assignees{/user}","branches_url":"https://api.github.com/repos/aashishc1988/mbed-os/branches{/branch}","tags_url":"https://api.github.com/repos/aashishc1988/mbed-os/tags","blobs_url":"https://api.github.com/repos/aashishc1988/mbed-os/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aashishc1988/mbed-os/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aashishc1988/mbed-os/git/refs{/sha}","trees_url":"https://api.github.com/repos/aashishc1988/mbed-os/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aashishc1988/mbed-os/statuses/{sha}","languages_url":"https://api.github.com/repos/aashishc1988/mbed-os/languages","stargazers_url":"https://api.github.com/repos/aashishc1988/mbed-os/stargazers","contributors_url":"https://api.github.com/repos/aashishc1988/mbed-os/contributors","subscribers_url":"https://api.github.com/repos/aashishc1988/mbed-os/subscribers","subscription_url":"https://api.github.com/repos/aashishc1988/mbed-os/subscription","commits_url":"https://api.github.com/repos/aashishc1988/mbed-os/commits{/sha}","git_commits_url":"https://api.github.com/repos/aashishc1988/mbed-os/git/commits{/sha}","comments_url":"https://api.github.com/repos/aashishc1988/mbed-os/comments{/number}","issue_comment_url":"https://api.github.com/repos/aashishc1988/mbed-os/issues/comments{/number}","contents_url":"https://api.github.com/repos/aashishc1988/mbed-os/contents/{+path}","compare_url":"https://api.github.com/repos/aashishc1988/mbed-os/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aashishc1988/mbed-os/merges","archive_url":"https://api.github.com/repos/aashishc1988/mbed-os/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aashishc1988/mbed-os/downloads","issues_url":"https://api.github.com/repos/aashishc1988/mbed-os/issues{/number}","pulls_url":"https://api.github.com/repos/aashishc1988/mbed-os/pulls{/number}","milestones_url":"https://api.github.com/repos/aashishc1988/mbed-os/milestones{/number}","notifications_url":"https://api.github.com/repos/aashishc1988/mbed-os/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aashishc1988/mbed-os/labels{/name}","releases_url":"https://api.github.com/repos/aashishc1988/mbed-os/releases{/id}","deployments_url":"https://api.github.com/repos/aashishc1988/mbed-os/deployments","created_at":"2018-06-04T20:00:25Z","updated_at":"2018-08-10T18:30:58Z","pushed_at":"2018-10-31T21:18:46Z","git_url":"git://github.com/aashishc1988/mbed-os.git","ssh_url":"git@github.com:aashishc1988/mbed-os.git","clone_url":"https://github.com/aashishc1988/mbed-os.git","svn_url":"https://github.com/aashishc1988/mbed-os","homepage":"https://mbed.com","size":234124,"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,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ARMmbed:master","ref":"master","sha":"d8e4daebc49d51e672cf2ab268036bbb53e2329c","user":{"login":"ARMmbed","id":8916057,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg5MTYwNTc=","avatar_url":"https://avatars3.githubusercontent.com/u/8916057?v=4","gravatar_id":"","url":"https://api.github.com/users/ARMmbed","html_url":"https://github.com/ARMmbed","followers_url":"https://api.github.com/users/ARMmbed/followers","following_url":"https://api.github.com/users/ARMmbed/following{/other_user}","gists_url":"https://api.github.com/users/ARMmbed/gists{/gist_id}","starred_url":"https://api.github.com/users/ARMmbed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARMmbed/subscriptions","organizations_url":"https://api.github.com/users/ARMmbed/orgs","repos_url":"https://api.github.com/users/ARMmbed/repos","events_url":"https://api.github.com/users/ARMmbed/events{/privacy}","received_events_url":"https://api.github.com/users/ARMmbed/received_events","type":"Organization","site_admin":false},"repo":{"id":8270972,"node_id":"MDEwOlJlcG9zaXRvcnk4MjcwOTcy","name":"mbed-os","full_name":"ARMmbed/mbed-os","private":false,"owner":{"login":"ARMmbed","id":8916057,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg5MTYwNTc=","avatar_url":"https://avatars3.githubusercontent.com/u/8916057?v=4","gravatar_id":"","url":"https://api.github.com/users/ARMmbed","html_url":"https://github.com/ARMmbed","followers_url":"https://api.github.com/users/ARMmbed/followers","following_url":"https://api.github.com/users/ARMmbed/following{/other_user}","gists_url":"https://api.github.com/users/ARMmbed/gists{/gist_id}","starred_url":"https://api.github.com/users/ARMmbed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARMmbed/subscriptions","organizations_url":"https://api.github.com/users/ARMmbed/orgs","repos_url":"https://api.github.com/users/ARMmbed/repos","events_url":"https://api.github.com/users/ARMmbed/events{/privacy}","received_events_url":"https://api.github.com/users/ARMmbed/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ARMmbed/mbed-os","description":"Arm Mbed OS is a platform operating system designed for the internet of things","fork":false,"url":"https://api.github.com/repos/ARMmbed/mbed-os","forks_url":"https://api.github.com/repos/ARMmbed/mbed-os/forks","keys_url":"https://api.github.com/repos/ARMmbed/mbed-os/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ARMmbed/mbed-os/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ARMmbed/mbed-os/teams","hooks_url":"https://api.github.com/repos/ARMmbed/mbed-os/hooks","issue_events_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/events{/number}","events_url":"https://api.github.com/repos/ARMmbed/mbed-os/events","assignees_url":"https://api.github.com/repos/ARMmbed/mbed-os/assignees{/user}","branches_url":"https://api.github.com/repos/ARMmbed/mbed-os/branches{/branch}","tags_url":"https://api.github.com/repos/ARMmbed/mbed-os/tags","blobs_url":"https://api.github.com/repos/ARMmbed/mbed-os/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ARMmbed/mbed-os/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ARMmbed/mbed-os/git/refs{/sha}","trees_url":"https://api.github.com/repos/ARMmbed/mbed-os/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ARMmbed/mbed-os/statuses/{sha}","languages_url":"https://api.github.com/repos/ARMmbed/mbed-os/languages","stargazers_url":"https://api.github.com/repos/ARMmbed/mbed-os/stargazers","contributors_url":"https://api.github.com/repos/ARMmbed/mbed-os/contributors","subscribers_url":"https://api.github.com/repos/ARMmbed/mbed-os/subscribers","subscription_url":"https://api.github.com/repos/ARMmbed/mbed-os/subscription","commits_url":"https://api.github.com/repos/ARMmbed/mbed-os/commits{/sha}","git_commits_url":"https://api.github.com/repos/ARMmbed/mbed-os/git/commits{/sha}","comments_url":"https://api.github.com/repos/ARMmbed/mbed-os/comments{/number}","issue_comment_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/comments{/number}","contents_url":"https://api.github.com/repos/ARMmbed/mbed-os/contents/{+path}","compare_url":"https://api.github.com/repos/ARMmbed/mbed-os/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ARMmbed/mbed-os/merges","archive_url":"https://api.github.com/repos/ARMmbed/mbed-os/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ARMmbed/mbed-os/downloads","issues_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues{/number}","pulls_url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls{/number}","milestones_url":"https://api.github.com/repos/ARMmbed/mbed-os/milestones{/number}","notifications_url":"https://api.github.com/repos/ARMmbed/mbed-os/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ARMmbed/mbed-os/labels{/name}","releases_url":"https://api.github.com/repos/ARMmbed/mbed-os/releases{/id}","deployments_url":"https://api.github.com/repos/ARMmbed/mbed-os/deployments","created_at":"2013-02-18T15:23:11Z","updated_at":"2018-11-01T06:02:19Z","pushed_at":"2018-11-01T13:47:13Z","git_url":"git://github.com/ARMmbed/mbed-os.git","ssh_url":"git@github.com:ARMmbed/mbed-os.git","clone_url":"https://github.com/ARMmbed/mbed-os.git","svn_url":"https://github.com/ARMmbed/mbed-os","homepage":"https://mbed.com","size":234084,"stargazers_count":2020,"watchers_count":2020,"language":"C","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1654,"mirror_url":null,"archived":false,"open_issues_count":396,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1654,"open_issues":396,"watchers":2020,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/8607"},"html":{"href":"https://github.com/ARMmbed/mbed-os/pull/8607"},"issue":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/issues/8607"},"comments":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/issues/8607/comments"},"review_comments":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/8607/comments"},"review_comment":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/8607/commits"},"statuses":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/statuses/3fa430d8fe56f697f2b738fb4ac0cadb557996d0"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"theotherjimmy"}}