hmm interresting.
Definatly gonna try it out. But i might have to learn some programming etc first.
Thanks for this post :-)
C Programming for the RS Media
Categories: Robot Hacks and Mods RS Media
If you're interested in trying your hand at some C programming for the RS Media, helibot over on the Robosapien.TK forums recently discovered that the Board Support Package for the MC9328MXL processor in the RS Media is available on a VMWare image intended for development of a different processor range.This is great news, and not just because Freescale pulled the BSP from their website towards the end of last year. Previously if you wanted to write some C programs for use with the RS Media you needed a linux box, and a fair bit of effort to set it up. Even though this makes it pretty easy to compile C programs for the RS Media, I still wouldn't recommend trying this to anyone who doesn't have at least a little knowledge about Linux, and some experience programing in C.
VMWare, for those of you who don't know, is a company that makes software that emulates another computer inside your computer. With the Linux image from Freescale and the free VMPlayer from VMWare, you can be up and running in no time, regardless of if you are using Windows, Mac or Linux.
First you will need the VMPlayer software for your computer, which you can download here, get the one appropriate for your OS. The Windows version is about 170 meg. Then you will need the Linux image from Freescale, which you can get here , its about 520 meg, and contains a complete Linux OS along with the tools required to compile C programs for the RS Media.
Once you have installed the player, and unzipped the Linux image, fire up the player and load the Linux image. After a few minutes booting you should have a login prompt. There are two users, vm_user (password vm_user) and root (password vm_root), you should only really need the vm_user account. Since the Linux image is setup for a different processor, you should really change the kernel source that things are being compiled against. First you need to extract the correct kernel source, so log in as vm_user and issue the following commands.
cd ~/BSP/MX1/mx1_rel_0.3.8/Kernel/Source/
tar -zxf Kernel.tgz
mv Source linux
For the last part, you will need to be logged in as root, so log out by pressing Ctrl-D and login back in as root.
cd /home/public
rm linux
ln -s /home/vm_user/BSP/MX1/mx1_rel_0.3.8/Kernel/Source/linux linux
You may be wondering how to get files in and out of the Linux image, fortunately the Linux image has file shares enabled, so fire up windows explorer and type the following into the address bar.
I've never really been too big a fan of the traditional "Hello World!" programs (though if you are, you can find one in tutorials/application), I prefer something a little more flashy. This file (click here to view), when compiled and run, will make your RS Media's LCD screen show a bunch of pretty colours. Transfer the file to the Linux image as described above, and then compile it with the following command.
Finally, there are two ways to transfer your newly compiled programs onto the RS Media. You can use an SD card, or if you have access to the serial console and a proper terminal program, you can use Z-Modem to transfer files (zmtx and zmrx are the Z-Modem programs on the RS Media). To really make use of any compiled programs, you are going to need to modify your RS Media to access the serial console. It is possible to run the programs you compile without serial access, you can use the rsupdate/rsupdateapp trick with an SD Card or you can call the programs from a macro. Without access to the serial console though, you will find it hard going, particularly if you program has a few bugs.
Good luck, and happy compiling.


RSS
