{"id":15937335,"url":"https://github.com/andersy005/capstone","last_synced_at":"2025-07-13T19:40:19.069Z","repository":{"id":96024385,"uuid":"118843216","full_name":"andersy005/capstone","owner":"andersy005","description":null,"archived":false,"fork":false,"pushed_at":"2018-04-26T17:58:12.000Z","size":3470,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T23:37:45.391Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/andersy005.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-25T01:09:42.000Z","updated_at":"2018-04-26T17:58:13.000Z","dependencies_parsed_at":"2023-04-24T16:47:32.572Z","dependency_job_id":null,"html_url":"https://github.com/andersy005/capstone","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andersy005%2Fcapstone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andersy005%2Fcapstone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andersy005%2Fcapstone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andersy005%2Fcapstone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andersy005","download_url":"https://codeload.github.com/andersy005/capstone/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247070782,"owners_count":20878581,"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-10-07T05:02:25.963Z","updated_at":"2025-04-03T19:44:26.512Z","avatar_url":"https://github.com/andersy005.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Capstone - Quantum Cascade Laser Driver\n\n## Installing MicroPython on STM32F4-Discovery\n\n![](https://i.imgur.com/inINue8.jpg)\n\n**Software needed on the host (Ubuntu)**\n\nTo compile Micro Python, the `arm-none-eabi` cross-compiler is needed. On newer Ubuntu versions this could be easily installed through apt:\n\n    $ sudo apt-get install gcc-arm-none-eabi\n\nAlso you will need the [stlink](https://github.com/texane/stlink) utility from texane. For more details on how to install stlink, please consult texane’s [README](https://github.com/texane/stlink/blob/master/README).\n\nTo download the ELF firmware, you will also need the GDB for arm-none-eabi. In theory this could be done by the following apt statement:\n\n    $ sudo apt-get install gdb-arm-none-eabi libnewlib-arm-none-eabi\n\nBut unfortunately if you have installed any other gdb already (which is likely), this command will fail due a conflicting manpage! Thus, the following work-around is needed:\n\n    $ sudo apt-get install -d gdb-arm-none-eabi\n    $ sudo dpkg -i --force-overwrite /var/cache/apt/archives/gdb-arm-none-eabi_VERSION_amd64.deb\n\nChange VERSION to your `gdb-arm-none-eabi` version. \n\n### Building Micro Python for the Discovery\n\nClone the Micro Python git repository:\n\n    $ git clone https://github.com/micropython/micropython.git\n\nNow change into the micropython directory and build for the STM32F4-Discovery:\n\n    $ cd micropython\n    $ cd ports/stm32\n    $ make BOARD=STM32F4DISC\n\nThis should create the firmware.elf in `stm32/build-STM32F4DISC`.\n\n### Flash the Micro Python firmware to the Discovery\n\nConnect the Discovery through USB (the one on with the Mini-B connector, don’t connect the USB-OTG), then start (in a separate terminal) the stlinkt utilit:\n\n    $ st-util\n\nThe `st-util` now waits for a connection from GDB. This is done like so (assuming you are still in the `micropython/ports/stm32` directory):\n\n    $ arm-none-eabi-gdb build-STM32F4DISC/firmware.elf\n\nWithin GDB connect to st-util by:\n\n    target extended localhost:4242\n\nAnd flash the firmware with:\n\n    load\n\nThe multi-color COM-LED should blink while loading. After downloading finised, terminate GDB.\n\nNow disconnect the USB Mini-B cable to power the board completely off.  Connect a USB-OTG on the opposite side, and reconnect the USB Mini-B cable for power. After a few seconds, the STM should be mounted as a storage device showing the files `boot.py` and `main.py`. It is also possible to open a Python shell on the serial device `/dev/ttyACM0` or `/dev/ttyACM1`:\n\n    $ screen /dev/ttyACM1\n\n\n## Creating development environment\n\n\n#### Step 1: Install a [Miniconda](http://conda.pydata.org/miniconda.html) (or [Anaconda](https://www.continuum.io/downloads) environment)\n\n-----------------------------------------------------------------\n\nAny Linux, Mac OS X, or Windows computer should be suitable.\n\nIf you don't already have conda on your machine, you can get it from [Miniconda](http://conda.pydata.org/miniconda.html), by opening a terminal window and \n\n##### Download Miniconda\n\n    # for linux\n    $ wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh\n\n    # for osx\n    $ wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh\n\n    # for windows\n    # go to: https://conda.io/miniconda.html\n\n##### Install Miniconda\n\n    $ bash miniconda.sh\n    # follow instructions\n\n#### Step 2: Clone beyond-matplotlib-tutorial-sea-2018 git repo\n\n    git clone https://github.com/andersy005/capstone.git\n\n#### Step 3: Then `cd` to the capstone folder and create a separate Conda environment to work in for this tutorial\n\n    cd capstone\n    conda env update\n\nThis downloads all of the dependencies and then all you have to is:\n\n    source activate capstone\n\n(omitting \"source\" if you are on Windows).\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandersy005%2Fcapstone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandersy005%2Fcapstone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandersy005%2Fcapstone/lists"}