XFlasher Usage

From XinaBox Wiki!
Jump to: navigation, search

xFlasher

xFlasher is an utility that allows you to easily upload and provision code examples and firmware for the XinaBox CW01 and CW02 cores. xFlasher runs on both Windows and Mac operating systems. Using xFlasher eliminates the need for anything more than basic computer literacy to get started with the XinaBox xChips. It allows you to almost effortlessly upload your code so experimentation can begin!

Installation

Mac

Method 1
Download from the Mac App Store:
App-store.svg
Method 2
Download and install the XinaBox Flasher from https://github.com/xinabox/XinaBoxFlasher/releases/latest. Choose the .pkg for Apple Mac OS.

Windows

Download and install the XinaBox Flasher from https://github.com/xinabox/XinaBoxFlasher/releases/latest. Choose the .exe for Microsoft Windows.

Programming

The xFlasher uploads .bin files to the CW01 and CW02 cores. ".bin" files are precompiled examples found on our XinaBoxSamples GitHub page.

To download our .bin files follow these steps
  • Select the repository of the project you want to do.
  • Go to "releases"
  • Click on the .bin file under the Assets heading, the download should begin automatically. For some projects, the .bin files might be inside a .zip file, in that case download the top .zip file and unpack it on your computer to reveal the .bin files.
  • Once the download is complete you will find the .bin (or .zip) file in your downloads folder

Flashing

Basic Upload Process:

  • Start the xFlasher program
  • Select the .bin file by clicking on the magnifying glass button on the top right corner.
  • Select your .bin file and click open.
  • Click the "FLASH" button.
  • If the code you are uploading needs to be provisioned, the process of pop-ups will begin once you've clicked the Flash button. Read more about this process below under the #Provisioning chapter below.
  • Once the optional provisioning has been completed, look at your IP0x that is plugged in, you should see the blue and green LEDs flashing. This indicates that the upload is in progress, once completed the blue and green LEDs will stop flashing.

Advanced Upload Process:

  • Click the arrow in the top left corner to reveal the expanded menu.
  • The expanded menu shows a series of options that allow you to tailor your programming process.
  • To begin select a .bin file as illustrated in the basic instructions above.
  • The next option is the Data Logger, it allows you to create a file, where it will log all the data that is transmitted over the serial/UART interface.
    • The text file it creates, shows all the data transmitted over the serial/UART interface, which is useful for data analysis after the project is disconnected and for troubleshooting.
    • To create this text file, click the magnifying glass icon on the far right of Data Logger, you will then see a pop-up, which allows you to name the file and choose it's storage location on your computer.
  • The Flash Speed is the speed at which the software gets uploaded to the CW01 or CW02 core that you are programming. There is a default Flash Speed for each specific chip, however the user is able to change the Flash speed to their desired rate.
  • The Flash Mode is a setting that is dependent on your xChip core. It is set to a default of Dual I/O(DIO). Most CW02 and CW01 use DIO. Some non-xChips use QIO. Some other requires DOUT. More information about this can be found here.
  • The Other Options selection is as follows:
    • "Erase First" being the option to clean the flash memory before uploading your new code. This is especially beneficial when troubleshooting.
    • "Enable Provisioning" is the option that allows code to be provisioned in the xFlasher. It is always selected by default. If the user wishes to not provision with the xFlasher and would prefer to use the captive portal or another method, this option can be manually deselected.
    • "Enable Serial Monitor" is always selected by default and allows data to be printed on the serial display. This option can be deselected by the user if so desired.
    • "Autoscroll" is always selected by default and allows the user to see the latest data printed on the serial display, this option can also be deselected if the user wishes to scroll through the serial display manually.
  • If the code you are uploading needs to be provisioned, the process of pop-ups will begin once you've clicked the Flash button.

Provisioning

Provisioning is the process of allowing for entering user specific variables into precompiled code before uploading it.

If a mistake was made in the provisioning process you can click "CANCEL". You will then see a pop-up message that will ask you if you are sure you want to cancel provisioning and flashing, click YES. This will stop provisioning and flashing and allow you to restart the process, to pick up from clicking FLASH to begin provisioning anew.


The provisioning process is the same for both Basic and Advanced mode in the xFlasher
  • Provisioning begins after you've selected you .bin file and clicked FLASH in the xFlasher
  • A series of pop-ups will appear on your screen, requesting you to input user specific data, for example WiFi Network Name(SSID) and WiFi Password(PSK).
  • The amount of pop-ups is determined by the code you're uploading.
  • After you've completed all the provisioning the provisioned .bin file will upload to the core you have plugged in.
  • The provisioned .bin file will save itself separately from the original .bin allowing you to upload that same provisioned file to multiple cores without repeating the provisioning process if you don't need to change any of the parameters determined in provisioning. However, because you still have the original .bin file still stored separately, you are still able to upload the same code with a new set of parameters by just selecting the original .bin file instead.