{"id":13418211,"url":"https://github.com/libopencm3/libopencm3","last_synced_at":"2025-05-13T18:12:00.609Z","repository":{"id":3044854,"uuid":"4065980","full_name":"libopencm3/libopencm3","owner":"libopencm3","description":"Open source ARM Cortex-M microcontroller library","archived":false,"fork":false,"pushed_at":"2025-02-26T09:37:28.000Z","size":6691,"stargazers_count":3250,"open_issues_count":272,"forks_count":1065,"subscribers_count":159,"default_branch":"master","last_synced_at":"2025-04-25T17:53:10.145Z","etag":null,"topics":["atmel-sam","cortex-m","efm32","gd32","libopencm3","microchip-sam","microcontrollers","msp432","stm32"],"latest_commit_sha":null,"homepage":"http://libopencm3.org/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/libopencm3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING.GPL3","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":"2012-04-18T16:51:38.000Z","updated_at":"2025-04-24T19:00:30.000Z","dependencies_parsed_at":"2023-07-06T23:46:41.324Z","dependency_job_id":"984147f8-ba1b-4440-8b2a-39f3d4598600","html_url":"https://github.com/libopencm3/libopencm3","commit_stats":{"total_commits":2762,"total_committers":262,"mean_commits":"10.541984732824428","dds":0.7834902244750181,"last_synced_commit":"189017b25cebfc609a6c1a5a02047691ef845b1b"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libopencm3%2Flibopencm3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libopencm3%2Flibopencm3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libopencm3%2Flibopencm3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/libopencm3%2Flibopencm3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/libopencm3","download_url":"https://codeload.github.com/libopencm3/libopencm3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254000857,"owners_count":21997442,"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":["atmel-sam","cortex-m","efm32","gd32","libopencm3","microchip-sam","microcontrollers","msp432","stm32"],"created_at":"2024-07-30T22:00:59.759Z","updated_at":"2025-05-13T18:12:00.564Z","avatar_url":"https://github.com/libopencm3.png","language":"C","funding_links":[],"categories":["C","TODO scan for Android support in followings","工具、材料","CPU_RISC-V"],"sub_categories":["软件：嵌入式操作系统、驱动、GUI 库等","资源传输下载"],"readme":"README\n======\n[![Build Status](https://travis-ci.org/libopencm3/libopencm3.svg?branch=master)](https://travis-ci.org/libopencm3/libopencm3)\n\n[![Gitter channel](https://badges.gitter.im/libopencm3/discuss.svg)](https://gitter.im/libopencm3/discuss)\n\nThe libopencm3 project aims to create an open-source firmware library for\nvarious ARM Cortex-M microcontrollers.\n\nCurrently (at least partly) supported microcontrollers:\n\n - ST STM32 F0xx/F1xx/F2xx/F30x/F37x/F4xx/F7xx/H7xx series\n - ST STM32 G0xx G4xx L0xx L1xx L4xx series\n - Atmel SAM3A/3N/3S/3U/3X series, as well as SAMDxx and friends\n - NXP LPC1311/13/17/42/43\n - Stellaris LM3S series (discontinued, without replacement)\n - TI (Tiva) LM4F series (continuing as TM4F, pin and peripheral compatible)\n - EFM32 Gecko series (only core support)\n - Freescale Vybrid VF6xx\n - Qorvo (formerly ActiveSemi) PAC55XX\n - Synwit SWM050\n - Nordic NRF51x and NRF52x\n\nThe library is written completely from scratch based on the vendor datasheets,\nprogramming manuals, and application notes. The code is meant to be used\nwith a GCC toolchain for ARM (arm-elf or arm-none-eabi), flashing of the\ncode to a microcontroller can be done using the OpenOCD ARM JTAG software.\n\n\nStatus and API\n--------------\n\nThe libopencm3 project is (and presumably, always will be) a work in progress.\nNot all subsystems of all microcontrollers are supported, yet, though some parts\nhave more complete support than others.\n\nPrior to version 0.8.0, the api was largely in flux.  Attempts were made to provide\nbackwards compatibility, but this was not always considered critical.\n\nFrom 0.8.0 to 1.0, we'll atempt to follow semver, but **EXPECT CHANGES**, as we\nattempt to clear up old APIs and remove deprecated functions.  The 0.8.0 tag was\nplaced to provide the \"old stable\" point before all the new code started landing.\n\n_preview_ code often lands in the \"wildwest-N\" branches that appear and disappear\nin the repository.  Pull requests marked as \"merged-dev\" will be in this branch,\nand will be closed when they merge to master.  This is useful for bigger\ninterdependent patch sets, and also allows review of merge conflicts in public.\n\nFrom 1.0, expect to follow semver, with functions (and defines!) being deprecated for\na release before being removed.\n\n_TIP_: Include this repository as a Git submodule in your project to make sure\n     your users get the right version of the library to compile your project.\n     For how that can be done refer to the\n     [libopencm3-template](https://github.com/libopencm3/libopencm3-template) repository.\n\nPrerequisites\n-------------\n\nBuilding requires Python (some code is generated).\n\n**For Ubuntu/Fedora:**\n\n - An arm-none-eabi/arm-elf toolchain.\n\n**For Windows:**\n\n Download and install:\n\n - msys - http://sourceforge.net/projects/mingw/files/MSYS/Base/msys-core/msys-1.0.11/MSYS-1.0.11.exe\n - Python - https://www.python.org/downloads/windows/ (any release)\n - arm-none-eabi/arm-elf toolchain (for example this one https://launchpad.net/gcc-arm-embedded)\n\nRun msys shell and set the path without standard Windows paths (adjusting to your version of Python), so Windows programs such as 'find' won't interfere:\n\n    export PATH=\"/c//Program Files/Python 3.9:/c/ARMToolchain/bin:/usr/local/bin:/usr/bin:/bin\"\n\nAfter that you can navigate to the folder where you've extracted libopencm3 and build it.\n\nToolchain\n---------\n\nThe most heavily tested toolchain is [\"gcc-arm-embedded\"](https://developer.arm.com/Tools%20and%20Software/GNU%20Toolchain)\nThis used to be available at https://launchpad.net/gcc-arm-embedded\n\nOther toolchains _should_ work, but they have not been nearly as well tested.\nToolchains targeting Linux, such as \"gcc-arm-linux-gnu\" or the like are\n_not_ appropriate.\n\n_NOTE_: GCC version 6 or later is required, as we're using attributes on enumerators\nto help mark deprecations.\n\nBuilding\n--------\n\n    $ make\n\nIf you have an arm-elf toolchain (uncommon) you may want to override the\ntoolchain prefix (arm-none-eabi is the default)\n\n    $ PREFIX=arm-elf make\n\nFor a more verbose build you can use\n\n    $ make V=1\n\nYou can reduce the build time by specifying a particular MCU series\n\n    $ make TARGETS='stm32/f1 stm32/f4'\n\nSupported targets can be listed using:\n\n    $ make list-targets\n\nFine-tuning the build\n---------------------\n\nThe build may be fine-tuned with a limited number of parameters, by specifying\nthem as environment variables, for example:\n\n    $ VARIABLE=value make\n\n* `FP_FLAGS` - Control the floating-point ABI\n\n   If the Cortex-M core supports a hard float ABI, it will be compiled with\n   the best floating-point support by default. In cases where this is not desired, the\n   behavior can be specified by setting `FP_FLAGS`.\n\n   Currently, M4F cores default to `-mfloat-abi=hard -mfpu=fpv4-sp-d16`, and\n   M7 cores defaults to double precision `-mfloat-abi=hard -mfpu=fpv5-d16` if available,\n   and single precision `-mfloat-abi=hard -mfpu=fpv5-sp-d16` otherwise.\n   Other architectures use no FP flags, in otherwords, traditional softfp.\n\n   You may find which FP_FLAGS you can use in a particular architecture in the readme.txt\n   file shipped with the gcc-arm-embedded package.\n\n   Examples:\n\n        $ FP_FLAGS=\"-mfloat-abi=soft\" make               # No hardfloat\n        $ FP_FLAGS=\"-mfloat-abi=hard -mfpu=magic\" make   # New FPU we don't know of\n\n* `CFLAGS` - Add to or supersede compiler flags\n\n   If the library needs to be compiled with additional flags, they can be\n   passed to the build system via the environment variable `CFLAGS`. The\n   contents of `CFLAGS` will be placed after all flags defined by the build\n   system, giving the user a way to override any default if necessary.\n\n   Examples:\n\n        $ CFLAGS=\"-fshort-wchar\" make    # Compile lib with 2 byte wide wchar_t\n\nExample projects\n----------------\n\nThe libopencm3 community has written and is maintaining a huge collection of\nexamples, displaying the capabilities and uses of the library. You can find all\nof them in the libopencm3-examples repository:\n\nhttps://github.com/libopencm3/libopencm3-examples\n\nIf you just wish to test your toolchain and build environment, a collection of\nmini blink projects is available too.  This covers _many_ more boards, but, as\nthe name suggests, only demonstrates blinking LEDs.\n\n\nhttps://github.com/libopencm3/libopencm3-miniblink\n\nInstallation\n------------\n\nSimply pass -I and -L flags to your own project.  See the\n[libopencm3-template](https://github.com/libopencm3/libopencm3-template)\nrepository for a template repository using this library as a Git submodule,\nthe most popular method of use.  The libopencm3-examples is another\nexample of this.\n\nIt is strongly advised that you do not attempt to install this library to any\npath inside your toolchain itself.  While this means you don't have to include\nany `-I` or `-L` flags in your projects, it is _very_ easy to confuse a multi-library\nlinker from picking the right versions of libraries.  Common symptoms are\nhardfaults caused by branches into ARM code.  You can use `arm-none-eabi-objdump`\nto check for this in your final ELF file.  You have been warned.\n\nCoding style and development guidelines\n---------------------------------------\n\nSee HACKING.\n\n\nLicense\n-------\n\nThe libopencm3 code is released under the terms of the GNU Lesser General\nPublic License (LGPL), version 3 or later.\n\nSee COPYING.GPL3 and COPYING.LGPL3 for details.\n\nCommunity\n---------\n\n * Our [![Gitter channel](https://badges.gitter.im/libopencm3/discuss.svg)](https://gitter.im/libopencm3/discuss)\n * Our IRC channel on the libera.chat IRC network is called #libopencm3\n\nMailing lists\n-------------\n\n * Developer mailing list (for patches and discussions):\n   https://lists.sourceforge.net/lists/listinfo/libopencm3-devel\n\n * Commits mailing list (receives one mail per `git push`):\n   https://lists.sourceforge.net/lists/listinfo/libopencm3-commits\n\n\nWebsite\n-------\n\n * http://libopencm3.org - contains daily autogenerated API documentation\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibopencm3%2Flibopencm3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flibopencm3%2Flibopencm3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flibopencm3%2Flibopencm3/lists"}