Hello,
I am recently using uVision 5(with legacy device database[no RTE] installed) to test RTX-RTOS on my ADuC7024 MCU. However, the test project can compile correctly but it always gets stuck at the "os_sys_init" function during debugging. I suspect there is something wrong with my configuration files but I cannot find any clue. Can some expert help? Thanks in advance!
There are only 3 user files in this test project: ADuC702x.s, RTX_Config.c, and main.c. And I have already selected RTX Kernel in the Target Options window.
I got the startup file ADuC702x.s after I created this test project. The SWI_Handler function configuration portion is:
; Exception Vectors ; Mapped to Address 0. ; Absolute addressing mode must be used. ; Dummy Handlers are implemented as infinite loops which can be modified. Vectors LDR PC, Reset_Addr LDR PC, Undef_Addr LDR PC, SWI_Addr LDR PC, PAbt_Addr LDR PC, DAbt_Addr NOP ; Reserved Vector LDR PC, IRQ_Addr LDR PC, FIQ_Addr EXTERN Undef_Handler EXTERN SWI_Handler EXTERN PAbt_Handler EXTERN DAbt_Handler EXTERN IRQ_Handler EXTERN FIQ_Handler Reset_Addr DCD Reset_Handler Undef_Addr DCD Undef_Handler SWI_Addr DCD SWI_Handler PAbt_Addr DCD PAbt_Handler DAbt_Addr DCD DAbt_Handler DCD 0 ; Reserved Address IRQ_Addr DCD IRQ_Handler FIQ_Addr DCD FIQ_Handler ; Reset Handler EXPORT Reset_Handler Reset_Handler ; Setup PLL IF PLL_SETUP <> 0 LDR R0, =MMR_BASE MOV R1, #0x01 STR R1, [R0,#POWKEY1_OFFSET]
The RTX-Config.c file was re-named version of "C:\Keil_v5\ARM\RL\RTX\Config\RTX_Conf_ADuC702x.c". I just have to omit it here since it will make this message too long.
And the main.c file is very simple:
__task void test_task(void){ uint32_t i = 0; while(1){ i++; os_dly_wait(100); } } int main(void){ os_sys_init(test_task); while(1); } __irq void DAbt_Handler(){ while(1); } __irq void FIQ_Handler(){ while(1); } __irq void PAbt_Handler(){ while(1); } __irq void Undef_Handler(){ while(1); }