{"id":28534884,"url":"https://github.com/bazelembedded/rules_freertos","last_synced_at":"2025-07-07T22:30:42.059Z","repository":{"id":45324580,"uuid":"440394551","full_name":"bazelembedded/rules_freertos","owner":"bazelembedded","description":"A set of Bazel build rules for FreeRTOS","archived":false,"fork":false,"pushed_at":"2021-12-21T08:49:29.000Z","size":7,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-06T17:11:35.290Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bazelembedded.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}},"created_at":"2021-12-21T04:55:40.000Z","updated_at":"2022-01-21T01:40:38.000Z","dependencies_parsed_at":"2022-07-19T03:17:12.763Z","dependency_job_id":null,"html_url":"https://github.com/bazelembedded/rules_freertos","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/bazelembedded%2Frules_freertos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazelembedded%2Frules_freertos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazelembedded%2Frules_freertos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazelembedded%2Frules_freertos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bazelembedded","download_url":"https://codeload.github.com/bazelembedded/rules_freertos/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bazelembedded%2Frules_freertos/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":258919799,"owners_count":22778188,"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":"2025-06-09T17:13:19.196Z","updated_at":"2025-07-07T22:30:42.052Z","avatar_url":"https://github.com/bazelembedded.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CI](https://github.com/silvergasp/rules_freertos/actions/workflows/ci.yml/badge.svg)](https://github.com/silvergasp/rules_freertos/actions/workflows/ci.yml)\n# rules_freertos\nA set of Bazel build rules for FreeRTOS. \n\n## Getting started\nAdd the following to your workspace. This will fetch and setup the main\nFreeRTOS repository 'com_github_freertos_freertos_kernel`. \n\n``` python\ngit_repository(\n    name = \"rules_freertos\",\n    remote = \"https://github.com/silvergasp/rules_freertos.git\",\n    # Replace commit with latest.\n    commit = \"\u003cTODO\u003e\",\n)\n\nload(\"@rules_freertos//:freertos_deps.bzl\", \"freertos_deps\")\n\nfreertos_deps()\n```\n\nIn the 'com_github_freertos_freertos_kernel' repository there are three targets \nof interest.\n- `@com_github_freertos_freertos_kernel//:freertos`: The main kernel. This\n  target depends on the two configurable targets below.\n- `@com_github_freertos_freertos_kernel//:port`: An overridable label_flag[^1] for\n   the 'port' cc_library target. i.e. this should contain your port macro's. \n   This target defaults to selecting the 'Posix' or 'CM4F' ports based on your\n   platforms. PR's for a more complete set of defaults welcome!!\n- `@com_github_freertos_freertos_kernel//:config`: An overridable label_flag[^1] that references a cc_library exporting a `FreeRTOSConfig.h`.\n\nTo configure the FreeRTOS kernel, retarget the `label_flags` using your \n`.bazelrc` e.g.\n```\n# Optionally override the port. Prefer upstreaming the ports and build files if\n# possible.\nbuild --@com_github_freertos_freertos_kernel//:port=//my_project:freertos_port\n\n# Optionally (though strongly recommended) override the config.\nbuild --@com_github_freertos_freertos_kernel//:config=//my_project:freertos_config\n```\n\nIf you have multiple projects in your workspace it may be useful to configure\nbackends using select statements. e.g.\n``` py\n# //my_project:BUILD.bazel\n\n# This target acts as a user configurable 'Multiplexer' for the port. \ncc_library(\n    name = \"freertos_port\",\n    deps = select({\n        \"@platforms//os:linux\": [\":my_linux_port\"],\n        \"@platforms//cpu:armv7-m\": [\":my_cortex_m3_port\"],\n    }),\n    visibility = [\"//visibility:public\"],\n)\n\n# This target acts as a user configurable 'Multiplexer' for the config. \ncc_library(\n    name = \"freertos_config\",\n    deps = select({\n        \"@platforms//os:linux\": [\":my_linux_config\"],\n        \"@platforms//cpu:armv7-m\": [\":my_cortex_m3_config\"],\n    }),\n)\n\ncc_library(\n    name = \"my_cortex_m3_config\",\n    hdrs = [\"cortex_m3/FreeRTOSConfig.h\"],\n    includes = [\"cortex_m3\"],\n)\n\n# ...\n```\n\n\n[^1]:[User defined build settings](https://docs.bazel.build/versions/main/skylark/config.html#user-defined-build-settings\n)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbazelembedded%2Frules_freertos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbazelembedded%2Frules_freertos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbazelembedded%2Frules_freertos/lists"}