feat(app): 1.6.39 —— 1.6.29 起未上板业务改动入库,启动链与已提交基线对齐

主体为工作区累积的业务改动(CAN/PDO/桥/SSC/task_manager 等,详目见
config.h 版本注释链),新增 CoE 0x100A 真版本上报与 0x2502 APP→BOOT
总线交接。启动链(startup/SystemInit/initial/systick/hardfault)与
HEAD 逐字节一致;1.6.35~38 的跳转诊断实验(3M 化/BKP 面包屑/
haltWithWatchdog)未提交、已整体回退,补丁存 _revert_backup_20260916/。
真机实测(配对 BOOT 1.1.0.18):刷写 warm jump 与 reset cold jump 均可。
This commit is contained in:
cbb
2026-09-16 00:48:34 +08:00
parent 6136c2363f
commit 7d9d9c70a1
17 changed files with 399 additions and 95 deletions
+11 -9
View File
@@ -40,13 +40,15 @@ void TaskManager::init()
* @param[in] taskMask 待置位的任务位图掩码。
* @param[out] 无。
* @retval 无返回值。
* @note 该操作不清除其他已存在的任务位。
* @note 该操作不清除其他已存在的任务位;通过 __LDREXW/__STREXW 独占访问循环实现无锁原子置位。
*/
void TaskManager::set(uint32_t taskMask)
{
uint32_t save = RT_CRITICAL_SAVE();
g_scheduler.task_flags |= taskMask;
RT_CRITICAL_RESTORE(save);
uint32_t val;
do {
val = __LDREXW(&g_scheduler.task_flags);
} while (__STREXW(val | taskMask, &g_scheduler.task_flags) != 0U);
__DMB();
}
/**
@@ -54,15 +56,15 @@ void TaskManager::set(uint32_t taskMask)
* @param[in] 无。
* @param[out] 无。
* @retval uint32_t 返回当前待执行任务位图。
* @note 内部通过关中断实现对 `task_flags` 的原子交换。
* @note 通过 __LDREXW/__STREXW 独占访问循环实现对 `task_flags` 的原子读取与清零,彻底避免被 Preempt 0 ISR 抢占丢失标志。
*/
uint32_t TaskManager::takePending()
{
uint32_t pending;
uint32_t save = RT_CRITICAL_SAVE();
pending = g_scheduler.task_flags;
g_scheduler.task_flags &= ~pending;
RT_CRITICAL_RESTORE(save);
do {
pending = __LDREXW(&g_scheduler.task_flags);
} while (__STREXW(0U, &g_scheduler.task_flags) != 0U);
__DMB();
return pending;
}