Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problem with writing a code on microblaze and running a uboot from flash

Status
Not open for further replies.

permute

Advanced Member level 3
Joined
Jul 16, 2010
Messages
918
Helped
295
Reputation
590
Reaction score
266
Trophy points
1,343
Activity points
8,543
I am having issues trying to put code on a microblaze and have it run.

My goal is to get uboot to run. linux can already run if I load it from jtag. uboot can also run from jtag. Now I want to get uboot to run from flash.

Thus far I've not been able to figure this out. The appnotes aren't very helpful on this topic. I've seen the following:
1.) write a bootloader that jumps to the location of uboot in flash.
2.) use xilinx's srec bootloader.

and "uboot" has three files, an elf, a bin, and a srec. I'm not sure which one to put in flash.

Thus far, my biggest challenge is that I also can't get the bootloader to work correctly. the srec bootloader from xilinx doesn't work from BRAM or JTAG. my bootloader doesn't run from a BRAM, but will run from jtag. unfortunantly uboot doesn't load. it jumps to 0x86E00000, which is where u-boot is in flash and after that, it fails to run u-boot (binary).

So in summary:
is there any way to get the microblaze to run an elf project at start? right now it just executes a few random instructions in a loop. Loading from JTAG gives different results (actually jumps to 0x86E00000).

What do I need to do? use u-boot SREC and the SREC bootloader? use a bootloader that jumps to flash and the u-boot.{src,bin,elf}?

---------- Post added at 23:26 ---------- Previous post was at 23:20 ----------

also, how do I put u-boot onto flash? I looked at the results from flash for where it thinks u-boot is, and compared it to the first lines of u-boot and they don't match any combination of bit-reversed, endian reversed, bit inverted, ect... the data on the flash just doesn't match the file I included with the mcs file. To make the mcs file, I used xilinx's wizard in impact, placing u-boot.bin at 0x00700000. When I build the file, it gives a warning saying that the location will be moved to 0x00E00000 because of the data bus width.
 

Re: microblaze and uboot

I've managed to get it working. the flash is bitswapped, and the SREC bootloader seems to work now.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top