Benchmarks
All figures below are measured on real hardware, with the same benchmark suite, across every listed toolchain/RTOS combination. Compiler options are the highest optimization level, optimized for time (GCC at -O3, Keil/IAR at their highest settings).
- Cortex-M0+ is evaluated on an STM32G071RBT6.
- Cortex-M4 is evaluated on an STM32F429ZIT6.
- Cortex-M7 is evaluated on an STM32H743ZIT6.
- RV32IMAC (RISC-V) is evaluated on a CH32V307VCT6.
Flash and SRAM are guest image footprints in KiB (code + data / data + bss); all other columns are CPU clock cycles. These are typical values exercising the full system benchmark — minimum sizes seldom mean anything in practice.
Commemorative ports
Single-combination memorial ports: Cortex-M7 + GCC + STM32H743ZIT6.
| Machine | Toolchain | RTOS | Flash (KiB) | SRAM (KiB) | Yield | Sem | Mail/I | Sem/I | Mem | |
|---|---|---|---|---|---|---|---|---|---|---|
| Cortex-M7 | GCC | DjyOS | 27.49 | 63.38 | 1017 | 1488 | 892 | 1873 | 1220 | 288 |
| Cortex-M7 | GCC | KLite | 11.65 | 20.27 | 291 | 1402 | 379 | 1964 | 996 | 2751 |
Practical ports
Cortex-M0+ — STM32G071RBT6
| Toolchain | RTOS | Flash (KiB) | SRAM (KiB) | Yield | Sem | Mail/I | Sem/I | Mem | |
|---|---|---|---|---|---|---|---|---|---|
| Keil uVision 5 | RMP | 16.71 | 3.88 | 465 | 783 | 681 | 1677 | 1572 | N/A |
| ... | FreeRTOS | 12.74 | 9.57 | 433 | 949 | 1023 | 1789 | 1808 | 843 |
| ... | uC/OS-II | 11.86 | 6.73 | N/A | 1062 | 1039 | 3800 | 1484 | 2638 |
| ... | uC/OS-III | 13.63 | 8.09 | 863 | 1117 | 1143 | 2125 | 2156 | 363 |
| ... | RT-Thread | 18.69 | 8.27 | 950 | 1581 | 1317 | 2760 | 2464 | 13221 |
| IAR EWARM | RMP | 12.38 | 3.88 | 511 | 876 | 770 | 1764 | 1642 | N/A |
| ... | FreeRTOS | 11.29 | 9.57 | 432 | 944 | 1078 | 1804 | 1859 | 944 |
| ... | uC/OS-II | 10.62 | 6.73 | N/A | 1089 | 1067 | 4899 | 1072 | 2737 |
| ... | uC/OS-III | 11.89 | 8.08 | 892 | 1154 | 1187 | 2161 | 2189 | 360 |
| ... | RT-Thread | 13.15 | 8.26 | 1031 | 1680 | 1415 | 2859 | 2589 | 13861 |
| GCC | RMP | 22.72 | 2.88 | 507 | 883 | 773 | 1746 | 1680 | N/A |
| ... | FreeRTOS | 15.38 | 8.57 | 455 | 986 | 1108 | 1859 | 1926 | 1012 |
| ... | uC/OS-II | 13.08 | 5.75 | N/A | 1111 | 1090 | 1526 | 1097 | 2876 |
| ... | uC/OS-III | 15.38 | 7.09 | 871 | 1144 | 1185 | 2188 | 2246 | 396 |
| ... | RT-Thread | 18.57 | 7.27 | 1080 | 1755 | 1450 | 3042 | 2694 | 14899 |
Cortex-M4 — STM32F429ZIT6
| Toolchain | RTOS | Flash (KiB) | SRAM (KiB) | Yield | Sem | Mail/I | Sem/I | Mem | |
|---|---|---|---|---|---|---|---|---|---|
| Keil uVision 5 | RMP | 22.72 | 37.06 | 336 | 519 | 452 | 1278 | 1176 | 391 |
| ... | FreeRTOS | 14.73 | 41.57 | 308 | 612 | 776 | 1394 | 1428 | 527 |
| ... | uC/OS-II | 13.09 | 7.73 | N/A | 671 | 647 | 2303 | 773 | 1425 |
| ... | uC/OS-III | 15.50 | 9.09 | 504 | 691 | 713 | 1570 | 1588 | 196 |
| ... | RT-Thread | 20.34 | 8.27 | 532 | 1036 | 824 | 1948 | 1743 | 7307 |
| IAR EWARM | RMP | 14.29 | 36.07 | 376 | 602 | 551 | 1512 | 1438 | 403 |
| ... | FreeRTOS | 11.48 | 40.57 | 316 | 648 | 833 | 1592 | 1667 | 549 |
| ... | uC/OS-II | 10.75 | 6.73 | N/A | 708 | 696 | 2483 | 824 | 1521 |
| ... | uC/OS-III | 11.65 | 8.08 | 601 | 809 | 829 | 1852 | 1868 | 207 |
| ... | RT-Thread | 13.78 | 7.26 | 612 | 1053 | 852 | 2231 | 2020 | 7646 |
| GCC | RMP | 24.20 | 36.07 | 416 | 709 | 552 | 1434 | 1344 | 382 |
| ... | FreeRTOS | 15.44 | 40.57 | 372 | 726 | 882 | 1544 | 1611 | 724 |
| ... | uC/OS-II | 12.48 | 6.75 | N/A | 729 | 693 | 2629 | 849 | 1597 |
| ... | uC/OS-III | 14.67 | 8.09 | 580 | 812 | 849 | 1759 | 1820 | 227 |
| ... | RT-Thread | 17.63 | 7.27 | 648 | 1173 | 893 | 2236 | 1975 | 7764 |
Cortex-M7 — STM32H743ZIT6
| Toolchain | RTOS | Flash (KiB) | SRAM (KiB) | Yield | Sem | Mail/I | Sem/I | Mem | |
|---|---|---|---|---|---|---|---|---|---|
| Keil uVision 5 | RMP | 22.73 | 37.06 | 244 | 384 | 370 | 920 | 811 | 284 |
| ... | FreeRTOS | 15.06 | 41.57 | 229 | 494 | 595 | 954 | 987 | 347 |
| ... | uC/OS-II | 13.35 | 7.73 | N/A | 436 | 445 | 1503 | 584 | 849 |
| ... | uC/OS-III | 15.75 | 9.09 | 410 | 590 | 594 | 1227 | 1252 | 141 |
| ... | RT-Thread | 20.52 | 8.28 | 457 | 798 | 651 | 1537 | 1391 | 5197 |
| IAR EWARM | RMP | 14.37 | 36.07 | 272 | 459 | 412 | 1030 | 985 | 284 |
| ... | FreeRTOS | 11.50 | 40.57 | 220 | 526 | 609 | 1122 | 1109 | 363 |
| ... | uC/OS-II | 10.83 | 6.73 | N/A | 541 | 512 | 1674 | 654 | 938 |
| ... | uC/OS-III | 11.70 | 8.08 | 411 | 592 | 620 | 1282 | 1313 | 151 |
| ... | RT-Thread | 13.85 | 7.26 | 424 | 829 | 675 | 1585 | 1441 | 5710 |
| GCC | RMP | 24.29 | 36.07 | 248 | 476 | 414 | 886 | 939 | 283 |
| ... | FreeRTOS | 15.29 | 40.57 | 225 | 511 | 596 | 1020 | 1036 | 354 |
| ... | uC/OS-II | 12.49 | 6.75 | N/A | 489 | 468 | 1544 | 569 | 909 |
| ... | uC/OS-III | 14.66 | 8.09 | 404 | 561 | 578 | 1216 | 1291 | 150 |
| ... | RT-Thread | 17.75 | 7.27 | 465 | 819 | 674 | 1570 | 1435 | 6402 |
RV32IMAC (RISC-V) — CH32V307VCT6
| Toolchain | RTOS | Flash (KiB) | SRAM (KiB) | Yield | Sem | Mail/I | Sem/I | Mem | |
|---|---|---|---|---|---|---|---|---|---|
| GCC | RMP | 29.61 | 25.29 | 322 | 499 | 437 | 1719 | 1652 | 360 |
| ... | FreeRTOS | 17.55 | 24.77 | 319 | 580 | 630 | 1778 | 1827 | 440 |
| ... | uC/OS-II | 16.28 | 6.75 | N/A | 571 | 559 | 2591 | 570 | 1337 |
| ... | uC/OS-III | 16.72 | 8.09 | 478 | 606 | 611 | 2050 | 2079 | 182 |
| ... | RT-Thread | 19.45 | 9.77 | 533 | 846 | 701 | 2429 | 2280 | 6003 |
Metric definitions
| Metric | Meaning |
|---|---|
| Yield | Time to yield between different threads |
| Mailbox communication time between two threads | |
| Sem | Semaphore communication time between two threads |
| Mail/I | Time to send to a mailbox from an interrupt |
| Sem/I | Time to post to a semaphore from an interrupt |
| Mem | Time for a memory operation, e.g. allocation/free |
YieldisN/Afor uC/OS-II: with one task per priority, a yield between equal-priority threads is not a meaningful measurement.MemisN/Afor RMP guests: RMP exercises its own memory subsystem outside this benchmark.- Context switch and interrupt response for a virtualized FreeRTOS are about 4x the bare-metal original, and still roughly 25x faster than RT-Linux — see Why Virtualization.
