Skip to content

Arduino lib builder fails with CONFIG_DISABLE_HAL_LOCKS=y #6079

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

Closed
1 task done
Jason2866 opened this issue Dec 28, 2021 · 6 comments
Closed
1 task done

Arduino lib builder fails with CONFIG_DISABLE_HAL_LOCKS=y #6079

Jason2866 opened this issue Dec 28, 2021 · 6 comments
Labels
Area: LIB Builder Depends on Lib Builder Area: Peripherals API Relates to peripheral's APIs. Status: Solved

Comments

@Jason2866
Copy link
Collaborator

Board

Esp32 board

Device Description

Fails at compile time

Hardware Configuration

none

Version

latest master

IDE Name

Arduino Lib Builder

Operating System

Ubuntu

Flash frequency

not relevant

PSRAM enabled

no

Upload speed

none

Description

Arduino Lib Builder fails when Option CONFIG_DISABLE_HAL_LOCKS=y is set

builder/components/arduino/cores/esp32/esp32-hal-i2c-slave.c
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/components/arduino/cores/esp32/esp32-hal-i2c-slave.c: In function 'i2cSlaveDeinit':
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/components/arduino/cores/esp32/esp32-hal-i2c-slave.c:363:12: error: 'i2c_slave_struct_t' {aka 'struct i2c_slave_struct_t'} has no member named 'lock'
     if(!i2c->lock){
            ^~
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/components/arduino/cores/esp32/esp32-hal-i2c-slave.c: In function

Sketch

https://github.com/Jason2866/esp32-arduino-lib-builder

Debug Message

Not relevant

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@Jason2866 Jason2866 added the Status: Awaiting triage Issue is waiting for triage label Dec 28, 2021
@atanisoft
Copy link
Collaborator

Duplicate of #5943.

Remove CONFIG_DISABLE_HAL_LOCKS=y in your sdkconfig file and it will work as expected.

@me-no-dev Can you fix

if(!i2c->lock){
log_e("Lock is not initialized! Did you call i2c_slave_init()?");
return ESP_ERR_NO_MEM;
}
to be wrapped in a check for locks being configured?

@Jason2866
Copy link
Collaborator Author

Jason2866 commented Dec 29, 2021

@atanisoft I know. Why is the option there, when I cannot use? I want to disable HAL locks. To be clear it will fail in Arduino code when you set the option.
It IS a bug! imho just one solution, remove or fix

@atanisoft
Copy link
Collaborator

Why is the option there, when I cannot use?

The option is there as there are some use cases for not having locks used, but it does introduce a number of potential issues at runtime when using a multi-core ESP32. I agree it is a bug that it is failing to compile currently and was acknowledged as such in the referenced issue (which shouldn't have been closed without the fix being merged).

@Jason2866
Copy link
Collaborator Author

Jason2866 commented Dec 29, 2021

I know what it does and what can happen. Using with a single core ESP32 (solo1)
with a custom compiled Arduino framework.
https://github.com/Jason2866/esp32-arduino-lib-builder/releases/tag/556

@Jason2866
Copy link
Collaborator Author

probably solved with #6108

@VojtechBartoska VojtechBartoska added Area: Peripherals API Relates to peripheral's APIs. and removed Status: Awaiting triage Issue is waiting for triage labels Jan 10, 2022
@VojtechBartoska
Copy link
Contributor

VojtechBartoska commented Apr 11, 2022

Closing as solved. Thanks for contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: LIB Builder Depends on Lib Builder Area: Peripherals API Relates to peripheral's APIs. Status: Solved
Projects
None yet
Development

No branches or pull requests

3 participants