{"id":20795173,"url":"https://github.com/andriy-bilynskyy/stm32-linux","last_synced_at":"2025-07-08T19:41:44.673Z","repository":{"id":178004187,"uuid":"181358531","full_name":"andriy-bilynskyy/STM32-Linux","owner":"andriy-bilynskyy","description":"STM32 project template for development under Linux","archived":false,"fork":false,"pushed_at":"2021-01-01T19:09:52.000Z","size":38999,"stargazers_count":9,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-06T00:45:19.484Z","etag":null,"topics":["ddd","development","freertos","linux","openocd","seggerrtt","stm32"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andriy-bilynskyy.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,"zenodo":null}},"created_at":"2019-04-14T19:27:26.000Z","updated_at":"2025-01-26T11:21:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"af4d1f57-249f-4590-832a-64e1ab2abe48","html_url":"https://github.com/andriy-bilynskyy/STM32-Linux","commit_stats":null,"previous_names":["andriy-bilynskyy/stm32-linux"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andriy-bilynskyy/STM32-Linux","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andriy-bilynskyy%2FSTM32-Linux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andriy-bilynskyy%2FSTM32-Linux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andriy-bilynskyy%2FSTM32-Linux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andriy-bilynskyy%2FSTM32-Linux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andriy-bilynskyy","download_url":"https://codeload.github.com/andriy-bilynskyy/STM32-Linux/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andriy-bilynskyy%2FSTM32-Linux/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264335527,"owners_count":23592628,"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":["ddd","development","freertos","linux","openocd","seggerrtt","stm32"],"created_at":"2024-11-17T16:20:04.156Z","updated_at":"2025-07-08T19:41:44.667Z","avatar_url":"https://github.com/andriy-bilynskyy.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# STM32 development under Linux\n\n## YouTube demo\n\nhttps://youtu.be/57-iolU-PpE\n\n## Cheap startup hardware\n\n**USB JTAG Jlink clone** \u003cbr/\u003e\nhttps://ru.aliexpress.com/item/New-JLink-OB-ARM-Emulator-Debugger-Programmer-Downloader-for-Replace-V8-SWD-M74/32827782488.html?spm=a2g0v.10010108.1000014.5.63f67f76c8Ikyq\u0026pvid=de125860-82b2-43f4-a546-0bd2bf70b9c7\u0026gps-id=pcDetailBottomMoreOtherSeller\u0026scm=1007.13338.112235.000000000000000\u0026scm-url=1007.13338.112235.000000000000000\u0026scm_id=1007.13338.112235.000000000000000\n\n**Evaluation STM32 board** \u003cbr/\u003e\nhttps://ru.aliexpress.com/item/STM32F103C8T6-ARM-STM32-arduino/32887666464.html?spm=2114.13010708.0.0.134f33edtKnEcc\n\n## Board description:\n\nhttps://wiki.stm32duino.com/index.php?title=Blue_Pill#Software_installation\n\n## Flashing tools\n\nhttps://www.segger.com/downloads/flasher/ \u003cbr/\u003e\nSelect product for your operation system. In case of Ubuntu 64 bit use:\nJ-Link Software and Documentation pack for Linux, DEB installer, 64-bit.\nTo flash/erase use JFlashLiteExe.\n\n## Development tools\n\n**GNU Arm Embedded Toolchain** \u003cbr/\u003e\nhttps://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads\n\n**openocd** \u003cbr/\u003e\nAvailable as package in most Linux distros.\n\n## OpenOCD debugging\n\nStart server\n\n    openocd -f openocd/jlink.cfg -f openocd/stm32f1x.cfg\n\nStart client\n\n    \u003cpath_to_your_toolchain\u003e/bin/arm-none-eabi-gdb -ex \"target remote localhost:3333\" \u003cyour_generated_elf_file\u003e\n\nDownload binary file\n\n    monitor reset halt\n    load\n    monitor reset run\n\nGeneral commands:\n\n| command                              | description                                       |\n|--------------------------------------|---------------------------------------------------|\n| monitor reset halt                   | reset MCU and stop                                |\n| continue                             | run SW (to stop Ctrl+C)                           |\n| next/nexti                           | next codeline/instruction                         |\n| step/stepi                           | next codeline/instruction with entering functions |\n| finish                               | exit from current function                        |\n| until                                | run until reach line greater current (loop exit)  |\n| list/list-                           | show 10 code lines down/up                        |\n| break \u003c function, line, file:line \u003e  | add breakpoint                                    |\n| break *0x\u003c address \u003e                 | add breakpoint on hw address                      |\n| watch \u003c variable \u003e                   | set watchpoint on write to variable               |\n| watch *0x\u003c address \u003e                 | set watchpoint on write to address                |\n| rwatch \u003c variable \u003e                  | set watchpoint on read from variable              |\n| awatch \u003c variable \u003e                  | set watchpoint on read or write variable          |\n| print \u003c variable \u003e                   | show variable                                     |\n| display \u003c variable \u003e                 | add variable to watch list                        |\n| info breakpoints/dispaly             | show breakpoints/watchpoints information          |\n| delete breakpoint/dispaly \u003c id \u003e     | delete breakpoint/watchpoint by id from display   |\n| enable breakpoint/dispaly \u003c id \u003e     | enable breakpoint/watchpoint by id from display   |\n| disable breakpoint/dispaly \u003c id \u003e    | disable breakpoint/watchpoint by id from display  |\n| set \u003c variable \u003e:=\u003c value \u003e          | assign new value to variable                      |\n| info registers                       | show registers                                    |\n| monitor reg                          | add registers to permanent watch                  |\n| backtrace                            | show stack                                        |\n| quit                                 | exit debugger                                     |\n\n## gdb GUI\n\n**ddd** - The Data Display Debugger\nAvailable as package in most Linux distros.\n\nStart ddd\n\n    ddd \u003cyour_generated_elf_file\u003e --debugger \"\u003cpath_to_your_toolchain\u003e/bin/arm-none-eabi-gdb\"\n\nConnect to gdb server (issue command in command window)\n\n    target extended-remote :3333\n\n## SEGGER's Real Time Transfer (RTT)\nIt's JTAG console like semihosting but seems to be more fast and flexible.\nhttps://www.segger.com/products/debug-probes/j-link/technology/about-real-time-transfer/\nInstallation described in section **Flashing tools**\n\n## Project SW components\n\n**Segger RTT** \u003cbr/\u003e\nhttps://www.segger.com/products/debug-probes/j-link/technology/about-real-time-transfer/\n\n**Free RTOS** \u003cbr/\u003e\nhttps://www.freertos.org/\n\n**STM32F10x standard peripheral library** \u003cbr/\u003e\nhttps://www.st.com/content/st_com/en/products/embedded-software/mcu-mpu-embedded-software/stm32-embedded-software/stm32-standard-peripheral-libraries/stsw-stm32054.html\n\n## Quick start guide\n\n### Install tools\n\n    wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/8-2018q4/gcc-arm-none-eabi-8-2018-q4-major-linux.tar.bz2?revision=d830f9dd-cd4f-406d-8672-cca9210dd220?product=GNU%20Arm%20Embedded%20Toolchain,64-bit,,Linux,8-2018-q4-major\n    sudo tar xjC /opt/ -f 'gcc-arm-none-eabi-8-2018-q4-major-linux.tar.bz2?revision=d830f9dd-cd4f-406d-8672-cca9210dd220?product=GNU Arm Embedded Toolchain,64-bit,,Linux,8-2018-q4-major'\n\n    sudo apt-get install openocd make ddd\n\n    wget https://www.segger.com/downloads/flasher/JLink_Linux_x86_64.deb\n    sudo dpkg -i JLink_Linux_x86_64.deb\n    export LD_LIBRARY_PATH=\"/opt/SEGGER/JLink\"\n\n*Note:* \u003cbr/\u003e\nTo persist LD_LIBRARY_PATH after reboot add the next lines to the end of your ~/.bashrc\n\n    if [ -d \"/opt/SEGGER/JLink\" ] ; then\n        export LD_LIBRARY_PATH=\"/opt/SEGGER/JLink\"\n    fi\n\n### Obtain STM32 project template\n\n    git clone https://github.com/andriy-bilynskyy/STM32-Linux.git\n    cd cd STM32-Linux/\n\n### Build and flash\n\n    make build\n    make flash\n\n*Note:* \u003cbr/\u003e\nUse make help to see all options: debug, console...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandriy-bilynskyy%2Fstm32-linux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandriy-bilynskyy%2Fstm32-linux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandriy-bilynskyy%2Fstm32-linux/lists"}