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
Send Topic Print
quick tutorial on modifying ARM7 firmware src code (Read 9856 times)
admin
YaBB Administrator
*****




Posts: 3676
quick tutorial on modifying ARM7 firmware src code
09/30/06 at 2:58pm
 
We've been asked a few times about the actual process of modifying SRV-1 source code, so here's a quickstart guide ...
 
1.  Assuming you are using Windows, you need to first install the GNUARM 3.4.3 toolchain, which is provided on our website as 3 consecutive install programs that are found at the bottom of http://www.surveyor.com/srvdownload/
 
- gnuarm-install1.exe (17MB)
- gnuarm-install2.exe (23MB)
- gnuarm-install3.exe (2MB)  
 
After the last installer runs, do a search on your computer for "cygwin1.dll" and delete all but the most recent version (should be 1.4MB).  For whatever reason, multiple instances of cygwin1.dll seem to get installed sometimes
 
2.  The 3rd installer should have created an icon for LPC2xxx-gcc-newlib_v2.3.0.0, which is the shell that's used to run the gnuarm tools.  If for some reason, that icon wasn't created, you'll need to make one yourself, with the shortcut defined as
 
Target:  "C:\Program Files\Infrabed\evboards\LPC2xxx-gcc-newlib-v2_3_0_0\bin\cygwin\bash.exe" build_environment.sh
 
Start in:  "C:\Program Files\Infrabed\evboards\LPC2xxx-gcc-newlib-v2_3_0_0\bin\"
 
3.  Create a directory such as "C:\srv1", then download and unzip the srv-1 source code (e.g. http://www.surveyor.com/srvdownload/srv-053007.zip ) into that directory.  You'll find some .c and .h source code files, along with a makefile and other stuff.
 
4.  Start LPC2xxx-gcc-newlib_v2.3.0.0.  You should get a DOS-like shell.  Change directory to \srv1, and try typing "make".  This should compile everything and create srv1.hex, which will be your SRV-1 download image.  If everything goes right (and lots of folks have been able to get this to work),  you should be able to load srv1.hex onto the robot using lpc21isp.exe, which is conveniently located in the same directory with the source code.  The syntax for lpc21isp is
 
> lpc21isp -hex srv1.hex com4 112400 14746      
   (substitute your radio's actual com port for com4)
 
5.  There's also some information on using the gnuarm toolchain here - http://www.surveyor.com/srvdownload/LPC2106_QuickStart.pdf
 
We really encourage folks to work with, modify and extend the source code.  It's published under the GNU GPL license, so the code is free to use and modify, though you need to make your changes available to others so that they can take advantage of everyone's effort in extending code.
Back to top
 
« Last Edit: 11/29/07 at 5:31pm by admin »  

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
dwarfy
YaBB Newbies
*




Posts: 7
Re: quick tutorial on modifying firmware source co
Reply #1 - 03/01/07 at 4:15am
 
Just an additionnal note I'd like to add:
For windows users :
 
If as me you have allready connected a lof of uart-usb devices.
When you will connect the usb xbee modem : windows will assign it a big COM port number (mine was COM34)  
 
and the command :
 
>lpc21isp -hex srv1.hex com34 112400 14746
 
will fail with the message :
 
>Can't open COM-Port com34 ! - Error: 2
 
In order to solve this :
Go in windows 'control panel',
click 'system' icon, go in the 'hadware' tab and click 'device manager' button.
Now go in the 'Ports (COM & LPT)' section.
You should see an entry : CP210x USB to UART Bridge Controller.
Right click on it and click on 'properties'.
A window opens, go in the 'Port settings' tab and click 'advanced' button.
Another window will open and there you will be able to choose a COM port number manually. (I choose COM2)
Then you will be able to run the firmware upload command :
 
>lpc21isp -hex srv1.hex com2 112400 14746
 
A final note !
If the lpc21isp program ends up saying :
 
>Synchronizing..................................................................
.
>................................. no answer on '?'
 
It is because you didn't put the firmware change jumper :
see here : http://www.surveyor.com/SRV_setup.html#setup3
for more details on the procedure.
 
Cheers,
Mathieu
Back to top
 
« Last Edit: 03/01/07 at 4:17am by dwarfy »  
  IP Logged
blipchin
YaBB Newbies
*




Posts: 3
Re: quick tutorial on modifying ARM7 firmware src
Reply #2 - 12/04/07 at 4:17am
 
Note from Admin - I pushed the wrong button and edited your question instead of responding to it.  In any case, here is some info on firmware uploads to the Blackfin.
 
================================
 
These instructions relate to programming the earlier version of the SRV-1, which had an ARM7 processor and Zigbee radio.  For he Blackfin version of the SRV-1, look at the firmware upload instructions at the end of http://www.surveyor.com/blackfin/SRV_setup_bf.html - to see how to use a basic terminal program with XMODEM / XMODEM-1K support to transfer code to the IP address of the SRV-1.
Back to top
 
« Last Edit: 12/04/07 at 8:49am by admin »  
  IP Logged
dlb04001
YaBB Newbies
*




Posts: 10
Re: quick tutorial on modifying ARM7 firmware src
Reply #3 - 03/06/08 at 9:53am
 
I've been trying for a week to modify source code using the GNUARM toolchain on Windows to no avail. I got it to install correctly, deleted the most recent cygwin1.dll (which was 1162 kB, not 1400 MB), successfully made the srv1.hex file from the C source code, and got it to send the code to the SRV1 ARM7 edition using the lpc21isp. However, even when I didn't modify anything in the code, it wouldn't work in the Java console OR the hyperterminal..When I'm in the HT, I turn on the SRV and get either a greek or the letter 'U' instead of the firmware edition. Also, when I dl just the srv1.hex file from the site and send that over, it works fine. Has anyone had this problem with the compiler before?
Back to top
 
 
  IP Logged
dlb04001
YaBB Newbies
*




Posts: 10
Re: quick tutorial on modifying ARM7 firmware src
Reply #4 - 03/06/08 at 9:54am
 
*1.4 MB
Back to top
 
 
  IP Logged
admin
YaBB Administrator
*****




Posts: 3676
Re: quick tutorial on modifying ARM7 firmware src
Reply #5 - 03/06/08 at 9:59am
 
Check your baud rates in the source code.  It's possible that the last posted ARM7 source code was configured for the WiPort WLAN module instead of XBee.  As I recall, there's a  
    #define WIPORT  
at the top of main.c that selects the Wiport mode - if you comment out that line, it may fix the problem.
Back to top
 
« Last Edit: 03/06/08 at 9:59am by admin »  

SRV-1 Development Team
Surveyor Corporation
Email WWW   IP Logged
dlb04001
YaBB Newbies
*




Posts: 10
Re: quick tutorial on modifying ARM7 firmware src
Reply #6 - 03/07/08 at 9:28am
 
I tried the 010207 firmware, and it compiled with GNUARM, but the srv1.hex it created wouldn't work when I sent it to the ARM7. But, the srv1.hex that I downloaded from the site works fine- it's gotta be something the the GNUARM toolchain..For the first installer, I elect to install the cygwin dll's and a cygwin1.dll with a size of 1,114 KB is created. The second installer prompts me to install the cygwin dll's again, which I don't. A search for it finds two cygin1.dll's (both same size and same date modified), and one file called 'orig-cygwin1.dll', which is 949 KB. Do I delete this one as well? And if this isn't the problem, do you have any idea what could be?
Back to top
 
 
  IP Logged
dlb04001
YaBB Newbies
*




Posts: 10
Re: quick tutorial on modifying ARM7 firmware src
Reply #7 - 03/07/08 at 9:37am
 
**Disregard all my previous posts...I was an idiot and I was putting the baud rate at 112400 (like it says in the above post) instead of 115200
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print