|

楼主 |
发表于 2021-7-15 10:39:28
|
显示全部楼层
本帖最后由 feelingcode 于 2021-7-15 10:56 编辑
对于cache的坑,工程上需要增加红色部分代码。
void module_manager_entry(ULONG thread_input)
{
/* Initialize the module manager. */
txm_module_manager_initialize((VOID *) module_ram, 32768);
txm_module_manager_object_pool_create(object_memory, sizeof(object_memory));
/* Register a fault handler. */
txm_module_manager_memory_fault_notify(module_fault_handler);
/* Load the module that is already there, in this example it is placed there by the multiple image download. */
txm_module_manager_memory_load(&my_module, "my module", (VOID *) 0x08100000);
/* Enable 128 byte read/write shared memory region at 0x20010000. */
txm_module_manager_external_memory_enable(&my_module, (void *) 0x20010000, 128, TXM_MODULE_MANAGER_SHARED_ATTRIBUTE_WRITE);
SCB_CleanInvalidateDCache_by_Addr((uint32_t*)object_memory,16384);
SCB_CleanInvalidateDCache_by_Addr((uint32_t*)module_ram,32768);
SCB_InvalidateICache_by_Addr((uint32_t*)module_ram,32768);
/* Start the module. */
txm_module_manager_start(&my_module);
/* Now just spin... */
while(1)
{
printf("module manager run...\r\n");
printf("my app module run count %ld\r\n",*(ULONG *)0x20010000);
tx_thread_sleep(1000);
}
} |
|