mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 05:21:59 -04:00
Finalise XMC4000 IAR demos.
This commit is contained in:
parent
1e248417bc
commit
0185643b39
|
@ -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. */
|
||||
#define vPortSVCHandler SVC_Handler
|
||||
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 xPortSysTickHandler SysTick_Handler
|
||||
|
||||
/* Demo application specific settings. */
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
||||
|
|
|
@ -62,14 +62,14 @@
|
|||
|
||||
|
||||
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>99</YPos2><SelStart2>5611</SelStart2><SelEnd2>5611</SelEnd2></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main_blinky.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>60</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main_full.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>63</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>84</YPos2><SelStart2>5611</SelStart2><SelEnd2>5611</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main_blinky.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>188</YPos2><SelStart2>9833</SelStart2><SelEnd2>9833</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main_full.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>63</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\portable\IAR\ARM_CM4F\port.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>348</YPos2><SelStart2>14503</SelStart2><SelEnd2>14503</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\..\..\Source\portable\IAR\ARM_CM4F\portasm.s</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>104</YPos2><SelStart2>4789</SelStart2><SelEnd2>4789</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\system\startup_XMC4400.s</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>254</YPos2><SelStart2>14858</SelStart2><SelEnd2>14858</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\RegTest.s</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>114</YPos2><SelStart2>5036</SelStart2><SelEnd2>5036</SelEnd2></Tab><ActiveTab>6</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Positions>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Top><Row0><Sizes><Toolbar-01348fe8><key>iaridepm.enu1</key></Toolbar-01348fe8></Sizes></Row0><Row1><Sizes><Toolbar-0d011448><key>debuggergui.enu1</key></Toolbar-0d011448></Sizes></Row1><Row2><Sizes><Toolbar-0d010b20><key>armjlink.enu1</key></Toolbar-0d010b20></Sizes></Row2></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>692</Bottom><Right>279</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>119048</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>167262</sizeVertCX><sizeVertCY>706721</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>200</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203666</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
<Top><Row0><Sizes><Toolbar-01348e70><key>iaridepm.enu1</key></Toolbar-01348e70></Sizes></Row0><Row1><Sizes><Toolbar-10e58c38><key>debuggergui.enu1</key></Toolbar-10e58c38></Sizes></Row1><Row2><Sizes><Toolbar-202d5380><key>armjlink.enu1</key></Toolbar-202d5380></Sizes></Row2></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>692</Bottom><Right>279</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>119048</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>167262</sizeVertCX><sizeVertCY>706721</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>200</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203666</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
</Desktop>
|
||||
</Project>
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<Workspace>
|
||||
<ConfigDictionary>
|
||||
|
||||
<CurrentConfigs><Project>RTOSDemo/XMC4400</Project></CurrentConfigs></ConfigDictionary>
|
||||
<CurrentConfigs><Project>RTOSDemo/XMC4500</Project></CurrentConfigs></ConfigDictionary>
|
||||
<Desktop>
|
||||
<Static>
|
||||
<Workspace>
|
||||
|
@ -25,7 +25,7 @@
|
|||
<Windows>
|
||||
|
||||
|
||||
<Wnd0>
|
||||
<Wnd2>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-29494-21985</Identity>
|
||||
|
@ -37,7 +37,7 @@
|
|||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd0><Wnd1>
|
||||
<SelectedTab>0</SelectedTab></Wnd2><Wnd3>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-28344-23030</Identity>
|
||||
|
@ -47,20 +47,20 @@
|
|||
</Tab>
|
||||
<Tab><Identity>TabID-19430-2343</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab></Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd1></Windows>
|
||||
<SelectedTab>0</SelectedTab></Wnd3></Windows>
|
||||
<Editor>
|
||||
|
||||
|
||||
|
||||
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>60</YPos2><SelStart2>5529</SelStart2><SelEnd2>5529</SelEnd2></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main_blinky.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>60</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main_full.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>63</YPos2><SelStart2>0</SelStart2><SelEnd2>0</SelEnd2></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>$WS_DIR$\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd><XPos2>0</XPos2><YPos2>60</YPos2><SelStart2>5611</SelStart2><SelEnd2>5611</SelEnd2></Tab><ActiveTab>0</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Positions>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Top><Row0><Sizes><Toolbar-01348fe8><key>iaridepm.enu1</key></Toolbar-01348fe8></Sizes></Row0><Row1><Sizes/></Row1></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>740</Bottom><Right>389</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>119048</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>232738</sizeVertCX><sizeVertCY>755601</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>200</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203666</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
<Top><Row0><Sizes><Toolbar-01348e70><key>iaridepm.enu1</key></Toolbar-01348e70></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>740</Bottom><Right>389</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>119048</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>232738</sizeVertCX><sizeVertCY>755601</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>200</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203666</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
</Desktop>
|
||||
</Workspace>
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
/*
|
||||
* @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.
|
||||
|
@ -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
|
||||
|
||||
**************************************************************************** */
|
||||
|
||||
|
@ -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
|
||||
|
@ -84,15 +86,15 @@ 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
|
||||
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 */
|
||||
|
@ -121,7 +123,7 @@ __vector_table
|
|||
DCD 0 ; Reserved
|
||||
DCD 0 ; Reserved
|
||||
ExcpVector SVC_Handler ; SVCall Handler
|
||||
DCD DebugMon_Handler ; Debug Monitor Handler
|
||||
ExcpVector DebugMon_Handler ; Debug Monitor Handler
|
||||
DCD 0 ; Reserved
|
||||
ExcpVector PendSV_Handler ; PendSV Handler
|
||||
ExcpVector SysTick_Handler ; SysTick Handler
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
/**
|
||||
* @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.
|
||||
|
@ -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
|
||||
|
||||
**************************************************************************** */
|
||||
|
||||
|
@ -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
|
||||
|
@ -84,17 +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
|
||||
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 */
|
||||
#else
|
||||
ProxyHandler macro
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
/**
|
||||
* @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.
|
||||
|
@ -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
|
||||
|
||||
**************************************************************************** */
|
||||
|
||||
|
@ -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
|
||||
|
@ -84,15 +86,15 @@ 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
|
||||
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 */
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue