Multiple Console Dynamic/ Multiple Uart Dynamic Example?
First off: thanks to everyone for the support on the Harmony roll out!
Second: For those crying about harmony documentation:
Help Microchip support us. We are all on same team and want to get product out there and make money. I would prefer new/beta code and new(and more) code examples are released ASAP and that people understand that this is work in progress so we can all get to working together sooner.
I would love a video of microchip showing us how the Console System Service and related Library is built out from current fixed DRV_USART_INDEX_0 version to the first dynamic version. Lots of voice over and discussion. This would be great so that we can understand what your developers thought processes are and be able to contribute or work with betas and provide support feedback. Luc's "Creating a TCP/IP Project from Scratch" was GREAT!
PIC32MZ2048EFM144 w PHY_8740a on EF starter kit with off board TTL to RS232 ICs and 2221 bridge disabled.
This thread is about the Console System Service Library and DYNAMIC implementation with multiple Consoles and UARTS.
(see System Service Libraries.pdf v1.06
Console Service Software Abstraction Block Diagram)
I am trying to instantiate multiple Console System Services.
(2) System Console Cores
(2) Command Processors
(1) File System
(1) Debug service
Application 1 uses Usart 1 and supports command processing of commands coming from Usart 1RX and responds on Usart 1TX. Usart 1 also contains debug data output.
Application 2 uses Usart 2 and supports INDEPENDENT command processing and response.
(Thus, I am looking for (2) or more Consoles that function independantly)
I will gladly provide testing on this if Microchip or anyone else is working on it. I do not understand Harmony architecture and Objective C/C++ enough to jump into developing Harmony: But I am willing to learn and try to support Microchip with some help.
Can we(users and/or Microchip) modify "void Console_UART_Tasks (SYS_MODULE_OBJ object)" to support this?
When will the dynamic version of CONSOLE and related system services be available for beta?
Harmony documentation implies CONSOLE SERVICE will be DYNAMIC ...but the 1.06 implementation is hard coded to DRV_USART_INDEX_0:
/* Open the device layer */
consUartData.deviceHandle = DRV_USART_Open(DRV_USART_INDEX_0,
(DRV_IO_INTENT_READWRITE | DRV_IO_INTENT_NONBLOCKING));
SYS_MODULE_OBJ object is passed to Console_UART_Tasks Correct?
For those asking about my system_init.c:
sysObj.drvUsart0 = DRV_USART_Initialize(DRV_USART_INDEX_0, (SYS_MODULE_INIT *)&drvUsart0InitData);
sysObj.drvUsart1 = DRV_USART_Initialize(DRV_USART_INDEX_1, (SYS_MODULE_INIT *)&drvUsart1InitData);
/* Initialize System Services */
sysObj.sysConsole0 = SYS_CONSOLE_Initialize(SYS_CONSOLE_INDEX_0, (SYS_MODULE_INIT *)&consUsartInit0);
sysObj.sysConsole1 = SYS_CONSOLE_Initialize(SYS_CONSOLE_INDEX_1, (SYS_MODULE_INIT *)&consUsartInit1);
sysObj.sysDebug = SYS_DEBUG_Initialize(SYS_DEBUG_INDEX_0, (SYS_MODULE_INIT*)&debugInit);
I currently have a project running but all SYS_CONSOLE_PRINT are now duplicates on same UART.
Comments seem to indicate multiple console dynamic implementation is coming
since the handle is passed to do that.
sys_command.c line 836
// ignore the console handle for now, we support a single system console
static void SendCommandMessage(const void* cmdIoParam, const char* message)
int consoleIndex = 0;
for (consoleIndex = 0; consoleIndex < SYS_CONSOLE_DEVICE_MAX_INSTANCES; ++consoleIndex)
SYS_CONSOLE_Write(consoleIndex, STDOUT_FILENO, message, strlen(message));
post edited by bob3er4 - 2015/10/15 11:25:17