硬汉嵌入式论坛

 找回密码
 立即注册
查看: 858|回复: 0
收起左侧

[Lua] H7-TOOL的LUA操作Cache条件编译方法,实测好用(2022-12-24)

[复制链接]

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
106757
QQ
发表于 2022-12-24 00:40:19 | 显示全部楼层 |阅读模式


通过下面方法操作即可,用于RTOS Trace功能实测,好用

[C] 纯文本查看 复制代码
if (EnableCacheClean == 1) then  -- 条件设置,根据条件选择执行的函数
  function CacheClean(addr)
    --0xE000ED00
    --__OM  uint32_t ICIMVAU;                /*!< Offset: 0x258 ( /W)  I-Cache Invalidate by MVA to PoU */
    --__OM  uint32_t DCIMVAC;                /*!< Offset: 0x25C ( /W)  D-Cache Invalidate by MVA to PoC */
   -- __OM  uint32_t DCISW;                  /*!< Offset: 0x260 ( /W)  D-Cache Invalidate by Set-way */
   -- __OM  uint32_t DCCMVAU;                /*!< Offset: 0x264 ( /W)  D-Cache Clean by MVA to PoU */
   -- __OM  uint32_t DCCMVAC;                /*!< Offset: 0x268 ( /W)  D-Cache Clean by MVA to PoC */
   -- __OM  uint32_t DCCSW;                  /*!< Offset: 0x26C ( /W)  D-Cache Clean by Set-way */
    --__OM  uint32_t DCCIMVAC;               /*!< Offset: 0x270 ( /W)  D-Cache Clean and Invalidate by MVA to PoC */
   --__OM  uint32_t DCCISW;                 /*!< Offset: 0x274 ( /W)  D-Cache Clean and Invalidate by Set-way */
    
   pg_write32(0xE000EF68, addr)
  end
else
  function CacheClean() end
end

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|Archiver|手机版|硬汉嵌入式论坛

GMT+8, 2024-5-4 21:08 , Processed in 0.252252 second(s), 25 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表