[sdiy] Some Audio DSP prototypes

Ben Stuyts ben at stuyts.nl
Sat Apr 23 16:30:07 CEST 2022


Just another data point: 

I use a commercially supported IDE (Rowley CrossWorks, similar to Segger Embedded Studio) for my Arm projects and it supports both gcc and clang. Basically it’s just a matter of changing a global setting in the IDE and it does all the work for you. As you correctly observed, a lot of cmd-line options are similar. As long as you don’t go overboard with these (or gcc-specific pragma’s) it is very easy to convert from one to the other.

Eric, contact me if you want me to check what kind of cmd-lines it generates to run the clang compiler/linker.

Ben


> On 22 Apr 2022, at 20:37, Eric Brombaugh via Synth-diy <synth-diy at synth-diy.org> wrote:
> 
> On 4/22/22 01:17, Gordonjcp wrote:
>> Out of interest, how hard is it to switch from gcc to LLVM, for fairly standard C code with odd sprinklings of assembler?  How much would I need to change?  If it's something fairly straightforward that a couple of #ifdefs can cope with it'd be nice to give folk the choice.
> 
> After all the noise here about Clang/LLVM I've decided to look into exactly this. I've been using GCC with a straight-forward Makefile flow, so I figured it shouldn't be too difficult. A bit of googling turned up this tutorial which is specifically for embedded ARM stuff:
> 
> https://interrupt.memfault.com/blog/arm-cortexm-with-llvm-clang
> 
> The quick summary is that LLVM can understand a great many of GCC's compiler options, and you can use GCC to give you additional details that LLVM might need. The linked article has some errors and omissions that I had to work around, but after a few hours of banging on it I've gotten one of my STMF303 projects to compile without errors.
> 
> *However* although the compile appears clean, when I try to load it onto the hardware the whole thing grinds to a halt - the linking process appears to have failed somewhere and the code isn't being flashed to the correct address. Using objcpy results in a binary file that's about 4GB in size (the .elf is only 200kB, which is comparable to the .elf I get from GCC), so there's clearly more work to do.
> 
> I'm hopeful that I can get this going at some point in order to make a more informed comparison for myself, but I've set it aside for now. I realize that the free version I'm using is apparently not the best, but I'm not shelling out kilobucks for a quick spin.
> 
> If anyone has suggestions I'd be glad to try them out, and I'll certainly post results if/when I get it going.
> 
> Eric
> 
> 
> _______________________________________________
> Synth-diy mailing list
> Synth-diy at synth-diy.org
> http://synth-diy.org/mailman/listinfo/synth-diy
> Selling or trading? Use marketplace at synth-diy.org




More information about the Synth-diy mailing list