I was using PlatformIo in windows Bootcamp with no issue.
Recently I migrated from windows Bootcamp to the MAC OS and mistakenly I wiped out the windows bootcamp.
I used platformIO on my MAC OS before, but now I have a bunch of problems.
Immediately after I switch to Mac OS, It ask me to upgrade to the new version of OS Monterey.
Because of that, I’m not sure if these problems are related to the OS upgrade or not.
These are my problems:
1- I get this error at first:
My VS code is located on my Desktop and it is not in the Download folder since this is the solution in the error massage suggested.
2- When I open my project 1 different errors and 1 warning show up.
3- In the windows version of VScode I can hover over the header or source file and with Ctrl+Click on that header or source file it opens the corresponding file. But here it shows initializing and nothing happened
If I try to go to the address with “Go to definition” or F12, I get this message in the picture:
This VSCode version looks ancient judging by the icons on the left side. The PlatformIO extension seems completely outdated too.
To check this what does Help → About VSCode say in regards to the version number? Can you cleanly reinstall the latest version of VSCode and the PlatformIO extension?
Indeed, the PlatformIO extension is incompatible with the Arduino extension – uninstall or deactivate the Arduino one.
Possibly not your issue but I found that I needed to delete the “~/Library/Application\ Support.Code” folder as well as the ~/.vscode folder (and possibly others that have a leading ‘.’) when I was having issues (M1 iMac, latest versions of software for everything).
Try deleting those and then re-installing from scratch.
Susan
Hello again, @AussieSusan and @maxgerhardt Thank you again for solving my last issue.
Now I’m facing a new issue.
When I try to compile my project from my Github account, I’m getting a strange error.
For instance, I get this error:
/Users/Myname/.platformio/packages/framework-arduinoespressif32/libraries/SD_MMC/src/SD_MMC.h:24:1: error: expected unqualified-id before '/' token
This code was working when I was using windows Bootcamp.
It seems that some libraries do not exist on my Mac.
This is what my platform.ini look like if it helps:
src/main.cpp: In function 'void setup()':
src/main.cpp:116:53: warning: 'I2S_COMM_FORMAT_PCM' is deprecated [-Wdeprecated-declarations]
.communication_format = (i2s_comm_format_t)(I2S_COMM_FORMAT_PCM | I2S_COMM_FORMAT_I2S_MSB),
^~~~~~~~~~~~~~~~~~~
In file included from /Users/imanyazdansepas/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/driver/include/driver/i2s.h:16,
from include/Audio.h:17,
from src/main.cpp:9:
/Users/imanyazdansepas/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/hal/include/hal/i2s_types.h:90:5: note: declared here
I2S_COMM_FORMAT_PCM __attribute__((deprecated)) = 0x04, /*!< I2S communication format PCM, correspond to `I2S_COMM_FORMAT_STAND_PCM_SHORT`*/
^~~~~~~~~~~~~~~~~~~
src/main.cpp:116:75: warning: 'I2S_COMM_FORMAT_I2S_MSB' is deprecated [-Wdeprecated-declarations]
.communication_format = (i2s_comm_format_t)(I2S_COMM_FORMAT_PCM | I2S_COMM_FORMAT_I2S_MSB),
^~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/imanyazdansepas/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/driver/include/driver/i2s.h:16,
from include/Audio.h:17,
from src/main.cpp:9:
/Users/imanyazdansepas/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/hal/include/hal/i2s_types.h:88:5: note: declared here
I2S_COMM_FORMAT_I2S_MSB __attribute__((deprecated)) = 0x01, /*!< I2S format MSB, (I2S_COMM_FORMAT_I2S |I2S_COMM_FORMAT_I2S_MSB) correspond to `I2S_COMM_FORMAT_STAND_I2S`*/
^~~~~~~~~~~~~~~~~~~~~~~
src/main.cpp:183:15: error: 'i2s_write_bytes' was not declared in this scope
i2s_write_bytes((i2s_port_t)0, (char *)aBuf, 980, 0);
^~~~~~~~~~~~~~~
src/main.cpp:183:15: note: suggested alternative: 'i2s_write_expand'
i2s_write_bytes((i2s_port_t)0, (char *)aBuf, 980, 0);
^~~~~~~~~~~~~~~
i2s_write_expand
*** [.pio/build/esp32dev/src/main.cpp.o] Error 1
For the code how can I attach the project here?
Or if you can provide me your email address
Thank you
Iman
Thank you so much.
When I changed it to i2s_write it seems worked and compiled, but I have this message over and over on the serial bus when the code is running.
E (13779) gpio: gpio_set_level(226): GPIO output gpio_num error
E (13787) gpio: gpio_set_level(226): GPIO output gpio_num error
E (13790) gpio: gpio_set_level(226): GPIO output gpio_num error
E (13796) gpio: gpio_set_level(226): GPIO output gpio_num error
E (13801) gpio: gpio_set_level(226): GPIO output gpio_num error
E (13810) gpio: gpio_set_level(226): GPIO output gpio_num error
E (13813) gpio: gpio_set_level(226): GPIO output gpio_num error
E (13818) gpio: gpio_set_level(226): GPIO output gpio_num error
E (13824) gpio: gpio_set_level(226): GPIO output gpio_num error
E (13832) gpio: gpio_set_level(226): GPIO output gpio_num error
I really appreciate that you are helping me to get to this point.
Thank you
this problem will be fixed but another problem shows up.
It seems that the ESP32 hired new staff for software and the new team messed up the framework-arduinoespressif32 @ version 2.0.3 and above.
Hope ESP’s new software team fixes this problem quickly.
In both cases (master and 2.0.2) The ESP32 keeps resetting.
I will share my code shortly.
Have you opened an issue there in regards to with what error it’s failing when a certain piece of code is used? Otherwise they won’t know anything about it.
No, Github issues don’t need to be pre-approved to show up. I don’t see an issue in Issues · espressif/arduino-esp32 · GitHub either that would match your username.