{"id":13411174,"url":"https://github.com/AdaCore/Certyflie","last_synced_at":"2025-03-14T16:34:03.339Z","repository":{"id":37821670,"uuid":"47131537","full_name":"AdaCore/Certyflie","owner":"AdaCore","description":null,"archived":false,"fork":false,"pushed_at":"2018-09-25T10:53:31.000Z","size":2798,"stargazers_count":31,"open_issues_count":3,"forks_count":17,"subscribers_count":35,"default_branch":"ravenscar-cf-stable","last_synced_at":"2024-07-31T20:45:06.600Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ada","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/AdaCore.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}},"created_at":"2015-11-30T16:31:24.000Z","updated_at":"2024-04-28T17:15:28.000Z","dependencies_parsed_at":"2022-08-19T11:21:22.791Z","dependency_job_id":null,"html_url":"https://github.com/AdaCore/Certyflie","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/AdaCore%2FCertyflie","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdaCore%2FCertyflie/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdaCore%2FCertyflie/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AdaCore%2FCertyflie/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AdaCore","download_url":"https://codeload.github.com/AdaCore/Certyflie/tar.gz/refs/heads/ravenscar-cf-stable","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243610874,"owners_count":20319043,"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-07-30T20:01:11.936Z","updated_at":"2025-03-14T16:34:02.898Z","avatar_url":"https://github.com/AdaCore.png","language":"Ada","funding_links":[],"categories":["Hardware and Embedded"],"sub_categories":["Firmwares"],"readme":"# Crazyflie 2.0 Firmware\n\nThis branch contains the source code for the full Ada + SPARK Crazyflie 2.0 firmware.\nIf you want to use the SPARK + C version, switch to the *crazyflie2* branch instead.\n\n## Folder description\n```\n./                       | Root, contains the .gpr project file\n + Ada_Drivers_Library   | As submodule\n + crazyflie_support     | Support library\n |  + src                | Supprt code\n |  + test               | Some test code\n + src                   | Application code\n```\n\n## Git usage\n\nThis repository uses git submodules.\n\nClone with the `--recursive flag` to clone the submodules:\n```\ngit clone --recursive https://github.com/AdaCore/Certyflie.git\n```\n\nTo update, pull as normal, then update the submodules:\n```\ngit pull\ngit submodule update --recursive\n```\n\n## Requirements\n\nThe firmware is written in Ada 2012 and in SPARK 2014 and targets an STM32F4\nchip, based on ARM. Therefore, a compiler for ARM (ELF) is needed: The \"GNAT\nCommunity 2018\" compiler for ARM (ELF) is one such compiler. A recent GNAT Pro\ncompiler for that target will also suffice.\n\nAt this time, it's not possible to perform SPARK analysis (the 2016 version\ncan't handle recent changes to Project files, and the 2017 version crashes).\n\n## Building the firmware\n\nThe firmware uses a Ravenscar-Full runtime that targets STM32F4 boards. This\nruntime is included in the \"GNAT Community\" for ARM (ELF) package and in the\nrecent GNAT Pro packages for ARM.\n\nTo build the actual firmware, go on the project's root directory and type:\n```\n gprbuild -P cf_ada_spark.gpr -p\n```\n\n## Flashing the firmware\n\nThe firmware can be flashed using the STM32F4 DFU mode.\n\nFirst, install the *dfu-util* on your matchine. On Ubuntu:\n```\napt-get install dfu-util\n```\n\nThen,\n\n1. Plug the USB to micro-USB cable into your laptop\n2. Disconnect the battery from your Crazyflie 2.0\n3. Push in the power button on your Crazyflie 2.0. While continuing to hold in\nthe power button (this is the tricky part), plug the micro-USB connector end of\nthe cable into the Crazyflie.\n4. Continue holding the power button for about five seconds since you plugged\nthe USB cable in). Watch the blue LED on the M2 arm until it displays a\nsecondary (faster) blink rate (flashes about once a second). Then you can\nrelease the button.\n\nWith the STM32F4 in DFU mode, you should be able to find it with *lsusb*:\n```\nlsusb\n...\nBus XXX Device XXX: ID 0483:df11 STMicroelectronics STM Device in DFU Mode\n```\n\nCreate the BIN file from the ELF one with *objcopy* and then flash it using *dfu-util*:\n```\narm-eabi-objcopy obj/cflie.elf -O binary obj/cflie.bin\n\nsudo dfu-util -d 0483:df11 -a 0 -s 0x08000000 -D obj/cflie.bin\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAdaCore%2FCertyflie","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAdaCore%2FCertyflie","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAdaCore%2FCertyflie/lists"}