=_NextPart_000_0007_01C3BD70.5B2A6E00 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Well, maybe I am doing it totally wrong. Let me explain how I set it up:
- I have a directory with mhs, mss files code etc (lets call it = bootldr). This is the directory for the bootloader. The bootloader = should do nothing with xilkernel.
- The bootloader should run in BRAM.
- I have a seperate directory for my final application (lets call it = appl) it's at the same level as the bootldr directory. The directory has = its own makefile and code, but no mhs, mss file etc. because it's using = the same architecture as the bootloader (this is why the xilkernel = library block is placed in the mss file of the bootloader). The = application will use the xilkernel facilities (threads, semaphores = etc.).
- The application should run in SDRAM.
- The makefile for the application is like this:
CC=3Dmb-gcc AR=3Dmb-ar
CFLAGS =3D -O2 -g
SRC =3D ../src INC =3D ../include OBJS =3D appl.o hwinit.o debug.o hal.o leds.o crc.o can_sja1k.o irq.o = pci.o pecx.o threads.o \ can.o timer.o
TOPDIR =3D ../mblaze/code SYSTEMDIR =3D ../bootldr/mblaze INCLUDEDIR =3D $(SYSTEMDIR)/include LIBDIR =3D $(SYSTEMDIR)/lib INCLUDES =3D -I$(INCLUDEDIR) -I$(INC) LIBS =3D -L$(LIBDIR) -L$(TOPDIR)
LIBRARIES =3D -lw
# Linker options for the elf file LFLAGS =3D -xl-mode-xilkernel -Wl,-defsym =
-Wl,_TEXT_START_ADDR=3D0xA0000000 VPATH =3D $(SRC)
all: @echo "Makefile to build application which runs on SDRAM" @echo " - SDRAM base address: 0xA0000000" @echo " - application is placed in SDRAM by bootloader" @echo "" @echo "Usage: make appl"
appl: $(OBJS) makefile $(INCLUDEDIR)/xparameters.h $(CC) $(CFLAGS) -o appl.elf $(OBJS) $(LFLAGS) $(LIBS) $(LIBRARIES) @echo "appl.elf created at location 0xA0000000"
%.o:%.c $(CC) $(CFLAGS) -c $< -o $@ $(INCLUDES)
%.o:%.s $(CC) $(CFLAGS) -c $< -o $@=20
clean: rm -f $(OBJS) *.elf
$(INCLUDEDIR)/xparameters.h: $(error Make sure you have built the libraries for the bootloader)
So, in my opinion, the application is linking the xilkernel stuff by use = of the -L option in the LIBS variable. The bootloader is not linking = xilkernel stuff, because it does not use anything from the kernel (no = threads or something else) or am I wrong at this point and is something = linked automatically when using the xilkernel library in the mss file? = Could you tell me if I have to define the process_table parameter in the = mss file in the described situation or not at all?!
0xA0000000 -> transfers control to it. And the app seems to be = configured as a stand-alone executable (not linked to xilkernel).=20 Frank wrote:=20
So when the bootloader is started, the xilkernel automattically = tries to start executing the code at address 0xA0000000?! But in my case = there is no application at startup! I first have to download it and then = I jump from the code in the bootloader to the address of the application = (0xA0000000). Thus, if I understand it correctly, I MUST remove the = process_table parameter of the mss file?! (The bootloader should do = nothing with xilkernel stuff, only my application is using it).Frank