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

Not compiling with arduino-esp32.git#2.0.1 #102

Closed
doudar opened this issue Nov 22, 2021 · 3 comments
Closed

Not compiling with arduino-esp32.git#2.0.1 #102

doudar opened this issue Nov 22, 2021 · 3 comments

Comments

@doudar
Copy link

doudar commented Nov 22, 2021

Final linking fails when using framework arduino-esp32.git#2.0.1

Here are the warnings:

.pio/libdeps/release/FastAccelStepper/src/StepperISR_esp32_espidfv4.4.cpp: In member function 'void StepperQueue::init(uint8_t, uint8_t)': .pio/libdeps/release/FastAccelStepper/src/StepperISR_esp32_espidfv4.4.cpp:298:62: warning: 'esp_err_t mcpwm_isr_register(mcpwm_unit_t, void (*)(void*), void*, int, intr_handle_data_t**)' is deprecated: interrupt events are handled by driver, please use callback [-Wdeprecated-declarations] NULL, ESP_INTR_FLAG_IRAM | ESP_INTR_FLAG_SHARED, NULL); ^ In file included from .pio/libdeps/release/FastAccelStepper/src/StepperISR.h:58, from .pio/libdeps/release/FastAccelStepper/src/StepperISR_esp32_espidfv4.4.cpp:2: C:/Users/Anthony/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/driver/include/driver/mcpwm.h:926:11: note: declared here esp_err_t mcpwm_isr_register(mcpwm_unit_t mcpwm_num, void (*fn)(void *), void *arg, int intr_alloc_flags, ^~~~~~~~~~~~~~~~~~ .pio/libdeps/release/FastAccelStepper/src/StepperISR_esp32_espidfv4.4.cpp:298:62: warning: 'esp_err_t mcpwm_isr_register(mcpwm_unit_t, void (*)(void*), void*, int, intr_handle_data_t**)' is deprecated: interrupt events are handled by driver, please use callback [-Wdeprecated-declarations] NULL, ESP_INTR_FLAG_IRAM | ESP_INTR_FLAG_SHARED, NULL); ^ In file included from .pio/libdeps/release/FastAccelStepper/src/StepperISR.h:58, from .pio/libdeps/release/FastAccelStepper/src/StepperISR_esp32_espidfv4.4.cpp:2: C:/Users/Anthony/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/include/driver/include/driver/mcpwm.h:926:11: note: declared here esp_err_t mcpwm_isr_register(mcpwm_unit_t mcpwm_num, void (*fn)(void *), void *arg, int intr_alloc_flags,

@gin66
Copy link
Owner

gin66 commented Nov 22, 2021

The warnings should not be the cause for not linking. Is there any linking error ?

For the deprecation warning: This has been fixed by e6ee8b2 in the esp-idf. See #7890 for reference

@doudar
Copy link
Author

doudar commented Nov 22, 2021

Okay, the linker error is

c:/users/anthony/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: final link failed: bad value collect2.exe: error: ld returned 1 exit status

The large (and only) warning message just made me suspect this library, but it’s a big project so I’ll try commenting out this library (and associated code) and see if it compiles.

@doudar
Copy link
Author

doudar commented Nov 23, 2021

It looks like the issue was that arduino framework 2.0.1 is just too new with PlatformIO. following this: espressif/arduino-esp32#5436

Then adding (modifying) the following to my platformio.ini fixed the issue:
platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
platform_packages = framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git#2.0.1 toolchain-xtensa32@~2.80400.0

Feel free to close the issue once you see it.

Thanks!

@gin66 gin66 closed this as completed Nov 24, 2021
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

No branches or pull requests

2 participants