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

5.2 beta1 undocumented change (IDFGH-11688) #12798

Closed
3 tasks done
dannybackx opened this issue Dec 14, 2023 · 5 comments
Closed
3 tasks done

5.2 beta1 undocumented change (IDFGH-11688) #12798

dannybackx opened this issue Dec 14, 2023 · 5 comments
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Type: Bug bugs in IDF

Comments

@dannybackx
Copy link

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.

5.2 beta1

Operating System used.

Linux

How did you build your project?

Command line with idf.py

If you are using Windows, please specify command line type.

None

What is the expected behavior?

recompile existing code without changes

What is the actual behavior?

Build failure, due to rename of SOC_GDMA_PAIRS_PER_GROUP to SOC_GDMA_PAIRS_PER_GROUP_MAX.
The macro on the next line as well, apparently, see below.

This change is not documented anywhere. The diff also indicates documentation was deleted, that seems like a strange thing to do.

Danny

diff /home/danny/src/github/esp32/esp-idf-v5.{1.2,2-beta1}/components/soc/esp32s3/include/soc/soc_caps.h

146,148c156,159
< #define SOC_GDMA_GROUPS (1) // Number of GDMA groups
< #define SOC_GDMA_PAIRS_PER_GROUP (5) // Number of GDMA pairs in each group
< #define SOC_GDMA_SUPPORT_PSRAM (1) // GDMA can access external PSRAM

#define SOC_AHB_GDMA_VERSION 1U
#define SOC_GDMA_NUM_GROUPS_MAX 1U
#define SOC_GDMA_PAIRS_PER_GROUP_MAX 5
#define SOC_AHB_GDMA_SUPPORT_PSRAM 1

Steps to reproduce.

see above

Build or installation Logs.

No response

More Information.

No response

@dannybackx dannybackx added the Type: Bug bugs in IDF label Dec 14, 2023
@espressif-bot espressif-bot added the Status: Opened Issue is new label Dec 14, 2023
@github-actions github-actions bot changed the title 5.2 beta1 undocumented change 5.2 beta1 undocumented change (IDFGH-11688) Dec 14, 2023
@suda-morris
Copy link
Collaborator

sorry, we didn't expect the user will use these macros. May I know how your code is using these macros, instead of calling the esp_private/gdma.h driver API? @dannybackx

@dannybackx
Copy link
Author

It's not something I wrote myself.
See the link to the demo application of this device https://www.aliexpress.com/item/1005005235784548.html?spm=a2g0o.order_list.order_list_main.156.6dd71802VHYEvn

Demo app link : https://github.com/wireless-tag-com/ZX3D95CE01S-TR-4848

@suda-morris
Copy link
Collaborator

Thanks @dannybackx That project is using some unsafe code, for example: https://github.com/wireless-tag-com/ZX3D95CE01S-TR-4848/blob/master/components/bus/8080_lcd_esp32s3.c#L354

Where that component is skipping the GDMA driver to allocate the channel, so in a concurrent scenario, a "free" channel searched by that component may be already occupied by another component, which utilizes the GDMA driver.

I can add those missing macros back again to make the project build again, but again, that project needs refactoring, because it's unsafe and also easy to break when there's a big refactor in the upstream esp-idf.

@dannybackx
Copy link
Author

I didn't realize the code I was using was both broken (as you indicate) and using private include files. So let's close this issue, the workaround is obvious so no need for action from your side (my personal opinion).

@dannybackx
Copy link
Author

Note this is also in https://github.com/smartpanle/QMSD-ESP32-BSP .
I pointed them to this thread.

@dannybackx dannybackx reopened this Dec 17, 2023
@espressif-bot espressif-bot added Status: Done Issue is done internally Resolution: NA Issue resolution is unavailable and removed Status: Opened Issue is new labels Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Type: Bug bugs in IDF
Projects
None yet
Development

No branches or pull requests

3 participants