[update][freertos] update configASSERT

This commit is contained in:
jzlv 2022-10-29 16:12:59 +08:00
parent b53a02f2c9
commit 5ce60f5c3a
7 changed files with 50 additions and 17 deletions

View File

@ -108,9 +108,14 @@ to exclude the API function. */
header file. */
void vApplicationMallocFailedHook(void);
void vAssertCalled(void);
#define configASSERT(x) \
if ((x) == 0) \
vAssertCalled()
#define configASSERT(x) \
if ((x) == 0) { \
printf("file [%s]\r\n", __FILE__); \
printf("func [%s]\r\n", __FUNCTION__); \
printf("line [%d]\r\n", __LINE__); \
printf("%s\r\n", (const char *)(#x)); \
vAssertCalled(); \
}
#if (configUSE_TICKLESS_IDLE != 0)
void vApplicationSleep(uint32_t xExpectedIdleTime);

View File

@ -108,9 +108,14 @@ to exclude the API function. */
header file. */
void vApplicationMallocFailedHook(void);
void vAssertCalled(void);
#define configASSERT(x) \
if ((x) == 0) \
vAssertCalled()
#define configASSERT(x) \
if ((x) == 0) { \
printf("file [%s]\r\n", __FILE__); \
printf("func [%s]\r\n", __FUNCTION__); \
printf("line [%d]\r\n", __LINE__); \
printf("%s\r\n", (const char *)(#x)); \
vAssertCalled(); \
}
#if (configUSE_TICKLESS_IDLE != 0)
void vApplicationSleep(uint32_t xExpectedIdleTime);

View File

@ -108,9 +108,14 @@ to exclude the API function. */
header file. */
void vApplicationMallocFailedHook(void);
void vAssertCalled(void);
#define configASSERT(x) \
if ((x) == 0) \
vAssertCalled()
#define configASSERT(x) \
if ((x) == 0) { \
printf("file [%s]\r\n", __FILE__); \
printf("func [%s]\r\n", __FUNCTION__); \
printf("line [%d]\r\n", __LINE__); \
printf("%s\r\n", (const char *)(#x)); \
vAssertCalled(); \
}
#if (configUSE_TICKLESS_IDLE != 0)
void vApplicationSleep(uint32_t xExpectedIdleTime);

View File

@ -165,7 +165,7 @@ static void tcp_client_socket_test(void)
printf("write falied!\r\n");
break;
}
arch_delay_us(100);
bflb_mtimer_delay_us(100);
total_cnt += sizeof(send_buf);
}
printf("Total send data=0x%08lx%08lx\r\n",

View File

@ -226,6 +226,15 @@ static void tcp_server_socket_thread(void *arg)
int sock, newconn, size;
struct sockaddr_in address, remotehost;
tmpnetif = netif_find("bl");
#if LWIP_DHCP
while (tmpnetif->state != 3) {
printf("wait DHCP get ip...\r\n");
vTaskDelay(1000);
}
#endif
printf("TCP Server create socket\r\n");
/* create a TCP socket */
@ -246,7 +255,6 @@ static void tcp_server_socket_thread(void *arg)
/* listen for incoming connections (TCP listen backlog = 5) */
listen(sock, 5);
tmpnetif = netif_find("bl");
sprintf((char *)iptxt, "%s", ip4addr_ntoa(&tmpnetif->ip_addr));
printf("Create server success, server ip & listen port:%s:%d\r\n", iptxt, TCP_SERVER_TEST_PORT);

View File

@ -108,9 +108,14 @@ to exclude the API function. */
header file. */
void vApplicationMallocFailedHook(void);
void vAssertCalled(void);
#define configASSERT(x) \
if ((x) == 0) \
vAssertCalled()
#define configASSERT(x) \
if ((x) == 0) { \
printf("file [%s]\r\n", __FILE__); \
printf("func [%s]\r\n", __FUNCTION__); \
printf("line [%d]\r\n", __LINE__); \
printf("%s\r\n", (const char *)(#x)); \
vAssertCalled(); \
}
#if (configUSE_TICKLESS_IDLE != 0)
void vApplicationSleep(uint32_t xExpectedIdleTime);

View File

@ -108,9 +108,14 @@ to exclude the API function. */
header file. */
void vApplicationMallocFailedHook(void);
void vAssertCalled(void);
#define configASSERT(x) \
if ((x) == 0) \
vAssertCalled()
#define configASSERT(x) \
if ((x) == 0) { \
printf("file [%s]\r\n", __FILE__); \
printf("func [%s]\r\n", __FUNCTION__); \
printf("line [%d]\r\n", __LINE__); \
printf("%s\r\n", (const char *)(#x)); \
vAssertCalled(); \
}
#if (configUSE_TICKLESS_IDLE != 0)
void vApplicationSleep(uint32_t xExpectedIdleTime);