From 66bae0c9ae2f6f60329b0c782e589aa18993bc95 Mon Sep 17 00:00:00 2001 From: richardbarry Date: Tue, 1 Oct 2013 10:10:15 +0000 Subject: [PATCH] Finalise XMC4000 IAR demos. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2044 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- .../FreeRTOSConfig.h | 13 +- .../settings/RTOSDemo.cspy.bat | 2 +- .../settings/RTOSDemo.dbgdt | 4 +- .../settings/RTOSDemo.dni | 8 +- .../settings/RTOSDemo.wsdt | 12 +- .../system/startup_XMC4200.s | 436 +++++++-------- .../system/startup_XMC4400.s | 503 +++++++++--------- .../system/startup_XMC4500.s | 66 +-- 8 files changed, 530 insertions(+), 514 deletions(-) diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/FreeRTOSConfig.h index ab45d4025..737beba8f 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/FreeRTOSConfig.h @@ -85,6 +85,11 @@ extern uint32_t SystemCoreClock; #endif /* __ICCARM__ */ +/* The following definition allows the startup files that ship with the IDE +to be used without modification when the chip used includes the PMU CM001 +errata. */ +#define WORKAROUND_PMU_CM001 1 + #define configUSE_PREEMPTION 1 #define configUSE_PORT_OPTIMISED_TASK_SELECTION 1 #define configUSE_IDLE_HOOK 0 @@ -158,9 +163,13 @@ header file. */ #define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); } /* Definitions that map the FreeRTOS port interrupt handlers to their CMSIS -standard names. */ +standard names. WORKAROUND_PMU_CM001 is defined at the top of this file. */ +#if WORKAROUND_PMU_CM001 == 1 + #define xPortPendSVHandler PendSV_Handler_Veneer +#else + #define xPortPendSVHandler PendSV_Handler +#endif #define vPortSVCHandler SVC_Handler -#define xPortPendSVHandler PendSV_Handler #define xPortSysTickHandler SysTick_Handler /* Demo application specific settings. */ diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/settings/RTOSDemo.cspy.bat b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/settings/RTOSDemo.cspy.bat index ea1570ddc..24537689f 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/settings/RTOSDemo.cspy.bat +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/settings/RTOSDemo.cspy.bat @@ -19,6 +19,6 @@ @REM -"C:\devtools\IAR Systems\Embedded Workbench 6.5\common\bin\cspybat" "C:\devtools\IAR Systems\Embedded Workbench 6.5\arm\bin\armproc.dll" "C:\devtools\IAR Systems\Embedded Workbench 6.5\arm\bin\armjlink.dll" %1 --plugin "C:\devtools\IAR Systems\Embedded Workbench 6.5\arm\bin\armbat.dll" --macro "C:\devtools\IAR Systems\Embedded Workbench 6.5\arm\config\debugger\Infineon\Trace_XMC4500.dmac" --flash_loader "C:\devtools\IAR Systems\Embedded Workbench 6.5\arm\config\flashloader\Infineon\FlashXMC4400.board" --backend -B "--endian=little" "--cpu=Cortex-M4F" "--fpu=VFPv4" "-p" "C:\devtools\IAR Systems\Embedded Workbench 6.5\arm\CONFIG\debugger\Infineon\xmc4400.ddf" "--drv_verify_download" "--semihosting" "--device=xmc4400" "--drv_communication=USB0" "--jlink_speed=auto" "--jlink_initial_speed=32" "--jlink_reset_strategy=0,0" "--jlink_interface=SWD" "--drv_catch_exceptions=0x000" "--jlink_script_file=C:\devtools\IAR Systems\Embedded Workbench 6.5\arm\config\debugger\Infineon\XMC4500.jlinkscript" "--drv_swo_clock_setup=72000000,0,2000000" +"C:\devtools\IAR Systems\Embedded Workbench 6.5\common\bin\cspybat" "C:\devtools\IAR Systems\Embedded Workbench 6.5\arm\bin\armproc.dll" "C:\devtools\IAR Systems\Embedded Workbench 6.5\arm\bin\armjlink.dll" %1 --plugin "C:\devtools\IAR Systems\Embedded Workbench 6.5\arm\bin\armbat.dll" --macro "C:\devtools\IAR Systems\Embedded Workbench 6.5\arm\config\debugger\Infineon\Trace_XMC4500.dmac" --flash_loader "C:\devtools\IAR Systems\Embedded Workbench 6.5\arm\config\flashloader\Infineon\FlashXMC4500.board" --backend -B "--endian=little" "--cpu=Cortex-M4F" "--fpu=VFPv4" "-p" "C:\devtools\IAR Systems\Embedded Workbench 6.5\arm\CONFIG\debugger\Infineon\xmc4500.ddf" "--drv_verify_download" "--semihosting" "--device=xmc4500" "--drv_communication=USB0" "--jlink_speed=auto" "--jlink_initial_speed=32" "--jlink_reset_strategy=0,0" "--jlink_interface=SWD" "--drv_catch_exceptions=0x000" "--jlink_script_file=C:\devtools\IAR Systems\Embedded Workbench 6.5\arm\config\debugger\Infineon\XMC4500.jlinkscript" "--drv_swo_clock_setup=72000000,0,2000000" diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/settings/RTOSDemo.dbgdt b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/settings/RTOSDemo.dbgdt index c83b2fd02..2c5201687 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/settings/RTOSDemo.dbgdt +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/settings/RTOSDemo.dbgdt @@ -62,14 +62,14 @@ - TextEditor$WS_DIR$\main.c0000099561156110TextEditor$WS_DIR$\main_blinky.c000006000TextEditor$WS_DIR$\main_full.c0000063000100000010000001 + TextEditor$WS_DIR$\main.c000008456115611TextEditor$WS_DIR$\main_blinky.c0000018898339833TextEditor$WS_DIR$\main_full.c000006300TextEditor$WS_DIR$\..\..\Source\portable\IAR\ARM_CM4F\port.c000003481450314503TextEditor$WS_DIR$\..\..\Source\portable\IAR\ARM_CM4F\portasm.s0000010447894789TextEditor$WS_DIR$\system\startup_XMC4400.s000002541485814858TextEditor$WS_DIR$\RegTest.s000001145036503660100000010000001 - iaridepm.enu1debuggergui.enu1armjlink.enu1-2-2692279-2-2200200119048203666167262706721-2-21981682-2-216842001002381203666119048203666 + iaridepm.enu1debuggergui.enu1armjlink.enu1-2-2692279-2-2200200119048203666167262706721-2-21981682-2-216842001002381203666119048203666 diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/settings/RTOSDemo.dni b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/settings/RTOSDemo.dni index 4d678919d..eab10c6d4 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/settings/RTOSDemo.dni +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/settings/RTOSDemo.dni @@ -9,7 +9,7 @@ TriggerName=main LimitSize=0 ByteLimit=50 [DebugChecksum] -Checksum=-1591096957 +Checksum=92877996 [Exceptions] StopOnUncaught=_ 0 StopOnThrow=_ 0 @@ -23,9 +23,9 @@ CStepIntDis=_ 0 OverrideDefaultClocks=0 CpuClock=72000000 ClockAutoDetect=0 -ClockWanted=1000000 -JtagSpeed=1000000 -Prescaler=72 +ClockWanted=2000000 +JtagSpeed=2000000 +Prescaler=36 TimeStampPrescIndex=0 TimeStampPrescData=0 PcSampCYCTAP=1 diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/settings/RTOSDemo.wsdt b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/settings/RTOSDemo.wsdt index e07d116fb..b531a9bd8 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/settings/RTOSDemo.wsdt +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/settings/RTOSDemo.wsdt @@ -3,7 +3,7 @@ - RTOSDemo/XMC4400 + RTOSDemo/XMC4500 @@ -25,7 +25,7 @@ - + TabID-29494-21985 @@ -37,7 +37,7 @@ - 0 + 0 TabID-28344-23030 @@ -47,20 +47,20 @@ TabID-19430-2343Debug LogDebug-Log - 0 + 0 - TextEditor$WS_DIR$\main.c0000060552955290TextEditor$WS_DIR$\main_blinky.c000006000TextEditor$WS_DIR$\main_full.c0000063000100000010000001 + TextEditor$WS_DIR$\main.c00000605611561100100000010000001 - iaridepm.enu1-2-2740389-2-2200200119048203666232738755601-2-21981682-2-216842001002381203666119048203666 + iaridepm.enu1-2-2740389-2-2200200119048203666232738755601-2-21981682-2-216842001002381203666119048203666 diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/system/startup_XMC4200.s b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/system/startup_XMC4200.s index ea18d7eec..0252b70e1 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/system/startup_XMC4200.s +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/system/startup_XMC4200.s @@ -4,15 +4,15 @@ /* * @file Startup_XMC4200.s * XMC4000 Device Series -* @version V1.0 -* @date Jan 2013 +* @version V1.1 +* @date Augsut 2013 * * Copyright (C) 2012 IAR Systems. All rights reserved. * Copyright (C) 2012 Infineon Technologies AG. All rights reserved. * * * @par -* Infineon Technologies AG (Infineon) is supplying this software for use with +* Infineon Technologies AG (Infineon) is supplying this software for use with * Infineon's microcontrollers. This file can be freely distributed * within development tools that are supporting such microcontrollers. * @@ -28,6 +28,8 @@ /* *************************************************************************** V1.0 January, 30 2013: In ths version a workoraound for the erratum PMU_CM.001 is implmented (patch for the Exception and interrupt handlers) +V1.1 Augsut, 17 2013: Fix the bug of preprocessor due to workoraound for +the erratum PMU_CM.001, and the bug of stack pointer alignment to a 8 byte boundary **************************************************************************** */ @@ -54,7 +56,7 @@ __iar_init$$done: ; The vector table is not needed ;/* ===========START : MACRO DEFINITION MACRO DEFINITION ================== */ ;/* ; * STEP_AB and below have the prefetch functional deviation (Errata id: PMU_CM.001). -; * A veneer defined below will first be executed which in turn branches to the final +; * A veneer defined below will first be executed which in turn branches to the final ; * exception handler. ; * ; * In addition to defining the veneers, the vector table must for these buggy @@ -62,8 +64,8 @@ __iar_init$$done: ; The vector table is not needed ; */ ;set WORKAROUND_PMU_CM001 under Options for target -;Initialize varaible WORKAROUND_PMU_CM001 as FALSE -WORKAROUND_PMU_CM001 SET 1 +;define WORKAROUND_PMU_CM001 as TRUE +#define WORKAROUND_PMU_CM001 1 ;/* A macro to setup a vector table entry based on STEP ID */ #ifdef WORKAROUND_PMU_CM001 @@ -73,7 +75,7 @@ ExcpVector macro #else ExcpVector macro DCD \1 - endm + endm #endif ;/* A macro to ease definition of the various handlers based on STEP ID */ @@ -84,18 +86,18 @@ ProxyHandler macro SECTION .text:CODE:REORDER:NOROOT(1) \1 B \1 - endm -;/* And then define a veneer that will branch to the final excp handler */ -ProxyHandler_Veneer macro - PUBWEAK \1 +;/* And then define a veneer that will branch to the final excp handler */ + PUBWEAK \1_Veneer SECTION .text:CODE:REORDER:NOROOT(2) -\1 - LDR R0, =ProxyHandler - PUSH {LR} +\1_Veneer: + LDR R0, =\1 + PUSH {LR} /* Breaks AAPCS */ + SUB SP,#4 /* Restores AAPCS */ BLX R0 + ADD SP,#4 POP {PC} endm - ;/* No prefetch bug, hence define only the final exception handler */ + ;/* No prefetch bug, hence define only the final exception handler */ #else ProxyHandler macro PUBWEAK \1 @@ -109,136 +111,136 @@ ProxyHandler macro __vector_table DCD sfe(CSTACK) - DCD Reset_Handler ; Reset Handler - - ExcpVector NMI_Handler ; NMI Handler - ExcpVector HardFault_Handler ; Hard Fault Handler - ExcpVector MemManage_Handler ; MPU Fault Handler - ExcpVector BusFault_Handler ; Bus Fault Handler - ExcpVector UsageFault_Handler ; Usage Fault Handler - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - ExcpVector SVC_Handler ; SVCall Handler - DCD DebugMon_Handler ; Debug Monitor Handler - DCD 0 ; Reserved - ExcpVector PendSV_Handler ; PendSV Handler - ExcpVector SysTick_Handler ; SysTick Handler + DCD Reset_Handler ; Reset Handler + + ExcpVector NMI_Handler ; NMI Handler + ExcpVector HardFault_Handler ; Hard Fault Handler + ExcpVector MemManage_Handler ; MPU Fault Handler + ExcpVector BusFault_Handler ; Bus Fault Handler + ExcpVector UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + ExcpVector SVC_Handler ; SVCall Handler + ExcpVector DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + ExcpVector PendSV_Handler ; PendSV Handler + ExcpVector SysTick_Handler ; SysTick Handler ; Interrupt Handlers for Service Requests (SR) from XMC4200 Peripherals - ExcpVector SCU_0_IRQHandler ; Handler name for SR SCU_0 - ExcpVector ERU0_0_IRQHandler ; Handler name for SR ERU0_0 - ExcpVector ERU0_1_IRQHandler ; Handler name for SR ERU0_1 - ExcpVector ERU0_2_IRQHandler ; Handler name for SR ERU0_2 - ExcpVector ERU0_3_IRQHandler ; Handler name for SR ERU0_3 - ExcpVector ERU1_0_IRQHandler ; Handler name for SR ERU1_0 - ExcpVector ERU1_1_IRQHandler ; Handler name for SR ERU1_1 - ExcpVector ERU1_2_IRQHandler ; Handler name for SR ERU1_2 - ExcpVector ERU1_3_IRQHandler ; Handler name for SR ERU1_3 - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - ExcpVector PMU0_0_IRQHandler ; Handler name for SR PMU0_0 - DCD 0 ; Not Available - ExcpVector VADC0_C0_0_IRQHandler ; Handler name for SR VADC0_C0_0 - ExcpVector VADC0_C0_1_IRQHandler ; Handler name for SR VADC0_C0_1 - ExcpVector VADC0_C0_2_IRQHandler ; Handler name for SR VADC0_C0_1 - ExcpVector VADC0_C0_3_IRQHandler ; Handler name for SR VADC0_C0_3 - ExcpVector VADC0_G0_0_IRQHandler ; Handler name for SR VADC0_G0_0 - ExcpVector VADC0_G0_1_IRQHandler ; Handler name for SR VADC0_G0_1 - ExcpVector VADC0_G0_2_IRQHandler ; Handler name for SR VADC0_G0_2 - ExcpVector VADC0_G0_3_IRQHandler ; Handler name for SR VADC0_G0_3 - ExcpVector VADC0_G1_0_IRQHandler ; Handler name for SR VADC0_G1_0 - ExcpVector VADC0_G1_1_IRQHandler ; Handler name for SR VADC0_G1_1 - ExcpVector VADC0_G1_2_IRQHandler ; Handler name for SR VADC0_G1_2 - ExcpVector VADC0_G1_3_IRQHandler ; Handler name for SR VADC0_G1_3 - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - ExcpVector DAC0_0_IRQHandler ; Handler name for SR DAC0_0 - ExcpVector DAC0_1_IRQHandler ; Handler name for SR DAC0_1 - ExcpVector CCU40_0_IRQHandler ; Handler name for SR CCU40_0 - ExcpVector CCU40_1_IRQHandler ; Handler name for SR CCU40_1 - ExcpVector CCU40_2_IRQHandler ; Handler name for SR CCU40_2 - ExcpVector CCU40_3_IRQHandler ; Handler name for SR CCU40_3 - ExcpVector CCU41_0_IRQHandler ; Handler name for SR CCU41_0 - ExcpVector CCU41_1_IRQHandler ; Handler name for SR CCU41_1 - ExcpVector CCU41_2_IRQHandler ; Handler name for SR CCU41_2 - ExcpVector CCU41_3_IRQHandler ; Handler name for SR CCU41_3 - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - ExcpVector CCU80_0_IRQHandler ; Handler name for SR CCU80_0 - ExcpVector CCU80_1_IRQHandler ; Handler name for SR CCU80_1 - ExcpVector CCU80_2_IRQHandler ; Handler name for SR CCU80_2 - ExcpVector CCU80_3_IRQHandler ; Handler name for SR CCU80_3 - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - ExcpVector POSIF0_0_IRQHandler ; Handler name for SR POSIF0_0 - ExcpVector POSIF0_1_IRQHandler ; Handler name for SR POSIF0_1 - DCD 0 ; Not Available - DCD 0 ; Not Available - ExcpVector HRPWM_0_IRQHandler ; Handler name for SR HRPWM_0 - ExcpVector HRPWM_1_IRQHandler ; Handler name for SR HRPWM_1 - ExcpVector HRPWM_2_IRQHandler ; Handler name for SR HRPWM_2 - ExcpVector HRPWM_3_IRQHandler ; Handler name for SR HRPWM_3 - ExcpVector CAN0_0_IRQHandler ; Handler name for SR CAN0_0 - ExcpVector CAN0_1_IRQHandler ; Handler name for SR CAN0_1 - ExcpVector CAN0_2_IRQHandler ; Handler name for SR CAN0_2 - ExcpVector CAN0_3_IRQHandler ; Handler name for SR CAN0_3 - ExcpVector CAN0_4_IRQHandler ; Handler name for SR CAN0_4 - ExcpVector CAN0_5_IRQHandler ; Handler name for SR CAN0_5 - ExcpVector CAN0_6_IRQHandler ; Handler name for SR CAN0_6 - ExcpVector CAN0_7_IRQHandler ; Handler name for SR CAN0_7 - ExcpVector USIC0_0_IRQHandler ; Handler name for SR USIC0_0 - ExcpVector USIC0_1_IRQHandler ; Handler name for SR USIC0_1 - ExcpVector USIC0_2_IRQHandler ; Handler name for SR USIC0_2 - ExcpVector USIC0_3_IRQHandler ; Handler name for SR USIC0_3 - ExcpVector USIC0_4_IRQHandler ; Handler name for SR USIC0_4 - ExcpVector USIC0_5_IRQHandler ; Handler name for SR USIC0_5 - ExcpVector USIC1_0_IRQHandler ; Handler name for SR USIC1_0 - ExcpVector USIC1_1_IRQHandler ; Handler name for SR USIC1_1 - ExcpVector USIC1_2_IRQHandler ; Handler name for SR USIC1_2 - ExcpVector USIC1_3_IRQHandler ; Handler name for SR USIC1_3 - ExcpVector USIC1_4_IRQHandler ; Handler name for SR USIC1_4 - ExcpVector USIC1_5_IRQHandler ; Handler name for SR USIC1_5 - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - ExcpVector LEDTS0_0_IRQHandler ; Handler name for SR LEDTS0_0 - DCD 0 ; Not Available - ExcpVector FCE0_0_IRQHandler ; Handler name for SR FCE0_0 - ExcpVector GPDMA0_0_IRQHandler ; Handler name for SR GPDMA0_0 - DCD 0 ; Not Available - ExcpVector USB0_0_IRQHandler ; Handler name for SR USB0_0 - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available + ExcpVector SCU_0_IRQHandler ; Handler name for SR SCU_0 + ExcpVector ERU0_0_IRQHandler ; Handler name for SR ERU0_0 + ExcpVector ERU0_1_IRQHandler ; Handler name for SR ERU0_1 + ExcpVector ERU0_2_IRQHandler ; Handler name for SR ERU0_2 + ExcpVector ERU0_3_IRQHandler ; Handler name for SR ERU0_3 + ExcpVector ERU1_0_IRQHandler ; Handler name for SR ERU1_0 + ExcpVector ERU1_1_IRQHandler ; Handler name for SR ERU1_1 + ExcpVector ERU1_2_IRQHandler ; Handler name for SR ERU1_2 + ExcpVector ERU1_3_IRQHandler ; Handler name for SR ERU1_3 + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + ExcpVector PMU0_0_IRQHandler ; Handler name for SR PMU0_0 + DCD 0 ; Not Available + ExcpVector VADC0_C0_0_IRQHandler ; Handler name for SR VADC0_C0_0 + ExcpVector VADC0_C0_1_IRQHandler ; Handler name for SR VADC0_C0_1 + ExcpVector VADC0_C0_2_IRQHandler ; Handler name for SR VADC0_C0_1 + ExcpVector VADC0_C0_3_IRQHandler ; Handler name for SR VADC0_C0_3 + ExcpVector VADC0_G0_0_IRQHandler ; Handler name for SR VADC0_G0_0 + ExcpVector VADC0_G0_1_IRQHandler ; Handler name for SR VADC0_G0_1 + ExcpVector VADC0_G0_2_IRQHandler ; Handler name for SR VADC0_G0_2 + ExcpVector VADC0_G0_3_IRQHandler ; Handler name for SR VADC0_G0_3 + ExcpVector VADC0_G1_0_IRQHandler ; Handler name for SR VADC0_G1_0 + ExcpVector VADC0_G1_1_IRQHandler ; Handler name for SR VADC0_G1_1 + ExcpVector VADC0_G1_2_IRQHandler ; Handler name for SR VADC0_G1_2 + ExcpVector VADC0_G1_3_IRQHandler ; Handler name for SR VADC0_G1_3 + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + ExcpVector DAC0_0_IRQHandler ; Handler name for SR DAC0_0 + ExcpVector DAC0_1_IRQHandler ; Handler name for SR DAC0_1 + ExcpVector CCU40_0_IRQHandler ; Handler name for SR CCU40_0 + ExcpVector CCU40_1_IRQHandler ; Handler name for SR CCU40_1 + ExcpVector CCU40_2_IRQHandler ; Handler name for SR CCU40_2 + ExcpVector CCU40_3_IRQHandler ; Handler name for SR CCU40_3 + ExcpVector CCU41_0_IRQHandler ; Handler name for SR CCU41_0 + ExcpVector CCU41_1_IRQHandler ; Handler name for SR CCU41_1 + ExcpVector CCU41_2_IRQHandler ; Handler name for SR CCU41_2 + ExcpVector CCU41_3_IRQHandler ; Handler name for SR CCU41_3 + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + ExcpVector CCU80_0_IRQHandler ; Handler name for SR CCU80_0 + ExcpVector CCU80_1_IRQHandler ; Handler name for SR CCU80_1 + ExcpVector CCU80_2_IRQHandler ; Handler name for SR CCU80_2 + ExcpVector CCU80_3_IRQHandler ; Handler name for SR CCU80_3 + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + ExcpVector POSIF0_0_IRQHandler ; Handler name for SR POSIF0_0 + ExcpVector POSIF0_1_IRQHandler ; Handler name for SR POSIF0_1 + DCD 0 ; Not Available + DCD 0 ; Not Available + ExcpVector HRPWM_0_IRQHandler ; Handler name for SR HRPWM_0 + ExcpVector HRPWM_1_IRQHandler ; Handler name for SR HRPWM_1 + ExcpVector HRPWM_2_IRQHandler ; Handler name for SR HRPWM_2 + ExcpVector HRPWM_3_IRQHandler ; Handler name for SR HRPWM_3 + ExcpVector CAN0_0_IRQHandler ; Handler name for SR CAN0_0 + ExcpVector CAN0_1_IRQHandler ; Handler name for SR CAN0_1 + ExcpVector CAN0_2_IRQHandler ; Handler name for SR CAN0_2 + ExcpVector CAN0_3_IRQHandler ; Handler name for SR CAN0_3 + ExcpVector CAN0_4_IRQHandler ; Handler name for SR CAN0_4 + ExcpVector CAN0_5_IRQHandler ; Handler name for SR CAN0_5 + ExcpVector CAN0_6_IRQHandler ; Handler name for SR CAN0_6 + ExcpVector CAN0_7_IRQHandler ; Handler name for SR CAN0_7 + ExcpVector USIC0_0_IRQHandler ; Handler name for SR USIC0_0 + ExcpVector USIC0_1_IRQHandler ; Handler name for SR USIC0_1 + ExcpVector USIC0_2_IRQHandler ; Handler name for SR USIC0_2 + ExcpVector USIC0_3_IRQHandler ; Handler name for SR USIC0_3 + ExcpVector USIC0_4_IRQHandler ; Handler name for SR USIC0_4 + ExcpVector USIC0_5_IRQHandler ; Handler name for SR USIC0_5 + ExcpVector USIC1_0_IRQHandler ; Handler name for SR USIC1_0 + ExcpVector USIC1_1_IRQHandler ; Handler name for SR USIC1_1 + ExcpVector USIC1_2_IRQHandler ; Handler name for SR USIC1_2 + ExcpVector USIC1_3_IRQHandler ; Handler name for SR USIC1_3 + ExcpVector USIC1_4_IRQHandler ; Handler name for SR USIC1_4 + ExcpVector USIC1_5_IRQHandler ; Handler name for SR USIC1_5 + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + ExcpVector LEDTS0_0_IRQHandler ; Handler name for SR LEDTS0_0 + DCD 0 ; Not Available + ExcpVector FCE0_0_IRQHandler ; Handler name for SR FCE0_0 + ExcpVector GPDMA0_0_IRQHandler ; Handler name for SR GPDMA0_0 + DCD 0 ; Not Available + ExcpVector USB0_0_IRQHandler ; Handler name for SR USB0_0 + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -251,12 +253,12 @@ __vector_table Reset_Handler LDR R0, =SystemInit - BLX R0 + BLX R0 LDR R0, =SystemInit_DAVE3 - BLX R0 + BLX R0 LDR R0, =__iar_program_start BX R0 - + ProxyHandler NMI_Handler ProxyHandler HardFault_Handler @@ -268,91 +270,91 @@ Reset_Handler ProxyHandler PendSV_Handler ProxyHandler SysTick_Handler - ProxyHandler SCU_0_IRQHandler - ProxyHandler ERU0_0_IRQHandler - ProxyHandler ERU0_1_IRQHandler - ProxyHandler ERU0_2_IRQHandler - ProxyHandler ERU0_3_IRQHandler - ProxyHandler ERU1_0_IRQHandler - ProxyHandler ERU1_1_IRQHandler - ProxyHandler ERU1_2_IRQHandler - ProxyHandler ERU1_3_IRQHandler - ProxyHandler PMU0_0_IRQHandler - ProxyHandler VADC0_C0_0_IRQHandler - ProxyHandler VADC0_C0_1_IRQHandler - ProxyHandler VADC0_C0_2_IRQHandler - ProxyHandler VADC0_C0_3_IRQHandler - ProxyHandler VADC0_G0_0_IRQHandler - ProxyHandler VADC0_G0_1_IRQHandler - ProxyHandler VADC0_G0_2_IRQHandler - ProxyHandler VADC0_G0_3_IRQHandler - ProxyHandler VADC0_G1_0_IRQHandler - ProxyHandler VADC0_G1_1_IRQHandler - ProxyHandler VADC0_G1_2_IRQHandler - ProxyHandler VADC0_G1_3_IRQHandler - ProxyHandler DAC0_0_IRQHandler - ProxyHandler DAC0_1_IRQHandler - ProxyHandler CCU40_0_IRQHandler - ProxyHandler CCU40_1_IRQHandler - ProxyHandler CCU40_2_IRQHandler - ProxyHandler CCU40_3_IRQHandler - ProxyHandler CCU41_0_IRQHandler - ProxyHandler CCU41_1_IRQHandler - ProxyHandler CCU41_2_IRQHandler - ProxyHandler CCU41_3_IRQHandler - ProxyHandler CCU80_0_IRQHandler - ProxyHandler CCU80_1_IRQHandler - ProxyHandler CCU80_2_IRQHandler - ProxyHandler CCU80_3_IRQHandler - ProxyHandler POSIF0_0_IRQHandler - ProxyHandler POSIF0_1_IRQHandler - ProxyHandler HRPWM_0_IRQHandler - ProxyHandler HRPWM_1_IRQHandler - ProxyHandler HRPWM_2_IRQHandler - ProxyHandler HRPWM_3_IRQHandler - ProxyHandler CAN0_0_IRQHandler - ProxyHandler CAN0_1_IRQHandler - ProxyHandler CAN0_2_IRQHandler - ProxyHandler CAN0_3_IRQHandler - ProxyHandler CAN0_4_IRQHandler - ProxyHandler CAN0_5_IRQHandler - ProxyHandler CAN0_6_IRQHandler - ProxyHandler CAN0_7_IRQHandler - ProxyHandler USIC0_0_IRQHandler - ProxyHandler USIC0_1_IRQHandler - ProxyHandler USIC0_2_IRQHandler - ProxyHandler USIC0_3_IRQHandler - ProxyHandler USIC0_4_IRQHandler - ProxyHandler USIC0_5_IRQHandler - ProxyHandler USIC1_0_IRQHandler - ProxyHandler USIC1_1_IRQHandler - ProxyHandler USIC1_2_IRQHandler - ProxyHandler USIC1_3_IRQHandler - ProxyHandler USIC1_4_IRQHandler - ProxyHandler USIC1_5_IRQHandler - ProxyHandler LEDTS0_0_IRQHandler - ProxyHandler FCE0_0_IRQHandler - ProxyHandler GPDMA0_0_IRQHandler - ProxyHandler USB0_0_IRQHandler + ProxyHandler SCU_0_IRQHandler + ProxyHandler ERU0_0_IRQHandler + ProxyHandler ERU0_1_IRQHandler + ProxyHandler ERU0_2_IRQHandler + ProxyHandler ERU0_3_IRQHandler + ProxyHandler ERU1_0_IRQHandler + ProxyHandler ERU1_1_IRQHandler + ProxyHandler ERU1_2_IRQHandler + ProxyHandler ERU1_3_IRQHandler + ProxyHandler PMU0_0_IRQHandler + ProxyHandler VADC0_C0_0_IRQHandler + ProxyHandler VADC0_C0_1_IRQHandler + ProxyHandler VADC0_C0_2_IRQHandler + ProxyHandler VADC0_C0_3_IRQHandler + ProxyHandler VADC0_G0_0_IRQHandler + ProxyHandler VADC0_G0_1_IRQHandler + ProxyHandler VADC0_G0_2_IRQHandler + ProxyHandler VADC0_G0_3_IRQHandler + ProxyHandler VADC0_G1_0_IRQHandler + ProxyHandler VADC0_G1_1_IRQHandler + ProxyHandler VADC0_G1_2_IRQHandler + ProxyHandler VADC0_G1_3_IRQHandler + ProxyHandler DAC0_0_IRQHandler + ProxyHandler DAC0_1_IRQHandler + ProxyHandler CCU40_0_IRQHandler + ProxyHandler CCU40_1_IRQHandler + ProxyHandler CCU40_2_IRQHandler + ProxyHandler CCU40_3_IRQHandler + ProxyHandler CCU41_0_IRQHandler + ProxyHandler CCU41_1_IRQHandler + ProxyHandler CCU41_2_IRQHandler + ProxyHandler CCU41_3_IRQHandler + ProxyHandler CCU80_0_IRQHandler + ProxyHandler CCU80_1_IRQHandler + ProxyHandler CCU80_2_IRQHandler + ProxyHandler CCU80_3_IRQHandler + ProxyHandler POSIF0_0_IRQHandler + ProxyHandler POSIF0_1_IRQHandler + ProxyHandler HRPWM_0_IRQHandler + ProxyHandler HRPWM_1_IRQHandler + ProxyHandler HRPWM_2_IRQHandler + ProxyHandler HRPWM_3_IRQHandler + ProxyHandler CAN0_0_IRQHandler + ProxyHandler CAN0_1_IRQHandler + ProxyHandler CAN0_2_IRQHandler + ProxyHandler CAN0_3_IRQHandler + ProxyHandler CAN0_4_IRQHandler + ProxyHandler CAN0_5_IRQHandler + ProxyHandler CAN0_6_IRQHandler + ProxyHandler CAN0_7_IRQHandler + ProxyHandler USIC0_0_IRQHandler + ProxyHandler USIC0_1_IRQHandler + ProxyHandler USIC0_2_IRQHandler + ProxyHandler USIC0_3_IRQHandler + ProxyHandler USIC0_4_IRQHandler + ProxyHandler USIC0_5_IRQHandler + ProxyHandler USIC1_0_IRQHandler + ProxyHandler USIC1_1_IRQHandler + ProxyHandler USIC1_2_IRQHandler + ProxyHandler USIC1_3_IRQHandler + ProxyHandler USIC1_4_IRQHandler + ProxyHandler USIC1_5_IRQHandler + ProxyHandler LEDTS0_0_IRQHandler + ProxyHandler FCE0_0_IRQHandler + ProxyHandler GPDMA0_0_IRQHandler + ProxyHandler USB0_0_IRQHandler ; Definition of the default weak SystemInit_DAVE3 function for DAVE3 system init. PUBWEAK SystemInit_DAVE3 SECTION .text:CODE:REORDER:NOROOT(2) SystemInit_DAVE3 - NOP + NOP BX LR - + ; Definition of the default weak DAVE3 function for clock App usage. ; AllowPLLInitByStartup Handler PUBWEAK AllowPLLInitByStartup SECTION .text:CODE:REORDER:NOROOT(2) -AllowPLLInitByStartup +AllowPLLInitByStartup MOV R0,#1 - BX LR + BX LR PREF_PCON EQU 0x58004000 SCU_GCU_PEEN EQU 0x5000413C SCU_GCU_PEFLAG EQU 0x50004150 - + END diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/system/startup_XMC4400.s b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/system/startup_XMC4400.s index 907407eea..e15a350af 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/system/startup_XMC4400.s +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/system/startup_XMC4400.s @@ -4,15 +4,15 @@ /** * @file Startup_XMC4400.s * XMC4000 Device Series -* @version V1.0 -* @date Jan 2013 +* @version V1.1 +* @date August 2013 * * Copyright (C) 2012 IAR Systems. All rights reserved. * Copyright (C) 2012 Infineon Technologies AG. All rights reserved. * * * @par -* Infineon Technologies AG (Infineon) is supplying this software for use with +* Infineon Technologies AG (Infineon) is supplying this software for use with * Infineon's microcontrollers. This file can be freely distributed * within development tools that are supporting such microcontrollers. * @@ -28,6 +28,8 @@ /* *************************************************************************** V1.0 January, 30 2013: In ths version a workoraound for the erratum PMU_CM.001 is implmented (patch for the Exception and interrupt handlers) +V1.1 Augsut, 17 2013: Fix the bug of preprocessor due to workoraound for +the erratum PMU_CM.001, and the bug of stack pointer alignment to a 8 byte boundary **************************************************************************** */ @@ -43,7 +45,7 @@ is implmented (patch for the Exception and interrupt handlers) SECTION .intvec:CODE:NOROOT(2) EXTERN __iar_program_start - EXTERN SystemInit + EXTERN SystemInit PUBLIC __vector_table DATA @@ -54,7 +56,7 @@ __iar_init$$done: ; The vector table is not needed ;/* ===========START : MACRO DEFINITION MACRO DEFINITION ================== */ ;/* ; * STEP_AB and below have the prefetch functional deviation (Errata id: PMU_CM.001). -; * A veneer defined below will first be executed which in turn branches to the final +; * A veneer defined below will first be executed which in turn branches to the final ; * exception handler. ; * ; * In addition to defining the veneers, the vector table must for these buggy @@ -62,8 +64,8 @@ __iar_init$$done: ; The vector table is not needed ; */ ;set WORKAROUND_PMU_CM001 under Options for target -;Initialize varaible WORKAROUND_PMU_CM001 as FALSE -WORKAROUND_PMU_CM001 SET 1 +;define WORKAROUND_PMU_CM001 as TRUE +#define WORKAROUND_PMU_CM001 1 ;/* A macro to setup a vector table entry based on STEP ID */ #ifdef WORKAROUND_PMU_CM001 @@ -73,7 +75,7 @@ ExcpVector macro #else ExcpVector macro DCD \1 - endm + endm #endif ;/* A macro to ease definition of the various handlers based on STEP ID */ @@ -84,18 +86,19 @@ ProxyHandler macro SECTION .text:CODE:REORDER:NOROOT(1) \1 B \1 - endm -;/* And then define a veneer that will branch to the final excp handler */ -ProxyHandler_Veneer macro - PUBWEAK \1 +;/* And then define a veneer that will branch to the final excp handler */ + PUBWEAK \1_Veneer SECTION .text:CODE:REORDER:NOROOT(2) -\1 - LDR R0, =ProxyHandler - PUSH {LR} +\1_Veneer + LDR R0, =\1 + PUSH {LR} /* Breaks AAPCS */ + SUB SP,#4 /* Restores AAPCS */ BLX R0 + ADD SP,#4 POP {PC} endm - ;/* No prefetch bug, hence define only the final exception handler */ + + ;/* No prefetch bug, hence define only the final exception handler */ #else ProxyHandler macro PUBWEAK \1 @@ -109,136 +112,136 @@ ProxyHandler macro __vector_table DCD sfe(CSTACK) - DCD Reset_Handler ; Reset Handler - - ExcpVector NMI_Handler ; NMI Handler - ExcpVector HardFault_Handler ; Hard Fault Handler - ExcpVector MemManage_Handler ; MPU Fault Handler - ExcpVector BusFault_Handler ; Bus Fault Handler - ExcpVector UsageFault_Handler ; Usage Fault Handler - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - DCD 0 ; Reserved - ExcpVector SVC_Handler ; SVCall Handler - ExcpVector DebugMon_Handler ; Debug Monitor Handler - DCD 0 ; Reserved - ExcpVector PendSV_Handler ; PendSV Handler - ExcpVector SysTick_Handler ; SysTick Handler + DCD Reset_Handler ; Reset Handler + + ExcpVector NMI_Handler ; NMI Handler + ExcpVector HardFault_Handler ; Hard Fault Handler + ExcpVector MemManage_Handler ; MPU Fault Handler + ExcpVector BusFault_Handler ; Bus Fault Handler + ExcpVector UsageFault_Handler ; Usage Fault Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + ExcpVector SVC_Handler ; SVCall Handler + ExcpVector DebugMon_Handler ; Debug Monitor Handler + DCD 0 ; Reserved + ExcpVector PendSV_Handler ; PendSV Handler + ExcpVector SysTick_Handler ; SysTick Handler ; Interrupt Handlers for Service Requests (SR) from XMC4500 Peripherals - ExcpVector SCU_0_IRQHandler ; Handler name for SR SCU_0 - ExcpVector ERU0_0_IRQHandler ; Handler name for SR ERU0_0 - ExcpVector ERU0_1_IRQHandler ; Handler name for SR ERU0_1 - ExcpVector ERU0_2_IRQHandler ; Handler name for SR ERU0_2 - ExcpVector ERU0_3_IRQHandler ; Handler name for SR ERU0_3 - ExcpVector ERU1_0_IRQHandler ; Handler name for SR ERU1_0 - ExcpVector ERU1_1_IRQHandler ; Handler name for SR ERU1_1 - ExcpVector ERU1_2_IRQHandler ; Handler name for SR ERU1_2 - ExcpVector ERU1_3_IRQHandler ; Handler name for SR ERU1_3 - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - ExcpVector PMU0_0_IRQHandler ; Handler name for SR PMU0_0 - DCD 0 ; Not Available - ExcpVector VADC0_C0_0_IRQHandler ; Handler name for SR VADC0_C0_0 - ExcpVector VADC0_C0_1_IRQHandler ; Handler name for SR VADC0_C0_1 - ExcpVector VADC0_C0_2_IRQHandler ; Handler name for SR VADC0_C0_1 - ExcpVector VADC0_C0_3_IRQHandler ; Handler name for SR VADC0_C0_3 - ExcpVector VADC0_G0_0_IRQHandler ; Handler name for SR VADC0_G0_0 - ExcpVector VADC0_G0_1_IRQHandler ; Handler name for SR VADC0_G0_1 - ExcpVector VADC0_G0_2_IRQHandler ; Handler name for SR VADC0_G0_2 - ExcpVector VADC0_G0_3_IRQHandler ; Handler name for SR VADC0_G0_3 - ExcpVector VADC0_G1_0_IRQHandler ; Handler name for SR VADC0_G1_0 - ExcpVector VADC0_G1_1_IRQHandler ; Handler name for SR VADC0_G1_1 - ExcpVector VADC0_G1_2_IRQHandler ; Handler name for SR VADC0_G1_2 - ExcpVector VADC0_G1_3_IRQHandler ; Handler name for SR VADC0_G1_3 - ExcpVector VADC0_G2_0_IRQHandler ; Handler name for SR VADC0_G2_0 - ExcpVector VADC0_G2_1_IRQHandler ; Handler name for SR VADC0_G2_1 - ExcpVector VADC0_G2_2_IRQHandler ; Handler name for SR VADC0_G2_2 - ExcpVector VADC0_G2_3_IRQHandler ; Handler name for SR VADC0_G2_3 - ExcpVector VADC0_G3_0_IRQHandler ; Handler name for SR VADC0_G3_0 - ExcpVector VADC0_G3_1_IRQHandler ; Handler name for SR VADC0_G3_1 - ExcpVector VADC0_G3_2_IRQHandler ; Handler name for SR VADC0_G3_2 - ExcpVector VADC0_G3_3_IRQHandler ; Handler name for SR VADC0_G3_3 - ExcpVector DSD0_0_IRQHandler ; Handler name for SR DSD_SRM_0 - ExcpVector DSD0_1_IRQHandler ; Handler name for SR DSD_SRM_1 - ExcpVector DSD0_2_IRQHandler ; Handler name for SR DSD_SRM_2 - ExcpVector DSD0_3_IRQHandler ; Handler name for SR DSD_SRM_3 - ExcpVector DSD0_4_IRQHandler ; Handler name for SR DSD_SRA_0 - ExcpVector DSD0_5_IRQHandler ; Handler name for SR DSD_SRA_1 - ExcpVector DSD0_6_IRQHandler ; Handler name for SR DSD_SRA_2 - ExcpVector DSD0_7_IRQHandler ; Handler name for SR DSD_SRA_3 - ExcpVector DAC0_0_IRQHandler ; Handler name for SR DAC0_0 - ExcpVector DAC0_1_IRQHandler ; Handler name for SR DAC0_1 - ExcpVector CCU40_0_IRQHandler ; Handler name for SR CCU40_0 - ExcpVector CCU40_1_IRQHandler ; Handler name for SR CCU40_1 - ExcpVector CCU40_2_IRQHandler ; Handler name for SR CCU40_2 - ExcpVector CCU40_3_IRQHandler ; Handler name for SR CCU40_3 - ExcpVector CCU41_0_IRQHandler ; Handler name for SR CCU41_0 - ExcpVector CCU41_1_IRQHandler ; Handler name for SR CCU41_1 - ExcpVector CCU41_2_IRQHandler ; Handler name for SR CCU41_2 - ExcpVector CCU41_3_IRQHandler ; Handler name for SR CCU41_3 - ExcpVector CCU42_0_IRQHandler ; Handler name for SR CCU42_0 - ExcpVector CCU42_1_IRQHandler ; Handler name for SR CCU42_1 - ExcpVector CCU42_2_IRQHandler ; Handler name for SR CCU42_2 - ExcpVector CCU42_3_IRQHandler ; Handler name for SR CCU42_3 - ExcpVector CCU43_0_IRQHandler ; Handler name for SR CCU43_0 - ExcpVector CCU43_1_IRQHandler ; Handler name for SR CCU43_1 - ExcpVector CCU43_2_IRQHandler ; Handler name for SR CCU43_2 - ExcpVector CCU43_3_IRQHandler ; Handler name for SR CCU43_3 - ExcpVector CCU80_0_IRQHandler ; Handler name for SR CCU80_0 - ExcpVector CCU80_1_IRQHandler ; Handler name for SR CCU80_1 - ExcpVector CCU80_2_IRQHandler ; Handler name for SR CCU80_2 - ExcpVector CCU80_3_IRQHandler ; Handler name for SR CCU80_3 - ExcpVector CCU81_0_IRQHandler ; Handler name for SR CCU81_0 - ExcpVector CCU81_1_IRQHandler ; Handler name for SR CCU81_1 - ExcpVector CCU81_2_IRQHandler ; Handler name for SR CCU81_2 - ExcpVector CCU81_3_IRQHandler ; Handler name for SR CCU81_3 - ExcpVector POSIF0_0_IRQHandler ; Handler name for SR POSIF0_0 - ExcpVector POSIF0_1_IRQHandler ; Handler name for SR POSIF0_1 - ExcpVector POSIF1_0_IRQHandler ; Handler name for SR POSIF1_0 - ExcpVector POSIF1_1_IRQHandler ; Handler name for SR POSIF1_1 - ExcpVector HRPWM_0_IRQHandler ; Handler name for SR HRPWM_0 - ExcpVector HRPWM_1_IRQHandler ; Handler name for SR HRPWM_1 - ExcpVector HRPWM_2_IRQHandler ; Handler name for SR HRPWM_2 - ExcpVector HRPWM_3_IRQHandler ; Handler name for SR HRPWM_3 - ExcpVector CAN0_0_IRQHandler ; Handler name for SR CAN0_0 - ExcpVector CAN0_1_IRQHandler ; Handler name for SR CAN0_1 - ExcpVector CAN0_2_IRQHandler ; Handler name for SR CAN0_2 - ExcpVector CAN0_3_IRQHandler ; Handler name for SR CAN0_3 - ExcpVector CAN0_4_IRQHandler ; Handler name for SR CAN0_4 - ExcpVector CAN0_5_IRQHandler ; Handler name for SR CAN0_5 - ExcpVector CAN0_6_IRQHandler ; Handler name for SR CAN0_6 - ExcpVector CAN0_7_IRQHandler ; Handler name for SR CAN0_7 - ExcpVector USIC0_0_IRQHandler ; Handler name for SR USIC0_0 - ExcpVector USIC0_1_IRQHandler ; Handler name for SR USIC0_1 - ExcpVector USIC0_2_IRQHandler ; Handler name for SR USIC0_2 - ExcpVector USIC0_3_IRQHandler ; Handler name for SR USIC0_3 - ExcpVector USIC0_4_IRQHandler ; Handler name for SR USIC0_4 - ExcpVector USIC0_5_IRQHandler ; Handler name for SR USIC0_5 - ExcpVector USIC1_0_IRQHandler ; Handler name for SR USIC1_0 - ExcpVector USIC1_1_IRQHandler ; Handler name for SR USIC1_1 - ExcpVector USIC1_2_IRQHandler ; Handler name for SR USIC1_2 - ExcpVector USIC1_3_IRQHandler ; Handler name for SR USIC1_3 - ExcpVector USIC1_4_IRQHandler ; Handler name for SR USIC1_4 - ExcpVector USIC1_5_IRQHandler ; Handler name for SR USIC1_5 - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available - ExcpVector LEDTS0_0_IRQHandler ; Handler name for SR LEDTS0_0 - DCD 0 ; Not Available - ExcpVector FCE0_0_IRQHandler ; Handler name for SR FCE0_0 - ExcpVector GPDMA0_0_IRQHandler ; Handler name for SR GPDMA0_0 - DCD 0 ; Not Available - ExcpVector USB0_0_IRQHandler ; Handler name for SR USB0_0 - ExcpVector ETH0_0_IRQHandler ; Handler name for SR ETH0_0 - DCD 0 ; Not Available - DCD 0 ; Not Available - DCD 0 ; Not Available + ExcpVector SCU_0_IRQHandler ; Handler name for SR SCU_0 + ExcpVector ERU0_0_IRQHandler ; Handler name for SR ERU0_0 + ExcpVector ERU0_1_IRQHandler ; Handler name for SR ERU0_1 + ExcpVector ERU0_2_IRQHandler ; Handler name for SR ERU0_2 + ExcpVector ERU0_3_IRQHandler ; Handler name for SR ERU0_3 + ExcpVector ERU1_0_IRQHandler ; Handler name for SR ERU1_0 + ExcpVector ERU1_1_IRQHandler ; Handler name for SR ERU1_1 + ExcpVector ERU1_2_IRQHandler ; Handler name for SR ERU1_2 + ExcpVector ERU1_3_IRQHandler ; Handler name for SR ERU1_3 + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + ExcpVector PMU0_0_IRQHandler ; Handler name for SR PMU0_0 + DCD 0 ; Not Available + ExcpVector VADC0_C0_0_IRQHandler ; Handler name for SR VADC0_C0_0 + ExcpVector VADC0_C0_1_IRQHandler ; Handler name for SR VADC0_C0_1 + ExcpVector VADC0_C0_2_IRQHandler ; Handler name for SR VADC0_C0_1 + ExcpVector VADC0_C0_3_IRQHandler ; Handler name for SR VADC0_C0_3 + ExcpVector VADC0_G0_0_IRQHandler ; Handler name for SR VADC0_G0_0 + ExcpVector VADC0_G0_1_IRQHandler ; Handler name for SR VADC0_G0_1 + ExcpVector VADC0_G0_2_IRQHandler ; Handler name for SR VADC0_G0_2 + ExcpVector VADC0_G0_3_IRQHandler ; Handler name for SR VADC0_G0_3 + ExcpVector VADC0_G1_0_IRQHandler ; Handler name for SR VADC0_G1_0 + ExcpVector VADC0_G1_1_IRQHandler ; Handler name for SR VADC0_G1_1 + ExcpVector VADC0_G1_2_IRQHandler ; Handler name for SR VADC0_G1_2 + ExcpVector VADC0_G1_3_IRQHandler ; Handler name for SR VADC0_G1_3 + ExcpVector VADC0_G2_0_IRQHandler ; Handler name for SR VADC0_G2_0 + ExcpVector VADC0_G2_1_IRQHandler ; Handler name for SR VADC0_G2_1 + ExcpVector VADC0_G2_2_IRQHandler ; Handler name for SR VADC0_G2_2 + ExcpVector VADC0_G2_3_IRQHandler ; Handler name for SR VADC0_G2_3 + ExcpVector VADC0_G3_0_IRQHandler ; Handler name for SR VADC0_G3_0 + ExcpVector VADC0_G3_1_IRQHandler ; Handler name for SR VADC0_G3_1 + ExcpVector VADC0_G3_2_IRQHandler ; Handler name for SR VADC0_G3_2 + ExcpVector VADC0_G3_3_IRQHandler ; Handler name for SR VADC0_G3_3 + ExcpVector DSD0_0_IRQHandler ; Handler name for SR DSD_SRM_0 + ExcpVector DSD0_1_IRQHandler ; Handler name for SR DSD_SRM_1 + ExcpVector DSD0_2_IRQHandler ; Handler name for SR DSD_SRM_2 + ExcpVector DSD0_3_IRQHandler ; Handler name for SR DSD_SRM_3 + ExcpVector DSD0_4_IRQHandler ; Handler name for SR DSD_SRA_0 + ExcpVector DSD0_5_IRQHandler ; Handler name for SR DSD_SRA_1 + ExcpVector DSD0_6_IRQHandler ; Handler name for SR DSD_SRA_2 + ExcpVector DSD0_7_IRQHandler ; Handler name for SR DSD_SRA_3 + ExcpVector DAC0_0_IRQHandler ; Handler name for SR DAC0_0 + ExcpVector DAC0_1_IRQHandler ; Handler name for SR DAC0_1 + ExcpVector CCU40_0_IRQHandler ; Handler name for SR CCU40_0 + ExcpVector CCU40_1_IRQHandler ; Handler name for SR CCU40_1 + ExcpVector CCU40_2_IRQHandler ; Handler name for SR CCU40_2 + ExcpVector CCU40_3_IRQHandler ; Handler name for SR CCU40_3 + ExcpVector CCU41_0_IRQHandler ; Handler name for SR CCU41_0 + ExcpVector CCU41_1_IRQHandler ; Handler name for SR CCU41_1 + ExcpVector CCU41_2_IRQHandler ; Handler name for SR CCU41_2 + ExcpVector CCU41_3_IRQHandler ; Handler name for SR CCU41_3 + ExcpVector CCU42_0_IRQHandler ; Handler name for SR CCU42_0 + ExcpVector CCU42_1_IRQHandler ; Handler name for SR CCU42_1 + ExcpVector CCU42_2_IRQHandler ; Handler name for SR CCU42_2 + ExcpVector CCU42_3_IRQHandler ; Handler name for SR CCU42_3 + ExcpVector CCU43_0_IRQHandler ; Handler name for SR CCU43_0 + ExcpVector CCU43_1_IRQHandler ; Handler name for SR CCU43_1 + ExcpVector CCU43_2_IRQHandler ; Handler name for SR CCU43_2 + ExcpVector CCU43_3_IRQHandler ; Handler name for SR CCU43_3 + ExcpVector CCU80_0_IRQHandler ; Handler name for SR CCU80_0 + ExcpVector CCU80_1_IRQHandler ; Handler name for SR CCU80_1 + ExcpVector CCU80_2_IRQHandler ; Handler name for SR CCU80_2 + ExcpVector CCU80_3_IRQHandler ; Handler name for SR CCU80_3 + ExcpVector CCU81_0_IRQHandler ; Handler name for SR CCU81_0 + ExcpVector CCU81_1_IRQHandler ; Handler name for SR CCU81_1 + ExcpVector CCU81_2_IRQHandler ; Handler name for SR CCU81_2 + ExcpVector CCU81_3_IRQHandler ; Handler name for SR CCU81_3 + ExcpVector POSIF0_0_IRQHandler ; Handler name for SR POSIF0_0 + ExcpVector POSIF0_1_IRQHandler ; Handler name for SR POSIF0_1 + ExcpVector POSIF1_0_IRQHandler ; Handler name for SR POSIF1_0 + ExcpVector POSIF1_1_IRQHandler ; Handler name for SR POSIF1_1 + ExcpVector HRPWM_0_IRQHandler ; Handler name for SR HRPWM_0 + ExcpVector HRPWM_1_IRQHandler ; Handler name for SR HRPWM_1 + ExcpVector HRPWM_2_IRQHandler ; Handler name for SR HRPWM_2 + ExcpVector HRPWM_3_IRQHandler ; Handler name for SR HRPWM_3 + ExcpVector CAN0_0_IRQHandler ; Handler name for SR CAN0_0 + ExcpVector CAN0_1_IRQHandler ; Handler name for SR CAN0_1 + ExcpVector CAN0_2_IRQHandler ; Handler name for SR CAN0_2 + ExcpVector CAN0_3_IRQHandler ; Handler name for SR CAN0_3 + ExcpVector CAN0_4_IRQHandler ; Handler name for SR CAN0_4 + ExcpVector CAN0_5_IRQHandler ; Handler name for SR CAN0_5 + ExcpVector CAN0_6_IRQHandler ; Handler name for SR CAN0_6 + ExcpVector CAN0_7_IRQHandler ; Handler name for SR CAN0_7 + ExcpVector USIC0_0_IRQHandler ; Handler name for SR USIC0_0 + ExcpVector USIC0_1_IRQHandler ; Handler name for SR USIC0_1 + ExcpVector USIC0_2_IRQHandler ; Handler name for SR USIC0_2 + ExcpVector USIC0_3_IRQHandler ; Handler name for SR USIC0_3 + ExcpVector USIC0_4_IRQHandler ; Handler name for SR USIC0_4 + ExcpVector USIC0_5_IRQHandler ; Handler name for SR USIC0_5 + ExcpVector USIC1_0_IRQHandler ; Handler name for SR USIC1_0 + ExcpVector USIC1_1_IRQHandler ; Handler name for SR USIC1_1 + ExcpVector USIC1_2_IRQHandler ; Handler name for SR USIC1_2 + ExcpVector USIC1_3_IRQHandler ; Handler name for SR USIC1_3 + ExcpVector USIC1_4_IRQHandler ; Handler name for SR USIC1_4 + ExcpVector USIC1_5_IRQHandler ; Handler name for SR USIC1_5 + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available + ExcpVector LEDTS0_0_IRQHandler ; Handler name for SR LEDTS0_0 + DCD 0 ; Not Available + ExcpVector FCE0_0_IRQHandler ; Handler name for SR FCE0_0 + ExcpVector GPDMA0_0_IRQHandler ; Handler name for SR GPDMA0_0 + DCD 0 ; Not Available + ExcpVector USB0_0_IRQHandler ; Handler name for SR USB0_0 + ExcpVector ETH0_0_IRQHandler ; Handler name for SR ETH0_0 + DCD 0 ; Not Available + DCD 0 ; Not Available + DCD 0 ; Not Available @@ -253,12 +256,12 @@ __vector_table Reset_Handler LDR R0, =SystemInit - BLX R0 + BLX R0 LDR R0, =SystemInit_DAVE3 - BLX R0 + BLX R0 LDR R0, =__iar_program_start - BX R0 - + BX R0 + ProxyHandler NMI_Handler ProxyHandler HardFault_Handler @@ -270,122 +273,122 @@ Reset_Handler ProxyHandler PendSV_Handler ProxyHandler SysTick_Handler - ProxyHandler SCU_0_IRQHandler - ProxyHandler ERU0_0_IRQHandler - ProxyHandler ERU0_1_IRQHandler - ProxyHandler ERU0_2_IRQHandler - ProxyHandler ERU0_3_IRQHandler - ProxyHandler ERU1_0_IRQHandler - ProxyHandler ERU1_1_IRQHandler - ProxyHandler ERU1_2_IRQHandler - ProxyHandler ERU1_3_IRQHandler - ProxyHandler PMU0_0_IRQHandler - ProxyHandler VADC0_C0_0_IRQHandler - ProxyHandler VADC0_C0_1_IRQHandler - ProxyHandler VADC0_C0_2_IRQHandler - ProxyHandler VADC0_C0_3_IRQHandler - ProxyHandler VADC0_G0_0_IRQHandler - ProxyHandler VADC0_G0_1_IRQHandler - ProxyHandler VADC0_G0_2_IRQHandler - ProxyHandler VADC0_G0_3_IRQHandler - ProxyHandler VADC0_G1_0_IRQHandler - ProxyHandler VADC0_G1_1_IRQHandler - ProxyHandler VADC0_G1_2_IRQHandler - ProxyHandler VADC0_G1_3_IRQHandler - ProxyHandler VADC0_G2_0_IRQHandler - ProxyHandler VADC0_G2_1_IRQHandler - ProxyHandler VADC0_G2_2_IRQHandler - ProxyHandler VADC0_G2_3_IRQHandler - ProxyHandler VADC0_G3_0_IRQHandler - ProxyHandler VADC0_G3_1_IRQHandler - ProxyHandler VADC0_G3_2_IRQHandler - ProxyHandler VADC0_G3_3_IRQHandler - ProxyHandler DSD0_0_IRQHandler - ProxyHandler DSD0_1_IRQHandler - ProxyHandler DSD0_2_IRQHandler - ProxyHandler DSD0_3_IRQHandler - ProxyHandler DSD0_4_IRQHandler - ProxyHandler DSD0_5_IRQHandler - ProxyHandler DSD0_6_IRQHandler - ProxyHandler DSD0_7_IRQHandler - ProxyHandler DAC0_0_IRQHandler - ProxyHandler DAC0_1_IRQHandler - ProxyHandler CCU40_0_IRQHandler - ProxyHandler CCU40_1_IRQHandler - ProxyHandler CCU40_2_IRQHandler - ProxyHandler CCU40_3_IRQHandler - ProxyHandler CCU41_0_IRQHandler - ProxyHandler CCU41_1_IRQHandler - ProxyHandler CCU41_2_IRQHandler - ProxyHandler CCU41_3_IRQHandler - ProxyHandler CCU42_0_IRQHandler - ProxyHandler CCU42_1_IRQHandler - ProxyHandler CCU42_2_IRQHandler - ProxyHandler CCU42_3_IRQHandler - ProxyHandler CCU43_0_IRQHandler - ProxyHandler CCU43_1_IRQHandler - ProxyHandler CCU43_2_IRQHandler - ProxyHandler CCU43_3_IRQHandler - ProxyHandler CCU80_0_IRQHandler - ProxyHandler CCU80_1_IRQHandler - ProxyHandler CCU80_2_IRQHandler - ProxyHandler CCU80_3_IRQHandler - ProxyHandler CCU81_0_IRQHandler - ProxyHandler CCU81_1_IRQHandler - ProxyHandler CCU81_2_IRQHandler - ProxyHandler CCU81_3_IRQHandler - ProxyHandler POSIF0_0_IRQHandler - ProxyHandler POSIF0_1_IRQHandler - ProxyHandler POSIF1_0_IRQHandler - ProxyHandler POSIF1_1_IRQHandler - ProxyHandler HRPWM_0_IRQHandler - ProxyHandler HRPWM_1_IRQHandler - ProxyHandler HRPWM_2_IRQHandler - ProxyHandler HRPWM_3_IRQHandler - ProxyHandler CAN0_0_IRQHandler - ProxyHandler CAN0_1_IRQHandler - ProxyHandler CAN0_2_IRQHandler - ProxyHandler CAN0_3_IRQHandler - ProxyHandler CAN0_4_IRQHandler - ProxyHandler CAN0_5_IRQHandler - ProxyHandler CAN0_6_IRQHandler - ProxyHandler CAN0_7_IRQHandler - ProxyHandler USIC0_0_IRQHandler - ProxyHandler USIC0_1_IRQHandler - ProxyHandler USIC0_2_IRQHandler - ProxyHandler USIC0_3_IRQHandler - ProxyHandler USIC0_4_IRQHandler - ProxyHandler USIC0_5_IRQHandler - ProxyHandler USIC1_0_IRQHandler - ProxyHandler USIC1_1_IRQHandler - ProxyHandler USIC1_2_IRQHandler - ProxyHandler USIC1_3_IRQHandler - ProxyHandler USIC1_4_IRQHandler - ProxyHandler USIC1_5_IRQHandler - ProxyHandler LEDTS0_0_IRQHandler - ProxyHandler FCE0_0_IRQHandler - ProxyHandler GPDMA0_0_IRQHandler - ProxyHandler USB0_0_IRQHandler - ProxyHandler ETH0_0_IRQHandler + ProxyHandler SCU_0_IRQHandler + ProxyHandler ERU0_0_IRQHandler + ProxyHandler ERU0_1_IRQHandler + ProxyHandler ERU0_2_IRQHandler + ProxyHandler ERU0_3_IRQHandler + ProxyHandler ERU1_0_IRQHandler + ProxyHandler ERU1_1_IRQHandler + ProxyHandler ERU1_2_IRQHandler + ProxyHandler ERU1_3_IRQHandler + ProxyHandler PMU0_0_IRQHandler + ProxyHandler VADC0_C0_0_IRQHandler + ProxyHandler VADC0_C0_1_IRQHandler + ProxyHandler VADC0_C0_2_IRQHandler + ProxyHandler VADC0_C0_3_IRQHandler + ProxyHandler VADC0_G0_0_IRQHandler + ProxyHandler VADC0_G0_1_IRQHandler + ProxyHandler VADC0_G0_2_IRQHandler + ProxyHandler VADC0_G0_3_IRQHandler + ProxyHandler VADC0_G1_0_IRQHandler + ProxyHandler VADC0_G1_1_IRQHandler + ProxyHandler VADC0_G1_2_IRQHandler + ProxyHandler VADC0_G1_3_IRQHandler + ProxyHandler VADC0_G2_0_IRQHandler + ProxyHandler VADC0_G2_1_IRQHandler + ProxyHandler VADC0_G2_2_IRQHandler + ProxyHandler VADC0_G2_3_IRQHandler + ProxyHandler VADC0_G3_0_IRQHandler + ProxyHandler VADC0_G3_1_IRQHandler + ProxyHandler VADC0_G3_2_IRQHandler + ProxyHandler VADC0_G3_3_IRQHandler + ProxyHandler DSD0_0_IRQHandler + ProxyHandler DSD0_1_IRQHandler + ProxyHandler DSD0_2_IRQHandler + ProxyHandler DSD0_3_IRQHandler + ProxyHandler DSD0_4_IRQHandler + ProxyHandler DSD0_5_IRQHandler + ProxyHandler DSD0_6_IRQHandler + ProxyHandler DSD0_7_IRQHandler + ProxyHandler DAC0_0_IRQHandler + ProxyHandler DAC0_1_IRQHandler + ProxyHandler CCU40_0_IRQHandler + ProxyHandler CCU40_1_IRQHandler + ProxyHandler CCU40_2_IRQHandler + ProxyHandler CCU40_3_IRQHandler + ProxyHandler CCU41_0_IRQHandler + ProxyHandler CCU41_1_IRQHandler + ProxyHandler CCU41_2_IRQHandler + ProxyHandler CCU41_3_IRQHandler + ProxyHandler CCU42_0_IRQHandler + ProxyHandler CCU42_1_IRQHandler + ProxyHandler CCU42_2_IRQHandler + ProxyHandler CCU42_3_IRQHandler + ProxyHandler CCU43_0_IRQHandler + ProxyHandler CCU43_1_IRQHandler + ProxyHandler CCU43_2_IRQHandler + ProxyHandler CCU43_3_IRQHandler + ProxyHandler CCU80_0_IRQHandler + ProxyHandler CCU80_1_IRQHandler + ProxyHandler CCU80_2_IRQHandler + ProxyHandler CCU80_3_IRQHandler + ProxyHandler CCU81_0_IRQHandler + ProxyHandler CCU81_1_IRQHandler + ProxyHandler CCU81_2_IRQHandler + ProxyHandler CCU81_3_IRQHandler + ProxyHandler POSIF0_0_IRQHandler + ProxyHandler POSIF0_1_IRQHandler + ProxyHandler POSIF1_0_IRQHandler + ProxyHandler POSIF1_1_IRQHandler + ProxyHandler HRPWM_0_IRQHandler + ProxyHandler HRPWM_1_IRQHandler + ProxyHandler HRPWM_2_IRQHandler + ProxyHandler HRPWM_3_IRQHandler + ProxyHandler CAN0_0_IRQHandler + ProxyHandler CAN0_1_IRQHandler + ProxyHandler CAN0_2_IRQHandler + ProxyHandler CAN0_3_IRQHandler + ProxyHandler CAN0_4_IRQHandler + ProxyHandler CAN0_5_IRQHandler + ProxyHandler CAN0_6_IRQHandler + ProxyHandler CAN0_7_IRQHandler + ProxyHandler USIC0_0_IRQHandler + ProxyHandler USIC0_1_IRQHandler + ProxyHandler USIC0_2_IRQHandler + ProxyHandler USIC0_3_IRQHandler + ProxyHandler USIC0_4_IRQHandler + ProxyHandler USIC0_5_IRQHandler + ProxyHandler USIC1_0_IRQHandler + ProxyHandler USIC1_1_IRQHandler + ProxyHandler USIC1_2_IRQHandler + ProxyHandler USIC1_3_IRQHandler + ProxyHandler USIC1_4_IRQHandler + ProxyHandler USIC1_5_IRQHandler + ProxyHandler LEDTS0_0_IRQHandler + ProxyHandler FCE0_0_IRQHandler + ProxyHandler GPDMA0_0_IRQHandler + ProxyHandler USB0_0_IRQHandler + ProxyHandler ETH0_0_IRQHandler ; Definition of the default weak SystemInit_DAVE3 function for DAVE3 system init. PUBWEAK SystemInit_DAVE3 SECTION .text:CODE:REORDER:NOROOT(2) SystemInit_DAVE3 - NOP + NOP BX LR - + ; Definition of the default weak DAVE3 function for clock App usage. ; AllowPLLInitByStartup Handler PUBWEAK AllowPLLInitByStartup SECTION .text:CODE:REORDER:NOROOT(2) -AllowPLLInitByStartup +AllowPLLInitByStartup MOV R0,#1 - BX LR + BX LR PREF_PCON EQU 0x58004000 SCU_GCU_PEEN EQU 0x5000413C SCU_GCU_PEFLAG EQU 0x50004150 - + END diff --git a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/system/startup_XMC4500.s b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/system/startup_XMC4500.s index b023c0286..b65450d90 100644 --- a/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/system/startup_XMC4500.s +++ b/FreeRTOS/Demo/CORTEX_M4F_Infineon_XMC4000_IAR/system/startup_XMC4500.s @@ -4,15 +4,15 @@ /** * @file Startup_XMC4500.s * XMC4000 Device Series -* @version V1.0 -* @date Jan 2013 +* @version V1.1 +* @date Augus 2013 * * Copyright (C) 2012 IAR Systems. All rights reserved. * Copyright (C) 2012 Infineon Technologies AG. All rights reserved. * * * @par -* Infineon Technologies AG (Infineon) is supplying this software for use with +* Infineon Technologies AG (Infineon) is supplying this software for use with * Infineon's microcontrollers. This file can be freely distributed * within development tools that are supporting such microcontrollers. * @@ -28,6 +28,8 @@ /* *************************************************************************** V1.0 January, 30 2013: In ths version a workoraound for the erratum PMU_CM.001 is implmented (patch for the Exception and interrupt handlers) +V1.1 Augsut, 17 2013: Fix the bug of preprocessor due to workoraound for +the erratum PMU_CM.001, and the bug of stack pointer alignment to a 8 byte boundary **************************************************************************** */ @@ -43,7 +45,7 @@ is implmented (patch for the Exception and interrupt handlers) SECTION .intvec:CODE:NOROOT(2) EXTERN __iar_program_start - EXTERN SystemInit + EXTERN SystemInit PUBLIC __vector_table DATA @@ -54,7 +56,7 @@ __iar_init$$done: ; The vector table is not needed ;/* ===========START : MACRO DEFINITION MACRO DEFINITION ================== */ ;/* ; * STEP_AB and below have the prefetch functional deviation (Errata id: PMU_CM.001). -; * A veneer defined below will first be executed which in turn branches to the final +; * A veneer defined below will first be executed which in turn branches to the final ; * exception handler. ; * ; * In addition to defining the veneers, the vector table must for these buggy @@ -62,8 +64,8 @@ __iar_init$$done: ; The vector table is not needed ; */ ;set WORKAROUND_PMU_CM001 under Options for target -;Initialize varaible WORKAROUND_PMU_CM001 as TRUE -WORKAROUND_PMU_CM001 SET 1 +;define WORKAROUND_PMU_CM001 as TRUE +#define WORKAROUND_PMU_CM001 1 ;/* A macro to setup a vector table entry based on STEP ID */ #ifdef WORKAROUND_PMU_CM001 @@ -73,7 +75,7 @@ ExcpVector macro #else ExcpVector macro DCD \1 - endm + endm #endif ;/* A macro to ease definition of the various handlers based on STEP ID */ @@ -84,18 +86,18 @@ ProxyHandler macro SECTION .text:CODE:REORDER:NOROOT(1) \1 B \1 - endm -;/* And then define a veneer that will branch to the final excp handler */ -ProxyHandler_Veneer macro - PUBWEAK \1 +;/* And then define a veneer that will branch to the final excp handler */ + PUBWEAK \1_Veneer SECTION .text:CODE:REORDER:NOROOT(2) -\1 - LDR R0, =ProxyHandler - PUSH {LR} +\1_Veneer: + LDR R0, =\1 + PUSH {LR} /* Breaks AAPCS */ + SUB SP,#4 /* Restores AAPCS */ BLX R0 + ADD SP,#4 POP {PC} endm - ;/* No prefetch bug, hence define only the final exception handler */ + ;/* No prefetch bug, hence define only the final exception handler */ #else ProxyHandler macro PUBWEAK \1 @@ -120,11 +122,11 @@ __vector_table DCD 0 DCD 0 DCD 0 - ExcpVector SVC_Handler ; SVCall Handler + ExcpVector SVC_Handler ExcpVector DebugMon_Handler DCD 0 - ExcpVector PendSV_Handler ; PendSV Handler - ExcpVector SysTick_Handler ; SysTick Handler + ExcpVector PendSV_Handler + ExcpVector SysTick_Handler ; Interrupt Handlers for Service Requests (SR) from XMC4500 Peripherals ExcpVector SCU_0_IRQHandler ; Handler name for SR SCU_0 @@ -246,19 +248,19 @@ __vector_table ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Default interrupt handlers. -;; +;; THUMB PUBWEAK Reset_Handler SECTION .text:CODE:REORDER(2) Reset_Handler LDR R0, =SystemInit - BLX R0 + BLX R0 LDR R0, =SystemInit_DAVE3 - BLX R0 + BLX R0 LDR R0, =__iar_program_start - BX R0 - + BX R0 + ProxyHandler NMI_Handler ProxyHandler HardFault_Handler @@ -269,7 +271,7 @@ Reset_Handler ProxyHandler DebugMon_Handler ProxyHandler PendSV_Handler ProxyHandler SysTick_Handler - + ProxyHandler SCU_0_IRQHandler ProxyHandler ERU0_0_IRQHandler ProxyHandler ERU0_1_IRQHandler @@ -372,26 +374,26 @@ Reset_Handler ProxyHandler USB0_0_IRQHandler ProxyHandler ETH0_0_IRQHandler ProxyHandler GPDMA1_0_IRQHandler - - + + ; Definition of the default weak SystemInit_DAVE3 function for DAVE3 system init. PUBWEAK SystemInit_DAVE3 SECTION .text:CODE:REORDER:NOROOT(2) SystemInit_DAVE3 - NOP + NOP BX LR - + ; Definition of the default weak DAVE3 function for clock App usage. ; AllowPLLInitByStartup Handler PUBWEAK AllowPLLInitByStartup SECTION .text:CODE:REORDER:NOROOT(2) -AllowPLLInitByStartup +AllowPLLInitByStartup MOV R0,#1 - BX LR + BX LR PREF_PCON EQU 0x58004000 SCU_GCU_PEEN EQU 0x5000413C SCU_GCU_PEFLAG EQU 0x50004150 - + END -- 2.39.5