Skip to content
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

Closed
AlexIII opened this issue Nov 3, 2021 · 2 comments
Closed

Build process should start in the sketch directory #1374

AlexIII opened this issue Nov 3, 2021 · 2 comments

Comments

@AlexIII
Copy link

AlexIII commented Nov 3, 2021

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.

@AlexIII
Copy link
Author

AlexIII commented Nov 3, 2021

PR provided

benmcmorran added a commit that referenced this issue Nov 5, 2021
@benmcmorran
Copy link
Member

PR merged.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants