Error: Could not initialize the debug port[SOLVED]

This happens when I try to update the SW on a brand ner BrickPi3.

Script started on Sun 05 Mar 2017 06:26:45 PM CET
access control disabled, clients can connect from any host
BrickPi3
(165, 30)
setting drop down to BrickPi3
Start Firmware test!BrickPi3
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: 100 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 100 kHz
Info : SWD DPIDR 0x0013fb10
Error: Could not initialize the debug port
TargetName Type Endian TapName State


0* at91samd21j18.cpu cortex_m little at91samd21j18.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 ‘at91samd21j18.cpu’ called at file “embedded:startup.tcl”, line 331
in procedure 'ocd_bouncer’
in procedure ‘at91samd21j18.cpu’ called at file “embedded:startup.tcl”, line 297
in procedure 'ocd_bouncer’
at file “embedded:startup.tcl”, line 21

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

Updating the BrickPi3 SAMD Firmware with ‘/home/pi/Dexter/BrickPi3/Firmware/brickpi3_firmware.bin’.

No reboot.

Script done on Sun 05 Mar 2017 06:27:30 PM CET

Is your brickpi3 functioning normally? Meaning the motors turn and that kind of stuff? I am guessing the debug port is for development. Meaning its probably fine. If the update gui said it went fine its most likely fine. Errors happen all the time and don’t always mean anything much. For example your computer probably just encountered an error but it really wasn’t an issue.

Hi,
No, when I try to run a program, the output is:
Traceback (most recent call last):
File “/home/pi/myProjects/pi3/LEGO-Touch_Sensor.py”, line 15, in
BP = brickpi3.BrickPi3() # Create BP, an instance of the BrickPi3 class.
File “build/bdist.linux-armv6l/egg/brickpi3.py”, line 272, in init
brickpi3.FirmwareVersionError: BrickPi3 firmware needs to be version 1.3.x but is currently version 1.0.1------------------
(program exited with code: 1)
Press return to continue
And as I mentioned in my first email, the update did not go fine, it ended with a number of errors.And why do you ship a product with outdated FM?Jerry T

Firmware and drivers development has continued since the BrickPi3 was manufactured, which is why there is an improved firmware version available. The reason that the firmware update is required, is that some of the new features in the drivers were added to the FW at the same time (some features require driver and firmware support). If you use the current drivers with old firmware, some features might not work as they should, and some won’t work at all.

If you have not yet rebooted since installing BrickPi3, you should do so. From the terminal you can run the following command to reboot:
sudo reboot

From the terminal you can run this command to update the firmware:
sudo bash /home/pi/Dexter/BrickPi3/Firmware/brickpi3samd_flash_firmware.sh
You can refer to the firmware update README for more information.

Thank you for th reply. Unfortunetely, the result is exactly the same as in my first post, see. above.
I understand perfectly well that SW and FM evolves. I’m just frustrated over a product not working and with
no tools to fix the problem in sight.
Just what install.sh am I supposed to run? I tried both applicable for BrickPi3 with no improvment.

If you are using Raspbian for Robots and ran the DI Update, install.sh has already been run (BrickPi3 is already installed). That part of the firmware update README is for users who are using BrickPi3 on standard Raspbian, where the BrickPi3 software needs to be manually installed.

It looks like you have Raspbian for Robots installed. Have you run the DI Update and selected “Update Dexter Software” to update the OS software (make sure it’s up to date)?

What version of Raspberry Pi hardware are you using?

Have you done any installation for other hardware (beside Dexter Industries hardware)?

Hi again,OK, what I do is1. Download the image from Dexter_Industries_Raspbian_Flavor

|
|
|
| | |

|

|
|
| |
Dexter_Industries_Raspbian_Flavor
Dexter_Industries_Raspbian_Flavor download. Dexter_Industries_Raspbian_Flavor 2017-02-23 13:05:43 free download… | |

|

|

  1. Copy the image to the SD card using dd on Linux.3. Power up the BrickPi34. Run raspi-config5. Run DI Update - Update Dexter SW
  2. Reboot7. Run DI Update - Update Robot (BrickPi3)8. Run Test and Troubleshoot This results in "BrickPi3 FM needs to be version 1.3.x but is currently version 1.0.1"
    As you can see, I don’t install other SW.
    What now? Jerry T

I forgot: when updating robot, the last thing that shows up in the terminal is
"Updating the BrickPi3 SAMD…" and that it freezes to ice.
Jerry T

And my Raspberry is a B+ v1.2.
Jerry T

With raspi-config is there anything hardware related you changed, or was it just things like expanding the filesystem, setting locale, etc.?

Can you run this command, and then post the printed results? I know it could very well be similar to the output you posted above, but it won’t be identical.
sudo bash /home/pi/Dexter/BrickPi3/Firmware/brickpi3samd_flash_firmware.sh

I know you want to get running ASAP, but typing “Carpe diem!!!” at the end of all your posts will not affect the response time, and can be interpreted as shouting.

Here comes the result of the infamous command.No, nothing in raspi-config except what you say (expanding, locale).
Sorry for the exclamation at the end of my mails. Jerry T

Good morning!I have some news, good and bad.This morning I rushed to my hobby store and bought a new Raspi 3.Connected it to the BrickPi3 and ran the DI Robot Update. You can see the log in the attached file.Then I rebooted. And when the system came up the yellow diode was black (off). Consequently, The Test and Troubleshoot tool reports BrickPi as not connected.I shut down and powered up the system several times and on one occasion the yellow diode went on. That’s it.
And there we are.I must say I feel like doing debugging job for Dexter Industries. The board behaves differently depending on what version of Raspi it’s connected to.The firmware update simply doesn’t work, one way or another. And the BrickPi is totally useless, as it looks like right now.

What do you think we should do next?
Jerry T

Dexter_Software_Update_log_2017_03_07__10_50_04.txt (2.07 KB)

Can you run this command, and then post the printed results? I know it could very well be similar to the output you posted above, but it won’t be identical. Please, I want to see the exact output from this exact command.
sudo bash /home/pi/Dexter/BrickPi3/Firmware/brickpi3samd_flash_firmware.sh

I made a slight modification to the Read_Info.py example program (modified version attached). Please run this python program and post the output.
Read_Info.py (2.1 KB)

Hi,
For the ouput of Read_info.py see log.log.
For the output of brickpi3samd_flash_firmware see fm_update.log.Judging from the latter, everything is OK, right?The only difference is that this time I ran the command via ssh (I ran it form a terminal connected directly to the brick as well)So why do things work, all the sudden? Jerry T

It seems that your files did not get attached to your post. Please try re-sending them.

Until I see the files to compare, I can’t know for sure, but I suspect there might be a problem with the DI Update FW updater. Running the update script directly has worked many times with a variety of HW and SW configurations, but I’m not familiar with the DI Update FW updater. I wrote and have extensively used the update script, which is why I wanted you to run it directly.

Once I get your log files I will check them and investigate to see if DI Update has a bug.

Well, this was not exactly the case. From the beginning, when I tried to run a program, I got an error message saying that the FM was outdated (1.0.1, should be. 3x). And when I died to update… As I said, the only difference was the SSH. Now I tested to run two sensors and 3verything seems to be OK. So thank you until we meet again.

I’m glad it’s working for you now. Enjoy using the BrickPi3!

OK, we try again
Jerry T

This topic was automatically closed after 24 hours. New replies are no longer allowed.