Mbed-os: NRF52 linker script is incomplete for ARMCC and IAR

Created on 24 May 2018  路  4Comments  路  Source: ARMmbed/mbed-os

Description

The latest softdevice and nordic SDK have introduced a new way of registering event handlers: Event handlers are not registered in RAM at runtime, they are registered in flash at compile time. Unfortunately this mechanism requires some help from the linker script to group events handlers in specific program sections. This is correctly done in GCC linker script (see here) but not done at all with ARMCC or IAR linker scripts. As a result BLE doesn't work properly on those targets when an application is compiled with ARMCC or GCC.

This issue also applies for NRF52840 targets.

Issue request type

[ ] Question
[ ] Enhancement
[X] Bug

closed_in_jira nordic mirrored bug

Most helpful comment

Hi @marcuschangarm, it's a placement issue: the new Nordic SDK places event handlers in a specific linker section. As those sections are not present in the ARMCC and IAR linker scripts, these handlers end up in other sections and the SDK cannot see them (and they therefore never get called).

All 4 comments

@marcuschangarm Could you review this issue ?

I didn't find the equivalent sections in the ARMCC and IAR linker script examples so I assumed they weren't necessary. What linker errors are you getting?

Hi @marcuschangarm, it's a placement issue: the new Nordic SDK places event handlers in a specific linker section. As those sections are not present in the ARMCC and IAR linker scripts, these handlers end up in other sections and the SDK cannot see them (and they therefore never get called).

ARM Internal Ref: MBOTRIAGE-17

Was this page helpful?
0 / 5 - 0 ratings

Related issues

drahnr picture drahnr  路  4Comments

bcostm picture bcostm  路  4Comments

ccchang12 picture ccchang12  路  4Comments

chrissnow picture chrissnow  路  4Comments

DuyTrandeLion picture DuyTrandeLion  路  3Comments