add WDT, new console, ...

This commit is contained in:
pvvx 2017-02-28 10:39:37 +03:00
parent e851661fa4
commit de57c04fb4
21 changed files with 3158 additions and 2639 deletions

View file

@ -624,6 +624,7 @@ SECTIONS
rom_wps_rcons = 0x35d88;
rom_wps_Td4s = 0x35d94;
rom_wps_Td0 = 0x35e94;
str_rom_hex_addr = 0x442D6;
__rom_b_cut_end__ = 0x4467c;
__rom_c_cut_text_start__ = 0x4467c;
HalInitPlatformLogUartV02 = 0x4467d;

View file

@ -150,7 +150,13 @@ SECTIONS
LONG(__sdram_heap_end__ - __sdram_heap_start__)
LONG(0)
LONG(0)
UartLogRamCmdTable = .;
KEEP(*(SORT(.mon.tab*)))
UartLogRamCmdTable_end = .;
LONG(0)
} > BD_RAM
PROVIDE(UartLogRamCmdTableSize = UartLogRamCmdTable_end - UartLogRamCmdTable);
.ram.data :
{

View file

@ -230,7 +230,7 @@ RtlConsolInitRam(
pUartLogCtl->TaskRdy = 0;
#ifdef PLATFORM_FREERTOS
#define LOGUART_STACK_SIZE 200 //USE_MIN_STACK_SIZE modify from 512 to 128
#if CONFIG_USE_TCM_HEAP
#if 0 //CONFIG_USE_TCM_HEAP
{
int ret = 0;
void *stack_addr = tcm_heap_malloc(LOGUART_STACK_SIZE*sizeof(int));
@ -249,13 +249,13 @@ RtlConsolInitRam(
NULL);
if (pdTRUE != ret)
{
DiagPrintf("Create Log UART Task Err!!\n");
DiagPrintf("Create Log UART Task Err!\n");
}
}
#else
if (pdTRUE != xTaskCreate( RtlConsolTaskRam, (const signed char * const)"log_uart", LOGUART_STACK_SIZE, NULL, tskIDLE_PRIORITY + 5 + PRIORITIE_OFFSET, NULL))
{
DiagPrintf("Create Log UART Task Err!!\n");
DiagPrintf("Create Log UART Task Err!\n");
}
#endif
@ -312,6 +312,10 @@ RtlConsolTaskRam(
{
#if SUPPORT_LOG_SERVICE
log_service_init();
#else
#ifdef CONFIG_AT_USR
at_user_init();
#endif
#endif
//4 Set this for UartLog check cmd history
#ifdef CONFIG_KERNEL

View file

@ -29,17 +29,16 @@
#define UART_LOG_CMD_BUFLEN 127
#define MAX_ARGV 10
extern COMMAND_TABLE UartLogRomCmdTable[6]; // in ROM (hal_diag.h)
typedef u32 (*ECHOFUNC)(IN u8*,...); //UART LOG echo-function type.
typedef struct _UART_LOG_BUF_ {
u8 BufCount; //record the input cmd char number.
u8 BufCount; //record the input cmd char number.
u8 UARTLogBuf[UART_LOG_CMD_BUFLEN]; //record the input command.
} UART_LOG_BUF, *PUART_LOG_BUF;
typedef struct _UART_LOG_CTL_ {
u8 NewIdx; //+0x00
u8 SeeIdx; //+0x01
@ -49,19 +48,17 @@ typedef struct _UART_LOG_CTL_ {
u8 ExecuteEsc; //+0x05
u8 BootRdy; //+0x06
u8 Resvd; //+0x07
PUART_LOG_BUF pTmpLogBuf;
VOID *pfINPUT;
PCOMMAND_TABLE pCmdTbl;
u32 CmdTblSz;
PUART_LOG_BUF pTmpLogBuf; //+0x08 = UartLogBuf
VOID *pfINPUT; //+0x0C = DiagPrintf
PCOMMAND_TABLE pCmdTbl; //+0x10
u32 CmdTblSz; //+0x14
#ifdef CONFIG_UART_LOG_HISTORY
u32 CRSTS;
#endif
#ifdef CONFIG_UART_LOG_HISTORY
u8 (*pHistoryBuf)[UART_LOG_CMD_BUFLEN];
u32 CRSTS; //+0x18
u8 (*pHistoryBuf)[UART_LOG_CMD_BUFLEN]; //+0x1C UartLogHistoryBuf[UART_LOG_HISTORY_LEN][UART_LOG_CMD_BUFLEN]
#endif
#ifdef CONFIG_KERNEL
u32 TaskRdy;
_Sema Sema;
u32 TaskRdy; //+0x20
_Sema Sema; //+0x24
#else
// Since ROM code will reference this typedef, so keep the typedef same size
u32 TaskRdy;
@ -128,6 +125,8 @@ Strtoul(
IN u32 base
);
_LONG_CALL_ extern VOID UartLogIrqHandle(VOID * Data); // in ROM
void console_init(void);
extern _LONG_CALL_ROM_ int GetArgc(const u8 *string);