Hi
I would like to have the debug console put on USART1, and a true shell put on USART6. This way we can have debug messages printed over a clean port, and then have customers interact with the shell as a backup to setting information over the network/usb.
However, whenever I go to initialize the shell, the code asserts during
shell_status_t SHELL_Init(shell_handle_t shellHandle, serial_handle_t serialHandle, char *prompt)`
Specifically, it asserts after
status = SerialManager_OpenReadHandle(shellContextHandle->serialHandle, shellContextHandle->serialReadHandle);
assert(kStatus_SerialManager_Success == status);
status here is "kStatus_SerialManager_Busy"
I have tried this with both non-blocking transfers as well as blocking transfers.
Here is my side of the init code
s_shellHandle = &s_shellHandleBuffer[0];
char * stringthingy = new char[16]; // should be enough for "shell@12345 #\0"
// this is what will be printed before
// the prompt
// like user@computer $ or user@computer#
// we will make it shell@serialNum #
sprintf(stringthingy, "shell@%05u #", (unsigned int)GlobalHardware->GetHWInfo().hardwareSerialNum);
SHELL_Init(s_shellHandle, g_serialHandle, stringthingy);
// never gets beyone here
SHELL_RegisterCommand(s_shellHandle, SHELL_COMMAND(viewEthernet));
SHELL_RegisterCommand(s_shellHandle, SHELL_COMMAND(viewSoftware));
SHELL_RegisterCommand(s_shellHandle, SHELL_COMMAND(viewHardware));
SHELL_RegisterCommand(s_shellHandle, SHELL_COMMAND(setHardware));
SHELL_RegisterCommand(s_shellHandle, SHELL_COMMAND(setEthernet));
//SHELL_Task(s_shellHandle);
}
Here is the defines I pass in (as previously stated, have also tried with DEBUG_CONSOLE_TRANSFER_NON_BLOCKING)
I guess my biggest question is how do I tell the shell to print to USART6 instead of usart1?
Hi @GUnderdown ,
I have tried with the similar code on my board, but it works well.
I tested it based on the Shell demo with RT1024EVK, and debug console on semihost. Have you tried with the same ?
Have a great day,
Kan
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------