Skip to content

armlink is unaware of Mbed configuration options #13474

@Patater

Description

@Patater

Description of defect

armlink is unaware of any Mbed configuration defines. The scatterfiles are pre-processed, but without any Mbed configuration defines set.

  1. The preprocessor is invoked like so, for K64F for example. Notice no -D options passed or responsefile given: armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m4 -IBUILD/tests/K64F/ARMC6/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_MCU_K64F/device/TOOLCHAIN_ARM_STD
  2. The linker is invoked like so: armlink --via ./BUILD/tests/K64F/ARMC6/./TESTS/mbed_hal/stack_size_unification/.link_options.txt. The .link_options.txt file does have some -D options, but no MBED_CONF_* -D options.

This means the desired behavior expressed within the config system isn't available in linker scripts (scatterfiles) when using Arm Compiler 6.

Discovered when working on #13452

Target(s) affected by this defect ?

Probably all that are buildable with Arm Compiler 6

Toolchain(s) (name and version) displaying this defect ?

Arm Compiler 6

What version of Mbed-os are you using (tag or sha) ?

mbed-os-6.2.1

What version(s) of tools are you using. List all that apply (E.g. mbed-cli)

mbed-cli

How is this defect reproduced ?

Attempt to set any Mbed configuration option the tools don't have special logic to handle. Observe that the MBED_CONF_* macro is not available in the scatterfile.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions