-
Notifications
You must be signed in to change notification settings - Fork 24
Compilation fails when using multiple source files #31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Upon some further inspection this seems to be an issue with the arduino upload command. arduino --upload --board arduino:avr:uno --port /dev/ttyUSB0 --pref programmer=arduino:avrispmkii --pref build.path=./build test.ino Results in the same error (this command is similar to that which is currently used in the plugin). But this this works (after changing arduino-cli compile -b arduino:avr:uno . -v --build-path `pwd`/build && arduino-cli upload -p /dev/ttyUSB0 --fqbn arduino:avr:uno |
Some time later... I don't know what I did, but it suddenly started working... |
It has been working flawlessly ever since. It was probably a peculiarity with my system. |
Glad to hear it's working! LMK if you ever manage to repro |
Just managed to reproduce it - the issue occurs when the main In my case - my main source file is named See attached gifs for reproduction steps & proof:
I'm sure that this issue is isolated to the directory naming, but just in case, the source code I'm trying to compile is availlable here. |
Unfortunately this seems to be a limitation of the Arduino toolchain. There has been some discussion and it's possible that this requirement will be lifted in the future arduino/arduino-cli#948 |
Looks like the arduino-cli enhancement was declined. Seems like this is just the way Arduino works for the foreseeable future. |
User story: When writing more complicated arduino sketches, I want to split the code up into multiple files.
Issue: Currently if I try to use
include
to inclue another source file, the compilation fails.How to recreate
Create two files in the same directory:
Try to compile & upload the sketch and this error will appear:
This code, however, compiles and uploads successfully when using the arduino-ide.
The text was updated successfully, but these errors were encountered: