Terminated with Exit code 1 - Electrosmith Daisy Patch SM

Hi, I have set up a project for Electrosmith Daisy Patch SM and when I run Build I am getting: Terminated with Exit code 1, detail as below. Is it missing some dependencies? What do I have to do to get it working?

C:\Users\m\.platformio\packages\framework-stm32cubeh7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_ll_utils.c: In function 'UTILS_GetPLLOutputFrequency':
C:\Users\m\.platformio\packages\framework-stm32cubeh7\Drivers\STM32H7xx_HAL_Driver\Src\stm32h7xx_ll_utils.c:930:13: warning: implicit declaration of function 'LL_RCC_CalcPLLClockFreq'; did you mean 'HAL_RCC_GetSysClockFreq'? [-Wimplicit-function-declaration]
   pllfreq = LL_RCC_CalcPLLClockFreq(PLL_InputFrequency, UTILS_PLLInitStruct->PLLM, UTILS_PLLInitStruct->PLLN, UTILS_PLLInitStruct->FRACN, UTILS_PLLInitStruct->PLLP);
             ^~~~~~~~~~~~~~~~~~~~~~~
             HAL_RCC_GetSysClockFreq
Linking .pio\build\electrosmith_daisy_patch_sm\firmware.elf
.pio/build/electrosmith_daisy_patch_sm/libFrameworkCMSISDevice.a(startup_stm32h750xx.o): In function `LoopFillZerobss':
(.text.Reset_Handler+0x32): undefined reference to `main'
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\electrosmith_daisy_patch_sm\firmware.elf] Error 1
=================================== [FAILED] Took 12.93 seconds ===================================

 *  The terminal process "C:\Users\m\.platformio\penv\Scripts\platformio.exe 'run'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it.

So in which file in the proejct’s src/ folder are you defining the main() function? This error says there is none.

I had main.cpp empty so I added int main(void) {} and it compiles without errors. I then tried the Blink example and it can’t find the include file for daisy_seed. I guess I need to tell it where the libDaisy is or do I move it to platform io folder?

#include “daisy_seed.h”
^~~~~~~~~~~~~~
compilation terminated.
*** [.pio\build\electrosmith_daisy_patch_sm\src\main.o] Error 1

So I added url link include just to test which works.
#include “C:\Users\m\Documents\DaisyExamples\libDaisy\src\daisy_seed.h”

But now I get this error:
compilation terminated.
*** [.pio\build\electrosmith_daisy_patch_sm\src\main.o] Error 1
====================================================== [FAILED] Took 2.42 seconds ======================================================

  • The terminal process “C:\Users\m.platformio\penv\Scripts\platformio.exe ‘run’” terminated with exit code: 1.
  • Terminal will be reused by tasks, press any key to close it.

I thought Platform IO set the dev environment up? I have no problems with this running in straight VScode.

It can’t find DaisyExamples/libDaisy in documents.

Does anyone have experience using with Daisy and how to set this up?

If you want to use that library (or rather, all those different libraries inside there), you need to download them and tell PlatformIO how to compile them, using a library.json and possibly extraScripts if the build logic is complicated. See documentation.

It would probably be easiest for a start to use the author’s intended way of building / developing first, which seems like CMake. There is also a CMake extension for VSCode.

libDaisy is specifically designed to program the Daisy Platform. It’s not an add-on, it’s required.