Debugging programming on the chip

I am wondering how programmers debug their software running on the chip during development.

It looks like you can do ‘printf’ statements when running inside MPLAB using the simulator, but I assume that those same printf statements are not going to do anything when running on the real hardware?

Are there little LED lights I can purchase on the site so I can at least turn a light on and off as a debugging cue? What other debugging strategies do you guys use?

Can you debug step through code on the live chip, or only when in the simulator?

Where on this site can you order additional computers? I couldn’t find it listed as a discrete item.

Thanks,

John

The printf’s on the actual chip (not an emulator) output to the serial port: so using a serial port terminal will allow you to view the outputs.

I don’t think there are any LED’s you can buy here.

As far as I know, you can’t step through code that’s in the microcontroller.

Look here: http://www.vexlabs.com/vex-robotics-starter-kit-parts.shtml

So, I understand now that your can debug your microcontroller by using ‘printf’ statements that send data out to the serial port. You can use a simple terminal program on your computer to see the output.

My question is this. Does the existing programming kit support this capability or do I need an additional cable?

What are the other two connectors that look like ‘phone jacks’ on the back for?

Where is the detailed documentation and walk-thru about using the programming kit? The only thing on the ‘support’ section I could find was the programming divider for the binder.

I have found lots of documentation about MPLAB etc. but I still have some questions about how to, step by step, download my program, restore the original factory firmware if necessary, and debug the output.

Does someone have a link to the ‘programming’ manual that describes these steps?

Thanks,

John

The orange programming cable from the Vex Programming Kit provides access to the Vex Controller’s UART that allows you to see printf serial output on a Windows Hyperterminal using 115200 Baud, 8 Data Bits and 1 Stop Bit. It also allows you to download the Dynamic Debug Tool (DDT) firmware or the JVEX (JAVA) firmware using the IFI Bootloader application that runs on Windows to develop autonomous applications for the Vex Controller.

  1. you need to flash the DDT code and the V6 Master firmware or V7 (*.bin), which is available from the IFI Site. For more documentation do a google search on the keywords JVEX and download the JAVA information that is also based on the DDT but has more documentation. I am planning to use this method of control for my Hero 2007 Robot shown in the Vex gallery. https://vexforum.com/gallery/browseimages.php?do=popimages&orderby=views

  2. Download code using IFI Loader that is available the Downloads web page http://www.vexlabs.com/vex-robotics-downloads.shtml. Go to the Downloads web page and get the Vex Master Code and Vex Default Firmware zip file and our IFI Loader if you do not have them. Inside this zip file you will find a VEX_MASTER_Vx.BIN file. Using the instructions called UpdatingMasterFirmware.pdf download the latest Master bin file to the Vex Controller using the IFI Loader. After this is complete, you will need to download the Default Firmware (hex file) to the Vex Controller.

  3. JAVA DDT Information (using Vex with JAVA)
    https://jvex-robotics.dev.java.net/

Thanks! That was great information.

The IFI Downloader has a “built in” Terminal as well… The other Two Connectors are for Connecting One (or Two) Radio Receiver(s) or direct Connecting One (or Two) Vex Controllers. Keep this page handy: Vex Robotics Downloads Page IIRC, the Outputs on the Vex Controller have a 470K resistor, so you can directly connect LED’s to the Controller… For using LED’s in testing, download the Zip File Vex Sensor Test from the page above and extract from the PDF the file “VexSensorTestProcedure-revA.pdf”. Also there is the Vex Default Code (to return your Vex to “Factory Fresh”) and the entire Invertor’s Guide (Including the Programming Section for EasyC). Downloading the .HEX file is the same for EasyC or MPLAB…