{"id":20008243,"url":"https://github.com/zigembeddedgroup/synth-workshop","last_synced_at":"2025-05-04T19:34:45.881Z","repository":{"id":173998580,"uuid":"628716917","full_name":"ZigEmbeddedGroup/synth-workshop","owner":"ZigEmbeddedGroup","description":null,"archived":false,"fork":false,"pushed_at":"2023-07-21T05:47:00.000Z","size":17919,"stargazers_count":12,"open_issues_count":2,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-28T04:53:50.917Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZigEmbeddedGroup.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-04-16T19:53:41.000Z","updated_at":"2023-11-02T19:16:01.000Z","dependencies_parsed_at":"2023-07-21T06:48:49.546Z","dependency_job_id":null,"html_url":"https://github.com/ZigEmbeddedGroup/synth-workshop","commit_stats":null,"previous_names":["zigembeddedgroup/sycl-workshop-2023","zigembeddedgroup/synth-workshop"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZigEmbeddedGroup%2Fsynth-workshop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZigEmbeddedGroup%2Fsynth-workshop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZigEmbeddedGroup%2Fsynth-workshop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZigEmbeddedGroup%2Fsynth-workshop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZigEmbeddedGroup","download_url":"https://codeload.github.com/ZigEmbeddedGroup/synth-workshop/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224406191,"owners_count":17305725,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T07:09:00.279Z","updated_at":"2024-11-13T07:09:01.049Z","avatar_url":"https://github.com/ZigEmbeddedGroup.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"= SYCL 2023 Embedded Zig Workshop\n:toc:\n\n== Introduction\n\nHello! if you're reading this then you're either taking the zig embedded workshop at SYCL 2023, or you're just curious. Either way, welcome!\n\n== Parts Kit\n\n[cols=\"1,1,1\"]\n|===\n| Name                | Vendor   | Part No\n| Breadboard          | Digikey  | 1528-2143-ND\n| Jumpers             | Digikey  | 1568-1633-ND\n| Raspberry Pi Pico H | Digikey  | 2648-SC0917-ND\n| Potentiometer       | Digikey  | 987-1714-ND\n| Digital Encoder     | Digikey  | PEC11R-4220K-S0024-ND\n| Micro USB Cable     | Digikey  | AE11229-ND\n| Pico Debugger       | Adafruit | 5699\n| 4x4 Keypad          | Adafruit | 3844\n| Speaker             | Adafruit | 1314\n| Amplifier           | Adafruit | 3006\n|===\n\nNOTE: you will need to solder wires to the speaker. You can use a different speaker if you like, but it must be 3W, 4 ohm.\n\n== Prerequisites\n\n* https://git-scm.com/downloads[Git]\n* https://developer.arm.com/downloads/-/gnu-rm[Arm GNU Toolchain (for GDB)]\n** NOTE: for the windows installer, select the \"add to path\" option\n* Some sort of programming environment. If you are unsure, refer to \u003c\u003cSetting up VS Code for Zig and Embedded Development\u003e\u003e\n\n=== Installing Zig\n\nYour laptop will fit under one of these platform strings:\n\n* x86_64-linux\n* x86_64-macos\n* x86_64-windows\n* aarch64-linux\n* aarch64-macos\n\nOpen a command prompt/terminal run the command `./tools/zigup/\u003cplatform\u003e/zigup master`, on windows it will be `zigup.exe`. This will install the zig compiler on your machine.\n\nIf this does not work for you for some reason, you can download zig from https://ziglang.org/download/[here]. We are using the master build for this workshop.\n\n=== OpenOCD\n\nAt the time of writing, I've not been able to get the current release of OpenOCD (0.12.0) working correctly on MacOS, this was sourced using `brew`. Instead I have found success with https://github.com/raspberrypi/openocd[Raspberry Pi's fork of OpenOCD].\n\nIf you run `windows` or `macos` I've committed binaries to this repository since they're easy to package. If you run `linux` though you'll have to build it on your own, and then add it to your `PATH`:\n\n[source]\n----\ngit clone https://github.com/raspberrypi/openocd\ncd openocd\n./bootstrap\n./configure --enable-picoprobe --prefix ~/.local # change the prefix/install location as you like\nmake -j4 install\n----\n\n== Setting up VS Code for Zig and Embedded Development\n\nExtensions to Install:\n\n* https://marketplace.visualstudio.com/items?itemName=ziglang.vscode-zig[Zig]\n** When you open up a zig file, this extension will ask if you'd like to enable ZLS, I suggest you do.\n* https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-serial-monitor[Serial Monitor]\n\n== Cloning\n\n[source]\n----\ngit clone --recursive https://github.com/ZigEmbeddedGroup/sycl-workshop-2023.git\ncd sycl-workshop-2023\n----\n\n== Building and running a demo using UF2\n\n1. Compile the demos by running `zig build` in your project root.\n2. To activate the uf2 bootloader, power must be applied to the pico while the `BOOTSEL` button is held. This is best done by connecting a button from `RUN` to ground, pressing both buttons, and releasing the `RUN` button first, then `BOOTSEL`. The other option is to plug/unplug the USB cable which is awkward and gets tiresome.\n3. Copy the uf2 file into the mounted drive. Execution should take place immediately\n\n== Building and running a demo using the Pico Probe\n\n1. Run `zig build openocd` in a terminal, it will invoke the correct flags for you. You need to restart this command if you unplug the debugger, otherwise just keep it running in the background.\n2. In a separate terminal, compile the demos with `zig build`.\n3. Run:\n  a. `arm-none-eabi-gdb \u003cpath to the executable\u003e`\n  b. `\u003e load`\n  c. `\u003e run` and confirm\n\nCTRL-C will interrupt operation if you need to set breakpoints. There is a `.gdbinit` file in this project that tells GDB to initially connect to `localhost:3333`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzigembeddedgroup%2Fsynth-workshop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzigembeddedgroup%2Fsynth-workshop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzigembeddedgroup%2Fsynth-workshop/lists"}