[SOLVED] Gopigo3 firmware version issue


#1

I am looking to teach my son python using the gopigo bot. I purchased a number of parts following sentdex’s (older) tutorials. After assembling the basic bot I am unable to run any code due to the following error:

“GoPiGo3 firmware needs to be version 1.0.x but is currently version 0.3.4”
This is from Read_Info.py, but I receive the error regardless.

I am running RFR on a raspberry pi 1 B+ / gopigo3 with a fully charged battery pack. I have ran update_gopigo3, di_sensor (IIRC) update, and updated various parts of the OS. Is this a compatibility issue with the RP 1 B+ board? If not, any help is appreciated.

BTW, I am doing everything over ssh/cli. Further actions being cli would be helpful.


#2

The script to update firmware from the cli is /home/pi/Dexter/GoPiGo3/Firmware/gopigo3_flash_firmware.sh

You’ll have to make the script executable before you run it, see example below:

pi@dex:~ $ cd ~/Dexter/GoPiGo3/Firmware
pi@dex:~/Dexter/GoPiGo3/Firmware $ ls -l
total 56
drwxr-xr-x 2 root root  4096 Jun  7 19:26 archives
-rw-r--r-- 1 root root 43492 Jun  7 19:26 GoPiGo3_Firmware_1.0.0.bin
-rw-r--r-- 1 root root   618 Jun  7 19:26 gopigo3_flash_firmware.sh
drwxr-xr-x 2 root root  4096 Jun  7 19:26 openocd
pi@dex:~/Dexter/GoPiGo3/Firmware $ sudo chmod +x gopigo3_flash_firmware.sh
pi@dex:~/Dexter/GoPiGo3/Firmware $ ./gopigo3_flash_firmware.sh
Updating the GoPiGo3 Firmware with '/home/pi/Dexter/GoPiGo3/Firmware/GoPiGo3_Firmware_1.0.0.bin'.
Open On-Chip Debugger 0.10.0-dev (2016-12-16-18:07)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
BCM2835 GPIO nums: swclk = 25, swdio = 24
BCM2835 GPIO config: srst = 18
srst_only separate srst_gates_jtag srst_push_pull connect_deassert_srst
srst_only separate srst_gates_jtag srst_push_pull connect_deassert_srst
adapter speed: 400 kHz
cortex_m reset_config sysresetreq
adapter speed: 250 kHz
adapter_nsrst_delay: 100
adapter_nsrst_assert_width: 100
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : SWD only mode enabled (specify tck, tms, tdi and tdo gpios to add JTAG mode)
Info : clock speed 250 kHz
Info : SWD DPIDR 0x0bc11477
Info : at91samc20j18.cpu: hardware has 4 breakpoints, 2 watchpoints
    TargetName         Type       Endian TapName            State       
--  ------------------ ---------- ------ ------------------ ------------
 0* at91samc20j18.cpu  cortex_m   little at91samc20j18.cpu  running
Info : SWD DPIDR 0x0bc11477
at91samc20j18.cpu: target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x000068f0 psp: 0x20000b44
Info : SWD DPIDR 0x0bc11477
at91samc20j18.cpu: target state: halted
target halted due to debug-request, current mode: Thread 
xPSR: 0x21000000 pc: 0x00006890 psp: 0x20000b44
** Programming Started **
auto erase enabled
Info : SAMD MCU: SAMC20J18A (256KB Flash, 32KB RAM)
wrote 49152 bytes from file /home/pi/Dexter/GoPiGo3/Firmware/GoPiGo3_Firmware_1.0.0.bin in 2.990453s (16.051 KiB/s)
** Programming Finished **
** Verify Started **
verified 43492 bytes in 0.093956s (452.048 KiB/s)
** Verified OK **
Info : SWD DPIDR 0x0bc11477
shutdown command invoked
pi@dex:~/Dexter/GoPiGo3/Firmware $

(sorry about the color formatting, I don’t know how to turn this off)

You can also accomplish this by running “DI Software Update” from the desktop, but you asked for a cli solution (I personally prefer the cli method).

-Kevin


#3

Thanks, Kevin. I’m worried about flashing the firmware, though. I read somewhere in the forums about firmware compatibility issues. I’m trying to find the post now.

I like color formatting, btw.


#4

You’re going to keep getting the error “GoPiGo3 firmware needs to be version 1.0.x but is currently version 0.3.4” until you update the firmware.

If you later want to downgrade back to version 0.3.4 it is in the folder ~/Dexter/GoPiGo3/Firmware/archives

pi@dex:~ $ cd Dexter/GoPiGo3/Firmware/archives
pi@dex:~/Dexter/GoPiGo3/Firmware/archives $ ls -l
total 292
-rw-r--r-- 1 root root 35732 Jun  1 19:36 GoPiGo3_Firmware_0.2.5.bin
-rw-r--r-- 1 root root 35996 Jun  1 19:36 GoPiGo3_Firmware_0.2.6.bin
-rw-r--r-- 1 root root 42904 Jun  1 19:36 GoPiGo3_Firmware_0.3.0.bin
-rw-r--r-- 1 root root 43168 Jun  1 19:36 GoPiGo3_Firmware_0.3.1.bin
-rw-r--r-- 1 root root 43184 Jun  1 19:36 GoPiGo3_Firmware_0.3.2.bin
-rw-r--r-- 1 root root 43148 Jun  1 19:36 GoPiGo3_Firmware_0.3.3.bin
-rw-r--r-- 1 root root 43148 Jun  1 19:36 GoPiGo3_Firmware_0.3.4.bin
pi@dex:~/Dexter/GoPiGo3/Firmware/archives $ 

I’ve downgraded the firmware myself before to run an older version of Raspbian For Robots. If you’re really opposed to flashing the firmware, you could re-image your SD card with one of the older images (but you might end up at the same place if you update the older software).

-Kevin


#5

I actually went ahead and tried to update the firmware. I’m getting the ‘Could not initialize the debug port’ error. I verified the SPI line is enabled. I’m afraid the gopigo3 might be broken, which sucks since I bought it as a kit from amazon.

Updating the GoPiGo3 Firmware with ‘/home/pi/Dexter/GoPiGo3/Firmware/GoPiGo3_Firmware_1.0.0.bin’.
Open On-Chip Debugger 0.10.0-dev (2016-12-16-18:07)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
BCM2835 GPIO nums: swclk = 25, swdio = 24
BCM2835 GPIO config: srst = 18
srst_only separate srst_gates_jtag srst_push_pull connect_deassert_srst
srst_only separate srst_gates_jtag srst_push_pull connect_deassert_srst
adapter speed: 400 kHz
cortex_m reset_config sysresetreq
adapter speed: 250 kHz
adapter_nsrst_delay: 100
adapter_nsrst_assert_width: 100
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : SWD only mode enabled (specify tck, tms, tdi and tdo gpios to add JTAG mode)
Info : clock speed 250 kHz
Info : SWD DPIDR 0x0013fb10
Error: Could not initialize the debug port
TargetName Type Endian TapName State


0* at91samc20j18.cpu cortex_m little at91samc20j18.cpu unknown
Error: Could not initialize the debug port
Error: Target not examined, will not halt after reset!
Error: Could not initialize the debug port
Error: Target not examined yet
Error: Target not examined yet
embedded:startup.tcl:21: Error:
in procedure ‘reset’
in procedure ‘ocd_bouncer’
in procedure ‘ocd_process_reset’
in procedure ‘ocd_process_reset_inner’ called at file “embedded:startup.tcl”, line 248
in procedure ‘at91samc20j18.cpu’ called at file “embedded:startup.tcl”, line 331
in procedure ‘ocd_bouncer’
in procedure ‘at91samc20j18.cpu’ called at file “embedded:startup.tcl”, line 297
in procedure ‘ocd_bouncer’
at file “embedded:startup.tcl”, line 21

TARGET: at91samc20j18.cpu - Not halted
in procedure ‘reset’
in procedure ‘ocd_bouncer’


#6

The GoPiGo3 firmware flash scripts currently only support RPi 2 and 3 (and 3B+). There’s probably nothing wrong with your GPG3 hardware; you’re just using an unsupported RPi.

A solution is known, and is in the works. In the meantime if you have access to a RPi 2 or 3, you could use it to update the firmware, and then switch back to using the RPi 1 to run the GPG3.


#7

I figured that was the issue. I was looking for a good excuse to upgrade. The new RPi3B+ worked fine. Thanks.


#8

Awesome! Thanks for reporting back!