简体   繁体   中英

using txm_module_manager_memory_load to load Module in ThreadX

I am trying to load 2 modules differently:
Module_1 using txm_module_manager_memory_load
Module_2 using txm_module_manager_in_place_load

Results: Just after loading them and starting Module_1, it throws a UsageFault error (Module 2 didn't start yet), both modules share the same byte_pool created from txm_module_manager_initialize .
I could not catch the error since all APIs return TX_SUCCESS

Referring to the x-cube-azrtos-h7 TX-MPU example, what would change to app_threadX to load Module_1 properly?
Or is it about something to specify in link file STM32H7xx_FLASH.ld?

ThreadX will allocate some memory from the byte pool created in txm_module_manager_initialize and copy Module_1 from wherever it is located into that allocated memory. I assume txm_module_manager_memory_load returns TX_SUCCESS, as does txm_module_manager_start when you start Module_1. Can you step through the scheduler and when it schedules a thread from Module_1 (the first thread it will schedule is the "Module Start Thread" that gets created in txm_module_manager_start ), how far into the module execution does the usage fault occur?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM