-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
Bugfix: Fix compile error for ESP32 FSM ULP GPIO Example (IDFGH-9687) #11028
Bugfix: Fix compile error for ESP32 FSM ULP GPIO Example (IDFGH-9687) #11028
Conversation
…ified-id before 'namespace' error
Thanks for your contribution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Kampi Thanks a lot for this fix! It looks good except that I have one question regarding the changes. I think after it is resolved, we can merge it.
uint32_t pulse_count = 0; | ||
esp_err_t err = nvs_get_u32(handle, count_key, &pulse_count); | ||
assert(err == ESP_OK || err == ESP_ERR_NVS_NOT_FOUND); | ||
printf("Read pulse count from NVS: %5"PRIu32"\n", pulse_count); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Kampi What is the reason for this change? The formatting macros have been introduced to fix warnings after switching between compilers for different platforms (e.g. Xtensa-gcc to RISCV-gcc). If it is because of the C++ compiler warning about invalid suffix on literal, please add the suggested change instead of changing the macro back to a hard-coded formatter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @0xjakob,
thanks for your suggestion. Your argument makes sense to me and I guess I had an error in my setup because I forgot (or accidentally removed) #include <inttypes.h>
, which leads to a compilation error. I have modified the pull request and reverted this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Kampi OK, thanks for the fix! Would you mind squashing the commits into one? Then we wouldn't have an intermediate commit that could potentially break builds on machines where the print formatters are different.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @0xjakob,
not sure if this was successful, because I´ve never done this before. Please check it. Otherwise I can create a new merge request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Kampi OK, let's leave it as it is then. We will amend the commits to squash them. The only difference is that the PR will be seen as closed instead of merged. The rest stays the same. In particular, your authorship of the commit in IDF will be retained.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @0xjakob
It's fine. Thanks!
…ified-id before 'namespace' error Undo wrong bugfix with type casting
…sp-idf into v5.0_Bugfix_ULP_FSM_GPIO_Example
sha=c96429e395ac13064038eee6d9163170725dcf24 |
Fix different compile errors in
ulp_example_main.c
when compiling the code with C++ 20 and above.