Skip to content

Differentiating between CM33 and CM85 with preprocessor #159

@renesas-kyle-finch

Description

@renesas-kyle-finch

In a previous issue submitted to CMSIS 5, I was told that it was no longer advisable to use the arch defines like __ARM_ARCH_8M_MAIN__ and to instead use __ARM_ARCH.

But dumping preprocessor defines for CM33 and CM85 both yield the same __ARM_ARCH* defines:

// Using GCC 13.2
#define __ARM_ARCH 8
#define __ARM_ARCH_8M_MAIN__ 1
#define __ARM_ARCH_EXT_IDIV__ 1
#define __ARM_ARCH_ISA_THUMB 2
#define __ARM_ARCH_PROFILE 77

Note that GCC generates __ARM_ARCH_8M_MAIN__ for both CM33 and CM85.

LLVM 17 generates the same as GCC, with the exception that it generates __ARM_ARCH_8_1M_MAIN__ for CM85.

How should CM33 and CM85 be differentiated with the preprocessor?

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions