• AVR Freaks

Hot![HARMONY V3] Command processor component for PIC32MK family

Author
gvitor
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2012/05/31 09:31:02
  • Location: 0
  • Status: offline
2020/07/02 08:00:41 (permalink)
0

[HARMONY V3] Command processor component for PIC32MK family

Hello,
 
I'm new on Harmony V3 (no previous experience with Harmony). I'm trying to use the Command Processor on PIC32MK family and it doesn't work: compilation is okay but no prompt ">" on my terminal. I started digging the implementation and although "SYS_CMD_Tasks" is called in a loop it never enters into RunCmdTask(pCmdIO).
 
I observed that SYS_CMDIO_ADD is the only part of code that adds new commands into cmdIODevList and this function is called only on initialization - I believe I'm missing something. Anybody having similar experience or knowledge on its implementation? It should be simple and straightforward since the basic console/command processor (help, quit, reset) is implemented by default. Any example would be helpful as well.
 
Thank you!
 
#1
rainad
Moderator
  • Total Posts : 1387
  • Reward points : 0
  • Joined: 2009/05/01 13:39:25
  • Location: 0
  • Status: offline
Re: [HARMONY V3] Command processor component for PIC32MK family 2020/07/02 09:02:35 (permalink)
5 (1)
If SYS_CMD_Tasks() gets executed, then this one calls RunCmdTask() when traverses the list cmdIODevList.
This should not be empty, as it is populated at initialization time: set a breakpoint in 
SYS_CMD_Initialize::SYS_CMDIO_ADD(&sysConsoleApi,...).
Check that this call does not fail - project has enough heap space.
 
The RunCmdTask() waits for an incoming character.
If you get here, check that pressing a key results in RunCmdTask() detecting it.
 
#2
gvitor
New Member
  • Total Posts : 7
  • Reward points : 0
  • Joined: 2012/05/31 09:31:02
  • Location: 0
  • Status: offline
Re: [HARMONY V3] Command processor component for PIC32MK family 2020/07/04 16:43:15 (permalink)
0
Thanks Rainad for your suggestion. Indeed it works when HEAP is greater than 512B. I was wonder why this component consumes that much HEAP memory but I didn't have time yet to dig the code and investigate. At least it is working. PS: would be good to have some note somewhere into the docs for this component since Harmony by default puts HEAP at 512 and just creating a simple programming using UART, CONSOLE and COMMAND demands more than this.
 
Thank you
#3
rainad
Moderator
  • Total Posts : 1387
  • Reward points : 0
  • Joined: 2009/05/01 13:39:25
  • Location: 0
  • Status: offline
Re: [HARMONY V3] Command processor component for PIC32MK family 2020/07/06 06:09:29 (permalink)
0
I agree, 512 bytes of heap is way too small for any project actually using dynamic memory. I'll make a note/request to increase the default value to something reasonable.
#4
Jump to:
© 2020 APG vNext Commercial Version 4.5