{"id":26162444,"url":"https://github.com/spinnakermanchester/spinnaker_tools","last_synced_at":"2025-10-13T04:13:35.755Z","repository":{"id":19599649,"uuid":"22850366","full_name":"SpiNNakerManchester/spinnaker_tools","owner":"SpiNNakerManchester","description":"SpiNNaker API, sark, sc\u0026mp, bmp firmware and build tools","archived":false,"fork":false,"pushed_at":"2025-07-04T10:05:04.000Z","size":15685,"stargazers_count":18,"open_issues_count":34,"forks_count":4,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-09-05T00:26:52.013Z","etag":null,"topics":["build-tools","c","sark","spinnaker"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SpiNNakerManchester.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2014-08-11T18:45:48.000Z","updated_at":"2025-07-04T10:04:49.000Z","dependencies_parsed_at":"2023-11-17T14:08:32.230Z","dependency_job_id":"21a67015-1d67-4b17-9019-55ae9b5d859c","html_url":"https://github.com/SpiNNakerManchester/spinnaker_tools","commit_stats":null,"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/SpiNNakerManchester/spinnaker_tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpiNNakerManchester%2Fspinnaker_tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpiNNakerManchester%2Fspinnaker_tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpiNNakerManchester%2Fspinnaker_tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpiNNakerManchester%2Fspinnaker_tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpiNNakerManchester","download_url":"https://codeload.github.com/SpiNNakerManchester/spinnaker_tools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpiNNakerManchester%2Fspinnaker_tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013694,"owners_count":26085390,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["build-tools","c","sark","spinnaker"],"created_at":"2025-03-11T13:54:28.086Z","updated_at":"2025-10-13T04:13:35.748Z","avatar_url":"https://github.com/SpiNNakerManchester.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![C Actions](https://github.com/SpiNNakerManchester/spinnaker_tools/workflows/C%20Actions/badge.svg?branch=master)](https://github.com/SpiNNakerManchester/spinnaker_tools/actions?query=workflow%3A%22C+Actions%22+branch%3Amaster)\n[![Documentation Status](https://readthedocs.org/projects/spinnaker-tools/badge/?version=latest)](https://spinnaker-tools.readthedocs.io/en/latest/?badge=latest)\n\nSpiNNaker Low-Level Software Tools\n==================================\n\nInstallation and Setup\n----------------------\n 1. Edit the setup file so that it points to your installations of\n    ARM and/or GNU software development tools. You only need one of\n    these two tools installed to build standard applications.\n\n    Search for the string \"EDIT HERE\" to find the two edit points.\n\n    The version of the GNU tools that was used to test this release is\n\n        gcc 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]\n\n    This (and more recent versions) can be downloaded from\n    [this web site](https://launchpad.net/gcc-arm-embedded).\n\n    The version of the ARM tools that was used to test this release is\n\n        ARM C/C++ Compiler, 4.1 [Build 894]\n\n 2. Source the setup file in the directory in which it lives\n\n        source ./setup\n\n 3. Build SARK and spin1_api for ARM or GNU tools\n    (you will probably only want to do one of these)\n\n        make GNU=0\t        # If you are using ARM tools\n        make        \t\t# If you are using GNU tools\n\nUse of the Tools\n----------------\n 4. There is a generic make file which works for both C and C++ (make/app.make)\n    which is used to build simple applications. The preferred way to use this\n    is to create a Makefile which looks something like:\n\n        # A single-file C app called 'example.c' or\n        # a single-file C++ app called 'example.cpp'\n        APP := example\n        include $(SPINN_DIRS)/make/app.make\n\n    The following variables may be set at the top of your Makefile, in\n    environment variables or given as arguments to 'make':\n\n    `APP` - to select the default source file to build (required)\n\n    `GNU` - to choose ARM or GNU tools (`GNU=1`)\n\n    `THUMB` - to choose to generate ARM or Thumb code (`THUMB=0`)\n\n    `DEBUG` - to include debugging info in the ELF files (`DEBUG=0`)\n\n    `API` - if you want link with \"spin1_api\" or not (`API=1`)\n\n    `GP` - if your GNU binaries don't have names like \"arm-none-eabi-gcc\"\n    (`GP=arm-none-eabi`)\n\n 5. Go into the \"apps/hello\" directory to build your first SpiNNaker app.\n\n        cd apps/hello\n        make             # GNU tools\n        make GNU=0       # ARM tools\n\n    This should make `hello.aplx`, which is an executable file that\n    you can load into SpiNNaker\n\n 6. Now start `tubotron` on your workstation to get output from\n    the program as it runs\n\n        tubotron \u0026\n\n    Note that if you see this error message when you start `tubotron`\n\n        failed to create socket: Address already in use\n\n    it is usually because there is already a tubotron (or tubogrid)\n    running and it needs exclusive use of a UDP port.\n\n 7. Now start `ybug` to bootstrap your SpiNNaker system and load and run\n    the `hello` application. You'll need to know the IP address of (one of)\n    your boards to do this (here we'll use `192.168.240.253` as an example).\n    If you aren't sure what state your board is in you should reset it by\n    pressing the reset button.\n\n        ybug 192.168.240.253\n\n    You should see a start-up message and then a prompt. At the prompt\n    type the following.\n\n        boot\n        app_load hello.aplx . 1 16\n        ps\n\n    This loads the code into core 1 on a single SpiNNaker chip and\n    assigns it an application ID of 16. You should see a \"Hello world\"\n    message in the Tubotron window. The `ps` command displays the status of\n    every core on the SpiNNaker chip.\n\n    The `hello` application also sends output to an internal I/O buffer\n    on the chip. You can see this by using the `iobuf` command and\n    telling it which core's buffer to display\n\n        iobuf 1\n\n    Finally, to clear the I/O buffer and stop the application you can\n    use the \"app_stop\" command to remove all applications with a given\n    ID and any resources they have used. Exit \"ybug\" with \"quit\"\n\n        app_stop 16\n        ps\n        quit\n\n    Note: If you have a SpiNN-1, SpiNN-2 or SpiNN-3 board and want all the LEDs\n    on those boards to function (not just the green LED0), then one of the\n    following alternative boot commands may be used:\n\n        boot scamp.boot spin1.conf\n        boot scamp.boot spin2.conf\n        boot scamp.boot spin3.conf\n\n 8. Now build a more complex application (called \"`simple`\"!) which runs on\n    4 chips\n\n        cd ../simple\n        make\n\n    Start `ybug` again to load and run the code. There should be no\n    need to run the `boot` command again. The command to load a program\n    to multiple chips is `app_load` and it has to be told which chips\n    (`all` for all of them), which core (just 1 again) and an application\n    ID (17 this time)\n\n    Because this application runs on multiple cores, the startup of the\n    cores needs to be synchronised. When a core reaches its\n    synchronisation point (or barrier) it enters a wait state known as\n    SYNC0. To allow the cores to proceed beyond the barrier a \"signal\"\n    has to be sent to all cores to cause them to proceed. The `app_sig`\n    command is used to do this, sending the signal `sync0`. In this\n    example, the cores reach their barrier very quickly and so it is\n    OK to send the signal immediately after the `app_load`. In other\n    cases, a delay may be necessary.\n\n        ybug 192.168.240.253\n        app_load simple.aplx all 1 17\n        ps\n        app_sig all 17 sync0\n        ps\n\n    This program runs for around 10 seconds, flashing red LEDs as it goes.\n    (Your board may not have red LEDs). Output from this example goes to\n    the internal I/O buffer and you can view it with the `iobuf` command.\n    You can clean up with `app_stop` again and quit `ybug`.\n\n        iobuf 1\n        app_stop 17\n        ps\n        quit\n\nAdditional Resources\n--------------------\n9.  There are some more examples in the `apps` directory. Each of these\n    has a `xxx.ybug` file which contains the `ybug` commands to run the\n    application. It also contains, as comments, the commands you need\n    to use to build the application and start any visualisation programs\n    that the application needs. These examples include\n\n    `hello` - Hello World (as above)\n\n    `simple` - a contrived demo of the SpiNNaker API\n\n    `data_abort` - causes a data abort to demonstrate debugging\n\n    `interrupt` - demonstrates a bare-metal interrupt handler\n\n    `ring` - shows how to set up routing tables for core-to-core comms\n\n    `random` - random number generation and simple graphics\n\n    `pt_demo` - a path tracing program - quite complex - see its own README\n\n    `heat_demo` - a heat diffusion example (precompiled Linux visualiser)\n\n    `gdb_test` - shows how to use the GDB debugger with SpiNNaker. See\n    the `gdb-spin` document in the `docs` directory for instructions.\n\n10. There is documentation for SARK, `ybug`, `gdb-spin` and the Spin1\n    API in the `docs` directory.\n\n11. SpiNNaker systems mostly communicate using UDP/IP with port numbers\n    in the range 17890-17899. Specifically, 17892 is used for Tubotron\n    and Tubogrid, 17893 is used by SpiNNaker (e.g., by `ybug`) and 17894\n    is often used by visualisers. If you have a firewall blocking any\n    of these ports, you may encounter problems and it's worth checking\n    the firewall before blaming anything else!\n\n    Similarly, you may only have one visualiser (such as Tubotron) on\n    each port at any one time. So you may see a message to the effect\n    that the port is in use if you try to start a visualiser when one\n    is already running and using the same port.\n\n12. Some visualisers (tubotron/tubogrid) use the Perl-Tk library which\n    may not be installed by default on your machine. This can be\n    installed as follows\n\n        sudo apt-get install perl-tk\t\t# Ubuntu, etc\n        sudo yum     install perl-Tk\t\t# Fedora, etc\n        \nDocumentation\n=============\n[SpiNNaker Tools C documentation](http://spinnaker-tools.readthedocs.io)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspinnakermanchester%2Fspinnaker_tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspinnakermanchester%2Fspinnaker_tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspinnakermanchester%2Fspinnaker_tools/lists"}