MicroBlaze in Spartan 3 playing tuxchess :)

Hi

having MicroBlaze to boot uClinux to command prompt sure is nice also but seeing it running graphical tuxchess is even better !

afterwards it seems always so simple, here are the steps to do it:

1 make EDK 8.1 MicroBlaze system (W32 host) 2 TFT LCD ref from Ml300 ref design (needs tweaking in EDK to enable PLB bus for Spartan 3 architecture) 3 build uClinux (only step that requires linux machine or emulator!) 3 get CYGWIN 4 get GNU C source for MB from Xilinx 5 run build scritps to build the toolchain 6 get u-boot sources 7 add framebuffer support for u-boot (really simple!) 8 add MMC/SD card support to uboot (also simple) 9 build u-boot 10 add MMC driver to ucLinux, rebuild kernel 11 copy linux.bin, libc.a and some .h files from tree into W32 machine 12 setup Out of tree compile make file 13 get microwindows sources 14 setup custom makefiles for microwin 15 fix graphic driver for microwindos (maybe 20 lines of code changes!) 16 build microwindows drivers and nano-X server objects 17 build tuxchess 18 copy tuxchess into romfs\bin\ 19 copy chess images into some location on the romfs 20 run genromfs (all on W32 machine!) 21 copy /b linux.bin + ronmfs.img image.bin 22 copy image.bin onto SD card 23 insert SD card and reboot FPGA

and here it goes.. .. preboot loader reads u-boot into SDRAM .. u-boot starts and loads image.bin .. uClinux prompt appears

tuxchess

and voila you have the Chess game on the TFT LCD

simple uhh ?

- actually it is simple, after doing it once

Antti

Reply to
Antti
Loading thread data ...

No Smiley ?

I might not call the above simple, but I would call it impressive.

-jg

Reply to
Jim Granville

Who won ? :)

-jg

Reply to
Jim Granville

ROTFL - the computer won!!

with greate opening move: E2E4 !!!

because I have no input device configured in microwindows so I cant respond...

Antti

Reply to
Antti Lukats

Hi Jim,

here is the similey ;)

well, as said after doing it once it all looks like real simple. but sure the way to the point when it all worked wasnt so simple at all.

what I have been positivly been surprised is that a lot of C code actually works without change, as soon as you have the proper makefiles and libs and defines in place ;)

this goes for uclinux, u-boot and userland apps, etc

also CYGWIN is doing a great deal better now supporting C compilers on W32

xilinx GNU tools actually compiled out of box, I only had to adjust location of tcsh

genroms also works also with symlinks making valid romfs image

uclinux kernel build on w32 also works, but with some issues on one PC kernel was build ok but required some directory include tweakinga and removing most of userland, on another PC out of box uclinux build worked til core dump during busybox make having however no issues except during busybox build.

anyway its quite close to get microblaze-uclinux fully built on w32 host.

sure I still do the actual kernel builds on linux host still (real linux box, not emulator)

been trying to setup CoLinux several times, always casued network issues, tried 0.6.3 from free downloads, did not work, then purchased Open Colinux tha is supposedly easy install version of CoLinux, but this easy install installed without asking a VNC server and made all my email and networking not working.

I have been looking at CoLinux in order to make disk images with pre installed uClinux toolchain and sources, but, well lets see maybe I try again CoLinux (after seeing the commercial packaged version to fail real badly)

what I was really amazed was the easiness of the adoption of the graphic drivers for microwindows

I did take the empty donthing debug driver and inserted single line calls to the xilinx tft_l.h and that was it, it worked !!! in u-boot it was about as simple as well, but for some reason in uboot the graphic logo doesnt show at start even though graphics load and display is all working

Antti

Reply to
Antti Lukats

Hi Antti,

I also had some issues with CoLinux and the TAP network driver. I found out that under Win2K the trick is to start CoLinux first and then set up the bridge, it fails if you do it the other way around. On my laptop (WinXP) it worked out of the box, you just have to enable the share for the TAP driver (don't use the bridge option) and adjust your firewall, it is quite nice to have a "Cygwin type of DOSbox" which can run Linux binaries :-)

I have documented the procedure here although as one would say, YMMV,

formatting link

Hans

formatting link

Reply to
Hans

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.