{"action":"created","issue":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/6022","repository_url":"https://api.github.com/repos/ARMmbed/mbed-os","labels_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/6022/labels{/name}","comments_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/6022/comments","events_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/6022/events","html_url":"https://github.com/ARMmbed/mbed-os/pull/6022","id":294607400,"number":6022,"title":"nrf5x: Enable asserts -> mbed_error","user":{"login":"andrewleech","id":3318786,"avatar_url":"https://avatars0.githubusercontent.com/u/3318786?v=4","gravatar_id":"","url":"https://api.github.com/users/andrewleech","html_url":"https://github.com/andrewleech","followers_url":"https://api.github.com/users/andrewleech/followers","following_url":"https://api.github.com/users/andrewleech/following{/other_user}","gists_url":"https://api.github.com/users/andrewleech/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewleech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewleech/subscriptions","organizations_url":"https://api.github.com/users/andrewleech/orgs","repos_url":"https://api.github.com/users/andrewleech/repos","events_url":"https://api.github.com/users/andrewleech/events{/privacy}","received_events_url":"https://api.github.com/users/andrewleech/received_events","type":"User","site_admin":false},"labels":[{"id":390046351,"url":"https://api.github.com/repos/ARMmbed/mbed-os/labels/needs:%20CI","name":"needs: CI","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":23,"created_at":"2018-02-06T02:05:26Z","updated_at":"2018-03-21T22:53:17Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/6022","html_url":"https://github.com/ARMmbed/mbed-os/pull/6022","diff_url":"https://github.com/ARMmbed/mbed-os/pull/6022.diff","patch_url":"https://github.com/ARMmbed/mbed-os/pull/6022.patch"},"body":"## Description\r\n\r\nThe nordic sdk has a lot of asserts to protect against incorrect usage. \r\n\r\nCurrently these are disabled by default which allows serious issues to go undetected such as #6020\r\n\r\nIn this particular case an array internal to nordic sdk code was being written out of bounds `m_cb.handlers[-1] = 0xFF`, with the only tests to prevent this being as ASSERTS\r\n\r\nThis PR enables the nordic aserts by default for the nrf unified platform, with the error handing being passed through to the standard mbed `error()` handler (complete with file:line reference).\r\n\r\nUnfortunately enabling nordic asserts does expose a (known?) typo in SDK 11 code which I've corrected in the second commit here. \r\nI avoid touching the SDK code as a rule but there doesn't appear to be any way around this?\r\nref: https://devzone.nordicsemi.com/f/nordic-q-a/14000/nrf_drv_adc-c-doesn-t-compile-with--ddebug_nrf\r\n\r\n## Status\r\n\r\n**READY**\r\n\r\n## Migrations\r\n\r\nNO\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/comments/375122133","html_url":"https://github.com/ARMmbed/mbed-os/pull/6022#issuecomment-375122133","issue_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/6022","id":375122133,"user":{"login":"cmonr","id":260086,"avatar_url":"https://avatars1.githubusercontent.com/u/260086?v=4","gravatar_id":"","url":"https://api.github.com/users/cmonr","html_url":"https://github.com/cmonr","followers_url":"https://api.github.com/users/cmonr/followers","following_url":"https://api.github.com/users/cmonr/following{/other_user}","gists_url":"https://api.github.com/users/cmonr/gists{/gist_id}","starred_url":"https://api.github.com/users/cmonr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmonr/subscriptions","organizations_url":"https://api.github.com/users/cmonr/orgs","repos_url":"https://api.github.com/users/cmonr/repos","events_url":"https://api.github.com/users/cmonr/events{/privacy}","received_events_url":"https://api.github.com/users/cmonr/received_events","type":"User","site_admin":false},"created_at":"2018-03-21T22:53:17Z","updated_at":"2018-03-21T22:53:17Z","author_association":"CONTRIBUTOR","body":"@andrewleech Welp, looks like you have some ARM compiler debugging in your near future.\r\n\r\nLooks like there's a missing symbol on some tests with certain targets when using the ARM compiler:\r\n\r\n`        [DEBUG] Errors: Error: L6218E: Undefined symbol STACK$$Length (referred from /builds/ws/mbed-os-build-matrix/1521/MTB_LAIRD_BL600_ARM/sources/mbed-os/BUILD/tests/MTB_LAIRD_BL600/ARM/targets/TARGET_NORDIC/TARGET_NRF5/TARGET_MCU_NRF51822_UNIFIED/sdk/drivers_nrf/adc/nrf_drv_adc.o).`"}}
{"actor":{"display_login":"cmonr"}}