Skip to content
This repository was archived by the owner on Apr 16, 2021. It is now read-only.
This repository was archived by the owner on Apr 16, 2021. It is now read-only.

Please explain '-iwithprefixbefore' in 'includes.txt' #78

@oclyke

Description

@oclyke

Hi @facchinm (or others 🙂) - Inspired by this project I am trying to build a similar mbed-os core for the Apollo3.

I have faced an issue trying to supply additional include search paths to the compile steps in a portable (cross platform) capable way.

  • Using the @file syntax from mbed's generated include directly won't work because those paths are relative and I can't guarantee the working directory that my compiler is called from (can I?)
  • I've tried writing scripts to use the IDE's {runtime.platform.path} variable to generate a list of search paths that are absolute, however this bloats the number of characters from ~16k (mbed generated include file) to ~40k (varies based on the exact install location of the core) which causes an error running GCC. (~32k characters seems to be the limit for a single command line call)

At a loss I came back to this project for a reference. I see in your variant's includes.txt it has this leading -iwithprefixbefore/ and that it is directly included in your compile / link lines ("@{compiler.mbed.includes}" -> nano33ble.compiler.mbed.includes={build.variant.path}/includes.txt)

Can you please explain what that prefix is doing? How is it handled by the Arduino IDE?

Thanks a lot - I have been trying hard to determine a way to expose the full mbed API to the user in this core.

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