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

A user-friendlier compilation error for SDMMC_HOST #172

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

paulftw
Copy link

@paulftw paulftw commented Jun 18, 2022

See #171

@@ -18,6 +18,11 @@ limitations under the License.
#pragma once

#include "SDCard.h"

#ifndef SOC_SDMMC_HOST_SUPPORTED
#error "Your chip does not support SDMCC_HOST. See https://github.com/PerMalmberg/Smooth/issues/171"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps reference some applicable IDF documentation instead?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good idea, but I'm not sure how to implement it.
SOC_SDMMC_HOST_SUPPORTED is described on chip-specific pages, e.g.

https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/soc_caps.html
https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-reference/system/soc_caps.html

Correct URL can be computed by inserting CONFIG_IDF_TARGET into the error message, but I don't know how to do that inside the #error.

@paulftw
Copy link
Author

paulftw commented Jun 23, 2022

My second commit dropped the #ifndef part. Fixing that now

@paulftw
Copy link
Author

paulftw commented Jun 29, 2022

(nevermind, deleted)

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

Successfully merging this pull request may close these issues.

2 participants