BTW, Another thing that would help with the doc for noobs like me is the “other half” of the STlink photo. There are two ways the STlink board can be oriented wrt the cable. I’m hoping this is correct? If not, please let me know!
Thanks for the quick reply, Ben. Yep, that worked like a charm. As you say, weird!! I notice that the menu item associated with Command + P is under “Go” and called “Go to file …” The joy of learning a new IDE is getting all these idiosyncrasies under one’s belt; that’s one down!
Found the answer in the 4th photo in this listing: https://www.amazon.com/STLINK-V3MINI-Stand-Alone-Debugging-Programming-microcontrollers/dp/B0854MC2JP
Blinky is now working!!
Glad you were able to get it up and running!
As far as I can tell from the one I have here, there is only one way to connect the other cable to the ST-Link. The header is shrouded and keyed to prevent reverse insertion.
If that doesn’t seem to be the case on all ST-Links we can/should certainly add a note about that.
Yes, you’re right about the keying; I missed that.
Now that I have an existing project running, I want to create a new one. In the Arduino IDE, I would simply do a File->New. It’s not clear to me in VSCode how to perform the analogous operation. For now, I’ll simply copy the Blinky folder, rename, and use that as a starting point. But, I’m sure there’s a better way If you would extend your “getting started” document to include “new project,” I’m sure it would be helpful to many. Thanks.
If you do extend the documentation as I’ve suggested, please include a bit about file locations and path. For now, I’m going to keep all new code in DaisyExamples/seed so I don’t have to deal with path issues, but that’s certainly not convenient.
We are actually going to publish a “Creating a New Project” wiki page next! That will go over the process for both creating a new project within the DaisyExamples hierarchy, as well as setting up a dedicated repository for a custom project. I expect that we’ll have the first version of this page up sometime in the next week or so.
In the meantime, I can briefly summarize the process.
You can certainly do this manually, but you will have to find the references to your source file (i.e.
Blink.cpp) within the JSON files in the
.vscode/ folder, as well as the Makefile. (For users on Windows planning to use VisualStudio and the VisualGDB extension, they’d have to do this for the files in the
vs/ folder as well.)
That said, DaisyExamples has a helper script written in python that can create new projects, or create copies of a project similar to what you want to create.
To create a new project:
python helper.py create seed/MyNewProject
Or to duplicate an existing one:
python helper.py --source seed/Blink copy seed/MyNewProject
For now the script assumes a folder structure that matches the DaisyExamples hierarchy, and has some issues if you try to use original name in the new name for a copied project (i.e. “Blink” and “NewBlink”).
Thanks very much, Stephen! I’m looking forward to getting roadmaps to automated procedures, and appreciate the interim how-to
I’ve given it a try from a macOS terminal window. I did a cd to ~/Desktop/DaisyExamples, then ran the command: “python helper.py seed/DSC-Daisyplayer-1.1” The command failed as follows:
Traceback (most recent call last): File "helper.py", line 264, in <module> run() File "helper.py", line 228, in run op = args.operation.casefold() AttributeError: 'str' object has no attribute 'casefold'
Some missing setup ??
Ben, I’d like to suggest extending your “Debugging” section to include MacOS. F5 on the Mac will change the brightness, but as far as I can tell is unable to bring up the debugging window
Ah, it looks like you have an older version of python installed. The helper.py script is written using python 3. This is the standard version nowadays. Many things to still use the older version, though.
You may have both installed, it just might be invoked with
Also, on Mac keyboards the F5 key can be pressed by holding the
Fn key (bottom left of the keyboard). I believe there is a user setting somewhere in System Preferences to swap whether the function keys or the media keys are the default state if you do want to change it.
But agreed, we should add a note about that to the instructions.
Thanks for all the feedback!
Using python3 AND adding the “create” keyword fixed my problems! Thanks again for your help, Stephen.
Oh perfect! Sorry, I read through your post quickly and missed that you didn’t include
Glad that worked! We’ll be sure to note these type of things in the new guide as well!
I’m on windows,
i’m not sure it installed properly since I did not had any installing actions happening after I run install.bat even though I runned it as and admin. I tried to simply uploaded a patch from the website and it’s not detecting the daisy. I see my computer sees it but it seems there is no proper driver installed (saw it from the peripherals pannel).
I’m a bit clueless and a bit of a noob, can you tell me whatsup, did i do the toolchain install wrong?
The toolchain install more than likely ran correctly. It currently doesn’t output anything to the window (it’s on our agenda!).
Have you followed the Zadig Instructions?
Hi On a mac M1 here. I ran the Install.command
to make anything work, I had to add homebrew to the path.
Now If i run install.command again this is my output:
Installing DaisyToolchain Upgrading Homebrew Updated 1 tap (homebrew/cask). ==> Updated Casks kitty postman Installing packages with Homebrew Warning: Cask 'gcc-arm-embedded' is already installed. To re-install gcc-arm-embedded, run: brew reinstall gcc-arm-embedded Warning: open-ocd 0.11.0 is already installed and up-to-date. To reinstall 0.11.0, run: brew reinstall open-ocd Warning: dfu-util 0.10 is already installed and up-to-date. To reinstall 0.10, run: brew reinstall dfu-util find: /usr/local/Caskroom/gcc-arm-embedded: No such file or directory find: /usr/local/Caskroom/gcc-arm-embedded: No such file or directory Done
I try to use oopsy and i get:
oopsy-verbose: script start patch 48 /Users/assaf/Documents/Max 8/Packages/oopsy/examples/reverb.cpp oopsy-verbose: stop success dictionary u888000697 oopsy-verbose: start success dictionary u752000698 oopsy-verbose: Target patch configured in path /Users/assaf/Documents/Max 8/Packages/oopsy/source/daisy.patch.json oopsy-verbose: Building to /Users/assaf/Documents/Max 8/Packages/oopsy/source/build_reverb_patch oopsy-verbose: Will upload from /Users/assaf/Documents/Max 8/Packages/oopsy/examples/reverb.cpp by writing to: oopsy-verbose: /Users/assaf/Documents/Max 8/Packages/oopsy/source/build_reverb_patch/reverb_patch.cpp oopsy-verbose: /Users/assaf/Documents/Max 8/Packages/oopsy/source/build_reverb_patch/Makefile oopsy-verbose: /Users/assaf/Documents/Max 8/Packages/oopsy/source/build_reverb_patch/build/reverb.bin oopsy-verbose: oopsy generated code oopsy-verbose: generated code oopsy-verbose: rm -fR build oopsy-verbose: oopsy-verbose: /bin/sh: arm-none-eabi-gcc: command not found oopsy-verbose: make: *** [build/system_stm32h7xx.o] Error 127 oopsy-verbose: make failed oopsy-verbose: oopsy done oopsy-verbose: done
@Assaf Silly question: have you tried quitting and reopening terminal?
The path variable doesn’t update until you do so. That may be why oopsy can’t find the arm toolchain.
What is strange is that brew is saying that
gcc-arm-embedded is already installed, but then it can’t be found.
Can you try to run:
brew reinstall gcc-arm-embedded
and then afterwards try to invoke the command itself:
This may at least confirm if the tool is installed or not.
There is also a related thread on github that some people have managed to resolve the progress on. Though as far as I know, others on the M1 mac (and BigSur) have been successful in getting it to work with the
Hope that’s helpful, let us know how it goes or if you need more assistance troubleshooting.
Got it up and running thank you!
What fixed it for me was using git to clone - otherwise the install.sh of oopsy doesnt work - and the errors were not very obvious
Hey, took me time to answer but it did work! thanks for your help!
Hey! Glad to hear it.