robertoostenveld / esp8266_artnet_dmx512

49 stars 11 forks source link

i2s includes are case sensitive #4

Closed apdlv72 closed 1 year ago

apdlv72 commented 1 year ago

I didn't want to create a pull request for this tiny thing. I noticed that upper/lower case matters when including the i2s header files. On my Ubuntu 20.04 / Arduino 1.8.16 compilation fails when using upper. I had to replace it like follows to fix that:

include

include

robertoostenveld commented 1 year ago

bummer! In your PR you used lowercase, but I actually got the error with lowercase and had to change to uppercase. This probably relates to us having different operating systems with different ways of dealing with case-sensitive files. I am using macOS.

In https://github.com/esp8266/Arduino/tree/master/libraries/I2S/src and on my computer ./packages/esp8266/hardware/esp8266/3.0.2/libraries/I2S/src/I2S.h I see that I2S.h is uppercase. That is also the case for the ./packages/SODAQ/hardware/samd/1.8.9/libraries/I2S/src/I2S.h on my computer.

I also see that the file ./packages/esp8266/hardware/esp8266/3.0.2/tools/sdk/include/i2s_reg.h is in lowercase. In the code I had that in uppercase, which worked, but now changing it to lowercase also works.

But when I change I2S.h into lowercase, I get

...
Alternatives for i2s.h: []
ResolveLibrary(i2s.h)
  -> candidates: []
esp8266_artnet_dmx512:92:10: fatal error: i2s.h: No such file or directory
   92 | #include <i2s.h>
      |          ^~~~~~~
compilation terminated.
robertoostenveld commented 1 year ago

The lowercase i2s_reg.h is here https://github.com/esp8266/Arduino/tree/master/tools/sdk/include in the original repository.

robertoostenveld commented 1 year ago

if you only change i2s_reg.h into lowercase (as I just did - and pushed), does it then work for you?

apdlv72 commented 1 year ago

Thank you for chasingthis. Now I found the issue. It had an older version of the esp8266 package as well as I2S library to the newest versions 3.0.2 and 1.2.1 resp. , it compiles with these includes:

include

include