You can subscribe to this list here.
| 2008 |
Jan
(3) |
Feb
(63) |
Mar
(3) |
Apr
(22) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|
|
From: <ak...@us...> - 2008-03-01 13:09:19
|
Revision: 866
http://can.svn.sourceforge.net/can/?rev=866&view=rev
Author: akhe
Date: 2008-03-01 05:09:07 -0800 (Sat, 01 Mar 2008)
Log Message:
-----------
Added bug fixes to CAN libraries and to USB libraries
Modified Paths:
--------------
trunk/firmware/arm/str/cantest_str75x_iar/cantest.dep
trunk/firmware/arm/str/cantest_str75x_iar/main.c
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dbgdt
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.wsdt
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_can.c
trunk/firmware/arm/str/common/str73x_lib/src/73x_can.c
trunk/firmware/arm/str/common/str75x_lib/include/75x_can.h
trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c
trunk/firmware/arm/str/common/usblib/library/src/usb_core.c
Modified: trunk/firmware/arm/str/cantest_str75x_iar/cantest.dep
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/cantest.dep 2008-02-29 14:23:25 UTC (rev 865)
+++ trunk/firmware/arm/str/cantest_str75x_iar/cantest.dep 2008-03-01 13:09:07 UTC (rev 866)
@@ -6,106 +6,109 @@
<configuration>
<name>Debug</name>
<outputs>
- <file>$PROJ_DIR$\str75x_lib\inc\75x_gpio.h</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_can.pbi</file>
+ <file>$PROJ_DIR$\str75x_lib\inc\75x_can.h</file>
<file>$TOOLKIT_DIR$\lib\dl4t_tl_in.a</file>
- <file>$PROJ_DIR$\linker\STR75x_FLASH.icf</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_eic.o</file>
+ <file>$PROJ_DIR$\Debug\Obj\main.o</file>
+ <file>$PROJ_DIR$\Debug\Exe\cantest.hex</file>
+ <file>$PROJ_DIR$\Debug\Obj\main.pbi</file>
<file>$PROJ_DIR$\str75x_lib\inc\75x_type.h</file>
- <file>$PROJ_DIR$\str75x_lib\inc\75x_map.h</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_gpio.pbi</file>
<file>$PROJ_DIR$\Debug\Obj\75x_mrcc.pbi</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_vect.o</file>
- <file>$PROJ_DIR$\str75x_lib\src\75x_gpio.c</file>
- <file>$PROJ_DIR$\str75x_lib\src\75x_eic.c</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_eic.pbi</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_mrcc.o</file>
- <file>$TOOLKIT_DIR$\lib\rt4t_al.a</file>
<file>$TOOLKIT_DIR$\lib\shs_l.a</file>
- <file>$PROJ_DIR$\Debug\Exe\cantest.hex</file>
- <file>$PROJ_DIR$\str75x_lib\inc\75x_eic.h</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_can.o</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_it.o</file>
- <file>$PROJ_DIR$\Debug\Obj\main.o</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_init.o</file>
<file>$PROJ_DIR$\Debug\Obj\75x_it.pbi</file>
- <file>$PROJ_DIR$\str75x_lib\inc\75x_mrcc.h</file>
- <file>$PROJ_DIR$\Debug\Exe\cantest.out</file>
<file>$PROJ_DIR$\Debug\Obj\cantest.pbd</file>
- <file>$PROJ_DIR$\str75x_lib\inc\75x_lib.h</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_gpio.o</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_mrcc.o</file>
<file>$PROJ_DIR$\Debug\Obj\75x_lib.o</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_gpio.pbi</file>
+ <file>$PROJ_DIR$\linker\STR75x_FLASH.icf</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_can.pbi</file>
+ <file>$PROJ_DIR$\str75x_lib\src\75x_can.c</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_can.o</file>
<file>$PROJ_DIR$\Debug\Obj\75x_lib.pbi</file>
- <file>$PROJ_DIR$\Startup\75x_init.s</file>
- <file>$PROJ_DIR$\75x_it.c</file>
- <file>$PROJ_DIR$\Startup\75x_vect.s</file>
- <file>$PROJ_DIR$\75x_conf.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_eic.pbi</file>
+ <file>$PROJ_DIR$\str75x_lib\src\75x_gpio.c</file>
+ <file>$PROJ_DIR$\Debug\Exe\cantest.out</file>
+ <file>$PROJ_DIR$\str75x_lib\inc\75x_eic.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_eic.o</file>
+ <file>$PROJ_DIR$\str75x_lib\inc\75x_lib.h</file>
+ <file>$PROJ_DIR$\str75x_lib\inc\75x_gpio.h</file>
+ <file>$PROJ_DIR$\str75x_lib\inc\75x_map.h</file>
+ <file>$PROJ_DIR$\str75x_lib\inc\75x_mrcc.h</file>
+ <file>$TOOLKIT_DIR$\lib\rt4t_al.a</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_it.o</file>
+ <file>$PROJ_DIR$\str75x_lib\src\75x_eic.c</file>
<file>$PROJ_DIR$\main.c</file>
- <file>$PROJ_DIR$\Debug\Obj\75x_init.o</file>
- <file>$PROJ_DIR$\Debug\Obj\main.pbi</file>
- <file>$PROJ_DIR$\str75x_lib\inc\75x_can.h</file>
- <file>$PROJ_DIR$\str75x_lib\src\75x_can.c</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_vect.o</file>
+ <file>$PROJ_DIR$\75x_conf.h</file>
+ <file>$PROJ_DIR$\Startup\75x_vect.s</file>
<file>$PROJ_DIR$\str75x_lib\src\75x_lib.c</file>
+ <file>$PROJ_DIR$\Startup\75x_init.s</file>
<file>$PROJ_DIR$\str75x_lib\src\75x_mrcc.c</file>
- <file>$PROJ_DIR$\..\..\..\common\vscp_serial.h</file>
+ <file>$PROJ_DIR$\75x_it.c</file>
<file>$PROJ_DIR$\..\..\..\common\vscp_serial.c</file>
- <file>$PROJ_DIR$\..\..\..\common\vscp_class.h</file>
- <file>$PROJ_DIR$\..\..\..\common\crc.c</file>
- <file>$PROJ_DIR$\..\..\..\pic\can4vscp_232\project\main.c</file>
- <file>$PROJ_DIR$\..\..\..\pic\can4vscp_232\project\serint.c</file>
- <file>$PROJ_DIR$\..\..\..\common\crc.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\75x_gpio.o</file>
</outputs>
<file>
<name>[ROOT_NODE]</name>
<outputs>
<tool>
<name>ILINK</name>
- <file> 23</file>
+ <file> 21</file>
</tool>
</outputs>
</file>
<file>
- <name>$PROJ_DIR$\str75x_lib\src\75x_gpio.c</name>
+ <name>$PROJ_DIR$\Debug\Obj\cantest.pbd</name>
+ <inputs>
+ <tool>
+ <name>BILINK</name>
+ <file> 15 19 13 9 18 6 4</file>
+ </tool>
+ </inputs>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\str75x_lib\src\75x_can.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 7</file>
+ <file> 15</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 26</file>
+ <file> 17</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 0 6 32 5 22</file>
+ <file> 0 26 33 5 27</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 0 6 32 5 22</file>
+ <file> 0 26 33 5 27</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\str75x_lib\src\75x_eic.c</name>
+ <name>$PROJ_DIR$\str75x_lib\src\75x_gpio.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 12</file>
+ <file> 13</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 4</file>
+ <file> 40</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 17 6 32 5</file>
+ <file> 25 26 33 5 27</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 17 6 32 5</file>
+ <file> 25 26 33 5 27</file>
</tool>
</inputs>
</file>
@@ -114,54 +117,59 @@
<outputs>
<tool>
<name>OBJCOPY</name>
- <file> 16</file>
+ <file> 3</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ILINK</name>
- <file> 3 18 4 26 34 19 27 13 9 20 15 14 2</file>
+ <file> 14 17 23 40 8 29 12 11 32 2 7 28 1</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\Debug\Obj\cantest.pbd</name>
- <inputs>
+ <name>$PROJ_DIR$\str75x_lib\src\75x_eic.c</name>
+ <outputs>
<tool>
- <name>BILINK</name>
- <file> 1 12 7 21 28 8 35</file>
+ <name>BICOMP</name>
+ <file> 19</file>
</tool>
- </inputs>
- </file>
- <file>
- <name>$PROJ_DIR$\Startup\75x_init.s</name>
- <outputs>
<tool>
- <name>AARM</name>
- <file> 34</file>
+ <name>ICCARM</name>
+ <file> 23</file>
</tool>
</outputs>
+ <inputs>
+ <tool>
+ <name>BICOMP</name>
+ <file> 22 26 33 5</file>
+ </tool>
+ <tool>
+ <name>ICCARM</name>
+ <file> 22 26 33 5</file>
+ </tool>
+ </inputs>
</file>
<file>
- <name>$PROJ_DIR$\75x_it.c</name>
+ <name>$PROJ_DIR$\main.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 21</file>
+ <file> 4</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 19</file>
+ <file> 2</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 25 6 32 5 22 36 0 17</file>
+ <file> 24 26 33 5 27 0 25 22</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 25 6 32 5 22 36 0 17</file>
+ <file> 24 26 33 5 27 0 25 22</file>
</tool>
</inputs>
</file>
@@ -170,99 +178,85 @@
<outputs>
<tool>
<name>AARM</name>
- <file> 9</file>
+ <file> 32</file>
</tool>
</outputs>
</file>
<file>
- <name>$PROJ_DIR$\main.c</name>
+ <name>$PROJ_DIR$\str75x_lib\src\75x_lib.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 35</file>
+ <file> 18</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 20</file>
+ <file> 12</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 25 6 32 5 22 36 0 17</file>
+ <file> 24 26 33 5 27 0 25 22</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 25 6 32 5 22 36 0 17</file>
+ <file> 24 26 33 5 27 0 25 22</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\str75x_lib\src\75x_can.c</name>
+ <name>$PROJ_DIR$\Startup\75x_init.s</name>
<outputs>
<tool>
- <name>BICOMP</name>
- <file> 1</file>
+ <name>AARM</name>
+ <file> 8</file>
</tool>
- <tool>
- <name>ICCARM</name>
- <file> 18</file>
- </tool>
</outputs>
- <inputs>
- <tool>
- <name>BICOMP</name>
- <file> 36 6 32 5 22</file>
- </tool>
- <tool>
- <name>ICCARM</name>
- <file> 36 6 32 5 22</file>
- </tool>
- </inputs>
</file>
<file>
- <name>$PROJ_DIR$\str75x_lib\src\75x_lib.c</name>
+ <name>$PROJ_DIR$\str75x_lib\src\75x_mrcc.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 28</file>
+ <file> 6</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 27</file>
+ <file> 11</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 25 6 32 5 22 36 0 17</file>
+ <file> 27 26 33 5</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 25 6 32 5 22 36 0 17</file>
+ <file> 27 26 33 5</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\str75x_lib\src\75x_mrcc.c</name>
+ <name>$PROJ_DIR$\75x_it.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 8</file>
+ <file> 9</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 13</file>
+ <file> 29</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 22 6 32 5</file>
+ <file> 24 26 33 5 27 0 25 22</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 22 6 32 5</file>
+ <file> 24 26 33 5 27 0 25 22</file>
</tool>
</inputs>
</file>
Modified: trunk/firmware/arm/str/cantest_str75x_iar/main.c
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/main.c 2008-02-29 14:23:25 UTC (rev 865)
+++ trunk/firmware/arm/str/cantest_str75x_iar/main.c 2008-03-01 13:09:07 UTC (rev 866)
@@ -113,7 +113,7 @@
MRCC_PCLKConfig( MRCC_CKTIM_Div2 );
// Set CKSYS to 64 MHz
- MRCC_CKSYSConfig( MRCC_CKSYS_OSC4MPLL, MRCC_PLL_Mul_16 );
+ MRCC_CKSYSConfig( MRCC_CKSYS_OSC4MPLL, MRCC_PLL_Mul_16 ); // 64 MHz
}
Modified: trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dbgdt
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dbgdt 2008-02-29 14:23:25 UTC (rev 865)
+++ trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dbgdt 2008-03-01 13:09:07 UTC (rev 866)
@@ -27,7 +27,7 @@
- <Wnd0>
+ <Wnd3>
<Tabs>
<Tab>
<Identity>TabID-14394-3889</Identity>
@@ -43,7 +43,7 @@
</Tab>
</Tabs>
- <SelectedTab>0</SelectedTab></Wnd0><Wnd1>
+ <SelectedTab>0</SelectedTab></Wnd3><Wnd4>
<Tabs>
<Tab>
<Identity>TabID-25142-3892</Identity>
@@ -55,7 +55,7 @@
</Tab>
</Tabs>
- <SelectedTab>0</SelectedTab></Wnd1><Wnd2>
+ <SelectedTab>0</SelectedTab></Wnd4><Wnd5>
<Tabs>
<Tab>
<Identity>TabID-3123-3895</Identity>
@@ -65,20 +65,20 @@
</Tab>
</Tabs>
- <SelectedTab>0</SelectedTab></Wnd2></Windows>
+ <SelectedTab>0</SelectedTab></Wnd5></Windows>
<Editor>
- <Pane><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>2173</SelStart><SelEnd>2173</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\main.c</Filename><XPos>0</XPos><YPos>116</YPos><SelStart>1620</SelStart><SelEnd>1620</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\str75x_lib\src\75x_can.c</Filename><XPos>0</XPos><YPos>443</YPos><SelStart>21143</SelStart><SelEnd>21143</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\Startup\75x_init.s</Filename><XPos>0</XPos><YPos>91</YPos><SelStart>4272</SelStart><SelEnd>4272</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.h</Filename><XPos>0</XPos><YPos>139</YPos><SelStart>3033</SelStart><SelEnd>3033</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.c</Filename><XPos>0</XPos><YPos>302</YPos><SelStart>9128</SelStart><SelEnd>9128</SelEnd></Tab><ActiveTab>5</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\main.c</Filename><XPos>0</XPos><YPos>449</YPos><SelStart>10491</SelStart><SelEnd>10727</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\serint.c</Filename><XPos>0</XPos><YPos>252</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></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>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\main.c</Filename><XPos>0</XPos><YPos>287</YPos><SelStart>7812</SelStart><SelEnd>7812</SelEnd></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\main.c</Filename><XPos>0</XPos><YPos>116</YPos><SelStart>1620</SelStart><SelEnd>1620</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\str75x_lib\src\75x_can.c</Filename><XPos>0</XPos><YPos>443</YPos><SelStart>21143</SelStart><SelEnd>21143</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\Startup\75x_init.s</Filename><XPos>0</XPos><YPos>91</YPos><SelStart>4272</SelStart><SelEnd>4272</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.h</Filename><XPos>0</XPos><YPos>139</YPos><SelStart>3033</SelStart><SelEnd>3033</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.c</Filename><XPos>0</XPos><YPos>110</YPos><SelStart>8871</SelStart><SelEnd>8871</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\main.c</Filename><XPos>0</XPos><YPos>449</YPos><SelStart>10491</SelStart><SelEnd>10727</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\serint.c</Filename><XPos>0</XPos><YPos>252</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
- <Top><Row0><Sizes><Toolbar-01353ab8><key>iaridepm.enu1</key></Toolbar-01353ab8></Sizes></Row0><Row1><Sizes><Toolbar-0761bb20><key>debuggergui.enu1</key></Toolbar-0761bb20></Sizes></Row1></Top><Left><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>498</Bottom><Right>198</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>726744</sizeVertCY></Rect></Wnd1></Sizes></Row0></Left><Right><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>498</Bottom><Right>198</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>726744</sizeVertCY></Rect></Wnd2></Sizes></Row0></Right><Bottom><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>122</Bottom><Right>1026</Right><x>-2</x><y>-2</y><xscreen>1028</xscreen><yscreen>124</yscreen><sizeHorzCX>1003906</sizeHorzCX><sizeHorzCY>180233</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>290698</sizeVertCY></Rect></Wnd0></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
+ <Top><Row0><Sizes><Toolbar-01353cd8><key>iaridepm.enu1</key></Toolbar-01353cd8></Sizes></Row0><Row1><Sizes><Toolbar-09daed18><key>debuggergui.enu1</key></Toolbar-09daed18></Sizes></Row1></Top><Left><Row0><Sizes><Wnd4><Rect><Top>-2</Top><Left>-2</Left><Bottom>498</Bottom><Right>198</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>726744</sizeVertCY></Rect></Wnd4></Sizes></Row0></Left><Right><Row0><Sizes><Wnd5><Rect><Top>-2</Top><Left>-2</Left><Bottom>498</Bottom><Right>198</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>726744</sizeVertCY></Rect></Wnd5></Sizes></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>122</Bottom><Right>1026</Right><x>-2</x><y>-2</y><xscreen>1028</xscreen><yscreen>124</yscreen><sizeHorzCX>1003906</sizeHorzCX><sizeHorzCY>180233</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>290698</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Project>
Modified: trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.wsdt
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.wsdt 2008-02-29 14:23:25 UTC (rev 865)
+++ trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.wsdt 2008-03-01 13:09:07 UTC (rev 866)
@@ -25,7 +25,7 @@
<Windows>
- <Wnd0>
+ <Wnd2>
<Tabs>
<Tab>
<Identity>TabID-32711-27921</Identity>
@@ -37,7 +37,7 @@
</Tab>
</Tabs>
- <SelectedTab>0</SelectedTab></Wnd0><Wnd1>
+ <SelectedTab>0</SelectedTab></Wnd2><Wnd3>
<Tabs>
<Tab>
<Identity>TabID-18303-27987</Identity>
@@ -47,20 +47,20 @@
</Tab>
<Tab><Identity>TabID-7248-23799</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>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>2173</SelStart><SelEnd>2173</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\main.c</Filename><XPos>0</XPos><YPos>116</YPos><SelStart>1620</SelStart><SelEnd>1620</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\str75x_lib\src\75x_can.c</Filename><XPos>0</XPos><YPos>443</YPos><SelStart>21143</SelStart><SelEnd>21143</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\Startup\75x_init.s</Filename><XPos>0</XPos><YPos>91</YPos><SelStart>4272</SelStart><SelEnd>4272</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.h</Filename><XPos>0</XPos><YPos>139</YPos><SelStart>3033</SelStart><SelEnd>3033</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.c</Filename><XPos>0</XPos><YPos>110</YPos><SelStart>8871</SelStart><SelEnd>8871</SelEnd></Tab><ActiveTab>5</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\main.c</Filename><XPos>0</XPos><YPos>449</YPos><SelStart>10491</SelStart><SelEnd>10727</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\serint.c</Filename><XPos>0</XPos><YPos>252</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></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>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\main.c</Filename><XPos>0</XPos><YPos>287</YPos><SelStart>7812</SelStart><SelEnd>7812</SelEnd></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\main.c</Filename><XPos>0</XPos><YPos>116</YPos><SelStart>1620</SelStart><SelEnd>1620</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\str75x_lib\src\75x_can.c</Filename><XPos>0</XPos><YPos>443</YPos><SelStart>21143</SelStart><SelEnd>21143</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\Startup\75x_init.s</Filename><XPos>0</XPos><YPos>91</YPos><SelStart>4272</SelStart><SelEnd>4272</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.h</Filename><XPos>0</XPos><YPos>139</YPos><SelStart>3033</SelStart><SelEnd>3033</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.c</Filename><XPos>0</XPos><YPos>110</YPos><SelStart>8871</SelStart><SelEnd>8871</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\main.c</Filename><XPos>0</XPos><YPos>449</YPos><SelStart>10491</SelStart><SelEnd>10727</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\serint.c</Filename><XPos>0</XPos><YPos>252</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
- <Top><Row0><Sizes><Toolbar-01353ab8><key>iaridepm.enu1</key></Toolbar-01353ab8></Sizes></Row0><Row1><Sizes/></Row1></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>446</Bottom><Right>282</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>277344</sizeVertCX><sizeVertCY>651163</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>1026</Right><x>-2</x><y>-2</y><xscreen>1028</xscreen><yscreen>200</yscreen><sizeHorzCX>1003906</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>290698</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
+ <Top><Row0><Sizes><Toolbar-01353cd8><key>iaridepm.enu1</key></Toolbar-01353cd8></Sizes></Row0><Row1><Sizes/></Row1></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>446</Bottom><Right>282</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>277344</sizeVertCX><sizeVertCY>651163</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>1026</Right><x>-2</x><y>-2</y><xscreen>1028</xscreen><yscreen>200</yscreen><sizeHorzCX>1003906</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>290698</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Workspace>
Modified: trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_can.c
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_can.c 2008-02-29 14:23:25 UTC (rev 865)
+++ trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_can.c 2008-03-01 13:09:07 UTC (rev 866)
@@ -515,12 +515,16 @@
*******************************************************************************/
ErrorStatus CAN_WaitEndOfTx(void)
{
+ // Changed by AKHE
+ while ( 0 == ( CAN->SR & CAN_SR_TXOK ) );
+ CAN->SR &= ~CAN_SR_TXOK;
+/*
if ((CAN->SR & CAN_SR_TXOK) == 0)
{
return ERROR;
}
CAN->SR &= ~CAN_SR_TXOK;
-
+*/
return SUCCESS;
}
Modified: trunk/firmware/arm/str/common/str73x_lib/src/73x_can.c
===================================================================
--- trunk/firmware/arm/str/common/str73x_lib/src/73x_can.c 2008-02-29 14:23:25 UTC (rev 865)
+++ trunk/firmware/arm/str/common/str73x_lib/src/73x_can.c 2008-03-01 13:09:07 UTC (rev 866)
@@ -340,11 +340,11 @@
/*********************************************************************************/
void CAN_ReleaseMessage(CAN_TypeDef *CANx, u32 msgobj)
{
- u32 i;
+ u32 i;
while ((i = CAN_GetFreeIF(CANx)) == 2);
- CANx->sMsgObj[i].CMR = CAN_CMR_CLRINTPND | CAN_CMR_TXRQSTNEWDAT;
- CANx->sMsgObj[i].CRR = 1 + msgobj;
+ CANx->sMsgObj[i].CMR = CAN_CMR_CLRINTPND | CAN_CMR_TXRQSTNEWDAT;
+ CANx->sMsgObj[i].CRR = 1 + msgobj;
}
/**********************************************************************************/
@@ -387,8 +387,8 @@
/* extended ID AKHE Fixed bug */
//CANx->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
//CANx->sMsgObj[0].A2R = (CANx->sMsgObj[0].A2R & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
- CANx->sMsgObj[0].A1R = pCanMsg->Id & 0xffff;
- CANx->sMsgObj[0].A2R = (CANx->sMsgObj[0].A2R & 0xE000) | ( ( pCanMsg->Id >> 16 ) & 0xffff);
+ CANx->sMsgObj[0].A1R = pCanMsg->Id & 0xffff;
+ CANx->sMsgObj[0].A2R = (CANx->sMsgObj[0].A2R & 0xE000) | ( ( pCanMsg->Id >> 16 ) & 0xffff);
}
CANx->sMsgObj[0].MCR = (CANx->sMsgObj[0].MCR & 0xFEF0) | CAN_MCR_NEWDAT | CAN_MCR_TXRQST | pCanMsg->Dlc;
Modified: trunk/firmware/arm/str/common/str75x_lib/include/75x_can.h
===================================================================
--- trunk/firmware/arm/str/common/str75x_lib/include/75x_can.h 2008-02-29 14:23:25 UTC (rev 865)
+++ trunk/firmware/arm/str/common/str75x_lib/include/75x_can.h 2008-03-01 13:09:07 UTC (rev 866)
@@ -147,6 +147,7 @@
ErrorStatus CAN_SendMessage(u32 msgobj, canmsg* pCanMsg);
ErrorStatus CAN_ReceiveMessage(u32 msgobj, bool release, canmsg* pCanMsg);
ErrorStatus CAN_WaitEndOfTx(void);
+ErrorStatus CAN_CheckEndOfTx( void ); // AKHE
ErrorStatus CAN_BasicSendMessage(canmsg* pCanMsg);
ErrorStatus CAN_BasicReceiveMessage(canmsg* pCanMsg);
void CAN_EnterTestMode(u8 TestMask);
Modified: trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c
===================================================================
--- trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c 2008-02-29 14:23:25 UTC (rev 865)
+++ trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c 2008-03-01 13:09:07 UTC (rev 866)
@@ -518,11 +518,35 @@
*******************************************************************************/
ErrorStatus CAN_WaitEndOfTx(void)
{
+ // Changed by AKHE
+ while ( 0 == ( CAN->SR & CAN_SR_TXOK ) );
+ CAN->SR &= ~CAN_SR_TXOK;
+/*
if ((CAN->SR & CAN_SR_TXOK) == 0)
{
return ERROR;
}
CAN->SR &= ~CAN_SR_TXOK;
+*/
+ return SUCCESS;
+}
+
+/*******************************************************************************
+* Function Name : CAN_CheckEndOfTx
+* Description : Check if the current transmission is finished.
+* Input : None
+* Output : None
+* Return : An ErrorStatus enumuration value:
+* - SUCCESS: Transmission ended
+* - ERROR: Transmission did not occur yet
+*******************************************************************************/
+ErrorStatus CAN_CheckEndOfTx( void )
+{
+ if ( 0 == ( CAN->SR & CAN_SR_TXOK ) )
+ {
+ return ERROR;
+ }
+ CAN->SR &= ~CAN_SR_TXOK;
return SUCCESS;
}
Modified: trunk/firmware/arm/str/common/usblib/library/src/usb_core.c
===================================================================
--- trunk/firmware/arm/str/common/usblib/library/src/usb_core.c 2008-02-29 14:23:25 UTC (rev 865)
+++ trunk/firmware/arm/str/common/usblib/library/src/usb_core.c 2008-03-01 13:09:07 UTC (rev 866)
@@ -755,6 +755,7 @@
if(ControlState == OUT_DATA || ControlState == LAST_OUT_DATA)
DataStageOut();
+ ControlState = pInformation->ControlState; // AKHE
else if (ControlState == WAIT_STATUS_OUT) {
(*pProperty->Process_Status_OUT)();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ak...@us...> - 2008-02-29 14:23:38
|
Revision: 865
http://can.svn.sourceforge.net/can/?rev=865&view=rev
Author: akhe
Date: 2008-02-29 06:23:25 -0800 (Fri, 29 Feb 2008)
Log Message:
-----------
Added full version of the ST USB library. Removed the partial previous install.
Added Paths:
-----------
trunk/firmware/arm/str/common/usblib/README.txt
trunk/firmware/arm/str/common/usblib/library/
trunk/firmware/arm/str/common/usblib/library/inc/
trunk/firmware/arm/str/common/usblib/library/inc/usb_core.h
trunk/firmware/arm/str/common/usblib/library/inc/usb_def.h
trunk/firmware/arm/str/common/usblib/library/inc/usb_init.h
trunk/firmware/arm/str/common/usblib/library/inc/usb_int.h
trunk/firmware/arm/str/common/usblib/library/inc/usb_lib.h
trunk/firmware/arm/str/common/usblib/library/inc/usb_mem.h
trunk/firmware/arm/str/common/usblib/library/inc/usb_regs.h
trunk/firmware/arm/str/common/usblib/library/inc/usb_type.h
trunk/firmware/arm/str/common/usblib/library/src/
trunk/firmware/arm/str/common/usblib/library/src/usb_core.c
trunk/firmware/arm/str/common/usblib/library/src/usb_init.c
trunk/firmware/arm/str/common/usblib/library/src/usb_int.c
trunk/firmware/arm/str/common/usblib/library/src/usb_mem.c
trunk/firmware/arm/str/common/usblib/library/src/usb_regs.c
trunk/firmware/arm/str/common/usblib/stdlib/
trunk/firmware/arm/str/common/usblib/stdlib/str71x/
trunk/firmware/arm/str/common/usblib/stdlib/str71x/include/
trunk/firmware/arm/str/common/usblib/stdlib/str71x/include/71x_it.h
trunk/firmware/arm/str/common/usblib/stdlib/str71x/include/71x_lib.h
trunk/firmware/arm/str/common/usblib/stdlib/str71x/include/71x_map.h
trunk/firmware/arm/str/common/usblib/stdlib/str71x/include/71x_type.h
trunk/firmware/arm/str/common/usblib/stdlib/str71x/include/adc12.h
trunk/firmware/arm/str/common/usblib/stdlib/str71x/include/apb.h
trunk/firmware/arm/str/common/usblib/stdlib/str71x/include/bspi.h
trunk/firmware/arm/str/common/usblib/stdlib/str71x/include/can.h
trunk/firmware/arm/str/common/usblib/stdlib/str71x/include/eic.h
trunk/firmware/arm/str/common/usblib/stdlib/str71x/include/emi.h
trunk/firmware/arm/str/common/usblib/stdlib/str71x/include/flash.h
trunk/firmware/arm/str/common/usblib/stdlib/str71x/include/gpio.h
trunk/firmware/arm/str/common/usblib/stdlib/str71x/include/i2c.h
trunk/firmware/arm/str/common/usblib/stdlib/str71x/include/pcu.h
trunk/firmware/arm/str/common/usblib/stdlib/str71x/include/rccu.h
trunk/firmware/arm/str/common/usblib/stdlib/str71x/include/rtc.h
trunk/firmware/arm/str/common/usblib/stdlib/str71x/include/tim.h
trunk/firmware/arm/str/common/usblib/stdlib/str71x/include/uart.h
trunk/firmware/arm/str/common/usblib/stdlib/str71x/include/wdg.h
trunk/firmware/arm/str/common/usblib/stdlib/str71x/include/xti.h
trunk/firmware/arm/str/common/usblib/stdlib/str71x/source/
trunk/firmware/arm/str/common/usblib/stdlib/str71x/source/71x_lib.c
trunk/firmware/arm/str/common/usblib/stdlib/str71x/source/adc12.c
trunk/firmware/arm/str/common/usblib/stdlib/str71x/source/apb.c
trunk/firmware/arm/str/common/usblib/stdlib/str71x/source/bspi.c
trunk/firmware/arm/str/common/usblib/stdlib/str71x/source/can.c
trunk/firmware/arm/str/common/usblib/stdlib/str71x/source/eic.c
trunk/firmware/arm/str/common/usblib/stdlib/str71x/source/emi.c
trunk/firmware/arm/str/common/usblib/stdlib/str71x/source/flash.c
trunk/firmware/arm/str/common/usblib/stdlib/str71x/source/gpio.c
trunk/firmware/arm/str/common/usblib/stdlib/str71x/source/i2c.c
trunk/firmware/arm/str/common/usblib/stdlib/str71x/source/pcu.c
trunk/firmware/arm/str/common/usblib/stdlib/str71x/source/rccu.c
trunk/firmware/arm/str/common/usblib/stdlib/str71x/source/retarget.c
trunk/firmware/arm/str/common/usblib/stdlib/str71x/source/rtc.c
trunk/firmware/arm/str/common/usblib/stdlib/str71x/source/tim.c
trunk/firmware/arm/str/common/usblib/stdlib/str71x/source/uart.c
trunk/firmware/arm/str/common/usblib/stdlib/str71x/source/wdg.c
trunk/firmware/arm/str/common/usblib/stdlib/str71x/source/xti.c
trunk/firmware/arm/str/common/usblib/stdlib/str71x/version.txt
trunk/firmware/arm/str/common/usblib/stdlib/str75x/
trunk/firmware/arm/str/common/usblib/stdlib/str75x/inc/
trunk/firmware/arm/str/common/usblib/stdlib/str75x/inc/75x_adc.h
trunk/firmware/arm/str/common/usblib/stdlib/str75x/inc/75x_can.h
trunk/firmware/arm/str/common/usblib/stdlib/str75x/inc/75x_cfg.h
trunk/firmware/arm/str/common/usblib/stdlib/str75x/inc/75x_dma.h
trunk/firmware/arm/str/common/usblib/stdlib/str75x/inc/75x_eic.h
trunk/firmware/arm/str/common/usblib/stdlib/str75x/inc/75x_extit.h
trunk/firmware/arm/str/common/usblib/stdlib/str75x/inc/75x_gpio.h
trunk/firmware/arm/str/common/usblib/stdlib/str75x/inc/75x_i2c.h
trunk/firmware/arm/str/common/usblib/stdlib/str75x/inc/75x_lib.h
trunk/firmware/arm/str/common/usblib/stdlib/str75x/inc/75x_map.h
trunk/firmware/arm/str/common/usblib/stdlib/str75x/inc/75x_mrcc.h
trunk/firmware/arm/str/common/usblib/stdlib/str75x/inc/75x_pwm.h
trunk/firmware/arm/str/common/usblib/stdlib/str75x/inc/75x_rtc.h
trunk/firmware/arm/str/common/usblib/stdlib/str75x/inc/75x_smi.h
trunk/firmware/arm/str/common/usblib/stdlib/str75x/inc/75x_ssp.h
trunk/firmware/arm/str/common/usblib/stdlib/str75x/inc/75x_tb.h
trunk/firmware/arm/str/common/usblib/stdlib/str75x/inc/75x_tim.h
trunk/firmware/arm/str/common/usblib/stdlib/str75x/inc/75x_type.h
trunk/firmware/arm/str/common/usblib/stdlib/str75x/inc/75x_uart.h
trunk/firmware/arm/str/common/usblib/stdlib/str75x/inc/75x_wdg.h
trunk/firmware/arm/str/common/usblib/stdlib/str75x/src/
trunk/firmware/arm/str/common/usblib/stdlib/str75x/src/75x_adc.c
trunk/firmware/arm/str/common/usblib/stdlib/str75x/src/75x_can.c
trunk/firmware/arm/str/common/usblib/stdlib/str75x/src/75x_cfg.c
trunk/firmware/arm/str/common/usblib/stdlib/str75x/src/75x_dma.c
trunk/firmware/arm/str/common/usblib/stdlib/str75x/src/75x_eic.c
trunk/firmware/arm/str/common/usblib/stdlib/str75x/src/75x_extit.c
trunk/firmware/arm/str/common/usblib/stdlib/str75x/src/75x_gpio.c
trunk/firmware/arm/str/common/usblib/stdlib/str75x/src/75x_i2c.c
trunk/firmware/arm/str/common/usblib/stdlib/str75x/src/75x_lib.c
trunk/firmware/arm/str/common/usblib/stdlib/str75x/src/75x_mrcc.c
trunk/firmware/arm/str/common/usblib/stdlib/str75x/src/75x_pwm.c
trunk/firmware/arm/str/common/usblib/stdlib/str75x/src/75x_rtc.c
trunk/firmware/arm/str/common/usblib/stdlib/str75x/src/75x_smi.c
trunk/firmware/arm/str/common/usblib/stdlib/str75x/src/75x_ssp.c
trunk/firmware/arm/str/common/usblib/stdlib/str75x/src/75x_tb.c
trunk/firmware/arm/str/common/usblib/stdlib/str75x/src/75x_tim.c
trunk/firmware/arm/str/common/usblib/stdlib/str75x/src/75x_uart.c
trunk/firmware/arm/str/common/usblib/stdlib/str75x/src/75x_wdg.c
trunk/firmware/arm/str/common/usblib/stdlib/str75x/version.txt
trunk/firmware/arm/str/common/usblib/stdlib/str91x/
trunk/firmware/arm/str/common/usblib/stdlib/str91x/inc/
trunk/firmware/arm/str/common/usblib/stdlib/str91x/inc/91x_adc.h
trunk/firmware/arm/str/common/usblib/stdlib/str91x/inc/91x_ahbapb.h
trunk/firmware/arm/str/common/usblib/stdlib/str91x/inc/91x_can.h
trunk/firmware/arm/str/common/usblib/stdlib/str91x/inc/91x_dma.h
trunk/firmware/arm/str/common/usblib/stdlib/str91x/inc/91x_emi.h
trunk/firmware/arm/str/common/usblib/stdlib/str91x/inc/91x_fmi.h
trunk/firmware/arm/str/common/usblib/stdlib/str91x/inc/91x_gpio.h
trunk/firmware/arm/str/common/usblib/stdlib/str91x/inc/91x_i2c.h
trunk/firmware/arm/str/common/usblib/stdlib/str91x/inc/91x_it.h
trunk/firmware/arm/str/common/usblib/stdlib/str91x/inc/91x_lib.h
trunk/firmware/arm/str/common/usblib/stdlib/str91x/inc/91x_map.h
trunk/firmware/arm/str/common/usblib/stdlib/str91x/inc/91x_mc.h
trunk/firmware/arm/str/common/usblib/stdlib/str91x/inc/91x_rtc.h
trunk/firmware/arm/str/common/usblib/stdlib/str91x/inc/91x_scu.h
trunk/firmware/arm/str/common/usblib/stdlib/str91x/inc/91x_ssp.h
trunk/firmware/arm/str/common/usblib/stdlib/str91x/inc/91x_tim.h
trunk/firmware/arm/str/common/usblib/stdlib/str91x/inc/91x_type.h
trunk/firmware/arm/str/common/usblib/stdlib/str91x/inc/91x_uart.h
trunk/firmware/arm/str/common/usblib/stdlib/str91x/inc/91x_vic.h
trunk/firmware/arm/str/common/usblib/stdlib/str91x/inc/91x_wdg.h
trunk/firmware/arm/str/common/usblib/stdlib/str91x/inc/91x_wiu.h
trunk/firmware/arm/str/common/usblib/stdlib/str91x/src/
trunk/firmware/arm/str/common/usblib/stdlib/str91x/src/91x_adc.c
trunk/firmware/arm/str/common/usblib/stdlib/str91x/src/91x_ahbapb.c
trunk/firmware/arm/str/common/usblib/stdlib/str91x/src/91x_can.c
trunk/firmware/arm/str/common/usblib/stdlib/str91x/src/91x_dma.c
trunk/firmware/arm/str/common/usblib/stdlib/str91x/src/91x_emi.c
trunk/firmware/arm/str/common/usblib/stdlib/str91x/src/91x_fmi.c
trunk/firmware/arm/str/common/usblib/stdlib/str91x/src/91x_gpio.c
trunk/firmware/arm/str/common/usblib/stdlib/str91x/src/91x_i2c.c
trunk/firmware/arm/str/common/usblib/stdlib/str91x/src/91x_lib.c
trunk/firmware/arm/str/common/usblib/stdlib/str91x/src/91x_mc.c
trunk/firmware/arm/str/common/usblib/stdlib/str91x/src/91x_rtc.c
trunk/firmware/arm/str/common/usblib/stdlib/str91x/src/91x_scu.c
trunk/firmware/arm/str/common/usblib/stdlib/str91x/src/91x_ssp.c
trunk/firmware/arm/str/common/usblib/stdlib/str91x/src/91x_tim.c
trunk/firmware/arm/str/common/usblib/stdlib/str91x/src/91x_uart.c
trunk/firmware/arm/str/common/usblib/stdlib/str91x/src/91x_vic.c
trunk/firmware/arm/str/common/usblib/stdlib/str91x/src/91x_wdg.c
trunk/firmware/arm/str/common/usblib/stdlib/str91x/src/91x_wiu.c
trunk/firmware/arm/str/common/usblib/stdlib/str91x/version.txt
trunk/firmware/arm/str/common/usblib/str71x demos/
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/include/
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/include/71x_conf.h
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/include/71x_it.h
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/include/hw_config.h
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/include/usb_conf.h
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/include/usb_desc.h
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/include/usb_prop.h
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/include/usb_pwr.h
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/project/
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/project/EWARM/
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/project/EWARM/71x_init.s
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/project/EWARM/71x_vect.s
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/project/EWARM/Speaker Demo.ewd
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/project/EWARM/Speaker Demo.ewp
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/project/EWARM/Speaker demo.eww
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/project/EWARM/lnkarm_ram.xcl
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/project/RVDK/
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/project/RVDK/71x_init.s
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/project/RVDK/71x_vect.s
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/project/RVDK/Audio Speaker.prj
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/project/RVDK/scat_ram.scf
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/source/
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/source/71x_it.c
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/source/hw_config.c
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/source/main.c
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/source/usb_desc.c
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/source/usb_endp.c
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/source/usb_istr.c
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/source/usb_prop.c
trunk/firmware/arm/str/common/usblib/str71x demos/Audio Speaker/source/usb_pwr.c
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/Software Applet/
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/Software Applet/Readme.txt
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/Software Applet/images/
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/Software Applet/images/HelloWorld-str710-eval.dfu
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/Software Applet/images/HelloWorld-str710-eval.hex
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/Software Applet/images/MassStorage-str710-eval.dfu
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/Software Applet/images/MassStorage-str710-eval.hex
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/Software Applet/images/MassStorage.dfu
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/Software Applet/images/MassStorage.hex
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/Software Applet/images/joystick.dfu
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/Software Applet/images/joystick.hex
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/Software Applet/setup.exe
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/include/
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/include/71x_conf.h
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/include/71x_it.h
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/include/hw_config.h
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/include/usb_conf.h
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/include/usb_desc.h
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/include/usb_prop.h
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/include/usb_pwr.h
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/project/
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/project/EWARM/
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/project/EWARM/71x_init.s
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/project/EWARM/71x_vect.s
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/project/EWARM/DFU.dep
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/project/EWARM/DFU.ewd
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/project/EWARM/DFU.ewp
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/project/EWARM/DFU.eww
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/project/EWARM/init_tab.s
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/project/EWARM/lnkarm_flash.xcl
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/project/RVDK/
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/project/RVDK/71x_init.s
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/project/RVDK/71x_vect.s
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/project/RVDK/DFU.prj
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/project/RVDK/scat.scf
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/source/
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/source/71x_it.c
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/source/hw_config.c
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/source/main.c
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/source/usb_desc.c
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/source/usb_istr.c
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/source/usb_prop.c
trunk/firmware/arm/str/common/usblib/str71x demos/Device Firmware Upgarde/source/usb_pwr.c
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/include/
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/include/71x_conf.h
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/include/71x_it.h
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/include/hw_config.h
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/include/usb_conf.h
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/include/usb_desc.h
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/include/usb_prop.h
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/include/usb_pwr.h
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/project/
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/project/EWARM/
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/project/EWARM/71x_init.s
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/project/EWARM/71x_vect.s
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/project/EWARM/Joystick Mouse.dep
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/project/EWARM/Joystick Mouse.ewd
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/project/EWARM/Joystick Mouse.ewp
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/project/EWARM/Joystick Mouse.eww
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/project/EWARM/lnkarm_flash.xcl
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/project/RVDK/
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/project/RVDK/71x_init.s
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/project/RVDK/71x_vect.s
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/project/RVDK/Joystick.prj
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/project/RVDK/scat.scf
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/source/
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/source/71x_it.c
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/source/hw_config.c
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/source/main.c
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/source/usb_desc.c
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/source/usb_istr.c
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/source/usb_prop.c
trunk/firmware/arm/str/common/usblib/str71x demos/Joystick Mouse/source/usb_pwr.c
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Common/
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Common/include/
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Common/include/71x_conf.h
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Common/include/71x_it.h
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Common/include/hw_config.h
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Common/include/memory.h
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Common/include/usb_desc.h
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Common/include/usb_prop.h
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Common/include/usb_pwr.h
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Common/include/usb_scsi.h
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Common/source/
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Common/source/71x_it.c
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Common/source/hw_config.c
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Common/source/main.c
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Common/source/scsi_data.c
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Common/source/usb_desc.c
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Common/source/usb_istr.c
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Common/source/usb_pwr.c
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Double Buffer/
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Double Buffer/include/
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Double Buffer/include/usb_bot.h
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Double Buffer/include/usb_conf.h
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Double Buffer/project/
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Double Buffer/project/EWARM/
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Double Buffer/project/EWARM/71x_init.s
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Double Buffer/project/EWARM/71x_vect.s
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Double Buffer/project/EWARM/Mass Storage Double Buffer.ewd
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Double Buffer/project/EWARM/Mass Storage Double Buffer.ewp
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Double Buffer/project/EWARM/Mass Storage Double Buffer.eww
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Double Buffer/project/EWARM/lnkarm_flash.xcl
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Double Buffer/project/RVDK/
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Double Buffer/project/RVDK/71x_init.s
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Double Buffer/project/RVDK/71x_vect.s
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Double Buffer/project/RVDK/MassStorage_Doublebuffer.prj
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Double Buffer/project/RVDK/scat.scf
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Double Buffer/source/
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Double Buffer/source/memory.c
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Double Buffer/source/usb_bot.c
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Double Buffer/source/usb_endp.c
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Double Buffer/source/usb_prop.c
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Double Buffer/source/usb_scsi.c
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Simple Buffer/
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Simple Buffer/include/
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Simple Buffer/include/usb_bot.h
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Simple Buffer/include/usb_conf.h
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Simple Buffer/project/
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Simple Buffer/project/EWARM/
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Simple Buffer/project/EWARM/71x_init.s
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Simple Buffer/project/EWARM/71x_vect.s
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Simple Buffer/project/EWARM/Mass Storage Simple Buffer.ewd
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Simple Buffer/project/EWARM/Mass Storage Simple Buffer.ewp
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Simple Buffer/project/EWARM/Mass Storage Simple Buffer.eww
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Simple Buffer/project/EWARM/lnkarm_flash.xcl
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Simple Buffer/project/RVDK/
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Simple Buffer/project/RVDK/71x_init.s
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Simple Buffer/project/RVDK/71x_vect.s
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Simple Buffer/project/RVDK/MassStorage_Simplebuffer.prj
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Simple Buffer/project/RVDK/scat.scf
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Simple Buffer/source/
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Simple Buffer/source/memory.c
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Simple Buffer/source/usb_bot.c
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Simple Buffer/source/usb_endp.c
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Simple Buffer/source/usb_prop.c
trunk/firmware/arm/str/common/usblib/str71x demos/Mass Storage/Simple Buffer/source/usb_scsi.c
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/Software Driver/
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/Software Driver/stmcdc.inf
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/include/
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/include/71x_conf.h
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/include/71x_it.h
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/include/hw_config.h
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/include/usb_conf.h
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/include/usb_desc.h
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/include/usb_prop.h
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/include/usb_pwr.h
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/project/
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/project/EWARM/
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/project/EWARM/71x_init.s
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/project/EWARM/71x_vect.s
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/project/EWARM/Virtual Com Port.ewd
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/project/EWARM/Virtual Com Port.ewp
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/project/EWARM/Virtual Com Port.eww
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/project/EWARM/lnkarm_flash.xcl
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/project/RVDK/
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/project/RVDK/71x_init.s
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/project/RVDK/71x_vect.s
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/project/RVDK/Virtual_COM_Port.prj
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/project/RVDK/scat.scf
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/source/
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/source/71x_it.c
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/source/hw_config.c
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/source/main.c
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/source/usb_desc.c
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/source/usb_endp.c
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/source/usb_istr.c
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/source/usb_prop.c
trunk/firmware/arm/str/common/usblib/str71x demos/Virtual Com Port/source/usb_pwr.c
trunk/firmware/arm/str/common/usblib/str75x demos/
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/include/
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/include/75x_conf.h
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/include/hw_config.h
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/include/usb_conf.h
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/include/usb_desc.h
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/include/usb_prop.h
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/include/usb_pwr.h
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/project/
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/project/EWARM/
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/project/EWARM/75x_init.s
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/project/EWARM/75x_vect.s
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/project/EWARM/STR Audio Speaker.ewd
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/project/EWARM/STR Audio Speaker.ewp
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/project/EWARM/STR Audio Speaker.eww
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/project/EWARM/lnkarm_flash.xcl
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/project/RVDK/
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/project/RVDK/75x_init.s
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/project/RVDK/75x_vect.s
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/project/RVDK/Audio_Speaker.prj
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/project/RVDK/scat_flash.scf
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/source/
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/source/75x_it.c
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/source/hw_config.c
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/source/main.c
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/source/usb_desc.c
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/source/usb_endp.c
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/source/usb_istr.c
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/source/usb_prop.c
trunk/firmware/arm/str/common/usblib/str75x demos/Audio Speaker/source/usb_pwr.c
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/Software Applet/
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/Software Applet/Readme.txt
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/Software Applet/images/
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/Software Applet/images/STR750-Eval_Audio Speaker.dfu
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/Software Applet/images/STR750-Eval_Joystick Mouse.dfu
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/Software Applet/images/STR750-Eval_Microphone.dfu
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/Software Applet/images/STR750-Eval_Virtual Com Port.dfu
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/Software Applet/setup.exe
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/include/
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/include/75x_conf.h
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/include/hw_config.h
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/include/usb_conf.h
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/include/usb_desc.h
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/include/usb_prop.h
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/include/usb_pwr.h
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/project/
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/project/EWARM/
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/project/EWARM/75x_init.s
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/project/EWARM/75x_vect.s
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/project/EWARM/DFU.ewd
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/project/EWARM/DFU.ewp
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/project/EWARM/DFU.eww
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/project/EWARM/init_tab.s
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/project/EWARM/lnkarm_flash.xcl
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/project/RVDK/
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/project/RVDK/75x_init.s
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/project/RVDK/75x_vect.s
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/project/RVDK/DFU.prj
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/project/RVDK/scat_flash.scf
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/source/
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/source/75x_it.c
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/source/hw_config.c
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/source/main.c
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/source/usb_desc.c
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/source/usb_istr.c
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/source/usb_prop.c
trunk/firmware/arm/str/common/usblib/str75x demos/Device Firmware Upgrade/source/usb_pwr.c
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/include/
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/include/75x_conf.h
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/include/hw_config.h
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/include/usb_conf.h
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/include/usb_desc.h
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/include/usb_prop.h
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/include/usb_pwr.h
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/project/
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/project/EWARM/
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/project/EWARM/75x_init.s
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/project/EWARM/75x_vect.s
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/project/EWARM/Joystick Mouse.ewd
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/project/EWARM/Joystick Mouse.ewp
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/project/EWARM/Joystick Mouse.eww
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/project/EWARM/lnkarm_flash.xcl
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/project/RVDK/
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/project/RVDK/75x_init.s
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/project/RVDK/75x_vect.s
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/project/RVDK/Joystick_Mouse.prj
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/project/RVDK/scat_flash.scf
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/source/
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/source/75x_it.c
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/source/hw_config.c
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/source/main.c
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/source/usb_desc.c
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/source/usb_istr.c
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/source/usb_prop.c
trunk/firmware/arm/str/common/usblib/str75x demos/Joystick Mouse/source/usb_pwr.c
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/include/
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/include/75x_conf.h
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/include/hw_config.h
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/include/usb_conf.h
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/include/usb_desc.h
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/include/usb_prop.h
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/include/usb_pwr.h
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/project/
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/project/EWARM/
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/project/EWARM/75x_init.s
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/project/EWARM/75x_vect.s
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/project/EWARM/STR USB Microphone.ewd
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/project/EWARM/STR USB Microphone.ewp
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/project/EWARM/STR USB Microphone.eww
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/project/EWARM/lnkarm_flash.xcl
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/project/RVDK/
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/project/RVDK/75x_init.s
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/project/RVDK/75x_vect.s
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/project/RVDK/Microphone.prj
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/project/RVDK/scat_flash.scf
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/source/
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/source/75x_it.c
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/source/hw_config.c
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/source/main.c
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/source/usb_desc.c
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/source/usb_endp.c
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/source/usb_istr.c
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/source/usb_prop.c
trunk/firmware/arm/str/common/usblib/str75x demos/Microphone/source/usb_pwr.c
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/Software Driver/
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/Software Driver/stmcdc.inf
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/include/
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/include/75x_conf.h
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/include/hw_config.h
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/include/usb_conf.h
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/include/usb_desc.h
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/include/usb_prop.h
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/include/usb_pwr.h
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/project/
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/project/EWARM/
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/project/EWARM/75x_init.s
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/project/EWARM/75x_vect.s
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/project/EWARM/Virtual Com Port.ewd
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/project/EWARM/Virtual Com Port.ewp
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/project/EWARM/Virtual Com Port.eww
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/project/EWARM/lnkarm_flash.xcl
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/project/RVDK/
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/project/RVDK/75x_init.s
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/project/RVDK/75x_vect.s
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/project/RVDK/Virtual_COM_Port.prj
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/project/RVDK/scat_flash.scf
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/source/
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/source/75x_it.c
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/source/hw_config.c
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/source/main.c
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/source/usb_desc.c
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/source/usb_endp.c
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/source/usb_istr.c
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/source/usb_prop.c
trunk/firmware/arm/str/common/usblib/str75x demos/Virtual Com Port/source/usb_pwr.c
trunk/firmware/arm/str/common/usblib/str91x demos/
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/include/
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/include/91x_conf.h
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/include/hw_config.h
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/include/usb_conf.h
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/include/usb_desc.h
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/include/usb_prop.h
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/include/usb_pwr.h
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/include/usb_rw.h
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/project/
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/project/EWARM/
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/project/EWARM/91x_init.s
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/project/EWARM/91x_vect.s
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/project/EWARM/STR Audio Speaker.ewd
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/project/EWARM/STR Audio Speaker.ewp
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/project/EWARM/STR Audio Speaker.eww
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/project/EWARM/lnkarm_flash.xcl
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/project/RVDK/
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/project/RVDK/91x_init.s
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/project/RVDK/91x_vect.s
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/project/RVDK/Audio_Speaker.prj
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/project/RVDK/scat.scf
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/source/
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/source/91x_it.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/source/hw_config.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/source/main.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/source/usb_desc.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/source/usb_endp.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/source/usb_istr.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/source/usb_prop.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/source/usb_pwr.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio Speaker/source/usb_rw.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/include/
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/include/91x_conf.h
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/include/hw_config.h
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/include/usb_conf.h
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/include/usb_desc.h
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/include/usb_prop.h
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/include/usb_pwr.h
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/project/
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/project/EWARM/
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/project/EWARM/91x_init.s
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/project/EWARM/91x_vect.s
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/project/EWARM/STR Audio Speaker (Linked Mode).ewd
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/project/EWARM/STR Audio Speaker (Linked Mode).ewp
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/project/EWARM/STR Audio Speaker (Linked Mode).eww
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/project/EWARM/lnkarm_flash.xcl
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/project/RVDK/
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/project/RVDK/91x_init.s
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/project/RVDK/91x_vect.s
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/project/RVDK/Audio_Speaker.prj
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/project/RVDK/scat.scf
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/source/
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/source/91x_it.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/source/hw_config.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/source/main.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/source/usb_desc.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/source/usb_istr.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/source/usb_prop.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode & Linked List)/source/usb_pwr.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/include/
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/include/91x_conf.h
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/include/hw_config.h
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/include/usb_conf.h
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/include/usb_desc.h
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/include/usb_prop.h
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/include/usb_pwr.h
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/project/
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/project/EWARM/
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/project/EWARM/91x_init.s
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/project/EWARM/91x_vect.s
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/project/EWARM/Audio speaker (DMA Linked Mode).ewd
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/project/EWARM/Audio speaker (DMA Linked Mode).ewp
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/project/EWARM/Audio speaker (DMA Linked Mode).eww
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/project/EWARM/lnkarm_flash.xcl
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/project/RVDK/
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/project/RVDK/91x_init.s
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/project/RVDK/91x_vect.s
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/project/RVDK/Audio_Speaker.prj
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/project/RVDK/scat.scf
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/source/
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/source/91x_it.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/source/hw_config.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/source/main.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/source/usb_desc.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/source/usb_istr.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/source/usb_prop.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Linked Mode)/source/usb_pwr.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/include/
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/include/91x_conf.h
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/include/USB_desc.h
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/include/hw_config.h
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/include/usb_conf.h
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/include/usb_prop.h
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/include/usb_pwr.h
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/project/
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/project/EWARM/
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/project/EWARM/91x_init.s
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/project/EWARM/91x_vect.s
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/project/EWARM/Audio speaker (DMA Unlinked Mode).ewd
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/project/EWARM/Audio speaker (DMA Unlinked Mode).ewp
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/project/EWARM/Audio speaker (DMA Unlinked Mode).eww
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/project/EWARM/lnkarm_flash.xcl
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/project/RVDK/
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/project/RVDK/91x_init.s
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/project/RVDK/91x_vect.s
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/project/RVDK/Audio_Speaker.prj
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/project/RVDK/scat.scf
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/source/
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/source/91x_it.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/source/hw_config.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/source/main.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/source/usb_desc.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/source/usb_endp.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/source/usb_istr.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/source/usb_prop.c
trunk/firmware/arm/str/common/usblib/str91x demos/Audio speaker (DMA Unlinked Mode)/source/usb_pwr.c
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/Software Applet/
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/Software Applet/Readme.txt
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/Software Applet/images/
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/Software Applet/images/DFU CAPS image.zip
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/Software Applet/images/STR910-Eval_Audio Speaker.bin
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/Software Applet/images/STR910-Eval_Audio Speaker.dfu
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/Software Applet/images/STR910-Eval_Demo.bin
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/Software Applet/images/STR910-Eval_Demo.dfu
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/Software Applet/images/STR910-Eval_Joystick Mouse.bin
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/Software Applet/images/STR910-Eval_Joystick Mouse.dfu
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/Software Applet/images/STR910-Eval_Mass Storage.bin
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/Software Applet/images/STR910-Eval_Mass Storage.dfu
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/Software Applet/images/STR910-Eval_Virtual Com Port.bin
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/Software Applet/images/STR910-Eval_Virtual Com Port.dfu
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/Software Applet/setup.exe
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/include/
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/include/91x_conf.h
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/include/hw_config.h
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/include/usb_conf.h
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/include/usb_desc.h
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/include/usb_prop.h
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/include/usb_pwr.h
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/project/
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/project/EWARM/
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/project/EWARM/91x_init.s
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/project/EWARM/91x_vect.s
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/project/EWARM/Device Firmware Upgrade.ewd
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/project/EWARM/Device Firmware Upgrade.ewp
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/project/EWARM/Device Firmware Upgrade.eww
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/project/EWARM/FlashSTR91xbank1.d79
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/project/EWARM/lnkarm_flash.xcl
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/project/RVDK/
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/project/RVDK/91x_init.s
trunk/firmware/arm/str/common/usblib/str91x demos/Device Firmware Upgrade/project/RVDK/91x_vect.s
trunk/firmware/a...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-28 21:55:38
|
Revision: 864
http://can.svn.sourceforge.net/can/?rev=864&view=rev
Author: akhe
Date: 2008-02-28 13:55:05 -0800 (Thu, 28 Feb 2008)
Log Message:
-----------
First version of new VSCP serial protocol (not tested yet).
Modified Paths:
--------------
trunk/firmware/arm/str/cantest_str75x_iar/cantest.dep
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dbgdt
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dni
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.wsdt
trunk/firmware/common/vscp_class.h
Added Paths:
-----------
trunk/firmware/common/crc.c
trunk/firmware/common/crc.h
trunk/firmware/common/vscp_serial.c
trunk/firmware/common/vscp_serial.h
Modified: trunk/firmware/arm/str/cantest_str75x_iar/cantest.dep
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/cantest.dep 2008-02-28 14:18:33 UTC (rev 863)
+++ trunk/firmware/arm/str/cantest_str75x_iar/cantest.dep 2008-02-28 21:55:05 UTC (rev 864)
@@ -46,6 +46,13 @@
<file>$PROJ_DIR$\str75x_lib\src\75x_can.c</file>
<file>$PROJ_DIR$\str75x_lib\src\75x_lib.c</file>
<file>$PROJ_DIR$\str75x_lib\src\75x_mrcc.c</file>
+ <file>$PROJ_DIR$\..\..\..\common\vscp_serial.h</file>
+ <file>$PROJ_DIR$\..\..\..\common\vscp_serial.c</file>
+ <file>$PROJ_DIR$\..\..\..\common\vscp_class.h</file>
+ <file>$PROJ_DIR$\..\..\..\common\crc.c</file>
+ <file>$PROJ_DIR$\..\..\..\pic\can4vscp_232\project\main.c</file>
+ <file>$PROJ_DIR$\..\..\..\pic\can4vscp_232\project\serint.c</file>
+ <file>$PROJ_DIR$\..\..\..\common\crc.h</file>
</outputs>
<file>
<name>[ROOT_NODE]</name>
Modified: trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dbgdt
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dbgdt 2008-02-28 14:18:33 UTC (rev 863)
+++ trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dbgdt 2008-02-28 21:55:05 UTC (rev 864)
@@ -71,14 +71,14 @@
- <Pane><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\main.c</Filename><XPos>0</XPos><YPos>326</YPos><SelStart>9236</SelStart><SelEnd>9236</SelEnd></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\main.c</Filename><XPos>0</XPos><YPos>116</YPos><SelStart>1620</SelStart><SelEnd>1620</SelEnd></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>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>2173</SelStart><SelEnd>2173</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\main.c</Filename><XPos>0</XPos><YPos>116</YPos><SelStart>1620</SelStart><SelEnd>1620</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\str75x_lib\src\75x_can.c</Filename><XPos>0</XPos><YPos>443</YPos><SelStart>21143</SelStart><SelEnd>21143</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\Startup\75x_init.s</Filename><XPos>0</XPos><YPos>91</YPos><SelStart>4272</SelStart><SelEnd>4272</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.h</Filename><XPos>0</XPos><YPos>139</YPos><SelStart>3033</SelStart><SelEnd>3033</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.c</Filename><XPos>0</XPos><YPos>302</YPos><SelStart>9128</SelStart><SelEnd>9128</SelEnd></Tab><ActiveTab>5</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\main.c</Filename><XPos>0</XPos><YPos>449</YPos><SelStart>10491</SelStart><SelEnd>10727</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\serint.c</Filename><XPos>0</XPos><YPos>252</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
- <Top><Row0><Sizes><Toolbar-01353ab8><key>iaridepm.enu1</key></Toolbar-01353ab8></Sizes></Row0><Row1><Sizes><Toolbar-0583cc40><key>debuggergui.enu1</key></Toolbar-0583cc40></Sizes></Row1></Top><Left><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>422</Bottom><Right>198</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>616279</sizeVertCY></Rect></Wnd1></Sizes></Row0></Left><Right><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>422</Bottom><Right>198</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>616279</sizeVertCY></Rect></Wnd2></Sizes></Row0></Right><Bottom><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1026</Right><x>-2</x><y>-2</y><xscreen>1028</xscreen><yscreen>200</yscreen><sizeHorzCX>1003906</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>290698</sizeVertCY></Rect></Wnd0></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
+ <Top><Row0><Sizes><Toolbar-01353ab8><key>iaridepm.enu1</key></Toolbar-01353ab8></Sizes></Row0><Row1><Sizes><Toolbar-0761bb20><key>debuggergui.enu1</key></Toolbar-0761bb20></Sizes></Row1></Top><Left><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>498</Bottom><Right>198</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>726744</sizeVertCY></Rect></Wnd1></Sizes></Row0></Left><Right><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>498</Bottom><Right>198</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>726744</sizeVertCY></Rect></Wnd2></Sizes></Row0></Right><Bottom><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>122</Bottom><Right>1026</Right><x>-2</x><y>-2</y><xscreen>1028</xscreen><yscreen>124</yscreen><sizeHorzCX>1003906</sizeHorzCX><sizeHorzCY>180233</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>290698</sizeVertCY></Rect></Wnd0></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Project>
Modified: trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dni
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dni 2008-02-28 14:18:33 UTC (rev 863)
+++ trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dni 2008-02-28 21:55:05 UTC (rev 864)
@@ -2,10 +2,11 @@
Enabled=_ 0
[JLinkDriver]
WatchCond=_ 0
-Watch0=_ 0 "0x00000000" 0 "0x00000000" 0 "0x00000000" 0 "0x00000000" 0 0 0 0
-Watch1=_ 0 "0x00000000" 0 "0x00000000" 0 "0x00000000" 0 "0x00000000" 0 0 0 0
+Watch0=_ 0 "" 0 "" 0 "" 0 "" 0 0 0 0
+Watch1=_ 0 "" 0 "" 0 "" 0 "" 0 0 0 0
[DisAssemblyWindow]
-NumStates=_ 0
+NumStates=_ 1
+State 1=_ 1
[Profiling]
Enabled=0
[StackPlugin]
@@ -27,17 +28,17 @@
TypeViolation=1
UnspecRange=1
ActionState=1
+[Log file]
+LoggingEnabled=_ 0
+LogFile=_ ""
+Category=_ 0
+[TermIOLog]
+LoggingEnabled=_ 0
+LogFile=_ ""
[Disassemble mode]
mode=0
[Breakpoints]
Count=0
-[Log file]
-LoggingEnabled=_ 0
-LogFile=_ ""
-Category=_ 0
[TraceHelper]
Enabled=0
ShowSource=1
-[TermIOLog]
-LoggingEnabled=_ 0
-LogFile=_ ""
Modified: trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.wsdt
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.wsdt 2008-02-28 14:18:33 UTC (rev 863)
+++ trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.wsdt 2008-02-28 21:55:05 UTC (rev 864)
@@ -53,7 +53,7 @@
- <Pane><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\main.c</Filename><XPos>0</XPos><YPos>59</YPos><SelStart>2616</SelStart><SelEnd>2616</SelEnd></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\main.c</Filename><XPos>0</XPos><YPos>116</YPos><SelStart>1620</SelStart><SelEnd>1620</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\str75x_lib\src\75x_can.c</Filename><XPos>0</XPos><YPos>443</YPos><SelStart>21143</SelStart><SelEnd>21143</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\Startup\75x_init.s</Filename><XPos>0</XPos><YPos>91</YPos><SelStart>4272</SelStart><SelEnd>4272</SelEnd></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>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>2173</SelStart><SelEnd>2173</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\main.c</Filename><XPos>0</XPos><YPos>116</YPos><SelStart>1620</SelStart><SelEnd>1620</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\str75x_lib\src\75x_can.c</Filename><XPos>0</XPos><YPos>443</YPos><SelStart>21143</SelStart><SelEnd>21143</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str75x_iar\Startup\75x_init.s</Filename><XPos>0</XPos><YPos>91</YPos><SelStart>4272</SelStart><SelEnd>4272</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.h</Filename><XPos>0</XPos><YPos>139</YPos><SelStart>3033</SelStart><SelEnd>3033</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\common\vscp_serial.c</Filename><XPos>0</XPos><YPos>110</YPos><SelStart>8871</SelStart><SelEnd>8871</SelEnd></Tab><ActiveTab>5</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\main.c</Filename><XPos>0</XPos><YPos>449</YPos><SelStart>10491</SelStart><SelEnd>10727</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\pic\can4vscp_232\project\serint.c</Filename><XPos>0</XPos><YPos>252</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
Added: trunk/firmware/common/crc.c
===================================================================
--- trunk/firmware/common/crc.c (rev 0)
+++ trunk/firmware/common/crc.c 2008-02-28 21:55:05 UTC (rev 864)
@@ -0,0 +1,235 @@
+/**********************************************************************
+ *
+ * Filename: crc.c
+ *
+ * Description: Slow and fast implementations of the CRC standards.
+ *
+ * Notes: The parameters for each supported CRC standard are
+ * defined in the header file crc.h. The implementations
+ * here should stand up to further additions to that list.
+ *
+ *
+ * Copyright (c) 2000 by Michael Barr. This software is placed into
+ * the public domain and may be used for any purpose. However, this
+ * notice must not be changed or removed and no warranty is either
+ * expressed or implied by its publication or distribution.
+ *
+ **********************************************************************/
+
+
+#include "crc.h"
+
+
+/*
+ * Derive parameters from the standard-specific parameters in crc.h.
+ */
+#define WIDTH (8 * sizeof(crc))
+#define TOPBIT (1 << (WIDTH - 1))
+
+#if ( REFLECT_DATA == TRUE )
+#undef REFLECT_DATA
+#define REFLECT_DATA(X) ((unsigned char) reflect((X), 8))
+#else
+#undef REFLECT_DATA
+#define REFLECT_DATA(X) (X)
+#endif
+
+#if (REFLECT_REMAINDER == TRUE)
+#undef REFLECT_REMAINDER
+#define REFLECT_REMAINDER(X) ((crc) reflect((X), WIDTH))
+#else
+#undef REFLECT_REMAINDER
+#define REFLECT_REMAINDER(X) (X)
+#endif
+
+
+/*********************************************************************
+ *
+ * Function: reflect()
+ *
+ * Description: Reorder the bits of a binary sequence, by reflecting
+ * them about the middle position.
+ *
+ * Notes: No checking is done that nBits <= 32.
+ *
+ * Returns: The reflection of the original data.
+ *
+ *********************************************************************/
+static unsigned long
+reflect(unsigned long data, unsigned char nBits)
+{
+ unsigned long reflection = 0x00000000;
+ unsigned char bit;
+
+ /*
+ * Reflect the data about the center bit.
+ */
+ for (bit = 0; bit < nBits; ++bit)
+ {
+ /*
+ * If the LSB bit is set, set the reflection of it.
+ */
+ if (data & 0x01)
+ {
+ reflection |= (1 << ((nBits - 1) - bit));
+ }
+
+ data = (data >> 1);
+ }
+
+ return (reflection);
+
+} /* reflect() */
+
+
+/*********************************************************************
+ *
+ * Function: crcSlow()
+ *
+ * Description: Compute the CRC of a given message.
+ *
+ * Notes:
+ *
+ * Returns: The CRC of the message.
+ *
+ *********************************************************************/
+crc
+crcSlow( unsigned char const message[], int nBytes )
+{
+ crc remainder = INITIAL_REMAINDER;
+ int byte;
+ unsigned char bit;
+
+ /*
+ * Perform modulo-2 division, a byte at a time.
+ */
+ for (byte = 0; byte < nBytes; ++byte)
+ {
+ /*
+ * Bring the next byte into the remainder.
+ */
+ remainder ^= (REFLECT_DATA(message[byte]) << (WIDTH - 8));
+
+ /*
+ * Perform modulo-2 division, a bit at a time.
+ */
+ for (bit = 8; bit > 0; --bit)
+ {
+ /*
+ * Try to divide the current data bit.
+ */
+ if (remainder & TOPBIT)
+ {
+ remainder = (remainder << 1) ^ POLYNOMIAL;
+ }
+ else
+ {
+ remainder = (remainder << 1);
+ }
+ }
+ }
+
+ /*
+ * The final remainder is the CRC result.
+ */
+ return (REFLECT_REMAINDER(remainder) ^ FINAL_XOR_VALUE);
+
+} /* crcSlow() */
+
+
+crc crcTable[256];
+
+
+/*********************************************************************
+ *
+ * Function: crcInit()
+ *
+ * Description: Populate the partial CRC lookup table.
+ *
+ * Notes: This function must be rerun any time the CRC standard
+ * is changed. If desired, it can be run "offline" and
+ * the table results stored in an embedded system's ROM.
+ *
+ * Returns: None defined.
+ *
+ *********************************************************************/
+void
+crcInit(void)
+{
+ crc remainder;
+ int dividend;
+ unsigned char bit;
+
+
+ /*
+ * Compute the remainder of each possible dividend.
+ */
+ for (dividend = 0; dividend < 256; ++dividend)
+ {
+ /*
+ * Start with the dividend followed by zeros.
+ */
+ remainder = dividend << (WIDTH - 8);
+
+ /*
+ * Perform modulo-2 division, a bit at a time.
+ */
+ for (bit = 8; bit > 0; --bit)
+ {
+ /*
+ * Try to divide the current data bit.
+ */
+ if (remainder & TOPBIT)
+ {
+ remainder = (remainder << 1) ^ POLYNOMIAL;
+ }
+ else
+ {
+ remainder = (remainder << 1);
+ }
+ }
+
+ /*
+ * Store the result into the table.
+ */
+ crcTable[dividend] = remainder;
+ }
+
+} /* crcInit() */
+
+
+/*********************************************************************
+ *
+ * Function: crcFast()
+ *
+ * Description: Compute the CRC of a given message.
+ *
+ * Notes: crcInit() must be called first.
+ *
+ * Returns: The CRC of the message.
+ *
+ *********************************************************************/
+crc
+crcFast(unsigned char const message[], int nBytes)
+{
+ crc remainder = INITIAL_REMAINDER;
+ unsigned char data;
+ int byte;
+
+
+ /*
+ * Divide the message by the polynomial, a byte at a time.
+ */
+ for (byte = 0; byte < nBytes; ++byte)
+ {
+ data = REFLECT_DATA(message[byte]) ^ (remainder >> (WIDTH - 8));
+ remainder = crcTable[data] ^ (remainder << 8);
+ }
+
+ /*
+ * The final remainder is the CRC.
+ */
+ return (REFLECT_REMAINDER(remainder) ^ FINAL_XOR_VALUE);
+
+} /* crcFast() */
+
Added: trunk/firmware/common/crc.h
===================================================================
--- trunk/firmware/common/crc.h (rev 0)
+++ trunk/firmware/common/crc.h 2008-02-28 21:55:05 UTC (rev 864)
@@ -0,0 +1,89 @@
+/**********************************************************************
+ *
+ * Filename: crc.h
+ *
+ * Description: A header file describing the various CRC standards.
+ *
+ * Notes:
+ *
+ *
+ * Copyright (c) 2000 by Michael Barr. This software is placed into
+ * the public domain and may be used for any purpose. However, this
+ * notice must not be changed or removed and no warranty is either
+ * expressed or implied by its publication or distribution.
+ **********************************************************************/
+
+#ifndef _crc_h
+#define _crc_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifndef FALSE
+#define FALSE 0
+#endif
+
+#ifndef TRUE
+#define TRUE 1
+#endif
+
+/*
+ * Select the CRC standard from the list that follows.
+ */
+#define CRC_CCITT
+
+
+#if defined( CRC_CCITT )
+
+typedef unsigned short crc;
+
+#define CRC_NAME "CRC-CCITT"
+#define POLYNOMIAL 0x1021
+#define INITIAL_REMAINDER 0xFFFF
+#define FINAL_XOR_VALUE 0x0000
+#define REFLECT_DATA FALSE
+#define REFLECT_REMAINDER FALSE
+#define CHECK_VALUE 0x29B1
+
+#elif defined(CRC16)
+
+typedef unsigned short crc;
+
+#define CRC_NAME "CRC-16"
+#define POLYNOMIAL 0x8005
+#define INITIAL_REMAINDER 0x0000
+#define FINAL_XOR_VALUE 0x0000
+#define REFLECT_DATA TRUE
+#define REFLECT_REMAINDER TRUE
+#define CHECK_VALUE 0xBB3D
+
+#elif defined(CRC32)
+
+typedef unsigned long crc;
+
+#define CRC_NAME "CRC-32"
+#define POLYNOMIAL 0x04C11DB7
+#define INITIAL_REMAINDER 0xFFFFFFFF
+#define FINAL_XOR_VALUE 0xFFFFFFFF
+#define REFLECT_DATA TRUE
+#define REFLECT_REMAINDER TRUE
+#define CHECK_VALUE 0xCBF43926
+
+#else
+
+#error "One of CRC_CCITT, CRC16, or CRC32 must be #define'd."
+
+#endif
+
+
+void crcInit( void );
+crc crcSlow( unsigned char const message[], int nBytes );
+crc crcFast( unsigned char const message[], int nBytes) ;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _crc_h */
+
Modified: trunk/firmware/common/vscp_class.h
===================================================================
--- trunk/firmware/common/vscp_class.h 2008-02-28 14:18:33 UTC (rev 863)
+++ trunk/firmware/common/vscp_class.h 2008-02-28 21:55:05 UTC (rev 864)
@@ -5,16 +5,16 @@
*
* @section description Description
**********************************
- * This module contains the code that implements that
- *
+ * This module contains the definitions for the
+ * available VSCP class id's
*********************************************************************/
/* ******************************************************************************
- * VSCP (Very Simple Control Protocol)
- * http://www.vscp.org
+ * VSCP (Very Simple Control Protocol)
+ * http://www.vscp.org
*
- * Copyright (C) 1995-2008 Ake Hedman,
- # D of Scandinavia, <ak...@do...>
+ * Copyright (C) 1995-2008 Ake Hedman,
+ * D of Scandinavia, <ak...@do...>
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
Added: trunk/firmware/common/vscp_serial.c
===================================================================
--- trunk/firmware/common/vscp_serial.c (rev 0)
+++ trunk/firmware/common/vscp_serial.c 2008-02-28 21:55:05 UTC (rev 864)
@@ -0,0 +1,327 @@
+ /**
+ * @brief VSCP Serial Protocol
+ * @file vscp_serial.c
+ * @author Ake Hedman, D of Scandinavia, www.vscp.org
+ *
+ * @section description Description
+ **********************************
+ * This module contains the code that implements the
+ * VSCP serial protocol.
+ *********************************************************************/
+
+/* ******************************************************************************
+ * VSCP (Very Simple Control Protocol)
+ * http://www.vscp.org
+ *
+ * Copyright (C) 1995-2008 Ake Hedman,
+ * D of Scandinavia, <ak...@do...>
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty. In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ * claim that you wrote the original software. If you use this software
+ * in a product, an acknowledgment in the product documentation would be
+ * appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ * misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ *
+ * This file is part of VSCP - Very Simple Control Protocol
+ * http://www.vscp.org
+ *
+ * ******************************************************************************
+*/
+
+#include "vscp.h"
+#include "vscp_serial.h"
+#include "crc.h"
+
+// Globals
+uint8_t main_state; // state for the state machine
+uint8_t sub_state; // substate for the state machine
+uint8_t msgbuffer[15]; // Buffer for current event
+uint8_t buffer_cnt; // Character count for buffer
+uint8_t checksum; // Packet checksum
+
+#ifdef VSCP_SERIAL_ENABLE_FLYING_WINDOWS
+
+// Flying windows frames
+uint8_t cntFlyFrames; // Number of outstanding flying frames
+
+// Array with info about outstanding flying window frames
+vscp_serial_flyStruct idFlyFrames[ VSCP_SERIAL_MAX_FLYING_WINDOWS ];
+
+#endif
+
+
+///////////////////////////////////////////////////////////////////////////////
+// vs_sendchar_subst
+//
+
+BOOL vs_sendchar_subst( uint8_t b )
+{
+ if ( DLE == b ) {
+ if ( !vscp_serial_sendchar( DLE ) return FALSE;
+ if ( !vscp_serial_sendchar( DLE ) return FALSE;
+ }
+ else {
+ if ( !vscp_serial_sendchar( b ) return FALSE;
+ }
+
+ return TRUE;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// vscp_serial_init
+//
+
+void vs__init( void )
+{
+ main_state = VSCP_SERIAL_PROTOCOL_STATE_NONE;
+ sub_state = VSCP_SERIAL_PROTOCOL_SUBSTATE_NONE;
+ buffer_cnt = 0;
+ checksum = 0;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// vscp_serial_feed
+//
+
+BOOL vs__feed( uint8_t b )
+{
+ BOOL rv = FALSE;
+
+ switch ( b ) {
+
+ case DLE: // escape
+ if ( VSCP_SERIAL_PROTOCOL_STATE_NONE == main_state ) {
+ main_substate = VSCP_SERIAL_PROTOCOL_SUBSTATE_ESCAPE;
+ }
+ else if ( VSCP_SERIAL_PROTOCOL_STATE_PACKET == main_state ) {
+
+ if ( VSCP_SERIAL_PROTOCOL_SUBSTATE_ESCAPE == main_substate ) ) {
+ // Second DLE => it's a DLE character
+ msgbuffer[ buffer_cnt++ ] = DLE;
+ main_substate = VSCP_SERIAL_PROTOCOL_SUBSTATE_NONE;
+ }
+
+ }
+ break;
+
+ case STX: // start
+ if ( ( VSCP_SERIAL_PROTOCOL_STATE_NONE == main_state ) {
+
+ if ( VSCP_SERIAL_PROTOCOL_SUBSTATE_ESCAPE == main_substate ) ) {
+ // Here if waiting for packet and escape has been received.
+ // Start to receive a package
+ vscp_serial_init();
+ }
+
+ }
+ else if ( VSCP_SERIAL_PROTOCOL_STATE_PACKET == main_state ) {
+
+ if ( VSCP_SERIAL_PROTOCOL_SUBSTATE_ESCAPE == main_substate ) ) {
+ // DLE STX in package - Start all over
+ vscp_serial_init();
+ }
+ else if ( VSCP_SERIAL_PROTOCOL_SUBSTATE_NONE == main_substate ) ) {
+ // Just a stray STX
+ checksum ^= b;
+ msgbuffer[ buffer_cnt++ ] = b;
+ }
+
+ }
+ break;
+
+ case ETX: // End
+ if ( ( VSCP_SERIAL_PROTOCOL_STATE_PACKET == main_state ) {
+
+ if ( VSCP_SERIAL_PROTOCOL_SUBSTATE_ESCAPE == main_substate ) {
+ // DLE ETX in package - We have received a packet
+ // Check the packet checksum and return OK
+
+ vscp_serial_init();
+
+ if ( 0 == checksum )
+ rv = TRUE;
+ // Ack the frame
+ vscp_serial_send_ack( msgbuffer[ 2 ], msgbuffer[ 3 ] );
+ }
+ else {
+ // Nack the frame
+ vscp_serial_send_ack( msgbuffer[ 2 ], msgbuffer[ 3 ] );
+ }
+
+ }
+ else if ( VSCP_SERIAL_PROTOCOL_SUBSTATE_NONE == main_substate ) {
+ // Just a stray ETX
+ checksum ^= b;
+ msgbuffer[ buffer_cnt++ ] = b;
+ }
+
+ }
+ break;
+
+ default;
+ // Receiving packet
+ if ( VSCP_SERIAL_PROTOCOL_STATE_PACKET == main_state ) {
+ checksum ^= b;
+ msgbuffer[ buffer_cnt++ ] = b;
+ }
+ break;
+ }
+
+ // Check for buffer overflow
+ if ( buffer_cnt > VSCP_SWERIAL_FRAME_SIZE ) {
+ // Start all over
+ main_state = VSCP_SERIAL_PROTOCOL_STATE_NONE;
+ sub_state = VSCP_SERIAL_PROTOCOL_SUBSTATE_NONE;
+ }
+
+ return rv;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+// vscp_serial_send_ACK
+//
+
+void vs__get_frame( vscp_serial_frame *pFrame )
+{
+ // Check pointer
+ if ( NULL == pFrame ) return FALSE;
+
+ pFrame->opcode = msgbuffer[ 0 ];
+ pFrame->flags = msgbuffer[ 1 ];
+ pFrame->channel = msgbuffer[ 2 ];
+ pFrame->counter = msgbuffer[ 3 ];
+ pFrame->vscpclass = msgbuffer[ 4 ];
+ pFrame->vscptype = msgbuffer [5 ];
+ memcpy( pFrame->data, ( msgbuffer + 6 ), 16 );
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// vscp_serial_send_ACK
+//
+
+BOOL vs__send_ack( uint8_t channel, uint8_t counter )
+{
+ uint8_t checksum = 0;
+
+ // Start of frame
+ if ( !vs_sendchar_subst( DLE ) return FALSE;
+ vscp_serial_sendchar( STX );
+
+ // ACK Code
+ if ( !vs_sendchar_subst( VSCP_SERIAL_ACK ) return FALSE;
+ checksum ^= VSCP_SERIAL_ACK;
+
+ // Channel
+ if ( !vs_sendchar_subst( channel ) return FALSE;
+ checksum ^= channel;
+
+ // Counter
+ if ( !vs_sendchar_subst( counter ) return FALSE;
+ checksum ^= counter;
+
+ // Checksum
+ if ( !vs_sendchar_subst( checksum ) return FALSE;
+
+ // End of frame
+ if ( !vs_sendchar_subst( DLE ) return FALSE;
+ if ( !vs_sendchar_subst( ETX ) return FALSE;
+
+ return TRUE;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// vscp_serial_send_NACK
+//
+
+BOOL vs__send_nack( uint8_t channel, uint8_t counter )
+{
+ uint8_t checksum = 0;
+
+ // Start of frame
+ if ( !vs_sendchar_subst( DLE ) return FALSE;
+ if ( !vs_sendchar_subst( STX ) return FALSE;
+
+ // ACK Code
+ if ( !vs_sendchar_subst( VSCP_SERIAL_NACK ) return FALSE;
+ checksum ^= VSCP_SERIAL_NACK;
+
+ // Channel
+ if ( !vs_sendchar_subst( channel ) return FALSE;
+ checksum ^= channel;
+
+ // Counter
+ if ( !vs_sendchar_subst( counter ) return FALSE;
+ checksum ^= counter;
+
+ // Checksum
+ if ( !vs_sendchar_subst( checksum ) return FALSE;
+
+ // End of frame
+ if ( !vs_sendchar_subst( DLE ) return FALSE;
+ if ( !vs_sendchar_subst( ETX ) return FALSE;
+
+ return TRUE;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// vscp_serial_send_frame
+//
+
+BOOL vs__send_frame( vscp_serial_frame *pFrame )
+{
+ uint8_t checksum = 0;
+
+ // Check pointer
+ if ( NULL == pFrame ) return FALSE;
+
+ // Start of frame
+ if ( !vs_sendchar_subst( DLE ) return FALSE;
+ if ( !vs_sendchar_subst( STX ) return FALSE;
+
+ // Operation
+ if ( !vs_sendchar_subst( pFrame->opcode ) return FALSE;
+ checksum ^= pFrame->opcode;
+
+ // Flags
+ if ( !vs_sendchar_subst( pFrame->flags ) return FALSE;
+ checksum ^= pFrame->flags;
+
+ // Channel
+ if ( !vs_sendchar_subst( pFrame->channel ) return FALSE;
+ checksum ^= pFrame->channel;
+
+ // Counter
+ if ( !vs_sendchar_subst( pFrame->counter ) return FALSE;
+ checksum ^= pFrame->counter;
+
+ // VSCP Class
+ if ( !vs_sendchar_subst( pFrame->vscpclass ) return FALSE;
+ checksum ^= pFrame->vscpclass;
+
+ // VSCP type
+ if ( !vs_sendchar_subst( pFrame->vscptype ) return FALSE;
+ checksum ^= pFrame->vscptype;
+
+ // data
+ for ( int i=0; i<(pFrame->flags & 0x0f); i++ ) {
+ if ( !vs_sendchar_subst( pFrame->data[ i ] ) return FALSE;
+ checksum ^= pFrame->data[ i ];
+ }
+
+ // End of frame
+ if ( !vs_sendchar_subst( DLE ) return FALSE;
+ if ( !vs_sendchar_subst( ETX ) return FALSE;
+
+ return TRUE;
+}
\ No newline at end of file
Added: trunk/firmware/common/vscp_serial.h
===================================================================
--- trunk/firmware/common/vscp_serial.h (rev 0)
+++ trunk/firmware/common/vscp_serial.h 2008-02-28 21:55:05 UTC (rev 864)
@@ -0,0 +1,154 @@
+ /**
+ * @brief VSCP Serial Protocol
+ * @file vscp_serial.h
+ * @author Ake Hedman, D of Scandinavia, www.vscp.org
+ *
+ * @section description Description
+ **********************************
+ * This module contains the code that implements the
+ * VSCP serial protocol.
+ *********************************************************************/
+
+/* ******************************************************************************
+ * VSCP (Very Simple Control Protocol)
+ * http://www.vscp.org
+ *
+ * Copyright (C) 1995-2008 Ake Hedman,
+ * D of Scandinavia, <ak...@do...>
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty. In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ * claim that you wrote the original software. If you use this software
+ * in a product, an acknowledgment in the product documentation would be
+ * appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ * misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ *
+ * This file is part of VSCP - Very Simple Control Protocol
+ * http://www.vscp.org
+ *
+ * ******************************************************************************
+*/
+
+#ifndef VSCP_SERIAL_H
+#define VSCP_SERIAL_H
+
+#define VSCP_SERIAL_MAX_FLYING_WINDOWS 5
+
+// Special characters
+#define DLE 0x10 // Escape character
+#define STX 0x01 // Start of 'text'
+#define ETX 0x02 // End of 'text'
+
+#define VSCP_SERIAL_FRAME_SIZE 23 // Max frame size
+
+#define VSCP_SERIAL_ACK 252 // Frame ACK Code
+#define VSCP_SERIAL_NACK 253 // Frame NACK Code
+
+// Protocol state machine
+enum {
+ VSCP_SERIAL_PROTOCOL_STATE_NONE, // Wait for packet.
+ VSCP_SERIAL_PROTOCOL_STATE_PACKET, // DLE STX received
+ VSCP_SERIAL_PROTOCOL_STATE_ETX,
+};
+
+enum {
+ VSCP_SERIAL_PROTOCOL_SUBSTATE_NONE, // No Escape wait
+ VSCP_SERIAL_PROTOCOL_SUBSTATE_ESCAPE // Escape character received
+};
+
+// The serial frame
+
+typedef struct {
+ uint8_t opcode;
+ uint8_t flags;
+ uint8_t channel;
+ uint8_t counter;
+ uint8_t vscpclass;
+ uint8_t vscptype;
+ uint8_t data[16];
+} vscp_serial_frame;
+
+#ifdef VSCP_SERIAL_ENABLE_FLYING_WINDOWS
+
+// Flying frame struct
+
+typedef struct {
+ uint8_t sendtime; // Time when frame sent
+ // Zero indicate unused entry
+ uint8_t id; // id for frame
+} vscp_serial_flyStruct;
+
+#endif
+
+// External functions
+
+
+/*!
+ Send a character on the serial line
+ @param b Byte to send.
+ @return TRUE on success, FALSE on failure.
+*/
+BOOL vs_sendbyte( uint8_t b ):
+
+
+// Protocol functions
+
+/*!
+ Send serial byte with DLE handling
+ @param b Byte to send
+ @return TRUE on success, FALSE on failure.
+*/
+BOOL vs_sendchar_subst( uint8_t b );
+
+/*!
+ vscp_serial_init
+*/
+void vs_init( void );
+
+/*!
+ vscp_serial_feed
+ @param b Byte to feed the state machine with
+ @return True when a valid event is received.
+*/
+BOOL vs_feed( uint8_t b );
+
+/*!
+ Get a serial fr5ame from the buffer
+ @param pFrame Pointer to frame that will receive data
+ @return TRUE och success. FALSE on failure.
+*/
+BOOL vs_get_frame( vscp_serial_frame *pFrame );
+
+/*!
+ Send ACK
+ @param channel Channel number ACK is sent for.
+ @param counter Id for packet whcih is ACK'ed
+ @return TRUE och success. FALSE on failure.
+*/
+BOOL vs_send_ACK( uint8_t channel, uint8_t counter );
+
+/*!
+ Send NACK
+ @param channel Channel number NACK is sent for.
+ @param counter Id for packet which is NACK'ed
+ @return TRUE och success. FALSE on failure.
+*/
+BOOL vs_send_NACK( uint8_t channel, uint8_t counter );
+
+/*!
+ Send serial frame
+ @param pFrame Pointer to serial frame structure
+ @return TRUE och success. FALSE on failure.
+*/
+BOOL vs_send_frame( vscp_serial_frame *pFrame );
+
+#endif // VSCP_SERIAL_H
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ak...@us...> - 2008-02-28 14:18:37
|
Revision: 863
http://can.svn.sourceforge.net/can/?rev=863&view=rev
Author: akhe
Date: 2008-02-28 06:18:33 -0800 (Thu, 28 Feb 2008)
Log Message:
-----------
Property Changed:
----------------
trunk/src/vscp/install_win32/
trunk/src/vscp/samples/
Property changes on: trunk/src/vscp/install_win32
___________________________________________________________________
Name: svn:ignore
- setup4vscp.exe
+ setup4vscp.exe
files
*.exe
Property changes on: trunk/src/vscp/samples
___________________________________________________________________
Name: svn:ignore
+ delivery
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ak...@us...> - 2008-02-28 14:17:12
|
Revision: 862
http://can.svn.sourceforge.net/can/?rev=862&view=rev
Author: akhe
Date: 2008-02-28 06:17:02 -0800 (Thu, 28 Feb 2008)
Log Message:
-----------
Fixed real life str75x CAN example for the IAR compiler
Modified Paths:
--------------
trunk/firmware/arm/str/cantest_str73x_iar/cantest.dep
trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.dbgdt
trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.dni
trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.wsdt
trunk/firmware/arm/str/cantest_str75x_iar/cantest.dep
trunk/firmware/arm/str/cantest_str75x_iar/cantest.ewd
trunk/firmware/arm/str/cantest_str75x_iar/cantest.ewp
trunk/firmware/arm/str/cantest_str75x_iar/main.c
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.cspy.bat
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dbgdt
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dni
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.wsdt
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_can.c
Added Paths:
-----------
trunk/LPC2_CANFull_V110/
trunk/LPC2_CANFull_V110/Flash/
trunk/LPC2_CANFull_V110/Flash/LPC_FullCAN_SW.elf
trunk/LPC2_CANFull_V110/Flash/LPC_FullCAN_SW.hex
trunk/LPC2_CANFull_V110/Flash.ld
trunk/LPC2_CANFull_V110/LPC21XX.H
trunk/LPC2_CANFull_V110/LPC_FullCAN_SW.Opt
trunk/LPC2_CANFull_V110/LPC_FullCAN_SW.Uv2
trunk/LPC2_CANFull_V110/LPC_FullCAN_SW.c
trunk/LPC2_CANFull_V110/LPC_FullCAN_SW.h
trunk/LPC2_CANFull_V110/Startup.s
trunk/LPC2_CANFull_V110/main_FullCAN.c
trunk/LPC2_CANFull_V110/readme.txt
trunk/firmware/arm/str/cantest_str75x_iar/75x_conf.h
trunk/firmware/arm/str/cantest_str75x_iar/75x_it.c
Removed Paths:
-------------
trunk/firmware/arm/str/cantest_str75x_iar/73x_conf.h
trunk/firmware/arm/str/cantest_str75x_iar/73x_it.c
trunk/firmware/arm/str/cantest_str75x_iar/73x_lcd.c
trunk/firmware/arm/str/cantest_str75x_iar/73x_lcd.h
trunk/firmware/arm/str/cantest_str75x_iar/Startup/73x_init.s
trunk/firmware/arm/str/cantest_str75x_iar/Startup/73x_vect.s
trunk/firmware/arm/str/cantest_str75x_iar/linker/STR73x_FLASH.icf
trunk/firmware/arm/str/cantest_str75x_iar/linker/STR73x_RAM.icf
Property Changed:
----------------
trunk/firmware/arm/str/
trunk/firmware/arm/str/cantest_str75x_iar/
trunk/firmware/arm/str/vcp_str75x_iar/project/
Added: trunk/LPC2_CANFull_V110/Flash/LPC_FullCAN_SW.elf
===================================================================
(Binary files differ)
Property changes on: trunk/LPC2_CANFull_V110/Flash/LPC_FullCAN_SW.elf
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/LPC2_CANFull_V110/Flash/LPC_FullCAN_SW.hex
===================================================================
--- trunk/LPC2_CANFull_V110/Flash/LPC_FullCAN_SW.hex (rev 0)
+++ trunk/LPC2_CANFull_V110/Flash/LPC_FullCAN_SW.hex 2008-02-28 14:17:02 UTC (rev 862)
@@ -0,0 +1,301 @@
+:1000000018F09FE518F09FE518F09FE518F09FE5C0
+:1000100018F09FE50000A0E1F0FF1FE518F09FE554
+:1000200058000000400000004400000048000000AC
+:100030004C000000000000005000000054000000D0
+:10004000FEFFFFEAFEFFFFEAFEFFFFEAFEFFFFEA18
+:10005000FEFFFFEAFEFFFFEADC009FE5AA10A0E337
+:100060005520A0E32430A0E3043080E50130A0E374
+:10007000003080E50C1080E50C2080E5083090E52C
+:10008000013B13E2FCFFFF0A0330A0E3003080E5F0
+:100090000C1080E50C2080E5A0009FE50410A0E393
+:1000A000041080E50210A0E3001080E590009FE5B9
+:1000B000DBF021E300D0A0E1040040E2D7F021E32F
+:1000C00000D0A0E1040040E2D1F021E300D0A0E1A3
+:1000D000040040E2D2F021E300D0A0E1800040E241
+:1000E000D3F021E300D0A0E1040040E210F021E3CE
+:1000F00000D0A0E101AB4DE248109FE548209FE50C
+:1001000048309FE5030052E104009134040082343A
+:10011000FBFFFF3A0000A0E334109FE534209FE589
+:10012000020051E104008134FCFFFF3A04E08FE259
+:1001300024009FE510FF2FE1FEFFFFEA80C01FE0D3
+:1001400000C01FE000400040C0120000000000405E
+:100150000000004000000040240100407C0F00002F
+:100160000DC0A0E100D82DE904B04CE220D04DE252
+:100170000030A0E114200BE5BE304BE1B0114BE1A3
+:10018000B0315BE10F0053E30200009A0030A0E3BE
+:1001900024300BE58D0000EABE305BE128300BE532
+:1001A00028301BE5010053E30300000A28301BE55B
+:1001B000020053E30A00000A130000EA4E22A0E303
+:1001C0000B2982E24E32A0E30B3983E2003093E543
+:1001D000013783E3003082E50030A0E320300BE5F7
+:1001E0000C0000EA4E22A0E30B2982E24E32A0E38B
+:1001F0000B3983E2003093E5053983E3003082E573
+:10020000013AA0E320300BE5020000EA0030A0E351
+:1002100024300BE56D0000EAB8219FE50030A0E333
+:10022000B030C2E10E32A0E30F3983E20120A0E337
+:10023000002083E520301BE50331A0E10E3283E28C
+:10024000113983E218300BE518201BE50130A0E3DB
+:10025000003082E520301BE50331A0E10E3283E25D
+:10026000113983E2103083E218300BE518201BE5CA
+:100270000030A0E3003082E520301BE50331A0E12F
+:100280008E3283E2113983E218300BE518201BE52A
+:100290000030A0E3003082E520301BE50331A0E10F
+:1002A0000E3283E2113983E2143083E218300BE519
+:1002B00018201BE514301BE5003082E52233A0E353
+:1002C000C339A0E118300BE5B0315BE10321A0E1B7
+:1002D00018301BE5023083E018300BE50932A0E34B
+:1002E000C339A0E11C300BE5B0315BE10321A0E193
+:1002F0001C301BE5023083E01C300BE5BE305BE1B7
+:100300002C300BE52C301BE5010053E30300000A01
+:100310002C301BE5020053E30B00000A150000EA35
+:1003200018201BE5B0309FE5003082E51C201BE55E
+:100330003A30A0E3003082E5FE3EE0E30F3043E2D6
+:100340000123A0E3002083E50D0000EA18201BE54F
+:1003500088309FE5003082E51C201BE53B30A0E3A0
+:10036000003082E5FE3EE0E30F3043E20223A0E3EB
+:10037000002083E5020000EA0030A0E324300BE512
+:10038000120000EA20301BE50331A0E10E3283E2C7
+:10039000113983E2103083E218300BE518201BE599
+:1003A0000130A0E3003082E520301BE50331A0E1FD
+:1003B0000E3283E2113983E218300BE518201BE579
+:1003C0000030A0E3003082E50130A0E324300BE5EB
+:1003D00024001BE500A81BE900000040540B0000AE
+:1003E000C40C00000DC0A0E100D82DE904B04CE21F
+:1003F0002CD04DE20030A0E114100BE5BE304BE1F3
+:10040000BE305BE1000053E30300000ABE305BE155
+:10041000020053E30000008A020000EA0030A0E37B
+:1004200038300BE5D40000EA0E32A0E30F3983E246
+:100430000120A0E3002083E544339FE5B030D3E101
+:100440000338A0E14338A0E1000053E30300001AA1
+:1004500030239FE5DF3DA0E33F3083E2003082E5BB
+:100460001C339FE5B030D3E10338A0E14338A0E16D
+:10047000130053E3020000DA0030A0E338300BE54C
+:10048000BD0000EA14301BE5833AA0E1A33AA0E1E5
+:1004900014300BE5BE305BE18326A0E114301BE590
+:1004A000023083E114300BE50030A0E318300BE597
+:1004B000CC329FE5B030D3E10338A0E14328A0E17E
+:1004C00018301BE5020053E10000003A110000EA79
+:1004D000B0129FE518201BE50230A0E18330A0E1B7
+:1004E000023083E00331A0E1013083E0003093E586
+:1004F0000338A0E12338A0E114201BE5020053E1FA
+:100500000000009A030000EA18301BE5013083E286
+:1005100018300BE5E5FFFFEA68129FE518201BE5A0
+:100520000230A0E18330A0E1023083E00331A0E19A
+:10053000013083E0003093E520300BE544129FE565
+:1005400018201BE50230A0E18330A0E1023083E0F7
+:100550000331A0E1012083E014301BE5003082E587
+:100560001C229FE518329FE5B030D3E1013083E2D1
+:10057000B030C2E108329FE5B030D3E10338A0E1EA
+:100580004328A0E118301BE5020053E10000003AC7
+:10059000170000EA18301BE5013083E218300BE544
+:1005A000E0119FE518201BE50230A0E18330A0E1B7
+:1005B000023083E00331A0E1013083E0003093E5B5
+:1005C00024300BE5BC119FE518201BE50230A0E1AB
+:1005D0008330A0E1023083E00331A0E1012083E019
+:1005E00020301BE5003082E524301BE520300BE590
+:1005F000DFFFFFEA0030A0E318300BE54E32A0E346
+:100600000F3983E218201BE5002083E50E32A0E3BA
+:100610000E3983E234300BE50030A0E31C300BE5EB
+:100620005C319FE5B030D3E10338A0E14338A0E16D
+:10063000012083E2C23FA0E1A33FA0E1033082E0BA
+:10064000C320A0E11C301BE5020053E10000003A8A
+:10065000290000EA2C119FE51C201BE50230A0E1D7
+:100660008330A0E1023083E08331A0E1013083E0F8
+:10067000003093E50338A0E12338A0E128300BE5F2
+:1006800000019FE51C201BE50C10A0E30230A0E157
+:100690008330A0E1023083E08331A0E1003083E0C9
+:1006A000013083E0003093E50338A0E12338A0E176
+:1006B0002C300BE528301BE50328A0E12C301BE58E
+:1006C000033082E030300BE534201BE530301BE591
+:1006D000003082E518301BE5043083E218300BE56A
+:1006E00034301BE5043083E234300BE51C301BE56D
+:1006F000013083E21C300BE5C8FFFFEA34201BE524
+:10070000F73CA0E3FF3083E2033883E1003082E569
+:1007100018301BE5043083E218300BE58E32A0E37D
+:100720000F3983E218201BE5002083E5CE32A0E3D9
+:100730000F3983E218201BE5002083E50E32A0E389
+:100740000F3983E2103083E218201BE5002083E597
+:100750000E32A0E30F3983E2143083E218201BE548
+:10076000002083E50E32A0E30F3983E20020A0E3EE
+:10077000002083E50130A0E338300BE538001BE5AD
+:1007800000A81BE900000040200000400DC0A0E1CF
+:1007900000D82DE904B04CE20CD04DE20030A0E1CD
+:1007A000BE304BE1BE305BE10F0053E30200009A24
+:1007B0000030A0E318300BE51B0000EA2233A0E371
+:1007C000C339A0E114300BE5BE305BE10321A0E1A9
+:1007D00014301BE5023083E014300BE514201BE5D8
+:1007E0004C309FE5003082E50932A0E3C339A0E137
+:1007F00014300BE5BE305BE10321A0E114301BE5B2
+:10080000023083E014300BE514201BE53330A0E305
+:10081000003082E5FE3EE0E30F3043E20227A0E332
+:10082000002083E50130A0E318300BE518001BE53C
+:1008300000A81BE93C0B00000DC0A0E100D82DE989
+:1008400004B04CE21CD04DE20030A0E114100BE5E6
+:10085000BE304BE1BE305BE128300BE528301BE5B4
+:10086000010053E30300000A28301BE5020053E3B4
+:100870000300000A050000EA0030A0E320300BE589
+:10088000050000EA013AA0E320300BE5020000EA8F
+:100890000030A0E324300BE53F0000EA20301BE5E8
+:1008A0000331A0E10E3283E2113983E21C3083E28E
+:1008B00018300BE518301BE5003093E5043003E2F7
+:1008C000000053E30200001A0030A0E324300BE5DF
+:1008D000310000EA20301BE50331A0E10E3283E253
+:1008E000113983E2303083E218300BE518201BE524
+:1008F00014301BE5003093E50F3803E2003082E549
+:1009000018301BE5043083E218300BE518201BE596
+:1009100014301BE5003093E5833AA0E1A33AA0E14F
+:10092000003082E514301BE5043083E21C300BE517
+:1009300018301BE5043083E218300BE518201BE566
+:100940001C301BE5003093E5003082E51C301BE5D0
+:10095000043083E21C300BE518301BE5043083E2E1
+:1009600018300BE518201BE51C301BE5003093E523
+:10097000003082E520301BE50331A0E14E3283E2F6
+:10098000113983E218300BE518201BE53030A0E365
+:10099000003082E50130A0E324300BE524001BE5A4
+:1009A00000A81BE90DC0A0E100D82DE904B04CE27D
+:1009B0001CD04DE20030A0E114100BE5BE304BE13D
+:1009C000BE305BE1000053E30300000ABE305BE190
+:1009D000020053E30000008A020000EA0030A0E3B6
+:1009E00028300BE5500000EA44319FE51C300BE550
+:1009F00014301BE520300BE5BE305BE18336A0E10F
+:100A000024300BE524301BE5033483E324300BE56D
+:100A10000030A0E3B6314BE1B6215BE114319FE534
+:100A2000B030D3E10338A0E14338A0E1030052E144
+:100A3000000000BA3A0000EA1C301BE5003093E5E4
+:100A40003F33C3E3FF38C3E37F3DC3E33F30C3E33A
+:100A500024201BE5020053E12A00001A1C201BE59C
+:100A60001C301BE5003093E50334C3E3003082E51E
+:100A700020201BE51C301BE5003093E5003082E5AB
+:100A80001C301BE5043083E21C300BE520301BE5F5
+:100A9000043083E220300BE520201BE51C301BE5F1
+:100AA000003093E5003082E51C301BE5043083E222
+:100AB0001C300BE520301BE5043083E220300BE5D1
+:100AC00020201BE51C301BE5003093E5003082E55B
+:100AD0001C301BE5083043E21C300BE520301BE5E1
+:100AE000083043E220300BE51C301BE5003093E575
+:100AF000033403E2000053E30200001A0130A0E3D4
+:100B000028300BE5080000EAB6315BE1013083E2F2
+:100B1000B6314BE11C301BE50C3083E21C300BE599
+:100B2000BCFFFFEA0030A0E328300BE528001BE5FE
+:100B300000A81BE9200000400000004004C02DE593
+:100B40000DC0A0E100D82DE904B04CE20000A0E106
+:100B5000FEFFFFEA04C02DE50DC0A0E10CD82DE991
+:100B600004B04CE208D04DE20E32A0E3113983E22A
+:100B7000203083E2003093E5FF35C3E3FF39C3E360
+:100B8000EF3DC3E33F30C3E3000053E34000001AEE
+:100B90000E32A0E3113983E2203083E2003093E586
+:100BA000032BA0E1222BA0E10230A0E18330A0E1E1
+:100BB000023083E00321A0E100319FE5023083E0B1
+:100BC00020300BE50E32A0E3113983E2203083E2BE
+:100BD000003093E5FF35C3E30336C3E32338A0E1D8
+:100BE0000338A0E11C300BE51C301BE5013483E326
+:100BF000023A83E31C300BE50E32A0E3113983E2A5
+:100C0000243083E2003093E5833AA0E1A33AA0E1E7
+:100C10001C201BE5033082E11C300BE520201BE586
+:100C20001C301BE5003082E520301BE5043083E2F8
+:100C300020300BE520201BE50E32A0E3113983E2C2
+:100C4000283083E2003093E5003082E520301BE558
+:100C5000043083E220300BE520201BE50E32A0E3B8
+:100C6000113983E22C3083E2003093E5003082E5D5
+:100C70001C301BE5033483E31C300BE520301BE5FF
+:100C8000083043E220300BE520201BE51C301BE53B
+:100C9000003082E54E32A0E3113983E20420A0E364
+:100CA000002083E53F3DE0E30F3043E20020E0E336
+:100CB000002083E50C681BE90010BDE804F05EE24B
+:100CC0002000004004C02DE50DC0A0E10CD82DE9A6
+:100CD00004B04CE208D04DE20E32A0E3123983E2B8
+:100CE000203083E2003093E5FF35C3E3FF39C3E3EF
+:100CF000EF3DC3E33F30C3E3000053E34000001A7D
+:100D00000E32A0E3123983E2203083E2003093E513
+:100D1000032BA0E1222BA0E10230A0E18330A0E16F
+:100D2000023083E00321A0E100319FE5023083E03F
+:100D300020300BE50E32A0E3123983E2203083E24B
+:100D4000003093E5FF35C3E30336C3E32338A0E166
+:100D50000338A0E11C300BE51C301BE5013483E3B4
+:100D6000013983E31C300BE50E32A0E3123983E234
+:100D7000243083E2003093E5833AA0E1A33AA0E176
+:100D80001C201BE5033082E11C300BE520201BE515
+:100D90001C301BE5003082E520301BE5043083E287
+:100DA00020300BE520201BE50E32A0E3123983E250
+:100DB000283083E2003093E5003082E520301BE5E7
+:100DC000043083E220300BE520201BE50E32A0E347
+:100DD000123983E22C3083E2003093E5003082E563
+:100DE0001C301BE5033483E31C300BE520301BE58E
+:100DF000083043E220300BE520201BE51C301BE5CA
+:100E0000003082E54E32A0E3123983E20420A0E3F1
+:100E1000002083E53F3DE0E30F3043E20020E0E3C4
+:100E2000002083E50C681BE90010BDE804F05EE2D9
+:100E30002000004004C02DE50DC0A0E100D82DE940
+:100E400004B04CE20000A0E1FEFFFFEA04C02DE583
+:100E50000DC0A0E10CD82DE904B04CE238209FE58C
+:100E600034309FE5003093E5013083E2003082E5C5
+:100E70000E32A0E3013983E20120A0E3002083E5E4
+:100E80003F3DE0E30F3043E20020E0E3002083E554
+:100E90000C681BE90010BDE804F05EE22001004090
+:100EA0000DC0A0E100D82DE904B04CE20CD04DE219
+:100EB00010000BE570309FE5003093E514300BE532
+:100EC00014201BE510301BE5030052E10A00009AD4
+:100ED00014301BE510201BE5033062E0000053E3F3
+:100EE000020000BA0130A0E318300BE50C0000EA64
+:100EF0000030A0E318300BE5090000EA10301BE5D4
+:100F000014201BE5033062E0020153E30200009A63
+:100F10000130A0E318300BE5010000EA0030A0E347
+:100F200018300BE518001BE500A81BE92001004064
+:100F30000DC0A0E100D82DE904B04CE204D04DE290
+:100F400010000BE52C309FE510201BE5003093E5E9
+:100F5000033082E010300BE510001BE5CFFFFFEB04
+:100F60000030A0E10338A0E14338A0E1000053E3E2
+:100F7000F8FFFF0A00A81BE9200100400DC0A0E116
+:100F800000D82DE904B04CE210D04DE20132A0E3CC
+:100F90001C300BE50E32A0E37F3983E2013C83E293
+:100FA0000120A0E30020C3E50E32A0E30A3983E26A
+:100FB000183083E2FF28A0E3002083E5FE3EE0E353
+:100FC0000B3043E20020E0E3002083E5FF3EE0E356
+:100FD000033043E20020A0E3002083E53F3DE0E34F
+:100FE0000B3043E2CC229FE5002083E50100A0E323
+:100FF0000010A0E30727A0E31D2082E257FCFFEBCF
+:101000000200A0E30110A0E30727A0E31D2082E275
+:1010100052FCFFEB0200A0E3DBFDFFEB0E22A0E39E
+:10102000012982E2182082E25D3DA0E32F3083E2B5
+:10103000003082E50E32A0E3013983E2143083E20E
+:101040000320A0E3002083E50139A0E34E3283E2D0
+:101050000120A0E3002083E5EF3EE0E3033043E21C
+:1010600054229FE5002083E5DF3EE0E3033043E2C6
+:101070002420A0E3002083E5FE3EE0E30F3043E2BE
+:101080001020A0E3002083E50200A0E3011CA0E300
+:10109000011081E2D2FCFFEB0200A0E3021CA0E3FE
+:1010A000011081E2CEFCFFEB0100A0E3011CA0E3F4
+:1010B000021081E2CAFCFFEB0100A0E3021CA0E3E6
+:1010C000021081E2C6FCFFEB6400A0E397FFFFEB98
+:1010D0000237A0E3013C83E2023083E218300BE5E3
+:1010E0000030A0E314300BE50030A0E310300BE536
+:1010F00018304BE20200A0E30310A0E1CDFDFFEBAE
+:101100001C301BE58330A0E11C300BE51C301BE5D7
+:10111000020553E30100009A0138A0E31C300BE5FF
+:101120000E32A0E30A3983E2143083E21C201BE56F
+:10113000002083E518304BE20100A0E30310A0E19A
+:1011400017FEFFEB0030A0E10338A0E14338A0E137
+:10115000000053E32300000A18301BE5832AA0E1B6
+:10116000A22AA0E1013CA0E3023083E2030052E1A5
+:101170000A00001A18301BE5FF3083E218300BE537
+:1011800014301BE5023083E214300BE518304BE2DB
+:101190000100A0E30310A0E1A6FDFFEB110000EAAF
+:1011A00018301BE5832AA0E1A22AA0E1023CA0E3BB
+:1011B000023083E2030052E10A00001A18301BE5F6
+:1011C000013C43E2013043E218300BE514301BE5EB
+:1011D000013043E214300BE518304BE20100A0E38C
+:1011E0000310A0E193FDFFEB18304BE20200A0E3F7
+:1011F0000310A0E1EAFDFFEB0030A0E10338A0E11D
+:101200004338A0E1000053E32200000A18301BE538
+:10121000832AA0E1A22AA0E1013CA0E3013083E2FD
+:10122000030052E10A00001A18301BE5013083E286
+:1012300018300BE510301BE5023083E210300BE56F
+:1012400018304BE20200A0E30310A0E179FDFFEBB0
+:10125000100000EA18301BE5832AA0E1A22AA0E1D1
+:10126000023CA0E3013083E2030052E10900001ACE
+:1012700018301BE5013083E218300BE510301BE518
+:10128000013043E210300BE518304BE20200A0E3DE
+:101290000310A0E167FDFFEBFA0FA0E323FFFFEBD4
+:1012A0000E32A0E30A3983E21C3083E21C201BE5E6
+:1012B000002083E591FFFFEA340E00004C0E000091
+:00000001FF
Added: trunk/LPC2_CANFull_V110/Flash.ld
===================================================================
--- trunk/LPC2_CANFull_V110/Flash.ld (rev 0)
+++ trunk/LPC2_CANFull_V110/Flash.ld 2008-02-28 14:17:02 UTC (rev 862)
@@ -0,0 +1,130 @@
+/***********************************************************************/
+/* This file is part of the ARM Compiler package */
+/* Copyright KEIL ELEKTRONIK GmbH 1992-2004 */
+/***********************************************************************/
+/* */
+/* TARGET.LD: Linker Script File */
+/* */
+/***********************************************************************/
+
+
+/*
+//*** <<< Use Configuration Wizard in Context Menu >>> ***
+*/
+
+
+/*
+// <h> Memory Configuration
+// <h> Code (Read Only)
+// <o> Start <0x0-0xFFFFFFFF>
+// <o1> Size <0x0-0xFFFFFFFF>
+// </h>
+// <h> Data (Read/Write)
+// <o2> Start <0x0-0xFFFFFFFF>
+// <o3> Size <0x0-0xFFFFFFFF>
+// </h>
+// </h>
+*/
+
+/* Memory Definitions */
+
+MEMORY
+{
+ CODE (rx) : ORIGIN = 0x00000000, LENGTH = 0x0003E000
+ DATA (rw) : ORIGIN = 0x40000000, LENGTH = 0x00004000
+}
+
+
+/* Section Definitions */
+
+SECTIONS
+{
+
+ /* first section is .text which is used for code */
+
+ .text :
+ {
+ *startup.o (.text) /* Startup code */
+ *(.text) /* remaining code */
+
+ *(.glue_7t) *(.glue_7)
+
+ } >CODE =0
+
+ . = ALIGN(4);
+
+ /* .rodata section which is used for read-only data (constants) */
+
+ .rodata :
+ {
+ *(.rodata)
+ } >CODE
+
+ . = ALIGN(4);
+
+ _etext = . ;
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+
+ .data : AT (_etext)
+ {
+ _data = . ;
+ *(.data)
+ SORT(CONSTRUCTORS)
+ } >DATA
+ . = ALIGN(4);
+
+ _edata = . ;
+ PROVIDE (edata = .);
+
+ /* .bss section which is used for uninitialized data */
+
+ .bss :
+ {
+ __bss_start = . ;
+ __bss_start__ = . ;
+ *(.bss)
+ *(COMMON)
+ } >DATA
+ . = ALIGN(4);
+ __bss_end__ = . ;
+ __bss_end__ = . ;
+
+ _end = .;
+ PROVIDE (end = .);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
Added: trunk/LPC2_CANFull_V110/LPC21XX.H
===================================================================
--- trunk/LPC2_CANFull_V110/LPC21XX.H (rev 0)
+++ trunk/LPC2_CANFull_V110/LPC21XX.H 2008-02-28 14:17:02 UTC (rev 862)
@@ -0,0 +1,377 @@
+/***********************************************************************/
+/* This file is part of the uVision/ARM development tools */
+/* Copyright KEIL ELEKTRONIK GmbH 2002-2004 */
+/***********************************************************************/
+/* */
+/* LPC21XX.H: Header file for Philips LPC2114 / LPC2119 */
+/* LPC2124 / LPC2129 */
+/* LPC2194 */
+/* */
+/***********************************************************************/
+
+#ifndef __LPC21xx_H
+#define __LPC21xx_H
+
+/* Vectored Interrupt Controller (VIC) */
+#define VICIRQStatus (*((volatile unsigned long *) 0xFFFFF000))
+#define VICFIQStatus (*((volatile unsigned long *) 0xFFFFF004))
+#define VICRawIntr (*((volatile unsigned long *) 0xFFFFF008))
+#define VICIntSelect (*((volatile unsigned long *) 0xFFFFF00C))
+#define VICIntEnable (*((volatile unsigned long *) 0xFFFFF010))
+#define VICIntEnClr (*((volatile unsigned long *) 0xFFFFF014))
+#define VICSoftInt (*((volatile unsigned long *) 0xFFFFF018))
+#define VICSoftIntClr (*((volatile unsigned long *) 0xFFFFF01C))
+#define VICProtection (*((volatile unsigned long *) 0xFFFFF020))
+#define VICVectAddr (*((volatile unsigned long *) 0xFFFFF030))
+#define VICDefVectAddr (*((volatile unsigned long *) 0xFFFFF034))
+#define VICVectAddr0 (*((volatile unsigned long *) 0xFFFFF100))
+#define VICVectAddr1 (*((volatile unsigned long *) 0xFFFFF104))
+#define VICVectAddr2 (*((volatile unsigned long *) 0xFFFFF108))
+#define VICVectAddr3 (*((volatile unsigned long *) 0xFFFFF10C))
+#define VICVectAddr4 (*((volatile unsigned long *) 0xFFFFF110))
+#define VICVectAddr5 (*((volatile unsigned long *) 0xFFFFF114))
+#define VICVectAddr6 (*((volatile unsigned long *) 0xFFFFF118))
+#define VICVectAddr7 (*((volatile unsigned long *) 0xFFFFF11C))
+#define VICVectAddr8 (*((volatile unsigned long *) 0xFFFFF120))
+#define VICVectAddr9 (*((volatile unsigned long *) 0xFFFFF124))
+#define VICVectAddr10 (*((volatile unsigned long *) 0xFFFFF128))
+#define VICVectAddr11 (*((volatile unsigned long *) 0xFFFFF12C))
+#define VICVectAddr12 (*((volatile unsigned long *) 0xFFFFF130))
+#define VICVectAddr13 (*((volatile unsigned long *) 0xFFFFF134))
+#define VICVectAddr14 (*((volatile unsigned long *) 0xFFFFF138))
+#define VICVectAddr15 (*((volatile unsigned long *) 0xFFFFF13C))
+#define VICVectCntl0 (*((volatile unsigned long *) 0xFFFFF200))
+#define VICVectCntl1 (*((volatile unsigned long *) 0xFFFFF204))
+#define VICVectCntl2 (*((volatile unsigned long *) 0xFFFFF208))
+#define VICVectCntl3 (*((volatile unsigned long *) 0xFFFFF20C))
+#define VICVectCntl4 (*((volatile unsigned long *) 0xFFFFF210))
+#define VICVectCntl5 (*((volatile unsigned long *) 0xFFFFF214))
+#define VICVectCntl6 (*((volatile unsigned long *) 0xFFFFF218))
+#define VICVectCntl7 (*((volatile unsigned long *) 0xFFFFF21C))
+#define VICVectCntl8 (*((volatile unsigned long *) 0xFFFFF220))
+#define VICVectCntl9 (*((volatile unsigned long *) 0xFFFFF224))
+#define VICVectCntl10 (*((volatile unsigned long *) 0xFFFFF228))
+#define VICVectCntl11 (*((volatile unsigned long *) 0xFFFFF22C))
+#define VICVectCntl12 (*((volatile unsigned long *) 0xFFFFF230))
+#define VICVectCntl13 (*((volatile unsigned long *) 0xFFFFF234))
+#define VICVectCntl14 (*((volatile unsigned long *) 0xFFFFF238))
+#define VICVectCntl15 (*((volatile unsigned long *) 0xFFFFF23C))
+
+/* Pin Connect Block */
+#define PINSEL0 (*((volatile unsigned long *) 0xE002C000))
+#define PINSEL1 (*((volatile unsigned long *) 0xE002C004))
+#define PINSEL2 (*((volatile unsigned long *) 0xE002C014))
+
+/* General Purpose Input/Output (GPIO) */
+#define IOPIN0 (*((volatile unsigned long *) 0xE0028000))
+#define IOSET0 (*((volatile unsigned long *) 0xE0028004))
+#define IODIR0 (*((volatile unsigned long *) 0xE0028008))
+#define IOCLR0 (*((volatile unsigned long *) 0xE002800C))
+#define IOPIN1 (*((volatile unsigned long *) 0xE0028010))
+#define IOSET1 (*((volatile unsigned long *) 0xE0028014))
+#define IODIR1 (*((volatile unsigned long *) 0xE0028018))
+#define IOCLR1 (*((volatile unsigned long *) 0xE002801C))
+
+/* Memory Accelerator Module (MAM) */
+#define MAMCR (*((volatile unsigned char *) 0xE01FC000))
+#define MAMTIM (*((volatile unsigned char *) 0xE01FC004))
+#define MEMMAP (*((volatile unsigned char *) 0xE01FC040))
+
+/* Phase Locked Loop (PLL) */
+#define PLLCON (*((volatile unsigned char *) 0xE01FC080))
+#define PLLCFG (*((volatile unsigned char *) 0xE01FC084))
+#define PLLSTAT (*((volatile unsigned short*) 0xE01FC088))
+#define PLLFEED (*((volatile unsigned char *) 0xE01FC08C))
+
+/* VPB Divider */
+#define VPBDIV (*((volatile unsigned char *) 0xE01FC100))
+
+/* Power Control */
+#define PCON (*((volatile unsigned char *) 0xE01FC0C0))
+#define PCONP (*((volatile unsigned long *) 0xE01FC0C4))
+
+/* External Interrupts */
+#define EXTINT (*((volatile unsigned char *) 0xE01FC140))
+#define EXTWAKE (*((volatile unsigned char *) 0xE01FC144))
+#define EXTMODE (*((volatile unsigned char *) 0xE01FC148))
+#define EXTPOLAR (*((volatile unsigned char *) 0xE01FC14C))
+
+/* Timer 0 */
+#define T0IR (*((volatile unsigned long *) 0xE0004000))
+#define T0TCR (*((volatile unsigned long *) 0xE0004004))
+#define T0TC (*((volatile unsigned long *) 0xE0004008))
+#define T0PR (*((volatile unsigned long *) 0xE000400C))
+#define T0PC (*((volatile unsigned long *) 0xE0004010))
+#define T0MCR (*((volatile unsigned long *) 0xE0004014))
+#define T0MR0 (*((volatile unsigned long *) 0xE0004018))
+#define T0MR1 (*((volatile unsigned long *) 0xE000401C))
+#define T0MR2 (*((volatile unsigned long *) 0xE0004020))
+#define T0MR3 (*((volatile unsigned long *) 0xE0004024))
+#define T0CCR (*((volatile unsigned long *) 0xE0004028))
+#define T0CR0 (*((volatile unsigned long *) 0xE000402C))
+#define T0CR1 (*((volatile unsigned long *) 0xE0004030))
+#define T0CR2 (*((volatile unsigned long *) 0xE0004034))
+#define T0CR3 (*((volatile unsigned long *) 0xE0004038))
+#define T0EMR (*((volatile unsigned long *) 0xE000403C))
+
+/* Timer 1 */
+#define T1IR (*((volatile unsigned long *) 0xE0008000))
+#define T1TCR (*((volatile unsigned long *) 0xE0008004))
+#define T1TC (*((volatile unsigned long *) 0xE0008008))
+#define T1PR (*((volatile unsigned long *) 0xE000800C))
+#define T1PC (*((volatile unsigned long *) 0xE0008010))
+#define T1MCR (*((volatile unsigned long *) 0xE0008014))
+#define T1MR0 (*((volatile unsigned long *) 0xE0008018))
+#define T1MR1 (*((volatile unsigned long *) 0xE000801C))
+#define T1MR2 (*((volatile unsigned long *) 0xE0008020))
+#define T1MR3 (*((volatile unsigned long *) 0xE0008024))
+#define T1CCR (*((volatile unsigned long *) 0xE0008028))
+#define T1CR0 (*((volatile unsigned long *) 0xE000802C))
+#define T1CR1 (*((volatile unsigned long *) 0xE0008030))
+#define T1CR2 (*((volatile unsigned long *) 0xE0008034))
+#define T1CR3 (*((volatile unsigned long *) 0xE0008038))
+#define T1EMR (*((volatile unsigned long *) 0xE000803C))
+
+/* Pulse Width Modulator (PWM) */
+#define PWMIR (*((volatile unsigned long *) 0xE0014000))
+#define PWMTCR (*((volatile unsigned long *) 0xE0014004))
+#define PWMTC (*((volatile unsigned long *) 0xE0014008))
+#define PWMPR (*((volatile unsigned long *) 0xE001400C))
+#define PWMPC (*((volatile unsigned long *) 0xE0014010))
+#define PWMMCR (*((volatile unsigned long *) 0xE0014014))
+#define PWMMR0 (*((volatile unsigned long *) 0xE0014018))
+#define PWMMR1 (*((volatile unsigned long *) 0xE001401C))
+#define PWMMR2 (*((volatile unsigned long *) 0xE0014020))
+#define PWMMR3 (*((volatile unsigned long *) 0xE0014024))
+#define PWMMR4 (*((volatile unsigned long *) 0xE0014040))
+#define PWMMR5 (*((volatile unsigned long *) 0xE0014044))
+#define PWMMR6 (*((volatile unsigned long *) 0xE0014048))
+#define PWMCCR (*((volatile unsigned long *) 0xE0014028))
+#define PWMCR0 (*((volatile unsigned long *) 0xE001402C))
+#define PWMCR1 (*((volatile unsigned long *) 0xE0014030))
+#define PWMCR2 (*((volatile unsigned long *) 0xE0014034))
+#define PWMCR3 (*((volatile unsigned long *) 0xE0014038))
+#define PWMEMR (*((volatile unsigned long *) 0xE001403C))
+#define PWMPCR (*((volatile unsigned long *) 0xE001404C))
+#define PWMLER (*((volatile unsigned long *) 0xE0014050))
+
+/* Universal Asynchronous Receiver Transmitter 0 (UART0) */
+#define U0RBR (*((volatile unsigned char *) 0xE000C000))
+#define U0THR (*((volatile unsigned char *) 0xE000C000))
+#define U0IER (*((volatile unsigned char *) 0xE000C004))
+#define U0IIR (*((volatile unsigned char *) 0xE000C008))
+#define U0FCR (*((volatile unsigned char *) 0xE000C008))
+#define U0LCR (*((volatile unsigned char *) 0xE000C00C))
+#define U0MCR (*((volatile unsigned char *) 0xE000C010))
+#define U0LSR (*((volatile unsigned char *) 0xE000C014))
+#define U0MSR (*((volatile unsigned char *) 0xE000C018))
+#define U0SCR (*((volatile unsigned char *) 0xE000C01C))
+#define U0DLL (*((volatile unsigned char *) 0xE000C000))
+#define U0DLM (*((volatile unsigned char *) 0xE000C004))
+
+/* Universal Asynchronous Receiver Transmitter 1 (UART1) */
+#define U1RBR (*((volatile unsigned char *) 0xE0010000))
+#define U1THR (*((volatile unsigned char *) 0xE0010000))
+#define U1IER (*((volatile unsigned char *) 0xE0010004))
+#define U1IIR (*((volatile unsigned char *) 0xE0010008))
+#define U1FCR (*((volatile unsigned char *) 0xE0010008))
+#define U1LCR (*((volatile unsigned char *) 0xE001000C))
+#define U1MCR (*((volatile unsigned char *) 0xE0010010))
+#define U1LSR (*((volatile unsigned char *) 0xE0010014))
+#define U1MSR (*((volatile unsigned char *) 0xE0010018))
+#define U1SCR (*((volatile unsigned char *) 0xE001001C))
+#define U1DLL (*((volatile unsigned char *) 0xE0010000))
+#define U1DLM (*((volatile unsigned char *) 0xE0010004))
+
+/* I2C Interface */
+#define I2CONSET (*((volatile unsigned char *) 0xE001C000))
+#define I2STAT (*((volatile unsigned char *) 0xE001C004))
+#define I2DAT (*((volatile unsigned char *) 0xE001C008))
+#define I2ADR (*((volatile unsigned char *) 0xE001C00C))
+#define I2SCLH (*((volatile unsigned short*) 0xE001C010))
+#define I2SCLL (*((volatile unsigned short*) 0xE001C014))
+#define I2CONCLR (*((volatile unsigned char *) 0xE001C018))
+
+/* SPI0 (Serial Peripheral Interface 0) */
+#define S0SPCR (*((volatile unsigned char *) 0xE0020000))
+#define S0SPSR (*((volatile unsigned char *) 0xE0020004))
+#define S0SPDR (*((volatile unsigned char *) 0xE0020008))
+#define S0SPCCR (*((volatile unsigned char *) 0xE002000C))
+#define S0SPTCR (*((volatile unsigned char *) 0xE0020010))
+#define S0SPTSR (*((volatile unsigned char *) 0xE0020014))
+#define S0SPTOR (*((volatile unsigned char *) 0xE0020018))
+#define S0SPINT (*((volatile unsigned char *) 0xE002001C))
+
+/* SPI1 (Serial Peripheral Interface 1) */
+#define S1SPCR (*((volatile unsigned char *) 0xE0030000))
+#define S1SPSR (*((volatile unsigned char *) 0xE0030004))
+#define S1SPDR (*((volatile unsigned char *) 0xE0030008))
+#define S1SPCCR (*((volatile unsigned char *) 0xE003000C))
+#define S1SPTCR (*((volatile unsigned char *) 0xE0030010))
+#define S1SPTSR (*((volatile unsigned char *) 0xE0030014))
+#define S1SPTOR (*((volatile unsigned char *) 0xE0030018))
+#define S1SPINT (*((volatile unsigned char *) 0xE003001C))
+
+/* Real Time Clock */
+#define ILR (*((volatile unsigned char *) 0xE0024000))
+#define CTC (*((volatile unsigned short*) 0xE0024004))
+#define CCR (*((volatile unsigned char *) 0xE0024008))
+#define CIIR (*((volatile unsigned char *) 0xE002400C))
+#define AMR (*((volatile unsigned char *) 0xE0024010))
+#define CTIME0 (*((volatile unsigned long *) 0xE0024014))
+#define CTIME1 (*((volatile unsigned long *) 0xE0024018))
+#define CTIME2 (*((volatile unsigned long *) 0xE002401C))
+#define SEC (*((volatile unsigned char *) 0xE0024020))
+#define MIN (*((volatile unsigned char *) 0xE0024024))
+#define HOUR (*((volatile unsigned char *) 0xE0024028))
+#define DOM (*((volatile unsigned char *) 0xE002402C))
+#define DOW (*((volatile unsigned char *) 0xE0024030))
+#define DOY (*((volatile unsigned short*) 0xE0024034))
+#define MONTH (*((volatile unsigned char *) 0xE0024038))
+#define YEAR (*((volatile unsigned short*) 0xE002403C))
+#define ALSEC (*((volatile unsigned char *) 0xE0024060))
+#define ALMIN (*((volatile unsigned char *) 0xE0024064))
+#define ALHOUR (*((volatile unsigned char *) 0xE0024068))
+#define ALDOM (*((volatile unsigned char *) 0xE002406C))
+#define ALDOW (*((volatile unsigned char *) 0xE0024070))
+#define ALDOY (*((volatile unsigned short*) 0xE0024074))
+#define ALMON (*((volatile unsigned char *) 0xE0024078))
+#define ALYEAR (*((volatile unsigned short*) 0xE002407C))
+#define PREINT (*((volatile unsigned short*) 0xE0024080))
+#define PREFRAC (*((volatile unsigned short*) 0xE0024084))
+
+/* A/D Converter */
+#define ADCR (*((volatile unsigned long *) 0xE0034000))
+#define ADDR (*((volatile unsigned long *) 0xE0034004))
+
+/* CAN Acceptance Filter RAM */
+#define AFRAM (*((volatile unsigned long *) 0xE0038000))
+
+/* CAN Acceptance Filter */
+#define AFMR (*((volatile unsigned long *) 0xE003C000))
+#define SFF_sa (*((volatile unsigned long *) 0xE003C004))
+#define SFF_GRP_sa (*((volatile unsigned long *) 0xE003C008))
+#define EFF_sa (*((volatile unsigned long *) 0xE003C00C))
+#define EFF_GRP_sa (*((volatile unsigned long *) 0xE003C010))
+#define ENDofTable (*((volatile unsigned long *) 0xE003C014))
+#define LUTerrAd (*((volatile unsigned long *) 0xE003C018))
+#define LUTerr (*((volatile unsigned long *) 0xE003C01C))
+
+/* CAN Central Registers */
+#define CANTxSR (*((volatile unsigned long *) 0xE0040000))
+#define CANRxSR (*((volatile unsigned long *) 0xE0040004))
+#define CANMSR (*((volatile unsigned long *) 0xE0040008))
+
+/* CAN Controller 1 (CAN1) */
+#define C1MOD (*((volatile unsigned long *) 0xE0044000))
+#define C1CMR (*((volatile unsigned long *) 0xE0044004))
+#define C1GSR (*((volatile unsigned long *) 0xE0044008))
+#define C1ICR (*((volatile unsigned long *) 0xE004400C))
+#define C1IER (*((volatile unsigned long *) 0xE0044010))
+#define C1BTR (*((volatile unsigned long *) 0xE0044014))
+#define C1EWL (*((volatile unsigned long *) 0xE0044018))
+#define C1SR (*((volatile unsigned long *) 0xE004401C))
+#define C1RFS (*((volatile unsigned long *) 0xE0044020))
+#define C1RID (*((volatile unsigned long *) 0xE0044024))
+#define C1RDA (*((volatile unsigned long *) 0xE0044028))
+#define C1RDB (*((volatile unsigned long *) 0xE004402C))
+#define C1TFI1 (*((volatile unsigned long *) 0xE0044030))
+#define C1TID1 (*((volatile unsigned long *) 0xE0044034))
+#define C1TDA1 (*((volatile unsigned long *) 0xE0044038))
+#define C1TDB1 (*((volatile unsigned long *) 0xE004403C))
+#define C1TFI2 (*((volatile unsigned long *) 0xE0044040))
+#define C1TID2 (*((volatile unsigned long *) 0xE0044044))
+#define C1TDA2 (*((volatile unsigned long *) 0xE0044048))
+#define C1TDB2 (*((volatile unsigned long *) 0xE004404C))
+#define C1TFI3 (*((volatile unsigned long *) 0xE0044050))
+#define C1TID3 (*((volatile unsigned long *) 0xE0044054))
+#define C1TDA3 (*((volatile unsigned long *) 0xE0044058))
+#define C1TDB3 (*((volatile unsigned long *) 0xE004405C))
+
+/* CAN Controller 2 (CAN2) */
+#define C2MOD (*((volatile unsigned long *) 0xE0048000))
+#define C2CMR (*((volatile unsigned long *) 0xE0048004))
+#define C2GSR (*((volatile unsigned long *) 0xE0048008))
+#define C2ICR (*((volatile unsigned long *) 0xE004800C))
+#define C2IER (*((volatile unsigned long *) 0xE0048010))
+#define C2BTR (*((volatile unsigned long *) 0xE0048014))
+#define C2EWL (*((volatile unsigned long *) 0xE0048018))
+#define C2SR (*((volatile unsigned long *) 0xE004801C))
+#define C2RFS (*((volatile unsigned long *) 0xE0048020))
+#define C2RID (*((volatile unsigned long *) 0xE0048024))
+#define C2RDA (*((volatile unsigned long *) 0xE0048028))
+#define C2RDB (*((volatile unsigned long *) 0xE004802C))
+#define C2TFI1 (*((volatile unsigned long *) 0xE0048030))
+#define C2TID1 (*((volatile unsigned long *) 0xE0048034))
+#define C2TDA1 (*((volatile unsigned long *) 0xE0048038))
+#define C2TDB1 (*((volatile unsigned long *) 0xE004803C))
+#define C2TFI2 (*((volatile unsigned long *) 0xE0048040))
+#define C2TID2 (*((volatile unsigned long *) 0xE0048044))
+#define C2TDA2 (*((volatile unsigned long *) 0xE0048048))
+#define C2TDB2 (*((volatile unsigned long *) 0xE004804C))
+#define C2TFI3 (*((volatile unsigned long *) 0xE0048050))
+#define C2TID3 (*((volatile unsigned long *) 0xE0048054))
+#define C2TDA3 (*((volatile unsigned long *) 0xE0048058))
+#define C2TDB3 (*((volatile unsigned long *) 0xE004805C))
+
+/* CAN Controller 3 (CAN3) */
+#define C3MOD (*((volatile unsigned long *) 0xE004C000))
+#define C3CMR (*((volatile unsigned long *) 0xE004C004))
+#define C3GSR (*((volatile unsigned long *) 0xE004C008))
+#define C3ICR (*((volatile unsigned long *) 0xE004C00C))
+#define C3IER (*((volatile unsigned long *) 0xE004C010))
+#define C3BTR (*((volatile unsigned long *) 0xE004C014))
+#define C3EWL (*((volatile unsigned long *) 0xE004C018))
+#define C3SR (*((volatile unsigned long *) 0xE004C01C))
+#define C3RFS (*((volatile unsigned long *) 0xE004C020))
+#define C3RID (*((volatile unsigned long *) 0xE004C024))
+#define C3RDA (*((volatile unsigned long *) 0xE004C028))
+#define C3RDB (*((volatile unsigned long *) 0xE004C02C))
+#define C3TFI1 (*((volatile unsigned long *) 0xE004C030))
+#define C3TID1 (*((volatile unsigned long *) 0xE004C034))
+#define C3TDA1 (*((volatile unsigned long *) 0xE004C038))
+#define C3TDB1 (*((volatile unsigned long *) 0xE004C03C))
+#define C3TFI2 (*((volatile unsigned long *) 0xE004C040))
+#define C3TID2 (*((volatile unsigned long *) 0xE004C044))
+#define C3TDA2 (*((volatile unsigned long *) 0xE004C048))
+#define C3TDB2 (*((volatile unsigned long *) 0xE004C04C))
+#define C3TFI3 (*((volatile unsigned long *) 0xE004C050))
+#define C3TID3 (*((volatile unsigned long *) 0xE004C054))
+#define C3TDA3 (*((volatile unsigned long *) 0xE004C058))
+#define C3TDB3 (*((volatile unsigned long *) 0xE004C05C))
+
+/* CAN Controller 4 (CAN4) */
+#define C4MOD (*((volatile unsigned long *) 0xE0050000))
+#define C4CMR (*((volatile unsigned long *) 0xE0050004))
+#define C4GSR (*((volatile unsigned long *) 0xE0050008))
+#define C4ICR (*((volatile unsigned long *) 0xE005000C))
+#define C4IER (*((volatile unsigned long *) 0xE0050010))
+#define C4BTR (*((volatile unsigned long *) 0xE0050014))
+#define C4EWL (*((volatile unsigned long *) 0xE0050018))
+#define C4SR (*((volatile unsigned long *) 0xE005001C))
+#define C4RFS (*((volatile unsigned long *) 0xE0050020))
+#define C4RID (*((volatile unsigned long *) 0xE0050024))
+#define C4RDA (*((volatile unsigned long *) 0xE0050028))
+#define C4RDB (*((volatile unsigned long *) 0xE005002C))
+#define C4TFI1 (*((volatile unsigned long *) 0xE0050030))
+#define C4TID1 (*((volatile unsigned long *) 0xE0050034))
+#define C4TDA1 (*((volatile unsigned long *) 0xE0050038))
+#define C4TDB1 (*((volatile unsigned long *) 0xE005003C))
+#define C4TFI2 (*((volatile unsigned long *) 0xE0050040))
+#define C4TID2 (*((volatile unsigned long *) 0xE0050044))
+#define C4TDA2 (*((volatile unsigned long *) 0xE0050048))
+#define C4TDB2 (*((volatile unsigned long *) 0xE005004C))
+#define C4TFI3 (*((volatile unsigned long *) 0xE0050050))
+#define C4TID3 (*((volatile unsigned long *) 0xE0050054))
+#define C4TDA3 (*((volatile unsigned long *) 0xE0050058))
+#define C4TDB3 (*((volatile unsigned long *) 0xE005005C))
+
+/* Watchdog */
+#define WDMOD (*((volatile unsigned char *) 0xE0000000))
+#define WDTC (*((volatile unsigned long *) 0xE0000004))
+#define WDFEED (*((volatile unsigned char *) 0xE0000008))
+#define WDTV (*((volatile unsigned long *) 0xE000000C))
+
+#endif // __LPC21xx_H
+
+/*----------------------- END OF FILE ----------------------------------*/
Added: trunk/LPC2_CANFull_V110/LPC_FullCAN_SW.Opt
===================================================================
--- trunk/LPC2_CANFull_V110/LPC_FullCAN_SW.Opt (rev 0)
+++ trunk/LPC2_CANFull_V110/LPC_FullCAN_SW.Opt 2008-02-28 14:17:02 UTC (rev 862)
@@ -0,0 +1,46 @@
+### uVision2 Project, (C) Keil Software
+### Do not modify !
+
+ cExt (*.c)
+ aExt (*.s*; *.src; *.a*)
+ oExt (*.obj)
+ lExt (*.lib)
+ tExt (*.txt; *.h; *.inc)
+ pExt (*.plm)
+ CppX (*.cpp)
+ DaveTm { 0,0,0,0,0,0,0,0 }
+
+Target (LPC2129), 0x0003 // Tools: 'ARM-GNU'
+GRPOPT 1,(System),1,0,0
+GRPOPT 2,(Sources),1,0,0
+GRPOPT 3,(Documentation),1,0,0
+
+OPTFFF 1,1,2,0,0,0,0,0,<.\Startup.s><Startup.s>
+OPTFFF 2,2,1,369098753,0,0,0,0,<.\LPC_FullCAN_SW.c><LPC_FullCAN_SW.c>
+OPTFFF 2,3,1,0,0,0,0,0,<.\main_FullCAN.c><main_FullCAN.c>
+OPTFFF 3,4,5,352321538,0,1,6,0,<.\readme.txt><readme.txt> { 44,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,87,2,0,0,49,1,0,0 }
+
+ExtF <.\readme.txt> 1,6,0,{ 44,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,87,2,0,0,49,1,0,0 }
+
+TARGOPT 1, (LPC2129)
+ ARMCLK=12000000
+ OPTTT 1,1,1,0
+ OPTHX 1,65535,0,0,0
+ OPTLX 120,65,8,<.\>
+ OPTOX 16
+ OPTLT 1,1,1,0,1,1,0,1,0,0,0,0
+ OPTXL 1,1,1,1,1,1,1,0,0
+ OPTFL 1,0,1
+ OPTBL 0,(Data Sheet)<DATASHTS\PHILIPS\LPC2119_2129-02.PDF>
+ OPTBL 1,(User Manual)<DATASHTS\PHLIPS\UM_LPC21XX_LPC22XX_1.PDF>
+ OPTDL (SARM.DLL)()(DARMP.DLL)(-pLPC21x9)(SARM.DLL)()(TARMP.DLL)(-pLPC21x9)
+ OPTDBG 45054,-1,()()()()()()()()()() (BIN\UL2ARM.DLL)()()()
+ OPTKEY 0,(ARMDBGFLAGS)()
+ OPTKEY 0,(DLGTARM)((134=-1,-1,-1,-1,0)(135=-1,-1,-1,-1,0)(107=-1,-1,-1,-1,0)(108=-1,-1,-1,-1,0)(106=-1,-1,-1,-1,0)(105=-1,-1,-1,-1,0)(80=428,134,974,565,0)(104=135,165,441,570,0)(100=-1,-1,-1,-1,0)(101=-1,-1,-1,-1,0)(113=-1,-1,-1,-1,0)(112=-1,-1,-1,-1,0)(136=-1,-1,-1,-1,0)(117=-1,-1,-1,-1,0)(118=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(114=-1,-1,-1,-1,0)(119=-1,-1,-1,-1,0)(130=41,212,443,725,0)(131=293,336,575,563,0)(121=37,34,733,508,0)(122=249,190,945,664,0)(115=-1,-1,-1,-1,0)(116=-1,-1,-1,-1,0))
+ OPTKEY 0,(UL2ARM)(-U69674188 -O7 -S0 -C0 -N00("ARM7TDMI-S Core") -D00(4F1F0F0F) -L00(4) -FO7 -FD40000000 -FC800 -FN1 -FF0LPC2000_256 -FS00 -FL040000)
+ OPTKEY 0,(DLGDARM)((107=-1,-1,-1,-1,0)(108=-1,-1,-1,-1,0)(106=-1,-1,-1,-1,0)(105=-1,-1,-1,-1,0)(80=365,182,911,613,0)(104=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(101=-1,-1,-1,-1,0)(113=-1,-1,-1,-1,0)(112=-1,-1,-1,-1,0)(117=-1,-1,-1,-1,0)(118=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(114=-1,-1,-1,-1,0)(119=-1,-1,-1,-1,0)(130=3,212,405,725,0)(131=293,336,575,563,0)(121=60,85,756,559,0)(122=-1,-1,-1,-1,0)(132=450,286,978,625,0)(115=-1,-1,-1,-1,0)(116=-1,-1,-1,-1,0))
+ OPTDF 0x80
+ OPTLE <>
+ OPTLC <>
+EndOpt
+
Added: trunk/LPC2_CANFull_V110/LPC_FullCAN_SW.Uv2
===================================================================
--- trunk/LPC2_CANFull_V110/LPC_FullCAN_SW.Uv2 (rev 0)
+++ trunk/LPC2_CANFull_V110/LPC_FullCAN_SW.Uv2 2008-02-28 14:17:02 UTC (rev 862)
@@ -0,0 +1,97 @@
+### uVision2 Project, (C) Keil Software
+### Do not modify !
+
+Target (LPC2129), 0x0003 // Tools: 'ARM-GNU'
+
+Group (System)
+Group (Sources)
+Group (Documentation)
+
+File 1,2,<.\Startup.s><Startup.s> 0x4020A1A4
+File 2,1,<.\LPC_FullCAN_SW.c><LPC_FullCAN_SW.c> 0x41DBD499
+File 2,1,<.\main_FullCAN.c><main_FullCAN.c> 0x41DBD46C
+File 3,5,<.\readme.txt><readme.txt> 0x41DBD499
+
+
+Options 1,0,0 // Target 'LPC2129'
+ Device (LPC2129)
+ Vendor (Philips)
+ Cpu (IRAM(0x40000000-0x40003FFF) IROM(0-0x3FFFF) CLOCK(12000000) CPUTYPE(ARM7TDMI))
+ FlashUt (LPC210x_ISP.EXE ("#H" ^X $D COM1: 9600 1))
+ StupF ()
+ FlashDR ()
+ Rgf (LPC21xx.H)
+ Mem ()
+ C ()
+ A ()
+ RL ()
+ OH ()
+ DBC_IFX ()
+ DBC_CMS ()
+ DBC_AMS ()
+ DBC_LMS ()
+ UseEnv=0
+ EnvBin ()
+ EnvInc ()
+ EnvLib ()
+ EnvReg (\xFFPhilips\)
+ OrgReg (\xFFPhilips\)
+ TgStat=0
+ OutDir (.\Flash\)
+ OutName (LPC_FullCAN_SW)
+ GenApp=1
+ GenLib=0
+ GenHex=1
+ Debug=1
+ Browse=1
+ LstDir (.\)
+ HexSel=1
+ MG32K=0
+ TGMORE=0
+ RunUsr 0 0 <>
+ RunUsr 1 0 <>
+ BrunUsr 0 0 <>
+ BrunUsr 1 0 <>
+ SVCSID <>
+ GLFLAGS=1790
+ GCPUTYP (ARM7TDMI)
+ TFlagsA { 0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
+ OCMARM { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
+ OCMARAM { 0,0,0,0,64,0,64,0,0 }
+ OCMAROM { 1,0,0,0,0,0,0,4,0 }
+ OCMXRAM { 0,0,0,0,0,0,0,0,0 }
+ ACCFLG { 5,16,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
+ ACMISC ()
+ ACDEFN ()
+ ACUDEF ()
+ ACINCD ()
+ AASFLG { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
+ AAMISC ()
+ AADEFN ()
+ AAUDEF ()
+ AAINCD ()
+ PropFld { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
+ IncBld=1
+ AlwaysBuild=0
+ GenAsm=0
+ AsmAsm=0
+ PublicsOnly=0
+ StopCode=3
+ CustArgs ()
+ LibMods ()
+ ALDFLAG { 15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
+ ALDTADR ()
+ ALDDADR ()
+ ALDBSSR ()
+ ALDICLB ()
+ ALDICDR ()
+ ALDMISC ()
+ ALDSCAT (.\Flash.ld)
+ OPTDL (SARM.DLL)()(DARMP.DLL)(-pLPC21x9)(SARM.DLL)()(TARMP.DLL)(-pLPC21x9)
+ OPTDBG 45054,-1,()()()()()()()()()() (BIN\UL2ARM.DLL)()()()
+ FLASH1 { 9,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
+ FLASH2 (BIN\UL2ARM.DLL)
+ FLASH3 ("LPC210x_ISP.EXE" ("#H" ^X $D COM1: 9600 1))
+ FLASH4 ()
+EndOpt
+
Added: trunk/LPC2_CANFull_V110/LPC_FullCAN_SW.c
===================================================================
--- trunk/LPC2_CANFull_V110/LPC_FullCAN_SW.c (rev 0)
+++ trunk/LPC2_CANFull_V110/LPC_FullCAN_SW.c 2008-02-28 14:17:02 UTC (rev 862)
@@ -0,0 +1,639 @@
+/**************************************************************************
+MODULE: LPC_FullCAN_SW
+CONTAINS: Philips LPC2000 CAN interface driver.
+ The first revisions of the Philips LPC2000 with CAN interface
+ do NOT support the FullCAN mode in hardware. This driver
+ implements the FullCAN mode in software.
+ Compiled and Tested with Keil Tools www.keil.com
+COPYRIGHT: Embedded Systems Academy, Inc. 2004.
+LICENSE: THIS VERSION CREATED FOR FREE DISTRIBUTION
+ FOR PHILIPS SEMICONDUCTORS www.philipsmcu.com
+ FOR KEIL SOFTWARE www.keil.com
+VERSION: 1.10, Pf 05-JAN-05, Latest errata sheet suggestions implemented
+---------------------------------------------------------------------------
+HISTORY: 1.01, Pf 18-APR-04, Added Timer and LED output
+HISTORY: 1.00, Pf 16-APR-04, First published release
+***************************************************************************/
+
+#include <LPC21XX.H> // LPC21XX Peripheral Registers
+#include "LPC_FullCAN_SW.h"
+
+
+/**************************************************************************
+GLOBAL VARIABLES
+***************************************************************************/
+
+// Counts number of filters (CAN message objects) used so far
+short volatile gCANFilter = 0;
+
+// FullCAN Message List
+FULLCAN_MSG volatile gFullCANList[MAX_FILTERS];
+
+
+/**************************************************************************
+PUBLIC FUNCTIONS
+***************************************************************************/
+
+/**************************************************************************
+Initialization of a CAN interface
+as described in LPC_FullCAN_SW.h
+***************************************************************************/
+short FullCAN_Init (
+ unsigned short can_port, // CAN interface to use
+ unsigned short can_isrvect, // interrupt vector number to use for Rx ISR (0-15)
+ unsigned int can_btr // CAN BTR value used to set CAN baud rate
+ )
+{
+unsigned int *pSFR; // pointer into SFR space
+unsigned int *pSFR2; // pointer into SFR space
+unsigned int offset; // offset added to pSFR
+
+ // Double check can_isrvect value
+ if (can_isrvect > 15)
+ { // Illegal value for can_isrvect
+ return 0;
+ }
+
+ // Enable pins for selected CAN interface
+ switch (can_port)
+ {
+ case 1:
+ PINSEL1 |= 0x00040000L; // Set bit 18
+ offset = 0x00000000L; // Use 1st set of CAN registers
+ break;
+#if (MAX_CANPORTS > 1)
+ case 2:
+ PINSEL1 |= 0x00014000L; // Set bits 14 and 16
+ offset = 0x00001000L; // Use 2nd set of CAN registers
+ break;
+#endif
+#if (MAX_CANPORTS > 2)
+ case 3:
+ PINSEL1 |= 0x00001800L; // Set bits 11 and 12
+ offset = 0x00002000L; // Use 3rd set of CAN registers
+ break;
+#endif
+#if (MAX_CANPORTS > 3)
+ case 4:
+ PINSEL0 |= 0x0F000000L; // Set bits 24 to 27
+ offset = 0x00003000L; // Use 4th set of CAN registers
+ break;
+#endif
+ default:
+ return 0; // illegal value used
+ }
+
+ // Reset and disable all message filters
+ gCANFilter = 0;
+ // Acceptance Filter Mode Register = off !
+ AFMR = 0x00000001L;
+
+ pSFR = (unsigned int *) &C1MOD + offset; // Select Mode register
+ *pSFR = 1; // Go into Reset mode
+
+ pSFR = (unsigned int *) &C1IER + offset; // Select Interrupt Enable Register
+ *pSFR = 0;// Disable All Interrupts
+
+ pSFR = (unsigned int *) &C1GSR + offset; // Select Status Register
+ *pSFR = 0; // Clear Status register
+
+ pSFR = (unsigned int *) &C1BTR + offset; // Select BTR Register
+ *pSFR = can_btr; // Set bit timing
+
+ // Set and enable receive interrupt
+ pSFR = (unsigned int *) &VICVectAddr0;
+ pSFR += can_isrvect; // Set to desired interrupt vector
+
+ pSFR2 = (unsigned int *) &VICVectCntl0;
+ pSFR2 += can_isrvect; // Set to desired interrupt control
+
+ switch (can_port)
+ {
+ case 1:
+ // Set interrupt vector
+ *pSFR = (unsigned long) FullCAN_CANISR_Rx1;
+ // Use this Interrupt for CAN Rx1 Interrupt
+ *pSFR2 = 0x20 | 26;
+ // Enable CAN Rx1 Interrupt
+ VICIntEnable = 0x04000000L;
+ break;
+#if (MAX_CANPORTS > 1)
+ case 2:
+ // Set interrupt vector
+ *pSFR = (unsigned long) FullCAN_CANISR_Rx2;
+ // Use this Interrupt for CAN Rx2 Interrupt
+ *pSFR2 = 0x20 | 27;
+ // Enable CAN Rx2 Interrupt
+ VICIntEnable = 0x08000000L;
+ break;
+#endif
+#if (MAX_CANPORTS > 2)
+ case 3:
+ // Set interrupt vector
+ *pSFR = (unsigned long) FullCAN_CANISR_Rx3;
+ // Use this Interrupt for CAN Rx3 Interrupt
+ *pSFR2 = 0x20 | 28;
+ // Enable CAN Rx3 Interrupt
+ VICIntEnable = 0x10000000L;
+ break;
+#endif
+#if (MAX_CANPORTS > 3)
+ case 4:
+ // Set interrupt vector
+ *pSFR = (unsigned long) FullCAN_CANISR_Rx4;
+ // Use this Interrupt for CAN Rx4 Interrupt
+ *pSFR2 = 0x20 | 29;
+ // Enable CAN Rx4 Interrupt
+ VICIntEnable = 0x20000000L;
+ break;
+#endif
+ default:
+ return 0; // illegal value used
+ }
+
+ pSFR = (unsigned int *) &C1IER + offset; // Select Interrupt register
+ *pSFR = 1; // Enable Receive Interrupt
+
+ // Enter Normal Operating Mode
+ pSFR = (unsigned int *) &C1MOD + offset; // Select Mode register
+ *pSFR = 0; // Operating Mode
+
+ return 1;
+}
+
+
+/**************************************************************************
+Setting a CAN receive filter
+as described in LPC_FullCAN_SW.h
+***************************************************************************/
+short FullCAN_SetFilter (
+ unsigned short can_port, // CAN interface number
+ unsigned int CANID // 11-bit CAN ID
+ )
+{
+unsigned int p, n;
+unsigned int buf0, buf1;
+unsigned int ID_lower, ID_upper;
+unsigned int candata;
+unsigned int *pAddr;
+
+ // Double check can_port value
+ if ((can_port < 1) || (can_port > MAX_CANPORTS))
+ { // Illegal value for can_port
+ return 0;
+ }
+
+ // Acceptance Filter Mode Register = off !
+ AFMR = 0x00000001L;
+
+ if (gCANFilter == 0)
+ { // First call, init entry zero
+ gFullCANList[0].Dat1 = 0x000037FFL; // CAN 1, disabled and unused
+ }
+ if (gCANFilter >= MAX_FILTERS)
+ {
+ return 0;
+ }
+
+ CANID &= 0x000007FFL; // Mask out 11-bit ID
+ CANID |= (can_port << 13); // Put can_port info in bits 13-15
+
+ // Filters must be sorted by interface, then by priority
+ // new filter is sorted into array
+ p = 0;
+ while (p < gCANFilter) // loop through all existing filters
+ {
+ if ((gFullCANList[p].Dat1 & 0x0000FFFFL) > CANID)
+ {
+ break;
+ }
+ p++;
+ }
+
+ // insert new filter here
+ buf0 = gFullCANList[p].Dat1; // save current entry
+ gFullCANList[p].Dat1 = CANID; // insert the new entry
+
+ // move all remaining entries one row up
+ gCANFilter++;
+ while (p < gCANFilter)
+ {
+ p++;
+ buf1 = gFullCANList[p].Dat1;
+ gFullCANList[p].Dat1 = buf0;
+ buf0 = buf1;
+ }
+
+ // Now work on Acceptance Filter Configuration
+ // Set CAN filter for 11-bit standard identifiers
+ p = 0;
+
+ // Set pointer for Standard Frame Individual
+ // Standard Frame Explicit
+ SFF_sa = p;
+
+ pAddr = (unsigned int *) ACCEPTANCE_FILTER_RAM_BASE;
+ for (n = 0; n < ((gCANFilter+1)/2); n++)
+ {
+ ID_lower = gFullCANList[n * 2].Dat1 & 0x0000FFFFL;
+ ID_upper = gFullCANList[n * 2 + 1].Dat1 & 0x0000FFFFL;
+ candata = (ID_lower << 16) + ID_upper;
+ *pAddr = candata;
+ p += 4;
+ pAddr++;
+ }
+
+ // p is still pointing to ENDofTable;
+ // last entry must contain unused filters
+ *pAddr = 0xF7FFF7FF;
+ p += 4;
+
+ // Set pointer for Standard Frame Groups
+ // Standard Frame Group Start Address Register
+ SFF_GRP_sa = p;
+
+ // Set pointer for Extended Frame Individual
+ // Extended Frame Start Address Register
+ EFF_sa = p;
+
+ // Set pointer for Extended Frame Groups
+ // Extended Frame Group Start Address Register
+ EFF_GRP_sa = p;
+
+ // Set ENDofTable
+ // End of AF Tables Register
+ ENDofTable = p;
+
+ // Acceptance Filter Mode Register, start using filter
+ AFMR = 0;
+
+ return 1;
+}
+
+
+/**************************************************************************
+Installing the CAN Err ISR
+as described in LPC_FullCAN_SW.h
+***************************************************************************/
+short FullCAN_SetErrIRQ (
+ unsigned short can_isrvect // interrupt vector number to use for Err ISR (0-15)
+ )
+{
+unsigned int *pSFR; // pointer into SFR space
+
+ // Double check can_isrvect value
+ if (can_isrvect > 15)
+ { // Illegal value for can_isrvect
+ return 0;
+ }
+
+ // Set and enable err interrupt
+ pSFR = (unsigned int *) &VICVectAddr0;
+ pSFR += can_isrvect; // Set to desired interrupt vector
+ // Set interrupt vector
+ *pSFR = (unsigned long) FullCAN_CANISR_Err;
+
+ pSFR = (unsigned int *) &VICVectCntl0;
+ pSFR += can_isrvect; // Set to desired interrupt control
+ *pSFR = 0x20 | 19;
+
+ // Enable Interrupt source
+ VICIntEnable = 0x00080000L;
+
+ return 1;
+}
+
+
+/**************************************************************************
+Transmitting a CAN message on a selected CAN interface
+as described in LPC_FullCAN_SW.h
+***************************************************************************/
+short FullCAN_PushMessage (
+ unsigned short can_port,
+ FULLCAN_MSG *pTransmitBuf
+ )
+{
+unsigned int *pAddr;
+unsigned int *pCandata;
+unsigned int offset;
+
+ switch (can_port)
+ {
+ case 1:
+ offset = 0x00000000L; // Use 1st set of CAN registers
+ break;
+#if (MAX_CANPORTS > 1)
+ case 2:
+ offset = 0x00001000L; // Use 2nd set of CAN registers
+ break;
+#endif
+#if (MAX_CANPORTS > 2)
+ case 3:
+ offset = 0x00002000L; // Use 3rd set of CAN registers
+ break;
+#endif
+#if (MAX_CANPORTS > 3)
+ case 4:
+ offset = 0x00003000L; // Use 4th set of CAN registers
+ break;
+#endif
+ default:
+ return 0; // illegal value used
+ }
+
+ pAddr = (unsigned int *) &C1SR + offset; // CANSR
+ if (!(*pAddr & 0x00000004L))
+ { // Transmit Channel is not available
+ return 0; // No channel available
+ }
+
+ // Write DLC
+ pAddr = (unsigned int *) &C1TFI1 + offset;
+ *pAddr = pTransmitBuf->Dat1 & 0x000F0000L;
+
+ // Write CAN ID
+ pAddr++;
+ *pAddr = pTransmitBuf->Dat1 & 0x000007FFL;
+
+ // Write first 4 data bytes
+ pCandata = (unsigned int *) &(pTransmitBuf->DatA);
+ pAddr++;
+ *pAddr = *pCandata;
+
+ // Write second 4 data bytes
+ pCandata++;
+ pAddr++;
+ *pAddr = *pCandata;
+
+ // Write self transmission request
+ pAddr = (unsigned int *) &C1CMR + offset;
+ *pAddr = 0x30; // Self Transmission Request Buf 1
+
+ return 1;
+}
+
+/**************************************************************************
+Receiving a CAN message
+as described in LPC_FullCAN_SW.h
+***************************************************************************/
+short FullCAN_PullMessage (
+ unsigned short can_port,
+ FULLCAN_MSG *pReceiveBuf
+ )
+{
+unsigned short obj; // loop counter for message objects/filters
+unsigned int *pSrc; // Source pointer
+unsigned int *pDst; // Destination pointer
+unsigned int match; // Match value for can_port and semaphore
+
+ // Double check can_port value
+ if ((can_port < 1) || (can_port > MAX_CANPORTS))
+ { // Illegal value for can_port
+ return 0;
+ }
+
+ // Initialize pointers
+ pSrc = (unsigned int *) &(gFullCANList[0].Dat1);
+ pDst = (unsigned int *) &(pReceiveBuf->Dat1);
+
+ // Prepare match value for CAN interface
+ match = can_port << 13;
+ match |= 0x03000000L; // Semaphore bits are 11b
+
+ obj = 0;
+ while (obj < gCANFilter)
+ {
+ // match can_port and semaphore set to 11?
+ if ((*pSrc & 0x0300E000L) == match)
+ { // Object Updated since last access
+ *pSrc &= 0xFCFFFFFFL; // clear Semaphore
+
+ *pDst = *pSrc; // Copy Dat1
+
+ pSrc++; // set to gFullCANList[obj].DatA
+ pDst++; // set to pReceiveBuf->DatA
+
+ *pDst = *pSrc; // Copy DatA
+
+ pSrc++; // set to ...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-25 16:04:05
|
Revision: 861
http://can.svn.sourceforge.net/can/?rev=861&view=rev
Author: akhe
Date: 2008-02-25 08:03:59 -0800 (Mon, 25 Feb 2008)
Log Message:
-----------
Fixed IAR 72x CAN sample so both polling and interrupt works even when other frames are present on the bus.
Modified Paths:
--------------
trunk/firmware/arm/str/cantest_str73x_iar/73x_it.c
trunk/firmware/arm/str/cantest_str73x_iar/cantest.dep
trunk/firmware/arm/str/cantest_str73x_iar/main.c
trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.dni
trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.wsdt
Modified: trunk/firmware/arm/str/cantest_str73x_iar/73x_it.c
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_iar/73x_it.c 2008-02-25 14:25:56 UTC (rev 860)
+++ trunk/firmware/arm/str/cantest_str73x_iar/73x_it.c 2008-02-25 16:03:59 UTC (rev 861)
@@ -29,18 +29,18 @@
/* Private typedef -------------------------------------------------------------*/
/* Private define --------------------------------------------------------------*/
enum {
- CAN0_TX_MSGOBJ = 0,
- CAN0_RX_MSGOBJ = 1
+ CAN0_TX_MSGOBJ = 0,
+ CAN0_RX_MSGOBJ = 1
};
enum {
- CAN1_TX_MSGOBJ = 0,
- CAN1_RX_MSGOBJ = 1
+ CAN1_TX_MSGOBJ = 0,
+ CAN1_RX_MSGOBJ = 1
};
enum {
- CAN2_TX_MSGOBJ = 0,
- CAN2_RX_MSGOBJ = 1
+ CAN2_TX_MSGOBJ = 0,
+ CAN2_RX_MSGOBJ = 1
};
/* Private macro ---------------------------------------------------------------*/
@@ -654,30 +654,27 @@
*******************************************************************************/
void CAN0_IRQHandler (void)
{
- u32 msgobj;
+ u32 msgobj;
+ if ( CAN0->IDR == 0x8000 ) // status interrupt
+ (void)CAN0->SR; // read the status register to clear
+ else if ( ( CAN0->IDR >= 1 ) && ( CAN0->IDR <= 32 ) ) {
+ // Get the message object number that caused the interrupt to occur
+ switch ( msgobj = CAN0->IDR - 1 ) {
+ case CAN0_TX_MSGOBJ:
+ GPIO_BitWrite( GPIO0, GPIO_PIN_7 , Bit_SET );
+ CAN_ReleaseTxMessage(CAN0, msgobj);
+ break;
- if (CAN0->IDR == 0x8000) /* status interrupt */
- (void)CAN0->SR; /* read the status register to clear */
- else if ((CAN0->IDR >= 1) && (CAN0->IDR <= 32))
- {
- /* Get the message object number that caused the interrupt to occur*/
- switch (msgobj = CAN0->IDR - 1)
- {
- case CAN0_TX_MSGOBJ:
- GPIO_BitWrite(GPIO0, GPIO_PIN_7 , Bit_SET);
- CAN_ReleaseTxMessage(CAN0, msgobj);
- break;
+ case CAN0_RX_MSGOBJ:
+ CAN_ReceiveMessage( CAN0, msgobj, FALSE, &RxCan0Msg );
+ CAN_ReleaseRxMessage( CAN0, msgobj );
+ break;
- case CAN0_RX_MSGOBJ:
- CAN_ReceiveMessage(CAN0, msgobj, FALSE, &RxCan0Msg);
- CAN_ReleaseRxMessage(CAN0, msgobj);
- break;
-
- default:
- CAN_ReleaseMessage(CAN0, msgobj);
- }
- }
+ default:
+ CAN_ReleaseMessage( CAN0, msgobj );
+ }
+ }
}
/*******************************************************************************
@@ -689,29 +686,27 @@
*******************************************************************************/
void CAN1_IRQHandler (void)
{
- u32 msgobj;
+ u32 msgobj;
- if (CAN1->IDR == 0x8000) /*status interrupt*/
- (void)CAN1->SR; /* read the status register to clear*/
- else if ((CAN1->IDR >= 1) && (CAN1->IDR <= 32))
- {
- /* get the message object number that caused the interrupt to occur*/
- switch (msgobj = CAN1->IDR - 1)
- {
- case CAN1_TX_MSGOBJ:
- GPIO_BitWrite(GPIO0, GPIO_PIN_9 , Bit_SET);
- CAN_ReleaseTxMessage(CAN1, msgobj);
- break;
+ if (CAN1->IDR == 0x8000) /*status interrupt*/
+ (void)CAN1->SR; /* read the status register to clear*/
+ else if ( ( CAN1->IDR >= 1 ) && ( CAN1->IDR <= 32 ) ) {
+ /* get the message object number that caused the interrupt to occur*/
+ switch ( msgobj = CAN1->IDR - 1 ) {
+ case CAN1_TX_MSGOBJ:
+ GPIO_BitWrite(GPIO0, GPIO_PIN_9 , Bit_SET);
+ CAN_ReleaseTxMessage(CAN1, msgobj);
+ break;
- case CAN1_RX_MSGOBJ:
- CAN_ReceiveMessage(CAN1, msgobj, FALSE, &RxCan1Msg);
- CAN_ReleaseRxMessage(CAN1, msgobj);
- break;
+ case CAN1_RX_MSGOBJ:
+ CAN_ReceiveMessage(CAN1, msgobj, FALSE, &RxCan1Msg);
+ CAN_ReleaseRxMessage(CAN1, msgobj);
+ break;
- default:
- CAN_ReleaseMessage(CAN1, msgobj);
- }
- }
+ default:
+ CAN_ReleaseMessage(CAN1, msgobj);
+ }
+ }
}
@@ -724,30 +719,27 @@
*******************************************************************************/
void CAN2_IRQHandler (void)
{
- u32 msgobj;
+ u32 msgobj;
+
+ if (CAN2->IDR == 0x8000) /* status interrupt*/
+ (void)CAN2->SR; /* read the status register to clear*/
+ else if ( CAN2->IDR >= 1 && CAN2->IDR <= 32 ) {
+ /* get the message object number that caused the interrupt to occur*/
+ switch ( msgobj = CAN2->IDR - 1 ) {
+ case CAN2_TX_MSGOBJ:
+ GPIO_BitWrite(GPIO0, GPIO_PIN_11 , Bit_SET);
+ CAN_ReleaseTxMessage(CAN2, msgobj);
+ break;
+ case CAN2_RX_MSGOBJ:
+ CAN_ReceiveMessage(CAN2, msgobj, FALSE, &RxCan2Msg);
+ CAN_ReleaseRxMessage(CAN2, msgobj);
+ break;
- if (CAN2->IDR == 0x8000) /* status interrupt*/
- (void)CAN2->SR; /* read the status register to clear*/
- else if (CAN2->IDR >= 1 && CAN2->IDR <= 32)
- {
- /* get the message object number that caused the interrupt to occur*/
- switch (msgobj = CAN2->IDR - 1)
- {
- case CAN2_TX_MSGOBJ:
- GPIO_BitWrite(GPIO0, GPIO_PIN_11 , Bit_SET);
- CAN_ReleaseTxMessage(CAN2, msgobj);
- break;
-
- case CAN2_RX_MSGOBJ:
- CAN_ReceiveMessage(CAN2, msgobj, FALSE, &RxCan2Msg);
- CAN_ReleaseRxMessage(CAN2, msgobj);
- break;
-
- default:
- CAN_ReleaseMessage(CAN2, msgobj);
- }
- }
+ default:
+ CAN_ReleaseMessage(CAN2, msgobj);
+ }
+ }
}
/*******************************************************************************
Modified: trunk/firmware/arm/str/cantest_str73x_iar/cantest.dep
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_iar/cantest.dep 2008-02-25 14:25:56 UTC (rev 860)
+++ trunk/firmware/arm/str/cantest_str73x_iar/cantest.dep 2008-02-25 16:03:59 UTC (rev 861)
@@ -6,397 +6,397 @@
<configuration>
<name>Debug</name>
<outputs>
- <file>$PROJ_DIR$\str73x_lib\source\73x_cfg.c</file>
- <file>$PROJ_DIR$\str73x_lib\include\73x_gpio.h</file>
- <file>$TOOLKIT_DIR$\inc\DLib_Product_string.h</file>
- <file>$PROJ_DIR$\str73x_lib\source\73x_prccu.c</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_rtc.o</file>
- <file>$PROJ_DIR$\Debug\Obj\main.o</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_cmu.pbi</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_can.pbi</file>
- <file>$PROJ_DIR$\Startup\73x_init.s</file>
- <file>$PROJ_DIR$\str73x_lib\source\73x_adc.c</file>
- <file>$PROJ_DIR$\str73x_lib\source\73x_lib.c</file>
- <file>$PROJ_DIR$\str73x_lib\include\73x_cmu.h</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_prccu.o</file>
- <file>$PROJ_DIR$\str73x_lib\include\73x_type.h</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_cfg.pbi</file>
- <file>$PROJ_DIR$\str73x_lib\include\73x_can.h</file>
- <file>$TOOLKIT_DIR$\inc\DLib_Defaults.h</file>
- <file>$PROJ_DIR$\str73x_lib\include\73x_adc.h</file>
<file>$PROJ_DIR$\Debug\Obj\73x_can.o</file>
<file>$PROJ_DIR$\str73x_lib\include\73x_lib.h</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_it.o</file>
- <file>$PROJ_DIR$\main.c</file>
- <file>$PROJ_DIR$\73x_lcd.h</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_eic.o</file>
- <file>$PROJ_DIR$\str73x_lib\include\73x_eic.h</file>
- <file>$TOOLKIT_DIR$\lib\rt4t_al.a</file>
- <file>$TOOLKIT_DIR$\inc\xencoding_limits.h</file>
- <file>$PROJ_DIR$\73x_it.c</file>
- <file>$PROJ_DIR$\str73x_lib\source\73x_cmu.c</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_vect.o</file>
- <file>$PROJ_DIR$\str73x_lib\source\73x_gpio.c</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_rtc.pbi</file>
+ <file>$TOOLKIT_DIR$\inc\ycheck.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\cantest.pbd</file>
<file>$PROJ_DIR$\Debug\Obj\73x_lcd.pbi</file>
<file>$PROJ_DIR$\Debug\Obj\main.pbi</file>
- <file>$TOOLKIT_DIR$\inc\ycheck.h</file>
- <file>$PROJ_DIR$\Debug\Obj\cantest.pbd</file>
<file>$TOOLKIT_DIR$\lib\shs_l.a</file>
<file>$PROJ_DIR$\Debug\Obj\73x_adc.pbi</file>
- <file>$PROJ_DIR$\str73x_lib\source\73x_eic.c</file>
+ <file>$TOOLKIT_DIR$\inc\DLib_Config_Normal.h</file>
+ <file>$PROJ_DIR$\str73x_lib\include\73x_map.h</file>
+ <file>$PROJ_DIR$\str73x_lib\include\73x_prccu.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_adc.o</file>
<file>$TOOLKIT_DIR$\lib\dl4t_tl_in.a</file>
<file>$TOOLKIT_DIR$\inc\DLib_Product.h</file>
- <file>$TOOLKIT_DIR$\inc\DLib_Config_Normal.h</file>
- <file>$PROJ_DIR$\Startup\73x_vect.s</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_cmu.o</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_gpio.pbi</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_cfg.o</file>
- <file>$PROJ_DIR$\linker\STR73x_FLASH.icf</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_it.pbi</file>
+ <file>$PROJ_DIR$\Debug\Exe\cantest.out</file>
+ <file>$PROJ_DIR$\str73x_lib\include\73x_cfg.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_it.o</file>
+ <file>$PROJ_DIR$\str73x_lib\source\73x_adc.c</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_gpio.o</file>
+ <file>$PROJ_DIR$\str73x_lib\source\73x_cfg.c</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_lib.pbi</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_eic.pbi</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_lib.o</file>
+ <file>$TOOLKIT_DIR$\inc\xencoding_limits.h</file>
+ <file>$TOOLKIT_DIR$\lib\rt4t_al.a</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_rtc.pbi</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_rtc.o</file>
+ <file>$PROJ_DIR$\Debug\Obj\main.o</file>
+ <file>$PROJ_DIR$\str73x_lib\include\73x_adc.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_cmu.pbi</file>
+ <file>$TOOLKIT_DIR$\inc\DLib_Defaults.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_can.pbi</file>
+ <file>$TOOLKIT_DIR$\inc\yvals.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_init.o</file>
<file>$TOOLKIT_DIR$\inc\string.h</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_init.o</file>
- <file>$TOOLKIT_DIR$\inc\yvals.h</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_lib.o</file>
- <file>$PROJ_DIR$\str73x_lib\include\73x_map.h</file>
- <file>$PROJ_DIR$\str73x_lib\include\73x_prccu.h</file>
- <file>$PROJ_DIR$\str73x_lib\source\73x_can.c</file>
<file>$PROJ_DIR$\Debug\Obj\73x_lcd.o</file>
<file>$TOOLKIT_DIR$\inc\ysizet.h</file>
<file>$PROJ_DIR$\str73x_lib\include\73x_rtc.h</file>
<file>$TOOLKIT_DIR$\inc\DLib_Threads.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_prccu.pbi</file>
+ <file>$PROJ_DIR$\linker\STR73x_FLASH.icf</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_cmu.o</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_cfg.o</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_gpio.pbi</file>
+ <file>$PROJ_DIR$\str73x_lib\include\73x_cmu.h</file>
+ <file>$PROJ_DIR$\str73x_lib\include\73x_type.h</file>
+ <file>$TOOLKIT_DIR$\inc\DLib_Product_string.h</file>
+ <file>$PROJ_DIR$\str73x_lib\include\73x_gpio.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_vect.o</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_eic.o</file>
+ <file>$PROJ_DIR$\str73x_lib\include\73x_eic.h</file>
+ <file>$PROJ_DIR$\str73x_lib\source\73x_lib.c</file>
+ <file>$PROJ_DIR$\str73x_lib\source\73x_prccu.c</file>
<file>$PROJ_DIR$\str73x_lib\source\73x_rtc.c</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_prccu.pbi</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_gpio.o</file>
- <file>$PROJ_DIR$\str73x_lib\include\73x_cfg.h</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_adc.o</file>
+ <file>$PROJ_DIR$\Startup\73x_init.s</file>
+ <file>$PROJ_DIR$\73x_it.c</file>
+ <file>$PROJ_DIR$\Startup\73x_vect.s</file>
+ <file>$PROJ_DIR$\73x_conf.h</file>
<file>$PROJ_DIR$\73x_lcd.c</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_it.pbi</file>
- <file>$PROJ_DIR$\Debug\Exe\cantest.out</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_lib.pbi</file>
- <file>$PROJ_DIR$\73x_conf.h</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_eic.pbi</file>
+ <file>$PROJ_DIR$\73x_lcd.h</file>
+ <file>$PROJ_DIR$\main.c</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_prccu.o</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_cfg.pbi</file>
+ <file>$PROJ_DIR$\str73x_lib\include\73x_can.h</file>
+ <file>$PROJ_DIR$\str73x_lib\source\73x_eic.c</file>
+ <file>$PROJ_DIR$\str73x_lib\source\73x_gpio.c</file>
+ <file>$PROJ_DIR$\str73x_lib\source\73x_can.c</file>
+ <file>$PROJ_DIR$\str73x_lib\source\73x_cmu.c</file>
</outputs>
<file>
- <name>$PROJ_DIR$\str73x_lib\source\73x_cfg.c</name>
+ <name>$PROJ_DIR$\Debug\Obj\cantest.pbd</name>
+ <inputs>
+ <tool>
+ <name>BILINK</name>
+ <file> 7 32 63 30 22 44 14 4 21 40 26 5</file>
+ </tool>
+ </inputs>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\Debug\Exe\cantest.out</name>
+ <inputs>
+ <tool>
+ <name>ILINK</name>
+ <file> 41 11 0 43 42 50 19 34 17 36 23 62 27 49 28 6 25 12</file>
+ </tool>
+ </inputs>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\str73x_lib\source\73x_adc.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 14</file>
+ <file> 7</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 45</file>
+ <file> 11</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 61 51 67 13</file>
+ <file> 29 9 58 46 16</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 61 51 67 13</file>
+ <file> 29 9 58 46 16</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\str73x_lib\source\73x_prccu.c</name>
+ <name>$PROJ_DIR$\str73x_lib\source\73x_cfg.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 59</file>
+ <file> 63</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 12</file>
+ <file> 43</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 52 51 67 13 11</file>
+ <file> 16 9 58 46</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 52 51 67 13 11</file>
+ <file> 16 9 58 46</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\Startup\73x_init.s</name>
+ <name>[ROOT_NODE]</name>
<outputs>
<tool>
- <name>AARM</name>
- <file> 48</file>
+ <name>ILINK</name>
+ <file> 15</file>
</tool>
</outputs>
</file>
<file>
- <name>$PROJ_DIR$\str73x_lib\source\73x_adc.c</name>
+ <name>$PROJ_DIR$\str73x_lib\source\73x_lib.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 37</file>
+ <file> 21</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 62</file>
+ <file> 23</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 17 51 67 13 61</file>
+ <file> 1 9 58 46 10 16 64 48 45 51</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 17 51 67 13 61</file>
+ <file> 1 9 58 46 10 16 64 48 45 51</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\str73x_lib\source\73x_lib.c</name>
+ <name>$PROJ_DIR$\str73x_lib\source\73x_prccu.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 66</file>
+ <file> 40</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 50</file>
+ <file> 62</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 19 51 67 13 52 61 15 1 11 24</file>
+ <file> 10 9 58 46 45</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 19 51 67 13 52 61 15 1 11 24</file>
+ <file> 10 9 58 46 45</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\main.c</name>
+ <name>$PROJ_DIR$\str73x_lib\source\73x_rtc.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 33</file>
+ <file> 26</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 5</file>
+ <file> 27</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 19 51 67 13 52 61 15 1 11 24</file>
+ <file> 38 9 58 46 16</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 19 51 67 13 52 61 15 1 11 24</file>
+ <file> 38 9 58 46 16</file>
</tool>
</inputs>
</file>
<file>
+ <name>$PROJ_DIR$\Startup\73x_init.s</name>
+ <outputs>
+ <tool>
+ <name>AARM</name>
+ <file> 34</file>
+ </tool>
+ </outputs>
+ </file>
+ <file>
<name>$PROJ_DIR$\73x_it.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 64</file>
+ <file> 14</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 20</file>
+ <file> 17</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 19 51 67 13 52 61 15 1 11 24</file>
+ <file> 1 9 58 46 10 16 64 48 45 51</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 19 51 67 13 52 61 15 1 11 24</file>
+ <file> 1 9 58 46 10 16 64 48 45 51</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\str73x_lib\source\73x_cmu.c</name>
+ <name>$PROJ_DIR$\Startup\73x_vect.s</name>
<outputs>
<tool>
+ <name>AARM</name>
+ <file> 49</file>
+ </tool>
+ </outputs>
+ </file>
+ <file>
+ <name>$PROJ_DIR$\73x_lcd.c</name>
+ <outputs>
+ <tool>
<name>BICOMP</name>
- <file> 6</file>
+ <file> 4</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 43</file>
+ <file> 36</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 11 51 67 13</file>
+ <file> 60 1 9 58 46 10 16 64 48 45 51 35 2 33 31 13 24 39 37 47</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 11 51 67 13</file>
+ <file> 60 1 9 58 46 10 16 64 48 45 51 35 2 33 31 8 13 24 39 37 47</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\str73x_lib\source\73x_gpio.c</name>
+ <name>$PROJ_DIR$\main.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 44</file>
+ <file> 5</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 60</file>
+ <file> 28</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 1 51 67 13 61</file>
+ <file> 1 9 58 46 10 16 64 48 45 51</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 1 51 67 13 61</file>
+ <file> 1 9 58 46 10 16 64 48 45 51</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\Debug\Obj\cantest.pbd</name>
- <inputs>
- <tool>
- <name>BILINK</name>
- <file> 37 7 14 6 68 44 64 32 66 59 31 33</file>
- </tool>
- </inputs>
- </file>
- <file>
<name>$PROJ_DIR$\str73x_lib\source\73x_eic.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 68</file>
+ <file> 22</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 23</file>
+ <file> 50</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 24 51 67 13 61</file>
+ <file> 51 9 58 46 16</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 24 51 67 13 61</file>
+ <file> 51 9 58 46 16</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\Startup\73x_vect.s</name>
+ <name>$PROJ_DIR$\str73x_lib\source\73x_gpio.c</name>
<outputs>
<tool>
- <name>AARM</name>
- <file> 29</file>
- </tool>
- </outputs>
- </file>
- <file>
- <name>$PROJ_DIR$\str73x_lib\source\73x_can.c</name>
- <outputs>
- <tool>
<name>BICOMP</name>
- <file> 7</file>
+ <file> 44</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 18</file>
+ <file> 19</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 15 51 67 13 61</file>
+ <file> 48 9 58 46 16</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 15 51 67 13 61</file>
+ <file> 48 9 58 46 16</file>
</tool>
</inputs>
</file>
<file>
- <name>[ROOT_NODE]</name>
+ <name>$PROJ_DIR$\str73x_lib\source\73x_can.c</name>
<outputs>
<tool>
- <name>ILINK</name>
- <file> 65</file>
- </tool>
- </outputs>
- </file>
- <file>
- <name>$PROJ_DIR$\str73x_lib\source\73x_rtc.c</name>
- <outputs>
- <tool>
<name>BICOMP</name>
- <file> 31</file>
+ <file> 32</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 4</file>
+ <file> 0</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 56 51 67 13 61</file>
+ <file> 64 9 58 46 16</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 56 51 67 13 61</file>
+ <file> 64 9 58 46 16</file>
</tool>
</inputs>
</file>
<file>
- <name>$PROJ_DIR$\73x_lcd.c</name>
+ <name>$PROJ_DIR$\str73x_lib\source\73x_cmu.c</name>
<outputs>
<tool>
<name>BICOMP</name>
- <file> 32</file>
+ <file> 30</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 54</file>
+ <file> 42</file>
</tool>
</outputs>
<inputs>
<tool>
<name>BICOMP</name>
- <file> 22 19 51 67 13 52 61 15 1 11 24 47 34 49 16 40 26 57 55 2</file>
+ <file> 45 9 58 46</file>
</tool>
<tool>
<name>ICCARM</name>
- <file> 22 19 51 67 13 52 61 15 1 11 24 47 34 49 16 41 40 26 57 55 2</file>
+ <file> 45 9 58 46</file>
</tool>
</inputs>
</file>
- <file>
- <name>$PROJ_DIR$\Debug\Exe\cantest.out</name>
- <inputs>
- <tool>
- <name>ILINK</name>
- <file> 46 62 18 45 43 23 60 48 20 54 50 12 4 29 5 36 25 39</file>
- </tool>
- </inputs>
- </file>
</configuration>
<configuration>
<name>Release</name>
Modified: trunk/firmware/arm/str/cantest_str73x_iar/main.c
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_iar/main.c 2008-02-25 14:25:56 UTC (rev 860)
+++ trunk/firmware/arm/str/cantest_str73x_iar/main.c 2008-02-25 16:03:59 UTC (rev 861)
@@ -100,8 +100,8 @@
void wait(void)
{
- u32 i;
- for (i=100000L; i!=0 ; i-- ) {}
+ u32 i;
+ for ( i=100000L; i!=0 ; i-- ) {}
}
////////////////////////////////////////////////////////////////////////////////
@@ -150,6 +150,7 @@
CAN_Init( CAN0, &CANInit );
// configure the message objects
+ CAN_EnterInitMode( CAN0, CAN_CR_CCE );
CAN_InvalidateAllMsgObj( CAN0 );
CAN_SetTxMsgObj( CAN0, CAN0_TX_MSGOBJ, CAN_STD_ID );
CAN_SetRxMsgObj( CAN0,
@@ -158,7 +159,8 @@
0,
CAN_LAST_STD_ID,
TRUE );
-
+ CAN_LeaveInitMode( CAN0 );
+
// send a pre-defined data frame
CAN_SendMessage(CAN0, CAN0_TX_MSGOBJ, &TxCan0Msg[0] );
@@ -207,15 +209,16 @@
CAN0Init.CAN_Bitrate = CAN_BITRATE_500K;
// initialize the interrupt controller
- EIC_IRQChannelConfig(CAN0_IRQChannel, ENABLE);
- EIC_IRQChannelPriorityConfig(CAN0_IRQChannel, 1);
- EIC_IRQCmd(ENABLE);
+ EIC_IRQChannelConfig( CAN0_IRQChannel, ENABLE );
+ EIC_IRQChannelPriorityConfig( CAN0_IRQChannel, 1 );
+ EIC_IRQCmd( ENABLE );
// initialize the CAN at a standard bitrate, interrupts enabled
- CAN_Init(CAN0, &CAN0Init);
+ CAN_Init( CAN0, &CAN0Init );
// configure the message objects
- CAN_InvalidateAllMsgObj(CAN0);
+ CAN_EnterInitMode( CAN0, CAN_CR_CCE );
+ CAN_InvalidateAllMsgObj( CAN0 );
CAN_SetTxMsgObj( CAN0, CAN0_TX_MSGOBJ, CAN_EXT_ID );
CAN_SetRxMsgObj( CAN0,
CAN0_RX_MSGOBJ,
@@ -223,7 +226,8 @@
0,
CAN_LAST_EXT_ID,
TRUE );
-
+ CAN_LeaveInitMode( CAN0 );
+
// send a pre-defined data frame
CAN_SendMessage( CAN0, CAN0_TX_MSGOBJ, &TxCan0Msg[1] );
@@ -232,9 +236,6 @@
GPIO_BitWrite( GPIO0, LD7, Bit_SET ); // LED7
- // switch back into Normal mode
- CAN_LeaveTestMode( CAN0 );
-
// disable interrupts globally
EIC_IRQCmd( DISABLE );
}
@@ -292,7 +293,7 @@
while ( 1 ) {
CAN0_Demo_Polling();
- //CAN0_Demo_Interrupt();
+ CAN0_Demo_Interrupt();
}
}//main
Modified: trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.dni
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.dni 2008-02-25 14:25:56 UTC (rev 860)
+++ trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.dni 2008-02-25 16:03:59 UTC (rev 861)
@@ -2,8 +2,8 @@
Enabled=_ 0
[JLinkDriver]
WatchCond=_ 0
-Watch0=_ 0 "" 0 "" 0 "" 0 "" 0 0 0 0
-Watch1=_ 0 "" 0 "" 0 "" 0 "" 0 0 0 0
+Watch0=_ 0 "0x00000000" 0 "0x00000000" 0 "0x00000000" 0 "0x00000000" 0 0 0 0
+Watch1=_ 0 "0x00000000" 0 "0x00000000" 0 "0x00000000" 0 "0x00000000" 0 0 0 0
[DisAssemblyWindow]
NumStates=_ 1
State 1=_ 1
@@ -28,6 +28,10 @@
TypeViolation=1
UnspecRange=1
ActionState=1
+[Disassemble mode]
+mode=0
+[Breakpoints]
+Count=0
[Log file]
LoggingEnabled=_ 0
LogFile=_ ""
@@ -35,10 +39,6 @@
[TermIOLog]
LoggingEnabled=_ 0
LogFile=_ ""
-[Disassemble mode]
-mode=0
-[Breakpoints]
-Count=0
[TraceHelper]
Enabled=0
ShowSource=1
Modified: trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.wsdt
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.wsdt 2008-02-25 14:25:56 UTC (rev 860)
+++ trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.wsdt 2008-02-25 16:03:59 UTC (rev 861)
@@ -25,7 +25,7 @@
<Windows>
- <Wnd1>
+ <Wnd0>
<Tabs>
<Tab>
<Identity>TabID-32711-27921</Identity>
@@ -37,7 +37,7 @@
</Tab>
</Tabs>
- <SelectedTab>0</SelectedTab></Wnd1><Wnd3>
+ <SelectedTab>0</SelectedTab></Wnd0><Wnd2>
<Tabs>
<Tab>
<Identity>TabID-18303-27987</Identity>
@@ -47,20 +47,20 @@
</Tab>
<Tab><Identity>TabID-7248-23799</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab></Tabs>
- <SelectedTab>0</SelectedTab></Wnd3></Windows>
+ <SelectedTab>0</SelectedTab></Wnd2></Windows>
<Editor>
- <Pane><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\main.c</Filename><XPos>0</XPos><YPos>235</YPos><SelStart>7293</SelStart><SelEnd>7293</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\str73x_lib\source\73x_rtc.c</Filename><XPos>0</XPos><YPos>35</YPos><SelStart>3569</SelStart><SelEnd>3569</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\str73x_lib\source\73x_can.c</Filename><XPos>0</XPos><YPos>455</YPos><SelStart>22501</SelStart><SelEnd>22501</SelEnd></Tab><ActiveTab>2</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\Startup\73x_vect.s</Filename><XPos>0</XPos><YPos>315</YPos><SelStart>13061</SelStart><SelEnd>13061</SelEnd></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>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\main.c</Filename><XPos>0</XPos><YPos>208</YPos><SelStart>7003</SelStart><SelEnd>7003</SelEnd></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\str73x_lib\source\73x_rtc.c</Filename><XPos>0</XPos><YPos>35</YPos><SelStart>3569</SelStart><SelEnd>3569</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\str73x_lib\source\73x_can.c</Filename><XPos>0</XPos><YPos>42</YPos><SelStart>3302</SelStart><SelEnd>3312</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\Startup\73x_vect.s</Filename><XPos>0</XPos><YPos>315</YPos><SelStart>13197</SelStart><SelEnd>13197</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>D:\development\vscp\firmware\arm\str\cantest_str73x_iar\73x_it.c</Filename><XPos>0</XPos><YPos>653</YPos><SelStart>23341</SelStart><SelEnd>23341</SelEnd></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
- <Top><Row0><Sizes><Toolbar-01353cd8><key>iaridepm.enu1</key></Toolbar-01353cd8></Sizes></Row0><Row1><Sizes/></Row1></Top><Left><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>446</Bottom><Right>282</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>277344</sizeVertCX><sizeVertCY>651163</sizeVertCY></Rect></Wnd1></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1026</Right><x>-2</x><y>-2</y><xscreen>1028</xscreen><yscreen>200</yscreen><sizeHorzCX>1003906</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>290698</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
+ <Top><Row0><Sizes><Toolbar-01353a88><key>iaridepm.enu1</key></Toolbar-01353a88></Sizes></Row0><Row1><Sizes/></Row1></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>446</Bottom><Right>282</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>195313</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>277344</sizeVertCX><sizeVertCY>651163</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1026</Right><x>-2</x><y>-2</y><xscreen>1028</xscreen><yscreen>200</yscreen><sizeHorzCX>1003906</sizeHorzCX><sizeHorzCY>290698</sizeHorzCY><sizeVertCX>195313</sizeVertCX><sizeVertCY>290698</sizeVertCY></Rect></Wnd2></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Workspace>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ak...@us...> - 2008-02-25 14:25:59
|
Revision: 860
http://can.svn.sourceforge.net/can/?rev=860&view=rev
Author: akhe
Date: 2008-02-25 06:25:56 -0800 (Mon, 25 Feb 2008)
Log Message:
-----------
Added Embedded Systems Academy's CAN samples for the NXP LPC ARM uP
Added Paths:
-----------
trunk/firmware/arm/lpc/LPC2_CANAll_V110/
trunk/firmware/arm/lpc/LPC2_CANAll_V110/Flash/
trunk/firmware/arm/lpc/LPC2_CANAll_V110/Flash/LPC_CANAll.elf
trunk/firmware/arm/lpc/LPC2_CANAll_V110/Flash/LPC_CANAll.hex
trunk/firmware/arm/lpc/LPC2_CANAll_V110/Flash.ld
trunk/firmware/arm/lpc/LPC2_CANAll_V110/LPC21XX.H
trunk/firmware/arm/lpc/LPC2_CANAll_V110/LPC_CANAll.Opt
trunk/firmware/arm/lpc/LPC2_CANAll_V110/LPC_CANAll.Uv2
trunk/firmware/arm/lpc/LPC2_CANAll_V110/LPC_CANAll.c
trunk/firmware/arm/lpc/LPC2_CANAll_V110/LPC_CANAll.h
trunk/firmware/arm/lpc/LPC2_CANAll_V110/Startup.s
trunk/firmware/arm/lpc/LPC2_CANAll_V110/main_CANAll.c
trunk/firmware/arm/lpc/LPC2_CANAll_V110/readme.txt
trunk/firmware/arm/lpc/LPC2_CANBlinky_V130/
trunk/firmware/arm/lpc/LPC2_CANBlinky_V130/Abstract.txt
trunk/firmware/arm/lpc/LPC2_CANBlinky_V130/BlinkyCAN.Opt
trunk/firmware/arm/lpc/LPC2_CANBlinky_V130/BlinkyCAN.Uv2
trunk/firmware/arm/lpc/LPC2_CANBlinky_V130/BlinkyCAN.c
trunk/firmware/arm/lpc/LPC2_CANBlinky_V130/Flash/
trunk/firmware/arm/lpc/LPC2_CANBlinky_V130/Flash/BlinkyCAN.elf
trunk/firmware/arm/lpc/LPC2_CANBlinky_V130/Flash/BlinkyCAN.hex
trunk/firmware/arm/lpc/LPC2_CANBlinky_V130/Flash.ld
trunk/firmware/arm/lpc/LPC2_CANBlinky_V130/LPC21XX.H
trunk/firmware/arm/lpc/LPC2_CANBlinky_V130/Startup.s
trunk/firmware/arm/lpc/LPC2_CANBlinky_V130/Timer.h
trunk/firmware/arm/lpc/LPC2_CANBlinky_V130/mco.c
trunk/firmware/arm/lpc/LPC2_CANBlinky_V130/mco.h
trunk/firmware/arm/lpc/LPC2_CANBlinky_V130/mcohw.h
trunk/firmware/arm/lpc/LPC2_CANBlinky_V130/mcohw_LPC2.c
trunk/firmware/arm/lpc/LPC2_CANBlinky_V130/user_LPC2.c
trunk/firmware/arm/lpc/LPC2_CANFull_V110/
trunk/firmware/arm/lpc/LPC2_CANFull_V110/Flash/
trunk/firmware/arm/lpc/LPC2_CANFull_V110/Flash/LPC_FullCAN_SW.elf
trunk/firmware/arm/lpc/LPC2_CANFull_V110/Flash/LPC_FullCAN_SW.hex
trunk/firmware/arm/lpc/LPC2_CANFull_V110/Flash.ld
trunk/firmware/arm/lpc/LPC2_CANFull_V110/LPC21XX.H
trunk/firmware/arm/lpc/LPC2_CANFull_V110/LPC_FullCAN_SW.Opt
trunk/firmware/arm/lpc/LPC2_CANFull_V110/LPC_FullCAN_SW.Uv2
trunk/firmware/arm/lpc/LPC2_CANFull_V110/LPC_FullCAN_SW.c
trunk/firmware/arm/lpc/LPC2_CANFull_V110/LPC_FullCAN_SW.h
trunk/firmware/arm/lpc/LPC2_CANFull_V110/Startup.s
trunk/firmware/arm/lpc/LPC2_CANFull_V110/main_FullCAN.c
trunk/firmware/arm/lpc/LPC2_CANFull_V110/readme.txt
Added: trunk/firmware/arm/lpc/LPC2_CANAll_V110/Flash/LPC_CANAll.elf
===================================================================
(Binary files differ)
Property changes on: trunk/firmware/arm/lpc/LPC2_CANAll_V110/Flash/LPC_CANAll.elf
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/firmware/arm/lpc/LPC2_CANAll_V110/Flash/LPC_CANAll.hex
===================================================================
--- trunk/firmware/arm/lpc/LPC2_CANAll_V110/Flash/LPC_CANAll.hex (rev 0)
+++ trunk/firmware/arm/lpc/LPC2_CANAll_V110/Flash/LPC_CANAll.hex 2008-02-25 14:25:56 UTC (rev 860)
@@ -0,0 +1,232 @@
+:1000000018F09FE518F09FE518F09FE518F09FE5C0
+:1000100018F09FE50000A0E1F0FF1FE518F09FE554
+:1000200058000000400000004400000048000000AC
+:100030004C000000000000005000000054000000D0
+:10004000FEFFFFEAFEFFFFEAFEFFFFEAFEFFFFEA18
+:10005000FEFFFFEAFEFFFFEADC009FE5AA10A0E337
+:100060005520A0E32430A0E3043080E50130A0E374
+:10007000003080E50C1080E50C2080E5083090E52C
+:10008000013B13E2FCFFFF0A0330A0E3003080E5F0
+:100090000C1080E50C2080E5A0009FE50410A0E393
+:1000A000041080E50210A0E3001080E590009FE5B9
+:1000B000DBF021E300D0A0E1040040E2D7F021E32F
+:1000C00000D0A0E1040040E2D1F021E300D0A0E1A3
+:1000D000040040E2D2F021E300D0A0E1800040E241
+:1000E000D3F021E300D0A0E1040040E210F021E3CE
+:1000F00000D0A0E101AB4DE248109FE548209FE50C
+:1001000048309FE5030052E104009134040082343A
+:10011000FBFFFF3A0000A0E334109FE534209FE589
+:10012000020051E104008134FCFFFF3A04E08FE259
+:1001300024009FE510FF2FE1FEFFFFEA80C01FE0D3
+:1001400000C01FE000400040640E000000000040BE
+:10015000000000400000004044030040E80B0000A5
+:100160000DC0A0E100D82DE904B04CE220D04DE252
+:100170000030A0E114200BE5BE304BE1B0114BE1A3
+:10018000B0315BE10F0053E30200009A0030A0E3BE
+:1001900024300BE5A40000EABE305BE1000053E32D
+:1001A0000300000ABE305BE1020053E30000008A56
+:1001B000020000EA0030A0E324300BE59A0000EAD8
+:1001C0006C129FE5BE305BE10120E0E38330A0E1EB
+:1001D000013083E0022083E00030A0E3B030C2E1D0
+:1001E00050129FE5BE305BE10120E0E38330A0E1E7
+:1001F000013083E0022083E00030A0E3B030C2E1B0
+:10020000BE305BE128300BE528301BE5010053E3ED
+:100210000300000A28301BE5020053E30A00000A2D
+:10022000130000EA4E22A0E30B2982E24E32A0E343
+:100230000B3983E2003093E5013783E3003082E538
+:100240000030A0E320300BE50C0000EA4E22A0E3D2
+:100250000B2982E24E32A0E30B3983E2003093E5B2
+:10026000053983E3003082E5013AA0E320300BE555
+:10027000020000EA0030A0E324300BE56A0000EA47
+:100280000E32A0E30F3983E20220A0E3002083E5D1
+:1002900020301BE50331A0E10E3283E2113983E205
+:1002A00018300BE518201BE50130A0E3003082E593
+:1002B00020301BE50331A0E10E3283E2113983E2E5
+:1002C000103083E218300BE518201BE50030A0E366
+:1002D000003082E520301BE50331A0E18E3283E25D
+:1002E000113983E218300BE518201BE50030A0E33C
+:1002F000003082E520301BE50331A0E10E3283E2BD
+:10030000113983E2143083E218300BE518201BE525
+:1003100014301BE5003082E52233A0E3C339A0E1AD
+:1003200018300BE5B0315BE10321A0E118301BE58B
+:10033000023083E018300BE50932A0E3C339A0E1B5
+:100340001C300BE5B0315BE10321A0E11C301BE563
+:10035000023083E01C300BE5BE305BE12C300BE556
+:100360002C301BE5010053E30300000A2C301BE591
+:10037000020053E30B00000A150000EA18201BE5F9
+:10038000B4309FE5003082E51C201BE53A30A0E345
+:10039000003082E5FE3EE0E30F3043E20123A0E3BC
+:1003A000002083E50D0000EA18201BE58C309FE556
+:1003B000003082E51C201BE53B30A0E3003082E5E5
+:1003C000FE3EE0E30F3043E20223A0E3002083E59A
+:1003D000020000EA0030A0E324300BE5120000EA3E
+:1003E00020301BE50331A0E10E3283E2113983E2B4
+:1003F000103083E218300BE518201BE50130A0E334
+:10040000003082E520301BE50331A0E10E3283E2AB
+:10041000113983E218300BE518201BE50030A0E30A
+:10042000003082E50130A0E324300BE524001BE519
+:1004300000A81BE9200300403003004078080000BA
+:100440008C0900000DC0A0E100D82DE904B04CE2F9
+:100450000CD04DE20030A0E1BE304BE1BE305BE19C
+:100460000F0053E30200009A0030A0E318300BE5C0
+:100470001B0000EA2233A0E3C339A0E114300BE5EE
+:10048000BE305BE10321A0E114301BE5023083E0C4
+:1004900014300BE514201BE54C309FE5003082E55D
+:1004A0000932A0E3C339A0E114300BE5BE305BE1B3
+:1004B0000321A0E114301BE5023083E014300BE58A
+:1004C00014201BE53330A0E3003082E5FE3EE0E37C
+:1004D0000F3043E20227A0E3002083E50130A0E3D0
+:1004E00018300BE518001BE500A81BE960080000A8
+:1004F0000DC0A0E100D82DE904B04CE21CD04DE2C3
+:100500000030A0E114100BE5BE304BE1BE305BE1E2
+:10051000000053E30300000ABE305BE1020053E336
+:100520000000008A020000EA0030A0E324300BE55E
+:10053000520000EABE305BE128300BE528301BE5B5
+:10054000010053E30300000A28301BE5020053E3D7
+:100550000300000A050000EA0030A0E320300BE5AC
+:10056000050000EA013AA0E320300BE5020000EAB2
+:100570000030A0E324300BE5400000EA20301BE50A
+:100580000331A0E10E3283E2113983E21C3083E2B1
+:1005900018300BE518301BE5003093E5043003E21A
+:1005A000000053E30200001A0030A0E324300BE502
+:1005B000320000EA20301BE50331A0E10E3283E275
+:1005C000113983E2303083E218300BE518201BE547
+:1005D00014301BE5003093E5FF35C3E30336C3E376
+:1005E0002338A0E10338A0E1003082E518301BE594
+:1005F000043083E218300BE518201BE514301BE5AE
+:10060000043093E5003082E514301BE5083083E2C6
+:100610001C300BE518301BE5043083E218300BE585
+:1006200018201BE51C301BE5003093E5003082E507
+:100630001C301BE5043083E21C300BE518301BE551
+:10064000043083E218300BE518201BE51C301BE555
+:10065000003093E5003082E520301BE50331A0E156
+:100660004E3283E2113983E218300BE518201BE586
+:100670003030A0E3003082E50130A0E324300BE508
+:1006800024001BE500A81BE90DC0A0E100D82DE95E
+:1006900004B04CE214D04DE20030A0E114100BE5A0
+:1006A000BE304BE1BE305BE1000053E30300000AC3
+:1006B000BE305BE1020053E30000008A020000EA62
+:1006C0000030A0E320300BE55F0000EABE305BE1C4
+:1006D000013043E2BE304BE174219FE5BE305BE167
+:1006E0008330A0E1021083E068219FE5BE305BE12A
+:1006F0008330A0E1023083E0F020D1E1F030D3E19B
+:10070000030052E10200001A0030A0E320300BE5A4
+:100710004D0000EABE205BE10230A0E10331A0E120
+:10072000023083E00321A0E1023083E024119FE541
+:10073000BE205BE18220A0E1012082E0F020D2E136
+:10074000023083E00322A0E10C319FE5033082E018
+:1007500018300BE514301BE51C300BE51C201BE5A5
+:1007600018301BE5003093E5003082E518301BE5BA
+:10077000043083E218300BE51C301BE5043083E2C3
+:100780001C300BE51C201BE518301BE5003093E501
+:10079000003082E518301BE5043083E218300BE5A9
+:1007A0001C301BE5043083E21C300BE51C201BE5EC
+:1007B00018301BE5003093E5003082E518301BE56A
+:1007C000043083E218300BE51C301BE5043083E273
+:1007D0001C300BE51C201BE518301BE5003093E5B1
+:1007E000003082E56C209FE5BE305BE18330A0E104
+:1007F000021083E05C209FE5BE305BE18330A0E126
+:10080000023083E0B030D3E1013083E2B030C1E1A7
+:1008100040209FE5BE305BE18330A0E1023083E001
+:10082000F030D3E1180053E3050000DA24209FE5FF
+:10083000BE305BE18330A0E1022083E00030A0E322
+:10084000B030C2E10130A0E320300BE520001BE511
+:1008500000A81BE9200300403003004000000040D6
+:1008600004C02DE50DC0A0E100D82DE904B04CE294
+:100870000000A0E1FEFFFFEA04C02DE50DC0A0E1ED
+:100880000CD82DE904B04CE204D04DE2F0309FE5E5
+:10089000F030D3E10322A0E1E8309FE5023083E0AD
+:1008A0001C300BE51C201BE50E32A0E3113983E25E
+:1008B000203083E2003093E5003082E51C301BE5F8
+:1008C000043083E21C300BE51C201BE50E32A0E354
+:1008D000113983E2243083E2003093E5003082E571
+:1008E0001C301BE5043083E21C300BE51C201BE5AB
+:1008F0000E32A0E3113983E2283083E2003093E521
+:10090000003082E51C301BE5043083E21C300BE52F
+:100910001C201BE50E32A0E3113983E22C3083E268
+:10092000003093E5003082E554209FE550309FE58C
+:10093000B030D3E1013083E2B030C2E140309FE516
+:10094000F030D3E1180053E3020000DA30309FE5C5
+:100950000020A0E3B020C3E14E32A0E3113983E2CE
+:100960000420A0E3002083E53F3DE0E30F3043E2B5
+:100970000020E0E3002083E50C681BE90010BDE8DF
+:1009800004F05EE2200300400000004004C02DE5BA
+:100990000DC0A0E10CD82DE904B04CE204D04DE22A
+:1009A000F0309FE5F230D3E10322A0E1E8309FE58B
+:1009B000033082E01C300BE51C201BE50E32A0E367
+:1009C000123983E2203083E2003093E5003082E583
+:1009D0001C301BE5043083E21C300BE51C201BE5BA
+:1009E0000E32A0E3123983E2243083E2003093E533
+:1009F000003082E51C301BE5043083E21C300BE53F
+:100A00001C201BE50E32A0E3123983E2283083E27A
+:100A1000003093E5003082E51C301BE5043083E2B2
+:100A20001C300BE51C201BE50E32A0E3123983E2DB
+:100A30002C3083E2003093E5003082E554209FE5BE
+:100A400050309FE5B230D3E1013083E2B230C2E1F1
+:100A500040309FE5F230D3E1180053E3020000DAA2
+:100A600030309FE50020A0E3B220C3E14E32A0E386
+:100A7000123983E20420A0E3002083E53F3DE0E358
+:100A80000F3043E20020E0E3002083E50C681BE91F
+:100A90000010BDE804F05EE2200300409001004039
+:100AA00004C02DE50DC0A0E100D82DE904B04CE252
+:100AB0000000A0E1FEFFFFEA04C02DE50DC0A0E1AB
+:100AC0000CD82DE904B04CE238209FE534309FE586
+:100AD000003093E5013083E2003082E50E32A0E37E
+:100AE000013983E20120A0E3002083E53F3DE0E3FC
+:100AF0000F3043E20020E0E3002083E50C681BE9AF
+:100B00000010BDE804F05EE2400300400DC0A0E12B
+:100B100000D82DE904B04CE20CD04DE210000BE5FA
+:100B200070309FE5003093E514300BE514201BE591
+:100B300010301BE5030052E10A00009A14301BE557
+:100B400010201BE5033062E0000053E3020000BA0E
+:100B50000130A0E318300BE50C0000EA0030A0E300
+:100B600018300BE5090000EA10301BE514201BE5E6
+:100B7000033062E0020153E30200009A0130A0E377
+:100B800018300BE5010000EA0030A0E318300BE557
+:100B900018001BE500A81BE9400300400DC0A0E1C0
+:100BA00000D82DE904B04CE204D04DE210000BE572
+:100BB0002C309FE510201BE5003093E5033082E0E8
+:100BC00010300BE510001BE5CFFFFFEB0030A0E17C
+:100BD0000338A0E14338A0E1000053E3F8FFFF0A27
+:100BE00000A81BE9400300400DC0A0E100D82DE99A
+:100BF00004B04CE214D04DE20132A0E320300BE50A
+:100C00000E32A0E37F3983E2013C83E20120A0E3BE
+:100C10000020C3E50E32A0E30A3983E2183083E2F4
+:100C2000FF28A0E3002083E5FE3EE0E30B3043E233
+:100C30000020E0E3002083E5FF3EE0E3033043E2F1
+:100C40000020A0E3002083E53F3DE0E30B3043E2DA
+:100C500004229FE5002083E50100A0E30010A0E34B
+:100C60000727A0E31D2082E23CFDFFEB0200A0E38A
+:100C70000110A0E30727A0E31D2082E237FDFFEB70
+:100C80000200A0E3EEFDFFEB0E22A0E3012982E2C9
+:100C9000182082E25D3DA0E32F3083E2003082E540
+:100CA0000E32A0E3013983E2143083E20320A0E393
+:100CB000002083E50139A0E34E3283E20120A0E366
+:100CC000002083E5EF3EE0E3033043E28C219FE523
+:100CD000002083E5DF3EE0E3033043E22420A0E38D
+:100CE000002083E5FE3EE0E30F3043E21020A0E366
+:100CF000002083E56400A0E3A7FFFFEB0231A0E33F
+:100D0000023783E21C300BE5123AA0E3D13F83E2C5
+:100D1000013083E218300BE50030A0E314300BE51E
+:100D20000030A0E310300BE51C304BE20200A0E3E2
+:100D30000310A0E1EDFDFFEB20301BE58330A0E1C7
+:100D400020300BE520301BE5020553E30100009A3B
+:100D50000138A0E320300BE50E32A0E30A3983E22C
+:100D6000143083E220201BE5002083E51C304BE299
+:100D70000100A0E30310A0E142FEFFEB0030A0E180
+:100D80000338A0E14338A0E1000053E31000000A5B
+:100D900018201BE5123AA0E3D13F83E2013083E241
+:100DA000030052E10A00001A1539A0E3323E83E243
+:100DB000013083E218300BE514301BE5013083E28B
+:100DC00014300BE51C304BE20100A0E30310A0E15E
+:100DD000C6FDFFEB1C304BE20200A0E30310A0E1D4
+:100DE00028FEFFEB0030A0E10338A0E14338A0E18A
+:100DF000000053E31000000A18201BE51539A0E39A
+:100E0000323E83E2013083E2030052E10A00001A1D
+:100E1000123AA0E3D13F83E2013083E218300BE5C0
+:100E200010301BE5013083E210300BE51C304BE243
+:100E30000200A0E30310A0E1ACFDFFEBFA0FA0E37A
+:100E400055FFFFEB0E32A0E30A3983E21C3083E248
+:100E500020201BE5002083E5B6FFFFEAA00A000082
+:040E6000B80A0000CC
+:00000001FF
Added: trunk/firmware/arm/lpc/LPC2_CANAll_V110/Flash.ld
===================================================================
--- trunk/firmware/arm/lpc/LPC2_CANAll_V110/Flash.ld (rev 0)
+++ trunk/firmware/arm/lpc/LPC2_CANAll_V110/Flash.ld 2008-02-25 14:25:56 UTC (rev 860)
@@ -0,0 +1,130 @@
+/***********************************************************************/
+/* This file is part of the ARM Compiler package */
+/* Copyright KEIL ELEKTRONIK GmbH 1992-2004 */
+/***********************************************************************/
+/* */
+/* TARGET.LD: Linker Script File */
+/* */
+/***********************************************************************/
+
+
+/*
+//*** <<< Use Configuration Wizard in Context Menu >>> ***
+*/
+
+
+/*
+// <h> Memory Configuration
+// <h> Code (Read Only)
+// <o> Start <0x0-0xFFFFFFFF>
+// <o1> Size <0x0-0xFFFFFFFF>
+// </h>
+// <h> Data (Read/Write)
+// <o2> Start <0x0-0xFFFFFFFF>
+// <o3> Size <0x0-0xFFFFFFFF>
+// </h>
+// </h>
+*/
+
+/* Memory Definitions */
+
+MEMORY
+{
+ CODE (rx) : ORIGIN = 0x00000000, LENGTH = 0x0003E000
+ DATA (rw) : ORIGIN = 0x40000000, LENGTH = 0x00004000
+}
+
+
+/* Section Definitions */
+
+SECTIONS
+{
+
+ /* first section is .text which is used for code */
+
+ .text :
+ {
+ *startup.o (.text) /* Startup code */
+ *(.text) /* remaining code */
+
+ *(.glue_7t) *(.glue_7)
+
+ } >CODE =0
+
+ . = ALIGN(4);
+
+ /* .rodata section which is used for read-only data (constants) */
+
+ .rodata :
+ {
+ *(.rodata)
+ } >CODE
+
+ . = ALIGN(4);
+
+ _etext = . ;
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+
+ .data : AT (_etext)
+ {
+ _data = . ;
+ *(.data)
+ SORT(CONSTRUCTORS)
+ } >DATA
+ . = ALIGN(4);
+
+ _edata = . ;
+ PROVIDE (edata = .);
+
+ /* .bss section which is used for uninitialized data */
+
+ .bss :
+ {
+ __bss_start = . ;
+ __bss_start__ = . ;
+ *(.bss)
+ *(COMMON)
+ } >DATA
+ . = ALIGN(4);
+ __bss_end__ = . ;
+ __bss_end__ = . ;
+
+ _end = .;
+ PROVIDE (end = .);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
Added: trunk/firmware/arm/lpc/LPC2_CANAll_V110/LPC21XX.H
===================================================================
--- trunk/firmware/arm/lpc/LPC2_CANAll_V110/LPC21XX.H (rev 0)
+++ trunk/firmware/arm/lpc/LPC2_CANAll_V110/LPC21XX.H 2008-02-25 14:25:56 UTC (rev 860)
@@ -0,0 +1,377 @@
+/***********************************************************************/
+/* This file is part of the uVision/ARM development tools */
+/* Copyright KEIL ELEKTRONIK GmbH 2002-2004 */
+/***********************************************************************/
+/* */
+/* LPC21XX.H: Header file for Philips LPC2114 / LPC2119 */
+/* LPC2124 / LPC2129 */
+/* LPC2194 */
+/* */
+/***********************************************************************/
+
+#ifndef __LPC21xx_H
+#define __LPC21xx_H
+
+/* Vectored Interrupt Controller (VIC) */
+#define VICIRQStatus (*((volatile unsigned long *) 0xFFFFF000))
+#define VICFIQStatus (*((volatile unsigned long *) 0xFFFFF004))
+#define VICRawIntr (*((volatile unsigned long *) 0xFFFFF008))
+#define VICIntSelect (*((volatile unsigned long *) 0xFFFFF00C))
+#define VICIntEnable (*((volatile unsigned long *) 0xFFFFF010))
+#define VICIntEnClr (*((volatile unsigned long *) 0xFFFFF014))
+#define VICSoftInt (*((volatile unsigned long *) 0xFFFFF018))
+#define VICSoftIntClr (*((volatile unsigned long *) 0xFFFFF01C))
+#define VICProtection (*((volatile unsigned long *) 0xFFFFF020))
+#define VICVectAddr (*((volatile unsigned long *) 0xFFFFF030))
+#define VICDefVectAddr (*((volatile unsigned long *) 0xFFFFF034))
+#define VICVectAddr0 (*((volatile unsigned long *) 0xFFFFF100))
+#define VICVectAddr1 (*((volatile unsigned long *) 0xFFFFF104))
+#define VICVectAddr2 (*((volatile unsigned long *) 0xFFFFF108))
+#define VICVectAddr3 (*((volatile unsigned long *) 0xFFFFF10C))
+#define VICVectAddr4 (*((volatile unsigned long *) 0xFFFFF110))
+#define VICVectAddr5 (*((volatile unsigned long *) 0xFFFFF114))
+#define VICVectAddr6 (*((volatile unsigned long *) 0xFFFFF118))
+#define VICVectAddr7 (*((volatile unsigned long *) 0xFFFFF11C))
+#define VICVectAddr8 (*((volatile unsigned long *) 0xFFFFF120))
+#define VICVectAddr9 (*((volatile unsigned long *) 0xFFFFF124))
+#define VICVectAddr10 (*((volatile unsigned long *) 0xFFFFF128))
+#define VICVectAddr11 (*((volatile unsigned long *) 0xFFFFF12C))
+#define VICVectAddr12 (*((volatile unsigned long *) 0xFFFFF130))
+#define VICVectAddr13 (*((volatile unsigned long *) 0xFFFFF134))
+#define VICVectAddr14 (*((volatile unsigned long *) 0xFFFFF138))
+#define VICVectAddr15 (*((volatile unsigned long *) 0xFFFFF13C))
+#define VICVectCntl0 (*((volatile unsigned long *) 0xFFFFF200))
+#define VICVectCntl1 (*((volatile unsigned long *) 0xFFFFF204))
+#define VICVectCntl2 (*((volatile unsigned long *) 0xFFFFF208))
+#define VICVectCntl3 (*((volatile unsigned long *) 0xFFFFF20C))
+#define VICVectCntl4 (*((volatile unsigned long *) 0xFFFFF210))
+#define VICVectCntl5 (*((volatile unsigned long *) 0xFFFFF214))
+#define VICVectCntl6 (*((volatile unsigned long *) 0xFFFFF218))
+#define VICVectCntl7 (*((volatile unsigned long *) 0xFFFFF21C))
+#define VICVectCntl8 (*((volatile unsigned long *) 0xFFFFF220))
+#define VICVectCntl9 (*((volatile unsigned long *) 0xFFFFF224))
+#define VICVectCntl10 (*((volatile unsigned long *) 0xFFFFF228))
+#define VICVectCntl11 (*((volatile unsigned long *) 0xFFFFF22C))
+#define VICVectCntl12 (*((volatile unsigned long *) 0xFFFFF230))
+#define VICVectCntl13 (*((volatile unsigned long *) 0xFFFFF234))
+#define VICVectCntl14 (*((volatile unsigned long *) 0xFFFFF238))
+#define VICVectCntl15 (*((volatile unsigned long *) 0xFFFFF23C))
+
+/* Pin Connect Block */
+#define PINSEL0 (*((volatile unsigned long *) 0xE002C000))
+#define PINSEL1 (*((volatile unsigned long *) 0xE002C004))
+#define PINSEL2 (*((volatile unsigned long *) 0xE002C014))
+
+/* General Purpose Input/Output (GPIO) */
+#define IOPIN0 (*((volatile unsigned long *) 0xE0028000))
+#define IOSET0 (*((volatile unsigned long *) 0xE0028004))
+#define IODIR0 (*((volatile unsigned long *) 0xE0028008))
+#define IOCLR0 (*((volatile unsigned long *) 0xE002800C))
+#define IOPIN1 (*((volatile unsigned long *) 0xE0028010))
+#define IOSET1 (*((volatile unsigned long *) 0xE0028014))
+#define IODIR1 (*((volatile unsigned long *) 0xE0028018))
+#define IOCLR1 (*((volatile unsigned long *) 0xE002801C))
+
+/* Memory Accelerator Module (MAM) */
+#define MAMCR (*((volatile unsigned char *) 0xE01FC000))
+#define MAMTIM (*((volatile unsigned char *) 0xE01FC004))
+#define MEMMAP (*((volatile unsigned char *) 0xE01FC040))
+
+/* Phase Locked Loop (PLL) */
+#define PLLCON (*((volatile unsigned char *) 0xE01FC080))
+#define PLLCFG (*((volatile unsigned char *) 0xE01FC084))
+#define PLLSTAT (*((volatile unsigned short*) 0xE01FC088))
+#define PLLFEED (*((volatile unsigned char *) 0xE01FC08C))
+
+/* VPB Divider */
+#define VPBDIV (*((volatile unsigned char *) 0xE01FC100))
+
+/* Power Control */
+#define PCON (*((volatile unsigned char *) 0xE01FC0C0))
+#define PCONP (*((volatile unsigned long *) 0xE01FC0C4))
+
+/* External Interrupts */
+#define EXTINT (*((volatile unsigned char *) 0xE01FC140))
+#define EXTWAKE (*((volatile unsigned char *) 0xE01FC144))
+#define EXTMODE (*((volatile unsigned char *) 0xE01FC148))
+#define EXTPOLAR (*((volatile unsigned char *) 0xE01FC14C))
+
+/* Timer 0 */
+#define T0IR (*((volatile unsigned long *) 0xE0004000))
+#define T0TCR (*((volatile unsigned long *) 0xE0004004))
+#define T0TC (*((volatile unsigned long *) 0xE0004008))
+#define T0PR (*((volatile unsigned long *) 0xE000400C))
+#define T0PC (*((volatile unsigned long *) 0xE0004010))
+#define T0MCR (*((volatile unsigned long *) 0xE0004014))
+#define T0MR0 (*((volatile unsigned long *) 0xE0004018))
+#define T0MR1 (*((volatile unsigned long *) 0xE000401C))
+#define T0MR2 (*((volatile unsigned long *) 0xE0004020))
+#define T0MR3 (*((volatile unsigned long *) 0xE0004024))
+#define T0CCR (*((volatile unsigned long *) 0xE0004028))
+#define T0CR0 (*((volatile unsigned long *) 0xE000402C))
+#define T0CR1 (*((volatile unsigned long *) 0xE0004030))
+#define T0CR2 (*((volatile unsigned long *) 0xE0004034))
+#define T0CR3 (*((volatile unsigned long *) 0xE0004038))
+#define T0EMR (*((volatile unsigned long *) 0xE000403C))
+
+/* Timer 1 */
+#define T1IR (*((volatile unsigned long *) 0xE0008000))
+#define T1TCR (*((volatile unsigned long *) 0xE0008004))
+#define T1TC (*((volatile unsigned long *) 0xE0008008))
+#define T1PR (*((volatile unsigned long *) 0xE000800C))
+#define T1PC (*((volatile unsigned long *) 0xE0008010))
+#define T1MCR (*((volatile unsigned long *) 0xE0008014))
+#define T1MR0 (*((volatile unsigned long *) 0xE0008018))
+#define T1MR1 (*((volatile unsigned long *) 0xE000801C))
+#define T1MR2 (*((volatile unsigned long *) 0xE0008020))
+#define T1MR3 (*((volatile unsigned long *) 0xE0008024))
+#define T1CCR (*((volatile unsigned long *) 0xE0008028))
+#define T1CR0 (*((volatile unsigned long *) 0xE000802C))
+#define T1CR1 (*((volatile unsigned long *) 0xE0008030))
+#define T1CR2 (*((volatile unsigned long *) 0xE0008034))
+#define T1CR3 (*((volatile unsigned long *) 0xE0008038))
+#define T1EMR (*((volatile unsigned long *) 0xE000803C))
+
+/* Pulse Width Modulator (PWM) */
+#define PWMIR (*((volatile unsigned long *) 0xE0014000))
+#define PWMTCR (*((volatile unsigned long *) 0xE0014004))
+#define PWMTC (*((volatile unsigned long *) 0xE0014008))
+#define PWMPR (*((volatile unsigned long *) 0xE001400C))
+#define PWMPC (*((volatile unsigned long *) 0xE0014010))
+#define PWMMCR (*((volatile unsigned long *) 0xE0014014))
+#define PWMMR0 (*((volatile unsigned long *) 0xE0014018))
+#define PWMMR1 (*((volatile unsigned long *) 0xE001401C))
+#define PWMMR2 (*((volatile unsigned long *) 0xE0014020))
+#define PWMMR3 (*((volatile unsigned long *) 0xE0014024))
+#define PWMMR4 (*((volatile unsigned long *) 0xE0014040))
+#define PWMMR5 (*((volatile unsigned long *) 0xE0014044))
+#define PWMMR6 (*((volatile unsigned long *) 0xE0014048))
+#define PWMCCR (*((volatile unsigned long *) 0xE0014028))
+#define PWMCR0 (*((volatile unsigned long *) 0xE001402C))
+#define PWMCR1 (*((volatile unsigned long *) 0xE0014030))
+#define PWMCR2 (*((volatile unsigned long *) 0xE0014034))
+#define PWMCR3 (*((volatile unsigned long *) 0xE0014038))
+#define PWMEMR (*((volatile unsigned long *) 0xE001403C))
+#define PWMPCR (*((volatile unsigned long *) 0xE001404C))
+#define PWMLER (*((volatile unsigned long *) 0xE0014050))
+
+/* Universal Asynchronous Receiver Transmitter 0 (UART0) */
+#define U0RBR (*((volatile unsigned char *) 0xE000C000))
+#define U0THR (*((volatile unsigned char *) 0xE000C000))
+#define U0IER (*((volatile unsigned char *) 0xE000C004))
+#define U0IIR (*((volatile unsigned char *) 0xE000C008))
+#define U0FCR (*((volatile unsigned char *) 0xE000C008))
+#define U0LCR (*((volatile unsigned char *) 0xE000C00C))
+#define U0MCR (*((volatile unsigned char *) 0xE000C010))
+#define U0LSR (*((volatile unsigned char *) 0xE000C014))
+#define U0MSR (*((volatile unsigned char *) 0xE000C018))
+#define U0SCR (*((volatile unsigned char *) 0xE000C01C))
+#define U0DLL (*((volatile unsigned char *) 0xE000C000))
+#define U0DLM (*((volatile unsigned char *) 0xE000C004))
+
+/* Universal Asynchronous Receiver Transmitter 1 (UART1) */
+#define U1RBR (*((volatile unsigned char *) 0xE0010000))
+#define U1THR (*((volatile unsigned char *) 0xE0010000))
+#define U1IER (*((volatile unsigned char *) 0xE0010004))
+#define U1IIR (*((volatile unsigned char *) 0xE0010008))
+#define U1FCR (*((volatile unsigned char *) 0xE0010008))
+#define U1LCR (*((volatile unsigned char *) 0xE001000C))
+#define U1MCR (*((volatile unsigned char *) 0xE0010010))
+#define U1LSR (*((volatile unsigned char *) 0xE0010014))
+#define U1MSR (*((volatile unsigned char *) 0xE0010018))
+#define U1SCR (*((volatile unsigned char *) 0xE001001C))
+#define U1DLL (*((volatile unsigned char *) 0xE0010000))
+#define U1DLM (*((volatile unsigned char *) 0xE0010004))
+
+/* I2C Interface */
+#define I2CONSET (*((volatile unsigned char *) 0xE001C000))
+#define I2STAT (*((volatile unsigned char *) 0xE001C004))
+#define I2DAT (*((volatile unsigned char *) 0xE001C008))
+#define I2ADR (*((volatile unsigned char *) 0xE001C00C))
+#define I2SCLH (*((volatile unsigned short*) 0xE001C010))
+#define I2SCLL (*((volatile unsigned short*) 0xE001C014))
+#define I2CONCLR (*((volatile unsigned char *) 0xE001C018))
+
+/* SPI0 (Serial Peripheral Interface 0) */
+#define S0SPCR (*((volatile unsigned char *) 0xE0020000))
+#define S0SPSR (*((volatile unsigned char *) 0xE0020004))
+#define S0SPDR (*((volatile unsigned char *) 0xE0020008))
+#define S0SPCCR (*((volatile unsigned char *) 0xE002000C))
+#define S0SPTCR (*((volatile unsigned char *) 0xE0020010))
+#define S0SPTSR (*((volatile unsigned char *) 0xE0020014))
+#define S0SPTOR (*((volatile unsigned char *) 0xE0020018))
+#define S0SPINT (*((volatile unsigned char *) 0xE002001C))
+
+/* SPI1 (Serial Peripheral Interface 1) */
+#define S1SPCR (*((volatile unsigned char *) 0xE0030000))
+#define S1SPSR (*((volatile unsigned char *) 0xE0030004))
+#define S1SPDR (*((volatile unsigned char *) 0xE0030008))
+#define S1SPCCR (*((volatile unsigned char *) 0xE003000C))
+#define S1SPTCR (*((volatile unsigned char *) 0xE0030010))
+#define S1SPTSR (*((volatile unsigned char *) 0xE0030014))
+#define S1SPTOR (*((volatile unsigned char *) 0xE0030018))
+#define S1SPINT (*((volatile unsigned char *) 0xE003001C))
+
+/* Real Time Clock */
+#define ILR (*((volatile unsigned char *) 0xE0024000))
+#define CTC (*((volatile unsigned short*) 0xE0024004))
+#define CCR (*((volatile unsigned char *) 0xE0024008))
+#define CIIR (*((volatile unsigned char *) 0xE002400C))
+#define AMR (*((volatile unsigned char *) 0xE0024010))
+#define CTIME0 (*((volatile unsigned long *) 0xE0024014))
+#define CTIME1 (*((volatile unsigned long *) 0xE0024018))
+#define CTIME2 (*((volatile unsigned long *) 0xE002401C))
+#define SEC (*((volatile unsigned char *) 0xE0024020))
+#define MIN (*((volatile unsigned char *) 0xE0024024))
+#define HOUR (*((volatile unsigned char *) 0xE0024028))
+#define DOM (*((volatile unsigned char *) 0xE002402C))
+#define DOW (*((volatile unsigned char *) 0xE0024030))
+#define DOY (*((volatile unsigned short*) 0xE0024034))
+#define MONTH (*((volatile unsigned char *) 0xE0024038))
+#define YEAR (*((volatile unsigned short*) 0xE002403C))
+#define ALSEC (*((volatile unsigned char *) 0xE0024060))
+#define ALMIN (*((volatile unsigned char *) 0xE0024064))
+#define ALHOUR (*((volatile unsigned char *) 0xE0024068))
+#define ALDOM (*((volatile unsigned char *) 0xE002406C))
+#define ALDOW (*((volatile unsigned char *) 0xE0024070))
+#define ALDOY (*((volatile unsigned short*) 0xE0024074))
+#define ALMON (*((volatile unsigned char *) 0xE0024078))
+#define ALYEAR (*((volatile unsigned short*) 0xE002407C))
+#define PREINT (*((volatile unsigned short*) 0xE0024080))
+#define PREFRAC (*((volatile unsigned short*) 0xE0024084))
+
+/* A/D Converter */
+#define ADCR (*((volatile unsigned long *) 0xE0034000))
+#define ADDR (*((volatile unsigned long *) 0xE0034004))
+
+/* CAN Acceptance Filter RAM */
+#define AFRAM (*((volatile unsigned long *) 0xE0038000))
+
+/* CAN Acceptance Filter */
+#define AFMR (*((volatile unsigned long *) 0xE003C000))
+#define SFF_sa (*((volatile unsigned long *) 0xE003C004))
+#define SFF_GRP_sa (*((volatile unsigned long *) 0xE003C008))
+#define EFF_sa (*((volatile unsigned long *) 0xE003C00C))
+#define EFF_GRP_sa (*((volatile unsigned long *) 0xE003C010))
+#define ENDofTable (*((volatile unsigned long *) 0xE003C014))
+#define LUTerrAd (*((volatile unsigned long *) 0xE003C018))
+#define LUTerr (*((volatile unsigned long *) 0xE003C01C))
+
+/* CAN Central Registers */
+#define CANTxSR (*((volatile unsigned long *) 0xE0040000))
+#define CANRxSR (*((volatile unsigned long *) 0xE0040004))
+#define CANMSR (*((volatile unsigned long *) 0xE0040008))
+
+/* CAN Controller 1 (CAN1) */
+#define C1MOD (*((volatile unsigned long *) 0xE0044000))
+#define C1CMR (*((volatile unsigned long *) 0xE0044004))
+#define C1GSR (*((volatile unsigned long *) 0xE0044008))
+#define C1ICR (*((volatile unsigned long *) 0xE004400C))
+#define C1IER (*((volatile unsigned long *) 0xE0044010))
+#define C1BTR (*((volatile unsigned long *) 0xE0044014))
+#define C1EWL (*((volatile unsigned long *) 0xE0044018))
+#define C1SR (*((volatile unsigned long *) 0xE004401C))
+#define C1RFS (*((volatile unsigned long *) 0xE0044020))
+#define C1RID (*((volatile unsigned long *) 0xE0044024))
+#define C1RDA (*((volatile unsigned long *) 0xE0044028))
+#define C1RDB (*((volatile unsigned long *) 0xE004402C))
+#define C1TFI1 (*((volatile unsigned long *) 0xE0044030))
+#define C1TID1 (*((volatile unsigned long *) 0xE0044034))
+#define C1TDA1 (*((volatile unsigned long *) 0xE0044038))
+#define C1TDB1 (*((volatile unsigned long *) 0xE004403C))
+#define C1TFI2 (*((volatile unsigned long *) 0xE0044040))
+#define C1TID2 (*((volatile unsigned long *) 0xE0044044))
+#define C1TDA2 (*((volatile unsigned long *) 0xE0044048))
+#define C1TDB2 (*((volatile unsigned long *) 0xE004404C))
+#define C1TFI3 (*((volatile unsigned long *) 0xE0044050))
+#define C1TID3 (*((volatile unsigned long *) 0xE0044054))
+#define C1TDA3 (*((volatile unsigned long *) 0xE0044058))
+#define C1TDB3 (*((volatile unsigned long *) 0xE004405C))
+
+/* CAN Controller 2 (CAN2) */
+#define C2MOD (*((volatile unsigned long *) 0xE0048000))
+#define C2CMR (*((volatile unsigned long *) 0xE0048004))
+#define C2GSR (*((volatile unsigned long *) 0xE0048008))
+#define C2ICR (*((volatile unsigned long *) 0xE004800C))
+#define C2IER (*((volatile unsigned long *) 0xE0048010))
+#define C2BTR (*((volatile unsigned long *) 0xE0048014))
+#define C2EWL (*((volatile unsigned long *) 0xE0048018))
+#define C2SR (*((volatile unsigned long *) 0xE004801C))
+#define C2RFS (*((volatile unsigned long *) 0xE0048020))
+#define C2RID (*((volatile unsigned long *) 0xE0048024))
+#define C2RDA (*((volatile unsigned long *) 0xE0048028))
+#define C2RDB (*((volatile unsigned long *) 0xE004802C))
+#define C2TFI1 (*((volatile unsigned long *) 0xE0048030))
+#define C2TID1 (*((volatile unsigned long *) 0xE0048034))
+#define C2TDA1 (*((volatile unsigned long *) 0xE0048038))
+#define C2TDB1 (*((volatile unsigned long *) 0xE004803C))
+#define C2TFI2 (*((volatile unsigned long *) 0xE0048040))
+#define C2TID2 (*((volatile unsigned long *) 0xE0048044))
+#define C2TDA2 (*((volatile unsigned long *) 0xE0048048))
+#define C2TDB2 (*((volatile unsigned long *) 0xE004804C))
+#define C2TFI3 (*((volatile unsigned long *) 0xE0048050))
+#define C2TID3 (*((volatile unsigned long *) 0xE0048054))
+#define C2TDA3 (*((volatile unsigned long *) 0xE0048058))
+#define C2TDB3 (*((volatile unsigned long *) 0xE004805C))
+
+/* CAN Controller 3 (CAN3) */
+#define C3MOD (*((volatile unsigned long *) 0xE004C000))
+#define C3CMR (*((volatile unsigned long *) 0xE004C004))
+#define C3GSR (*((volatile unsigned long *) 0xE004C008))
+#define C3ICR (*((volatile unsigned long *) 0xE004C00C))
+#define C3IER (*((volatile unsigned long *) 0xE004C010))
+#define C3BTR (*((volatile unsigned long *) 0xE004C014))
+#define C3EWL (*((volatile unsigned long *) 0xE004C018))
+#define C3SR (*((volatile unsigned long *) 0xE004C01C))
+#define C3RFS (*((volatile unsigned long *) 0xE004C020))
+#define C3RID (*((volatile unsigned long *) 0xE004C024))
+#define C3RDA (*((volatile unsigned long *) 0xE004C028))
+#define C3RDB (*((volatile unsigned long *) 0xE004C02C))
+#define C3TFI1 (*((volatile unsigned long *) 0xE004C030))
+#define C3TID1 (*((volatile unsigned long *) 0xE004C034))
+#define C3TDA1 (*((volatile unsigned long *) 0xE004C038))
+#define C3TDB1 (*((volatile unsigned long *) 0xE004C03C))
+#define C3TFI2 (*((volatile unsigned long *) 0xE004C040))
+#define C3TID2 (*((volatile unsigned long *) 0xE004C044))
+#define C3TDA2 (*((volatile unsigned long *) 0xE004C048))
+#define C3TDB2 (*((volatile unsigned long *) 0xE004C04C))
+#define C3TFI3 (*((volatile unsigned long *) 0xE004C050))
+#define C3TID3 (*((volatile unsigned long *) 0xE004C054))
+#define C3TDA3 (*((volatile unsigned long *) 0xE004C058))
+#define C3TDB3 (*((volatile unsigned long *) 0xE004C05C))
+
+/* CAN Controller 4 (CAN4) */
+#define C4MOD (*((volatile unsigned long *) 0xE0050000))
+#define C4CMR (*((volatile unsigned long *) 0xE0050004))
+#define C4GSR (*((volatile unsigned long *) 0xE0050008))
+#define C4ICR (*((volatile unsigned long *) 0xE005000C))
+#define C4IER (*((volatile unsigned long *) 0xE0050010))
+#define C4BTR (*((volatile unsigned long *) 0xE0050014))
+#define C4EWL (*((volatile unsigned long *) 0xE0050018))
+#define C4SR (*((volatile unsigned long *) 0xE005001C))
+#define C4RFS (*((volatile unsigned long *) 0xE0050020))
+#define C4RID (*((volatile unsigned long *) 0xE0050024))
+#define C4RDA (*((volatile unsigned long *) 0xE0050028))
+#define C4RDB (*((volatile unsigned long *) 0xE005002C))
+#define C4TFI1 (*((volatile unsigned long *) 0xE0050030))
+#define C4TID1 (*((volatile unsigned long *) 0xE0050034))
+#define C4TDA1 (*((volatile unsigned long *) 0xE0050038))
+#define C4TDB1 (*((volatile unsigned long *) 0xE005003C))
+#define C4TFI2 (*((volatile unsigned long *) 0xE0050040))
+#define C4TID2 (*((volatile unsigned long *) 0xE0050044))
+#define C4TDA2 (*((volatile unsigned long *) 0xE0050048))
+#define C4TDB2 (*((volatile unsigned long *) 0xE005004C))
+#define C4TFI3 (*((volatile unsigned long *) 0xE0050050))
+#define C4TID3 (*((volatile unsigned long *) 0xE0050054))
+#define C4TDA3 (*((volatile unsigned long *) 0xE0050058))
+#define C4TDB3 (*((volatile unsigned long *) 0xE005005C))
+
+/* Watchdog */
+#define WDMOD (*((volatile unsigned char *) 0xE0000000))
+#define WDTC (*((volatile unsigned long *) 0xE0000004))
+#define WDFEED (*((volatile unsigned char *) 0xE0000008))
+#define WDTV (*((volatile unsigned long *) 0xE000000C))
+
+#endif // __LPC21xx_H
+
+/*----------------------- END OF FILE ----------------------------------*/
Added: trunk/firmware/arm/lpc/LPC2_CANAll_V110/LPC_CANAll.Opt
===================================================================
--- trunk/firmware/arm/lpc/LPC2_CANAll_V110/LPC_CANAll.Opt (rev 0)
+++ trunk/firmware/arm/lpc/LPC2_CANAll_V110/LPC_CANAll.Opt 2008-02-25 14:25:56 UTC (rev 860)
@@ -0,0 +1,43 @@
+### uVision2 Project, (C) Keil Software
+### Do not modify !
+
+ cExt (*.c)
+ aExt (*.s*; *.src; *.a*)
+ oExt (*.obj)
+ lExt (*.lib)
+ tExt (*.txt; *.h; *.inc)
+ pExt (*.plm)
+ CppX (*.cpp)
+ DaveTm { 0,0,0,0,0,0,0,0 }
+
+Target (LPC2129), 0x0003 // Tools: 'ARM-GNU'
+GRPOPT 1,(System),1,0,0
+GRPOPT 2,(Sources),1,0,0
+GRPOPT 3,(Documentation),1,0,0
+
+OPTFFF 1,1,2,0,0,0,0,0,<.\Startup.s><Startup.s>
+OPTFFF 2,2,1,721420288,0,0,0,0,<.\LPC_CANAll.c><LPC_CANAll.c>
+OPTFFF 2,3,1,0,0,0,0,0,<.\main_CANAll.c><main_CANAll.c>
+OPTFFF 3,4,5,2,0,1,1,0,<.\readme.txt><readme.txt> { 44,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,233,255,255,255,0,0,0,0,0,0,0,0,64,2,0,0,15,1,0,0 }
+
+ExtF <.\readme.txt> 1,1,0,{ 44,0,0,0,0,0,0,0,1,0,0,0,255,255,255,255,255,255,255,255,252,255,255,255,233,255,255,255,0,0,0,0,0,0,0,0,64,2,0,0,15,1,0,0 }
+
+TARGOPT 1, (LPC2129)
+ ARMCLK=12000000
+ OPTTT 1,1,1,0
+ OPTHX 1,65535,0,0,0
+ OPTLX 120,65,8,<.\>
+ OPTOX 16
+ OPTLT 1,1,1,0,1,1,0,1,0,0,0,0
+ OPTXL 1,1,1,1,1,1,1,0,0
+ OPTFL 1,0,1
+ OPTDL (SARM.DLL)()(DARMP.DLL)(-pLPC21x9)(SARM.DLL)()(TARMP.DLL)(-pLPC21x9)
+ OPTDBG 45054,-1,()()()()()()()()()() (BIN\UL2ARM.DLL)()()()
+ OPTKEY 0,(ARMDBGFLAGS)()
+ OPTKEY 0,(DLGTARM)((134=-1,-1,-1,-1,0)(135=-1,-1,-1,-1,0)(107=-1,-1,-1,-1,0)(108=-1,-1,-1,-1,0)(106=-1,-1,-1,-1,0)(105=-1,-1,-1,-1,0)(80=120,149,666,580,0)(104=-1,-1,-1,-1,0)(100=-1,-1,-1,-1,0)(101=-1,-1,-1,-1,0)(113=-1,-1,-1,-1,0)(112=-1,-1,-1,-1,0)(136=-1,-1,-1,-1,0)(117=-1,-1,-1,-1,0)(118=-1,-1,-1,-1,0)(110=-1,-1,-1,-1,0)(111=-1,-1,-1,-1,0)(114=-1,-1,-1,-1,0)(119=-1,-1,-1,-1,0)(130=285,223,687,736,0)(131=293,336,575,563,0)(121=81,163,777,637,0)(122=267,90,963,564,0)(115=-1,-1,-1,-1,0)(116=-1,-1,-1,-1,0))
+ OPTKEY 0,(UL2ARM)(-U71771340 -O7 -S0 -C0 -N00("ARM7TDMI-S Core") -D00(4F1F0F0F) -L00(4) -FO7 -FD40000000 -FC800 -FN1 -FF0LPC_IAP_256 -FS00 -FL03E000)
+ OPTDF 0x80
+ OPTLE <>
+ OPTLC <>
+EndOpt
+
Added: trunk/firmware/arm/lpc/LPC2_CANAll_V110/LPC_CANAll.Uv2
===================================================================
--- trunk/firmware/arm/lpc/LPC2_CANAll_V110/LPC_CANAll.Uv2 (rev 0)
+++ trunk/firmware/arm/lpc/LPC2_CANAll_V110/LPC_CANAll.Uv2 2008-02-25 14:25:56 UTC (rev 860)
@@ -0,0 +1,97 @@
+### uVision2 Project, (C) Keil Software
+### Do not modify !
+
+Target (LPC2129), 0x0003 // Tools: 'ARM-GNU'
+
+Group (System)
+Group (Sources)
+Group (Documentation)
+
+File 1,2,<.\Startup.s><Startup.s> 0x4020A1A4
+File 2,1,<.\LPC_CANAll.c><LPC_CANAll.c> 0x41DBCA9B
+File 2,1,<.\main_CANAll.c><main_CANAll.c> 0x41DBCA8A
+File 3,5,<.\readme.txt><readme.txt> 0x41DBCA8A
+
+
+Options 1,0,0 // Target 'LPC2129'
+ Device (LPC2129)
+ Vendor (Philips)
+ Cpu (IRAM(0x40000000-0x40003FFF) IROM(0-0x3FFFF) CLOCK(12000000) CPUTYPE(ARM7TDMI))
+ FlashUt (LPC210x_ISP.EXE ("#H" ^X $D COM1: 9600 1))
+ StupF ()
+ FlashDR ()
+ Rgf (LPC21xx.H)
+ Mem ()
+ C ()
+ A ()
+ RL ()
+ OH ()
+ DBC_IFX ()
+ DBC_CMS ()
+ DBC_AMS ()
+ DBC_LMS ()
+ UseEnv=0
+ EnvBin ()
+ EnvInc ()
+ EnvLib ()
+ EnvReg (\xFFPhilips\)
+ OrgReg (\xFFPhilips\)
+ TgStat=0
+ OutDir (.\Flash\)
+ OutName (LPC_CANAll)
+ GenApp=1
+ GenLib=0
+ GenHex=1
+ Debug=1
+ Browse=1
+ LstDir (.\)
+ HexSel=1
+ MG32K=0
+ TGMORE=0
+ RunUsr 0 0 <>
+ RunUsr 1 0 <>
+ BrunUsr 0 0 <>
+ BrunUsr 1 0 <>
+ SVCSID <>
+ GLFLAGS=1790
+ GCPUTYP (ARM7TDMI)
+ TFlagsA { 0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
+ OCMARM { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
+ OCMARAM { 0,0,0,0,64,0,64,0,0 }
+ OCMAROM { 1,0,0,0,0,0,0,4,0 }
+ OCMXRAM { 0,0,0,0,0,0,0,0,0 }
+ ACCFLG { 5,16,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
+ ACMISC ()
+ ACDEFN ()
+ ACUDEF ()
+ ACINCD ()
+ AASFLG { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
+ AAMISC ()
+ AADEFN ()
+ AAUDEF ()
+ AAINCD ()
+ PropFld { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
+ IncBld=1
+ AlwaysBuild=0
+ GenAsm=0
+ AsmAsm=0
+ PublicsOnly=0
+ StopCode=3
+ CustArgs ()
+ LibMods ()
+ ALDFLAG { 15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
+ ALDTADR ()
+ ALDDADR ()
+ ALDBSSR ()
+ ALDICLB ()
+ ALDICDR ()
+ ALDMISC ()
+ ALDSCAT (.\Flash.ld)
+ OPTDL (SARM.DLL)()(DARMP.DLL)(-pLPC21x9)(SARM.DLL)()(TARMP.DLL)(-pLPC21x9)
+ OPTDBG 45054,-1,()()()()()()()()()() (BIN\UL2ARM.DLL)()()()
+ FLASH1 { 9,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }
+ FLASH2 (BIN\UL2ARM.DLL)
+ FLASH3 ("LPC210x_ISP.EXE" ("#H" ^X $D COM1: 9600 1))
+ FLASH4 ()
+EndOpt
+
Added: trunk/firmware/arm/lpc/LPC2_CANAll_V110/LPC_CANAll.c
===================================================================
--- trunk/firmware/arm/lpc/LPC2_CANAll_V110/LPC_CANAll.c (rev 0)
+++ trunk/firmware/arm/lpc/LPC2_CANAll_V110/LPC_CANAll.c 2008-02-25 14:25:56 UTC (rev 860)
@@ -0,0 +1,510 @@
+/**************************************************************************
+MODULE: LPC_CANAll
+CONTAINS: Philips LPC2000 CAN interface driver.
+ This driver shows how the CAN interface of the Philips LPC2000
+ can be used to receive ALL messages on the CANbus.
+ All incoming messages are copied into a receive queue.
+ NOTE: This example does not implement any queue overrun handling
+ Compiled and Tested with Keil Tools www.keil.com
+COPYRIGHT: Embedded Systems Academy, Inc. 2004.
+LICENSE: THIS VERSION CREATED FOR FREE DISTRIBUTION
+ FOR PHILIPS SEMICONDUCTORS www.philipsmcu.com
+ FOR KEIL SOFTWARE www.keil.com
+VERSION: 1.10, Pf 05-JAN-05, Updates in accordance with errata sheets
+---------------------------------------------------------------------------
+HISTORY: 1.00, Pf 14-JUL-04, First published release
+***************************************************************************/
+
+#include <LPC21XX.H> // LPC21XX Peripheral Registers
+#include "LPC_CANAll.h"
+
+
+/**************************************************************************
+GLOBAL VARIABLES
+***************************************************************************/
+
+// Receive Queue: one queue for each CAN port
+CANALL_MSG mRxCAN[MAX_CANPORTS][MAX_QUEUE];
+
+// Receive Queue IN pointer
+short mRxIN[MAX_CANPORTS];
+
+// Receive Queue OUT pointer
+short mRxOUT[MAX_CANPORTS];
+
+/**************************************************************************
+PUBLIC FUNCTIONS
+***************************************************************************/
+
+/**************************************************************************
+Initialization of a CAN interface
+as described in LPC_CANAll.h
+***************************************************************************/
+short CANAll_Init (
+ unsigned short can_port, // CAN interface to use
+ unsigned short can_isrvect, // interrupt vector number to use for Rx ISR (0-15)
+ unsigned int can_btr // CAN BTR value used to set CAN baud rate
+ )
+{
+unsigned int *pSFR; // pointer into SFR space
+unsigned int *pSFR2; // pointer into SFR space
+unsigned int offset; // offset added to pSFR
+
+ // Double check can_isrvect value
+ if (can_isrvect > 15)
+ { // Illegal value for can_isrvect
+ return 0;
+ }
+
+ // Double check can_port value
+ if ((can_port < 1) || (can_port > MAX_CANPORTS))
+ { // Illegal value for can_port
+ return 0;
+ }
+
+ // Reset IN and OUT pointer
+ mRxIN[can_port-1] = 0;
+ mRxOUT[can_port-1] = 0;
+
+ // Enable pins for selected CAN interface
+ switch (can_port)
+ {
+ case 1:
+ PINSEL1 |= 0x00040000L; // Set bit 18
+ offset = 0x00000000L; // Use 1st set of CAN registers
+ break;
+#if (MAX_CANPORTS > 1)
+ case 2:
+ PINSEL1 |= 0x00014000L; // Set bits 14 and 16
+ offset = 0x00001000L; // Use 2nd set of CAN registers
+ break;
+#endif
+#if (MAX_CANPORTS > 2)
+ case 3:
+ PINSEL1 |= 0x00001800L; // Set bits 11 and 12
+ offset = 0x00002000L; // Use 3rd set of CAN registers
+ break;
+#endif
+#if (MAX_CANPORTS > 3)
+ case 4:
+ PINSEL0 |= 0x0F000000L; // Set bits 24 to 27
+ offset = 0x00003000L; // Use 4th set of CAN registers
+ break;
+#endif
+ default:
+ return 0; // illegal value used
+ }
+
+ // Acceptance Filter Mode Register = filter off, receive all
+ AFMR = 0x00000002L;
+
+ pSFR = (unsigned int *) &C1MOD + offset; // Select Mode register
+ *pSFR = 1; // Go into Reset mode
+
+ pSFR = (unsigned int *) &C1IER + offset; // Select Interrupt Enable Register
+ *pSFR = 0;// Disable All Interrupts
+
+ pSFR = (unsigned int *) &C1GSR + offset; // Select Status Register
+ *pSFR = 0; // Clear Status register
+
+ pSFR = (unsigned int *) &C1BTR + offset; // Select BTR Register
+ *pSFR = can_btr; // Set bit timing
+
+ // Set and enable receive interrupt
+ pSFR = (unsigned int *) &VICVectAddr0;
+ pSFR += can_isrvect; // Set to desired interrupt vector
+
+ pSFR2 = (unsigned int *) &VICVectCntl0;
+ pSFR2 += can_isrvect; // Set to desired interrupt control
+
+ switch (can_port)
+ {
+ case 1:
+ // Set interrupt vector
+ *pSFR = (unsigned long) CANAll_CANISR_Rx1;
+ // Use this Interrupt for CAN Rx1 Interrupt
+ *pSFR2 = 0x20 | 26;
+ // Enable CAN Rx1 Interrupt
+ VICIntEnable = 0x04000000L;
+ break;
+#if (MAX_CANPORTS > 1)
+ case 2:
+ // Set interrupt vector
+ *pSFR = (unsigned long) CANAll_CANISR_Rx2;
+ // Use this Interrupt for CAN Rx2 Interrupt
+ *pSFR2 = 0x20 | 27;
+ // Enable CAN Rx2 Interrupt
+ VICIntEnable = 0x08000000L;
+ break;
+#endif
+#if (MAX_CANPORTS > 2)
+ case 3:
+ // Set interrupt vector
+ *pSFR = (unsigned long) CANAll_CANISR_Rx3;
+ // Use this Interrupt for CAN Rx3 Interrupt
+ *pSFR2 = 0x20 | 28;
+ // Enable CAN Rx3 Interrupt
+ VICIntEnable = 0x10000000L;
+ break;
+#endif
+#if (MAX_CANPORTS > 3)
+ case 4:
+ // Set interrupt vector
+ *pSFR = (unsigned long) CANAll_CANISR_Rx4;
+ // Use this Interrupt for CAN Rx4 Interrupt
+ *pSFR2 = 0x20 | 29;
+ // Enable CAN Rx4 Interrupt
+ VICIntEnable = 0x20000000L;
+ break;
+#endif
+ default:
+ return 0; // illegal value used
+ }
+
+ pSFR = (unsigned int *) &C1IER + offset; // Select Interrupt register
+ *pSFR = 1; // Enable Receive Interrupt
+
+ // Enter Normal Operating Mode
+ pSFR = (unsigned int *) &C1MOD + offset; // Select Mode register
+ *pSFR = 0; // Operating Mode
+
+ return 1;
+}
+
+
+/**************************************************************************
+Installing the CAN Err ISR
+as described in LPC_CANAll.h
+***************************************************************************/
+short CANAll_SetErrIRQ (
+ unsigned short can_isrvect // interrupt vector number to use for Err ISR (0-15)
+ )
+{
+unsigned int *pSFR; // pointer into SFR space
+
+ // Double check can_isrvect value
+ if (can_isrvect > 15)
+ { // Illegal value for can_isrvect
+ return 0;
+ }
+
+ // Set and enable err interrupt
+ pSFR = (unsigned int *) &VICVectAddr0;
+ pSFR += can_isrvect; // Set to desired interrupt vector
+ // Set interrupt vector
+ *pSFR = (unsigned long) CANAll_CANISR_Err;
+
+ pSFR = (unsigned int *) &VICVectCntl0;
+ pSFR += can_isrvect; // Set to desired interrupt control
+ *pSFR = 0x20 | 19;
+
+ // Enable Interrupt source
+ VICIntEnable = 0x00080000L;
+
+ return 1;
+}
+
+
+/**************************************************************************
+Transmitting a CAN message on a selected CAN interface
+as described in LPC_CANAll.h
+***************************************************************************/
+short CANAll_PushMessage (
+ unsigned short can_port,
+ CANALL_MSG *pTransmitBuf
+ )
+{
+unsigned int *pAddr;
+unsigned int *pCandata;
+unsigned int offset;
+
+ // Double check can_port value
+ if ((can_port < 1) || (can_port > MAX_CANPORTS))
+ { // Illegal value for can_port
+ return 0;
+ }
+
+ switch (can_port)
+ {
+ case 1:
+ offset = 0x00000000L; // Use 1st set of CAN registers
+ break;
+#if (MAX_CANPORTS > 1)
+ case 2:
+ offset = 0x00001000L; // Use 2nd set of CAN registers
+ break;
+#endif
+#if (MAX_CANPORTS > 2)
+ case 3:
+ offset = 0x00002000L; // Use 3rd set of CAN registers
+ break;
+#endif
+#if (MAX_CANPORTS > 3)
+ case 4:
+ offset = 0x00003000L; // Use 4th set of CAN registers
+ break;
+#endif
+ default:
+ return 0; // illegal value used
+ }
+
+ pAddr = (unsigned int *) &C1SR + offset; // CANSR
+ if (!(*pAddr & 0x00000004L))
+ { // Transmit Channel is not available
+ return 0; // No channel available
+ }
+
+ // Write DLC, RTR and FF
+ pAddr = (unsigned int *) &C1TFI1 + offset;
+ *pAddr = pTransmitBuf->Frame & 0xC00F0000L;
+
+ // Write CAN ID
+ pAddr++;
+ *pAddr = pTransmitBuf->MsgID;
+
+ // Write first 4 data bytes
+ pCandata = (unsigned int *) &(pTransmitBuf->DatA);
+ pAddr++;
+ *pAddr = *pCandata;
+
+ // Write second 4 data bytes
+ pCandata++;
+ pAddr++;
+ *pAddr = *pCandata;
+
+ // Write self transmission request
+ pAddr = (unsigned int *) &C1CMR + offset;
+ *pAddr = 0x30; // Self Transmission Request Buf 1
+
+ return 1;
+}
+
+
+/**************************************************************************
+Receiving a CAN message
+as described in LPC_CANAll.h
+***************************************************************************/
+short CANAll_PullMessage (
+ unsigned short can_port,
+ CANALL_MSG *pReceiveBuf
+ )
+{
+unsigned int *pSrc; // Source pointer
+unsigned int *pDst; // Destination pointer
+
+ // Double check can_port value
+ if ((can_port < 1) || (can_port > MAX_CANPORTS))
+ { // Illegal value for can_port
+ return 0;
+ }
+ can_port--; // Adjust to 0 - MAX_CANPORTS-1
+
+ // Check if something is in RxQueue
+ if ((mRxIN[can_port]) == (mRxOUT[can_port]))
+ { // Queue is empty
+ return 0;
+ }
+ // Pointers are different, so something is in queue
+
+ // Initialize pointers
+ pSrc = (unsigned int *) &(mRxCAN[can_port][mRxOUT[can_port]]);
+ pDst = (unsigned int *) &(pReceiveBuf->Frame);
+ *pDst = *pSrc; // Copy Frame
+
+ pSrc++;
+ pDst++;
+ *pDst = *pSrc; // Copy MsgID
+
+ pSrc++;
+ pDst++;
+ *pDst = *pSrc; // Copy DatA
+
+ pSrc++;
+ pDst++;
+ *pDst = *pSrc; // Copy DatB
+
+ // Adjust OUT pointer
+ mRxOUT[can_port]++;
+ if (mRxOUT[can_port] >= MAX_QUEUE)
+ {
+ mRxOUT[can_port] = 0;
+ }
+
+ return 1;
+}
+
+
+/**************************************************************************
+PRIVATE FUNCTIONS
+***************************************************************************/
+
+/**************************************************************************
+DOES: Interrupt Service Routine for CAN Errors
+GLOBALS: none
+RETURNS: nothing
+***************************************************************************/
+void CANAll_CANISR_Err (
+ void
+ )
+{
+ // DEBUG VERSION: do not return from Errors
+ // Replace this with application specific error handling
+ while (1)
+ {
+ }
+ VICVectAddr = 0xFFFFFFFFL; // acknowledge Interrupt
+}
+
+
+/**************************************************************************
+DOES: Interrupt Service Routine for CAN receive on CAN interface 1
+GLOBALS: Copies the received message into the gRxCAN[0][] array
+RETURNS: nothing
+***************************************************************************/
+void CANAll_CANISR_Rx1 (
+ void
+ )
+{
+unsigned int *pDest;
+
+ // initialize destination pointer
+ pDest = (unsigned int *) &(mRxCAN[0][mRxIN[0]]);
+ *pDest = C1RFS; // Frame
+
+ pDest++;
+ *pDest = C1RID; // ID
+
+ pDest++;
+ *pDest = C1RDA; // Data A
+
+ pDest++;
+ *pDest = C1RDB; // Data B
+
+ // Adjust IN pointer
+ mRxIN[0]++;
+ if (mRxIN[0] >= MAX_QUEUE)
+ {
+ mRxIN[0] = 0;
+ }
+
+ C1CMR = 0x04; // release receive buffer
+ VICVectAddr = 0xFFFFFFFFL; // acknowledge Interrupt
+}
+
+
+#if (MAX_CANPORTS > 1)
+/**************************************************************************
+DOES: Interrupt Service Routine for CAN receive on CAN interface 2
+GLOBALS: Copies the received message into the gRxCAN[1][] array
+RETURNS: nothing
+***************************************************************************/
+void CANAll_CANISR_Rx2 (
+ void
+ )
+{
+unsigned int *pDest;
+
+ // initialize destination pointer
+ pDest = (unsigned int *) &(mRxCAN[1][mRxIN[1]]);
+ *pDest = C2RFS; // Frame
+
+ pDest++;
+ *pDest = C2RID; // ID
+
+ pDest++;
+ *pDest = C2RDA; // Data A
+
+ pDest++;
+ *pDest = C2RDB; // Data B
+
+ // Adjust IN pointer
+ mRxIN[1]++;
+ if (mRxIN[1] >= MAX_QUEUE)
+ {
+ mRxIN[1] = 0;
+ }
+
+ C2CMR = 0x04; // release receive buffer
+ VICVectAddr = 0xFFFFFFFFL; // acknowledge Interrupt
+}
+#endif // MAX_CANPORTS > 1
+
+
+#if (MAX_CANPORTS > 2)
+/**************************************************************************
+DOES: Interrupt Service Routine for CAN receive on CAN interface 3
+GLOBALS: Copies the received message into the gRxCAN[2][] array
+RETURNS: nothing
+***************************************************************************/
+void CANAll_CANISR_Rx3 (
+ void
+ )
+{
+unsigned int *pDest;
+
+ // initialize destination pointer
+ pDest = (unsigned int *) &(mRxCAN[2][mRxIN[2]]);
+ *pDest = C3RFS; // Frame
+
+ pDest++;
+ *pDest = C3RID; // ID
+
+ pDest++;
+ *pDest = C3RDA; // Data A
+
+ pDest++;
+ *pDest = C3RDB; // Data B
+
+ // Adjust IN pointer
+ mRxIN[2]++;
+ if (mRxIN[2] >= MAX_QUEUE)
+ {
+ mRxIN[2] = 0;
+ }
+
+ C3CMR = 0x04; // release receive buffer
+ VICVectAddr = 0xFFFFFFFFL; // acknowledge Interrupt
+}
+#endif // MAX_CANPORTS > 2
+
+
+#if (MAX_CANPORTS > 3)
+/**************************************************************************
+DOES: Interrupt Service Routine for CAN receive on CAN interface 4
+GLOBALS: Copies the received message into the gRxCAN[3][] array
+RETURNS: nothing
+***************************************************************************/
+void CANAll_CANISR_Rx4 (
+ void
+ )
+{
+unsigned int *pDest;
+
+ // initialize destination pointer
+ pDest = (unsigned int *) &(mRxCAN[3][mRxIN[3]]);
+ *pDest = C4RFS; // Frame
+
+ pDest++;
+ *pDest = C4RID; // ID
+
+ pDest++;
+ *pDest = C4RDA; // Data A
+
+ pDest++;
+ *pDest = C4RDB; // Data B
+
+ // Adjust IN pointer
+ mRxIN[3]++;
+ if (mRxIN[3] >= MAX_QUEUE)
+ {
+ mRxIN[3] = 0;
+ }
+
+ C4CMR = 0x04; // release receive buffer
+ VICVectAddr = 0xFFFFFFFFL; // acknowledge Interrupt
+}
+#endif // MAX_CANPORTS > 4
+
+
+/*----------------------- END OF FILE ----------------------------------*/
+
Added: trunk/firmware/arm/lpc/LPC2_CANAll_V110/LPC_CANAll.h
===================================================================
--- trunk/firmware/arm/lpc/LPC2_CANAll_V110/LPC_CANAll.h (rev 0)
+++ trunk/firmware/arm/lpc/LPC2_CANAll_V110/LPC_CANAll.h 2008-02-25 14:25:56 UTC (rev 860)
@@ -0,0 +1,115 @@
+/**************************************************************************
+MODULE: LPC_CANAll
+CONTAINS: Philips LPC2000 CAN interface driver.
+ This driver shows how the CAN interface of the Philips LPC2000
+ can be used to receive ALL messages on the CANbus.
+ All incoming messages are copied into a receive queue.
+ NOTE: This example does not implement any queue overrun handling
+ Compiled and Tested with Keil Tools www.keil.com
+COPYRIGHT: Embedded Systems Academy, Inc. 2004.
+LICENSE: THIS VERSION CREATED FOR FREE DISTRIBUTION
+ FOR PHILIPS SEMICONDUCTORS www.philipsmcu.com
+ FOR KEIL SOFTWARE www.keil.com
+VERSION: 1.00, Pf 14-JUL-04, First published release
+---------------------------------------------------------------------------
+HISTORY: 1.00, Pf 14-JUL-04, First published release
+***************************************************************************/
+
+/**************************************************************************
+USER DEFINABLE PARAMETERS
+***************************************************************************/
+
+// Maximum number of CAN interfaces supported by this driver (1 to 4)
+// So far values 3 and 4 were not tested
+// The example c...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-24 22:10:38
|
Revision: 859
http://can.svn.sourceforge.net/can/?rev=859&view=rev
Author: akhe
Date: 2008-02-24 14:10:13 -0800 (Sun, 24 Feb 2008)
Log Message:
-----------
Fixed IAR CAN sample for STR 73x
Added Paths:
-----------
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_adc.h
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_can.h
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_cfg.h
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_dma.h
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_eic.h
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_extit.h
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_gpio.h
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_i2c.h
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_lib.h
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_map.h
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_mrcc.h
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_pwm.h
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_rtc.h
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_smi.h
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_ssp.h
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_tb.h
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_tim.h
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_type.h
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_uart.h
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_wdg.h
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_adc.c
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_can.c
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_cfg.c
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_dma.c
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_eic.c
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_extit.c
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_gpio.c
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_i2c.c
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_lib.c
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_mrcc.c
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_pwm.c
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_rtc.c
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_smi.c
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_ssp.c
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_tb.c
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_tim.c
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_uart.c
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/src/75x_wdg.c
Added: trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_adc.h
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_adc.h (rev 0)
+++ trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_adc.h 2008-02-24 22:10:13 UTC (rev 859)
@@ -0,0 +1,177 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : 75x_adc.h
+* Author : MCD Application Team
+* Date First Issued : 03/10/2006
+* Description : This file contains all the functions prototypes for the
+* ADC software library.
+********************************************************************************
+* History:
+* 07/17/2006 : V1.0
+* 03/10/2006 : V0.1
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __75x_ADC_H
+#define __75x_ADC_H
+
+/* Includes ------------------------------------------------------------------*/
+#include "75x_map.h"
+
+/* Exported types ------------------------------------------------------------*/
+/* ADC Init structure definition */
+typedef struct
+{
+ u16 ADC_ConversionMode;
+ u16 ADC_ExtTrigger;
+ u16 ADC_AutoClockOff;
+ u8 ADC_SamplingPrescaler;
+ u8 ADC_ConversionPrescaler;
+ u8 ADC_FirstChannel;
+ u8 ADC_ChannelNumber;
+ }ADC_InitTypeDef;
+
+/* Exported constants --------------------------------------------------------*/
+/* ADC control status flags */
+#define ADC_FLAG_ECH 0x0001
+#define ADC_FLAG_EOC 0x0002
+#define ADC_FLAG_JECH 0x0004
+#define ADC_FLAG_JEOC 0x0008
+#define ADC_FLAG_AnalogWatchdog0_LowThreshold 0x0010
+#define ADC_FLAG_AnalogWatchdog0_HighThreshold 0x0020
+#define ADC_FLAG_AnalogWatchdog1_LowThreshold 0x0040
+#define ADC_FLAG_AnalogWatchdog1_HighThreshold 0x0080
+#define ADC_FLAG_AnalogWatchdog2_LowThreshold 0x0100
+#define ADC_FLAG_AnalogWatchdog2_HighThreshold 0x0200
+#define ADC_FLAG_AnalogWatchdog3_LowThreshold 0x0400
+#define ADC_FLAG_AnalogWatchdog3_HighThreshold 0x0800
+
+/* ADC Interrupt sources */
+#define ADC_IT_ECH 0x0001
+#define ADC_IT_EOC 0x0002
+#define ADC_IT_JECH 0x0004
+#define ADC_IT_JEOC 0x0008
+#define ADC_IT_AnalogWatchdog0_LowThreshold 0x0010
+#define ADC_IT_AnalogWatchdog0_HighThreshold 0x0020
+#define ADC_IT_AnalogWatchdog1_LowThreshold 0x0040
+#define ADC_IT_AnalogWatchdog1_HighThreshold 0x0080
+#define ADC_IT_AnalogWatchdog2_LowThreshold 0x0100
+#define ADC_IT_AnalogWatchdog2_HighThreshold 0x0200
+#define ADC_IT_AnalogWatchdog3_LowThreshold 0x0400
+#define ADC_IT_AnalogWatchdog3_HighThreshold 0x0800
+#define ADC_IT_ALL 0x0FFF
+
+/* ADC Watchdogs Thresholds */
+#define ADC_AnalogWatchdog0 0x0030
+#define ADC_AnalogWatchdog1 0x00C0
+#define ADC_AnalogWatchdog2 0x0300
+#define ADC_AnalogWatchdog3 0x0C00
+
+/* ADC Channels */
+#define ADC_CHANNEL0 0x0
+#define ADC_CHANNEL1 0x1
+#define ADC_CHANNEL2 0x2
+#define ADC_CHANNEL3 0x3
+#define ADC_CHANNEL4 0x4
+#define ADC_CHANNEL5 0x5
+#define ADC_CHANNEL6 0x6
+#define ADC_CHANNEL7 0x7
+#define ADC_CHANNEL8 0x8
+#define ADC_CHANNEL9 0x9
+#define ADC_CHANNEL10 0xA
+#define ADC_CHANNEL11 0xB
+#define ADC_CHANNEL12 0xC
+#define ADC_CHANNEL13 0xD
+#define ADC_CHANNEL14 0xE
+#define ADC_CHANNEL15 0xF
+
+/* ADC DMA Channels */
+#define ADC_DMA_CHANNEL0 0x0001
+#define ADC_DMA_CHANNEL1 0x0002
+#define ADC_DMA_CHANNEL2 0x0004
+#define ADC_DMA_CHANNEL3 0x0008
+#define ADC_DMA_CHANNEL4 0x0010
+#define ADC_DMA_CHANNEL5 0x0020
+#define ADC_DMA_CHANNEL6 0x0040
+#define ADC_DMA_CHANNEL7 0x0080
+#define ADC_DMA_CHANNEL8 0x0100
+#define ADC_DMA_CHANNEL9 0x0200
+#define ADC_DMA_CHANNEL10 0x0400
+#define ADC_DMA_CHANNEL11 0x0800
+#define ADC_DMA_CHANNEL12 0x1000
+#define ADC_DMA_CHANNEL13 0x2000
+#define ADC_DMA_CHANNEL14 0x4000
+#define ADC_DMA_CHANNEL15 0x8000
+
+/* Trigger conversion detection */
+#define ADC_ExtTrigger_LowLevel 0x4FFF
+#define ADC_ExtTrigger_HighLevel 0x5000
+#define ADC_ExtTrigger_FallingEdge 0x6000
+#define ADC_ExtTrigger_RisingEdge 0x7000
+#define ADC_ExtTrigger_Disable 0x8FFF
+
+/* DMA enable config */
+#define ADC_DMA_ExtTrigger_HighLevel 0x6000
+#define ADC_DMA_ExtTrigger_LowLevel 0x4FFF
+#define ADC_DMA_Enable 0x8000
+#define ADC_DMA_Disable 0x3FFF
+
+/* Injected Trigger conversion detection */
+#define ADC_Injec_ExtTrigger_RisingEdge 0x6000
+#define ADC_Injec_ExtTrigger_FallingEdge 0xDFFF
+#define ADC_Injec_ExtTrigger_Disable 0x3FFF
+
+/* Start Conversion */
+#define ADC_Conversion_Start 0x0001
+#define ADC_Conversion_Stop 0xFFFE
+
+/* ADC Conversion Modes */
+#define ADC_ConversionMode_Scan 0x8000
+#define ADC_ConversionMode_OneShot 0x7FFF
+
+/* Auto Clock Off */
+#define ADC_AutoClockOff_Enable 0x4000
+#define ADC_AutoClockOff_Disable 0xBFFF
+
+/* Calibration */
+#define ADC_Calibration_ON 0x0002
+#define ADC_CalibAverage_Disable 0x0020
+#define ADC_CalibAverage_Enable 0xFFDF
+
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions --------------------------------------------------------*/
+
+void ADC_DeInit(void);
+void ADC_Init(ADC_InitTypeDef *ADC_InitStruct);
+void ADC_StructInit(ADC_InitTypeDef *ADC_InitStruct);
+void ADC_Cmd(FunctionalState NewState);
+void ADC_StartCalibration(u16 ADC_CalibAverage);
+FlagStatus ADC_GetCalibrationStatus(void);
+void ADC_ConversionCmd(u16 ADC_Conversion);
+FlagStatus ADC_GetSTARTBitStatus(void);
+void ADC_AutoClockOffConfig(FunctionalState NewState);
+u16 ADC_GetConversionValue(u8 ADC_CHANNEL);
+void ADC_ITConfig(u16 ADC_IT, FunctionalState NewState);
+void ADC_AnalogWatchdogConfig(u16 ADC_AnalogWatchdog, u8 ADC_CHANNEL,
+ u16 LowThreshold, u16 HighThreshold);
+void ADC_AnalogWatchdogCmd(u16 ADC_AnalogWatchdog, FunctionalState NewState);
+u16 ADC_GetAnalogWatchdogResult(u16 ADC_AnalogWatchdog);
+void ADC_StartInjectedConversion(void);
+void ADC_InjectedConversionConfig(u16 ADC_Injec_ExtTrigger, u8 FirstChannel, u8 ChannelNumber);
+void ADC_DMAConfig(u16 ADC_DMA_CHANNEL, FunctionalState NewState);
+void ADC_DMACmd(u16 ADC_DMA);
+u16 ADC_GetDMAFirstEnabledChannel(void);
+FlagStatus ADC_GetFlagStatus(u16 ADC_FLAG);
+void ADC_ClearFlag(u16 ADC_FLAG);
+ITStatus ADC_GetITStatus(u16 ADC_IT);
+void ADC_ClearITPendingBit(u16 ADC_IT);
+
+#endif /*__75x_ADC_H */
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_can.h
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_can.h (rev 0)
+++ trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_can.h 2008-02-24 22:10:13 UTC (rev 859)
@@ -0,0 +1,165 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : 75x_can.h
+* Author : MCD Application Team
+* Date First Issued : 03/10/2006
+* Description : This file contains all the functions prototypes for the
+* CAN bus software library.
+********************************************************************************
+* History:
+* 07/17/2006 : V1.0
+* 03/10/2006 : V0.1
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __75x_CAN_H
+#define __75x_CAN_H
+
+/* Includes ------------------------------------------------------------------*/
+#include "75x_map.h"
+
+/* Exported types ------------------------------------------------------------*/
+
+/* CAN Init structure define */
+typedef struct
+{
+ u8 CAN_ConfigParameters;
+ u32 CAN_Bitrate;
+}CAN_InitTypeDef;
+
+/* Exported constants --------------------------------------------------------*/
+/* Standard bitrates available*/
+enum
+{
+ CAN_BITRATE_100K,
+ CAN_BITRATE_125K,
+ CAN_BITRATE_250K,
+ CAN_BITRATE_500K,
+ CAN_BITRATE_1M
+};
+
+/* Control register*/
+#define CAN_CR_TEST 0x0080
+#define CAN_CR_CCE 0x0040
+#define CAN_CR_DAR 0x0020
+#define CAN_CR_EIE 0x0008
+#define CAN_CR_SIE 0x0004
+#define CAN_CR_IE 0x0002
+#define CAN_CR_INIT 0x0001
+
+/* Status register */
+#define CAN_SR_BOFF 0x0080
+#define CAN_SR_EWARN 0x0040
+#define CAN_SR_EPASS 0x0020
+#define CAN_SR_RXOK 0x0010
+#define CAN_SR_TXOK 0x0008
+#define CAN_SR_LEC 0x0007
+
+/* Test register*/
+#define CAN_TESTR_RX 0x0080
+#define CAN_TESTR_TX1 0x0040
+#define CAN_TESTR_TX0 0x0020
+#define CAN_TESTR_LBACK 0x0010
+#define CAN_TESTR_SILENT 0x0008
+#define CAN_TESTR_BASIC 0x0004
+
+/* IFn / Command Request register*/
+#define CAN_CRR_BUSY 0x8000
+
+/* IFn / Command Mask register*/
+#define CAN_CMR_WRRD 0x0080
+#define CAN_CMR_MASK 0x0040
+#define CAN_CMR_ARB 0x0020
+#define CAN_CMR_CONTROL 0x0010
+#define CAN_CMR_CLRINTPND 0x0008
+#define CAN_CMR_TXRQSTNEWDAT 0x0004
+#define CAN_CMR_DATAA 0x0002
+#define CAN_CMR_DATAB 0x0001
+
+/* IFn / Mask 2 register*/
+#define CAN_M2R_MXTD 0x8000
+#define CAN_M2R_MDIR 0x4000
+
+/* IFn / Arbitration 2 register*/
+#define CAN_A2R_MSGVAL 0x8000
+#define CAN_A2R_XTD 0x4000
+#define CAN_A2R_DIR 0x2000
+
+/* IFn / Message Control register*/
+#define CAN_MCR_NEWDAT 0x8000
+#define CAN_MCR_MSGLST 0x4000
+#define CAN_MCR_INTPND 0x2000
+#define CAN_MCR_UMASK 0x1000
+#define CAN_MCR_TXIE 0x0800
+#define CAN_MCR_RXIE 0x0400
+#define CAN_MCR_RMTEN 0x0200
+#define CAN_MCR_TXRQST 0x0100
+#define CAN_MCR_EOB 0x0080
+
+
+/* Wake-up modes*/
+enum
+{
+ CAN_WAKEUP_ON_EXT,
+ CAN_WAKEUP_ON_CAN
+};
+
+
+/* CAN message structure*/
+typedef struct
+{
+ u32 IdType;
+ u32 Id;
+ u8 Dlc;
+ u8 Data[8];
+} canmsg;
+
+/* Message ID types*/
+enum
+{
+ CAN_STD_ID,
+ CAN_EXT_ID
+};
+
+/* Message ID limits*/
+
+#define CAN_LAST_STD_ID ((1<<11) - 1)
+#define CAN_LAST_EXT_ID ((1L<<29) - 1)
+
+/* Exported functions ------------------------------------------------------- */
+
+void CAN_Init (CAN_InitTypeDef *CAN_InitStruct);
+void CAN_DeInit (void);
+void CAN_StructInit(CAN_InitTypeDef *CAN_InitStruct);
+void CAN_SetBitrate(u32 bitrate);
+void CAN_SetTiming(u32 tseg1, u32 tseg2, u32 sjw, u32 brp);
+ErrorStatus CAN_SetUnusedMsgObj(u32 msgobj);
+ErrorStatus CAN_SetTxMsgObj(u32 msgobj, u32 idType);
+ErrorStatus CAN_SetRxMsgObj(u32 msgobj, u32 idType, u32 idLow, u32 idHigh, bool singleOrFifoLast);
+void CAN_InvalidateAllMsgObj(void);
+ErrorStatus CAN_ReleaseMessage(u32 msgobj);
+ErrorStatus CAN_SendMessage(u32 msgobj, canmsg* pCanMsg);
+ErrorStatus CAN_ReceiveMessage(u32 msgobj, bool release, canmsg* pCanMsg);
+ErrorStatus CAN_WaitEndOfTx(void);
+ErrorStatus CAN_BasicSendMessage(canmsg* pCanMsg);
+ErrorStatus CAN_BasicReceiveMessage(canmsg* pCanMsg);
+void CAN_EnterTestMode(u8 TestMask);
+void CAN_EnterInitMode(u8 InitMask);
+void CAN_LeaveInitMode(void);
+void CAN_LeaveTestMode(void);
+void CAN_ReleaseTxMessage(u32 msgobj);
+void CAN_ReleaseRxMessage(u32 msgobj);
+u32 CAN_IsMessageWaiting(u32 msgobj);
+u32 CAN_IsTransmitRequested(u32 msgobj);
+u32 CAN_IsInterruptPending(u32 msgobj);
+u32 CAN_IsObjectValid(u32 msgobj);
+
+#endif /* __75x_CAN_H */
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_cfg.h
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_cfg.h (rev 0)
+++ trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_cfg.h 2008-02-24 22:10:13 UTC (rev 859)
@@ -0,0 +1,48 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : 75x_cfg.h
+* Author : MCD Application Team
+* Date First Issued : 03/10/2006
+* Description : This file contains all the functions prototypes for the
+* CFG software library.
+********************************************************************************
+* History:
+* 07/17/2006 : V1.0
+* 03/10/2006 : V0.1
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __75x_CFG_H
+#define __75x_CFG_H
+
+/* Includes ------------------------------------------------------------------*/
+#include "75x_map.h"
+
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+#define CFG_BootSpace_FLASH 0x00000000
+#define CFG_BootSpace_SRAM 0x00000002
+#define CFG_BootSpace_ExtSMI 0x00000003
+
+#define CFG_FLASHBurst_Disable 0xFFFFFEFF
+#define CFG_FLASHBurst_Enable 0x00000100
+
+#define CFG_USBFilter_Disable 0xFFFFFDFF
+#define CFG_USBFilter_Enable 0x00000200
+
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void CFG_BootSpaceConfig(u32 CFG_BootSpace);
+void CFG_FLASHBurstConfig(u32 CFG_FLASHBurst);
+void CFG_USBFilterConfig(u32 CFG_USBFilter);
+FlagStatus CFG_GetFlagStatus(void);
+
+#endif /* __75x_CFG_H */
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_dma.h
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_dma.h (rev 0)
+++ trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_dma.h 2008-02-24 22:10:13 UTC (rev 859)
@@ -0,0 +1,140 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : 75x_dma.h
+* Author : MCD Application Team
+* Date First Issued : 03/10/2006
+* Description : This file contains all the functions prototypes for the
+* DMA software library.
+********************************************************************************
+* History:
+* 07/17/2006 : V1.0
+* 03/10/2006 : V0.1
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+/* Define to prevent recursive inclusion ------------------------------------ */
+#ifndef __75x_DMA_H
+#define __75x_DMA_H
+
+/* Includes ------------------------------------------------------------------*/
+#include "75x_map.h"
+
+/* Exported types ------------------------------------------------------------*/
+/* DMA Init structure definition */
+typedef struct
+{
+ u32 DMA_SRCBaseAddr;
+ u32 DMA_DSTBaseAddr;
+ u16 DMA_BufferSize;
+ u16 DMA_SRC;
+ u16 DMA_DST;
+ u16 DMA_SRCSize;
+ u16 DMA_SRCBurst;
+ u16 DMA_DSTSize;
+ u16 DMA_Mode;
+ u16 DMA_M2M;
+ u16 DMA_DIR;
+}DMA_InitTypeDef;
+
+/* Exported constants --------------------------------------------------------*/
+/* DMA interrupt Mask */
+#define DMA_IT_SI0 0x0001
+#define DMA_IT_SI1 0x0002
+#define DMA_IT_SI2 0x0004
+#define DMA_IT_SI3 0x0008
+#define DMA_IT_SE0 0x0010
+#define DMA_IT_SE1 0x0020
+#define DMA_IT_SE2 0x0040
+#define DMA_IT_SE3 0x0080
+#define DMA_IT_ALL 0x00FF
+
+/* DMA Flags */
+#define DMA_FLAG_SI0 0x0001
+#define DMA_FLAG_SI1 0x0002
+#define DMA_FLAG_SI2 0x0004
+#define DMA_FLAG_SI3 0x0008
+#define DMA_FLAG_SE0 0x0010
+#define DMA_FLAG_SE1 0x0020
+#define DMA_FLAG_SE2 0x0040
+#define DMA_FLAG_SE3 0x0080
+#define DMA_FLAG_ACT0 0x0100
+#define DMA_FLAG_ACT1 0x0200
+#define DMA_FLAG_ACT2 0x0400
+#define DMA_FLAG_ACT3 0x0800
+
+/* DMA Increment Current Source Register */
+#define DMA_SRC_INCR 0x0002
+#define DMA_SRC_NOT_INCR 0xFFFD
+
+/* DMA Increment Current Destination Register */
+#define DMA_DST_INCR 0x0004
+#define DMA_DST_NOT_INCR 0xFFFB
+
+/* Source to DMA data width */
+#define DMA_SRCSize_Byte 0x0000
+#define DMA_SRCSize_HalfWord 0x0008
+#define DMA_SRCSize_Word 0x0010
+
+/* DMA source burst size */
+#define DMA_SRCBurst_1Data 0x0000
+#define DMA_SRCBurst_4Data 0x0020
+#define DMA_SRCBurst_8Data 0x0040
+#define DMA_SRCBurst_16Data 0x0060
+
+/* DMA destination data width */
+#define DMA_DSTSize_Byte 0x0000
+#define DMA_DSTSize_HalfWord 0x0080
+#define DMA_DSTSize_Word 0x0100
+
+/* DMA mode */
+#define DMA_Mode_Circular 0x0200
+#define DMA_Mode_Normal 0xFDFF
+
+/* Memory to Memory Transfer */
+#define DMA_M2M_Enable 0x0800
+#define DMA_M2M_Disable 0xF7FF
+
+/* Direction Transfer */
+#define DMA_DIR_PeriphDST 0x2000
+#define DMA_DIR_PeriphSRC 0xDFFF
+
+/* DMA streamx Registers */
+#define DMA_SOURCEL 0x00000000 /* source base address low register */
+#define DMA_SOURCEH 0x00000004 /* source base address high register */
+#define DMA_DESTL 0x00000008 /* destination base address low register */
+#define DMA_DESTH 0x0000000C /* destination base address high register */
+#define DMA_MAX 0x00000010 /* Maximum count register */
+#define DMA_CTRL 0x00000014 /* Control register */
+#define DMA_SOCURRH 0x00000018 /* Current Source address high register */
+#define DMA_SOCURRL 0x0000001C /* Current Source address low register */
+#define DMA_DECURRH 0x00000020 /* Current Destination address high register */
+#define DMA_DECURRL 0x00000024 /* Current Destination address low register */
+#define DMA_TCNT 0x00000028 /* Terminal Counter Register */
+#define DMA_LUBUFF 0x0000002C /* Last Used Buffer location */
+
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+
+void DMA_DeInit(DMA_Stream_TypeDef* DMA_Streamx);
+void DMA_Init(DMA_Stream_TypeDef* DMA_Streamx, DMA_InitTypeDef* DMA_InitStruct);
+void DMA_StructInit(DMA_InitTypeDef* DMA_InitStruct);
+void DMA_Cmd(DMA_Stream_TypeDef* DMA_Streamx, FunctionalState NewState);
+void DMA_ITConfig(u16 DMA_IT, FunctionalState NewState);
+u32 DMA_GetCurrDSTAddr(DMA_Stream_TypeDef* DMA_Streamx);
+u32 DMA_GetCurrSRCAddr(DMA_Stream_TypeDef* DMA_Streamx);
+u16 DMA_GetTerminalCounter(DMA_Stream_TypeDef* DMA_Streamx);
+void DMA_LastBufferSweepConfig(DMA_Stream_TypeDef* DMA_Streamx, FunctionalState NewState);
+void DMA_LastBufferAddrConfig(DMA_Stream_TypeDef* DMA_Streamx, u16 DMA_LastBufferAddr);
+FlagStatus DMA_GetFlagStatus(u16 DMA_FLAG);
+void DMA_ClearFlag(u16 DMA_FLAG);
+ITStatus DMA_GetITStatus(u16 DMA_IT);
+void DMA_ClearITPendingBit(u16 DMA_IT);
+
+#endif /* __75x_DMA_H */
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_eic.h
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_eic.h (rev 0)
+++ trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_eic.h 2008-02-24 22:10:13 UTC (rev 859)
@@ -0,0 +1,97 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : 75x_eic.h
+* Author : MCD Application Team
+* Date First Issued : 03/10/2006
+* Description : This file contains all the functions prototypes for the
+* EIC software library.
+********************************************************************************
+* History:
+* 07/17/2006 : V1.0
+* 03/10/2006 : V0.1
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __75x_EIC_H
+#define __75x_EIC_H
+
+/* Includes ------------------------------------------------------------------*/
+#include "75x_map.h"
+
+/* Exported types ------------------------------------------------------------*/
+typedef struct
+{
+ u8 EIC_IRQChannel;
+ u8 EIC_IRQChannelPriority;
+ FunctionalState EIC_IRQChannelCmd;
+}EIC_IRQInitTypeDef;
+
+typedef struct
+{
+ u8 EIC_FIQChannel;
+ FunctionalState EIC_FIQChannelCmd;
+}EIC_FIQInitTypeDef;
+
+/* Exported constants --------------------------------------------------------*/
+/* IRQ channels */
+#define WAKUP_IRQChannel 0
+#define TIM2_OC2_IRQChannel 1
+#define TIM2_OC1_IRQChannel 2
+#define TIM2_IC12_IRQChannel 3
+#define TIM2_UP_IRQChannel 4
+#define TIM1_OC2_IRQChannel 5
+#define TIM1_OC1_IRQChannel 6
+#define TIM1_IC12_IRQChannel 7
+#define TIM1_UP_IRQChannel 8
+#define TIM0_OC2_IRQChannel 9
+#define TIM0_OC1_IRQChannel 10
+#define TIM0_IC12_IRQChannel 11
+#define TIM0_UP_IRQChannel 12
+#define PWM_OC123_IRQChannel 13
+#define PWM_EM_IRQChannel 14
+#define PWM_UP_IRQChannel 15
+#define I2C_IRQChannel 16
+#define SSP1_IRQChannel 17
+#define SSP0_IRQChannel 18
+#define UART2_IRQChannel 19
+#define UART1_IRQChannel 20
+#define UART0_IRQChannel 21
+#define CAN_IRQChannel 22
+#define USB_LP_IRQChannel 23
+#define USB_HP_IRQChannel 24
+#define ADC_IRQChannel 25
+#define DMA_IRQChannel 26
+#define EXTIT_IRQChannel 27
+#define MRCC_IRQChannel 28
+#define FLASHSMI_IRQChannel 29
+#define RTC_IRQChannel 30
+#define TB_IRQChannel 31
+
+/* FIQ channels */
+#define EXTIT_Line0_FIQChannel 0x00000001
+#define WATCHDOG_FIQChannel 0x00000002
+
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void EIC_DeInit(void);
+void EIC_IRQInit(EIC_IRQInitTypeDef* EIC_IRQInitStruct);
+void EIC_FIQInit(EIC_FIQInitTypeDef* EIC_FIQInitStruct);
+void EIC_IRQStructInit(EIC_IRQInitTypeDef* EIC_IRQInitStruct);
+void EIC_FIQStructInit(EIC_FIQInitTypeDef* EIC_FIQInitStruct);
+void EIC_IRQCmd(FunctionalState NewState);
+void EIC_FIQCmd(FunctionalState NewState);
+u8 EIC_GetCurrentIRQChannel(void);
+u8 EIC_GetCurrentIRQChannelPriority(void);
+void EIC_CurrentIRQPriorityConfig(u8 NewPriority);
+u8 EIC_GetCurrentFIQChannel(void);
+void EIC_ClearFIQPendingBit(u8 EIC_FIQChannel);
+
+#endif /* __75x_EIC_H */
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_extit.h
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_extit.h (rev 0)
+++ trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_extit.h 2008-02-24 22:10:13 UTC (rev 859)
@@ -0,0 +1,77 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : 75x_extit.h
+* Author : MCD Application Team
+* Date First Issued : 03/10/2006
+* Description : This file contains all the functions prototypes for the
+* EXTIT software library.
+********************************************************************************
+* History:
+* 07/17/2006 : V1.0
+* 03/10/2006 : V0.1
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __75x_EXTIT_H
+#define __75x_EXTIT_H
+
+/* Includes ------------------------------------------------------------------*/
+#include "75x_map.h"
+
+/* Exported types ------------------------------------------------------------*/
+/* EXTIT Trigger enumeration */
+typedef enum
+{
+ EXTIT_ITTrigger_Falling = 1,
+ EXTIT_ITTrigger_Rising
+}EXTITTrigger_TypeDef;
+
+/* EXTIT Init Structure definition */
+typedef struct
+{
+ u32 EXTIT_ITLine;
+ EXTITTrigger_TypeDef EXTIT_ITTrigger;
+ FunctionalState EXTIT_ITLineCmd;
+}EXTIT_InitTypeDef;
+
+/* Exported constants --------------------------------------------------------*/
+/* EXTIT Lines */
+#define EXTIT_ITLineNone 0x0000 /* No interrupt selected */
+#define EXTIT_ITLine0 0x0001 /* External interrupt line 0 */
+#define EXTIT_ITLine1 0x0002 /* External interrupt line 1 */
+#define EXTIT_ITLine2 0x0004 /* External interrupt line 2 */
+#define EXTIT_ITLine3 0x0008 /* External interrupt line 3 */
+#define EXTIT_ITLine4 0x0010 /* External interrupt line 4 */
+#define EXTIT_ITLine5 0x0020 /* External interrupt line 5 */
+#define EXTIT_ITLine6 0x0040 /* External interrupt line 6 */
+#define EXTIT_ITLine7 0x0080 /* External interrupt line 7 */
+#define EXTIT_ITLine8 0x0100 /* External interrupt line 8 */
+#define EXTIT_ITLine9 0x0200 /* External interrupt line 9 */
+#define EXTIT_ITLine10 0x0400 /* External interrupt line 10 */
+#define EXTIT_ITLine11 0x0800 /* External interrupt line 11 */
+#define EXTIT_ITLine12 0x1000 /* External interrupt line 12 */
+#define EXTIT_ITLine13 0x2000 /* External interrupt line 13 */
+#define EXTIT_ITLine14 0x4000 /* External interrupt line 14 */
+#define EXTIT_ITLine15 0x8000 /* External interrupt line 15 */
+
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+
+void EXTIT_DeInit(void);
+void EXTIT_Init(EXTIT_InitTypeDef* EXTIT_InitStruct);
+void EXTIT_StructInit(EXTIT_InitTypeDef* EXTIT_InitStruct);
+void EXTIT_GenerateSWInterrupt(u16 EXTIT_ITLine);
+FlagStatus EXTIT_GetFlagStatus(u16 EXTIT_ITLine);
+void EXTIT_ClearFlag(u16 EXTIT_ITLine);
+ITStatus EXTIT_GetITStatus(u16 EXTIT_ITLine);
+void EXTIT_ClearITPendingBit(u16 EXTIT_ITLine);
+
+#endif /* __75x_EXTIT_H */
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_gpio.h
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_gpio.h (rev 0)
+++ trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_gpio.h 2008-02-24 22:10:13 UTC (rev 859)
@@ -0,0 +1,120 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : 75x_gpio.h
+* Author : MCD Application Team
+* Date First Issued : 03/10/2006
+* Description : This file contains all the functions prototypes for the
+* GPIO software library.
+********************************************************************************
+* History:
+* 07/17/2006 : V1.0
+* 03/10/2006 : V0.1
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __75x_GPIO_H
+#define __75x_GPIO_H
+
+/* Includes ------------------------------------------------------------------*/
+#include "75x_map.h"
+
+/* Exported types ------------------------------------------------------------*/
+/* Configuration Mode enumeration */
+typedef enum
+{ GPIO_Mode_AIN = 1,
+ GPIO_Mode_IN_FLOATING,
+ GPIO_Mode_IPD,
+ GPIO_Mode_IPU,
+ GPIO_Mode_Out_OD,
+ GPIO_Mode_Out_PP,
+ GPIO_Mode_AF_OD,
+ GPIO_Mode_AF_PP
+}GPIOMode_TypeDef;
+
+/* GPIO Init structure definition */
+typedef struct
+{
+ u32 GPIO_Pin;
+ GPIOMode_TypeDef GPIO_Mode;
+}GPIO_InitTypeDef;
+
+/* Bit_SET and Bit_RESET enumeration */
+typedef enum
+{ Bit_RESET = 0,
+ Bit_SET
+}BitAction;
+
+
+/* Exported constants --------------------------------------------------------*/
+/* GPIO pins define */
+#define GPIO_Pin_None 0x00000000 /* No pin selected */
+#define GPIO_Pin_0 0x00000001 /* Pin 0 selected */
+#define GPIO_Pin_1 0x00000002 /* Pin 1 selected */
+#define GPIO_Pin_2 0x00000004 /* Pin 2 selected */
+#define GPIO_Pin_3 0x00000008 /* Pin 3 selected */
+#define GPIO_Pin_4 0x00000010 /* Pin 4 selected */
+#define GPIO_Pin_5 0x00000020 /* Pin 5 selected */
+#define GPIO_Pin_6 0x00000040 /* Pin 6 selected */
+#define GPIO_Pin_7 0x00000080 /* Pin 7 selected */
+#define GPIO_Pin_8 0x00000100 /* Pin 8 selected */
+#define GPIO_Pin_9 0x00000200 /* Pin 9 selected */
+#define GPIO_Pin_10 0x00000400 /* Pin 10 selected */
+#define GPIO_Pin_11 0x00000800 /* Pin 11 selected */
+#define GPIO_Pin_12 0x00001000 /* Pin 12 selected */
+#define GPIO_Pin_13 0x00002000 /* Pin 13 selected */
+#define GPIO_Pin_14 0x00004000 /* Pin 14 selected */
+#define GPIO_Pin_15 0x00008000 /* Pin 15 selected */
+#define GPIO_Pin_16 0x00010000 /* Pin 16 selected */
+#define GPIO_Pin_17 0x00020000 /* Pin 17 selected */
+#define GPIO_Pin_18 0x00040000 /* Pin 18 selected */
+#define GPIO_Pin_19 0x00080000 /* Pin 19 selected */
+#define GPIO_Pin_20 0x00100000 /* Pin 20 selected */
+#define GPIO_Pin_21 0x00200000 /* Pin 21 selected */
+#define GPIO_Pin_22 0x00400000 /* Pin 22 selected */
+#define GPIO_Pin_23 0x00800000 /* Pin 23 selected */
+#define GPIO_Pin_24 0x01000000 /* Pin 24 selected */
+#define GPIO_Pin_25 0x02000000 /* Pin 25 selected */
+#define GPIO_Pin_26 0x04000000 /* Pin 26 selected */
+#define GPIO_Pin_27 0x08000000 /* Pin 27 selected */
+#define GPIO_Pin_28 0x10000000 /* Pin 28 selected */
+#define GPIO_Pin_29 0x20000000 /* Pin 29 selected */
+#define GPIO_Pin_30 0x40000000 /* Pin 30 selected */
+#define GPIO_Pin_31 0x80000000 /* Pin 31 selected */
+#define GPIO_Pin_All 0xFFFFFFFF /* All pins selected */
+
+/* GPIO Remap define */
+#define GPIO_Remap_SMI_CS3_EN 0x23 /* SMI CS3 Enable */
+#define GPIO_Remap_SMI_CS2_EN 0x22 /* SMI CS2 Enable */
+#define GPIO_Remap_SMI_CS1_EN 0x21 /* SMI CS1 Enable */
+#define GPIO_Remap_SMI_EN 0x20 /* SMI Enable */
+#define GPIO_Remap_DBGOFF 0x45 /* JTAG Disable */
+#define GPIO_Remap_UART1 0x44 /* UART1 Alternate Function mapping */
+#define GPIO_Remap_UART2 0x43 /* UART2 Alternate Function mapping */
+#define GPIO_Remap_SSP1 0x42 /* SSP1 Alternate Function mapping */
+#define GPIO_Remap_TIM2 0x41 /* TIM2 Alternate Function mapping */
+#define GPIO_Remap_TIM0 0x40 /* TIM0 Alternate Function mapping */
+
+
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+
+void GPIO_DeInit(GPIO_TypeDef* GPIOx);
+void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct);
+void GPIO_StructInit(GPIO_InitTypeDef* GPIO_InitStruct);
+u32 GPIO_Read(GPIO_TypeDef* GPIOx);
+u8 GPIO_ReadBit(GPIO_TypeDef* GPIOx, u32 GPIO_Pin);
+void GPIO_Write(GPIO_TypeDef* GPIOx, u32 PortVal);
+void GPIO_WriteBit(GPIO_TypeDef* GPIOx,u32 GPIO_Pin, BitAction BitVal);
+void GPIO_PinMaskConfig(GPIO_TypeDef* GPIOx, u32 GPIO_Pin, FunctionalState NewState);
+u32 GPIO_GetPortMask(GPIO_TypeDef* GPIOx);
+void GPIO_PinRemapConfig(u16 GPIO_Remap, FunctionalState NewState);
+
+#endif /* __75x_GPIO_H */
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_i2c.h
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_i2c.h (rev 0)
+++ trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_i2c.h 2008-02-24 22:10:13 UTC (rev 859)
@@ -0,0 +1,115 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : 75x_i2c.h
+* Author : MCD Application Team
+* Date First Issued : 03/10/2006
+* Description : This file contains all the functions prototypes for the
+* I2C software library.
+********************************************************************************
+* History:
+* 07/17/2006 : V1.0
+* 03/10/2006 : V0.1
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+/* Define to prevent recursive inclusion ------------------------------------ */
+#ifndef __75x_I2C_H
+#define __75x_I2C_H
+
+/* Includes ----------------------------------------------------------------- */
+#include "75x_map.h"
+
+/* Exported types ----------------------------------------------------------- */
+/* I2C Init structure definition */
+typedef struct
+{
+ u32 I2C_CLKSpeed;
+ u16 I2C_OwnAddress;
+ u8 I2C_GeneralCall;
+ u8 I2C_Ack;
+}I2C_InitTypeDef;
+
+/* Exported constants --------------------------------------------------------*/
+/* General Call */
+#define I2C_GeneralCall_Enable 0x10
+#define I2C_GeneralCall_Disable 0xEF
+
+/* Acknowledgement */
+#define I2C_Ack_Enable 0x04
+#define I2C_Ack_Disable 0xFB
+
+/* I2C Flags */
+#define I2C_FLAG_SB 0x0001
+#define I2C_FLAG_M_SL 0x0002
+#define I2C_FLAG_ADSL 0x0004
+#define I2C_FLAG_BTF 0x0008
+#define I2C_FLAG_BUSY 0x0010
+#define I2C_FLAG_TRA 0x0020
+#define I2C_FLAG_ADD10 0x0040
+#define I2C_FLAG_EVF 0x0080
+#define I2C_FLAG_GCAL 0x0100
+#define I2C_FLAG_BERR 0x0200
+#define I2C_FLAG_ARLO 0x0400
+#define I2C_FLAG_STOPF 0x0800
+#define I2C_FLAG_AF 0x1000
+#define I2C_FLAG_ENDAD 0x2000
+#define I2C_FLAG_ACK 0x4000
+
+/* I2C Events */
+#define I2C_EVENT_SLAVE_ADDRESS_MATCHED ( I2C_FLAG_EVF | I2C_FLAG_BUSY |I2C_FLAG_ADSL)
+#define I2C_EVENT_SLAVE_BYTE_RECEIVED ( I2C_FLAG_EVF | I2C_FLAG_BUSY | I2C_FLAG_BTF )
+#define I2C_EVENT_SLAVE_BYTE_TRANSMITTED ( I2C_FLAG_EVF | I2C_FLAG_BUSY | I2C_FLAG_BTF | I2C_FLAG_TRA )
+#define I2C_EVENT_MASTER_MODE_SELECT ( I2C_FLAG_EVF | I2C_FLAG_BUSY | I2C_FLAG_M_SL | I2C_FLAG_SB )
+#define I2C_EVENT_MASTER_MODE_SELECTED ( I2C_FLAG_EVF | I2C_FLAG_BUSY | I2C_FLAG_M_SL | I2C_FLAG_ENDAD )
+#define I2C_EVENT_MASTER_BYTE_RECEIVED ( I2C_FLAG_EVF | I2C_FLAG_BUSY | I2C_FLAG_M_SL | I2C_FLAG_BTF )
+#define I2C_EVENT_MASTER_BYTE_TRANSMITTED ( I2C_FLAG_EVF | I2C_FLAG_BUSY | I2C_FLAG_M_SL | I2C_FLAG_BTF | I2C_FLAG_TRA )
+#define I2C_EVENT_MASTER_MODE_ADDRESS10 ( I2C_FLAG_EVF | I2C_FLAG_BUSY | I2C_FLAG_M_SL |I2C_FLAG_ADD10 )
+#define I2C_EVENT_SLAVE_STOP_DETECTED I2C_FLAG_STOPF
+#define I2C_EVENT_SLAVE_ACK_FAILURE ( I2C_FLAG_EVF | I2C_FLAG_BUSY | I2C_FLAG_BTF | I2C_FLAG_TRA | I2C_FLAG_AF)
+
+#define I2C_BUS_ERROR_DETECTED I2C_FLAG_BERR
+#define I2C_ARBITRATION_LOST I2C_FLAG_ARLO
+#define I2C_SLAVE_GENERAL_CALL (I2C_FLAG_BUSY | I2C_FLAG_GCAL)
+
+/* Master/Receiver Mode */
+#define I2C_MODE_TRANSMITTER 0x00
+#define I2C_MODE_RECEIVER 0x01
+
+/* I2C Registers offset */
+#define I2C_CR 0x00
+#define I2C_SR1 0x04
+#define I2C_SR2 0x08
+#define I2C_CCR 0x0C
+#define I2C_OAR1 0x10
+#define I2C_OAR2 0x14
+#define I2C_DR 0x18
+#define I2C_ECCR 0x1C
+
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+
+void I2C_DeInit(void);
+void I2C_Init(I2C_InitTypeDef* I2C_InitStruct);
+void I2C_StructInit(I2C_InitTypeDef* I2C_InitStruct);
+void I2C_Cmd(FunctionalState NewState);
+void I2C_GenerateSTART(FunctionalState NewState);
+void I2C_GenerateSTOP(FunctionalState NewState);
+void I2C_AcknowledgeConfig(FunctionalState NewState);
+void I2C_ITConfig(FunctionalState NewState);
+u16 I2C_GetLastEvent(void);
+ErrorStatus I2C_CheckEvent(u16 I2C_EVENT);
+void I2C_SendData(u8 Data);
+u8 I2C_ReceiveData(void);
+void I2C_Send7bitAddress(u8 Address, u8 Direction);
+u8 I2C_ReadRegister(u8 I2C_Register);
+FlagStatus I2C_GetFlagStatus(u16 I2C_FLAG);
+void I2C_ClearFlag(u16 I2C_FLAG, ...);
+
+#endif /* __75x_I2C_H */
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_lib.h
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_lib.h (rev 0)
+++ trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_lib.h 2008-02-24 22:10:13 UTC (rev 859)
@@ -0,0 +1,103 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : 75x_lib.h
+* Author : MCD Application Team
+* Date First Issued : 03/10/2006
+* Description : This file includes the peripherals header files in the
+* user application.
+********************************************************************************
+* History:
+* 07/17/2006 : V1.0
+* 03/10/2006 : V0.1
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __75x_LIB_H
+#define __75x_LIB_H
+
+/* Includes ------------------------------------------------------------------*/
+#include "75x_map.h"
+
+#ifdef _SMI
+ #include "75x_smi.h"
+#endif /*_SMI */
+
+#ifdef _CFG
+ #include "75x_cfg.h"
+#endif /*_CFG*/
+
+#ifdef _MRCC
+ #include "75x_mrcc.h"
+#endif /*_MRCC */
+
+#ifdef _ADC
+ #include "75x_adc.h"
+#endif /*_ADC */
+
+#ifdef _TB
+ #include "75x_tb.h"
+#endif /*_TB */
+
+#ifdef _TIM
+ #include "75x_tim.h"
+#endif /*_TIM */
+
+#ifdef _PWM
+ #include "75x_pwm.h"
+#endif /*_PWM */
+
+#ifdef _WDG
+ #include "75x_wdg.h"
+#endif /*_WDG */
+
+#ifdef _SSP
+ #include "75x_ssp.h"
+#endif /*_SSP */
+
+#ifdef _CAN
+ #include "75x_can.h"
+#endif /*_CAN */
+
+#ifdef _I2C
+ #include "75x_i2c.h"
+#endif /*_I2C */
+
+#ifdef _UART
+ #include "75x_uart.h"
+#endif /*_UART */
+
+#ifdef _GPIO
+ #include "75x_gpio.h"
+#endif /*_GPIO */
+
+#ifdef _DMA
+ #include "75x_dma.h"
+#endif /*_DMA */
+
+#ifdef _RTC
+ #include "75x_rtc.h"
+#endif /*_RTC */
+
+#ifdef _EXTIT
+ #include "75x_extit.h"
+#endif /*_EXTIT */
+
+#ifdef _EIC
+ #include "75x_eic.h"
+#endif /*_EIC */
+
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void debug(void);
+
+#endif /* __75x_LIB_H */
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_map.h
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_map.h (rev 0)
+++ trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/inc/75x_map.h 2008-02-24 22:10:13 UTC (rev 859)
@@ -0,0 +1,697 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : 75x_map.h
+* Author : MCD Application Team
+* Date First Issued : 03/10/2006
+* Description : This file contains all the peripheral register's definitions
+* and memory mapping.
+********************************************************************************
+* History:
+* 07/17/2006 : V1.0
+* 03/10/2006 : V0.1
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __75x_MAP_H
+#define __75x_MAP_H
+
+#ifndef EXT
+ #define EXT extern
+#endif /* EXT */
+
+/* Includes ------------------------------------------------------------------*/
+#include "75x_conf.h"
+#include "75x_type.h"
+
+/* Exported types ------------------------------------------------------------*/
+/******************************************************************************/
+/* IP registers structures */
+/******************************************************************************/
+
+/*------------------------ Analog to Digital Converter -----------------------*/
+typedef struct
+{
+ vu16 CLR0;
+ u16 EMPTY1;
+ vu16 CLR1;
+ u16 EMPTY2;
+ vu16 CLR2;
+ u16 EMPTY3;
+ vu16 CLR3;
+ u16 EMPTY4;
+ vu16 CLR4;
+ u16 EMPTY5;
+ vu16 TRA0;
+ u16 EMPTY6;
+ vu16 TRA1;
+ u16 EMPTY7;
+ vu16 TRA2;
+ u16 EMPTY8;
+ vu16 TRA3;
+ u16 EMPTY9;
+ vu16 TRB0;
+ u16 EMPTY10;
+ vu16 TRB1;
+ u16 EMPTY11;
+ vu16 TRB2;
+ u16 EMPTY12;
+ vu16 TRB3;
+ u16 EMPTY13;
+ vu16 DMAR;
+ u16 EMPTY14[7];
+ vu16 DMAE;
+ u16 EMPTY15 ;
+ vu16 PBR;
+ u16 EMPTY16;
+ vu16 IMR;
+ u16 EMPTY17;
+ vu16 D0;
+ u16 EMPTY18;
+ vu16 D1;
+ u16 EMPTY19;
+ vu16 D2;
+ u16 EMPTY20;
+ vu16 D3;
+ u16 EMPTY21;
+ vu16 D4;
+ u16 EMPTY22;
+ vu16 D5;
+ u16 EMPTY23;
+ vu16 D6;
+ u16 EMPTY24;
+ vu16 D7;
+ u16 EMPTY25;
+ vu16 D8;
+ u16 EMPTY26;
+ vu16 D9;
+ u16 EMPTY27;
+ vu16 D10;
+ u16 EMPTY28;
+ vu16 D11;
+ u16 EMPTY29;
+ vu16 D12;
+ u16 EMPTY30;
+ vu16 D13;
+ u16 EMPTY31;
+ vu16 D14;
+ u16 EMPTY32;
+ vu16 D15;
+ u16 EMPTY33;
+} ADC_TypeDef;
+
+/*------------------------ Controller Area Network ---------------------------*/
+typedef struct
+{
+ vu16 CRR;
+ u16 EMPTY1;
+ vu16 CMR;
+ u16 EMPTY2;
+ vu16 M1R;
+ u16 EMPTY3;
+ vu16 M2R;
+ u16 EMPTY4;
+ vu16 A1R;
+ u16 EMPTY5;
+ vu16 A2R;
+ u16 EMPTY6;
+ vu16 MCR;
+ u16 EMPTY7;
+ vu16 DA1R;
+ u16 EMPTY8;
+ vu16 DA2R;
+ u16 EMPTY9;
+ vu16 DB1R;
+ u16 EMPTY10;
+ vu16 DB2R;
+ u16 EMPTY11[27];
+} CAN_MsgObj_TypeDef;
+
+typedef struct
+{
+ vu16 CR;
+ u16 EMPTY1;
+ vu16 SR;
+ u16 EMPTY2;
+ vu16 ERR;
+ u16 EMPTY3;
+ vu16 BTR;
+ u16 EMPTY4;
+ vu16 IDR;
+ u16 EMPTY5;
+ vu16 TESTR;
+ u16 EMPTY6;
+ vu16 BRPR;
+ u16 EMPTY7[3];
+ CAN_MsgObj_TypeDef sMsgObj[2];
+ u16 EMPTY8[16];
+ vu16 TXR1R;
+ u16 EMPTY9;
+ vu16 TXR2R;
+ u16 EMPTY10[13];
+ vu16 ND1R;
+ u16 EMPTY11;
+ vu16 ND2R;
+ u16 EMPTY12[13];
+ vu16 IP1R;
+ u16 EMPTY13;
+ vu16 IP2R;
+ u16 EMPTY14[13];
+ vu16 MV1R;
+ u16 EMPTY15;
+ vu16 MV2R;
+ u16 EMPTY16;
+} CAN_TypeDef;
+
+/*--------------------------- Configuration Register -------------------------*/
+typedef struct
+{
+ vu32 GLCONF;
+} CFG_TypeDef;
+
+/*-------------------------------- DMA Controller ----------------------------*/
+typedef struct
+{
+ vu16 SOURCEL;
+ u16 EMPTY1;
+ vu16 SOURCEH;
+ u16 EMPTY2;
+ vu16 DESTL;
+ u16 EMPTY3;
+ vu16 DESTH;
+ u16 EMPTY4;
+ vu16 MAX;
+ u16 EMPTY5;
+ vu16 CTRL;
+ u16 EMPTY6;
+ vuc16 SOCURRH;
+ u16 EMPTY7;
+ vuc16 SOCURRL;
+ u16 EMPTY8;
+ vuc16 DECURRH;
+ u16 EMPTY9;
+ vuc16 DECURRL;
+ u16 EMPTY10;
+ vuc16 TCNT;
+ u16 EMPTY11;
+ vu16 LUBUFF;
+ u16 EMPTY12;
+} DMA_Stream_TypeDef;
+
+typedef struct
+{
+ vu16 MASK;
+ u16 EMPTY4;
+ vu16 CLR;
+ u16 EMPTY5;
+ vuc16 STATUS;
+ u16 EMPTY6;
+ vu16 LAST;
+ u16 EMPTY7;
+} DMA_TypeDef;
+
+/*----------------------- Enhanced Interrupt Controller ----------------------*/
+typedef struct
+{
+ vu32 ICR;
+ vuc32 CICR;
+ vu32 CIPR;
+ u32 EMPTY1;
+ vu32 FIER;
+ vu32 FIPR;
+ vu32 IVR;
+ vu32 FIR;
+ vu32 IER;
+ u32 EMPTY2[7];
+ vu32 IPR;
+ u32 EMPTY3[7];
+ vu32 SIRn[32];
+} EIC_TypeDef;
+
+/*------------------------- External Interrupt Controller --------------------*/
+typedef struct
+{
+ vu32 MR;
+ vu32 TSR;
+ vu32 SWIR;
+ vu32 PR;
+} EXTIT_TypeDef;
+
+/*-------------------------- General Purpose IO ports ------------------------*/
+typedef struct
+{
+ vu32 PC0;
+ vu32 PC1;
+ vu32 PC2;
+ vu32 PD;
+ vu32 PM;
+} GPIO_TypeDef;
+
+typedef struct
+{
+ vu32 REMAP0R;
+ vu32 REMAP1R;
+} GPIOREMAP_TypeDef;
+
+/*--------------------------------- I2C interface ----------------------------*/
+typedef struct
+{
+ vu8 CR;
+ u8 EMPTY1[3];
+ vu8 SR1;
+ u8 EMPTY2[3];
+ vu8 SR2;
+ u8 EMPTY3[3];
+ vu8 CCR;
+ u8 EMPTY4[3];
+ vu8 OAR1;
+ u8 EMPTY5[3];
+ vu8 OAR2;
+ u8 EMPTY6[3];
+ vu8 DR;
+ u8 EMPTY7[3];
+ vu8 ECCR;
+ u8 EMPTY8[3];
+} I2C_TypeDef;
+
+/*---------------------------- Power, Reset and Clocks -----------------------*/
+typedef struct
+{
+ vu32 CLKCTL;
+ vu32 RFSR;
+ vu32 PWRCTRL;
+ u32 EMPTY1;
+ vu32 PCLKEN;
+ vu32 PSWRES;
+ u32 EMPTY2[2];
+ vu32 BKP0;
+ vu32 BKP1;
+} MRCC_TypeDef;
+
+/*-------------------------------- Real Time Clock ---------------------------*/
+typedef struct
+{
+ vu16 CRH;
+ u16 EMPTY;
+ vu16 CRL;
+ u16 EMPTY1;
+ vu16 PRLH;
+ u16 EMPTY2;
+ vu16 PRLL;
+ u16 EMPTY3;
+ vu16 DIVH;
+ u16 EMPTY4;
+ vu16 DIVL;
+ u16 EMPTY5;
+ vu16 CNTH;
+ u16 EMPTY6;
+ vu16 CNTL;
+ u16 EMPTY7;
+ vu16 ALRH;
+ u16 EMPTY8;
+ vu16 ALRL;
+ u16 EMPTY9;
+} RTC_TypeDef;
+
+/*---------------------------- Serial Memory Interface -----------------------*/
+typedef struct
+{
+ vu32 CR1;
+ vu32 CR2;
+ vu32 SR;
+ vu32 TR;
+ vuc32 RR;
+} SMI_TypeDef;
+
+/*--------------------------------- Timer Base -------------------------------*/
+typedef struct
+{
+ vu16 CR;
+ u16 EMPTY1;
+ vu16 SCR;
+ u16 EMPTY2;
+ vu16 IMCR;
+ u16 EMPTY3[7];
+ vu16 RSR;
+ u16 EMPTY4;
+ vu16 RER;
+ u16 EMPTY5;
+ vu16 ISR;
+ u16 EMPTY6;
+ vu16 CNT;
+ u16 EMPTY7;
+ vu16 PSC;
+ u16 EMPTY8[3];
+ vu16 ARR;
+ u16 EMPTY9[13];
+ vu16 ICR1;
+ u16 EMPTY10;
+} TB_TypeDef;
+
+/*------------------------------------ TIM -----------------------------------*/
+typedef struct
+{
+ vu16 CR;
+ u16 EMPTY1;
+ vu16 SCR;
+ u16 EMPTY2;
+ vu16 IMCR;
+ u16 EMPTY3;
+ vu16 OMR1;
+ u16 EMPTY4[5];
+ vu16 RSR;
+ u16 EMPTY5;
+ vu16 RER;
+ u16 EMPTY6;
+ vu16 ISR;
+ u16 EMPTY7;
+ vu16 CNT;
+ u16 EMPTY8;
+ vu16 PSC;
+ u16 EMPTY9[3];
+ vu16 ARR;
+ u16 EMPTY10;
+ vu16 OCR1;
+ u16 EMPTY11;
+ vu16 OCR2;
+ u16 EMPTY12[9];
+ vu16 ICR1;
+ u16 EMPTY13;
+ vu16 ICR2;
+ u16 EMPTY14[9];
+ vu16 DMAB;
+ u16 EMPTY15;
+} TIM_TypeDef;
+
+/*------------------------------------ PWM -----------------------------------*/
+typedef struct
+{
+ vu16 CR;
+ u16 EMPTY1;
+ vu16 SCR;
+ u16 EMPTY2[3];
+ vu16 OMR1;
+ u16 EMPTY3;
+ vu16 OMR2;
+ u16 EMPTY4[3];
+ vu16 RSR;
+ u16 EMPTY5;
+ vu16 RER;
+ u16 EMPTY6;
+ vu16 ISR;
+ u16 EMPTY7;
+ vu16 CNT;
+ u16 EMPTY8;
+ vu16 PSC;
+ u16 EMPTY9;
+ vu16 RCR;
+ u16 EMPTY10;
+ vu16 ARR;
+ u16 EMPTY11;
+ vu16 OCR1;
+ u16 EMPTY12;
+ vu16 OCR2;
+ u16 EMPTY13;
+ vu16 OCR3;
+ u16 EMPTY14[15];
+ vu16 DTR;
+ u16 EMPTY15;
+ vu16 DMAB;
+ u16 EMPTY16;
+} PWM_TypeDef;
+
+/*----------------------- Synchronous Serial Peripheral ----------------------*/
+typedef struct
+{
+ vu32 CR0;
+ vu32 CR1;
+ vu32 DR;
+ vu32 SR;
+ vu32 PR;
+ vu32 IMSCR;
+ vu32 RISR;
+ vu32 MISR;
+ vu32 ICR;
+ vu32 DMACR;
+} SSP_TypeDef;
+
+/*---------------- Universal Asynchronous Receiver Transmitter ---------------*/
+typedef struct
+{
+ vu16 DR;
+ u16 EMPTY;
+ vu16 RSR;
+ u16 EMPTY1[9];
+ vu16 FR;
+ u16 EMPTY2;
+ vu16 BKR;
+ u16 EMPTY3[3];
+ vu16 IBRD;
+ u16 EMPTY4;
+ vu16 FBRD;
+ u16 EMPTY5;
+ vu16 LCR;
+ u16 EMPTY6;
+ vu16 CR;
+ u16 EMPTY7;
+ vu16 IFLS;
+ u16 EMPTY8;
+ vu16 IMSC;
+ u16 EMPTY9;
+ vu16 RIS;
+ u16 EMPTY10;
+ vu16 MIS;
+ u16 EMPTY11;
+ vu16 ICR;
+ u16 EMPTY12;
+ vu16 DMACR;
+ u16 EMPTY13;
+} UART_TypeDef;
+
+/*---------------------------------- WATCHDOG --------------------------------*/
+typedef struct
+{
+ vu16 CR;
+ u16 EMPTY1;
+ vu16 PR;
+ u16 EMPTY2;
+ vu16 VR;
+ u16 EMPTY3;
+ vu16 CNT;
+ u16 EMPTY4;
+ vu16 SR;
+ u16 EMPTY5;
+ vu16 MR;
+ u16 EMPTY6;
+ vu16 KR;
+ u16 EMPTY7;
+} WDG_TypeDef;
+
+/*******************************************************************************
+* Peripherals' Base addresses
+*******************************************************************************/
+
+#define SRAM_BASE 0x40000000
+
+#define CONFIG_BASE 0x60000000
+
+#define SMIR_BASE 0x90000000
+
+#define PERIPH_BASE 0xFFFF0000
+
+#define CFG_BASE (CONFIG_BASE + 0x0010)
+#define MRCC_BASE (CONFIG_BASE + 0x0020)
+#define ADC_BASE (PERIPH_BASE + 0x8400)
+#define TB_BASE (PERIPH_BASE + 0x8800)
+#define TIM0_BASE (PERIPH_BASE + 0x8C00)
+#define TIM1_BASE (PERIPH_BASE + 0x9000)
+#define TIM2_BASE (PERIPH_BASE + 0x9400)
+#define PWM_BASE (PERIPH_BASE + 0x9800)
+#define WDG_BASE (PERIPH_BASE + 0xB000)
+#define SSP0_BASE (PERIPH_BASE + 0xB800)
+#define SSP1_BASE (PERIPH_BASE + 0xBC00)
+#define CAN_BASE (PERIPH_BASE + 0xC400)
+#define I2C_BASE (PERIPH_BASE + 0xCC00)
+#define UART0_BASE (PERIPH_BASE + 0xD400)
+#define UART1_BASE (PERIPH_BASE + 0xD800)
+#define UART2_BASE (PERIPH_BASE + 0xDC00)
+#define GPIO0_BASE (PERIPH_BASE + 0xE400)
+#define GPIOREMAP_BASE (PERIPH_BASE + 0xE420)
+#define GPIO1_BASE (PERIPH_BASE + 0xE440)
+#define GPIO2_BASE (PERIPH_BASE + 0xE480)
+#define DMA_BASE (PERIPH_BASE + 0xECF0)
+#define DMA_Stream0_BASE (PERIPH_BASE + 0xEC00)
+#define DMA_Stream1_BASE (PERIPH_BASE + 0xEC40)
+#define DMA_Stream2_BASE (PERIPH_BASE + 0xEC80)
+#define DMA_Stream3_BASE (PERIPH_BASE + 0xECC0)
+#define RTC_BASE (PERIPH_BASE + 0xF000)
+#define EXTIT_BASE (PERIPH_BASE + 0xF400)
+#define EIC_BASE (PERIPH_BASE + 0xF800)
+
+/*******************************************************************************
+ IPs' declaration
+*******************************************************************************/
+
+/*------------------- Non Debug Mode -----------------------------------------*/
+
+#ifndef DEBUG
+ #define SMI ((SMI_TypeDef *) SMIR_BASE)
+ #define CFG ((CFG_TypeDef *) CFG_BASE)
+ #define MRCC ((MRCC_TypeDef *) MRCC_BASE)
+ #define ADC ((ADC_TypeDef *) ADC_BASE)
+ #define TB ((TB_TypeDef *) TB_BASE)
+ #define TIM0 ((TIM_TypeDef *) TIM0_BASE)
+ #define TIM1 ((TIM_TypeDef *) TIM1_BASE)
+ #define TIM2 ((TIM_TypeDef *) TIM2_BASE)
+ #define PWM ((PWM_TypeDef *) PWM_BASE)
+ #define WDG ((WDG_TypeDef *) WDG_BASE)
+ #define SSP0 ((SSP_TypeDef *) SSP0_BASE)
+ #define SSP1 ((SSP_TypeDef *) SSP1_BASE)
+ #define CAN ((CAN_TypeDef *) CAN_BASE)
+ #define I2C ((I2C_TypeDef *) I2C_BASE)
+ #define UART0 ((UART_TypeDef *) UART0_BASE)
+ #define UART1 ((UART_TypeDef *) UART1_BASE)
+ #define UART2 ((UART_TypeDef *) UART2_BASE)
+ #define GPIO0 ((GPIO_TypeDef *) ...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-24 22:07:21
|
Revision: 858
http://can.svn.sourceforge.net/can/?rev=858&view=rev
Author: akhe
Date: 2008-02-24 14:07:18 -0800 (Sun, 24 Feb 2008)
Log Message:
-----------
Fixed IAR CAN sample for STR 73x
Modified Paths:
--------------
trunk/firmware/arm/str/cantest_str73x_iar/73x_conf.h
trunk/firmware/arm/str/cantest_str73x_iar/73x_it.c
trunk/firmware/arm/str/cantest_str73x_iar/cantest.dep
trunk/firmware/arm/str/cantest_str73x_iar/cantest.ewd
trunk/firmware/arm/str/cantest_str73x_iar/cantest.ewp
trunk/firmware/arm/str/cantest_str73x_iar/main.c
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/source/73x_can.c
trunk/firmware/arm/str/vcp_str75x_iar/project/Virtual Com Port.dep
trunk/firmware/arm/str/vcp_str75x_iar/project/settings/Virtual Com Port.wsdt
Added Paths:
-----------
trunk/firmware/arm/str/cantest_str73x_iar/Kopia av main.c
trunk/firmware/arm/str/cantest_str73x_iar/settings/GettingStarted.cspy.bat
trunk/firmware/arm/str/cantest_str73x_iar/settings/GettingStarted.dbgdt
trunk/firmware/arm/str/cantest_str73x_iar/settings/GettingStarted.dni
trunk/firmware/arm/str/cantest_str73x_iar/settings/GettingStarted.wsdt
trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest..wsdt
trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.cspy.bat
trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.dbgdt
trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.dni
trunk/firmware/arm/str/cantest_str73x_iar/settings/cantest.wsdt
trunk/firmware/arm/str/cantest_str75x_iar/
trunk/firmware/arm/str/cantest_str75x_iar/73x_conf.h
trunk/firmware/arm/str/cantest_str75x_iar/73x_it.c
trunk/firmware/arm/str/cantest_str75x_iar/73x_lcd.c
trunk/firmware/arm/str/cantest_str75x_iar/73x_lcd.h
trunk/firmware/arm/str/cantest_str75x_iar/Readme.txt
trunk/firmware/arm/str/cantest_str75x_iar/Startup/
trunk/firmware/arm/str/cantest_str75x_iar/Startup/73x_init.s
trunk/firmware/arm/str/cantest_str75x_iar/Startup/73x_vect.s
trunk/firmware/arm/str/cantest_str75x_iar/Startup/75x_init.s
trunk/firmware/arm/str/cantest_str75x_iar/Startup/75x_vect.s
trunk/firmware/arm/str/cantest_str75x_iar/cantest.dep
trunk/firmware/arm/str/cantest_str75x_iar/cantest.ewd
trunk/firmware/arm/str/cantest_str75x_iar/cantest.ewp
trunk/firmware/arm/str/cantest_str75x_iar/cantest.eww
trunk/firmware/arm/str/cantest_str75x_iar/linker/
trunk/firmware/arm/str/cantest_str75x_iar/linker/STR73x_FLASH.icf
trunk/firmware/arm/str/cantest_str75x_iar/linker/STR73x_RAM.icf
trunk/firmware/arm/str/cantest_str75x_iar/linker/STR75x_FLASH.icf
trunk/firmware/arm/str/cantest_str75x_iar/linker/STR75x_RAM.icf
trunk/firmware/arm/str/cantest_str75x_iar/linker/STR75x_SMI.icf
trunk/firmware/arm/str/cantest_str75x_iar/main.c
trunk/firmware/arm/str/cantest_str75x_iar/settings/
trunk/firmware/arm/str/cantest_str75x_iar/settings/GettingStarted.cspy.bat
trunk/firmware/arm/str/cantest_str75x_iar/settings/GettingStarted.dbgdt
trunk/firmware/arm/str/cantest_str75x_iar/settings/GettingStarted.dni
trunk/firmware/arm/str/cantest_str75x_iar/settings/GettingStarted.wsdt
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest..wsdt
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.cspy.bat
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dbgdt
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.dni
trunk/firmware/arm/str/cantest_str75x_iar/settings/cantest.wsdt
trunk/firmware/arm/str/cantest_str75x_iar/str75x_lib/
trunk/firmware/arm/str/vcp_str75x_iar/Software Driver/alternativ.inf
Modified: trunk/firmware/arm/str/cantest_str73x_iar/73x_conf.h
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_iar/73x_conf.h 2008-02-17 21:39:29 UTC (rev 857)
+++ trunk/firmware/arm/str/cantest_str73x_iar/73x_conf.h 2008-02-24 22:07:18 UTC (rev 858)
@@ -1,9 +1,9 @@
-/******************** (C) COPYRIGHT 2005 STMicroelectronics **********************
+/******************** (C) COPYRIGHT 2005 STMicroelectronics ********************
* File Name : 73x_conf.h
* Author : MCD Application Team
* Date First Issued : 09/27/2005 : V1.0
* Description : Library configuration file
-**********************************************************************************
+********************************************************************************
* History:
* 09/27/2005 : V1.0
**********************************************************************************
@@ -23,12 +23,12 @@
#define DEBUG
-/*************************FLASHR************************/
+/*************************FLASHR*************************/
//#define _FLASHR
-/*************************FLASHPR***********************/
+/*************************FLASHPR************************/
//#define _FLASHPR
/*************************PRCCU*************************/
-//#define _PRCCU
+#define _PRCCU
/*************************ARB***************************/
//#define _ARB
/*************************CFG*************************/
@@ -67,10 +67,10 @@
/*************************WIU*************************/
//#define _WIU
/*************************CAN*************************/
-//#define _CAN
-//#define _CAN0
-//#define _CAN1
-//#define _CAN2
+#define _CAN
+#define _CAN0
+#define _CAN1
+#define _CAN2
/*************************PWM*************************/
//#define _PWM
//#define _PWM0
@@ -104,18 +104,14 @@
/*************************CMU*************************/
#define _CMU
/*************************ADC*************************/
-#define _ADC
+//#define _ADC
/*************************EIC*************************/
#define _EIC
-
-
#define Main_Oscillator 4000000 /* Value of the Main Quartz in Hz*/
#define RC_oscillator 2340000 /* Typical Reset Value of the Internal RC in Hz */
-
#endif /* __73x_CONF_H */
/******************* (C) COPYRIGHT 2005 STMicroelectronics *****END OF FILE****/
-
Modified: trunk/firmware/arm/str/cantest_str73x_iar/73x_it.c
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_iar/73x_it.c 2008-02-17 21:39:29 UTC (rev 857)
+++ trunk/firmware/arm/str/cantest_str73x_iar/73x_it.c 2008-02-24 22:07:18 UTC (rev 858)
@@ -24,18 +24,31 @@
*********************************************************************************/
/* Standard include ------------------------------------------------------------*/
#include "73x_lib.h"
-
-extern u16 Conversion_Value;
-u16 AnalogWatchdog_Result;
-
-
-
/* Include of other module interface headers -----------------------------------*/
/* Local includes --------------------------------------------------------------*/
/* Private typedef -------------------------------------------------------------*/
/* Private define --------------------------------------------------------------*/
+enum {
+ CAN0_TX_MSGOBJ = 0,
+ CAN0_RX_MSGOBJ = 1
+};
+
+enum {
+ CAN1_TX_MSGOBJ = 0,
+ CAN1_RX_MSGOBJ = 1
+};
+
+enum {
+ CAN2_TX_MSGOBJ = 0,
+ CAN2_RX_MSGOBJ = 1
+};
+
/* Private macro ---------------------------------------------------------------*/
/* Private variables -----------------------------------------------------------*/
+extern canmsg RxCan0Msg;
+extern canmsg RxCan1Msg;
+extern canmsg RxCan2Msg;
+
/* Private function prototypes -------------------------------------------------*/
/* Interface functions ---------------------------------------------------------*/
/* Private functions -----------------------------------------------------------*/
@@ -44,9 +57,9 @@
/*******************************************************************************
* Function Name : Undefined_Handler
* Description : This function Undefined instruction exception.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void Undefined_Handler(void)
{
@@ -54,9 +67,9 @@
/*******************************************************************************
* Function Name : FIQ_Handler
* Description : This function handles FIQ exception.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void FIQ_Handler(void)
{
@@ -64,9 +77,9 @@
/*******************************************************************************
* Function Name : SWI_Handler
* Description : This function handles SW exception.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void SWI_Handler(void)
{
@@ -74,9 +87,9 @@
/*******************************************************************************
* Function Name : Prefetch_Handler
* Description : This function handles preftetch abort exception.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void Prefetch_Handler(void)
{
@@ -84,9 +97,9 @@
/*******************************************************************************
* Function Name : Abort_Handler
* Description : This function handles data abort exception.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void Abort_Handler(void)
{
@@ -94,9 +107,9 @@
/*******************************************************************************
* Function Name : PRCCUCMU_IRQHandler
* Description : This function handlesthe PRCCU and the CMU interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void PRCCUCMU_IRQHandler(void)
{
@@ -105,9 +118,9 @@
/*******************************************************************************
* Function Name : EXTIT01_IRQHandler
* Description : This function handles External line1 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT01_IRQHandler (void)
{
@@ -116,9 +129,9 @@
/*******************************************************************************
* Function Name : EXTIT02_IRQHandler
* Description : This function handles External line2 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT02_IRQHandler (void)
{
@@ -127,9 +140,9 @@
/*******************************************************************************
* Function Name : EXTIT03_IRQHandler
* Description : This function handles External line3 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT03_IRQHandler (void)
{
@@ -138,9 +151,9 @@
/*******************************************************************************
* Function Name : EXTIT04_IRQHandler
* Description : This function handles External line 4 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT04_IRQHandler (void)
{
@@ -149,9 +162,9 @@
/*******************************************************************************
* Function Name : EXTIT05_IRQHandler
* Description : This function handles External line 5 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT05_IRQHandler (void)
{
@@ -160,9 +173,9 @@
/*******************************************************************************
* Function Name : EXTIT06_IRQHandler
* Description : This function handles External line 6 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT06_IRQHandler (void)
{
@@ -171,9 +184,9 @@
/*******************************************************************************
* Function Name : EXTIT07_IRQHandler
* Description : This function handles External line7 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT07_IRQHandler (void)
{
@@ -182,9 +195,9 @@
/*******************************************************************************
* Function Name : EXTIT08_IRQHandler
* Description : This function handles External line8 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT08_IRQHandler (void)
{
@@ -193,9 +206,9 @@
/*******************************************************************************
* Function Name : EXTIT09_IRQHandler
* Description : This function handles External line9 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT09_IRQHandler (void)
{
@@ -204,9 +217,9 @@
/*******************************************************************************
* Function Name : EXTIT10_IRQHandler
* Description : This function handles External line10 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT10_IRQHandler (void)
{
@@ -215,9 +228,9 @@
/*******************************************************************************
* Function Name : EXTIT11_IRQHandler
* Description : This function handles External line11 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT11_IRQHandler (void)
{
@@ -226,9 +239,9 @@
/*******************************************************************************
* Function Name : EXTIT12_IRQHandler
* Description : This function handles External line12 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT12_IRQHandler (void)
{
@@ -237,9 +250,9 @@
/*******************************************************************************
* Function Name : EXTIT13_IRQHandler
* Description : This function handles External line13 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT13_IRQHandler (void)
{
@@ -248,9 +261,9 @@
/*******************************************************************************
* Function Name : EXTIT14_IRQHandler
* Description : This function handles External line14 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT14_IRQHandler (void)
{
@@ -259,9 +272,9 @@
/*******************************************************************************
* Function Name : EXTIT15_IRQHandler
* Description : This function handles External line15 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void EXTIT15_IRQHandler (void)
{
@@ -270,9 +283,9 @@
/*******************************************************************************
* Function Name : DMATRERR_IRQHandler
* Description : This function handles the DMA transfer error interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void DMATRERR_IRQHandler (void)
{
@@ -281,9 +294,9 @@
/*******************************************************************************
* Function Name : TIM1_IRQHandler
* Description : This function handles the TIM1 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void TIM1_IRQHandler (void)
{
@@ -292,9 +305,9 @@
/*******************************************************************************
* Function Name : TIM2_IRQHandler
* Description : This function handles the TIM2 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void TIM2_IRQHandler (void)
{
@@ -303,9 +316,9 @@
/*******************************************************************************
* Function Name : TIM3_IRQHandler
* Description : This function handles the TIM3 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void TIM3_IRQHandler (void)
{
@@ -314,9 +327,9 @@
/*******************************************************************************
* Function Name : TIM4_IRQHandler
* Description : This function handles the TIM4 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void TIM4_IRQHandler (void)
{
@@ -325,9 +338,9 @@
/*******************************************************************************
* Function Name : TB0_IRQHandler
* Description : This function handles the TB0 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void TB0_IRQHandler (void)
{
@@ -336,9 +349,9 @@
/*******************************************************************************
* Function Name : TB1_IRQHandler
* Description : This function handles the TB1 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void TB1_IRQHandler (void)
{
@@ -347,9 +360,9 @@
/*******************************************************************************
* Function Name : TB2_IRQHandler
* Description : This function handles the TB2 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void TB2_IRQHandler (void)
{
@@ -358,9 +371,9 @@
/*******************************************************************************
* Function Name : TIM5_IRQHandler
* Description : This function handles the TIM5 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void TIM5_IRQHandler (void)
{
@@ -369,9 +382,9 @@
/*******************************************************************************
* Function Name : TIM6_IRQHandler
* Description : This function handles the TIM6 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void TIM6_IRQHandler (void)
{
@@ -380,9 +393,9 @@
/*******************************************************************************
* Function Name : TIM7_IRQHandler
* Description : This function handles the TIM7 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void TIM7_IRQHandler (void)
{
@@ -391,9 +404,9 @@
/*******************************************************************************
* Function Name : TIM8_IRQHandler
* Description : This function handles the TIM8 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void TIM8_IRQHandler (void)
{
@@ -402,9 +415,9 @@
/*******************************************************************************
* Function Name : TIM9_IRQHandler
* Description : This function handles the TIM9 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void TIM9_IRQHandler (void)
{
@@ -414,9 +427,9 @@
/*******************************************************************************
* Function Name : UART2_IRQHandler
* Description : This function handles the UART2 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void UART2_IRQHandler (void)
{
@@ -425,9 +438,9 @@
/*******************************************************************************
* Function Name : UART3_IRQHandler
* Description : This function handles the UART3 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void UART3_IRQHandler (void)
{
@@ -437,9 +450,9 @@
/*******************************************************************************
* Function Name : FlashEOP_IRQHandler
* Description : This function handles the FLASH end of program interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void FLASHEOP_IRQHandler (void)
{
@@ -448,9 +461,9 @@
/*******************************************************************************
* Function Name : PWM0_IRQHandler
* Description : This function handles the PWM0 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void PWM0_IRQHandler (void)
{
@@ -459,9 +472,9 @@
/*******************************************************************************
* Function Name : PWM1_IRQHandler
* Description : This function handles the PWM1 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void PWM1_IRQHandler (void)
{
@@ -470,9 +483,9 @@
/*******************************************************************************
* Function Name : PWM2_IRQHandler
* Description : This function handles the PWM2 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void PWM2_IRQHandler (void)
{
@@ -481,9 +494,9 @@
/*******************************************************************************
* Function Name : PWM3_IRQHandler
* Description : This function handles the PWM3 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void PWM3_IRQHandler (void)
{
@@ -492,9 +505,9 @@
/*******************************************************************************
* Function Name : PWM4_IRQHandler
* Description : This function handles the PWM4 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void PWM4_IRQHandler (void)
{
@@ -503,9 +516,9 @@
/*******************************************************************************
* Function Name : PWM5_IRQHandler
* Description : This function handles the PWM5 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void PWM5_IRQHandler (void)
{
@@ -514,9 +527,9 @@
/*******************************************************************************
* Function Name : WIU_IRQHandler
* Description : This function handles the wake-up system interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void WIU_IRQHandler (void)
{
@@ -525,9 +538,9 @@
/*******************************************************************************
* Function Name : WDGWUT_IRQHandler
* Description : This function handles the watchdog and the wakeup timer interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void WDGWUT_IRQHandler (void)
{
@@ -536,9 +549,9 @@
/*******************************************************************************
* Function Name : BSPI0_IRQHandler
* Description : This function handles the BSPI0 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void BSPI0_IRQHandler (void)
{
@@ -547,9 +560,9 @@
/*******************************************************************************
* Function Name : BSPI1_IRQHandler
* Description : This function handles the BSPI1 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void BSPI1_IRQHandler (void)
{
@@ -558,9 +571,9 @@
/*******************************************************************************
* Function Name : BSPI2_IRQHandler
* Description : This function handles the BSPI2 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void BSPI2_IRQHandler (void)
{
@@ -569,9 +582,9 @@
/*******************************************************************************
* Function Name : UART0_IRQHandler
* Description : This function handles the UART0 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void UART0_IRQHandler (void)
{
@@ -580,9 +593,9 @@
/*******************************************************************************
* Function Name : UART1_IRQHandler
* Description : This function handles the UART1 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void UART1_IRQHandler (void)
{
@@ -591,9 +604,9 @@
/*******************************************************************************
* Function Name : I2C0ITERR_IRQHandler
* Description : This function handles the I2C0 and DMA Error Interrupt requests
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void I2C0ITERR_IRQHandler (void)
{
@@ -602,9 +615,9 @@
/*******************************************************************************
* Function Name : I2C1ITERR_IRQHandler
* Description : This function handles the I2C1 and DMA Error Interrupt requests.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void I2C1ITERR_IRQHandler (void)
{
@@ -613,9 +626,9 @@
/*******************************************************************************
* Function Name : I2C0ITDDC_IRQHandler
* Description : This function handles the I2C0 and the General Interrupt requests.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void I2C0ITDDC_IRQHandler (void)
{
@@ -624,9 +637,9 @@
/*******************************************************************************
* Function Name : I2C1ITDDC_IRQHandler
* Description : This function handles the I2C1 and the General Interrupt requests
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void I2C1ITDDC_IRQHandler (void)
{
@@ -635,43 +648,114 @@
/*******************************************************************************
* Function Name : CAN0_IRQHandler
* Description : This function handles the CAN0 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void CAN0_IRQHandler (void)
{
+ u32 msgobj;
+
+
+ if (CAN0->IDR == 0x8000) /* status interrupt */
+ (void)CAN0->SR; /* read the status register to clear */
+ else if ((CAN0->IDR >= 1) && (CAN0->IDR <= 32))
+ {
+ /* Get the message object number that caused the interrupt to occur*/
+ switch (msgobj = CAN0->IDR - 1)
+ {
+ case CAN0_TX_MSGOBJ:
+ GPIO_BitWrite(GPIO0, GPIO_PIN_7 , Bit_SET);
+ CAN_ReleaseTxMessage(CAN0, msgobj);
+ break;
+
+ case CAN0_RX_MSGOBJ:
+ CAN_ReceiveMessage(CAN0, msgobj, FALSE, &RxCan0Msg);
+ CAN_ReleaseRxMessage(CAN0, msgobj);
+ break;
+
+ default:
+ CAN_ReleaseMessage(CAN0, msgobj);
+ }
+ }
}
/*******************************************************************************
* Function Name : CAN1_IRQHandler
* Description : This function handles the CAN1 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void CAN1_IRQHandler (void)
{
+ u32 msgobj;
+
+ if (CAN1->IDR == 0x8000) /*status interrupt*/
+ (void)CAN1->SR; /* read the status register to clear*/
+ else if ((CAN1->IDR >= 1) && (CAN1->IDR <= 32))
+ {
+ /* get the message object number that caused the interrupt to occur*/
+ switch (msgobj = CAN1->IDR - 1)
+ {
+ case CAN1_TX_MSGOBJ:
+ GPIO_BitWrite(GPIO0, GPIO_PIN_9 , Bit_SET);
+ CAN_ReleaseTxMessage(CAN1, msgobj);
+ break;
+
+ case CAN1_RX_MSGOBJ:
+ CAN_ReceiveMessage(CAN1, msgobj, FALSE, &RxCan1Msg);
+ CAN_ReleaseRxMessage(CAN1, msgobj);
+ break;
+
+ default:
+ CAN_ReleaseMessage(CAN1, msgobj);
+ }
+ }
}
/*******************************************************************************
* Function Name : CAN2_IRQHandler
* Description : This function handles the CAN2 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void CAN2_IRQHandler (void)
{
+ u32 msgobj;
+
+
+ if (CAN2->IDR == 0x8000) /* status interrupt*/
+ (void)CAN2->SR; /* read the status register to clear*/
+ else if (CAN2->IDR >= 1 && CAN2->IDR <= 32)
+ {
+ /* get the message object number that caused the interrupt to occur*/
+ switch (msgobj = CAN2->IDR - 1)
+ {
+ case CAN2_TX_MSGOBJ:
+ GPIO_BitWrite(GPIO0, GPIO_PIN_11 , Bit_SET);
+ CAN_ReleaseTxMessage(CAN2, msgobj);
+ break;
+
+ case CAN2_RX_MSGOBJ:
+ CAN_ReceiveMessage(CAN2, msgobj, FALSE, &RxCan2Msg);
+ CAN_ReleaseRxMessage(CAN2, msgobj);
+ break;
+
+ default:
+ CAN_ReleaseMessage(CAN2, msgobj);
+ }
+ }
}
/*******************************************************************************
* Function Name : DMA0_IRQHandler
* Description : This function handles the DMA0 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void DMA0_IRQHandler (void)
{
@@ -680,9 +764,9 @@
/*******************************************************************************
* Function Name : DMA1_IRQHandler
* Description : This function handles the DMA1 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void DMA1_IRQHandler (void)
{
@@ -691,9 +775,9 @@
/*******************************************************************************
* Function Name : DMA2_IRQHandler
* Description : This function handles the DMA2 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void DMA2_IRQHandler (void)
{
@@ -702,9 +786,9 @@
/*******************************************************************************
* Function Name : DMA3_IRQHandler
* Description : This function handles the DMA3 interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void DMA3_IRQHandler (void)
{
@@ -713,28 +797,20 @@
/*******************************************************************************
* Function Name : ADC_IRQHandler
* Description : This function handles the ADC interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void ADC_IRQHandler (void)
{
- Conversion_Value = ADC_GetConversionValue(ADC_CHANNEL0);
- /* Clear EOC Interrupt pending bit */
- ADC_FlagClear (ADC_FLAG_EOC );
- /* Clear the last Analog Watchdog0 comparison result */
- ADC_FlagClear (ADC_FLAG_AnalogWatchdog0_HighThresold | ADC_FLAG_AnalogWatchdog0_LowThresold);
-
- ADC_ConversionCmd (ADC_ConversionStop);
-
}
/*******************************************************************************
* Function Name : RTC_IRQHandler
* Description : This function handles the RTC interrupt request.
-* Input : detail input parameters
-* Output : detail output parameters
-* Return : detail return value
+* Input : None
+* Output : None
+* Return : None
*******************************************************************************/
void RTC_IRQHandler (void)
{
@@ -742,4 +818,3 @@
/******************* (C) COPYRIGHT 2005 STMicroelectronics *****END OF FILE****/
-
Added: trunk/firmware/arm/str/cantest_str73x_iar/Kopia av main.c
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_iar/Kopia av main.c (rev 0)
+++ trunk/firmware/arm/str/cantest_str73x_iar/Kopia av main.c 2008-02-24 22:07:18 UTC (rev 858)
@@ -0,0 +1,509 @@
+/******************** (C) COPYRIGHT 2005 STMicroelectronics **********************
+* File Name : main.c
+* Author : MCD Application Team
+* Date First Issued : 09/27/2005 : V1.0
+* Description : Main program body
+**********************************************************************************
+* History:
+* 09/27/2005 : V1.0
+**********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+* CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*********************************************************************************/
+
+/* Standard include ------------------------------------------------------------*/
+#include "73x_lib.h"
+#include "73x_rtc.h"
+#include "73x_prccu.h"
+#include "73x_can.h"
+#include "73x_lcd.h"
+/* Include of other module interface headers -----------------------------------*/
+/* Local includes --------------------------------------------------------------*/
+/* Private typedef -------------------------------------------------------------*/
+/* Private define --------------------------------------------------------------*/
+/* Private macro ---------------------------------------------------------------*/
+/* Private variables -----------------------------------------------------------*/
+u16 Conversion_Value = 0;
+u8 buffer[11] = "ADC: ";
+
+/* Peripherals Init Structures */
+GPIO_InitTypeDef GPIO0_InitStructure;
+GPIO_InitTypeDef GPIO3_InitStructure;
+ADC_InitTypeDef ADC_InitStructure;
+CMU_InitTypeDef CMU_InitStructure;
+RTC_InitTypeDef RTC_InitStructure;
+
+/* Private function prototypes -------------------------------------------------*/
+unsigned int millier(unsigned int val){
+ return((val/1000) + 0x30);
+}
+unsigned int centaine(unsigned int val){
+ unsigned int valCopy;
+ valCopy = val % 1000;
+ return((valCopy/100) + 0x30);
+}
+unsigned int dixaine(unsigned int val){
+ unsigned int valCopy;
+ valCopy = val % 100;
+ return((valCopy/10) + 0x30);
+}
+unsigned int unite(unsigned int val){
+ unsigned int valCopy;
+ valCopy = val % 100;
+ return((valCopy%10) + 0x30);
+}
+
+void MCLK_Config (void);
+unsigned int get1000Digit( unsigned int val );
+unsigned int get100Digit( unsigned int val );
+unsigned int get10Digit( unsigned int val );
+unsigned int get1Digit( unsigned int val );
+
+GPIO_InitTypeDef CAN0_RX;
+GPIO_InitTypeDef CAN0_TX;
+GPIO_InitTypeDef CAN1_RX;
+GPIO_InitTypeDef CAN1_TX;
+GPIO_InitTypeDef CAN2_RX;
+GPIO_InitTypeDef CAN2_TX;
+GPIO_InitTypeDef Led_Config;
+
+// buffer for receive messages
+canmsg RxCan0Msg;
+
+// array of pre-defined transmit messages
+canmsg TxCan0Msg[ 2 ] = {
+ { CAN_STD_ID,
+ 0x123,
+ 4,
+ { 0x01, 0x02, 0x04, 0x08 } },
+ { CAN_EXT_ID,
+ 0x12345678,
+ 8,
+ { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 } }
+};
+
+// buffer for receive messages
+canmsg RxCan1Msg;
+
+// array of pre-defined transmit messages
+canmsg TxCan1Msg[2] = {
+ { CAN_STD_ID, 0x123, 4, { 0x01, 0x02, 0x04, 0x08 } },
+ { CAN_EXT_ID, 0x12345678, 8, { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 } }
+};
+
+// buffer for receive messages
+canmsg RxCan2Msg;
+
+// array of pre-defined transmit messages
+canmsg TxCan2Msg[2] = {
+ { CAN_STD_ID, 0x123, 4, { 0x01, 0x02, 0x04, 0x08 } },
+ { CAN_EXT_ID, 0x12345678, 8, { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 } }
+};
+
+// used message object numbers
+enum {
+ CAN0_TX_MSGOBJ = 0,
+ CAN0_RX_MSGOBJ = 1
+};
+enum {
+ CAN1_TX_MSGOBJ = 0,
+ CAN1_RX_MSGOBJ = 1
+};
+enum {
+ CAN2_TX_MSGOBJ = 0,
+ CAN2_RX_MSGOBJ = 1
+};
+
+
+// define the LEDs
+#define LD1 GPIO_PIN_0
+#define LD2 GPIO_PIN_1
+#define LD3 GPIO_PIN_2
+#define LD4 GPIO_PIN_3
+#define LD5 GPIO_PIN_4
+#define LD6 GPIO_PIN_5
+#define LD7 GPIO_PIN_6
+#define LD8 GPIO_PIN_7
+#define LD9 GPIO_PIN_8
+#define LD10 GPIO_PIN_9
+#define LD11 GPIO_PIN_10
+#define LD12 GPIO_PIN_11
+#define LD13 GPIO_PIN_12
+#define LD14 GPIO_PIN_13
+#define LD15 GPIO_PIN_14
+#define LD16 GPIO_PIN_15
+
+int main(void)
+{
+u32 CPIO_Value;
+#ifdef DEBUG
+ debug();
+#endif
+
+/*-------------------------------------GPIO0 --------------------------------*/
+ /* GPIO0 Clock Enable */
+ CFG_PeripheralClockConfig(CFG_CLK_GPIO0, ENABLE);
+
+ /* GPIO0 Configuration */
+ GPIO0_InitStructure.GPIO_Mode = GPIO_Mode_OUT_PP;
+ GPIO0_InitStructure.GPIO_Pins = GPIO_PIN_ALL ;
+ GPIO_Init (GPIO0, &GPIO0_InitStructure);
+
+/*-----------------------------------GPIO3 ----------------------------------*/
+ /* GPIO3 Clock Enable */
+ CFG_PeripheralClockConfig(CFG_CLK_GPIO3, ENABLE);
+
+ /* GPIO3 Configuration */
+ GPIO3_InitStructure.GPIO_Mode = GPIO_Mode_HI_AIN_TRI;
+ GPIO3_InitStructure.GPIO_Pins = GPIO_PIN_ALL ;
+ GPIO_Init (GPIO3, &GPIO3_InitStructure);
+
+/*-----------------------------------EIC-------------------------------------*/
+ /* EIC Clock Enable */
+ CFG_PeripheralClockConfig(CFG_CLK_EIC, ENABLE);
+ /* EIC Config */
+ EIC_IRQChannelPriorityConfig( ADC_IRQChannel, 1);
+ EIC_IRQChannelConfig( ADC_IRQChannel , ENABLE );
+ EIC_IRQCmd(ENABLE);
+
+/*---------------------------------CMU---------------------------------------*/
+ /* CMU Initialization */
+ CMU_DeInit( );
+ CMU_StructInit(&CMU_InitStructure);
+ /* Enable the external oscillator */
+ CMU_InitStructure.CMU_CKSEL0 = CMU_CKSEL0_CKOSC;
+ CMU_Init(&CMU_InitStructure);
+ /* Disable DIV2 */
+ PRCCU->CFR &= 0x7FFF;
+
+/*---------------------------------ADC---------------------------------------*/
+ /* ADC Clock Enable */
+ CFG_PeripheralClockConfig(CFG_CLK_ADC, ENABLE);
+
+ /* ADC Configuration */
+ ADC_DeInit ();
+ ADC_StructInit(&ADC_InitStructure);
+ ADC_InitStructure.ADC_Calibration = ADC_Calibration_ON;
+ ADC_InitStructure.ADC_CalibAverage = ADC_CalibAverage_Enable;
+ ADC_InitStructure.ADC_AutoClockOff = ADC_AutoClockOff_Disable ;
+ ADC_InitStructure.ADC_ConversionMode = ADC_ConversionMode_Scan ;
+ ADC_InitStructure.ADC_SamplingPrescaler = 0x2;
+ ADC_InitStructure.ADC_ConversionPrescaler = 0x4;
+ ADC_InitStructure.ADC_FirstChannel = ADC_CHANNEL0 ;
+ ADC_InitStructure.ADC_ChannelNumber = 1;
+ ADC_Init (&ADC_InitStructure);
+
+
+ /* EOC interrupt Enable */
+ ADC_ITConfig(ADC_IT_EOC, ENABLE);
+ /* Enable ADC */
+ ADC_Cmd(ENABLE);
+
+ /*---------------------------------RTC---------------------------------------*/
+ // (clock:0-->9) fOSC=4Mhz/RTCP=(2,4,8,16,32,64,128,256,512,1024)
+ // -->EXTCLK=(4M,2M,1M,500K,250K,125K,62.5K,31.25K,15.625K,7.812K)
+
+ // RTC Clock Enable
+ CFG_PeripheralClockConfig( CFG_CLK_RTC , ENABLE );
+
+ // RTC Interrupt Config
+ RTC_ITConfig( RTC_IT_SEC | RTC_IT_ALA | RTC_IT_OV, ENABLE );
+
+ // RTC Configuration
+ RTC_InitStructure.RTC_Alarm = 6; // 0xFFFFFFFF;
+ RTC_InitStructure.RTC_Counter = 0; // 0xFFFFFFFA;
+ // configure RTC=1S ( RCK=1000000/64=CKL32=15625Hz )
+ // 8MHz/64 = 125000 = 0x1E848
+ RTC_InitStructure.RTC_Prescaler = 0x3D09; // == 15625
+ //RTC_InitStructure.RTC_Prescaler = 0x1E848; // 0x3D09; // == 15625
+
+ RTC_Init( &RTC_InitStructure );
+
+ /*---------------------------------CAN---------------------------------------*/
+ CFG_PeripheralClockConfig( CFG_CLK_CAN0, ENABLE );
+ CFG_PeripheralClockConfig( CFG_CLK_CAN1, ENABLE );
+
+ CFG_PeripheralClockConfig( CFG_CLK_GPIO0, ENABLE );
+ CFG_PeripheralClockConfig( CFG_CLK_GPIO1, ENABLE );
+ CFG_PeripheralClockConfig( CFG_CLK_GPIO2, ENABLE );
+ CFG_PeripheralClockConfig( CFG_CLK_GPIO6, ENABLE );
+
+ CAN0_RX.GPIO_Mode = GPIO_Mode_IN_TRI_TTL;
+ CAN0_RX.GPIO_Pins = GPIO_PIN_14;
+ GPIO_Init( GPIO1, &CAN0_RX );
+
+ CAN0_TX.GPIO_Mode = GPIO_Mode_AF_PP;
+ CAN0_TX.GPIO_Pins = GPIO_PIN_15;
+ GPIO_Init( GPIO1, &CAN0_TX );
+
+ CAN1_RX.GPIO_Mode = GPIO_Mode_IN_TRI_TTL;
+ CAN1_RX.GPIO_Pins = GPIO_PIN_1;
+ GPIO_Init( GPIO2, &CAN1_RX );
+
+ CAN1_TX.GPIO_Mode = GPIO_Mode_AF_PP;
+ CAN1_TX.GPIO_Pins = GPIO_PIN_2;
+ GPIO_Init( GPIO2, &CAN1_TX );
+
+ CAN_InitTypeDef CANInit = { 0x0, CAN_BITRATE_500K };
+
+ // initialize the CAN at a standard bitrate, interrupts disabled
+ CAN_Init( CAN0, &CANInit );
+
+ // configure the message objects
+ CAN_EnterInitMode( CAN0, CAN_CR_CCE );
+ CAN_InvalidateAllMsgObj( CAN0 );
+ CAN_SetTxMsgObj( CAN0, CAN0_TX_MSGOBJ, CAN_STD_ID );
+ CAN_SetRxMsgObj( CAN0, CAN0_RX_MSGOBJ, CAN_STD_ID, 0, CAN_LAST_STD_ID, TRUE );
+ CAN_LeaveInitMode( CAN0 );
+
+
+ /*---------------------------------LCD---------------------------------------*/
+
+ /* LCD Configuration */
+ LCD_Init();
+ LCD_LineClear(1);
+ LCD_LineClear(2);
+ LCD_SetPosCur(1,1);
+ /* Display some text on LCD: Line 1 */
+ LCD_SendStringByStep("STR730 CANTEST", 1, 1);
+ LCD_Wait (40000);
+ LCD_SetPosCur(2,1);
+ /* Display "ADC:" message on LCD: Line 2 */
+ LCD_SendStringByStep(buffer,2, 1);
+
+ while(1)
+ {
+ // send a pre-defined data frame
+ CAN_SendMessage( CAN0, CAN0_TX_MSGOBJ, &TxCan0Msg[0] );
+
+ // wait until end of transmission
+ CAN_WaitEndOfTx( CAN0 );
+
+ // release the TX message object
+ CAN_ReleaseTxMessage(CAN0, CAN0_TX_MSGOBJ);
+
+ // Check for a data frame
+ if ( CAN_ReceiveMessage( CAN0, CAN0_RX_MSGOBJ, FALSE, &RxCan0Msg ) ) {
+
+ // Test Received Msg
+ if ( ( RxCan0Msg.IdType == CAN_STD_ID ) &&
+ ( RxCan0Msg.Id == 0x321) &&
+ ( RxCan0Msg.Dlc == 4 ) &&
+ ( RxCan0Msg.Data[ 0 ] == 0x01 ) &&
+ ( RxCan0Msg.Data[ 1 ] == 0x02 ) &&
+ ( RxCan0Msg.Data[ 2 ] == 0x04 ) &&
+ ( RxCan0Msg.Data[ 3 ] == 0x08 ) ){
+
+
+
+ }
+
+ // Release the RX message object
+ CAN_ReleaseRxMessage(CAN0, CAN0_RX_MSGOBJ);
+
+ } // Received frame
+
+
+ /* Start ADC conversion */
+ ADC_ConversionCmd (ADC_ConversionStart);
+ buffer[8] = unite(Conversion_Value);
+ buffer[7] = dixaine(Conversion_Value);
+ buffer[6] = centaine(Conversion_Value);
+ buffer[5] = millier(Conversion_Value);
+ buffer[9] = 0;
+ /* Display ADC conversion Value on LCD */
+ LCD_SendStringByStep(&buffer[5],2, 5);
+ CPIO_Value = 0;
+
+ for(u32 i = (u32)((float)Conversion_Value/60); i; i--)
+ {
+ CPIO_Value <<= 1;
+ CPIO_Value |= 1;
+ }
+ GPIO_WordWrite(GPIO0,CPIO_Value);
+
+ }
+ }
+
+////////////////////////////////////////////////////////////////////////////////
+// get1000Digit
+//
+
+unsigned int get1000Digit( unsigned int val )
+{
+ return ( ( val / 1000 ) + 0x30 );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// get100Digit
+//
+
+unsigned int get100Digit( unsigned int val )
+{
+ unsigned int valCopy;
+ valCopy = val % 1000;
+ return ( (valCopy / 100 ) + 0x30 );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// get10Digit
+//
+
+unsigned int get10Digit( unsigned int val )
+{
+ unsigned int valCopy;
+ valCopy = val % 100;
+ return ( ( valCopy / 10 ) + 0x30 );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// get1Digit
+//
+
+unsigned int get1Digit( unsigned int val )
+{
+ unsigned int valCopy;
+ valCopy = val % 100;
+ return ( ( valCopy % 10 ) + 0x30 );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// wait
+//
+
+void wait( void )
+{
+ u32 i;
+
+ for (i=100000L; i!=0 ; i-- ) {}
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// MCLK_Config
+//
+
+void MCLK_Config (void)
+{
+
+ PRCCU_InitTypeDef Clock;
+ CMU_InitTypeDef ClockInit;
+
+ ClockInit.CMU_RCOscControl = 0x0D; // RC OSC Adjust
+ ClockInit.CMU_EndCountValue = 0x0F; //
+ ClockInit.CMU_FreqRef_High = 0xFF; //
+ ClockInit.CMU_FreqRef_Low = 0xFE; //
+
+ ClockInit.CMU_CKSEL0 = CMU_CKSEL0_CKOSC; // Clock for CLOCK1 (4MHz)
+ ClockInit.CMU_CKSEL1 = CMU_CKSEL1_CKPLL; // Clock for Freq. Meter (8MHz)
+ ClockInit.CMU_CKSEL2 = CMU_CKSEL2_CKOSC; // Clock to drive CMU logic
+
+ CMU_Lock( DISABLE );
+ CMU_Init( &ClockInit );
+
+ // Init. Power Reset Clock unit
+ // 4 MHz * 12 / 6 = 8 MHz = CLOCK2
+ Clock.PRCCU_DIV2 = DISABLE;
+ Clock.PRCCU_MCLKSRC_SRC = PRCCU_MCLKSRC_PLL; // Use PLL in
+ Clock.PRCCU_PLLDIV = PRCCU_PLLDIV_6;
+ Clock.PRCCU_PLLMUL = PRCCU_PLLMUL_12;
+
+ PRCCU_Init( &Clock );
+ PRCCU_SetExtClkDiv(4);
+
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Modified: trunk/firmware/arm/str/cantest_str73x_iar/cantest.dep
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_iar/cantest.dep 2008-02-17 21:39:29 UTC (rev 857)
+++ trunk/firmware/arm/str/cantest_str73x_iar/cantest.dep 2008-02-24 22:07:18 UTC (rev 858)
@@ -2,320 +2,302 @@
<project>
<fileVersion>2</fileVersion>
- <fileChecksum>1441629299</fileChecksum>
+ <fileChecksum>632056546</fileChecksum>
<configuration>
<name>Debug</name>
<outputs>
- <file>$TOOLKIT_DIR$\inc\DLib_Product.h</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_eic.o</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_it.pbi</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_lcd.o</file>
- <file>$TOOLKIT_DIR$\lib\dl4t_tl_in.a</file>
+ <file>$PROJ_DIR$\str73x_lib\source\73x_cfg.c</file>
+ <file>$PROJ_DIR$\str73x_lib\include\73x_gpio.h</file>
+ <file>$TOOLKIT_DIR$\inc\DLib_Product_string.h</file>
+ <file>$PROJ_DIR$\str73x_lib\source\73x_prccu.c</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_rtc.o</file>
<file>$PROJ_DIR$\Debug\Obj\main.o</file>
- <file>$TOOLKIT_DIR$\lib\shs_l.a</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_cmu.pbi</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_can.pbi</file>
+ <file>$PROJ_DIR$\Startup\73x_init.s</file>
+ <file>$PROJ_DIR$\str73x_lib\source\73x_adc.c</file>
+ <file>$PROJ_DIR$\str73x_lib\source\73x_lib.c</file>
+ <file>$PROJ_DIR$\str73x_lib\include\73x_cmu.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_prccu.o</file>
+ <file>$PROJ_DIR$\str73x_lib\include\73x_type.h</file>
<file>$PROJ_DIR$\Debug\Obj\73x_cfg.pbi</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_cmu.pbi</file>
- <file>$TOOLKIT_DIR$\inc\DLib_Threads.h</file>
- <file>$PROJ_DIR$\Debug\Obj\main.pbi</file>
- <file>$PROJ_DIR$\str73x_lib\include\73x_rtc.h</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_lib.pbi</file>
- <file>$TOOLKIT_DIR$\inc\DLib_Config_Normal.h</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_lcd.pbi</file>
<file>$PROJ_DIR$\str73x_lib\include\73x_can.h</file>
+ <file>$TOOLKIT_DIR$\inc\DLib_Defaults.h</file>
<file>$PROJ_DIR$\str73x_lib\include\73x_adc.h</file>
- <file>$PROJ_DIR$\str73x_lib\include\73x_cmu.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_can.o</file>
+ <file>$PROJ_DIR$\str73x_lib\include\73x_lib.h</file>
<file>$PROJ_DIR$\Debug\Obj\73x_it.o</file>
- <file>$PROJ_DIR$\str73x_lib\source\73x_can.c</file>
- <file>$PROJ_DIR$\str73x_lib\include\73x_map.h</file>
+ <file>$PROJ_DIR$\main.c</file>
+ <file>$PROJ_DIR$\73x_lcd.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_eic.o</file>
+ <file>$PROJ_DIR$\str73x_lib\include\73x_eic.h</file>
+ <file>$TOOLKIT_DIR$\lib\rt4t_al.a</file>
+ <file>$TOOLKIT_DIR$\inc\xencoding_limits.h</file>
+ <file>$PROJ_DIR$\73x_it.c</file>
+ <file>$PROJ_DIR$\str73x_lib\source\73x_cmu.c</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_vect.o</file>
+ <file>$PROJ_DIR$\str73x_lib\source\73x_gpio.c</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_rtc.pbi</file>
+ <file>$PROJ_DIR$\Debug\Obj\73x_lcd.pbi</file>
+ <file>$PROJ_DIR$\Debug\Obj\main.pbi</file>
+ <file>$TOOLKIT_DIR$\inc\ycheck.h</file>
+ <file>$PROJ_DIR$\Debug\Obj\cantest.pbd</file>
+ <file>$TOOLKIT_DIR$\lib\shs_l.a</file>
<file>$PROJ_DIR$\Debug\Obj\73x_adc.pbi</file>
+ <file>$PROJ_DIR$\str73x_lib\source\73x_eic.c</file>
+ <file>$TOOLKIT_DIR$\lib\dl4t_tl_in.a</file>
+ <file>$TOOLKIT_DIR$\inc\DLib_Product.h</file>
+ <file>$TOOLKIT_DIR$\inc\DLib_Config_Normal.h</file>
+ <file>$PROJ_DIR$\Startup\73x_vect.s</file>
<file>$PROJ_DIR$\Debug\Obj\73x_cmu.o</file>
- <file>$PROJ_DIR$\str73x_lib\include\73x_type.h</file>
- <file>$TOOLKIT_DIR$\inc\yvals.h</file>
- <file>$TOOLKIT_DIR$\inc\DLib_Product_string.h</file>
- <file>$PROJ_DIR$\Debug\Obj\73x_eic.pbi</file>
- <file>$PROJ_DIR$\Debug\Exe\cant...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-17 21:39:31
|
Revision: 857
http://can.svn.sourceforge.net/can/?rev=857&view=rev
Author: akhe
Date: 2008-02-17 13:39:29 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
Added USB Bootloader firmware for str75x
Added Paths:
-----------
trunk/firmware/arm/str/bootloader_str75x/
trunk/firmware/arm/str/bootloader_str75x/Software Applet/
trunk/firmware/arm/str/bootloader_str75x/Software Applet/Readme.txt
trunk/firmware/arm/str/bootloader_str75x/Software Applet/images/
trunk/firmware/arm/str/bootloader_str75x/Software Applet/images/STR750-Eval_Audio Speaker.dfu
trunk/firmware/arm/str/bootloader_str75x/Software Applet/images/STR750-Eval_Joystick Mouse.dfu
trunk/firmware/arm/str/bootloader_str75x/Software Applet/images/STR750-Eval_Microphone.dfu
trunk/firmware/arm/str/bootloader_str75x/Software Applet/images/STR750-Eval_Virtual Com Port.dfu
trunk/firmware/arm/str/bootloader_str75x/Software Applet/setup.exe
trunk/firmware/arm/str/bootloader_str75x/include/
trunk/firmware/arm/str/bootloader_str75x/include/75x_conf.h
trunk/firmware/arm/str/bootloader_str75x/include/hw_config.h
trunk/firmware/arm/str/bootloader_str75x/include/usb_conf.h
trunk/firmware/arm/str/bootloader_str75x/include/usb_desc.h
trunk/firmware/arm/str/bootloader_str75x/include/usb_prop.h
trunk/firmware/arm/str/bootloader_str75x/include/usb_pwr.h
trunk/firmware/arm/str/bootloader_str75x/project/
trunk/firmware/arm/str/bootloader_str75x/project/EWARM/
trunk/firmware/arm/str/bootloader_str75x/project/EWARM/75x_init.s
trunk/firmware/arm/str/bootloader_str75x/project/EWARM/75x_vect.s
trunk/firmware/arm/str/bootloader_str75x/project/EWARM/DFU.ewd
trunk/firmware/arm/str/bootloader_str75x/project/EWARM/DFU.ewp
trunk/firmware/arm/str/bootloader_str75x/project/EWARM/DFU.eww
trunk/firmware/arm/str/bootloader_str75x/project/EWARM/init_tab.s
trunk/firmware/arm/str/bootloader_str75x/project/EWARM/lnkarm_flash.xcl
trunk/firmware/arm/str/bootloader_str75x/source/
trunk/firmware/arm/str/bootloader_str75x/source/75x_it.c
trunk/firmware/arm/str/bootloader_str75x/source/hw_config.c
trunk/firmware/arm/str/bootloader_str75x/source/main.c
trunk/firmware/arm/str/bootloader_str75x/source/usb_desc.c
trunk/firmware/arm/str/bootloader_str75x/source/usb_istr.c
trunk/firmware/arm/str/bootloader_str75x/source/usb_prop.c
trunk/firmware/arm/str/bootloader_str75x/source/usb_pwr.c
Added: trunk/firmware/arm/str/bootloader_str75x/Software Applet/Readme.txt
===================================================================
--- trunk/firmware/arm/str/bootloader_str75x/Software Applet/Readme.txt (rev 0)
+++ trunk/firmware/arm/str/bootloader_str75x/Software Applet/Readme.txt 2008-02-17 21:39:29 UTC (rev 857)
@@ -0,0 +1,57 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : Readme.txt
+* Author : MCD Application Team
+* Date First Issued : 10/01/2006
+* Description : Description of the PC APPLI DfuSe -
+ : DFU STMicroelectronics Extension.
+********************************************************************************
+* History:
+* 10/01/2006 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+Directory contents
+==================
+
+ - Setup.exe Install file PC DFU application
+ + images Directory containing STR7/9 demos images
+
+How to use it
+=============
+
+ 1- Run "Setup.exe" to install the PC APPLI DfuSe program to the folder of your choice
+ (default path: C:\Program Files\STMicroelectronics\DfuSe)
+ The directory contents the following files :
+
+ - DfuSeDemo.exe Sample GUI for DFU demonstration
+ - DfuFileMgr.exe GUI helping people to make DFU files from S19, Hex, bin
+ - STDFU.dll Dll that issues basic DFU and HID for DFU requests
+ - STDFUPRT.dll Dll that implements Protocol for upload and download.
+ - STDFUFiles.dll Dll that implements .dfu files.
+ - STTub203.sys Driver to be loaded for demoboard
+ - STTubeDevice203.dll Dll layer for easier driver access
+ - STDFU.inf Configuration file for driver
+
+ 2- Load your firmware project using your prefered Toolchain and load the DFU image
+ using JTAG for the first time.
+
+ For STR91x , you can use also CAPS Software and download the DFU CAPS image included
+ in the "images" directory using the flashlink ( BANK1 Must be remapped at 0 at
+ boot time).
+
+ 3- Run the Board and then Connect your USB cable, The first time you have to
+ Install your device with the driver and the inf file already included in the install
+ directory.
+
+ Please note this inf file and the GUI sample are configured only
+ for devices in DFU mode (VID 0x0483, PID 0xDF11)
+
+ 4- Use it ! : Upgrade your board using the included images and then "Leave DFU Mode"
+
+******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE******
\ No newline at end of file
Added: trunk/firmware/arm/str/bootloader_str75x/Software Applet/images/STR750-Eval_Audio Speaker.dfu
===================================================================
(Binary files differ)
Property changes on: trunk/firmware/arm/str/bootloader_str75x/Software Applet/images/STR750-Eval_Audio Speaker.dfu
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/firmware/arm/str/bootloader_str75x/Software Applet/images/STR750-Eval_Joystick Mouse.dfu
===================================================================
(Binary files differ)
Property changes on: trunk/firmware/arm/str/bootloader_str75x/Software Applet/images/STR750-Eval_Joystick Mouse.dfu
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/firmware/arm/str/bootloader_str75x/Software Applet/images/STR750-Eval_Microphone.dfu
===================================================================
(Binary files differ)
Property changes on: trunk/firmware/arm/str/bootloader_str75x/Software Applet/images/STR750-Eval_Microphone.dfu
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/firmware/arm/str/bootloader_str75x/Software Applet/images/STR750-Eval_Virtual Com Port.dfu
===================================================================
(Binary files differ)
Property changes on: trunk/firmware/arm/str/bootloader_str75x/Software Applet/images/STR750-Eval_Virtual Com Port.dfu
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/firmware/arm/str/bootloader_str75x/Software Applet/setup.exe
===================================================================
(Binary files differ)
Property changes on: trunk/firmware/arm/str/bootloader_str75x/Software Applet/setup.exe
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/firmware/arm/str/bootloader_str75x/include/75x_conf.h
===================================================================
--- trunk/firmware/arm/str/bootloader_str75x/include/75x_conf.h (rev 0)
+++ trunk/firmware/arm/str/bootloader_str75x/include/75x_conf.h 2008-02-17 21:39:29 UTC (rev 857)
@@ -0,0 +1,118 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : 75x_conf.h
+* Author : MCD Application Team
+* Date First Issued : 10/01/2006 : V1.0
+* Description : Library configuration file.
+********************************************************************************
+* History:
+* 10/01/2006 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __75x_CONF_H
+#define __75x_CONF_H
+
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Comment the line below to compile the library in release mode */
+
+#ifdef __IAR_SYSTEMS_ICC__ /* IAR Compiler */
+#define RAM_exe __ramfunc
+#define ARM_exe __arm
+#define inline inline
+#endif
+
+#ifdef __CC_ARM /* ARM Compiler */
+#define RAM_exe
+#define ARM_exe
+#define inline __inline
+#endif
+
+
+/************************************* SMI ************************************/
+#define _SMI
+
+/************************************* CFG ************************************/
+#define _CFG
+
+/************************************* MRCC ************************************/
+#define _MRCC
+
+/************************************* ADC ************************************/
+//#define _ADC
+
+/************************************* TB *************************************/
+//#define _TB
+
+/************************************* TIM ************************************/
+//#define _TIM
+//#define _TIM0
+//#define _TIM1
+//#define _TIM2
+
+/************************************* PWM ************************************/
+//#define _PWM
+
+/************************************* WDG ************************************/
+#define _WDG
+
+/************************************* SSP ************************************/
+//#define _SSP
+//#define _SSP0
+//#define _SSP1
+
+/************************************* CAN ************************************/
+//#define _CAN
+
+/************************************* I2C ************************************/
+//#define _I2C
+
+/************************************* UART ***********************************/
+//#define _UART
+//#define _UART0
+//#define _UART1
+//#define _UART2
+
+/************************************* GPIO ***********************************/
+#define _GPIO
+//#define _GPIO0
+//#define _GPIO1
+#define _GPIO2
+//#define _GPIOREMAP
+
+/************************************* DMA ************************************/
+//#define _DMA
+//#define _DMA_Stream0
+//#define _DMA_Stream1
+//#define _DMA_Stream2
+//#define _DMA_Stream3
+
+/************************************* RTC ************************************/
+//#define _RTC
+
+/************************************* EXTIT **********************************/
+#define _EXTIT
+
+/************************************* EIC ************************************/
+#define _EIC
+
+/* Comment the following line, depending on the external Quartz oscillator used
+ in your application */
+#define Main_Oscillator 4000000 /* 4 MHz Quartz oscillator used */
+//#define Main_Oscillator 8000000 /* 8 MHz Quartz oscillator used */
+
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+
+#endif /* __75x_CONF_H */
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
+
Added: trunk/firmware/arm/str/bootloader_str75x/include/hw_config.h
===================================================================
--- trunk/firmware/arm/str/bootloader_str75x/include/hw_config.h (rev 0)
+++ trunk/firmware/arm/str/bootloader_str75x/include/hw_config.h 2008-02-17 21:39:29 UTC (rev 857)
@@ -0,0 +1,73 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : hw_config.h
+* Author : MCD Application Team
+* Date First Issued : 10/01/2006 : V1.0
+* Description : Hardware Configuration & Setup
+********************************************************************************
+* History:
+* 10/01/2006 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __HW_CONFIG_H
+#define __HW_CONFIG_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+typedef struct
+{
+ vu32 CR0;
+ vu32 CR1;
+ vu32 DR0;
+ vu32 DR1;
+ vu32 AR;
+ vu32 ER;
+} FLASHR_TypeDef;
+
+typedef struct
+{
+ vu32 NVWPAR;
+ vu32 EMPTY;
+ vu32 NVAPR0;
+ vu32 NVAPR1;
+} FLASHPR_TypeDef;
+
+/* Exported constants --------------------------------------------------------*/
+#define FLASHR_BASE 0x20100000
+#define FLASHPR_BASE 0x2010DFB0
+#define ApplicationAddress 0x20004000
+
+
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void Set_System(void);
+void Set_USBClock(void);
+void Enter_LowPowerMode(void);
+void Leave_LowPowerMode(void);
+void USB_Cable_Config (FunctionalState NewState);
+void USB_Interrupts_Config(void);
+
+void DFU_Button_Config(void);
+u8 DFU_Button_Read(void);
+
+void Reset_Device(void);
+
+void Internal_FLASH_SectorErase(u32 Sectors);
+void Internal_FLASH_WordWrite(u32 Address, u32 Data);
+void Internal_FLASH_WritePrConfig(u32 Xsectors, FunctionalState NewState);
+u32 Internal_FLASH_SectorMask(u32 Address);
+
+void SMI_FLASH_Init(void);
+void SMI_FLASH_SectorErase(u32 Address);
+void SMI_FLASH_WordWrite(u32 Address,u32 Data);
+void SMI_FLASH_PageWrite(u32 Address,u32* wBuffer);
+/* External variables --------------------------------------------------------*/
+
+#endif /*__HW_CONFIG_H*/
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/bootloader_str75x/include/usb_conf.h
===================================================================
--- trunk/firmware/arm/str/bootloader_str75x/include/usb_conf.h (rev 0)
+++ trunk/firmware/arm/str/bootloader_str75x/include/usb_conf.h 2008-02-17 21:39:29 UTC (rev 857)
@@ -0,0 +1,104 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_conf.h
+* Author : MCD Application Team
+* Date First Issued : 10/01/2006 : V1.0
+* Description : Device Firmware Upgrade (DFU) configuration file
+********************************************************************************
+* History:
+* 10/01/2006 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_CONF_H
+#define __USB_CONF_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+/* External variables --------------------------------------------------------*/
+
+#define STR7xx
+#define STR75x
+/*-------------------------------------------------------------*/
+/* EP_NUM */
+/* defines how many endpoints are used by the device */
+/*-------------------------------------------------------------*/
+#define EP_NUM (1)
+
+/*-------------------------------------------------------------*/
+/* -------------- Buffer Description Table -----------------*/
+/*-------------------------------------------------------------*/
+/* buffer table base address */
+/* buffer table base address */
+#define BTABLE_ADDRESS (0x00)
+
+/* EP0 */
+/* rx/tx buffer base address */
+#define ENDP0_RXADDR (0x10)
+#define ENDP0_TXADDR (0x50)
+
+
+/*-------------------------------------------------------------*/
+/* ------------------- ISTR events -------------------------*/
+/*-------------------------------------------------------------*/
+/* IMR_MSK */
+/* mask defining which events has to be handled */
+/* by the device application software */
+#define IMR_MSK (CNTR_CTRM | \
+ CNTR_WKUPM | \
+ CNTR_SUSPM | \
+ CNTR_ERRM | \
+ CNTR_SOFM | \
+ CNTR_ESOFM | \
+ CNTR_RESETM \
+ )
+
+/* CTR service routines */
+/* associated to defined endpoints */
+#define EP1_IN_Callback NOP_Process
+#define EP2_IN_Callback NOP_Process
+#define EP3_IN_Callback NOP_Process
+#define EP4_IN_Callback NOP_Process
+#define EP5_IN_Callback NOP_Process
+#define EP6_IN_Callback NOP_Process
+#define EP7_IN_Callback NOP_Process
+#define EP8_IN_Callback NOP_Process
+#define EP9_IN_Callback NOP_Process
+#define EP10_IN_Callback NOP_Process
+#define EP11_IN_Callback NOP_Process
+#define EP12_IN_Callback NOP_Process
+#define EP13_IN_Callback NOP_Process
+#define EP14_IN_Callback NOP_Process
+#define EP15_IN_Callback NOP_Process
+
+
+#define EP1_OUT_Callback NOP_Process
+#define EP2_OUT_Callback NOP_Process
+#define EP3_OUT_Callback NOP_Process
+#define EP4_OUT_Callback NOP_Process
+#define EP5_OUT_Callback NOP_Process
+#define EP6_OUT_Callback NOP_Process
+#define EP7_OUT_Callback NOP_Process
+#define EP8_OUT_Callback NOP_Process
+#define EP9_OUT_Callback NOP_Process
+#define EP10_OUT_Callback NOP_Process
+#define EP11_OUT_Callback NOP_Process
+#define EP12_OUT_Callback NOP_Process
+#define EP13_OUT_Callback NOP_Process
+#define EP14_OUT_Callback NOP_Process
+#define EP15_OUT_Callback NOP_Process
+
+#endif /*__USB_CONF_H*/
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
+
+
+
+
Added: trunk/firmware/arm/str/bootloader_str75x/include/usb_desc.h
===================================================================
--- trunk/firmware/arm/str/bootloader_str75x/include/usb_desc.h (rev 0)
+++ trunk/firmware/arm/str/bootloader_str75x/include/usb_desc.h 2008-02-17 21:39:29 UTC (rev 857)
@@ -0,0 +1,86 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_desc.h
+* Author : MCD Application Team
+* Date First Issued : 10/01/2006 : V1.0
+* Description : Descriptor Header for Device Firmware Upgrade (DFU)
+********************************************************************************
+* History:
+* 10/01/2006 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_DESC_H
+#define __USB_DESC_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+/* External variables --------------------------------------------------------*/
+
+//#define _STR710_EVAL /* Comment this line if STR710-Eval board is not used */
+#define _STR75x_EVAL
+
+#define DFU_SIZ_DEVICE_DESC 18
+
+#ifdef _STR710_EVAL
+#define DFU_SIZ_CONFIG_DESC 45
+#elif defined _STR75x_EVAL
+#define DFU_SIZ_CONFIG_DESC 45
+#else
+#define DFU_SIZ_CONFIG_DESC 36
+#endif
+
+
+#define DFU_SIZ_STRING_LANGID 4
+#define DFU_SIZ_STRING_VENDOR 38
+#define DFU_SIZ_STRING_PRODUCT 22
+#define DFU_SIZ_STRING_SERIAL 8
+#define DFU_SIZ_STRING_INTERFACE0 122 /* Flash Bank 0 */
+#define DFU_SIZ_STRING_INTERFACE1 74 /* Flash Bank 1 */
+#ifdef _STR710_EVAL
+#define DFU_SIZ_STRING_INTERFACE2 92 /* External Flash M28W320CB */
+#endif
+#ifdef _STR75x_EVAL
+#define DFU_SIZ_STRING_INTERFACE2 98 /* SPI Flash : M25P64*/
+#endif
+
+
+
+extern const u8 DFU_DeviceDescriptor[DFU_SIZ_DEVICE_DESC];
+extern const u8 DFU_ConfigDescriptor[DFU_SIZ_CONFIG_DESC];
+
+
+extern const u8 DFU_StringLangId [DFU_SIZ_STRING_LANGID];
+extern const u8 DFU_StringVendor [DFU_SIZ_STRING_VENDOR];
+extern const u8 DFU_StringProduct [DFU_SIZ_STRING_PRODUCT];
+extern const u8 DFU_StringSerial [DFU_SIZ_STRING_SERIAL];
+extern const u8 DFU_StringInterface0 [DFU_SIZ_STRING_INTERFACE0];
+extern const u8 DFU_StringInterface1 [DFU_SIZ_STRING_INTERFACE1];
+#ifdef _STR710_EVAL
+extern const u8 DFU_StringInterface2 [DFU_SIZ_STRING_INTERFACE2];
+#endif
+#ifdef _STR75x_EVAL
+extern const u8 DFU_StringInterface2 [DFU_SIZ_STRING_INTERFACE2];
+#endif
+
+#define bMaxPacketSize0 0x40 /* bMaxPacketSize0 = 64 bytes */
+#define wTransferSize 0x0400 /* wTransferSize = 1024 bytes */
+ /* bMaxPacketSize0 <= wTransferSize <= 32kbytes */
+#define wTransferSizeB0 0x00
+#define wTransferSizeB1 0x04
+
+
+#endif /* __USB_DESC_H */
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
+
+
+
+
Added: trunk/firmware/arm/str/bootloader_str75x/include/usb_prop.h
===================================================================
--- trunk/firmware/arm/str/bootloader_str75x/include/usb_prop.h (rev 0)
+++ trunk/firmware/arm/str/bootloader_str75x/include/usb_prop.h 2008-02-17 21:39:29 UTC (rev 857)
@@ -0,0 +1,128 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_prop.h
+* Author : MCD Application Team
+* Date First Issued : 10/01/2006 : V1.0
+* Description : All processings related to DFU demo
+********************************************************************************
+* History:
+* 10/01/2006 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_PROP_H
+#define __USB_PROP_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void DFU_init(void);
+void DFU_Reset(void);
+void DFU_Status_In (void);
+void DFU_Status_Out (void);
+RESULT DFU_Data_Setup(u8);
+RESULT DFU_NoData_Setup(u8);
+RESULT DFU_Get_Interface_Setting(u8 Interface,u8 AlternateSetting);
+u8 *DFU_GetDeviceDescriptor(u16 );
+u8 *DFU_GetConfigDescriptor(u16);
+u8 *DFU_GetStringDescriptor(u16);
+
+u8 *UPLOAD(u16 Length);
+u8 *DNLOAD(u16 Length);
+u8 *GETSTATE(u16 Length);
+u8 *GETSTATUS(u16 Length);
+void DFU_write_crc (void);
+
+/* External variables --------------------------------------------------------*/
+
+
+#define DFU_GetConfiguration NOP_Process
+#define DFU_SetConfiguration NOP_Process
+#define DFU_GetInterface NOP_Process
+#define DFU_SetInterface NOP_Process
+#define DFU_GetStatus NOP_Process
+#define DFU_ClearFeature NOP_Process
+#define DFU_SetEndPointFeature NOP_Process
+#define DFU_SetDeviceFeature NOP_Process
+#define DFU_SetDeviceAddress NOP_Process
+
+/*---------------------------------------------------------------------*/
+/* DFU definitions */
+/*---------------------------------------------------------------------*/
+
+/**************************************************/
+/* DFU Requests */
+/**************************************************/
+
+typedef enum _DFU_REQUESTS {
+ DFU_DNLOAD=1,
+ DFU_UPLOAD,
+ DFU_GETSTATUS,
+ DFU_CLRSTATUS,
+ DFU_GETSTATE,
+ DFU_ABORT
+} DFU_REQUESTS;
+
+/**************************************************/
+/* DFU Requests DFU states */
+/**************************************************/
+
+
+#define STATE_appIDLE 0
+#define STATE_appDETACH 1
+#define STATE_dfuIDLE 2
+#define STATE_dfuDNLOAD_SYNC 3
+#define STATE_dfuDNBUSY 4
+#define STATE_dfuDNLOAD_IDLE 5
+#define STATE_dfuMANIFEST_SYNC 6
+#define STATE_dfuMANIFEST 7
+#define STATE_dfuMANIFEST_WAIT_RESET 8
+#define STATE_dfuUPLOAD_IDLE 9
+#define STATE_dfuERROR 10
+
+/**************************************************/
+/* DFU Requests DFU status */
+/**************************************************/
+
+#define STATUS_OK 0x00
+#define STATUS_ERRTARGET 0x01
+#define STATUS_ERRFILE 0x02
+#define STATUS_ERRWRITE 0x03
+#define STATUS_ERRERASE 0x04
+#define STATUS_ERRCHECK_ERASED 0x05
+#define STATUS_ERRPROG 0x06
+#define STATUS_ERRVERIFY 0x07
+#define STATUS_ERRADDRESS 0x08
+#define STATUS_ERRNOTDONE 0x09
+#define STATUS_ERRFIRMWARE 0x0A
+#define STATUS_ERRVENDOR 0x0B
+#define STATUS_ERRUSBR 0x0C
+#define STATUS_ERRPOR 0x0D
+#define STATUS_ERRUNKNOWN 0x0E
+#define STATUS_ERRSTALLEDPKT 0x0F
+
+/**************************************************/
+/* DFU Requests DFU states Manifestation State */
+/**************************************************/
+
+#define Manifest_complete 0x00
+#define Manifest_In_Progress 0x01
+
+
+/**************************************************/
+/* Special Commands with Download Request */
+/**************************************************/
+
+#define CMD_GETCOMMANDS 0x00
+#define CMD_SETADDRESSPOINTER 0x21
+#define CMD_ERASE 0x41
+
+#endif /* __USB_PROP_H */
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/bootloader_str75x/include/usb_pwr.h
===================================================================
--- trunk/firmware/arm/str/bootloader_str75x/include/usb_pwr.h (rev 0)
+++ trunk/firmware/arm/str/bootloader_str75x/include/usb_pwr.h 2008-02-17 21:39:29 UTC (rev 857)
@@ -0,0 +1,55 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_pwr.h
+* Author : MCD Application Team
+* Date First Issued : 10/01/2006 : V1.0
+* Description : Connection/disconnection & power management header
+********************************************************************************
+* History:
+* 10/01/2006 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_PWR_H
+#define __USB_PWR_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+typedef enum _RESUME_STATE{
+ RESUME_EXTERNAL,
+ RESUME_INTERNAL,
+ RESUME_LATER,
+ RESUME_WAIT,
+ RESUME_START,
+ RESUME_ON,
+ RESUME_OFF,
+ RESUME_ESOF
+} RESUME_STATE;
+
+typedef enum _DEVICE_STATE{
+ UNCONNECTED,
+ ATTACHED,
+ POWERED,
+ DEFAULT,
+ ADDRESSED,
+ CONFIGURED
+} DEVICE_STATE;
+/* Exported constants --------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void Suspend(void);
+void Resume_Init(void);
+void Resume(RESUME_STATE eResumeSetVal);
+RESULT PowerOn(void);
+RESULT PowerOff(void);
+/* External variables --------------------------------------------------------*/
+extern vu8 bDeviceState; /* USB device status */
+extern volatile bool fSuspendEnabled; /* true when suspend is possible */
+
+#endif /*__USB_PWR_H*/
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/bootloader_str75x/project/EWARM/75x_init.s
===================================================================
--- trunk/firmware/arm/str/bootloader_str75x/project/EWARM/75x_init.s (rev 0)
+++ trunk/firmware/arm/str/bootloader_str75x/project/EWARM/75x_init.s 2008-02-17 21:39:29 UTC (rev 857)
@@ -0,0 +1,253 @@
+;******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+;* File Name : 75x_init.s
+;* Author : MCD Application Team
+;* Date First Issued : 10/01/2006 : V1.0
+;* Description : This module performs:
+;* - Memory remapping (if required),
+;* - Stack pointer initialisation for each mode ,
+;* - Interrupt Controller Initialisation
+;* - Branches to ?main in the C library (which eventually
+;* calls main()).
+;* On reset, the ARM core starts up in Supervisor (SVC) mode,
+;* in ARM state,with IRQ and FIQ disabled.
+;*******************************************************************************
+; History:
+; 10/01/2006 : V1.0
+;*******************************************************************************
+; THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+; WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+; AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+; INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+; CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+; INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+;*******************************************************************************
+
+ IMPORT WAKUP_Addr ; imported from 75x_vect.s
+
+
+
+
+ ; Depending on Your Application, Disable or Enable the following Defines
+ ; ----------------------------------------------------------------------------
+ ; SMI Bank0 configuration
+ ; ----------------------------------------------------------------------------
+ ; If you need to accees the SMI Bank0
+ ; uncomment next line
+ ;#define SMI_Bank0_EN
+
+ ; ----------------------------------------------------------------------------
+ ; Memory remapping
+ ; ----------------------------------------------------------------------------
+ #define Remap_SRAM ; remap SRAM address 0x00
+
+ ; ----------------------------------------------------------------------------
+ ; EIC initialization
+ ; ----------------------------------------------------------------------------
+ #define EIC_INIT ; Configure and Initialize EIC
+
+; Standard definitions of mode bits and interrupt (I & F) flags in PSRs
+Mode_USR EQU 0x10
+Mode_FIQ EQU 0x11
+Mode_IRQ EQU 0x12
+Mode_SVC EQU 0x13
+Mode_ABT EQU 0x17
+Mode_UND EQU 0x1B
+Mode_SYS EQU 0x1F
+
+I_Bit EQU 0x80 ; when I bit is set, IRQ is disabled
+F_Bit EQU 0x40 ; when F bit is set, FIQ is disabled
+
+
+; MRCC Register
+MRCC_PCLKEN_Addr EQU 0x60000030 ; Peripheral Clock Enable register base address
+
+; CFG Register
+CFG_GLCONF_Addr EQU 0x60000010 ; Global Configuration register base address
+SRAM_mask EQU 0x0002 ; to remap RAM at 0x0
+
+; GPIO Register
+GPIOREMAP0R_Addr EQU 0xFFFFE420
+SMI_EN_Mask EQU 0x00000001
+
+; SMI Register
+SMI_CR1_Addr EQU 0x90000000
+
+; EIC Registers offsets
+EIC_Base_addr EQU 0xFFFFF800 ; EIC base address
+ICR_off_addr EQU 0x00 ; Interrupt Control register offset
+CIPR_off_addr EQU 0x08 ; Current Interrupt Priority Register offset
+IVR_off_addr EQU 0x18 ; Interrupt Vector Register offset
+FIR_off_addr EQU 0x1C ; Fast Interrupt Register offset
+IER_off_addr EQU 0x20 ; Interrupt Enable Register offset
+IPR_off_addr EQU 0x40 ; Interrupt Pending Bit Register offset
+SIR0_off_addr EQU 0x60 ; Source Interrupt Register 0
+
+;---------------------------------------------------------------
+; ?program_start
+;---------------------------------------------------------------
+ MODULE ?program_start
+ RSEG IRQ_STACK:DATA(2)
+ RSEG FIQ_STACK:DATA(2)
+ RSEG UND_STACK:DATA(2)
+ RSEG ABT_STACK:DATA(2)
+ RSEG SVC_STACK:DATA(2)
+ RSEG CSTACK:DATA(2)
+ RSEG ICODE:CODE(2)
+ PUBLIC __program_start
+ EXTERN ?main
+ CODE32
+
+
+__program_start:
+ LDR pc, =NextInst
+
+NextInst
+; Reset all Peripheral Clocks
+; This is usefull only when using debugger to Reset\Run the application
+
+ #ifdef SMI_Bank0_EN
+ LDR r0, =0x01000000 ; Disable peripherals clock (except GPIO)
+ #else
+ LDR r0, =0x00000000 ; Disable peripherals clock
+ #endif
+ LDR r1, =MRCC_PCLKEN_Addr
+ STR r0, [r1]
+
+ #ifdef SMI_Bank0_EN
+ LDR r0, =0x1875623F ; Peripherals kept under reset (except GPIO)
+ #else
+ LDR r0, =0x1975623F ; Peripherals kept under reset
+ #endif
+
+ STR r0, [r1,#4]
+ MOV r0, #0
+ NOP ; Wait
+ NOP
+ NOP
+ NOP
+ STR r0, [r1,#4] ; Disable peripherals reset (except GPIO)
+
+; Initialize stack pointer registers
+; Enter each mode in turn and set up the stack pointer
+
+
+ MSR CPSR_c, #Mode_FIQ|I_Bit|F_Bit ; No interrupts
+ ldr sp,=SFE(FIQ_STACK) & 0xFFFFFFF8 ; End of FIQ_STACK
+
+ MSR CPSR_c, #Mode_IRQ|I_Bit|F_Bit ; No interrupts
+ ldr sp,=SFE(IRQ_STACK) & 0xFFFFFFF8 ; End of IRQ_STACK
+
+ MSR CPSR_c, #Mode_ABT|I_Bit|F_Bit ; No interrupts
+ ldr sp,=SFE(ABT_STACK) & 0xFFFFFFF8 ; End of ABT_STACK
+
+ MSR CPSR_c, #Mode_UND|I_Bit|F_Bit ; No interrupts
+ ldr sp,=SFE(UND_STACK) & 0xFFFFFFF8 ; End of UND_STACK
+
+ MSR CPSR_c, #Mode_SVC|I_Bit|F_Bit ; No interrupts
+ ldr sp,=SFE(SVC_STACK) & 0xFFFFFFF8 ; End of SVC_STACK
+
+; ------------------------------------------------------------------------------
+; Description : Enable SMI Bank0: enable GPIOs clock in MRCC_PCLKEN register,
+; enable SMI alternate function in GPIO_REMAP register and enable
+; Bank0 in SMI_CR1 register.
+; ------------------------------------------------------------------------------
+ #ifdef SMI_Bank0_EN
+ MOV r0, #0x01000000
+ LDR r1, =MRCC_PCLKEN_Addr
+ STR r0, [r1] ; Enable GPIOs clock
+
+ LDR r1, =GPIOREMAP0R_Addr
+ MOV r0, #SMI_EN_Mask
+ LDR r2, [r1]
+ ORR r2, r2, r0
+ STR r2, [r1] ; Enable SMI alternate function
+
+ LDR r0, =0x251 ; SMI Bank0 enabled, Prescaler = 2, Deselect Time = 5
+ LDR r1, =SMI_CR1_Addr
+ STR r0, [r1] ; Configure CR1 register
+ LDR r0, =0x00
+ STR r0, [r1,#4] ; Reset CR2 register
+ #endif
+
+; ------------------------------------------------------------------------------
+; Description : Remapping SRAM at address 0x00 after the application has
+; started executing.
+; ------------------------------------------------------------------------------
+ #ifdef Remap_SRAM
+ MOV r0, #SRAM_mask
+ LDR r1, =CFG_GLCONF_Addr
+ LDR r2, [r1] ; Read GLCONF Register
+ BIC r2, r2, #0x07 ; Reset the SW_BOOT bits
+ ORR r2, r2, r0 ; Change the SW_BOOT bits
+ STR r2, [r1] ; Write GLCONF Register
+ #endif
+
+;-------------------------------------------------------------------------------
+;Description : Initialize the EIC as following :
+; - IRQ disabled
+; - FIQ disabled
+; - IVR contains the load PC opcode
+; - All channels are disabled
+; - All channels priority equal to 0
+; - All SIR registers contains offset to the related IRQ table entry
+;-------------------------------------------------------------------------------
+ #ifdef EIC_INIT
+ LDR r3, =EIC_Base_addr
+ LDR r4, =0x00000000
+ STR r4, [r3, #ICR_off_addr] ; Disable FIQ and IRQ
+ STR r4, [r3, #IER_off_addr] ; Disable all interrupts channels
+
+ LDR r4, =0xFFFFFFFF
+ STR r4, [r3, #IPR_off_addr] ; Clear all IRQ pending bits
+
+ LDR r4, =0x18
+ STR r4, [r3, #FIR_off_addr] ; Disable FIQ channels and clear FIQ pending bits
+
+ LDR r4, =0x00000000
+ STR r4, [r3, #CIPR_off_addr] ; Reset the current priority register
+
+ LDR r4, =0xE59F0000 ; Write the LDR pc,pc,#offset..
+ STR r4, [r3, #IVR_off_addr] ; ..instruction code in IVR[31:16]
+
+
+ LDR r2,= 32 ; 32 Channel to initialize
+ LDR r0, =WAKUP_Addr ; Read the address of the IRQs address table
+ LDR r1, =0x00000FFF
+ AND r0,r0,r1
+ LDR r5,=SIR0_off_addr ; Read SIR0 address
+ SUB r4,r0,#8 ; subtract 8 for prefetch
+ LDR r1, =0xF7E8 ; add the offset to the 0x00 address..
+ ; ..(IVR address + 7E8 = 0x00)
+ ; 0xF7E8 used to complete the LDR pc,offset opcode
+ ADD r1,r4,r1 ; compute the jump offset
+EIC_INI
+ MOV r4, r1, LSL #16 ; Left shift the result
+ STR r4, [r3, r5] ; Store the result in SIRx register
+ ADD r1, r1, #4 ; Next IRQ address
+ ADD r5, r5, #4 ; Next SIR
+ SUBS r2, r2, #1 ; Decrement the number of SIR registers to initialize
+ BNE EIC_INI ; If more then continue
+
+ #endif
+
+
+; --- Now change to USR/SYS mode and set up User mode stack,
+
+ MSR CPSR_c, #Mode_SYS ; IRQs & FIQs are now enabled
+ ldr sp,=SFE(CSTACK) & 0xFFFFFFF8 ; End of CSTACK
+
+
+; --- Branch to C Library entry point
+
+ IMPORT ?main
+
+ ldr r0,=?main
+ bx r0
+
+
+
+ LTORG
+
+
+ END
+;******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE*****
Added: trunk/firmware/arm/str/bootloader_str75x/project/EWARM/75x_vect.s
===================================================================
--- trunk/firmware/arm/str/bootloader_str75x/project/EWARM/75x_vect.s (rev 0)
+++ trunk/firmware/arm/str/bootloader_str75x/project/EWARM/75x_vect.s 2008-02-17 21:39:29 UTC (rev 857)
@@ -0,0 +1,265 @@
+;******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+;* File Name : 75x_vect.c
+;* Author : MCD Application Team
+;* Date First Issued : 10/01/2006 : V1.0
+;* Description : This file used to initialize the exception and IRQ
+;* vectors, and to enter/return to/from exceptions handlers.
+;*******************************************************************************
+;* History:
+;* 10/01/2006 : V1.0
+;*******************************************************************************
+;* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+;* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+;* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+;* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+;* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+;* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+;*******************************************************************************
+
+ PROGRAM ?RESET
+ COMMON INTVEC:CODE(2)
+ CODE32
+
+EIC_base_addr EQU 0xFFFFF800 ; EIC base address
+CICR_off_addr EQU 0x04 ; Current Interrupt Channel Register
+IVR_off_addr EQU 0x18 ; Interrupt Vector Register
+IPR_off_addr EQU 0x40 ; Interrupt Pending Register
+
+
+;*******************************************************************************
+; Import the __program_start address from 75x_init.s
+;*******************************************************************************
+
+ IMPORT __program_start
+
+
+
+;*******************************************************************************
+; Import exception handlers
+;*******************************************************************************
+
+ IMPORT Undefined_Handler
+ IMPORT SWI_Handler
+ IMPORT Prefetch_Handler
+ IMPORT Abort_Handler
+ IMPORT FIQ_Handler
+
+;*******************************************************************************
+; Import IRQ handlers from 75x_it.c
+;*******************************************************************************
+
+
+ IMPORT USB_LP_IRQHandler
+ IMPORT EXTIT_IRQHandler
+
+
+;*******************************************************************************
+; Export Peripherals IRQ handlers table address
+;*******************************************************************************
+
+ EXPORT WAKUP_Addr
+
+;*******************************************************************************
+; Exception vectors
+;*******************************************************************************
+
+
+ LDR PC, Reset_Addr
+ LDR PC, Undefined_Addr
+ LDR PC, SWI_Addr
+ LDR PC, Prefetch_Addr
+ LDR PC, Abort_Addr
+ NOP ; Reserved vector
+ LDR PC, IRQ_Addr
+ LDR PC, FIQ_Addr
+
+;*******************************************************************************
+; Exception handlers address table
+;*******************************************************************************
+
+Reset_Addr DCD __program_start
+Undefined_Addr DCD 0
+SWI_Addr DCD 0
+Prefetch_Addr DCD 0
+Abort_Addr DCD 0
+ DCD 0 ; Reserved vector
+IRQ_Addr DCD IRQHandler
+FIQ_Addr DCD 0
+
+;*******************************************************************************
+; Peripherals IRQ handlers address table
+;*******************************************************************************
+
+WAKUP_Addr DCD 0
+TIM2_OC2_Addr DCD 0
+TIM2_OC1_Addr DCD 0
+TIM2_IC12_Addr DCD 0
+TIM2_UP_Addr DCD 0
+TIM1_OC2_Addr DCD 0
+TIM1_OC1_Addr DCD 0
+TIM1_IC12_Addr DCD 0
+TIM1_UP_Addr DCD 0
+TIM0_OC2_Addr DCD 0
+TIM0_OC1_Addr DCD 0
+TIM0_IC12_Addr DCD 0
+TIM0_UP_Addr DCD 0
+PWM_OC123_Addr DCD 0
+PWM_EM_Addr DCD 0
+PWM_UP_Addr DCD 0
+I2C_Addr DCD 0
+SSP1_Addr DCD 0
+SSP0_Addr DCD 0
+UART2_Addr DCD 0
+UART1_Addr DCD 0
+UART0_Addr DCD 0
+CAN_Addr DCD 0
+USB_LP_Addr DCD USB_LPIRQHandler
+USB_HP_Addr DCD 0
+ADC_Addr DCD 0
+DMA_Addr DCD 0
+EXTIT_Addr DCD EXTITIRQHandler
+MRCC_Addr DCD 0
+FLASHSMI_Addr DCD 0
+RTC_Addr DCD 0
+TB_Addr DCD 0
+
+;*******************************************************************************
+; Exception Handlers
+;*******************************************************************************
+
+;*******************************************************************************
+;* Macro Name : SaveContext
+;* Description : This macro used to save the context before entering
+;* an exception handler.
+;* Input : The range of registers to store.
+;* Output : none
+;*******************************************************************************
+SaveContext MACRO reg1,reg2
+ STMFD sp!,{reg1-reg2,lr} ; Save The workspace plus the current return
+ ; address lr_ mode into the stack.
+ MRS r1,spsr ; Save the spsr_mode into r1.
+ STMFD sp!,{r1} ; Save spsr.
+ ENDM
+
+;*******************************************************************************
+;* Macro Name : RestoreContext
+;* Description : This macro used to restore the context to return from
+;* an exception handler and continue the program execution.
+;* Input : The range of registers to restore.
+;* Output : none
+;*******************************************************************************
+RestoreContext MACRO reg1,reg2
+ LDMFD sp!,{r1} ; Restore the saved spsr_mode into r1.
+ MSR spsr_cxsf,r1 ; Restore spsr_mode.
+ LDMFD sp!,{reg1-reg2,pc}^; Return to the instruction following...
+ ; ...the exception interrupt.
+ ENDM
+
+
+
+;*******************************************************************************
+;* Function Name : IRQHandler
+;* Description : This function called when IRQ exception is entered.
+;* Input : none
+;* Output : none
+;*******************************************************************************
+IRQHandler
+ SUB lr,lr,#4 ; Update the link register
+ SaveContext r0,r12 ; Save the workspace plus the current
+ ; return address lr_ irq and spsr_irq.
+ LDR lr, =ReturnAddress ; Read the return address.
+ LDR r0, =EIC_base_addr
+ LDR r1, =IVR_off_addr
+ ADD pc,r0,r1 ; Branch to the IRQ handler.
+ReturnAddress
+ ; Clear pending bit in EIC (using the proper IPRx)
+ LDR r0, =EIC_base_addr
+ LDR r2, [r0, #CICR_off_addr] ; Get the IRQ channel number
+ MOV r3,#1
+ MOV r3,r3,LSL r2
+ STR r3,[r0, #IPR_off_addr] ; Clear the corresponding IPR bit.
+
+ RestoreContext r0,r12 ; Restore the context and return to the...
+ ; ...program execution.
+
+
+
+;*******************************************************************************
+;* Macro Name : IRQ_to_SYS
+;* Description : This macro used to switch form IRQ mode to SYS mode.
+;* Input : none.
+;* Output : none
+;*******************************************************************************
+IRQ_to_SYS MACRO
+ MSR cpsr_c,#0x1F
+ STMFD sp!,{lr}
+ ENDM
+
+;*******************************************************************************
+;* Macro Name : SYS_to_IRQ
+;* Description : This macro used to switch from SYS mode to IRQ mode.
+;* Input : none.
+;* Output : none
+;*******************************************************************************
+SYS_to_IRQ MACRO
+ LDMFD sp!,{lr}
+ MSR cpsr_c,#0xD2
+ ;MOV pc,lr
+ bx lr
+ ENDM
+
+
+
+;*******************************************************************************
+;* Function Name : USB_LPIRQHandler
+;* Description : This function used to switch to SYS mode before entering
+;* the USB_LP_IRQHandler function located in 75x_it.c.
+;* Then to return to IRQ mode after the USB_LP_IRQHandler
+;* function termination.
+;* Input : none
+;* Output : none
+;*******************************************************************************
+USB_LPIRQHandler
+ IRQ_to_SYS
+ ldr r0,=USB_LP_IRQHandler
+ ldr lr,=USB_LP_IRQHandler_end
+ bx r0
+USB_LP_IRQHandler_end:
+ SYS_to_IRQ
+
+
+
+;*******************************************************************************
+;* Function Name : EXTITIRQHandler
+;* Description : This function used to switch to SYS mode before entering
+;* the EXTIT_IRQHandler function located in 75x_it.c.
+;* Then to return to IRQ mode after the EXTIT_IRQHandler
+;* function termination.
+;* Input : none
+;* Output : none
+;*******************************************************************************
+EXTITIRQHandler
+ IRQ_to_SYS
+ ldr r0,=EXTIT_IRQHandler
+ ldr lr,=EXTIT_IRQHandler_end
+ bx r0
+EXTIT_IRQHandler_end:
+ SYS_to_IRQ
+
+
+
+ LTORG
+
+ END
+;******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE*****
+
+
+
+
+
+
+
+
+
+
+
Added: trunk/firmware/arm/str/bootloader_str75x/project/EWARM/DFU.ewd
===================================================================
--- trunk/firmware/arm/str/bootloader_str75x/project/EWARM/DFU.ewd (rev 0)
+++ trunk/firmware/arm/str/bootloader_str75x/project/EWARM/DFU.ewd 2008-02-17 21:39:29 UTC (rev 857)
@@ -0,0 +1,525 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+
+<project>
+ <fileVersion>1</fileVersion>
+ <configuration>
+ <name>Debug</name>
+ <toolchain>
+ <name>ARM</name>
+ </toolchain>
+ <debug>1</debug>
+ <settings>
+ <name>C-SPY</name>
+ <archiveVersion>2</archiveVersion>
+ <data>
+ <version>13</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>1</debug>
+ <option>
+ <name>CInput</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CEndian</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CProcessor</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>OCVariant</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>MacOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>MacFile</name>
+ <state></state>
+ </option>
+ <option>
+ <name>MemOverride</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>MemFile</name>
+ <state>$TOOLKIT_DIR$\CONFIG\iostr750.ddf</state>
+ </option>
+ <option>
+ <name>RunToEnable</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>RunToName</name>
+ <state>main</state>
+ </option>
+ <option>
+ <name>CExtraOptionsCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CExtraOptions</name>
+ <state></state>
+ </option>
+ <option>
+ <name>CFpuProcessor</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>OCDDFArgumentProducer</name>
+ <state></state>
+ </option>
+ <option>
+ <name>OCDownloadSuppressDownload</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OCDownloadVerifyAll</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>OCProductVersion</name>
+ <state>4.30A</state>
+ </option>
+ <option>
+ <name>OCDynDriverList</name>
+ <state>JLINK_ID</state>
+ </option>
+ <option>
+ <name>OCLastSavedByProductVersion</name>
+ <state>4.40A</state>
+ </option>
+ <option>
+ <name>OCDownloadAttachToProgram</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>FlashLoaders</name>
+ <state>,,,0x20000000,(default),</state>
+ </option>
+ <option>
+ <name>UseFlashLoader</name>
+ <state>1</state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>ARMSIM_ID</name>
+ <archiveVersion>2</archiveVersion>
+ <data>
+ <version>0</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>1</debug>
+ <option>
+ <name>OCSimDriverInfo</name>
+ <state>1</state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>ANGEL_ID</name>
+ <archiveVersion>2</archiveVersion>
+ <data>
+ <version>0</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>1</debug>
+ <option>
+ <name>CCAngelHeartbeat</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CAngelCommunication</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>CAngelCommBaud</name>
+ <version>0</version>
+ <state>3</state>
+ </option>
+ <option>
+ <name>CAngelCommPort</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>ANGELTCPIP</name>
+ <state>aaa.bbb.ccc.ddd</state>
+ </option>
+ <option>
+ <name>DoAngelLogfile</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>AngelLogFile</name>
+ <state>$TOOLKIT_DIR$\cspycomm.log</state>
+ </option>
+ <option>
+ <name>OCDriverInfo</name>
+ <state>1</state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>IARROM_ID</name>
+ <archiveVersion>2</archiveVersion>
+ <data>
+ <version>0</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>1</debug>
+ <option>
+ <name>CRomLogFileCheck</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CRomLogFileEditB</name>
+ <state>$TOOLKIT_DIR$\cspycomm.log</state>
+ </option>
+ <option>
+ <name>CRomCommunication</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CRomCommPort</name>
+ <version>0</version>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CRomCommBaud</name>
+ <version>0</version>
+ <state>7</state>
+ </option>
+ <option>
+ <name>OCDriverInfo</name>
+ <state>1</state>
+ </option>
+ </data>
+ </settings>
+ <settings>
+ <name>JLINK_ID</name>
+ <archiveVersion>2</archiveVersion>
+ <data>
+ <version>6</version>
+ <wantNonLocal>1</wantNonLocal>
+ <debug>1</debug>
+ <option>
+ <name>JLinkSpeed</name>
+ <state>200</state>
+ </option>
+ <option>
+ <name>CCJLinkDoLogfile</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCJLinkLogFile</name>
+ <state>$TOOLKIT_DIR$\cspycomm.log</state>
+ </option>
+ <option>
+ <name>CCJLinkHWResetDelay</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>OCDriverInfo</name>
+ <state>1</state>
+ </option>
+ <option>
+ <name>JLinkInitialSpeed</name>
+ <state>32</state>
+ </option>
+ <option>
+ <name>CCDoJlinkMultiTarget</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCScanChainNonARMDevices</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCJLinkMultiTarget</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCJLinkIRLength</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCJLinkCommRadio</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCJLinkTCPIP</name>
+ <state>aaa.bbb.ccc.ddd</state>
+ </option>
+ <option>
+ <name>CCJLinkResetRadio</name>
+ <state>0</state>
+ </option>
+ <option>
+ <name>CCJLinkResetInitSeq</name>
+...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-17 21:36:25
|
Revision: 856
http://can.svn.sourceforge.net/can/?rev=856&view=rev
Author: akhe
Date: 2008-02-17 13:36:20 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
Cleaned up setup build environment files
Modified Paths:
--------------
trunk/setenv_vscp.bat
Modified: trunk/setenv_vscp.bat
===================================================================
--- trunk/setenv_vscp.bat 2008-02-17 21:32:01 UTC (rev 855)
+++ trunk/setenv_vscp.bat 2008-02-17 21:36:20 UTC (rev 856)
@@ -1,6 +1,3 @@
subst i: D:\development\vscp
subst j: D:\development\vscp\firmware
-rem Setup gcc arm development paths etc
-subst k: "C:/Program Files/yagarto/arm-elf"
-set INCLUDE = "C:\Program Files\yagarto\arm-elf\include;j:\common"
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ak...@us...> - 2008-02-17 21:32:12
|
Revision: 855
http://can.svn.sourceforge.net/can/?rev=855&view=rev
Author: akhe
Date: 2008-02-17 13:32:01 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
Added IAR USB Virtual Com Port code for the str75x
Added Paths:
-----------
trunk/firmware/arm/str/vcp_str75x_iar/
trunk/firmware/arm/str/vcp_str75x_iar/Software Driver/
trunk/firmware/arm/str/vcp_str75x_iar/Software Driver/stmcdc.inf
trunk/firmware/arm/str/vcp_str75x_iar/include/
trunk/firmware/arm/str/vcp_str75x_iar/include/75x_conf.h
trunk/firmware/arm/str/vcp_str75x_iar/include/hw_config.h
trunk/firmware/arm/str/vcp_str75x_iar/include/usb_conf.h
trunk/firmware/arm/str/vcp_str75x_iar/include/usb_desc.h
trunk/firmware/arm/str/vcp_str75x_iar/include/usb_prop.h
trunk/firmware/arm/str/vcp_str75x_iar/include/usb_pwr.h
trunk/firmware/arm/str/vcp_str75x_iar/project/
trunk/firmware/arm/str/vcp_str75x_iar/project/75x_init.s
trunk/firmware/arm/str/vcp_str75x_iar/project/75x_vect.s
trunk/firmware/arm/str/vcp_str75x_iar/project/Backup (2) of Virtual Com Port.ewd
trunk/firmware/arm/str/vcp_str75x_iar/project/Backup (2) of Virtual Com Port.ewp
trunk/firmware/arm/str/vcp_str75x_iar/project/Backup (3) of Virtual Com Port.ewd
trunk/firmware/arm/str/vcp_str75x_iar/project/Backup (3) of Virtual Com Port.ewp
trunk/firmware/arm/str/vcp_str75x_iar/project/Backup (4) of Virtual Com Port.ewd
trunk/firmware/arm/str/vcp_str75x_iar/project/Backup (4) of Virtual Com Port.ewp
trunk/firmware/arm/str/vcp_str75x_iar/project/Backup of Virtual Com Port.ewd
trunk/firmware/arm/str/vcp_str75x_iar/project/Backup of Virtual Com Port.ewp
trunk/firmware/arm/str/vcp_str75x_iar/project/Virtual Com Port.dep
trunk/firmware/arm/str/vcp_str75x_iar/project/Virtual Com Port.ewd
trunk/firmware/arm/str/vcp_str75x_iar/project/Virtual Com Port.ewp
trunk/firmware/arm/str/vcp_str75x_iar/project/Virtual Com Port.eww
trunk/firmware/arm/str/vcp_str75x_iar/project/lnkarm_flash.xcl
trunk/firmware/arm/str/vcp_str75x_iar/project/settings/
trunk/firmware/arm/str/vcp_str75x_iar/project/settings/Virtual Com Port.cspy.bat
trunk/firmware/arm/str/vcp_str75x_iar/project/settings/Virtual Com Port.dbgdt
trunk/firmware/arm/str/vcp_str75x_iar/project/settings/Virtual Com Port.dni
trunk/firmware/arm/str/vcp_str75x_iar/project/settings/Virtual Com Port.wsdt
trunk/firmware/arm/str/vcp_str75x_iar/source/
trunk/firmware/arm/str/vcp_str75x_iar/source/75x_it.c
trunk/firmware/arm/str/vcp_str75x_iar/source/hw_config.c
trunk/firmware/arm/str/vcp_str75x_iar/source/main.c
trunk/firmware/arm/str/vcp_str75x_iar/source/usb_desc.c
trunk/firmware/arm/str/vcp_str75x_iar/source/usb_endp.c
trunk/firmware/arm/str/vcp_str75x_iar/source/usb_istr.c
trunk/firmware/arm/str/vcp_str75x_iar/source/usb_prop.c
trunk/firmware/arm/str/vcp_str75x_iar/source/usb_pwr.c
Added: trunk/firmware/arm/str/vcp_str75x_iar/Software Driver/stmcdc.inf
===================================================================
--- trunk/firmware/arm/str/vcp_str75x_iar/Software Driver/stmcdc.inf (rev 0)
+++ trunk/firmware/arm/str/vcp_str75x_iar/Software Driver/stmcdc.inf 2008-02-17 21:32:01 UTC (rev 855)
@@ -0,0 +1,64 @@
+;
+; STMicroelectronics Comunication Device Class driver instalation file
+; (C)2006 Copyright STMicroelectronics
+;
+
+[Version]
+Signature="$Windows NT$"
+Class=Ports
+ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
+Provider=%STM%
+LayoutFile=layout.inf
+DriverVer=10/02/06
+
+[Manufacturer]
+%STM%=DeviceList
+
+[DestinationDirs]
+DefaultDestDir=12
+
+[SourceDisksFiles]
+
+[SourceDisksNames]
+
+[DeviceList]
+%DESCRIPTION%=STMUSB, USB\VID_0483&PID_5740
+
+;------------------------------------------------------------------------------
+; Windows 2000/XP Sections
+;------------------------------------------------------------------------------
+
+[STMUSB.nt]
+include=mdmcpq.inf
+CopyFiles=DriverCopyFiles
+AddReg=STMUSB.nt.AddReg
+
+[DriverCopyFiles]
+usbser.sys,,,0x20
+
+[STMUSB.nt.AddReg]
+HKR,,DevLoader,,*ntkern
+HKR,,NTMPDriver,,usbser.sys
+HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+
+[STMUSB.nt.Services]
+AddService=usbser, 0x00000002, DriverService
+
+
+[STMUSB.nt.HW]
+include=mdmcpq.inf
+
+[DriverService]
+DisplayName=%DESCRIPTION%
+ServiceType=1
+StartType=3
+ErrorControl=1
+ServiceBinary=%12%\usbser.sys
+
+;------------------------------------------------------------------------------
+; String Definitions
+;------------------------------------------------------------------------------
+
+[Strings]
+STM="STMicroelectronics"
+DESCRIPTION="STR75x CDC Communication Port"
Added: trunk/firmware/arm/str/vcp_str75x_iar/include/75x_conf.h
===================================================================
--- trunk/firmware/arm/str/vcp_str75x_iar/include/75x_conf.h (rev 0)
+++ trunk/firmware/arm/str/vcp_str75x_iar/include/75x_conf.h 2008-02-17 21:32:01 UTC (rev 855)
@@ -0,0 +1,117 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : 75x_conf.h
+* Author : MCD Application Team
+* Date First Issued : 10/01/2006 : V1.0
+* Description : Library configuration file.
+********************************************************************************
+* History:
+* 10/01/2006 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __75x_CONF_H
+#define __75x_CONF_H
+
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Comment the line below to compile the library in release mode */
+
+#ifdef __IAR_SYSTEMS_ICC__ /* IAR Compiler */
+#define inline inline
+#define RAM_exe __ramfunc
+#endif
+
+
+#ifdef __CC_ARM /* ARM Compiler */
+#define RAM_exe
+#define inline __inline
+#endif
+
+
+/************************************* SMI ************************************/
+//#define _SMI
+
+/************************************* CFG ************************************/
+#define _CFG
+
+/************************************* MRCC ************************************/
+#define _MRCC
+
+/************************************* ADC ************************************/
+//#define _ADC
+
+/************************************* TB *************************************/
+//#define _TB
+
+/************************************* TIM ************************************/
+//#define _TIM
+//#define _TIM0
+//#define _TIM1
+//#define _TIM2
+
+/************************************* PWM ************************************/
+//#define _PWM
+
+/************************************* WDG ************************************/
+#define _WDG
+
+/************************************* SSP ************************************/
+//#define _SSP
+//#define _SSP0
+//#define _SSP1
+
+/************************************* CAN ************************************/
+//#define _CAN
+
+/************************************* I2C ************************************/
+//#define _I2C
+
+/************************************* UART ***********************************/
+#define _UART
+#define _UART0
+//#define _UART1
+//#define _UART2
+
+/************************************* GPIO ***********************************/
+#define _GPIO
+#define _GPIO0
+#define _GPIO1
+//#define _GPIO2
+//#define _GPIOREMAP
+
+/************************************* DMA ************************************/
+//#define _DMA
+//#define _DMA_Stream0
+//#define _DMA_Stream1
+//#define _DMA_Stream2
+//#define _DMA_Stream3
+
+/************************************* RTC ************************************/
+//#define _RTC
+
+/************************************* EXTIT **********************************/
+#define _EXTIT
+
+/************************************* EIC ************************************/
+#define _EIC
+
+/* Comment the following line, depending on the external Quartz oscillator used
+ in your application */
+#define Main_Oscillator 4000000 /* 4 MHz Quartz oscillator used */
+//#define Main_Oscillator 8000000 /* 8 MHz Quartz oscillator used */
+
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+
+#endif /* __75x_CONF_H */
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
+
Added: trunk/firmware/arm/str/vcp_str75x_iar/include/hw_config.h
===================================================================
--- trunk/firmware/arm/str/vcp_str75x_iar/include/hw_config.h (rev 0)
+++ trunk/firmware/arm/str/vcp_str75x_iar/include/hw_config.h 2008-02-17 21:32:01 UTC (rev 855)
@@ -0,0 +1,38 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : hw_config.h
+* Author : MCD Application Team
+* Date First Issued : 10/01/2006 : V1.0
+* Description : Hardware Configuration & Setup
+********************************************************************************
+* History:
+* 10/01/2006 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __HW_Config_H
+#define __HW_Config_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Exported define -----------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void Set_System(void);
+void Set_USBClock(void);
+void Enter_LowPowerMode(void);
+void Leave_LowPowerMode(void);
+void USB_Interrupts_Config(void);
+void USB_Cable_Config (FunctionalState NewState);
+void UART0_Config_Default(void);
+bool UART0_Config(void);
+void USB_To_UART_Send_Data(u8* data_buffer, u8 Nb_bytes);
+void UART_To_USB_Send_Data(void);
+#endif /* __HW_CONFIG_H */
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
+
Added: trunk/firmware/arm/str/vcp_str75x_iar/include/usb_conf.h
===================================================================
--- trunk/firmware/arm/str/vcp_str75x_iar/include/usb_conf.h (rev 0)
+++ trunk/firmware/arm/str/vcp_str75x_iar/include/usb_conf.h 2008-02-17 21:32:01 UTC (rev 855)
@@ -0,0 +1,101 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_conf.h
+* Author : MCD Application Team
+* Date First Issued : 10/01/2006 : V1.0
+* Description : Voice Speaker configuration file
+********************************************************************************
+* History:
+* 10/01/2006 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+#ifndef __USB_CONF_H
+#define __USB_CONF_H
+/*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/
+
+/*-------------------------------------------------------------*/
+/* define the \xB5C and the Bufferd Mode */
+/*-------------------------------------------------------------*/
+#define STR7xx /*STR7 family*/
+//#define STR71x /* STR71x \xB5Cs*/
+#define STR75x /* STR75x \xB5Cs*/
+//#define STR91x /*STR91x Family*/
+//#define STR91x_USB_BUFFERED /* Buffered Mode*/
+//#define STR91x_USB_NON_BUFFERED /*Non buffered mode*/
+/*-------------------------------------------------------------*/
+/* EP_NUM */
+/* defines how many endpoints are used by the device */
+/*-------------------------------------------------------------*/
+
+#define EP_NUM (4)
+
+/*-------------------------------------------------------------*/
+/* -------------- Buffer Description Table -----------------*/
+/*-------------------------------------------------------------*/
+/* buffer table base address */
+/* buffer table base address */
+#define BTABLE_ADDRESS (0x00)
+
+/* EP0 */
+/* rx/tx buffer base address */
+#define ENDP0_RXADDR (0x40)
+#define ENDP0_TXADDR (0x80)
+
+/* EP1 */
+/* tx buffer base address */
+#define ENDP1_TXADDR (0xC0)
+#define ENDP2_TXADDR (0x100)
+#define ENDP3_RXADDR (0x110)
+
+
+/*-------------------------------------------------------------*/
+/* ------------------- ISTR events -------------------------*/
+/*-------------------------------------------------------------*/
+/* IMR_MSK */
+/* mask defining which events has to be handled */
+/* by the device application software */
+#define IMR_MSK (CNTR_CTRM | CNTR_SOFM | CNTR_RESETM )
+
+/* CTR service routines */
+/* associated to defined endpoints */
+//#define EP1_IN_Callback NOP_Process
+#define EP2_IN_Callback NOP_Process
+#define EP3_IN_Callback NOP_Process
+#define EP4_IN_Callback NOP_Process
+#define EP5_IN_Callback NOP_Process
+#define EP6_IN_Callback NOP_Process
+#define EP7_IN_Callback NOP_Process
+#define EP8_IN_Callback NOP_Process
+#define EP9_IN_Callback NOP_Process
+#define EP10_IN_Callback NOP_Process
+#define EP11_IN_Callback NOP_Process
+#define EP12_IN_Callback NOP_Process
+#define EP13_IN_Callback NOP_Process
+#define EP14_IN_Callback NOP_Process
+#define EP15_IN_Callback NOP_Process
+
+
+#define EP1_OUT_Callback NOP_Process
+#define EP2_OUT_Callback NOP_Process
+//#define EP3_OUT_Callback NOP_Process
+#define EP4_OUT_Callback NOP_Process
+#define EP5_OUT_Callback NOP_Process
+#define EP6_OUT_Callback NOP_Process
+#define EP7_OUT_Callback NOP_Process
+#define EP8_OUT_Callback NOP_Process
+#define EP9_OUT_Callback NOP_Process
+#define EP10_OUT_Callback NOP_Process
+#define EP11_OUT_Callback NOP_Process
+#define EP12_OUT_Callback NOP_Process
+#define EP13_OUT_Callback NOP_Process
+#define EP14_OUT_Callback NOP_Process
+#define EP15_OUT_Callback NOP_Process
+
+
+#endif /* __USB_CONF_H */
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/vcp_str75x_iar/include/usb_desc.h
===================================================================
--- trunk/firmware/arm/str/vcp_str75x_iar/include/usb_desc.h (rev 0)
+++ trunk/firmware/arm/str/vcp_str75x_iar/include/usb_desc.h 2008-02-17 21:32:01 UTC (rev 855)
@@ -0,0 +1,55 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_desc.h
+* Author : MCD Application Team
+* Date First Issued : 10/01/2006 : V1.0
+* Description : Descriptor Header for Virtual Com Port Demo
+********************************************************************************
+* History:
+* 10/01/2006 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_DESC_H
+#define __USB_DESC_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Exported define -----------------------------------------------------------*/
+#define USB_DEVICE_DESCRIPTOR_TYPE 0x01
+#define USB_CONFIGURATION_DESCRIPTOR_TYPE 0x02
+#define USB_STRING_DESCRIPTOR_TYPE 0x03
+#define USB_INTERFACE_DESCRIPTOR_TYPE 0x04
+#define USB_ENDPOINT_DESCRIPTOR_TYPE 0x05
+
+#define VIRTUAL_COM_PORT_DATA_SIZE 64
+#define VIRTUAL_COM_PORT_INT_SIZE 8
+
+#define VIRTUAL_COM_PORT_SIZ_DEVICE_DESC 18
+#define VIRTUAL_COM_PORT_SIZ_CONFIG_DESC 67
+#define VIRTUAL_COM_PORT_SIZ_STRING_LANGID 4
+#define VIRTUAL_COM_PORT_SIZ_STRING_VENDOR 38
+#define VIRTUAL_COM_PORT_SIZ_STRING_PRODUCT 52
+#define VIRTUAL_COM_PORT_SIZ_STRING_SERIAL 22
+
+
+#define STANDARD_ENDPOINT_DESC_SIZE 0x09
+
+/* Exported functions ------------------------------------------------------- */
+extern const u8 Virtual_Com_Port_DeviceDescriptor[VIRTUAL_COM_PORT_SIZ_DEVICE_DESC];
+extern const u8 Virtual_Com_Port_ConfigDescriptor[VIRTUAL_COM_PORT_SIZ_CONFIG_DESC];
+
+extern const u8 Virtual_Com_Port_StringLangID[VIRTUAL_COM_PORT_SIZ_STRING_LANGID];
+extern const u8 Virtual_Com_Port_StringVendor[VIRTUAL_COM_PORT_SIZ_STRING_VENDOR];
+extern const u8 Virtual_Com_Port_StringProduct[VIRTUAL_COM_PORT_SIZ_STRING_PRODUCT];
+extern const u8 Virtual_Com_Port_StringSerial[VIRTUAL_COM_PORT_SIZ_STRING_SERIAL];
+
+#endif /* __USB_DESC_H */
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/vcp_str75x_iar/include/usb_prop.h
===================================================================
--- trunk/firmware/arm/str/vcp_str75x_iar/include/usb_prop.h (rev 0)
+++ trunk/firmware/arm/str/vcp_str75x_iar/include/usb_prop.h 2008-02-17 21:32:01 UTC (rev 855)
@@ -0,0 +1,72 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_prop.h
+* Author : MCD Application Team
+* Date First Issued : 10/01/2006 : V1.0
+* Description : All processing related to Virtual Com Port Demo (Endp=0)
+********************************************************************************
+* History:
+* 10/01/2006 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_PROP_H
+#define __USB_PROP_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void Virtual_Com_Port_init(void);
+void Virtual_Com_Port_Reset(void);
+void Virtual_Com_Port_Status_In (void);
+void Virtual_Com_Port_Status_Out (void);
+RESULT Virtual_Com_Port_Data_Setup(u8);
+RESULT Virtual_Com_Port_NoData_Setup(u8);
+RESULT Virtual_Com_Port_Get_Interface_Setting(u8 Interface,u8 AlternateSetting);
+u8 *Virtual_Com_Port_GetDeviceDescriptor(u16 );
+u8 *Virtual_Com_Port_GetConfigDescriptor(u16);
+u8 *Virtual_Com_Port_GetStringDescriptor(u16);
+
+u8 *Virtual_Com_Port_GetLineCoding(u16 Length);
+u8 *Virtual_Com_Port_SetLineCoding(u16 Length);
+
+/* Exported define -----------------------------------------------------------*/
+typedef struct
+{
+ u32 bitrate;
+ u8 format;
+ u8 paritytype;
+ u8 datatype;
+} LINE_CODING;
+
+#define Virtual_Com_Port_GetConfiguration NOP_Process
+#define Virtual_Com_Port_SetConfiguration NOP_Process
+#define Virtual_Com_Port_GetInterface NOP_Process
+#define Virtual_Com_Port_SetInterface NOP_Process
+#define Virtual_Com_Port_GetStatus NOP_Process
+#define Virtual_Com_Port_ClearFeature NOP_Process
+#define Virtual_Com_Port_SetEndPointFeature NOP_Process
+#define Virtual_Com_Port_SetDeviceFeature NOP_Process
+#define Virtual_Com_Port_SetDeviceAddress NOP_Process
+
+#define SEND_ENCAPSULATED_COMMAND 0x00
+#define GET_ENCAPSULATED_RESPONSE 0x01
+#define SET_COMM_FEATURE 0x02
+#define GET_COMM_FEATURE 0x03
+#define CLEAR_COMM_FEATURE 0x04
+#define SET_LINE_CODING 0x20
+#define GET_LINE_CODING 0x21
+#define SET_CONTROL_LINE_STATE 0x22
+#define SEND_BREAK 0x23
+
+#endif /* __USB_PROP_H */
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
+
+
Added: trunk/firmware/arm/str/vcp_str75x_iar/include/usb_pwr.h
===================================================================
--- trunk/firmware/arm/str/vcp_str75x_iar/include/usb_pwr.h (rev 0)
+++ trunk/firmware/arm/str/vcp_str75x_iar/include/usb_pwr.h 2008-02-17 21:32:01 UTC (rev 855)
@@ -0,0 +1,55 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_pwr.h
+* Author : MCD Application Team
+* Date First Issued : 10/01/2006 : V1.0
+* Description : Connection/disconnection & power management header
+********************************************************************************
+* History:
+* 10/01/2006 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_PWR_H
+#define __USB_PWR_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+typedef enum _RESUME_STATE{
+ RESUME_EXTERNAL,
+ RESUME_INTERNAL,
+ RESUME_LATER,
+ RESUME_WAIT,
+ RESUME_START,
+ RESUME_ON,
+ RESUME_OFF,
+ RESUME_ESOF
+} RESUME_STATE;
+
+typedef enum _DEVICE_STATE{
+ UNCONNECTED,
+ ATTACHED,
+ POWERED,
+ DEFAULT,
+ ADDRESSED,
+ CONFIGURED
+} DEVICE_STATE;
+/* Exported constants --------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void Suspend(void);
+void Resume_Init(void);
+void Resume(RESUME_STATE eResumeSetVal);
+RESULT PowerOn(void);
+RESULT PowerOff(void);
+/* External variables --------------------------------------------------------*/
+extern vu8 bDeviceState; /* USB device status */
+extern volatile bool fSuspendEnabled; /* true when suspend is possible */
+
+#endif /*__USB_PWR_H*/
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/vcp_str75x_iar/project/75x_init.s
===================================================================
--- trunk/firmware/arm/str/vcp_str75x_iar/project/75x_init.s (rev 0)
+++ trunk/firmware/arm/str/vcp_str75x_iar/project/75x_init.s 2008-02-17 21:32:01 UTC (rev 855)
@@ -0,0 +1,254 @@
+;******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+;* File Name : 75x_init.s
+;* Author : MCD Application Team
+;* Date First Issued : 03/10/2006
+;* Description : This module performs:
+;* - Memory remapping (if required),
+;* - Stack pointer initialisation for each mode ,
+;* - Interrupt Controller Initialisation
+;* - Branches to ?main in the C library (which eventually
+;* calls main()).
+;* On reset, the ARM core starts up in Supervisor (SVC) mode,
+;* in ARM state,with IRQ and FIQ disabled.
+;*******************************************************************************
+; History:
+; 07/17/2006 : V1.0
+; 03/10/2006 : V0.1
+;*******************************************************************************
+; THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+; WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+; AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+; INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+; CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+; INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+;*******************************************************************************
+
+ IMPORT WAKUP_Addr ; imported from 75x_vect.s
+
+
+
+
+ ; Depending on Your Application, Disable or Enable the following Defines
+ ; ----------------------------------------------------------------------------
+ ; SMI Bank0 configuration
+ ; ----------------------------------------------------------------------------
+ ; If you need to accees the SMI Bank0
+ ; uncomment next line
+ ; #define SMI_Bank0_EN
+
+ ; ----------------------------------------------------------------------------
+ ; Memory remapping
+ ; ----------------------------------------------------------------------------
+ ; #define Remap_SRAM ; remap SRAM at address 0x00
+
+ ; ----------------------------------------------------------------------------
+ ; EIC initialization
+ ; ----------------------------------------------------------------------------
+ #define EIC_INIT ; Configure and Initialize EIC
+
+; Standard definitions of mode bits and interrupt (I & F) flags in PSRs
+Mode_USR EQU 0x10
+Mode_FIQ EQU 0x11
+Mode_IRQ EQU 0x12
+Mode_SVC EQU 0x13
+Mode_ABT EQU 0x17
+Mode_UND EQU 0x1B
+Mode_SYS EQU 0x1F
+
+I_Bit EQU 0x80 ; when I bit is set, IRQ is disabled
+F_Bit EQU 0x40 ; when F bit is set, FIQ is disabled
+
+
+; MRCC Register
+MRCC_PCLKEN_Addr EQU 0x60000030 ; Peripheral Clock Enable register base address
+
+; CFG Register
+CFG_GLCONF_Addr EQU 0x60000010 ; Global Configuration register base address
+SRAM_mask EQU 0x0002 ; to remap RAM at 0x0
+
+; GPIO Register
+GPIOREMAP0R_Addr EQU 0xFFFFE420
+SMI_EN_Mask EQU 0x00000001
+
+; SMI Register
+SMI_CR1_Addr EQU 0x90000000
+
+; EIC Registers offsets
+EIC_Base_addr EQU 0xFFFFF800 ; EIC base address
+ICR_off_addr EQU 0x00 ; Interrupt Control register offset
+CIPR_off_addr EQU 0x08 ; Current Interrupt Priority Register offset
+IVR_off_addr EQU 0x18 ; Interrupt Vector Register offset
+FIR_off_addr EQU 0x1C ; Fast Interrupt Register offset
+IER_off_addr EQU 0x20 ; Interrupt Enable Register offset
+IPR_off_addr EQU 0x40 ; Interrupt Pending Bit Register offset
+SIR0_off_addr EQU 0x60 ; Source Interrupt Register 0
+
+;---------------------------------------------------------------
+; ?program_start
+;---------------------------------------------------------------
+ MODULE ?program_start
+ SECTION IRQ_STACK:DATA:NOROOT(3)
+ SECTION FIQ_STACK:DATA:NOROOT(3)
+ SECTION UND_STACK:DATA:NOROOT(3)
+ SECTION ABT_STACK:DATA:NOROOT(3)
+ SECTION SVC_STACK:DATA:NOROOT(3)
+ SECTION CSTACK:DATA:NOROOT(3)
+ SECTION .text:CODE(2)
+ PUBLIC __iar_program_start
+ EXTERN ?main
+ CODE32
+
+
+__iar_program_start:
+ LDR pc, =NextInst
+
+NextInst
+; Reset all Peripheral Clocks
+; This is usefull only when using debugger to Reset\Run the application
+
+ #ifdef SMI_Bank0_EN
+ LDR r0, =0x01000000 ; Disable peripherals clock (except GPIO)
+ #else
+ LDR r0, =0x00000000 ; Disable peripherals clock
+ #endif
+ LDR r1, =MRCC_PCLKEN_Addr
+ STR r0, [r1]
+
+ #ifdef SMI_Bank0_EN
+ LDR r0, =0x1875623F ; Peripherals kept under reset (except GPIO)
+ #else
+ LDR r0, =0x1975623F ; Peripherals kept under reset
+ #endif
+
+ STR r0, [r1,#4]
+ MOV r0, #0
+ NOP ; Wait
+ NOP
+ NOP
+ NOP
+ STR r0, [r1,#4] ; Disable peripherals reset
+
+; Initialize stack pointer registers
+; Enter each mode in turn and set up the stack pointer
+
+
+ MSR CPSR_c, #Mode_FIQ|I_Bit|F_Bit ; No interrupts
+ ldr sp,=SFE(FIQ_STACK) ; End of FIQ_STACK
+
+ MSR CPSR_c, #Mode_IRQ|I_Bit|F_Bit ; No interrupts
+ ldr sp,=SFE(IRQ_STACK) ; End of IRQ_STACK
+
+ MSR CPSR_c, #Mode_ABT|I_Bit|F_Bit ; No interrupts
+ ldr sp,=SFE(ABT_STACK) ; End of ABT_STACK
+
+ MSR CPSR_c, #Mode_UND|I_Bit|F_Bit ; No interrupts
+ ldr sp,=SFE(UND_STACK) ; End of UND_STACK
+
+ MSR CPSR_c, #Mode_SVC|I_Bit|F_Bit ; No interrupts
+ ldr sp,=SFE(SVC_STACK) ; End of SVC_STACK
+
+; ------------------------------------------------------------------------------
+; Description : Enable SMI Bank0: enable GPIOs clock in MRCC_PCLKEN register,
+; enable SMI alternate function in GPIO_REMAP register and enable
+; Bank0 in SMI_CR1 register.
+; ------------------------------------------------------------------------------
+ #ifdef SMI_Bank0_EN
+ MOV r0, #0x01000000
+ LDR r1, =MRCC_PCLKEN_Addr
+ STR r0, [r1] ; Enable GPIOs clock
+
+ LDR r1, =GPIOREMAP0R_Addr
+ MOV r0, #SMI_EN_Mask
+ LDR r2, [r1]
+ ORR r2, r2, r0
+ STR r2, [r1] ; Enable SMI alternate function
+
+ LDR r0, =0x251 ; SMI Bank0 enabled, Prescaler = 2, Deselect Time = 5
+ LDR r1, =SMI_CR1_Addr
+ STR r0, [r1] ; Configure CR1 register
+ LDR r0, =0x00
+ STR r0, [r1,#4] ; Reset CR2 register
+ #endif
+
+; ------------------------------------------------------------------------------
+; Description : Remapping SRAM at address 0x00 after the application has
+; started executing.
+; ------------------------------------------------------------------------------
+ #ifdef Remap_SRAM
+ MOV r0, #SRAM_mask
+ LDR r1, =CFG_GLCONF_Addr
+ LDR r2, [r1] ; Read GLCONF Register
+ BIC r2, r2, #0x03 ; Reset the SW_BOOT bits
+ ORR r2, r2, r0 ; Change the SW_BOOT bits
+ STR r2, [r1] ; Write GLCONF Register
+ #endif
+
+;-------------------------------------------------------------------------------
+;Description : Initialize the EIC as following :
+; - IRQ disabled
+; - FIQ disabled
+; - IVR contains the load PC opcode
+; - All channels are disabled
+; - All channels priority equal to 0
+; - All SIR registers contains offset to the related IRQ table entry
+;-------------------------------------------------------------------------------
+ #ifdef EIC_INIT
+ LDR r3, =EIC_Base_addr
+ LDR r4, =0x00000000
+ STR r4, [r3, #ICR_off_addr] ; Disable FIQ and IRQ
+ STR r4, [r3, #IER_off_addr] ; Disable all interrupts channels
+
+ LDR r4, =0xFFFFFFFF
+ STR r4, [r3, #IPR_off_addr] ; Clear all IRQ pending bits
+
+ LDR r4, =0x18
+ STR r4, [r3, #FIR_off_addr] ; Disable FIQ channels and clear FIQ pending bits
+
+ LDR r4, =0x00000000
+ STR r4, [r3, #CIPR_off_addr] ; Reset the current priority register
+
+ LDR r4, =0xE59F0000 ; Write the LDR pc,pc,#offset..
+ STR r4, [r3, #IVR_off_addr] ; ..instruction code in IVR[31:16]
+
+
+ LDR r2,= 32 ; 32 Channel to initialize
+ LDR r0, =WAKUP_Addr ; Read the address of the IRQs address table
+ LDR r1, =0x00000FFF
+ AND r0,r0,r1
+ LDR r5,=SIR0_off_addr ; Read SIR0 address
+ SUB r4,r0,#8 ; subtract 8 for prefetch
+ LDR r1, =0xF7E8 ; add the offset to the 0x00 address..
+ ; ..(IVR address + 7E8 = 0x00)
+ ; 0xF7E8 used to complete the LDR pc,offset opcode
+ ADD r1,r4,r1 ; compute the jump offset
+EIC_INI
+ MOV r4, r1, LSL #16 ; Left shift the result
+ STR r4, [r3, r5] ; Store the result in SIRx register
+ ADD r1, r1, #4 ; Next IRQ address
+ ADD r5, r5, #4 ; Next SIR
+ SUBS r2, r2, #1 ; Decrement the number of SIR registers to initialize
+ BNE EIC_INI ; If more then continue
+
+ #endif
+
+
+; --- Now change to USR/SYS mode and set up User mode stack,
+
+ MSR CPSR_c, #Mode_SYS ; IRQs & FIQs are now enabled
+ ldr sp,=SFE(CSTACK) ; End of CSTACK
+
+
+; --- Branch to C Library entry point
+
+
+
+ B ?main ; use B not BL, because an application will never return this way
+
+
+
+
+ LTORG
+
+
+ END
+;******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE*****
Added: trunk/firmware/arm/str/vcp_str75x_iar/project/75x_vect.s
===================================================================
--- trunk/firmware/arm/str/vcp_str75x_iar/project/75x_vect.s (rev 0)
+++ trunk/firmware/arm/str/vcp_str75x_iar/project/75x_vect.s 2008-02-17 21:32:01 UTC (rev 855)
@@ -0,0 +1,877 @@
+;******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+;* File Name : 75x_vect.c
+;* Author : MCD Application Team
+;* Date First Issued : 03/10/2006
+;* Description : This file used to initialize the exception and IRQ
+;* vectors, and to enter/return to/from exceptions handlers.
+;*******************************************************************************
+; History:
+; 07/17/2006 : V1.0
+; 03/10/2006 : V0.1
+;*******************************************************************************
+;* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+;* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+;* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+;* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+;* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+;* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+;*******************************************************************************
+
+ PROGRAM ?RESET
+ SECTION .intvec:CODE(2)
+ CODE32
+
+EIC_base_addr EQU 0xFFFFF800 ; EIC base address
+CICR_off_addr EQU 0x04 ; Current Interrupt Channel Register
+IVR_off_addr EQU 0x18 ; Interrupt Vector Register
+IPR_off_addr EQU 0x40 ; Interrupt Pending Register
+
+
+;*******************************************************************************
+; Import the __iar_program_start address from 75x_init.s
+;*******************************************************************************
+
+ IMPORT __iar_program_start
+
+
+
+;*******************************************************************************
+; Import exception handlers
+;*******************************************************************************
+
+ IMPORT Undefined_Handler
+ IMPORT SWI_Handler
+ IMPORT Prefetch_Handler
+ IMPORT Abort_Handler
+ IMPORT FIQ_Handler
+
+;*******************************************************************************
+; Import IRQ handlers from 75x_it.c
+;*******************************************************************************
+
+ IMPORT WAKUP_IRQHandler
+ IMPORT TIM2_OC2_IRQHandler
+ IMPORT TIM2_OC1_IRQHandler
+ IMPORT TIM2_IC12_IRQHandler
+ IMPORT TIM2_UP_IRQHandler
+ IMPORT TIM1_OC2_IRQHandler
+ IMPORT TIM1_OC1_IRQHandler
+ IMPORT TIM1_IC12_IRQHandler
+ IMPORT TIM1_UP_IRQHandler
+ IMPORT TIM0_OC2_IRQHandler
+ IMPORT TIM0_OC1_IRQHandler
+ IMPORT TIM0_IC12_IRQHandler
+ IMPORT TIM0_UP_IRQHandler
+ IMPORT PWM_OC123_IRQHandler
+ IMPORT PWM_EM_IRQHandler
+ IMPORT PWM_UP_IRQHandler
+ IMPORT I2C_IRQHandler
+ IMPORT SSP1_IRQHandler
+ IMPORT SSP0_IRQHandler
+ IMPORT UART2_IRQHandler
+ IMPORT UART1_IRQHandler
+ IMPORT UART0_IRQHandler
+ IMPORT CAN_IRQHandler
+ IMPORT USB_LP_IRQHandler
+ IMPORT USB_HP_IRQHandler
+ IMPORT ADC_IRQHandler
+ IMPORT DMA_IRQHandler
+ IMPORT EXTIT_IRQHandler
+ IMPORT MRCC_IRQHandler
+ IMPORT FLASHSMI_IRQHandler
+ IMPORT RTC_IRQHandler
+ IMPORT TB_IRQHandler
+
+;*******************************************************************************
+; Export Peripherals IRQ handlers table address
+;*******************************************************************************
+
+ EXPORT WAKUP_Addr
+
+;*******************************************************************************
+; Exception vectors
+;*******************************************************************************
+
+
+ LDR PC, Reset_Addr
+ LDR PC, Undefined_Addr
+ LDR PC, SWI_Addr
+ LDR PC, Prefetch_Addr
+ LDR PC, Abort_Addr
+ NOP ; Reserved vector
+ LDR PC, IRQ_Addr
+ LDR PC, FIQ_Addr
+
+;*******************************************************************************
+; Exception handlers address table
+;*******************************************************************************
+
+Reset_Addr DCD __iar_program_start
+Undefined_Addr DCD UndefinedHandler
+SWI_Addr DCD SWIHandler
+Prefetch_Addr DCD PrefetchAbortHandler
+Abort_Addr DCD DataAbortHandler
+ DCD 0 ; Reserved vector
+IRQ_Addr DCD IRQHandler
+FIQ_Addr DCD FIQHandler
+
+;*******************************************************************************
+; Peripherals IRQ handlers address table
+;*******************************************************************************
+
+WAKUP_Addr DCD WAKUPIRQHandler
+TIM2_OC2_Addr DCD TIM2_OC2IRQHandler
+TIM2_OC1_Addr DCD TIM2_OC1IRQHandler
+TIM2_IC12_Addr DCD TIM2_IC12IRQHandler
+TIM2_UP_Addr DCD TIM2_UPIRQHandler
+TIM1_OC2_Addr DCD TIM1_OC2IRQHandler
+TIM1_OC1_Addr DCD TIM1_OC1IRQHandler
+TIM1_IC12_Addr DCD TIM1_IC12IRQHandler
+TIM1_UP_Addr DCD TIM1_UPIRQHandler
+TIM0_OC2_Addr DCD TIM0_OC2IRQHandler
+TIM0_OC1_Addr DCD TIM0_OC1IRQHandler
+TIM0_IC12_Addr DCD TIM0_IC12IRQHandler
+TIM0_UP_Addr DCD TIM0_UPIRQHandler
+PWM_OC123_Addr DCD PWM_OC123IRQHandler
+PWM_EM_Addr DCD PWM_EMIRQHandler
+PWM_UP_Addr DCD PWM_UPIRQHandler
+I2C_Addr DCD I2CIRQHandler
+SSP1_Addr DCD SSP1IRQHandler
+SSP0_Addr DCD SSP0IRQHandler
+UART2_Addr DCD UART2IRQHandler
+UART1_Addr DCD UART1IRQHandler
+UART0_Addr DCD UART0IRQHandler
+CAN_Addr DCD CANIRQHandler
+USB_LP_Addr DCD USB_LPIRQHandler
+USB_HP_Addr DCD USB_HPIRQHandler
+ADC_Addr DCD ADCIRQHandler
+DMA_Addr DCD DMAIRQHandler
+EXTIT_Addr DCD EXTITIRQHandler
+MRCC_Addr DCD MRCCIRQHandler
+FLASHSMI_Addr DCD FLASHSMIIRQHandler
+RTC_Addr DCD RTCIRQHandler
+TB_Addr DCD TBIRQHandler
+
+;*******************************************************************************
+; Exception Handlers
+;*******************************************************************************
+
+;*******************************************************************************
+;* Macro Name : SaveContext
+;* Description : This macro used to save the context before entering
+;* an exception handler.
+;* Input : The range of registers to store.
+;* Output : none
+;*******************************************************************************
+SaveContext MACRO reg1,reg2
+ STMFD sp!,{reg1-reg2,lr} ; Save The workspace plus the current return
+ ; address lr_ mode into the stack.
+ MRS r1,spsr ; Save the spsr_mode into r1.
+ STMFD sp!,{r1} ; Save spsr.
+ ENDM
+
+;*******************************************************************************
+;* Macro Name : RestoreContext
+;* Description : This macro used to restore the context to return from
+;* an exception handler and continue the program execution.
+;* Input : The range of registers to restore.
+;* Output : none
+;*******************************************************************************
+RestoreContext MACRO reg1,reg2
+ LDMFD sp!,{r1} ; Restore the saved spsr_mode into r1.
+ MSR spsr_cxsf,r1 ; Restore spsr_mode.
+ LDMFD sp!,{reg1-reg2,pc}^; Return to the instruction following...
+ ; ...the exception interrupt.
+ ENDM
+
+;*******************************************************************************
+;* Function Name : UndefinedHandler
+;* Description : This function called when undefined instruction exception
+;* is entered.
+;* Input : none
+;* Output : none
+;*******************************************************************************
+UndefinedHandler
+ SaveContext r0,r12 ; Save the workspace plus the current
+ ; return address lr_ und and spsr_und.
+ ldr r0,=Undefined_Handler
+ ldr lr,=Undefined_Handler_end
+ bx r0 ;Branch to Undefined_Handler
+Undefined_Handler_end:
+ RestoreContext r0,r12 ; Return to the instruction following...
+ ; ...the undefined instruction.
+
+;*******************************************************************************
+;* Function Name : SWIHandler
+;* Description : This function called when SWI instruction executed.
+;* Input : none
+;* Output : none
+;*******************************************************************************
+SWIHandler
+ SaveContext r0,r12 ; Save the workspace plus the current
+ ; return address lr_ svc and spsr_svc.
+ ldr r0,= SWI_Handler
+ ldr lr,= SWI_Handler_end
+ bx r0 ;Branch to SWI_Handler
+SWI_Handler_end:
+ RestoreContext r0,r12 ; Return to the instruction following...
+ ; ...the SWI instruction.
+
+;*******************************************************************************
+;* Function Name : IRQHandler
+;* Description : This function called when IRQ exception is entered.
+;* Input : none
+;* Output : none
+;*******************************************************************************
+IRQHandler
+ SUB lr,lr,#4 ; Update the link register
+ SaveContext r0,r12 ; Save the workspace plus the current
+ ; return address lr_ irq and spsr_irq.
+ LDR lr, =ReturnAddress ; Read the return address.
+ LDR r0, =EIC_base_addr
+ LDR r1, =IVR_off_addr
+ ADD pc,r0,r1 ; Branch to the IRQ handler.
+ReturnAddress
+ ; Clear pending bit in EIC (using the proper IPRx)
+ LDR r0, =EIC_base_addr
+ LDR r2, [r0, #CICR_off_addr] ; Get the IRQ channel number
+ MOV r3,#1
+ MOV r3,r3,LSL r2
+ STR r3,[r0, #IPR_off_addr] ; Clear the corresponding IPR bit.
+
+ RestoreContext r0,r12 ; Restore the context and return to the...
+ ; ...program execution.
+
+;*******************************************************************************
+;* Function Name : PrefetchAbortHandler
+;* Description : This function called when Prefetch Abort exception is entered.
+;* Input : none
+;* Output : none
+;*******************************************************************************
+PrefetchAbortHandler
+ SUB lr,lr,#4 ; Update the link register.
+ SaveContext r0,r7 ; Save the workspace plus the current
+ ; return address lr_abt and spsr_abt.
+ ldr r0,= Prefetch_Handler
+ ldr lr,= Prefetch_Handler_end
+ bx r0 ;Branch to Prefetch_Handler
+Prefetch_Handler_end:
+ RestoreContext r0,r7 ; Return to the instruction following that...
+ ; ...has generated the prefetch abort exception.
+
+;*******************************************************************************
+;* Function Name : DataAbortHandler
+;* Description : This function is called when Data Abort exception is entered.
+;* Input : none
+;* Output : none
+;*******************************************************************************
+DataAbortHandler
+ SUB lr,lr,#8 ; Update the link register.
+ SaveContext r0,r12 ; Save the workspace plus the current
+ ; return address lr_ abt and spsr_abt.
+ ldr r0,= Abort_Handler
+ ldr lr,= Abort_Handler_end
+ bx r0 ;Branch to Abort_Handler
+Abort_Handler_end:
+ RestoreContext r0,r12 ; Return to the instruction following that...
+ ; ...has generated the data abort exception.
+
+;*******************************************************************************
+;* Function Name : FIQHandler
+;* Description : This function is called when FIQ exception is entered.
+;* Input : none
+;* Output : none
+;*******************************************************************************
+FIQHandler
+ SUB lr,lr,#4 ; Update the link register.
+ SaveContext r0,r7 ; Save the workspace plus the current
+ ; return address lr_ fiq and spsr_fiq.
+ ldr r0,= FIQ_Handler
+ ldr lr,= FIQ_Handler_end
+ bx r0 ;Branch to FIQ_Handler
+FIQ_Handler_end:
+ RestoreContext r0,r7 ; Restore the context and return to the...
+ ; ...program execution.
+
+;*******************************************************************************
+;* Macro Name : IRQ_to_SYS
+;* Description : This macro used to switch form IRQ mode to SYS mode.
+;* Input : none.
+;* Output : none
+;*******************************************************************************
+IRQ_to_SYS MACRO
+ MSR cpsr_c,#0x1F
+ STMFD sp!,{lr}
+ ENDM
+
+;*******************************************************************************
+;* Macro Name : SYS_to_IRQ
+;* Description : This macro used to switch from SYS mode to IRQ mode.
+;* Input : none.
+;* Output : none
+;*******************************************************************************
+SYS_to_IRQ MACRO
+ LDMFD sp!,{lr}
+ MSR cpsr_c,#0xD2
+ MOV pc,lr
+ ENDM
+
+;*******************************************************************************
+;* Function Name : WAKUPIRQHandler
+;* Description : This function used to switch to SYS mode before entering
+;* the WAKUP_IRQHandler function located in 75x_it.c.
+;* Then to return to IRQ mode after the WAKUP_IRQHandler
+;* function termination.
+;* Input : none
+;* Output : none
+;*******************************************************************************
+WAKUPIRQHandler
+ IRQ_to_SYS
+ ldr r0,=WAKUP_IRQHandler
+ ldr lr,=WAKUP_IRQHandler_end
+ bx r0
+WAKUP_IRQHandler_end:
+ SYS_to_IRQ
+
+;*******************************************************************************
+;* Function Name : TIM2_OC2IRQHandler
+;* Description : This function used to switch to SYS mode before entering
+;* the TIM2_OC2_IRQHandler function located in 75x_it.c.
+;* Then to return to IRQ mode after the TIM2_OC2_IRQHandler
+;* function termination.
+;* Input : none
+;* Output : none
+;*******************************************************************************
+TIM2_OC2IRQHandler
+ IRQ_to_SYS
+ ldr r0,=TIM2_OC2_IRQHandler
+ ldr lr,=TIM2_OC2_IRQHandler_end
+ bx r0
+TIM2_OC2_IRQHandler_end:
+ SYS_to_IRQ
+
+;*******************************************************************************
+;* Function Name : TIM2_OC1IRQHandler
+;* Description : This function used to switch to SYS mode before entering
+;* the TIM2_OC1_IRQHandler function located in 75x_it.c.
+;* Then to return to IRQ mode after the TIM2_OC1_IRQHandler
+;* function termination.
+;* Input : none
+;* Output : none
+;*******************************************************************************
+TIM2_OC1IRQHandler
+ IRQ_to_SYS
+ ldr r0,=TIM2_OC1_IRQHandler
+ ldr lr,=TIM2_OC1_IRQHandler_end
+ bx r0
+TIM2_OC1_IRQHandler_end:
+ SYS_to_IRQ
+
+;*******************************************************************************
+;* Function Name : TIM2_IC12IRQHandler
+;* Description : This function used to switch to SYS mode before entering
+;* the TIM2_IC12_IRQHandler function located in 75x_it.c.
+;* Then to return to IRQ mode after the TIM2_IC12_IRQHandler
+;* function termination.
+;* Input : none
+;* Output : none
+;*******************************************************************************
+TIM2_IC12IRQHandler
+ IRQ_to_SYS
+ ldr r0,=TIM2_IC12_IRQHandler
+ ldr lr,=TIM2_IC12_IRQHandler_end
+ bx r0
+TIM2_IC12_IRQHandler_end:
+ SYS_to_IRQ
+
+;*******************************************************************************
+;* Function Name : TIM2_UPIRQHandler
+;* Description : This function used to switch to SYS mode before entering
+;* the TIM2_UP_IRQHandler function located in 75x_it.c.
+;* Then to return to IRQ mode after the TIM2_UP_IRQHandler
+;* function termination.
+;* Input : none
+;* Output : none
+;*******************************************************************************
+TIM2_UPIRQHandler
+ IRQ_to_SYS
+ ldr r0,=TIM2_UP_IRQHandler
+ ldr lr,=TIM2_UP_IRQHandler_end
+ bx r0
+TIM2_UP_IRQHandler_end:
+ SYS_to_IRQ
+
+;*******************************************************************************
+;* Function Name : TIM1_OC2IRQHandler
+;* Description : This function used to switch to SYS mode before entering
+;* the TIM1_OC2_IRQHandler function located in 75x_it.c.
+;* Then to return to IRQ mode after the TIM1_OC2_IRQHandler
+;* function termination.
+;* Input : none
+;* Output : none
+;*******************************************************************************
+TIM1_OC2IRQHandler
+ IRQ_to_SYS
+ ldr r0,=TIM1_OC2_IRQHandler
+ ldr lr,=TIM1_OC2_IRQHandler_end
+ bx r0
+TIM1_OC2_IRQHandler_end:
+ SYS_to_IRQ
+
+;*******************************************************************************
+;* Function Name : TIM1_OC1IRQHandler
+;* Description : This function used to switch to SYS mode before entering
+;* the TIM1_OC1_IRQHandler function located in 75x_it.c.
+;* Then to return to IRQ mode after the TIM1_OC1_IRQHandler
+;* function termination.
+;* Input : none
+;* Output : none
+;*******************************************************************************
+TIM1_OC1IRQHandler
+ IRQ_to_SYS
+ ldr r0,=TIM1_OC1_IRQHandler
+ ldr lr,=TIM1_OC1_IRQHandler_end
+ bx r0
+TIM1_OC1_IRQHandler_end:
+ SYS_to_IRQ
+
+;*******************************************************************************
+;* Function Name : TIM1_IC12IRQHandler
+;* Description : This function used to switch to SYS mode before entering
+;* the TIM1_IC12_IRQHandler function located in 75x_it.c.
+;* Then to return to IRQ mode after the TIM1_IC12_IRQHandler
+;* function termination.
+;* Input : none
+;* Output : none
+;*******************************************************************************
+TIM1_IC12IRQHandler
+ IRQ_to_SYS
+ ldr r0,=TIM1_IC12_IRQHandler
+ ldr lr,=TIM1_IC12_IRQHandler_end
+ bx r0
+TIM1_IC12_IRQHandler_end:
+ SYS_to_IRQ
+
+;*******************************************************************************
+;* Function Name : TIM1_UPIRQHandler
+;* Description : This function used to switch to SYS mode before entering
+;* the TIM1_UP_IRQHandler function located in 75x_it.c.
+;* Then to return to IRQ mode after the TIM1_UP_IRQHandler
+;* function termination.
+;* Input : none
+;* Output : none
+;*******************************************************************************
+TIM1_UPIRQHandler
+ IRQ_to_SYS
+ ldr r0,=TIM1_UP_IRQHandler
+ ldr lr,=TIM1_UP_IRQHandler_end
+ bx r0
+TIM1_UP_IRQHandler_end:
+ SYS_to_IRQ
+
+;*******************************************************************************
+;* Function Name : TIM0_OC2IRQHandler
+;* Description : This function used to switch to SYS mode before entering
+;* the TIM0_OC2_IRQHandler function located in 75x_it.c.
+;* Then to return to IRQ mode after the TIM0_OC2_IRQHandler
+;* function termination.
+;* Input : none
+;* Output : none
+;*******************************************************************************
+TIM0_OC2IRQHandler
+ IRQ_to_SYS
+ ldr r0,=TIM0_OC2_IRQHandler
+ ldr lr,=TIM0_OC2_IRQHandler_end
+ bx r0
+TIM0_OC2_IRQHandler_end:
+ SYS_to_IRQ
+
+;*******************************************************************************
+;* Function Name : TIM0_OC1IRQHandler
+;* Description : This function used to switch to SYS mode before entering
+;* the TIM0_OC1_IRQHandler function located in 75x_it.c.
+;* Then to return to IRQ mode after the TIM0_OC1_IRQHandler
+;* function termination.
+;* Input : none
+;* Output : none
+;*******************************************************************************
+TIM0_OC1IRQHandler
+ IRQ_to_SYS
+ ldr r0,=TIM0_OC1_IRQHandler
+ ldr lr,=TIM0_OC1_IRQHandler_end
+ bx r0
+TIM0_OC1_IRQHandler_end:
+ SYS_to_IRQ
+
+;*******************************************************************************
+;* Function Name : TIM0_IC12IRQHandler
+;* Description : This function used to switch to SYS mode before entering
+;* the TIM0_IC12_IRQHandler function located in 75x_it.c.
+;* Then to return to IRQ mode after the TIM0_IC12_IRQHandler
+;* function termination.
+;* Input : none
+;* Output : none
+;*******************************************************************************
+TIM0_IC12IRQHandler
+ IRQ_to_SYS
+ ldr r0,=TIM0_IC12_IRQHandler
+ ldr lr,=TIM0_IC12_IRQHandler_end
+ bx r0
+TIM0_IC12_IRQHandler_end:
+ SYS_to_IRQ
+
+;*******************************************************************************
+;* Function Name : TIM0_UPIRQHandler
+;* Description : This function used to switch to SYS mode before entering
+;* the TIM0_UP_IRQHandler function located in 75x_it.c.
+;* Then to return to IRQ mode after the TIM0_UP_IRQHandler
+;* function termination.
+;* Input : none
+;* Output : none
+;*******************************************************************************
+TIM0_UPIRQHandler
+ IRQ_to_SYS
+ ldr r0,=TIM0_UP_IRQHandler
+ ldr lr,=TIM0_UP_IRQHandler_end
+ bx r0
+TIM0_UP_IRQHandler_end:
+ SYS_to_IRQ
+
+;*******************************************************************************
+;* Function Name ...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-17 21:26:26
|
Revision: 854
http://can.svn.sourceforge.net/can/?rev=854&view=rev
Author: akhe
Date: 2008-02-17 13:26:25 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
Added some missing libs fro IAR cantest build
Added Paths:
-----------
trunk/firmware/arm/str/cantest_str73x_iar/settings/
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_adc.h
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_bspi.h
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_can.h
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_cfg.h
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_cmu.h
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_dma.h
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_eic.h
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_flash.h
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_gpio.h
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_i2c.h
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_lib.h
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_map.h
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_prccu.h
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_pwm.h
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_rtc.h
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_tb.h
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_tim.h
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_type.h
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_uart.h
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_wdg.h
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_wiu.h
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_wut.h
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/source/
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/source/73x_adc.c
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/source/73x_bspi.c
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/source/73x_can.c
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/source/73x_cfg.c
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/source/73x_cmu.c
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/source/73x_dma.c
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/source/73x_eic.c
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/source/73x_flash.c
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/source/73x_gpio.c
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/source/73x_i2c.c
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/source/73x_lib.c
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/source/73x_prccu.c
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/source/73x_pwm.c
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/source/73x_rtc.c
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/source/73x_tb.c
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/source/73x_tim.c
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/source/73x_uart.c
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/source/73x_wdg.c
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/source/73x_wiu.c
trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/source/73x_wut.c
Added: trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_adc.h
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_adc.h (rev 0)
+++ trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_adc.h 2008-02-17 21:26:25 UTC (rev 854)
@@ -0,0 +1,188 @@
+/******************** (C) COPYRIGHT 2005 STMicroelectronics ********************
+* File Name : 73x_adc.h
+* Author : MCD Application Team
+* Date First Issued : 09/27/2005 : V1.0
+* Description : This file contains all the functions prototypes for the
+* ADC software library.
+**********************************************************************************
+* History:
+* 09/27/2005 : V1.0
+**********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+* CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*********************************************************************************/
+
+
+/* Define to prevent recursive inclusion ---------------------------------------*/
+#ifndef __73x_ADC_H
+#define __73x_ADC_H
+
+/* Includes --------------------------------------------------------------------*/
+#include "73x_map.h"
+#include "73x_cfg.h"
+
+
+/* Exported types --------------------------------------------------------------*/
+
+/* ADC Init structure definition */
+typedef struct
+{
+ u8 ADC_Calibration;
+ u8 ADC_SamplingPrescaler;
+ u8 ADC_ConversionPrescaler;
+ u8 ADC_FirstChannel;
+ u8 ADC_ChannelNumber;
+ u16 ADC_CalibAverage;
+ u16 ADC_AutoClockOff;
+ u16 ADC_ConversionMode;
+ }ADC_InitTypeDef;
+
+/* ADC control status flags */
+#define ADC_FLAG_ECH 0x0001
+#define ADC_FLAG_EOC 0x0002
+#define ADC_FLAG_JECH 0x0004
+#define ADC_FLAG_JEOC 0x0008
+#define ADC_FLAG_AnalogWatchdog0_LowThresold 0x0010
+#define ADC_FLAG_AnalogWatchdog0_HighThresold 0x0020
+#define ADC_FLAG_AnalogWatchdog1_LowThresold 0x0040
+#define ADC_FLAG_AnalogWatchdog1_HighThresold 0x0080
+#define ADC_FLAG_AnalogWatchdog2_LowThresold 0x0100
+#define ADC_FLAG_AnalogWatchdog2_HighThresold 0x0200
+#define ADC_FLAG_AnalogWatchdog3_LowThresold 0x0400
+#define ADC_FLAG_AnalogWatchdog3_HighThresold 0x0800
+
+/* ADC Interrupt sources */
+#define ADC_IT_None 0x0000
+#define ADC_IT_ECH 0x0001
+#define ADC_IT_EOC 0x0002
+#define ADC_IT_JECH 0x0004
+#define ADC_IT_JEOC 0x0008
+#define ADC_IT_AnalogWatchdog0_LowThresold 0x0010
+#define ADC_IT_AnalogWatchdog0_HighThresold 0x0020
+#define ADC_IT_AnalogWatchdog1_LowThresold 0x0040
+#define ADC_IT_AnalogWatchdog1_HighThresold 0x0080
+#define ADC_IT_AnalogWatchdog2_LowThresold 0x0100
+#define ADC_IT_AnalogWatchdog2_HighThresold 0x0200
+#define ADC_IT_AnalogWatchdog3_LowThresold 0x0400
+#define ADC_IT_AnalogWatchdog3_HighThresold 0x0800
+
+/* ADC Watchdogs Thresholds */
+#define ADC_AnalogWatchdog0 0x0030
+#define ADC_AnalogWatchdog1 0x00C0
+#define ADC_AnalogWatchdog2 0x0300
+#define ADC_AnalogWatchdog3 0x0C00
+
+/* ADC Channels */
+#define ADC_CHANNEL0 0x0
+#define ADC_CHANNEL1 0x1
+#define ADC_CHANNEL2 0x2
+#define ADC_CHANNEL3 0x3
+#define ADC_CHANNEL4 0x4
+#define ADC_CHANNEL5 0x5
+#define ADC_CHANNEL6 0x6
+#define ADC_CHANNEL7 0x7
+#define ADC_CHANNEL8 0x8
+#define ADC_CHANNEL9 0x9
+#define ADC_CHANNEL10 0xA
+#define ADC_CHANNEL11 0xB
+#define ADC_CHANNEL12 0xC
+#define ADC_CHANNEL13 0xD
+#define ADC_CHANNEL14 0xE
+#define ADC_CHANNEL15 0xF
+
+/* ADC DMA Channels */
+#define ADC_DMA_CHANNEL0 0x0001
+#define ADC_DMA_CHANNEL1 0x0002
+#define ADC_DMA_CHANNEL2 0x0004
+#define ADC_DMA_CHANNEL3 0x0008
+#define ADC_DMA_CHANNEL4 0x0010
+#define ADC_DMA_CHANNEL5 0x0020
+#define ADC_DMA_CHANNEL6 0x0040
+#define ADC_DMA_CHANNEL7 0x0080
+#define ADC_DMA_CHANNEL8 0x0100
+#define ADC_DMA_CHANNEL9 0x0200
+#define ADC_DMA_CHANNEL10 0x0400
+#define ADC_DMA_CHANNEL11 0x0800
+#define ADC_DMA_CHANNEL12 0x1000
+#define ADC_DMA_CHANNEL13 0x2000
+#define ADC_DMA_CHANNEL14 0x4000
+#define ADC_DMA_CHANNEL15 0x8000
+
+/* Mask for DMA enable*/
+#define ADC_DMA_Enable 0x8000
+#define ADC_DMA_Disable 0x000F
+
+/* Mask for Injected conversion start */
+#define ADC_Injec_ConversionStart 0x8000
+
+/* Mask for Watchdog Thresholds Enable */
+#define ADC_AnalogWatchdog_Enable 0x8000
+#define ADC_AnalogWatchdog_Disable 0x7FFF
+
+/* Mask for Power Down Mode */
+#define ADC_PowerDown_Enable 0x8000
+#define ADC_PowerDown_Disable 0x7FFF
+
+/* Mask for Start Conversion */
+#define ADC_ConversionStart 0x0001
+#define ADC_ConversionStop 0xFFFE
+
+/* Mask for Prescaler selection */
+#define ADC_Sampling_Prescaler 0x1
+#define ADC_Conversion_Prescaler 0x2
+#define ADC_Both_Prescalers 0x3
+
+/* ADC Conversion Modes */
+#define ADC_ConversionMode_Scan 0x8000
+#define ADC_ConversionMode_OneShot 0x0000
+
+/* Mask for Auto Clock Off */
+#define ADC_AutoClockOff_Enable 0x4000
+#define ADC_AutoClockOff_Disable 0x0000
+
+/* Mask for Calibration */
+#define ADC_Calibration_ON 0x0002
+#define ADC_Calibration_OFF 0x0000
+#define ADC_CalibAverage_Disable 0x0020
+#define ADC_CalibAverage_Enable 0x0000
+
+/* ADC Init Mask */
+#define ADC_CLR4_Mask 0x8000
+
+/* Module private variables ----------------------------------------------------*/
+
+/* Exported macro --------------------------------------------------------------*/
+
+/* Private functions -----------------------------------------------------------*/
+
+/* Exported functions ----------------------------------------------------------*/
+
+void ADC_DeInit (void);
+void ADC_StructInit (ADC_InitTypeDef *ADC_InitStruct);
+void ADC_Init (ADC_InitTypeDef *ADC_InitStruct);
+void ADC_CalibrationStart (u16 ADC_Calib);
+void ADC_ConversionCmd (u16 ADC_Cmd);
+void ADC_Cmd (FunctionalState NewState);
+void ADC_AutoClockOffConfig (FunctionalState NewState);
+void ADC_ChannelsSelect (u8 FirstChannel,u8 ChannelNumber );
+void ADC_PrescalersConfig (u8 ADC_Selection, u8 ADC_Prescaler);
+void ADC_AnalogWatchdogConfig(u16 ADC_Watchdog, u8 ADC_Channel,
+ u16 LowThreshold, u16 HighThreshold);
+void ADC_AnalogWatchdogCmd(u16 ADC_Watchdog, FunctionalState NewState);
+u16 ADC_GetAnalogWatchdogResult (u16 ADC_Watchdog);
+void ADC_InjectedConversionStart (void);
+void ADC_InjectedChannelsSelect (u8 FirstChannel,u8 ChannelNumber );
+u16 ADC_GetConversionValue( u16 ADC_Channel);
+void ADC_ITConfig (u16 ADC_IT, FunctionalState NewState );
+void ADC_FlagClear (u16 ADC_Flag);
+FlagStatus ADC_FlagStatus (u8 ADC_Flag);
+void ADC_DMAConfig(u16 ADC_DMAChannel, FunctionalState NewState);
+void ADC_DMACmd (FunctionalState NewState);
+u16 ADC_DMAFirstEnabledChannel (void);
+#endif /*__73x_ADC_H */
+
+/******************* (C) COPYRIGHT 2005 STMicroelectronics *****END OF FILE******/
Added: trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_bspi.h
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_bspi.h (rev 0)
+++ trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_bspi.h 2008-02-17 21:26:25 UTC (rev 854)
@@ -0,0 +1,150 @@
+/******************** (C) COPYRIGHT 2005 STMicroelectronics ********************
+* File Name : 73x_bspi.h
+* Author : MCD Application Team
+* Date First Issued : 09/27/2005 : V1.0
+* Description : This file contains all the functions prototypes for the
+* BSPI software library.
+**********************************************************************************
+* History:
+* 09/27/2005 : V1.0
+**********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+* CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*********************************************************************************/
+
+/* Define to prevent recursive inclusion ---------------------------------------*/
+#ifndef __73x_BSPI_H
+#define __73x_BSPI_H
+
+/* Includes --------------------------------------------------------------------*/
+#include "73x_map.h"
+
+/* Exported types --------------------------------------------------------------*/
+/* BSPI Init structure definition */
+typedef struct
+{
+ u8 BSPI_RxFifoSize ;
+ u8 BSPI_TxFifoSize ;
+ u8 BSPI_SSPin ;
+ u8 BSPI_CLKDivider ;
+ u16 BSPI_CPOL ;
+ u16 BSPI_CPHA ;
+ u16 BSPI_WordLength ;
+ u16 BSPI_Mode ;
+}BSPI_InitTypeDef;
+
+/* Exported constants ---------------------------------------------------------*/
+/* BSPI System Enable */
+#define BSPI_Enable 0x0001
+#define BSPI_Disable 0xFFFE
+
+/* BSPI Master/Slave Select */
+#define BSPI_Mode_Master 0x0002
+#define BSPI_Mode_Slave 0x0000
+
+/* BSPI Receive Interrupt */
+#define BSPI_RxIT_NONE 0x0000
+#define BSPI_RxIT_RFNE 0x0004
+#define BSPI_RxIT_RFF 0x000C
+#define BSPI_RxIT_Mask 0xFFF3
+
+/* BSPI Interrupts */
+#define BSPI_IT_REI 0x0010
+#define BSPI_IT_BEI 0x0080
+
+/* BSPI Clock Polarity */
+#define BSPI_CPOL_Low 0x0100
+#define BSPI_CPOL_High 0x0000
+
+/* BSPI Clock Phase */
+#define BSPI_CPHA_1Edge 0x0000
+#define BSPI_CPHA_2Edge 0x0200
+
+/* BSPI Word Length */
+#define BSPI_WordLength_16b 0x0400
+#define BSPI_WordLength_8b 0x0000
+
+/* BSPI Transmit Interrupt */
+#define BSPI_TxIT_NONE 0x0000
+#define BSPI_TxIT_TFE 0x4000
+#define BSPI_TxIT_TUFL 0x8000
+#define BSPI_TxIT_TFF 0xC000
+#define BSPI_TxIT_Mask 0x3FFF
+
+/* BSPI Flags */
+#define BSPI_FLAG_BERR 0x004
+#define BSPI_FLAG_RFNE 0x008
+#define BSPI_FLAG_RFF 0x010
+#define BSPI_FLAG_ROFL 0x020
+#define BSPI_FLAG_TFE 0x040
+#define BSPI_FLAG_TUFL 0x080
+#define BSPI_FLAG_TFF 0x100
+#define BSPI_FLAG_TFNE 0x200
+
+/* BSPI DMA Interface Enable */
+#define BSPI_DMA_Enable 0x02
+#define BSPI_DMA_Disable 0xFD
+
+/* BSPI DMA Transmit Request */
+#define BSPI_DMAReq_Tx 0x40
+
+/* BSPI DMA Receive Request */
+#define BSPI_DMAReq_Rx 0x80
+
+/* BSPI DMA Transmit Burst Length */
+#define BSPI_DMA_TxBurst_1Word 0x00
+#define BSPI_DMA_TxBurst_4Word 0x04
+#define BSPI_DMA_TxBurst_8Word 0x08
+#define BSPI_DMA_TxBurst_16Word 0x0C
+#define BSPI_DMA_TxBurst_Mask 0xF3
+
+/* BSPI DMA Receive Burst Length */
+#define BSPI_DMA_RxBurst_1Word 0x00
+#define BSPI_DMA_RxBurst_4Word 0x10
+#define BSPI_DMA_RxBurst_8Word 0x20
+#define BSPI_DMA_RxBurst_16Word 0x30
+#define BSPI_DMA_RxBurst_Mask 0xCF
+
+/* BSPI Mask Slave Select */
+#define BSPI_SSPin_Masked 0x01
+#define BSPI_SSPin_Used 0x00
+
+/* BSPI receive FIFO disable */
+#define BSPI_DFIFO 0x01
+
+#define BSPI_RxFifoSize_Mask 0x0FFF
+#define BSPI_TxFifoSize_Mask 0xC3FF
+
+#define BSPI_CSR1_Mask 0x00FD
+#define BSPI_CSR2_Mask 0xC3FF
+#define BSPI_CSR3_Mask 0xFFFE
+
+/* Module private variables --------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Private functions ---------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void BSPI_DeInit(BSPI_TypeDef* BSPIx);
+void BSPI_StructInit(BSPI_InitTypeDef* BSPI_InitStruct);
+void BSPI_Init(BSPI_TypeDef* BSPIx, BSPI_InitTypeDef* BSPI_InitStruct);
+void BSPI_Cmd(BSPI_TypeDef* BSPIx, FunctionalState NewState);
+void BSPI_ITConfig(BSPI_TypeDef* BSPIx, u16 BSPI_IT, FunctionalState NewState);
+void BSPI_TxITConfig(BSPI_TypeDef* BSPIx, u16 BSPI_TxIT);
+void BSPI_RxITConfig(BSPI_TypeDef* BSPIx, u16 BSPI_RxIT);
+void BSPI_DMAConfig(BSPI_TypeDef* BSPIx, u8 BSPI_DMAReq, FunctionalState NewState);
+void BSPI_DMATxBurstConfig(BSPI_TypeDef* BSPIx, u8 BSPI_DMA_TxBurst);
+void BSPI_DMARxBurstConfig(BSPI_TypeDef* BSPIx, u8 BSPI_DMA_RxBurst);
+void BSPI_DMACmd(BSPI_TypeDef* BSPIx, FunctionalState NewState);
+void BSPI_WordSend(BSPI_TypeDef* BSPIx, u16 Data);
+u16 BSPI_WordReceive(BSPI_TypeDef* BSPIx);
+ErrorStatus BSPI_BufferReceive(BSPI_TypeDef* BSPIx, u8* PtrToBuffer, u8 NbOfBytes);
+ErrorStatus BSPI_BufferSend(BSPI_TypeDef* BSPIx, u8* PtrToBuffer, u8 NbOfBytes);
+void BSPI_RxFifoDisable(BSPI_TypeDef* BSPIx);
+FlagStatus BSPI_FlagStatus(BSPI_TypeDef* BSPIx, u16 BSPI_Flag);
+
+#endif /* __73x_BSPI_H */
+
+/******************* (C) COPYRIGHT 2005 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_can.h
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_can.h (rev 0)
+++ trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_can.h 2008-02-17 21:26:25 UTC (rev 854)
@@ -0,0 +1,166 @@
+/******************** (C) COPYRIGHT 2005 STMicroelectronics ********************
+* File Name : 73x_can.h
+* Author : MCD Application Team
+* Date First Issued : 09/27/2005 : V1.0
+* Description : This file contains all the functions prototypes for the
+* CAN bus software library.
+**********************************************************************************
+* History:
+* 09/27/2005 : V1.0
+**********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+* CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*********************************************************************************/
+
+/* Define to prevent recursive inclusion ---------------------------------------*/
+
+#ifndef __73x_CAN_H
+#define __73x_CAN_H
+
+/* Includes --------------------------------------------------------------------*/
+#include "73x_map.h"
+
+/* Exported types --------------------------------------------------------------*/
+
+/* CAN Init structure define */
+typedef struct
+{
+ u8 CAN_Mask;
+ u32 CAN_Bitrate;
+}CAN_InitTypeDef;
+
+/* Exported constants ----------------------------------------------------------*/
+/* Standard bitrates available*/
+enum
+{
+ CAN_BITRATE_100K,
+ CAN_BITRATE_125K,
+ CAN_BITRATE_250K,
+ CAN_BITRATE_500K,
+ CAN_BITRATE_1M
+};
+
+/* Control register*/
+#define CAN_CR_TEST 0x0080
+#define CAN_CR_CCE 0x0040
+#define CAN_CR_DAR 0x0020
+#define CAN_CR_EIE 0x0008
+#define CAN_CR_SIE 0x0004
+#define CAN_CR_IE 0x0002
+#define CAN_CR_INIT 0x0001
+
+/* Status register */
+#define CAN_SR_BOFF 0x0080
+#define CAN_SR_EWARN 0x0040
+#define CAN_SR_EPASS 0x0020
+#define CAN_SR_RXOK 0x0010
+#define CAN_SR_TXOK 0x0008
+#define CAN_SR_LEC 0x0007
+
+/* Test register*/
+#define CAN_TESTR_RX 0x0080
+#define CAN_TESTR_TX1 0x0040
+#define CAN_TESTR_TX0 0x0020
+#define CAN_TESTR_LBACK 0x0010
+#define CAN_TESTR_SILENT 0x0008
+#define CAN_TESTR_BASIC 0x0004
+
+/* IFn / Command Request register*/
+#define CAN_CRR_BUSY 0x8000
+
+/* IFn / Command Mask register*/
+#define CAN_CMR_WRRD 0x0080
+#define CAN_CMR_MASK 0x0040
+#define CAN_CMR_ARB 0x0020
+#define CAN_CMR_CONTROL 0x0010
+#define CAN_CMR_CLRINTPND 0x0008
+#define CAN_CMR_TXRQSTNEWDAT 0x0004
+#define CAN_CMR_DATAA 0x0002
+#define CAN_CMR_DATAB 0x0001
+
+/* IFn / Mask 2 register*/
+#define CAN_M2R_MXTD 0x8000
+#define CAN_M2R_MDIR 0x4000
+
+/* IFn / Arbitration 2 register*/
+#define CAN_A2R_MSGVAL 0x8000
+#define CAN_A2R_XTD 0x4000
+#define CAN_A2R_DIR 0x2000
+
+/* IFn / Message Control register*/
+#define CAN_MCR_NEWDAT 0x8000
+#define CAN_MCR_MSGLST 0x4000
+#define CAN_MCR_INTPND 0x2000
+#define CAN_MCR_UMASK 0x1000
+#define CAN_MCR_TXIE 0x0800
+#define CAN_MCR_RXIE 0x0400
+#define CAN_MCR_RMTEN 0x0200
+#define CAN_MCR_TXRQST 0x0100
+#define CAN_MCR_EOB 0x0080
+
+
+/* Wake-up modes*/
+enum
+{
+ CAN_WAKEUP_ON_EXT,
+ CAN_WAKEUP_ON_CAN
+};
+
+
+/* CAN message structure*/
+typedef struct
+{
+ u32 IdType;
+ u32 Id;
+ u8 Dlc;
+ u8 Data[8];
+} canmsg;
+
+/* Message ID types*/
+enum
+{
+ CAN_STD_ID,
+ CAN_EXT_ID
+};
+
+/* Message ID limits*/
+
+#define CAN_LAST_STD_ID ((1<<11) - 1)
+#define CAN_LAST_EXT_ID ((1L<<29) - 1)
+
+/* Exported functions ------------------------------------------------------- */
+
+void CAN_Init (CAN_TypeDef *CANx, CAN_InitTypeDef *CAN_InitStruct);
+void CAN_DeInit (CAN_TypeDef *CANx);
+void CAN_StructInit(CAN_InitTypeDef *CAN_InitStruct);
+void CAN_SetBitrate(CAN_TypeDef *CANx, u32 bitrate);
+void CAN_SetTiming(CAN_TypeDef *CANx, u32 tseg1, u32 tseg2, u32 sjw, u32 brp);
+void CAN_SetUnusedMsgObj(CAN_TypeDef *CANx, u32 msgobj);
+void CAN_SetTxMsgObj(CAN_TypeDef *CANx, u32 msgobj, u32 idType);
+void CAN_SetRxMsgObj(CAN_TypeDef *CANx, u32 msgobj, u32 idType, u32 idLow, u32 idHigh, bool singleOrFifoLast);
+void CAN_InvalidateAllMsgObj(CAN_TypeDef *CANx);
+void CAN_ReleaseMessage(CAN_TypeDef *CANx, u32 msgobj);
+u32 CAN_SendMessage(CAN_TypeDef *CANx, u32 msgobj, canmsg* pCanMsg);
+u32 CAN_ReceiveMessage(CAN_TypeDef *CANx, u32 msgobj, bool release, canmsg* pCanMsg);
+void CAN_WaitEndOfTx(CAN_TypeDef *CANx);
+u32 CAN_BasicSendMessage(CAN_TypeDef *CANx, canmsg* pCanMsg);
+u32 CAN_BasicReceiveMessage(CAN_TypeDef *CANx, canmsg* pCanMsg);
+void CAN_EnterTestMode(CAN_TypeDef *CANx, u8 mask);
+void CAN_EnterInitMode(CAN_TypeDef *CANx, u8 mask);
+void CAN_LeaveInitMode(CAN_TypeDef *CANx);
+void CAN_LeaveTestMode(CAN_TypeDef *CANx);
+void CAN_ReleaseTxMessage(CAN_TypeDef *CANx, u32 msgobj);
+void CAN_ReleaseRxMessage(CAN_TypeDef *CANx, u32 msgobj);
+u32 CAN_IsMessageWaiting(CAN_TypeDef *CANx, u32 msgobj);
+u32 CAN_IsTransmitRequested(CAN_TypeDef *CANx, u32 msgobj);
+u32 CAN_IsInterruptPending(CAN_TypeDef *CANx, u32 msgobj);
+u32 CAN_IsObjectValid(CAN_TypeDef *CANx, u32 msgobj);
+
+
+#endif /* __73x_CAN_H */
+
+/******************* (C) COPYRIGHT 2005 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_cfg.h
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_cfg.h (rev 0)
+++ trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_cfg.h 2008-02-17 21:26:25 UTC (rev 854)
@@ -0,0 +1,109 @@
+/******************** (C) COPYRIGHT 2005 STMicroelectronics ********************
+* File Name : 73x_cfg.h
+* Author : MCD Application Team
+* Date First Issued : 09/27/2005 : V1.0
+* Description : This file contains all the functions prototypes for the
+* CFG software library.
+**********************************************************************************
+* History:
+* 09/27/2005 : V1.0
+**********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+* CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*********************************************************************************/
+
+/* Define to prevent recursive inclusion ------------------------------------ */
+#ifndef __73x_CFG_H
+#define __73x_CFG_H
+
+/* Includes ------------------------------------------------------------------*/
+#include "73x_map.h"
+
+/* Exported types ------------------------------------------------------------*/
+/* The memory to be remapped */
+typedef enum
+{
+ CFG_MEM_RAM = 0x01,
+ CFG_MEM_FLASH
+} CFG_MEM_TypeDef;
+
+/* Exported constants --------------------------------------------------------*/
+#define CFG_CLK_RAM 0
+#define CFG_CLK_I2C0 1
+#define CFG_CLK_WIU 2
+#define CFG_CLK_UART0 4
+#define CFG_CLK_UART1 5
+#define CFG_CLK_TIM0 6
+#define CFG_CLK_TIM1 7
+#define CFG_CLK_TB0 8
+#define CFG_CLK_CAN0 10
+#define CFG_CLK_CAN1 11
+#define CFG_CLK_PWM0 12
+#define CFG_CLK_PWM1 13
+#define CFG_CLK_PWM2 14
+#define CFG_CLK_PWM3 15
+#define CFG_CLK_PWM4 16
+#define CFG_CLK_PWM5 17
+#define CFG_CLK_GPIO0 18
+#define CFG_CLK_GPIO1 19
+#define CFG_CLK_GPIO2 20
+#define CFG_CLK_GPIO3 21
+#define CFG_CLK_GPIO4 22
+#define CFG_CLK_GPIO5 23
+#define CFG_CLK_GPIO6 24
+#define CFG_CLK_BSPI0 25
+#define CFG_CLK_BSPI1 26
+#define CFG_CLK_BSPI2 27
+#define CFG_CLK_ADC 28
+#define CFG_CLK_EIC 29
+#define CFG_CLK_WUT 30
+#define CFG_CLK_I2C1 32
+#define CFG_CLK_TIM5 35
+#define CFG_CLK_TIM6 36
+#define CFG_CLK_TIM7 37
+#define CFG_CLK_TIM8 38
+#define CFG_CLK_TIM9 39
+#define CFG_CLK_UART2 40
+#define CFG_CLK_UART3 41
+#define CFG_CLK_TB1 45
+#define CFG_CLK_TB2 46
+#define CFG_CLK_CAN2 47
+#define CFG_CLK_TIM2 48
+#define CFG_CLK_TIM3 49
+#define CFG_CLK_TIM4 50
+#define CFG_CLK_RTC 51
+#define CFG_CLK_DMA0 52
+#define CFG_CLK_DMA1 53
+#define CFG_CLK_DMA2 54
+#define CFG_CLK_DMA3 55
+#define CFG_CLK_ARB 61
+#define CFG_CLK_AHB 62
+
+/* CFG flags */
+#define CFG_FLAG_SYS 0x800
+#define CFG_FLAG_BOOT 0x400
+#define CFG_FLAG_USER1 0x200
+#define CFG_FLAG_USER2 0x100
+#define CFG_FLAG_JTBT 0x80
+
+/* Module private variables --------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Private functions ---------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+
+void CFG_RemapConfig(CFG_MEM_TypeDef CFG_Mem );
+void CFG_PeripheralClockConfig(u8 CFG_CLK_Periph, FunctionalState NewStatus);
+void CFG_EmulationPeripheralClockConfig(u8 CFG_CLK_Periph, FunctionalState NewStatus);
+void CFG_PeripheralClockStop(u8 CFG_CLK_Periph);
+void CFG_PeripheralClockStart(u8 CFG_CLK_Periph);
+u32 CFG_DeviceID(void);
+void CFG_FlashPowerOnDelay(u8 Delay);
+FlagStatus CFG_FlagStatus(u16 CFG_Flag);
+
+#endif /* __73x_CFG_H */
+
+/******************* (C) COPYRIGHT 2005 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_cmu.h
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_cmu.h (rev 0)
+++ trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_cmu.h 2008-02-17 21:26:25 UTC (rev 854)
@@ -0,0 +1,119 @@
+/******************** (C) COPYRIGHT 2005 STMicroelectronics ********************
+* File Name : 73x_cmu.h
+* Author : MCD Application Team
+* Date First Issued : 09/27/2005 : V1.0
+* Description : This file contains all the functions prototypes for the
+* CMU software library.
+**********************************************************************************
+* History:
+* 09/27/2005 : V1.0
+**********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+* CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*********************************************************************************/
+
+/* Define to prevent recursive inclusion ------------------------------------ */
+#ifndef __73x_CMU_H
+#define __73x_CMU_H
+
+/* Includes ------------------------------------------------------------------*/
+#include "73x_map.h"
+
+/* Exported types ------------------------------------------------------------*/
+typedef struct{
+ u8 CMU_RCOscControl; /*Adjusts the frequency of Rc oscillator */
+ u8 CMU_EndCountValue; /*End of count value */
+ u16 CMU_FreqRef_High; /*Frequency reference high bits */
+ u16 CMU_FreqRef_Low; /*Frequency reference low bits */
+ u16 CMU_CKSEL0; /*RC-Oscillator selector bit */
+ u16 CMU_CKSEL1; /*Oscillator-PLL selector bit */
+ u16 CMU_CKSEL2; /*CK selector bit */
+}CMU_InitTypeDef;
+
+/* Exported constants --------------------------------------------------------*/
+/*CMU CKOUT = CKRC or CKOSC*/
+#define CMU_CKSEL0_CKOSC 0x0001
+#define CMU_CKSEL0_CKRC 0x0000
+
+/*CMU Frequency Meter clock = CKPLL or CKOSC*/
+#define CMU_CKSEL1_CKPLL 0x0002
+#define CMU_CKSEL1_CKOSC 0x0000
+
+/*CMU Digital logic clock = CKRC or CKOSC*/
+#define CMU_CKSEL2_CKOSC 0x0004
+#define CMU_CKSEL2_CKRC 0x0000
+
+/*CMU Reset Enable/Disable*/
+#define CMU_Reset_Enable 0x0008
+#define CMU_Reset_Disable 0xFFF7
+
+/*CMU Start Frequency Measure*/
+#define CMU_StartFreqMeas 0x0010
+
+/* ReadyFrequencybit*/
+#define CMU_SFMbit 0x0010
+
+/*Select CMU_Mode*/
+#define CMU_Stop_High 0xFF7F
+#define CMU_Stop_Low 0x0080
+#define CMU_Run_Low 0x0100
+#define CMU_Run_High 0xFEFF
+
+/*Select CMU_IT */
+#define CMU_IT_OSCLessRC 0x01
+#define CMU_IT_EndCounter 0x02
+#define CMU_IT_FreqLessLowRef 0x04
+#define CMU_IT_Reset 0x08
+
+/*Select Stop oscillator*/
+#define CMU_RCoscSoftStop 0x0020
+#define CMU_RCoscHardStop 0x0040
+#define CMU_MainoscStop 0x0400
+
+/*Flag Status*/
+#define CMU_FLAG_CKON0bit 0x01
+#define CMU_FLAG_CKON1bit 0x02
+#define CMU_FLAG_CKON2bit 0x04
+#define CMU_FLAG_RONbit 0x08
+#define CMU_FLAG_CRFbit 0x10
+
+
+/*CMU Clear Flag Reset */
+#define CMU_ClearCRFbit 0x0200
+
+/*Sequence*/
+#define CMU_KeyValue1 0x50FA
+#define CMU_KeyValue2 0xAF05
+
+/*Initialize register*/
+#define CMU_RCCTL_MASK 0x0008
+#define CMU_FDISP_MASK 0x0000
+#define CMU_FRH_MASK 0x0FFF
+#define CMU_FRL_MASK 0x0000
+#define CMU_CTRL_MASK 0xFFF8
+
+/* Module private variables --------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Private functions ---------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void CMU_DeInit(void);
+void CMU_StructInit(CMU_InitTypeDef *CMU_InitStruct);
+void CMU_Init(CMU_InitTypeDef *Init_Structure);
+void CMU_ITConfig(u8 CMU_IT, FunctionalState NewState);
+void CMU_StopOscConfig(u16 CMU_StopOsc);
+void CMU_ResetConfig(FunctionalState NewState);
+u16 CMU_GetOSCFrequency(void);
+void CMU_Lock(FunctionalState NewState);
+void CMU_ModeOscConfig(u16 CMU_OSCMode);
+void CMU_ITClear(u16 CMU_ITClear);
+void CMU_FlagClear(void);
+FlagStatus CMU_FlagStatus (u8 CMU_Flag);
+
+#endif /* __73x_CMU_H */
+
+/******************* (C) COPYRIGHT 2005 STMicroelectronics *****END OF FILE****/
+
Added: trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_dma.h
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_dma.h (rev 0)
+++ trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_dma.h 2008-02-17 21:26:25 UTC (rev 854)
@@ -0,0 +1,168 @@
+/******************** (C) COPYRIGHT 2005 STMicroelectronics ********************
+* File Name : 73x_dma.h
+* Author : MCD Application Team
+* Date First Issued : 09/27/2005 : V1.0
+* Description : This file contains all the functions prototypes for the
+* DMA software library.
+**********************************************************************************
+* History:
+* 09/27/2005 : V1.0
+**********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+* CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*********************************************************************************/
+
+/* Define to prevent recursive inclusion ------------------------------------ */
+#ifndef __73x_DMA_H
+#define __73x_DMA_H
+
+/* Includes ------------------------------------------------------------------*/
+#include "73x_map.h"
+
+/* Exported types ------------------------------------------------------------*/
+/* DMA Init structure define */
+typedef struct
+{
+ u8 DMA_Stream;
+ u16 DMA_BufferSize;
+ u16 DMA_SRC;
+ u16 DMA_DST;
+ u16 DMA_SRCSize;
+ u16 DMA_SRCBurst;
+ u16 DMA_DSTSize;
+ u16 DMA_Mode;
+ u16 DMA_M2M;
+ u16 DMA_Dir;
+ u32 DMA_SRCBaseAddr;
+ u32 DMA_DSTBaseAddr;
+ u32 DMA_TriggeringSource;
+}DMA_InitTypeDef;
+
+/* Exported constants --------------------------------------------------------*/
+/* DMAx data stream */
+#define DMA_Stream0 0x00
+#define DMA_Stream1 0x40
+#define DMA_Stream2 0x80
+#define DMA_Stream3 0xC0
+
+/* DMA enable */
+#define DMA_Enable 0x0001
+#define DMA_Disable 0xFFFE
+
+/* DMAx interrupt Mask */
+#define DMA_IT_SI0 0x01
+#define DMA_IT_SI1 0x02
+#define DMA_IT_SI2 0x04
+#define DMA_IT_SI3 0x08
+#define DMA_IT_SE0 0x10
+#define DMA_IT_SE1 0x20
+#define DMA_IT_SE2 0x40
+#define DMA_IT_SE3 0x80
+#define DMA_IT_ALL 0xFF
+
+/* DMAx Flags */
+#define DMA_FLAG_INT0 0x0001
+#define DMA_FLAG_INT1 0x0002
+#define DMA_FLAG_INT2 0x0004
+#define DMA_FLAG_INT3 0x0008
+#define DMA_FLAG_ERR0 0x0010
+#define DMA_FLAG_ERR1 0x0020
+#define DMA_FLAG_ERR2 0x0040
+#define DMA_FLAG_ERR3 0x0080
+#define DMA_FLAG_ACT0 0x0100
+#define DMA_FLAG_ACT1 0x0200
+#define DMA_FLAG_ACT2 0x0400
+#define DMA_FLAG_ACT3 0x0800
+
+/* DMAx Increment Current Source Register */
+#define DMA_SRC_INCR 0x0002
+#define DMA_SRC_NOT_INCR 0x0000
+
+/* DMAx Increment Current Destination Register */
+#define DMA_DST_INCR 0x0004
+#define DMA_DST_NOT_INCR 0x0000
+
+/* Source to DMA data width */
+#define DMA_SRCSize_Byte 0x0000
+#define DMA_SRCSize_HalfWord 0x0008
+#define DMA_SRCSize_Word 0x0010
+
+/* DMA peripheral burst size */
+#define DMA_SRCBurst_1Word 0x0000
+#define DMA_SRCBurst_4Word 0x0020
+#define DMA_SRCBurst_8Word 0x0040
+#define DMA_SRCBurst_16Word 0x0060
+
+/* DMA to Destination data width */
+#define DMA_DSTSize_Byte 0x0000
+#define DMA_DSTSize_HalfWord 0x0080
+#define DMA_DSTSize_Word 0x0100
+
+/* DMA mode */
+#define DMA_Mode_Circular 0x0200
+#define DMA_Mode_Normal 0x0000
+
+/* Memory to Memory Transfer */
+#define DMA_M2M_Enable 0x0800
+#define DMA_M2M_Disable 0x0000
+
+/* Direction Transfer */
+#define DMA_Dir_PeriphDST 0x2000
+#define DMA_Dir_PeriphSRC 0x0000
+
+/* Selection of the triggering source for DMA0 Stream2, DMA0 Stream3,
+ DMA2 Stream3 and DMA3 Stream2 */
+#define DMA_TriggeringSource_BSPI0 0x00000010
+#define DMA_TriggeringSource_BSPI1 0x00000020
+#define DMA_TriggeringSource_TIM8_TIM9 0xFFFFFFDF
+
+/* DMA Priority (defined in Native Arbiter PRIOR register) */
+#define DMA_Priority_High 0x03
+#define DMA_Priority_Low 0x00
+
+/* Module private variables --------------------------------------------------*/
+/* DMA streamx Registers */
+#define DMA_SOURCEL 0x00 /* DMA source base address low register */
+#define DMA_SourceH 0x04 /* DMA source base address high register */
+#define DMA_DESTL 0x08 /* DMA destination base address low register */
+#define DMA_DESTH 0x0C /* DMA destination base address high register */
+#define DMA_MAX 0x10 /* DMA Maximum count register */
+#define DMA_CTRL 0x14 /* DMA Control register */
+#define DMA_SOCURRH 0x18 /* DMA Current Source address high register */
+#define DMA_SOCURRL 0x1C /* DMA Current Source address low register */
+#define DMA_DECURRH 0x20 /* DMA Current Destination address high register */
+#define DMA_DECURRL 0x24 /* DMA Current Destination address low register */
+#define DMA_TCNT 0x28 /* DMA Terminal Counter Register */
+#define DMA_LUBUFF 0x2C /* DMA Last Used Buffer location */
+
+/* DMA Last Buffer Sweep */
+#define DMA_LAST0 0x01
+#define DMA_LAST1 0x02
+#define DMA_LAST2 0x04
+#define DMA_LAST3 0x08
+
+/* Exported macro ------------------------------------------------------------*/
+/* Private functions ---------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void DMA_DeInit(DMA_TypeDef* DMAx, u8 DMA_Stream);
+void DMA_Init(DMA_TypeDef* DMAx, DMA_InitTypeDef* DMA_InitStruct);
+void DMA_StructInit(DMA_InitTypeDef* DMA_InitStruct);
+void DMA_AHBArbitrationConfig(u8 DMA_Priority);
+void DMA_Cmd(DMA_TypeDef* DMAx, u8 DMA_Stream, FunctionalState NewState);
+void DMA_ITConfig(DMA_TypeDef* DMAx, u16 DMA_IT, FunctionalState NewState);
+u32 DMA_GetCurrDSTAddr(DMA_TypeDef* DMAx, u8 DMA_Stream);
+u32 DMA_GetCurrSRCAddr(DMA_TypeDef* DMAx, u8 DMA_Stream);
+u16 DMA_GetTerminalCounter(DMA_TypeDef* DMAx, u8 DMA_Stream);
+void DMA_LastBufferSweepConfig(DMA_TypeDef* DMAx, u8 DMA_Stream);
+void DMA_LastBufferAddrConfig(DMA_TypeDef* DMAx, u8 DMA_Stream, u16 DMA_LastBufferAddr);
+void DMA_TimeOutConfig(u16 TimeOut_Value);
+FlagStatus DMA_FlagStatus(DMA_TypeDef* DMAx, u16 DMA_Flag);
+void DMA_FlagClear(DMA_TypeDef* DMAx, u16 DMA_Flag);
+
+#endif /* __73x_DMA_H */
+
+/******************* (C) COPYRIGHT 2005 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_eic.h
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_eic.h (rev 0)
+++ trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_eic.h 2008-02-17 21:26:25 UTC (rev 854)
@@ -0,0 +1,165 @@
+/******************** (C) COPYRIGHT 2005 STMicroelectronics **********************
+* File Name : 73x_eic.h
+* Author : MCD Application Team
+* Date First Issued : 09/27/2005 : V1.0
+* Description : This file contains all the functions prototypes for the
+* EIC software library.
+**********************************************************************************
+* History:
+* 09/27/2005 : V1.0
+**********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+* CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*********************************************************************************/
+
+
+/* Define to prevent recursive inclusion ------------------------------------ */
+#ifndef __73x_EIC_H
+#define __73x_EIC_H
+
+/* Includes ------------------------------------------------------------------*/
+#include "73x_map.h"
+
+/* Exported types ------------------------------------------------------------*/
+/* EIC Init structure define */
+typedef struct
+{
+ u8 EIC_IRQChannel; /* IRQ Interrupt Vector */
+ u8 EIC_FIQChannel; /* FIQ Interrupt Vector */
+ FunctionalState EIC_IRQCmd; /* ENABLE or DISABLE the selected IRQ Channels */
+ FunctionalState EIC_FIQCmd; /* ENABLE or DISABLE the selected FIQ Channels */
+ u8 EIC_IRQChannelPriority; /* EIC_IRQChannel priority */
+}EIC_InitTypeDef;
+
+/* External interrupt triggering edge/level */
+typedef enum
+{
+ EXTIT_TRIGGER_Rising_Falling,
+ EXTIT_TRIGGER_Rising,
+ EXTIT_TRIGGER_Falling,
+ EXTIT_TRIGGER_HIGH_Level,
+ EXTIT_TRIGGER_LOW_Level
+} EXTIT_TRIGGER_TypeDef;
+
+/* Exported constants --------------------------------------------------------*/
+/* IRQ channels defines*/
+#define PRCCUCMU_IRQChannel 0
+#define EXTIT01_IRQChannel 1
+#define EXTIT02_IRQChannel 2
+#define EXTIT03_IRQChannel 3
+#define EXTIT04_IRQChannel 4
+#define EXTIT05_IRQChannel 5
+#define EXTIT06_IRQChannel 6
+#define EXTIT07_IRQChannel 7
+#define EXTIT08_IRQChannel 8
+#define EXTIT09_IRQChannel 9
+#define EXTIT10_IRQChannel 10
+#define EXTIT11_IRQChannel 11
+#define EXTIT12_IRQChannel 12
+#define EXTIT13_IRQChannel 13
+#define EXTIT14_IRQChannel 14
+#define EXTIT15_IRQChannel 15
+#define DMATRERR_IRQChannel 16
+#define TIM1_IRQChannel 17
+#define TIM2_IRQChannel 18
+#define TIM3_IRQChannel 19
+#define TIM4_IRQChannel 20
+#define TB0_IRQChannel 21
+#define TB1_IRQChannel 22
+#define TB2_IRQChannel 23
+#define TIM5_IRQChannel 24
+#define TIM6_IRQChannel 25
+#define TIM7_IRQChannel 26
+#define TIM8_IRQChannel 27
+#define TIM9_IRQChannel 28
+#define UART2_IRQChannel 31
+#define UART3_IRQChannel 32
+#define FLASHEOP_IRQChannel 33
+#define PWM0_IRQChannel 34
+#define PWM1_IRQChannel 35
+#define PWM2_IRQChannel 36
+#define PWM3_IRQChannel 37
+#define PWM4_IRQChannel 38
+#define PWM5_IRQChannel 39
+#define WIU_IRQChannel 40
+#define WDGWUT_IRQChannel 41
+#define BSPI0_IRQChannel 42
+#define BSPI1_IRQChannel 43
+#define BSPI2_IRQChannel 44
+#define UART0_IRQChannel 45
+#define UART1_IRQChannel 46
+#define I2C0ITERR_IRQChannel 47
+#define I2C1ITERR_IRQChannel 48
+#define I2C0ITDDC_IRQChannel 51
+#define I2C1ITDDC_IRQChannel 52
+#define CAN0_IRQChannel 55
+#define CAN1_IRQChannel 56
+#define CAN2_IRQChannel 57
+#define DMA0_IRQChannel 58
+#define DMA1_IRQChannel 59
+#define DMA2_IRQChannel 60
+#define DMA3_IRQChannel 61
+#define ADC_IRQChannel 62
+#define RTC_IRQChannel 63
+
+/* External Interrupts requests */
+
+#define EXTERNAL_IT0 0x0001
+#define EXTERNAL_IT1 0x0002
+#define EXTERNAL_IT2 0x0004
+#define EXTERNAL_IT3 0x0008
+#define EXTERNAL_IT4 0x0010
+#define EXTERNAL_IT5 0x0020
+#define EXTERNAL_IT6 0x0040
+#define EXTERNAL_IT7 0x0080
+#define EXTERNAL_IT8 0x0100
+#define EXTERNAL_IT9 0x0200
+#define EXTERNAL_IT10 0x0400
+#define EXTERNAL_IT11 0x0800
+#define EXTERNAL_IT12 0x1000
+#define EXTERNAL_IT13 0x2000
+#define EXTERNAL_IT14 0x4000
+#define EXTERNAL_IT15 0x8000
+
+
+/* FIQ channels defines */
+#define EXTIT01_FIQChannel 1
+#define TIM0_FIQChannel 2
+
+#define EIC_IRQEnable_Mask 0x01
+#define EIC_IRQDisable_Mask 0xFFFE
+
+#define EIC_FIQEnable_Mask 0x02
+#define EIC_FIQDisable_Mask 0xFFFD
+
+#define EIC_EXTIT_FILTER_Mask 0x04
+
+/* Module private variables --------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Private functions ---------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void EIC_DeInit(void);
+void EIC_StructInit(EIC_InitTypeDef* EIC_InitStruct);
+void EIC_Init( EIC_InitTypeDef* EIC_InitStruct);
+void EIC_CurrentPriorityLevelConfig(u8 NewPriorityLevel);
+void EIC_IRQChannelPriorityConfig(u8 IRQChannel, u8 Priority);
+void EIC_IRQChannelConfig(u8 IRQChannel, FunctionalState NewStatus);
+void EIC_FIQChannelConfig(u8 FIQChannel,FunctionalState NewStatus);
+void EIC_IRQCmd(FunctionalState NewState);
+void EIC_FIQCmd(FunctionalState NewState);
+u8 EIC_CurrentPriorityLevelValue(void);
+u8 EIC_CurrentIRQChannelValue(void);
+u8 EIC_CurrentFIQChannelValue(void);
+void EIC_FIQPendingBitClear(u8 FIQChannel);
+void EIC_ExternalITFilterConfig(FunctionalState NewStatus);
+void EIC_ExternalITTriggerConfig(u16 EXTERNAL_IT, EXTIT_TRIGGER_TypeDef EXTIT_Trigger);
+
+
+#endif /* __73x_EIC_H */
+
+/******************* (C) COPYRIGHT 2005 STMicroelectronics *****END OF FILE****/
+
Added: trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_flash.h
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_flash.h (rev 0)
+++ trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_flash.h 2008-02-17 21:26:25 UTC (rev 854)
@@ -0,0 +1,93 @@
+/******************** (C) COPYRIGHT 2005 STMicroelectronics ********************
+* File Name : 73x_flash.h
+* Author : MCD Application Team
+* Date First Issued : 09/27/2005 : V1.0
+* Description : This file contains all the functions prototypes for the
+* Flash software library.
+**********************************************************************************
+* History:
+* 09/27/2005 : V1.0
+**********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+* CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*********************************************************************************/
+
+/* Define to prevent recursive inclusion ------------------------------------ */
+#ifndef __73x_FLASH_H
+#define __73x_FLASH_H
+
+/* Includes ------------------------------------------------------------------*/
+#include "73x_map.h"
+
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Bank0 Flash sectors */
+#define FLASH_Sector0 0x00000001
+#define FLASH_Sector1 0x00000002
+#define FLASH_Sector2 0x00000004
+#define FLASH_Sector3 0x00000008
+#define FLASH_Sector4 0x00000010
+#define FLASH_Sector5 0x00000020
+#define FLASH_Sector6 0x00000040
+#define FLASH_Sector7 0x00000080
+#define FLASH_Module 0x000000FF
+
+/* Flash operation enable bit definition */
+#define FLASH_PWD 0x00008000
+#define FLASH_SPR 0x01000000
+#define FLASH_SER 0x08000000
+#define FLASH_DWPG 0x10000000
+#define FLASH_WPG 0x20000000
+#define FLASH_SUSP 0x40000000
+#define FLASH_WMS 0x80000000
+
+/* Flash Interrupt */
+#define FLASH_IT_INTM 0x00200000
+
+/* Flash Flags */
+#define FLASH_FLAG_BSY0 0x21
+#define FLASH_FLAG_LOCK 0x24
+#define FLASH_FLAG_JBL 0x33
+#define FLASH_FLAG_INTP 0x34
+#define FLASH_FLAG_BSM 0x36
+#define FLASH_FLAG_ERR 0x40
+#define FLASH_FLAG_ERER 0x41
+#define FLASH_FLAG_PGER 0x42
+#define FLASH_FLAG_10ER 0x43
+#define FLASH_FLAG_SEQER 0x46
+#define FLASH_FLAG_RESER 0x47
+#define FLASH_FLAG_WPF 0x48
+
+#define FLASH_FLAG_LOCKBSY0 0x00000012
+
+/* Flash base address */
+#define FLASH_Base 0x80000000
+
+#define FLASH_Flag_Mask 0x1F
+
+/* Module private variables --------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Private functions ---------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void FLASH_DeInit(void);
+void FLASH_ITConfig (FunctionalState NewState);
+void FLASH_WordWrite(u32 DestAddr, u32 Data);
+void FLASH_DWordWrite(u32 DestAddr, u32 Data0, u32 Data1);
+void FLASH_BlockWrite(u32 SourceAddr, u32 DestAddr, u32 NbrWordToWrite);
+u32 FLASH_WordRead(u32 SourceAddr);
+void FLASH_BlockRead(u32 SourceAddr, u32 DestAddr, u32 NbrWordToRead);
+void FLASH_SectorErase(u8 FLASH_Sector);
+void FLASH_PowerDownConfig(FunctionalState NewState);
+void FLASH_Suspend(void);
+void FLASH_Resume(u32 OperToResume);
+FlagStatus FLASH_FlagStatus (u8 FLASH_Flag);
+void FLASH_FlagClear(u8 FLASH_Flag);
+
+
+#endif /* __73x_FLASH_H */
+
+/******************* (C) COPYRIGHT 2005 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_gpio.h
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_gpio.h (rev 0)
+++ trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_gpio.h 2008-02-17 21:26:25 UTC (rev 854)
@@ -0,0 +1,87 @@
+/******************** (C) COPYRIGHT 2005 STMicroelectronics ********************
+* File Name : 73x_gpio.h
+* Author : MCD Application Team
+* Date First Issued : 09/27/2005 : V1.0
+* Description : This file contains all the functions prototypes for the
+* GPIO software library.
+**********************************************************************************
+* History:
+* 09/27/2005 : V1.0
+**********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+* CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*********************************************************************************/
+
+/* Define to prevent recursive inclusion ------------------------------------ */
+#ifndef __73x_GPIO_H
+#define __73x_GPIO_H
+
+/* Includes ----------------------------------------------------------------- */
+#include "73x_map.h"
+
+/* Exported types ----------------------------------------------------------- */
+/* GPIO Init structure define */
+typedef struct
+{
+ u16 GPIO_Pins;
+ u16 GPIO_Mode;
+}GPIO_InitTypeDef;
+
+/* Bit_SET and Bit_RESET enumeration */
+typedef enum { Bit_RESET = 0, Bit_SET = !RESET } BitAction;
+
+/* Exported constants --------------------------------------------------------*/
+/* GPIO Pins define */
+#define GPIO_PIN_NONE 0x0000
+#define GPIO_PIN_0 0x0001
+#define GPIO_PIN_1 0x0002
+#define GPIO_PIN_2 0x0004
+#define GPIO_PIN_3 0x0008
+#define GPIO_PIN_4 0x0010
+#define GPIO_PIN_5 0x0020
+#define GPIO_PIN_6 0x0040
+#define GPIO_PIN_7 0x0080
+#define GPIO_PIN_8 0x0100
+#define GPIO_PIN_9 0x0200
+#define GPIO_PIN_10 0x0400
+#define GPIO_PIN_11 0x0800
+#define GPIO_PIN_12 0x1000
+#define GPIO_PIN_13 0x2000
+#define GPIO_PIN_14 0x4000
+#define GPIO_PIN_15 0x8000
+#define GPIO_PIN_ALL 0xFFFF
+
+/* GPIO Modes define */
+#define GPIO_Mode_HI_AIN_TRI 0x0001
+#define GPIO_Mode_IN_TRI_TTL 0x0002
+#define GPIO_Mode_INOUT_WP 0x0003
+#define GPIO_Mode_OUT_OD 0x0004
+#define GPIO_Mode_OUT_PP 0x0005
+#define GPIO_Mode_AF_OD 0x0006
+#define GPIO_Mode_AF_PP 0x0007
+
+/* GPIO MSB and LSB Bytes define */
+#define GPIO_LSB 0x0000
+#define GPIO_MSB 0x0008
+
+/* Module private variables --------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Private functions ---------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void GPIO_DeInit(GPIO_TypeDef* GPIOx);
+void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct);
+void GPIO_StructInit(GPIO_InitTypeDef* GPIO_InitStruct);
+void GPIO_BitWrite(GPIO_TypeDef* GPIOx, u16 GPIO_Pin, BitAction Bit_Val);
+u8 GPIO_BitRead(GPIO_TypeDef* GPIOx, u16 GPIO_Pin);
+void GPIO_ByteWrite(GPIO_TypeDef* GPIOx, u8 GPIO_Byte, u8 Byte_Val);
+u8 GPIO_ByteRead(GPIO_TypeDef* GPIOx, u8 GPIO_Byte);
+void GPIO_WordWrite(GPIO_TypeDef* GPIOx, u16 Port_Val);
+u16 GPIO_WordRead(GPIO_TypeDef* GPIOx);
+
+#endif /* __73x_GPIO_H */
+
+/******************* (C) COPYRIGHT 2005 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_i2c.h
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_i2c.h (rev 0)
+++ trunk/firmware/arm/str/cantest_str73x_iar/str73x_lib/include/73x_i2c.h 2008-02-17 21:26:25 UTC (rev 854)
@@ -0,0 +1,146 @@
+/******************** (C) COPYRIGHT 2005 STMicroelectronics ********************
+* File Name : 73x_i2c.h
+* Author : MCD Application Team
+* Date First Issued : 09/27/2005 : V1.0
+* Description : This file contains all the functions prototypes for the
+* I2C software library.
+**********************************************************************************
+* History:
+* 09/27/2005 : V1.0
+**********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+* CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*********************************************************************************/
+
+/* Define to prevent recursive inclusion ------------------------------------ */
+#ifndef __73x_I2C_H
+#define __73x_I2C_H
+
+/* Includes ----------------------------------------------------------------- */
+#include "73x_map.h"
+#include "73x_prccu.h"
+
+/* Exported types ----------------------------------------------------------- */
+/* I2C Init structure define */
+typedef struct
+{
+ u8 I2C_GeneralCall;
+ u8 I2C_Ack;
+ u16 I2C_OwnAddress;
+ u32 I2C_CLKSpeed;
+}I2C_InitTypeDef;
+
+/* Exported constants --------------------------------------------------------*/
+/* General Call */
+#define I2C_GeneralCallEnable 0x10
+#define I2C_GeneralCallDisable 0x00
+
+/* Acknowledgement */
+#define I2C_AckEnable 0x04
+#define I2C_AckDisable 0x00
+
+/* Fast Standard Mode */
+#define I2C_CLKMode_Fast 0x80
+#define I2C_CLKMode_Standard 0x00
+
+/* I2C IT enable */
+#define I2C_ITEnable 0x01
+#define I2C_ITDisable 0xFE
+
+/* I2C Flags */
+#define I2C_FLAG_SB 0x0001
+#define I2C_FLAG_M_SL 0x0002
+#define I2C_FLAG_ADSL 0x0004
+#define I2C_FLAG_BTF 0x0008
+#define I2C_FLAG_BUSY 0x0010
+#define I2C_FLAG_TRA 0x0020
+#define I2C_FLAG_ADD10 0x0040
+#define I2C_FLAG_EVF 0x0080
+#define I2C_FLAG_GCAL 0x0100
+#define I2C_FLAG_BERR 0x0200
+#define I2C_FLAG_ARLO 0x0400
+#define I2C_FLAG_STOPF 0x0800
+#define I2C_FLAG_AF 0x1000
+#define I2C_FLAG_ENDAD 0x2000
+#define I2C_FLAG_ACK 0x4000
+
+/* I2C Events */
+#define I2C_EVENT_SLAVE_ADDRESS_MATCHED ( I2C_FLAG_EVF | I2C_FLAG_BUSY | I2C_FLAG_ADSL)
+#define I2C_EVENT_SLAVE_BYTE_RECEIVED ( I2C_FLAG_EVF | I2C_FLAG_BUSY | I2C_FLAG_BTF )
+#define I2C_EVENT_SLAVE_BYTE_TRANSMITTED ( I2C_FLAG_EVF | I2C_FLAG_BUSY | I2C_FLAG_BTF | I2C_FLAG_TRA )
+#define I2C_EVENT_MASTER_MODE_SELECT ( I2C_FLAG_EVF | I2C_FLAG_BUSY | I2C_FLAG_M_SL | I2C_FLAG_SB )
+#define I2C_EVENT_MASTER_MODE_SELECTED ( I2C_FLAG_EVF | I2C_FLAG_BUSY | I2C_FLAG_M_SL | I2C_FLAG_ENDAD )
+#define I2C_EVENT_MASTER_BYTE_RECEIVED ( I2C_FLAG_EVF | I2C_FLAG_BUSY | I2C_FLAG_M_SL | I2C_FLAG_BTF )
+#define I2C_EVENT_MASTER_BYTE_TRANSMITTED ( I2C_FLAG_EVF | I2C_FLAG_BUSY | I2C_FLAG_M_SL | I2C_FLAG_BTF | I2C_FLAG_TRA )
+#define I2C_EVENT_MASTER_MODE_ADDRESS10 ( I2C_FLAG_EVF | I2C_FLAG_BUSY | I2C_FLAG_M_SL |I2C_FLAG_ADD10 )
+#define I2C_EVENT_SLAVE_STOP_DETECTED I2C_FLAG_STOPF
+#define I2C_EVENT_SLAVE_ACK_FAILURE ( I2C_FLAG_EVF | I2C_FLAG_BUSY | I2C_FLAG_BTF | I2C_FLAG_TRA | I2C_FLAG_AF)
+
+/* I2C Events */
+#define I2C_BUS_ERROR_DETECTED I2C_FLAG_BERR
+#define I2C_ARBITRATION_LOST I2C_FLAG_ARLO
+#define I2C_SLAVE_GENERAL_CALL (I2C_FLAG_BUSY | I2C_FLAG_GCAL)
+
+/* I2C Addressing Modes */
+#define I2C_MODE_ADDRESS10 0x0
+#define I2C_MODE_ADDRESS7 0x1
+
+/* Master/Receiver Mode */
+#define I2C_MODE_TRANSMITTER 0x00
+#define I2C_MODE_RECEIVER 0x01
+#define I2C_MODE_MASTER_TRANSMITTER 0x02
+#define I2C_MODE_MASTER_RECEIVER 0x03
+#define I2C_MODE_SLAVE_TRANSMITTER 0x04
+#define I2C_MODE_SLAVE_RECEIVER 0x05
+
+/* I2C Enable, Disable, Start, Stop defines */
+#define I2C_PESET_Mask 0x20
+#define I2C_PERESET 0xDF
+#define I2C_START_Mask 0x08
+#define I2C_STOP_Mask 0x02
+#define I2C_ACK_Mask 0x04
+
+/* I2C Registers offset */
+#define I2C_CR 0x00
+#define I2C_SR1 0x04
+#define I2C_SR2 0x08
+#define I2C_CCR 0x0C
+#define I2C_OAR1 0x10
+#define I2C_OAR2 0x14
+#define I2C_DR 0x18
+#define I2C_ECCR 0x1C
+
+/* I2C Init Mask */
+#define I2C_CR_Mask 0x01
+
+/* Module private variables --------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Private functions ---------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void I2C_Init (I2C_TypeDef* I2Cx, I2C_InitTypeDef* I2C_InitStruct);
+void I2C_DeInit (I2C_TypeDef* I2Cx);
+void I2C_StructInit(I2C_InitTypeDef* I2C_InitStruct);
+void I2C_Cmd (I2C_TypeDef* I2Cx, FunctionalState NewState);
+void I2C_STARTGenerate (I2C_TypeDef* I2Cx, FunctionalState NewState);
+void I2C_STOPGenerate (I2C_TypeDef* I2Cx, FunctionalState NewState);
+void I2C_AcknowledgeConfig (I2C_TypeDef* I2Cx, FunctionalState NewState);
+void I2C_ITConfig (I2C_TypeDef* I2Cx, FunctionalState NewState);
+u16 I2C_GetStatus(I2C_TypeDef* I2Cx);
+u16 I2C_GetLastEvent(I2C_TypeDef* I2Cx);
+ErrorStatus I2C_Eve...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-17 21:22:58
|
Revision: 853
http://can.svn.sourceforge.net/can/?rev=853&view=rev
Author: akhe
Date: 2008-02-17 13:22:52 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
Fixed IAR CANTEST sample that compiled with 5.11
Modified Paths:
--------------
trunk/firmware/arm/str/cantest_str73x_gcc/project/Makefile
trunk/firmware/arm/str/cantest_str73x_gcc/project/cantest.pnproj
trunk/firmware/arm/str/cantest_str73x_gcc/project/main.c
trunk/firmware/arm/str/cantest_str73x_iar/73x_conf.h
trunk/firmware/arm/str/cantest_str73x_iar/73x_it.c
trunk/firmware/arm/str/cantest_str73x_iar/Readme.txt
trunk/firmware/arm/str/cantest_str73x_iar/Startup/73x_init.s
trunk/firmware/arm/str/cantest_str73x_iar/Startup/73x_vect.s
trunk/firmware/arm/str/cantest_str73x_iar/cantest.dep
trunk/firmware/arm/str/cantest_str73x_iar/cantest.ewd
trunk/firmware/arm/str/cantest_str73x_iar/cantest.ewp
trunk/firmware/arm/str/cantest_str73x_iar/main.c
trunk/firmware/arm/str/cantest_str75x_gcc/project/main.c
trunk/firmware/arm/str/common/73x_lcd.c
trunk/firmware/arm/str/common/delay.c
trunk/firmware/arm/str/common/delay.h
trunk/firmware/arm/str/common/sysTime73x.c
trunk/firmware/arm/str/vscp_node_str73x_gcc/project/Makefile
trunk/firmware/arm/str/vscp_node_str73x_gcc/project/main.c
trunk/firmware/arm/str/vscp_node_str73x_gcc/project/vscpnode.pnproj
Added Paths:
-----------
trunk/firmware/arm/lpc/Template/
trunk/firmware/arm/lpc/Template/LPC210x.h
trunk/firmware/arm/lpc/Template/Linkerscript
trunk/firmware/arm/lpc/Template/Makefile
trunk/firmware/arm/lpc/Template/Project.ppr
trunk/firmware/arm/lpc/Template/crt0.s
trunk/firmware/arm/lpc/Template/main.cpp
trunk/firmware/arm/lpc/common/
trunk/firmware/arm/lpc/common/include/
trunk/firmware/arm/lpc/common/include/LPC210x.h
trunk/firmware/arm/lpc/common/include/LPC213x.h
trunk/firmware/arm/lpc/common/include/LPC21xx.h
trunk/firmware/arm/lpc/common/include/LPC22xx.h
trunk/firmware/arm/lpc/common/include/armVIC.c
trunk/firmware/arm/lpc/common/include/armVIC.h
trunk/firmware/arm/lpc/common/include/lpcADC.h
trunk/firmware/arm/lpc/common/include/lpcEMC.h
trunk/firmware/arm/lpc/common/include/lpcGPIO.h
trunk/firmware/arm/lpc/common/include/lpcI2C.h
trunk/firmware/arm/lpc/common/include/lpcPIN.h
trunk/firmware/arm/lpc/common/include/lpcRTC.h
trunk/firmware/arm/lpc/common/include/lpcSCB.h
trunk/firmware/arm/lpc/common/include/lpcSPI.h
trunk/firmware/arm/lpc/common/include/lpcTMR.h
trunk/firmware/arm/lpc/common/include/lpcUART.h
trunk/firmware/arm/lpc/common/include/lpcVIC.h
trunk/firmware/arm/lpc/common/include/lpcWD.h
trunk/firmware/arm/str/cantest_str73x_iar/73x_lcd.c
trunk/firmware/arm/str/cantest_str73x_iar/73x_lcd.h
trunk/firmware/arm/str/cantest_str73x_iar/linker/STR73x_FLASH.icf
trunk/firmware/arm/str/cantest_str73x_iar/linker/STR73x_RAM.icf
trunk/firmware/arm/str/common/sysTime.h
Removed Paths:
-------------
trunk/firmware/arm/common/LPC21xx.h
trunk/firmware/arm/common/Template/
trunk/firmware/arm/common/include/philips/
trunk/firmware/arm/str/cantest_str73x_iar/linker/lnkarm_flash.xcl
trunk/firmware/arm/str/cantest_str73x_iar/linker/lnkarm_ram.xcl
trunk/firmware/arm/str/common/sysTime73x.h
trunk/firmware/arm/str/common/sysTime75x.h
Property Changed:
----------------
trunk/firmware/arm/str/cantest_str73x_gcc/project/
trunk/firmware/arm/str/cantest_str75x_gcc/project/
trunk/firmware/arm/str/vscp_node_str73x_gcc/project/
Deleted: trunk/firmware/arm/common/LPC21xx.h
===================================================================
--- trunk/firmware/arm/common/LPC21xx.h 2008-02-17 16:44:13 UTC (rev 852)
+++ trunk/firmware/arm/common/LPC21xx.h 2008-02-17 21:22:52 UTC (rev 853)
@@ -1,244 +0,0 @@
-#ifndef _LPC21XX_H_
-#define _LPC21XX_H_
-
-//-- Flash accelerator
-#define rMAMCR (*(volatile unsigned int *) 0xE01FC000)
-#define rMAMTIM (*(volatile unsigned int *) 0xE01FC004)
-
-
-//-- Watchdog Timer (32 bit data bus)
-#define rWDMOD (*(volatile unsigned int *) 0xE0000000)
-#define rWDTC (*(volatile unsigned int *) 0xE0000004)
-#define rWDFEED (*(volatile unsigned int *) 0xE0000008)
-#define rWDTV (*(volatile unsigned int *) 0xE000000C)
-
-//-- Timer 0 (32 bit data bus)
-#define rTIMER0_IR (*(volatile unsigned int *) 0xE0004000) // intr reg
-#define rTIMER0_TCR (*(volatile unsigned int *) 0xE0004004) // ctrl
-#define rTIMER0_TC (*(volatile unsigned int *) 0xE0004008) // counter
-#define rTIMER0_PR (*(volatile unsigned int *) 0xE000400C) // prescale reg
-#define rTIMER0_PC (*(volatile unsigned int *) 0xE0004010) // prescale cnt
-#define rTIMER0_MCR (*(volatile unsigned int *) 0xE0004014) // match ctrl
-#define rTIMER0_MR0 (*(volatile unsigned int *) 0xE0004018) // match reg0
-#define rTIMER0_MR1 (*(volatile unsigned int *) 0xE000401C) // match reg1
-#define rTIMER0_MR2 (*(volatile unsigned int *) 0xE0004020) // match reg2
-#define rTIMER0_MR3 (*(volatile unsigned int *) 0xE0004024) // match reg3
-#define rTIMER0_CCR (*(volatile unsigned int *) 0xE0004028) // capt ctrl
-#define rTIMER0_CR0 (*(volatile unsigned int *) 0xE000402C) // capt reg0
-#define rTIMER0_CR1 (*(volatile unsigned int *) 0xE0004030) // capt reg1
-#define rTIMER0_CR2 (*(volatile unsigned int *) 0xE0004034) // capt reg2
-#define rTIMER0_CR3 (*(volatile unsigned int *) 0xE0004038) // capt reg3
-#define rTIMER0_EMR (*(volatile unsigned int *) 0xE000403C) // ext match reg
-
-//-- Timer 1 (32 bit data bus)
-#define rTIMER1_IR (*(volatile unsigned int *) 0xE0008000) // Interrupt register
-#define rTIMER1_TCR (*(volatile unsigned int *) 0xE0008004) // Timer Control register
-#define rTIMER1_TC (*(volatile unsigned int *) 0xE0008008) // Timer Counter
-#define rTIMER1_PR (*(volatile unsigned int *) 0xE000800C) // Prescale register
-#define rTIMER1_PC (*(volatile unsigned int *) 0xE0008010) // Prescale Counter
-#define rTIMER1_MCR (*(volatile unsigned int *) 0xE0008014) // Match Control register
-#define rTIMER1_MR0 (*(volatile unsigned int *) 0xE0008018) // Match reg0
-#define rTIMER1_MR1 (*(volatile unsigned int *) 0xE000801C) // Match reg1
-#define rTIMER1_MR2 (*(volatile unsigned int *) 0xE0008020) // Match reg2
-#define rTIMER1_MR3 (*(volatile unsigned int *) 0xE0008024) // Match reg3
-#define rTIMER1_CCR (*(volatile unsigned int *) 0xE0008028) // Capture Control register
-#define rTIMER1_CR0 (*(volatile unsigned int *) 0xE000802C) // Capt reg0
-#define rTIMER1_CR1 (*(volatile unsigned int *) 0xE0008030) // Capt reg1
-#define rTIMER1_CR2 (*(volatile unsigned int *) 0xE0008034) // Capt reg2
-#define rTIMER1_CR3 (*(volatile unsigned int *) 0xE0008038) // Capt reg3
-#define rTIMER1_EMR (*(volatile unsigned int *) 0xE000803C) // External Match register
-
-//-- UART0 (8 bit data bus)
-#define rUART0_RBR (*(volatile unsigned int *) 0xE000C000) // receive buffer-RO
-#define rUART0_THR (*(volatile unsigned int *) 0xE000C000) // transmit hold buffer-WO
-#define rUART0_IER (*(volatile unsigned int *) 0xE000C004) // interrupt enable
-#define rUART0_IIR (*(volatile unsigned int *) 0xE000C008) // interrupt id-RO
-#define rUART0_FCR (*(volatile unsigned int *) 0xE000C008) // fifo control-WO
-#define rUART0_LCR (*(volatile unsigned int *) 0xE000C00C) // line control
-#define rUART0_LSR (*(volatile unsigned int *) 0xE000C014) // line status-RO
-#define rUART0_SCR (*(volatile unsigned int *) 0xE000C01C) // scratchpad
-#define rUART0_DLL (*(volatile unsigned int *) 0xE000C000) // divisor latch LSB
-#define rUART0_DLM (*(volatile unsigned int *) 0xE000C004) // divisor latch MSB
-
-//-- UART1 (8 bit data bus)
-#define rUART1_RBR (*(volatile unsigned int *) 0xE0010000) // receive buffer-RO
-#define rUART1_THR (*(volatile unsigned int *) 0xE0010000) // transmit hold buffer-WO
-#define rUART1_IER (*(volatile unsigned int *) 0xE0010004) // interrupt enable
-#define rUART1_IIR (*(volatile unsigned int *) 0xE0010008) // interrupt id-RO
-#define rUART1_FCR (*(volatile unsigned int *) 0xE0010008) // fifo control-WO
-#define rUART1_LCR (*(volatile unsigned int *) 0xE001000C) // line control
-#define rUART1_MCR (*(volatile unsigned int *) 0xE0010010) // modem control
-#define rUART1_LSR (*(volatile unsigned int *) 0xE0010014) // line status-RO
-#define rUART1_MSR (*(volatile unsigned int *) 0xE0010018) // modem status-RO
-#define rUART1_SCR (*(volatile unsigned int *) 0xE001001C) // scratchpad
-#define rUART1_DLL (*(volatile unsigned int *) 0xE0010000) // divisor latch LSB
-#define rUART1_DLM (*(volatile unsigned int *) 0xE0010004) // divisor latch MSB
-
-//-- PWM0 (32 bit data bus)
-#define rPWM0_IR (*(volatile unsigned int *) 0xE0014000) // intr reg
-#define rPWM0_TCR (*(volatile unsigned int *) 0xE0014004) // timer ctrl
-#define rPWM0_TC (*(volatile unsigned int *) 0xE0014008) // timer counter
-#define rPWM0_PR (*(volatile unsigned int *) 0xE001400C) // prescale reg
-#define rPWM0_PC (*(volatile unsigned int *) 0xE0014010) // prescale count
-#define rPWM0_MCR (*(volatile unsigned int *) 0xE0014014) // match ctrl reg
-#define rPWM0_MR0 (*(volatile unsigned int *) 0xE0014018) // match reg0
-#define rPWM0_MR1 (*(volatile unsigned int *) 0xE001401C) // match reg1
-#define rPWM0_MR2 (*(volatile unsigned int *) 0xE0014020) // match reg2
-#define rPWM0_MR3 (*(volatile unsigned int *) 0xE0014024) // match reg3
-#define rPWM0_CCR (*(volatile unsigned int *) 0xE0014028) // capt ctrl
-#define rPWM0_CR0 (*(volatile unsigned int *) 0xE001402C) // capt reg0
-#define rPWM0_CR1 (*(volatile unsigned int *) 0xE0014030) // capt reg1
-#define rPWM0_CR2 (*(volatile unsigned int *) 0xE0014034) // capt reg2
-#define rPWM0_CR3 (*(volatile unsigned int *) 0xE0014038) // capt reg3
-#define rPWM0_EMR (*(volatile unsigned int *) 0xE001403C) // ext match reg
-#define rPWM0_MR4 (*(volatile unsigned int *) 0xE0014040) // match reg4
-#define rPWM0_MR5 (*(volatile unsigned int *) 0xE0014044) // match reg5
-#define rPWM0_MR6 (*(volatile unsigned int *) 0xE0014048) // match reg6
-#define rPWM0_PCR (*(volatile unsigned int *) 0xE001404C) // pwm ctrl reg
-#define rPWM0_LER (*(volatile unsigned int *) 0xE0014050) // latch enable reg
-
-//-- PWM1 (32 bit data bus) -- addresses reserved
-//-- from base + 0x18000 to 0xE00018050
-//-- I2C (8/16 bit data bus)
-
-#define rI2C_I2CONSET (*(volatile unsigned int *) 0xE001C000) // ctrl set reg
-#define rI2C_I2STAT (*(volatile unsigned int *) 0xE001C004) // status reg-RO
-#define rI2C_I2DAT (*(volatile unsigned int *) 0xE001C008) // data reg
-#define rI2C_I2ADR (*(volatile unsigned int *) 0xE001C00C) // addr reg
-#define rI2C_I2SCLH (*(volatile unsigned int *) 0xE001C010) // scl dutycycle hi
-#define rI2C_I2SCLL (*(volatile unsigned int *) 0xE001C014) // scl dutycycle lo
-#define rI2C_I2CONCLR (*(volatile unsigned int *) 0xE001C018) // ctrl clr reg
-
-//-- SPI (8 bit data bus) (spec shows 0xE0020000 - 0xE0023FFF)
-#define rSPI_SPCR (*(volatile unsigned int *) 0xE0020000) // Control Register
-#define rSPI_SPSR (*(volatile unsigned int *) 0xE0020004) // Status Register
-#define rSPI_SPDR (*(volatile unsigned int *) 0xE0020008) // Data Register
-#define rSPI_SPCCR (*(volatile unsigned int *) 0xE002000C) // Clock Counter Register
-#define rSPI_SPTCR (*(volatile unsigned int *) 0xE0020010) // Test Control Register
-#define rSPI_SPTSR (*(volatile unsigned int *) 0xE0020014) // Test Status Register
-#define rSPI_SPTOR (*(volatile unsigned int *) 0xE0020018) // Test Observe Register
-#define rSPI_SPINT (*(volatile unsigned int *) 0xE002001C) // SPI interrupt flag
-
-//-- RTC (32 bit data bus)
-#define rRTC_ILR (*(volatile unsigned int *) 0xE0024000) // Interrupt Location Register
-#define rRTC_CTC (*(volatile unsigned int *) 0xE0024004) // Clock Tick Counter
-#define rRTC_CCR (*(volatile unsigned int *) 0xE0024008) // Clock Register
-#define rRTC_CIIR (*(volatile unsigned int *) 0xE002400C) // Clock Increment Interrupt Register
-#define rRTC_AMR (*(volatile unsigned int *) 0xE0024010) // Alarm Mask Register
-#define rRTC_CTIME0 (*(volatile unsigned int *) 0xE0024014) // Consolidated Timer Register 0
-#define rRTC_CTIME1 (*(volatile unsigned int *) 0xE0024018) // Consolidated Timer Register 1
-#define rRTC_CTIME2 (*(volatile unsigned int *) 0xE002401C) // Consolidated Timer Register 2
-#define rRTC_SEC (*(volatile unsigned int *) 0xE0024020) // Seconds value
-#define rRTC_MIN (*(volatile unsigned int *) 0xE0024024) // Minutes value
-#define rRTC_HOUR (*(volatile unsigned int *) 0xE0024028) // Hours value
-#define rRTC_DAY_OF_MONTH (*(volatile unsigned int *) 0xE002402C) // Day of month value
-#define rRTC_DAY_OF_WEEK (*(volatile unsigned int *) 0xE0024030) // Day of week value
-#define rRTC_DAY_OF_YEAR (*(volatile unsigned int *) 0xE0024034) // Day of year value
-#define rRTC_MONTH (*(volatile unsigned int *) 0xE0024038) // Month value
-#define rRTC_YEAR (*(volatile unsigned int *) 0xE002403C) // Year value
-#define rRTC_ALSEC (*(volatile unsigned int *) 0xE0024060) // Alarm value for seconds
-#define rRTC_ALMIN (*(volatile unsigned int *) 0xE0024064) // Alarm value for minutes
-#define rRTC_ALHOUR (*(volatile unsigned int *) 0xE0024068) // Alarm value for hours
-#define rRTC_ALDOM (*(volatile unsigned int *) 0xE002406C) // Alarm value for day of month
-#define rRTC_ALDOW (*(volatile unsigned int *) 0xE0024070) // Alarm value for day of week
-#define rRTC_ALDOY (*(volatile unsigned int *) 0xE0024074) // Alarm value for day of year
-#define rRTC_ALMON (*(volatile unsigned int *) 0xE0024078) // Alarm value for months
-#define rRTC_ALYEAR (*(volatile unsigned int *) 0xE002407C) // Alarm value for years
-#define rRTC_PREINT (*(volatile unsigned int *) 0xE0024080) // Prescale value, integer portion
-#define rRTC_PREFRAC (*(volatile unsigned int *) 0xE0024084) // Prescale value, fractional portion
-
-
-//-- General Pupupose IO (GPIO) (32 bit data bus)
-#define rGPIO_IOPIN (*(volatile unsigned int *) 0xE0028000) // GPIO Pin value reg
-#define rGPIO_IOSET (*(volatile unsigned int *) 0xE0028004) // GPIO Output set reg
-#define rGPIO_IODIR (*(volatile unsigned int *) 0xE0028008) // GPIO Direction cntrl reg
-#define rGPIO_IOCLR (*(volatile unsigned int *) 0xE002800C) // GPIO Output clear reg
-
-//-- Pin Connect Block (PCB) (32 bit data bus)
-#define rPCB_PINSEL0 (*(volatile unsigned int *) 0xE002C000) // pin function sel reg 0
-#define rPCB_PINSEL1 (*(volatile unsigned int *) 0xE002C004) // pin function sel reg 1
-
-//-- System Control Block (32 bit data bus)
-#define rSYSCON_EXTINT (*(volatile unsigned int *) 0xE01FC140)
-#define rSYSCON_EXTWAKE (*(volatile unsigned int *) 0xE01FC144)
-#define rSYSCON_MEMMAP (*(volatile unsigned int *) 0xE01FC040)
-#define rSYSCON_PLLCON (*(volatile unsigned int *) 0xE01FC080)
-#define rSYSCON_PLLCFG (*(volatile unsigned int *) 0xE01FC084)
-#define rSYSCON_PLLSTAT (*(volatile unsigned int *) 0xE01FC088)
-#define rSYSCON_PLLFEED (*(volatile unsigned int *) 0xE01FC08C)
-#define rSYSCON_PCON (*(volatile unsigned int *) 0xE01FC0C0)
-#define rSYSCON_PCONP (*(volatile unsigned int *) 0xE01FC0C4)
-#define rSYSCON_VPBDIV (*(volatile unsigned int *) 0xE01FC100)
-
-//-- PERIPHERAL SLOTS #11 thru #125 are unimplemented
-
-
-//-- FLASHIF (32 bit data bus)
-
-
-//------- VIC REGISTERS ----------
-
-#define VICIRQStatus (*(volatile unsigned int *) 0xFFFFF000)
-#define VICFIQStatus (*(volatile unsigned int *) 0xFFFFF004)
-#define VICRawIntr (*(volatile unsigned int *) 0xFFFFF008)
-#define VICIntSelect (*(volatile unsigned int *) 0xFFFFF00C)
-#define VICIntEnable (*(volatile unsigned int *) 0xFFFFF010)
-#define VICIntEnClear (*(volatile unsigned int *) 0xFFFFF014)
-#define VICSoftInt (*(volatile unsigned int *) 0xFFFFF018)
-#define VICSoftIntClear (*(volatile unsigned int *) 0xFFFFF01C)
-#define VICProtection (*(volatile unsigned int *) 0xFFFFF020)
-#define VICVectAddr (*(volatile unsigned int *) 0xFFFFF030)
-#define VICDefVectAddr (*(volatile unsigned int *) 0xFFFFF034)
-
-#define VICVectAddr0 (*(volatile unsigned int *) 0xFFFFF100)
-#define VICVectAddr1 (*(volatile unsigned int *) 0xFFFFF104)
-#define VICVectAddr2 (*(volatile unsigned int *) 0xFFFFF108)
-#define VICVectAddr3 (*(volatile unsigned int *) 0xFFFFF10C)
-#define VICVectAddr4 (*(volatile unsigned int *) 0xFFFFF110)
-#define VICVectAddr5 (*(volatile unsigned int *) 0xFFFFF114)
-#define VICVectAddr6 (*(volatile unsigned int *) 0xFFFFF118)
-#define VICVectAddr7 (*(volatile unsigned int *) 0xFFFFF11C)
-#define VICVectAddr8 (*(volatile unsigned int *) 0xFFFFF120)
-#define VICVectAddr9 (*(volatile unsigned int *) 0xFFFFF124)
-#define VICVectAddr10 (*(volatile unsigned int *) 0xFFFFF128)
-#define VICVectAddr11 (*(volatile unsigned int *) 0xFFFFF12C)
-#define VICVectAddr12 (*(volatile unsigned int *) 0xFFFFF130)
-#define VICVectAddr13 (*(volatile unsigned int *) 0xFFFFF134)
-#define VICVectAddr14 (*(volatile unsigned int *) 0xFFFFF138)
-#define VICVectAddr15 (*(volatile unsigned int *) 0xFFFFF13C)
-
-#define VICVectCntl0 (*(volatile unsigned int *) 0xFFFFF200)
-#define VICVectCntl1 (*(volatile unsigned int *) 0xFFFFF204)
-#define VICVectCntl2 (*(volatile unsigned int *) 0xFFFFF208)
-#define VICVectCntl3 (*(volatile unsigned int *) 0xFFFFF20C)
-#define VICVectCntl4 (*(volatile unsigned int *) 0xFFFFF210)
-#define VICVectCntl5 (*(volatile unsigned int *) 0xFFFFF214)
-#define VICVectCntl6 (*(volatile unsigned int *) 0xFFFFF218)
-#define VICVectCntl7 (*(volatile unsigned int *) 0xFFFFF21C)
-#define VICVectCntl8 (*(volatile unsigned int *) 0xFFFFF220)
-#define VICVectCntl9 (*(volatile unsigned int *) 0xFFFFF224)
-#define VICVectCntl10 (*(volatile unsigned int *) 0xFFFFF228)
-#define VICVectCntl11 (*(volatile unsigned int *) 0xFFFFF22C)
-#define VICVectCntl12 (*(volatile unsigned int *) 0xFFFFF230)
-#define VICVectCntl13 (*(volatile unsigned int *) 0xFFFFF234)
-#define VICVectCntl14 (*(volatile unsigned int *) 0xFFFFF238)
-#define VICVectCntl15 (*(volatile unsigned int *) 0xFFFFF23C)
-
-
-#define VICITCR (*(volatile unsigned int *) 0xFFFFF300)
-#define VICITIP1 (*(volatile unsigned int *) 0xFFFFF304)
-#define VICITIP2 (*(volatile unsigned int *) 0xFFFFF308)
-#define VICITOP1 (*(volatile unsigned int *) 0xFFFFF30C)
-#define VICITOP2 (*(volatile unsigned int *) 0xFFFFF310)
-
-#define VICPeriphID0 (*(volatile unsigned int *) 0xFFFFFFE0)
-#define VICPeriphID1 (*(volatile unsigned int *) 0xFFFFFFE4)
-#define VICPeriphID2 (*(volatile unsigned int *) 0xFFFFFFE8)
-#define VICPeriphID3 (*(volatile unsigned int *) 0xFFFFFFEC)
-
-#define VICPCellID0 (*(volatile unsigned int *) 0xFFFFFFF0)
-#define VICPCellID1 (*(volatile unsigned int *) 0xFFFFFFF4)
-#define VICPCellID2 (*(volatile unsigned int *) 0xFFFFFFF8)
-#define VICPCellID3 (*(volatile unsigned int *) 0xFFFFFFFC)
-
-#endif
Added: trunk/firmware/arm/lpc/Template/LPC210x.h
===================================================================
--- trunk/firmware/arm/lpc/Template/LPC210x.h (rev 0)
+++ trunk/firmware/arm/lpc/Template/LPC210x.h 2008-02-17 21:22:52 UTC (rev 853)
@@ -0,0 +1,230 @@
+/***********************************************************************/
+/* This file is not part of the uVision/ARM development tools anymore */
+/* so screw that Copyright KEIL ELEKTRONIK GmbH 2002-2004 */
+/***********************************************************************/
+/* */
+/* LPC210X.H: Header file for Philips LPC2104 / LPC2105 / LPC2106 */
+/* */
+/***********************************************************************/
+
+#ifndef __LPC210x_H
+#define __LPC210x_H
+
+/* Vectored Interrupt Controller (VIC) */
+#define VICIRQStatus (*((volatile unsigned long *) 0xFFFFF000))
+#define VICFIQStatus (*((volatile unsigned long *) 0xFFFFF004))
+#define VICRawIntr (*((volatile unsigned long *) 0xFFFFF008))
+#define VICIntSelect (*((volatile unsigned long *) 0xFFFFF00C))
+#define VICIntEnable (*((volatile unsigned long *) 0xFFFFF010))
+#define VICIntEnClr (*((volatile unsigned long *) 0xFFFFF014))
+#define VICSoftInt (*((volatile unsigned long *) 0xFFFFF018))
+#define VICSoftIntClr (*((volatile unsigned long *) 0xFFFFF01C))
+#define VICProtection (*((volatile unsigned long *) 0xFFFFF020))
+#define VICVectAddr (*((volatile unsigned long *) 0xFFFFF030))
+#define VICDefVectAddr (*((volatile unsigned long *) 0xFFFFF034))
+#define VICVectAddr0 (*((volatile unsigned long *) 0xFFFFF100))
+#define VICVectAddr1 (*((volatile unsigned long *) 0xFFFFF104))
+#define VICVectAddr2 (*((volatile unsigned long *) 0xFFFFF108))
+#define VICVectAddr3 (*((volatile unsigned long *) 0xFFFFF10C))
+#define VICVectAddr4 (*((volatile unsigned long *) 0xFFFFF110))
+#define VICVectAddr5 (*((volatile unsigned long *) 0xFFFFF114))
+#define VICVectAddr6 (*((volatile unsigned long *) 0xFFFFF118))
+#define VICVectAddr7 (*((volatile unsigned long *) 0xFFFFF11C))
+#define VICVectAddr8 (*((volatile unsigned long *) 0xFFFFF120))
+#define VICVectAddr9 (*((volatile unsigned long *) 0xFFFFF124))
+#define VICVectAddr10 (*((volatile unsigned long *) 0xFFFFF128))
+#define VICVectAddr11 (*((volatile unsigned long *) 0xFFFFF12C))
+#define VICVectAddr12 (*((volatile unsigned long *) 0xFFFFF130))
+#define VICVectAddr13 (*((volatile unsigned long *) 0xFFFFF134))
+#define VICVectAddr14 (*((volatile unsigned long *) 0xFFFFF138))
+#define VICVectAddr15 (*((volatile unsigned long *) 0xFFFFF13C))
+#define VICVectCntl0 (*((volatile unsigned long *) 0xFFFFF200))
+#define VICVectCntl1 (*((volatile unsigned long *) 0xFFFFF204))
+#define VICVectCntl2 (*((volatile unsigned long *) 0xFFFFF208))
+#define VICVectCntl3 (*((volatile unsigned long *) 0xFFFFF20C))
+#define VICVectCntl4 (*((volatile unsigned long *) 0xFFFFF210))
+#define VICVectCntl5 (*((volatile unsigned long *) 0xFFFFF214))
+#define VICVectCntl6 (*((volatile unsigned long *) 0xFFFFF218))
+#define VICVectCntl7 (*((volatile unsigned long *) 0xFFFFF21C))
+#define VICVectCntl8 (*((volatile unsigned long *) 0xFFFFF220))
+#define VICVectCntl9 (*((volatile unsigned long *) 0xFFFFF224))
+#define VICVectCntl10 (*((volatile unsigned long *) 0xFFFFF228))
+#define VICVectCntl11 (*((volatile unsigned long *) 0xFFFFF22C))
+#define VICVectCntl12 (*((volatile unsigned long *) 0xFFFFF230))
+#define VICVectCntl13 (*((volatile unsigned long *) 0xFFFFF234))
+#define VICVectCntl14 (*((volatile unsigned long *) 0xFFFFF238))
+#define VICVectCntl15 (*((volatile unsigned long *) 0xFFFFF23C))
+
+/* Pin Connect Block */
+#define PINSEL0 (*((volatile unsigned long *) 0xE002C000))
+#define PINSEL1 (*((volatile unsigned long *) 0xE002C004))
+
+/* General Purpose Input/Output (GPIO) */
+#define IOPIN (*((volatile unsigned long *) 0xE0028000))
+#define IOSET (*((volatile unsigned long *) 0xE0028004))
+#define IODIR (*((volatile unsigned long *) 0xE0028008))
+#define IOCLR (*((volatile unsigned long *) 0xE002800C))
+
+/* Memory Accelerator Module (MAM) */
+#define MAMCR (*((volatile unsigned char *) 0xE01FC000))
+#define MAMTIM (*((volatile unsigned char *) 0xE01FC004))
+#define MEMMAP (*((volatile unsigned char *) 0xE01FC040))
+
+/* Phase Locked Loop (PLL) */
+#define PLLCON (*((volatile unsigned char *) 0xE01FC080))
+#define PLLCFG (*((volatile unsigned char *) 0xE01FC084))
+#define PLLSTAT (*((volatile unsigned short*) 0xE01FC088))
+#define PLLFEED (*((volatile unsigned char *) 0xE01FC08C))
+
+/* VPB Divider */
+#define VPBDIV (*((volatile unsigned char *) 0xE01FC100))
+
+/* Power Control */
+#define PCON (*((volatile unsigned char *) 0xE01FC0C0))
+#define PCONP (*((volatile unsigned long *) 0xE01FC0C4))
+
+/* External Interrupts */
+#define EXTINT (*((volatile unsigned char *) 0xE01FC140))
+#define EXTWAKE (*((volatile unsigned char *) 0xE01FC144))
+
+/* Timer 0 */
+#define T0IR (*((volatile unsigned long *) 0xE0004000))
+#define T0TCR (*((volatile unsigned long *) 0xE0004004))
+#define T0TC (*((volatile unsigned long *) 0xE0004008))
+#define T0PR (*((volatile unsigned long *) 0xE000400C))
+#define T0PC (*((volatile unsigned long *) 0xE0004010))
+#define T0MCR (*((volatile unsigned long *) 0xE0004014))
+#define T0MR0 (*((volatile unsigned long *) 0xE0004018))
+#define T0MR1 (*((volatile unsigned long *) 0xE000401C))
+#define T0MR2 (*((volatile unsigned long *) 0xE0004020))
+#define T0MR3 (*((volatile unsigned long *) 0xE0004024))
+#define T0CCR (*((volatile unsigned long *) 0xE0004028))
+#define T0CR0 (*((volatile unsigned long *) 0xE000402C))
+#define T0CR1 (*((volatile unsigned long *) 0xE0004030))
+#define T0CR2 (*((volatile unsigned long *) 0xE0004034))
+#define T0CR3 (*((volatile unsigned long *) 0xE0004038))
+#define T0EMR (*((volatile unsigned long *) 0xE000403C))
+
+/* Timer 1 */
+#define T1IR (*((volatile unsigned long *) 0xE0008000))
+#define T1TCR (*((volatile unsigned long *) 0xE0008004))
+#define T1TC (*((volatile unsigned long *) 0xE0008008))
+#define T1PR (*((volatile unsigned long *) 0xE000800C))
+#define T1PC (*((volatile unsigned long *) 0xE0008010))
+#define T1MCR (*((volatile unsigned long *) 0xE0008014))
+#define T1MR0 (*((volatile unsigned long *) 0xE0008018))
+#define T1MR1 (*((volatile unsigned long *) 0xE000801C))
+#define T1MR2 (*((volatile unsigned long *) 0xE0008020))
+#define T1MR3 (*((volatile unsigned long *) 0xE0008024))
+#define T1CCR (*((volatile unsigned long *) 0xE0008028))
+#define T1CR0 (*((volatile unsigned long *) 0xE000802C))
+#define T1CR1 (*((volatile unsigned long *) 0xE0008030))
+#define T1CR2 (*((volatile unsigned long *) 0xE0008034))
+#define T1CR3 (*((volatile unsigned long *) 0xE0008038))
+#define T1EMR (*((volatile unsigned long *) 0xE000803C))
+
+/* Pulse Width Modulator (PWM) */
+#define PWMIR (*((volatile unsigned long *) 0xE0014000))
+#define PWMTCR (*((volatile unsigned long *) 0xE0014004))
+#define PWMTC (*((volatile unsigned long *) 0xE0014008))
+#define PWMPR (*((volatile unsigned long *) 0xE001400C))
+#define PWMPC (*((volatile unsigned long *) 0xE0014010))
+#define PWMMCR (*((volatile unsigned long *) 0xE0014014))
+#define PWMMR0 (*((volatile unsigned long *) 0xE0014018))
+#define PWMMR1 (*((volatile unsigned long *) 0xE001401C))
+#define PWMMR2 (*((volatile unsigned long *) 0xE0014020))
+#define PWMMR3 (*((volatile unsigned long *) 0xE0014024))
+#define PWMMR4 (*((volatile unsigned long *) 0xE0014040))
+#define PWMMR5 (*((volatile unsigned long *) 0xE0014044))
+#define PWMMR6 (*((volatile unsigned long *) 0xE0014048))
+#define PWMCCR (*((volatile unsigned long *) 0xE0014028))
+#define PWMCR0 (*((volatile unsigned long *) 0xE001402C))
+#define PWMCR1 (*((volatile unsigned long *) 0xE0014030))
+#define PWMCR2 (*((volatile unsigned long *) 0xE0014034))
+#define PWMCR3 (*((volatile unsigned long *) 0xE0014038))
+#define PWMEMR (*((volatile unsigned long *) 0xE001403C))
+#define PWMPCR (*((volatile unsigned long *) 0xE001404C))
+#define PWMLER (*((volatile unsigned long *) 0xE0014050))
+
+/* Universal Asynchronous Receiver Transmitter 0 (UART0) */
+#define U0RBR (*((volatile unsigned char *) 0xE000C000))
+#define U0THR (*((volatile unsigned char *) 0xE000C000))
+#define U0IER (*((volatile unsigned char *) 0xE000C004))
+#define U0IIR (*((volatile unsigned char *) 0xE000C008))
+#define U0FCR (*((volatile unsigned char *) 0xE000C008))
+#define U0LCR (*((volatile unsigned char *) 0xE000C00C))
+#define U0MCR (*((volatile unsigned char *) 0xE000C010))
+#define U0LSR (*((volatile unsigned char *) 0xE000C014))
+#define U0MSR (*((volatile unsigned char *) 0xE000C018))
+#define U0SCR (*((volatile unsigned char *) 0xE000C01C))
+#define U0DLL (*((volatile unsigned char *) 0xE000C000))
+#define U0DLM (*((volatile unsigned char *) 0xE000C004))
+
+/* Universal Asynchronous Receiver Transmitter 1 (UART1) */
+#define U1RBR (*((volatile unsigned char *) 0xE0010000))
+#define U1THR (*((volatile unsigned char *) 0xE0010000))
+#define U1IER (*((volatile unsigned char *) 0xE0010004))
+#define U1IIR (*((volatile unsigned char *) 0xE0010008))
+#define U1FCR (*((volatile unsigned char *) 0xE0010008))
+#define U1LCR (*((volatile unsigned char *) 0xE001000C))
+#define U1MCR (*((volatile unsigned char *) 0xE0010010))
+#define U1LSR (*((volatile unsigned char *) 0xE0010014))
+#define U1MSR (*((volatile unsigned char *) 0xE0010018))
+#define U1SCR (*((volatile unsigned char *) 0xE001001C))
+#define U1DLL (*((volatile unsigned char *) 0xE0010000))
+#define U1DLM (*((volatile unsigned char *) 0xE0010004))
+
+/* I2C Interface */
+#define I2CONSET (*((volatile unsigned char *) 0xE001C000))
+#define I2STAT (*((volatile unsigned char *) 0xE001C004))
+#define I2DAT (*((volatile unsigned char *) 0xE001C008))
+#define I2ADR (*((volatile unsigned char *) 0xE001C00C))
+#define I2SCLH (*((volatile unsigned short*) 0xE001C010))
+#define I2SCLL (*((volatile unsigned short*) 0xE001C014))
+#define I2CONCLR (*((volatile unsigned char *) 0xE001C018))
+
+/* SPI (Serial Peripheral Interface) */
+#define SPCR (*((volatile unsigned char *) 0xE0020000))
+#define SPSR (*((volatile unsigned char *) 0xE0020004))
+#define SPDR (*((volatile unsigned char *) 0xE0020008))
+#define SPCCR (*((volatile unsigned char *) 0xE002000C))
+#define SPTCR (*((volatile unsigned char *) 0xE0020010))
+#define SPTSR (*((volatile unsigned char *) 0xE0020014))
+#define SPTOR (*((volatile unsigned char *) 0xE0020018))
+#define SPINT (*((volatile unsigned char *) 0xE002001C))
+
+/* Real Time Clock */
+#define ILR (*((volatile unsigned char *) 0xE0024000))
+#define CTC (*((volatile unsigned short*) 0xE0024004))
+#define CCR (*((volatile unsigned char *) 0xE0024008))
+#define CIIR (*((volatile unsigned char *) 0xE002400C))
+#define AMR (*((volatile unsigned char *) 0xE0024010))
+#define CTIME0 (*((volatile unsigned long *) 0xE0024014))
+#define CTIME1 (*((volatile unsigned long *) 0xE0024018))
+#define CTIME2 (*((volatile unsigned long *) 0xE002401C))
+#define SEC (*((volatile unsigned char *) 0xE0024020))
+#define MIN (*((volatile unsigned char *) 0xE0024024))
+#define HOUR (*((volatile unsigned char *) 0xE0024028))
+#define DOM (*((volatile unsigned char *) 0xE002402C))
+#define DOW (*((volatile unsigned char *) 0xE0024030))
+#define DOY (*((volatile unsigned short*) 0xE0024034))
+#define MONTH (*((volatile unsigned char *) 0xE0024038))
+#define YEAR (*((volatile unsigned short*) 0xE002403C))
+#define ALSEC (*((volatile unsigned char *) 0xE0024060))
+#define ALMIN (*((volatile unsigned char *) 0xE0024064))
+#define ALHOUR (*((volatile unsigned char *) 0xE0024068))
+#define ALDOM (*((volatile unsigned char *) 0xE002406C))
+#define ALDOW (*((volatile unsigned char *) 0xE0024070))
+#define ALDOY (*((volatile unsigned short*) 0xE0024074))
+#define ALMON (*((volatile unsigned char *) 0xE0024078))
+#define ALYEAR (*((volatile unsigned short*) 0xE002407C))
+#define PREINT (*((volatile unsigned short*) 0xE0024080))
+#define PREFRAC (*((volatile unsigned short*) 0xE0024084))
+
+/* Watchdog */
+#define WDMOD (*((volatile unsigned char *) 0xE0000000))
+#define WDTC (*((volatile unsigned long *) 0xE0000004))
+#define WDFEED (*((volatile unsigned char *) 0xE0000008))
+#define WDTV (*((volatile unsigned long *) 0xE000000C))
+
+#endif // __LPC210x_H
Added: trunk/firmware/arm/lpc/Template/Linkerscript
===================================================================
--- trunk/firmware/arm/lpc/Template/Linkerscript (rev 0)
+++ trunk/firmware/arm/lpc/Template/Linkerscript 2008-02-17 21:22:52 UTC (rev 853)
@@ -0,0 +1,168 @@
+/*
+ * linkerscript
+ */
+
+OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
+OUTPUT_ARCH(arm)
+ENTRY(_start)
+STARTUP(crt0.o)
+
+MEMORY
+{
+ ram : ORIGIN = 0x40000000, LENGTH = 64K
+ rom : ORIGIN = 0x00000000, LENGTH = 128K
+}
+
+SECTIONS
+{
+ __sp = 0x40000000 + 64K;
+
+ /* instructions */
+ .text :
+ {
+ __text_start = . ;
+
+ *(EXCLUDE_FILE (*text.iwram*) .text)
+ *(.text.*)
+ *(.stub)
+ /* .gnu.warning sections are handled specially by elf32.em. */
+ *(.gnu.warning)
+ *(.gnu.linkonce.t*)
+ *(.glue_7 .glue_7t)
+
+ KEEP (*(.init.crt_i_begin))
+ KEEP (*(.init))
+ KEEP (*(.init.crt_end_n))
+
+ KEEP (*(.fini.crt_i_begin))
+ KEEP (*(.fini))
+ KEEP (*(.fini.crt_end_n))
+
+ . = ALIGN(4);
+ } > ram
+
+ __text_end = . ;
+
+ .vectors : AT(0)
+ {
+ __vectors_start = . ;
+ *(.vectors)
+ . = ALIGN(4);
+ } > ram
+
+ __vectors_end = . ;
+ __vectors_load_addr = LOADADDR(.vectors);
+
+ /* read-only data */
+ .rodata :
+ {
+ *(.rodata)
+ *all.rodata*(*)
+ *(.roda)
+ *(.rodata.*)
+ *(.gnu.linkonce.r*)
+
+ KEEP (*(.ctors.crt_i_begin))
+ KEEP (*(SORT(.ctors)))
+ KEEP (*(.ctors.crt_end_n))
+
+ KEEP (*(.dtors.crt_i_begin))
+ KEEP (*(SORT(.dtors)))
+ KEEP (*(.dtors.crt_end_n))
+
+ . = ALIGN(4);
+ } > ram
+
+ .eh_frame :
+ {
+ KEEP (*(.eh_frame))
+
+ . = ALIGN(4);
+ } > ram
+
+ .gcc_except_table :
+ {
+ *(.gcc_except_table)
+
+ . = ALIGN(4);
+ } > ram
+
+ __ro_end = . ;
+
+ /* read-write data */
+ .data :
+ {
+ __data_start = .;
+
+ *(.data)
+ *(.data.*)
+ *(.gnu.linkonce.d*)
+ CONSTRUCTORS
+
+ . = ALIGN(4);
+ } > ram
+
+ __data_end = . ;
+
+ /* read-write uninitialized reserved space */
+ .bss :
+ {
+ __bss_start = . ;
+
+ *(.bss)
+ *(.dynbss)
+ *(.gnu.linkonce.b*)
+ *(COMMON)
+
+ . = ALIGN(4);
+ } > ram = 0
+
+ __bss_end = . ;
+
+ /* heap */
+ _end = . ;
+ __end__ = . ;
+ PROVIDE (end = _end);
+
+/*-----------------------------------*/
+
+ /* STAB debugging sections */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+
+ /* DWARF debug sections
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
Added: trunk/firmware/arm/lpc/Template/Makefile
===================================================================
--- trunk/firmware/arm/lpc/Template/Makefile (rev 0)
+++ trunk/firmware/arm/lpc/Template/Makefile 2008-02-17 21:22:52 UTC (rev 853)
@@ -0,0 +1,78 @@
+##############################################################################
+# Makefile
+#
+
+PATH := $(PATH)
+
+# Tools
+CC := arm-thumb-elf-gcc
+CPP := arm-thumb-elf-g++
+OBJCOPY := arm-thumb-elf-objcopy
+INSIGHT := arm-thumb-elf-insight
+
+# Tool locations
+PATH := /cygdrive/c/cygwin/arm/bin:$(PATH)
+
+# Project files
+PPR := $(wildcard *.ppr)
+NAME := $(basename $(PPR))
+BIN := $(NAME).bin
+ELF := $(NAME).elf
+MAP := $(NAME).map
+LNK := Linkerscript
+
+# Options
+CFLAGS := -g -pipe -Wall -mcpu=arm7tdmi -mtune=arm7tdmi -mstructure-size-boundary=32 -Wno-multichar -fno-builtin $(INCPATHS)
+LDFLAGS := -Wl,-Map,$(MAP) -T$(LNK) -nostartfiles
+
+# Extract source files from PSPad project file
+FILES := $(shell \
+ gawk " \
+ /^\t\t[^\t]/ { OK=0 } \
+ // { if (OK==1) print $0 } \
+ /^\t\t\+compile$$/ { OK=1 } \
+ " $(PPR))
+
+# Which object files should be built from the source files?
+ALL_OBJS := $(patsubst %.cpp,%.o,\
+ $(patsubst %.s,%.o,\
+ $(patsubst %.S,%.o,\
+ $(FILES))))
+
+# Which files can be cleaned?
+CLEAN += $(ALL_OBJS) $(BIN) $(ELF) $(MAP)
+
+#
+.PHONY: all
+all: $(NAME)
+
+.PHONY: $(NAME)
+$(NAME): $(ELF) #$(BIN)
+
+.PHONY: debug
+debug: $(ELF)
+ $(if $(shell pslist | grep -i OcdLib), , cmd /c start OcdLibRemote --cpu ARM7 --device WIGGLER)
+ $(INSIGHT) $(ELF)
+
+$(BIN): $(ELF)
+ $(OBJCOPY) -O binary $(ELF) $(BIN)
+
+$(ELF): $(ALL_OBJS) $(LNK)
+ $(CPP) $(CFLAGS) $(LDFLAGS) -o $@ $(filter-out %crt0.o,$(ALL_OBJS))
+
+# Common include file dependecies
+%.c:: %.h
+%.cpp:: %.h
+
+# How to make object files?
+%.o: %.c; $(CC) $(CFLAGS) -c -o $@ $<
+%.o: %.cpp; $(CPP) $(CFLAGS) -c -o $@ $<
+%.o: %.s; $(CC) $(CFLAGS) -c -o $@ $<
+%.o: %.S; $(CC) $(CFLAGS) -c -o $@ $<
+%.o: %.bin; cd $(@D); $(OBJCOPY) -I binary -O elf32-little --rename-section .data=.rodata $(<F) $(@F)
+
+# Remove output files
+.PHONY: clean
+clean:
+ -$(RM) $(CLEAN)
+
Added: trunk/firmware/arm/lpc/Template/Project.ppr
===================================================================
--- trunk/firmware/arm/lpc/Template/Project.ppr (rev 0)
+++ trunk/firmware/arm/lpc/Template/Project.ppr 2008-02-17 21:22:52 UTC (rev 853)
@@ -0,0 +1,42 @@
+[Config]
+Relative path=1
+Compilator.FileName=make
+Compilator.PSPar=
+Compilator.Log=
+Compilator.Run=
+Compilator.DefaultDir=
+Compilator.SaveAll=1
+Compilator.Capture=1
+Compilator.ParsLog=%F:%L:
+Compilator.HideOutput=1
+Prog1=
+Prog2=
+Prog3=
+Prog4=
+Prog5=
+DefaultDir=
+DefaultCPIndex=0
+LogtoEnd=1
+DontOpen=0
+FileFormat=0
+DocumentRoot=
+HTServer=
+[Project tree]
+Project
+ +Files
+ +includes
+ LPC210x.h
+ +compile
+ main.cpp
+ crt0.s
+ +others
+ Makefile
+ Project.x
+[Open project files]
+0=main.cpp
+[Selected Project Files]
+Main=crt0.s
+Selected=main.cpp
+[main.cpp]
+TopLine=1
+Caret=1,1
Added: trunk/firmware/arm/lpc/Template/crt0.s
===================================================================
--- trunk/firmware/arm/lpc/Template/crt0.s (rev 0)
+++ trunk/firmware/arm/lpc/Template/crt0.s 2008-02-17 21:22:52 UTC (rev 853)
@@ -0,0 +1,165 @@
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+@ Startup code
+@
+@ Entry point: _start
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+
+ .text
+ .code 32
+ .align
+
+@ ARM has 8 exception vectors
+
+ .global _start
+_start:
+ ldr pc, =ResetHandler @ reset vector
+ ldr pc, =ResetHandler @ undefined instruction
+ ldr pc, =ResetHandler @ software interrupt
+ ldr pc, =ResetHandler @ prefetch abort
+ ldr pc, =ResetHandler @ data abort
+ ldr pc, =ResetHandler @ reserved
+ ldr pc, [pc, #-0xFF0] @ IRQ. load vector from VICVectAddr
+ ldr pc, =ResetHandler @ FIQ
+
+ .pool @ The ldr instructions load the jump
+ @ addresses indirectly from a neareast pool.
+ @ Because only the first 0x40 bytes of RAM
+ @ are remapped to address 0, we have to put
+ @ it here.
+
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+
+@ create a variable to hold a C function pointer to be called on IRQ
+
+ .global irqVector0
+irqVector0:
+ .word 0 @ this should be set to a C function
+
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+
+@ IRQHandler0
+@ This handler wraps a C function to be called upon IRQ.
+@ This handler is put into VICVectAddr0 register.
+
+ .global IRQHandler0
+IRQHandler0:
+ stmfd sp!, {r0-r3,r12,lr} @ store regs that are used here and in C
+
+ mov r0, #irqVector0
+ ldr r0, [r0]
+ ldr lr, =IRQHandler0_resume
+ mov pc, r0 @ call C function
+IRQHandler0_resume:
+
+ ldr r1, =0xFFFFF030 @ VICVectAddr
+ str r0, [r1] @ update priority hardware (required!)
+
+ ldmfd sp!, {r0-r3,r12,lr}
+ subs pc, lr, #4 @ the way IRQ handler should return
+
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+
+@ IRQHandler1
+@ An example without any C function wrapping.
+@
+@ .global IRQHandler1
+@IRQHandler1:
+@ stmfd sp!, {r0-r3,r12,lr} @ store regs that are used here and in C
+@
+@ ldr r1, =0xE0008000 @ T1IR
+@ mov r0, #0xFF @ all flags
+@ str r0, [r1] @ clear timer 1 interrupt flags
+@
+@ ldr r1, =0xFFFFF030 @ VICVectAddr
+@ str r0, [r1] @ update priority hardware
+@
+@ ldmfd sp!, {r0-r3,r12,lr}
+@ subs pc, lr, #4 @ the way IRQ handler should return
+
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+
+@ __disable_interrupts
+@ Disables the interrupts
+
+ .global __disable_interrupts
+__disable_interrupts:
+ mrs r0, CPSR
+ orr r0, r0, #0xC0 @ disable IRQ/FIQ interrupts
+ msr CPSR_fsxc, r0
+ mov pc, lr
+
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+
+@ __enable_interrupts
+@ Enables the interrupts
+
+ .global __enable_interrupts
+__enable_interrupts:
+ mrs r0, CPSR
+ bic r0, r0, #0x80 @ enable IRQ interrupts
+ msr CPSR_fsxc, r0
+ mov pc, lr
+
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+
+@ The first things that need to be done
+
+ResetHandler:
+
+@
+@ Initialize stack pointers of IRQ and supervisor mode to end of RAM
+@
+
+ ldr r2, =__sp - 0x100
+ mrs r0, cpsr @ Original PSR value
+ bic r0, r0, #0x1F @ Clear the mode bits
+ orr r0, r0, #0x12 @ Set IRQ mode bits
+ msr cpsr_c, r0 @ Change the mode
+ mov sp, r2
+
+ sub r2, r2, #0x100
+ bic r0, r0, #0x1F @ Clear the mode bits
+ orr r0, r0, #0x13 @ Set Supervisor mode bits
+ msr cpsr_c, r0 @ Change the mode
+ mov sp, r2
+
+@
+@ Initialize interrupts
+@
+
+ ldr r0, =0xE01FC040 @ MEMMAP
+ mov r1, #2 @ remap interrupt vectors to SRAM
+ str r1, [r0]
+
+ @ldr r0, =IRQHandler @ set default IRQ handler
+ @ldr r1, =0xFFFFF034 @ VICDefVectAddr
+ @str r0, [r1]
+
+ ldr r0, =IRQHandler0 @ set first IRQ handler
+ ldr r1, =0xFFFFF100 @ VICVectAddr0
+ str r0, [r1]
+
+@
+@ Clear BSS (non-initialized variables)
+@
+
+ mov r0, #0
+ mov r1, #__data_end
+ mov r2, #__bss_end
+ClearBSSLoop:
+ cmps r1, r2
+ beq ClearBSSLoopDone @ check if we're done yet
+ str r0, [r1], #4 @ fill zero's
+ b ClearBSSLoop
+ClearBSSLoopDone:
+
+@
+@ Jump to user code
+@
+
+ b main @ assume we're not going to return
+
+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+
+ .end
+
Added: trunk/firmware/arm/lpc/Template/main.cpp
===================================================================
--- trunk/firmware/arm/lpc/Template/main.cpp (rev 0)
+++ trunk/firmware/arm/lpc/Template/main.cpp 2008-02-17 21:22:52 UTC (rev 853)
@@ -0,0 +1,118 @@
+/******************************************************************************\
+ main.cpp
+\******************************************************************************/
+
+/******************************************************************************\
+ Include files
+\******************************************************************************/
+#include "LPC210x.h"
+
+/******************************************************************************\
+ Initialize timer 1
+\******************************************************************************/
+
+typedef void (*IRQ)();
+//IRQ *VICVectAddr = (IRQ *)&VICVectAddr0; // non-wrapped IRQ vectors
+#define VICVectCntl (((volatile unsigned long *) 0xFFFFF200)) // array
+
+extern IRQ &irqVector0; // wrapped IRQ vector
+
+extern "C" void __enable_interrupts();
+extern "C" void __disable_interrupts();
+extern "C" void IRQHandler();
+
+/******************************************************************************\
+ MyTimerInterrupt
+\******************************************************************************/
+extern "C" void MyTimerInterrupt()
+{
+ // toggle LED
+ static int led = 1;
+ led = !led;
+ if (led) IOSET = 1<<10; else IOCLR = 1<<10; // blink
+
+ // prepare for next interrupt
+ T1IR = 0xFF; // clear interrupt flags
+}
+
+/******************************************************************************\
+ Initialize timer 1
+ (interrupt source 5)
+\******************************************************************************/
+void InitTimer()
+{
+ __disable_interrupts();
+
+ // Initialise timer1
+ T1TCR = 0; // stop and reset counter and prescaler
+ //T1TC = 0; // reset timer counter (again)
+ T1PC = 2/*div by 2*/ - 1; // prescale counter
+ //T1PR = 0; // reset timer prescaler value (again)
+ //PLLCFG; // default divider is 1. multiplier is 1.
+ //VPBDIV = 0; // VPB bus runs at 1/4 of cpu clk (default)
+ T1MR0 = 6000000 / 4/*VPBDIV*/; // max counter value
+ T1MCR = 1<<1 | 1<<0; // reset and interrupt on match
+ T1IR = 0xFF; // clear interrupt flags
+
+ // Initialise VIC
+ VICIntSelect &=~ (1<<5); // select IRQ mode instead of FIQ
+ VICVectCntl[0] = 0x20/*enable*/ | 5/*timer 1*/;
+ irqVector0 = MyTimerInterrupt; // wrapped interrupt vector
+ VICIntEnable = 1<<5; // enable interrupt source
+
+ T1TCR = 1<<0; // start
+
+ VICVectAddr = 0xFF; // update priority hardware
+
+ __enable_interrupts();
+}
+
+/******************************************************************************\
+ main
+\******************************************************************************/
+extern "C" int main()
+{
+ /*
+ * Init GPIO
+ */
+ PINSEL0 &=~ 3<<20; // P0.10 = GPIO
+ IODIR |= 1<<10; // P0.10 = output
+ IOCLR = 1<<10; // on (inverted LED)
+ IOSET = 1<<10; // off (inverted LED)
+
+ /*
+ * Init timer
+ */
+ InitTimer();
+
+ /*
+ * Main loop
+ */
+ while (1)
+ {
+ // example of some inline assembly...
+ asm
+ (
+ "ldr r0, =0xFFFFF000 \n" // VICIRQStatus
+ "ldr r1,[r0] \n"
+
+ "ldr r0, =0xFFFFF200 \n" // VICVectCntl0
+ "ldr r2,[r0] \n"
+
+ "ldr r0, =0xFFFFF008 \n" // VICRawIntr
+ "ldr r3,[r0] \n"
+
+ "ldr r0, =0xE0008000\n" // T1IR
+ "ldr r4,[r0] \n"
+
+ "ldr r0, =0xE0008008\n" // T1TC
+ "ldr r5,[r0] \n"
+
+ "ldr r0, =0xE0008018\n" // T1MR0
+ "ldr r6,[r0] \n"
+ );
+ }
+
+ return 0; // don't ever come near this
+}
+
Added: trunk/firmware/arm/lpc/common/include/LPC210x.h
===================================================================
--- trunk/firmware/arm/lpc/common/include/LPC210x.h (rev 0)
+++ trunk/firmware/arm/lpc/common/include/LPC210x.h 2008-02-17 21:22:52 UTC (rev 853)
@@ -0,0 +1,230 @@
+/***********************************************************************/
+/* This file is part of the uVision/ARM development tools */
+/* Copyright KEIL ELEKTRONIK GmbH 2002-2004 */
+/***********************************************************************/
+/* */
+/* LPC210X.H: Header file for Philips LPC2104 / LPC2105 / LPC2106 */
+/* */
+/***********************************************************************/
+
+#ifndef __LPC210x_H
+#define __LPC210x_H
+
+/* Vectored Interrupt Controller (VIC) */
+#define VICIRQStatus (*((volatile unsigned long *) 0xFFFFF000))
+#define VICFIQStatus (*((volatile unsigned long *) 0xFFFFF004))
+#define VICRawIntr (*((volatile unsigned long *) 0xFFFFF008))
+#define VICIntSelect (*((volatile unsigned long *) 0xFFFFF00C))
+#define VICIntEnable (*((volatile unsigned long *) 0xFFFFF010))
+#define VICIntEnClr (*((volatile unsigned long *) 0xFFFFF014))
+#define VICSoftInt (*((volatile unsigned long *) 0xFFFFF018))
+#define VICSoftIntClr (*((volatile unsigned long *) 0xFFFFF01C))
+#define VICProtection (*((volatile unsigned long *) 0xFFFFF020))
+#define VICVectAddr (*((volatile unsigned long *) 0xFFFFF030))
+#define VICDefVectAddr (*((volatile unsigned long *) 0xFFFFF034))
+#define VICVectAddr0 (*((volatile unsigned long *) 0xFFFFF100))
+#define VICVectAddr1 (*((volatile unsigned long *) 0xFFFFF104))
+#define VICVectAddr2 (*((volatile unsigned long *) 0xFFFFF108))
+#define VICVectAddr3 (*((volatile unsigned long *) 0xFFFFF10C))
+#define VICVectAddr4 (*((volatile unsigned long *) 0xFFFFF110))
+#define VICVectAddr5 (*((volatile unsigned long *) 0xFFFFF114))
+#define VICVectAddr6 (*((volatile unsigned long *) 0xFFFFF118))
+#define VICVectAddr7 (*((volatile unsigned long *) 0xFFFFF11C))
+#define VICVectAddr8 (*((volatile unsigned long *) 0xFFFFF120))
+#define VICVectAddr9 (*((volatile unsigned long *) 0xFFFFF124))
+#define VICVectAddr10 (*((volatile unsigned long *) 0xFFFFF128))
+#define VICVectAddr11 (*((volatile unsigned long *) 0xFFFFF12C))
+#define VICVectAddr12 (*((volatile unsigned long *) 0xFFFFF130))
+#define VICVectAddr13 (*((volatile unsigned long *) 0xFFFFF134))
+#define VICVectAddr14 (*((volatile unsigned long *) 0xFFFFF138))
+#define VICVectAddr15 (*((volatile unsigned long *) 0xFFFFF13C))
+#define VICVectCntl0 (*((volatile unsigned long *) 0xFFFFF200))
+#define VICVectCntl1 (*((volatile unsigned long *) 0xFFFFF204))
+#define VICVectCntl2 (*((volatile unsigned long *) 0xFFFFF208))
+#define VICVectCntl3 (*((volatile unsigned long *) 0xFFFFF20C))
+#define VICVectCntl4 (*((volatile unsigned long *) 0xFFFFF210))
+#define VICVectCntl5 (*((volatile unsigned long *) 0xFFFFF214))
+#define VICVectCntl6 (*((volatile unsigned long *) 0xFFFFF218))
+#define VICVectCntl7 (*((volatile unsigned long *) 0xFFFFF21C))
+#define VICVectCntl8 (*((volatile unsigned long *) 0xFFFFF220))
+#define VICVectCntl9 (*((volatile unsigned long *) 0xFFFFF224))
+#define VICVectCntl10 (*((volatile unsigned long *) 0xFFFFF228))
+#define VICVectCntl11 (*((volatile unsigned long *) 0xFFFFF22C))
+#define VICVectCntl12 (*((volatile unsigned long *) 0xFFFFF230))
+#define VICVectCntl13 (*((volatile unsigned long *) 0xFFFFF234))
+#define VICVectCntl14 (*((volatile unsigned long *) 0xFFFFF238))
+#define VICVectCntl15 (*((volatile unsigned long *) 0xFFFFF23C))
+
+/* Pin Connect Block */
+#define PINSEL0 (*((volatile unsigned long *) 0xE002C000))
+#define PINSEL1 (*((volatile unsigned long *) 0xE002C004))
+
+/* General Purpose Input/Output (GPIO) */
+#define IOPIN (*((volatile unsigned long *) 0xE0028000))
+#define IOSET (*((volatile unsigned long *) 0xE0028004))
+#define IODIR (*((volatile unsigned long *) 0xE0028008))
+#define IOCLR (*((volatile unsigned long *) 0xE002800C))
+
+/* Memory Accelerator Module (MAM) */
+#define MAMCR (*((volatile unsigned char *) 0xE01FC000))
+#define MAMTIM (*((volatile unsigned char *) 0xE01FC004))
+#define MEMMAP (*((volatile unsigned char *) 0xE01FC040))
+
+/* Phase Locked Loop (PLL) */
+#define PLLCON (*((volatile unsigned char *) 0xE01FC080))
+#define PLLCFG (*((volatile unsigned char *) 0xE01FC084))
+#define PLLSTAT (*((volatile unsigned short*) 0xE01FC088))
+#define PLLFEED (*((volatile unsigned char *) 0xE01FC08C))
+
+/* VPB Divider */
+#define VPBDIV (*((volatile unsigned char *) 0xE01FC100))
+
+/* Power Control */
+#define PCON (*((volatile unsigned char *) 0xE01FC0C0))
+#define PCONP (*((volatile unsigned long *) 0xE01FC0C4))
+
+/* External Interrupts */
+#define EXTINT (*((volatile unsigned char *) 0xE01FC140))
+#define EXTWAKE (*((volatile unsigned char *) 0xE01FC144))
+
+/* Timer 0 */
+#define T0IR (*((volatile unsigned long *) 0xE0004000))
+#define T0TCR (*((volatile unsigned long *) 0xE0004004))
+#define T0TC (*((volatile unsigned long *) 0xE0004008))
+#define T0PR (*((volatile unsigned long *) 0xE000400C))
+#define T0PC (*((volatile unsigned long *) 0xE0004010))
+#define T0MCR (*((volatile unsigned long *) 0xE0004014))
+#define T0MR0 (*((volatile unsigned long *) 0xE0004018))
+#define T0MR1 (*((volatile unsigned long *) 0xE000401C))
+#define T0MR2 (*((volatile unsigned long *) 0xE0004020))
+#define T0MR3 (*((volatile unsigned long *) 0xE0004024))
+#define T0CCR (*((volatile unsigned long *) 0xE0004028))
+#define T0CR0 (*((volatile unsigned long *) 0xE000402C))
+#define T0CR1 (*((volatile unsigned long *) 0xE0004030))
+#define T0CR2 (*((volatile unsigned long *) 0xE0004034))
+#define T0CR3 (*((volatile unsigned long *) 0xE0004038))
+#define T0EMR (*((volatile unsigned long *) 0xE000403C))
+
+/* Timer 1 */
+#define T1IR (*((volatile unsigned long *) 0xE0008000))
+#define T1TCR (*((volatile unsigned long *) 0xE0008004))
+#define T1TC (*((volatile unsigned long *) 0xE0008008))
+#define T1PR (*((volatile unsigned long *) 0xE000800C))
+#define T1PC (*((volatile unsigned long *) 0xE0008010))
+#define T1MCR (*((volatile unsigned long *) 0xE0008014))
+#define T1MR0 (*((volatile unsigned long *) 0xE0008018))
+#define T1MR1 (*((volatile unsigned long *) 0xE000801C))
+#define T1MR2 (*((volatile unsigned long *) 0xE0008020))
+#define T1MR3 (*((volatile unsigned long *) 0xE0008024))
+#define T1CCR (*((volatile unsigned long *) 0xE0008028))
+#define T1CR0 (*((volatile unsigned long *) 0xE000802C))
+#define T1CR1 (*((volatile unsigned long *) 0xE0008030))
+#define T1CR2 (*((volatile unsigned long *) 0xE0008034))
+#define T1CR3 (*((volatile unsigned long *) 0xE0008038))
+#define T1EMR (*((volatile unsigned long *) 0xE000803C))
+
+/* Pulse Width Modulator (PWM) */
+#define PWMIR (*((volatile unsigned long *) 0xE0014000))
+#define PWMTCR (*((volatile unsigned long *) 0xE0014004))
+#define PWMTC (*((volatile unsigned long *) 0xE0014008))
+#define PWMPR (*((volatile unsigned long *) 0xE001400C))
+#define PWMPC (*((volatile unsigned long *) 0xE0014010))
+#define PWMMCR (*((volatile unsigned long *) 0xE0014014))
+#define PWMMR0 (*((volatile unsigned long *) 0xE0014018))
+#define PWMMR1 (*((volatile unsigned long *) 0xE001401C))
+#define PWMMR2 (*((volatile unsigned long *) 0xE0014020))
+#define PWMMR3 (*((volatile unsigned long *) 0xE0014024))
+#define PWMMR4 (*((volatile unsigned long *) 0xE0014040))
+#define PWMMR5 (*((volatile unsigned long *) 0xE0014044))
+#define PWMMR6 (*((volatile unsigned long *) 0xE0014048))
+#define PWMCCR (*((volatile unsigned long *) 0xE0014028))
+#define PWMCR0 (*((volatile unsigned long *) 0xE001402C))
+#define PWMCR1 (*((volatile unsigned long *) 0xE0014030))
+#define PWMCR2 (*((volatile unsigned long *) 0xE0014034))
+#define PWMCR3 (*((volatile unsigned long *) 0xE0014038))
+#define PWMEMR (*((volatile unsigned long *) 0xE001403C))
+#define PWMPCR (*((volatile unsigned long *) 0xE001404C))
+#define PWMLER (*((volatile unsigned long *) 0xE0014050))
+
+/* Universal Asynchronous Receiver Transmitter 0 (UART0) */
+#define U0RBR (*((volatile unsigned char *) 0xE000C000))
+#define U0THR (*((volatile unsigned char *) 0xE000C000))
+#define U0IER (*((volatile unsigned char *) 0xE000C004))
+#define U0IIR (*((volatile unsigned char *) 0xE000C008))
+#define U0FCR (*((volatile unsigned char *) 0xE000C008))
+#define U0LCR (*((volatile unsigned char *) 0xE000C00C))
+#define U0MCR (*((volatile unsigned char *) 0xE000C010))
+#define U0LSR (*((volatile unsigned char *) 0xE000C014))
+#define U0MSR (*((volatile unsigned char *) 0xE000C018))
+#define U0SCR (*((volatile unsigned char *) 0xE000C01C))
+#define U0DLL (*((volatile unsigned char *) 0xE000C000))
+#define U0DLM (*((volatile unsigned char *) 0xE000C004))
+
+/* Universal Asynchronous Receiver Transmitter 1 (UART1) */
+#define U1RBR (*((volatile unsigned char *) 0xE0010000))
+#define U1THR (*((volatile unsigned char *) 0xE0010000))
+#define U1IER (*((volatile unsigned char *) 0xE0010004))
+#define U1IIR (*((volatile unsigned char *) 0xE0010008))
+#define U1FCR (*((volatile unsigned char *) 0xE0010008))
+#define U1LCR (*((volatile unsigned char *) 0xE001000C))
+#define U1MCR (*((volatile unsigned char *) 0xE0010010))
+#define U1LSR (*((volatile unsigned char *) 0xE0010014))
+#define U1MSR (*((volatile unsigned char *) 0xE0010018))
+#define U1SCR (*((volatile unsigned char *) 0xE001001C))
+#define U1DLL (*((volatile unsigned char *) 0xE0010000))
+#define U1DLM (*((volatile unsigned char *) 0xE0010004))
+
+/* I2C Interface */
+#define I2CONSET (*((volatile unsigned char *) 0xE001C000))
+#define I2STAT (*((volatile unsigned char *) 0xE001C004))
+#define I2DAT (*((volatile unsigned char *) 0xE001C008))
+#define I2ADR (*((volatile unsigned char *) 0xE001C00C))
+#define I2SCLH (*((volatile unsigned short*) 0xE001C010))
+#define I2SCLL (*((volatile unsigned short*) 0xE001C014))
+#define I2CONCLR (*((volatile unsigned char *) 0xE001C018))
+
+/* SPI (Serial Peripheral Interface) */
+#define S0SPCR (*((volatile unsigned char *) 0xE0020000))
+#define S0SPSR (*((volatile unsigned char *) 0xE0020004))
+#define S0SPDR (*((volatile unsigned char *) 0xE0020008))
+#define S0SPCCR (*((volatile unsigned char *) 0xE002000C))
+#define S0SPTCR (*((volatile unsigned char *) 0xE0020010))
+#define S0SPTSR (*((volatile unsigned char *) 0xE0020014))
+#define S0SPTOR (*((volatile unsigned char *) 0xE0020018))
+#define S0SPINT (*((volatile unsigned char *) 0xE002001C))
+
+/* Real Time Clock */
+#define ILR (*((volatile unsigned char *) 0xE0024000))
+#define CTC (*((volatile unsigned short*) 0xE0024004))
+#define CCR (*((volatile unsigned char *) 0xE0024008))
+#define CIIR (*((volatile unsigned char *) 0xE002400C))
+#define AMR (*((volatile unsigned char *) 0xE0024010))
+#define CTIME0 (*((volatile unsigned long *) 0xE0024014))
+#define CTIME1 (*((volatile unsigned long *) 0xE0024018))
+#define CTIME2 (*((volatile unsigned long *) 0xE002401C))
+#define SEC (*((volatile unsigned char *) 0xE0024020))
+#define MI...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-17 16:44:20
|
Revision: 852
http://can.svn.sourceforge.net/can/?rev=852&view=rev
Author: akhe
Date: 2008-02-17 08:44:13 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
Added str USB library code
Added Paths:
-----------
trunk/firmware/arm/str/common/usblib/
trunk/firmware/arm/str/common/usblib/inc/
trunk/firmware/arm/str/common/usblib/inc/usb_core.h
trunk/firmware/arm/str/common/usblib/inc/usb_def.h
trunk/firmware/arm/str/common/usblib/inc/usb_init.h
trunk/firmware/arm/str/common/usblib/inc/usb_int.h
trunk/firmware/arm/str/common/usblib/inc/usb_lib.h
trunk/firmware/arm/str/common/usblib/inc/usb_mem.h
trunk/firmware/arm/str/common/usblib/inc/usb_regs.h
trunk/firmware/arm/str/common/usblib/inc/usb_type.h
trunk/firmware/arm/str/common/usblib/src/
trunk/firmware/arm/str/common/usblib/src/usb_core.c
trunk/firmware/arm/str/common/usblib/src/usb_init.c
trunk/firmware/arm/str/common/usblib/src/usb_int.c
trunk/firmware/arm/str/common/usblib/src/usb_mem.c
trunk/firmware/arm/str/common/usblib/src/usb_regs.c
Added: trunk/firmware/arm/str/common/usblib/inc/usb_core.h
===================================================================
--- trunk/firmware/arm/str/common/usblib/inc/usb_core.h (rev 0)
+++ trunk/firmware/arm/str/common/usblib/inc/usb_core.h 2008-02-17 16:44:13 UTC (rev 852)
@@ -0,0 +1,236 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_core.h
+* Author : MCD Application Team
+* Date First Issued : 10/27/2003 : V1.0
+* Description : Standard protocol processing functions prototypes
+********************************************************************************
+* History:
+* 09/18/2006 : V3.0
+* 09/01/2006 : V2.0
+* 10/27/2003 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_CORE_H
+#define __USB_CORE_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+typedef enum _CONTROL_STATE {
+ WAIT_SETUP, /* 0 */
+ SETTING_UP, /* 1 */
+ IN_DATA, /* 2 */
+ OUT_DATA, /* 3 */
+ LAST_IN_DATA, /* 4 */
+ LAST_OUT_DATA, /* 5 */
+ WAIT_STATUS_IN, /* 7 */
+ WAIT_STATUS_OUT, /* 8 */
+ STALLED, /* 9 */
+ PAUSE /* 10 */
+} CONTROL_STATE; /* The state machine states of a control pipe */
+
+typedef struct OneDescriptor {
+ u8 *Descriptor;
+ u16 Descriptor_Size;
+} ONE_DESCRIPTOR, *PONE_DESCRIPTOR;
+/* All the request process routines return a value of this type
+ If the return value is not SUCCESS or NOT_READY,
+ the software will STALL the correspond endpoint
+*/
+typedef enum _RESULT {
+ USB_SUCCESS = 0, /* Process sucessfully */
+ USB_ERROR,
+ USB_UNSUPPORT,
+ USB_NOT_READY /* The process has not been finished, */
+ /* endpoint will be NAK to further rquest */
+} RESULT;
+
+
+/*-*-*-*-*-*-*-*-*-*-* Definitions for endpoint level -*-*-*-*-*-*-*-*-*-*-*-*/
+
+typedef struct _ENDPOINT_INFO {
+ /*
+ When send data out of the device,
+ CopyData() is used to get data buffer 'Length' bytes data
+ if Length is 0,
+ CopyData() returns the total length of the data
+ if the request is not supported, returns 0
+ (NEW Feature )
+ if CopyData() returns -1, the calling routine should not proceed
+ further and will resume the SETUP process by the class device
+ if Length is not 0,
+ CopyData() returns a pointer to indicate the data location
+ Usb_wLength is the data remain to be sent,
+ Usb_wOffset is the Offset of original data
+ When receive data from the host,
+ CopyData() is used to get user data buffer which is capable
+ of Length bytes data to copy data from the endpoint buffer.
+ if Length is 0,
+ CopyData() returns the available data length,
+ if Length is not 0,
+ CopyData() returns user buffer address
+ Usb_rLength is the data remain to be received,
+ Usb_rPointer is the Offset of data buffer
+ */
+ u16 Usb_wLength;
+ u16 Usb_wOffset;
+ u16 PacketSize;
+ u8 *(*CopyData)(u16 Length);
+} ENDPOINT_INFO;
+
+/*-*-*-*-*-*-*-*-*-*-*-* Definitions for device level -*-*-*-*-*-*-*-*-*-*-*-*/
+
+typedef struct _DEVICE {
+ u8 Total_Endpoint; /* Number of endpoints that are used */
+ u8 Total_Configuration;/* Number of configuration available */
+} DEVICE;
+
+typedef union {
+ u16 w;
+ struct BW {
+ u8 bb1;
+ u8 bb0;
+ } bw;
+} u16_u8;
+
+typedef struct _DEVICE_INFO {
+ u8 USBbmRequestType; /* bmRequestType */
+ u8 USBbRequest; /* bRequest */
+ u16_u8 USBwValues; /* wValue */
+ u16_u8 USBwIndexs; /* wIndex */
+ u16_u8 USBwLengths; /* wLength */
+
+ u8 ControlState; /* of type CONTROL_STATE */
+ u8 Current_Feature;
+
+ u8 Current_Configuration; /* Selected configuration */
+ u8 Current_Interface; /* Selected interface of current configuration */
+ u8 Current_AlternateSetting;/* Selected Alternate Setting of current interface*/
+
+ ENDPOINT_INFO Ctrl_Info;
+} DEVICE_INFO;
+
+typedef struct _DEVICE_PROP {
+ void (*Init)(void); /* Initialize the device */
+ void (*Reset)(void); /* Reset routine of this device */
+
+ /* Device dependent process after the status stage */
+ void (*Process_Status_IN)(void);
+ void (*Process_Status_OUT)(void);
+
+ /* Procedure of process on setup stage of a class specified request with data stage */
+ /* All class specified requests with data stage are processed in Class_Data_Setup
+ Class_Data_Setup()
+ responses to check all special requests and fills ENDPOINT_INFO
+ according to the request
+ If IN tokens are expected, then wLength & wOffset will be filled
+ with the total transferring bytes and the starting position
+ If OUT tokens are expected, then rLength & rOffset will be filled
+ with the total expected bytes and the starting position in the buffer
+
+ If the request is valid, Class_Data_Setup returns SUCCESS, else UNSUPPORT
+
+ CAUTION:
+ Since GET_CONFIGURATION & GET_INTERFACE are highly related to
+ the individual classes, they will be checked and processed here.
+ */
+ RESULT (*Class_Data_Setup)(u8 RequestNo);
+
+ /* Procedure of process on setup stage of a class specified request without data stage */
+ /* All class specified requests without data stage are processed in Class_NoData_Setup
+ Class_NoData_Setup
+ responses to check all special requests and perform the request
+
+ CAUTION:
+ Since SET_CONFIGURATION & SET_INTERFACE are highly related to
+ the individual classes, they will be checked and processed here.
+ */
+ RESULT (*Class_NoData_Setup)(u8 RequestNo);
+
+ /*Class_Get_Interface_Setting
+ This function is used by the file usb_core.c to test if the selected Interface
+ and Alternate Setting (u8 Interface, u8 AlternateSetting) are supported by
+ the application.
+ This function is writing by user. It should return "SUCCESS" if the Interface
+ and Alternate Setting are supported by the application or "UNSUPPORT" if they
+ are not supported. */
+
+ RESULT (*Class_Get_Interface_Setting)(u8 Interface,u8 AlternateSetting);
+
+ u8* (*GetDeviceDescriptor)(u16 Length);
+ u8* (*GetConfigDescriptor)(u16 Length);
+ u8* (*GetStringDescriptor)(u16 Length);
+
+ u8* RxEP_buffer;
+ u8 MaxPacketSize;
+
+} DEVICE_PROP;
+
+typedef struct _USER_STANDARD_REQUESTS {
+ void (*User_GetConfiguration)(void); /* Get Configuration */
+ void (*User_SetConfiguration)(void); /* Set Configuration */
+ void (*User_GetInterface)(void);
+ void (*User_SetInterface)(void);
+ void (*User_GetStatus)(void);
+ void (*User_ClearFeature)(void);
+ void (*User_SetEndPointFeature)(void);
+ void (*User_SetDeviceFeature)(void);
+ void (*User_SetDeviceAddress)(void);
+} USER_STANDARD_REQUESTS;
+
+
+
+
+/* Exported constants --------------------------------------------------------*/
+#define Type_Recipient (pInformation->USBbmRequestType & (REQUEST_TYPE | RECIPIENT))
+
+#define Usb_rLength Usb_wLength
+#define Usb_rOffset Usb_wOffset
+
+#define USBwValue USBwValues.w
+#define USBwValue0 USBwValues.bw.bb0
+#define USBwValue1 USBwValues.bw.bb1
+#define USBwIndex USBwIndexs.w
+#define USBwIndex0 USBwIndexs.bw.bb0
+#define USBwIndex1 USBwIndexs.bw.bb1
+#define USBwLength USBwLengths.w
+#define USBwLength0 USBwLengths.bw.bb0
+#define USBwLength1 USBwLengths.bw.bb1
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+u8 Setup0_Process(void);
+u8 Post0_Process(void);
+u8 Out0_Process(void);
+u8 In0_Process(void);
+
+RESULT Standard_SetEndPointFeature(void);
+RESULT Standard_SetDeviceFeature(void);
+
+u8 *Standard_GetConfiguration(u16 Length);
+RESULT Standard_SetConfiguration(void);
+u8 *Standard_GetInterface(u16 Length);
+RESULT Standard_SetInterface(void);
+u8 *Standard_GetDescriptorData(u16 Length, PONE_DESCRIPTOR pDesc);
+
+u8 *Standard_GetStatus(u16 Length);
+RESULT Standard_ClearFeature(void);
+void SetDeviceAddress(u8);
+void NOP_Process(void);
+
+extern DEVICE_PROP Device_Property;
+extern USER_STANDARD_REQUESTS User_Standard_Requests;
+extern DEVICE Device_Table;
+extern DEVICE_INFO Device_Info;
+
+/* cells saving status during interrupt servicing */
+extern u16 SaveRState;
+extern u16 SaveTState;
+#endif /* __USB_CORE_H */
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/common/usblib/inc/usb_def.h
===================================================================
--- trunk/firmware/arm/str/common/usblib/inc/usb_def.h (rev 0)
+++ trunk/firmware/arm/str/common/usblib/inc/usb_def.h 2008-02-17 16:44:13 UTC (rev 852)
@@ -0,0 +1,78 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_def.h
+* Author : MCD Application Team
+* Date First Issued : 10/27/2003 : V1.0
+* Description : Definitions related to USB Core
+********************************************************************************
+* History:
+* 09/18/2006 : V3.0
+* 09/01/2006 : V2.0
+* 10/27/2003 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_DEF_H
+#define __USB_DEF_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+typedef enum _RECIPIENT_TYPE {
+ DEVICE_RECIPIENT, /* Recipient device */
+ INTERFACE_RECIPIENT, /* Recipient interface */
+ ENDPOINT_RECIPIENT, /* Recipient endpoint */
+ OTHER_RECIPIENT
+} RECIPIENT_TYPE;
+
+
+typedef enum _STANDARD_REQUESTS {
+ GET_STATUS = 0,
+ CLEAR_FEATURE,
+ RESERVED1,
+ SET_FEATURE,
+ RESERVED2,
+ SET_ADDRESS,
+ GET_DESCRIPTOR,
+ SET_DESCRIPTOR,
+ GET_CONFIGURATION,
+ SET_CONFIGURATION,
+ GET_INTERFACE,
+ SET_INTERFACE,
+ TOTAL_sREQUEST, /* Total number of Standard request */
+ SYNCH_FRAME = 12
+} STANDARD_REQUESTS;
+
+/* Definition of "USBwValue" */
+typedef enum _DESCRIPTOR_TYPE {
+ DEVICE_DESCRIPTOR = 1,
+ CONFIG_DESCRIPTOR,
+ STRING_DESCRIPTOR,
+ INTERFACE_DESCRIPTOR,
+ ENDPOINT_DESCRIPTOR
+} DESCRIPTOR_TYPE;
+
+/* Feature selector of a SET_FEATURE or CLEAR_FEATURE */
+typedef enum _FEATURE_SELECTOR {
+ ENDPOINT_STALL,
+ DEVICE_REMOTE_WAKEUP
+} FEATURE_SELECTOR;
+
+/* Exported constants --------------------------------------------------------*/
+
+/* Definition of "USBbmRequestType" */
+#define REQUEST_TYPE 0x60 /* Mask to get request type */
+#define STANDARD_REQUEST 0x00 /* Standard request */
+#define CLASS_REQUEST 0x20 /* Class request */
+#define VENDOR_REQUEST 0x40 /* Vendor request */
+
+#define RECIPIENT 0x1F /* Mask to get recipient */
+
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+#endif /* __USB_DEF_H */
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/common/usblib/inc/usb_init.h
===================================================================
--- trunk/firmware/arm/str/common/usblib/inc/usb_init.h (rev 0)
+++ trunk/firmware/arm/str/common/usblib/inc/usb_init.h 2008-02-17 16:44:13 UTC (rev 852)
@@ -0,0 +1,51 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_init.h
+* Author : MCD Application Team
+* Date First Issued : 10/27/2003 : V1.0
+* Description : Initialization routines & global variables
+********************************************************************************
+* History:
+* 09/18/2006 : V3.0
+* 09/01/2006 : V2.0
+* 10/27/2003 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_INIT_H
+#define __USB_INIT_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void USB_Init(void);
+/* External variables --------------------------------------------------------*/
+
+/* The number of current endpoint, it will be used to specify an endpoint */
+extern u8 EPindex;
+/* The number of current device, it is an index to the Device_Table */
+/*extern u8 Device_no; */
+/* Points to the DEVICE_INFO structure of current device */
+/* The purpose of this register is to speed up the execution */
+extern DEVICE_INFO* pInformation;
+/* Points to the DEVICE_PROP structure of current device */
+/* The purpose of this register is to speed up the execution */
+extern DEVICE_PROP* pProperty;
+/* Temporary save the state of Rx & Tx status. */
+/* Whenever the Rx or Tx state is changed, its value is saved */
+/* in this variable first and will be set to the EPRB or EPRA */
+/* at the end of interrupt process */
+extern USER_STANDARD_REQUESTS *pUser_Standard_Requests;
+
+extern u16 SaveState ;
+extern u16 wInterrupt_Mask;
+#endif /* __USB_INIT_H */
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
+
Added: trunk/firmware/arm/str/common/usblib/inc/usb_int.h
===================================================================
--- trunk/firmware/arm/str/common/usblib/inc/usb_int.h (rev 0)
+++ trunk/firmware/arm/str/common/usblib/inc/usb_int.h 2008-02-17 16:44:13 UTC (rev 852)
@@ -0,0 +1,32 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_int.h
+* Author : MCD Application Team
+* Date First Issued : 10/27/2003 : V1.0
+* Description : Endpoint CTR (Low and High) interrupt's service routines
+* prototypes
+********************************************************************************
+* History:
+* 09/18/2006 : V3.0
+* 09/01/2006 : V2.0
+* 10/27/2003 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_INT_H
+#define __USB_INT_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void CTR_LP(void);
+void CTR_HP(void);
+/* External variables --------------------------------------------------------*/
+#endif /* __USB_INT_H */
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/common/usblib/inc/usb_lib.h
===================================================================
--- trunk/firmware/arm/str/common/usblib/inc/usb_lib.h (rev 0)
+++ trunk/firmware/arm/str/common/usblib/inc/usb_lib.h 2008-02-17 16:44:13 UTC (rev 852)
@@ -0,0 +1,38 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_lib.h
+* Author : MCD Application Team
+* Date First Issued : 10/27/2003 : V1.0
+* Description : USB library include files
+********************************************************************************
+* History:
+* 09/18/2006 : V3.0
+* 09/01/2006 : V2.0
+* 10/27/2003 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_LIB_H
+#define __USB_LIB_H
+/* Includes ------------------------------------------------------------------*/
+#include "usb_type.h"
+#include "usb_regs.h"
+#include "usb_def.h"
+#include "usb_core.h"
+#include "usb_init.h"
+#include "usb_mem.h"
+#include "usb_int.h"
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+/* External variables --------------------------------------------------------*/
+#endif /* __USB_LIB_H */
+
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/common/usblib/inc/usb_mem.h
===================================================================
--- trunk/firmware/arm/str/common/usblib/inc/usb_mem.h (rev 0)
+++ trunk/firmware/arm/str/common/usblib/inc/usb_mem.h 2008-02-17 16:44:13 UTC (rev 852)
@@ -0,0 +1,35 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_mem.h
+* Author : MCD Application Team
+* Date First Issued : 10/27/2003 : V1.0
+* Description : Utility prototypes functions for memory/PMA transfers
+********************************************************************************
+* History:
+* 09/18/2006 : V3.0
+* 09/01/2006 : V2.0
+* 10/27/2003 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_MEM_H
+#define __USB_MEM_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+void UserToPMABufferCopy(u8 *pbUsrBuf,u16 wPMABufAddr, u16 wNBytes);
+void PMAToUserBufferCopy(u8 *pbUsrBuf,u16 wPMABufAddr, u16 wNBytes);
+/* External variables --------------------------------------------------------*/
+
+#endif /*__USB_MEM_H*/
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
+
Added: trunk/firmware/arm/str/common/usblib/inc/usb_regs.h
===================================================================
--- trunk/firmware/arm/str/common/usblib/inc/usb_regs.h (rev 0)
+++ trunk/firmware/arm/str/common/usblib/inc/usb_regs.h 2008-02-17 16:44:13 UTC (rev 852)
@@ -0,0 +1,724 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_regs.h
+* Author : MCD Application Team
+* Date First Issued : 10/27/2003 : V1.0
+* Description : Interface prototype functions to USB cell registers
+********************************************************************************
+* History:
+* 09/18/2006 : V3.0
+* 09/01/2006 : V2.0
+* 10/27/2003 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_REGS_H
+#define __USB_REGS_H
+/* Includes ------------------------------------------------------------------*/
+/* Exported types ------------------------------------------------------------*/
+
+typedef enum _EP_DBUF_DIR{ /* double buffered endpoint direction */
+ EP_DBUF_ERR,
+ EP_DBUF_OUT,
+ EP_DBUF_IN
+}EP_DBUF_DIR;
+
+/* endpoint buffer number */
+enum EP_BUF_NUM{
+ EP_NOBUF,
+ EP_BUF0,
+ EP_BUF1
+};
+
+/* Exported constants --------------------------------------------------------*/
+#ifdef STR7xx
+
+ #ifdef STR71x /*STR71x family*/
+ #define RegBase (0xC0008800L) /* USB_IP Peripheral Registers base address */
+ #define PMAAddr (0xC0008000L) /* USB_IP Packet Memory Area base address */
+ #endif /*end of STR71x family*/
+
+ #ifdef STR75x /*STR75x family*/
+ #define RegBase (0xFFFFA800L) /* USB_IP Peripheral Registers base address */
+ #define PMAAddr (0xFFFFA000L) /* USB_IP Packet Memory Area base address */
+ #endif /*end of STR75x family*/
+
+#endif /*end of STR7xx family*/
+
+#ifdef STR91x /*STR91x family*/
+
+ #ifdef STR91x_USB_BUFFERED
+ #define RegBase (0x60000800L) /* USB_IP Peripheral Registers base address */
+ #define PMAAddr (0x60000000L) /* USB_IP Packet Memory Area base address */
+ #endif
+
+ #ifdef STR91x_USB_NON_BUFFERED
+ #define RegBase (0x70000800L) /* USB_IP Peripheral Registers base address */
+ #define PMAAddr (0x70000000L) /* USB_IP Packet Memory Area base address */
+ #endif
+#endif
+
+/* General registers */
+#define CNTR ((volatile unsigned *)(RegBase + 0x40)) /* Control register */
+#define ISTR ((volatile unsigned *)(RegBase + 0x44)) /* Interrupt status register */
+#define FNR ((volatile unsigned *)(RegBase + 0x48)) /* Frame number register */
+#define DADDR ((volatile unsigned *)(RegBase + 0x4C)) /* Device address register */
+#define BTABLE ((volatile unsigned *)(RegBase + 0x50)) /* Buffer Table address register */
+
+#ifdef STR91x /*STR91x family DMA registers*/
+
+#define DMACR1 ((volatile unsigned *)(RegBase + 0x54)) /* DMA control register 1 */
+#define DMACR2 ((volatile unsigned *)(RegBase + 0x58)) /* DMA control register 2 */
+#define DMACR3 ((volatile unsigned *)(RegBase + 0x5C)) /* DMA control register 3 */
+#define DMABSIZE ((volatile unsigned *)(RegBase + 0x60))/* DMA burst size register */
+#define DMALLI ((volatile unsigned *)(RegBase + 0x64)) /* DMA LLI register */
+
+#endif
+
+/* Endpoint registers */
+#define EP0REG ((volatile unsigned *)(RegBase)) /* endpoint 0 register address */
+/* endpoints enumeration */
+#define ENDP0 ((u8)0)
+#define ENDP1 ((u8)1)
+#define ENDP2 ((u8)2)
+#define ENDP3 ((u8)3)
+#define ENDP4 ((u8)4)
+#define ENDP5 ((u8)5)
+#define ENDP6 ((u8)6)
+#define ENDP7 ((u8)7) /* Only 8 endpoints for STR75x Family */
+#define ENDP8 ((u8)8)
+#define ENDP9 ((u8)9) /* Only 10 endpoints for STR91x Family */
+#define ENDP10 ((u8)10)
+#define ENDP11 ((u8)11)
+#define ENDP12 ((u8)12)
+#define ENDP13 ((u8)13)
+#define ENDP14 ((u8)14)
+#define ENDP15 ((u8)15)
+
+/*******************************************************************************/
+/* ISTR interrupt events */
+/*******************************************************************************/
+#define ISTR_CTR (0x8000) /* Correct TRansfer (clear-only bit) */
+#define ISTR_DOVR (0x4000) /* DMA OVeR/underrun (clear-only bit) */
+#define ISTR_ERR (0x2000) /* ERRor (clear-only bit) */
+#define ISTR_WKUP (0x1000) /* WaKe UP (clear-only bit) */
+#define ISTR_SUSP (0x0800) /* SUSPend (clear-only bit) */
+#define ISTR_RESET (0x0400) /* RESET (clear-only bit) */
+#define ISTR_SOF (0x0200) /* Start Of Frame (clear-only bit) */
+#define ISTR_ESOF (0x0100) /* Expected Start Of Frame (clear-only bit) */
+
+#ifdef STR91x /*STR91x family*/
+#define ISTR_SZDPR (0x0080) /* Short or Zero-Length Received Data Packet */
+#endif
+
+#define ISTR_DIR (0x0010) /* DIRection of transaction (read-only bit) */
+#define ISTR_EP_ID (0x000F) /* EndPoint IDentifier (read-only bit) */
+
+#define CLR_CTR (~ISTR_CTR) /* clear Correct TRansfer bit */
+#define CLR_DOVR (~ISTR_DOVR) /* clear DMA OVeR/underrun bit*/
+#define CLR_ERR (~ISTR_ERR) /* clear ERRor bit */
+#define CLR_WKUP (~ISTR_WKUP) /* clear WaKe UP bit */
+#define CLR_SUSP (~ISTR_SUSP) /* clear SUSPend bit */
+#define CLR_RESET (~ISTR_RESET) /* clear RESET bit */
+#define CLR_SOF (~ISTR_SOF) /* clear Start Of Frame bit */
+#define CLR_ESOF (~ISTR_ESOF) /* clear Expected Start Of Frame bit */
+
+#ifdef STR91x /*STR91x family*/
+#define CLR_SZDPR (~ISTR_SZDPR)/* clear SZDPR bit */
+#endif
+
+/*******************************************************************************/
+/* CNTR control register bits definitions */
+/*******************************************************************************/
+#define CNTR_CTRM (0x8000) /* Correct TRansfer Mask */
+#define CNTR_DOVRM (0x4000) /* DMA OVeR/underrun Mask */
+#define CNTR_ERRM (0x2000) /* ERRor Mask */
+#define CNTR_WKUPM (0x1000) /* WaKe UP Mask */
+#define CNTR_SUSPM (0x0800) /* SUSPend Mask */
+#define CNTR_RESETM (0x0400) /* RESET Mask */
+#define CNTR_SOFM (0x0200) /* Start Of Frame Mask */
+#define CNTR_ESOFM (0x0100) /* Expected Start Of Frame Mask */
+
+#ifdef STR91x /*STR91x family*/
+#define CNTR_SZDPRM (0x0080) /* Short or Zero-Length Received Data Packet Mask*/
+#endif
+
+#define CNTR_RESUME (0x0010) /* RESUME request */
+#define CNTR_FSUSP (0x0008) /* Force SUSPend */
+#define CNTR_LPMODE (0x0004) /* Low-power MODE */
+#define CNTR_PDWN (0x0002) /* Power DoWN */
+#define CNTR_FRES (0x0001) /* Force USB RESet */
+
+/*******************************************************************************/
+/* FNR Frame Number Register bit definitions */
+/*******************************************************************************/
+#define FNR_RXDP (0x8000) /* status of D+ data line */
+#define FNR_RXDM (0x4000) /* status of D- data line */
+#define FNR_LCK (0x2000) /* LoCKed */
+#define FNR_LSOF (0x1800) /* Lost SOF */
+#define FNR_FN (0x07FF) /* Frame Number */
+/*******************************************************************************/
+/* DADDR Device ADDRess bit definitions */
+/*******************************************************************************/
+#define DADDR_EF (0x80)
+#define DADDR_ADD (0x7F)
+/*===============================================================================*/
+/* Endpoint register */
+/*===============================================================================*/
+/* bit positions */
+#define EP_CTR_RX (0x8000) /* EndPoint Correct TRansfer RX */
+#define EP_DTOG_RX (0x4000) /* EndPoint Data TOGGLE RX */
+#define EPRX_STAT (0x3000) /* EndPoint RX STATus bit field */
+#define EP_SETUP (0x0800) /* EndPoint SETUP */
+#define EP_T_FIELD (0x0600) /* EndPoint TYPE */
+#define EP_KIND (0x0100) /* EndPoint KIND */
+#define EP_CTR_TX (0x0080) /* EndPoint Correct TRansfer TX */
+#define EP_DTOG_TX (0x0040) /* EndPoint Data TOGGLE TX */
+#define EPTX_STAT (0x0030) /* EndPoint TX STATus bit field */
+#define EPADDR_FIELD (0x000F) /* EndPoint ADDRess FIELD */
+
+/* EndPoint REGister MASK (no toggle fields) */
+#define EPREG_MASK (EP_CTR_RX|EP_SETUP|EP_T_FIELD|EP_KIND|EP_CTR_TX|EPADDR_FIELD)
+
+/* EP_TYPE[1:0] EndPoint TYPE */
+#define EP_TYPE_MASK (0x0600) /* EndPoint TYPE Mask */
+#define EP_BULK (0x0000) /* EndPoint BULK */
+#define EP_CONTROL (0x0200) /* EndPoint CONTROL */
+#define EP_ISOCHRONOUS (0x0400) /* EndPoint ISOCHRONOUS */
+#define EP_INTERRUPT (0x0600) /* EndPoint INTERRUPT */
+#define EP_T_MASK (~EP_T_FIELD & EPREG_MASK)
+
+
+/* EP_KIND EndPoint KIND */
+#define EPKIND_MASK (~EP_KIND & EPREG_MASK)
+
+/* STAT_TX[1:0] STATus for TX transfer */
+#define EP_TX_DIS (0x0000) /* EndPoint TX DISabled */
+#define EP_TX_STALL (0x0010) /* EndPoint TX STALLed */
+#define EP_TX_NAK (0x0020) /* EndPoint TX NAKed */
+#define EP_TX_VALID (0x0030) /* EndPoint TX VALID */
+#define EPTX_DTOG1 (0x0010) /* EndPoint TX Data TOGgle bit1 */
+#define EPTX_DTOG2 (0x0020) /* EndPoint TX Data TOGgle bit2 */
+#define EPTX_DTOGMASK (EPTX_STAT|EPREG_MASK)
+
+/* STAT_RX[1:0] STATus for RX transfer */
+#define EP_RX_DIS (0x0000) /* EndPoint RX DISabled */
+#define EP_RX_STALL (0x1000) /* EndPoint RX STALLed */
+#define EP_RX_NAK (0x2000) /* EndPoint RX NAKed */
+#define EP_RX_VALID (0x3000) /* EndPoint RX VALID */
+#define EPRX_DTOG1 (0x1000) /* EndPoint RX Data TOGgle bit1 */
+#define EPRX_DTOG2 (0x2000) /* EndPoint RX Data TOGgle bit1 */
+#define EPRX_DTOGMASK (EPRX_STAT|EPREG_MASK)
+
+/* Exported macro ------------------------------------------------------------*/
+/*----------------------------------------------------------------*/
+/* SetCNTR */
+/*----------------------------------------------------------------*/
+#define _SetCNTR(wRegValue) (*CNTR = (u16)wRegValue)
+/*----------------------------------------------------------------*/
+/* SetISTR */
+/*----------------------------------------------------------------*/
+#define _SetISTR(wRegValue) (*ISTR = (u16)wRegValue)
+/*----------------------------------------------------------------*/
+/* SetDADDR */
+/*----------------------------------------------------------------*/
+#define _SetDADDR(wRegValue) (*DADDR = (u16)wRegValue)
+/*----------------------------------------------------------------*/
+/* SetBTABLE */
+/*----------------------------------------------------------------*/
+#define _SetBTABLE(wRegValue)(*BTABLE = (u16)(wRegValue & 0xFFF8))
+/*----------------------------------------------------------------*/
+/* GetCNTR */
+/*----------------------------------------------------------------*/
+#define _GetCNTR() ((u16) *CNTR)
+/*----------------------------------------------------------------*/
+/* GetISTR */
+/*----------------------------------------------------------------*/
+#define _GetISTR() ((u16) *ISTR)
+/*----------------------------------------------------------------*/
+/* GetFNR */
+/*----------------------------------------------------------------*/
+#define _GetFNR() ((u16) *FNR)
+/*----------------------------------------------------------------*/
+/* GetDADDR */
+/*----------------------------------------------------------------*/
+#define _GetDADDR() ((u16) *DADDR)
+/*----------------------------------------------------------------*/
+/* GetBTABLE */
+/*----------------------------------------------------------------*/
+#define _GetBTABLE() ((u16) *BTABLE)
+/*----------------------------------------------------------------*/
+/* SetENDPOINT */
+/*----------------------------------------------------------------*/
+#define _SetENDPOINT(bEpNum,wRegValue) (*(EP0REG + bEpNum)= \
+ (u16)wRegValue)
+/*----------------------------------------------------------------*/
+/* GetENDPOINT */
+/*----------------------------------------------------------------*/
+#define _GetENDPOINT(bEpNum) ((u16)(*(EP0REG + bEpNum)))
+/*----------------------------------------------------------------*/
+/* SetEPType */
+/* sets the type in the endpoint register(bits EP_TYPE[1:0]) */
+/* IN : bEpNum = endpoint number */
+/* wType = type definition */
+/* OUT: none */
+/*----------------------------------------------------------------*/
+#define _SetEPType(bEpNum,wType) (_SetENDPOINT(bEpNum,\
+ ((_GetENDPOINT(bEpNum) & EP_T_MASK) | wType)))
+/*----------------------------------------------------------------*/
+/* GetEPType */
+/* gets the type in the endpoint register(bits EP_TYPE[1:0]) */
+/* IN : bEpNum = endpoint number */
+/* OUT: type definition */
+/*----------------------------------------------------------------*/
+#define _GetEPType(bEpNum) (_GetENDPOINT(bEpNum) & EP_T_FIELD)
+/*----------------------------------------------------------------*/
+/* SetEPTxStatus */
+/* sets the status for tx transfer (bits STAT_TX[1:0]) */
+/* IN : bEpNum = endpoint number */
+/* wState = new state */
+/* OUT: none */
+/*----------------------------------------------------------------*/
+#define _SetEPTxStatus(bEpNum,wState) {\
+ register u16 _wRegVal; \
+ _wRegVal = _GetENDPOINT(bEpNum) & EPTX_DTOGMASK;\
+ /* toggle first bit ? */ \
+ if((EPTX_DTOG1 & wState)!= 0) \
+ _wRegVal ^= EPTX_DTOG1; \
+ /* toggle second bit ? */ \
+ if((EPTX_DTOG2 & wState)!= 0) \
+ _wRegVal ^= EPTX_DTOG2; \
+ _SetENDPOINT(bEpNum, _wRegVal); \
+} /* _SetEPTxStatus */
+
+/*----------------------------------------------------------------*/
+/* SetEPRxStatus */
+/* sets the status for rx transfer (bits STAT_TX[1:0]) */
+/* IN : bEpNum = endpoint number */
+/* wState = new state */
+/* OUT: none */
+/*----------------------------------------------------------------*/
+#define _SetEPRxStatus(bEpNum,wState) {\
+ register u16 _wRegVal; \
+ \
+ _wRegVal = _GetENDPOINT(bEpNum) & EPRX_DTOGMASK;\
+ /* toggle first bit ? */ \
+ if((EPRX_DTOG1 & wState)!= 0) \
+ _wRegVal ^= EPRX_DTOG1; \
+ /* toggle second bit ? */ \
+ if((EPRX_DTOG2 & wState)!= 0) \
+ _wRegVal ^= EPRX_DTOG2; \
+ _SetENDPOINT(bEpNum, _wRegVal); \
+} /* _SetEPRxStatus */
+/*----------------------------------------------------------------*/
+/* GetEPTxStatus / GetEPRxStatus */
+/* gets the status for tx/rx transfer (bits STAT_TX[1:0]/STAT_RX[1:0]) */
+/* IN : bEpNum = endpoint number */
+/* OUT: u16 status */
+/*----------------------------------------------------------------*/
+#define _GetEPTxStatus(bEpNum) ((u16)_GetENDPOINT(bEpNum) & EPTX_STAT)
+#define _GetEPRxStatus(bEpNum) ((u16)_GetENDPOINT(bEpNum) & EPRX_STAT)
+/*----------------------------------------------------------------*/
+/* SetEPTxValid / SetEPRxValid */
+/* sets directly the VALID tx/rx-status into the enpoint register */
+/* IN : bEpNum = endpoint number */
+/* OUT: none */
+/*----------------------------------------------------------------*/
+#define _SetEPTxValid(bEpNum) (_SetEPTxStatus(bEpNum, EP_TX_VALID))
+#define _SetEPRxValid(bEpNum) (_SetEPRxStatus(bEpNum, EP_RX_VALID))
+/*----------------------------------------------------------------*/
+/* GetTxStallStatus / GetRxStallStatus */
+/* checks stall condition in an endpoint */
+/* IN : bEpNum = endpoint number */
+/* OUT: TRUE = endpoint in stall condition */
+/*----------------------------------------------------------------*/
+#define _GetTxStallStatus(bEpNum) (_GetEPTxStatus(bEpNum) \
+ == EP_TX_STALL)
+#define _GetRxStallStatus(bEpNum) (_GetEPRxStatus(bEpNum) \
+ == EP_RX_STALL)
+/*----------------------------------------------------------------*/
+/* SetEP_KIND / ClearEP_KIND */
+/* IN : bEpNum = endpoint number */
+/* OUT: none */
+/*----------------------------------------------------------------*/
+#define _SetEP_KIND(bEpNum) (_SetENDPOINT(bEpNum, \
+ (_GetENDPOINT(bEpNum) | EP_KIND) & EPREG_MASK))
+#define _ClearEP_KIND(bEpNum) (_SetENDPOINT(bEpNum, \
+ (_GetENDPOINT(bEpNum) & EPKIND_MASK)))
+/*----------------------------------------------------------------*/
+/* Set_Status_Out / Clear_Status_Out */
+/* sets/clears directly STATUS_OUT bit in the endpoint register */
+/* to be used only during control transfers */
+/* IN : bEpNum = endpoint number */
+/* OUT: none */
+/*----------------------------------------------------------------*/
+#define _Set_Status_Out(bEpNum) _SetEP_KIND(bEpNum)
+#define _Clear_Status_Out(bEpNum) _ClearEP_KIND(bEpNum)
+/*----------------------------------------------------------------*/
+/* SetEPDoubleBuff / ClearEPDoubleBuff */
+/* sets/clears directly EP_KIND bit in the endpoint register */
+/* IN : bEpNum = endpoint number */
+/* OUT: none */
+/*----------------------------------------------------------------*/
+#define _SetEPDoubleBuff(bEpNum) _SetEP_KIND(bEpNum)
+#define _ClearEPDoubleBuff(bEpNum) _ClearEP_KIND(bEpNum)
+/*----------------------------------------------------------------*/
+/* ClearEP_CTR_RX / ClearEP_CTR_TX */
+/* clears bit CTR_RX / CTR_TX in the endpoint register */
+/* IN : bEpNum = endpoint number */
+/* OUT: none */
+/*----------------------------------------------------------------*/
+#define _ClearEP_CTR_RX(bEpNum) (_SetENDPOINT(bEpNum,\
+ _GetENDPOINT(bEpNum) & 0x7FFF & EPREG_MASK))
+#define _ClearEP_CTR_TX(bEpNum) (_SetENDPOINT(bEpNum,\
+ _GetENDPOINT(bEpNum) & 0xFF7F & EPREG_MASK))
+/*----------------------------------------------------------------*/
+/* ToggleDTOG_RX / ToggleDTOG_TX */
+/* toggles DTOG_RX / DTOG_TX bit in the endpoint register */
+/* IN : bEpNum = endpoint number */
+/* OUT: none */
+/*----------------------------------------------------------------*/
+#define _ToggleDTOG_RX(bEpNum) (_SetENDPOINT(bEpNum, \
+ EP_DTOG_RX | _GetENDPOINT(bEpNum) & EPREG_MASK))
+#define _ToggleDTOG_TX(bEpNum) (_SetENDPOINT(bEpNum, \
+ EP_DTOG_TX | _GetENDPOINT(bEpNum) & EPREG_MASK))
+/*----------------------------------------------------------------*/
+/* ClearDTOG_RX / ClearDTOG_TX */
+/* IN : bEpNum = endpoint number */
+/* OUT: none */
+/*----------------------------------------------------------------*/
+#define _ClearDTOG_RX(bEpNum) if((_GetENDPOINT(bEpNum) & EP_DTOG_RX) != 0)\
+ _ToggleDTOG_RX(bEpNum)
+#define _ClearDTOG_TX(bEpNum) if((_GetENDPOINT(bEpNum) & EP_DTOG_TX) != 0)\
+ _ToggleDTOG_TX(bEpNum)
+/*----------------------------------------------------------------*/
+/* SetEPAddress */
+/* sets address in an endpoint register */
+/* IN : bEpNum = endpoint number */
+/* bAddr = address */
+/* OUT: none */
+/*----------------------------------------------------------------*/
+
+#define _SetEPAddress(bEpNum,bAddr) _SetENDPOINT(bEpNum,\
+ _GetENDPOINT(bEpNum) & EPREG_MASK | bAddr)
+/*----------------------------------------------------------------*/
+/* GetEPAddress */
+/* IN : bEpNum = endpoint number */
+/* OUT: none */
+/*----------------------------------------------------------------*/
+#define _GetEPAddress(bEpNum) ((u8)(_GetENDPOINT(bEpNum) & EPADDR_FIELD))
+/*----------------------------------------------------------------*/
+#ifdef STR7xx /*STR7xx family*/
+#define _pEPTxAddr(bEpNum) ((u32 *)((_GetBTABLE()+bEpNum*8 )*2 + PMAAddr))
+#define _pEPTxCount(bEpNum) ((u32 *)((_GetBTABLE()+bEpNum*8+2)*2 + PMAAddr))
+#define _pEPRxAddr(bEpNum) ((u32 *)((_GetBTABLE()+bEpNum*8+4)*2 + PMAAddr))
+#define _pEPRxCount(bEpNum) ((u32 *)((_GetBTABLE()+bEpNum*8+6)*2 + PMAAddr))
+#endif
+
+#ifdef STR91x /*STR91x family*/
+/* Pointers on endpoint(bEpNum) Count & Addr registers on PMA */
+#define _pEPBufCount(bEpNum) ((u32 *)(_GetBTABLE()+bEpNum*8 + 4 + PMAAddr))
+#define _pEPBufAddr(bEpNum) ((u32 *)(_GetBTABLE()+bEpNum*8 + PMAAddr))
+#endif
+/*----------------------------------------------------------------*/
+/* SetEPTxAddr / SetEPRxAddr */
+/* sets address of the tx/rx buffer */
+/* IN : bEpNum = endpoint number */
+/* wAddr = address to be set ( must be word aligned ) */
+/* OUT: none */
+/*----------------------------------------------------------------*/
+
+#ifdef STR7xx /*STR7xx family*/
+#define _SetEPTxAddr(bEpNum,wAddr) (*_pEPTxAddr(bEpNum) = ((wAddr >> 1) << 1))
+#define _SetEPRxAddr(bEpNum,wAddr) (*_pEPRxAddr(bEpNum) = ((wAddr >> 1) << 1))
+#endif
+
+#ifdef STR91x /*STR91x family*/
+#define _SetEPTxAddr(bEpNum , wAddr) {\
+ *_pEPBufAddr(bEpNum) &=0xFFFF0000; \
+ *_pEPBufAddr(bEpNum) |=((wAddr)&0x0FFFC);\
+ }
+#define _SetEPRxAddr(bEpNum, wAddr) {\
+ *_pEPBufAddr(bEpNum) &=0x0000FFFF;\
+ *_pEPBufAddr(bEpNum) |=((wAddr<<16)&0xFFFC0000);\
+}
+#endif
+
+/*----------------------------------------------------------------*/
+/* GetEPTxAddr / GetEPRxAddr */
+/* gets address of the tx/rx buffer */
+/* IN : bEpNum = endpoint number */
+/* IN : */
+/* OUT: address of the buffer */
+/*----------------------------------------------------------------*/
+
+#ifdef STR7xx /*STR7xx family*/
+#define _GetEPTxAddr(bEpNum) ((u16)*_pEPTxAddr(bEpNum))
+#define _GetEPRxAddr(bEpNum) ((u16)*_pEPRxAddr(bEpNum))
+#endif
+
+#ifdef STR91x /*STR91x family*/
+#define _GetEPTxAddr(bEpNum) ((u16)(*_pEPBufAddr(bEpNum) &0x0000FFFF))
+#define _GetEPRxAddr(bEpNum) ((u16)((*_pEPBufAddr(bEpNum)&0xFFFF0000)>>16))
+#endif
+/*----------------------------------------------------------------*/
+/* SetEPCountRxReg */
+/* sets counter of rx buffer with no. of blocks */
+/* IN : pdwReg = pointer to counter */
+/* wCount = counter */
+/* OUT: none */
+/*----------------------------------------------------------------*/
+
+#ifdef STR7xx /*STR7xx family*/
+#define _BlocksOf32(dwReg,wCount,wNBlocks) {\
+ wNBlocks = wCount >> 5;\
+ if((wCount & 0x1f) == 0)\
+ wNBlocks--;\
+ *pdwReg = (u32)((wNBlocks << 10) | 0x8000);\
+}/* _BlocksOf32 */
+
+#define _BlocksOf2(dwReg,wCount,wNBlocks) {\
+ wNBlocks = wCount >> 1;\
+ if((wCount & 0x1) != 0)\
+ wNBlocks++;\
+ *pdwReg = (u32)(wNBlocks << 10);\
+}/* _BlocksOf2 */
+
+#define _SetEPCountRxReg(dwReg,wCount) {\
+ u16 wNBlocks;\
+ if(wCount > 62){_BlocksOf32(dwReg,wCount,wNBlocks);}\
+ else {_BlocksOf2(dwReg,wCount,wNBlocks);}\
+}/* _SetEPCountRxReg */
+
+
+
+#define _SetEPRxDblBuf0Count(bEpNum,wCount) {\
+ u32 *pdwReg = _pEPTxCount(bEpNum); \
+ _SetEPCountRxReg(pdwReg, wCount);\
+}
+#endif
+/*----------------------------------------------------------------*/
+/* SetEPTxCount / SetEPRxCount */
+/* sets counter for the tx/rx buffer */
+/* IN : bEpNum = endpoint number */
+/* wCount = counter value */
+/* OUT: none */
+/*----------------------------------------------------------------*/
+
+#ifdef STR7xx /*STR7xx family*/
+#define _SetEPTxCount(bEpNum,wCount) (*_pEPTxCount(bEpNum) = wCount)
+#define _SetEPRxCount(bEpNum,wCount) {\
+ u32 *pdwReg = _pEPRxCount(bEpNum); \
+ _SetEPCountRxReg(pdwReg, wCount);\
+}
+#endif
+
+#ifdef STR91x /*STR91x family*/
+#define _SetEPTxCount(bEpNum,wCount) {\
+ *_pEPBufCount(bEpNum) &=0xFFFFFC00;\
+ *_pEPBufCount(bEpNum) |=wCount;\
+}
+
+#define _SetEPRxCount(bEpNum,wCount) {\
+u32 BLsize=0;\
+u32 Blocks;\
+if (wCount < 64) Blocks = wCount>>1;\
+else\
+{\
+ BLsize = 0x80000000;\
+ Blocks = wCount>>6;\
+}\
+*_pEPBufCount(bEpNum) &=~0x80000000;\
+*_pEPBufCount(bEpNum) |=BLsize;\
+*_pEPBufCount(bEpNum) &=0x83FFFFFF;\
+*_pEPBufCount(bEpNum) |=Blocks<<26;\
+*_pEPBufCount(bEpNum) &=0xFC00FFFF;\
+}
+#endif
+/*----------------------------------------------------------------*/
+/* GetEPTxCount / GetEPRxCount */
+/* gets counter of the tx buffer */
+/* IN : bEpNum = endpoint number */
+/* OUT: counter value */
+/*----------------------------------------------------------------*/
+#ifdef STR7xx /*STR7xx family*/
+#define _GetEPTxCount(bEpNum)((u16)(*_pEPTxCount(bEpNum)) & 0x3ff)
+#define _GetEPRxCount(bEpNum)((u16)(*_pEPRxCount(bEpNum)) & 0x3ff)
+#endif
+
+#ifdef STR91x /*STR91x family*/
+#define _GetEPTxCount(bEpNum) (u16)(*_pEPBufCount(bEpNum)&0x3FF)
+#define _GetEPRxCount(bEpNum) (u16)((*_pEPBufCount(bEpNum)&0x3FF0000)>>16)
+#endif
+/*----------------------------------------------------------------*/
+/* SetEPDblBuf0Addr / SetEPDblBuf1Addr */
+/* sets buffer 0/1 address in a double buffer endpoint */
+/* IN : bEpNum = endpoint number */
+/* wBuf0Addr = buffer 0 address */
+/* OUT: none */
+/*----------------------------------------------------------------*/
+#define _SetEPDblBuf0Addr(bEpNum,wBuf0Addr) {_SetEPTxAddr(bEpNum, wBuf0Addr);}
+#define _SetEPDblBuf1Addr(bEpNum,wBuf1Addr) {_SetEPRxAddr(bEpNum, wBuf1Addr);}
+
+/*----------------------------------------------------------------*/
+/* SetEPDblBuffAddr */
+/* sets addresses in a double buffer endpoint */
+/* IN : bEpNum = endpoint number */
+/* wBuf0Addr = buffer 0 address */
+/* wBuf1Addr = buffer 1 address */
+/* OUT: none */
+/*----------------------------------------------------------------*/
+#define _SetEPDblBuffAddr(bEpNum,wBuf0Addr,wBuf1Addr) { \
+ _SetEPDblBuf0Addr(bEpNum, wBuf0Addr);\
+ _SetEPDblBuf1Addr(bEpNum, wBuf1Addr);\
+} /* _SetEPDblBuffAddr */
+/*----------------------------------------------------------------*/
+/* GetEPDblBuf0Addr / GetEPDblBuf1Addr */
+/* gets buffer 0/1 address of a double buffer endpoint */
+/* IN : bEpNum = endpoint number */
+/* OUT: none */
+/*----------------------------------------------------------------*/
+#define _GetEPDblBuf0Addr(bEpNum) (_GetEPTxAddr(bEpNum))
+#define _GetEPDblBuf1Addr(bEpNum) (_GetEPRxAddr(bEpNum))
+/*----------------------------------------------------------------*/
+/* SetEPDblBuffCount / SetEPDblBuf0Count / SetEPDblBuf1Count */
+/* sets both buffers or buff0 or buff1 counter for double buffering */
+/* IN : bEpNum = endpoint number */
+/* bDir = endpoint dir EP_DBUF_OUT = OUT */
+/* EP_DBUF_IN = IN */
+/* wCount = counter value */
+/* OUT: none */
+/*----------------------------------------------------------------*/
+
+#ifdef STR7xx /*STR7xx family*/
+
+#define _SetEPDblBuf0Count(bEpNum, bDir, wCount) { \
+ if(bDir == EP_DBUF_OUT)\
+ /* OUT endpoint */ \
+ {_SetEPRxDblBuf0Count(bEpNum,wCount);} \
+ else if(bDir == EP_DBUF_IN)\
+ /* IN endpoint */ \
+ *_pEPTxCount(bEpNum) = (u32)wCount; \
+} /* SetEPDblBuf0Count*/
+
+#define _SetEPDblBuf1Count(bEpNum, bDir, wCount) { \
+ if(bDir == EP_DBUF_OUT)\
+ /* OUT endpoint */ \
+ {_SetEPRxCount(bEpNum,wCount);}\
+ else if(bDir == EP_DBUF_IN)\
+ /* IN endpoint */\
+ *_pEPRxCount(bEpNum) = (u32)wCount; \
+} /* SetEPDblBuf1Count */
+
+#define _SetEPDblBuffCount(bEpNum, bDir, wCount) {\
+ _SetEPDblBuf0Count(bEpNum, bDir, wCount); \
+ _SetEPDblBuf1Count(bEpNum, bDir, wCount); \
+} /* _SetEPDblBuffCount */
+#endif
+/*----------------------------------------------------------------*/
+/* GetEPDblBuf0Count / GetEPDblBuf1Count */
+/* gets buffer 0/1 rx/tx counter for double buffering */
+/* IN : bEpNum = endpoint number */
+/* OUT: none */
+/*----------------------------------------------------------------*/
+#define _GetEPDblBuf0Count(bEpNum) (_GetEPTxCount(bEpNum))
+#define _GetEPDblBuf1Count(bEpNum) (_GetEPRxCount(bEpNum))
+
+
+/* External variables --------------------------------------------------------*/
+extern volatile u16 wIstr; /* ISTR register last read value */
+
+/* Exported functions ------------------------------------------------------- */
+void SetCNTR(u16 /*wRegValue*/);
+void SetISTR(u16 /*wRegValue*/);
+void SetDADDR(u16 /*wRegValue*/);
+void SetBTABLE(u16 /*wRegValue*/);
+void SetBTABLE(u16 /*wRegValue*/);
+u16 GetCNTR(void);
+u16 GetISTR(void);
+u16 GetFNR(void);
+u16 GetDADDR(void);
+u16 GetBTABLE(void);
+void SetENDPOINT(u8 /*bEpNum*/,u16 /*wRegValue*/);
+u16 GetENDPOINT(u8 /*bEpNum*/);
+void SetEPType(u8 /*bEpNum*/,u16 /*wType*/);
+u16 GetEPType(u8 /*bEpNum*/);
+void SetEPTxStatus(u8 /*bEpNum*/,u16 /*wState*/);
+void SetEPRxStatus(u8 /*bEpNum*/,u16 /*wState*/);
+void SetDouBleBuffEPStall(u8 /*bEpNum*/,u8 bDir);
+u16 GetEPTxStatus(u8 /*bEpNum*/);
+u16 GetEPRxStatus(u8 /*bEpNum*/);
+void SetEPTxValid(u8 /*bEpNum*/);
+void SetEPRxValid(u8 /*bEpNum*/);
+u16 GetTxStallStatus(u8 /*bEpNum*/);
+u16 GetRxStallStatus(u8 /*bEpNum*/);
+void SetEP_KIND(u8 /*bEpNum*/);
+void ClearEP_KIND(u8 /*bEpNum*/);
+void Set_Status_Out(u8 /*bEpNum*/);
+void Clear_Status_Out(u8 /*bEpNum*/);
+void SetEPDoubleBuff(u8 /*bEpNum*/);
+void ClearEPDoubleBuff(u8 /*bEpNum*/);
+void ClearEP_CTR_RX(u8 /*bEpNum*/);
+void ClearEP_CTR_TX(u8 /*bEpNum*/);
+void ToggleDTOG_RX(u8 /*bEpNum*/);
+void ToggleDTOG_TX(u8 /*bEpNum*/);
+void ClearDTOG_RX(u8 /*bEpNum*/);
+void ClearDTOG_TX(u8 /*bEpNum*/);
+void SetEPAddress(u8 /*bEpNum*/,u8 /*bAddr*/);
+u8 GetEPAddress(u8 /*bEpNum*/);
+void SetEPTxAddr(u8 /*bEpNum*/,u16 /*wAddr*/);
+void SetEPRxAddr(u8 /*bEpNum*/,u16 /*wAddr*/);
+u16 GetEPTxAddr(u8 /*bEpNum*/);
+u16 GetEPRxAddr(u8 /*bEpNum*/);
+void SetEPCountRxReg(u32 * /*pdwReg*/, u16 /*wCount*/);
+void SetEPTxCount(u8 /*bEpNum*/,u16 /*wCount*/);
+void SetEPRxCount(u8 /*bEpNum*/,u16 /*wCount*/);
+u16 GetEPTxCount(u8 /*bEpNum*/);
+u16 GetEPRxCount(u8 /*bEpNum*/);
+void SetEPDblBuf0Addr(u8 /*bEpNum*/,u16 /*wBuf0Addr*/);
+void SetEPDblBuf1Addr(u8 /*bEpNum*/,u16 /*wBuf1Addr*/);
+void SetEPDblBuffAddr(u8 /*bEpNum*/,u16 /*wBuf0Addr*/,u16 /*wBuf1Addr*/);
+u16 GetEPDblBuf0Addr(u8 /*bEpNum*/);
+u16 GetEPDblBuf1Addr(u8 /*bEpNum*/);
+void SetEPDblBuffCount(u8 /*bEpNum*/, u8 /*bDir*/, u16 /*wCount*/);
+void SetEPDblBuf0Count(u8 /*bEpNum*/, u8 /*bDir*/, u16 /*wCount*/);
+void SetEPDblBuf1Count(u8 /*bEpNum*/, u8 /*bDir*/, u16 /*wCount*/);
+u16 GetEPDblBuf0Count(u8 /*bEpNum*/);
+u16 GetEPDblBuf1Count(u8 /*bEpNum*/);
+EP_DBUF_DIR GetEPDblBufDir(u8 /*bEpNum*/);
+void FreeUserBuffer(u8 bEpNum/*bEpNum*/,u8 bDir);
+u16 ToWord(u8,u8);
+u16 ByteSwap(u16);
+
+#ifdef STR91x /*STR91x family*/
+/* DMA Functions */
+void SetDMABurstTxSize(u8 /*DestBsize*/);
+void SetDMABurstRxSize(u8 /*SrcBsize*/);
+void DMAUnlinkedModeTxConfig(u8 /*bEpNum*/ ,u8 /*index*/);
+void DMAUnlinkedModeTxEnable(u8 /*index*/);
+void DMAUnlinkedModeTxDisable(u8 /*index*/);
+void DMAUnlinkedModeRxEnable(u8 /*bEpNum*/);
+void DMAUnlinkedModeRxDisable(u8 /*bEpNum*/);
+void DMALinkedModeRxConfig(u8 /*bEpNum*/);
+void DMALinkedModeTxConfig(u8 /*bEpNum*/);
+void DMALinkedModeRxEnable(void);
+void DMALinkedModeTxEnable(void);
+void DMALinkedModeRxDisable(void);
+void DMALinkedModeTxDisable(void);
+void DMASynchEnable(void);
+void DMASynchDisable(void);
+void SetDMALLITxLength(u8 /*length*/);
+void SetDMALLIRxLength(u8 /*length*/ );
+void SetDMALLIRxPacketNum(u8 /*PacketNum*/);
+u8 GetDMALLIRxPacketNum(void);
+#endif /* End of STR91x family*/
+
+#endif /* __USB_REGS_H */
+
+
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/common/usblib/inc/usb_type.h
===================================================================
--- trunk/firmware/arm/str/common/usblib/inc/usb_type.h (rev 0)
+++ trunk/firmware/arm/str/common/usblib/inc/usb_type.h 2008-02-17 16:44:13 UTC (rev 852)
@@ -0,0 +1,122 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_type.h
+* Author : MCD Application Team
+* Date First Issued : 10/27/2003 : V1.0
+* Description : Type definitions used by the STR USB Library
+********************************************************************************
+* History:
+* 09/18/2006 : V3.0
+* 09/01/2006 : V2.0
+* 10/27/2003 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __USB_TYPE_H
+#define __USB_TYPE_H
+/* Includes ------------------------------------------------------------------*/
+#include "usb_conf.h"
+/* Exported types ------------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+#ifndef NULL
+#define NULL ((void *)0)
+#endif
+
+#ifdef STR71x /*STR71x family*/
+#ifndef _71x_type_H
+typedef unsigned long u32;
+typedef unsigned short u16;
+typedef unsigned char u8;
+
+typedef signed long s32;
+typedef signed short s16;
+typedef signed char s8;
+
+typedef volatile unsigned long vu32;
+typedef volatile unsigned short vu16;
+typedef volatile unsigned char vu8;
+
+typedef volatile signed long vs32;
+typedef volatile signed short vs16;
+typedef volatile signed char vs8;
+
+typedef enum { FALSE = 0, TRUE = !FALSE } bool;
+typedef enum { RESET = 0, SET = !RESET } FlagStatus;
+typedef enum { DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
+typedef enum { INDIRECT = 0, DIRECT = !INDIRECT} RegisterAccess;
+
+#endif
+#endif /* End of STR71x family*/
+#ifdef STR91x /*STR91x family*/
+#ifndef __91x_type_H
+
+typedef long long u64;
+typedef unsigned long u32;
+typedef unsigned short u16;
+typedef unsigned char u8;
+
+typedef signed long s32;
+typedef signed short s16;
+typedef signed char s8;
+
+typedef volatile unsigned long vu32;
+typedef volatile unsigned short vu16;
+typedef volatile unsigned char vu8;
+
+typedef volatile signed long vs32;
+typedef volatile signed short vs16;
+typedef volatile signed char vs8;
+
+typedef enum { FALSE = 0, TRUE = !FALSE } bool;
+typedef enum { RESET = 0, SET = !RESET } FlagStatus, ITStatus;
+typedef enum { DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
+typedef enum { ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
+#endif
+#endif /* End of STR91x family*/
+
+#ifdef STR75x /*STR75x family*/
+#ifndef __75x_TYPE_H
+
+typedef signed long s32;
+typedef signed short s16;
+typedef signed char s8;
+
+typedef volatile signed long vs32;
+typedef volatile signed short vs16;
+typedef volatile signed char vs8;
+
+typedef unsigned long u32;
+typedef unsigned short u16;
+typedef unsigned char u8;
+
+typedef volatile unsigned long vu32;
+typedef volatile unsigned short vu16;
+typedef volatile unsigned char vu8;
+
+typedef volatile unsigned long const vuc32; /* Read Only */
+typedef volatile unsigned short const vuc16; /* Read Only */
+typedef volatile unsigned char const vuc8; /* Read Only */
+
+
+typedef enum { FALSE = 0, TRUE = !FALSE } bool;
+
+typedef enum { RESET = 0, SET = !RESET } FlagStatus, ITStatus;
+
+typedef enum { DISABLE = 0, ENABLE = !DISABLE} FunctionalState;
+
+typedef enum { ERROR = 0, SUCCESS = !ERROR} ErrorStatus;
+#endif
+#endif /* End of STR75x family*/
+
+
+/* Exported macro ------------------------------------------------------------*/
+/* Exported functions ------------------------------------------------------- */
+/* External variables --------------------------------------------------------*/
+
+#endif /* __USB_TYPE_H */
+/******************* (C) COPYRIGHT 2006 STMicroelectronics *****END OF FILE****/
Added: trunk/firmware/arm/str/common/usblib/src/usb_core.c
===================================================================
--- trunk/firmware/arm/str/common/usblib/src/usb_core.c (rev 0)
+++ trunk/firmware/arm/str/common/usblib/src/usb_core.c 2008-02-17 16:44:13 UTC (rev 852)
@@ -0,0 +1,831 @@
+/******************** (C) COPYRIGHT 2006 STMicroelectronics ********************
+* File Name : usb_core.c
+* Author : MCD Application Team
+* Date First Issued : 10/27/2003 : V1.0
+* Description : Standard protocol processing (USB v2.0)
+********************************************************************************
+* History:
+* 09/18/2006 : V3.0
+* 09/01/2006 : V2.0
+* 10/27/2003 : V1.0
+********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
+* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
+* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
+* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
+* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*******************************************************************************/
+
+/* Includes ------------...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-17 16:34:47
|
Revision: 851
http://can.svn.sourceforge.net/can/?rev=851&view=rev
Author: akhe
Date: 2008-02-17 08:34:37 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
Modified Paths:
--------------
trunk/firmware/arm/str/common/str75x_lib/src/75x_lib.c
Modified: trunk/firmware/arm/str/common/str75x_lib/src/75x_lib.c
===================================================================
--- trunk/firmware/arm/str/common/str75x_lib/src/75x_lib.c 2008-02-17 16:06:31 UTC (rev 850)
+++ trunk/firmware/arm/str/common/str75x_lib/src/75x_lib.c 2008-02-17 16:34:37 UTC (rev 851)
@@ -27,16 +27,16 @@
/* Private variables ---------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/
-#ifdef LIBDEBUG
+#ifdef DEBUG
/*******************************************************************************
-* Function Name : libdebug
+* Function Name : debug
* Description : This function initialize peripherals pointers.
* Input : None
* Output : None
* Return : None
*******************************************************************************/
-void libdebug(void)
+void debug(void)
{
/************************************* SMI ************************************/
#ifdef _SMI
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ak...@us...> - 2008-02-17 16:06:36
|
Revision: 850
http://can.svn.sourceforge.net/can/?rev=850&view=rev
Author: akhe
Date: 2008-02-17 08:06:31 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
Cleaning up
Removed Paths:
-------------
trunk/firmware/arm/str/vscp_node_str73x_gcc/Makefile
trunk/firmware/arm/str/vscp_node_str73x_gcc/Readme.txt
trunk/firmware/arm/str/vscp_node_str73x_gcc/STR73x-RAM.ld
trunk/firmware/arm/str/vscp_node_str73x_gcc/STR73x-ROM.ld
trunk/firmware/arm/str/vscp_node_str73x_gcc/main.c
trunk/firmware/arm/str/vscp_node_str73x_gcc/startup.s
trunk/firmware/arm/str/vscp_node_str73x_gcc/vector.s
trunk/firmware/arm/str/vscp_node_str73x_gcc/vectors.c
trunk/firmware/arm/str/vscp_node_str73x_gcc/vectors.h
trunk/firmware/arm/str/vscp_node_str73x_gcc/vscp_compiler.h
trunk/firmware/arm/str/vscp_node_str73x_gcc/vscp_projdefs.h
trunk/firmware/arm/str/vscp_node_str73x_gcc/vscpnode.pnproj
trunk/firmware/arm/str/vscp_node_str73x_gcc/vscpnode.pnps
Deleted: trunk/firmware/arm/str/vscp_node_str73x_gcc/Makefile
===================================================================
--- trunk/firmware/arm/str/vscp_node_str73x_gcc/Makefile 2008-02-17 16:05:40 UTC (rev 849)
+++ trunk/firmware/arm/str/vscp_node_str73x_gcc/Makefile 2008-02-17 16:06:31 UTC (rev 850)
@@ -1,495 +0,0 @@
-# Hey Emacs, this is a -*- makefile -*-
-#
-# WinARM template makefile
-# by Giacomo Fazio and Antonio Nasca, Catania, Italy
-# <gia...@gm...>
-# <ant...@ho...>
-#
-# based on the WinARM template makefile written by Martin Thomas
-# Released to the Public Domain
-# Please read the make user manual!
-#
-#
-# On command line:
-#
-# make all = Make software.
-#
-# make clean = Clean out built project files.
-#
-# make program = Download the hex file to the device
-#
-# (TODO: make filename.s = Just compile filename.c into the assembler code only)
-#
-# To rebuild project do "make clean" then "make all".
-# Toolchain prefix (i.e arm-elf -> arm-elf-gcc.exe)
-TCHAIN = arm-elf
-#TCHAIN = arm-none-eabi
-
-#USE_THUMB_MODE = YES
-USE_THUMB_MODE = NO
-
-# MCU name and submodel
-MCU = arm7tdmi
-SUBMDL = STR73x
-
-## Create ROM-Image
-RUN_MODE=ROM_RUN
-## Create RAM-Image
-#RUN_MODE=RAM_RUN
-
-## not supported in this example:
-## Exception-Vector placement only supported for "ROM_RUN"
-## (placement settings ignored when using "RAM_RUN")
-## - Exception vectors in ROM:
-#VECTOR_LOCATION=VECTORS_IN_ROM
-## - Exception vectors in RAM:
-#VECTOR_LOCATION=VECTORS_IN_RAM
-
-
-# Target file name (without extension).
-TARGET = main
-
-# List C source files here. (C dependencies are automatically generated.)
-# use file-extension c for "c-only"-files
-SRC = $(TARGET).c ../common/73x_lcd.c ../common/sysTime.c ../common/delay.c j:/common/vscp.c
-
-# List C source files here which must be compiled in ARM-Mode.
-# use file-extension c for "c-only"-files
-SRCARM = vectors.c
-# thumb is possible too for vectors.c - keep ARM, TODO: profile
-
-# List C++ source files here.
-# use file-extension cpp for C++-files (use extension .cpp)
-CPPSRC =
-
-# List C++ source files here which must be compiled in ARM-Mode.
-# use file-extension cpp for C++-files (use extension .cpp)
-#CPPSRCARM = $(TARGET).cpp
-CPPSRCARM =
-
-# List Assembler source files here.
-# Make them always end in a capital .S. Files ending in a lowercase .s
-# will not be considered source files but generated files (assembler
-# output from the compiler), and will be deleted upon "make clean"!
-# Even though the DOS/Win* filesystem matches both .s and .S the same,
-# it will preserve the spelling of the filenames, and gcc itself does
-# care about how the name is spelled on its command-line.
-ASRC =
-
-# List Assembler source files here which must be assembled in ARM-Mode..
-ASRCARM = vector.S startup.S
-
-# Path to Linker-Scripts
-LINKERSCRIPTPATH = .
-
-## Output format. (can be ihex or binary or both)
-## (binary i.e. for openocd and SAM-BA, hex i.e. for lpc21isp and uVision)
-#FORMAT = ihex
-#FORMAT = binary
-FORMAT = both
-
-# Optimization level, can be [0, 1, 2, 3, s].
-# 0 = turn off optimization. s = optimize for size.
-# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
-#OPT = s
-OPT = 0
-
-## Using the Atmel AT91_lib produces warning with
-## the default warning-levels.
-## yes - disable these warnings; no - keep default settings
-#AT91LIBNOWARN = yes
-AT91LIBNOWARN = no
-
-# Debugging format.
-# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
-# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
-#DEBUG = stabs
-DEBUG = dwarf-2
-
-# Use the setenv_vscp.bat batch file in the root of VSCP to set
-# j: to point at the firmware folder.
-
-# List any extra directories to look for include files here.
-# Each directory must be seperated by a space.
-EXTRAINCDIRS = "K:/include" ../common/str73x_lib/include j:/common
-
-# List any extra directories to look for library files here.
-# Each directory must be seperated by a space.
-#EXTRA_LIBDIRS = ../arm7_efsl_0_2_4
-EXTRA_LIBDIRS = K:/lib ../common/str73x_lib
-
-
-# Compiler flag to set the C Standard level.
-# c89 - "ANSI" C
-# gnu89 - c89 plus GCC extensions
-# c99 - ISO C99 standard (not yet fully implemented)
-# gnu99 - c99 plus GCC extensions
-CSTANDARD = -std=gnu99
-
-# Place -D or -U options for C here
-CDEFS = -D$(RUN_MODE)
-
-# Place -I options here
-CINCS =
-
-# Place -D or -U options for ASM here
-ADEFS = -D$(RUN_MODE)
-
-ifdef VECTOR_LOCATION
-CDEFS += -D$(VECTOR_LOCATION)
-ADEFS += -D$(VECTOR_LOCATION)
-endif
-
-CDEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
-ADEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
-
-# Compiler flags.
-
-ifeq ($(USE_THUMB_MODE),YES)
-THUMB = -mthumb
-THUMB_IW = -mthumb-interwork
-else
-THUMB =
-THUMB_IW =
-endif
-
-# -g*: generate debugging information
-# -O*: optimization level
-# -f...: tuning, see GCC manual and avr-libc documentation
-# -Wall...: warning level
-# -Wa,...: tell GCC to pass this to the assembler.
-# -adhlns...: create assembler listing
-#
-# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
-CFLAGS = -g$(DEBUG)
-CFLAGS += $(CDEFS) $(CINCS)
-CFLAGS += -O$(OPT)
-CFLAGS += -Wall -Wcast-align -Wimplicit
-CFLAGS += -Wpointer-arith -Wswitch
-CFLAGS += -ffunction-sections -fdata-sections
-CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused
-CFLAGS += -Wa,-adhlns=$(subst $(suffix $<),.lst,$<)
-CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
-
-# flags only for C
-CONLYFLAGS += -Wnested-externs
-CONLYFLAGS += $(CSTANDARD)
-
-ifneq ($(AT91LIBNOWARN),yes)
-#AT91-lib warnings with:
-CFLAGS += -Wcast-qual
-CONLYFLAGS += -Wmissing-prototypes
-CONLYFLAGS += -Wstrict-prototypes
-CONLYFLAGS += -Wmissing-declarations
-endif
-
-# flags only for C++ (arm-elf-g++)
-# CPPFLAGS = -fno-rtti -fno-exceptions
-CPPFLAGS =
-
-# Assembler flags.
-# -Wa,...: tell GCC to pass this to the assembler.
-# -ahlns: create listing
-# -g$(DEBUG): have the assembler create line number information
-ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG)
-
-
-#Additional libraries.
-
-# Extra libraries
-# Each library-name must be seperated by a space.
-# To add libxyz.a, libabc.a and libefsl.a:
-# EXTRA_LIBS = xyz abc efsl
-#EXTRA_LIBS = efsl
-EXTRA_LIBS = STR73x_lib
-
-#Support for newlibc-lpc (file: libnewlibc-lpc.a)
-#NEWLIBLPC = -lnewlib-lpc
-
-MATH_LIB = -lm
-
-# CPLUSPLUS_LIB = -lstdc++
-
-
-# Linker flags.
-# -Wl,...: tell GCC to pass this to linker.
-# -Map: create map file
-# --cref: add cross reference to map file
-LDFLAGS = -nostartfiles -Wl,-Map=$(TARGET).map,--cref,--gc-sections
-LDFLAGS += -lc
-LDFLAGS += $(NEWLIBLPC) $(MATH_LIB)
-LDFLAGS += -lc -lgcc
-LDFLAGS += $(CPLUSPLUS_LIB)
-LDFLAGS += $(patsubst %,-L%,$(EXTRA_LIBDIRS))
-LDFLAGS += $(patsubst %,-l%,$(EXTRA_LIBS))
-
-# Set Linker-Script Depending On Selected Memory and Controller
-ifeq ($(RUN_MODE),RAM_RUN)
-LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-RAM.ld
-else
-LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-ROM.ld
-endif
-
-
-# Define directories, if needed.
-## DIRARM = c:/WinARM/
-## DIRARMBIN = $(DIRAVR)/bin/
-## DIRAVRUTILS = $(DIRAVR)/utils/bin/
-
-# Define programs and commands.
-SHELL = sh
-CC = $(TCHAIN)-gcc
-CPP = $(TCHAIN)-g++
-AR = $(TCHAIN)-ar
-OBJCOPY = $(TCHAIN)-objcopy
-OBJDUMP = $(TCHAIN)-objdump
-SIZE = $(TCHAIN)-size
-NM = $(TCHAIN)-nm
-REMOVE = rm -f
-REMOVEDIR = rm -f -r
-COPY = cp
-
-# Define Messages
-# English
-MSG_ERRORS_NONE = Errors: none
-MSG_BEGIN = "-------- begin (mode: $(RUN_MODE)) --------"
-MSG_END = -------- end --------
-MSG_SIZE_BEFORE = Size before:
-MSG_SIZE_AFTER = Size after:
-MSG_FLASH = Creating load file for Flash:
-MSG_EXTENDED_LISTING = Creating Extended Listing:
-MSG_SYMBOL_TABLE = Creating Symbol Table:
-MSG_LINKING = Linking:
-MSG_COMPILING = Compiling C:
-MSG_COMPILING_ARM = "Compiling C (ARM-only):"
-MSG_COMPILINGCPP = Compiling C++:
-MSG_COMPILINGCPP_ARM = "Compiling C++ (ARM-only):"
-MSG_ASSEMBLING = Assembling:
-MSG_ASSEMBLING_ARM = "Assembling (ARM-only):"
-MSG_CLEANING = Cleaning project:
-MSG_FORMATERROR = Can not handle output-format
-MSG_LPC21_RESETREMINDER = You may have to bring the target in bootloader-mode now.
-
-# Define all object files.
-COBJ = $(SRC:.c=.o)
-AOBJ = $(ASRC:.S=.o)
-COBJARM = $(SRCARM:.c=.o)
-AOBJARM = $(ASRCARM:.S=.o)
-CPPOBJ = $(CPPSRC:.cpp=.o)
-CPPOBJARM = $(CPPSRCARM:.cpp=.o)
-
-# Define all listing files.
-LST = $(ASRC:.S=.lst) $(ASRCARM:.S=.lst) $(SRC:.c=.lst) $(SRCARM:.c=.lst)
-LST += $(CPPSRC:.cpp=.lst) $(CPPSRCARM:.cpp=.lst)
-
-# Compiler flags to generate dependency files.
-### GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,.dep/$(@F).d
-GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
-
-# Combine all necessary flags and optional flags.
-# Add target processor to flags.
-ALL_CFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. $(CFLAGS) $(GENDEPFLAGS)
-ALL_ASFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. -x assembler-with-cpp $(ASFLAGS)
-
-
-# Default target.
-all: begin gccversion sizebefore build sizeafter finished end
-
-ifeq ($(FORMAT),ihex)
-build: elf hex lss sym
-hex: $(TARGET).hex
-IMGEXT=hex
-else
-ifeq ($(FORMAT),binary)
-build: elf bin lss sym
-bin: $(TARGET).bin
-IMGEXT=bin
-else
-ifeq ($(FORMAT),both)
-build: elf hex bin lss sym
-hex: $(TARGET).hex
-bin: $(TARGET).bin
-else
-$(error "$(MSG_FORMATERROR) $(FORMAT)")
-endif
-endif
-endif
-
-elf: $(TARGET).elf
-lss: $(TARGET).lss
-sym: $(TARGET).sym
-
-# Eye candy.
-begin:
- @echo
- @echo $(MSG_BEGIN)
-
-finished:
- @echo $(MSG_ERRORS_NONE)
-
-end:
- @echo $(MSG_END)
- @echo
-
-
-# Display size of file.
-HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) -A $(TARGET).elf
-sizebefore:
- @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
-
-sizeafter:
- @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
-
-
-# Display compiler version information.
-gccversion :
- @$(CC) --version
-
-# FLASH Programming with OPENOCD
-
-# specify the directory where openocd executable resides (openocd-ftd2xx.exe or openocd-pp.exe)
-# Note: you may have to adjust this if a newer version of YAGARTO has been downloaded
-#OPENOCD_DIR = 'C:\Program Files\openocd-r247\bin\'
-
-# specify OpenOCD executable (pp is for the wiggler, ftd2xx is for the USB debugger)
-#OPENOCD = $(OPENOCD_DIR)openocd-pp.exe
-OPENOCD = $(OPENOCD_DIR)openocd-ftd2xx.exe
-
-# specify OpenOCD configuration file (pick the one for your device)
-OPENOCD_CFG = l:/str73x-configs/str73x_jtagkey-flash-program.cfg
-
-program:
- @echo
- @echo "Flash Programming with OpenOCD..."
- $(OPENOCD) -f $(OPENOCD_CFG)
- @echo
- @echo
- @echo "Flash Programming Finished."
-
-
-# Create final output file (.hex) from ELF output file.
-%.hex: %.elf
- @echo
- @echo $(MSG_FLASH) $@
- $(OBJCOPY) -O ihex $< $@
-
-# Create final output file (.bin) from ELF output file.
-%.bin: %.elf
- @echo
- @echo $(MSG_FLASH) $@
- $(OBJCOPY) -O binary $< $@
-
-
-# Create extended listing file from ELF output file.
-# testing: option -C
-%.lss: %.elf
- @echo
- @echo $(MSG_EXTENDED_LISTING) $@
- $(OBJDUMP) -h -S -C $< > $@
-
-
-# Create a symbol table from ELF output file.
-%.sym: %.elf
- @echo
- @echo $(MSG_SYMBOL_TABLE) $@
- $(NM) -n $< > $@
-
-
-# Link: create ELF output file from object files.
-.SECONDARY : $(TARGET).elf
-.PRECIOUS : $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
-%.elf: $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
- @echo
- @echo $(MSG_LINKING) $@
- $(CC) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
-# $(CPP) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
-
-# Compile: create object files from C source files. ARM/Thumb
-$(COBJ) : %.o : %.c
- @echo
- @echo $(MSG_COMPILING) $<
- $(CC) -c $(THUMB) $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
-
-# Compile: create object files from C source files. ARM-only
-$(COBJARM) : %.o : %.c
- @echo
- @echo $(MSG_COMPILING_ARM) $<
- $(CC) -c $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
-
-# Compile: create object files from C++ source files. ARM/Thumb
-$(CPPOBJ) : %.o : %.cpp
- @echo
- @echo $(MSG_COMPILINGCPP) $<
- $(CPP) -c $(THUMB) $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
-
-# Compile: create object files from C++ source files. ARM-only
-$(CPPOBJARM) : %.o : %.cpp
- @echo
- @echo $(MSG_COMPILINGCPP_ARM) $<
- $(CPP) -c $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
-
-
-# Compile: create assembler files from C source files. ARM/Thumb
-## does not work - TODO - hints welcome
-##$(COBJ) : %.s : %.c
-## $(CC) $(THUMB) -S $(ALL_CFLAGS) $< -o $@
-
-
-# Assemble: create object files from assembler source files. ARM/Thumb
-$(AOBJ) : %.o : %.S
- @echo
- @echo $(MSG_ASSEMBLING) $<
- $(CC) -c $(THUMB) $(ALL_ASFLAGS) $< -o $@
-
-
-# Assemble: create object files from assembler source files. ARM-only
-$(AOBJARM) : %.o : %.S
- @echo
- @echo $(MSG_ASSEMBLING_ARM) $<
- $(CC) -c $(ALL_ASFLAGS) $< -o $@
-
-
-# Target: clean project.
-clean: begin clean_list finished end
-
-
-clean_list :
- @echo
- @echo $(MSG_CLEANING)
- $(REMOVE) $(TARGET).hex
- $(REMOVE) $(TARGET).bin
- $(REMOVE) $(TARGET).obj
- $(REMOVE) $(TARGET).elf
- $(REMOVE) $(TARGET).map
- $(REMOVE) $(TARGET).obj
- $(REMOVE) $(TARGET).a90
- $(REMOVE) $(TARGET).sym
- $(REMOVE) $(TARGET).lnk
- $(REMOVE) $(TARGET).lss
- $(REMOVE) $(COBJ)
- $(REMOVE) $(CPPOBJ)
- $(REMOVE) $(AOBJ)
- $(REMOVE) $(COBJARM)
- $(REMOVE) $(CPPOBJARM)
- $(REMOVE) $(AOBJARM)
- $(REMOVE) $(LST)
- $(REMOVE) $(SRC:.c=.s)
- $(REMOVE) $(SRC:.c=.d)
- $(REMOVE) $(SRCARM:.c=.s)
- $(REMOVE) $(SRCARM:.c=.d)
- $(REMOVE) $(CPPSRC:.cpp=.s)
- $(REMOVE) $(CPPSRC:.cpp=.d)
- $(REMOVE) $(CPPSRCARM:.cpp=.s)
- $(REMOVE) $(CPPSRCARM:.cpp=.d)
- $(REMOVEDIR) .dep | exit 0
-
-
-# Include the dependency files.
--include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
-
-
-# Listing of phony targets.
-.PHONY : all begin finish end sizebefore sizeafter gccversion \
-build elf hex bin lss sym clean clean_list program
-
Deleted: trunk/firmware/arm/str/vscp_node_str73x_gcc/Readme.txt
===================================================================
--- trunk/firmware/arm/str/vscp_node_str73x_gcc/Readme.txt 2008-02-17 16:05:40 UTC (rev 849)
+++ trunk/firmware/arm/str/vscp_node_str73x_gcc/Readme.txt 2008-02-17 16:06:31 UTC (rev 850)
@@ -1,18 +0,0 @@
-Simple CAN test sample
-====================
-
-Ake Hedman, D of Scandinavia ak...@do..., http://www.dofscandinavia.com
-
-This file is built for the IAR str73x test board.
-
-The sample code send a CAN frame every 500 ms and display a "RECEIVE CAN MESSAGE"
-on the second line of the LCD if a CAN message with id 0x123, length=4 and
-data=1,2,4,8 is received. If another msg is received the line is cleared.
-
-CAN bitrate is 500 kbps.
-
-Based on a sample from ST
-
-
-- Button 1 is init button.
-- LED 0 is status LED
\ No newline at end of file
Deleted: trunk/firmware/arm/str/vscp_node_str73x_gcc/STR73x-RAM.ld
===================================================================
--- trunk/firmware/arm/str/vscp_node_str73x_gcc/STR73x-RAM.ld 2008-02-17 16:05:40 UTC (rev 849)
+++ trunk/firmware/arm/str/vscp_node_str73x_gcc/STR73x-RAM.ld 2008-02-17 16:06:31 UTC (rev 850)
@@ -1,228 +0,0 @@
-/***********************************************************************************
-* Copyright 2005 Anglia Design
-* This demo code and associated components are provided as is and has no warranty,
-* implied or otherwise. You are free to use/modify any of the provided
-* code at your own risk in your applications with the expressed limitation
-* of liability (see below)
-*
-* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
-* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
-* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
-* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-*
-* Author : Spencer Oliver
-* Web : www.anglia-designs.com
-*
-***********************************************************************************/
-
-/* Stack Sizes */
-
- _STACKSIZE = 1024;
- _STACKSIZE_IRQ = 256;
- _STACKSIZE_FIQ = 256;
- _STACKSIZE_SVC = 0;
- _STACKSIZE_ABT = 0;
- _STACKSIZE_UND = 0;
- _HEAPSIZE = 1024;
-
-/* Memory Definitions */
-
-MEMORY
-{
- DATA (rw) : ORIGIN = 0xA0000000, LENGTH = 0x00004000
-}
-
-/* Section Definitions */
-
-SECTIONS
-{
- /* first section is .text which is used for code */
-
- .text :
- {
- KEEP(*(.vectrom))
- KEEP(*(.init))
- *(.text .text.*)
- *(.gnu.linkonce.t.*)
- *(.glue_7t .glue_7)
- KEEP(*(.fini))
- *(.gcc_except_table)
- } >DATA =0
- . = ALIGN(4);
-
- /* .ctors .dtors are used for c++ constructors/destructors */
-
- .ctors :
- {
- PROVIDE(__ctors_start__ = .);
- KEEP(*(SORT(.ctors.*)))
- KEEP(*(.ctors))
- PROVIDE(__ctors_end__ = .);
- } >DATA
-
- .dtors :
- {
- PROVIDE(__dtors_start__ = .);
- KEEP(*(SORT(.dtors.*)))
- KEEP(*(.dtors))
- PROVIDE(__dtors_end__ = .);
- } >DATA
-
- /* .rodata section which is used for read-only data (constants) */
-
- .rodata :
- {
- *(.rodata .rodata.*)
- *(.gnu.linkonce.r.*)
- } >DATA
- . = ALIGN(4);
-
- _vectext = .;
- PROVIDE (vectext = .);
-
- .vect : AT (_vectext)
- {
- _vecstart = .;
- KEEP(*(.vectram))
- _vecend = .;
- } >DATA
-
- _etext = _vectext + SIZEOF(.vect);
- PROVIDE (etext = .);
-
- /* .data section which is used for initialized data */
-
- .data : AT (_etext)
- {
- *(.data .data.*)
- *(.gnu.linkonce.d.*)
- SORT(CONSTRUCTORS)
- } >DATA
- . = ALIGN(4);
-
- __data_start = .;
- _edata = .;
- PROVIDE (edata = .);
-
- /* .bss section which is used for uninitialized data */
-
- .bss :
- {
- __bss_start = .;
- __bss_start__ = .;
- *(.bss .bss.*)
- *(.gnu.linkonce.b.*)
- *(COMMON)
- . = ALIGN(4);
- } >DATA
- . = ALIGN(4);
- __bss_end__ = .;
-
- _end = .;
- PROVIDE(end = .);
-
- /* .heap section which is used for memory allocation */
-
- .heap (NOLOAD) :
- {
- __heap_start__ = .;
- *(.heap)
- . = MAX(__heap_start__ + _HEAPSIZE , .);
- } >DATA
- __heap_end__ = __heap_start__ + SIZEOF(.heap);
-
- /* .stack section - user mode stack */
-
- .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
- {
- __stack_start__ = .;
- *(.stack)
- . = MAX(__stack_start__ + _STACKSIZE , .);
- } >DATA
- __stack_end__ = __stack_start__ + SIZEOF(.stack);
-
- /* .stack_irq section */
-
- .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
- {
- __stack_irq_start__ = .;
- *(.stack_irq)
- . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
- } >DATA
- __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
-
- /* .stack_fiq section */
-
- .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
- {
- __stack_fiq_start__ = .;
- *(.stack_fiq)
- . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
- } >DATA
- __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
-
- /* .stack_svc section */
-
- .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
- {
- __stack_svc_start__ = .;
- *(.stack_svc)
- . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
- } >DATA
- __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
-
- /* .stack_abt section */
-
- .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
- {
- __stack_abt_start__ = .;
- *(.stack_abt)
- . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
- } >DATA
- __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
-
- /* .stack_und section */
-
- .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
- {
- __stack_und_start__ = .;
- *(.stack_und)
- . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
- } >DATA
- __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
-
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
-}
-
Deleted: trunk/firmware/arm/str/vscp_node_str73x_gcc/STR73x-ROM.ld
===================================================================
--- trunk/firmware/arm/str/vscp_node_str73x_gcc/STR73x-ROM.ld 2008-02-17 16:05:40 UTC (rev 849)
+++ trunk/firmware/arm/str/vscp_node_str73x_gcc/STR73x-ROM.ld 2008-02-17 16:06:31 UTC (rev 850)
@@ -1,231 +0,0 @@
-/***********************************************************************************
-* Copyright 2005 Anglia Design
-* This demo code and associated components are provided as is and has no warranty,
-* implied or otherwise. You are free to use/modify any of the provided
-* code at your own risk in your applications with the expressed limitation
-* of liability (see below)
-*
-* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
-* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
-* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
-* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-*
-* Author : Spencer Oliver
-* Web : www.anglia-designs.com
-*
-***********************************************************************************/
-
-/* Stack Sizes */
-
- _STACKSIZE = 1024;
- _STACKSIZE_IRQ = 256;
- _STACKSIZE_FIQ = 256;
- _STACKSIZE_SVC = 0;
- _STACKSIZE_ABT = 0;
- _STACKSIZE_UND = 0;
- _HEAPSIZE = 1024;
-
-/* Memory Definitions */
-
-MEMORY
-{
- CODE (rx) : ORIGIN = 0x80000000, LENGTH = 0x00040000
- DATA (rw) : ORIGIN = 0xA0000000, LENGTH = 0x00004000
-}
-
-/* Section Definitions */
-
-SECTIONS
-{
- /* first section is .text which is used for code */
-
- .text :
- {
- KEEP(*(.vectrom))
- KEEP(*(.init))
- *(.text .text.*)
- *(.gnu.linkonce.t.*)
- *(.glue_7t .glue_7)
- KEEP(*(.fini))
- *(.gcc_except_table)
- } >CODE =0
- . = ALIGN(4);
-
- /* .ctors .dtors are used for c++ constructors/destructors */
-
- .ctors :
- {
- PROVIDE(__ctors_start__ = .);
- KEEP(*(SORT(.ctors.*)))
- KEEP(*(.ctors))
- PROVIDE(__ctors_end__ = .);
- } >CODE
-
- .dtors :
- {
- PROVIDE(__dtors_start__ = .);
- KEEP(*(SORT(.dtors.*)))
- KEEP(*(.dtors))
- PROVIDE(__dtors_end__ = .);
- } >CODE
-
- /* .rodata section which is used for read-only data (constants) */
-
- .rodata :
- {
- *(.rodata .rodata.*)
- *(.gnu.linkonce.r.*)
- } >CODE
- . = ALIGN(4);
-
- _vectext = .;
- PROVIDE (vectext = .);
-
- .vect : AT (_vectext)
- {
- _vecstart = .;
- KEEP(*(.vectram))
- _vecend = .;
- } >DATA
-
- _etext = _vectext + SIZEOF(.vect);
- PROVIDE (etext = .);
-
- /* .data section which is used for initialized data */
-
- .data : AT (_etext)
- {
- __data_start = .;
- *(.data .data.*)
- *(.gnu.linkonce.d.*)
- SORT(CONSTRUCTORS)
- . = ALIGN(4);
- *(.fastrun .fastrun.*)
- } >DATA
- . = ALIGN(4);
-
- _edata = .;
- PROVIDE (edata = .);
-
- /* .bss section which is used for uninitialized data */
-
- .bss :
- {
- __bss_start = .;
- __bss_start__ = .;
- *(.bss .bss.*)
- *(.gnu.linkonce.b.*)
- *(COMMON)
- . = ALIGN(4);
- } >DATA
- . = ALIGN(4);
- __bss_end__ = .;
-
- _end = .;
- PROVIDE(end = .);
-
- /* .heap section which is used for memory allocation */
-
- .heap (NOLOAD) :
- {
- __heap_start__ = .;
- *(.heap)
- . = MAX(__heap_start__ + _HEAPSIZE , .);
- } >DATA
- __heap_end__ = __heap_start__ + SIZEOF(.heap);
-
- /* .stack section - user mode stack */
-
- .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
- {
- __stack_start__ = .;
- *(.stack)
- . = MAX(__stack_start__ + _STACKSIZE , .);
- } >DATA
- __stack_end__ = __stack_start__ + SIZEOF(.stack);
-
- /* .stack_irq section */
-
- .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
- {
- __stack_irq_start__ = .;
- *(.stack_irq)
- . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
- } >DATA
- __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
-
- /* .stack_fiq section */
-
- .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
- {
- __stack_fiq_start__ = .;
- *(.stack_fiq)
- . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
- } >DATA
- __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
-
- /* .stack_svc section */
-
- .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
- {
- __stack_svc_start__ = .;
- *(.stack_svc)
- . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
- } >DATA
- __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
-
- /* .stack_abt section */
-
- .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
- {
- __stack_abt_start__ = .;
- *(.stack_abt)
- . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
- } >DATA
- __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
-
- /* .stack_und section */
-
- .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
- {
- __stack_und_start__ = .;
- *(.stack_und)
- . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
- } >DATA
- __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
-
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
-}
-
Deleted: trunk/firmware/arm/str/vscp_node_str73x_gcc/main.c
===================================================================
--- trunk/firmware/arm/str/vscp_node_str73x_gcc/main.c 2008-02-17 16:05:40 UTC (rev 849)
+++ trunk/firmware/arm/str/vscp_node_str73x_gcc/main.c 2008-02-17 16:06:31 UTC (rev 850)
@@ -1,1017 +0,0 @@
-/* ******************************************************************************
- * VSCP (Very Simple Control Protocol)
- * http://www.vscp.org
- *
- * IAR STR 73x demo board Module
- * Version information in version.h
- * ak...@do...
- *
- * Copyright (C) 1995-2008 Ake Hedman,
- * D of Scandinavia, <ak...@do...>
- *
- * This software is provided 'as-is', without any express or implied
- * warranty. In no event will the authors be held liable for any damages
- * arising from the use of this software.
- *
- * Permission is granted to anyone to use this software for any purpose,
- * including commercial applications, and to alter it and redistribute it
- * freely, subject to the following restrictions:
- *
- * 1. The origin of this software must not be misrepresented; you must not
- * claim that you wrote the original software. If you use this software
- * in a product, an acknowledgment in the product documentation would be
- * appreciated but is not required.
- * 2. Altered source versions must be plainly marked as such, and must not be
- * misrepresented as being the original software.
- * 3. This notice may not be removed or altered from any source distribution.
- *
- * This file is part of VSCP - Very Simple Control Protocol
- * http://www.vscp.org
- *
- * ******************************************************************************/
-
-#include "73x_lib.h"
-#include "../common/73x_lcd.h"
-#include "../common/systime.h"
-#include "../common/delay.h"
-#include <inttypes.h>
-#include <vscp.h>
-#include <vscp_class.h>
-#include <vscp_type.h>
-#include "vscp_compiler.h" // This file should be in your project folder
-#include "vscp_projdefs.h" // This file should be in your project folder
-
-
-// Prototypes
-void wait( void );
-void MCLK_Config (void);
-void CAN0_Demo_Polling( void );
-void CAN0_Demo_Interrupt(void);
-
-void init( void );
-void init_app_eeprom( void );
-void init_app_ram( void );
-
-void doWork( void );
-
-void read_app_register( unsigned char reg );
-void write_app_register( unsigned char reg, unsigned char val );
-
-unsigned int get1000Digit( unsigned int val );
-unsigned int get100Digit( unsigned int val );
-unsigned int get10Digit( unsigned int val );
-unsigned int get1Digit( unsigned int val );
-
-// Peripherals Init Structures
-GPIO_InitTypeDef GPIO0_InitStructure;
-GPIO_InitTypeDef GPIO3_InitStructure;
-ADC_InitTypeDef ADC_InitStructure;
-CMU_InitTypeDef CMU_InitStructure;
-RTC_InitTypeDef RTC_InitStructure;
-
-GPIO_InitTypeDef CAN0_RX;
-GPIO_InitTypeDef CAN0_TX;
-GPIO_InitTypeDef CAN1_RX;
-GPIO_InitTypeDef CAN1_TX;
-GPIO_InitTypeDef CAN2_RX;
-GPIO_InitTypeDef CAN2_TX;
-GPIO_InitTypeDef Led_Config;
-GPIO_InitTypeDef Button_Config;
-
-// VSCP Module firmware version
-#define FIRMWARE_MAJOR_VERSION 0;
-#define FIRMWARE_MINOR_VERSION 0;
-#define FIRMWARE_SUB_MINOR_VERSION 1;
-
-
-enum {
- CAN0_TX_MSGOBJ = 0,
- CAN0_RX_MSGOBJ0,
- CAN0_RX_MSGOBJ1,
- CAN0_RX_MSGOBJ2,
- CAN0_RX_MSGOBJ3,
- CAN0_RX_MSGOBJ4,
- CAN0_RX_MSGOBJ5,
- CAN0_RX_MSGOBJ6,
- CAN0_RX_MSGOBJ7,
- CAN0_RX_MSGOBJ8,
- CAN0_RX_MSGOBJ9,
- CAN0_RX_MSGOBJ10,
- CAN0_RX_MSGOBJ11,
- CAN0_RX_MSGOBJ12,
- CAN0_RX_MSGOBJ13,
- CAN0_RX_MSGOBJ14,
- CAN0_RX_MSGOBJ15,
- CAN0_RX_MSGOBJ16,
- CAN0_RX_MSGOBJ17,
- CAN0_RX_MSGOBJ18,
- CAN0_RX_MSGOBJ19,
- CAN0_RX_MSGOBJ20,
- CAN0_RX_MSGOBJ21,
- CAN0_RX_MSGOBJ22,
- CAN0_RX_MSGOBJ23,
- CAN0_RX_MSGOBJ24,
- CAN0_RX_MSGOBJ25,
- CAN0_RX_MSGOBJ26,
- CAN0_RX_MSGOBJ27,
- CAN0_RX_MSGOBJ28,
- CAN0_RX_MSGOBJ29
-};
-
-u16 potentiometer_ad_Value = 0;
-u16 termistor_ad_Value = 0;
-
-// The device URL (max 32 characters including null termination)
-const char vscp_deviceURL[] = "www.dofscandinavia.com/demo73x_001.xml";
-
-// The device GUID
-const char vscp_deviceGUID[] = { 0x01, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00, 0x00,
- 0xff, 0xff, 0xff, 0xff
- };
-
-// The device USER id - normally in EEPROM
-const char vscp_userID[] = { 0x10, 0x20, 0x30, 0x40, 0x50 };
-
-// The device manufacturer id - normally in EEPROM
-const char vscp_ManufacturerDeviceID[] = { 0x11, 0x20, 0x30, 0x40,
- 0x64, 0x65, 0x40, 0x00 };
-
-// Simulated eeprom storage
-uint8_t eeprom_nickname;
-uint8_t eeprom_segmentCRC;
-
-volatile unsigned long measurement_clock; // Clock for measurments
-
-uint8_t seconds; // counter for seconds
-uint8_t minutes; // counter for minutes
-uint8_t hours; // Counter for hours
-
-
-int main(void)
-{
-
-#ifdef LIBDEBUG
- libdebug();
-#endif
-
-
-
- init(); // Initialize Microcontroller
-
-
-
- // Check VSCP persistent storage and
- // restore if needed
- if ( !vscp_check_pstorage() ) {
-
- // Spoiled or not initialized - reinitialize
- init_app_eeprom();
-
- }
-
- vscp_init(); // Initialize the VSCP functionality
-
-
-
- ///////////////
- // Main LOOP //
- ///////////////
-
-
-
- while ( 1 ) {
-
-
- if ( ( vscp_initbtncnt > 100 ) && ( VSCP_STATE_INIT != vscp_node_state ) ) {
- // Init button pressed
- vscp_nickname = VSCP_ADDRESS_FREE;
- eeprom_nickname = VSCP_ADDRESS_FREE;
- vscp_init();
- }
-
- // Check for any valid CAN message
- vscp_imsg.flag = 0;
- vscp_getEvent();
-
- // do a meaurement if needed
- if ( measurement_clock > 1000 ) {
-
- measurement_clock = 0;
- //doMeasurement();
- seconds++;
-
- if ( seconds > 59 ) {
-
- seconds = 0;
- minutes++;
-
- if ( minutes > 59 ) {
- minutes = 0;
- hours++;
- }
-
- if ( hours > 23 ) hours = 0;
-
- }
- }
-
- switch ( vscp_node_state ) {
-
- case VSCP_STATE_STARTUP: // Cold/warm reset
-
- LCD_SendString( "STARTUP ", 2, 1 );
-
- // Get nickname from EEPROM
- if ( VSCP_ADDRESS_FREE == vscp_nickname ) {
- // new on segment need a nickname
- vscp_node_state = VSCP_STATE_INIT;
- }
- else {
- // been here before - go on
- vscp_node_state = VSCP_STATE_ACTIVE;
- vscp_active();
- }
- break;
-
- case VSCP_STATE_INIT: // Assigning nickname
- LCD_SendString( "INIT ", 2, 1 );
- vscp_probe();
- break;
-
- case VSCP_STATE_PREACTIVE: // Waiting for host initialisation
- LCD_SendString( "PRECATIVATE ", 2, 1 );
- vscp_rcv_preactive();
- break;
-
- case VSCP_STATE_ACTIVE: // The normal state
-
- LCD_SendString( "ACTIVE ", 2, 1 );
-
- if ( vscp_imsg.flag & VSCP_VALID_MSG ) { // incoming event?
-
- // Yes, incoming message
- if ( VSCP_CLASS1_PROTOCOL == vscp_imsg.class ) {
- switch( vscp_imsg.type ) {
-
- case VSCP_TYPE_PROTOCOL_SEGCTRL_HEARTBEAT:
- vscp_rcv_heartbeat();
- break;
-
- case VSCP_TYPE_PROTOCOL_NEW_NODE_ONLINE:
- vscp_rcv_new_node_online();
- break;
-
- case VSCP_TYPE_PROTOCOL_SET_NICKNAME:
- vscp_rcv_set_nickname();
- break;
-
- case VSCP_TYPE_PROTOCOL_DROP_NICKNAME:
- vscp_rcv_drop_nickname();
- break;
-
- case VSCP_TYPE_PROTOCOL_READ_REGISTER:
- if ( ( 2 == ( vscp_imsg.flag & 0x0f ) ) &&
- ( vscp_nickname == vscp_imsg.data[ 0 ] ) ) {
-
- if ( vscp_imsg.data[ 1 ] < 0x80 ) {
- // Read application specific register
- read_app_register( vscp_imsg.data[ 1 ] );
- }
- else {
- // Read VSCP register
- vscp_rcv_readreg();
- }
- }
- break;
-
- case VSCP_TYPE_PROTOCOL_WRITE_REGISTER:
- if ( ( 3 == ( vscp_imsg.flag & 0x0f ) ) &&
- ( vscp_nickname == vscp_imsg.data[ 0 ] ) ) {
- if ( vscp_imsg.data[ 1 ] < 0x80 ) {
- // Write application specific register
- write_app_register( vscp_imsg.data[ 1 ], vscp_imsg.data[ 2 ] );
- }
- else {
- // Read VSCP register
- vscp_rcv_writereg();
- }
- }
- break;
-
- case VSCP_TYPE_PROTOCOL_ENTER_BOOT_LOADER:
- // No bootloader implemented
- vscp_omsg.flags = VSCP_VALID_MSG + 1 ; // one databyte
- vscp_omsg.priority = VSCP_PRIORITY_HIGH;
- vscp_omsg.class = VSCP_CLASS1_PROTOCOL;
- vscp_omsg.type = VSCP_TYPE_PROTOCOL_NACK_BOOT_LOADER;
- vscp_omsg.data[ 0 ] = 0x00;
-
- // send the probe
- vscp_sendEvent();
- break;
-
- default:
- // Do work load
- break;
- }
- } // class1 protocol
- } // Incoming event
- break;
-
- case VSCP_STATE_ERROR: // Everything is *very* *very* bad.
- LCD_SendString( "ERROR ", 2, 1 );
- vscp_error();
- break;
-
- default: // Should not be here...
- vscp_node_state = VSCP_STATE_STARTUP;
- break;
-
- } // switch
-
- doWork();
-
- } // while
-
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-// init
-//
-// Initialize the controller and pheriperals
-//
-
-void init( void )
-{
- uint8_t i;
-
- init_app_ram();
-
- MCLK_Config();
-
- // Enable clock on both CAN channels
- CFG_PeripheralClockConfig( CFG_CLK_CAN0, ENABLE );
- CFG_PeripheralClockConfig( CFG_CLK_CAN1, ENABLE );
-
- CFG_PeripheralClockConfig( CFG_CLK_GPIO0, ENABLE );
- CFG_PeripheralClockConfig( CFG_CLK_GPIO1, ENABLE );
- CFG_PeripheralClockConfig( CFG_CLK_GPIO2, ENABLE );
- CFG_PeripheralClockConfig( CFG_CLK_GPIO6, ENABLE );
-
- Led_Config.GPIO_Mode = GPIO_Mode_OUT_PP;
- Led_Config.GPIO_Pins = 0xFFFF;
- GPIO_Init( GPIO0, &Led_Config );
-
- // Configure ADC Pins
- GPIO3_InitStructure.GPIO_Mode = GPIO_Mode_HI_AIN_TRI;
- GPIO3_InitStructure.GPIO_Pins = GPIO_PIN_ALL;
- GPIO_Init( GPIO3, &GPIO3_InitStructure );
-
- // CAN 0 RC pin
- CAN0_RX.GPIO_Mode = GPIO_Mode_IN_TRI_TTL;
- CAN0_RX.GPIO_Pins = GPIO_PIN_14;
- GPIO_Init( GPIO1, &CAN0_RX );
-
- // CAN 0 TX pin
- CAN0_TX.GPIO_Mode = GPIO_Mode_AF_PP;
- CAN0_TX.GPIO_Pins = GPIO_PIN_15;
- GPIO_Init( GPIO1, &CAN0_TX );
-
- // CAN 1 RX pin
- CAN1_RX.GPIO_Mode = GPIO_Mode_IN_TRI_TTL;
- CAN1_RX.GPIO_Pins = GPIO_PIN_1;
- GPIO_Init( GPIO2, &CAN1_RX );
-
- // CAN 1 TX pin
- CAN1_TX.GPIO_Mode = GPIO_Mode_AF_PP;
- CAN1_TX.GPIO_Pins = GPIO_PIN_2;
- GPIO_Init( GPIO2, &CAN1_TX );
-
- // Init button
- Button_Config.GPIO_Mode = GPIO_Mode_INOUT_WP;
- Button_Config.GPIO_Pins = GPIO_PIN_10;
- GPIO_Init( GPIO2, &Button_Config );
-
- // Init 1 ms timebase
- initTimebase2();
-
- GPIO_WordWrite( GPIO0, 0x0000 ); // All LED's off
-
- // * * * EIC * * *
-
- // EIC Clock Enable
- CFG_PeripheralClockConfig( CFG_CLK_EIC , ENABLE );
-
- // EIC Config
- EIC_IRQChannelPriorityConfig( RTC_IRQChannel, 1 );
- EIC_IRQChannelPriorityConfig( TB2_IRQChannel, 2 );
-
- //EIC_IRQChannelConfig( RTC_IRQChannel , ENABLE );
-
-
- EIC_IRQCmd( ENABLE );
-
- // * * * CMU * * *
-
- // CMU Initialization
- CMU_DeInit( );
- CMU_StructInit(&CMU_InitStructure);
-
- // Enable the external oscillator
- CMU_InitStructure.CMU_CKSEL0 = CMU_CKSEL0_CKOSC;
- CMU_Init(&CMU_InitStructure);
-
- // Disable DIV2
- PRCCU->CFR &= 0x7FFF;
-
-
- // * * * RTC * * *
-
- // Set RTC clock-------
- // (clock:0-->9) fOSC=4Mhz/RTCP=(2,4,8,16,32,64,128,256,512,1024)
- // -->EXTCLK=(4M,2M,1M,500K,250K,125K,62.5K,31.25K,15.625K,7.812K)
-
-
- // RTC Clock Enable
- CFG_PeripheralClockConfig( CFG_CLK_RTC , ENABLE );
-
- // RTC Interrupt Config
- RTC_ITConfig( RTC_IT_SEC | RTC_IT_ALA | RTC_IT_OV, ENABLE );
-
- // RTC Configuration
- RTC_InitStructure.RTC_Alarm = 6; // 0xFFFFFFFF;
- RTC_InitStructure.RTC_Counter = 0; // 0xFFFFFFFA;
- // configure RTC=1S ( RCK=1000000/64=CKL32=15625Hz )
- // 8MHz/64 = 125000 = 0x1E848
- RTC_InitStructure.RTC_Prescaler = 0x3D09; // == 15625
- //RTC_InitStructure.RTC_Prescaler = 0x1E848; // 0x3D09; // == 15625
-
- RTC_Init( &RTC_InitStructure );
-
-
- // * * * CAN * * *
- CAN_InitTypeDef CANInit = { 0x0, CAN_BITRATE_500K };
-
- // initialize the CAN at a standard bitrate, interrupts disabled
- CAN_Init( CAN0, &CANInit );
-
- // configure the message objects
- // Obj 0 used for TX
- // obj 1-31 used for RX
- CAN_EnterInitMode( CAN0, CAN_CR_CCE );
- CAN_InvalidateAllMsgObj( CAN0 );
- CAN_SetTxMsgObj( CAN0, CAN0_TX_MSGOBJ, CAN_EXT_ID );
- for ( i=1; i<32; i++ ) {
- CAN_SetRxMsgObj( CAN0, i, CAN_EXT_ID, 0, CAN_LAST_EXT_ID, TRUE );
- }
- CAN_LeaveInitMode( CAN0 );
-
-
-
- // * * * LCD * * *
-
- // LCD Configuration
- LCD_Init();
- LCD_Clear();
-
- LCD_SetPosCur(1,1);
-
- // Display text message on LCD: Line 1
- LCD_SendString( "VSCP TEST NODE", 1, 1 );
-
- LCD_SetPosCur(2,1);
-
-
-
- // * * * ADC * * *
-
-
- // ADC Clock Enable
- CFG_PeripheralClockConfig(CFG_CLK_ADC, ENABLE);
-
- // ADC Configuration
- ADC_DeInit ();
- ADC_StructInit( &ADC_InitStructure );
- ADC_InitStructure.ADC_Calibration = ADC_Calibration_ON;
- ADC_InitStructure.ADC_CalibAverage = ADC_CalibAverage_Enable;
- ADC_InitStructure.ADC_AutoClockOff = ADC_AutoClockOff_Disable ;
- ADC_InitStructure.ADC_ConversionMode = ADC_ConversionMode_Scan ;
- ADC_InitStructure.ADC_SamplingPrescaler = 0x2;
- ADC_InitStructure.ADC_ConversionPrescaler = 0x4;
- ADC_InitStructure.ADC_FirstChannel = ADC_CHANNEL0 ;
- ADC_InitStructure.ADC_ChannelNumber = 2;
- ADC_Init( &ADC_InitStructure );
-
-
- // EOC interrupt Enable
- ADC_ITConfig( ADC_IT_EOC, ENABLE );
-
- // Enable ADC
- ADC_Cmd( ENABLE );
-
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-// init_app_ram
-//
-
-void init_app_ram( void )
-{
- eeprom_nickname = VSCP_ADDRESS_FREE;
- eeprom_segmentCRC = 0;
-}
-
-
-////////////////////////////////////////////////////////////////////////////////
-// init_app_eeprom
-//
-
-void init_app_eeprom( void )
-{
- // Nothing to do as we are out of EEPROM
-}
-
-
-
-
-
-////////////////////////////////////////////////////////////////////////////////
-// get1000Digit
-//
-
-unsigned int get1000Digit( unsigned int val )
-{
- return ( ( val / 1000 ) + 0x30 );
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// get100Digit
-//
-
-unsigned int get100Digit( unsigned int val )
-{
- unsigned int valCopy;
- valCopy = val % 1000;
- return ( (valCopy / 100 ) + 0x30 );
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// get10Digit
-//
-
-unsigned int get10Digit( unsigned int val )
-{
- unsigned int valCopy;
- valCopy = val % 100;
- return ( ( valCopy / 10 ) + 0x30 );
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// get1Digit
-//
-
-unsigned int get1Digit( unsigned int val )
-{
- unsigned int valCopy;
- valCopy = val % 100;
- return ( ( valCopy % 10 ) + 0x30 );
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// wait
-//
-
-void wait( void )
-{
- u32 i;
-
- for (i=100000L; i!=0 ; i-- ) {}
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// MCLK_Config
-//
-
-void MCLK_Config (void)
-{
-
- PRCCU_InitTypeDef Clock;
- CMU_InitTypeDef ClockInit;
-
- ClockInit.CMU_RCOscControl = 0x0D; // RC OSC Adjust
- ClockInit.CMU_EndCountValue = 0x0F; //
- ClockInit.CMU_FreqRef_High = 0xFF; //
- ClockInit.CMU_FreqRef_Low = 0xFE; //
-
- ClockInit.CMU_CKSEL0 = CMU_CKSEL0_CKOSC; // Clock for CLOCK1 (4MHz)
- ClockInit.CMU_CKSEL1 = CMU_CKSEL1_CKPLL; // Clock for Freq. Meter (8MHz)
- ClockInit.CMU_CKSEL2 = CMU_CKSEL2_CKOSC; // Clock to drive CMU logic
-
- CMU_Lock( DISABLE );
- CMU_Init( &ClockInit );
-
- // Init. Power Reset Clock unit
- // 4 MHz * 12 / 6 = 8 MHz = CLOCK2
- Clock.PRCCU_DIV2 = DISABLE;
- Clock.PRCCU_MCLKSRC_SRC = PRCCU_MCLKSRC_PLL; // Use PLL in
- Clock.PRCCU_PLLDIV = PRCCU_PLLDIV_6;
- Clock.PRCCU_PLLMUL = PRCCU_PLLMUL_12;
-
- PRCCU_Init( &Clock );
- PRCCU_SetExtClkDiv(4);
-
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-// APPLICATION
-//////////////////////////////////////////////////////////////////////////////
-
-
-////////////////////////////////////////////////////////////////////////////////
-// doWork
-//
-
-void doWork( void )
-{
- char buffer[33];
- u32 CPIO_Value;
-
- // Start ADC conversion
- ADC_ConversionCmd( ADC_ConversionStart );
- buffer[8] = get1Digit( potentiometer_ad_Value );
- buffer[7] = get10Digit( potentiometer_ad_Value );
- buffer[6] = get100Digit( potentiometer_ad_Value );
- buffer[5] = get1000Digit( potentiometer_ad_Value );
- buffer[9] = 0;
-
- // Display ADC conversion Value on LCD
- LCD_SendString( &buffer[5], 2, 10 );
- CPIO_Value = 0;
-
- for ( u32 idx = (u32)((float)potentiometer_ad_Value/60); idx; idx--) {
- CPIO_Value <<= 1;
- CPIO_Value |= 1;
- }
-
- GPIO_WordWrite( GPIO0, CPIO_Value );
-
- // Wait for 500 ms
- //delay_ms( 500 );
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-// read_app_register
-//
-
-void read_app_register( unsigned char reg )
-{
- // TODO
-
- vscp_omsg.priority = VSCP_PRIORITY_MEDIUM;
- vscp_omsg.flags = VSCP_VALID_MSG + 2;
- vscp_omsg.class = VSCP_CLASS1_PROTOCOL;
- vscp_omsg.type = VSCP_TYPE_PROTOCOL_RW_RESPONSE;
-
- vscp_omsg.data[ 0 ] = reg;
- vscp_omsg.data[ 1 ] = 0x00; // default read
-
-
- // Send data
- vscp_sendEvent();
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-// write_app_register
-//
-
-void write_app_register( unsigned char reg, unsigned char val )
-{
- // TODO
-
- vscp_omsg.priority = VSCP_PRIORITY_MEDIUM;
- vscp_omsg.flags = VSCP_VALID_MSG + 2;
- vscp_omsg.class = VSCP_CLASS1_PROTOCOL;
- vscp_omsg.type = VSCP_TYPE_PROTOCOL_RW_RESPONSE;
-
- vscp_omsg.data[ 0 ] = reg;
- vscp_omsg.data[ 1 ] = ~val; // error return
-
- // Send data
- vscp_sendEvent();
-}
-
-
-
-
-///////////////////////////////////////////////////////////////////////////////
-// VSCP Required Methods
-//////////////////////////////////////////////////////////////////////////////
-
-
-////////////////////////////////////////////////////////////////////////////////
-// sendCANFrame
-//
-
-int8_t sendCANFrame( uint32_t id, uint8_t dlc, uint8_t *pdata )
-{
- canmsg msg;
-
- msg.IdType = CAN_EXT_ID;
- msg.Id = id;
- msg.Dlc = dlc;
- memcpy( msg.Data, pdata, dlc );
-
-
- // Send the frame frame
- if ( !CAN_SendMessage( CAN0, CAN0_TX_MSGOBJ, &msg ) ) {
- // Failed to send message
- return FALSE;
- }
-
- // wait until end of transmission
- CAN_WaitEndOfTx( CAN0 );
-
- // release the TX message object
- CAN_ReleaseTxMessage( CAN0, CAN0_TX_MSGOBJ );
-
- vscp_omsg.flags = 0; // Out msg sent
- return TRUE;
-}
-
-
-////////////////////////////////////////////////////////////////////////////////
-// getCANFrame
-//
-
-int8_t getCANFrame( uint32_t *pid, uint8_t *psize, uint8_t *pData )
-{
- uint8_t i;
- canmsg msg;
-
- // Dont read in new message if there already is a message
- // in the input buffer
- if ( vscp_imsg.flag & VSCP_VALID_MSG ) return FALSE;
-
- for ( i=1; i<32; i++ ) {
-
- if ( CAN_ReceiveMessage( CAN0, i, TRUE, &msg ) ) {
-
- // We already no this is an extended id so we dont't bother
- // with that info.
- *pid = msg.Id;
- *psize = msg.Dlc;
- memcpy( pData, msg.Data, msg.Dlc );
-
- return TRUE;
-
- }
-
- }
-
- return FALSE;
-}
-
-
-
-///////////////////////////////////////////////////////////////////////////////
-// Get Major version number for this hardware module
-//
-
-unsigned char vscp_getMajorVersion()
-{
- return FIRMWARE_MAJOR_VERSION;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// Get Minor version number for this hardware module
-//
-
-unsigned char vscp_getMinorVersion()
-{
- return FIRMWARE_MINOR_VERSION;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// Get Subminor version number for this hardware module
-//
-
-unsigned char vscp_getSubMinorVersion()
-{
- return FIRMWARE_SUB_MINOR_VERSION;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// getVSCP_GUID
-//
-// Get GUID from EEPROM
-//
-
-uint8_t vscp_getGUID( uint8_t idx )
-{
- return vscp_deviceGUID[ idx ];
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-// getDeviceURL
-//
-// Get device URL from EEPROM
-//
-
-uint8_t vscp_getMDF_URL( uint8_t idx )
-{
- return vscp_deviceURL[ idx ];
-}
-
-
-//////////////////////////////////////////////////////////////////////////////
-// Get Manufacturer id and subid from EEPROM
-//
-
-uint8_t vscp_getUserID( uint8_t idx )
-{
- return vscp_userID[ idx ];
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-// setVSCPUserID
-//
-
-void vscp_setUserID( uint8_t idx, uint8_t data )
-{
- // Normally this should be stired in EEPROM but
- // no EEPROM is available on this board so we just
- // ignore this request.
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// getVSCPManufacturerId
-//
-// Get Manufacturer id and subid from EEPROM
-//
-
-uint8_t vscp_getManufacturerId( uint8_t idx )
-{
- return vscp_ManufacturerDeviceID[ idx ];
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// setVSCPManufacturerId
-//
-// Set Manufacturer id and subid from EEPROM
-//
-
-void vscp_setManufacturerId( uint8_t idx, uint8_t data )
-{
- // Normally this should be stired in EEPROM but
- // no EEPROM is available on this board so we just
- // ignore this request.
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-// Get the bootloader algorithm code
-//
-
-uint8_t vscp_getBootLoaderAlgorithm( void )
-{
- return VSCP_BOOTLOADER_NONE;
-}
-
-
-//////////////////////////////////////////////////////////////////////////////
-// Get the buffer size
-//
-
-uint8_t vscp_getBufferSize( void )
-{
- return 8; // Standard CAN frame
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-// getNickname
-//
-
-uint8_t vscp_getNickname( void )
-{
- // Normally this should be stired in EEPROM but
- // no EEPROM is available on this board so we just
- // ignore this request and retrn the dynamically
- // assigned id.
- return eeprom_nickname;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-// setNickname
-//
-
-void vscp_setNickname( uint8_t nickname )
-{
- // Normally this should be stired in EEPROM but
- // no EEPROM is available on this board so we just
- // ignore this request and set the dynamically
- // assigned id.
- eeprom_nickname = nickname;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// getSegmentCRC
-//
-
-uint8_t vscp_getSegmentCRC( void )
-{
- // Normally this should be stired in EEPROM but
- // no EEPROM is available on this board so we just
- // ignore this request
- return eeprom_segmentCRC;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// setSegmentCRC
-//
-
-void vscp_setSegmentCRC( uint8_t crc )
-{
- // Normally this should be stired in EEPROM but
- // no EEPROM is available on this board so we just
- // ignore this request
- eeprom_segmentCRC = crc;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-// setVSCPControlByte
-//
-
-void vscp_setControlByte( uint8_t ctrl )
-{
- // Normally this should be stired in EEPROM but
- // no EEPROM is available on this board so we just
- // ignore this request
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-// getVSCPControlByte
-//
-
-uint8_t vscp_getControlByte( void )
-{
- // Normally this should be stired in EEPROM but
- // no EEPROM is available on this board so we just
- // ignore this request
- return 0;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////
-// getVSCPControlByte
-//
-
-uint8_t vscp_getPageSelect( uint8_t idx )
-{
- // No paging used so we ignore this
- return 0;
-}
-
-///////////////////////////////////////////////////////////////////////////////
-// getVSCPControlByte
-//
-
-void vscp_setPageSelect( uint8_t idx, uint8_t data )
-{
- // No paging used so we ignore this
-}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Deleted: trunk/firmware/arm/str/vscp_node_str73x_gcc/startup.s
===================================================================
--- trunk/firmware/arm/str/vscp_node_str73x_gcc/startup.s 2008-02-17 16:05:40 UTC (rev 849)
+++ trunk/firmware/arm/str/vscp_node_str73x_gcc/startup.s 2008-02-17 16:06:31 UTC (rev 850)
@@ -1,361 +0,0 @@
-/***********************************************************************************
-* Copyright 2005 Anglia Design
-* This demo code and associated components are provided as is and has no warranty,
-* implied or otherwise. You are free to use/modify any of the provided
-* code at your own risk in your applications with the expressed limitation
-* of liability (see below)
-*
-* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
-* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
-* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
-* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-*
-* Author : Spencer Oliver
-* Web : www.anglia-designs.com
-*
-***********************************************************************************/
-
-/**** Startup Code (executed after Reset) ****/
-
-/* Frequency values */
-/* set to suit target hardware */
-
- .equ FOSC, 4000000
- .equ FRTC, 2340000
-
-/* Standard definitions of Mode bits and Interrupt (I & F) flags in PSRs */
-
- .equ Mode_USR, 0x10
- .equ Mode_FIQ, 0x11
- .equ Mode_IRQ, 0x12
- .equ Mode_SVC, 0x13
- .equ Mode_ABT, 0x17
- .equ Mode_UND, 0x1B
- .equ Mode_SYS, 0x1F /* available on ARM Arch 4 and later */
-
- .equ I_Bit, 0x80 /* when I bit is set, IRQ is disabled */
- .equ F_Bit, 0x40 /* when F bit is set, FIQ is disabled */
-
-/* --- System memory locations */
-
- .equ EIC_Base_addr, 0xFFFFFC00 /* EIC base address */
- .equ ICR_off_addr, 0x00 /* Interrupt Control register offset */
- .equ CIPR_off_addr, 0x08 /* Current Interrupt Priority Register offset */
- .equ IVR_off_addr, 0x18 /* Interrupt Vector Register offset */
- .equ FIR_off_addr, 0x1C /* Fast Interrupt Register offset */
- .equ IER0_off_addr, 0x20 /* Interrupt Enable Register offset */
- .equ IER1_off_addr, 0x24 /* Interrupt Enable Register offset */
- .equ IPR0_off_addr, 0x40 /* Interrupt Pending Bit Register offset */
- .equ IPR1_off_addr, 0x44 /* Interrupt Pending Bit Register offset */
- .equ SIR0_off_addr, 0x60 /* Source Interrupt Register 0 */
-
- .equ CFG_R0_Addr, 0x40000000 /* Configuration Register 0 base address */
- .equ CFG_PCGR0_Addr, 0x40000008
-
- .equ FLASH_mask, 0x0000 /* to remap FLASH at 0x0 */
- .equ RAM_mask, 0x0001 /* to remap RAM at 0x0 */
-
-/* define remapping, if using ram based vectors or rom based
- REMAP will need to be define in vector.s aswell
- Valid Options:
- REMAP 0 - default config, no remapping, vectors in rom
- REMAP 1 - vectors in rom
- REMAP 2 - vectors in ram
-*/
-
-.ifndef REMAP
- .equ REMAP, 0
-.endif
-
-/* if we are debugging in ram then we need
- the vectors to point to the correct location
- only if BOOT0/BOOT1 have been set for Flash @ zero.
-*/
-
-.ifndef DBGRAM
- .equ DBGRAM, 0
-.endif
-
-/* Startup Code must be linked first at Address at which it expects to run. */
-
- .text
- .arm
- .section .init, "ax"
-
- .global _start
- .global RCCU_Main_Osc
- .global RCCU_RTC_Osc
-
-.if REMAP
-
-/* Exception Vector (before Remap) */
-
-/* Reset Handler */
-/* On reset, an aliased copy of ROM is at 0x0. */
-/* Continue execution from 'real' ROM rather than aliased copy */
-
- LDR pc, =HardReset
-HardReset:
-
-/******************************************************************************
-REMAPPING
-Description : Remapping memory whether RAM,FLASH or External memory
- at Address 0x0 after the application has started executing.
- Remapping is generally done to allow RAM to replace FLASH
- or EXTMEM at 0x0.
- the remapping of RAM allow copying of vector table into RAM
-******************************************************************************/
-
-.if REMAP == 1
- MOV r4, #FLASH_mask
-.endif
-
-.if REMAP == 2
- MOV r4, #RAM_mask
-.endif
-
-remap:
- LDR r1, =_vecstart /* r1 = start address from which to copy */
- LDR r3, =_vecend
- SUB r3, r3, r1 /* r3 = number of bytes to copy */
- LDR r0, =_vectext /* r0 = start address where to copy */
-copy_ram:
- LDR r2, [r0], #4 /* Read a word from the source */
- STR r2, [r1], #4 /* copy the word to destination */
- SUBS r3, r3, #4 /* Decrement number of words to copy */
- BNE copy_ram
-
- LDR r1, =CFG_R0_Addr
- LDR r0, [r1]
- BIC r0, r0, #0x01
- ORR r0, r0, r4
- STR r0, [r1]
-.endif
-
-/* After remap this will be our reset handler */
-
-_start:
- LDR pc, =NextInst
-NextInst:
-
- NOP /* Wait for OSC stabilization */
- NOP
- NOP
- NOP
- NOP
- NOP
- NOP
- NOP
- NOP
-
-/* Reset all peripheral clocks except RAM */
-
- MOV r0, #1
- LDR r1, =CFG_PCGR0_Addr
- STR r0, [r1]
- MOV r0, #0
- STR r0, [r1,#4]
-
-.if DBGRAM
- LDR r1, =CFG_R0_Addr
- LDR r0, [r1]
- ORR r0, r0, #RAM_mask
- STR r0, [r1]
-.endif
-
-/* Setup Stack for each mode */
-
-/* Enter Abort Mode and set its Stack Pointer */
- MSR cpsr_c, #Mode_ABT|I_Bit|F_Bit
- LDR sp, =__stack_abt_end__
-
-/* Enter Undefined Instruction Mode and set its Stack Pointer */
- MSR cpsr_c, #Mode_UND|I_Bit|F_Bit
- LDR sp, =__stack_und_end__
-
-/* Enter Supervisor Mode and set its Stack Pointer */
- MSR cpsr_c, #Mode_SVC|I_Bit|F_Bit
- LDR sp, =__stack_svc_end__
-
-/* Enter FIQ Mode and set its Stack Pointer */
- MSR cpsr_c, #Mode_FIQ|I_Bit|F_Bit
- LDR sp, =__stack_fiq_end__
-
-/* Enter IRQ Mode and set its Stack Pointer */
- MSR cpsr_c, #Mode_IRQ|I_Bit|F_Bit
- LDR sp, =__stack_irq_end__
-
-/* Enter System Mode and set its Stack Pointer */
- MSR cpsr_c, #Mode_SYS
- LDR sp, =__stack_end__
-
-/* Setup a default Stack Limit (when compiled with "-mapcs-stack-check") */
- LDR sl, =__bss_end__
-
-/******************************************************************************
-EIC initialization
-Description : Initialize the EIC as following :
- - IRQ disabled
- - FIQ disabled
- - IVR contain the load PC opcode (0xF59FF00)
- - Current priority level equal to 0
- - All channels are disabled
- - All channels priority equal to 0
- - All SIR registers contain offset to the related IRQ table entry
-******************************************************************************/
-
-/* enable eic clock */
-
- LDR r1, =CFG_PCGR0_Addr
- LDR r0, [r1]
- ORR r0, r0, #0x20000000
- STR r0, [r1]
-
-/* Wait for EIC stabilization */
-
- NOP
- NOP
- NOP
- NOP
- NOP
- NOP
- NOP
- NOP
-
-EIC_INIT:
- LDR r3, =EIC_Base_addr
- LDR r4, =0x00000000
- STR r4, [r3, #ICR_off_addr] /* Disable FIQ and IRQ */
- STR r4, [r3, #IER0_off_addr] /* Disable all channels interrupts */
- STR r4, [r3, #IER1_off_addr] /* Disable all channels interrupts */
- LDR ...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-17 16:05:46
|
Revision: 849
http://can.svn.sourceforge.net/can/?rev=849&view=rev
Author: akhe
Date: 2008-02-17 08:05:40 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
Modified Paths:
--------------
trunk/firmware/arm/str/vscp_node_str73x_gcc/Makefile
Added Paths:
-----------
trunk/firmware/arm/str/vscp_node_str73x_gcc/project/Makefile
trunk/firmware/arm/str/vscp_node_str73x_gcc/project/Readme.txt
trunk/firmware/arm/str/vscp_node_str73x_gcc/project/STR73x-RAM.ld
trunk/firmware/arm/str/vscp_node_str73x_gcc/project/STR73x-ROM.ld
trunk/firmware/arm/str/vscp_node_str73x_gcc/project/main.c
trunk/firmware/arm/str/vscp_node_str73x_gcc/project/startup.s
trunk/firmware/arm/str/vscp_node_str73x_gcc/project/vector.s
trunk/firmware/arm/str/vscp_node_str73x_gcc/project/vectors.c
trunk/firmware/arm/str/vscp_node_str73x_gcc/project/vectors.h
trunk/firmware/arm/str/vscp_node_str73x_gcc/project/vscp_compiler.h
trunk/firmware/arm/str/vscp_node_str73x_gcc/project/vscp_projdefs.h
trunk/firmware/arm/str/vscp_node_str73x_gcc/project/vscpnode.pnproj
trunk/firmware/arm/str/vscp_node_str73x_gcc/project/vscpnode.pnps
Modified: trunk/firmware/arm/str/vscp_node_str73x_gcc/Makefile
===================================================================
--- trunk/firmware/arm/str/vscp_node_str73x_gcc/Makefile 2008-02-17 15:47:03 UTC (rev 848)
+++ trunk/firmware/arm/str/vscp_node_str73x_gcc/Makefile 2008-02-17 16:05:40 UTC (rev 849)
@@ -350,19 +350,14 @@
# specify the directory where openocd executable resides (openocd-ftd2xx.exe or openocd-pp.exe)
# Note: you may have to adjust this if a newer version of YAGARTO has been downloaded
-OPENOCD_DIR = 'C:\Program Files\openocd-r247\bin\'
+#OPENOCD_DIR = 'C:\Program Files\openocd-r247\bin\'
# specify OpenOCD executable (pp is for the wiggler, ftd2xx is for the USB debugger)
#OPENOCD = $(OPENOCD_DIR)openocd-pp.exe
OPENOCD = $(OPENOCD_DIR)openocd-ftd2xx.exe
# specify OpenOCD configuration file (pick the one for your device)
-#OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_signalyzer-flash-program.cfg
-#OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_jtagkey-flash-program.cfg
-#OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_armusbocd-flash-program.cfg
-#OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_pp-flash-program.cfg
-#OPENOCD_CFG = "D:\development\armdev\str73x open source development\Code\Windows\openocd-configs\str73x-configs\str73x_jtagkey-flash-program.cfg"
-OPENOCD_CFG = "c:\str73x_jtagkey-flash-program.cfg"
+OPENOCD_CFG = l:/str73x-configs/str73x_jtagkey-flash-program.cfg
program:
@echo
Added: trunk/firmware/arm/str/vscp_node_str73x_gcc/project/Makefile
===================================================================
--- trunk/firmware/arm/str/vscp_node_str73x_gcc/project/Makefile (rev 0)
+++ trunk/firmware/arm/str/vscp_node_str73x_gcc/project/Makefile 2008-02-17 16:05:40 UTC (rev 849)
@@ -0,0 +1,495 @@
+# Hey Emacs, this is a -*- makefile -*-
+#
+# WinARM template makefile
+# by Giacomo Fazio and Antonio Nasca, Catania, Italy
+# <gia...@gm...>
+# <ant...@ho...>
+#
+# based on the WinARM template makefile written by Martin Thomas
+# Released to the Public Domain
+# Please read the make user manual!
+#
+#
+# On command line:
+#
+# make all = Make software.
+#
+# make clean = Clean out built project files.
+#
+# make program = Download the hex file to the device
+#
+# (TODO: make filename.s = Just compile filename.c into the assembler code only)
+#
+# To rebuild project do "make clean" then "make all".
+# Toolchain prefix (i.e arm-elf -> arm-elf-gcc.exe)
+TCHAIN = arm-elf
+#TCHAIN = arm-none-eabi
+
+#USE_THUMB_MODE = YES
+USE_THUMB_MODE = NO
+
+# MCU name and submodel
+MCU = arm7tdmi
+SUBMDL = STR73x
+
+## Create ROM-Image
+RUN_MODE=ROM_RUN
+## Create RAM-Image
+#RUN_MODE=RAM_RUN
+
+## not supported in this example:
+## Exception-Vector placement only supported for "ROM_RUN"
+## (placement settings ignored when using "RAM_RUN")
+## - Exception vectors in ROM:
+#VECTOR_LOCATION=VECTORS_IN_ROM
+## - Exception vectors in RAM:
+#VECTOR_LOCATION=VECTORS_IN_RAM
+
+
+# Target file name (without extension).
+TARGET = main
+
+# List C source files here. (C dependencies are automatically generated.)
+# use file-extension c for "c-only"-files
+SRC = $(TARGET).c ../common/73x_lcd.c ../common/sysTime.c ../common/delay.c j:/common/vscp.c
+
+# List C source files here which must be compiled in ARM-Mode.
+# use file-extension c for "c-only"-files
+SRCARM = vectors.c
+# thumb is possible too for vectors.c - keep ARM, TODO: profile
+
+# List C++ source files here.
+# use file-extension cpp for C++-files (use extension .cpp)
+CPPSRC =
+
+# List C++ source files here which must be compiled in ARM-Mode.
+# use file-extension cpp for C++-files (use extension .cpp)
+#CPPSRCARM = $(TARGET).cpp
+CPPSRCARM =
+
+# List Assembler source files here.
+# Make them always end in a capital .S. Files ending in a lowercase .s
+# will not be considered source files but generated files (assembler
+# output from the compiler), and will be deleted upon "make clean"!
+# Even though the DOS/Win* filesystem matches both .s and .S the same,
+# it will preserve the spelling of the filenames, and gcc itself does
+# care about how the name is spelled on its command-line.
+ASRC =
+
+# List Assembler source files here which must be assembled in ARM-Mode..
+ASRCARM = vector.S startup.S
+
+# Path to Linker-Scripts
+LINKERSCRIPTPATH = .
+
+## Output format. (can be ihex or binary or both)
+## (binary i.e. for openocd and SAM-BA, hex i.e. for lpc21isp and uVision)
+#FORMAT = ihex
+#FORMAT = binary
+FORMAT = both
+
+# Optimization level, can be [0, 1, 2, 3, s].
+# 0 = turn off optimization. s = optimize for size.
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
+#OPT = s
+OPT = 0
+
+## Using the Atmel AT91_lib produces warning with
+## the default warning-levels.
+## yes - disable these warnings; no - keep default settings
+#AT91LIBNOWARN = yes
+AT91LIBNOWARN = no
+
+# Debugging format.
+# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
+# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
+#DEBUG = stabs
+DEBUG = dwarf-2
+
+# Use the setenv_vscp.bat batch file in the root of VSCP to set
+# j: to point at the firmware folder.
+
+# List any extra directories to look for include files here.
+# Each directory must be seperated by a space.
+EXTRAINCDIRS = "K:/include" ../common/str73x_lib/include j:/common
+
+# List any extra directories to look for library files here.
+# Each directory must be seperated by a space.
+#EXTRA_LIBDIRS = ../arm7_efsl_0_2_4
+EXTRA_LIBDIRS = K:/lib ../common/str73x_lib
+
+
+# Compiler flag to set the C Standard level.
+# c89 - "ANSI" C
+# gnu89 - c89 plus GCC extensions
+# c99 - ISO C99 standard (not yet fully implemented)
+# gnu99 - c99 plus GCC extensions
+CSTANDARD = -std=gnu99
+
+# Place -D or -U options for C here
+CDEFS = -D$(RUN_MODE)
+
+# Place -I options here
+CINCS =
+
+# Place -D or -U options for ASM here
+ADEFS = -D$(RUN_MODE)
+
+ifdef VECTOR_LOCATION
+CDEFS += -D$(VECTOR_LOCATION)
+ADEFS += -D$(VECTOR_LOCATION)
+endif
+
+CDEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+ADEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+
+# Compiler flags.
+
+ifeq ($(USE_THUMB_MODE),YES)
+THUMB = -mthumb
+THUMB_IW = -mthumb-interwork
+else
+THUMB =
+THUMB_IW =
+endif
+
+# -g*: generate debugging information
+# -O*: optimization level
+# -f...: tuning, see GCC manual and avr-libc documentation
+# -Wall...: warning level
+# -Wa,...: tell GCC to pass this to the assembler.
+# -adhlns...: create assembler listing
+#
+# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
+CFLAGS = -g$(DEBUG)
+CFLAGS += $(CDEFS) $(CINCS)
+CFLAGS += -O$(OPT)
+CFLAGS += -Wall -Wcast-align -Wimplicit
+CFLAGS += -Wpointer-arith -Wswitch
+CFLAGS += -ffunction-sections -fdata-sections
+CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused
+CFLAGS += -Wa,-adhlns=$(subst $(suffix $<),.lst,$<)
+CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
+
+# flags only for C
+CONLYFLAGS += -Wnested-externs
+CONLYFLAGS += $(CSTANDARD)
+
+ifneq ($(AT91LIBNOWARN),yes)
+#AT91-lib warnings with:
+CFLAGS += -Wcast-qual
+CONLYFLAGS += -Wmissing-prototypes
+CONLYFLAGS += -Wstrict-prototypes
+CONLYFLAGS += -Wmissing-declarations
+endif
+
+# flags only for C++ (arm-elf-g++)
+# CPPFLAGS = -fno-rtti -fno-exceptions
+CPPFLAGS =
+
+# Assembler flags.
+# -Wa,...: tell GCC to pass this to the assembler.
+# -ahlns: create listing
+# -g$(DEBUG): have the assembler create line number information
+ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG)
+
+
+#Additional libraries.
+
+# Extra libraries
+# Each library-name must be seperated by a space.
+# To add libxyz.a, libabc.a and libefsl.a:
+# EXTRA_LIBS = xyz abc efsl
+#EXTRA_LIBS = efsl
+EXTRA_LIBS = STR73x_lib
+
+#Support for newlibc-lpc (file: libnewlibc-lpc.a)
+#NEWLIBLPC = -lnewlib-lpc
+
+MATH_LIB = -lm
+
+# CPLUSPLUS_LIB = -lstdc++
+
+
+# Linker flags.
+# -Wl,...: tell GCC to pass this to linker.
+# -Map: create map file
+# --cref: add cross reference to map file
+LDFLAGS = -nostartfiles -Wl,-Map=$(TARGET).map,--cref,--gc-sections
+LDFLAGS += -lc
+LDFLAGS += $(NEWLIBLPC) $(MATH_LIB)
+LDFLAGS += -lc -lgcc
+LDFLAGS += $(CPLUSPLUS_LIB)
+LDFLAGS += $(patsubst %,-L%,$(EXTRA_LIBDIRS))
+LDFLAGS += $(patsubst %,-l%,$(EXTRA_LIBS))
+
+# Set Linker-Script Depending On Selected Memory and Controller
+ifeq ($(RUN_MODE),RAM_RUN)
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-RAM.ld
+else
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-ROM.ld
+endif
+
+
+# Define directories, if needed.
+## DIRARM = c:/WinARM/
+## DIRARMBIN = $(DIRAVR)/bin/
+## DIRAVRUTILS = $(DIRAVR)/utils/bin/
+
+# Define programs and commands.
+SHELL = sh
+CC = $(TCHAIN)-gcc
+CPP = $(TCHAIN)-g++
+AR = $(TCHAIN)-ar
+OBJCOPY = $(TCHAIN)-objcopy
+OBJDUMP = $(TCHAIN)-objdump
+SIZE = $(TCHAIN)-size
+NM = $(TCHAIN)-nm
+REMOVE = rm -f
+REMOVEDIR = rm -f -r
+COPY = cp
+
+# Define Messages
+# English
+MSG_ERRORS_NONE = Errors: none
+MSG_BEGIN = "-------- begin (mode: $(RUN_MODE)) --------"
+MSG_END = -------- end --------
+MSG_SIZE_BEFORE = Size before:
+MSG_SIZE_AFTER = Size after:
+MSG_FLASH = Creating load file for Flash:
+MSG_EXTENDED_LISTING = Creating Extended Listing:
+MSG_SYMBOL_TABLE = Creating Symbol Table:
+MSG_LINKING = Linking:
+MSG_COMPILING = Compiling C:
+MSG_COMPILING_ARM = "Compiling C (ARM-only):"
+MSG_COMPILINGCPP = Compiling C++:
+MSG_COMPILINGCPP_ARM = "Compiling C++ (ARM-only):"
+MSG_ASSEMBLING = Assembling:
+MSG_ASSEMBLING_ARM = "Assembling (ARM-only):"
+MSG_CLEANING = Cleaning project:
+MSG_FORMATERROR = Can not handle output-format
+MSG_LPC21_RESETREMINDER = You may have to bring the target in bootloader-mode now.
+
+# Define all object files.
+COBJ = $(SRC:.c=.o)
+AOBJ = $(ASRC:.S=.o)
+COBJARM = $(SRCARM:.c=.o)
+AOBJARM = $(ASRCARM:.S=.o)
+CPPOBJ = $(CPPSRC:.cpp=.o)
+CPPOBJARM = $(CPPSRCARM:.cpp=.o)
+
+# Define all listing files.
+LST = $(ASRC:.S=.lst) $(ASRCARM:.S=.lst) $(SRC:.c=.lst) $(SRCARM:.c=.lst)
+LST += $(CPPSRC:.cpp=.lst) $(CPPSRCARM:.cpp=.lst)
+
+# Compiler flags to generate dependency files.
+### GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,.dep/$(@F).d
+GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
+
+# Combine all necessary flags and optional flags.
+# Add target processor to flags.
+ALL_CFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. $(CFLAGS) $(GENDEPFLAGS)
+ALL_ASFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. -x assembler-with-cpp $(ASFLAGS)
+
+
+# Default target.
+all: begin gccversion sizebefore build sizeafter finished end
+
+ifeq ($(FORMAT),ihex)
+build: elf hex lss sym
+hex: $(TARGET).hex
+IMGEXT=hex
+else
+ifeq ($(FORMAT),binary)
+build: elf bin lss sym
+bin: $(TARGET).bin
+IMGEXT=bin
+else
+ifeq ($(FORMAT),both)
+build: elf hex bin lss sym
+hex: $(TARGET).hex
+bin: $(TARGET).bin
+else
+$(error "$(MSG_FORMATERROR) $(FORMAT)")
+endif
+endif
+endif
+
+elf: $(TARGET).elf
+lss: $(TARGET).lss
+sym: $(TARGET).sym
+
+# Eye candy.
+begin:
+ @echo
+ @echo $(MSG_BEGIN)
+
+finished:
+ @echo $(MSG_ERRORS_NONE)
+
+end:
+ @echo $(MSG_END)
+ @echo
+
+
+# Display size of file.
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
+ELFSIZE = $(SIZE) -A $(TARGET).elf
+sizebefore:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
+
+sizeafter:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
+
+
+# Display compiler version information.
+gccversion :
+ @$(CC) --version
+
+# FLASH Programming with OPENOCD
+
+# specify the directory where openocd executable resides (openocd-ftd2xx.exe or openocd-pp.exe)
+# Note: you may have to adjust this if a newer version of YAGARTO has been downloaded
+#OPENOCD_DIR = 'C:\Program Files\openocd-r247\bin\'
+
+# specify OpenOCD executable (pp is for the wiggler, ftd2xx is for the USB debugger)
+#OPENOCD = $(OPENOCD_DIR)openocd-pp.exe
+OPENOCD = $(OPENOCD_DIR)openocd-ftd2xx.exe
+
+# specify OpenOCD configuration file (pick the one for your device)
+OPENOCD_CFG = l:/str73x-configs/str73x_jtagkey-flash-program.cfg
+
+program:
+ @echo
+ @echo "Flash Programming with OpenOCD..."
+ $(OPENOCD) -f $(OPENOCD_CFG)
+ @echo
+ @echo
+ @echo "Flash Programming Finished."
+
+
+# Create final output file (.hex) from ELF output file.
+%.hex: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O ihex $< $@
+
+# Create final output file (.bin) from ELF output file.
+%.bin: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O binary $< $@
+
+
+# Create extended listing file from ELF output file.
+# testing: option -C
+%.lss: %.elf
+ @echo
+ @echo $(MSG_EXTENDED_LISTING) $@
+ $(OBJDUMP) -h -S -C $< > $@
+
+
+# Create a symbol table from ELF output file.
+%.sym: %.elf
+ @echo
+ @echo $(MSG_SYMBOL_TABLE) $@
+ $(NM) -n $< > $@
+
+
+# Link: create ELF output file from object files.
+.SECONDARY : $(TARGET).elf
+.PRECIOUS : $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+%.elf: $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+ @echo
+ @echo $(MSG_LINKING) $@
+ $(CC) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
+# $(CPP) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
+
+# Compile: create object files from C source files. ARM/Thumb
+$(COBJ) : %.o : %.c
+ @echo
+ @echo $(MSG_COMPILING) $<
+ $(CC) -c $(THUMB) $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C source files. ARM-only
+$(COBJARM) : %.o : %.c
+ @echo
+ @echo $(MSG_COMPILING_ARM) $<
+ $(CC) -c $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM/Thumb
+$(CPPOBJ) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP) $<
+ $(CPP) -c $(THUMB) $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM-only
+$(CPPOBJARM) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP_ARM) $<
+ $(CPP) -c $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+
+# Compile: create assembler files from C source files. ARM/Thumb
+## does not work - TODO - hints welcome
+##$(COBJ) : %.s : %.c
+## $(CC) $(THUMB) -S $(ALL_CFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM/Thumb
+$(AOBJ) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING) $<
+ $(CC) -c $(THUMB) $(ALL_ASFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM-only
+$(AOBJARM) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING_ARM) $<
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@
+
+
+# Target: clean project.
+clean: begin clean_list finished end
+
+
+clean_list :
+ @echo
+ @echo $(MSG_CLEANING)
+ $(REMOVE) $(TARGET).hex
+ $(REMOVE) $(TARGET).bin
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).elf
+ $(REMOVE) $(TARGET).map
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).a90
+ $(REMOVE) $(TARGET).sym
+ $(REMOVE) $(TARGET).lnk
+ $(REMOVE) $(TARGET).lss
+ $(REMOVE) $(COBJ)
+ $(REMOVE) $(CPPOBJ)
+ $(REMOVE) $(AOBJ)
+ $(REMOVE) $(COBJARM)
+ $(REMOVE) $(CPPOBJARM)
+ $(REMOVE) $(AOBJARM)
+ $(REMOVE) $(LST)
+ $(REMOVE) $(SRC:.c=.s)
+ $(REMOVE) $(SRC:.c=.d)
+ $(REMOVE) $(SRCARM:.c=.s)
+ $(REMOVE) $(SRCARM:.c=.d)
+ $(REMOVE) $(CPPSRC:.cpp=.s)
+ $(REMOVE) $(CPPSRC:.cpp=.d)
+ $(REMOVE) $(CPPSRCARM:.cpp=.s)
+ $(REMOVE) $(CPPSRCARM:.cpp=.d)
+ $(REMOVEDIR) .dep | exit 0
+
+
+# Include the dependency files.
+-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
+
+
+# Listing of phony targets.
+.PHONY : all begin finish end sizebefore sizeafter gccversion \
+build elf hex bin lss sym clean clean_list program
+
Added: trunk/firmware/arm/str/vscp_node_str73x_gcc/project/Readme.txt
===================================================================
--- trunk/firmware/arm/str/vscp_node_str73x_gcc/project/Readme.txt (rev 0)
+++ trunk/firmware/arm/str/vscp_node_str73x_gcc/project/Readme.txt 2008-02-17 16:05:40 UTC (rev 849)
@@ -0,0 +1,18 @@
+Simple CAN test sample
+====================
+
+Ake Hedman, D of Scandinavia ak...@do..., http://www.dofscandinavia.com
+
+This file is built for the IAR str73x test board.
+
+The sample code send a CAN frame every 500 ms and display a "RECEIVE CAN MESSAGE"
+on the second line of the LCD if a CAN message with id 0x123, length=4 and
+data=1,2,4,8 is received. If another msg is received the line is cleared.
+
+CAN bitrate is 500 kbps.
+
+Based on a sample from ST
+
+
+- Button 1 is init button.
+- LED 0 is status LED
\ No newline at end of file
Added: trunk/firmware/arm/str/vscp_node_str73x_gcc/project/STR73x-RAM.ld
===================================================================
--- trunk/firmware/arm/str/vscp_node_str73x_gcc/project/STR73x-RAM.ld (rev 0)
+++ trunk/firmware/arm/str/vscp_node_str73x_gcc/project/STR73x-RAM.ld 2008-02-17 16:05:40 UTC (rev 849)
@@ -0,0 +1,228 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/* Stack Sizes */
+
+ _STACKSIZE = 1024;
+ _STACKSIZE_IRQ = 256;
+ _STACKSIZE_FIQ = 256;
+ _STACKSIZE_SVC = 0;
+ _STACKSIZE_ABT = 0;
+ _STACKSIZE_UND = 0;
+ _HEAPSIZE = 1024;
+
+/* Memory Definitions */
+
+MEMORY
+{
+ DATA (rw) : ORIGIN = 0xA0000000, LENGTH = 0x00004000
+}
+
+/* Section Definitions */
+
+SECTIONS
+{
+ /* first section is .text which is used for code */
+
+ .text :
+ {
+ KEEP(*(.vectrom))
+ KEEP(*(.init))
+ *(.text .text.*)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7t .glue_7)
+ KEEP(*(.fini))
+ *(.gcc_except_table)
+ } >DATA =0
+ . = ALIGN(4);
+
+ /* .ctors .dtors are used for c++ constructors/destructors */
+
+ .ctors :
+ {
+ PROVIDE(__ctors_start__ = .);
+ KEEP(*(SORT(.ctors.*)))
+ KEEP(*(.ctors))
+ PROVIDE(__ctors_end__ = .);
+ } >DATA
+
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ } >DATA
+
+ /* .rodata section which is used for read-only data (constants) */
+
+ .rodata :
+ {
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.r.*)
+ } >DATA
+ . = ALIGN(4);
+
+ _vectext = .;
+ PROVIDE (vectext = .);
+
+ .vect : AT (_vectext)
+ {
+ _vecstart = .;
+ KEEP(*(.vectram))
+ _vecend = .;
+ } >DATA
+
+ _etext = _vectext + SIZEOF(.vect);
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+
+ .data : AT (_etext)
+ {
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ SORT(CONSTRUCTORS)
+ } >DATA
+ . = ALIGN(4);
+
+ __data_start = .;
+ _edata = .;
+ PROVIDE (edata = .);
+
+ /* .bss section which is used for uninitialized data */
+
+ .bss :
+ {
+ __bss_start = .;
+ __bss_start__ = .;
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(4);
+ } >DATA
+ . = ALIGN(4);
+ __bss_end__ = .;
+
+ _end = .;
+ PROVIDE(end = .);
+
+ /* .heap section which is used for memory allocation */
+
+ .heap (NOLOAD) :
+ {
+ __heap_start__ = .;
+ *(.heap)
+ . = MAX(__heap_start__ + _HEAPSIZE , .);
+ } >DATA
+ __heap_end__ = __heap_start__ + SIZEOF(.heap);
+
+ /* .stack section - user mode stack */
+
+ .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_start__ = .;
+ *(.stack)
+ . = MAX(__stack_start__ + _STACKSIZE , .);
+ } >DATA
+ __stack_end__ = __stack_start__ + SIZEOF(.stack);
+
+ /* .stack_irq section */
+
+ .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_irq_start__ = .;
+ *(.stack_irq)
+ . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
+ } >DATA
+ __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
+
+ /* .stack_fiq section */
+
+ .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_fiq_start__ = .;
+ *(.stack_fiq)
+ . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
+ } >DATA
+ __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
+
+ /* .stack_svc section */
+
+ .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_svc_start__ = .;
+ *(.stack_svc)
+ . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
+ } >DATA
+ __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
+
+ /* .stack_abt section */
+
+ .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_abt_start__ = .;
+ *(.stack_abt)
+ . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
+ } >DATA
+ __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
+
+ /* .stack_und section */
+
+ .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_und_start__ = .;
+ *(.stack_und)
+ . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
+ } >DATA
+ __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
+
Added: trunk/firmware/arm/str/vscp_node_str73x_gcc/project/STR73x-ROM.ld
===================================================================
--- trunk/firmware/arm/str/vscp_node_str73x_gcc/project/STR73x-ROM.ld (rev 0)
+++ trunk/firmware/arm/str/vscp_node_str73x_gcc/project/STR73x-ROM.ld 2008-02-17 16:05:40 UTC (rev 849)
@@ -0,0 +1,231 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/* Stack Sizes */
+
+ _STACKSIZE = 1024;
+ _STACKSIZE_IRQ = 256;
+ _STACKSIZE_FIQ = 256;
+ _STACKSIZE_SVC = 0;
+ _STACKSIZE_ABT = 0;
+ _STACKSIZE_UND = 0;
+ _HEAPSIZE = 1024;
+
+/* Memory Definitions */
+
+MEMORY
+{
+ CODE (rx) : ORIGIN = 0x80000000, LENGTH = 0x00040000
+ DATA (rw) : ORIGIN = 0xA0000000, LENGTH = 0x00004000
+}
+
+/* Section Definitions */
+
+SECTIONS
+{
+ /* first section is .text which is used for code */
+
+ .text :
+ {
+ KEEP(*(.vectrom))
+ KEEP(*(.init))
+ *(.text .text.*)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7t .glue_7)
+ KEEP(*(.fini))
+ *(.gcc_except_table)
+ } >CODE =0
+ . = ALIGN(4);
+
+ /* .ctors .dtors are used for c++ constructors/destructors */
+
+ .ctors :
+ {
+ PROVIDE(__ctors_start__ = .);
+ KEEP(*(SORT(.ctors.*)))
+ KEEP(*(.ctors))
+ PROVIDE(__ctors_end__ = .);
+ } >CODE
+
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ } >CODE
+
+ /* .rodata section which is used for read-only data (constants) */
+
+ .rodata :
+ {
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.r.*)
+ } >CODE
+ . = ALIGN(4);
+
+ _vectext = .;
+ PROVIDE (vectext = .);
+
+ .vect : AT (_vectext)
+ {
+ _vecstart = .;
+ KEEP(*(.vectram))
+ _vecend = .;
+ } >DATA
+
+ _etext = _vectext + SIZEOF(.vect);
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+
+ .data : AT (_etext)
+ {
+ __data_start = .;
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ SORT(CONSTRUCTORS)
+ . = ALIGN(4);
+ *(.fastrun .fastrun.*)
+ } >DATA
+ . = ALIGN(4);
+
+ _edata = .;
+ PROVIDE (edata = .);
+
+ /* .bss section which is used for uninitialized data */
+
+ .bss :
+ {
+ __bss_start = .;
+ __bss_start__ = .;
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(4);
+ } >DATA
+ . = ALIGN(4);
+ __bss_end__ = .;
+
+ _end = .;
+ PROVIDE(end = .);
+
+ /* .heap section which is used for memory allocation */
+
+ .heap (NOLOAD) :
+ {
+ __heap_start__ = .;
+ *(.heap)
+ . = MAX(__heap_start__ + _HEAPSIZE , .);
+ } >DATA
+ __heap_end__ = __heap_start__ + SIZEOF(.heap);
+
+ /* .stack section - user mode stack */
+
+ .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_start__ = .;
+ *(.stack)
+ . = MAX(__stack_start__ + _STACKSIZE , .);
+ } >DATA
+ __stack_end__ = __stack_start__ + SIZEOF(.stack);
+
+ /* .stack_irq section */
+
+ .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_irq_start__ = .;
+ *(.stack_irq)
+ . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
+ } >DATA
+ __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
+
+ /* .stack_fiq section */
+
+ .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_fiq_start__ = .;
+ *(.stack_fiq)
+ . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
+ } >DATA
+ __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
+
+ /* .stack_svc section */
+
+ .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_svc_start__ = .;
+ *(.stack_svc)
+ . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
+ } >DATA
+ __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
+
+ /* .stack_abt section */
+
+ .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_abt_start__ = .;
+ *(.stack_abt)
+ . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
+ } >DATA
+ __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
+
+ /* .stack_und section */
+
+ .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_und_start__ = .;
+ *(.stack_und)
+ . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
+ } >DATA
+ __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
+
Added: trunk/firmware/arm/str/vscp_node_str73x_gcc/project/main.c
===================================================================
--- trunk/firmware/arm/str/vscp_node_str73x_gcc/project/main.c (rev 0)
+++ trunk/firmware/arm/str/vscp_node_str73x_gcc/project/main.c 2008-02-17 16:05:40 UTC (rev 849)
@@ -0,0 +1,1017 @@
+/* ******************************************************************************
+ * VSCP (Very Simple Control Protocol)
+ * http://www.vscp.org
+ *
+ * IAR STR 73x demo board Module
+ * Version information in version.h
+ * ak...@do...
+ *
+ * Copyright (C) 1995-2008 Ake Hedman,
+ * D of Scandinavia, <ak...@do...>
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty. In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ * claim that you wrote the original software. If you use this software
+ * in a product, an acknowledgment in the product documentation would be
+ * appreciated but is not required.
+ * 2. Altered source versions must be plainly marked as such, and must not be
+ * misrepresented as being the original software.
+ * 3. This notice may not be removed or altered from any source distribution.
+ *
+ * This file is part of VSCP - Very Simple Control Protocol
+ * http://www.vscp.org
+ *
+ * ******************************************************************************/
+
+#include "73x_lib.h"
+#include "../common/73x_lcd.h"
+#include "../common/systime.h"
+#include "../common/delay.h"
+#include <inttypes.h>
+#include <vscp.h>
+#include <vscp_class.h>
+#include <vscp_type.h>
+#include "vscp_compiler.h" // This file should be in your project folder
+#include "vscp_projdefs.h" // This file should be in your project folder
+
+
+// Prototypes
+void wait( void );
+void MCLK_Config (void);
+void CAN0_Demo_Polling( void );
+void CAN0_Demo_Interrupt(void);
+
+void init( void );
+void init_app_eeprom( void );
+void init_app_ram( void );
+
+void doWork( void );
+
+void read_app_register( unsigned char reg );
+void write_app_register( unsigned char reg, unsigned char val );
+
+unsigned int get1000Digit( unsigned int val );
+unsigned int get100Digit( unsigned int val );
+unsigned int get10Digit( unsigned int val );
+unsigned int get1Digit( unsigned int val );
+
+// Peripherals Init Structures
+GPIO_InitTypeDef GPIO0_InitStructure;
+GPIO_InitTypeDef GPIO3_InitStructure;
+ADC_InitTypeDef ADC_InitStructure;
+CMU_InitTypeDef CMU_InitStructure;
+RTC_InitTypeDef RTC_InitStructure;
+
+GPIO_InitTypeDef CAN0_RX;
+GPIO_InitTypeDef CAN0_TX;
+GPIO_InitTypeDef CAN1_RX;
+GPIO_InitTypeDef CAN1_TX;
+GPIO_InitTypeDef CAN2_RX;
+GPIO_InitTypeDef CAN2_TX;
+GPIO_InitTypeDef Led_Config;
+GPIO_InitTypeDef Button_Config;
+
+// VSCP Module firmware version
+#define FIRMWARE_MAJOR_VERSION 0;
+#define FIRMWARE_MINOR_VERSION 0;
+#define FIRMWARE_SUB_MINOR_VERSION 1;
+
+
+enum {
+ CAN0_TX_MSGOBJ = 0,
+ CAN0_RX_MSGOBJ0,
+ CAN0_RX_MSGOBJ1,
+ CAN0_RX_MSGOBJ2,
+ CAN0_RX_MSGOBJ3,
+ CAN0_RX_MSGOBJ4,
+ CAN0_RX_MSGOBJ5,
+ CAN0_RX_MSGOBJ6,
+ CAN0_RX_MSGOBJ7,
+ CAN0_RX_MSGOBJ8,
+ CAN0_RX_MSGOBJ9,
+ CAN0_RX_MSGOBJ10,
+ CAN0_RX_MSGOBJ11,
+ CAN0_RX_MSGOBJ12,
+ CAN0_RX_MSGOBJ13,
+ CAN0_RX_MSGOBJ14,
+ CAN0_RX_MSGOBJ15,
+ CAN0_RX_MSGOBJ16,
+ CAN0_RX_MSGOBJ17,
+ CAN0_RX_MSGOBJ18,
+ CAN0_RX_MSGOBJ19,
+ CAN0_RX_MSGOBJ20,
+ CAN0_RX_MSGOBJ21,
+ CAN0_RX_MSGOBJ22,
+ CAN0_RX_MSGOBJ23,
+ CAN0_RX_MSGOBJ24,
+ CAN0_RX_MSGOBJ25,
+ CAN0_RX_MSGOBJ26,
+ CAN0_RX_MSGOBJ27,
+ CAN0_RX_MSGOBJ28,
+ CAN0_RX_MSGOBJ29
+};
+
+u16 potentiometer_ad_Value = 0;
+u16 termistor_ad_Value = 0;
+
+// The device URL (max 32 characters including null termination)
+const char vscp_deviceURL[] = "www.dofscandinavia.com/demo73x_001.xml";
+
+// The device GUID
+const char vscp_deviceGUID[] = { 0x01, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0xff
+ };
+
+// The device USER id - normally in EEPROM
+const char vscp_userID[] = { 0x10, 0x20, 0x30, 0x40, 0x50 };
+
+// The device manufacturer id - normally in EEPROM
+const char vscp_ManufacturerDeviceID[] = { 0x11, 0x20, 0x30, 0x40,
+ 0x64, 0x65, 0x40, 0x00 };
+
+// Simulated eeprom storage
+uint8_t eeprom_nickname;
+uint8_t eeprom_segmentCRC;
+
+volatile unsigned long measurement_clock; // Clock for measurments
+
+uint8_t seconds; // counter for seconds
+uint8_t minutes; // counter for minutes
+uint8_t hours; // Counter for hours
+
+
+int main(void)
+{
+
+#ifdef LIBDEBUG
+ libdebug();
+#endif
+
+
+
+ init(); // Initialize Microcontroller
+
+
+
+ // Check VSCP persistent storage and
+ // restore if needed
+ if ( !vscp_check_pstorage() ) {
+
+ // Spoiled or not initialized - reinitialize
+ init_app_eeprom();
+
+ }
+
+ vscp_init(); // Initialize the VSCP functionality
+
+
+
+ ///////////////
+ // Main LOOP //
+ ///////////////
+
+
+
+ while ( 1 ) {
+
+
+ if ( ( vscp_initbtncnt > 100 ) && ( VSCP_STATE_INIT != vscp_node_state ) ) {
+ // Init button pressed
+ vscp_nickname = VSCP_ADDRESS_FREE;
+ eeprom_nickname = VSCP_ADDRESS_FREE;
+ vscp_init();
+ }
+
+ // Check for any valid CAN message
+ vscp_imsg.flag = 0;
+ vscp_getEvent();
+
+ // do a meaurement if needed
+ if ( measurement_clock > 1000 ) {
+
+ measurement_clock = 0;
+ //doMeasurement();
+ seconds++;
+
+ if ( seconds > 59 ) {
+
+ seconds = 0;
+ minutes++;
+
+ if ( minutes > 59 ) {
+ minutes = 0;
+ hours++;
+ }
+
+ if ( hours > 23 ) hours = 0;
+
+ }
+ }
+
+ switch ( vscp_node_state ) {
+
+ case VSCP_STATE_STARTUP: // Cold/warm reset
+
+ LCD_SendString( "STARTUP ", 2, 1 );
+
+ // Get nickname from EEPROM
+ if ( VSCP_ADDRESS_FREE == vscp_nickname ) {
+ // new on segment need a nickname
+ vscp_node_state = VSCP_STATE_INIT;
+ }
+ else {
+ // been here before - go on
+ vscp_node_state = VSCP_STATE_ACTIVE;
+ vscp_active();
+ }
+ break;
+
+ case VSCP_STATE_INIT: // Assigning nickname
+ LCD_SendString( "INIT ", 2, 1 );
+ vscp_probe();
+ break;
+
+ case VSCP_STATE_PREACTIVE: // Waiting for host initialisation
+ LCD_SendString( "PRECATIVATE ", 2, 1 );
+ vscp_rcv_preactive();
+ break;
+
+ case VSCP_STATE_ACTIVE: // The normal state
+
+ LCD_SendString( "ACTIVE ", 2, 1 );
+
+ if ( vscp_imsg.flag & VSCP_VALID_MSG ) { // incoming event?
+
+ // Yes, incoming message
+ if ( VSCP_CLASS1_PROTOCOL == vscp_imsg.class ) {
+ switch( vscp_imsg.type ) {
+
+ case VSCP_TYPE_PROTOCOL_SEGCTRL_HEARTBEAT:
+ vscp_rcv_heartbeat();
+ break;
+
+ case VSCP_TYPE_PROTOCOL_NEW_NODE_ONLINE:
+ vscp_rcv_new_node_online();
+ break;
+
+ case VSCP_TYPE_PROTOCOL_SET_NICKNAME:
+ vscp_rcv_set_nickname();
+ break;
+
+ case VSCP_TYPE_PROTOCOL_DROP_NICKNAME:
+ vscp_rcv_drop_nickname();
+ break;
+
+ case VSCP_TYPE_PROTOCOL_READ_REGISTER:
+ if ( ( 2 == ( vscp_imsg.flag & 0x0f ) ) &&
+ ( vscp_nickname == vscp_imsg.data[ 0 ] ) ) {
+
+ if ( vscp_imsg.data[ 1 ] < 0x80 ) {
+ // Read application specific register
+ read_app_register( vscp_imsg.data[ 1 ] );
+ }
+ else {
+ // Read VSCP register
+ vscp_rcv_readreg();
+ }
+ }
+ break;
+
+ case VSCP_TYPE_PROTOCOL_WRITE_REGISTER:
+ if ( ( 3 == ( vscp_imsg.flag & 0x0f ) ) &&
+ ( vscp_nickname == vscp_imsg.data[ 0 ] ) ) {
+ if ( vscp_imsg.data[ 1 ] < 0x80 ) {
+ // Write application specific register
+ write_app_register( vscp_imsg.data[ 1 ], vscp_imsg.data[ 2 ] );
+ }
+ else {
+ // Read VSCP register
+ vscp_rcv_writereg();
+ }
+ }
+ break;
+
+ case VSCP_TYPE_PROTOCOL_ENTER_BOOT_LOADER:
+ // No bootloader implemented
+ vscp_omsg.flags = VSCP_VALID_MSG + 1 ; // one databyte
+ vscp_omsg.priority = VSCP_PRIORITY_HIGH;
+ vscp_omsg.class = VSCP_CLASS1_PROTOCOL;
+ vscp_omsg.type = VSCP_TYPE_PROTOCOL_NACK_BOOT_LOADER;
+ vscp_omsg.data[ 0 ] = 0x00;
+
+ // send the probe
+ vscp_sendEvent();
+ break;
+
+ default:
+ // Do work load
+ break;
+ }
+ } // class1 protocol
+ } // Incoming event
+ break;
+
+ case VSCP_STATE_ERROR: // Everything is *very* *very* bad.
+ LCD_SendString( "ERROR ", 2, 1 );
+ vscp_error();
+ break;
+
+ default: // Should not be here...
+ vscp_node_state = VSCP_STATE_STARTUP;
+ break;
+
+ } // switch
+
+ doWork();
+
+ } // while
+
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+// init
+//
+// Initialize the controller and pheriperals
+//
+
+void init( void )
+{
+ uint8_t i;
+
+ init_app_ram();
+
+ MCLK_Config();
+
+ // Enable clock on both CAN channels
+ CFG_PeripheralClockConfig( CFG_CLK_CAN0, ENABLE );
+ CFG_PeripheralClockConfig( CFG_CLK_CAN1, ENABLE );
+
+ CFG_PeripheralClockConfig( CFG_CLK_GPIO0, ENABLE );
+ CFG_PeripheralClockConfig( CFG_CLK_GPIO1, ENABLE );
+ CFG_PeripheralClockConfig( CFG_CLK_GPIO2, ENABLE );
+ CFG_PeripheralClockConfig( CFG_CLK_GPIO6, ENABLE );
+
+ Led_Config.GPIO_Mode = GPIO_Mode_OUT_PP;
+ Led_Config.GPIO_Pins = 0xFFFF;
+ GPIO_Init( GPIO0, &Led_Config );
+
+ // Configure ADC Pins
+ GPIO3_InitStructure.GPIO_Mode = GPIO_Mode_HI_AIN_TRI;
+ GPIO3_InitStructure.GPIO_Pins = GPIO_PIN_ALL;
+ GPIO_Init( GPIO3, &GPIO3_InitStructure );
+
+ // CAN 0 RC pin
+ CAN0_RX.GPIO_Mode = GPIO_Mode_IN_TRI_TTL;
+ CAN0_RX.GPIO_Pins = GPIO_PIN_14;
+ GPIO_Init( GPIO1, &CAN0_RX );
+
+ // CAN 0 TX pin
+ CAN0_TX.GPIO_Mode = GPIO_Mode_AF_PP;
+ CAN0_TX.GPIO_Pins = GPIO_PIN_15;
+ GPIO_Init( GPIO1, &CAN0_TX );
+
+ // CAN 1 RX pin
+ CAN1_RX.GPIO_Mode = GPIO_Mode_IN_TRI_TTL;
+ CAN1_RX.GPIO_Pins = GPIO_PIN_1;
+ GPIO_Init( GPIO2, &CAN1_RX );
+
+ // CAN 1 TX pin
+ CAN1_TX.GPIO_Mode = GPIO_Mode_AF_PP;
+ CAN1_TX.GPIO_Pins = GPIO_PIN_2;
+ GPIO_Init( GPIO2, &CAN1_TX );
+
+ // Init button
+ Button_Config.GPIO_Mode = GPIO_Mode_INOUT_WP;
+ Button_Config.GPIO_Pins = GPIO_PIN_10;
+ GPIO_Init( GPIO2, &Button_Config );
+
+ // Init 1 ms timebase
+ initTimebase2();
+
+ GPIO_WordWrite( GPIO0, 0x0000 ); // All LED's off
+
+ // * * * EIC * * *
+
+ // EIC Clock Enable
+ CFG_PeripheralClockConfig( CFG_CLK_EIC , ENABLE );
+
+ // EIC Config
+ EIC_IRQChannelPriorityConfig( RTC_IRQChannel, 1 );
+ EIC_IRQChannelPriorityConfig( TB2_IRQChannel, 2 );
+
+ //EIC_IRQChannelConfig( RTC_IRQChannel , ENABLE );
+
+
+ EIC_IRQCmd( ENABLE );
+
+ // * * * CMU * * *
+
+ // CMU Initialization
+ CMU_DeInit( );
+ CMU_StructInit(&CMU_InitStructure);
+
+ // Enable the external oscillator
+ CMU_InitStructure.CMU_CKSEL0 = CMU_CKSEL0_CKOSC;
+ CMU_Init(&CMU_InitStructure);
+
+ // Disable DIV2
+ PRCCU->CFR &= 0x7FFF;
+
+
+ // * * * RTC * * *
+
+ // Set RTC clock-------
+ // (clock:0-->9) fOSC=4Mhz/RTCP=(2,4,8,16,32,64,128,256,512,1024)
+ // -->EXTCLK=(4M,2M,1M,500K,250K,125K,62.5K,31.25K,15.625K,7.812K)
+
+
+ // RTC Clock Enable
+ CFG_PeripheralClockConfig( CFG_CLK_RTC , ENABLE );
+
+ // RTC Interrupt Config
+ RTC_ITConfig( RTC_IT_SEC | RTC_IT_ALA | RTC_IT_OV, ENABLE );
+
+ // RTC Configuration
+ RTC_InitStructure.RTC_Alarm = 6; // 0xFFFFFFFF;
+ RTC_InitStructure.RTC_Counter = 0; // 0xFFFFFFFA;
+ // configure RTC=1S ( RCK=1000000/64=CKL32=15625Hz )
+ // 8MHz/64 = 125000 = 0x1E848
+ RTC_InitStructure.RTC_Prescaler = 0x3D09; // == 15625
+ //RTC_InitStructure.RTC_Prescaler = 0x1E848; // 0x3D09; // == 15625
+
+ RTC_Init( &RTC_InitStructure );
+
+
+ // * * * CAN * * *
+ CAN_InitTypeDef CANInit = { 0x0, CAN_BITRATE_500K };
+
+ // initialize the CAN at a standard bitrate, interrupts disabled
+ CAN_Init( CAN0, &CANInit );
+
+ // configure the message objects
+ // Obj 0 used for TX
+ // obj 1-31 used for RX
+ CAN_EnterInitMode( CAN0, CAN_CR_CCE );
+ CAN_InvalidateAllMsgObj( CAN0 );
+ CAN_SetTxMsgObj( CAN0, CAN0_TX_MSGOBJ, CAN_EXT_ID );
+ for ( i=1; i<32; i++ ) {
+ CAN_SetRxMsgObj( CAN0, i, CAN_EXT_ID, 0, CAN_LAST_EXT_ID, TRUE );
+ }
+ CAN_LeaveInitMode( CAN0 );
+
+
+
+ // * * * LCD * * *
+
+ // LCD Configuration
+ LCD_Init();
+ LCD_Clear();
+
+ LCD_SetPosCur(1,1);
+
+ // Display text message on LCD: Line 1
+ LCD_SendString( "VSCP TEST NODE", 1, 1 );
+
+ LCD_SetPosCur(2,1);
+
+
+
+ // * * * ADC * * *
+
+
+ // ADC Clock Enable
+ CFG_PeripheralClockConfig(CFG_CLK_ADC, ENABLE);
+
+ // ADC Configuration
+ ADC_DeInit ();
+ ADC_StructInit( &ADC_InitStructure );
+ ADC_InitStructure.ADC_Calibration = ADC_Calibration_ON;
+ ADC_InitStructure.ADC_CalibAverage = ADC_CalibAverage_Enable;
+ ADC_InitStructure.ADC_AutoClockOff = ADC_AutoClockOff_Disable ;
+ ADC_InitStructure.ADC_ConversionMode = ADC_ConversionMode_Scan ;
+ ADC_InitStructure.ADC_SamplingPrescaler = 0x2;
+ ADC_InitStructure.ADC_ConversionPrescaler = 0x4;
+ ADC_InitStructure.ADC_FirstChannel = ADC_CHANNEL0 ;
+ ADC_InitStructure.ADC_ChannelNumber = 2;
+ ADC_Init( &ADC_InitStructure );
+
+
+ // EOC interrupt Enable
+ ADC_ITConfig( ADC_IT_EOC, ENABLE );
+
+ // Enable ADC
+ ADC_Cmd( ENABLE );
+
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+// init_app_ram
+//
+
+void init_app_ram( void )
+{
+ eeprom_nickname = VSCP_ADDRESS_FREE;
+ eeprom_segmentCRC = 0;
+}
+
+
+////////////////////////////////////////////////////////////////////////////////
+// init_app_eeprom
+//
+
+void init_app_eeprom( void )
+{
+ // Nothing to do as we are out of EEPROM
+}
+
+
+
+
+
+////////////////////////////////////////////////////////////////////////////////
+// get1000Digit
+//
+
+unsigned int get1000Digit( unsigned int val )
+{
+ return ( ( val / 1000 ) + 0x30 );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// get100Digit
+//
+
+unsigned int get100Digit( unsigned int val )
+{
+ unsigned int valCopy;
+ valCopy = val % 1000;
+ return ( (valCopy / 100 ) + 0x30 );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// get10Digit
+//
+
+unsigned int get10Digit( unsigned int val )
+{
+ unsigned int valCopy;
+ valCopy = val % 100;
+ return ( ( valCopy / 10 ) + 0x30 );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// get1Digit
+//
+
+unsigned int get1Digit( unsigned int val )
+{
+ unsigned int valCopy;
+ valCopy = val % 100;
+ return ( ( valCopy % 10 ) + 0x30 );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// wait
+//
+
+void wait( void )
+{
+ u32 i;
+
+ for (i=100000L; i!=0 ; i-- ) {}
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// MCLK_Config
+//
+
+void MCLK_Config (void)
+{
+
+ PRCCU_InitTypeDef Clock;
+ CMU_InitTypeDef ClockInit;
+
+ ClockInit.CMU_RCOscControl = 0x0D; // RC OSC Adjust
+ ClockInit.CMU_EndCountValue = 0x0F; //
+ ClockInit.CMU_FreqRef_High = 0xFF; //
+ ClockInit.CMU_FreqRef_Low = 0xFE; //
+
+ ClockInit.CMU_CKSEL0 = CMU_CKSEL0_CKOSC; // Clock for CLOCK1 (4MHz)
+ ClockInit.CMU_CKSEL1 = CMU_CKSEL1_CKPLL; // Clock for Freq. Meter (8MHz)
+ ClockInit.CMU_CKSEL2 = CMU_CKSEL2_CKOSC; // Clock to drive CMU logic
+
+ CMU_Lock( DISABLE );
+ CMU_Init( &ClockInit );
+
+ // Init. Power Reset Clock unit
+ // 4 MHz * 12 / 6 = 8 MHz = CLOCK2
+ Clock.PRCCU_DIV2 = DISABLE;
+ Clock.PRCCU_MCLKSRC_SRC = PRCCU_MCLKSRC_PLL; // Use PLL in
+ Clock.PRCCU_PLLDIV = PRCCU_PLLDIV_6;
+ Clock.PRCCU_PLLMUL = PRCCU_PLLMUL_12;
+
+ PRCCU_Init( &Clock );
+ PRCCU_SetExtClkDiv(4);
+
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+// APPLICATION
+//////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////
+// doWork
+//
+
+void doWork( void )
+{
+ char buffer[33];
+ u32 CPIO_Value;
+
+ // Start ADC conversion
+ ADC_ConversionCmd( ADC_ConversionStart );
+ buffer[8] = get1Digit( potentiometer_ad_Value );
+ buffer[7] = get10Digit( potentiometer_ad_Value );
+ buffer[6] = get100Digit( potentiometer_ad_Value );
+ buffer[5] = get1000Digit( potentiometer_ad_Value );
+ buffer[9] = 0;
+
+ // Display ADC conversion Value on LCD
+ LCD_SendString( &buffer[5], 2, 10 );
+ CPIO_Value = 0;
+
+ for ( u32 idx = (u32)((float)potentiometer_ad_Value/60); idx; idx--) {
+ CPIO_Value <<= 1;
+ CPIO_Value |= 1;
+ }
+
+ GPIO_WordWrite( GPIO0, CPIO_Value );
+
+ // Wait for 500 ms
+ //delay_ms( 500 );
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+// read_app_register
+//
+
+void read_app_register( unsigned char reg )
+{
+ // TODO
+
+ vscp_omsg.priority = VSCP_PRIORITY_MEDIUM;
+ vscp_omsg.flags = VSCP_VALID_MSG + 2;
+ vscp_omsg.class = VSCP_CLASS1_PROTOCOL;
+ vscp_omsg.type = VSCP_TYPE_PROTOCOL_RW_RESPONSE;
+
+ vscp_omsg.data[ 0 ] = reg;
+ vscp_omsg.data[ 1 ] = 0x00; // default read
+
+
+ // Send data
+ vscp_sendEvent();
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+// write_app_register
+//
+
+void write_app_register( unsigned char reg, unsigned char val )
+{
+ // TODO
+
+ vscp_omsg.priority = VSCP_PRIORITY_MEDIUM;
+ vscp_omsg.flags = VSCP_VALID_MSG + 2;
+ vscp_omsg.class = VSCP_CLASS1_PROTOCOL;
+ vscp_omsg.type = VSCP_TYPE_PROTOCOL_RW_RESPONSE;
+
+ vscp_omsg.data[ 0 ] = reg;
+ vscp_omsg.data[ 1 ] = ~val; // error return
+
+ // Send data
+ vscp_sendEvent();
+}
+
+
+
+
+///////////////////////////////////////////////////////////////////////////////
+// VSCP Required Methods
+//////////////////////////////////////////////////////////////////////////////
+
+
+////////////////////////////////////////////////////////////////////////////////
+// sendCANFrame
+//
+
+int8_t sendCANFrame( uint32_t id, uint8_t dlc, uint8_t *pdata )
+{
+ canmsg msg;
+
+ msg.IdType = CAN_EXT_ID;
+ msg.Id = id;
+ msg.Dlc = dlc;
+ memcpy( msg.Data, pdata, dlc );
+
+
+ // Send the frame frame
+ if ( !CAN_SendMessage( CAN0, CAN0_TX_MSGOBJ, &msg ) ) {
+ // Failed to send message
+ return FALSE;
+ }
+
+ // wait until end of transmission
+ CAN_WaitEndOfTx( CAN0 );
+
+ // release the TX message object
+ CAN_ReleaseTxMessage( CAN0, CAN0_TX_MSGOBJ );
+
+ vscp_omsg.flags = 0; // Out msg sent
+ return TRUE;
+}
+
+
+////////////////////////////////////////////////////////////////////////////////
+// getCANFrame
+//
+
+int8_t getCANFrame( uint32_t *pid, uint8_t *psize, uint8_t *pData )
+{
+ uint8_t i;
+ canmsg msg;
+
+ // Dont read in new message if there already is a message
+ // in the input buffer
+ if ( vscp_imsg.flag & VSCP_VALID_MSG ) return FALSE;
+
+ for ( i=1; i<32; i++ ) {
+
+ if ( CAN_ReceiveMessage( CAN0, i, TRUE, &msg ) ) {
+
+ // We already no this is an extended id so we dont't bother
+ // with that info.
+ *pid = msg.Id;
+ *psize = msg.Dlc;
+ memcpy( pData, msg.Data, msg.Dlc );
+
+ return TRUE;
+
+ }
+
+ }
+
+ return FALSE;
+}
+
+
+
+///////////////////////////////////////////////////////////////////////////////
+// Get Major version number for this hardware module
+//
+
+unsigned char vscp_getMajorVersion()
+{
+ return FIRMWARE_MAJOR_VERSION;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Get Minor version number for this hardware module
+//
+
+unsigned char vscp_getMinorVersion()
+{
+ return FIRMWARE_MINOR_VERSION;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Get Subminor version number for this hardware module
+//
+
+unsigned char vscp_getSubMinorVersion()
+{
+ return FIRMWARE_SUB_MINOR_VERSION;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// getVSCP_GUID
+//
+// Get GUID from EEPROM
+//
+
+uint8_t vscp_getGUID( uint8_t idx )
+{
+ return vscp_deviceGUID[ idx ];
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+// getDeviceURL
+//
+// Get device URL from EEPROM
+//
+
+uint8_t vscp_getMDF_URL( uint8_t idx )
+{
+ return vscp_deviceURL[ idx ];
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Get Manufacturer id and subid from EEPROM
+//
+
+uint8_t vscp_getUserID( uint8_t idx )
+{
+ return vscp_userID[ idx ];
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+// setVSCPUserID
+//
+
+void vscp_setUserID( uint8_t idx, uint8_t data )
+{
+ // Normally this should be stired in EEPROM but
+ // no EEPROM is available on this board so we just
+ // ignore this request.
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// getVSCPManufacturerId
+//
+// Get Manufacturer id and subid from EEPROM
+//
+
+uint8_t vscp_getManufacturerId( uint8_t idx )
+{
+ return vscp_ManufacturerDeviceID[ idx ];
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// setVSCPManufacturerId
+//
+// Set Manufacturer id and subid from EEPROM
+//
+
+void vscp_setManufacturerId( uint8_t idx, uint8_t data )
+{
+ // Normally this should be stired in EEPROM but
+ // no EEPROM is available on this board so we just
+ // ignore this request.
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+// Get the bootloader algorithm code
+//
+
+uint8_t vscp_getBootLoaderAlgorithm( void )
+{
+ return VSCP_BOOTLOADER_NONE;
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+// Get the buffer size
+//
+
+uint8_t vscp_getBufferSize( void )
+{
+ return 8; // Standard CAN frame
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+// getNickname
+//
+
+uint8_t vscp_getNickname( void )
+{
+ // Normally this should be stired in EEPROM but
+ // no EEPROM is available on this board so we just
+ // ignore this request and retrn the dynamically
+ // assigned id.
+ return eeprom_nickname;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+// setNickname
+//
+
+void vscp_setNickname( uint8_t nickname )
+{
+ // Normally this should be stired in EEPROM but
+ // no EEPROM is available on this board so we just
+ // ignore this request and set the dynamically
+ // assigned id.
+ eeprom_nickname = nickname;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// getSegmentCRC
+//
+
+uint8_t vscp_getSegmentCRC( void )
+{
+ // Normally this should be stired in EEPROM but
+ // no EEPROM is available on this board so we just
+ // ignore this request
+ return eeprom_segmentCRC;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// setSegmentCRC
+//
+
+void vscp_setSegmentCRC( uint8_t crc )
+{
+ // Normally this should be stired in EEPROM but
+ // no EEPROM is available on this board so we just
+ // ignore this request
+ eeprom_segmentCRC = crc;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+// setVSCPControlByte
+//
+
+void vscp_setControlByte( uint8_t ctrl )
+{
+ // Normally this should be stired in EEPROM but
+ // no EEPROM is available on this board so we just
+ // ignore this request
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+// getVSCPControlByte
+//
+
+uint8_t vscp_getControlByte( void )
+{
+ // Normally this should be stired in EEPROM but
+ // no EEPROM is available on this board so we just
+ // ignore this request
+ return 0;
+}
+
+
+///////////////////////////////////////////////////////////////////////////////
+// getVSCPControlByte
+//
+
+uint8_t vscp_getPageSelect( uint8_t idx )
+{
+ // No paging used so we ignore this
+ return 0;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// getVSCPControlByte
+//
+
+void vscp_setPageSelect( uint8_t idx, uint8_t data )
+{
+ // No paging used so we ignore this
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Added: trunk/firmware/arm/str/vscp_node_str73x_gcc/project/startup.s
===================================================================
--- trunk/firmware/arm/str/vscp_node_str73x_gcc/project/startup.s (rev 0)
+++ trunk/firmware/arm/str/vscp_node_str73x_gcc/project/startup.s 2008-02-17 16:05:40 UTC (rev 849)
@@ -0,0 +1,361 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/**** Startup Code (executed after Reset) ****/
+
+/* Frequency values */
+/* set to suit target hardware */
+
+ .equ FOSC, 4000000
+ .equ FRTC, 2340000
+
+/* Standard definitions of Mode bits and Interrupt (I & F) flags in PSRs */
+
+ .equ Mode_USR, 0x10
+ .equ Mode_FIQ, 0x11
+ .equ Mode_IRQ, 0x12
+ .equ Mode_SVC, 0x13
+ .equ Mode_ABT, 0x17
+ .equ Mode_UND, 0x1B
+ .equ Mode_SYS, 0x1F /* available on ARM Arch 4 and later */
+
+ .equ I_Bit, 0x80 /* when I bit is set, IRQ is disabled */
+ .equ F_Bit, 0x40 /* when F bit is set, FIQ is disabled */
+
+/* --- System memory locations */
+
+ .equ EIC_Base_addr, 0xFFFFFC00 /* EIC base address */
+ .equ ICR_off_addr, 0x00 /* Interrupt Control register offset */
+ .equ CIPR_off_addr, 0x08 /* Current Interrupt Priority Register offset */
+ .equ IVR_off_addr, 0x18 /* Interrupt Vector Register offset */
+ .equ FIR_off_addr, 0x1C /* Fast Interrupt Register offset */
+ .equ IER0_off_addr, 0x20 /* Interrupt Enable Register offset */
+ .equ IER1_off_addr, 0x24 /* Interrupt Enable Register offset */
+ .equ IPR0_off_addr, 0x40 /* Interrupt Pending Bit Register offset */
+ .equ IPR1_off_addr, 0x44 /* Interrupt Pending Bit Register offset */
+ .equ SIR0_off_addr, 0x60 /* Source Interrupt Register 0 */
+
+ .equ CFG_R0_Addr, 0x40000000 /* Configuration Register 0 base address */
+ .equ CFG_PCGR0_Addr, 0x40000008
+
+ .equ FLASH_mask, 0x0000 /* to remap FLASH at 0x0 */
+ .equ RAM_mask, 0x0001 /* to remap RAM at 0x0 */
+
+/* define remapping, if using ram based vectors or rom based
+ REMAP will need to be define in vector.s aswell
+ Valid Options:
+ REMAP 0 - default config, no remapping, vectors in rom
+ REMAP 1 - vectors in rom
+ REMAP 2 - vectors in ram
+*/
+
+.ifndef REMAP
+ .equ REMAP, 0
+.endif
+
+/* if we are debugging in ram then we need
+ the vectors to point to the correct location
+ only if BOOT0/BOOT1 have been set for Flash @ zero.
+*/
+
+.ifndef DBGRAM
+ .equ DBGRAM, 0
+.endif
+
+/* Startup Code must be linked first at Address at which it expects to run. */
+
+ .text
+ .arm
+ .section .init, "ax"
+
+ .global _start
+ .global RCCU_Main_Osc
+ .global RCCU_RTC_Osc
+
+.if REMAP
+
+/* Exception Vector (before Remap) */
+
+/* Reset Handler */
+/* On reset, an aliased copy of ROM is at 0x0. */
+/* Continue execution from 'real' ROM rather than aliased copy */
+
+ LDR pc, =HardReset
+HardReset:
+
+/******************************************************************************
+REMAPPING
+Description : Remapping memory whether RAM,FLASH or External memory
+ at Address 0x0 after the application has started executing.
+ Remapping is generally done to allow RAM to replace FLASH
+ or EXTMEM at 0x0.
+ the remapping of RAM allow copying of vector table into RAM
+******************************************************************************/
+
+.if REMAP == 1
+ MOV r4, #FLASH_mask
+.endif
+
+.if REMAP == 2
+ MOV r4, #RAM_mask
+.endif
+
+remap:
+ LDR r1, =_vecstart /* r1 = start address from which to copy */
+ LDR r3, =_vecend
+ SUB r3, r3, r1 /* r3 = number of bytes to copy */
+ LDR r0, =_vectext /* r0 = start address where to copy */
+copy_ram:
+ LDR r2, [r0], #4 /* Read a word from the source */
+ STR r2, [r1], #4 /* copy the word to destination */
+ SUBS r3, r3, #4 /* Decrement number of words to copy */
+ BNE copy_ram
+
+ LDR r1, =CFG_R0_Addr
+ LDR r0, [r1]
+ BIC r0, r0, #0x01
+ ORR r0, r0, r4
+ STR r0, [r1]
+.endif
+
+/* After remap this will be our reset handler */
+
+_start:
+ LDR pc, =NextInst
+NextInst:
+
+ NOP /* Wait for OSC stabilization */
+ NOP
+ NOP
+ NOP
+ NOP
+ NOP
+ NOP
+ NOP
+ NOP
+
+/* Reset all peripheral clocks except RAM */
+
+ MOV r0, #1
+ LDR r1, =CFG_PCGR0_Addr
+ STR r0, [r1]
+ MOV r0, #0
+ STR r0, [r1,#4]
+
+.if DBGRAM
+ LDR r1, =CFG_R0_Addr
+ LDR r0, [r1]
+ ORR r0, r0, #RAM_mask
+ STR r0, [r1]
+.endif
+
+/* Setup Stack for each mode */
+
+/* Enter Abort Mode and set its Stack Pointer */
+ MSR cpsr_c, #Mode_ABT|I_Bit|F_Bit
+ LDR sp, =__stack_abt_end__
+
+/* Enter Undefined Instruction Mode and set its Stack Pointer */
...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-17 15:47:15
|
Revision: 848
http://can.svn.sourceforge.net/can/?rev=848&view=rev
Author: akhe
Date: 2008-02-17 07:47:03 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
Changed name of common files thta are uP dependent
Modified Paths:
--------------
trunk/firmware/arm/str/common/delay.c
Added Paths:
-----------
trunk/firmware/arm/str/common/sysTime73x.c
trunk/firmware/arm/str/common/sysTime73x.h
trunk/firmware/arm/str/common/sysTime75x.c
trunk/firmware/arm/str/common/sysTime75x.h
Removed Paths:
-------------
trunk/firmware/arm/str/common/sysTime.c
trunk/firmware/arm/str/common/sysTime.h
Modified: trunk/firmware/arm/str/common/delay.c
===================================================================
--- trunk/firmware/arm/str/common/delay.c 2008-02-17 15:42:27 UTC (rev 847)
+++ trunk/firmware/arm/str/common/delay.c 2008-02-17 15:47:03 UTC (rev 848)
@@ -3,8 +3,7 @@
Martin Thomas, 11/2004
*/
-#include "73x_lib.h"
-#include "systime.h"
+
#include "delay.h"
Deleted: trunk/firmware/arm/str/common/sysTime.c
===================================================================
--- trunk/firmware/arm/str/common/sysTime.c 2008-02-17 15:42:27 UTC (rev 847)
+++ trunk/firmware/arm/str/common/sysTime.c 2008-02-17 15:47:03 UTC (rev 848)
@@ -1,127 +0,0 @@
-/******************************************************************************
- *
- * $RCSfile: sysTime.c,v $
- * $Revision: 1.4 $
- *
- * This module provides the interface routines for initializing and
- * accessing the system timing functions.
- * Copyright 2004, R O SoftWare
- * No guarantees, warrantees, or promises, implied or otherwise.
- * May be used for hobby or commercial purposes provided copyright
- * notice remains intact.
- *
- *****************************************************************************/
-
-//
-// The TB2_IRQHandler handler in vectors.c must be implemented fot this to work
-// This rotine should update the sysTICs value once each millisecond.
-// Something like this is needed
-//
-// sysTICs++;
-// TB_FlagClear( TB2 );
-//
-
-#include "sysTime.h"
-
-volatile vu32 sysTICs;
-
-/******************************************************************************
- *
- * Function Name: initTimebase2()
- *
- * Description:
- * This function initializes the TB2 for use as the system timer.
- *
- * Calling Sequence:
- * void
- *
- * Returns:
- * void
- *
- *****************************************************************************/
-void initTimebase2(void)
-{
- TB_InitTypeDef TB_InitStructure;
-
- sysTICs = 0;
-
- CFG_PeripheralClockConfig( CFG_CLK_TB2, ENABLE );
-
- // TB2 Configuration to get timbase IRQ each 1ms
- TB_InitStructure.TB_CLK_Source = TB_CLK_INTERNAL ;
- TB_InitStructure.TB_Prescaler = 50; // The internal TB Frequency = 160KHz
- TB_InitStructure.TB_Preload = 160; // 160000Hz * 0.001 s = 160
-
- TB_Init( TB2, &TB_InitStructure );
- TB_ITConfig( TB2, ENABLE );
-
- EIC_IRQChannelConfig( TB2_IRQChannel, ENABLE ); // Enable IRQ
-
- TB_Cmd( TB2, ENABLE ); // Enable the timer
-}
-
-/******************************************************************************
- *
- * Function Name: getSysTICs()
- *
- * Description:
- * This function returns the current syetem time in TICs.
- *
- * Calling Sequence:
- * void
- *
- * Returns:
- * The current time in TICs as represented by sysTICs
- *
- *****************************************************************************/
-u32 getSysTICs(void)
-{
- return sysTICs;
-}
-
-
-/******************************************************************************
- *
- * Function Name: getElapsedSysTICs()
- *
- * Description:
- * This function then returns the difference in TICs between the
- * given starting time and the current system time.
- *
- * Calling Sequence:
- * The starting time.
- *
- * Returns:
- * The time difference.
- *
- *****************************************************************************/
-u32 getElapsedSysTICs( u32 startTime )
-{
- return ( getSysTICs() - startTime );
-}
-
-
-/******************************************************************************
- *
- * Function Name: pause()
- *
- * Description:
- * This function does not return until the specified 'duration' in
- * TICs has elapsed.
- *
- * Calling Sequence:
- * duration - length of time in TICs to wait before returning
- *
- * Returns:
- * void
- *
- *****************************************************************************/
-void pause( u32 duration )
-{
- u32 startTime = getSysTICs();
-
- while ( getElapsedSysTICs( startTime ) < duration ) ;
-
-}
-
-
Deleted: trunk/firmware/arm/str/common/sysTime.h
===================================================================
--- trunk/firmware/arm/str/common/sysTime.h 2008-02-17 15:42:27 UTC (rev 847)
+++ trunk/firmware/arm/str/common/sysTime.h 2008-02-17 15:47:03 UTC (rev 848)
@@ -1,108 +0,0 @@
-/******************************************************************************
- *
- * $RCSfile: sysTime.h,v $
- * $Revision: 1.2 $
- *
- * This module provides the interface definitions for sysTime.c
- * Copyright 2004, R O SoftWare
- *
- * Ported for STR73xF 2006 <ak...@do...>
- *
- * No guarantees, warrantees, or promises, implied or otherwise.
- * May be used for hobby or commercial purposes provided copyright
- * notice remains intact.
- *
- *****************************************************************************/
-#ifndef INC_SYS_TIME_H
-#define INC_SYS_TIME_H
-
-#include "73x_lib.h"
-
-// setup parameters
-#define sysTICSperSEC 1000
-
-// some helpful times for pause()
-#define ONE_MS (u32)(( 1e-3 * sysTICSperSEC) + .5)
-#define TWO_MS (u32)(( 2e-3 * sysTICSperSEC) + .5)
-#define FIVE_MS (u32)(( 5e-3 * sysTICSperSEC) + .5)
-#define TEN_MS (u32)(( 10e-3 * sysTICSperSEC) + .5)
-#define TWENTY_MS (u32)(( 20e-3 * sysTICSperSEC) + .5)
-#define THIRTY_MS (u32)(( 30e-3 * sysTICSperSEC) + .5)
-#define FIFTY_MS (u32)(( 50e-3 * sysTICSperSEC) + .5)
-#define HUNDRED_MS (u32)((100e-3 * sysTICSperSEC) + .5)
-#define ONE_FIFTY_MS (u32)((150e-3 * sysTICSperSEC) + .5)
-#define QUARTER_SEC (u32)((250e-3 * sysTICSperSEC) + .5)
-#define HALF_SEC (u32)((500e-3 * sysTICSperSEC) + .5)
-#define ONE_SEC (u32)(( 1.0 * sysTICSperSEC) + .5)
-#define TWO_SEC (u32)(( 2.0 * sysTICSperSEC) + .5)
-#define FIVE_SEC (u32)(( 5.0 * sysTICSperSEC) + .5)
-#define TEN_SEC (u32)((10.0 * sysTICSperSEC) + .5)
-
-
-/******************************************************************************
- *
- * Function Name: initTimebase2()
- *
- * Description:
- * Init. TB2 for 1ms interrupts.
- *
- * Calling Sequence:
- * void
- *
- * Returns:
- * void
- *
- *****************************************************************************/
-void initTimebase2(void);
-
-/******************************************************************************
- *
- * Function Name: getSysTICs()
- *
- * Description:
- * This function returns the current system time in TICs.
- *
- * Calling Sequence:
- * void
- *
- * Returns:
- * The current time in TICs
- *
- *****************************************************************************/
-u32 getSysTICs(void);
-
-/******************************************************************************
- *
- * Function Name: getElapsedSysTICs()
- *
- * Description:
- * This function then returns the difference in TICs between the
- * given starting time and the current system time.
- *
- * Calling Sequence:
- * The starting time.
- *
- * Returns:
- * The time difference.
- *
- *****************************************************************************/
-u32 getElapsedSysTICs( u32 startTime);
-
-/******************************************************************************
- *
- * Function Name: pause()
- *
- * Description:
- * This function does not return until the specified 'duration' in
- * TICs has elapsed.
- *
- * Calling Sequence:
- * duration - length of time in TICs to wait before returning
- *
- * Returns:
- * void
- *
- *****************************************************************************/
-void pause( u32 duration);
-
-#endif
Copied: trunk/firmware/arm/str/common/sysTime73x.c (from rev 842, trunk/firmware/arm/str/common/sysTime.c)
===================================================================
--- trunk/firmware/arm/str/common/sysTime73x.c (rev 0)
+++ trunk/firmware/arm/str/common/sysTime73x.c 2008-02-17 15:47:03 UTC (rev 848)
@@ -0,0 +1,127 @@
+/******************************************************************************
+ *
+ * $RCSfile: sysTime.c,v $
+ * $Revision: 1.4 $
+ *
+ * This module provides the interface routines for initializing and
+ * accessing the system timing functions.
+ * Copyright 2004, R O SoftWare
+ * No guarantees, warrantees, or promises, implied or otherwise.
+ * May be used for hobby or commercial purposes provided copyright
+ * notice remains intact.
+ *
+ *****************************************************************************/
+
+//
+// The TB2_IRQHandler handler in vectors.c must be implemented fot this to work
+// This rotine should update the sysTICs value once each millisecond.
+// Something like this is needed
+//
+// sysTICs++;
+// TB_FlagClear( TB2 );
+//
+
+#include "sysTime.h"
+
+volatile vu32 sysTICs;
+
+/******************************************************************************
+ *
+ * Function Name: initTimebase2()
+ *
+ * Description:
+ * This function initializes the TB2 for use as the system timer.
+ *
+ * Calling Sequence:
+ * void
+ *
+ * Returns:
+ * void
+ *
+ *****************************************************************************/
+void initTimebase2(void)
+{
+ TB_InitTypeDef TB_InitStructure;
+
+ sysTICs = 0;
+
+ CFG_PeripheralClockConfig( CFG_CLK_TB2, ENABLE );
+
+ // TB2 Configuration to get timbase IRQ each 1ms
+ TB_InitStructure.TB_CLK_Source = TB_CLK_INTERNAL ;
+ TB_InitStructure.TB_Prescaler = 50; // The internal TB Frequency = 160KHz
+ TB_InitStructure.TB_Preload = 160; // 160000Hz * 0.001 s = 160
+
+ TB_Init( TB2, &TB_InitStructure );
+ TB_ITConfig( TB2, ENABLE );
+
+ EIC_IRQChannelConfig( TB2_IRQChannel, ENABLE ); // Enable IRQ
+
+ TB_Cmd( TB2, ENABLE ); // Enable the timer
+}
+
+/******************************************************************************
+ *
+ * Function Name: getSysTICs()
+ *
+ * Description:
+ * This function returns the current syetem time in TICs.
+ *
+ * Calling Sequence:
+ * void
+ *
+ * Returns:
+ * The current time in TICs as represented by sysTICs
+ *
+ *****************************************************************************/
+u32 getSysTICs(void)
+{
+ return sysTICs;
+}
+
+
+/******************************************************************************
+ *
+ * Function Name: getElapsedSysTICs()
+ *
+ * Description:
+ * This function then returns the difference in TICs between the
+ * given starting time and the current system time.
+ *
+ * Calling Sequence:
+ * The starting time.
+ *
+ * Returns:
+ * The time difference.
+ *
+ *****************************************************************************/
+u32 getElapsedSysTICs( u32 startTime )
+{
+ return ( getSysTICs() - startTime );
+}
+
+
+/******************************************************************************
+ *
+ * Function Name: pause()
+ *
+ * Description:
+ * This function does not return until the specified 'duration' in
+ * TICs has elapsed.
+ *
+ * Calling Sequence:
+ * duration - length of time in TICs to wait before returning
+ *
+ * Returns:
+ * void
+ *
+ *****************************************************************************/
+void pause( u32 duration )
+{
+ u32 startTime = getSysTICs();
+
+ while ( getElapsedSysTICs( startTime ) < duration ) ;
+
+}
+
+
Copied: trunk/firmware/arm/str/common/sysTime73x.h (from rev 842, trunk/firmware/arm/str/common/sysTime.h)
===================================================================
--- trunk/firmware/arm/str/common/sysTime73x.h (rev 0)
+++ trunk/firmware/arm/str/common/sysTime73x.h 2008-02-17 15:47:03 UTC (rev 848)
@@ -0,0 +1,108 @@
+/******************************************************************************
+ *
+ * $RCSfile: sysTime.h,v $
+ * $Revision: 1.2 $
+ *
+ * This module provides the interface definitions for sysTime.c
+ * Copyright 2004, R O SoftWare
+ *
+ * Ported for STR73xF 2006 <ak...@do...>
+ *
+ * No guarantees, warrantees, or promises, implied or otherwise.
+ * May be used for hobby or commercial purposes provided copyright
+ * notice remains intact.
+ *
+ *****************************************************************************/
+#ifndef INC_SYS_TIME_H
+#define INC_SYS_TIME_H
+
+#include "73x_lib.h"
+
+// setup parameters
+#define sysTICSperSEC 1000
+
+// some helpful times for pause()
+#define ONE_MS (u32)(( 1e-3 * sysTICSperSEC) + .5)
+#define TWO_MS (u32)(( 2e-3 * sysTICSperSEC) + .5)
+#define FIVE_MS (u32)(( 5e-3 * sysTICSperSEC) + .5)
+#define TEN_MS (u32)(( 10e-3 * sysTICSperSEC) + .5)
+#define TWENTY_MS (u32)(( 20e-3 * sysTICSperSEC) + .5)
+#define THIRTY_MS (u32)(( 30e-3 * sysTICSperSEC) + .5)
+#define FIFTY_MS (u32)(( 50e-3 * sysTICSperSEC) + .5)
+#define HUNDRED_MS (u32)((100e-3 * sysTICSperSEC) + .5)
+#define ONE_FIFTY_MS (u32)((150e-3 * sysTICSperSEC) + .5)
+#define QUARTER_SEC (u32)((250e-3 * sysTICSperSEC) + .5)
+#define HALF_SEC (u32)((500e-3 * sysTICSperSEC) + .5)
+#define ONE_SEC (u32)(( 1.0 * sysTICSperSEC) + .5)
+#define TWO_SEC (u32)(( 2.0 * sysTICSperSEC) + .5)
+#define FIVE_SEC (u32)(( 5.0 * sysTICSperSEC) + .5)
+#define TEN_SEC (u32)((10.0 * sysTICSperSEC) + .5)
+
+
+/******************************************************************************
+ *
+ * Function Name: initTimebase2()
+ *
+ * Description:
+ * Init. TB2 for 1ms interrupts.
+ *
+ * Calling Sequence:
+ * void
+ *
+ * Returns:
+ * void
+ *
+ *****************************************************************************/
+void initTimebase2(void);
+
+/******************************************************************************
+ *
+ * Function Name: getSysTICs()
+ *
+ * Description:
+ * This function returns the current system time in TICs.
+ *
+ * Calling Sequence:
+ * void
+ *
+ * Returns:
+ * The current time in TICs
+ *
+ *****************************************************************************/
+u32 getSysTICs(void);
+
+/******************************************************************************
+ *
+ * Function Name: getElapsedSysTICs()
+ *
+ * Description:
+ * This function then returns the difference in TICs between the
+ * given starting time and the current system time.
+ *
+ * Calling Sequence:
+ * The starting time.
+ *
+ * Returns:
+ * The time difference.
+ *
+ *****************************************************************************/
+u32 getElapsedSysTICs( u32 startTime);
+
+/******************************************************************************
+ *
+ * Function Name: pause()
+ *
+ * Description:
+ * This function does not return until the specified 'duration' in
+ * TICs has elapsed.
+ *
+ * Calling Sequence:
+ * duration - length of time in TICs to wait before returning
+ *
+ * Returns:
+ * void
+ *
+ *****************************************************************************/
+void pause( u32 duration);
+
+#endif
Added: trunk/firmware/arm/str/common/sysTime75x.c
===================================================================
--- trunk/firmware/arm/str/common/sysTime75x.c (rev 0)
+++ trunk/firmware/arm/str/common/sysTime75x.c 2008-02-17 15:47:03 UTC (rev 848)
@@ -0,0 +1,127 @@
+/******************************************************************************
+ *
+ * $RCSfile: sysTime.c,v $
+ * $Revision: 1.4 $
+ *
+ * This module provides the interface routines for initializing and
+ * accessing the system timing functions.
+ * Copyright 2004, R O SoftWare
+ * No guarantees, warrantees, or promises, implied or otherwise.
+ * May be used for hobby or commercial purposes provided copyright
+ * notice remains intact.
+ *
+ *****************************************************************************/
+
+//
+// The TB2_IRQHandler handler in vectors.c must be implemented fot this to work
+// This rotine should update the sysTICs value once each millisecond.
+// Something like this is needed
+//
+// sysTICs++;
+// TB_FlagClear( TB2 );
+//
+
+#include "sysTime75x.h"
+
+volatile vu32 sysTICs;
+
+/******************************************************************************
+ *
+ * Function Name: initTimebase2()
+ *
+ * Description:
+ * This function initializes the TB2 for use as the system timer.
+ *
+ * Calling Sequence:
+ * void
+ *
+ * Returns:
+ * void
+ *
+ *****************************************************************************/
+void initTimebase2(void)
+{
+ TB_InitTypeDef TB_InitStructure;
+
+ sysTICs = 0;
+
+ CFG_PeripheralClockConfig( CFG_CLK_TB2, ENABLE );
+
+ // TB2 Configuration to get timbase IRQ each 1ms
+ TB_InitStructure.TB_CLK_Source = TB_CLK_INTERNAL ;
+ TB_InitStructure.TB_Prescaler = 50; // The internal TB Frequency = 160KHz
+ TB_InitStructure.TB_Preload = 160; // 160000Hz * 0.001 s = 160
+
+ TB_Init( TB2, &TB_InitStructure );
+ TB_ITConfig( TB2, ENABLE );
+
+ EIC_IRQChannelConfig( TB2_IRQChannel, ENABLE ); // Enable IRQ
+
+ TB_Cmd( TB2, ENABLE ); // Enable the timer
+}
+
+/******************************************************************************
+ *
+ * Function Name: getSysTICs()
+ *
+ * Description:
+ * This function returns the current syetem time in TICs.
+ *
+ * Calling Sequence:
+ * void
+ *
+ * Returns:
+ * The current time in TICs as represented by sysTICs
+ *
+ *****************************************************************************/
+u32 getSysTICs(void)
+{
+ return sysTICs;
+}
+
+
+/******************************************************************************
+ *
+ * Function Name: getElapsedSysTICs()
+ *
+ * Description:
+ * This function then returns the difference in TICs between the
+ * given starting time and the current system time.
+ *
+ * Calling Sequence:
+ * The starting time.
+ *
+ * Returns:
+ * The time difference.
+ *
+ *****************************************************************************/
+u32 getElapsedSysTICs( u32 startTime )
+{
+ return ( getSysTICs() - startTime );
+}
+
+
+/******************************************************************************
+ *
+ * Function Name: pause()
+ *
+ * Description:
+ * This function does not return until the specified 'duration' in
+ * TICs has elapsed.
+ *
+ * Calling Sequence:
+ * duration - length of time in TICs to wait before returning
+ *
+ * Returns:
+ * void
+ *
+ *****************************************************************************/
+void pause( u32 duration )
+{
+ u32 startTime = getSysTICs();
+
+ while ( getElapsedSysTICs( startTime ) < duration ) ;
+
+}
+
+
Added: trunk/firmware/arm/str/common/sysTime75x.h
===================================================================
--- trunk/firmware/arm/str/common/sysTime75x.h (rev 0)
+++ trunk/firmware/arm/str/common/sysTime75x.h 2008-02-17 15:47:03 UTC (rev 848)
@@ -0,0 +1,108 @@
+/******************************************************************************
+ *
+ * $RCSfile: sysTime.h,v $
+ * $Revision: 1.2 $
+ *
+ * This module provides the interface definitions for sysTime.c
+ * Copyright 2004, R O SoftWare
+ *
+ * Ported for STR73xF 2006 <ak...@do...>
+ *
+ * No guarantees, warrantees, or promises, implied or otherwise.
+ * May be used for hobby or commercial purposes provided copyright
+ * notice remains intact.
+ *
+ *****************************************************************************/
+#ifndef INC_SYS_TIME_H
+#define INC_SYS_TIME_H
+
+#include "75x_lib.h"
+
+// setup parameters
+#define sysTICSperSEC 1000
+
+// some helpful times for pause()
+#define ONE_MS (u32)(( 1e-3 * sysTICSperSEC) + .5)
+#define TWO_MS (u32)(( 2e-3 * sysTICSperSEC) + .5)
+#define FIVE_MS (u32)(( 5e-3 * sysTICSperSEC) + .5)
+#define TEN_MS (u32)(( 10e-3 * sysTICSperSEC) + .5)
+#define TWENTY_MS (u32)(( 20e-3 * sysTICSperSEC) + .5)
+#define THIRTY_MS (u32)(( 30e-3 * sysTICSperSEC) + .5)
+#define FIFTY_MS (u32)(( 50e-3 * sysTICSperSEC) + .5)
+#define HUNDRED_MS (u32)((100e-3 * sysTICSperSEC) + .5)
+#define ONE_FIFTY_MS (u32)((150e-3 * sysTICSperSEC) + .5)
+#define QUARTER_SEC (u32)((250e-3 * sysTICSperSEC) + .5)
+#define HALF_SEC (u32)((500e-3 * sysTICSperSEC) + .5)
+#define ONE_SEC (u32)(( 1.0 * sysTICSperSEC) + .5)
+#define TWO_SEC (u32)(( 2.0 * sysTICSperSEC) + .5)
+#define FIVE_SEC (u32)(( 5.0 * sysTICSperSEC) + .5)
+#define TEN_SEC (u32)((10.0 * sysTICSperSEC) + .5)
+
+
+/******************************************************************************
+ *
+ * Function Name: initTimebase2()
+ *
+ * Description:
+ * Init. TB2 for 1ms interrupts.
+ *
+ * Calling Sequence:
+ * void
+ *
+ * Returns:
+ * void
+ *
+ *****************************************************************************/
+void initTimebase2(void);
+
+/******************************************************************************
+ *
+ * Function Name: getSysTICs()
+ *
+ * Description:
+ * This function returns the current system time in TICs.
+ *
+ * Calling Sequence:
+ * void
+ *
+ * Returns:
+ * The current time in TICs
+ *
+ *****************************************************************************/
+u32 getSysTICs(void);
+
+/******************************************************************************
+ *
+ * Function Name: getElapsedSysTICs()
+ *
+ * Description:
+ * This function then returns the difference in TICs between the
+ * given starting time and the current system time.
+ *
+ * Calling Sequence:
+ * The starting time.
+ *
+ * Returns:
+ * The time difference.
+ *
+ *****************************************************************************/
+u32 getElapsedSysTICs( u32 startTime);
+
+/******************************************************************************
+ *
+ * Function Name: pause()
+ *
+ * Description:
+ * This function does not return until the specified 'duration' in
+ * TICs has elapsed.
+ *
+ * Calling Sequence:
+ * duration - length of time in TICs to wait before returning
+ *
+ * Returns:
+ * void
+ *
+ *****************************************************************************/
+void pause( u32 duration);
+
+#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ak...@us...> - 2008-02-17 15:42:39
|
Revision: 847
http://can.svn.sourceforge.net/can/?rev=847&view=rev
Author: akhe
Date: 2008-02-17 07:42:27 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
added latest version of procyon arm library
Modified Paths:
--------------
trunk/firmware/arm/common/procyon/armlib/ad6620.c
trunk/firmware/arm/common/procyon/armlib/ad6620.h
trunk/firmware/arm/common/procyon/armlib/ad9854.c
trunk/firmware/arm/common/procyon/armlib/ad9854.h
trunk/firmware/arm/common/procyon/armlib/aic23b.c
trunk/firmware/arm/common/procyon/armlib/aic23b.h
trunk/firmware/arm/common/procyon/armlib/armlibdefs.h
trunk/firmware/arm/common/procyon/armlib/armlibtypes.h
trunk/firmware/arm/common/procyon/armlib/ata.c
trunk/firmware/arm/common/procyon/armlib/ata.h
trunk/firmware/arm/common/procyon/armlib/buffer.c
trunk/firmware/arm/common/procyon/armlib/buffer.h
trunk/firmware/arm/common/procyon/armlib/debug.h
trunk/firmware/arm/common/procyon/armlib/docs/armlib_doxygen.cfg
trunk/firmware/arm/common/procyon/armlib/docs/html/ad6620_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ad6620_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ad6620_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ad6620_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ad9854_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ad9854_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ad9854_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ad9854_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/aic23b_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/aic23b_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/aic23b_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/aic23b_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/armlibdefs_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/armlibdefs_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/armlibtypes_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/armlibtypes_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ata_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ata_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ata_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ata_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/buffer_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/buffer_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/buffer_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/buffer_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/debug_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/debug_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/debug_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/debug_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/dox.css
trunk/firmware/arm/common/procyon/armlib/docs/html/doxygen.png
trunk/firmware/arm/common/procyon/armlib/docs/html/fat_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/fat_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/fat_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/fat_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/files.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ft245_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ft245_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ft245conf_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ft245conf_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/global_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/global_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/globals.html
trunk/firmware/arm/common/procyon/armlib/docs/html/globals_defs.html
trunk/firmware/arm/common/procyon/armlib/docs/html/globals_func.html
trunk/firmware/arm/common/procyon/armlib/docs/html/index.html
trunk/firmware/arm/common/procyon/armlib/docs/html/input_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/input_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/input_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/input_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/main.html
trunk/firmware/arm/common/procyon/armlib/docs/html/rprintf_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/rprintf_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/rprintf_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/rprintf_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/stxetx_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/stxetx_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/stxetx_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/stxetx_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/stxetxconf_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/stxetxconf_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/tree.html
trunk/firmware/arm/common/procyon/armlib/docs/html/vt100_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/vt100_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/vt100_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/vt100_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/undoc.txt
trunk/firmware/arm/common/procyon/armlib/examples/makefile
trunk/firmware/arm/common/procyon/armlib/examples/rprintf/global.h
trunk/firmware/arm/common/procyon/armlib/examples/rprintf/makefile
trunk/firmware/arm/common/procyon/armlib/examples/rprintf/rprintftest.c
trunk/firmware/arm/common/procyon/armlib/examples/uart/global.h
trunk/firmware/arm/common/procyon/armlib/examples/uart/makefile
trunk/firmware/arm/common/procyon/armlib/examples/uart/uarttest.c
trunk/firmware/arm/common/procyon/armlib/fat.c
trunk/firmware/arm/common/procyon/armlib/fat.h
trunk/firmware/arm/common/procyon/armlib/ft245.h
trunk/firmware/arm/common/procyon/armlib/index.html
trunk/firmware/arm/common/procyon/armlib/input.c
trunk/firmware/arm/common/procyon/armlib/make/armproj_make
trunk/firmware/arm/common/procyon/armlib/rprintf.c
trunk/firmware/arm/common/procyon/armlib/rprintf.h
trunk/firmware/arm/common/procyon/armlib/stxetx.h
trunk/firmware/arm/common/procyon/armlib/vt100.h
Added Paths:
-----------
trunk/firmware/arm/common/procyon/armlib/ads7870.c
trunk/firmware/arm/common/procyon/armlib/ads7870.h
trunk/firmware/arm/common/procyon/armlib/arch/
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/a2d.c
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/a2d.h
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/boot/
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/boot/aduc702x_ram.ld
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/boot/aduc702x_rom.ld
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/boot/boot.s
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/boot/startup.s
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/boot/startup_1.s
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/d2a.c
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/d2a.h
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/include/
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/include/aduc7026.equ
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/include/aduc7026.h
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/include/dac.h
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/include/flash.h
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/include/gpio.h
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/include/i2c.h
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/include/irq.h
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/include/pla.h
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/include/pwm.h
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/include/serial.c
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/include/syscalls.c
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/include/timer.h
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/include/uart.h
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/membus.c
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/membus.h
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/processor.c
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/processor.h
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/uart.c
trunk/firmware/arm/common/procyon/armlib/arch/aduc7000/uart.h
trunk/firmware/arm/common/procyon/armlib/arch/at91/
trunk/firmware/arm/common/procyon/armlib/arch/at91/a2d.c
trunk/firmware/arm/common/procyon/armlib/arch/at91/a2d.h
trunk/firmware/arm/common/procyon/armlib/arch/at91/at91flash.c
trunk/firmware/arm/common/procyon/armlib/arch/at91/at91flash.h
trunk/firmware/arm/common/procyon/armlib/arch/at91/boot/
trunk/firmware/arm/common/procyon/armlib/arch/at91/boot/at91sam7s128-ram-samba.ld
trunk/firmware/arm/common/procyon/armlib/arch/at91/boot/at91sam7s128-rom.ld
trunk/firmware/arm/common/procyon/armlib/arch/at91/boot/at91sam7s256-ram-samba.ld
trunk/firmware/arm/common/procyon/armlib/arch/at91/boot/at91sam7s256-ram.ld
trunk/firmware/arm/common/procyon/armlib/arch/at91/boot/at91sam7s256-rom.ld
trunk/firmware/arm/common/procyon/armlib/arch/at91/boot/at91sam7s64-ram-samba.ld
trunk/firmware/arm/common/procyon/armlib/arch/at91/boot/at91sam7s64-rom.ld
trunk/firmware/arm/common/procyon/armlib/arch/at91/boot/boot.s
trunk/firmware/arm/common/procyon/armlib/arch/at91/boot/boot_from_lpc.s
trunk/firmware/arm/common/procyon/armlib/arch/at91/boot/cstartup.lst
trunk/firmware/arm/common/procyon/armlib/arch/at91/boot/cstartup.s
trunk/firmware/arm/common/procyon/armlib/arch/at91/i2c.c
trunk/firmware/arm/common/procyon/armlib/arch/at91/i2c.h
trunk/firmware/arm/common/procyon/armlib/arch/at91/include/
trunk/firmware/arm/common/procyon/armlib/arch/at91/include/at91sam7s128.h
trunk/firmware/arm/common/procyon/armlib/arch/at91/include/at91sam7s256.h
trunk/firmware/arm/common/procyon/armlib/arch/at91/include/at91sam7s32.h
trunk/firmware/arm/common/procyon/armlib/arch/at91/include/at91sam7s321.h
trunk/firmware/arm/common/procyon/armlib/arch/at91/include/at91sam7s64.h
trunk/firmware/arm/common/procyon/armlib/arch/at91/include/at91sam7xc128.h
trunk/firmware/arm/common/procyon/armlib/arch/at91/include/at91sam7xc256.h
trunk/firmware/arm/common/procyon/armlib/arch/at91/processor.c
trunk/firmware/arm/common/procyon/armlib/arch/at91/processor.h
trunk/firmware/arm/common/procyon/armlib/arch/at91/spi.c
trunk/firmware/arm/common/procyon/armlib/arch/at91/spi.h
trunk/firmware/arm/common/procyon/armlib/arch/at91/timer.c
trunk/firmware/arm/common/procyon/armlib/arch/at91/timer.h
trunk/firmware/arm/common/procyon/armlib/arch/at91/uart.c
trunk/firmware/arm/common/procyon/armlib/arch/at91/uart.h
trunk/firmware/arm/common/procyon/armlib/arch/at91/uartdma.c
trunk/firmware/arm/common/procyon/armlib/arch/at91/uartdma.h
trunk/firmware/arm/common/procyon/armlib/arch/at91/uartintr.c
trunk/firmware/arm/common/procyon/armlib/arch/at91/uartintr.h
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/a2d.c
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/a2d.h
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/boot/
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/boot/boot.s
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/boot/lpc2106-rom.ld
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/boot/lpc2214-rom.ld
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/i2c.c
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/i2c.h
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/include/
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/include/lpc2000.h
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/include/lpc210x.h
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/include/lpc21xx.h
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/include/lpc22xx.h
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/include/lpcADC.h
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/include/lpcEMC.h
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/include/lpcGPIO.h
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/include/lpcI2C.h
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/include/lpcPIN.h
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/include/lpcRTC.h
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/include/lpcSCB.h
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/include/lpcSPI.h
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/include/lpcTMR.h
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/include/lpcUART.h
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/include/lpcVIC.h
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/include/lpcWD.h
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/membus.c
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/membus.h
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/membus_opt.c
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/membus_opt.h
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/membus_slow.c
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/processor.c
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/processor.h
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/spi.c
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/spi.h
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/timer.c
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/timer.h
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/uart.c
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/uart.h
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/uartintr.c
trunk/firmware/arm/common/procyon/armlib/arch/lpc2000/uartintr.h
trunk/firmware/arm/common/procyon/armlib/atadev.c
trunk/firmware/arm/common/procyon/armlib/atadev.h
trunk/firmware/arm/common/procyon/armlib/conf/ataconf.h
trunk/firmware/arm/common/procyon/armlib/conf/fatconf.h
trunk/firmware/arm/common/procyon/armlib/cy22150.c
trunk/firmware/arm/common/procyon/armlib/cy22150.h
trunk/firmware/arm/common/procyon/armlib/docs/driver_arm_aduc7000.dox
trunk/firmware/arm/common/procyon/armlib/docs/driver_arm_at91.dox
trunk/firmware/arm/common/procyon/armlib/docs/driver_arm_lpc2000.dox
trunk/firmware/arm/common/procyon/armlib/docs/driver_hw.dox
trunk/firmware/arm/common/procyon/armlib/docs/general.dox
trunk/firmware/arm/common/procyon/armlib/docs/html/ads7870_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ads7870_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ads7870_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ads7870_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/aduc7000_2a2d_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/aduc7000_2a2d_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/aduc7000_2membus_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/aduc7000_2membus_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/aduc7000_2processor_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/aduc7000_2processor_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/aduc7000_2uart_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/aduc7000_2uart_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/annotated.html
trunk/firmware/arm/common/procyon/armlib/docs/html/arp_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/arp_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/arp_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/arp_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/at91_2a2d_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/at91_2a2d_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/at91_2i2c_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/at91_2i2c_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/at91_2processor_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/at91_2processor_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/at91_2spi_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/at91_2spi_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/at91_2timer_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/at91_2timer_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/at91_2uart_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/at91_2uart_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/at91_2uartintr_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/at91_2uartintr_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/at91flash_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/at91flash_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/at91flash_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/at91flash_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ataconf_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ataconf_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/atadev_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/atadev_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/atadev_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/atadev_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ax88796_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ax88796_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ax88796_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ax88796_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ax88796__16_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ax88796conf_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ax88796conf_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ax88796conf__easyethavrasix_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/cs8900_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/cs8900_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/cs8900_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/cs8900_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/cs8900conf_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/cs8900conf_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/cy22150_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/cy22150_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/d2a_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/d2a_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/d2a_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/d2a_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/dhcp_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/dhcp_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/dhcp_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/dhcp_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/dir_000000.html
trunk/firmware/arm/common/procyon/armlib/docs/html/dir_000001.html
trunk/firmware/arm/common/procyon/armlib/docs/html/dir_000002.html
trunk/firmware/arm/common/procyon/armlib/docs/html/dir_000003.html
trunk/firmware/arm/common/procyon/armlib/docs/html/dir_000004.html
trunk/firmware/arm/common/procyon/armlib/docs/html/dir_000005.html
trunk/firmware/arm/common/procyon/armlib/docs/html/dir_000006.html
trunk/firmware/arm/common/procyon/armlib/docs/html/dirs.html
trunk/firmware/arm/common/procyon/armlib/docs/html/enc28j60_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/enc28j60_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/enc28j60_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/enc28j60_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/fatconf_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ft245__io_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ft245__mem_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/functions.html
trunk/firmware/arm/common/procyon/armlib/docs/html/functions_vars.html
trunk/firmware/arm/common/procyon/armlib/docs/html/globals_vars.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__a2d__at91.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__ads7870.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__arp.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__ax88796.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__buffer.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__cs8900.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__dhcp.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__driver__arm__aduc7000.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__driver__arm__at91.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__driver__arm__lpc2000.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__driver__hw.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__enc28j60.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__flash__at91.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__general.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__i2c__at91.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__i2ceeprom.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__icmp.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__ip.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__net.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__netstack.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__network.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__nic.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__param.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__prism2.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__processor__aduc7000.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__processor__at91.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__processor__lpc2000.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__rprintf.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__rtl8019.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__spi__at91.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__stxetx.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__timer__at91.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__uart__at91.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__uartdma__at91.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__uartintr__at91.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__vt100.html
trunk/firmware/arm/common/procyon/armlib/docs/html/group__xmodem.html
trunk/firmware/arm/common/procyon/armlib/docs/html/i2ceeprom_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/i2ceeprom_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/i2ceeprom_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/i2ceeprom_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/icmp_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/icmp_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/icmp_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/icmp_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/install.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ip_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ip_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ip_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/ip_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/lpc2000_2a2d_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/lpc2000_2a2d_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/lpc2000_2i2c_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/lpc2000_2i2c_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/lpc2000_2membus_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/lpc2000_2membus_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/lpc2000_2processor_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/lpc2000_2processor_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/lpc2000_2spi_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/lpc2000_2spi_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/lpc2000_2timer_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/lpc2000_2timer_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/lpc2000_2uart_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/lpc2000_2uart_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/lpc2000_2uartintr_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/lpc2000_2uartintr_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/m41t80_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/m41t80_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/membus__opt_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/membus__opt_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/membus__slow_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/modules.html
trunk/firmware/arm/common/procyon/armlib/docs/html/net_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/net_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/net_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/net_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/netstack_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/netstack_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/netstack_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/netstack_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/nic_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/nic_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/pages.html
trunk/firmware/arm/common/procyon/armlib/docs/html/param_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/param_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/param_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/param_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/part_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/part_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/part_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/part_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/pca9532_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/pca9532_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/po1030_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/po1030_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/po1030_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/prism2_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/prism2_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/prism2_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/prism2_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/prism2conf_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/prism2conf_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/prism2conf__airdrop_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/prism2rids_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/relnotes.html
trunk/firmware/arm/common/procyon/armlib/docs/html/rtl8019_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/rtl8019_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/rtl8019_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/rtl8019_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/rtl8019conf_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/rtl8019conf_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/scheduler_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/scheduler_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/scheduler_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/scheduler_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/spiflash_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/spiflash_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/spiflash_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/spiflash_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/structipConfig.html
trunk/firmware/arm/common/procyon/armlib/docs/html/structnetBootpHeader.html
trunk/firmware/arm/common/procyon/armlib/docs/html/structnetDhcpHeader.html
trunk/firmware/arm/common/procyon/armlib/docs/html/uartdma_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/uartdma_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/uartdma_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/uartdma_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/html/xmodem_8c-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/xmodem_8c.html
trunk/firmware/arm/common/procyon/armlib/docs/html/xmodem_8h-source.html
trunk/firmware/arm/common/procyon/armlib/docs/html/xmodem_8h.html
trunk/firmware/arm/common/procyon/armlib/docs/install.dox
trunk/firmware/arm/common/procyon/armlib/docs/mainpage.dox
trunk/firmware/arm/common/procyon/armlib/docs/network.dox
trunk/firmware/arm/common/procyon/armlib/docs/releasenotes.dox
trunk/firmware/arm/common/procyon/armlib/examples/rprintf/Debug/
trunk/firmware/arm/common/procyon/armlib/examples/rprintf/GCCproject.dsp
trunk/firmware/arm/common/procyon/armlib/examples/rprintf/GCCproject.dsw
trunk/firmware/arm/common/procyon/armlib/examples/uart/Debug/
trunk/firmware/arm/common/procyon/armlib/examples/uart/Debug/vc60.idb
trunk/firmware/arm/common/procyon/armlib/examples/uart/Debug/vc60.pdb
trunk/firmware/arm/common/procyon/armlib/examples/uart/GCCproject.dsp
trunk/firmware/arm/common/procyon/armlib/examples/uart/GCCproject.dsw
trunk/firmware/arm/common/procyon/armlib/ft245_io.c
trunk/firmware/arm/common/procyon/armlib/ft245_mem.c
trunk/firmware/arm/common/procyon/armlib/i2ceeprom.c
trunk/firmware/arm/common/procyon/armlib/i2ceeprom.h
trunk/firmware/arm/common/procyon/armlib/m41t80.c
trunk/firmware/arm/common/procyon/armlib/m41t80.h
trunk/firmware/arm/common/procyon/armlib/net/
trunk/firmware/arm/common/procyon/armlib/net/arp.c
trunk/firmware/arm/common/procyon/armlib/net/arp.h
trunk/firmware/arm/common/procyon/armlib/net/arp.lst
trunk/firmware/arm/common/procyon/armlib/net/ax88796.c
trunk/firmware/arm/common/procyon/armlib/net/ax88796.h
trunk/firmware/arm/common/procyon/armlib/net/ax88796.lst
trunk/firmware/arm/common/procyon/armlib/net/ax88796_16.c
trunk/firmware/arm/common/procyon/armlib/net/conf/
trunk/firmware/arm/common/procyon/armlib/net/conf/ax88796conf.h
trunk/firmware/arm/common/procyon/armlib/net/conf/ax88796conf_easyethavrasix.h
trunk/firmware/arm/common/procyon/armlib/net/conf/cs8900conf.h
trunk/firmware/arm/common/procyon/armlib/net/conf/prism2conf.h
trunk/firmware/arm/common/procyon/armlib/net/conf/prism2conf_airdrop.h
trunk/firmware/arm/common/procyon/armlib/net/conf/rtl8019conf.h
trunk/firmware/arm/common/procyon/armlib/net/cs8900.c
trunk/firmware/arm/common/procyon/armlib/net/cs8900.h
trunk/firmware/arm/common/procyon/armlib/net/dhcp.c
trunk/firmware/arm/common/procyon/armlib/net/dhcp.h
trunk/firmware/arm/common/procyon/armlib/net/dhcp.lst
trunk/firmware/arm/common/procyon/armlib/net/enc28j60.c
trunk/firmware/arm/common/procyon/armlib/net/enc28j60.h
trunk/firmware/arm/common/procyon/armlib/net/icmp.c
trunk/firmware/arm/common/procyon/armlib/net/icmp.h
trunk/firmware/arm/common/procyon/armlib/net/icmp.lst
trunk/firmware/arm/common/procyon/armlib/net/ip.c
trunk/firmware/arm/common/procyon/armlib/net/ip.h
trunk/firmware/arm/common/procyon/armlib/net/ip.lst
trunk/firmware/arm/common/procyon/armlib/net/net.c
trunk/firmware/arm/common/procyon/armlib/net/net.h
trunk/firmware/arm/common/procyon/armlib/net/net.lst
trunk/firmware/arm/common/procyon/armlib/net/netstack.c
trunk/firmware/arm/common/procyon/armlib/net/netstack.h
trunk/firmware/arm/common/procyon/armlib/net/netstack.lst
trunk/firmware/arm/common/procyon/armlib/net/nic.h
trunk/firmware/arm/common/procyon/armlib/net/prism2.c
trunk/firmware/arm/common/procyon/armlib/net/prism2.h
trunk/firmware/arm/common/procyon/armlib/net/prism2rids.h
trunk/firmware/arm/common/procyon/armlib/net/rtl8019.c
trunk/firmware/arm/common/procyon/armlib/net/rtl8019.h
trunk/firmware/arm/common/procyon/armlib/param.c
trunk/firmware/arm/common/procyon/armlib/param.h
trunk/firmware/arm/common/procyon/armlib/part.c
trunk/firmware/arm/common/procyon/armlib/part.h
trunk/firmware/arm/common/procyon/armlib/pca9532.c
trunk/firmware/arm/common/procyon/armlib/pca9532.h
trunk/firmware/arm/common/procyon/armlib/po1030.c
trunk/firmware/arm/common/procyon/armlib/po1030.h
trunk/firmware/arm/common/procyon/armlib/scheduler.c
trunk/firmware/arm/common/procyon/armlib/scheduler.h
trunk/firmware/arm/common/procyon/armlib/spiflash.c
trunk/firmware/arm/common/procyon/armlib/spiflash.h
trunk/firmware/arm/common/procyon/armlib/xmodem.c
trunk/firmware/arm/common/procyon/armlib/xmodem.h
Modified: trunk/firmware/arm/common/procyon/armlib/ad6620.c
===================================================================
--- trunk/firmware/arm/common/procyon/armlib/ad6620.c 2008-02-17 15:09:58 UTC (rev 846)
+++ trunk/firmware/arm/common/procyon/armlib/ad6620.c 2008-02-17 15:42:27 UTC (rev 847)
@@ -19,7 +19,7 @@
//
//*****************************************************************************
-#include "lpc210x.h"
+#include "lpc2000.h"
#include "global.h"
#include "timer.h"
@@ -29,9 +29,19 @@
// global variables
+void ad6620Write(unsigned int addr, unsigned char data)
+{
+ ((volatile u16*)AD6620_REG_BASE)[addr] = data;
+}
+
+unsigned char ad6620Read(unsigned int addr)
+{
+ return ((volatile u16*)AD6620_REG_BASE)[addr];
+}
+
void ad6620Init(void)
{
- membusInit();
+ //membusInit();
// reset device
//IOSET = AD9854_RESET;
@@ -43,21 +53,29 @@
// initialize receiver - set soft reset
ad6620WriteReg(AD6620_REG_MODE_CTRL, 0x01);
+ // initialize RCF filter coeffs
+ ad6620WriteReg(AD6620_REG_RCF_COEFF, 0x20000);
// set NCO
+ ad6620WriteReg(AD6620_REG_NCO_CTRL, 0);
ad6620WriteReg(AD6620_REG_NCO_SYNC, 0);
+ ad6620WriteReg(AD6620_REG_NCO_FREQ, 0);
ad6620WriteReg(AD6620_REG_NCO_PHASE, 0);
- ad6620WriteReg(AD6620_REG_NCO_FREQ, 0);
// set CIC2 filter
- ad6620WriteReg(AD6620_REG_CIC2_SCALE, 1);
- ad6620WriteReg(AD6620_REG_CIC2_DECIM, 4-1);
+ ad6620WriteReg(AD6620_REG_CIC2_SCALE, 6);
+ ad6620WriteReg(AD6620_REG_CIC2_DECIM, 16-1);
+// ad6620WriteReg(AD6620_REG_CIC2_SCALE, 2);
+// ad6620WriteReg(AD6620_REG_CIC2_DECIM, 4-1);
// set CIC5 filter
- ad6620WriteReg(AD6620_REG_CIC5_SCALE, 1);
- ad6620WriteReg(AD6620_REG_CIC5_DECIM, 10-1);
+ ad6620WriteReg(AD6620_REG_CIC5_SCALE, 20);
+ ad6620WriteReg(AD6620_REG_CIC5_DECIM, 32-1);
+// ad6620WriteReg(AD6620_REG_CIC5_SCALE, 12);
+// ad6620WriteReg(AD6620_REG_CIC5_DECIM, 10-1);
// set RCF filter
ad6620WriteReg(AD6620_REG_RCF_CTRL, 1);
- ad6620WriteReg(AD6620_REG_RCF_DECIM, 52-1);
+ ad6620WriteReg(AD6620_REG_RCF_DECIM, 32-1);
ad6620WriteReg(AD6620_REG_RCFADDR_OFS, 0);
- ad6620WriteReg(AD6620_REG_RCF_TAPS, 52-1);
+ ad6620WriteReg(AD6620_REG_RCF_TAPS, 0);
+// ad6620WriteReg(AD6620_REG_RCF_TAPS, 32-1);
// set reserved register to zero
ad6620WriteReg(AD6620_REG_RESERVED, 0x00);
// initialize receiver - set operation mode
@@ -68,19 +86,13 @@
void ad6620WriteReg(u16 reg, u32 data)
{
// write address
- membusWrite(AD6620_REG_BASE+AD6620_REG_AMR, reg>>8);
- membusRead(0);
- membusWrite(AD6620_REG_BASE+AD6620_REG_LAR, reg);
- membusRead(0);
+ ad6620Write(AD6620_REG_AMR, reg>>8);
+ ad6620Write(AD6620_REG_LAR, reg);
// write value
- membusWrite(AD6620_REG_BASE+AD6620_REG_DR3, data>>24);
- membusRead(0);
- membusWrite(AD6620_REG_BASE+AD6620_REG_DR2, data>>16);
- membusRead(0);
- membusWrite(AD6620_REG_BASE+AD6620_REG_DR1, data>>8);
- membusRead(0);
- membusWrite(AD6620_REG_BASE+AD6620_REG_DR0, data);
- membusRead(0);
+ ad6620Write(AD6620_REG_DR3, data>>24);
+ ad6620Write(AD6620_REG_DR2, data>>16);
+ ad6620Write(AD6620_REG_DR1, data>>8);
+ ad6620Write(AD6620_REG_DR0, data);
}
@@ -88,75 +100,97 @@
{
u32 data;
// write address
- membusWrite(AD6620_REG_BASE+AD6620_REG_AMR, reg>>8);
- membusRead(0);
- membusWrite(AD6620_REG_BASE+AD6620_REG_LAR, reg);
- membusRead(0);
+ ad6620Write(AD6620_REG_AMR, reg>>8);
+ ad6620Write(AD6620_REG_LAR, reg);
// read value
- data = (membusRead(AD6620_REG_BASE+AD6620_REG_DR0) & 0x000000FF);
- membusRead(0);
- data |= (membusRead(AD6620_REG_BASE+AD6620_REG_DR1) & 0x000000FF)<<8;
- membusRead(0);
- data |= (membusRead(AD6620_REG_BASE+AD6620_REG_DR2) & 0x000000FF)<<16;
- membusRead(0);
- data |= (membusRead(AD6620_REG_BASE+AD6620_REG_DR3) & 0x000000FF)<<24;
- membusRead(0);
+ data = (ad6620Read(AD6620_REG_DR0) & 0x000000FF);
+ data |= (ad6620Read(AD6620_REG_DR1) & 0x000000FF)<<8;
+ data |= (ad6620Read(AD6620_REG_DR2) & 0x000000FF)<<16;
+ data |= (ad6620Read(AD6620_REG_DR3) & 0x000000FF)<<24;
return data;
}
+void ad6620SetNCOMode(u08 mode)
+{
+ ad6620WriteReg(AD6620_REG_NCO_CTRL, mode);
+}
+
+void ad6620SetNCOFreq(u32 freqHz)
+{
+ u32 nco_freq;
+ nco_freq = ((u64)freqHz<<32)/(AD6620_REFCLK_FREQ);
+ ad6620WriteReg(AD6620_REG_NCO_FREQ, nco_freq);
+}
+
+void ad6620SetNCOPhase(u16 phase)
+{
+ ad6620WriteReg(AD6620_REG_NCO_PHASE, phase);
+}
+
+void ad6620LoadRCFilter(int start, int taps, s32* coeffs)
+{
+ int i;
+ // load RCF filter taps into receiver
+ for(i=0;i<taps;i++)
+ {
+ ad6620WriteReg(AD6620_REG_RCF_COEFF+start+i, coeffs[i]>>12);
+ }
+}
+
+
void ad6620ShowRegisters(void)
{
// read and print all registers
- rprintfStr("Mode Control : ");
+ rprintfStr("Mode Control : 0x");
rprintfu08(ad6620ReadReg(AD6620_REG_MODE_CTRL));
rprintfCRLF();
- rprintfStr("NCO Control : ");
+ rprintfStr("NCO Control : 0x");
rprintfu08(ad6620ReadReg(AD6620_REG_NCO_CTRL));
rprintfCRLF();
- rprintfStr("NCO SYNC Control : ");
+ rprintfStr("NCO SYNC Control : 0x");
rprintfu32(ad6620ReadReg(AD6620_REG_NCO_SYNC));
rprintfCRLF();
- rprintfStr("NCO Frequency : ");
+ rprintfStr("NCO Frequency : 0x");
rprintfu32(ad6620ReadReg(AD6620_REG_NCO_FREQ));
rprintfCRLF();
- rprintfStr("NCO Phase Offset : ");
+ rprintfStr("NCO Phase Offset : 0x");
rprintfu16(ad6620ReadReg(AD6620_REG_NCO_PHASE));
rprintfCRLF();
- rprintfStr("INPUT/CIC2 Scale : ");
+ rprintfStr("INPUT/CIC2 Scale : 0x");
rprintfu08(ad6620ReadReg(AD6620_REG_CIC2_SCALE));
rprintfCRLF();
- rprintfStr("CIC2 Decimation : ");
+ rprintfStr("CIC2 Decimation : 0x");
rprintfu08(ad6620ReadReg(AD6620_REG_CIC2_DECIM));
rprintfCRLF();
- rprintfStr("CIC5 Scale : ");
+ rprintfStr("CIC5 Scale : 0x");
rprintfu08(ad6620ReadReg(AD6620_REG_CIC5_SCALE));
rprintfCRLF();
- rprintfStr("CIC5 Decimation : ");
+ rprintfStr("CIC5 Decimation : 0x");
rprintfu08(ad6620ReadReg(AD6620_REG_CIC5_DECIM));
rprintfCRLF();
- rprintfStr("OUTPUT/RCF Control: ");
+ rprintfStr("OUTPUT/RCF Control: 0x");
rprintfu08(ad6620ReadReg(AD6620_REG_RCF_CTRL));
rprintfCRLF();
- rprintfStr("RCF Decimation : ");
+ rprintfStr("RCF Decimation : 0x");
rprintfu08(ad6620ReadReg(AD6620_REG_RCF_DECIM));
rprintfCRLF();
- rprintfStr("RCF Address Offset: ");
+ rprintfStr("RCF Address Offset: 0x");
rprintfu08(ad6620ReadReg(AD6620_REG_RCFADDR_OFS));
rprintfCRLF();
- rprintfStr("RCF Taps : ");
+ rprintfStr("RCF Taps : 0x");
rprintfu08(ad6620ReadReg(AD6620_REG_RCF_TAPS));
rprintfCRLF();
}
Modified: trunk/firmware/arm/common/procyon/armlib/ad6620.h
===================================================================
--- trunk/firmware/arm/common/procyon/armlib/ad6620.h 2008-02-17 15:09:58 UTC (rev 846)
+++ trunk/firmware/arm/common/procyon/armlib/ad6620.h 2008-02-17 15:42:27 UTC (rev 847)
@@ -27,14 +27,13 @@
// defines
// hardware
-/*
-#define AD6620_REFCLK_FREQ 24000000l
-#define AD6620_IO_UPDATE P04
+#define AD6620_REFCLK_FREQ 50000000l
+/*#define AD6620_IO_UPDATE P04
#define AD6620_RESET P05
*/
// base address
-#define AD6620_REG_BASE 0x8800
+#define AD6620_REG_BASE 0x81000200
// external interface registers
#define AD6620_REG_DR0 0x00
@@ -58,7 +57,7 @@
#define AD6620_REG_CIC2_DECIM 0x306
#define AD6620_REG_CIC5_SCALE 0x307
-#define AD6620_REG_CIC5_DECIM 0x306
+#define AD6620_REG_CIC5_DECIM 0x308
#define AD6620_REG_RCF_CTRL 0x309
#define AD6620_REG_RCF_DECIM 0x30A
@@ -67,45 +66,19 @@
#define AD6620_REG_RESERVED 0x30D
-/*
-// mode defines
-#define AD9854_MODE_SINGLE 0x00
-#define AD9854_MODE_FSK 0x01
-#define AD9854_MODE_RAMPFSK 0x02
-#define AD9854_MODE_CHIRP 0x03
-#define AD9854_MODE_BPSK 0x04
+// register values
+#define AD6620_NCO_BYPASS 0x01
+#define AD6620_NCO_PHASE_DITHER 0x02
+#define AD6620_NCO_AMPL_DITHER 0x04
-// control register
-#define AD9854_INVSINC_BYPASS BIT(6)
-
-#define AD9854_INT_IO_UPDATE BIT(8)
-#define AD9854_MODE_MASK 0x00000E00
-#define AD9854_MODE0 BIT(9)
-#define AD9854_MODE1 BIT(10)
-#define AD9854_MODE2 BIT(11)
-
-#define AD9854_TRIANGLE BIT(13)
-#define AD9854_CLR_ACC2 BIT(14)
-#define AD9854_CLR_ACC1 BIT(15)
-
-#define AD9854_PLL_MULT_MASK 0x001F0000
-#define AD9854_PLL_MULT0 BIT(16)
-#define AD9854_PLL_MULT1 BIT(17)
-#define AD9854_PLL_MULT2 BIT(18)
-#define AD9854_PLL_MULT3 BIT(19)
-#define AD9854_PLL_MULT4 BIT(20)
-#define AD9854_PLL_BYPASS BIT(21)
-#define AD9854_PLL_RANGE BIT(22)
-#define AD9854_PD_DIG BIT(24)
-#define AD9854_PD_DAC BIT(25)
-#define AD9854_PD_QDAC BIT(26)
-#define AD9854_PD_COMP BIT(28)
-*/
-
void ad6620Init(void);
u32 ad6620ReadReg(u16 reg);
void ad6620WriteReg(u16 reg, u32 data);
+void ad6620SetNCOMode(u08 mode);
+void ad6620SetNCOFreq(u32 freqHz);
+void ad6620SetNCOPhase(u16 phase);
+void ad6620LoadRCFilter(int start, int taps, s32* coeffs);
void ad6620ShowRegisters(void);
Modified: trunk/firmware/arm/common/procyon/armlib/ad9854.c
===================================================================
--- trunk/firmware/arm/common/procyon/armlib/ad9854.c 2008-02-17 15:09:58 UTC (rev 846)
+++ trunk/firmware/arm/common/procyon/armlib/ad9854.c 2008-02-17 15:42:27 UTC (rev 847)
@@ -19,7 +19,7 @@
//
//*****************************************************************************
-#include "lpc210x.h"
+#include "lpc2000.h"
#include "global.h"
#include "timer.h"
@@ -30,16 +30,27 @@
// global variables
int Ad9854RefClkMult;
+
+void ad9854Write(unsigned int addr, unsigned char data)
+{
+ ((u16*)AD9854_REG_BASE)[addr] = data;
+}
+
+unsigned char ad9854Read(unsigned int addr)
+{
+ return ((u16*)AD9854_REG_BASE)[addr];
+}
+
void ad9854Init(void)
{
- membusInit();
+ //membusInit();
- // reset device
+/* // reset device
IOSET = AD9854_RESET;
IODIR |= AD9854_RESET;
delay(10000);
IOCLR = AD9854_RESET;
-
+*/
// setup IO Update pin
ad9854SetupIOUpdate(0);
@@ -50,121 +61,122 @@
void ad9854SetupIOUpdate(int state)
{
// clear IO Update pin
- IOCLR = AD9854_IO_UPDATE;
-
+// IOCLR = AD9854_IO_UPDATE;
+/*
if(state)
// set IO update line to output
IODIR |= AD9854_IO_UPDATE;
else
// set IO update line to input
IODIR &= ~AD9854_IO_UPDATE;
+*/
}
void ad9854ClockIOUpdate(void)
{
// assert IO Update line
- IOSET = AD9854_IO_UPDATE;
+// IOSET = AD9854_IO_UPDATE;
// wait
asm volatile ("nop\r\n nop\r\n");
// clear IO Update line
- IOCLR = AD9854_IO_UPDATE;
+// IOCLR = AD9854_IO_UPDATE;
}
void ad9854WritePhase1(u16 phase)
{
- membusWrite(AD9854_REG_BASE+AD9854_REG_PHASE1L, phase);
- membusWrite(AD9854_REG_BASE+AD9854_REG_PHASE1H, phase>>8);
+ ad9854Write(AD9854_REG_PHASE1L, phase);
+ ad9854Write(AD9854_REG_PHASE1H, phase>>8);
}
void ad9854WritePhase2(u16 phase)
{
- membusWrite(AD9854_REG_BASE+AD9854_REG_PHASE2L, phase);
- membusWrite(AD9854_REG_BASE+AD9854_REG_PHASE2H, phase>>8);
+ ad9854Write(AD9854_REG_PHASE2L, phase);
+ ad9854Write(AD9854_REG_PHASE2H, phase>>8);
}
void ad9854WriteFreq1(u64 freq)
{
- membusWrite(AD9854_REG_BASE+AD9854_REG_FREQ10, freq);
- membusWrite(AD9854_REG_BASE+AD9854_REG_FREQ11, freq>>8);
- membusWrite(AD9854_REG_BASE+AD9854_REG_FREQ12, freq>>16);
- membusWrite(AD9854_REG_BASE+AD9854_REG_FREQ13, freq>>24);
- membusWrite(AD9854_REG_BASE+AD9854_REG_FREQ14, freq>>32);
- membusWrite(AD9854_REG_BASE+AD9854_REG_FREQ15, freq>>40);
+ ad9854Write(AD9854_REG_FREQ10, freq);
+ ad9854Write(AD9854_REG_FREQ11, freq>>8);
+ ad9854Write(AD9854_REG_FREQ12, freq>>16);
+ ad9854Write(AD9854_REG_FREQ13, freq>>24);
+ ad9854Write(AD9854_REG_FREQ14, freq>>32);
+ ad9854Write(AD9854_REG_FREQ15, freq>>40);
}
void ad9854WriteFreq2(u64 freq)
{
- membusWrite(AD9854_REG_BASE+AD9854_REG_FREQ20, freq);
- membusWrite(AD9854_REG_BASE+AD9854_REG_FREQ21, freq>>8);
- membusWrite(AD9854_REG_BASE+AD9854_REG_FREQ22, freq>>16);
- membusWrite(AD9854_REG_BASE+AD9854_REG_FREQ23, freq>>24);
- membusWrite(AD9854_REG_BASE+AD9854_REG_FREQ24, freq>>32);
- membusWrite(AD9854_REG_BASE+AD9854_REG_FREQ25, freq>>40);
+ ad9854Write(AD9854_REG_FREQ20, freq);
+ ad9854Write(AD9854_REG_FREQ21, freq>>8);
+ ad9854Write(AD9854_REG_FREQ22, freq>>16);
+ ad9854Write(AD9854_REG_FREQ23, freq>>24);
+ ad9854Write(AD9854_REG_FREQ24, freq>>32);
+ ad9854Write(AD9854_REG_FREQ25, freq>>40);
}
void ad9854WriteDeltaFreq(u64 freq)
{
- membusWrite(AD9854_REG_BASE+AD9854_REG_DELTA0, freq);
- membusWrite(AD9854_REG_BASE+AD9854_REG_DELTA1, freq>>8);
- membusWrite(AD9854_REG_BASE+AD9854_REG_DELTA2, freq>>16);
- membusWrite(AD9854_REG_BASE+AD9854_REG_DELTA3, freq>>24);
- membusWrite(AD9854_REG_BASE+AD9854_REG_DELTA4, freq>>32);
- membusWrite(AD9854_REG_BASE+AD9854_REG_DELTA5, freq>>48);
+ ad9854Write(AD9854_REG_DELTA0, freq);
+ ad9854Write(AD9854_REG_DELTA1, freq>>8);
+ ad9854Write(AD9854_REG_DELTA2, freq>>16);
+ ad9854Write(AD9854_REG_DELTA3, freq>>24);
+ ad9854Write(AD9854_REG_DELTA4, freq>>32);
+ ad9854Write(AD9854_REG_DELTA5, freq>>48);
}
void ad9854WriteUpdateClock(u32 updclock)
{
- membusWrite(AD9854_REG_BASE+AD9854_REG_UPDCLOCK0, updclock);
- membusWrite(AD9854_REG_BASE+AD9854_REG_UPDCLOCK1, updclock>>8);
- membusWrite(AD9854_REG_BASE+AD9854_REG_UPDCLOCK2, updclock>>16);
- membusWrite(AD9854_REG_BASE+AD9854_REG_UPDCLOCK3, updclock>>24);
+ ad9854Write(AD9854_REG_UPDCLOCK0, updclock);
+ ad9854Write(AD9854_REG_UPDCLOCK1, updclock>>8);
+ ad9854Write(AD9854_REG_UPDCLOCK2, updclock>>16);
+ ad9854Write(AD9854_REG_UPDCLOCK3, updclock>>24);
}
void ad9854WriteRampRateClock(u32 rampclock)
{
- membusWrite(AD9854_REG_BASE+AD9854_REG_RAMPCLOCK0, rampclock);
- membusWrite(AD9854_REG_BASE+AD9854_REG_RAMPCLOCK1, rampclock>>8);
- membusWrite(AD9854_REG_BASE+AD9854_REG_RAMPCLOCK2, rampclock>>16);
+ ad9854Write(AD9854_REG_RAMPCLOCK0, rampclock);
+ ad9854Write(AD9854_REG_RAMPCLOCK1, rampclock>>8);
+ ad9854Write(AD9854_REG_RAMPCLOCK2, rampclock>>16);
}
void ad9854WriteControlReg(u32 cr)
{
- membusWrite(AD9854_REG_BASE+AD9854_REG_CTRL0, cr);
- membusWrite(AD9854_REG_BASE+AD9854_REG_CTRL1, cr>>8);
- membusWrite(AD9854_REG_BASE+AD9854_REG_CTRL2, cr>>16);
- membusWrite(AD9854_REG_BASE+AD9854_REG_CTRL3, cr>>24);
+ ad9854Write(AD9854_REG_CTRL0, cr);
+ ad9854Write(AD9854_REG_CTRL1, cr>>8);
+ ad9854Write(AD9854_REG_CTRL2, cr>>16);
+ ad9854Write(AD9854_REG_CTRL3, cr>>24);
}
void ad9854WriteAmplitudeI(u16 ampi)
{
- membusWrite(AD9854_REG_BASE+AD9854_REG_AMPLIL, ampi);
- membusWrite(AD9854_REG_BASE+AD9854_REG_AMPLIH, ampi>>8);
+ ad9854Write(AD9854_REG_AMPLIL, ampi);
+ ad9854Write(AD9854_REG_AMPLIH, ampi>>8);
}
void ad9854WriteAmplitudeQ(u16 ampq)
{
- membusWrite(AD9854_REG_BASE+AD9854_REG_AMPLQL, ampq);
- membusWrite(AD9854_REG_BASE+AD9854_REG_AMPLQH, ampq>>8);
+ ad9854Write(AD9854_REG_AMPLQL, ampq);
+ ad9854Write(AD9854_REG_AMPLQH, ampq>>8);
}
void ad9854WriteOSKeyRampRate(u16 ramprate)
{
- membusWrite(AD9854_REG_BASE+AD9854_REG_OSKEYRAMP, ramprate);
+ ad9854Write(AD9854_REG_OSKEYRAMP, ramprate);
}
void ad9854WriteQDAC(u16 qdac)
{
- membusWrite(AD9854_REG_BASE+AD9854_REG_QDACL, qdac);
- membusWrite(AD9854_REG_BASE+AD9854_REG_QDACH, qdac>>8);
+ ad9854Write(AD9854_REG_QDACL, qdac);
+ ad9854Write(AD9854_REG_QDACH, qdac>>8);
}
u32 ad9854ReadControlReg(void)
{
u32 cr=0;
- cr = (membusRead(AD9854_REG_BASE+AD9854_REG_CTRL0) & 0x000000FF);
- cr |= (membusRead(AD9854_REG_BASE+AD9854_REG_CTRL1) & 0x000000FF)<<8;
- cr |= (membusRead(AD9854_REG_BASE+AD9854_REG_CTRL2) & 0x000000FF)<<16;
- cr |= (membusRead(AD9854_REG_BASE+AD9854_REG_CTRL3) & 0x000000FF)<<24;
+ cr = (ad9854Read(AD9854_REG_CTRL0) & 0x000000FF);
+ cr |= (ad9854Read(AD9854_REG_CTRL1) & 0x000000FF)<<8;
+ cr |= (ad9854Read(AD9854_REG_CTRL2) & 0x000000FF)<<16;
+ cr |= (ad9854Read(AD9854_REG_CTRL3) & 0x000000FF)<<24;
return cr;
}
@@ -242,9 +254,15 @@
{
ftw = (((u64)freqHz<<32)/(AD9854_REFCLK_FREQ*Ad9854RefClkMult))<<16;
}
+ else if(freqHz < 0x1000000)
+ {
+ ftw = (((u64)freqHz<<32)/(AD9854_REFCLK_FREQ*Ad9854RefClkMult))<<16;
+ //ftw = (((u64)freqHz<<30)/(AD9854_REFCLK_FREQ*Ad9854RefClkMult))<<18;
+ }
else
{
- ftw = (((u64)freqHz<<20)/(AD9854_REFCLK_FREQ*Ad9854RefClkMult))<<28;
+ ftw = (((u64)freqHz<<32)/(AD9854_REFCLK_FREQ*Ad9854RefClkMult))<<16;
+ //ftw = (((u64)freqHz<<20)/(AD9854_REFCLK_FREQ*Ad9854RefClkMult))<<28;
}
ad9854WriteFreq1(ftw);
}
@@ -253,92 +271,104 @@
{
u32 updclock;
- // Update period = (N+1) \xD7 (SYSTEM CLOCK PERIOD \xD7 2)
- // Update freq = REFCLK_FREQ/(2*(N+1))
- // N = ((REFCLK_FREQ*Ad9854RefClkMult)/(2*UpdateHz))-1
- updclock = ((AD9854_REFCLK_FREQ*Ad9854RefClkMult)/(2*updclockHz))-1;
+ if(updclockHz)
+ {
+ // use internal update clock
+ // Update period = (N+1) \xD7 (SYSTEM CLOCK PERIOD \xD7 2)
+ // Update freq = REFCLK_FREQ/(2*(N+1))
+ // N = ((REFCLK_FREQ*Ad9854RefClkMult)/(2*UpdateHz))-1
+ updclock = ((AD9854_REFCLK_FREQ*Ad9854RefClkMult)/(2*updclockHz))-1;
- // turn off internal update
- ad9854ControlClear(AD9854_INT_IO_UPDATE);
- // write update counter register
- ad9854WriteUpdateClock(updclock);
- // turn on internal update
- ad9854ControlSet(AD9854_INT_IO_UPDATE);
- // manually clock update pin
- ad9854SetupIOUpdate(1);
- ad9854ClockIOUpdate();
- ad9854SetupIOUpdate(0);
+ // turn off internal update
+ ad9854ControlClear(AD9854_INT_IO_UPDATE);
+ // write update counter register
+ ad9854WriteUpdateClock(updclock);
+ // turn on internal update
+ ad9854ControlSet(AD9854_INT_IO_UPDATE);
+ // manually clock update pin
+ ad9854SetupIOUpdate(1);
+ ad9854ClockIOUpdate();
+ ad9854SetupIOUpdate(0);
+ }
+ else
+ {
+ // turn off internal update
+ ad9854ControlClear(AD9854_INT_IO_UPDATE);
+ // use external update clock
+ ad9854SetupIOUpdate(0);
+ }
+
}
void ad9854ShowRegisters(void)
{
// read and print all registers
- rprintfStr("Phase1 : ");
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_PHASE1H));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_PHASE1L));
+ rprintfStr("Phase1 : 0x");
+ rprintfu08(ad9854Read(AD9854_REG_PHASE1H));
+ rprintfu08(ad9854Read(AD9854_REG_PHASE1L));
rprintfCRLF();
- rprintfStr("Phase2 : ");
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_PHASE2H));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_PHASE2L));
+ rprintfStr("Phase2 : 0x");
+ rprintfu08(ad9854Read(AD9854_REG_PHASE2H));
+ rprintfu08(ad9854Read(AD9854_REG_PHASE2L));
rprintfCRLF();
- rprintfStr("Freq1 : ");
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_FREQ15));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_FREQ14));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_FREQ13));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_FREQ12));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_FREQ11));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_FREQ10));
+ rprintfStr("Freq1 : 0x");
+ rprintfu08(ad9854Read(AD9854_REG_FREQ15));
+ rprintfu08(ad9854Read(AD9854_REG_FREQ14));
+ rprintfu08(ad9854Read(AD9854_REG_FREQ13));
+ rprintfu08(ad9854Read(AD9854_REG_FREQ12));
+ rprintfu08(ad9854Read(AD9854_REG_FREQ11));
+ rprintfu08(ad9854Read(AD9854_REG_FREQ10));
rprintfCRLF();
- rprintfStr("Freq2 : ");
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_FREQ25));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_FREQ24));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_FREQ23));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_FREQ22));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_FREQ21));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_FREQ20));
+ rprintfStr("Freq2 : 0x");
+ rprintfu08(ad9854Read(AD9854_REG_FREQ25));
+ rprintfu08(ad9854Read(AD9854_REG_FREQ24));
+ rprintfu08(ad9854Read(AD9854_REG_FREQ23));
+ rprintfu08(ad9854Read(AD9854_REG_FREQ22));
+ rprintfu08(ad9854Read(AD9854_REG_FREQ21));
+ rprintfu08(ad9854Read(AD9854_REG_FREQ20));
rprintfCRLF();
- rprintfStr("DeltaFreq : ");
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_DELTA5));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_DELTA4));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_DELTA3));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_DELTA2));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_DELTA1));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_DELTA0));
+ rprintfStr("DeltaFreq : 0x");
+ rprintfu08(ad9854Read(AD9854_REG_DELTA5));
+ rprintfu08(ad9854Read(AD9854_REG_DELTA4));
+ rprintfu08(ad9854Read(AD9854_REG_DELTA3));
+ rprintfu08(ad9854Read(AD9854_REG_DELTA2));
+ rprintfu08(ad9854Read(AD9854_REG_DELTA1));
+ rprintfu08(ad9854Read(AD9854_REG_DELTA0));
rprintfCRLF();
- rprintfStr("Update Clock: ");
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_UPDCLOCK3));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_UPDCLOCK2));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_UPDCLOCK1));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_UPDCLOCK0));
+ rprintfStr("Update Clock: 0x");
+ rprintfu08(ad9854Read(AD9854_REG_UPDCLOCK3));
+ rprintfu08(ad9854Read(AD9854_REG_UPDCLOCK2));
+ rprintfu08(ad9854Read(AD9854_REG_UPDCLOCK1));
+ rprintfu08(ad9854Read(AD9854_REG_UPDCLOCK0));
rprintfCRLF();
- rprintfStr("Ramp Rate : ");
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_RAMPCLOCK2));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_RAMPCLOCK1));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_RAMPCLOCK0));
+ rprintfStr("Ramp Rate : 0x");
+ rprintfu08(ad9854Read(AD9854_REG_RAMPCLOCK2));
+ rprintfu08(ad9854Read(AD9854_REG_RAMPCLOCK1));
+ rprintfu08(ad9854Read(AD9854_REG_RAMPCLOCK0));
rprintfCRLF();
- rprintfStr("Control : ");
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_CTRL3));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_CTRL2));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_CTRL1));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_CTRL0));
+ rprintfStr("Control : 0x");
+ rprintfu08(ad9854Read(AD9854_REG_CTRL3));
+ rprintfu08(ad9854Read(AD9854_REG_CTRL2));
+ rprintfu08(ad9854Read(AD9854_REG_CTRL1));
+ rprintfu08(ad9854Read(AD9854_REG_CTRL0));
rprintfCRLF();
- rprintfStr("Amplitude I : ");
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_AMPLIH));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_AMPLIL));
+ rprintfStr("Amplitude I : 0x");
+ rprintfu08(ad9854Read(AD9854_REG_AMPLIH));
+ rprintfu08(ad9854Read(AD9854_REG_AMPLIL));
rprintfCRLF();
- rprintfStr("Amplitude Q : ");
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_AMPLQH));
- rprintfu08(membusRead(AD9854_REG_BASE+AD9854_REG_AMPLQL));
+ rprintfStr("Amplitude Q : 0x");
+ rprintfu08(ad9854Read(AD9854_REG_AMPLQH));
+ rprintfu08(ad9854Read(AD9854_REG_AMPLQL));
rprintfCRLF();
}
Modified: trunk/firmware/arm/common/procyon/armlib/ad9854.h
===================================================================
--- trunk/firmware/arm/common/procyon/armlib/ad9854.h 2008-02-17 15:09:58 UTC (rev 846)
+++ trunk/firmware/arm/common/procyon/armlib/ad9854.h 2008-02-17 15:42:27 UTC (rev 847)
@@ -27,12 +27,14 @@
// defines
// hardware
-#define AD9854_REFCLK_FREQ 24000000l
+//#define AD9854_REFCLK_FREQ 24000000l
+#define AD9854_REFCLK_FREQ 50000000l
#define AD9854_IO_UPDATE P04
#define AD9854_RESET P05
// base address
-#define AD9854_REG_BASE 0x8400
+//#define AD9854_REG_BASE 0x8400
+#define AD9854_REG_BASE 0x81000400
// registers
#define AD9854_REG_PHASE1H 0x00
Added: trunk/firmware/arm/common/procyon/armlib/ads7870.c
===================================================================
--- trunk/firmware/arm/common/procyon/armlib/ads7870.c (rev 0)
+++ trunk/firmware/arm/common/procyon/armlib/ads7870.c 2008-02-17 15:42:27 UTC (rev 847)
@@ -0,0 +1,120 @@
+/*! \file ads7870.c \brief TI ADS7870 12-bit 8ch A/D Converter Driver Library. */
+//*****************************************************************************
+//
+// File Name : 'ads7870.c'
+// Title : TI ADS7870 12-bit 8ch A/D Converter Driver Library
+// Author : Pascal Stang - Copyright (C) 2005
+// Created : 2005.07.19
+// Revised : 2005.07.21
+// Version : 0.1
+// Target MCU : Atmel AVR Series
+// Editor Tabs : 4
+//
+// NOTE: This code is currently below version 1.0, and therefore is considered
+// to be lacking in some functionality or documentation, or may not be fully
+// tested. Nonetheless, you can expect most functions to work.
+//
+// This code is distributed under the GNU Pub...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-17 15:10:03
|
Revision: 846
http://can.svn.sourceforge.net/can/?rev=846&view=rev
Author: akhe
Date: 2008-02-17 07:09:58 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
Arranging files in the common structure
Added Paths:
-----------
trunk/firmware/arm/str/cantest_str73x_gcc/docs/
trunk/firmware/arm/str/cantest_str73x_gcc/project/
trunk/firmware/arm/str/cantest_str73x_gcc/project/Makefile
trunk/firmware/arm/str/cantest_str73x_gcc/project/Readme.txt
trunk/firmware/arm/str/cantest_str73x_gcc/project/STR73x-RAM.ld
trunk/firmware/arm/str/cantest_str73x_gcc/project/STR73x-ROM.ld
trunk/firmware/arm/str/cantest_str73x_gcc/project/cantest.pnproj
trunk/firmware/arm/str/cantest_str73x_gcc/project/cantest.pnps
trunk/firmware/arm/str/cantest_str73x_gcc/project/main.c
trunk/firmware/arm/str/cantest_str73x_gcc/project/startup.s
trunk/firmware/arm/str/cantest_str73x_gcc/project/vector.s
trunk/firmware/arm/str/cantest_str73x_gcc/project/vectors.c
trunk/firmware/arm/str/cantest_str73x_gcc/project/vectors.h
Removed Paths:
-------------
trunk/firmware/arm/str/cantest_str73x_gcc/Makefile
trunk/firmware/arm/str/cantest_str73x_gcc/Readme.txt
trunk/firmware/arm/str/cantest_str73x_gcc/STR73x-RAM.ld
trunk/firmware/arm/str/cantest_str73x_gcc/STR73x-ROM.ld
trunk/firmware/arm/str/cantest_str73x_gcc/cantest.pnproj
trunk/firmware/arm/str/cantest_str73x_gcc/cantest.pnps
trunk/firmware/arm/str/cantest_str73x_gcc/main.c
trunk/firmware/arm/str/cantest_str73x_gcc/startup.s
trunk/firmware/arm/str/cantest_str73x_gcc/vector.s
trunk/firmware/arm/str/cantest_str73x_gcc/vectors.c
trunk/firmware/arm/str/cantest_str73x_gcc/vectors.h
Deleted: trunk/firmware/arm/str/cantest_str73x_gcc/Makefile
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_gcc/Makefile 2008-02-17 14:54:15 UTC (rev 845)
+++ trunk/firmware/arm/str/cantest_str73x_gcc/Makefile 2008-02-17 15:09:58 UTC (rev 846)
@@ -1,492 +0,0 @@
-# Hey Emacs, this is a -*- makefile -*-
-#
-# WinARM template makefile
-# by Giacomo Fazio and Antonio Nasca, Catania, Italy
-# <gia...@gm...>
-# <ant...@ho...>
-#
-# based on the WinARM template makefile written by Martin Thomas
-# Released to the Public Domain
-# Please read the make user manual!
-#
-#
-# On command line:
-#
-# make all = Make software.
-#
-# make clean = Clean out built project files.
-#
-# make program = Download the hex file to the device
-#
-# (TODO: make filename.s = Just compile filename.c into the assembler code only)
-#
-# To rebuild project do "make clean" then "make all".
-# Toolchain prefix (i.e arm-elf -> arm-elf-gcc.exe)
-TCHAIN = arm-elf
-#TCHAIN = arm-none-eabi
-
-#USE_THUMB_MODE = YES
-USE_THUMB_MODE = NO
-
-# MCU name and submodel
-MCU = arm7tdmi
-SUBMDL = STR73x
-
-## Create ROM-Image
-RUN_MODE=ROM_RUN
-## Create RAM-Image
-#RUN_MODE=RAM_RUN
-
-## not supported in this example:
-## Exception-Vector placement only supported for "ROM_RUN"
-## (placement settings ignored when using "RAM_RUN")
-## - Exception vectors in ROM:
-#VECTOR_LOCATION=VECTORS_IN_ROM
-## - Exception vectors in RAM:
-#VECTOR_LOCATION=VECTORS_IN_RAM
-
-
-# Target file name (without extension).
-TARGET = main
-
-# List C source files here. (C dependencies are automatically generated.)
-# use file-extension c for "c-only"-files
-SRC = $(TARGET).c ../common/73x_lcd.c ../common/sysTime.c ../common/delay.c
-
-# List C source files here which must be compiled in ARM-Mode.
-# use file-extension c for "c-only"-files
-SRCARM = vectors.c
-# thumb is possible too for vectors.c - keep ARM, TODO: profile
-
-# List C++ source files here.
-# use file-extension cpp for C++-files (use extension .cpp)
-CPPSRC =
-
-# List C++ source files here which must be compiled in ARM-Mode.
-# use file-extension cpp for C++-files (use extension .cpp)
-#CPPSRCARM = $(TARGET).cpp
-CPPSRCARM =
-
-# List Assembler source files here.
-# Make them always end in a capital .S. Files ending in a lowercase .s
-# will not be considered source files but generated files (assembler
-# output from the compiler), and will be deleted upon "make clean"!
-# Even though the DOS/Win* filesystem matches both .s and .S the same,
-# it will preserve the spelling of the filenames, and gcc itself does
-# care about how the name is spelled on its command-line.
-ASRC =
-
-# List Assembler source files here which must be assembled in ARM-Mode..
-ASRCARM = vector.S startup.S
-
-# Path to Linker-Scripts
-LINKERSCRIPTPATH = .
-
-## Output format. (can be ihex or binary or both)
-## (binary i.e. for openocd and SAM-BA, hex i.e. for lpc21isp and uVision)
-#FORMAT = ihex
-#FORMAT = binary
-FORMAT = both
-
-# Optimization level, can be [0, 1, 2, 3, s].
-# 0 = turn off optimization. s = optimize for size.
-# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
-#OPT = s
-OPT = 0
-
-## Using the Atmel AT91_lib produces warning with
-## the default warning-levels.
-## yes - disable these warnings; no - keep default settings
-#AT91LIBNOWARN = yes
-AT91LIBNOWARN = no
-
-# Debugging format.
-# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
-# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
-#DEBUG = stabs
-DEBUG = dwarf-2
-
-# List any extra directories to look for include files here.
-# Each directory must be seperated by a space.
-EXTRAINCDIRS = "K:/include" ../common/str73x_lib/include
-
-# List any extra directories to look for library files here.
-# Each directory must be seperated by a space.
-#EXTRA_LIBDIRS = ../arm7_efsl_0_2_4
-EXTRA_LIBDIRS = K:/lib ../common/str73x_lib
-
-
-# Compiler flag to set the C Standard level.
-# c89 - "ANSI" C
-# gnu89 - c89 plus GCC extensions
-# c99 - ISO C99 standard (not yet fully implemented)
-# gnu99 - c99 plus GCC extensions
-CSTANDARD = -std=gnu99
-
-# Place -D or -U options for C here
-CDEFS = -D$(RUN_MODE)
-
-# Place -I options here
-CINCS =
-
-# Place -D or -U options for ASM here
-ADEFS = -D$(RUN_MODE)
-
-ifdef VECTOR_LOCATION
-CDEFS += -D$(VECTOR_LOCATION)
-ADEFS += -D$(VECTOR_LOCATION)
-endif
-
-CDEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
-ADEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
-
-# Compiler flags.
-
-ifeq ($(USE_THUMB_MODE),YES)
-THUMB = -mthumb
-THUMB_IW = -mthumb-interwork
-else
-THUMB =
-THUMB_IW =
-endif
-
-# -g*: generate debugging information
-# -O*: optimization level
-# -f...: tuning, see GCC manual and avr-libc documentation
-# -Wall...: warning level
-# -Wa,...: tell GCC to pass this to the assembler.
-# -adhlns...: create assembler listing
-#
-# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
-CFLAGS = -g$(DEBUG)
-CFLAGS += $(CDEFS) $(CINCS)
-CFLAGS += -O$(OPT)
-CFLAGS += -Wall -Wcast-align -Wimplicit
-CFLAGS += -Wpointer-arith -Wswitch
-CFLAGS += -ffunction-sections -fdata-sections
-CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused
-CFLAGS += -Wa,-adhlns=$(subst $(suffix $<),.lst,$<)
-CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
-
-# flags only for C
-CONLYFLAGS += -Wnested-externs
-CONLYFLAGS += $(CSTANDARD)
-
-ifneq ($(AT91LIBNOWARN),yes)
-#AT91-lib warnings with:
-CFLAGS += -Wcast-qual
-CONLYFLAGS += -Wmissing-prototypes
-CONLYFLAGS += -Wstrict-prototypes
-CONLYFLAGS += -Wmissing-declarations
-endif
-
-# flags only for C++ (arm-elf-g++)
-# CPPFLAGS = -fno-rtti -fno-exceptions
-CPPFLAGS =
-
-# Assembler flags.
-# -Wa,...: tell GCC to pass this to the assembler.
-# -ahlns: create listing
-# -g$(DEBUG): have the assembler create line number information
-ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG)
-
-
-#Additional libraries.
-
-# Extra libraries
-# Each library-name must be seperated by a space.
-# To add libxyz.a, libabc.a and libefsl.a:
-# EXTRA_LIBS = xyz abc efsl
-#EXTRA_LIBS = efsl
-EXTRA_LIBS = STR73x_lib
-
-#Support for newlibc-lpc (file: libnewlibc-lpc.a)
-#NEWLIBLPC = -lnewlib-lpc
-
-MATH_LIB = -lm
-
-# CPLUSPLUS_LIB = -lstdc++
-
-
-# Linker flags.
-# -Wl,...: tell GCC to pass this to linker.
-# -Map: create map file
-# --cref: add cross reference to map file
-LDFLAGS = -nostartfiles -Wl,-Map=$(TARGET).map,--cref,--gc-sections
-LDFLAGS += -lc
-LDFLAGS += $(NEWLIBLPC) $(MATH_LIB)
-LDFLAGS += -lc -lgcc
-LDFLAGS += $(CPLUSPLUS_LIB)
-LDFLAGS += $(patsubst %,-L%,$(EXTRA_LIBDIRS))
-LDFLAGS += $(patsubst %,-l%,$(EXTRA_LIBS))
-
-# Set Linker-Script Depending On Selected Memory and Controller
-ifeq ($(RUN_MODE),RAM_RUN)
-LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-RAM.ld
-else
-LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-ROM.ld
-endif
-
-
-# Define directories, if needed.
-## DIRARM = c:/WinARM/
-## DIRARMBIN = $(DIRAVR)/bin/
-## DIRAVRUTILS = $(DIRAVR)/utils/bin/
-
-# Define programs and commands.
-SHELL = sh
-CC = $(TCHAIN)-gcc
-CPP = $(TCHAIN)-g++
-AR = $(TCHAIN)-ar
-OBJCOPY = $(TCHAIN)-objcopy
-OBJDUMP = $(TCHAIN)-objdump
-SIZE = $(TCHAIN)-size
-NM = $(TCHAIN)-nm
-REMOVE = rm -f
-REMOVEDIR = rm -f -r
-COPY = cp
-
-# Define Messages
-# English
-MSG_ERRORS_NONE = Errors: none
-MSG_BEGIN = "-------- begin (mode: $(RUN_MODE)) --------"
-MSG_END = -------- end --------
-MSG_SIZE_BEFORE = Size before:
-MSG_SIZE_AFTER = Size after:
-MSG_FLASH = Creating load file for Flash:
-MSG_EXTENDED_LISTING = Creating Extended Listing:
-MSG_SYMBOL_TABLE = Creating Symbol Table:
-MSG_LINKING = Linking:
-MSG_COMPILING = Compiling C:
-MSG_COMPILING_ARM = "Compiling C (ARM-only):"
-MSG_COMPILINGCPP = Compiling C++:
-MSG_COMPILINGCPP_ARM = "Compiling C++ (ARM-only):"
-MSG_ASSEMBLING = Assembling:
-MSG_ASSEMBLING_ARM = "Assembling (ARM-only):"
-MSG_CLEANING = Cleaning project:
-MSG_FORMATERROR = Can not handle output-format
-MSG_LPC21_RESETREMINDER = You may have to bring the target in bootloader-mode now.
-
-# Define all object files.
-COBJ = $(SRC:.c=.o)
-AOBJ = $(ASRC:.S=.o)
-COBJARM = $(SRCARM:.c=.o)
-AOBJARM = $(ASRCARM:.S=.o)
-CPPOBJ = $(CPPSRC:.cpp=.o)
-CPPOBJARM = $(CPPSRCARM:.cpp=.o)
-
-# Define all listing files.
-LST = $(ASRC:.S=.lst) $(ASRCARM:.S=.lst) $(SRC:.c=.lst) $(SRCARM:.c=.lst)
-LST += $(CPPSRC:.cpp=.lst) $(CPPSRCARM:.cpp=.lst)
-
-# Compiler flags to generate dependency files.
-### GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,.dep/$(@F).d
-GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
-
-# Combine all necessary flags and optional flags.
-# Add target processor to flags.
-ALL_CFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. $(CFLAGS) $(GENDEPFLAGS)
-ALL_ASFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. -x assembler-with-cpp $(ASFLAGS)
-
-
-# Default target.
-all: begin gccversion sizebefore build sizeafter finished end
-
-ifeq ($(FORMAT),ihex)
-build: elf hex lss sym
-hex: $(TARGET).hex
-IMGEXT=hex
-else
-ifeq ($(FORMAT),binary)
-build: elf bin lss sym
-bin: $(TARGET).bin
-IMGEXT=bin
-else
-ifeq ($(FORMAT),both)
-build: elf hex bin lss sym
-hex: $(TARGET).hex
-bin: $(TARGET).bin
-else
-$(error "$(MSG_FORMATERROR) $(FORMAT)")
-endif
-endif
-endif
-
-elf: $(TARGET).elf
-lss: $(TARGET).lss
-sym: $(TARGET).sym
-
-# Eye candy.
-begin:
- @echo
- @echo $(MSG_BEGIN)
-
-finished:
- @echo $(MSG_ERRORS_NONE)
-
-end:
- @echo $(MSG_END)
- @echo
-
-
-# Display size of file.
-HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
-ELFSIZE = $(SIZE) -A $(TARGET).elf
-sizebefore:
- @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
-
-sizeafter:
- @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
-
-
-# Display compiler version information.
-gccversion :
- @$(CC) --version
-
-# FLASH Programming with OPENOCD
-
-# specify the directory where openocd executable resides (openocd-ftd2xx.exe or openocd-pp.exe)
-# Note: you may have to adjust this if a newer version of YAGARTO has been downloaded
-#OPENOCD_DIR = C:\Program Files\openocd-r247\bin\
-
-# specify OpenOCD executable (pp is for the wiggler, ftd2xx is for the USB debugger)
-#OPENOCD = $(OPENOCD_DIR)openocd-pp.exe
-OPENOCD = "$(OPENOCD_DIR)openocd-ftd2xx.exe"
-
-# specify OpenOCD configuration file (pick the one for your device)
-OPENOCD_CFG = l:/str73x-configs/str73x_jtagkey-flash-program.cfg
-
-program:
- @echo
- @echo "Flash Programming with OpenOCD..."
- $(OPENOCD) -f $(OPENOCD_CFG)
- @echo
- @echo
- @echo "Flash Programming Finished."
-
-
-# Create final output file (.hex) from ELF output file.
-%.hex: %.elf
- @echo
- @echo $(MSG_FLASH) $@
- $(OBJCOPY) -O ihex $< $@
-
-# Create final output file (.bin) from ELF output file.
-%.bin: %.elf
- @echo
- @echo $(MSG_FLASH) $@
- $(OBJCOPY) -O binary $< $@
-
-
-# Create extended listing file from ELF output file.
-# testing: option -C
-%.lss: %.elf
- @echo
- @echo $(MSG_EXTENDED_LISTING) $@
- $(OBJDUMP) -h -S -C $< > $@
-
-
-# Create a symbol table from ELF output file.
-%.sym: %.elf
- @echo
- @echo $(MSG_SYMBOL_TABLE) $@
- $(NM) -n $< > $@
-
-
-# Link: create ELF output file from object files.
-.SECONDARY : $(TARGET).elf
-.PRECIOUS : $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
-%.elf: $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
- @echo
- @echo $(MSG_LINKING) $@
- $(CC) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
-# $(CPP) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
-
-# Compile: create object files from C source files. ARM/Thumb
-$(COBJ) : %.o : %.c
- @echo
- @echo $(MSG_COMPILING) $<
- $(CC) -c $(THUMB) $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
-
-# Compile: create object files from C source files. ARM-only
-$(COBJARM) : %.o : %.c
- @echo
- @echo $(MSG_COMPILING_ARM) $<
- $(CC) -c $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
-
-# Compile: create object files from C++ source files. ARM/Thumb
-$(CPPOBJ) : %.o : %.cpp
- @echo
- @echo $(MSG_COMPILINGCPP) $<
- $(CPP) -c $(THUMB) $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
-
-# Compile: create object files from C++ source files. ARM-only
-$(CPPOBJARM) : %.o : %.cpp
- @echo
- @echo $(MSG_COMPILINGCPP_ARM) $<
- $(CPP) -c $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
-
-
-# Compile: create assembler files from C source files. ARM/Thumb
-## does not work - TODO - hints welcome
-##$(COBJ) : %.s : %.c
-## $(CC) $(THUMB) -S $(ALL_CFLAGS) $< -o $@
-
-
-# Assemble: create object files from assembler source files. ARM/Thumb
-$(AOBJ) : %.o : %.S
- @echo
- @echo $(MSG_ASSEMBLING) $<
- $(CC) -c $(THUMB) $(ALL_ASFLAGS) $< -o $@
-
-
-# Assemble: create object files from assembler source files. ARM-only
-$(AOBJARM) : %.o : %.S
- @echo
- @echo $(MSG_ASSEMBLING_ARM) $<
- $(CC) -c $(ALL_ASFLAGS) $< -o $@
-
-
-# Target: clean project.
-clean: begin clean_list finished end
-
-
-clean_list :
- @echo
- @echo $(MSG_CLEANING)
- $(REMOVE) $(TARGET).hex
- $(REMOVE) $(TARGET).bin
- $(REMOVE) $(TARGET).obj
- $(REMOVE) $(TARGET).elf
- $(REMOVE) $(TARGET).map
- $(REMOVE) $(TARGET).obj
- $(REMOVE) $(TARGET).a90
- $(REMOVE) $(TARGET).sym
- $(REMOVE) $(TARGET).lnk
- $(REMOVE) $(TARGET).lss
- $(REMOVE) $(COBJ)
- $(REMOVE) $(CPPOBJ)
- $(REMOVE) $(AOBJ)
- $(REMOVE) $(COBJARM)
- $(REMOVE) $(CPPOBJARM)
- $(REMOVE) $(AOBJARM)
- $(REMOVE) $(LST)
- $(REMOVE) $(SRC:.c=.s)
- $(REMOVE) $(SRC:.c=.d)
- $(REMOVE) $(SRCARM:.c=.s)
- $(REMOVE) $(SRCARM:.c=.d)
- $(REMOVE) $(CPPSRC:.cpp=.s)
- $(REMOVE) $(CPPSRC:.cpp=.d)
- $(REMOVE) $(CPPSRCARM:.cpp=.s)
- $(REMOVE) $(CPPSRCARM:.cpp=.d)
- $(REMOVEDIR) .dep | exit 0
-
-
-# Include the dependency files.
--include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
-
-
-# Listing of phony targets.
-.PHONY : all begin finish end sizebefore sizeafter gccversion \
-build elf hex bin lss sym clean clean_list program
-
Deleted: trunk/firmware/arm/str/cantest_str73x_gcc/Readme.txt
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_gcc/Readme.txt 2008-02-17 14:54:15 UTC (rev 845)
+++ trunk/firmware/arm/str/cantest_str73x_gcc/Readme.txt 2008-02-17 15:09:58 UTC (rev 846)
@@ -1,14 +0,0 @@
-Simple CAN test sample
-====================
-
-Ake Hedman, D of Scandinavia ak...@do..., http://www.dofscandinavia.com
-
-This file is built for the IAR str73x test board.
-
-The sample code send a CAN frame every 500 ms and display a "RECEIVE CAN MESSAGE"
-on the second line of the LCD if a CAN message with id 0x123, length=4 and
-data=1,2,4,8 is received. If another msg is received the line is cleared.
-
-CAN bitrate is 500 kbps.
-
-Based on a sample from ST
Deleted: trunk/firmware/arm/str/cantest_str73x_gcc/STR73x-RAM.ld
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_gcc/STR73x-RAM.ld 2008-02-17 14:54:15 UTC (rev 845)
+++ trunk/firmware/arm/str/cantest_str73x_gcc/STR73x-RAM.ld 2008-02-17 15:09:58 UTC (rev 846)
@@ -1,228 +0,0 @@
-/***********************************************************************************
-* Copyright 2005 Anglia Design
-* This demo code and associated components are provided as is and has no warranty,
-* implied or otherwise. You are free to use/modify any of the provided
-* code at your own risk in your applications with the expressed limitation
-* of liability (see below)
-*
-* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
-* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
-* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
-* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-*
-* Author : Spencer Oliver
-* Web : www.anglia-designs.com
-*
-***********************************************************************************/
-
-/* Stack Sizes */
-
- _STACKSIZE = 1024;
- _STACKSIZE_IRQ = 256;
- _STACKSIZE_FIQ = 256;
- _STACKSIZE_SVC = 0;
- _STACKSIZE_ABT = 0;
- _STACKSIZE_UND = 0;
- _HEAPSIZE = 1024;
-
-/* Memory Definitions */
-
-MEMORY
-{
- DATA (rw) : ORIGIN = 0xA0000000, LENGTH = 0x00004000
-}
-
-/* Section Definitions */
-
-SECTIONS
-{
- /* first section is .text which is used for code */
-
- .text :
- {
- KEEP(*(.vectrom))
- KEEP(*(.init))
- *(.text .text.*)
- *(.gnu.linkonce.t.*)
- *(.glue_7t .glue_7)
- KEEP(*(.fini))
- *(.gcc_except_table)
- } >DATA =0
- . = ALIGN(4);
-
- /* .ctors .dtors are used for c++ constructors/destructors */
-
- .ctors :
- {
- PROVIDE(__ctors_start__ = .);
- KEEP(*(SORT(.ctors.*)))
- KEEP(*(.ctors))
- PROVIDE(__ctors_end__ = .);
- } >DATA
-
- .dtors :
- {
- PROVIDE(__dtors_start__ = .);
- KEEP(*(SORT(.dtors.*)))
- KEEP(*(.dtors))
- PROVIDE(__dtors_end__ = .);
- } >DATA
-
- /* .rodata section which is used for read-only data (constants) */
-
- .rodata :
- {
- *(.rodata .rodata.*)
- *(.gnu.linkonce.r.*)
- } >DATA
- . = ALIGN(4);
-
- _vectext = .;
- PROVIDE (vectext = .);
-
- .vect : AT (_vectext)
- {
- _vecstart = .;
- KEEP(*(.vectram))
- _vecend = .;
- } >DATA
-
- _etext = _vectext + SIZEOF(.vect);
- PROVIDE (etext = .);
-
- /* .data section which is used for initialized data */
-
- .data : AT (_etext)
- {
- *(.data .data.*)
- *(.gnu.linkonce.d.*)
- SORT(CONSTRUCTORS)
- } >DATA
- . = ALIGN(4);
-
- __data_start = .;
- _edata = .;
- PROVIDE (edata = .);
-
- /* .bss section which is used for uninitialized data */
-
- .bss :
- {
- __bss_start = .;
- __bss_start__ = .;
- *(.bss .bss.*)
- *(.gnu.linkonce.b.*)
- *(COMMON)
- . = ALIGN(4);
- } >DATA
- . = ALIGN(4);
- __bss_end__ = .;
-
- _end = .;
- PROVIDE(end = .);
-
- /* .heap section which is used for memory allocation */
-
- .heap (NOLOAD) :
- {
- __heap_start__ = .;
- *(.heap)
- . = MAX(__heap_start__ + _HEAPSIZE , .);
- } >DATA
- __heap_end__ = __heap_start__ + SIZEOF(.heap);
-
- /* .stack section - user mode stack */
-
- .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
- {
- __stack_start__ = .;
- *(.stack)
- . = MAX(__stack_start__ + _STACKSIZE , .);
- } >DATA
- __stack_end__ = __stack_start__ + SIZEOF(.stack);
-
- /* .stack_irq section */
-
- .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
- {
- __stack_irq_start__ = .;
- *(.stack_irq)
- . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
- } >DATA
- __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
-
- /* .stack_fiq section */
-
- .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
- {
- __stack_fiq_start__ = .;
- *(.stack_fiq)
- . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
- } >DATA
- __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
-
- /* .stack_svc section */
-
- .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
- {
- __stack_svc_start__ = .;
- *(.stack_svc)
- . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
- } >DATA
- __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
-
- /* .stack_abt section */
-
- .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
- {
- __stack_abt_start__ = .;
- *(.stack_abt)
- . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
- } >DATA
- __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
-
- /* .stack_und section */
-
- .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
- {
- __stack_und_start__ = .;
- *(.stack_und)
- . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
- } >DATA
- __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
-
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
-}
-
Deleted: trunk/firmware/arm/str/cantest_str73x_gcc/STR73x-ROM.ld
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_gcc/STR73x-ROM.ld 2008-02-17 14:54:15 UTC (rev 845)
+++ trunk/firmware/arm/str/cantest_str73x_gcc/STR73x-ROM.ld 2008-02-17 15:09:58 UTC (rev 846)
@@ -1,231 +0,0 @@
-/***********************************************************************************
-* Copyright 2005 Anglia Design
-* This demo code and associated components are provided as is and has no warranty,
-* implied or otherwise. You are free to use/modify any of the provided
-* code at your own risk in your applications with the expressed limitation
-* of liability (see below)
-*
-* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
-* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
-* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
-* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
-*
-* Author : Spencer Oliver
-* Web : www.anglia-designs.com
-*
-***********************************************************************************/
-
-/* Stack Sizes */
-
- _STACKSIZE = 1024;
- _STACKSIZE_IRQ = 256;
- _STACKSIZE_FIQ = 256;
- _STACKSIZE_SVC = 0;
- _STACKSIZE_ABT = 0;
- _STACKSIZE_UND = 0;
- _HEAPSIZE = 1024;
-
-/* Memory Definitions */
-
-MEMORY
-{
- CODE (rx) : ORIGIN = 0x80000000, LENGTH = 0x00040000
- DATA (rw) : ORIGIN = 0xA0000000, LENGTH = 0x00004000
-}
-
-/* Section Definitions */
-
-SECTIONS
-{
- /* first section is .text which is used for code */
-
- .text :
- {
- KEEP(*(.vectrom))
- KEEP(*(.init))
- *(.text .text.*)
- *(.gnu.linkonce.t.*)
- *(.glue_7t .glue_7)
- KEEP(*(.fini))
- *(.gcc_except_table)
- } >CODE =0
- . = ALIGN(4);
-
- /* .ctors .dtors are used for c++ constructors/destructors */
-
- .ctors :
- {
- PROVIDE(__ctors_start__ = .);
- KEEP(*(SORT(.ctors.*)))
- KEEP(*(.ctors))
- PROVIDE(__ctors_end__ = .);
- } >CODE
-
- .dtors :
- {
- PROVIDE(__dtors_start__ = .);
- KEEP(*(SORT(.dtors.*)))
- KEEP(*(.dtors))
- PROVIDE(__dtors_end__ = .);
- } >CODE
-
- /* .rodata section which is used for read-only data (constants) */
-
- .rodata :
- {
- *(.rodata .rodata.*)
- *(.gnu.linkonce.r.*)
- } >CODE
- . = ALIGN(4);
-
- _vectext = .;
- PROVIDE (vectext = .);
-
- .vect : AT (_vectext)
- {
- _vecstart = .;
- KEEP(*(.vectram))
- _vecend = .;
- } >DATA
-
- _etext = _vectext + SIZEOF(.vect);
- PROVIDE (etext = .);
-
- /* .data section which is used for initialized data */
-
- .data : AT (_etext)
- {
- __data_start = .;
- *(.data .data.*)
- *(.gnu.linkonce.d.*)
- SORT(CONSTRUCTORS)
- . = ALIGN(4);
- *(.fastrun .fastrun.*)
- } >DATA
- . = ALIGN(4);
-
- _edata = .;
- PROVIDE (edata = .);
-
- /* .bss section which is used for uninitialized data */
-
- .bss :
- {
- __bss_start = .;
- __bss_start__ = .;
- *(.bss .bss.*)
- *(.gnu.linkonce.b.*)
- *(COMMON)
- . = ALIGN(4);
- } >DATA
- . = ALIGN(4);
- __bss_end__ = .;
-
- _end = .;
- PROVIDE(end = .);
-
- /* .heap section which is used for memory allocation */
-
- .heap (NOLOAD) :
- {
- __heap_start__ = .;
- *(.heap)
- . = MAX(__heap_start__ + _HEAPSIZE , .);
- } >DATA
- __heap_end__ = __heap_start__ + SIZEOF(.heap);
-
- /* .stack section - user mode stack */
-
- .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
- {
- __stack_start__ = .;
- *(.stack)
- . = MAX(__stack_start__ + _STACKSIZE , .);
- } >DATA
- __stack_end__ = __stack_start__ + SIZEOF(.stack);
-
- /* .stack_irq section */
-
- .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
- {
- __stack_irq_start__ = .;
- *(.stack_irq)
- . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
- } >DATA
- __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
-
- /* .stack_fiq section */
-
- .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
- {
- __stack_fiq_start__ = .;
- *(.stack_fiq)
- . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
- } >DATA
- __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
-
- /* .stack_svc section */
-
- .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
- {
- __stack_svc_start__ = .;
- *(.stack_svc)
- . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
- } >DATA
- __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
-
- /* .stack_abt section */
-
- .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
- {
- __stack_abt_start__ = .;
- *(.stack_abt)
- . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
- } >DATA
- __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
-
- /* .stack_und section */
-
- .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
- {
- __stack_und_start__ = .;
- *(.stack_und)
- . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
- } >DATA
- __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
-
- /* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
- .stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
- /* DWARF debug sections.
- Symbols in the DWARF debugging sections are relative to the beginning
- of the section so we begin them at 0. */
- /* DWARF 1 */
- .debug 0 : { *(.debug) }
- .line 0 : { *(.line) }
- /* GNU DWARF 1 extensions */
- .debug_srcinfo 0 : { *(.debug_srcinfo) }
- .debug_sfnames 0 : { *(.debug_sfnames) }
- /* DWARF 1.1 and DWARF 2 */
- .debug_aranges 0 : { *(.debug_aranges) }
- .debug_pubnames 0 : { *(.debug_pubnames) }
- /* DWARF 2 */
- .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
- .debug_abbrev 0 : { *(.debug_abbrev) }
- .debug_line 0 : { *(.debug_line) }
- .debug_frame 0 : { *(.debug_frame) }
- .debug_str 0 : { *(.debug_str) }
- .debug_loc 0 : { *(.debug_loc) }
- .debug_macinfo 0 : { *(.debug_macinfo) }
- /* SGI/MIPS DWARF 2 extensions */
- .debug_weaknames 0 : { *(.debug_weaknames) }
- .debug_funcnames 0 : { *(.debug_funcnames) }
- .debug_typenames 0 : { *(.debug_typenames) }
- .debug_varnames 0 : { *(.debug_varnames) }
-}
-
Deleted: trunk/firmware/arm/str/cantest_str73x_gcc/cantest.pnproj
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_gcc/cantest.pnproj 2008-02-17 14:54:15 UTC (rev 845)
+++ trunk/firmware/arm/str/cantest_str73x_gcc/cantest.pnproj 2008-02-17 15:09:58 UTC (rev 846)
@@ -1 +0,0 @@
-<Project name="cantest"><File path="Readme.txt"></File><File path="startup.s"></File><File path="STR73x-RAM.ld"></File><File path="STR73x-ROM.ld"></File><File path="vectors.c"></File><File path="vectors.h"></File><File path="main.c"></File><File path="Makefile"></File><File path="D:\development\vscp\firmware\arm\str\common\sysTime.c"></File><File path="D:\development\vscp\firmware\arm\str\common\sysTime.h"></File><File path="D:\development\vscp\firmware\arm\str\common\delay.c"></File><File path="D:\development\vscp\firmware\arm\str\common\delay.h"></File><File path="startup.s"></File><File path="vector.s"></File></Project>
\ No newline at end of file
Deleted: trunk/firmware/arm/str/cantest_str73x_gcc/cantest.pnps
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_gcc/cantest.pnps 2008-02-17 14:54:15 UTC (rev 845)
+++ trunk/firmware/arm/str/cantest_str73x_gcc/cantest.pnps 2008-02-17 15:09:58 UTC (rev 846)
@@ -1 +0,0 @@
-<pd><ViewState><e p="cantest" x="true"></e></ViewState></pd>
\ No newline at end of file
Deleted: trunk/firmware/arm/str/cantest_str73x_gcc/main.c
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_gcc/main.c 2008-02-17 14:54:15 UTC (rev 845)
+++ trunk/firmware/arm/str/cantest_str73x_gcc/main.c 2008-02-17 15:09:58 UTC (rev 846)
@@ -1,635 +0,0 @@
-/******************** (C) COPYRIGHT 2005 STMicroelectronics **********************
-* File Name : main.c
-* Author : MCD Application Team
-* Date First Issued : 09/27/2005 : V1.0
-* Description : Main program body
-**********************************************************************************
-* History:
-* 09/27/2005 : V1.0
-**********************************************************************************
-* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
-* CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
-* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
-* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
-* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
-* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
-*********************************************************************************/
-
-/* Standard include ------------------------------------------------------------*/
-#include "73x_lib.h"
-#include "../common/73x_lcd.h"
-#include "../common/systime.h"
-#include "../common/delay.h"
-
-// Prototypes
-void wait( void );
-void MCLK_Config (void);
-void CAN0_Demo_Polling( void );
-void CAN0_Demo_Interrupt(void);
-unsigned int get1000Digit( unsigned int val );
-unsigned int get100Digit( unsigned int val );
-unsigned int get10Digit( unsigned int val );
-unsigned int get1Digit( unsigned int val );
-
-// Peripherals Init Structures
-GPIO_InitTypeDef GPIO0_InitStructure;
-GPIO_InitTypeDef GPIO3_InitStructure;
-ADC_InitTypeDef ADC_InitStructure;
-CMU_InitTypeDef CMU_InitStructure;
-RTC_InitTypeDef RTC_InitStructure;
-
-GPIO_InitTypeDef CAN0_RX;
-GPIO_InitTypeDef CAN0_TX;
-GPIO_InitTypeDef CAN1_RX;
-GPIO_InitTypeDef CAN1_TX;
-GPIO_InitTypeDef CAN2_RX;
-GPIO_InitTypeDef CAN2_TX;
-GPIO_InitTypeDef Led_Config;
-
-// define the LEDs
-#define LD1 GPIO_PIN_0
-#define LD2 GPIO_PIN_1
-#define LD3 GPIO_PIN_2
-#define LD4 GPIO_PIN_3
-#define LD5 GPIO_PIN_4
-#define LD6 GPIO_PIN_5
-#define LD7 GPIO_PIN_6
-#define LD8 GPIO_PIN_7
-#define LD9 GPIO_PIN_8
-#define LD10 GPIO_PIN_9
-#define LD11 GPIO_PIN_10
-#define LD12 GPIO_PIN_11
-#define LD13 GPIO_PIN_12
-#define LD14 GPIO_PIN_13
-#define LD15 GPIO_PIN_14
-#define LD16 GPIO_PIN_15
-
-// buffer for receive messages
-canmsg RxCan0Msg;
-
-// array of pre-defined transmit messages
-canmsg TxCan0Msg[ 2 ] = {
- { CAN_STD_ID,
- 0x123,
- 4,
- { 0x01, 0x02, 0x04, 0x08 } },
- { CAN_EXT_ID,
- 0x12345678,
- 8,
- { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 } }
-};
-
-// buffer for receive messages
-canmsg RxCan1Msg;
-
-// array of pre-defined transmit messages
-canmsg TxCan1Msg[2] = {
- { CAN_STD_ID, 0x123, 4, { 0x01, 0x02, 0x04, 0x08 } },
- { CAN_EXT_ID, 0x12345678, 8, { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 } }
-};
-
-// buffer for receive messages
-canmsg RxCan2Msg;
-
-// array of pre-defined transmit messages
-canmsg TxCan2Msg[2] = {
- { CAN_STD_ID, 0x123, 4, { 0x01, 0x02, 0x04, 0x08 } },
- { CAN_EXT_ID, 0x12345678, 8, { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 } }
-};
-
-// used message object numbers
-enum {
- CAN0_TX_MSGOBJ = 0,
- CAN0_RX_MSGOBJ = 1
-};
-enum {
- CAN1_TX_MSGOBJ = 0,
- CAN1_RX_MSGOBJ = 1
-};
-enum {
- CAN2_TX_MSGOBJ = 0,
- CAN2_RX_MSGOBJ = 1
-};
-
-u16 Conversion_Value = 0;
-u8 buffer[11] = "ADC: ";
-
-
-
-/* Private function prototypes -------------------------------------------------*/
-
-/* Interface functions ---------------------------------------------------------*/
-
-/* Private functions -----------------------------------------------------------*/
-
-
-int main(void)
-{
- u32 CPIO_Value;
-
-#ifdef LIBDEBUG
- libdebug();
-#endif
-
- MCLK_Config();
-
- // Enable clock on both CAN channels
- CFG_PeripheralClockConfig( CFG_CLK_CAN0, ENABLE );
- CFG_PeripheralClockConfig( CFG_CLK_CAN1, ENABLE );
-
- CFG_PeripheralClockConfig( CFG_CLK_GPIO0, ENABLE );
- CFG_PeripheralClockConfig( CFG_CLK_GPIO1, ENABLE );
- CFG_PeripheralClockConfig( CFG_CLK_GPIO2, ENABLE );
- CFG_PeripheralClockConfig( CFG_CLK_GPIO6, ENABLE );
-
- Led_Config.GPIO_Mode = GPIO_Mode_OUT_PP;
- Led_Config.GPIO_Pins = 0xFFFF;
- GPIO_Init( GPIO0, &Led_Config );
-
- GPIO3_InitStructure.GPIO_Mode = GPIO_Mode_HI_AIN_TRI;
- GPIO3_InitStructure.GPIO_Pins = GPIO_PIN_ALL;
- GPIO_Init( GPIO3, &GPIO3_InitStructure );
-
- CAN0_RX.GPIO_Mode = GPIO_Mode_IN_TRI_TTL;
- CAN0_RX.GPIO_Pins = GPIO_PIN_14;
- GPIO_Init( GPIO1, &CAN0_RX );
-
- CAN0_TX.GPIO_Mode = GPIO_Mode_AF_PP;
- CAN0_TX.GPIO_Pins = GPIO_PIN_15;
- GPIO_Init( GPIO1, &CAN0_TX );
-
- CAN1_RX.GPIO_Mode = GPIO_Mode_IN_TRI_TTL;
- CAN1_RX.GPIO_Pins = GPIO_PIN_1;
- GPIO_Init( GPIO2, &CAN1_RX );
-
- CAN1_TX.GPIO_Mode = GPIO_Mode_AF_PP;
- CAN1_TX.GPIO_Pins = GPIO_PIN_2;
- GPIO_Init( GPIO2, &CAN1_TX );
-
- // Init 1 ms timebase
- initTimebase2();
-
- GPIO_WordWrite( GPIO0, 0x0000 ); // All LED's off
-
- // * * * EIC * * *
-
- // EIC Clock Enable
- CFG_PeripheralClockConfig( CFG_CLK_EIC , ENABLE );
-
- // EIC Config
- EIC_IRQChannelPriorityConfig( RTC_IRQChannel, 1 );
- EIC_IRQChannelPriorityConfig( TB2_IRQChannel, 2 );
-
- //EIC_IRQChannelConfig( RTC_IRQChannel , ENABLE );
-
-
- EIC_IRQCmd( ENABLE );
-
- // * * * CMU * * *
-
- // CMU Initialization
- CMU_DeInit( );
- CMU_StructInit(&CMU_InitStructure);
-
- // Enable the external oscillator
- CMU_InitStructure.CMU_CKSEL0 = CMU_CKSEL0_CKOSC;
- CMU_Init(&CMU_InitStructure);
-
- // Disable DIV2
- PRCCU->CFR &= 0x7FFF;
-
-
- // * * * RTC * * *
-
- // Set RTC clock-------
- // (clock:0-->9) fOSC=4Mhz/RTCP=(2,4,8,16,32,64,128,256,512,1024)
- // -->EXTCLK=(4M,2M,1M,500K,250K,125K,62.5K,31.25K,15.625K,7.812K)
-
-
- // RTC Clock Enable
- CFG_PeripheralClockConfig( CFG_CLK_RTC , ENABLE );
-
- // RTC Interrupt Config
- RTC_ITConfig( RTC_IT_SEC | RTC_IT_ALA | RTC_IT_OV, ENABLE );
-
- // RTC Configuration
- RTC_InitStructure.RTC_Alarm = 6; // 0xFFFFFFFF;
- RTC_InitStructure.RTC_Counter = 0; // 0xFFFFFFFA;
- // configure RTC=1S ( RCK=1000000/64=CKL32=15625Hz )
- // 8MHz/64 = 125000 = 0x1E848
- RTC_InitStructure.RTC_Prescaler = 0x3D09; // == 15625
- //RTC_InitStructure.RTC_Prescaler = 0x1E848; // 0x3D09; // == 15625
-
- RTC_Init( &RTC_InitStructure );
-
-
-
- // * * * CAN * * *
- CAN_InitTypeDef CANInit = { 0x0, CAN_BITRATE_500K };
-
- // initialize the CAN at a standard bitrate, interrupts disabled
- CAN_Init( CAN0, &CANInit );
-
- // configure the message objects
- CAN_EnterInitMode( CAN0, CAN_CR_CCE );
- CAN_InvalidateAllMsgObj( CAN0 );
- CAN_SetTxMsgObj( CAN0, CAN0_TX_MSGOBJ, CAN_STD_ID );
- CAN_SetRxMsgObj( CAN0, CAN0_RX_MSGOBJ, CAN_STD_ID, 0, CAN_LAST_STD_ID, TRUE );
- CAN_LeaveInitMode( CAN0 );
-
- GPIO_BitWrite( GPIO0, LD1, Bit_SET );
-
- // * * * LCD * * *
-
- // LCD Configuration
- LCD_Init();
- LCD_Clear();
- //LCD_LineClear(1);
- //LCD_LineClear(2);
- LCD_SetPosCur(1,1);
-
- // Display text message on LCD: Line 1
- LCD_SendString( "SIMPLE CAN TEST", 1, 1 );
- LCD_SetPosCur(2,1);
-
-
- // * * * ADC * * *
-
-
- // ADC Clock Enable
- CFG_PeripheralClockConfig(CFG_CLK_ADC, ENABLE);
-
- // ADC Configuration
- ADC_DeInit ();
- ADC_StructInit( &ADC_InitStructure );
- ADC_InitStructure.ADC_Calibration = ADC_Calibration_ON;
- ADC_InitStructure.ADC_CalibAverage = ADC_CalibAverage_Enable;
- ADC_InitStructure.ADC_AutoClockOff = ADC_AutoClockOff_Disable ;
- ADC_InitStructure.ADC_ConversionMode = ADC_ConversionMode_Scan ;
- ADC_InitStructure.ADC_SamplingPrescaler = 0x2;
- ADC_InitStructure.ADC_ConversionPrescaler = 0x4;
- ADC_InitStructure.ADC_FirstChannel = ADC_CHANNEL0 ;
- ADC_InitStructure.ADC_ChannelNumber = 1;
- ADC_Init( &ADC_InitStructure );
-
-
- // EOC interrupt Enable
- ADC_ITConfig( ADC_IT_EOC, ENABLE );
-
- // Enable ADC
- ADC_Cmd( ENABLE );
-
-
-
- while ( 1 ) {
-
- // send a pre-defined data frame
- CAN_SendMessage( CAN0, CAN0_TX_MSGOBJ, &TxCan0Msg[0] );
-
- // wait until end of transmission
- CAN_WaitEndOfTx( CAN0 );
-
- // release the TX message object
- CAN_ReleaseTxMessage( CAN0, CAN0_TX_MSGOBJ );
-
- // Check for a data frame
- if ( CAN_ReceiveMessage( CAN0, CAN0_RX_MSGOBJ, FALSE, &RxCan0Msg ) ) {
-
- // Test Received Msg
- if ( ( RxCan0Msg.IdType == CAN_STD_ID ) &&
- ( RxCan0Msg.Id == 0x123) &&
- ( RxCan0Msg.Dlc == 4 ) &&
- ( RxCan0Msg.Data[ 0 ] == 0x01 ) &&
- ( RxCan0Msg.Data[ 1 ] == 0x02 ) &&
- ( RxCan0Msg.Data[ 2 ] == 0x04 ) &&
- ( RxCan0Msg.Data[ 3 ] == 0x08 ) ){
-
- // Received Msg OK
- GPIO_BitWrite( GPIO0,LD15, Bit_SET ); // LED 15
-
- LCD_SendString( "RECEIVE CAN MSG", 2, 1 );
-
- }
- else {
-
- // Received some other Msg
- GPIO_BitWrite( GPIO0, LD14, Bit_SET ); // LED 14
-
- LCD_LineClear(2);
-
- }
-
- // Release the RX message object
- CAN_ReleaseRxMessage(CAN0, CAN0_RX_MSGOBJ);
-
- } // Received frame
-
-
- // Start ADC conversion
- ADC_ConversionCmd( ADC_ConversionStart );
- buffer[8] = get1Digit( Conversion_Value );
- buffer[7] = get10Digit( Conversion_Value );
- buffer[6] = get100Digit( Conversion_Value );
- buffer[5] = get1000Digit( Conversion_Value );
- buffer[9] = 0;
-
- // Display ADC conversion Value on LCD
- //LCD_SendString( &buffer[5], 2, 5 );
- CPIO_Value = 0;
-
- for(u32 i = (u32)((float)Conversion_Value/60); i; i--) {
- CPIO_Value <<= 1;
- CPIO_Value |= 1;
- }
-
- GPIO_WordWrite( GPIO0, CPIO_Value );
-
- // Wait for 500 ms
- delay_ms( 500 );
-
- } // while
-
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// get1000Digit
-//
-
-unsigned int get1000Digit( unsigned int val )
-{
- return ( ( val / 1000 ) + 0x30 );
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// get100Digit
-//
-
-unsigned int get100Digit( unsigned int val )
-{
- unsigned int valCopy;
- valCopy = val % 1000;
- return ( (valCopy / 100 ) + 0x30 );
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// get10Digit
-//
-
-unsigned int get10Digit( unsigned int val )
-{
- unsigned int valCopy;
- valCopy = val % 100;
- return ( ( valCopy / 10 ) + 0x30 );
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// get1Digit
-//
-
-unsigned int get1Digit( unsigned int val )
-{
- unsigned int valCopy;
- valCopy = val % 100;
- return ( ( valCopy % 10 ) + 0x30 );
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// wait
-//
-
-void wait( void )
-{
- u32 i;
-
- for (i=100000L; i!=0 ; i-- ) {}
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// MCLK_Config
-//
-
-void MCLK_Config (void)
-{
-
- PRCCU_InitTypeDef Clock;
- CMU_InitTypeDef ClockInit;
-
- ClockInit.CMU_RCOscControl = 0x0D; // RC OSC Adjust
- ClockInit.CMU_EndCountValue = 0x0F; //
- ClockInit.CMU_FreqRef_High = 0xFF; //
- ClockInit.CMU_FreqRef_Low = 0xFE; //
-
- ClockInit.CMU_CKSEL0 = CMU_CKSEL0_CKOSC; // Clock for CLOCK1 (4MHz)
- ClockInit.CMU_CKSEL1 = CMU_CKSEL1_CKPLL; // Clock for Freq. Meter (8MHz)
- ClockInit.CMU_CKSEL2 = CMU_CKSEL2_CKOSC; // Clock to drive CMU logic
-
- CMU_Lock( DISABLE );
- CMU_Init( &ClockInit );
-
- // Init. Power Reset Clock unit
- // 4 MHz * 12 / 6 = 8 MHz = CLOCK2
- Clock.PRCCU_DIV2 = DISABLE;
- Clock.PRCCU_MCLKSRC_SRC = PRCCU_MCLKSRC_PLL; // Use PLL in
- Clock.PRCCU_PLLDIV = PRCCU_PLLDIV_6;
- Clock.PRCCU_PLLMUL = PRCCU_PLLMUL_12;
-
- PRCCU_Init( &Clock );
- PRCCU_SetExtClkDiv(4);
-
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// CAN0_Demo_Polling
-//
-
-void CAN0_Demo_Polling( void )
-{
- CAN_InitTypeDef CANInit = { 0x0, CAN_BITRATE_500K };
-
- // initialize the CAN at a standard bitrate, interrupts disabled
- CAN_Init( CAN0, &CANInit );
-
- // switch into Loopback+Silent mode (self-test)
- //CAN_EnterTestMode( CAN0, CAN_TESTR_LBACK | 0 );
-
- // configure the message objects
- CAN_InvalidateAllMsgObj( CAN0 );
- CAN_SetTxMsgObj( CAN0, CAN0_TX_MSGOBJ, CAN_STD_ID );
- CAN_SetRxMsgObj( CAN0, CAN0_RX_MSGOBJ, CAN_STD_ID, 0, CAN_LAST_STD_ID, TRUE );
-
- // send a pre-defined data frame
- CAN_SendMessage( CAN0, CAN0_TX_MSGOBJ, &TxCan0Msg[0] );
-
- // wait until end of transmission
- CAN_WaitEndOfTx( CAN0 );
-
- GPIO_BitWrite( GPIO0, LD16, Bit_SET ); // LED16;
-
-/*
- // wait for reception of a data frame
- while ( !CAN_ReceiveMessage( CAN0, CAN0_RX_MSGOBJ, FALSE, &RxCan0Msg ) ) {
- // add a time-out handling here, if necessary
- }
-
- // Test Received Msg
- if ( ( RxCan0Msg.IdType == CAN_STD_ID ) &&
- ( RxCan0Msg.Id == 0x123) &&
- ( RxCan0Msg.Dlc == 4 ) &&
- ( RxCan0Msg.Data[ 0 ] == 0x01 ) &&
- ( RxCan0Msg.Data[ 1 ] == 0x02 ) &&
- ( RxCan0Msg.Data[ 2 ] == 0x04 ) &&
- ( RxCan0Msg.Data[ 3 ] == 0x08 ) ){
-
- // Received Msg OK
- GPIO_BitWrite(GPIO0,LD1,Bit_SET);//LED1;
- }
- else {
-
- // Received Msg OK
- GPIO_BitWrite(GPIO0,LD2,Bit_RESET);//LED2 off;
-
- }
-*/
- // release the message objects
- CAN_ReleaseTxMessage(CAN0, CAN0_TX_MSGOBJ);
- CAN_ReleaseRxMessage(CAN0, CAN0_RX_MSGOBJ);
-
- // switch back into Normal mode
- //CAN_LeaveTestMode( CAN0 );
-
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// CAN0_Demo_Interrupt
-//
-
-void CAN0_Demo_Interrupt(void)
-{
- CAN_InitTypeDef CAN0Init;
- CAN0Init.CAN_Mask = CAN_CR_IE;
- CAN0Init.CAN_Bitrate = CAN_BITRATE_100K;
-
- // initialize the interrupt controller
- EIC_IRQChannelConfig( CAN0_IRQChannel, ENABLE );
- EIC_IRQChannelPriorityConfig( CAN0_IRQChannel, 1 );
- EIC_IRQCmd( ENABLE );
-
- // initialize the CAN at a standard bitrate, interrupts enabled
- CAN_Init( CAN0, &CAN0Init );
-
- // switch into Loopback+Silent mode (self-test)
- CAN_EnterTestMode( CAN0, CAN_TESTR_LBACK | CAN_TESTR_SILENT );
-
- // configure the message objects
- CAN_InvalidateAllMsgObj( CAN0 );
- CAN_SetTxMsgObj( CAN0, CAN0_TX_MSGOBJ, CAN_EXT_ID );
- CAN_SetRxMsgObj( CAN0, CAN0_RX_MSGOBJ, CAN_EXT_ID, 0, CAN_LAST_EXT_ID, TRUE );
-
- // send a pre-defined data frame
- CAN_SendMessage( CAN0, CAN0_TX_MSGOBJ, &TxCan0Msg[1] );
-
- // reception and release are done in the interrupt handler
- wait();
-
- GPIO_BitWrite(GPIO0,LD7,Bit_SET); // LED7
-
- // switch back into Normal mode
- CAN_LeaveTestMode( CAN0 );
-
- // disable interrupts globally
- EIC_IRQCmd( DISABLE );
-
-}
-
-
-
-/******************* (C) COPYRIGHT 2005 STMicroelectronics *****END OF FILE****/
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Added: trunk/firmware/arm/str/cantest_str73x_gcc/project/Makefile
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_gcc/project/Makefile (rev 0)
+++ trunk/firmware/arm/str/cantest_str73x_gcc/project/Makefile 2008-02-17 15:09:58 UTC (rev 846)
@@ -0,0 +1,492 @@
+# Hey Emacs, this is a -*- makefile -*-
+#
+# WinARM template makefile
+# by Giacomo Fazio and Antonio Nasca, Catania, Italy
+# <gia...@gm...>
+# <ant...@ho...>
+#
+# based on the WinARM template makefile written by Martin Thomas
+# Released to the Public Domain
+# Please read the make user manual!
+#
+#
+# On command line:
+#
+# make all = Make software.
+#
+# make clean = Clean out built project files.
+#
+# make program = Download the hex file to the device
+#
+# (TODO: make filename.s = Just compile filename.c into the assembler code only)
+#
+# To rebuild project do "make clean" then "make all".
+# Toolchain prefix (i.e arm-elf -> arm-elf-gcc.exe)
+TCHAIN = arm-elf
+#TCHAIN = arm-none-eabi
+
+#USE_THUMB_MODE = YES
+USE_THUMB_MODE = NO
+
+# MCU name and submodel
+MCU = arm7tdmi
+SUBMDL = STR73x
+
+## Create ROM-Image
+RUN_MODE=ROM_RUN
+## Create RAM-Image
+#RUN_MODE=RAM_RUN
+
+## not supported in this example:
+## Exception-Vector placement only supported for "ROM_RUN"
+## (placement settings ignored when using "RAM_RUN")
+## - Exception vectors in ROM:
+#VECTOR_LOCATION=VECTORS_IN_ROM
+## - Exception vectors in RAM:
+#VECTOR_LOCATION=VECTORS_IN_RAM
+
+
+# Target file name (without extension).
+TARGET = main
+
+# List C source files here. (C dependencies are automatically generated.)
+# use file-extension c for "c-only"-files
+SRC = $(TARGET).c ../common/73x_lcd.c ../common/sysTime.c ../common/delay.c
+
+# List C source files here which must be compiled in ARM-Mode.
+# use file-extension c for "c-only"-files
+SRCARM = vectors.c
+# thumb is possible too for vectors.c - keep ARM, TODO: profile
+
+# List C++ source files here.
+# use file-extension cpp for C++-files (use extension .cpp)
+CPPSRC =
+
+# List C++ source files here which must be compiled in ARM-Mode.
+# use file-extension cpp for C++-files (use extension .cpp)
+#CPPSRCARM = $(TARGET).cpp
+CPPSRCARM =
+
+# List Assembler source files here.
+# Make them always end in a capital .S. Files ending in a lowercase .s
+# will not be considered source files but generated files (assembler
+# output from the compiler), and will be deleted upon "make clean"!
+# Even though the DOS/Win* filesystem matches both .s and .S the same,
+# it will preserve the spelling of the filenames, and gcc itself does
+# care about how the name is spelled on its command-line.
+ASRC =
+
+# List Assembler source files here which must be assembled in ARM-Mode..
+ASRCARM = vector.S startup.S
+
+# Path to Linker-Scripts
+LINKERSCRIPTPATH = .
+
+## Output format. (can be ihex or binary or both)
+## (binary i.e. for openocd and SAM-BA, hex i.e. for lpc21isp and uVision)
+#FORMAT = ihex
+#FORMAT = binary
+FORMAT = both
+
+# Optimization level, can be [0, 1, 2, 3, s].
+# 0 = turn off optimization. s = optimize for size.
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
+#OPT = s
+OPT = 0
+
+## Using the Atmel AT91_lib produces warning with
+## the default warning-levels.
+## yes - disable these warnings; no - keep default settings
+#AT91LIBNOWARN = yes
+AT91LIBNOWARN = no
+
+# Debugging format.
+# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
+# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
+#DEBUG = stabs
+DEBUG = dwarf-2
+
+# List any extra directories to look for include files here.
+# Each directory must be seperated by a space.
+EXTRAINCDIRS = "K:/include" ../common/str73x_lib/include
+
+# List any extra directories to look for library files here.
+# Each directory must be seperated by a space.
+#EXTRA_LIBDIRS = ../arm7_efsl_0_2_4
+EXTRA_LIBDIRS = K:/lib ../common/str73x_lib
+
+
+# Compiler flag to set the C Standard level.
+# c89 - "ANSI" C
+# gnu89 - c89 plus GCC extensions
+# c99 - ISO C99 standard (not yet fully implemented)
+# gnu99 - c99 plus GCC extensions
+CSTANDARD = -std=gnu99
+
+# Place -D or -U options for C here
+CDEFS = -D$(RUN_MODE)
+
+# Place -I options here
+CINCS =
+
+# Place -D or -U options for ASM here
+ADEFS = -D$(RUN_MODE)
+
+ifdef VECTOR_LOCATION
+CDEFS += -D$(VECTOR_LOCATION)
+ADEFS += -D$(VECTOR_LOCATION)
+endif
+
+CDEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+ADEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+
+# Compiler flags.
+
+ifeq ($(USE_THUMB_MODE),YES)
+THUMB = -mthumb
+THUMB_IW = -mthumb-interwork
+else
+THUMB =
+THUMB_IW =
+endif
+
+# -g*: generate debugging information
+# -O*: optimization level
+# -f...: tuning, see GCC manual and avr-libc documentation
+# -Wall...: warning level
+# -Wa,...: tell GCC to pass this to the assembler.
+# -adhlns...: create assembler listing
+#
+# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
+CFLAGS = -g$(DEBUG)
+CFLAGS += $(CDEFS) $(CINCS)
+CFLAGS += -O$(OPT)
+CFLAGS += -Wall -Wcast-align -Wimplicit
+CFLAGS += -Wpointer-arith -Wswitch
+CFLAGS += -ffunction-sections -fdata-sections
+CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused
+CFLAGS += -Wa,-adhlns=$(subst $(suffix $<),.lst,$<)
+CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
+
+# flags only for C
+CONLYFLAGS += -Wnested-externs
+CONLYFLAGS += $(CSTANDARD)
+
+ifneq ($(AT91LIBNOWARN),yes)
+#AT91-lib warnings with:
+CFLAGS += -Wcast-qual
+CONLYFLAGS += -Wmissing-prototypes
+CONLYFLAGS += -Wstrict-prototypes
+CONLYFLAGS += -Wmissing-declarations
+endif
+
+# flags only for C++ (arm-elf-g++)
+# CPPFLAGS = -fno-rtti -fno-exceptions
+CPPFLAGS =
+
+# Assembler flags.
+# -Wa,...: tell GCC to pass this to the assembler.
+# -ahlns: create listing
+# -g$(DEBUG): have the assembler create line number information
+ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG)
+
+
+#Additional libraries.
+
+# Extra libraries
+# Each library-name must be seperated by a space.
+# To add libxyz.a, libabc.a and libefsl.a:
+# EXTRA_LIBS = xyz abc efsl
+#EXTRA_LIBS = efsl
+EXTRA_LIBS = STR73x_lib
+
+#Support for newlibc-lpc (file: libnewlibc-lpc.a)
+#NEWLIBLPC = -lnewlib-lpc
+
+MATH_LIB = -lm
+
+# CPLUSPLUS_LIB = -lstdc++
+
+
+# Linker flags.
+# -Wl,...: tell GCC to pass this to linker.
+# -Map: create map file
+# --cref: add cross reference to map file
+LDFLAGS = -nostartfiles -Wl,-Map=$(TARGET).map,--cref,--gc-sections
+LDFLAGS += -lc
+LDFLAGS += $(NEWLIBLPC) $(MATH_LIB)
+LDFLAGS += -lc -lgcc
+LDFLAGS += $(CPLUSPLUS_LIB)
+LDFLAGS += $(patsubst %,-L%,$(EXTRA_LIBDIRS))
+LDFLAGS += $(patsubst %,-l%,$(EXTRA_LIBS))
+
+# Set Linker-Script Depending On Selected Memory and Controller
+ifeq ($(RUN_MODE),RAM_RUN)
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-RAM.ld
+else
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-ROM.ld
+endif
+
+
+# Define directories, if needed.
+## DIRARM = c:/WinARM/
+## DIRARMBIN = $(DIRAVR)/bin/
+## DIRAVRUTILS = $(DIRAVR)/utils/bin/
+
+# Define programs and commands.
+SHELL = sh
+CC = $(TCHAIN)-gcc
+CPP = $(TCHAIN)-g++
+AR = $(TCHAIN)-ar
+OBJCOPY = $(TCHAIN)-objcopy
+OBJDUMP = $(TCHAIN)-objdump
+SIZE = $(TCHAIN)-size
+NM = $(TCHAIN)-nm
+REMOVE = rm -f
+REMOVEDIR = rm -f -r
+COPY = cp
+
+# Define Messages
+# English
+MSG_ERRORS_NONE = Errors: none
+MSG_BEGIN = "-------- begin (mode: $(RUN_MODE)) --------"
+MSG_END = -------- end --------
+MSG_SIZE_BEFORE = Size before:
+MSG_SIZE_AFTER = Size after:
+MSG_FLASH = Creating load file for Flash:
+MSG_EXTENDED_LISTING = Creating Extended Listing:
+MSG_SYMBOL_TABLE = Creating Symbol Table:
+MSG_LINKING = Linking:
+MSG_COMPILING = Compiling C:
+MSG_COMPILING_ARM = "Compiling C (ARM-only):"
+MSG_COMPILINGCPP = Compiling C++:
+MSG_COMPILINGCPP_ARM = "Compiling C++ (ARM-only):"
+MSG_ASSEMBLING = Assembling:
+MSG_ASSEMBLING_ARM = "Assembling (ARM-only):"
+MSG_CLEANING = Cleaning project:
+MSG_FORMATERROR = Can not handle output-format
+MSG_LPC21_RESETREMINDER = You may have to bring the target in bootloader-mode now.
+
+# Define all object files.
+COBJ = $(SRC:.c=.o)
+AOBJ = $(ASRC:.S=.o)
+COBJARM = $(SRCARM:.c=.o)
+AOBJARM = $(ASRCARM:.S=.o)
+CPPOBJ = $(CPPSRC:.cpp=.o)
+CPPOBJARM = $(CPPSRCARM:.cpp=.o)
+
+# Define all listing files.
+LST = $(ASRC:.S=.lst) $(ASRCARM:.S=.lst) $(SRC:.c=.lst) $(SRCARM:.c=.lst)
+LST += $(CPPSRC:.cpp=.lst) $(CPPSRCARM:.cpp=.lst)
+
+# Compiler flags to generate dependency files.
+### GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,.dep/$(@F).d
+GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
+
+# Combine all necessary flags and optional flags.
+# Add target processor to flags.
+ALL_CFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. $(CFLAGS) $(GENDEPFLAGS)
+ALL_ASFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. -x assembler-with-cpp $(ASFLAGS)
+
+
+# Default target.
+all: begin gccversion sizebefore build sizeafter finished end
+
+ifeq ($(FORMAT),ihex)
+build: elf hex lss sym
+hex: $(TARGET).hex
+IMGEXT=hex
+else
+ifeq ($(FORMAT),binary)
+build: elf bin lss sym
+bin: $(TARGET).bin
+IMGEXT=bin
+else
+ifeq ($(FORMAT),both)
+build: elf hex bin lss sym
+hex: $(TARGET).hex
+bin: $(TARGET).bin
+else
+$(error "$(MSG_FORMATERROR) $(FORMAT)")
+endif
+endif
+endif
+
+elf: $(TARGET).elf
+lss: $(TARGET).lss
+sym: $(TARGET).sym
+
+# Eye candy.
+begin:
+ @echo
+ @echo $(MSG_BEGIN)
+
+finished:
+ @echo $(MSG_ERRORS_NONE)
+
+end:
+ @echo $(MSG_END)
+ @echo
+
+
+# Display size of file.
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
+ELFSIZE = $(SIZE) -A $(TARGET).elf
+sizebefore:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
+
+sizeafter:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
+
+
+# Display compiler version information.
+gccversion :
+ @$(CC) --version
+
+# FLASH Programming with OPENOCD
+
+# specify the directory where openocd executable resides (openocd-ftd2xx.exe or openocd-pp.exe)
+# Note: you may have to adjust this if a newer version of YAGARTO has been downloaded
+#OPENOCD_DIR = C:\Program Files\openocd-r247\bin\
+
+# specify OpenOCD executable (pp is for the wiggler, ftd2xx is for the USB debugger)
+#OPENOCD = $(OPENOCD_DIR)openocd-pp.exe
+OPENOCD = "$(OPENOCD_DIR)openocd-ftd2xx.exe"
+
+# specify OpenOCD configuration file (pick the one for your device)
+OPENOCD_CFG = l:/str73x-configs/str73x_jtagkey-flash-program.cfg
+
+program:
+ @echo
+ @echo "Flash Programming with OpenOCD..."
+ $(OPENOCD) -f $(OPENOCD_CFG)
+ @echo
+ @echo
+ @echo "Flash Programming Finished."
+
+
+# Create final output file (.hex) from ELF output file.
+%.hex: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O ihex $< $@
+
+# Create final output file (.bin) from ELF output file.
+%.bin: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O binary $< $@
+
+
+# Create extended listing file from ELF output file.
+# testing: option -C
+%.lss: %.elf
+ @echo
+ @echo $(MSG_EXTENDED_LISTING) $@
+ $(OBJDUMP) -h -S -C $< > $@
+
+
+# Create a symbol table from ELF output file.
+%.sym: %.elf
+ @echo
+ @echo $(MSG_SYMBOL_TABLE) $@
+ $(NM) -n $< > $@
+
+
+# Link: create ELF output file from object files.
+.SECONDARY : $(TARGET).elf
+.PRECIOUS : $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+%.elf: $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+ @echo
+ @echo $(MSG_LINKING) $@
+ $(CC) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
+# $(CPP) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
+
+# Compile: create object files from C source files. ARM/Thumb
+$(COBJ) : %.o : %.c
+ @echo
+ @echo $(MSG_COMPILING) $<
+ $(CC) -c $(THUMB) $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C source files. ARM-only
+$(COBJARM) : %.o : %.c
+ @echo
+ @echo $(MSG_COMPILING_ARM) $<
+ $(CC) -c $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM/Thumb
+$(CPPOBJ) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP) $<
+ $(CPP) -c $(THUMB) $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM-only
+$(CPPOBJARM) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP_ARM) $<
+ $(CPP) -c $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+
+# Compile: create assembler files from C source files. ARM/Thumb
+## does not work - TODO - hints welcome
+##$(COBJ) : %.s : %.c
+## $(CC) $(THUMB) -S $(ALL_CFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM/Thumb
+$(AOBJ) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING) $<
+ $(CC) -c $(THUMB) $(ALL_ASFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM-only
+$(AOBJARM) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING_ARM) $<
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@
+
+
+# Target: clean project.
+clean: begin clean_list finished end
+
+
+clean_list :
+ @echo
+ @echo $(MSG_CLEANING)
+ $(REMOVE) $(TARGET).hex
+ $(REMOVE) $(TARGET).bin
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).elf
+ $(REMOVE) $(TARGET).map
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).a90
+ $(REMOVE) $(TARGET).sym
+ $(REMOVE) $(TARGET).lnk
+ $(REMOVE) $(TARGET).lss
+ $(REMOVE) $(COBJ)
+ $(REMOVE) $(CPPOBJ)
+ $(REMOVE) $(AOBJ)
+ $(REMOVE) $(COBJARM)
+ $(REMOVE) $(CPPOBJARM)
+ $(REMOVE) $(AOBJARM)
+ $(REMOVE) $(LST)
+ $(REMOVE) $(SRC:.c=.s)
+ $(REMOVE) $(SRC:.c=.d)
+ $(REMOVE) $(SRCARM:.c=.s)
+ $(REMOVE) $(SRCARM:.c=.d)
+ $(REMOVE) $(CPPSRC:.cpp=.s)
+ $(REMOVE) $(CPPSRC:.cpp=.d)
+ $(REMOVE) $(CPPSRCARM:.cpp=.s)
+ $(REMOVE) $(CPPSRCARM:.cpp=.d)
+ $(REMOVEDIR) .dep | exit 0
+
+
+# Include the dependency files.
+-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
+
+
+# Listing of phony targets.
+.PHONY : all begin finish end sizebefore sizeafter gccversion \
+build elf hex bin lss sym clean clean_list program
+
Added: trunk/firmware/arm/str/cantest_str73x_gcc/project/Readme.txt
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_gcc/project/Readme.txt (rev 0)
+++ trunk/firmware/arm/str/cantest_str73x_gcc/project/Readme.txt 2008-02-17 15:09:58 UTC (rev 846)
@@ -0,0 +1,14 @@
+Simple CAN test sample
+====================
+
+Ake Hedman, D of Scandinavia ak...@do..., http://www.dofscandinavia.com
+
+This file is built for the IAR str73x test board.
+
+The sample code send a CAN frame every 500 ms and display a "RECEIVE CAN MESSAGE"
+on the second line of the LCD if a CAN message with id 0x123, length=4 and
+data=1,2,4,8 is received. If another msg is received the line is cleared.
+
+CAN bitrate is 500 kbps.
+
+Based on a sample from ST
Added: trunk/firmware/arm/str/cantes...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-17 14:54:20
|
Revision: 845
http://can.svn.sourceforge.net/can/?rev=845&view=rev
Author: akhe
Date: 2008-02-17 06:54:15 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
Cleaning up openocd scripts
Modified Paths:
--------------
trunk/firmware/arm/str/cantest_str73x_gcc/Makefile
trunk/firmware/arm/str/common/openocd/linux/str73x-configs/str73x_jtagkey-flash-program.cfg
trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_jtagkey-flash-erase.cfg
trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_jtagkey-flash-program.cfg
trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c
trunk/firmware/arm/str/dosubst.bat
trunk/setenv_vscp.bat
Modified: trunk/firmware/arm/str/cantest_str73x_gcc/Makefile
===================================================================
--- trunk/firmware/arm/str/cantest_str73x_gcc/Makefile 2008-02-17 12:24:27 UTC (rev 844)
+++ trunk/firmware/arm/str/cantest_str73x_gcc/Makefile 2008-02-17 14:54:15 UTC (rev 845)
@@ -347,19 +347,14 @@
# specify the directory where openocd executable resides (openocd-ftd2xx.exe or openocd-pp.exe)
# Note: you may have to adjust this if a newer version of YAGARTO has been downloaded
-OPENOCD_DIR = 'C:\Program Files\openocd-r247\bin\'
+#OPENOCD_DIR = C:\Program Files\openocd-r247\bin\
# specify OpenOCD executable (pp is for the wiggler, ftd2xx is for the USB debugger)
#OPENOCD = $(OPENOCD_DIR)openocd-pp.exe
-OPENOCD = $(OPENOCD_DIR)openocd-ftd2xx.exe
+OPENOCD = "$(OPENOCD_DIR)openocd-ftd2xx.exe"
# specify OpenOCD configuration file (pick the one for your device)
-#OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_signalyzer-flash-program.cfg
-#OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_jtagkey-flash-program.cfg
-#OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_armusbocd-flash-program.cfg
-#OPENOCD_CFG = C:\openocd-configs\str73x-configs\str73x_pp-flash-program.cfg
-#OPENOCD_CFG = "D:\development\armdev\str73x open source development\Code\Windows\openocd-configs\str73x-configs\str73x_jtagkey-flash-program.cfg"
-OPENOCD_CFG = "c:\str73x_jtagkey-flash-program.cfg"
+OPENOCD_CFG = l:/str73x-configs/str73x_jtagkey-flash-program.cfg
program:
@echo
Modified: trunk/firmware/arm/str/common/openocd/linux/str73x-configs/str73x_jtagkey-flash-program.cfg
===================================================================
--- trunk/firmware/arm/str/common/openocd/linux/str73x-configs/str73x_jtagkey-flash-program.cfg 2008-02-17 12:24:27 UTC (rev 844)
+++ trunk/firmware/arm/str/common/openocd/linux/str73x-configs/str73x_jtagkey-flash-program.cfg 2008-02-17 14:54:15 UTC (rev 845)
@@ -32,4 +32,9 @@
flash bank str7x 0x80000000 0x00040000 0 0 0 STR73x
#Script used for FLASH programming
-target_script 0 reset /home/l3golas/openocd-configs/str73x-configs/str73x_flashprogram.ocd
+#target_script 0 reset C:\openocd-configs\str73x-configs\str73x_flashprogram.ocd
+#target_script 0 reset "D:\development\armdev\str73x open source development\Code\Windows\openocd-configs\str73x-configs\str73x_jtagkey-flash-program.cfg"
+target_script 0 reset "D:\development\armdev\str73x open source development\Code\Windows\openocd-configs\str73x-configs\str73x_flashprogram.ocd"
+
+# For more information about the configuration files, take a look at:
+# http://openfacts.berlios.de/index-en.phtml?title=Open+On-Chip+Debugger
\ No newline at end of file
Modified: trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_jtagkey-flash-erase.cfg
===================================================================
--- trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_jtagkey-flash-erase.cfg 2008-02-17 12:24:27 UTC (rev 844)
+++ trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_jtagkey-flash-erase.cfg 2008-02-17 14:54:15 UTC (rev 845)
@@ -32,4 +32,4 @@
flash bank str7x 0x80000000 0x00040000 0 0 0 STR73x
#Script used for FLASH erasing
-target_script 0 reset C:\openocd-configs\str73x-configs\str73x_flasherase.ocd
+target_script 0 reset l:/str73x-configs/str73x_flasherase.ocd
Modified: trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_jtagkey-flash-program.cfg
===================================================================
--- trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_jtagkey-flash-program.cfg 2008-02-17 12:24:27 UTC (rev 844)
+++ trunk/firmware/arm/str/common/openocd/windows/str73x-configs/str73x_jtagkey-flash-program.cfg 2008-02-17 14:54:15 UTC (rev 845)
@@ -32,6 +32,7 @@
flash bank str7x 0x80000000 0x00040000 0 0 0 STR73x
#Script used for FLASH programming
-#target_script 0 reset C:\openocd-configs\str73x-configs\str73x_flashprogram.ocd
-#target_script 0 reset "D:\development\armdev\str73x open source development\Code\Windows\openocd-configs\str73x-configs\str73x_jtagkey-flash-program.cfg"
-target_script 0 reset "C:\str73x_jtagkey-flash-program.cfg"
\ No newline at end of file
+target_script 0 reset "l:/str73x-configs/str73x_flashprogram.ocd"
+
+# For more information about the configuration files, take a look at:
+# http://openfacts.berlios.de/index-en.phtml?title=Open+On-Chip+Debugger
\ No newline at end of file
Modified: trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c
===================================================================
--- trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c 2008-02-17 12:24:27 UTC (rev 844)
+++ trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c 2008-02-17 14:54:15 UTC (rev 845)
@@ -552,13 +552,13 @@
if (pCanMsg->IdType == CAN_STD_ID)
{
- /* standard ID*/
+ /* standard ID */
CAN->sMsgObj[0].A1R = 0;
CAN->sMsgObj[0].A2R = (CAN->sMsgObj[0].A2R & 0xE000) | STD_FIXED_ID_ARB(pCanMsg->Id);
}
else
{
- /* extended ID Fixed AKHE*/
+ /* extended ID Fixed AKHE */
//CAN->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
//CAN->sMsgObj[0].A2R = ((CAN->sMsgObj[0].A2R) & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
CAN->sMsgObj[0].A1R = pCanMsg->Id & 0xffff;
Modified: trunk/firmware/arm/str/dosubst.bat
===================================================================
--- trunk/firmware/arm/str/dosubst.bat 2008-02-17 12:24:27 UTC (rev 844)
+++ trunk/firmware/arm/str/dosubst.bat 2008-02-17 14:54:15 UTC (rev 845)
@@ -1,4 +1,16 @@
rem use setenv_vscp.bat in VSCP root to set j to the correct folder
rem
+
+rem gcc
+rem ===
+
subst k: "C:/Program Files/yagarto/arm-elf"
set INCLUDE = "C:\Program Files\yagarto\arm-elf\include;j:\common"
+
+rem openocd
+rem =======
+rem if openocd-ftd2xx.exe is not in the path add it or edit the str makefile to point at it
+
+rem openocd does not handle long paths so we have to do this to make them
+rem shorter.
+subst l: d:\development\vscp\firmware\arm\str\common\openocd\windows
Modified: trunk/setenv_vscp.bat
===================================================================
--- trunk/setenv_vscp.bat 2008-02-17 12:24:27 UTC (rev 844)
+++ trunk/setenv_vscp.bat 2008-02-17 14:54:15 UTC (rev 845)
@@ -1,2 +1,6 @@
subst i: D:\development\vscp
-subst j: D:\development\vscp\firmware
\ No newline at end of file
+subst j: D:\development\vscp\firmware
+
+rem Setup gcc arm development paths etc
+subst k: "C:/Program Files/yagarto/arm-elf"
+set INCLUDE = "C:\Program Files\yagarto\arm-elf\include;j:\common"
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ak...@us...> - 2008-02-17 12:24:34
|
Revision: 844
http://can.svn.sourceforge.net/can/?rev=844&view=rev
Author: akhe
Date: 2008-02-17 04:24:27 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
Fixed CAN extended id bug in str71x_lib, str72x_lib and str75x_lib
Modified Paths:
--------------
trunk/firmware/arm/str/common/str71x_lib/libSTR71x_lib.a
trunk/firmware/arm/str/common/str71x_lib/src/can.c
trunk/firmware/arm/str/common/str72x_lib/libSTR72x_lib.a
trunk/firmware/arm/str/common/str72x_lib/src/720_can.c
trunk/firmware/arm/str/common/str73x_lib/src/73x_can.c
trunk/firmware/arm/str/common/str75x_lib/libSTR75x_lib.a
trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c
Modified: trunk/firmware/arm/str/common/str71x_lib/libSTR71x_lib.a
===================================================================
(Binary files differ)
Modified: trunk/firmware/arm/str/common/str71x_lib/src/can.c
===================================================================
--- trunk/firmware/arm/str/common/str71x_lib/src/can.c 2008-02-17 11:51:48 UTC (rev 843)
+++ trunk/firmware/arm/str/common/str71x_lib/src/can.c 2008-02-17 12:24:27 UTC (rev 844)
@@ -362,9 +362,11 @@
}
else
{
- // extended ID
- CAN->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
- CAN->sMsgObj[0].A2R = (CAN->sMsgObj[0].A2R & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ // extended ID - Fixed AKHE
+ //CAN->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
+ //CAN->sMsgObj[0].A2R = (CAN->sMsgObj[0].A2R & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ CAN->sMsgObj[0].A1R = pCanMsg->Id & 0xffff;
+ CAN->sMsgObj[0].A2R = (CAN->sMsgObj[0].A2R & 0xE000) | ( ( pCanMsg->Id >> 16 ) & 0xffff);
}
CAN->sMsgObj[0].MCR = (CAN->sMsgObj[0].MCR & 0xFEF0) | CAN_MCR_NEWDAT | CAN_MCR_TXRQST | pCanMsg->Dlc;
@@ -417,9 +419,10 @@
}
else
{
- /* extended ID */
+ /* extended ID - Fixed AKHE*/
pCanMsg->IdType = CAN_EXT_ID;
- pCanMsg->Id = ((CAN->sMsgObj[1].A2R >> 2) & 0x07FF) | ((u32)CAN->sMsgObj[1].A1R << 11) | (((u32)CAN->sMsgObj[1].A2R & 0x0003) << 27);
+ //pCanMsg->Id = ((CAN->sMsgObj[1].A2R >> 2) & 0x07FF) | ((u32)CAN->sMsgObj[1].A1R << 11) | (((u32)CAN->sMsgObj[1].A2R & 0x0003) << 27);
+ pCanMsg->Id = CAN->sMsgObj[1].A1R + ( ( CAN->sMsgObj[1].A2R & 0x1fff ) >> 16 );
}
pCanMsg->Dlc = CAN->sMsgObj[1].MCR & 0x0F;
@@ -478,9 +481,9 @@
}
else
{
- /* extended ID */
- CAN->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
- CAN->sMsgObj[0].A2R = (CAN->sMsgObj[0].A2R & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ /* extended ID - Fixe AKHE*/
+ //CAN->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
+ //CAN->sMsgObj[0].A2R = (CAN->sMsgObj[0].A2R & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
}
CAN->sMsgObj[0].MCR = (CAN->sMsgObj[0].MCR & 0xFCF0) | pCanMsg->Dlc;
@@ -526,7 +529,8 @@
{
/* extended ID */
pCanMsg->IdType = CAN_EXT_ID;
- pCanMsg->Id = ((CAN->sMsgObj[1].A2R >> 2) & 0x07FF) | ((u32)CAN->sMsgObj[1].A1R << 11) | (((u32)CAN->sMsgObj[1].A2R & 0x0003) << 27);
+ //pCanMsg->Id = ((CAN->sMsgObj[1].A2R >> 2) & 0x07FF) | ((u32)CAN->sMsgObj[1].A1R << 11) | (((u32)CAN->sMsgObj[1].A2R & 0x0003) << 27);
+ pCanMsg->Id = CAN->sMsgObj[1].A1R + ( ( CAN->sMsgObj[1].A2R & 0x1fff ) >> 16 );
}
pCanMsg->Dlc = CAN->sMsgObj[1].MCR & 0x0F;
Modified: trunk/firmware/arm/str/common/str72x_lib/libSTR72x_lib.a
===================================================================
(Binary files differ)
Modified: trunk/firmware/arm/str/common/str72x_lib/src/720_can.c
===================================================================
--- trunk/firmware/arm/str/common/str72x_lib/src/720_can.c 2008-02-17 11:51:48 UTC (rev 843)
+++ trunk/firmware/arm/str/common/str72x_lib/src/720_can.c 2008-02-17 12:24:27 UTC (rev 844)
@@ -348,14 +348,16 @@
if ((CAN->sMsgObj[0].ARB2 & CAN_ARB_XTD) == 0)
{
// standard ID
- CAN->sMsgObj[0].ARB1 = 0;
- CAN->sMsgObj[0].ARB2 = (CAN->sMsgObj[0].ARB2 & 0xE000) | STD_FIXED_ID_ARB(pCanMsg->Id);
+ CAN->sMsgObj[0].ARB1 = 0;
+ CAN->sMsgObj[0].ARB2 = (CAN->sMsgObj[0].ARB2 & 0xE000) | STD_FIXED_ID_ARB(pCanMsg->Id);
}
else
{
- // extended ID
- CAN->sMsgObj[0].ARB1 = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
- CAN->sMsgObj[0].ARB2 = (CAN->sMsgObj[0].ARB2 & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ // extended ID - fixed AKHE
+ //CAN->sMsgObj[0].ARB1 = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
+ //CAN->sMsgObj[0].ARB2 = (CAN->sMsgObj[0].ARB2 & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ CAN->sMsgObj[0].ARB1 = pCanMsg->Id & 0xffff;
+ CAN->sMsgObj[0].ARB2 = (CAN->sMsgObj[0].ARB2 & 0xE000) | ( ( pCanMsg->Id >> 16 ) & 0xffff);
}
CAN->sMsgObj[0].MSGC = (CAN->sMsgObj[0].MSGC & 0xFEF0) | CAN_CTL_NEWDAT | CAN_CTL_TXRQST | pCanMsg->Dlc;
@@ -408,9 +410,10 @@
}
else
{
- // extended ID
+ // extended ID - Fixed AKHE
pCanMsg->IdType = CAN_EXT_ID;
- pCanMsg->Id = ((CAN->sMsgObj[1].ARB2 >> 2) & 0x07FF) | ((u32)CAN->sMsgObj[1].ARB1 << 11) | (((u32)CAN->sMsgObj[1].ARB2 & 0x0003) << 27);
+ //pCanMsg->Id = ((CAN->sMsgObj[1].ARB2 >> 2) & 0x07FF) | ((u32)CAN->sMsgObj[1].ARB1 << 11) | (((u32)CAN->sMsgObj[1].ARB2 & 0x0003) << 27);
+ pCanMsg->Id = CAN->sMsgObj[1].ARB1 + ( ( CAN->sMsgObj[1].ARB2 & 0x1fff ) >> 16 );
}
pCanMsg->Dlc = CAN->sMsgObj[1].MSGC & 0x0F;
@@ -469,9 +472,11 @@
}
else
{
- // extended ID
- CAN->sMsgObj[0].ARB1 = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
- CAN->sMsgObj[0].ARB2 = (CAN->sMsgObj[0].ARB2 & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ // extended ID - Fixed AKHE
+ //CAN->sMsgObj[0].ARB1 = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
+ //CAN->sMsgObj[0].ARB2 = (CAN->sMsgObj[0].ARB2 & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ CAN->sMsgObj[0].ARB1 = pCanMsg->Id & 0xffff;
+ CAN->sMsgObj[0].ARB2 = (CAN->sMsgObj[0].ARB2 & 0xE000) | ( ( pCanMsg->Id >> 16 ) & 0xffff);
}
CAN->sMsgObj[0].MSGC = (CAN->sMsgObj[0].MSGC & 0xFCF0) | pCanMsg->Dlc;
@@ -517,7 +522,8 @@
{
// extended ID
pCanMsg->IdType = CAN_EXT_ID;
- pCanMsg->Id = ((CAN->sMsgObj[1].ARB2 >> 2) & 0x07FF) | ((u32)CAN->sMsgObj[1].ARB1 << 11) | (((u32)CAN->sMsgObj[1].ARB2 & 0x0003) << 27);
+ //pCanMsg->Id = ((CAN->sMsgObj[1].ARB2 >> 2) & 0x07FF) | ((u32)CAN->sMsgObj[1].ARB1 << 11) | (((u32)CAN->sMsgObj[1].ARB2 & 0x0003) << 27);
+ pCanMsg->Id = CAN->sMsgObj[1].ARB1 + ( ( CAN->sMsgObj[1].ARB2 & 0x1fff ) >> 16 );
}
pCanMsg->Dlc = CAN->sMsgObj[1].MSGC & 0x0F;
Modified: trunk/firmware/arm/str/common/str73x_lib/src/73x_can.c
===================================================================
--- trunk/firmware/arm/str/common/str73x_lib/src/73x_can.c 2008-02-17 11:51:48 UTC (rev 843)
+++ trunk/firmware/arm/str/common/str73x_lib/src/73x_can.c 2008-02-17 12:24:27 UTC (rev 844)
@@ -117,7 +117,7 @@
void CAN_SetBitrate(CAN_TypeDef *CANx, u32 bitrate)
{
CANx->BTR = CanTimings[bitrate]; /*write the predefined timing value*/
- CANx->BRPR = 0; /*clear the Extended Baud Rate Prescaler*/
+ CANx->BRPR = 0; /*clear the Extended Baud Rate Prescaler*/
}
/********************************************************************************/
Modified: trunk/firmware/arm/str/common/str75x_lib/libSTR75x_lib.a
===================================================================
(Binary files differ)
Modified: trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c
===================================================================
--- trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c 2008-02-17 11:51:48 UTC (rev 843)
+++ trunk/firmware/arm/str/common/str75x_lib/src/75x_can.c 2008-02-17 12:24:27 UTC (rev 844)
@@ -417,9 +417,11 @@
}
else
{
- /* extended ID*/
- CAN->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
- CAN->sMsgObj[0].A2R = (CAN->sMsgObj[0].A2R & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ /* extended ID - Fixed AKHE*/
+ //CAN->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
+ //CAN->sMsgObj[0].A2R = (CAN->sMsgObj[0].A2R & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ CAN->sMsgObj[0].A1R = pCanMsg->Id & 0xffff;
+ CAN->sMsgObj[0].A2R = (CAN->sMsgObj[0].A2R & 0xE000) | ( ( pCanMsg->Id >> 16 ) & 0xffff);
}
CAN->sMsgObj[0].MCR = (CAN->sMsgObj[0].MCR & 0xFEF0) | CAN_MCR_NEWDAT | CAN_MCR_TXRQST | pCanMsg->Dlc;
@@ -483,11 +485,12 @@
}
else
{
- /* extended ID*/
+ /* extended ID - Fixed AKHE*/
pCanMsg->IdType = CAN_EXT_ID;
- pCanMsg->Id = ((CAN->sMsgObj[1].A2R >> 2) & 0x07FF);
- pCanMsg->Id |= ((u32)CAN->sMsgObj[1].A1R << 11);
- pCanMsg->Id |= (((u32)CAN->sMsgObj[1].A2R & 0x0003) << 27);
+ //pCanMsg->Id = ((CAN->sMsgObj[1].A2R >> 2) & 0x07FF);
+ //pCanMsg->Id |= ((u32)CAN->sMsgObj[1].A1R << 11);
+ //pCanMsg->Id |= (((u32)CAN->sMsgObj[1].A2R & 0x0003) << 27);
+ pCanMsg->Id = CAN->sMsgObj[1].A1R + ( ( CAN->sMsgObj[1].A2R & 0x1fff ) >> 16 );
}
pCanMsg->Dlc = CAN->sMsgObj[1].MCR & 0x0F;
@@ -555,9 +558,11 @@
}
else
{
- /* extended ID*/
- CAN->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
- CAN->sMsgObj[0].A2R = ((CAN->sMsgObj[0].A2R) & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ /* extended ID Fixed AKHE*/
+ //CAN->sMsgObj[0].A1R = EXT_FIXED_ID_ARB_L(pCanMsg->Id);
+ //CAN->sMsgObj[0].A2R = ((CAN->sMsgObj[0].A2R) & 0xE000) | EXT_FIXED_ID_ARB_H(pCanMsg->Id);
+ CAN->sMsgObj[0].A1R = pCanMsg->Id & 0xffff;
+ CAN->sMsgObj[0].A2R = (CAN->sMsgObj[0].A2R & 0xE000) | ( ( pCanMsg->Id >> 16 ) & 0xffff);
}
CAN->sMsgObj[0].MCR = (CAN->sMsgObj[0].MCR & 0xFCF0) | pCanMsg->Dlc;
@@ -608,11 +613,12 @@
}
else
{
- /* extended ID*/
+ /* extended ID - Fixed AKHE */
pCanMsg->IdType = CAN_EXT_ID;
- pCanMsg->Id = ((CAN->sMsgObj[1].A2R >> 2) & 0x07FF);
- pCanMsg->Id |= ((u32)CAN->sMsgObj[1].A1R << 11);
- pCanMsg->Id |= (((u32)CAN->sMsgObj[1].A2R & 0x0003) << 27);
+ //pCanMsg->Id = ((CAN->sMsgObj[1].A2R >> 2) & 0x07FF);
+ //pCanMsg->Id |= ((u32)CAN->sMsgObj[1].A1R << 11);
+ //pCanMsg->Id |= (((u32)CAN->sMsgObj[1].A2R & 0x0003) << 27);
+ pCanMsg->Id = CAN->sMsgObj[1].A1R + ( ( CAN->sMsgObj[1].A2R & 0x1fff ) >> 16 );
}
pCanMsg->Dlc = CAN->sMsgObj[1].MCR & 0x0F;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ak...@us...> - 2008-02-17 11:51:51
|
Revision: 843
http://can.svn.sourceforge.net/can/?rev=843&view=rev
Author: akhe
Date: 2008-02-17 03:51:48 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
Added CAN sample for str75x
Added Paths:
-----------
trunk/firmware/arm/str/cantest_str75x_gcc/
trunk/firmware/arm/str/cantest_str75x_gcc/docs/
trunk/firmware/arm/str/cantest_str75x_gcc/project/
trunk/firmware/arm/str/cantest_str75x_gcc/project/Makefile
trunk/firmware/arm/str/cantest_str75x_gcc/project/Readme.txt
trunk/firmware/arm/str/cantest_str75x_gcc/project/STR75x-RAM.ld
trunk/firmware/arm/str/cantest_str75x_gcc/project/STR75x-ROM.ld
trunk/firmware/arm/str/cantest_str75x_gcc/project/cantest.pnproj
trunk/firmware/arm/str/cantest_str75x_gcc/project/cantest.pnps
trunk/firmware/arm/str/cantest_str75x_gcc/project/main.c
trunk/firmware/arm/str/cantest_str75x_gcc/project/startup.s
trunk/firmware/arm/str/cantest_str75x_gcc/project/vector.s
trunk/firmware/arm/str/cantest_str75x_gcc/project/vectors.c
trunk/firmware/arm/str/cantest_str75x_gcc/project/vectors.h
Added: trunk/firmware/arm/str/cantest_str75x_gcc/project/Makefile
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_gcc/project/Makefile (rev 0)
+++ trunk/firmware/arm/str/cantest_str75x_gcc/project/Makefile 2008-02-17 11:51:48 UTC (rev 843)
@@ -0,0 +1,497 @@
+# Hey Emacs, this is a -*- makefile -*-
+#
+# WinARM template makefile
+# by Giacomo Fazio and Antonio Nasca, Catania, Italy
+# <gia...@gm...>
+# <ant...@ho...>
+#
+# based on the WinARM template makefile written by Martin Thomas
+# Released to the Public Domain
+# Please read the make user manual!
+#
+#
+# On command line:
+#
+# make all = Make software.
+#
+# make clean = Clean out built project files.
+#
+# make program = Download the hex file to the device
+#
+# (TODO: make filename.s = Just compile filename.c into the assembler code only)
+#
+# To rebuild project do "make clean" then "make all".
+# Toolchain prefix (i.e arm-elf -> arm-elf-gcc.exe)
+TCHAIN = arm-elf
+#TCHAIN = arm-none-eabi
+
+#USE_THUMB_MODE = YES
+USE_THUMB_MODE = NO
+
+# MCU name and submodel
+MCU = arm7tdmi
+SUBMDL = STR75x
+
+## Create ROM-Image
+RUN_MODE=ROM_RUN
+## Create RAM-Image
+#RUN_MODE=RAM_RUN
+
+## not supported in this example:
+## Exception-Vector placement only supported for "ROM_RUN"
+## (placement settings ignored when using "RAM_RUN")
+## - Exception vectors in ROM:
+#VECTOR_LOCATION=VECTORS_IN_ROM
+## - Exception vectors in RAM:
+#VECTOR_LOCATION=VECTORS_IN_RAM
+
+
+# Target file name (without extension).
+TARGET = main
+
+# List C source files here. (C dependencies are automatically generated.)
+# use file-extension c for "c-only"-files
+SRC = $(TARGET).c ../../common/75x_lcd.c ../../common/sysTime.c ../../common/delay.c
+
+# List C source files here which must be compiled in ARM-Mode.
+# use file-extension c for "c-only"-files
+SRCARM = vectors.c
+# thumb is possible too for vectors.c - keep ARM, TODO: profile
+
+# List C++ source files here.
+# use file-extension cpp for C++-files (use extension .cpp)
+CPPSRC =
+
+# List C++ source files here which must be compiled in ARM-Mode.
+# use file-extension cpp for C++-files (use extension .cpp)
+#CPPSRCARM = $(TARGET).cpp
+CPPSRCARM =
+
+# List Assembler source files here.
+# Make them always end in a capital .S. Files ending in a lowercase .s
+# will not be considered source files but generated files (assembler
+# output from the compiler), and will be deleted upon "make clean"!
+# Even though the DOS/Win* filesystem matches both .s and .S the same,
+# it will preserve the spelling of the filenames, and gcc itself does
+# care about how the name is spelled on its command-line.
+ASRC =
+
+# List Assembler source files here which must be assembled in ARM-Mode..
+ASRCARM = vector.S startup.S
+
+# Path to Linker-Scripts
+LINKERSCRIPTPATH = .
+
+## Output format. (can be ihex or binary or both)
+## (binary i.e. for openocd and SAM-BA, hex i.e. for lpc21isp and uVision)
+#FORMAT = ihex
+#FORMAT = binary
+FORMAT = both
+
+# Optimization level, can be [0, 1, 2, 3, s].
+# 0 = turn off optimization. s = optimize for size.
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
+#OPT = s
+OPT = 0
+
+## Using the Atmel AT91_lib produces warning with
+## the default warning-levels.
+## yes - disable these warnings; no - keep default settings
+#AT91LIBNOWARN = yes
+AT91LIBNOWARN = no
+
+# Debugging format.
+# Native formats for AVR-GCC's -g are stabs [default], or dwarf-2.
+# AVR (extended) COFF requires stabs, plus an avr-objcopy run.
+#DEBUG = stabs
+DEBUG = dwarf-2
+
+# List any extra directories to look for include files here.
+# Each directory must be seperated by a space.
+EXTRAINCDIRS = "K:/include" ../../common/str75x_lib/include
+
+# List any extra directories to look for library files here.
+# Each directory must be seperated by a space.
+#EXTRA_LIBDIRS = ../arm7_efsl_0_2_4
+EXTRA_LIBDIRS = K:/lib ../../common/str75x_lib
+
+
+# Compiler flag to set the C Standard level.
+# c89 - "ANSI" C
+# gnu89 - c89 plus GCC extensions
+# c99 - ISO C99 standard (not yet fully implemented)
+# gnu99 - c99 plus GCC extensions
+CSTANDARD = -std=gnu99
+
+# Place -D or -U options for C here
+CDEFS = -D$(RUN_MODE)
+
+# Place -I options here
+CINCS =
+
+# Place -D or -U options for ASM here
+ADEFS = -D$(RUN_MODE)
+
+ifdef VECTOR_LOCATION
+CDEFS += -D$(VECTOR_LOCATION)
+ADEFS += -D$(VECTOR_LOCATION)
+endif
+
+CDEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+ADEFS += -D__WinARM__ -D__WINARMSUBMDL_$(SUBMDL)__
+
+# Compiler flags.
+
+ifeq ($(USE_THUMB_MODE),YES)
+THUMB = -mthumb
+THUMB_IW = -mthumb-interwork
+else
+THUMB =
+THUMB_IW =
+endif
+
+# -g*: generate debugging information
+# -O*: optimization level
+# -f...: tuning, see GCC manual and avr-libc documentation
+# -Wall...: warning level
+# -Wa,...: tell GCC to pass this to the assembler.
+# -adhlns...: create assembler listing
+#
+# Flags for C and C++ (arm-elf-gcc/arm-elf-g++)
+CFLAGS = -g$(DEBUG)
+CFLAGS += $(CDEFS) $(CINCS)
+CFLAGS += -O$(OPT)
+CFLAGS += -Wall -Wcast-align -Wimplicit
+CFLAGS += -Wpointer-arith -Wswitch
+CFLAGS += -ffunction-sections -fdata-sections
+CFLAGS += -Wredundant-decls -Wreturn-type -Wshadow -Wunused
+CFLAGS += -Wa,-adhlns=$(subst $(suffix $<),.lst,$<)
+CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
+
+# flags only for C
+CONLYFLAGS += -Wnested-externs
+CONLYFLAGS += $(CSTANDARD)
+
+ifneq ($(AT91LIBNOWARN),yes)
+#AT91-lib warnings with:
+CFLAGS += -Wcast-qual
+CONLYFLAGS += -Wmissing-prototypes
+CONLYFLAGS += -Wstrict-prototypes
+CONLYFLAGS += -Wmissing-declarations
+endif
+
+# flags only for C++ (arm-elf-g++)
+# CPPFLAGS = -fno-rtti -fno-exceptions
+CPPFLAGS =
+
+# Assembler flags.
+# -Wa,...: tell GCC to pass this to the assembler.
+# -ahlns: create listing
+# -g$(DEBUG): have the assembler create line number information
+ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:.S=.lst),-g$(DEBUG)
+
+
+#Additional libraries.
+
+# Extra libraries
+# Each library-name must be seperated by a space.
+# To add libxyz.a, libabc.a and libefsl.a:
+# EXTRA_LIBS = xyz abc efsl
+#EXTRA_LIBS = efsl
+EXTRA_LIBS = STR75x_lib
+
+#Support for newlibc-lpc (file: libnewlibc-lpc.a)
+#NEWLIBLPC = -lnewlib-lpc
+
+MATH_LIB = -lm
+
+# CPLUSPLUS_LIB = -lstdc++
+
+
+# Linker flags.
+# -Wl,...: tell GCC to pass this to linker.
+# -Map: create map file
+# --cref: add cross reference to map file
+LDFLAGS = -nostartfiles -Wl,-Map=$(TARGET).map,--cref,--gc-sections
+LDFLAGS += -lc
+LDFLAGS += $(NEWLIBLPC) $(MATH_LIB)
+LDFLAGS += -lc -lgcc
+LDFLAGS += $(CPLUSPLUS_LIB)
+LDFLAGS += $(patsubst %,-L%,$(EXTRA_LIBDIRS))
+LDFLAGS += $(patsubst %,-l%,$(EXTRA_LIBS))
+
+# Set Linker-Script Depending On Selected Memory and Controller
+ifeq ($(RUN_MODE),RAM_RUN)
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-RAM.ld
+else
+LDFLAGS +=-T$(LINKERSCRIPTPATH)/$(SUBMDL)-ROM.ld
+endif
+
+
+# Define directories, if needed.
+## DIRARM = c:/WinARM/
+## DIRARMBIN = $(DIRAVR)/bin/
+## DIRAVRUTILS = $(DIRAVR)/utils/bin/
+
+# Define programs and commands.
+SHELL = sh
+CC = $(TCHAIN)-gcc
+CPP = $(TCHAIN)-g++
+AR = $(TCHAIN)-ar
+OBJCOPY = $(TCHAIN)-objcopy
+OBJDUMP = $(TCHAIN)-objdump
+SIZE = $(TCHAIN)-size
+NM = $(TCHAIN)-nm
+REMOVE = rm -f
+REMOVEDIR = rm -f -r
+COPY = cp
+
+# Define Messages
+# English
+MSG_ERRORS_NONE = Errors: none
+MSG_BEGIN = "-------- begin (mode: $(RUN_MODE)) --------"
+MSG_END = -------- end --------
+MSG_SIZE_BEFORE = Size before:
+MSG_SIZE_AFTER = Size after:
+MSG_FLASH = Creating load file for Flash:
+MSG_EXTENDED_LISTING = Creating Extended Listing:
+MSG_SYMBOL_TABLE = Creating Symbol Table:
+MSG_LINKING = Linking:
+MSG_COMPILING = Compiling C:
+MSG_COMPILING_ARM = "Compiling C (ARM-only):"
+MSG_COMPILINGCPP = Compiling C++:
+MSG_COMPILINGCPP_ARM = "Compiling C++ (ARM-only):"
+MSG_ASSEMBLING = Assembling:
+MSG_ASSEMBLING_ARM = "Assembling (ARM-only):"
+MSG_CLEANING = Cleaning project:
+MSG_FORMATERROR = Can not handle output-format
+MSG_LPC21_RESETREMINDER = You may have to bring the target in bootloader-mode now.
+
+# Define all object files.
+COBJ = $(SRC:.c=.o)
+AOBJ = $(ASRC:.S=.o)
+COBJARM = $(SRCARM:.c=.o)
+AOBJARM = $(ASRCARM:.S=.o)
+CPPOBJ = $(CPPSRC:.cpp=.o)
+CPPOBJARM = $(CPPSRCARM:.cpp=.o)
+
+# Define all listing files.
+LST = $(ASRC:.S=.lst) $(ASRCARM:.S=.lst) $(SRC:.c=.lst) $(SRCARM:.c=.lst)
+LST += $(CPPSRC:.cpp=.lst) $(CPPSRCARM:.cpp=.lst)
+
+# Compiler flags to generate dependency files.
+### GENDEPFLAGS = -Wp,-M,-MP,-MT,$(*F).o,-MF,.dep/$(@F).d
+GENDEPFLAGS = -MD -MP -MF .dep/$(@F).d
+
+# Combine all necessary flags and optional flags.
+# Add target processor to flags.
+ALL_CFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. $(CFLAGS) $(GENDEPFLAGS)
+ALL_ASFLAGS = -mcpu=$(MCU) $(THUMB_IW) -I. -x assembler-with-cpp $(ASFLAGS)
+
+
+# Default target.
+all: begin gccversion sizebefore build sizeafter finished end
+
+ifeq ($(FORMAT),ihex)
+build: elf hex lss sym
+hex: $(TARGET).hex
+IMGEXT=hex
+else
+ifeq ($(FORMAT),binary)
+build: elf bin lss sym
+bin: $(TARGET).bin
+IMGEXT=bin
+else
+ifeq ($(FORMAT),both)
+build: elf hex bin lss sym
+hex: $(TARGET).hex
+bin: $(TARGET).bin
+else
+$(error "$(MSG_FORMATERROR) $(FORMAT)")
+endif
+endif
+endif
+
+elf: $(TARGET).elf
+lss: $(TARGET).lss
+sym: $(TARGET).sym
+
+# Eye candy.
+begin:
+ @echo
+ @echo $(MSG_BEGIN)
+
+finished:
+ @echo $(MSG_ERRORS_NONE)
+
+end:
+ @echo $(MSG_END)
+ @echo
+
+
+# Display size of file.
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
+ELFSIZE = $(SIZE) -A $(TARGET).elf
+sizebefore:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); echo; fi
+
+sizeafter:
+ @if [ -f $(TARGET).elf ]; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); echo; fi
+
+
+# Display compiler version information.
+gccversion :
+ @$(CC) --version
+
+# FLASH Programming with OPENOCD
+
+# specify the directory where openocd executable resides (openocd-ftd2xx.exe or openocd-pp.exe)
+# Note: you may have to adjust this if a newer version of YAGARTO has been downloaded
+OPENOCD_DIR = 'C:\Program Files\openocd-r247\bin\'
+
+# specify OpenOCD executable (pp is for the wiggler, ftd2xx is for the USB debugger)
+#OPENOCD = $(OPENOCD_DIR)openocd-pp.exe
+OPENOCD = $(OPENOCD_DIR)openocd-ftd2xx.exe
+
+# specify OpenOCD configuration file (pick the one for your device)
+#OPENOCD_CFG = C:\openocd-configs\str75x-configs\str75x_signalyzer-flash-program.cfg
+#OPENOCD_CFG = C:\openocd-configs\str75x-configs\str75x_jtagkey-flash-program.cfg
+#OPENOCD_CFG = C:\openocd-configs\str75x-configs\str75x_armusbocd-flash-program.cfg
+#OPENOCD_CFG = C:\openocd-configs\str75x-configs\str75x_pp-flash-program.cfg
+#OPENOCD_CFG = "D:\development\armdev\str75x open source development\Code\Windows\openocd-configs\str75x-configs\str75x_jtagkey-flash-program.cfg"
+OPENOCD_CFG = "c:\str73x_jtagkey-flash-program.cfg"
+
+program:
+ @echo
+ @echo "Flash Programming with OpenOCD..."
+ $(OPENOCD) -f $(OPENOCD_CFG)
+ @echo
+ @echo
+ @echo "Flash Programming Finished."
+
+
+# Create final output file (.hex) from ELF output file.
+%.hex: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O ihex $< $@
+
+# Create final output file (.bin) from ELF output file.
+%.bin: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O binary $< $@
+
+
+# Create extended listing file from ELF output file.
+# testing: option -C
+%.lss: %.elf
+ @echo
+ @echo $(MSG_EXTENDED_LISTING) $@
+ $(OBJDUMP) -h -S -C $< > $@
+
+
+# Create a symbol table from ELF output file.
+%.sym: %.elf
+ @echo
+ @echo $(MSG_SYMBOL_TABLE) $@
+ $(NM) -n $< > $@
+
+
+# Link: create ELF output file from object files.
+.SECONDARY : $(TARGET).elf
+.PRECIOUS : $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+%.elf: $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM)
+ @echo
+ @echo $(MSG_LINKING) $@
+ $(CC) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
+# $(CPP) $(THUMB) $(ALL_CFLAGS) $(AOBJARM) $(AOBJ) $(COBJARM) $(COBJ) $(CPPOBJ) $(CPPOBJARM) --output $@ $(LDFLAGS)
+
+# Compile: create object files from C source files. ARM/Thumb
+$(COBJ) : %.o : %.c
+ @echo
+ @echo $(MSG_COMPILING) $<
+ $(CC) -c $(THUMB) $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C source files. ARM-only
+$(COBJARM) : %.o : %.c
+ @echo
+ @echo $(MSG_COMPILING_ARM) $<
+ $(CC) -c $(ALL_CFLAGS) $(CONLYFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM/Thumb
+$(CPPOBJ) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP) $<
+ $(CPP) -c $(THUMB) $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+# Compile: create object files from C++ source files. ARM-only
+$(CPPOBJARM) : %.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILINGCPP_ARM) $<
+ $(CPP) -c $(ALL_CFLAGS) $(CPPFLAGS) $< -o $@
+
+
+# Compile: create assembler files from C source files. ARM/Thumb
+## does not work - TODO - hints welcome
+##$(COBJ) : %.s : %.c
+## $(CC) $(THUMB) -S $(ALL_CFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM/Thumb
+$(AOBJ) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING) $<
+ $(CC) -c $(THUMB) $(ALL_ASFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files. ARM-only
+$(AOBJARM) : %.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING_ARM) $<
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@
+
+
+# Target: clean project.
+clean: begin clean_list finished end
+
+
+clean_list :
+ @echo
+ @echo $(MSG_CLEANING)
+ $(REMOVE) $(TARGET).hex
+ $(REMOVE) $(TARGET).bin
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).elf
+ $(REMOVE) $(TARGET).map
+ $(REMOVE) $(TARGET).obj
+ $(REMOVE) $(TARGET).a90
+ $(REMOVE) $(TARGET).sym
+ $(REMOVE) $(TARGET).lnk
+ $(REMOVE) $(TARGET).lss
+ $(REMOVE) $(COBJ)
+ $(REMOVE) $(CPPOBJ)
+ $(REMOVE) $(AOBJ)
+ $(REMOVE) $(COBJARM)
+ $(REMOVE) $(CPPOBJARM)
+ $(REMOVE) $(AOBJARM)
+ $(REMOVE) $(LST)
+ $(REMOVE) $(SRC:.c=.s)
+ $(REMOVE) $(SRC:.c=.d)
+ $(REMOVE) $(SRCARM:.c=.s)
+ $(REMOVE) $(SRCARM:.c=.d)
+ $(REMOVE) $(CPPSRC:.cpp=.s)
+ $(REMOVE) $(CPPSRC:.cpp=.d)
+ $(REMOVE) $(CPPSRCARM:.cpp=.s)
+ $(REMOVE) $(CPPSRCARM:.cpp=.d)
+ $(REMOVEDIR) .dep | exit 0
+
+
+# Include the dependency files.
+-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
+
+
+# Listing of phony targets.
+.PHONY : all begin finish end sizebefore sizeafter gccversion \
+build elf hex bin lss sym clean clean_list program
+
Added: trunk/firmware/arm/str/cantest_str75x_gcc/project/Readme.txt
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_gcc/project/Readme.txt (rev 0)
+++ trunk/firmware/arm/str/cantest_str75x_gcc/project/Readme.txt 2008-02-17 11:51:48 UTC (rev 843)
@@ -0,0 +1,12 @@
+Simple CAN test sample
+======================
+
+Ake Hedman, D of Scandinavia ak...@do..., http://www.dofscandinavia.com
+
+The sample code send a CAN frame every 500 ms and display a "RECEIVE CAN MESSAGE"
+on the second line of the LCD if a CAN message with id 0x123, length=4 and
+data=1,2,4,8 is received. If another msg is received the line is cleared.
+
+CAN bitrate is 500 kbps.
+
+Based on a sample from ST
Added: trunk/firmware/arm/str/cantest_str75x_gcc/project/STR75x-RAM.ld
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_gcc/project/STR75x-RAM.ld (rev 0)
+++ trunk/firmware/arm/str/cantest_str75x_gcc/project/STR75x-RAM.ld 2008-02-17 11:51:48 UTC (rev 843)
@@ -0,0 +1,228 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/* Stack Sizes */
+
+ _STACKSIZE = 1024;
+ _STACKSIZE_IRQ = 256;
+ _STACKSIZE_FIQ = 256;
+ _STACKSIZE_SVC = 0;
+ _STACKSIZE_ABT = 0;
+ _STACKSIZE_UND = 0;
+ _HEAPSIZE = 1024;
+
+/* Memory Definitions */
+
+MEMORY
+{
+ DATA (rw) : ORIGIN = 0x40000000, LENGTH = 0x00004000
+}
+
+/* Section Definitions */
+
+SECTIONS
+{
+ /* first section is .text which is used for code */
+
+ .text :
+ {
+ KEEP(*(.vectrom))
+ KEEP(*(.init))
+ *(.text .text.*)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7t .glue_7)
+ KEEP(*(.fini))
+ *(.gcc_except_table)
+ } >DATA =0
+ . = ALIGN(4);
+
+ /* .ctors .dtors are used for c++ constructors/destructors */
+
+ .ctors :
+ {
+ PROVIDE(__ctors_start__ = .);
+ KEEP(*(SORT(.ctors.*)))
+ KEEP(*(.ctors))
+ PROVIDE(__ctors_end__ = .);
+ } >DATA
+
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ } >DATA
+
+ /* .rodata section which is used for read-only data (constants) */
+
+ .rodata :
+ {
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.r.*)
+ } >DATA
+ . = ALIGN(4);
+
+ _vectext = .;
+ PROVIDE (vectext = .);
+
+ .vect : AT (_vectext)
+ {
+ _vecstart = .;
+ KEEP(*(.vectram))
+ _vecend = .;
+ } >DATA
+
+ _etext = _vectext + SIZEOF(.vect);
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+
+ .data : AT (_etext)
+ {
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ SORT(CONSTRUCTORS)
+ } >DATA
+ . = ALIGN(4);
+
+ __data_start = .;
+ _edata = .;
+ PROVIDE (edata = .);
+
+ /* .bss section which is used for uninitialized data */
+
+ .bss :
+ {
+ __bss_start = .;
+ __bss_start__ = .;
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(4);
+ } >DATA
+ . = ALIGN(4);
+ __bss_end__ = .;
+
+ _end = .;
+ PROVIDE(end = .);
+
+ /* .heap section which is used for memory allocation */
+
+ .heap (NOLOAD) :
+ {
+ __heap_start__ = .;
+ *(.heap)
+ . = MAX(__heap_start__ + _HEAPSIZE , .);
+ } >DATA
+ __heap_end__ = __heap_start__ + SIZEOF(.heap);
+
+ /* .stack section - user mode stack */
+
+ .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_start__ = .;
+ *(.stack)
+ . = MAX(__stack_start__ + _STACKSIZE , .);
+ } >DATA
+ __stack_end__ = __stack_start__ + SIZEOF(.stack);
+
+ /* .stack_irq section */
+
+ .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_irq_start__ = .;
+ *(.stack_irq)
+ . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
+ } >DATA
+ __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
+
+ /* .stack_fiq section */
+
+ .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_fiq_start__ = .;
+ *(.stack_fiq)
+ . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
+ } >DATA
+ __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
+
+ /* .stack_svc section */
+
+ .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_svc_start__ = .;
+ *(.stack_svc)
+ . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
+ } >DATA
+ __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
+
+ /* .stack_abt section */
+
+ .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_abt_start__ = .;
+ *(.stack_abt)
+ . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
+ } >DATA
+ __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
+
+ /* .stack_und section */
+
+ .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_und_start__ = .;
+ *(.stack_und)
+ . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
+ } >DATA
+ __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
+
Added: trunk/firmware/arm/str/cantest_str75x_gcc/project/STR75x-ROM.ld
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_gcc/project/STR75x-ROM.ld (rev 0)
+++ trunk/firmware/arm/str/cantest_str75x_gcc/project/STR75x-ROM.ld 2008-02-17 11:51:48 UTC (rev 843)
@@ -0,0 +1,231 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/* Stack Sizes */
+
+ _STACKSIZE = 1024;
+ _STACKSIZE_IRQ = 256;
+ _STACKSIZE_FIQ = 256;
+ _STACKSIZE_SVC = 0;
+ _STACKSIZE_ABT = 0;
+ _STACKSIZE_UND = 0;
+ _HEAPSIZE = 1024;
+
+/* Memory Definitions */
+
+MEMORY
+{
+ CODE (rx) : ORIGIN = 0x20000000, LENGTH = 0x00040000
+ DATA (rw) : ORIGIN = 0x40000000, LENGTH = 0x00004000
+}
+
+/* Section Definitions */
+
+SECTIONS
+{
+ /* first section is .text which is used for code */
+
+ .text :
+ {
+ KEEP(*(.vectrom))
+ KEEP(*(.init))
+ *(.text .text.*)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7t .glue_7)
+ KEEP(*(.fini))
+ *(.gcc_except_table)
+ } >CODE =0
+ . = ALIGN(4);
+
+ /* .ctors .dtors are used for c++ constructors/destructors */
+
+ .ctors :
+ {
+ PROVIDE(__ctors_start__ = .);
+ KEEP(*(SORT(.ctors.*)))
+ KEEP(*(.ctors))
+ PROVIDE(__ctors_end__ = .);
+ } >CODE
+
+ .dtors :
+ {
+ PROVIDE(__dtors_start__ = .);
+ KEEP(*(SORT(.dtors.*)))
+ KEEP(*(.dtors))
+ PROVIDE(__dtors_end__ = .);
+ } >CODE
+
+ /* .rodata section which is used for read-only data (constants) */
+
+ .rodata :
+ {
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.r.*)
+ } >CODE
+ . = ALIGN(4);
+
+ _vectext = .;
+ PROVIDE (vectext = .);
+
+ .vect : AT (_vectext)
+ {
+ _vecstart = .;
+ KEEP(*(.vectram))
+ _vecend = .;
+ } >DATA
+
+ _etext = _vectext + SIZEOF(.vect);
+ PROVIDE (etext = .);
+
+ /* .data section which is used for initialized data */
+
+ .data : AT (_etext)
+ {
+ __data_start = .;
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ SORT(CONSTRUCTORS)
+ . = ALIGN(4);
+ *(.fastrun .fastrun.*)
+ } >DATA
+ . = ALIGN(4);
+
+ _edata = .;
+ PROVIDE (edata = .);
+
+ /* .bss section which is used for uninitialized data */
+
+ .bss :
+ {
+ __bss_start = .;
+ __bss_start__ = .;
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ . = ALIGN(4);
+ } >DATA
+ . = ALIGN(4);
+ __bss_end__ = .;
+
+ _end = .;
+ PROVIDE(end = .);
+
+ /* .heap section which is used for memory allocation */
+
+ .heap (NOLOAD) :
+ {
+ __heap_start__ = .;
+ *(.heap)
+ . = MAX(__heap_start__ + _HEAPSIZE , .);
+ } >DATA
+ __heap_end__ = __heap_start__ + SIZEOF(.heap);
+
+ /* .stack section - user mode stack */
+
+ .stack (__heap_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_start__ = .;
+ *(.stack)
+ . = MAX(__stack_start__ + _STACKSIZE , .);
+ } >DATA
+ __stack_end__ = __stack_start__ + SIZEOF(.stack);
+
+ /* .stack_irq section */
+
+ .stack_irq (__stack_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_irq_start__ = .;
+ *(.stack_irq)
+ . = MAX(__stack_irq_start__ + _STACKSIZE_IRQ , .);
+ } >DATA
+ __stack_irq_end__ = __stack_irq_start__ + SIZEOF(.stack_irq);
+
+ /* .stack_fiq section */
+
+ .stack_fiq (__stack_irq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_fiq_start__ = .;
+ *(.stack_fiq)
+ . = MAX(__stack_fiq_start__ + _STACKSIZE_FIQ , .);
+ } >DATA
+ __stack_fiq_end__ = __stack_fiq_start__ + SIZEOF(.stack_fiq);
+
+ /* .stack_svc section */
+
+ .stack_svc (__stack_fiq_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_svc_start__ = .;
+ *(.stack_svc)
+ . = MAX(__stack_svc_start__ + _STACKSIZE_SVC , .);
+ } >DATA
+ __stack_svc_end__ = __stack_svc_start__ + SIZEOF(.stack_svc);
+
+ /* .stack_abt section */
+
+ .stack_abt (__stack_svc_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_abt_start__ = .;
+ *(.stack_abt)
+ . = MAX(__stack_abt_start__ + _STACKSIZE_ABT , .);
+ } >DATA
+ __stack_abt_end__ = __stack_abt_start__ + SIZEOF(.stack_abt);
+
+ /* .stack_und section */
+
+ .stack_und (__stack_abt_end__ + 3) / 4 * 4 (NOLOAD) :
+ {
+ __stack_und_start__ = .;
+ *(.stack_und)
+ . = MAX(__stack_und_start__ + _STACKSIZE_UND , .);
+ } >DATA
+ __stack_und_end__ = __stack_und_start__ + SIZEOF(.stack_und);
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ /* DWARF debug sections.
+ Symbols in the DWARF debugging sections are relative to the beginning
+ of the section so we begin them at 0. */
+ /* DWARF 1 */
+ .debug 0 : { *(.debug) }
+ .line 0 : { *(.line) }
+ /* GNU DWARF 1 extensions */
+ .debug_srcinfo 0 : { *(.debug_srcinfo) }
+ .debug_sfnames 0 : { *(.debug_sfnames) }
+ /* DWARF 1.1 and DWARF 2 */
+ .debug_aranges 0 : { *(.debug_aranges) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ /* DWARF 2 */
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_frame 0 : { *(.debug_frame) }
+ .debug_str 0 : { *(.debug_str) }
+ .debug_loc 0 : { *(.debug_loc) }
+ .debug_macinfo 0 : { *(.debug_macinfo) }
+ /* SGI/MIPS DWARF 2 extensions */
+ .debug_weaknames 0 : { *(.debug_weaknames) }
+ .debug_funcnames 0 : { *(.debug_funcnames) }
+ .debug_typenames 0 : { *(.debug_typenames) }
+ .debug_varnames 0 : { *(.debug_varnames) }
+}
+
Added: trunk/firmware/arm/str/cantest_str75x_gcc/project/cantest.pnproj
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_gcc/project/cantest.pnproj (rev 0)
+++ trunk/firmware/arm/str/cantest_str75x_gcc/project/cantest.pnproj 2008-02-17 11:51:48 UTC (rev 843)
@@ -0,0 +1 @@
+<Project name="cantest"><File path="Readme.txt"></File><File path="startup.s"></File><File path="STR75x-RAM.ld"></File><File path="STR75x-ROM.ld"></File><File path="vectors.c"></File><File path="vectors.h"></File><File path="main.c"></File><File path="Makefile"></File><File path="D:\development\vscp\firmware\arm\str\common\sysTime.c"></File><File path="D:\development\vscp\firmware\arm\str\common\sysTime.h"></File><File path="D:\development\vscp\firmware\arm\str\common\delay.c"></File><File path="D:\development\vscp\firmware\arm\str\common\delay.h"></File><File path="startup.s"></File><File path="vector.s"></File></Project>
\ No newline at end of file
Added: trunk/firmware/arm/str/cantest_str75x_gcc/project/cantest.pnps
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_gcc/project/cantest.pnps (rev 0)
+++ trunk/firmware/arm/str/cantest_str75x_gcc/project/cantest.pnps 2008-02-17 11:51:48 UTC (rev 843)
@@ -0,0 +1 @@
+<pd><ViewState><e p="cantest" x="true"></e></ViewState></pd>
\ No newline at end of file
Added: trunk/firmware/arm/str/cantest_str75x_gcc/project/main.c
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_gcc/project/main.c (rev 0)
+++ trunk/firmware/arm/str/cantest_str75x_gcc/project/main.c 2008-02-17 11:51:48 UTC (rev 843)
@@ -0,0 +1,635 @@
+/******************** (C) COPYRIGHT 2005 STMicroelectronics **********************
+* File Name : main.c
+* Author : MCD Application Team
+* Date First Issued : 09/27/2005 : V1.0
+* Description : Main program body
+**********************************************************************************
+* History:
+* 09/27/2005 : V1.0
+**********************************************************************************
+* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH
+* CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
+* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT
+* OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT
+* OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION
+* CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
+*********************************************************************************/
+
+/* Standard include ------------------------------------------------------------*/
+#include "73x_lib.h"
+#include "../common/73x_lcd.h"
+#include "../common/systime.h"
+#include "../common/delay.h"
+
+// Prototypes
+void wait( void );
+void MCLK_Config (void);
+void CAN0_Demo_Polling( void );
+void CAN0_Demo_Interrupt(void);
+unsigned int get1000Digit( unsigned int val );
+unsigned int get100Digit( unsigned int val );
+unsigned int get10Digit( unsigned int val );
+unsigned int get1Digit( unsigned int val );
+
+// Peripherals Init Structures
+GPIO_InitTypeDef GPIO0_InitStructure;
+GPIO_InitTypeDef GPIO3_InitStructure;
+ADC_InitTypeDef ADC_InitStructure;
+CMU_InitTypeDef CMU_InitStructure;
+RTC_InitTypeDef RTC_InitStructure;
+
+GPIO_InitTypeDef CAN0_RX;
+GPIO_InitTypeDef CAN0_TX;
+GPIO_InitTypeDef CAN1_RX;
+GPIO_InitTypeDef CAN1_TX;
+GPIO_InitTypeDef CAN2_RX;
+GPIO_InitTypeDef CAN2_TX;
+GPIO_InitTypeDef Led_Config;
+
+// define the LEDs
+#define LD1 GPIO_PIN_0
+#define LD2 GPIO_PIN_1
+#define LD3 GPIO_PIN_2
+#define LD4 GPIO_PIN_3
+#define LD5 GPIO_PIN_4
+#define LD6 GPIO_PIN_5
+#define LD7 GPIO_PIN_6
+#define LD8 GPIO_PIN_7
+#define LD9 GPIO_PIN_8
+#define LD10 GPIO_PIN_9
+#define LD11 GPIO_PIN_10
+#define LD12 GPIO_PIN_11
+#define LD13 GPIO_PIN_12
+#define LD14 GPIO_PIN_13
+#define LD15 GPIO_PIN_14
+#define LD16 GPIO_PIN_15
+
+// buffer for receive messages
+canmsg RxCan0Msg;
+
+// array of pre-defined transmit messages
+canmsg TxCan0Msg[ 2 ] = {
+ { CAN_STD_ID,
+ 0x123,
+ 4,
+ { 0x01, 0x02, 0x04, 0x08 } },
+ { CAN_EXT_ID,
+ 0x12345678,
+ 8,
+ { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 } }
+};
+
+// buffer for receive messages
+canmsg RxCan1Msg;
+
+// array of pre-defined transmit messages
+canmsg TxCan1Msg[2] = {
+ { CAN_STD_ID, 0x123, 4, { 0x01, 0x02, 0x04, 0x08 } },
+ { CAN_EXT_ID, 0x12345678, 8, { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 } }
+};
+
+// buffer for receive messages
+canmsg RxCan2Msg;
+
+// array of pre-defined transmit messages
+canmsg TxCan2Msg[2] = {
+ { CAN_STD_ID, 0x123, 4, { 0x01, 0x02, 0x04, 0x08 } },
+ { CAN_EXT_ID, 0x12345678, 8, { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 } }
+};
+
+// used message object numbers
+enum {
+ CAN0_TX_MSGOBJ = 0,
+ CAN0_RX_MSGOBJ = 1
+};
+enum {
+ CAN1_TX_MSGOBJ = 0,
+ CAN1_RX_MSGOBJ = 1
+};
+enum {
+ CAN2_TX_MSGOBJ = 0,
+ CAN2_RX_MSGOBJ = 1
+};
+
+u16 Conversion_Value = 0;
+u8 buffer[11] = "ADC: ";
+
+
+
+/* Private function prototypes -------------------------------------------------*/
+
+/* Interface functions ---------------------------------------------------------*/
+
+/* Private functions -----------------------------------------------------------*/
+
+
+int main(void)
+{
+ u32 CPIO_Value;
+
+#ifdef LIBDEBUG
+ libdebug();
+#endif
+
+ MCLK_Config();
+
+ // Enable clock on both CAN channels
+ CFG_PeripheralClockConfig( CFG_CLK_CAN0, ENABLE );
+ CFG_PeripheralClockConfig( CFG_CLK_CAN1, ENABLE );
+
+ CFG_PeripheralClockConfig( CFG_CLK_GPIO0, ENABLE );
+ CFG_PeripheralClockConfig( CFG_CLK_GPIO1, ENABLE );
+ CFG_PeripheralClockConfig( CFG_CLK_GPIO2, ENABLE );
+ CFG_PeripheralClockConfig( CFG_CLK_GPIO6, ENABLE );
+
+ Led_Config.GPIO_Mode = GPIO_Mode_OUT_PP;
+ Led_Config.GPIO_Pins = 0xFFFF;
+ GPIO_Init( GPIO0, &Led_Config );
+
+ GPIO3_InitStructure.GPIO_Mode = GPIO_Mode_HI_AIN_TRI;
+ GPIO3_InitStructure.GPIO_Pins = GPIO_PIN_ALL;
+ GPIO_Init( GPIO3, &GPIO3_InitStructure );
+
+ CAN0_RX.GPIO_Mode = GPIO_Mode_IN_TRI_TTL;
+ CAN0_RX.GPIO_Pins = GPIO_PIN_14;
+ GPIO_Init( GPIO1, &CAN0_RX );
+
+ CAN0_TX.GPIO_Mode = GPIO_Mode_AF_PP;
+ CAN0_TX.GPIO_Pins = GPIO_PIN_15;
+ GPIO_Init( GPIO1, &CAN0_TX );
+
+ CAN1_RX.GPIO_Mode = GPIO_Mode_IN_TRI_TTL;
+ CAN1_RX.GPIO_Pins = GPIO_PIN_1;
+ GPIO_Init( GPIO2, &CAN1_RX );
+
+ CAN1_TX.GPIO_Mode = GPIO_Mode_AF_PP;
+ CAN1_TX.GPIO_Pins = GPIO_PIN_2;
+ GPIO_Init( GPIO2, &CAN1_TX );
+
+ // Init 1 ms timebase
+ initTimebase2();
+
+ GPIO_WordWrite( GPIO0, 0x0000 ); // All LED's off
+
+ // * * * EIC * * *
+
+ // EIC Clock Enable
+ CFG_PeripheralClockConfig( CFG_CLK_EIC , ENABLE );
+
+ // EIC Config
+ EIC_IRQChannelPriorityConfig( RTC_IRQChannel, 1 );
+ EIC_IRQChannelPriorityConfig( TB2_IRQChannel, 2 );
+
+ //EIC_IRQChannelConfig( RTC_IRQChannel , ENABLE );
+
+
+ EIC_IRQCmd( ENABLE );
+
+ // * * * CMU * * *
+
+ // CMU Initialization
+ CMU_DeInit( );
+ CMU_StructInit(&CMU_InitStructure);
+
+ // Enable the external oscillator
+ CMU_InitStructure.CMU_CKSEL0 = CMU_CKSEL0_CKOSC;
+ CMU_Init(&CMU_InitStructure);
+
+ // Disable DIV2
+ PRCCU->CFR &= 0x7FFF;
+
+
+ // * * * RTC * * *
+
+ // Set RTC clock-------
+ // (clock:0-->9) fOSC=4Mhz/RTCP=(2,4,8,16,32,64,128,256,512,1024)
+ // -->EXTCLK=(4M,2M,1M,500K,250K,125K,62.5K,31.25K,15.625K,7.812K)
+
+
+ // RTC Clock Enable
+ CFG_PeripheralClockConfig( CFG_CLK_RTC , ENABLE );
+
+ // RTC Interrupt Config
+ RTC_ITConfig( RTC_IT_SEC | RTC_IT_ALA | RTC_IT_OV, ENABLE );
+
+ // RTC Configuration
+ RTC_InitStructure.RTC_Alarm = 6; // 0xFFFFFFFF;
+ RTC_InitStructure.RTC_Counter = 0; // 0xFFFFFFFA;
+ // configure RTC=1S ( RCK=1000000/64=CKL32=15625Hz )
+ // 8MHz/64 = 125000 = 0x1E848
+ RTC_InitStructure.RTC_Prescaler = 0x3D09; // == 15625
+ //RTC_InitStructure.RTC_Prescaler = 0x1E848; // 0x3D09; // == 15625
+
+ RTC_Init( &RTC_InitStructure );
+
+
+
+ // * * * CAN * * *
+ CAN_InitTypeDef CANInit = { 0x0, CAN_BITRATE_500K };
+
+ // initialize the CAN at a standard bitrate, interrupts disabled
+ CAN_Init( CAN0, &CANInit );
+
+ // configure the message objects
+ CAN_EnterInitMode( CAN0, CAN_CR_CCE );
+ CAN_InvalidateAllMsgObj( CAN0 );
+ CAN_SetTxMsgObj( CAN0, CAN0_TX_MSGOBJ, CAN_STD_ID );
+ CAN_SetRxMsgObj( CAN0, CAN0_RX_MSGOBJ, CAN_STD_ID, 0, CAN_LAST_STD_ID, TRUE );
+ CAN_LeaveInitMode( CAN0 );
+
+ GPIO_BitWrite( GPIO0, LD1, Bit_SET );
+
+ // * * * LCD * * *
+
+ // LCD Configuration
+ LCD_Init();
+ LCD_Clear();
+ //LCD_LineClear(1);
+ //LCD_LineClear(2);
+ LCD_SetPosCur(1,1);
+
+ // Display text message on LCD: Line 1
+ LCD_SendString( "SIMPLE CAN TEST", 1, 1 );
+ LCD_SetPosCur(2,1);
+
+
+ // * * * ADC * * *
+
+
+ // ADC Clock Enable
+ CFG_PeripheralClockConfig(CFG_CLK_ADC, ENABLE);
+
+ // ADC Configuration
+ ADC_DeInit ();
+ ADC_StructInit( &ADC_InitStructure );
+ ADC_InitStructure.ADC_Calibration = ADC_Calibration_ON;
+ ADC_InitStructure.ADC_CalibAverage = ADC_CalibAverage_Enable;
+ ADC_InitStructure.ADC_AutoClockOff = ADC_AutoClockOff_Disable ;
+ ADC_InitStructure.ADC_ConversionMode = ADC_ConversionMode_Scan ;
+ ADC_InitStructure.ADC_SamplingPrescaler = 0x2;
+ ADC_InitStructure.ADC_ConversionPrescaler = 0x4;
+ ADC_InitStructure.ADC_FirstChannel = ADC_CHANNEL0 ;
+ ADC_InitStructure.ADC_ChannelNumber = 1;
+ ADC_Init( &ADC_InitStructure );
+
+
+ // EOC interrupt Enable
+ ADC_ITConfig( ADC_IT_EOC, ENABLE );
+
+ // Enable ADC
+ ADC_Cmd( ENABLE );
+
+
+
+ while ( 1 ) {
+
+ // send a pre-defined data frame
+ CAN_SendMessage( CAN0, CAN0_TX_MSGOBJ, &TxCan0Msg[0] );
+
+ // wait until end of transmission
+ CAN_WaitEndOfTx( CAN0 );
+
+ // release the TX message object
+ CAN_ReleaseTxMessage( CAN0, CAN0_TX_MSGOBJ );
+
+ // Check for a data frame
+ if ( CAN_ReceiveMessage( CAN0, CAN0_RX_MSGOBJ, FALSE, &RxCan0Msg ) ) {
+
+ // Test Received Msg
+ if ( ( RxCan0Msg.IdType == CAN_STD_ID ) &&
+ ( RxCan0Msg.Id == 0x123) &&
+ ( RxCan0Msg.Dlc == 4 ) &&
+ ( RxCan0Msg.Data[ 0 ] == 0x01 ) &&
+ ( RxCan0Msg.Data[ 1 ] == 0x02 ) &&
+ ( RxCan0Msg.Data[ 2 ] == 0x04 ) &&
+ ( RxCan0Msg.Data[ 3 ] == 0x08 ) ){
+
+ // Received Msg OK
+ GPIO_BitWrite( GPIO0,LD15, Bit_SET ); // LED 15
+
+ LCD_SendString( "RECEIVE CAN MSG", 2, 1 );
+
+ }
+ else {
+
+ // Received some other Msg
+ GPIO_BitWrite( GPIO0, LD14, Bit_SET ); // LED 14
+
+ LCD_LineClear(2);
+
+ }
+
+ // Release the RX message object
+ CAN_ReleaseRxMessage(CAN0, CAN0_RX_MSGOBJ);
+
+ } // Received frame
+
+
+ // Start ADC conversion
+ ADC_ConversionCmd( ADC_ConversionStart );
+ buffer[8] = get1Digit( Conversion_Value );
+ buffer[7] = get10Digit( Conversion_Value );
+ buffer[6] = get100Digit( Conversion_Value );
+ buffer[5] = get1000Digit( Conversion_Value );
+ buffer[9] = 0;
+
+ // Display ADC conversion Value on LCD
+ //LCD_SendString( &buffer[5], 2, 5 );
+ CPIO_Value = 0;
+
+ for(u32 i = (u32)((float)Conversion_Value/60); i; i--) {
+ CPIO_Value <<= 1;
+ CPIO_Value |= 1;
+ }
+
+ GPIO_WordWrite( GPIO0, CPIO_Value );
+
+ // Wait for 500 ms
+ delay_ms( 500 );
+
+ } // while
+
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// get1000Digit
+//
+
+unsigned int get1000Digit( unsigned int val )
+{
+ return ( ( val / 1000 ) + 0x30 );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// get100Digit
+//
+
+unsigned int get100Digit( unsigned int val )
+{
+ unsigned int valCopy;
+ valCopy = val % 1000;
+ return ( (valCopy / 100 ) + 0x30 );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// get10Digit
+//
+
+unsigned int get10Digit( unsigned int val )
+{
+ unsigned int valCopy;
+ valCopy = val % 100;
+ return ( ( valCopy / 10 ) + 0x30 );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// get1Digit
+//
+
+unsigned int get1Digit( unsigned int val )
+{
+ unsigned int valCopy;
+ valCopy = val % 100;
+ return ( ( valCopy % 10 ) + 0x30 );
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// wait
+//
+
+void wait( void )
+{
+ u32 i;
+
+ for (i=100000L; i!=0 ; i-- ) {}
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// MCLK_Config
+//
+
+void MCLK_Config (void)
+{
+
+ PRCCU_InitTypeDef Clock;
+ CMU_InitTypeDef ClockInit;
+
+ ClockInit.CMU_RCOscControl = 0x0D; // RC OSC Adjust
+ ClockInit.CMU_EndCountValue = 0x0F; //
+ ClockInit.CMU_FreqRef_High = 0xFF; //
+ ClockInit.CMU_FreqRef_Low = 0xFE; //
+
+ ClockInit.CMU_CKSEL0 = CMU_CKSEL0_CKOSC; // Clock for CLOCK1 (4MHz)
+ ClockInit.CMU_CKSEL1 = CMU_CKSEL1_CKPLL; // Clock for Freq. Meter (8MHz)
+ ClockInit.CMU_CKSEL2 = CMU_CKSEL2_CKOSC; // Clock to drive CMU logic
+
+ CMU_Lock( DISABLE );
+ CMU_Init( &ClockInit );
+
+ // Init. Power Reset Clock unit
+ // 4 MHz * 12 / 6 = 8 MHz = CLOCK2
+ Clock.PRCCU_DIV2 = DISABLE;
+ Clock.PRCCU_MCLKSRC_SRC = PRCCU_MCLKSRC_PLL; // Use PLL in
+ Clock.PRCCU_PLLDIV = PRCCU_PLLDIV_6;
+ Clock.PRCCU_PLLMUL = PRCCU_PLLMUL_12;
+
+ PRCCU_Init( &Clock );
+ PRCCU_SetExtClkDiv(4);
+
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// CAN0_Demo_Polling
+//
+
+void CAN0_Demo_Polling( void )
+{
+ CAN_InitTypeDef CANInit = { 0x0, CAN_BITRATE_500K };
+
+ // initialize the CAN at a standard bitrate, interrupts disabled
+ CAN_Init( CAN0, &CANInit );
+
+ // switch into Loopback+Silent mode (self-test)
+ //CAN_EnterTestMode( CAN0, CAN_TESTR_LBACK | 0 );
+
+ // configure the message objects
+ CAN_InvalidateAllMsgObj( CAN0 );
+ CAN_SetTxMsgObj( CAN0, CAN0_TX_MSGOBJ, CAN_STD_ID );
+ CAN_SetRxMsgObj( CAN0, CAN0_RX_MSGOBJ, CAN_STD_ID, 0, CAN_LAST_STD_ID, TRUE );
+
+ // send a pre-defined data frame
+ CAN_SendMessage( CAN0, CAN0_TX_MSGOBJ, &TxCan0Msg[0] );
+
+ // wait until end of transmission
+ CAN_WaitEndOfTx( CAN0 );
+
+ GPIO_BitWrite( GPIO0, LD16, Bit_SET ); // LED16;
+
+/*
+ // wait for reception of a data frame
+ while ( !CAN_ReceiveMessage( CAN0, CAN0_RX_MSGOBJ, FALSE, &RxCan0Msg ) ) {
+ // add a time-out handling here, if necessary
+ }
+
+ // Test Received Msg
+ if ( ( RxCan0Msg.IdType == CAN_STD_ID ) &&
+ ( RxCan0Msg.Id == 0x123) &&
+ ( RxCan0Msg.Dlc == 4 ) &&
+ ( RxCan0Msg.Data[ 0 ] == 0x01 ) &&
+ ( RxCan0Msg.Data[ 1 ] == 0x02 ) &&
+ ( RxCan0Msg.Data[ 2 ] == 0x04 ) &&
+ ( RxCan0Msg.Data[ 3 ] == 0x08 ) ){
+
+ // Received Msg OK
+ GPIO_BitWrite(GPIO0,LD1,Bit_SET);//LED1;
+ }
+ else {
+
+ // Received Msg OK
+ GPIO_BitWrite(GPIO0,LD2,Bit_RESET);//LED2 off;
+
+ }
+*/
+ // release the message objects
+ CAN_ReleaseTxMessage(CAN0, CAN0_TX_MSGOBJ);
+ CAN_ReleaseRxMessage(CAN0, CAN0_RX_MSGOBJ);
+
+ // switch back into Normal mode
+ //CAN_LeaveTestMode( CAN0 );
+
+}
+
+////////////////////////////////////////////////////////////////////////////////
+// CAN0_Demo_Interrupt
+//
+
+void CAN0_Demo_Interrupt(void)
+{
+ CAN_InitTypeDef CAN0Init;
+ CAN0Init.CAN_Mask = CAN_CR_IE;
+ CAN0Init.CAN_Bitrate = CAN_BITRATE_100K;
+
+ // initialize the interrupt controller
+ EIC_IRQChannelConfig( CAN0_IRQChannel, ENABLE );
+ EIC_IRQChannelPriorityConfig( CAN0_IRQChannel, 1 );
+ EIC_IRQCmd( ENABLE );
+
+ // initialize the CAN at a standard bitrate, interrupts enabled
+ CAN_Init( CAN0, &CAN0Init );
+
+ // switch into Loopback+Silent mode (self-test)
+ CAN_EnterTestMode( CAN0, CAN_TESTR_LBACK | CAN_TESTR_SILENT );
+
+ // configure the message objects
+ CAN_InvalidateAllMsgObj( CAN0 );
+ CAN_SetTxMsgObj( CAN0, CAN0_TX_MSGOBJ, CAN_EXT_ID );
+ CAN_SetRxMsgObj( CAN0, CAN0_RX_MSGOBJ, CAN_EXT_ID, 0, CAN_LAST_EXT_ID, TRUE );
+
+ // send a pre-defined data frame
+ CAN_SendMessage( CAN0, CAN0_TX_MSGOBJ, &TxCan0Msg[1] );
+
+ // reception and release are done in the interrupt handler
+ wait();
+
+ GPIO_BitWrite(GPIO0,LD7,Bit_SET); // LED7
+
+ // switch back into Normal mode
+ CAN_LeaveTestMode( CAN0 );
+
+ // disable interrupts globally
+ EIC_IRQCmd( DISABLE );
+
+}
+
+
+
+/******************* (C) COPYRIGHT 2005 STMicroelectronics *****END OF FILE****/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Added: trunk/firmware/arm/str/cantest_str75x_gcc/project/startup.s
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_gcc/project/startup.s (rev 0)
+++ trunk/firmware/arm/str/cantest_str75x_gcc/project/startup.s 2008-02-17 11:51:48 UTC (rev 843)
@@ -0,0 +1,361 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+/**** Startup Code (executed after Reset) ****/
+
+/* Frequency values */
+/* set to suit target hardware */
+
+ .equ FOSC, 4000000
+ .equ FRTC, 2340000
+
+/* Standard definitions of Mode bits and Interrupt (I & F) flags in PSRs */
+
+ .equ Mode_USR, 0x10
+ .equ Mode_FIQ, 0x11
+ .equ Mode_IRQ, 0x12
+ .equ Mode_SVC, 0x13
+ .equ Mode_ABT, 0x17
+ .equ Mode_UND, 0x1B
+ .equ Mode_SYS, 0x1F /* available on ARM Arch 4 and later */
+
+ .equ I_Bit, 0x80 /* when I bit is set, IRQ is disabled */
+ .equ F_Bit, 0x40 /* when F bit is set, FIQ is disabled */
+
+/* --- System memory locations */
+
+ .equ EIC_Base_addr, 0xFFFFFC00 /* EIC base address */
+ .equ ICR_off_addr, 0x00 /* Interrupt Control register offset */
+ .equ CIPR_off_addr, 0x08 /* Current Interrupt Priority Register offset */
+ .equ IVR_off_addr, 0x18 /* Interrupt Vector Register offset */
+ .equ FIR_off_addr, 0x1C /* Fast Interrupt Register offset */
+ .equ IER0_off_addr, 0x20 /* Interrupt Enable Register offset */
+ .equ IER1_off_addr, 0x24 /* Interrupt Enable Register offset */
+ .equ IPR0_off_addr, 0x40 /* Interrupt Pending Bit Register offset */
+ .equ IPR1_off_addr, 0x44 /* Interrupt Pending Bit Register offset */
+ .equ SIR0_off_addr, 0x60 /* Source Interrupt Register 0 */
+
+ .equ CFG_R0_Addr, 0x40000000 /* Configuration Register 0 base address */
+ .equ CFG_PCGR0_Addr, 0x40000008
+
+ .equ FLASH_mask, 0x0000 /* to remap FLASH at 0x0 */
+ .equ RAM_mask, 0x0001 /* to remap RAM at 0x0 */
+
+/* define remapping, if using ram based vectors or rom based
+ REMAP will need to be define in vector.s aswell
+ Valid Options:
+ REMAP 0 - default config, no remapping, vectors in rom
+ REMAP 1 - vectors in rom
+ REMAP 2 - vectors in ram
+*/
+
+.ifndef REMAP
+ .equ REMAP, 0
+.endif
+
+/* if we are debugging in ram then we need
+ the vectors to point to the correct location
+ only if BOOT0/BOOT1 have been set for Flash @ zero.
+*/
+
+.ifndef DBGRAM
+ .equ DBGRAM, 0
+.endif
+
+/* Startup Code must be linked first at Address at which it expects to run. */
+
+ .text
+ .arm
+ .section .init, "ax"
+
+ .global _start
+ .global RCCU_Main_Osc
+ .global RCCU_RTC_Osc
+
+.if REMAP
+
+/* Exception Vector (before Remap) */
+
+/* Reset Handler */
+/* On reset, an aliased copy of ROM is at 0x0. */
+/* Continue execution from 'real' ROM rather than aliased copy */
+
+ LDR pc, =HardReset
+HardReset:
+
+/******************************************************************************
+REMAPPING
+Description : Remapping memory whether RAM,FLASH or External memory
+ at Address 0x0 after the application has started executing.
+ Remapping is generally done to allow RAM to replace FLASH
+ or EXTMEM at 0x0.
+ the remapping of RAM allow copying of vector table into RAM
+******************************************************************************/
+
+.if REMAP == 1
+ MOV r4, #FLASH_mask
+.endif
+
+.if REMAP == 2
+ MOV r4, #RAM_mask
+.endif
+
+remap:
+ LDR r1, =_vecstart /* r1 = start address from which to copy */
+ LDR r3, =_vecend
+ SUB r3, r3, r1 /* r3 = number of bytes to copy */
+ LDR r0, =_vectext /* r0 = start address where to copy */
+copy_ram:
+ LDR r2, [r0], #4 /* Read a word from the source */
+ STR r2, [r1], #4 /* copy the word to destination */
+ SUBS r3, r3, #4 /* Decrement number of words to copy */
+ BNE copy_ram
+
+ LDR r1, =CFG_R0_Addr
+ LDR r0, [r1]
+ BIC r0, r0, #0x01
+ ORR r0, r0, r4
+ STR r0, [r1]
+.endif
+
+/* After remap this will be our reset handler */
+
+_start:
+ LDR pc, =NextInst
+NextInst:
+
+ NOP /* Wait for OSC stabilization */
+ NOP
+ NOP
+ NOP
+ NOP
+ NOP
+ NOP
+ NOP
+ NOP
+
+/* Reset all peripheral clocks except RAM */
+
+ MOV r0, #1
+ LDR r1, =CFG_PCGR0_Addr
+ STR r0, [r1]
+ MOV r0, #0
+ STR r0, [r1,#4]
+
+.if DBGRAM
+ LDR r1, =CFG_R0_Addr
+ LDR r0, [r1]
+ ORR r0, r0, #RAM_mask
+ STR r0, [r1]
+.endif
+
+/* Setup Stack for each mode */
+
+/* Enter Abort Mode and set its Stack Pointer */
+ MSR cpsr_c, #Mode_ABT|I_Bit|F_Bit
+ LDR sp, =__stack_abt_end__
+
+/* Enter Undefined Instruction Mode and set its Stack Pointer */
+ MSR cpsr_c, #Mode_UND|I_Bit|F_Bit
+ LDR sp, =__stack_und_end__
+
+/* Enter Supervisor Mode and set its Stack Pointer */
+ MSR cpsr_c, #Mode_SVC|I_Bit|F_Bit
+ LDR sp, =__stack_svc_end__
+
+/* Enter FIQ Mode and set its Stack Pointer */
+ MSR cpsr_c, #Mode_FIQ|I_Bit|F_Bit
+ LDR sp, =__stack_fiq_end__
+
+/* Enter IRQ Mode and set its Stack Pointer */
+ MSR cpsr_c, #Mode_IRQ|I_Bit|F_Bit
+ LDR sp, =__stack_irq_end__
+
+/* Enter System Mode and set its Stack Pointer */
+ MSR cpsr_c, #Mode_SYS
+ LDR sp, =__stack_end__
+
+/* Setup a default Stack Limit (when compiled with "-mapcs-stack-check") */
+ LDR sl, =__bss_end__
+
+/******************************************************************************
+EIC initialization
+Description : Initialize the EIC as following :
+ - IRQ disabled
+ - FIQ disabled
+ - IVR contain the load PC opcode (0xF59FF00)
+ - Current priority level equal to 0
+ - All channels are disabled
+ - All channels priority equal to 0
+ - All SIR registers contain offset to the related IRQ table entry
+******************************************************************************/
+
+/* enable eic clock */
+
+ LDR r1, =CFG_PCGR0_Addr
+ LDR r0, [r1]
+ ORR r0, r0, #0x20000000
+ STR r0, [r1]
+
+/* Wait for EIC stabilization */
+
+ NOP
+ NOP
+ NOP
+ NOP
+ NOP
+ NOP
+ NOP
+ NOP
+
+EIC_INIT:
+ LDR r3, =EIC_Base_addr
+ LDR r4, =0x00000000
+ STR r4, [r3, #ICR_off_addr] /* Disable FIQ and IRQ */
+ STR r4, [r3, #IER0_off_addr] /* Disable all channels interrupts */
+ STR r4, [r3, #IER1_off_addr] /* Disable all channels interrupts */
+ LDR r4, =0xFFFFFFFF
+ STR r4, [r3, #IPR0_off_addr] /* Clear all IRQ pending bits */
+ STR r4, [r3, #IPR1_off_addr] /* Clear all IRQ pending bits */
+ LDR r4, =0x18
+ STR r4, [r3, #FIR_off_addr] /* Disable FIQ channels and clear FIQ pending bits */
+ LDR r4, =0x00000000
+ STR r4, [r3, #CIPR_off_addr] /* Reset the current priority register */
+ LDR r4, =0xE59F0000
+ STR r4, [r3, #IVR_off_addr] /* Write the LDR pc,pc,#offset instruction code in IVR[31:16] */
+ LDR r2, =64 /* 32 Channel to initialize */
+ LDR r0, =PRCCUCMU_Addr /* Read the address of the IRQs address table */
+ LDR r1, =0x00000FFF
+ AND r0, r0, r1
+ LDR r5, =SIR0_off_addr /* Read SIR0 address */
+ SUB r4, r0, #8 /* subtract 8 for prefetch */
+ LDR r1, =0xF3E8 /* add the offset to the 0x00000000 address(IVR address + 7E8 = 0x00000000) */
+ /* 0xF7E8 used to complete the LDR pc,offset opcode */
+ ADD r1, r4, r1 /* compute the jump offset */
+EIC_INI:
+ MOV r4, r1, LSL #16 /* Left shift the result */
+ STR r4, [r3, r5] /* Store the result in SIRx register */
+ ADD r1, r1, #4 /* Next IRQ address */
+ ADD r5, r5, #4 /* Next SIR */
+ SUBS r2, r2, #1 /* Decrement the number of SIR registers to initialize */
+ BNE EIC_INI /* If more then continue */
+
+/* Relocate .data section (Copy from ROM to RAM) */
+ LDR r1, =_etext
+ LDR r2, =__data_start
+ LDR r3, =_edata
+LoopRel:
+ CMP r2, r3
+ LDRLO r0, [r1], #4
+ STRLO r0, [r2], #4
+ BLO LoopRel
+
+/* Clear .bss section (Zero init) */
+ MOV r0, #0
+ LDR r1, =__bss_start__
+ LDR r2, =__bss_end__
+LoopZI:
+ CMP r1, r2
+ STRLO r0, [r1], #4
+ BLO LoopZI
+
+/* Call C++ constructors */
+ LDR r0, =__ctors_start__
+ LDR r1, =__ctors_end__
+ctor_loop:
+ CMP r0, r1
+ BEQ ctor_end
+ LDR r2, [r0], #4
+ STMFD sp!, {r0-r1}
+ MOV lr, pc
+ BX r2
+ LDMFD sp!, {r0-r1}
+ B ctor_loop
+ctor_end:
+
+/* Need to set up standard file handles */
+/* Only used under simulator, normally overide syscall.c */
+# BL initialise_monitor_handles
+
+/* if we use debug version of str7lib this will call the init function */
+
+ BL libdebug
+libdebug:
+
+/* Enter the C code, use B instruction so as to never return */
+/* use BL main if you want to use c++ destructors below */
+ B main
+
+/* Call destructors */
+# LDR r0, =__dtors_start__
+# LDR r1, =__dtors_end__
+dtor_loop:
+# CMP r0, r1
+# BEQ dtor_end
+# LDR r2, [r0], #4
+# STMFD sp!, {r0-r1}
+# MOV lr, pc
+# BX r2
+# LDMFD sp!, {r0-r1}
+# B dtor_loop
+dtor_end:
+
+/* Return from main, loop forever. */
+exit_loop:
+# B exit_loop
+
+/* Disable the ARM7 core IRQ line */
+ARMIRQ_Disable:
+ MRS r0, CPSR
+ ORR r0, r0, #I_Bit
+ MSR CPSR_c, r0
+ BX lr
+
+/* Disable the ARM7 core FIQ line. */
+ARMFIQ_Disable:
+ MRS r0, CPSR
+ ORR r0, r0, #F_Bit
+ MSR CPSR_c, r0
+ BX lr
+
+/* Enable the ARM7 core IRQ line. */
+ARMIRQ_Enable:
+ MRS r0, CPSR
+ BIC r0, r0,#I_Bit
+ MSR CPSR_c, r0
+ BX lr
+
+/* Enable the ARM7 core FIQ line. */
+ARMFIQ_Enable:
+ MRS r0, CPSR
+ BIC r0, r0,#F_Bit
+ MSR CPSR_c, r0
+ BX lr
+
+ .global ARMIRQ_Enable
+ .global ARMFIQ_Enable
+ .global ARMIRQ_Disable
+ .global ARMFIQ_Disable
+
+/* Fosc values, used by libstr7 */
+
+RCCU_Main_Osc: .long FOSC
+RCCU_RTC_Osc: .long FRTC
+
+ .weak libdebug
+
+ .end
Added: trunk/firmware/arm/str/cantest_str75x_gcc/project/vector.s
===================================================================
--- trunk/firmware/arm/str/cantest_str75x_gcc/project/vector.s (rev 0)
+++ trunk/firmware/arm/str/cantest_str75x_gcc/project/vector.s 2008-02-17 11:51:48 UTC (rev 843)
@@ -0,0 +1,731 @@
+/***********************************************************************************
+* Copyright 2005 Anglia Design
+* This demo code and associated components are provided as is and has no warranty,
+* implied or otherwise. You are free to use/modify any of the provided
+* code at your own risk in your applications with the expressed limitation
+* of liability (see below)
+*
+* LIMITATION OF LIABILITY: ANGLIA OR ANGLIA DESIGNS SHALL NOT BE LIABLE FOR ANY
+* LOSS OF PROFITS, LOSS OF USE, LOSS OF DATA, INTERRUPTION OF BUSINESS, NOR FOR
+* INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND WHETHER UNDER
+* THIS AGREEMENT OR OTHERWISE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+*
+* Author : Spencer Oliver
+* Web : www.anglia-designs.com
+*
+***********************************************************************************/
+
+ .equ EIC_base_addr, 0xFFFFF800 /* EIC base address. */
+ .equ CICR_off_addr, 0x04 /* Current Interrupt Channel Register. */
+ .equ IVR_off_addr, 0x18 /* Interrupt Vector Register. */
+ .equ IPR_off_addr, 0x40 /* Interrupt Pending Register. */
+
+ /* set HIRAM 1 for Interrupt Handlers reside in ram Vectors in ram uses 192 bytes
+ Vectors/Handlers uses 1452 bytes, normally 0 */
+
+.ifndef HIRAM
+ .equ HIRAM, 0
+.endif
+
+.ifndef REMAP
+ .equ REMAP, 0
+.endif
+
+ .text
+ .arm
+
+.if REMAP > 1
+ .section .vectram, "ax"
+.else
+ .section .vectrom, "ax"
+.endif
+
+ .global WAKUP_Addr
+ .global Reset_Vec
+
+/* Note: LDR PC instructions are used here, though branch (B) instructions */
+/* could also be used, unless the ROM is at an address >32MB. */
+
+/*******************************************************************************
+ Exception vectors
+*******************************************************************************/
+
+Reset_Vec: LDR pc, Reset_Addr /* Reset Handler */
+Undef_Vec: LDR pc, Undefined_Addr
+SWI_Vec: LDR pc, SWI_Addr
+PAbt_Vec: LDR pc, Prefetch_Addr
+DAbt_Vec: LDR pc, Abort_Addr
+ NOP /* Reserved vector */
+IRQ_Vec: LDR pc, IRQ_Addr
+FIQ_Vec: LDR pc, FIQ_Addr
+
+/*******************************************************************************
+ Exception handlers address table
+*******************************************************************************/
+
+Reset_Addr: .word _start
+Undefined_Addr: .word UndefinedHandler
+SWI_Addr: .word SWIHandler
+Prefetch_Addr: .word PrefetchHandler
+Abort_Addr: .word AbortHandler
+ .word 0 /* reserved */
+IRQ_Addr: .word IRQHandler
+FIQ_Addr: .word FIQHandler
+
+/*******************************************************************************
+ Peripherals IRQ handlers address table
+*******************************************************************************/
+
+WAKUP_Addr: .word WAKUPIRQHandler
+TIM2_OC2_Addr: .word TIM2_OC2IRQHandler
+TIM2_OC1_Addr: .word TIM2_OC1IRQHandler
+TIM2_IC12_Addr: .word TIM2_IC12IRQHandler
+TIM2_UP_Addr: .word TIM2_UPIRQHandler
+TIM1_OC2_Addr: .word TIM1_OC2IRQHandler
+TIM1_OC1_Addr: .word TIM1_OC1IRQHandler
+TIM1_IC12_Addr: .word TIM1_IC12IRQHandler
+TIM1_UP_Addr: .word TIM1_UPIRQHandler
+TIM0_OC2_Addr: .word TIM0_OC2IRQHandler
+TIM0_OC1_Addr: .word TIM0_OC1IRQHandler
+TIM0_IC12_Addr: .word TIM0_IC12IRQHandler
+TIM0_UP_Addr: .word TIM0_UPIRQHandler
+PWM_OC123_Addr: .word PWM_OC123IRQHandler
+PWM_EM_Addr: .word PWM_EMIRQHandler
+PWM_UP_Addr: .word PWM_UPIRQHandler
+I2C_Addr: .word I2CIRQHandler
+SSP1_Addr: .word SSP1IRQHandler
+SSP0_Addr: .word SSP0IRQHandler
+UART2_Addr: .word UART2IRQHandler
+UART1_Addr: .word UART1IRQHandler
+UART0_Addr: .word UART0IRQHandler
+CAN_Addr: .word CANIRQHandler
+US...
[truncated message content] |
|
From: <ak...@us...> - 2008-02-17 11:34:43
|
Revision: 842
http://can.svn.sourceforge.net/can/?rev=842&view=rev
Author: akhe
Date: 2008-02-17 03:34:40 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
deleted str912 code
Modified Paths:
--------------
trunk/firmware/arm/str/vscp_node_str73x_gcc/main.c
Removed Paths:
-------------
trunk/firmware/arm/str912/
Property Changed:
----------------
trunk/firmware/arm/str/cantest_str73x_gcc/
trunk/firmware/arm/str/vscp_node_str73x_gcc/
Property changes on: trunk/firmware/arm/str/cantest_str73x_gcc
___________________________________________________________________
Name: svn:ignore
- *.bin
*.elf
*.hex
*.lss
*.lst
*.map
*.sym
+ *.bin
*.elf
*.hex
*.lss
*.lst
*.map
*.sym
.dep
Property changes on: trunk/firmware/arm/str/vscp_node_str73x_gcc
___________________________________________________________________
Name: svn:ignore
- *.bin
*.elf
*.hex
*.lss
*.lst
*.map
*.sym
+ *.bin
*.elf
*.hex
*.lss
*.lst
*.map
*.sym
.dep
Modified: trunk/firmware/arm/str/vscp_node_str73x_gcc/main.c
===================================================================
--- trunk/firmware/arm/str/vscp_node_str73x_gcc/main.c 2008-02-12 21:45:21 UTC (rev 841)
+++ trunk/firmware/arm/str/vscp_node_str73x_gcc/main.c 2008-02-17 11:34:40 UTC (rev 842)
@@ -4,7 +4,7 @@
*
* IAR STR 73x demo board Module
* Version information in version.h
- * ak...@do...
+ * ak...@do...
*
* Copyright (C) 1995-2008 Ake Hedman,
* D of Scandinavia, <ak...@do...>
@@ -173,12 +173,14 @@
vscp_init(); // Initialize the VSCP functionality
+
///////////////
// Main LOOP //
///////////////
+
while ( 1 ) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|