summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Townsend <[email protected]>2013-09-10 09:09:22 +0200
committerKevin Townsend <[email protected]>2013-09-10 09:09:22 +0200
commit3e54ab7c9ed2cc3020edbb89963646f7f715480b (patch)
tree4b185882045200f63a1901f457c3ec71edc5abaf
parent2d021e07287cbfaa52e61d1c7e2827667c08feab (diff)
Added trace support for LPC4357USB boards
-rw-r--r--demos/bsp/boards/microbuilder/board_lpc4357usb.h3
-rw-r--r--demos/bsp/boards/microbuilder/board_lpc4357usb_etminit.ini31
-rw-r--r--demos/host/host_os_none/host_os_none.uvopt107
-rw-r--r--demos/host/host_os_none/host_os_none.uvproj2
4 files changed, 105 insertions, 38 deletions
diff --git a/demos/bsp/boards/microbuilder/board_lpc4357usb.h b/demos/bsp/boards/microbuilder/board_lpc4357usb.h
index 9a67d4a00..96d535c7c 100644
--- a/demos/bsp/boards/microbuilder/board_lpc4357usb.h
+++ b/demos/bsp/boards/microbuilder/board_lpc4357usb.h
@@ -63,7 +63,8 @@
#include "lpc43xx_uart.h"
#include "lpc43xx_i2c.h"
-#define CFG_PRINTF_TARGET PRINTF_TARGET_UART
+#define CFG_PRINTF_TARGET PRINTF_TARGET_SWO
+//#define CFG_PRINTF_TARGET PRINTF_TARGET_UART
#ifdef __cplusplus
}
diff --git a/demos/bsp/boards/microbuilder/board_lpc4357usb_etminit.ini b/demos/bsp/boards/microbuilder/board_lpc4357usb_etminit.ini
new file mode 100644
index 000000000..67aed412e
--- /dev/null
+++ b/demos/bsp/boards/microbuilder/board_lpc4357usb_etminit.ini
@@ -0,0 +1,31 @@
+/*-------------------------------------------------------------------
+** Define the function to enable the trace port
+**-----------------------------------------------------------------*/
+FUNC void EnableTPIU(void) {
+
+ /* Configure TRACE pins for MCB4357 */
+ //_WDWORD(0x40086790, 0x000000B2); // LPC_SCU->SFSPF_4 = 2;
+ //_WDWORD(0x40086794, 0x000000B3); // LPC_SCU->SFSPF_5 = 3;
+ //_WDWORD(0x40086798, 0x000000B3); // LPC_SCU->SFSPF_6 = 3;
+ //_WDWORD(0x4008679C, 0x000000B3); // LPC_SCU->SFSPF_7 = 3;
+ //_WDWORD(0x400867A0, 0x000000B3); // LPC_SCU->SFSPF_8 = 3;
+
+ /* Configure TRACE pins for LPC4357USB */
+ _WDWORD(0x40086790, 0x000000B2); // LPC_SCU->SFSPF_4 = 2 - TRACECLK
+ _WDWORD(0x40086390, 0x000000B5); // LPC_SCU->SFSP7_4 = 5 - TRACEDATA[0]
+ _WDWORD(0x40086394, 0x000000B5); // LPC_SCU->SFSP7_5 = 5 - TRACEDATA[1]
+ _WDWORD(0x40086398, 0x000000B5); // LPC_SCU->SFSP7_6 = 5 - TRACEDATA[2]
+ _WDWORD(0x4008639C, 0x000000B5); // LPC_SCU->SFSP7_7 = 5 - TRACEDATA[3]
+}
+
+/*-------------------------------------------------------------------
+** Invoke the function at debugger startup
+**-----------------------------------------------------------------*/
+EnableTPIU();
+
+/*-------------------------------------------------------------------
+** Execute upon software RESET
+**-----------------------------------------------------------------*/
+FUNC void OnResetExec(void) {
+ EnableTPIU();
+}
diff --git a/demos/host/host_os_none/host_os_none.uvopt b/demos/host/host_os_none/host_os_none.uvopt
index 802b17479..4610f2250 100644
--- a/demos/host/host_os_none/host_os_none.uvopt
+++ b/demos/host/host_os_none/host_os_none.uvopt
@@ -73,7 +73,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
- <IsCurrentTarget>1</IsCurrentTarget>
+ <IsCurrentTarget>0</IsCurrentTarget>
</OPTFL>
<CpuCode>8</CpuCode>
<Books>
@@ -145,11 +145,12 @@
<SetRegEntry>
<Number>0</Number>
<Key>DLGUARM</Key>
+ <Name></Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>JL2CM3</Key>
- <Name>-U268003250 -O1006 -S8 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO19 -TC72000000 -TP21 -TDS800B -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB5 -TFE0 -FO15 -FD10000000 -FC800 -FN2 -FF0LPC18xx43xx_512_BA -FS01A000000 -FL080000 -FF1LPC18xx43xx_512_BB -FS11B000000 -FL180000</Name>
+ <Name>-U268003250 -O1006 -S8 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8004 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD10000000 -FC800 -FN2 -FF0LPC18xx43xx_512_BA -FS01A000000 -FL080000 -FF1LPC18xx43xx_512_BB -FS11B000000 -FL180000</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
@@ -157,7 +158,24 @@
<Name>-O975 -S0 -C0 -FO7 -FD10000000 -FC800 -FN2 -FF0LPC18xx43xx_512_BA -FS01A000000 -FL080000 -FF1LPC18xx43xx_512_BB -FS11B000000 -FL180000)</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
- <Breakpoint/>
+ <Breakpoint>
+ <Bp>
+ <Number>0</Number>
+ <Type>0</Type>
+ <LineNumber>76</LineNumber>
+ <EnabledFlag>1</EnabledFlag>
+ <Address>0</Address>
+ <ByteObject>0</ByteObject>
+ <HtxType>0</HtxType>
+ <ManyObjects>0</ManyObjects>
+ <SizeOfObject>0</SizeOfObject>
+ <BreakByAccess>0</BreakByAccess>
+ <BreakIfRCount>0</BreakIfRCount>
+ <Filename>D:\Shared\Dropbox\microBuilder\Code\LPC4300\tinyusb\demos\host\src\keyboard_app.c</Filename>
+ <ExecCommand></ExecCommand>
+ <Expression></Expression>
+ </Bp>
+ </Breakpoint>
<WatchWindow1>
<Ww>
<count>0</count>
@@ -185,7 +203,7 @@
<aLa>0</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
- <aSer4>1</aSer4>
+ <aSer4>0</aSer4>
<StkLoc>0</StkLoc>
<TrcWin>0</TrcWin>
<newCpu>0</newCpu>
@@ -252,7 +270,7 @@
<OPTFL>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
- <IsCurrentTarget>0</IsCurrentTarget>
+ <IsCurrentTarget>1</IsCurrentTarget>
</OPTFL>
<CpuCode>8</CpuCode>
<Books>
@@ -307,7 +325,7 @@
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
- <tIfile></tIfile>
+ <tIfile>..\..\bsp\boards\microbuilder\board_lpc4357usb_etminit.ini</tIfile>
<pMon>Segger\JL2CM3.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
@@ -324,12 +342,12 @@
<SetRegEntry>
<Number>0</Number>
<Key>DLGUARM</Key>
- <Name></Name>
+ <Name>Á</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>JL2CM3</Key>
- <Name>-U268003250 -O1006 -S8 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8004 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD10000000 -FC800 -FN2 -FF0LPC18xx43xx_512_BA -FS01A000000 -FL080000 -FF1LPC18xx43xx_512_BB -FS11B000000 -FL180000</Name>
+ <Name>-U203200341 -O1006 -S8 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO12307 -TC72000000 -TP8 -TDS8004 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD10000000 -FC800 -FN2 -FF0LPC18xx43xx_512_BA -FS01A000000 -FL080000 -FF1LPC18xx43xx_512_BB -FS11B000000 -FL180000</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
@@ -337,7 +355,24 @@
<Name>-O975 -S0 -C0 -FO7 -FD10000000 -FC800 -FN2 -FF0LPC18xx43xx_512_BA -FS01A000000 -FL080000 -FF1LPC18xx43xx_512_BB -FS11B000000 -FL180000)</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
- <Breakpoint/>
+ <Breakpoint>
+ <Bp>
+ <Number>0</Number>
+ <Type>0</Type>
+ <LineNumber>76</LineNumber>
+ <EnabledFlag>1</EnabledFlag>
+ <Address>0</Address>
+ <ByteObject>0</ByteObject>
+ <HtxType>0</HtxType>
+ <ManyObjects>0</ManyObjects>
+ <SizeOfObject>0</SizeOfObject>
+ <BreakByAccess>0</BreakByAccess>
+ <BreakIfRCount>0</BreakIfRCount>
+ <Filename>D:\Shared\Dropbox\microBuilder\Code\LPC4300\tinyusb\demos\host\src\keyboard_app.c</Filename>
+ <ExecCommand></ExecCommand>
+ <Expression></Expression>
+ </Bp>
+ </Breakpoint>
<WatchWindow1>
<Ww>
<count>0</count>
@@ -365,7 +400,7 @@
<aLa>0</aLa>
<aPa1>0</aPa1>
<AscS4>0</AscS4>
- <aSer4>0</aSer4>
+ <aSer4>1</aSer4>
<StkLoc>0</StkLoc>
<TrcWin>0</TrcWin>
<newCpu>0</newCpu>
@@ -381,7 +416,7 @@
<Group>
<GroupName>app</GroupName>
- <tvExp>0</tvExp>
+ <tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
@@ -391,9 +426,9 @@
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
- <ColumnNumber>65</ColumnNumber>
+ <ColumnNumber>36</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
- <TopLine>10</TopLine>
+ <TopLine>152</TopLine>
<CurrentLine>16</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\src\main.c</PathWithFileName>
@@ -409,8 +444,8 @@
<Focus>0</Focus>
<ColumnNumber>24</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
- <TopLine>0</TopLine>
- <CurrentLine>0</CurrentLine>
+ <TopLine>41</TopLine>
+ <CurrentLine>42</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\src\cdc_serial_app.c</PathWithFileName>
<FilenameWithoutPath>cdc_serial_app.c</FilenameWithoutPath>
@@ -423,10 +458,10 @@
<FileType>1</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
- <ColumnNumber>20</ColumnNumber>
+ <ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
- <TopLine>0</TopLine>
- <CurrentLine>0</CurrentLine>
+ <TopLine>56</TopLine>
+ <CurrentLine>76</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\src\keyboard_app.c</PathWithFileName>
<FilenameWithoutPath>keyboard_app.c</FilenameWithoutPath>
@@ -457,8 +492,8 @@
<Focus>0</Focus>
<ColumnNumber>12</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
- <TopLine>0</TopLine>
- <CurrentLine>0</CurrentLine>
+ <TopLine>2</TopLine>
+ <CurrentLine>10</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\src\rndis_app.c</PathWithFileName>
<FilenameWithoutPath>rndis_app.c</FilenameWithoutPath>
@@ -469,7 +504,7 @@
<Group>
<GroupName>boards</GroupName>
- <tvExp>0</tvExp>
+ <tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
@@ -529,8 +564,8 @@
<Focus>0</Focus>
<ColumnNumber>61</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
- <TopLine>0</TopLine>
- <CurrentLine>0</CurrentLine>
+ <TopLine>1</TopLine>
+ <CurrentLine>6</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\bsp\boards\embedded_artists\oem_base_board\pca9532.c</PathWithFileName>
<FilenameWithoutPath>pca9532.c</FilenameWithoutPath>
@@ -637,7 +672,7 @@
<Group>
<GroupName>tinyusb</GroupName>
- <tvExp>1</tvExp>
+ <tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
@@ -649,8 +684,8 @@
<Focus>0</Focus>
<ColumnNumber>1</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
- <TopLine>0</TopLine>
- <CurrentLine>0</CurrentLine>
+ <TopLine>58</TopLine>
+ <CurrentLine>69</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\tinyusb\tusb.c</PathWithFileName>
<FilenameWithoutPath>tusb.c</FilenameWithoutPath>
@@ -713,8 +748,8 @@
<Focus>0</Focus>
<ColumnNumber>1</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
- <TopLine>0</TopLine>
- <CurrentLine>0</CurrentLine>
+ <TopLine>325</TopLine>
+ <CurrentLine>329</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\tinyusb\host\usbh.c</PathWithFileName>
<FilenameWithoutPath>usbh.c</FilenameWithoutPath>
@@ -841,8 +876,8 @@
<Focus>0</Focus>
<ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
- <TopLine>0</TopLine>
- <CurrentLine>0</CurrentLine>
+ <TopLine>206</TopLine>
+ <CurrentLine>214</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\tinyusb\class\cdc_host.c</PathWithFileName>
<FilenameWithoutPath>cdc_host.c</FilenameWithoutPath>
@@ -857,8 +892,8 @@
<Focus>0</Focus>
<ColumnNumber>39</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
- <TopLine>0</TopLine>
- <CurrentLine>0</CurrentLine>
+ <TopLine>37</TopLine>
+ <CurrentLine>41</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\..\tinyusb\class\cdc_rndis_host.c</PathWithFileName>
<FilenameWithoutPath>cdc_rndis_host.c</FilenameWithoutPath>
@@ -885,7 +920,7 @@
<Group>
<GroupName>cmsis</GroupName>
- <tvExp>0</tvExp>
+ <tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
@@ -999,10 +1034,10 @@
<FileType>2</FileType>
<tvExp>0</tvExp>
<Focus>0</Focus>
- <ColumnNumber>5</ColumnNumber>
+ <ColumnNumber>0</ColumnNumber>
<tvExpOptDlg>0</tvExpOptDlg>
- <TopLine>0</TopLine>
- <CurrentLine>0</CurrentLine>
+ <TopLine>142</TopLine>
+ <CurrentLine>151</CurrentLine>
<bDave2>0</bDave2>
<PathWithFileName>..\..\bsp\lpc43xx\startup_keil\startup_LPC43xx.s</PathWithFileName>
<FilenameWithoutPath>startup_LPC43xx.s</FilenameWithoutPath>
diff --git a/demos/host/host_os_none/host_os_none.uvproj b/demos/host/host_os_none/host_os_none.uvproj
index 4decc7e5a..20701be13 100644
--- a/demos/host/host_os_none/host_os_none.uvproj
+++ b/demos/host/host_os_none/host_os_none.uvproj
@@ -746,7 +746,7 @@
<CpuDllArguments></CpuDllArguments>
<PeripheralDll></PeripheralDll>
<PeripheralDllArguments></PeripheralDllArguments>
- <InitializationFile></InitializationFile>
+ <InitializationFile>..\..\bsp\boards\microbuilder\board_lpc4357usb_etminit.ini</InitializationFile>
<Driver>Segger\JL2CM3.dll</Driver>
</TargetDlls>
</DebugOption>