{"action":"created","issue":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/5021","repository_url":"https://api.github.com/repos/ARMmbed/mbed-os","labels_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/5021/labels{/name}","comments_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/5021/comments","events_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/5021/events","html_url":"https://github.com/ARMmbed/mbed-os/pull/5021","id":255268543,"number":5021,"title":"ARMCC - FromELF multiple regions","user":{"login":"chrissnow","id":3310276,"avatar_url":"https://avatars3.githubusercontent.com/u/3310276?v=4","gravatar_id":"","url":"https://api.github.com/users/chrissnow","html_url":"https://github.com/chrissnow","followers_url":"https://api.github.com/users/chrissnow/followers","following_url":"https://api.github.com/users/chrissnow/following{/other_user}","gists_url":"https://api.github.com/users/chrissnow/gists{/gist_id}","starred_url":"https://api.github.com/users/chrissnow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrissnow/subscriptions","organizations_url":"https://api.github.com/users/chrissnow/orgs","repos_url":"https://api.github.com/users/chrissnow/repos","events_url":"https://api.github.com/users/chrissnow/events{/privacy}","received_events_url":"https://api.github.com/users/chrissnow/received_events","type":"User","site_admin":false},"labels":[{"id":147112891,"url":"https://api.github.com/repos/ARMmbed/mbed-os/labels/needs:%20review","name":"needs: review","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-09-05T12:58:33Z","updated_at":"2017-09-05T14:13:59Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/5021","html_url":"https://github.com/ARMmbed/mbed-os/pull/5021","diff_url":"https://github.com/ARMmbed/mbed-os/pull/5021.diff","patch_url":"https://github.com/ARMmbed/mbed-os/pull/5021.patch"},"body":"## Description\r\nELF files containing multiple regions were being converted to a folder with each region as a separate file, this caused the build scripts to fail since the .bin was not created.\r\n\r\nThis was noticed when building LPC1768 with a bootloader as the CRP word is set as a seperate region.\r\nhttps://github.com/ARMmbed/mbed-os/blob/5bddd881e98101f5c491cccf3367894ecb4e89dd/targets/TARGET_NXP/TARGET_LPC176X/device/TOOLCHAIN_ARM_STD/startup_LPC17xx.S#L86\r\n\r\n## Status\r\n**READY**\r\n\r\n\r\n## Migrations\r\n\r\nNO\r\n\r\n\r\n## Related PRs\r\n\r\n\r\n## Todos\r\n\r\n## Deploy notes\r\n\r\n## Steps to test or reproduce\r\nEnable bootloader support for LPC1768 and try and build\r\n```\r\nLink: mbed-os-example-bootloader-blinky_application\r\n[DEBUG] Link: C:/Keil_v5/ARM/ARMCC\\bin\\armlink --via .\\BUILD\\lpc1768\\arm\\.link_files.txt\r\n[DEBUG] Return: 0\r\nElf2Bin: mbed-os-example-bootloader-blinky_application\r\n[DEBUG] FromELF: C:/Keil_v5/ARM/ARMCC\\bin\\fromelf --bin -o .\\BUILD\\lpc1768\\arm\\mbed-os-example-bootloader-blinky_application.bin .\\BUILD\\lpc1768\\arm\\mbed-os-example-bootloader-blinky_application.elf\r\n[DEBUG] Return: 1\r\n[DEBUG] Errors: Error: Q0147E: Failed to create Directory .\\BUILD\\lpc1768\\arm\\mbed-os-example-bootloader-blinky_application.bin\\ER$$.ARM.__at_0x02FC: File exists\r\n[DEBUG] Errors: Finished: 0 information, 0 warning and 1 error messages.\r\nTraceback (most recent call last):\r\n  File \"c:\\Code\\Chris\\mbed-os-example-bootloader-blinky\\mbed-os\\tools\\make.py\", line 296, in <module>\r\n    stats_depth=options.stats_depth)\r\n  File \"c:\\Code\\Chris\\mbed-os-example-bootloader-blinky\\mbed-os\\tools\\build_api.py\", line 544, in build_project\r\n    res, _ = toolchain.link_program(resources, build_path, name + \"_application\")\r\n  File \"c:\\Code\\Chris\\mbed-os-example-bootloader-blinky\\mbed-os\\tools\\toolchains\\__init__.py\", line 1128, in link_program\r\n    self.binary(r, elf, bin)\r\n  File \"c:\\Code\\Chris\\mbed-os-example-bootloader-blinky\\mbed-os\\tools\\hooks.py\", line 51, in wrapper\r\n    res = function(t_self, *args, **kwargs)\r\n  File \"c:\\Code\\Chris\\mbed-os-example-bootloader-blinky\\mbed-os\\tools\\toolchains\\arm.py\", line 229, in binary\r\n    self.default_cmd(cmd)\r\n  File \"c:\\Code\\Chris\\mbed-os-example-bootloader-blinky\\mbed-os\\tools\\toolchains\\__init__.py\", line 1152, in default_cmd\r\n    raise ToolException(_stderr)\r\nToolException: Error: Q0147E: Failed to create Directory .\\BUILD\\lpc1768\\arm\\mbed-os-example-bootloader-blinky_application.bin\\ER$$.ARM.__at_0x02FC: File exists\r\nFinished: 0 information, 0 warning and 1 error messages.\r\n\r\n[mbed] ERROR: \"c:\\python27\\python.exe\" returned error code 1.\r\n[mbed] ERROR: Command \"c:\\python27\\python.exe -u c:\\Code\\Chris\\mbed-os-example-bootloader-blinky\\mbed-os\\tools\\make.py -t arm -m lpc1768 --source . --build .\\BUILD\\lpc1768\\arm -v\" in \"c:\\Code\\Chris\\mbed-os-example-bootloader-blinky\"\r\n---\r\n```\r\n![image](https://user-images.githubusercontent.com/3310276/30062135-00c5b6d4-9242-11e7-90d8-aa4c0ac1bdc5.png)\r\n\r\n![image](https://user-images.githubusercontent.com/3310276/30062166-16929554-9242-11e7-9c00-79a1d90b1089.png)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/comments/327188384","html_url":"https://github.com/ARMmbed/mbed-os/pull/5021#issuecomment-327188384","issue_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/5021","id":327188384,"user":{"login":"chrissnow","id":3310276,"avatar_url":"https://avatars3.githubusercontent.com/u/3310276?v=4","gravatar_id":"","url":"https://api.github.com/users/chrissnow","html_url":"https://github.com/chrissnow","followers_url":"https://api.github.com/users/chrissnow/followers","following_url":"https://api.github.com/users/chrissnow/following{/other_user}","gists_url":"https://api.github.com/users/chrissnow/gists{/gist_id}","starred_url":"https://api.github.com/users/chrissnow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrissnow/subscriptions","organizations_url":"https://api.github.com/users/chrissnow/orgs","repos_url":"https://api.github.com/users/chrissnow/repos","events_url":"https://api.github.com/users/chrissnow/events{/privacy}","received_events_url":"https://api.github.com/users/chrissnow/received_events","type":"User","site_admin":false},"created_at":"2017-09-05T14:13:59Z","updated_at":"2017-09-05T14:13:59Z","author_association":"CONTRIBUTOR","body":"http://www.keil.com/support/man/docs/armutil/armutil_pge1362128885938.htm\r\n\r\n> Considerations when using --bin\r\n> If you convert an ELF image containing multiple load regions to a binary format, fromelf creates an output directory named destination and generates one binary output file for each load region in the input image. fromelf places the output files in the destination directory.\r\n"}}
{"actor":{"display_login":"chrissnow"}}