mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2026-09-25 21:03:52 +08:00
Continue work on Get clock settings in Keil and IAR XMC1000 demo working.
This commit is contained in:
@@ -78,8 +78,11 @@
|
||||
* See http://www.freertos.org/a00110.html.
|
||||
*----------------------------------------------------------*/
|
||||
|
||||
#include <stdint.h>
|
||||
extern uint32_t SystemCoreClock;
|
||||
/* Prevent C code being included by the IAR assembler. */
|
||||
#ifndef __IASMARM__
|
||||
#include <stdint.h>
|
||||
extern uint32_t SystemCoreClock;
|
||||
#endif
|
||||
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
@@ -88,14 +91,14 @@ extern uint32_t SystemCoreClock;
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 60 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 3000 ) )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 6000 ) )
|
||||
#define configMAX_TASK_NAME_LEN ( 5 )
|
||||
#define configUSE_TRACE_FACILITY 1
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
#define configIDLE_SHOULD_YIELD 1
|
||||
#define configUSE_MUTEXES 1
|
||||
#define configQUEUE_REGISTRY_SIZE 8
|
||||
#define configCHECK_FOR_STACK_OVERFLOW 1
|
||||
#define configCHECK_FOR_STACK_OVERFLOW 2
|
||||
#define configUSE_RECURSIVE_MUTEXES 1
|
||||
#define configUSE_MALLOC_FAILED_HOOK 1
|
||||
#define configUSE_APPLICATION_TASK_TAG 0
|
||||
|
||||
@@ -102,22 +102,27 @@ void vParTestInitialise( void )
|
||||
/* P0.0 */
|
||||
PORT0->IOCR0 &= ~( ( 0xFFUL << 0 ) );
|
||||
PORT0->IOCR0 |= ( 0x80UL << 0 );
|
||||
vParTestSetLED( 0, pdFALSE );
|
||||
|
||||
/* P0.2 */
|
||||
PORT0->IOCR0 &= ~( ( 0xFFUL << 16 ) );
|
||||
PORT0->IOCR0 |= ( 0x80UL << 16 );
|
||||
vParTestSetLED( 1, pdFALSE );
|
||||
|
||||
/* P0.5 */
|
||||
PORT0->IOCR4 &= ~( ( 0xFFUL << 8 ) );
|
||||
PORT0->IOCR4 |= ( 0x80UL << 8 );
|
||||
vParTestSetLED( 2, pdFALSE );
|
||||
|
||||
/* P0.6 */
|
||||
PORT0->IOCR4 &= ~( ( 0xFFUL << 16 ) );
|
||||
PORT0->IOCR4 |= ( 0x80UL << 16 );
|
||||
vParTestSetLED( 3, pdFALSE );
|
||||
|
||||
/* P0.7 */
|
||||
PORT0->IOCR4 &= ~( ( 0xFFUL << 24 ) );
|
||||
PORT0->IOCR4 |= ( 0x80UL << 24 );
|
||||
vParTestSetLED( 4, pdFALSE );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
@@ -127,12 +132,12 @@ void vParTestSetLED( unsigned long ulLED, signed portBASE_TYPE xValue )
|
||||
{
|
||||
if( xValue == pdTRUE )
|
||||
{
|
||||
/* Turn the LED on. */
|
||||
/* Turn the LED on. */
|
||||
PORT0->OMR = ( ulLEDBits[ ulLED ] << partstON_SHIFT );
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Turn the LED off. */
|
||||
/* Turn the LED off. */
|
||||
PORT0->OMR = ( ulLEDBits[ ulLED ] << partstOFF_SHIFT );
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<workspace>
|
||||
<project>
|
||||
<path>$WS_DIR$\RTOSDemo.ewp</path>
|
||||
</project>
|
||||
<batchBuild>
|
||||
<batchDefinition>
|
||||
<name>All</name>
|
||||
<member>
|
||||
<project>RTOSDemo</project>
|
||||
<configuration>Debug</configuration>
|
||||
</member>
|
||||
</batchDefinition>
|
||||
</batchBuild>
|
||||
</workspace>
|
||||
|
||||
|
||||
@@ -292,7 +292,7 @@
|
||||
<sRfunc>1</sRfunc>
|
||||
<sRbox>1</sRbox>
|
||||
<tLdApp>1</tLdApp>
|
||||
<tGomain>1</tGomain>
|
||||
<tGomain>0</tGomain>
|
||||
<tRbreak>1</tRbreak>
|
||||
<tRwatch>1</tRwatch>
|
||||
<tRmem>1</tRmem>
|
||||
@@ -318,12 +318,12 @@
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>DLGTARM</Key>
|
||||
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)</Name>
|
||||
<Name>(1010=75,100,441,520,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)</Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>DLGUARM</Key>
|
||||
<Name></Name>
|
||||
<Name>/</Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
@@ -346,14 +346,48 @@
|
||||
<Name>-O207 -S0 -C0 -FO7 -FD20000000 -FC800 -FN1 -FF0XMC1200_200 -FS010001000 -FL032000)</Name>
|
||||
</SetRegEntry>
|
||||
</TargetDriverDllRegistry>
|
||||
<Breakpoint/>
|
||||
<Breakpoint>
|
||||
<Bp>
|
||||
<Number>0</Number>
|
||||
<Type>2</Type>
|
||||
<LineNumber>0</LineNumber>
|
||||
<EnabledFlag>0</EnabledFlag>
|
||||
<Address>536871376</Address>
|
||||
<ByteObject>0</ByteObject>
|
||||
<HtxType>0</HtxType>
|
||||
<ManyObjects>1</ManyObjects>
|
||||
<SizeOfObject>1</SizeOfObject>
|
||||
<BreakByAccess>2</BreakByAccess>
|
||||
<BreakIfRCount>1</BreakIfRCount>
|
||||
<Filename></Filename>
|
||||
<ExecCommand></ExecCommand>
|
||||
<Expression>0x200001d0</Expression>
|
||||
</Bp>
|
||||
</Breakpoint>
|
||||
<WatchWindow1>
|
||||
<Ww>
|
||||
<count>0</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>uxCriticalNesting</ItemText>
|
||||
<ItemText>*(unsigned long*)0xE000ED00</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>1</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>*(unsigned long*)0x00</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>2</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>*(unsigned long*)0x04</ItemText>
|
||||
</Ww>
|
||||
</WatchWindow1>
|
||||
<MemoryWindow1>
|
||||
<Mm>
|
||||
<WinNumber>1</WinNumber>
|
||||
<SubType>2</SubType>
|
||||
<ItemText>0x10001000</ItemText>
|
||||
</Mm>
|
||||
</MemoryWindow1>
|
||||
<Tracepoint>
|
||||
<THDelay>0</THDelay>
|
||||
</Tracepoint>
|
||||
@@ -402,8 +436,8 @@
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>0</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>1</CurrentLine>
|
||||
<TopLine>0</TopLine>
|
||||
<CurrentLine>0</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\System_Keil\system_XMC1300.c</PathWithFileName>
|
||||
<FilenameWithoutPath>system_XMC1300.c</FilenameWithoutPath>
|
||||
@@ -418,8 +452,8 @@
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>0</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>1</CurrentLine>
|
||||
<TopLine>0</TopLine>
|
||||
<CurrentLine>0</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\System_Keil\system_XMC1100.c</PathWithFileName>
|
||||
<FilenameWithoutPath>system_XMC1100.c</FilenameWithoutPath>
|
||||
@@ -434,14 +468,30 @@
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>0</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>1</CurrentLine>
|
||||
<TopLine>60</TopLine>
|
||||
<CurrentLine>98</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\System_Keil\system_XMC1200.c</PathWithFileName>
|
||||
<FilenameWithoutPath>system_XMC1200.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>1</GroupNumber>
|
||||
<FileNumber>4</FileNumber>
|
||||
<FileType>2</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>0</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>73</TopLine>
|
||||
<CurrentLine>132</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\System_Keil\startup_XMC1300.s</PathWithFileName>
|
||||
<FilenameWithoutPath>startup_XMC1300.s</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
<Group>
|
||||
@@ -452,14 +502,14 @@
|
||||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>2</GroupNumber>
|
||||
<FileNumber>4</FileNumber>
|
||||
<FileNumber>5</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>0</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>346</TopLine>
|
||||
<CurrentLine>369</CurrentLine>
|
||||
<TopLine>0</TopLine>
|
||||
<CurrentLine>0</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\Source\timers.c</PathWithFileName>
|
||||
<FilenameWithoutPath>timers.c</FilenameWithoutPath>
|
||||
@@ -468,14 +518,14 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>2</GroupNumber>
|
||||
<FileNumber>5</FileNumber>
|
||||
<FileNumber>6</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>0</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>150</TopLine>
|
||||
<CurrentLine>198</CurrentLine>
|
||||
<TopLine>0</TopLine>
|
||||
<CurrentLine>0</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\Source\list.c</PathWithFileName>
|
||||
<FilenameWithoutPath>list.c</FilenameWithoutPath>
|
||||
@@ -484,7 +534,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>2</GroupNumber>
|
||||
<FileNumber>6</FileNumber>
|
||||
<FileNumber>7</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -500,14 +550,14 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>2</GroupNumber>
|
||||
<FileNumber>7</FileNumber>
|
||||
<FileNumber>8</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>0</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>1824</TopLine>
|
||||
<CurrentLine>1847</CurrentLine>
|
||||
<TopLine>2113</TopLine>
|
||||
<CurrentLine>2137</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\Source\tasks.c</PathWithFileName>
|
||||
<FilenameWithoutPath>tasks.c</FilenameWithoutPath>
|
||||
@@ -516,14 +566,14 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>2</GroupNumber>
|
||||
<FileNumber>8</FileNumber>
|
||||
<FileNumber>9</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>0</ColumnNumber>
|
||||
<ColumnNumber>2</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>291</TopLine>
|
||||
<CurrentLine>292</CurrentLine>
|
||||
<TopLine>0</TopLine>
|
||||
<CurrentLine>0</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\..\Source\portable\RVDS\ARM_CM0\port.c</PathWithFileName>
|
||||
<FilenameWithoutPath>port.c</FilenameWithoutPath>
|
||||
@@ -532,7 +582,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>2</GroupNumber>
|
||||
<FileNumber>9</FileNumber>
|
||||
<FileNumber>10</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -556,14 +606,14 @@
|
||||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>10</FileNumber>
|
||||
<FileNumber>11</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>0</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>112</TopLine>
|
||||
<CurrentLine>122</CurrentLine>
|
||||
<TopLine>133</TopLine>
|
||||
<CurrentLine>142</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\main.c</PathWithFileName>
|
||||
<FilenameWithoutPath>main.c</FilenameWithoutPath>
|
||||
@@ -572,14 +622,14 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>11</FileNumber>
|
||||
<FileNumber>12</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>0</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>186</TopLine>
|
||||
<CurrentLine>194</CurrentLine>
|
||||
<TopLine>133</TopLine>
|
||||
<CurrentLine>101</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\main-blinky.c</PathWithFileName>
|
||||
<FilenameWithoutPath>main-blinky.c</FilenameWithoutPath>
|
||||
@@ -588,14 +638,14 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>12</FileNumber>
|
||||
<FileNumber>13</FileNumber>
|
||||
<FileType>5</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>41</ColumnNumber>
|
||||
<ColumnNumber>2</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>74</TopLine>
|
||||
<CurrentLine>98</CurrentLine>
|
||||
<TopLine>71</TopLine>
|
||||
<CurrentLine>71</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\FreeRTOSConfig.h</PathWithFileName>
|
||||
<FilenameWithoutPath>FreeRTOSConfig.h</FilenameWithoutPath>
|
||||
@@ -604,36 +654,20 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>13</FileNumber>
|
||||
<FileNumber>14</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>0</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>0</TopLine>
|
||||
<CurrentLine>0</CurrentLine>
|
||||
<TopLine>304</TopLine>
|
||||
<CurrentLine>339</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\main-full.c</PathWithFileName>
|
||||
<FilenameWithoutPath>main-full.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>14</FileNumber>
|
||||
<FileType>2</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>14</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>0</TopLine>
|
||||
<CurrentLine>0</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\RegTest.s</PathWithFileName>
|
||||
<FilenameWithoutPath>RegTest.s</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>15</FileNumber>
|
||||
@@ -642,14 +676,30 @@
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>0</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>1</TopLine>
|
||||
<CurrentLine>1</CurrentLine>
|
||||
<TopLine>0</TopLine>
|
||||
<CurrentLine>0</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\ParTest_XMC1200.c</PathWithFileName>
|
||||
<FilenameWithoutPath>ParTest_XMC1200.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>3</GroupNumber>
|
||||
<FileNumber>16</FileNumber>
|
||||
<FileType>2</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
<ColumnNumber>0</ColumnNumber>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<TopLine>0</TopLine>
|
||||
<CurrentLine>0</CurrentLine>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>.\RegTest_Keil.s</PathWithFileName>
|
||||
<FilenameWithoutPath>RegTest_Keil.s</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
</File>
|
||||
</Group>
|
||||
|
||||
<Group>
|
||||
@@ -660,7 +710,7 @@
|
||||
<RteFlg>0</RteFlg>
|
||||
<File>
|
||||
<GroupNumber>4</GroupNumber>
|
||||
<FileNumber>16</FileNumber>
|
||||
<FileNumber>17</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -676,7 +726,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>4</GroupNumber>
|
||||
<FileNumber>17</FileNumber>
|
||||
<FileNumber>18</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -692,7 +742,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>4</GroupNumber>
|
||||
<FileNumber>18</FileNumber>
|
||||
<FileNumber>19</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
@@ -708,7 +758,7 @@
|
||||
</File>
|
||||
<File>
|
||||
<GroupNumber>4</GroupNumber>
|
||||
<FileNumber>19</FileNumber>
|
||||
<FileNumber>20</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<Focus>0</Focus>
|
||||
|
||||
@@ -407,6 +407,11 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>.\System_Keil\system_XMC1200.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>startup_XMC1300.s</FileName>
|
||||
<FileType>2</FileType>
|
||||
<FilePath>.\System_Keil\startup_XMC1300.s</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
@@ -467,11 +472,6 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>.\main-full.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>RegTest.s</FileName>
|
||||
<FileType>2</FileType>
|
||||
<FilePath>.\RegTest.s</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>ParTest_XMC1200.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
@@ -517,6 +517,11 @@
|
||||
</FileArmAds>
|
||||
</FileOption>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>RegTest_Keil.s</FileName>
|
||||
<FileType>2</FileType>
|
||||
<FilePath>.\RegTest_Keil.s</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
@@ -670,7 +675,7 @@
|
||||
<Target>
|
||||
<UseTarget>1</UseTarget>
|
||||
<LoadApplicationAtStartup>1</LoadApplicationAtStartup>
|
||||
<RunToMain>1</RunToMain>
|
||||
<RunToMain>0</RunToMain>
|
||||
<RestoreBreakpoints>1</RestoreBreakpoints>
|
||||
<RestoreWatchpoints>1</RestoreWatchpoints>
|
||||
<RestoreMemoryDisplay>1</RestoreMemoryDisplay>
|
||||
@@ -888,7 +893,7 @@
|
||||
<uThumb>0</uThumb>
|
||||
<uSurpInc>0</uSurpInc>
|
||||
<VariousControls>
|
||||
<MiscControls></MiscControls>
|
||||
<MiscControls>--c99</MiscControls>
|
||||
<Define></Define>
|
||||
<Undefine></Undefine>
|
||||
<IncludePath>..\CORTEX_M0_Infineon_Boot_Kits_IAR_Keil;..\..\Source\include;..\..\Source\portable\RVDS\ARM_CM0;..\Common\include</IncludePath>
|
||||
@@ -1027,6 +1032,11 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>.\System_Keil\system_XMC1200.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>startup_XMC1300.s</FileName>
|
||||
<FileType>2</FileType>
|
||||
<FilePath>.\System_Keil\startup_XMC1300.s</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
@@ -1087,11 +1097,6 @@
|
||||
<FileType>1</FileType>
|
||||
<FilePath>.\main-full.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>RegTest.s</FileName>
|
||||
<FileType>2</FileType>
|
||||
<FilePath>.\RegTest.s</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>ParTest_XMC1200.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
@@ -1137,6 +1142,11 @@
|
||||
</FileArmAds>
|
||||
</FileOption>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>RegTest_Keil.s</FileName>
|
||||
<FileType>2</FileType>
|
||||
<FilePath>.\RegTest_Keil.s</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
|
||||
@@ -0,0 +1,228 @@
|
||||
/*
|
||||
FreeRTOS V7.5.2 - Copyright (C) 2013 Real Time Engineers Ltd.
|
||||
|
||||
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS provides completely free yet professionally developed, *
|
||||
* robust, strictly quality controlled, supported, and cross *
|
||||
* platform software that has become a de facto standard. *
|
||||
* *
|
||||
* Help yourself get started quickly and support the FreeRTOS *
|
||||
* project by purchasing a FreeRTOS tutorial book, reference *
|
||||
* manual, or both from: http://www.FreeRTOS.org/Documentation *
|
||||
* *
|
||||
* Thank you! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.
|
||||
|
||||
>>! NOTE: The modification to the GPL is included to allow you to distribute
|
||||
>>! a combined work that includes FreeRTOS without being obliged to provide
|
||||
>>! the source code for proprietary components outside of the FreeRTOS
|
||||
>>! kernel.
|
||||
|
||||
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
FOR A PARTICULAR PURPOSE. Full license text is available from the following
|
||||
link: http://www.freertos.org/a00114.html
|
||||
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Having a problem? Start by reading the FAQ "My application does *
|
||||
* not run, what could be wrong?" *
|
||||
* *
|
||||
* http://www.FreeRTOS.org/FAQHelp.html *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
http://www.FreeRTOS.org - Documentation, books, training, latest versions,
|
||||
license and Real Time Engineers Ltd. contact details.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool, a DOS
|
||||
compatible FAT file system, and our tiny thread aware UDP/IP stack.
|
||||
|
||||
http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
|
||||
Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS
|
||||
licenses offer ticketed support, indemnification and middleware.
|
||||
|
||||
http://www.SafeRTOS.com - High Integrity Systems also provide a safety
|
||||
engineered and independently SIL3 certified version for use in safety and
|
||||
mission critical applications that require provable dependability.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
RSEG CODE:CODE(2)
|
||||
thumb
|
||||
|
||||
|
||||
EXTERN ulRegTest1LoopCounter
|
||||
EXTERN ulRegTest2LoopCounter
|
||||
|
||||
PUBLIC vRegTest1Task
|
||||
PUBLIC vRegTest2Task
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
vRegTest1Task
|
||||
|
||||
/* Fill the core registers with known values. This is only done once. */
|
||||
movs r1, #101
|
||||
movs r2, #102
|
||||
movs r3, #103
|
||||
movs r4, #104
|
||||
movs r5, #105
|
||||
movs r6, #106
|
||||
movs r7, #107
|
||||
movs r0, #108
|
||||
mov r8, r0
|
||||
movs r0, #109
|
||||
mov r9, r0
|
||||
movs r0, #110
|
||||
mov r10, r0
|
||||
movs r0, #111
|
||||
mov r11, r0
|
||||
movs r0, #112
|
||||
mov r12, r0
|
||||
movs r0, #100
|
||||
|
||||
reg1_loop
|
||||
/* Repeatedly check that each register still contains the value written to
|
||||
it when the task started. */
|
||||
cmp r0, #100
|
||||
bne reg1_error_loop
|
||||
cmp r1, #101
|
||||
bne reg1_error_loop
|
||||
cmp r2, #102
|
||||
bne reg1_error_loop
|
||||
cmp r3, #103
|
||||
bne reg1_error_loop
|
||||
cmp r4, #104
|
||||
bne reg1_error_loop
|
||||
cmp r5, #105
|
||||
bne reg1_error_loop
|
||||
cmp r6, #106
|
||||
bne reg1_error_loop
|
||||
cmp r7, #107
|
||||
bne reg1_error_loop
|
||||
movs r0, #108
|
||||
cmp r8, r0
|
||||
bne reg1_error_loop
|
||||
movs r0, #109
|
||||
cmp r9, r0
|
||||
bne reg1_error_loop
|
||||
movs r0, #110
|
||||
cmp r10, r0
|
||||
bne reg1_error_loop
|
||||
movs r0, #111
|
||||
cmp r11, r0
|
||||
bne reg1_error_loop
|
||||
movs r0, #112
|
||||
cmp r12, r0
|
||||
bne reg1_error_loop
|
||||
|
||||
/* Everything passed, increment the loop counter. */
|
||||
push { r1 }
|
||||
ldr r0, =ulRegTest1LoopCounter
|
||||
ldr r1, [r0]
|
||||
adds r1, r1, #1
|
||||
str r1, [r0]
|
||||
pop { r1 }
|
||||
|
||||
/* Start again. */
|
||||
movs r0, #100
|
||||
b reg1_loop
|
||||
|
||||
reg1_error_loop
|
||||
/* If this line is hit then there was an error in a core register value.
|
||||
The loop ensures the loop counter stops incrementing. */
|
||||
b reg1_error_loop
|
||||
nop
|
||||
|
||||
|
||||
|
||||
vRegTest2Task
|
||||
|
||||
/* Fill the core registers with known values. This is only done once. */
|
||||
movs r1, #1
|
||||
movs r2, #2
|
||||
movs r3, #3
|
||||
movs r4, #4
|
||||
movs r5, #5
|
||||
movs r6, #6
|
||||
movs r7, #7
|
||||
movs r0, #8
|
||||
mov r8, r0
|
||||
movs r0, #9
|
||||
mov r9, r0
|
||||
movs r0, #10
|
||||
mov r10, r0
|
||||
movs r0, #11
|
||||
mov r11, r0
|
||||
movs r0, #12
|
||||
mov r12, r0
|
||||
movs r0, #10
|
||||
|
||||
reg2_loop
|
||||
/* Repeatedly check that each register still contains the value written to
|
||||
it when the task started. */
|
||||
cmp r0, #10
|
||||
bne reg2_error_loop
|
||||
cmp r1, #1
|
||||
bne reg2_error_loop
|
||||
cmp r2, #2
|
||||
bne reg2_error_loop
|
||||
cmp r3, #3
|
||||
bne reg2_error_loop
|
||||
cmp r4, #4
|
||||
bne reg2_error_loop
|
||||
cmp r5, #5
|
||||
bne reg2_error_loop
|
||||
cmp r6, #6
|
||||
bne reg2_error_loop
|
||||
cmp r7, #7
|
||||
bne reg2_error_loop
|
||||
movs r0, #8
|
||||
cmp r8, r0
|
||||
bne reg2_error_loop
|
||||
movs r0, #9
|
||||
cmp r9, r0
|
||||
bne reg2_error_loop
|
||||
movs r0, #10
|
||||
cmp r10, r0
|
||||
bne reg2_error_loop
|
||||
movs r0, #11
|
||||
cmp r11, r0
|
||||
bne reg2_error_loop
|
||||
movs r0, #12
|
||||
cmp r12, r0
|
||||
bne reg2_error_loop
|
||||
|
||||
/* Everything passed, increment the loop counter. */
|
||||
push { r1 }
|
||||
ldr r0, =ulRegTest2LoopCounter
|
||||
ldr r1, [r0]
|
||||
adds r1, r1, #1
|
||||
str r1, [r0]
|
||||
pop { r1 }
|
||||
|
||||
/* Start again. */
|
||||
movs r0, #10
|
||||
b reg2_loop
|
||||
|
||||
reg2_error_loop
|
||||
;/* If this line is hit then there was an error in a core register value.
|
||||
;The loop ensures the loop counter stops incrementing. */
|
||||
b reg2_error_loop
|
||||
nop
|
||||
|
||||
END
|
||||
+7
@@ -69,6 +69,8 @@
|
||||
IMPORT ulRegTest1LoopCounter
|
||||
IMPORT ulRegTest2LoopCounter
|
||||
|
||||
EXTERN vPortYield ;////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
EXPORT vRegTest1Task
|
||||
EXPORT vRegTest2Task
|
||||
|
||||
@@ -142,6 +144,11 @@ reg1_loop
|
||||
|
||||
;/* Start again. */
|
||||
movs r0, #100
|
||||
|
||||
push {r0-r1}
|
||||
bl vPortYield ;;///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
pop {r0-r1}
|
||||
|
||||
b reg1_loop
|
||||
|
||||
reg1_error_loop
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,371 @@
|
||||
;************************************************
|
||||
;*
|
||||
;* Part one of the system initialization code, contains low-level
|
||||
;* initialization, plain thumb variant.
|
||||
;*
|
||||
;* Copyright 2013 IAR Systems. All rights reserved.
|
||||
;*
|
||||
;* $Revision: 64600 $
|
||||
;*
|
||||
;******************* Version History **********************************************
|
||||
;
|
||||
; V6, May, 16,2013 TYS:a) Add XMC1200_SCU.inc
|
||||
;
|
||||
;**********************************************************************************
|
||||
;
|
||||
; The modules in this file are included in the libraries, and may be replaced
|
||||
; by any user-defined modules that define the PUBLIC symbol _program_start or
|
||||
; a user defined start symbol.
|
||||
; To override the cstartup defined in the library, simply add your modified
|
||||
; version to the workbench project.
|
||||
;
|
||||
; Cortex-M version
|
||||
;
|
||||
|
||||
MODULE ?cstartup
|
||||
#ifdef DAVE_CE
|
||||
#include "XMC1200_SCU.inc"
|
||||
#include "Device_Data.h"
|
||||
#else
|
||||
#define CLKVAL1_SSW 0x00000100
|
||||
#define CLKVAL2_SSW 0x00000000
|
||||
#endif
|
||||
|
||||
;; Forward declaration of sections.
|
||||
SECTION CSTACK:DATA:NOROOT(3)
|
||||
SECTION .intvec:CODE:NOROOT(2)
|
||||
|
||||
EXTERN __iar_program_start
|
||||
PUBLIC __vector_table
|
||||
|
||||
DATA
|
||||
__vector_table
|
||||
DCD sfe(CSTACK)
|
||||
DCD Reset_Handler ; Reset Handler
|
||||
DCD 0 ; 0x8
|
||||
DCD 0 ; 0xC
|
||||
DCD CLKVAL1_SSW ; 0x10 CLK_VAL1 - (CLKCR default)
|
||||
DCD CLKVAL2_SSW ; 0x14 CLK_VAL2 - (CGATCLR0 default)
|
||||
|
||||
SECTION .vect_table:CODE:ROOT(2)
|
||||
THUMB
|
||||
LDR R0,=HardFault_Handler
|
||||
BX R0
|
||||
LDR R0,=Undef_Handler
|
||||
BX R0
|
||||
LDR R0,=Undef_Handler
|
||||
BX R0
|
||||
LDR R0,=Undef_Handler
|
||||
BX R0
|
||||
LDR R0,=Undef_Handler
|
||||
BX R0
|
||||
LDR R0,=Undef_Handler
|
||||
BX R0
|
||||
LDR R0,=Undef_Handler
|
||||
BX R0
|
||||
LDR R0,=Undef_Handler
|
||||
BX R0
|
||||
LDR R0,=SVC_Handler
|
||||
BX R0
|
||||
LDR R0,=Undef_Handler
|
||||
BX R0
|
||||
LDR R0,=Undef_Handler
|
||||
BX R0
|
||||
LDR R0,=PendSV_Handler
|
||||
BX R0
|
||||
LDR R0,=SysTick_Handler
|
||||
BX R0
|
||||
|
||||
; External Interrupts
|
||||
LDR R0,=SCU_0_IRQHandler ; Handler name for SR SCU_0
|
||||
BX R0
|
||||
LDR R0,=SCU_1_IRQHandler ; Handler name for SR SCU_1
|
||||
BX R0
|
||||
LDR R0,=SCU_2_IRQHandler ; Handler name for SR SCU_2
|
||||
BX R0
|
||||
LDR R0,=ERU0_0_IRQHandler ; Handler name for SR ERU0_0
|
||||
BX R0
|
||||
LDR R0,=ERU0_1_IRQHandler ; Handler name for SR ERU0_1
|
||||
BX R0
|
||||
LDR R0,=ERU0_2_IRQHandler ; Handler name for SR ERU0_2
|
||||
BX R0
|
||||
LDR R0,=ERU0_3_IRQHandler ; Handler name for SR ERU0_3
|
||||
BX R0
|
||||
LDR R0,=Undef_Handler ; Not Available
|
||||
BX R0
|
||||
LDR R0,=Undef_Handler ; Not Available
|
||||
BX R0
|
||||
LDR R0,=USIC0_0_IRQHandler ; Handler name for SR USIC0_0
|
||||
BX R0
|
||||
LDR R0,=USIC0_1_IRQHandler ; Handler name for SR USIC0_1
|
||||
BX R0
|
||||
LDR R0,=USIC0_2_IRQHandler ; Handler name for SR USIC0_2
|
||||
BX R0
|
||||
LDR R0,=USIC0_3_IRQHandler ; Handler name for SR USIC0_3
|
||||
BX R0
|
||||
LDR R0,=USIC0_4_IRQHandler ; Handler name for SR USIC0_4
|
||||
BX R0
|
||||
LDR R0,=USIC0_5_IRQHandler ; Handler name for SR USIC0_5
|
||||
BX R0
|
||||
LDR R0,=VADC0_C0_0_IRQHandler ; Handler name for SR VADC0_C0_0
|
||||
BX R0
|
||||
LDR R0,=VADC0_C0_1_IRQHandler ; Handler name for SR VADC0_C0_1
|
||||
BX R0
|
||||
LDR R0,=VADC0_G0_0_IRQHandler ; Handler name for SR VADC0_G0_0
|
||||
BX R0
|
||||
LDR R0,=VADC0_G0_1_IRQHandler ; Handler name for SR VADC0_G0_1
|
||||
BX R0
|
||||
LDR R0,=VADC0_G1_0_IRQHandler ; Handler name for SR VADC0_G1_0
|
||||
BX R0
|
||||
LDR R0,=VADC0_G1_1_IRQHandler ; Handler name for SR VADC0_G1_1
|
||||
BX R0
|
||||
LDR R0,=CCU40_0_IRQHandler ; Handler name for SR CCU40_0
|
||||
BX R0
|
||||
LDR R0,=CCU40_1_IRQHandler ; Handler name for SR CCU40_1
|
||||
BX R0
|
||||
LDR R0,=CCU40_2_IRQHandler ; Handler name for SR CCU40_2
|
||||
BX R0
|
||||
LDR R0,=CCU40_3_IRQHandler ; Handler name for SR CCU40_3
|
||||
BX R0
|
||||
LDR R0,=Undef_Handler ; Not Available
|
||||
BX R0
|
||||
LDR R0,=Undef_Handler ; Not Available
|
||||
BX R0
|
||||
LDR R0,=Undef_Handler ; Not Available
|
||||
BX R0
|
||||
LDR R0,=Undef_Handler ; Not Available
|
||||
BX R0
|
||||
LDR R0,=LEDTS0_0_IRQHandler ; Handler name for SR LEDTS0_0
|
||||
BX R0
|
||||
LDR R0,=LEDTS1_0_IRQHandler ; Handler name for SR LEDTS1_0
|
||||
BX R0
|
||||
LDR R0,=BCCU0_0_IRQHandler ; Handler name for SR BCCU0_0
|
||||
BX R0
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;;
|
||||
;; Default interrupt handlers.
|
||||
;;
|
||||
EXTERN SystemInit
|
||||
SECTION .text:CODE:NOROOT(2)
|
||||
|
||||
THUMB
|
||||
|
||||
PUBWEAK Reset_Handler
|
||||
SECTION .text:CODE:REORDER(2)
|
||||
Reset_Handler
|
||||
LDR R0, =SystemInit
|
||||
BLX R0
|
||||
LDR R0, =SystemInit_DAVE3
|
||||
BLX R0
|
||||
LDR R0, =__iar_program_start
|
||||
BX R0
|
||||
|
||||
PUBWEAK Undef_Handler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
Undef_Handler
|
||||
B Undef_Handler
|
||||
|
||||
|
||||
PUBWEAK HardFault_Handler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
HardFault_Handler
|
||||
B HardFault_Handler
|
||||
|
||||
|
||||
PUBWEAK SVC_Handler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
SVC_Handler
|
||||
B SVC_Handler
|
||||
|
||||
|
||||
PUBWEAK PendSV_Handler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
PendSV_Handler
|
||||
B PendSV_Handler
|
||||
|
||||
|
||||
PUBWEAK SysTick_Handler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
SysTick_Handler
|
||||
B SysTick_Handler
|
||||
|
||||
|
||||
PUBWEAK SCU_0_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
SCU_0_IRQHandler
|
||||
B SCU_0_IRQHandler
|
||||
|
||||
PUBWEAK SCU_1_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
SCU_1_IRQHandler
|
||||
B SCU_1_IRQHandler
|
||||
|
||||
|
||||
PUBWEAK SCU_2_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
SCU_2_IRQHandler
|
||||
B SCU_2_IRQHandler
|
||||
|
||||
|
||||
PUBWEAK ERU0_0_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
ERU0_0_IRQHandler
|
||||
B ERU0_0_IRQHandler
|
||||
|
||||
|
||||
PUBWEAK ERU0_1_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
ERU0_1_IRQHandler
|
||||
B ERU0_1_IRQHandler
|
||||
|
||||
|
||||
PUBWEAK ERU0_2_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
ERU0_2_IRQHandler
|
||||
B ERU0_2_IRQHandler
|
||||
|
||||
|
||||
PUBWEAK ERU0_3_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
ERU0_3_IRQHandler
|
||||
B ERU0_3_IRQHandler
|
||||
|
||||
|
||||
PUBWEAK USIC0_0_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
USIC0_0_IRQHandler
|
||||
B USIC0_0_IRQHandler
|
||||
|
||||
|
||||
PUBWEAK USIC0_1_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
USIC0_1_IRQHandler
|
||||
B USIC0_1_IRQHandler
|
||||
|
||||
|
||||
PUBWEAK USIC0_2_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
USIC0_2_IRQHandler
|
||||
B USIC0_2_IRQHandler
|
||||
|
||||
|
||||
PUBWEAK USIC0_3_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
USIC0_3_IRQHandler
|
||||
B USIC0_3_IRQHandler
|
||||
|
||||
|
||||
PUBWEAK USIC0_4_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
USIC0_4_IRQHandler
|
||||
B USIC0_4_IRQHandler
|
||||
|
||||
|
||||
PUBWEAK USIC0_5_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
USIC0_5_IRQHandler
|
||||
B USIC0_5_IRQHandler
|
||||
|
||||
|
||||
PUBWEAK VADC0_C0_0_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
VADC0_C0_0_IRQHandler
|
||||
B VADC0_C0_0_IRQHandler
|
||||
|
||||
|
||||
PUBWEAK VADC0_C0_1_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
VADC0_C0_1_IRQHandler
|
||||
B VADC0_C0_1_IRQHandler
|
||||
|
||||
|
||||
PUBWEAK VADC0_G0_0_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
VADC0_G0_0_IRQHandler
|
||||
B VADC0_G0_0_IRQHandler
|
||||
|
||||
|
||||
PUBWEAK VADC0_G0_1_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
VADC0_G0_1_IRQHandler
|
||||
B VADC0_G0_1_IRQHandler
|
||||
|
||||
|
||||
PUBWEAK VADC0_G1_0_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
VADC0_G1_0_IRQHandler
|
||||
B VADC0_G1_0_IRQHandler
|
||||
|
||||
|
||||
PUBWEAK VADC0_G1_1_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
VADC0_G1_1_IRQHandler
|
||||
B VADC0_G1_1_IRQHandler
|
||||
|
||||
|
||||
PUBWEAK CCU40_0_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
CCU40_0_IRQHandler
|
||||
B CCU40_0_IRQHandler
|
||||
|
||||
|
||||
PUBWEAK CCU40_1_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
CCU40_1_IRQHandler
|
||||
B CCU40_1_IRQHandler
|
||||
|
||||
|
||||
PUBWEAK CCU40_2_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
CCU40_2_IRQHandler
|
||||
B CCU40_2_IRQHandler
|
||||
|
||||
|
||||
PUBWEAK CCU40_3_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
CCU40_3_IRQHandler
|
||||
B CCU40_3_IRQHandler
|
||||
|
||||
|
||||
PUBWEAK LEDTS0_0_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
LEDTS0_0_IRQHandler
|
||||
B LEDTS0_0_IRQHandler
|
||||
|
||||
|
||||
PUBWEAK LEDTS1_0_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
LEDTS1_0_IRQHandler
|
||||
B LEDTS1_0_IRQHandler
|
||||
|
||||
|
||||
PUBWEAK BCCU0_0_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
BCCU0_0_IRQHandler
|
||||
B BCCU0_0_IRQHandler
|
||||
|
||||
; Definition of the default weak SystemInit_DAVE3 function
|
||||
;If DAVE3 requires an extended SystemInit it will create its own version of
|
||||
;SystemInit_DAVE3 which overrides this weak definition. Example includes
|
||||
;setting up of external memory interfaces.
|
||||
|
||||
PUBWEAK SystemInit_DAVE3
|
||||
SECTION .text:CODE:REORDER:NOROOT(2)
|
||||
SystemInit_DAVE3
|
||||
NOP
|
||||
BX LR
|
||||
|
||||
;Decision function queried by CMSIS startup for Clock tree setup ======== */
|
||||
;In the absence of DAVE code engine, CMSIS SystemInit() must perform clock tree setup.
|
||||
;This decision routine defined here will always return TRUE.
|
||||
;When overridden by a definition defined in DAVE code engine, this routine
|
||||
;returns FALSE indicating that the code engine has performed the clock setup
|
||||
|
||||
PUBWEAK AllowClkInitByStartup
|
||||
SECTION .text:CODE:REORDER:NOROOT(2)
|
||||
AllowClkInitByStartup
|
||||
MOVS R0,#1
|
||||
BX LR
|
||||
|
||||
END
|
||||
@@ -0,0 +1,130 @@
|
||||
/******************************************************************************
|
||||
* @file system_XMC1200.c
|
||||
* @brief Device specific initialization for the XMC1200-Series according
|
||||
* to CMSIS
|
||||
* @version V1.4
|
||||
* @date 01 Feb 2013
|
||||
*
|
||||
* @note
|
||||
* Copyright (C) 2012-2013 Infineon Technologies AG. All rights reserved.
|
||||
|
||||
*
|
||||
* @par
|
||||
* 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.
|
||||
*
|
||||
*
|
||||
* @par
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
|
||||
* OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
|
||||
* INFINEON SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL,
|
||||
* OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
|
||||
*
|
||||
******************************************************************************/
|
||||
/*
|
||||
* *************************** Change history ********************************
|
||||
* V1.2, 13 Dec 2012, PKB : Created change history table
|
||||
* V1.3, 20 Dec 2012, PKB : Fixed SystemCoreClock computation
|
||||
* V1.4, 01 Feb 2013, PKB : SCU_CLOCK -> SCU_CLK
|
||||
*/
|
||||
|
||||
#include "system_XMC1200.h"
|
||||
#include <XMC1200.h>
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
Extern definitions
|
||||
*--------------------------------------------------------------------------*/
|
||||
extern uint32_t AllowClkInitByStartup(void);
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Clock Global defines
|
||||
*----------------------------------------------------------------------------*/
|
||||
#define DCO_DCLK 64000000UL
|
||||
#define DCO_DCLK_MULTIPLIER 16384000UL
|
||||
#define DCO_DCLK_DIVIDER 9UL
|
||||
#define MCLK_MHZ 32000000UL
|
||||
#define KHZ_MULTIPLIER 1000UL
|
||||
#define FRACBITS 8UL
|
||||
/*----------------------------------------------------------------------------
|
||||
Clock Variable definitions
|
||||
*----------------------------------------------------------------------------*/
|
||||
/*!< System Clock Frequency (Core Clock) (MCLK on TIMM1) */
|
||||
uint32_t SystemCoreClock;
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Fixed point math definitions
|
||||
*----------------------------------------------------------------------------*/
|
||||
typedef int32_t Q_24_8;
|
||||
typedef int32_t Q_15_0;
|
||||
|
||||
/**
|
||||
* @brief Setup the microcontroller system.
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void SystemInit(void)
|
||||
{
|
||||
|
||||
/*
|
||||
* Clock tree setup by CMSIS routines is allowed only in the absence of DAVE
|
||||
* Clock app.
|
||||
*/
|
||||
if(AllowClkInitByStartup()){
|
||||
/* Do not change default values of IDIV,FDIV and RTCCLKSEL */
|
||||
/* ====== Default configuration ======= */
|
||||
/*
|
||||
* MCLK = DCO_DCLK
|
||||
* PCLK = MCLK
|
||||
* RTC CLK = Standby clock
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Update SystemCoreClock according to Clock Register Values
|
||||
* @note -
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void SystemCoreClockUpdate(void)
|
||||
{
|
||||
uint32_t IDIV, FDIV, CLKCR, Clock;
|
||||
|
||||
CLKCR = SCU_CLK -> CLKCR;
|
||||
IDIV = (CLKCR & SCU_CLK_CLKCR_IDIV_Msk) >> SCU_CLK_CLKCR_IDIV_Pos;
|
||||
FDIV = (CLKCR & SCU_CLK_CLKCR_FDIV_Msk) >> SCU_CLK_CLKCR_FDIV_Pos;
|
||||
|
||||
if(IDIV)
|
||||
{
|
||||
/* Divider is enabled and used */
|
||||
if(0 == FDIV)
|
||||
{
|
||||
/* No fractional divider, so MCLK = DCO_Clk / (2 * IDIV) */
|
||||
Clock = MCLK_MHZ / IDIV;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Both integer and fractional divider must be considered */
|
||||
/* 1. IDIV + FDIV/256 */
|
||||
Q_24_8 FDiv_IDiv_Sum = (IDIV << FRACBITS) + FDIV;
|
||||
|
||||
/* 2. Fixed point division Q24.8 / Q9.8 = Q15.0 */
|
||||
Q_15_0 ClockVal = (DCO_DCLK_MULTIPLIER << FRACBITS)/ FDiv_IDiv_Sum;
|
||||
Clock = ((uint32_t)ClockVal) * KHZ_MULTIPLIER;
|
||||
Clock = Clock >> DCO_DCLK_DIVIDER;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Divider bypassed. Simply divide DCO_DCLK by 2 */
|
||||
Clock = MCLK_MHZ;
|
||||
}
|
||||
|
||||
/* Finally with the math class over, update SystemCoreClock */
|
||||
SystemCoreClock = Clock;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
/******************************************************************************
|
||||
* @file system_XMC1200.h
|
||||
* @brief Device specific initialization for the XMC1200-Series according
|
||||
* to CMSIS
|
||||
* @version V1.1
|
||||
* @date 13 Dec 2012
|
||||
*
|
||||
* @note
|
||||
* Copyright (C) 2012-2013 Infineon Technologies AG. All rights reserved.
|
||||
|
||||
*
|
||||
* @par
|
||||
* 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.
|
||||
*
|
||||
*
|
||||
* @par
|
||||
* THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
|
||||
* OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
|
||||
* INFINEON SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL,
|
||||
* OR CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
|
||||
*
|
||||
******************************************************************************/
|
||||
/*
|
||||
* **************************** Change history *******************************
|
||||
* V1.1, 13 Dec 2012, PKB : Created this table, added extern and stdint
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
Clock Variable definitions
|
||||
*----------------------------------------------------------------------------*/
|
||||
extern uint32_t SystemCoreClock;
|
||||
/**
|
||||
* @brief Setup the microcontroller system.
|
||||
* Initialize the PLL and update the
|
||||
* SystemCoreClock variable.
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void SystemInit(void);
|
||||
|
||||
/**
|
||||
* @brief Update SystemCoreClock according to Clock Register Values
|
||||
* @note -
|
||||
* @param None
|
||||
* @retval None
|
||||
*/
|
||||
void SystemCoreClockUpdate(void);
|
||||
|
||||
@@ -42,7 +42,7 @@ __initial_sp
|
||||
; <o> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||
; </h>
|
||||
|
||||
Heap_Size EQU 0x00000200
|
||||
Heap_Size EQU 0x00000000
|
||||
|
||||
AREA HEAP, NOINIT, READWRITE, ALIGN=3
|
||||
__heap_base
|
||||
@@ -74,7 +74,7 @@ __heap_limit
|
||||
; <7=> Reserved
|
||||
; <o0.31> do not move CLK_VAL1 to SCU_CLKCR[0..19]
|
||||
; </h>
|
||||
CLK_VAL1_Val EQU 0x80000000 ; 0xF0000000
|
||||
CLK_VAL1_Val EQU 0x00000100 ; 0xF0000000
|
||||
|
||||
; <h> CLK_VAL2 Configuration
|
||||
; <o0.0> disable VADC and SHS Gating
|
||||
@@ -90,7 +90,7 @@ CLK_VAL1_Val EQU 0x80000000 ; 0xF0000000
|
||||
; <o0.10> disable RTC Gating
|
||||
; <o0.31> do not move CLK_VAL2 to SCU_CGATCLR0[0..10]
|
||||
; </h>
|
||||
CLK_VAL2_Val EQU 0x80000000 ; 0xF0000000
|
||||
CLK_VAL2_Val EQU 0x00000000 ; 0xF0000000
|
||||
; </h>
|
||||
|
||||
PRESERVE8
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
|
||||
/* The rate at which data is sent to the queue. The 200ms value is converted
|
||||
to ticks using the portTICK_RATE_MS constant. */
|
||||
#define mainQUEUE_SEND_FREQUENCY_MS ( 200 / portTICK_RATE_MS )
|
||||
#define mainQUEUE_SEND_FREQUENCY_MS ( 1000 / portTICK_RATE_MS )
|
||||
|
||||
/* The number of items the queue can hold. This is 1 as the receive task
|
||||
will remove items as they are added, meaning the send task should always find
|
||||
@@ -162,12 +162,12 @@ void main_blinky( void )
|
||||
{
|
||||
/* Start the two tasks as described in the comments at the top of this
|
||||
file. */
|
||||
// xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */
|
||||
// ( signed char * ) "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */
|
||||
// configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */
|
||||
// ( void * ) mainQUEUE_RECEIVE_PARAMETER, /* The parameter passed to the task - just to check the functionality. */
|
||||
// mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */
|
||||
// NULL ); /* The task handle is not required, so NULL is passed. */
|
||||
xTaskCreate( prvQueueReceiveTask, /* The function that implements the task. */
|
||||
( signed char * ) "Rx", /* The text name assigned to the task - for debug only as it is not used by the kernel. */
|
||||
configMINIMAL_STACK_SIZE, /* The size of the stack to allocate to the task. */
|
||||
( void * ) mainQUEUE_RECEIVE_PARAMETER, /* The parameter passed to the task - just to check the functionality. */
|
||||
mainQUEUE_RECEIVE_TASK_PRIORITY, /* The priority assigned to the task. */
|
||||
NULL ); /* The task handle is not required, so NULL is passed. */
|
||||
|
||||
xTaskCreate( prvQueueSendTask, ( signed char * ) "TX", configMINIMAL_STACK_SIZE, ( void * ) mainQUEUE_SEND_PARAMETER, mainQUEUE_SEND_TASK_PRIORITY, NULL );
|
||||
|
||||
@@ -189,12 +189,6 @@ static void prvQueueSendTask( void *pvParameters )
|
||||
portTickType xNextWakeTime;
|
||||
const unsigned long ulValueToSend = 100UL;
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
vTaskDelay( 100 );
|
||||
vParTestToggleLED( 0 );
|
||||
}
|
||||
|
||||
/* Check the task parameter is as expected. */
|
||||
configASSERT( ( ( unsigned long ) pvParameters ) == mainQUEUE_SEND_PARAMETER );
|
||||
|
||||
|
||||
@@ -194,10 +194,10 @@ configured). */
|
||||
const size_t xRegTestStackSize = 25U;
|
||||
|
||||
/* Create the standard demo tasks */
|
||||
// vCreateBlockTimeTasks();
|
||||
// vStartCountingSemaphoreTasks();
|
||||
// vStartRecursiveMutexTasks();
|
||||
// vStartDynamicPriorityTasks();
|
||||
vCreateBlockTimeTasks();
|
||||
vStartCountingSemaphoreTasks();
|
||||
vStartRecursiveMutexTasks();
|
||||
vStartDynamicPriorityTasks();
|
||||
|
||||
/* Create the register test tasks as described at the top of this file.
|
||||
These are naked functions that don't use any stack. A stack still has
|
||||
@@ -225,21 +225,21 @@ const size_t xRegTestStackSize = 25U;
|
||||
( void * ) ulTimer, /* The ID is used to hold the number of the LED that will be flashed. */
|
||||
prvFlashTimerCallback /* The callback function that inspects the status of all the other tasks. */
|
||||
);
|
||||
|
||||
|
||||
if( xTimer != NULL )
|
||||
{
|
||||
// xTimerStart( xTimer, mainDONT_BLOCK );
|
||||
xTimerStart( xTimer, mainDONT_BLOCK );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Create the software timer that performs the 'check' functionality,
|
||||
as described at the top of this file. */
|
||||
// xTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */
|
||||
// ( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */
|
||||
// pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */
|
||||
// ( void * ) 0, /* The ID is not used, so can be set to anything. */
|
||||
// prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */
|
||||
// );
|
||||
xTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */
|
||||
( mainCHECK_TIMER_PERIOD_MS ), /* The timer period, in this case 3000ms (3s). */
|
||||
pdTRUE, /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */
|
||||
( void * ) 0, /* The ID is not used, so can be set to anything. */
|
||||
prvCheckTimerCallback /* The callback function that inspects the status of all the other tasks. */
|
||||
);
|
||||
|
||||
/* If the software timer was created successfully, start it. It won't
|
||||
actually start running until the scheduler starts. A block time of
|
||||
@@ -247,7 +247,7 @@ const size_t xRegTestStackSize = 25U;
|
||||
time will be ignored because the scheduler has not started yet. */
|
||||
if( xTimer != NULL )
|
||||
{
|
||||
// xTimerStart( xTimer, mainDONT_BLOCK );
|
||||
xTimerStart( xTimer, mainDONT_BLOCK );
|
||||
}
|
||||
|
||||
/* Start the kernel. From here on, only tasks and interrupts will run. */
|
||||
@@ -339,6 +339,6 @@ unsigned long ulLED;
|
||||
ulLED = ( unsigned long ) pvTimerGetTimerID( xTimer );
|
||||
|
||||
/* Toggle the LED. */
|
||||
vParTestToggleLED( ulLED );
|
||||
vParTestToggleLED( ulLED );
|
||||
}
|
||||
|
||||
|
||||
@@ -104,13 +104,13 @@ static void prvSetupHardware( void );
|
||||
|
||||
/*
|
||||
* main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.
|
||||
* main_full() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.
|
||||
* main_full() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.
|
||||
*/
|
||||
extern void main_blinky( void );
|
||||
extern void main_full( void );
|
||||
|
||||
/*
|
||||
* CMSIS clock configuration function.
|
||||
/*
|
||||
* CMSIS clock configuration function.
|
||||
*/
|
||||
extern void SystemCoreClockUpdate( void );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user