请问高手VXWORKS中怎么打开cache?看了一下代码和别人介绍,好象是这样的
1、SYS_HW_INIT_0,最好放在最前面,里面应该包含cacheArm920tLibInstall和mmuArm920tLibInstall
2、cacheLibInit
3、cacheEnable
4、usrMmuInit
但是不知道第一步是不是一定需要,而且SYS_HW_INIT_0在哪里定义,主要做什么工作?
请大家指点指点
/*******************************************************************************
*
* sysHwInit0 - perform early BSP-specific initialisation
*
* This routine performs such BSP-specific initialisation as is necessary before
* the architecture-independent cacheLibInit can be called. It is called
* from usrInit() before cacheLibInit(), before sysHwInit() and before BSS
* has been cleared.
*
* RETURNS: N/A
*/
void sysHwInit0 (void)
{
#ifdef INCLUDE_CACHE_SUPPORT
/*
* Install the appropriate cache library, no address translation
* routines are required for this BSP, as the default memory map has
* virtual and physical addresses the same.
*/
cacheArm920tLibInstall (NULL, NULL);
#endif /* INCLUDE_CACHE_SUPPORT */
#ifdef INCLUDE_MMU_BASIC
/* Install the appropriate MMU library and translation routines */
mmuArm920tLibInstall (NULL, NULL);
#endif /* defined(INCLUDE_MMU) */
return;
}
| 有奖活动 | |
|---|---|
| 这个春节你犒赏自己什么了?分享你的故事,有奖征集 | |
| 2026年“我要开发板活动”第三季,开始了! | |
| 硬核工程师专属补给计划——填盲盒 | |
| “我踩过的那些坑”主题活动——第002期 | |
| 【EEPW电子工程师创研计划】技术变现通道已开启~ | |
| 发原创文章 【每月瓜分千元赏金 凭实力攒钱买好礼~】 | |
| 【EEPW在线】E起听工程师的声音! | |
| 高校联络员开始招募啦!有惊喜!! | |
我要赚赏金打赏帖 |
|
|---|---|
| OK1126B-S开发板下函数构建及步进电机驱动控制被打赏¥25元 | |
| 【S32K3XX】LPI2C 参数配置说明被打赏¥20元 | |
| OK1126B-S开发板的脚本编程及应用设计被打赏¥27元 | |
| 5v升压8.4v两节锂电池充电芯片,针对同步和异步的IC测试被打赏¥35元 | |
| 【S32K3XX】S32DS LPI2C 配置失败问题解决被打赏¥22元 | |
| 【S32K3XX】FLASH 的 DID 保护机制被打赏¥19元 | |
| OK1126B-S开发板串口通信及其使用被打赏¥18元 | |
| 【S32K3XX】多核 CORE ID 获取被打赏¥18元 | |
| OK1126B-S开发板的GPIO资源及其使用被打赏¥20元 | |
| 【分享开发笔记,赚取电动螺丝刀】三分钟快速上手驱动屏幕(Arduino IDE环境)被打赏¥23元 | |