Table of Contents

Firmware

Firmware tab of OP Config

Update Firmware

On this tab you can update the software that runs on the TCB, which we call “firmware.” Think of the firmware as the operating system - it is the set of instructions that get executed when the device is turned on. The process of updating the operating system is often called “flashing new firmware” or “flashing a hex file.” The word flash refers to the process of overwriting an area of memory known as “flash” on the microcontroller where the code resides, and hex refers to the type of file that holds the compiled code we are flashing.

It is important to note that flashing new firmware is not the same thing as updating (writing) new settings to the TCB. We read and write the settings by using the green and blue arrow buttons. The settings are values you specified yourself on all the other tabs of the OP Config program. We can change the settings whenever we want, but updating or flashing the firmware only needs to happen when a new version of the TCB code is released.

Get Latest Release

Update Firmware Click this button to check for the latest version of the TCB firmware. If a file is detected the version number will be displayed and the hex file will be downloaded to a temporary folder. It is highly unlikely you will download a version of the firmware that is older than the version you already have on your TCB, but it might be the same version, in which case flashing the update is unnecessary. You can always check which version of the firmware your TCB is presently running by connecting to the TCB and looking at the Serial Status label on the bottom left of the OP Config program (#8 on the Program Layout diagram). You can also read the firmware version by connecting the TCB to any serial console (such as the built-in console discussed below), and pressing the INPUT button on the TCB board, which causes the TCB to send diagnostic information, including the firmware version, out the serial port.

Use Your Own Hex

If you are a developer and have compiled your own hex, you can select it using this button. If you are working on a project in the Arduino IDE, you can generate a hex file by typing Ctrl+Alt+S or going to the Sketch menu and selecting the “Export compiled Binary” option. The hex file will then appear in your sketch folder (instructions valid for Arduino 1.6.5, and may change with future versions).

Flash

Once you have selected a hex file, either the latest release you downloaded or one of your own, click the Flash button to attempt flashing the hex to the device. Be sure you have selected the correct COM port first, and be sure you have Dipswitch #5 on the TCB set to use the correct serial port (Dipswitch #5 in the On position to flash over USB, or in the Off position to flash over the Serial 1 port). The status of the flash operation will be shown in the console window. Be patient, the flash operation can take 30 seconds or more.
Developers: flashing is actually accomplished by calling AVRDUDE, which is bundled with OP Config.

Console Utility

The built-in console is a very useful debugging tool. It is basically a window to whichever COM port you have selected, and if you are in “Snooping” mode, any information received on that COM port will be printed in the console window.

What is the difference between “Snooping” the TCB and “Connecting” to the TCB using the Connect button? Both are very similar - they both attempt to open the COM port and then process serial data on that port. The difference is that when you “Connect” to the TCB, after the COM port is opened the OP Config program sends a command to the TCB which puts the TCB into a special state where all it can do is communicate with the PC. In this communication state, all motors and outputs on the TCB are turned off, and the TCB will not respond to any commands from your radio transmitter. It waits for instructions from OP Config and does nothing else until disconnected.

Snooping opens the COM port but nothing more. No commands are sent to the TCB, it is free to operate normally. You can drive the tank in this mode if you want, though it may be hard to go far if you are plugged in with a USB cable (or you can use Bluetooth). More importantly, if you press the INPUT button on the TCB while snooping you can dump diagnostic information to the serial port which the console window will display. And if you have Debugging turned on, the TCB will also report information in real time as you operate it - function triggers will be reported, battle hits, tank movement, and more will all be sent to the serial port where you can read it on the console window. This can be very useful for verifying that the TCB is doing what you think it should. And because no special handshake is performed or required, you can also use Snoop mode to read serial information from devices other than the TCB.

Snoop

Snooping When you click the Snoop button, the selected COM port will be opened at the specified baud rate. If you were already “Connected” to the TCB, the TCB will be told to resume normal operation mode. Click the button a second time to stop snooping.

Clear Screen

This will empty all prior contents from the console screen.

Autoscroll

If checked, the console window will maintain focus on the most recent line of data to arrive.



Sample TCB data dump while snooping

Sample Data Dump while Snooping

wiki/opconfig/tabs/firmware.txt · Last modified: 2016/04/07 21:18 by opadmin