[ECOS] RedBoot loading eCOS examples causes PC reboot

Sergei Gavrikov sergei.gavrikov@gmail.com
Sun Oct 25 13:20:00 GMT 2009


Please keep your replies on the mailing list so that all may benefit.

Peter wrote:
> Hi Sergei
> 
> thank you for being so helpful. I understand that what I reported
> isn't an eCOS issue and rather has to do with
> Windows/Hyperterminal/FTDI drivers. 
> 
> I am happy to switch to Linux as I had several problems with the
> FTDI drivers under Windows. I would appreciate a few pointers
> regarding the selection of tools you recommend. I have installed
> openSUSE 11.1 and added obvious things like Eclipse, mercurial,
> python.

Hi Peter,

That's great. I hope that you will get a success with the target under
Linux more that you are unix veteran as I knew and I hope you will get
an enjoy with the modern unix-like environment (Linux) and open source
OS for embedded (eCos). I used Slackware a couple years ago and now
beeing no geek anymore :-) I use Ubuntu, but, openSUSE it is the great
distribution too! So, my proposals would be an apt-centric, but your
system is zypper-centric. Hope, someone will fix my faults.

> What I would like to know is:
> 1. Which GNU ARM toolchain do I install? Sourcery G++ Lite for ARM
> EABI?

That toolchain is built against newlib libc and eCos has own libc
implementation. There is ready-to-use eCos toolchain for ARM (and
other) targets on the eCosCentric FTP site:
ftp://ecoscentric.com/pub/ecos/gnutools/

You have to install this toolchain for the target
ftp://ecoscentric.com/pub/ecos/gnutools/i386linux/ecoscentric-gnutools-arm-eabi-20081213-sw.i386linux.tar.bz2

The toolchain is based on GCC 4.3 on it is well tested toolchain for
eCos v3_0/CVS. But, more proper way to install eCos is to use these
official proposals and eCos install script. Look here, please
http://ecos.sourceware.org/getstart.html

So, you have to install Tcl to get the stuff. On Ubuntu it's need to
install {tcl,tk}-dev packages with apt-get, and Google told me that
you need to do

$ sudo zypper install tcl tk tcl-devel tk-devel

and then run `sh ecos-install.tcl' as root (sudo sh) and you will get
eCos v3_0, configtool and the selected gnu toolchain(s) under /opt.
And how to install eCos from HG I wrote you a couple days ago. So, may
be you need only arm-eabi toolchain only from their FTP.

> 2. Where do I get the FTDI driver for the Olimex ARM-USB-OCD JTAG
> for Linux? How do I install it?

The below is the FTDI board related (no OpenOCD USB JTAG). The modern
Linux kernels have modules to manage FTDI devices. Just plug in your
board to USB port and then look on `dmesg' output.

$ gmesg | tail

and you'll get it.

or use lsusb utility

$ lsusb | grep -i future
Bus 005 Device 002: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

and at the end you should see new character device (on my Ubuntu that
will be ttyUSB0, I hope on openSUSE that will be the same)

$ ls -l /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 2009-10-25 13:01 /dev/ttyUSB0

And this character device can be used to interact with RedBoot on the
board via terminal program. As you can see I should belong `dialout'
group, but on SUSE that may be something another.

> 3. Do I need to install OpenOCD? If yes, which version? Do I need to
> build it?

Peter, nowadays I do not use OpenOCD with the board, it's enougth for
me to use the pair RedBoot+GDB for that target (your target has 1M RAM
and that is good amount of memory to use RedBoot), but, in a past I
had success with Olimex parallel JTAG wiggler and OpenOCD on Linux box
(well that openocd was built from sources). Today eCos/Redboot has not
native support for OpenOCD debugger. So, I would say, it is may be odd
to use JTAG for _your_ target. Seek on the list on the subject and you
will know about OpenOCD+eCos a bit more. I live without JTAG because I
can burn ROM images using own Expect script, i.e. program on-chip LPC
flash using LPC ISP commands via... /dev/ttyUSB0, e.g.

$ prog_lpc2xxx -file install/bin/redboot.bin -port /dev/ttyUSB0

Since I've used RedBoot I does not need JTAG/OpenOCD. If you want I
can put that script on bitbucket.

> Anything else you recommend? I haven't done development on Unix
> since 1992, so my knowledge is rather obsolete...

Perhaps, you need to install `minicom' (instead hyperterm) and may be
`lrzsz' package (x,y,zmodems utilities).

$ sudo zypper install minicom

Then prepare minicom rc script for the target

$ cat > ~/.minirc.olimex << EOF
pu port             /dev/ttyUSB0
pu baudrate         38400
pu bits             8
pu parity           N
pu stopbits         1
pu rtscts           No 
EOF

And use `minicom' with the board (~ HyperTerm), `man minicom'.

$ minicom -o olimex ;# run then press RST on the board.

Eclipse... I'm sorry, I do not use this IDE. The gdb, gdb-tui is
enough for me, this is a good intro http://beej.us/guide/bggdb/

To develop on Linux you need to have more stuff is got with zypper,
i.e. to install some host's development tools, gcc, g++, autotools,
etc. if you plan to use eCos from CVS/HG and build the latest eCos
host tools from the sources. Wellcome to Open Source World!

Well, on Ubuntu that's easy enough

$ sudo apt-get install build-essential

What's I found for openSUSE
http://forums.opensuse.org/applications/413553-build-essential.html

$ zypper se -t pattern devel

and it seems for me those `devel_basic', `devel_C_C++' will be good
choices for start. But, may be you have those packages installed.

Peter, and at the end, all eCos/RedBoot documentation is your friend
http://ecos.sourceware.org/docs-latest/
and sure the eCos mailing list archives (it is searchable stuff)
http://ecos.sourceware.org/intouch.html
and Google as well are too.

HIH

Sergei

> Thanks
> Peter

[snip]

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list