Howdy,
I’m on a Mac (10.10.5), using PlatformIO with MS Visual Code.
I’m using an MMA8451 (Adafruit breakout board) with an ESP32 (HUZZAH32 Feather). When I upload a program to test I2C communication between the MMA8451 and the ESP32 to the board, an alert pops up with the following error:
Unable to open ‘esp32-hal-i2c.c’: File not found (file://Users/jonathan/Documents/PlatformIO/Projects/mma-test-2019-01-01-1006/Users/Jonathan/.platformio/packages/framework-arduinoespressif32/cores/esp32-hal-i2c.c).
…and the ESP32 reports (via Serial Monitor) that it could not communicate with the MMA8451. (The exact same setup + program works fine via the Arduino IDE.)
The path in the error message is clearly messed up. I figure I botched something during setup, or didn’t set something, or… Whatever. I also figure that the missing/misplaced i2c file is essential for this to succeed. What’s more: The correct file is located in my home directory at: .platformio/packages/framework-arduinoespressif32/cores/esp32-hal-i2c.c
(A host of other libraries, packages, and platforms are in that .platformio folder too!)
The solution seems simple: I need to set this path correctly. I’d like to fix this for my overall installation of PlatformIO, not just this particular project (I figure that’d be in the platform.ini file for the project?). I’m reading documentation, setup instructions, and support and having a Dickens of a time figuring out where to change this setting. I’ve been looking at platform-ide.customPATH, but suspect that’s not the right place.
Where do I set this path for PlatformIO overall?
What syntax/command should I use?
If I overlooked a critical piece of documentation that explains how to fix it, feel free to drop the URL for it here and I’ll run with it.
Thanks!
JAL