Hi,
I am trying to built this project :
there is also a youtube page : https://www.youtube.com/watch?v=7TkybpSQULk
The platformio files seems ok
But when I try to compile it I have a long list of error from the FastAccelStepper library included
Such as :
.pio/libdeps/esp32dev/FastAccelStepper/src/StepperISR_esp32.cpp:418:23: error: ‘volatile struct mcpwm_timer_regs_t’ has no member named ‘mode’
.pio/libdeps/esp32dev/FastAccelStepper/src/StepperISR_esp32.cpp:320:10: error: ‘struct mcpwm_dev_t’ has no member named ‘channel’
.pio/libdeps/esp32dev/FastAccelStepper/src/StepperISR_esp32.cpp:321:10: error: ‘struct mcpwm_dev_t’ has no member named ‘channel’
.pio/libdeps/esp32dev/FastAccelStepper/src/StepperISR_esp32.cpp:367:27: error: ‘volatile struct mcpwm_timer_regs_t’ has no member named ‘status’; did you mean ‘timer_status’?
.pio/libdeps/esp32dev/FastAccelStepper/src/StepperISR_esp32.cpp:313:23: error: ‘volatile struct mcpwm_timer_regs_t’ has no member named ‘sync’
.pio/libdeps/esp32dev/FastAccelStepper/src/StepperISR_esp32.cpp:315:10: error: ‘struct mcpwm_dev_t’ has no member named ‘channel’
.pio/libdeps/esp32dev/FastAccelStepper/src/StepperISR_esp32.cpp:289:55: error: ‘PERIPH_PWM1_MODULE’ was not declared in this scope
.pio/libdeps/esp32dev/FastAccelStepper/src/StepperISR_esp32.cpp:301:12: error: ‘struct mcpwm_dev_t’ has no member named ‘timer_sel’; did you mean ‘timer’?
I don’t have any skills in coding, It took me already a good amount of time just for to install VSC, platformio plugin, connect the board etc…
Any help will be welcomed
Thank you
You are mismatching library versions and platform versions. Assuming you’re talking about the project contained in ESP32_3AxisCameraSlider_Code.zip
with its platformio.ini
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
lib_deps =
jvpernis/PS3 Controller Host@^1.1.0
gin66/FastAccelStepper@^0.23.2
you can see that while they did pin the library versions nicely, the just leave platform = espressif32
as the “please use the current newest version”. And since the project was published over 2 years, the espressif32 platform (and the underlying Arduino-ESP32 core version) was a different one than what was used today. So, the FastAccelStepper library of version 0.23.2 (from 2 years ago) does indeed not sucessfully build when using the latest espressif32 (and Arduino-ESP32 2.0.11 core version) because the field names of the MCPWM peripheral struct has changed.
Two paths:
- Use a newer version of the FastAccelStepper library that does successfully build with today’s
espressif32
version. For example, the following platformio.ini
builds the project just fine.
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
lib_deps =
jvpernis/PS3 Controller Host@^1.1.0
gin66/FastAccelStepper@^0.30.5
- Be true to the “at the time” used library versions and downgrade the platform version to match the age of the project, e.g.,
[env:esp32dev]
platform = espressif32@3.5.0
board = esp32dev
framework = arduino
monitor_speed = 115200
lib_deps =
jvpernis/PS3 Controller Host@^1.1.0
gin66/FastAccelStepper@^0.23.2
Giving @3.5.0
is a platform version that uses the old Arduino-ESP32 1.0.6 verison.
I have personally verified that both of these platformio.ini
s make the project build successfully.
If the first path builds and runs fine, it should be preffered, since you’re running a more recent version of the library and Arduino core then. Then, you can also pin espressif32@6.4.0
in that project (see releases). This makes the project finally resistant against updates. Pinning the platform
version is how the original platformio.ini
should have been written in the first place, but sadly it wasn’t, hence you running in these errors years later.
Cool ! Thank you very much !
Me again.
The project seems to be a closed package : the two libraries are already included in a dedicated folder.
Should I manually change the FastAccelStepper version in its folder in the project or is there a more correct way to update this particular library in the project ?
I’m not sure what you mean. Just changing the platformio.ini
and saving it is enough. PlatformIO will find and remove the old version of the library stored in the .pio
folder. You may also remove the .pio
folder at any time so that the libraries are downloaded anew and a fresh build can be done.
Ok I managed to apply your #1 solution
No more “orange” warnings but there are still a lot of “yellow” warnings for both libraries :
.pio/libdeps/esp32dev/PS3 Controller Host/src/ps3_l2cap.c: In function 'ps3_l2cap_init_services':
.pio/libdeps/esp32dev/PS3 Controller Host/src/ps3_l2cap.c:77:29: warning: passing argument 1 of 'ps3_l2cap_init_service' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
ps3_l2cap_init_service( "PS3-HIDC", BT_PSM_HIDC, BTM_SEC_SERVICE_FIRST_EMPTY );
^~~~~~~~~~
.pio/libdeps/esp32dev/PS3 Controller Host/src/ps3_l2cap.c:27:43: note: expected 'char *' but argument is of type 'const char *'
static void ps3_l2cap_init_service( char *name, uint16_t psm, uint8_t security_id);
~~~~~~^~~~
.pio/libdeps/esp32dev/PS3 Controller Host/src/ps3_l2cap.c:78:29: warning: passing argument 1 of 'ps3_l2cap_init_service' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
ps3_l2cap_init_service( "PS3-HIDI", BT_PSM_HIDI, BTM_SEC_SERVICE_FIRST_EMPTY+1 );
^~~~~~~~~~
.pio/libdeps/esp32dev/PS3 Controller Host/src/ps3_l2cap.c:27:43: note: expected 'char *' but argument is of type 'const char *'
static void ps3_l2cap_init_service( char *name, uint16_t psm, uint8_t security_id);
~~~~~~^~~~
.pio/libdeps/esp32dev/PS3 Controller Host/src/ps3_l2cap.c: In function 'ps3_l2cap_deinit_services':
.pio/libdeps/esp32dev/PS3 Controller Host/src/ps3_l2cap.c:92:31: warning: passing argument 1 of 'ps3_l2cap_deinit_service' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
ps3_l2cap_deinit_service( "PS3-HIDC", BT_PSM_HIDC );
^~~~~~~~~~
.pio/libdeps/esp32dev/PS3 Controller Host/src/ps3_l2cap.c:28:45: note: expected 'char *' but argument is of type 'const char *'
static void ps3_l2cap_deinit_service( char *name, uint16_t psm );
~~~~~~^~~~
.pio/libdeps/esp32dev/PS3 Controller Host/src/ps3_l2cap.c:93:31: warning: passing argument 1 of 'ps3_l2cap_deinit_service' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
ps3_l2cap_deinit_service( "PS3-HIDI", BT_PSM_HIDI );
^~~~~~~~~~
.pio/libdeps/esp32dev/PS3 Controller Host/src/ps3_l2cap.c:28:45: note: expected 'char *' but argument is of type 'const char *'
static void ps3_l2cap_deinit_service( char *name, uint16_t psm );
.pio/libdeps/esp32dev/FastAccelStepper/src/StepperISR_esp32_rmt.cpp: In member function 'void StepperQueue::startQueue_rmt()':
.pio/libdeps/esp32dev/FastAccelStepper/src/StepperISR_esp32_rmt.cpp:409:28: warning: 'esp_err_t rmt_memory_rw_rst(rmt_channel_t)' is deprecated: use rmt_tx_memory_reset or rmt_rx_memory_reset instead [-Wdeprecated-declarations]
rmt_memory_rw_rst(channel);
^
In file included from .pio/libdeps/esp32dev/FastAccelStepper/src/common.h:116,
from .pio/libdeps/esp32dev/FastAccelStepper/src/FastAccelStepper.h:5,
from .pio/libdeps/esp32dev/FastAccelStepper/src/StepperISR.h:3,
from .pio/libdeps/esp32dev/FastAccelStepper/src/StepperISR_esp32_rmt.cpp:1:
C:/Users/philp/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/driver/include/driver/rmt.h:898:11: note: declared here
esp_err_t rmt_memory_rw_rst(rmt_channel_t channel)
^~~~~~~~~~~~~~~~~
.pio/libdeps/esp32dev/FastAccelStepper/src/StepperISR_esp32_rmt.cpp:409:28: warning: 'esp_err_t rmt_memory_rw_rst(rmt_channel_t)' is deprecated: use rmt_tx_memory_reset or rmt_rx_memory_reset instead [-Wdeprecated-declarations]
rmt_memory_rw_rst(channel);
^
In file included from .pio/libdeps/esp32dev/FastAccelStepper/src/common.h:116,
from .pio/libdeps/esp32dev/FastAccelStepper/src/FastAccelStepper.h:5,
from .pio/libdeps/esp32dev/FastAccelStepper/src/StepperISR.h:3,
from .pio/libdeps/esp32dev/FastAccelStepper/src/StepperISR_esp32_rmt.cpp:1:
C:/Users/philp/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/driver/include/driver/rmt.h:898:11: note: declared here
esp_err_t rmt_memory_rw_rst(rmt_channel_t channel)
Should I do something about it ? Once again my coding skills are none.
Anyway I uploaded the project, the controller seems to pair correctly with the board but
the project is not working … that could also come from some electronic mistake…

If it totally doesn’t work, try the second way. Although these “const” warnings are rather non-critical. A programmer oversight indeed to not use const char*
instead of char*
for constant strings, but well.
If that doesn’t work either, the fault must be somewhere else, i.e. your wiring or your components.
I tried the #2 solution, on the coding/upload side everything fine.
At least this part is clear.
But the motor doesn’t react at all. I have to investigate.
Thank’s a lot for your help