6.1.1 Firmware/Gain Table Example in MCHPRT2 Package

MCHPRT2 GUI Tool uses the batch file to use the ASF Firmware example project in MCHPRT2 Package.

Figure 6-3. Example for bat File

The following figure shows the details information of what is present in the bat file.

WILC1000 bin file gain table upgrade bat file (upgrade_1000_gain_bat):

cd upgrade_1000 //change the path to upgrade_1000 Folder in the Package.

gain_builder.exe -hp WILCPB.csv -fb burst_tx_firmware_1000.bin // run gain_builder.exe update the gain table in burst_tx_firmware_1000.bin with WILC1000PB.csv gain table value

exit // exit the command prompt

WINC1500 firmware upgrade and gain table example batch file (Upgrade_1500.bat) :

If [%2] == [ ] ( SET PORT_NUM = 0) //setting UART Port Number

ELSE ( SET PORT_NUM =% 1)

if "%1" == "I2C" Goto continue_I2C // Jump to I2C part based on the command entered in the command prompt

if "%1" == "UART" Goto continue_UART // Jump to UART part based on the command entered in the command prompt

if "%1" == I2C Goto continue_I2C

:continue_I2C // I2C Part

cd upgrade_1500\firmware // change the path to upgrade_1500\firmware

donwload_all.bat I2C D21 3A0 0 <nul // giving inputs to donwload_all.bat file if the firmware upgrade is via UART or I2C, D21 part number, chip 3A0, Aardvark serial number, com port of edbg USB device.

exit

upgrade_1500_gain_bat

IF [%2]==[] ( // check the input value to

SET PORT_NUM=0

) ELSE (SET PORT_NUM=%1) //setting UART port number to upgrade

if "%1" == "I2C" Goto contine_I2C // jump to I2C part

if "%1" == "UART" Goto contine_UART // jump to UART part

if "%1" == "" Goto contine_I2C

:contine_I2C // update module gain table to samd21_gain_setting_hp.csv value by I2C

cd upgrade_1500\firmware\Tools\gain_builder\debug_I2C

gain_builder -hp ../gain_sheets/samd21_gain_setting_hp.csv -port 0 <nul

exit

:contine_UART // update module gain table to samd21_gain_setting_hp.csv value by UART

cd upgrade_1500\firmware\Tools\gain_builder\debug_UART

gain_builder -hp ../gain_sheets/samd21_gain_setting_hp.csv -port 0 <nul

exit