Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Build process should start in the sketch directory #1374

@AlexIII

Description

@AlexIII

Description

Building with arduino-builder.exe should start in the sketch directory in order to comply to Arduino IDE.
Right now it starts from the extension's some sub-directory.

This leads to problems when including files with relative path from inline assembler, because relative path in inline assembler is relative to the current directory in which the compiler is running (and not to the source file).

For example, it makes it impossible to use incbin which works fine in the original Arduino IDE.

Test case

TEST1/test.bin - empty file

TEST1/sketch1/sketch1.ino

__asm__ (
    ".incbin \"../test.bin\"\n"
);
void setup() {}
void loop() {}

This sketch will compile with Arduino IDE, but not with vscode-arduino.

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