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

Arduino_Code: fix include case #1677

Merged
merged 1 commit into from
Oct 11, 2023

Conversation

trazfr
Copy link
Contributor

@trazfr trazfr commented Sep 19, 2023

Hello,

This PR aims at fixing the compilation of Arduino_Code on case-sensitive filesystems (like the ones in Linux).

For instance, when compiling on Ubuntu 23.04 x86_64, we can see:

# The compilation fails
$ arduino-cli compile -b arduino:avr:uno Arduino_Code
In file included from /home/.../workspace/duino-coin/Arduino_Code/Arduino_Code.ino:33:0:
/home/.../workspace/duino-coin/Arduino_Code/duco_hash.h:3:10: fatal error: arduino.h: No such file or directory
 #include <arduino.h>
          ^~~~~~~~~~~
compilation terminated.


Used platform Version Path                                                     
arduino:avr   1.8.6   /home/.../.arduino15/packages/arduino/hardware/avr/1.8.6

# The file is actually Arduino.h, with a capital letter
$ find ~/.arduino15/packages/arduino/hardware/avr/1.8.6/cores -iname arduino.h  
/home/.../.arduino15/packages/arduino/hardware/avr/1.8.6/cores/arduino/Arduino.h

When applying the patch:

$ arduino-cli compile -b arduino:avr:uno Arduino_Code
Sketch uses 12812 bytes (39%) of program storage space. Maximum is 32256 bytes.
Global variables use 437 bytes (21%) of dynamic memory, leaving 1611 bytes for local variables. Maximum is 2048 bytes.

Used platform Version Path                                                     
arduino:avr   1.8.6   /home/.../.arduino15/packages/arduino/hardware/avr/1.8.6

Thanks for this fun project !

The fix is only for case-sensitive filesystems, like on Linux
@revoxhere revoxhere merged commit 7757f80 into revoxhere:master Oct 11, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants