硬件采用Nordic 官方5340DK板(m33核),gcc编译器
libcpu\arm\cortex-m33下面的context_gcc.S 和 cpuport.c会被编译进来,然后烧写进DK板后,
启动时发现在rtthread_startup中执行rt_hw_context_switch_to 后进入了context_gcc.S中的HardFault_Handler。
继续调试发现
如果使用libcpu\arm\cortex-m4\context_gcc.S 中的 PendSV_Handler
替换cortex-m33\context_gcc.S中的PendSV_Handler,
同时使用libcpu\arm\cortex-m4\cpuport.c的rt_hw_stack_init
替换cortex-m33\context_gcc.S中的rt_hw_stack_init,
startup正常了application thread可以正常跑。
我比较了PendSV_Handler 和 rt_hw_stack_init的 m4 和 m33 版本,m33版上两个函数都被改写了加了truezone的一些东西,看不懂。请大神指教。
举报
更多回帖