summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f994d59)
raw | patch | inline | side by side (parent: f994d59)
author | Tinku Mannan <tmannan@ti.com> | |
Fri, 12 Jul 2019 19:50:48 +0000 (15:50 -0400) | ||
committer | Tinku Mannan <tmannan@ti.com> | |
Mon, 22 Jul 2019 17:17:57 +0000 (13:17 -0400) |
register trace callback with emac driver
update configuration files re-direct system output to UART
unit test fixes.
Signed-off-by: Tinku Mannan <tmannan@ti.com>
update configuration files re-direct system output to UART
unit test fixes.
Signed-off-by: Tinku Mannan <tmannan@ti.com>
diff --git a/emac_drv.h b/emac_drv.h
index 2f7fad6ba39b7870c939744bf57beafd81f7d5fc..b1a199819f32f39a584e832e5f937625b6dc7401 100644 (file)
--- a/emac_drv.h
+++ b/emac_drv.h
EMAC_DRV_RESULT_ERR_INVALID_PHY_ADDR = (-(int32_t)19),
/**< Invalid phy address specified */
EMAC_DRV_RESULT_ERR_UDMA_TX_CHAN_SETUP = (-(int32_t)20),
- /**< Error in settting up UDMA tx channel */
+ /**< Error in settting up UDMA TX channel */
EMAC_DRV_RESULT_ERR_UDMA_RX_CHAN_SETUP = (-(int32_t)21),
- /**< Error in settting up UDMA tx channel */
+ /**< Error in settting up UDMA RX channel */
EMAC_DRV_RESULT_ERR_UDMA_FLOW_SETUP = (-(int32_t)22),
/**< Error in settting up UDMA flow */
EMAC_DRV_RESULT_ERR_INVALID_CHANNEL = (-(int32_t)23),
diff --git a/test/EmacLoopbackTest/am65xx/emacUnitTest_a53.cfg b/test/EmacLoopbackTest/am65xx/emacUnitTest_a53.cfg
index a4dacbcf2bdc56de249b6c544a6aee6f3d89e842..78c2cab2a46618c6777ee089e588a1579347a872 100644 (file)
var BIOS = xdc.useModule('ti.sysbios.BIOS');
var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
-var SysMin = xdc.useModule('xdc.runtime.SysMin');
var Load = xdc.useModule('ti.sysbios.utils.Load');
/*
var Cache = xdc.module("ti.sysbios.hal.Cache");
-/*
- * Direct CIO to UART
- */
-/* System.SupportProxy = SysUart; */
+var SysMin = xdc.useModule('xdc.runtime.SysMin');
System.SupportProxy = SysMin;
+SysMin.outputFxn = "&UART_printf";
/*
* Program.argSize sets the size of the .args section.
diff --git a/test/EmacLoopbackTest/am65xx/emacUnitTest_r5.cfg b/test/EmacLoopbackTest/am65xx/emacUnitTest_r5.cfg
index 57aa8c3f2cd4519bb78879b1a748f4445726bf0f..31cfbdf3efac61722195c1c942b9e8135a16827a 100644 (file)
var BIOS = xdc.useModule('ti.sysbios.BIOS');
var Hwi = xdc.useModule('ti.sysbios.family.arm.v7r.keystone3.Hwi');
var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
-var SysMin = xdc.useModule('xdc.runtime.SysMin');
-
/* Enable cache */
var Cache = xdc.useModule('ti.sysbios.family.arm.v7r.Cache');
* Direct CIO to UART
*/
/* System.SupportProxy = SysUart; */
+var SysMin = xdc.useModule('xdc.runtime.SysMin');
System.SupportProxy = SysMin;
+SysMin.outputFxn = "&UART_printf";
/*
* Program.argSize sets the size of the .args section.
diff --git a/test/EmacLoopbackTest/test_utils_switch_k3.c b/test/EmacLoopbackTest/test_utils_switch_k3.c
index 2e98a8ff61db4a0b96161a726cd6cbba7d674501..785e0b4f7260a4052ebc015112607ec4239e709a 100644 (file)
@@ -279,7 +279,7 @@ int32_t app_test_send_receive(uint32_t startP, uint32_t endP, uint32_t displayRe
**********************************************************************/
-#define APP_TEST_PKT_SEND_COUNT 16
+#define APP_TEST_PKT_SEND_COUNT 16
#define APP_TEST_MIN_PKT_SEND_SIZE 60
#define APP_TEST_MAX_PKT_SEND_SIZE 1500
UART_printf("app_test_fdb_ioctl IOCTL: END\n");
}
-
-
-
-
-
-
-
void app_test_vlan_config_host_port(void)
{
EMAC_IOCTL_PARAMS params;
memcpy(&vlanEntry.vlanFidPrams, &vlanParams, sizeof(EMAC_IOCTL_VLAN_FID_PARAMS));
vlanEntry.vlanId = vlan_id_host_port;
- emac_ioctl(EMAC_SWITCH_PORT,EMAC_IOCTL_VLAN_CTRL,¶ms);
+ emac_ioctl(EMAC_SWITCH_PORT0,EMAC_IOCTL_VLAN_CTRL,¶ms);
}
void app_test_add_vlan_tlb_entries(void)
@@ -1208,6 +1201,21 @@ void app_test_ts_response_cb(uint32_t port_num, uint32_t ts_id, uint64_t ts, boo
timestamp_received = 1;
}
+void app_test_trace_cb(uint8_t traceLevel, const char* traceString, ...)
+{
+ if (traceLevel <= UTIL_TRACE_LEVEL_ERR)
+ {
+ System_flush();
+ VaList arg_ptr;
+ /* print the format string */
+ va_start(arg_ptr, traceString);
+ System_vprintf(traceString, arg_ptr);
+ va_end(arg_ptr);
+ /* append newline */
+ System_printf("\n");
+ System_flush();
+ }
+}
void app_test_task_poll_pkt (UArg arg0, UArg arg1)
{
uint32_t port = (uint32_t) arg0;
@@ -1296,7 +1304,7 @@ int32_t app_test_send(uint32_t port_num, uint8_t* pPkt, uint32_t pktChannel, uin
p_pkt_desc->PktFrags = 1;
p_pkt_desc->pNext = NULL;
p_pkt_desc->pPrev = NULL;
- p_pkt_desc->PktChannel = pktChannel;
+ p_pkt_desc->PktChannel = i % 4;
p_pkt_desc->PktLength = pktSize;
if (testPktClone == 0)
app_open_cfg.rx_pkt_cb = app_test_rx_pkt_cb;
app_open_cfg.rx_mgmt_response_cb = app_test_rx_mgmt_response_cb;
app_open_cfg.tx_ts_cb = app_test_ts_response_cb;
+ app_open_cfg.drv_trace_cb = app_test_trace_cb;
app_open_cfg.loop_back = 0U;
app_open_cfg.num_of_rx_pkt_desc = 8;
app_open_cfg.num_of_tx_pkt_desc = 8;