This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

pragma issue to MDK v5.33 with arm cc v6.15

I have installed MDK v5.33 (with arm c compiler v6.15). I found it can't compile the code which is compiled OK with MDK v5.31 (with arm c compiler v6.14).

with the cc v6.15, the pragma definition:

#pragma clang section text="the_region"

#pragma clang section rodata="the_region"

or merge the two pragma as:

#pragma clang section text="the_region" rodata="the_region"

cc v6.15 will generate error: this causes a section type conflict with a prior #pragma section.

but if I locate text and rodata to different region:

#pragma clang section text="the_region1" rodata="the_region2", or remove one of them, then no error happened.

By comparison, the cc v6.14 (MDK 5.31) has no this problem.

My question is whether cc v6.15 doesn't allow to locate text and rodata to the same region? or is this a bug? 

  • you can check the release note of armclang v6.15

    https://developer.arm.com/tools-and-software/embedded/arm-compiler/downloads/version-6

    The item staring with [SDCOMP-55172]...

  • Thank you for your reply.

    I have checked the Release Note for Download Arm Compiler 6.15:

    [SDCOMP-55172] The compiler incorrectly failed to report an error for certain section type conflicts, when the same section name is specified for more than one section type. This has been fixed. The compiler now reports one of the following errors:

    • this causes a section type conflict with a prior #pragma section.
    • this causes a section type conflict with '<function_or_variable>'.
    • '<function_or_variable>' causes a section type conflict with a prior #pragma section.

    It seems that arm cc v6.15 intends to forbid locating text and rodata to same section name.

    but it's really unreasonable. not only arm cc v6 lower then v6.15 but also arm cc v5 allows to allocate text and rodata to the same section.