Table of Contents
RedBoot
RedBoot is bootloader based on eCos Hardware Abstraction Layer. For more information look at http://sourceware.org/redboot/.
How to compile RedBoot
- choose Build→Templates
- choose your board – the name for reference board corresponds with table at reference design page
- choose redboot package – look at figure below
- on the following figure you can see a list of choices and peripherals corresponidng to your design
- save your generated RedBoot project
sw/user-projects
folder is used for this purpose
- build your redboot, Build→Library (F7)
- check your RedBoot was built correctly
- move to folder where your RedBoot is
[monstr@monstr ~]$ cd /home/projects/ecos/sw/user-projects/s3e1600-redboot/
- there are some generated folders
redboot_build
redboot_install
bin
folder containsredboot.elf
redboot_mlt
– memory layoutredboot.ecc
– project settings
- TIP add
xmd.ini
file to this folderxmd.ini
helps you with loading redboot to your boardxmd.ini
is not automaticky created by the configtool, you have to add it yourself or load RedBoot with XMD command
[monstr@monstr s3e1600-redboot]$ cat xmd.ini connect mb mdm dow redboot_install/bin/redboot.elf run exit
- before running xmd, setup your serial terminal first
- kermit serial terminal is recommended
- default baudrate for uart16550 is 9600 without flow control
- baudrate for uartlite is defined in MHS file
- load redboot into the board
- run
xmd
in project folder xmd.ini
is automatictly loaded, if it exists
[monstr@monstr s3e1600-redboot]$ xmd Xilinx Microprocessor Debug (XMD) Engine Xilinx EDK 9.2.02 Build EDK_Jm_SP2.3 Copyright (c) 1995-2007 Xilinx, Inc. All rights reserved. XMD% Info:AutoDetecting cable. Please wait. ... Info:Reusing A0060001 key. Info:Reusing 24060001 key. Info:Connecting to cable (Usb Port - USB21). Info:Checking cable driver. Info:File version of /opt/xilinx/ise92i/bin/lin/xusbdfwu.hex = 1030. Info:File version of /etc/hotplug/usb/xusbdfwu.fw/xusbdfwu.hex = 1030. Info: WinDriver v9.00 Jungo (c) 1997 - 2007 Build Date: Mar 27 2007 X86 32bit 22:31:22. PORT_INDEX = 0. CB_CABLE_COUNTER = 0. DeviceAttach: Cable found for usb21. Calling setinterface num=0, alternate=0. DeviceAttach: received and accepted attach for: vendor id 0x3fd, product id 0x8, device handle 0x9fcbda8 Info: Cable PID = 0008. Info: Max current requested during enumeration is 74 mA. Info:Type = 0x0004. Info: Cable Type = 3, Revision = 0. Info: Setting cable speed to 6 MHz. Info:Cable connection established. Info:Firmware version = 1301. Info:File version of /opt/xilinx/ise92i/data/xusb_xlp.hex = 1301. Info:Firmware hex file version = 1301. Info:ESN Family Code: 00 Info:ESN: 000000000000 Info:CPLD file version = 0012h. Info:CPLD version = 0012h. JTAG chain configuration -------------------------------------------------- Device ID Code IR Length Part Name 1 21c3a093 6 XC3S1600E 2 f5046093 8 XCF04S 3 f5046093 8 XCF04S 4 06e5e093 8 XC2C64A_VQ44_1532 MicroBlaze Processor Configuration : ------------------------------------- Version............................4.00.a MMU Type...........................No_MMU No of PC Breakpoints...............2 No of Read Addr/Data Watchpoints...0 No of Write Addr/Data Watchpoints..0 Instruction Cache Support..........on Instruction Cache Base Address.....0x22000000 Instruction Cache High Address.....0x23ffffff Data Cache Support.................on Data Cache Base Address............0x22000000 Data Cache High Address............0x23ffffff Exceptions Support................off FPU Support.......................off Hard Divider Support...............on Hard Multiplier Support............on - (Mul32) Barrel Shifter Support.............on MSR clr/set Instruction Support....on Compare Instruction Support........on Number of FSL ports................1 Connected to MDM UART Target Connected to "mb" target. id = 0 Starting GDB server for "mb" target (id = 0) at TCP port no 1234 System Reset .... DONE Downloading Program -- redboot_install/bin/redboot.elf section, .vectors: 0x00000000-0x0000016f section, .text: 0x2203e800-0x22054677 section, .rodata: 0x22054678-0x2205721f section, .data: 0x22057220-0x2205781f section, .bss: 0x22057820-0x220618c7 Setting PC with Program Start Address 0x00000000 Info:Processor started. Type "stop" to stop processor
- on your serial terminal you can see RedBoot output with prompt
+Emaclite_ETH - Warning! Using default ESA for 'emaclite' Ethernet eth0: MAC address 08:00:3e:28:7a:ba Can't get BOOTP info for device! RedBoot(tm) bootstrap and debug environment [RAM] Non-certified release, version v2_0 - built 21:30:37, Jun 11 2008 Platform: Spartan 3E1600 (Microblaze 4.0a) by ecos_v1.00.a Copyright (C) 2000, 2001, 2002, Red Hat, Inc. Copyright (C) 2008 Michal Simek <monstr@monstr.eu> RAM: 0x22000000-0x24000000, 0x220618c8-0x23ffffff available RedBoot>
- if you have uart16550 and uartlite in your design, you can see output on the both serial lines but for writing character you can use only uartlite, if you want to use uart16550, disable uartlite in configtool
Notes
- by default, IP address is obtained via BOOTP protocol
- if you don't have a DHCP server, you can set IP adress in the configtool manually
Know limitation
- you can't use bin image because elf file is assembled of two memory parts (BRAM and Main memory)
- bin file is thus huge1) and unusable – this choice is turned off
- if you have not enought space on your devel PC don't generate bin file
- proposed solution is to have filled
.vectors
section (in BRAMs) by RedBoot code
Future work
- add flash support
1)
Because it spans an address range from 0x0 – where BRAM is – to the address of your main memory, which dependson your HW configuration.