Hi, I have a problem with my STR9 when I try to use USB library (VirtualCOM) and RTX at the same time. I'm starting from 2 projects running well: the first one uses RTX (Blinky_RTX is a Keil example) and the second one opens a VirtualCOM. The problem occurs when i try to merge them: if I add the RTX on the VirtualCOM project, the micro does not start the operative system. I think the problem is in the sturt-up code but I don't know how to resolve it... Can someone help me??
Thanks in advance
VectorAddress EQU 0xFFFFF030 EXPORT Vectors IMPORT Reset_Handler IMPORT Undefined_Handler IMPORT SWI_Handler IMPORT Prefetch_Handler IMPORT Abort_Handler IMPORT FIQ_Handler RESERVE8 AREA Reset, CODE, READONLY ARM Vectors LDR PC, Reset_Addr LDR PC, Undefined_Addr LDR PC, SWI_Addr LDR PC, Prefetch_Addr LDR PC, Abort_Addr NOP LDR PC, IRQ_Addr FIQHandler SUB lr,lr,#4 STMFD sp!,{r0-r3,lr} ldr r0,=FIQ_Handler ldr lr,=FIQ_Handler_end bx r0 FIQ_Handler_end LDMFD sp!,{r0-r3,pc}^ ;******************************************************************************* ; Exception handlers address table ;******************************************************************************* Reset_Addr DCD Reset_Handler Undefined_Addr DCD UndefinedHandler SWI_Addr DCD SWIHandler Prefetch_Addr DCD PrefetchAbortHandler Abort_Addr DCD DataAbortHandler DCD 0 IRQ_Addr DCD IRQHandler MACRO SaveContext $reg1,$reg2 STMFD sp!,{$reg1-$reg2,lr} MEND MACRO RestoreContext $reg1,$reg2 LDMFD sp!,{$reg1-$reg2,pc}^ MEND ;******************************************************************************* ; Exception Handlers ;******************************************************************************* UndefinedHandler SaveContext r0,r3 ldr r0,=Undefined_Handler ldr lr,=Undefined_Handler_end bx r0 Undefined_Handler_end RestoreContext r0,r3 ;******************************************************************************* ;* Function Name : SWIHandler ;* Description : This function is called when SWI instruction executed. ;* Input : none ;* Output : none ;******************************************************************************* SWIHandler SaveContext r0,r3 ldr r0,=SWI_Handler ldr lr,=SWI_Handler_end bx r0 SWI_Handler_end RestoreContextr0,r3 ;******************************************************************************* ;* Function Name : PrefetchAbortHandler ;* Description : This function is called when Prefetch Abort ; exception is entered. ;* Input : none ;* Output : none ;******************************************************************************* PrefetchAbortHandler SUB lr,lr,#4 SaveContext r0,r3 ldr r0,=Prefetch_Handler ldr lr,=Prefetch_Handler_end bx r0 Prefetch_Handler_end RestoreContext r0,r3 ;******************************************************************************* ;* Function Name : DataAbortHandler ;* Description : This function is called when Data Abort ; exception is entered. ;* Input : none ;* Output : none ;******************************************************************************* DataAbortHandler SUB lr,lr,#8 SaveContext r0,r3 ldr r0,=Abort_Handler ldr lr,=Abort_Handler_end bx r0 Abort_Handler_end RestoreContext r0,r3 ;******************************************************************************* ;* Function Name : IRQHandler ;* Description : This function is called when IRQ exception is entered. ;* Input : none ;* Output : none ;******************************************************************************* IRQHandler SUB lr,lr ,#4 SaveContext r0,r3 LDR r0, = VectorAddress LDR r0, [r0] BLX r0 RestoreContext r0,r3 LTORG END