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

Compilation error for Arduino/Genuino 101 #33

Closed
ricms93 opened this issue Sep 6, 2018 · 4 comments
Closed

Compilation error for Arduino/Genuino 101 #33

ricms93 opened this issue Sep 6, 2018 · 4 comments
Labels
conclusion: invalid Issue/PR not valid

Comments

@ricms93
Copy link

ricms93 commented Sep 6, 2018

Hi,
I am compiling an Arduino Code I have for an Arduino 101 embedded into a UDOO x86 board. After running the compilation command with the correct fqbn I get this error:

Sketch uses 49356 bytes (31%) of program storage space. Maximum is 155648 bytes.
Error: open ../arduino_files/serial_main_push/serial_main_push.ino/serial_main_push.ino.Intel.arc32.arduino_101.hex: not a directory
Error copying output file.

Therefore I cannot continue uploading the compiled file into the board. Is there something I'm missing?
Thanks in advance.

My OS is Ubuntu 16.04 LTS

@wjwieland
Copy link

I get the same error. Where does arduino-cli put compiled files when done? And can that be dictated on the cli or via a config file?

@wjwieland
Copy link

I found out what is going on here, at least on my RPi 3. The command for compile should NOT include the filename of the .ino file. It should only point to the directory/folder that the .ino file resides in.

for example: I had been entering the following:
arduino-cli compile -b arduino:avr:mega ~/Devel/threeaxis/treeaxis.ino
which resulted in the compile error we both have been seeing. When, however, I enter the following:
arduino-cli compile -b arduino:avr:mega ~/Devel/threeaxis/
All works as expected and I end up with the following in the folder noted in the second command string:

wjw@rpi-home bin $ ll ~/Devel/threeaxis/

total 96
drwxr-xr-x 2 wjw wjw  4096 Oct 26 11:43 ./
drwxr-xr-x 5 wjw wjw  4096 Oct 25 00:36 ../
-rwxr-xr-x 1 wjw wjw 58348 Oct 26 11:43 threeaxis.arduino.avr.mega.elf*
-rw-r--r-- 1 wjw wjw 21290 Oct 26 11:43 threeaxis.arduino.avr.mega.hex
-rw-r--r-- 1 wjw wjw  2335 Oct 25 00:42 threeaxis.ino

Now to get upload to work...which I have not yet.

@lmiller1990
Copy link

The above helped me too - you need to specify the directory of the .ino file, not the .ino file. After doing so, mine compiled. Then I was able to upload it by running:

$ a board list
FQBN    Port                   	ID       	Board Name
    	/dev/cu.usbserial-14110	1A86:7523	unknown

To get the port, then

a upload -p /dev/cu.usbserial-14110 --fqbn arduino:avr:uno MyFirstSketch

Where a is aliased to the arduino-cli.

@per1234 per1234 added the conclusion: invalid Issue/PR not valid label May 24, 2019
@per1234 per1234 closed this as completed May 24, 2019
@per1234
Copy link
Contributor

per1234 commented May 24, 2019

Closing as resolved. We have a separate issue requesting that this situation either be handled automatically or that the documentation mention that only the sketch folder should be specified in the command: #51

per1234 added a commit that referenced this issue Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: invalid Issue/PR not valid
Projects
None yet
Development

No branches or pull requests

4 participants