[sdiy] Some Audio DSP prototypes
ebrombaugh at gmail.com
Fri Apr 22 20:37:27 CEST 2022
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:
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.
More information about the Synth-diy