User:JulienC

From ArmadeusWiki
Revision as of 00:01, 4 March 2009 by JulienC (Talk | contribs) (Change Ethernet MAC address)

Jump to: navigation, search

My name is Julien and I am a French engineer in embedded systems. My interests are in FPGA programming and embedded Linux. I will try to share my experiments on this wiki.

I am new in the FPGA world. I will try to learn and share as much as I can.

Blinking LED

Goal: Make a LED blink.

I used the LED blinking page VHDL code to generate the FPGA binary file with Xilinx ISE. (more details are needed on this wiki to generate .bit files)

On the hardware side, I connected the 2 FPGA pins L28P and L28N to a breadboard with wires. Those 2 pins are accessible on the DevLight bottom, as mentioned on the datasheet, page 9. Those 2 pin-holes are too small to solder "conventional" pins, so my set-up is quite unstable. I need to make it more robust.

On the software side, I don't want (yet) to flash my board with a new software, so I am using the default one provided (Linux kernel 2.6.27.2). Moreover I want to load the FPGA from Linux (and not from U-boot). I set-up a microSD card to transfer my files. to load the FPGA binary file, in addition to the .bit file, I needed the fpgaloader driver script which seems not to be by default on the board.

After booting the board, I use the following commands:

 # mount -t ext2 /dev/mmcblk0p2 /mnt/mmc
 # cd /mnt/mmc/root/
 # ls
 Clk_div_led.bit  fpgaloader.sh
 # sh fpgaloader.sh
 fpgaloader module v0.0.6 successfully loaded !
 # dd if=Clk_div_led.bit of=/dev/fpga/fpgaloader
 255+1 records in
 255+1 records out

And it blinks!


Change Ethernet MAC address

(TO BE detailed) http://armadeus.svn.sourceforge.net/viewvc/armadeus/trunk/buildroot/target/u-boot/u-boot-1.3.4-111-apf9328-DM9000.patch?revision=1009&view=markup line 68+

U-boot:

BIOS> setenv ethaddr ff:ff:ff:ff:ff:ff
BIOS> ping 1                          
Warning: MAC addresses reprogramming..
MAC: ff:ff:ff:ff:ff:ff                
operating at 100M full duplex mode    

Abort
ping failed; host 1 is not alive
BIOS> setenv ethaddr 00:1e:ac:XX:XX:XX
BIOS> ping 1                          
Warning: MAC addresses reprogramming..
MAC: 00:1e:ac:XX:XX:XX                
operating at 100M full duplex mode    

Abort
ping failed; host 1 is not alive
BIOS> 

Linux boot:

[...]
dm9000 Ethernet Driver, V1.31                                                                                             
eth0: dm9000e at c1854000,c1856002 IRQ 110 MAC: 00:1e:ac:xx:xx:xx (eeprom)
[...]
# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:1E:AC:XX:XX:XX
          inet addr:192.168.0.10  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::21e:acxx:xxxx:xx/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:468 (468.0 B)
          Interrupt:110 Base address:0x4000

Notes

Booting from SD card: (links, not tried yet)