{"id":20841367,"url":"https://github.com/zephyrproject-rtos/rtos-benchmark","last_synced_at":"2025-10-03T13:04:27.309Z","repository":{"id":37905391,"uuid":"492911719","full_name":"zephyrproject-rtos/rtos-benchmark","owner":"zephyrproject-rtos","description":"RTOS Benchmark","archived":false,"fork":false,"pushed_at":"2025-03-04T18:32:23.000Z","size":255,"stargazers_count":42,"open_issues_count":2,"forks_count":17,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-05-08T22:08:20.696Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zephyrproject-rtos.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}},"created_at":"2022-05-16T16:18:05.000Z","updated_at":"2025-04-18T08:28:04.000Z","dependencies_parsed_at":"2025-01-21T23:20:58.271Z","dependency_job_id":"1893e8c8-695e-4dd8-8a71-15bf2781505a","html_url":"https://github.com/zephyrproject-rtos/rtos-benchmark","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/zephyrproject-rtos%2Frtos-benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zephyrproject-rtos%2Frtos-benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zephyrproject-rtos%2Frtos-benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zephyrproject-rtos%2Frtos-benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zephyrproject-rtos","download_url":"https://codeload.github.com/zephyrproject-rtos/rtos-benchmark/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253154975,"owners_count":21862622,"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-11-18T01:19:48.068Z","updated_at":"2025-10-03T13:04:22.285Z","avatar_url":"https://github.com/zephyrproject-rtos.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# README\n\nThe benchmark project contains a set of tests aimed to measure the performance\nof certain OS operations. It currently supports both the qemu_x86 and frdm_k64f\nboards on Zephyr and only the frdm_k64f board on FreeRTOS. Additional boards\nand RTOSes are expected to be added in the future.\n\nIt is recognized that running a benchmark test suite on QEMU is not generally\nrecommended, and any results from that should be taken with a grain of salt.\nThat being said, the primary reason it has been added has been to act as a\nblueprint for integrating additional boards and architectures.\n\n## Setting Up\n\n### Common\n\nInstall the GNU ARM compiler for the `frdm_k64f` board,\n[GNU ARM Embedded toolchain](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm)\nand set `ARMGCC_DIR` to the installation directory.\n\n### Zephyr Specifics\n\nRefer to the [Zephyr Getting Started Guide](https://docs.zephyrproject.org/latest/getting_started/index.html)\nfor installing and setting up the Zephyr environment. This must be done so that\na freestanding application can be built. As indicated under \"Common\", be sure\nto set the `ARMGCC_DIR` environment variable appropriately.\n\nTo enable use of the 3rd Party GNU ARM Embedded toolchain, set the following\nenvironment variables.\n\n```\nexport ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb\nexport GNUARMEMB_TOOLCHAIN_PATH=\u003cpath to installed toolchain\u003e\n```\n\n### FreeRTOS Specifics\n\nBuild and download the FRDM-K64F SDK from the [NXP MCUXpresso SDK Builder](https://mcuxpresso.nxp.com/en/welcome).\nSelect `Linux` as your host OS and `GCC ARM Embedded` as your toolchain.\nBe sure to also check the `FreeRTOS` checkbox to build FreeRTOS\nawareness and examples into the SDK.\n\n```\nmkdir freertos/SDK_\u003cversion\u003e_FRDM-K64F\nunzip ~/Downloads/SDK_\u003cversion\u003e_FRDM-K64F.zip -d \u003cSDK Install Dir\u003e/SDK_\u003cversion\u003e_FRDM-K64F\n```\n\nInstall [pyOCD](https://github.com/pyocd/pyOCD) - tool used to flash FRDM_K64F.\n\n### VxWorks Specifics\n\nInstall VxWorks version later than 24.03 (including).\n\n## Building and Flashing\n\n### Zephyr on FRDM K64F\n\n```\ncmake -GNinja -DRTOS=zephyr -DBOARD=frdm_k64f -S . -B build\nninja -C build\nninja -C build flash\n```\n\n#### Zephyr on other boards\n\nSimilar steps apply to when building for a different board. In the `cmake`\ncommand, specify the name of the board after `-DBOARD`. For example ...\n\n```\ncmake -GNinja -DRTOS=zephyr -DBOARD=qemu_x86 -S . -B build\n```\n\nRemember that the `ZEPHYR_BASE` environment variable must be set so that the\nZephyr `west` tool can be found.\n\n### FreeRTOS on FRDM K64F\n\n```\ncmake -GNinja -DRTOS=freertos -DBOARD=frdm_k64f -DMCUX_SDK_PATH=\u003cSDK Install Dir\u003e/SDK_\u003cversion\u003e_FRDM-K64F -S . -B build\nninja -C build\nninja -C build flash\n```\n\n### VxWorks\n\nVxWorks supports to run rtos-benchmark for either POSIX interfaces,\nor non-POSIX interfaces at user space on difference boards.\nFor example with the BSP `nxp_s32g274`:\n\n#### Create and build VSB\n\n```\nvxprj vsb create -force -S -smp -lp64 -bsp nxp_s32g274 vsb_nxp_s32g274\ncd vsb_nxp_s32g274\nvxprj vsb config -s -add _WRS_CONFIG_BENCHMARKS=y -add _WRS_CONFIG_BENCHMARKS_RTOS_BENCHMARK=y\nmake\n```\n\n#### Create and build VIP\n\nThe followings are the steps for POSIX interfaces. To test non-POSIX interfaces,\njust replace `INCLUDE_RTOS_BENCHMARK_POSIX` with `INCLUDE_RTOS_BENCHMARK_NONPOSIX`,\nand replace `rtos_benchmark_posix.vxe` with `rtos_benchmark_non_posix.vxe`.\n\n```\nvxprj create -vsb \u003c/path/to/vsb_nxp_s32g274\u003e vip_nxp_s32g274\ncd vip_nxp_s32g274\nvxprj component add INCLUDE_RTOS_BENCHMARK_POSIX\nmkdir romfs\ncp \u003c/path/to/vsb_nxp_s32g274/usr/root/llvm/bin/rtos_benchmark_posix.vxe\u003e romfs/\nvxprj parameter set RTOS_BENCHMARK_OPTIONS 1\nvxprj parameter set HIGH_RES_POSIX_CLOCK TRUE (Needed when POSIX clock is used for timestamping)\nvxprj component remove INCLUDE_NETWORK\nvxprj build\n```\n\nLoad the image on the target, rtos-benchmark will automatically run on bootup.\n\n## Connecting\n\nConnect the `frdm_k64f` to your host via USB. In another terminal, open\na serial terminal (such as screen, minicom, etc) to see the output:\n\n```\nminicom -D /dev/ttyACM0\n```\n\n## Debugging\n\nDebugging on both Zephyr and FreeRTOS are quite similar.\n\n```\ncmake \u003cRTOS Debug Options\u003e\nninja -C build debugserver\n```\n\nIn another terminal, start GDB:\n\n```\n$ARMGCC_DIR/bin/arm-none-eabi-gdb build/freertos.elf\n(gdb) target remote :3333\n```\n\n### cmake Zephyr Debug Options\n\nNothing extra--just the standard `cmake` instruction.\n\n```\ncmake -GNinja -DRTOS=zephyr -DBOARD=frdm_k64f -S . -B build\n```\n\n### cmake FreeRTOS Debug Options\n\nAdd `-DCMAKE_BUILD_TYPE=debug` to the build options:\n\n```\ncmake -GNinja -DCMAKE_BUILD_TYPE=debug -DRTOS=freertos -DBOARD=frdm_k64f -DMCUX_SDK_PATH=SDK_\u003cversion\u003e_FRDM-K64F -S . -B build\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzephyrproject-rtos%2Frtos-benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzephyrproject-rtos%2Frtos-benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzephyrproject-rtos%2Frtos-benchmark/lists"}