{"id":17485733,"url":"https://github.com/arlk/cf-firmware","last_synced_at":"2025-03-28T14:40:51.752Z","repository":{"id":78327010,"uuid":"81505598","full_name":"arlk/cf-firmware","owner":"arlk","description":null,"archived":false,"fork":false,"pushed_at":"2017-11-30T19:16:12.000Z","size":3460,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-19T05:22:46.147Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/arlk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2017-02-09T23:33:28.000Z","updated_at":"2019-10-24T07:08:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"f70bd25c-c814-4f04-9444-49a5899bb8d0","html_url":"https://github.com/arlk/cf-firmware","commit_stats":{"total_commits":683,"total_committers":41,"mean_commits":"16.658536585365855","dds":0.7935578330893118,"last_synced_commit":"7f662e3cd3fdb7624cf7ef0c65db9902c8f1fea3"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arlk%2Fcf-firmware","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arlk%2Fcf-firmware/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arlk%2Fcf-firmware/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arlk%2Fcf-firmware/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arlk","download_url":"https://codeload.github.com/arlk/cf-firmware/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246049618,"owners_count":20715510,"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-19T02:08:37.067Z","updated_at":"2025-03-28T14:40:51.733Z","avatar_url":"https://github.com/arlk.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crazyflie 1.0/2.0 Firmware  [![Build Status](https://api.travis-ci.org/bitcraze/crazyflie-firmware.svg)](https://travis-ci.org/bitcraze/crazyflie-firmware)\n\nThis project contains the source code for the Crazyflie 1.0/2.0 firmware.\n\n# Debugging\n\nMake sure you have installed openocd, arm-none-eabi-gcc and cgdb.\n\n``` bash\nmake clean \u0026\u0026 make all CLOAD=0 DEBUG=1 \u0026\u0026 make flash\nmake openocd # in a seperate terminal\nmake cgdb\n```\n\n\n## Dependencies\n\nYou'll need to use either the [Crazyflie VM](https://wiki.bitcraze.io/projects:virtualmachine:index),\n[the toolbelt](https://wiki.bitcraze.io/projects:dockerbuilderimage:index) or\ninstall some ARM toolchain.\n\n### Install a toolchain\n\n#### OS X\n```bash\nbrew tap PX4/homebrew-px4\nbrew install gcc-arm-none-eabi\n```\n\n#### Debian/Ubuntu\n\nTested on Ubuntu 14.04 64b and Ubuntu 16.04 64b:\n\nFor ubuntu 14.04 :\n\n```bash\nsudo add-apt-repository ppa:terry.guo/gcc-arm-embedded\n```\n\nFor ubuntu 16.04 :\n\n```bash\nsudo add-apt-repository ppa:team-gcc-arm-embedded/ppa\n```\n\nAfter adding the corresponding repositories, execute the following commands\n\n```bash\nsudo apt-get update\nsudo apt-get install libnewlib-arm-none-eabi\n```\n\n#### Arch Linux\n\n```bash\nsudo pacman -S community/arm-none-eabi-gcc community/arm-none-eabi-gdb community/arm-none-eabi-newlib\n```\n\n#### Windows\n\nThe GCC ARM Embedded toolchain for Windows is available at [launchpad.net](https://launchpad.net/gcc-arm-embedded/+download). Download the zip archive rather than the executable installer. There are a few different systems for running UNIX-style shells and build systems on Windows; the instructions below are for [Cygwin](https://www.cygwin.com/).\n\nInstall Cygwin with [setup-x86_64.exe](https://www.cygwin.com/setup-x86_64.exe). Use the standard `C:\\cygwin64` installation directory and install at least the `make` and `git` packages.\n\nDownload the latest `gcc-arm-none-eabi-*-win32.zip` archive from [launchpad.net](https://launchpad.net/gcc-arm-embedded/+download). Create the directory `C:\\cygwin64\\opt\\gcc-arm-none-eabi` and extract the contents of the zip file to it.\n\nLaunch a Cygwin terminal and run the following to append to your ~/.bashrc file:\n```bash\necho '[[ $PATH == */opt/gcc-arm-none-eabi/bin* ]] || export PATH=/opt/gcc-arm-none-eabi/bin:$PATH' \u003e\u003e~/.bashrc\nsource ~/.bashrc\n```\n\nVerify the toolchain installation with `arm-none-eabi-gcc --version`\n\n### Cloning\n\nThis repository uses git submodules. Clone with the --recursive flag\n\n```bash\ngit clone --recursive https://github.com/bitcraze/crazyflie-firmware.git\n```\n\nIf you already have cloned the repo, use\n\n```bash\ngit submodule init\ngit submodule update\n```\n\n\n## Compiling\n\n### Crazyflie 1.0\n\nBuild with:\n```bash\nmake PLATFORM=CF1\n```\n\nor with the toolbelt\n\n```bash\ntb make PLATFORM=CF1\n```\n\n### Crazyflie 2.0\n\nThis is the dafault build so just running \"make\" is enough or:\n```bash\nmake PLATFORM=CF2\n```\n\nor with the toolbelt\n\n```bash\ntb make\n```\n\n### config.mk\nTo create custom build options create a file called config.mk in the root folder\n(same as Makefile) and fill it with options. E.g.\n```\nPLATFORM=CF1\nDEBUG=1\nCLOAD=0\n```\nMore information can be found on the\n[Bitcraze wiki](http://wiki.bitcraze.se/projects:crazyflie2:index)\n\n## Folder description:\n```\n./              | Root, contains the Makefile\n + init         | Contains the main.c\n + config       | Configuration files\n + drivers      | Hardware driver layer\n |  + src       | Drivers source code\n |  + interface | Drivers header files. Interface to the HAL layer\n + hal          | Hardware abstaction layer\n |  + src       | HAL source code\n |  + interface | HAL header files. Interface with the other parts of the program\n + modules      | Firmware operating code and headers\n |  + src       | Firmware tasks source code and main.c\n |  + interface | Operating headers. Configure the firmware environement\n + utils        | Utils code. Implement utility block like the console.\n |  + src       | Utils source code\n |  + interface | Utils header files. Interface with the other parts of the program\n + platform     | Platform specific files. Not really used yet\n + tools        | Misc. scripts for LD, OpenOCD, make, version control, ...\n |              | *** The two following folders contains the unmodified files ***\n + lib          | Libraries\n |  + FreeRTOS  | Source FreeRTOS folder. Cleaned up from the useless files\n |  + STM32...  | Library folders of the ST STM32 peripheral libs\n |  + CMSIS     | Core abstraction layer\n```\n# Make targets:\n```\nall        : Shortcut for build\ncompile    : Compile cflie.hex. WARNING: Do NOT update version.c\nbuild      : Update version.c and compile cflie.elf/hex\nclean_o    : Clean only the Objects files, keep the executables (ie .elf, .hex)\nclean      : Clean every compiled files\nmrproper   : Clean every compiled files and the classical editors backup files\n\ncload      : If the crazyflie-clients-python is placed on the same directory level and\n             the Crazyradio/Crazyradio PA is inserted it will try to flash the firmware\n             using the wireless bootloader.\nflash      : Flash .elf using OpenOCD\nhalt       : Halt the target using OpenOCD\nreset      : Reset the target using OpenOCD\nopenocd    : Launch OpenOCD\n```\n# Unit testing\n\n## Running all unit tests\n\nWith the environment set up locally\n\n        make unit\n\nwith the docker builder image and the toolbelt\n\n        tb make unit\n\n## Running one unit test\n\nWhen working with one specific file it is often convinient to run only one unit test\n\n       make unit FILES=test/utils/src/TestNum.c\n\nor with the toolbelt\n\n       tb make unit FILES=test/utils/src/TestNum.c\n\n## Running unit tests with specific build settings\n\nDefines are managed by make and are passed on to the unit test code. Use the\nnormal ways of configuring make when running tests. For instance to run test\nfor Crazyflie 1\n\n      make unit PLATFORM=CF1\n\n## Dependencies\n\nFrameworks for unit testing and mocking are pulled in as git submodules.\n\nThe testing framework uses ruby and rake to generate and run code.\n\nTo minimize the need for installations and configuration, use the docker builder\nimage (bitcraze/builder) that contains all tools needed. All scripts in the\ntools/build directory are intended to be run in the image. The\n[toolbelt](https://wiki.bitcraze.io/projects:dockerbuilderimage:index) makes it\neasy to run the tool scripts.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farlk%2Fcf-firmware","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farlk%2Fcf-firmware","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farlk%2Fcf-firmware/lists"}