{"action":"created","issue":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/9351","repository_url":"https://api.github.com/repos/RIOT-OS/RIOT","labels_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/9351/labels{/name}","comments_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/9351/comments","events_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/9351/events","html_url":"https://github.com/RIOT-OS/RIOT/pull/9351","id":332434980,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0OTE4NDA0","number":9351,"title":"cortexm_common/ldscript: simplify generation of firmwares in section of the ROM","user":{"login":"cladmi","id":241401,"node_id":"MDQ6VXNlcjI0MTQwMQ==","avatar_url":"https://avatars3.githubusercontent.com/u/241401?v=4","gravatar_id":"","url":"https://api.github.com/users/cladmi","html_url":"https://github.com/cladmi","followers_url":"https://api.github.com/users/cladmi/followers","following_url":"https://api.github.com/users/cladmi/following{/other_user}","gists_url":"https://api.github.com/users/cladmi/gists{/gist_id}","starred_url":"https://api.github.com/users/cladmi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cladmi/subscriptions","organizations_url":"https://api.github.com/users/cladmi/orgs","repos_url":"https://api.github.com/users/cladmi/repos","events_url":"https://api.github.com/users/cladmi/events{/privacy}","received_events_url":"https://api.github.com/users/cladmi/received_events","type":"User","site_admin":false},"labels":[{"id":214816571,"node_id":"MDU6TGFiZWwyMTQ4MTY1NzE=","url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/Ready%20for%20CI%20build","name":"Ready for CI build","color":"bfdadc","default":false},{"id":97338598,"node_id":"MDU6TGFiZWw5NzMzODU5OA==","url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/make","name":"make","color":"fad8c7","default":false},{"id":895678065,"node_id":"MDU6TGFiZWw4OTU2NzgwNjU=","url":"https://api.github.com/repos/RIOT-OS/RIOT/labels/ota","name":"ota","color":"eaa1c9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-06-14T14:45:33Z","updated_at":"2018-07-04T08:09:29Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/pulls/9351","html_url":"https://github.com/RIOT-OS/RIOT/pull/9351","diff_url":"https://github.com/RIOT-OS/RIOT/pull/9351.diff","patch_url":"https://github.com/RIOT-OS/RIOT/pull/9351.patch"},"body":"### Contribution description\r\n\r\nThis adds/modifies two build system configuration variables for `cortexm_common/ldscript/cortexm.ld`.\r\n\r\nIt is now possible to generate during a build, different elf files with different rom offset and firmware rom length by setting `ROM_OFFSET` and `FW_ROM_LEN` variables.\r\n\r\n\r\n* Modify `ROM_OFFSET` so it can be set as a target specific variable to be used during linking.\r\n* Add a new `FW_ROM_LEN` variable that can restrict the firmware length to use when linking instead of using the whole rom after `ROM_OFFSET`.\r\n  * The previous solution was to change `ROM_LEN` to be `ROM_LEN = ROM_OFFSET + FW_ROM_LEN` which was not as straightforward to use.\r\n\r\n\r\n### Use cases\r\n\r\nThe goal is firmwares that do not use the whole ROM for the over the air update scenario with a ROM split in 3 parts \"Boot Loader - Firmware 1 - Firmware 2\".\r\n\r\n### Current state\r\n\r\nIn the test, I currently only set the supported board with a whitelist to `iotlab-xx` and `samr21-xpro` nodes. But it should be expandable to all boards using `cortexm_common/ldscript/cortexm.ld` as linking script.\r\nI can do it depending on your feedback.\r\n\r\nThere are compilation tests for:\r\n\r\n* Generating firmware with 2 different offsets\r\n* Generating a firmware with a size of half the rom\r\n* Overflow detection when setting a too big `FW_ROM_LEN`\r\n\r\n### Issues/PRs references\r\n\r\nPart of https://github.com/RIOT-OS/RIOT/issues/9342\r\nDepends on https://github.com/RIOT-OS/RIOT/pull/9451\r\n\r\nThis is a modified version of things inspired from both following branches:\r\n\r\nkYc0o https://github.com/kYc0o/RIOT/tree/ota_firmware_updates\r\nkaspar030 https://github.com/kaspar030/RIOT/tree/ota_firmware_updates\r\n\r\nI did not re-use the existing commits as it is a different implementation.\r\nTell me if you want to be mentioned in a commit."},"comment":{"url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/comments/402399618","html_url":"https://github.com/RIOT-OS/RIOT/pull/9351#issuecomment-402399618","issue_url":"https://api.github.com/repos/RIOT-OS/RIOT/issues/9351","id":402399618,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjM5OTYxOA==","user":{"login":"smlng","id":10532675,"node_id":"MDQ6VXNlcjEwNTMyNjc1","avatar_url":"https://avatars1.githubusercontent.com/u/10532675?v=4","gravatar_id":"","url":"https://api.github.com/users/smlng","html_url":"https://github.com/smlng","followers_url":"https://api.github.com/users/smlng/followers","following_url":"https://api.github.com/users/smlng/following{/other_user}","gists_url":"https://api.github.com/users/smlng/gists{/gist_id}","starred_url":"https://api.github.com/users/smlng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smlng/subscriptions","organizations_url":"https://api.github.com/users/smlng/orgs","repos_url":"https://api.github.com/users/smlng/repos","events_url":"https://api.github.com/users/smlng/events{/privacy}","received_events_url":"https://api.github.com/users/smlng/received_events","type":"User","site_admin":false},"created_at":"2018-07-04T08:09:29Z","updated_at":"2018-07-04T08:09:29Z","author_association":"MEMBER","body":"@cladmi this depends on #9451 right?"}}
{"actor":{"display_login":"smlng"}}