FreeRTOS内核升级了,但似乎好像也没升级什么......

strongerHuang 2026-10-19 19:46

关注+星标公众号,不错过精彩内容

作者 | strongerHuang

公众号 | strongerHuang


上个月把公司一个老项目中FreeRTOS从之前的V10.x版本升级到了V11.3.1版本,今天发现官方把内核升级到了V11.3.2版本。

https://github.com/FreeRTOS/FreeRTOS-Kernel/releases/tag/V11.3.2

FreeRTOS内核升级了,但似乎好像也没升级什么......图1

但从描述来看,似乎看不出来升级了什么......


于是,我下载了最新的内核源码V11.3.2,并和上一个版本(V11.3.1)进行了对比,发现内核其实没改变:

FreeRTOS内核升级了,但似乎好像也没升级什么......图2
FreeRTOS内核升级了,但似乎好像也没升级什么......图3

task、queue、timers、FreeRTOS......等这些内核的源码都没变化。有变化的内容主要是 portable 这个与硬件(CPU架构、编译器)相关的移植层文件夹。


然后,看了下官方的History.txt描述:

Changes between FreeRTOS V11.3.1 and FreeRTOS V11.3.2 released October 16, 2026
    + Add the ability for a port to selectively override the      PRIVILEGED_FUNCTION, PRIVILEGED_DATA and FREERTOS_SYSTEM_CALL macros when      the MPU wrappers are not in use. This allows kernel functions and data to      be placed in port specific link time sections, such as cache coherent      memory on SMP systems, without enabling the full MPU wrappers. We thank      @ianstcdns for their contribution.    + Add an implementation of os_wrapper_is_kernel_started, which is new in      TF-M 2.3.0, to the ARM_TFM port. A suspended scheduler is reported as      started because the kernel has already been initialized. The      implementation is guarded by the same configuration condition as      xTaskGetSchedulerState so that configurations without that API continue      to build. We thank @ithinuel for their contribution.    + Update xPortIsAuthorizedToAccessBuffer to take the buffer length as a      size_t instead of a uint32_t so that it uses the natural word size of the      architecture, which enables 64-bit systems. Ports maintained outside of      this repository that implement this function need to update their      function signature to match. We thank Claude and Ada Logics for their      help identifying this issue.    + Update the ARMv7-M MPU ports to lower the SVCall preemption priority from      zero, the highest priority, to one just above      configMAX_SYSCALL_INTERRUPT_PRIORITY, which restores the priority used      before the ports were updated to raise SVCall to the highest priority. We      thank @jefftenney for their contribution.    + Update the Partner-Supported-Ports submodule.    + Fix the MAX_CONTEXT_SIZE calculation in the ARMv8-M ports to account for      the task PAC key as 4 words rather than 16, because the key is 16 bytes      long and MAX_CONTEXT_SIZE counts words. This reduces the amount of      context memory reserved per task when configENABLE_PAC is 1. We thank      @ithinuel for their contribution.    + Fix portEXTRACT_LAST_ADDRESS_FROM_PRLAR_EL1 in the ARM_CR82 port to set      only the address bits that PRLAR_EL1 implies, rather than every bit      outside of the address mask, which corrupted the upper bits of the region      end address used in MPU access checks. We thank Claude and Ada Logics for      their help identifying this issue.    + Fix the IAR TrustZone non-secure ports for ARM_CM33, ARM_CM35P, ARM_CM52,      ARM_CM55, ARM_CM85 and ARM_STAR_MC3 by removing a stray installer URL      that was left outside of a comment. The assembler parsed the URL as an      operand of the preceding instruction, which failed the build of every      configuration of these ports. We thank @sekior11 for their contribution.
网页翻译过来,大概意思:
2026年10月16日,发布的FreeRTOS V11.3.2,相对于FreeRTOS V11.3.1之间的变更
+ 新增功能:当不使用MPU封装器时,移植层可选择性重写PRIVILEGED_FUNCTION、PRIVILEGED_DATA以及FREERTOS_SYSTEM_CALL宏。该特性允许将内核函数与数据放置在移植层专属的链接段中,例如SMP系统上的缓存一致性内存,无需启用完整MPU封装器。感谢@ianstcdns的贡献。+ 在ARM_TFM移植包中新增TF-M 2.3.0引入的os_wrapper_is_kernel_started实现。调度器处于挂起状态时仍会返回已启动,因为内核已经完成初始化。该实现与xTaskGetSchedulerState使用相同的配置条件做保护,保证未启用该API的配置方案仍可正常编译。感谢@ithinuel的贡献。+ 修改xPortIsAuthorizedToAccessBuffer,将缓冲区长度参数类型从uint32_t改为size_t,使其采用架构原生字长,从而支持64位系统。代码仓库外维护的、实现了该函数的移植包,需要同步更新函数签名以保持兼容。感谢Claude与Ada Logics协助发现该问题。+ 更新ARMv7-M MPU移植包,将SVCall抢占优先级从最高优先级0调整为1,略高于configMAX_SYSCALL_INTERRUPT_PRIORITY,恢复到将SVCall提升至最高优先级之前使用的优先级设置。感谢@jefftenney的贡献。+ 更新合作伙伴支持的移植包子模块。+ 修复ARMv8-M移植包中MAX_CONTEXT_SIZE的计算逻辑:任务PAC密钥按4个字而非16个字计算。该密钥长度为16字节,而MAX_CONTEXT_SIZE以字为单位统计。当configENABLE_PAC置1时,此项修改可减少每个任务预留的上下文内存。感谢@ithinuel的贡献。+ 修复ARM_CR82移植包中的portEXTRACT_LAST_ADDRESS_FROM_PRLAR_EL1,仅设置PRLAR_EL1对应的地址位,不再修改地址掩码以外的所有位。此前该问题会破坏MPU访问检查所用区域结束地址的高位。感谢Claude与Ada Logics协助发现该问题。+ 修复ARM_CM33、ARM_CM35P、ARM_CM52、ARM_CM55、ARM_CM85以及ARM_STAR_MC3对应的IAR TrustZone非安全端移植包:移除一段遗留在注释外的无效安装链接。汇编器会将该URL识别为前一条指令的操作数,导致这些移植包的所有配置方案编译失败。感谢@sekior11的贡
比如:修改目录portable\ARMv8M\non_secure下port.c文件中xPortIsAuthorizedToAccessBuffer这个API。
将缓冲区长度参数类型从uint32_t改为size_t,使其采用架构原生字长,从而支持64位系统。代码仓库外维护的、实现了该函数的移植包,需要同步更新函数签名以保持兼容。
FreeRTOS内核升级了,但似乎好像也没升级什么......图4

所以,这个版本,如果不牵涉到 portable 这个与硬件(CPU架构、编译器)相关的移植层,大家没必要升级。

------------ END ------------


关于科技区角:国内科技展会垂直内容策划服务商,提供从论坛内容全案策划、会展市场化IP打造到精准专业观众一站式邀约服务,以产业内容吸引高质量B端人群,打通展会从议题设计、演讲嘉宾邀约、宣传预热、精准邀观到供需对接全链路。
声明:内容取材于网络,仅代表作者观点,如有内容违规问题,请联系处理。
more
诺奖得主给年轻人的AI生存指南:AI时代,好问题的价值正在超过好能力
OpenAI“极光”模型乌龙:API撤回后,Arena竟成图像生成试验田
AI实验室付费录制技工作业,HUMXN开启真实世界数据采集新范式
火山引擎推出Seedance激励计划,AI漫剧最高获20万奖励
AI制药跑通商业化,缺的不是算法,是“底盘”
西安女子AI伪造录音拒退多收游戏款,被法院当庭训诫
中国 AI 的年轻掌权者们
花几秒钟跟 AI 抬个杠,是我最近最爽的清醒运动。
AI 引爆 BAT「薪酬倒挂」潮,老员工:人麻了
腾讯研究院AI速递 20261020
Copyright © 2025-成都区角科技有限公司
蜀ICP备2025143415号-1
  
川公网安备51015602001305号