Welcome, Guest. Please Login.
Surveyor Corporation Surveyor SRV-1
Home Help Search Login

Surveyor Robotics Forum

Welcome to the user support forum for Surveyor SRV-1 robots, SRV-1 robot controllers and SVS stereo vision systems. To register for this forum, please send an email to support@surveyor.com which includes your desired forum user name, your registration email address, and a brief explanation of why you wish to join, and we will create a forum account for you.

Please note that there is a Search button in the forum toolbar for forum topics. Another effective search method for the entire surveyor.com site is to use Google, e.g. "xyz site://www.surveyor.com" where "xyz" is the search topic.



Pages: 1 ... 4 5 6 
Send Topic Print
restoring SRV-1 Blackfin flash firmware (Read 61550 times)
gferon
YaBB Newbies
*




Posts: 4
Re: restoring SRV-1 Blackfin flash firmware
Reply #75 - 02/09/11 at 7:29am
 
I tried to use the bfin-elf-ldr on Linux, on OS X and even the Cygwin ldr.exe you provide on your tutorial.
 
The restore srv1 firmware loads successfully.
 
Using sz to upload the program via XMODEM I obtain just after the transfer:
##Xmodem success. Count:    109952
 
'zZ' command gives:
##zZ boot image write count:    131072
 
Then I'm putting back the jumber on 7-8 to disable UART boot mode.
 
Time to change the matchport settings, I checked like 5000 times, so I'm pretty sure they are good.
 
The issue is... I don't see any LED switching on... (should they?)
 
I don't have an IceBear JTAG. Could it be a problem with some old pieces of uClinux or U-Boot which corrupts the EEPROM in some way. Can I clear the ROM with srv1.ldr.recovery?
 
Thx,
Gabriel
Back to top
 
 
Email   IP Logged
tjump
Global Moderator
*****




Posts: 411
Re: restoring SRV-1 Blackfin flash firmware
Reply #76 - 02/09/11 at 9:23am
 
You hit on what I'm thinking (i.e. uClinux and/or u-boot residual code) and I don't know of a way other than with the ICEbear JTAG to clear all sectors.
 
T. Jump
Back to top
 
 
  IP Logged
gferon
YaBB Newbies
*




Posts: 4
Re: restoring SRV-1 Blackfin flash firmware
Reply #77 - 02/10/11 at 8:07am
 
Mmm... I think we could buy an IceBear JTAG but if I buy such a device, I would like to use AnalogDevice VDSP++ to test a few things... and the IceBear isn't supported by Visual DSP.
 
Do you have any documentation about how you programmed with the bare-metal toolchain ? We are currently working on a school project and we would like to implement a video feed retransmission using Analog Device ASM modules Smiley
Back to top
 
 
Email   IP Logged
tjump
Global Moderator
*****




Posts: 411
Re: restoring SRV-1 Blackfin flash firmware
Reply #78 - 02/10/11 at 10:45am
 
You've posed a 'magic' question. Since the developer of the SRV-1 firmware passed away in July we have been working to understand the bare metal set-up and evaluate changes to make it run at a higher level. We spent a month just trying to pull together documentation, then a month or so digging through the uClinux port and related issues and the bare metal issues trying to understand notes that pointed toward a change to uClinux with minimal continued support for the bare metal platform. We finally arrived at an understanding that the bare metal firmware is the better path and have been scrubbing through this for the last six weeks or so (to really utilize uClinux there needs to be a clean system network, and issues that reside in either the current UART comm. to the radio, the radio itself, or some other aspect of the BF537 platform are preventing maximizing this network aspect of uClinux; and until they are solved or a new SRV design comes along uClinux for the SRV is on hold).
 
So, the bare metal firmware is now our focused target.
 
The big thing we have been working on is the stack overflow issue that has been a nuisance for quite some time. We have created a work-around for this and now have the stack moved from the scratchpad to the 16K that was open on the L1 memory, but it is not a clean fix. We have been working to get picoC fully maximized and the newest version of picoC running. As a result of our current work we can now run custom function calls many layers deep with picoC (if you are familiar with this issue for functions with any size at all the SRV would crash on the second function call).
 
And this is where we are. There are many other issues we need to review and make decisions on whether or not to address them, and what you have posed will get added to this list. But when and/or if we get to this is uncertain (when I say we I mean the software engineers I've hired to work on this... not Surveyor or any of its affiliates). This all costs money so I'm not inclined to take on requests, but if it fits into what I need then it will eventually happen.
 
Hope this all makes sense. Sorry I can't offer you direct advice toward your issue as we just have not gotten there yet.
 
Let me know if you have any questions.
 
Cheers,
T. Jump
Back to top
 
 
  IP Logged
gferon
YaBB Newbies
*




Posts: 4
Re: restoring SRV-1 Blackfin flash firmware
Reply #79 - 02/11/11 at 12:56am
 
Thanks for the answer,
 
I'm sorry for your loss.
 
I have one more question, if I purchase a JTAG module, will I be able to restore the SRV-1 firmware for sure?
I would also like to know if I can purchase an Analog Device ADZS-ICE-100B in order to use your card with VisualDSP++.
 
You can find some info here: http://www.analog.com/en/embedded-processing-dsp/blackfin/emulator-100/processor s/product.html
 
I will keep you posted of our progress.
 
Cheers,
Gabriel
Back to top
 
« Last Edit: 02/11/11 at 2:13am by gferon »  
Email   IP Logged
EmbeddedMan
Junior Member
**




Posts: 62
Re: restoring SRV-1 Blackfin flash firmware
Reply #80 - 04/23/11 at 1:28pm
 
Important Note:
 
The SRV1 firmware is NOT supported under VDSP.  You'd have to create an entirely new project and import all of the code files, set up the memory, and unless you're very familiar with the differences between gcc and VDSP it's going to take a bit of work. I know a little bit of what I'm doing, and I worked at it for about 4 hours and could not get VDSP to compile our code.
 
Just so you don't go buying a whole bunch of hardware expecting the firmware to work under VDSP with no issues.  
 
The only JTAG module I'm used to is the ICEBear - it's probably possible to restore everything with another JTAG though, if you know what you're doing.
 
The thing is you shouldn't need JTAG - you should be able to follow the instructions in this thread to restore a completely blank (or borked) SRV. However using JTAG is _way_ easier and quicker and less error prone than using the above recovery method.
 
*Brian
Back to top
 
 
Email WWW   IP Logged
EmbeddedMan
Junior Member
**




Posts: 62
Re: restoring SRV-1 Blackfin flash firmware
Reply #81 - 04/25/11 at 10:57am
 
gferon-
 
I just tried the steps listed at the very top post of this thread. First I nuked my SRV's flash with my JTAG programmer so it was completely blank, and verified this by rebooting and seeing no LEDs.
 
Then I followed the instructions (Matchport version) to the letter and they worked for me. So I know it's possible, and I know it works.
 
The question is why is your image not getting stored in Flash correctly.  
 
I think the only thing different is that you're on Linux (right?) and I'm on Windows. Could you try running the procedure under Windows (with the ldr download and TeraTerm) to see if there is maybe a problem with the tools under Linux?
 
*Brian
Back to top
 
 
Email WWW   IP Logged
mikeh
YaBB Newbies
*




Posts: 9
Re: blackfin crashed
Reply #82 - 06/30/11 at 10:26am
 
Quote from admin on 12/18/08 at 7:18am:
Do the yellow LED's on the Blackfin board not turn on within a few seconds of reseting the processor?  If so, then the firmware has somehow been lost.  Normally this happens if the firmware upload was incomplete.

Here are the steps for loading a new flash image into the Blackfin via the processor's UART Boot Mode with the Matchport, using Linux or Windows if the firmware is corrupted.  Note that there are different instructions posted at the bottom of this message for recovering via a direct 3.3V UART connection at 115kbps rather than a wireless connection via the Matchport.  But for Matchport users, here are the steps to follow:

0. Make sure the robot is powered on, and stays powered on.  If you have already installed the Blackfin bfin-elf-gcc toolchain, you will already have the command bfin-elf-ldr on your system.  Otherwise, download and install ldr-utils on your linux system from http://www.surveyor.com/blackfin/ldr-utils.zip
There is also a working version of ldr.exe for Windows that can be used for this procedure - http://www.surveyor.com/blackfin/ldr-for-windows.zip

1.  Download a special 115kbps version of SRV-1 firmware from here -
   http://www.surveyor.com/blackfin/srv1.ldr.recovery

2. Connect to the Matchport configuration menu via telnet or terminal connection to port 9999.  In the section labeled "Channel 1 -> Serial", change the baud rate to 115200

Change Setup:
 0 Server
 1 Channel 1
 2 Channel 2
 3 E-mail
 4 WLAN
 5 Expert
 6 Security
 7 Defaults
 8 Exit without save
 9 Save and exit Your choice ? 1

 Channel 1 Serial (1) -  
    for Baudrate, enter 115200
    for flow control, enter 0   (this disables hardware flow control)
    skip the rest of the options
 Save and Exit (9)

3. On the robot, remove the jumper on pins 7-8 in block J1 of the processor card

4. Now, back in a terminal window, make sure you have installed ldr, and
move to the folder with the downloaded srv1.ldr.recovery and the current srv1.ldr you want to install.

5. From this folder, issue the command

[localhost SRV]# ldr -l -v srv1.ldr.recovery 169.254.0.10:10001
or
[localhost SRV]# bfin-elf-ldr -l -v srv1.ldr.recovery 169.254.0.10:10001
if you already have the Blackfin compiler toolchain installed

6. Momentarily place the removed jumper on pins 1-2 in block J1 on the processor card.  If the ldr operation was successful, you should see the yellow LED's flash when the loading has completed.  

You should see something like this -  

> Loading LDR srv1.ldr..recovery ... auto detected LDR as 'BF537'
> OK!
> Connecting to remote target '169.254.0.10' on port '10001' ... OK!
> Trying to send autobaud ... OK!
> Trying to read autobaud ... OK!
> Checking autobaud ... OK!
> Autobaud result: 50bps 0.19mhz (header:0xBF DLL:0x18 DLH:0x00 fin:0x00)
> Sending blocks of DXE 1 ... [10:6208 bytes] [10:7400 bytes] [10:19448> bytes] [3/OK!
> You may want to run minicom or kermit now
> Quick tip: run 'ldr <ldr> <tty> && minicom'

You're not finished - the firmware is running in memory, but still needs to be uploaded and stored in flash memory.

7. Return the jumper to pins 7-8 in block J1

8.  Now connect via nc (netchat) to the robot - nc 169.254.0.10 10001.  From Windows, use Tera Term.  Type 'V' followed by ENTER, and you should get a version string for the firmware.

9.  Now you need to transfer the current srv1.ldr using the XMODEM protocol into the flash buffer and then write it to flash.  From Linux, use nc 169.254.0.10 10001, type 'X' followed by ENTER.  From Windows, use Tera Term for the XMODEM transfer.

From your terminal program, you should start to see a sequence of 'CCC' characters.

If on Windows in Tera Term, ALF-F T X S to get to the send file menu.  

If on Linux, exit nc, and run the following

    lsz -Xkbv --tcp-client 169.254.0.10:10001 srv1.ldr

Then restart nc

Once the transfer is complete, from Tera Term or nc, type 'zZ' followed by ENTER.  If you were successful, you will see
"##zZ boot image write count: 131072"

10. Now change the settings on the Matchport back to 2500k, hw flow -  
Telnet or connect via terminal again to port 9999. and

Change Setup:
 0 Server
 1 Channel 1
 2 Channel 2
 3 E-mail
 4 WLAN
 5 Expert
 6 Security
 7 Defaults
 8 Exit without save
 9 Save and exit Your choice ? 1

 Channel 1 Serial (1) -  
    for Baudrate, enter -1
    for divisor, enter 2
    for flow control, enter 2
    further down, for FlushMode, enter 80
    for Pack Cntrl, enter C0
    for InterCh Time, enter 3
    skip the rest of the options
Save and exit (9)

At this point, you should be able to reboot the robot, and everything should be running correctly.

===================================

In case you are wondering why srv1.ldr has to be transfered twice - srv1.ldr is a wrapper for srv1.bin, which is the actual binary image of the firmware. srv.1dr adds some startup code that moves srv.bin from low memory to its proper location at 0xff80xxxx and then jumps to the right address to start execution. If you were testing code using gdb and a JTAG cable, you would actually tell gdb to load srv1.bin, not srv1.ldr.  Because the Blackfin boot loader unwraps srv1.bin from srv1.ldr, there's no longer a copy of srv1.ldr around to write to flash, so we have to transfer it a 2nd time.

========================================

Note that if you are doing this recovery with a direct 3.3V UART connection at 115kbps, use these instructions instead -

1.  Download a special 115kbps version of SRV-1 firmware from here -
  http://www.surveyor.com/blackfin/srv1.ldr.recovery

2. Download and run http://www.dolomitics.com/downloads/ldrviewer.html
Load the recovery file

3. Remove jumper on 7/8, then power up Blackfin

4. Run UART Boot, uncheck 'Evaluate CTS'
click 'Test Port'
short pins 1/2
Click Autobaud
click Send DXE
wait until you see 'done' and you see the yellow LED's cycle

5. Put jumper back onto 7/8, close ldrViewer

6. Open up a terminal program with baud rate set to 115200, type V to see the version string displayed, then type X, wait for CCCC, then do XModem transfer of correct ldr file.
Wait until done, then type zZ to save firmware to boot flash sectors

7. Reset or power cycle Blackfin

 
I am stuck when it comes to this step:
[localhost SRV]# ldr -l -v srv1.ldr.recovery 169.254.0.10:10001
     or
[localhost SRV]# bfin-elf-ldr -l -v srv1.ldr.recovery 169.254.0.10:10001
     if you already have the Blackfin compiler toolchain installed
I have a command terminal open but do not understand what to enter for [localhost SRV]#
 Thanks for any help!!
Back to top
 
 

Mike
EEGR MSU
Email   IP Logged
EmbeddedMan
Junior Member
**




Posts: 62
Re: restoring SRV-1 Blackfin flash firmware
Reply #83 - 07/11/11 at 10:26am
 
Mike,
 
Nothing. The [] stuff is just a "prompt" that will be different depending upon what OS and terminal you are running. Just type in the  
ldr -l -v srv1.ldr.recovery 169.254.0.10:10001  
 
stuff.
 
*Brian
Back to top
 
 
Email WWW   IP Logged
Pages: 1 ... 4 5 6 
Send Topic Print