Added trace support for LPC4357USB boards
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
31
demos/bsp/boards/microbuilder/board_lpc4357usb_etminit.ini
Normal file
31
demos/bsp/boards/microbuilder/board_lpc4357usb_etminit.ini
Normal file
@@ -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();
|
||||
}
|
||||
Reference in New Issue
Block a user