Skip to content

Conflict of ZeroDMA and I2S #159

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

Open
FriedrichForstner opened this issue Aug 1, 2019 · 6 comments
Open

Conflict of ZeroDMA and I2S #159

FriedrichForstner opened this issue Aug 1, 2019 · 6 comments

Comments

@FriedrichForstner
Copy link

Since the addition of ZeroDMA library into the Core we have a conflict with the I2S library's DMA:

/var/folders/y6/w7n3cq754jv3vkt3vl8tvkkc0000gn/T/arduino_build_504202/libraries/Adafruit_ZeroDMA/Adafruit_ZeroDMA.cpp.o: In function DMAC_Handler: Adafruit_ZeroDMA.cpp:(.text.DMAC_Handler+0x0): multiple definition of DMAC_Handler /var/folders/y6/w7n3cq754jv3vkt3vl8tvkkc0000gn/T/arduino_build_504202/libraries/I2S/utility/DMA.cpp.o:DMA.cpp:(.text.DMAC_Handler+0x0): first defined here

It should be reproducible with the ArduinoSound/AmplitudeSerialPlotter example on a Feather M0 (Arduino 1.8.9, Adafruit ArduinoCore-samd 1.5.0-1.5.2, ArduinoSound 0.2.1, MacOS).

Using DMAC_0_Handler instead (as set for the SAMD51 version) worked/unblock it it for me but I am unsure about other side effects.

@ladyada
Copy link
Member

ladyada commented Aug 1, 2019

yeah that library has its own DMA handler... we could either fork/adapt it to use ZeroDMA (so that other libraries can use DMA) or you could try https://github.com/adafruit/Audio

@fontanon
Copy link

fontanon commented Aug 5, 2019

Hi @FriedrichForstner, would you please clarify for me how did you used DMAC_0_Handler to make it work? I'd like to give it a try. Thanks in advance.

@FriedrichForstner
Copy link
Author

Hi @fontanon , not sure if it will help you: In Adafruit_ZeroDMA I used the function definition/naming for the samd51 platform (DMAC_0_Handler instead of DMAC_Handler) and thus the naming conflict is resolved. However, I assume that it is also rendering this part non-functional. I am not that familiar with the codebase but please use me for testing.

@fontanon
Copy link

fontanon commented Aug 9, 2019

Thanks @FriedrichForstner, I managed to compile after the renaming. However, as you described, weird situations happen with the board: it resets itself constantly.

I'll try another approaches as using the Audio Library fork as @ladyada said:
adafruit/Adafruit_ZeroDMA#12

@fontanon
Copy link

Just to let you know about a functional workaround here: adafruit/Adafruit_ZeroDMA#12

@caternuson
Copy link

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

4 participants