Hi Folks,
In advance - sorry for the long post. But I hope it would be helpful
for those who will try to do the same. Also, please take in
account that this was my first real experience with OE and
Angstrom, so I might be doing something just wrong. So
please bear with me .
I spent last week trying to bring up Trainer board from Tincan
Tools connected to BB C3 and would like to summarize my
experience. There are also some unresolved issues remain
so I would be glad to get some hints.
My goal was to use I2C level translation functionality to control
motors and to make sure that i can use Arduino software with AVR
micro-controller (to collect some sensor data).
To communicate with AVR, avrdude was necessary, which is not
available in OE, but it is a story on it's own . I compiled it myself
and can share the experience (and .bb recipies) if someone is
interested.
So I basically tried three configurations.
1. Using demo images offered here [1]
It works very well. Boots fast, all required GPIO pins are
available under /sys/class/gpio. However, avrdude was unable to
talk to AVR so I assumed that there is no Arduino boot loader and
it needs to be flushed. All my attempts to do it from
BeagleBoard (BB) was unsuccessful. So I flashed AVR with Dragon
programmer. After that avrdude on BB was able to talk to AVR as
expected and LED blinking program works fine.
Conclusions:
- AVR need to be flashed using external programmer to be Arduino
software compatible.
- Provided images [1] work good but very minimalistic and are
only useful to test that hardware works. That is why I decide
to build own kernel and image.
2. Angstrom from stable brunch.
Does not work well, i.e. Trainer board was recognized as Zippy,
no power supplied to AVR, avrdude cannot talk to AVR, no relevant
entries in /sys/class/gpio, etc. On this list I was told that
newer version of u-boot is necessary to ensure correct
pin-muxing (thanks Koen and Dave!). In addition, EPROM on Trainer
board contains incorrect data and need to be re-flashed to be
recognized as Trainer and not as Zippy2.
With latest u-boot and reflashed EEPROM, the board is recognized
as Trainer. However there are still no corresponding entries in
/sys/class/gpio . Some GPIOs can be exported by doing echo PIN_NO
export but not all. For example pin 162 is not accessible even
after doing echo. It is sad because it is useful to power-cycle
AVR. Avdude still can not talk to AVR.
What is even worth is that for some reasons with new u-boot the
whole system become *extremely* slow. In addition error messages
sometimes printed on console (something like "please flush write
request... irq_number" - I do not remember exactly but can
reproduce it if necessary). Basically it is impossible to work
with the system because it is extremely slow.
Conclusions:
- I was unable to use Trainer with stable Angstrom version.
- With latest git version of u-boot the system is extremely slow
and avrdude still can not talk to AVR.
3. Angstrom unstable
3.1 With corresponding (new) u-boot
Similar to the stable - very slow system (or even slower). Boot
takes ages. In addition very unstable. Kernel prints "division by
zero" and other thread crashes badnesses during boot. Even if you
are lucky and manage down to login prompt, keyboard is not always
working. If you are even more lucky and can log in, after certain
period of time the system will crash anyway printing the message
very similar to what is mentioned here [2]. I was pointed that it
might be power supply issue. Switching to external PSU does not
helps a lot. Maybe just a little bit.
As a positive aspect - avrdude can talk to AVR "out of the
box". Still no gpio entries in /sys.
3.2 With u-boot from [1]
After hours of frustration I decide to experiment mixing what is
works with what would be nice to have, i.e. well functioning
configuration 1 with latest kernel/image from unstable. I found
out that using unstable Angstrom with u-boot from [1] is the best
combination. In particular - works fast as expected. Pretty
stable. Avrdude can talk to AVR. Still no additional gpio entries
in /sys as in configuration 1.
Conclusions:
- unstable Angstrom with provided new u-boot is very slow and
unstable.
- unstable Angstrom with u-boot from [1] shows the best results
out of all configurations I was trying. Currently I decide to stick
with this configuration.
What I am wondering is how u-boot and kernel image at [1] was
built? Are sources for exactly this version available somewhere?
I assume they should be (GPL?) but I did not found them. It would
be very interesting to find out what exactly leads to the case
where pinmuxes was done in the right way and corresponding
entries in /sys are created. I would really appreciate if someone
can help to find out why it is not the case with latest unstable.
Well, that is basically it. I can provide more details on each
aspect but the post is already rather long (sorry about that
). Nevertheless, I hope it will be helpful for other BB/Trainer
warriors
Regards,
Andrey.
[1] BeagleBoard Trainer - eLinux.org
[2] http://groups.google.com/group/beagleboard/browse_thread/thread/70914fbc41c625d9