michael-hirschmugl / Arduino-Due-DSP-Firmware

The SAM3X8E on the Arduino Due board used as digital signal processor with help from a WM8731 audio codec chip.
3 stars 0 forks source link

Moving to Arduino IDE #12

Open gerthalberg opened 5 years ago

gerthalberg commented 5 years ago

Hi Michael, I'm trying to migrate your code to the Arduino IDE. In the process I had to remove the cstartup_M_cpp.cpp file and also remove the intrinsic.h include in main.cpp. I have renamed main.cpp to Arduino_Due_DSP.ino. I think the interrupt vectors gets included automatically. Can you tell me what you need from intrinsic.h?

Btw. with the above changes everything compiles ;-)

michael-hirschmugl commented 5 years ago

Wow!! That's great to hear that everything compiles! That was exactly the reason why I made it on the Due. So someone else could use it too. :)

I am not enitirely sure at the moment why I needed intrinsic.h. I have to have a look in the evening when I have the code infront of me. Might be that it's not even used...

I'll send you a schematic diagram for the whole board. There you can see how the pins are used.

 

cheers!

 

Gesendet: Sonntag, 09. Juni 2019 um 21:55 Uhr Von: "gerthalberg" notifications@github.com An: hirschmensch/Arduino-Due-DSP Arduino-Due-DSP@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Betreff: [hirschmensch/Arduino-Due-DSP] Moving to Arduino IDE (#12)

Hi Michael, I'm trying to migrate your code to the Arduino IDE. In the process I had to remove the cstartup_M_cpp.cpp file and also remove the intrinsic.h include in main.cpp. I have renamed main.cpp to Arduino_Due_DSP.ino. I think the interrupt vectors gets included automatically. Can you tell me what you need from intrinsic.h?

Btw. with the above changes everything compiles ;-)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

michael-hirschmugl commented 5 years ago

Oh and I just noticed that I never made a new commit. I have the whole thing working now and it's a bit more tidied up.

So... stay tuned for a new commit in the evening too.

 

Gesendet: Sonntag, 09. Juni 2019 um 21:55 Uhr Von: "gerthalberg" notifications@github.com An: hirschmensch/Arduino-Due-DSP Arduino-Due-DSP@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Betreff: [hirschmensch/Arduino-Due-DSP] Moving to Arduino IDE (#12)

Hi Michael, I'm trying to migrate your code to the Arduino IDE. In the process I had to remove the cstartup_M_cpp.cpp file and also remove the intrinsic.h include in main.cpp. I have renamed main.cpp to Arduino_Due_DSP.ino. I think the interrupt vectors gets included automatically. Can you tell me what you need from intrinsic.h?

Btw. with the above changes everything compiles ;-)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

gerthalberg commented 5 years ago

Hi Michael - I’ll look forward to the schematics🤓and I’ll get the new commit. When doing the schematics what software have you used?.

Also if you don’t mind I migth from time to time send you a question regarding the source code if you don’t mind to much. It’ll be focused on how to understand and interpret the source code - so I have a basic knowledge if I want to extend or alter the code.

Kind regards.

Sent from my iPad

On 10 Jun 2019, at 15.32, Hirschmensch notifications@github.com wrote:

Oh and I just noticed that I never made a new commit. I have the whole thing working now and it's a bit more tidied up.

So... stay tuned for a new commit in the evening too.

Gesendet: Sonntag, 09. Juni 2019 um 21:55 Uhr Von: "gerthalberg" notifications@github.com An: hirschmensch/Arduino-Due-DSP Arduino-Due-DSP@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Betreff: [hirschmensch/Arduino-Due-DSP] Moving to Arduino IDE (#12)

Hi Michael, I'm trying to migrate your code to the Arduino IDE. In the process I had to remove the cstartup_M_cpp.cpp file and also remove the intrinsic.h include in main.cpp. I have renamed main.cpp to Arduino_Due_DSP.ino. I think the interrupt vectors gets included automatically. Can you tell me what you need from intrinsic.h?

Btw. with the above changes everything compiles ;-)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

michael-hirschmugl commented 5 years ago

Alright!

So, the schematic is attached. It's fairly simple, you'll see. I did it an Altium Designer.

 

intrinsic.h was needed for two functions __disable_interrupt(); and __enable_interrupt();. I guess the Arduino IDE automatically supports (includes) the header for these functions? Otherwise it wouldn't compile, well at least it won't compile here in the IAR Workbench.

 

The new commit has one huge difference. I got rid of all filter stuff. I am using the whole thing now for adaptive dynamic adjustment of a tube amplifier system. So, the firmware has grown for functions that let you measure external voltages, generate voltages on the DAC and such. It's a very specific usage and when I look at the "new" code, not much has changed regarding the "old" stuff, other than it's gone. :D So I think I won't even do a commit, and if so, in another git.

 

You can ask me anything anytime. It's just that this was done years ago and I might need some time to come up with an answer. One thing that I have been asked before is how I configured the I2S interface clocks. And this is sadly the one thing I never fully understood tbh. The datasheet is a mess regarding this topic and I found an example in some Atmel Framework where I copied the values.

 

Good luck!

 

 

Gesendet: Montag, 10. Juni 2019 um 17:23 Uhr Von: "gerthalberg" notifications@github.com An: hirschmensch/Arduino-Due-DSP Arduino-Due-DSP@noreply.github.com Cc: Hirschmensch michael.hirschmugl@gmx.at, Comment comment@noreply.github.com Betreff: Re: [hirschmensch/Arduino-Due-DSP] Moving to Arduino IDE (#12)

Hi Michael - I’ll look forward to the schematics🤓and I’ll get the new commit. When doing the schematics what software have you used?.

Also if you don’t mind I migth from time to time send you a question regarding the source code if you don’t mind to much. It’ll be focused on how to understand and interpret the source code - so I have a basic knowledge if I want to extend or alter the code.

Kind regards.

Sent from my iPad

On 10 Jun 2019, at 15.32, Hirschmensch notifications@github.com wrote:

Oh and I just noticed that I never made a new commit. I have the whole thing working now and it's a bit more tidied up.

So... stay tuned for a new commit in the evening too.

Gesendet: Sonntag, 09. Juni 2019 um 21:55 Uhr Von: "gerthalberg" notifications@github.com An: hirschmensch/Arduino-Due-DSP Arduino-Due-DSP@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Betreff: [hirschmensch/Arduino-Due-DSP] Moving to Arduino IDE (#12)

Hi Michael, I'm trying to migrate your code to the Arduino IDE. In the process I had to remove the cstartup_M_cpp.cpp file and also remove the intrinsic.h include in main.cpp. I have renamed main.cpp to Arduino_Due_DSP.ino. I think the interrupt vectors gets included automatically. Can you tell me what you need from intrinsic.h?

Btw. with the above changes everything compiles ;-)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread. — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.