electro-smith / libDaisy

Hardware Library for the Daisy Audio Platform
https://www.electro-smith.com/daisy
MIT License
331 stars 141 forks source link

nothing works #571

Closed phil123456 closed 1 year ago

phil123456 commented 1 year ago

Hi,

[using the recent/last version of everything, fresh windows 10 home install]

following the getting started

https://github.com/electro-smith/DaisyWiki/wiki/1.-Setting-Up-Your-Development-Environment

in VS code, CTRL+P task build_all and build...dfu, gives tons of errors

*  Executing task: make 

make: Nothing to be done for 'all'.
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: make clean; make; make program-dfu 

rm -fR build
process_begin: CreateProcess(NULL, rm -fR build, ...) failed.    
make (e=2): The system cannot find the file specified.
make: [../../libDaisy/core/Makefile:292: clean] Error 2 (ignored)
arm-none-eabi-g++  build/startup_stm32h750xx.o build/Blink.o  -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard --specs=nano.specs --specs=nosys.specs -T../../libDaisy/core/STM32H750IB_flash.lds -L../../libDaisy/build -L ../../DaisySP/build -ldaisy -lc -lm -lnosys -ldaisysp -Wl,-Map=build/Blink.map,--cref -Wl,--gc-sections -Wl,--print-memory-usage -o build/Blink.elf
p:/program files/daisytoolchain/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: cannot find -ldaisy
collect2.exe: error: ld returned 1 exit status
make: *** [../../libDaisy/core/Makefile:277: build/Blink.elf] Error 1
dfu-util -a 0 -s 0x08000000:leave -D build/Blink.bin -d ,0483:df11
dfu-util 0.10

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2020 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY      
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/  

No such file or directory: Could not open file build/Blink.bin for reading
make: *** [../../libDaisy/core/Makefile:330: program-dfu] Error 74   

I ran git-bash from the shell, typing make says daisy library is missing

$ make arm-none-eabi-g++ build/startup_stm32h750xx.o build/Blink.o -mcpu=cortex-m7 -mthumb -mfpu=fpv5-d16 -mfloat-abi=hard --specs=nano.specs --specs=nosys.specs -T../../libDaisy/core/STM32H750IB_flash.lds -L../../libDaisy/build -L ../../DaisySP/build -ldaisy -lc -lm -lnosys -ldaisysp -Wl,-Map=build/Blink.map,--cref -Wl,--gc-sections -Wl,--print-memory-usage -o build/Blink.elf p:/program files/daisytoolchain/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld.exe: cannot find -ldaisy collect2.exe: error: ld returned 1 exit status make: *** [../../libDaisy/core/Makefile:277: build/Blink.elf] Error 1

image

image

thanks for helping

TheSlowGrowth commented 1 year ago

Generally speaking, the daisy slack workspace is the best place to ask for advice if your local setup doesn't work. As far as I can see, your problem is not per se an issue with libDaisy itself. You will also find many likeminded people there, it's generally a nice place for exchange and for seeking help. In the future, please ask there.

Now to your problem: Your compilation errors (both on VSCode and in git bash) tell us that libDaisy was not found by the linker. This means the blink project itself compiled fine, but the linker couldn't find the libDaisy library and hence couldn't create a complete firmware. When you use makefiles and the make command, libDaisy will not be built automatically for you (unlike CMake where dependencies are also automatically built). To resolve your issue, all you have to do is to navigate to the libDaisy source code folder (which you should have checked out alongside the examples) and run make there to build the libDaisy binary. That should compile the libDaisy binary. Now you can run make in your project source code folder again and the linking step should work just fine. (If it still complains the libDaisy is missing, check these two steps: 1. Make sure that the libDaisy binary is atually available on your hard drive. The compilation of libDaisy should have shown you the path to the libdaisy binary in the terminal messages. 2. make sure that the project Makefile uses the correct path to the libDaisy source code folder so that the linker can find this binary when you build the project)

Let me know if this helped!

takumi-ogata commented 1 year ago

Here's a forum thread where these issues were resolved: https://forum.electro-smith.com/t/issue-with-git-not-installing-properly-on-windows/3472 To summarize, phil123456 needed to install git on C:\

Regarding the daisy slack workspace, we recently switched over to Discord (https://discord.gg/Fucun32Mqj). For inquiry such as this though, we do suggest that it gets asked in the forum.