Shop OBEX P1 Docs P2 Docs Learn Events
Micrium uC/Probe for Prop+Wiznet — Parallax Forums

Micrium uC/Probe for Prop+Wiznet

twctwc Posts: 107
edited 2013-08-22 07:30 in Accessories
uC/Probe is a PC program from Micrium designed as a debugging aid for embedded systems. It allows easy creation of a ‘Dashboard’ screen on the PC by choosing (i.e. drag&drop) from a library of visual objects (ex: dial, graph, slider) and then mapping those objects to target MCU application variables.


uCProbeSS..jpg


Besides debugging, uC/Probe is also useful as a general purpose user interface for monitoring and controlling an embedded system. And the fact uC/Probe supports an Ethernet link between the PC and the target MCU means it can work across LAN or WAN. The uC/Probe client PC communicates with a UDP server running on the target MCU to read &write application variables (i.e. target RAM).

Taking advantage of Mike G.’s excellent software I’ve written a UDP server for uC/Probe that runs on Prop+Wiznet setups (ex: Quickstart W5200, Spinneret). The UDP server runs in its own cog so the application just deals with variables in the normal way. The UDP server independently manages the interaction with uC/Probe to link the target application variables with the Dashboard display on the PC. The UDP server uses just 5KB RAM and two cogs to drive the Dashboard leaving plenty of Prop resources for the application.

uCProbeDemoSS.jpg


The attached .zip includes a .pdf with a fuller explanation. If you want to give it a try just head over to www.micrium.com and download the evaluation version of uC/Probe. If anyone is interested I also have versions of the server for WiFi (WizFi/Gainspan) and UART (works with any Prop).
1024 x 871 - 146K
658 x 437 - 39K

Comments

  • Mike GMike G Posts: 2,702
    edited 2013-08-22 04:13
    twc, that's a darn handy framework.
  • twctwc Posts: 107
    edited 2013-08-22 05:50
    If you can live with it's limitations (Windows PC, no security) uC/Probe is a really quick&easy way to instrument an app across the LAN/WAN. You can create a Dashboard with some dials, charts, buttons etc. and link it to your Prop app in a few minutes with no PC/web programming. Compared to regular MCUs (ex: I also have it working with Arduino+Wiznet) the Prop version is especially nice as the Dashboard operation (two cogs) is completely transparent (i.e. zero overhead or timing interference) to the application (six cogs). Thanks again for the great software Mike G., made it easy!
  • twctwc Posts: 107
    edited 2013-08-22 07:30
    Though I'm using uC/Probe for 'IoT' apps it is also useful in its traditional 'Debugger' role as a sidechannel to PST (or instead of PST if your app needs dedicated use of the Prop USB/UART). Here's a simple app example (increments some counters) where you just insert a 'brk' statement and specify which variable to watch...
    CON
      _clkmode = xtal1 + pll16x     
      _xinfreq = 5_000_000
    
    VAR
      byte d_num, d_state 'debugger variables
    
    DAT
      var1 long 0 'app variables
      var2 long 1
      var3 long 2
      var4 long 3
      var5 long 4
      var6 long 5
    
    OBJ
      uCProbe : "uCProbe_Server" 'load udp server object
      
    
    PUB main | i
      uCProbe.start   'start the udp server and specify app vars to link
      uCProbe.link(@var1,@var2,@var3,@var4,@var5,@var6,0,0,0,0)
     'application: increment vars 0-9999
      repeat
        repeat
          repeat i from 0 to 5
            var1[i]++ 
          brk(@var6,6)   'BP, watch var6
        until var6==9999        
        repeat i from 0 to 5
          var1[i]:=i+10
          brk(@var1[i],i+1) 'BP, watch var[i+1]
           
    
    PRI brk (dva,dvn) 'debugger
      d_num:=dvn
      uCProbe.v(8,@d_num)
      uCProbe.v(9,dva)
      uCProbe.v(10,@d_state)
      if d_state==254  'continue
         return
      d_state:=0  'paused
      repeat until (d_state<>0)
      pause(500)
      
    
    PRI pause(Duration)  
      waitcnt(((clkfreq / 1_000 * Duration - 3932) #> 381) + cnt)
      return
    
    

    ...when your code hits the 'brk' it will stop and you can change the value of the watched variable (in DEC/HEX/BIN) and then continue with the STEP or RUN buttons...

    Debugger_Dashboard.JPG





















    ...the traffic light turns green when you're RUNning, kind of fun :=)
    867 x 293 - 47K
Sign In or Register to comment.