1394 | | * Option 1 (Preferred and Recommended): JTAG from a host Linux PC via the Linux jtag_usb application found [http://dev.gateworks.com/jtag here]: |
1395 | | * JTAG in it's entirety is explained [wiki:jtag_instructions here] |
1396 | | * '''Note''' Virtual Machines, or VMs are known to have issues using the jtag_usb tool / software |
1397 | | * '''All Venice boards using the i.MX8M Plus processor need a USB cable plugged in between the SBC and the host system. This is in addition the the GW16099 JTAG Dongle' |
1398 | | {{{ |
1399 | | #!bash |
1400 | | jtag_usbv4 -m <firmware.txt> ;# update GSC firmware image |
1401 | | jtag_usbv4 -x <firmware.txt> ;# verify GSC firmware image |
1402 | | }}} |
1403 | | |
1404 | | * Option 2 (note, option 1 is preferred): Linux running on the target board using the {{{gsc_update}}} application which is present in the various Gateworks BSP's (source [https://github.com/Gateworks/gsc_update here]) |
1405 | | * Note, this update could take several minutes, do not allow power loss during this time |
1406 | | * Note, please reboot the board after the flashing is complete |
1407 | | * NOTE: This command will likely spew pca953x 0-0023: failed reading register: -6 messages, ignore these messages and let the programming complete. Do not cut power until command is finished. |
1408 | | {{{ |
1409 | | #!bash |
| 1394 | * [#jtag via JTAG] |
| 1395 | * [#gsc_update gsc_update userspace application] (running on Gateworks board at runtime under a Linux OS) |
| 1396 | |
| 1397 | Important notes: |
| 1398 | * '''both programming methods are not able to verify the firmware image is appropriate for your board; take care to select the correct image''' |
| 1399 | * '''Any failure to program, or programming the wrong firmware could result in your board not booting and require reprogramming via [#jtag JTAG]''' |
| 1400 | * '''after re-programming the GSC will revert some of its configuration just as if the coin-cell battery had been removed and replaced (see [#firmware-reset firmware-reset] for details)''' |
| 1401 | |
| 1402 | |
| 1403 | [=#jtag] |
| 1404 | == JTAG programing GSC firmware |
| 1405 | You can use JTAG with the Gateworks JTAG adapter via {{{jtag_usbv4}}} to program the GSC firmware using a host Linux PC - see [wiki:jtag_instructions here] for details on JTAG programming. |
| 1406 | |
| 1407 | '''Note that Venice boards using the i.MX8M Plus processor need a USB cable plugged in between the SBC and the host system for {{{jtag_usbv4}}} to work (in addition the the GW16099 JTAG Dongle)''' |
| 1408 | |
| 1409 | Example usage: |
| 1410 | {{{#!bash |
| 1411 | jtag_usbv4 -m <firmware.txt> # update GSC firmware image |
| 1412 | jtag_usbv4 -x <firmware.txt> # verify GSC firmware image |
| 1413 | }}} |
| 1414 | |
| 1415 | |
| 1416 | [=#gsc_update] |
| 1417 | == gsc_update userspace application |
| 1418 | You can use the {{{gsc_update}}} userspace application to update the GSC firmware on a running board. Note that this is not as safe as using [#jtag JTAG] above as if power is lost during the operation you will not be able to boot the board until you use [#jtag JTAG] to reprogram the GSC firmware. |
| 1419 | |
| 1420 | While the {{{gsc_update}}} aplication is included in the pre-built Gateworks BSP's you can find the source[https://github.com/Gateworks/gsc_update here]) |
| 1421 | |
| 1422 | Important Notes: |
| 1423 | * '''this update should take about 30 seconds; do not allow power loss during this time (or you will have to reprogram the GSC using JTAG as above)''' |
| 1424 | * '''please reboot the board after the flashing is complete''' |
| 1425 | * '''any applications or kernel drivers that access the GSC slave devices will receive errors thus need to be halted or unbound before the update to avoid driver I/O failures causing kernel messages and excessive programming time (see below)''' |
| 1426 | |
| 1427 | Example usage: |
| 1428 | {{{#!bash |
| 1429 | # unbind standard drivers that use the GSC slaves |
| 1430 | echo "gpio-keys" > /sys/bus/platform/drivers/gpio-keys/unbind # uses 0-0023 pca953x thus must be unbound first |
| 1431 | echo "0-0020" > /sys/bus/i2c/drivers/gateworks-gsc/unbind # will unbind the pca953x and gsc-hwmon driver as well |
| 1432 | echo "0-0050" > /sys/bus/i2c/drivers/at24/unbind |
| 1433 | echo "0-0051" > /sys/bus/i2c/drivers/at24/unbind |
| 1434 | echo "0-0052" > /sys/bus/i2c/drivers/at24/unbind |
| 1435 | echo "0-0053" > /sys/bus/i2c/drivers/at24/unbind |
| 1436 | echo "0-0068" > /sys/bus/i2c/drivers/rtc-ds1672/unbind |
| 1437 | # update the GSC firmware |