optimize dcache prefech and aic_build.py

This commit is contained in:
刘可亮
2023-11-14 15:35:32 +08:00
parent aaa66c7b20
commit 07d3226dd2
3 changed files with 5 additions and 5 deletions

View File

@@ -1051,11 +1051,11 @@ __STATIC_INLINE void csi_dcache_enable (void)
__DCACHE_IALL(); /* invalidate all dcache */
cache |= (CACHE_MHCR_DE_Msk | CACHE_MHCR_WB_Msk | CACHE_MHCR_WA_Msk | CACHE_MHCR_RS_Msk | CACHE_MHCR_BPE_Msk | CACHE_MHCR_L0BTB_Msk); /* enable all Cache */
__set_MHCR(cache);
mhint = __get_MHINT();
mhint &= ~(MHINT_DPLD_Msk | MHINT_AMR_Msk | MHINT_PREF_N_Msk);
mhint |= (1<<MHINT_DPLD_Pos) | (1<<MHINT_AMR_Pos) | (3<<MHINT_PREF_N_Pos);
__set_MHINT(mhint);
}
mhint = __get_MHINT();
mhint &= ~(MHINT_DPLD_Msk | MHINT_AMR_Msk | MHINT_PREF_N_Msk);
mhint |= (1<<MHINT_AMR_Pos);
__set_MHINT(mhint);
__DSB();
__ISB();
#endif

Binary file not shown.

View File

@@ -894,7 +894,7 @@ def mkimage_prebuild(aic_root, prj_chip, prj_board, prj_kernel, prj_app, prj_def
eclipse_sdk_post_build = eclipse_sdk_post_build.replace(prj_out_dir_n, '${ProjDirPath}/Debug')
eclipse_sdk_post_build = eclipse_sdk_post_build.replace(aic_root, '${ProjDirPath}')
eclipse_sdk_post_build = eclipse_sdk_post_build.replace(aic_root_n, '${ProjDirPath}')
eclipse_post_build = eclipse_post_build.replace('$TARGET', '${ProjDirPath}/Debug/${ProjName}.elf')
eclipse_sdk_post_build = eclipse_sdk_post_build.replace('$TARGET', '${ProjDirPath}/Debug/${ProjName}.elf')
eclipse_sdk_post_build = eclipse_sdk_post_build.replace('\\', '/')
post_objcopy = "${cross_prefix}${cross_objcopy}${cross_suffix} -O binary ${ProjName}.elf ${ProjName}.bin;"