Linker errors with PlatformIO / DaisyDuino v1.4.0

Hi there,

I’m getting a bunch of linker errors when I try and compile DaisyDuino 1.4.0 with PlatformIO. It seems that it’s not linking it against ststm32 correctly, but I don’t know how to help it.

ld: .pio/build/electrosmith_daisy/lib746/libDaisyDuino.a(sdram.c.o): in function dsy_sdram_init': sdram.c:(.text.dsy_sdram_init+0x62): undefined reference to HAL_SDRAM_Init’
ld: sdram.c:(.text.dsy_sdram_init+0x84): undefined reference to HAL_SDRAM_SendCommand' ld: sdram.c:(.text.dsy_sdram_init+0xa0): undefined reference to HAL_SDRAM_SendCommand’
ld: sdram.c:(.text.dsy_sdram_init+0xb6): undefined reference to HAL_SDRAM_SendCommand' ld: sdram.c:(.text.dsy_sdram_init+0xd4): undefined reference to HAL_SDRAM_SendCommand’
ld: sdram.c:(.text.dsy_sdram_init+0xe0): undefined reference to `HAL_SDRAM_ProgramRefreshRate’

I’ve tried adding the linker defines as suggested here:

but it doesn’t anything except warn that they’re already defined, as expected.

Any help would be much appreciated,

Isaac

Hi Isaac, I wish I could help but I was never able to solve this issue. I ended up moving away from Arduino/PlatformIO to the native C++ implementation of Daisy because of it. Sorry!

Hey Sam, thanks for your response all the same!

Adding the linker defines does seem to work ok for me. I have the following in platformio.ini:

build_flags = -w 
   -D PIO_FRAMEWORK_ARDUINO_ENABLE_CDC 
   -D USBCON
   -D HAL_SDRAM_MODULE_ENABLED
   -D HAL_MDMA_MODULE_ENABLED
   -D HAL_DMA_MODULE_ENABLED
   -D INSTRUCTION_CACHE_ENABLE

I still get the warnings without -w but it still compiles and runs ok. If that doesn’t work for you then I’m not sure what your problem could be.

1 Like

Well now I feel silly because those linker defines are now working.
Thanks for your help pigatron. Hopefully this is helpful to someone else too.

Isaac