Skip to content

Issue in exporting sample to GCC (ARM Embedded) toolchain on mbed online compiler #3673

@TomoYamanaka

Description

@TomoYamanaka

Description

  • Type: Bug
  • Priority: Major

Bug

As shown below, it seems that '-include mbed_config.h' is specified for g++ compiler
option only when exporting a program to GCC ARM Embedded on mbed online compiler.

CC_FLAGS = $(CPU) -c -g -fno-common -fmessage-length=0 -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers
CC_FLAGS += -fno-exceptions -fno-builtin -ffunction-sections -fdata-sections -fno-delete-null-pointer-checks -fomit-frame-pointer
CC_FLAGS += -MMD -MP


CPPC_FLAGS = -c -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -fmessage-length=0 -fno-exceptions 
*snip* -DDEVICE_SPISLAVE=1 -DDEVICE_ANALOGIN=1 -DDEVICE_PWMOUT=1 -include mbed_config.h -MMD -MP

We think -include mbed_config.h should be needed not only for CPPC_FLAGS, but also for both CC_FLAGS and CPPC_FLAGS.
Otherwise, a compilation error should occur.

Please note that the issue might not occur if mbed export command is used for export.

Could you give us your opinion about the above?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions