Debugging code in FiPy | Except print statements



  • Hello Pycom team,

    What are the different possible ways of debugging micropython code in Fipy except print statements? Is there a document which can be referred?

    Yours Sincerely,
    Vijay



  • The easiest way I've found was using Putty and a TTL-Adapter like that:

    alt text

    Just connect the TTL-Adapter with Jumper Wires to the Pins P0 and P1 of your board and select the right Com Port with Putty and set the right baudrate in Putty. Don't forget to connect the Adapter to the ground of the Pycom Board and select 3.3V on the adapter with the bridge!



  • For simple states, use the RGB LED, with colours and even blink frequency meaning some states.

    For more information, save debug messagens to internal flash or microSD card (when using Expansion Board, etc).



  • Hi,

    Other than print statements, you could use the GPIO pins to indicate events in your code, and measure them using a logic analyser. Especially when speed is of essence, this method will work better.
    Now, you could use a JTAG board and connect to the appropriate pins, but I have no experience there.
    Gijs


Log in to reply
 

Pycom on Twitter