2011-01-10 12:36:08     loading VisualDSP application with u-Boot

Document created by Aaronwu Employee on Sep 25, 2013
Version 1Show Document
  • View in full screen mode

2011-01-10 12:36:08     loading VisualDSP application with u-Boot

Matt Prewett (UNITED STATES)

Message: 97301   

 

I have ported u-boot to my board (SPI flash boot) and can now boot uClinux images without any issues.

 

Now I'm wanting to execute my own binary (in LDR format) which has been compiled with VisualDSP++ 5.0.

 

Previously, I have configured my VisualDSP project to include a bootloader (what it calls initialization file).  This creates an LDR file that can be programmed into SPI flash memory and boot from there.  From previous research, I don't think it is possible to include u-boot in the VisualDSP project in this manner.  I believe the only option is to build my VisualDSP project in a way that is compatible with u-boot.  Is that correct?

 

In an attempt to create a LDR file that is compatible with u-boot, I disabled the initialization file and rebuilt my project.  But when I load this LDR file (using LOADY command) and try to execute the binary (using GO command), it crashes.  Now when I read a bit more it seems I will need to use the splitter option (Project Options -> Load -> Splitter)

 

Is there some documentation that covers what I am trying to do here?  Basically, I want to have u-boot and my non-Linux application in SPI flash memory.  I want to configure u-boot to automatically load and execute my application.  u-boot is there primarily to allow the end-user to upgrade the application on their board.

 

Thanks in advance,

 

Matt

QuoteReplyEditDelete

 

 

2011-01-10 16:16:32     Re: loading VisualDSP application with u-Boot

Mike Frysinger (UNITED STATES)

Message: 97304   

 

did you try using "bootldr" ?

QuoteReplyEditDelete

 

 

2011-01-10 17:25:38     Re: loading VisualDSP application with u-Boot

Matt Prewett (UNITED STATES)

Message: 97309   

 

"bootldr 0x01000000" and "go 0x01000000" both resulted in immediate crash.

 

I assume this is an issue with my loader files and not u-boot.  Do you have any documentation on what VisualDSP settings are needed to create a LDR file that is compatible with u-boot?  For example, do I need to link my code so that it expects to be run at 0x01000000 rather than 0x0?

QuoteReplyEditDelete

 

 

2011-01-10 17:31:58     Re: loading VisualDSP application with u-Boot

Matt Prewett (UNITED STATES)

Message: 97310   

 

Correction - when I run "bootldr 0x0100000" after loading my *.ldr file to 0x01000000, I get the following output:

 

## No ldr image at address 0x01000000

 

 

 

When I run "go 0x01000000" after loading my *.ldr file to 0x01000000, I get the following output:

 

## Starting application at 0x01000000 ...

 

Ack! Something bad happened to the Blackfin!

 

SEQUENCER STATUS:

SEQSTAT: 00000021  IPEND: 0032  SYSCFG: ba3fa63f

  HWERRCAUSE: 0x0: undef

  EXCAUSE   : 0x21: undef inst

RETE: <0xe5571115> { ___umulsi3_highpart + 0xe3619af1 }

RETN: <0x01ebf220> /* unknown address */

RETX: <0x0100000c> /* unknown address */

RETS: <0x01f52b0e> { _do_go_exec + 0x26 }

RETI: <0x01f400d6> { _start + 0xd6 }

DCPLB_FAULT_ADDR: <0xffe01004> { __etext_l1 + 0x400ffc }

ICPLB_FAULT_ADDR: <0x0100000c> /* unknown address */

 

< snip - lots of trace messages indicating badness >

QuoteReplyEditDelete

 

 

2011-01-10 17:37:14     Re: loading VisualDSP application with u-Boot

Mike Frysinger (UNITED STATES)

Message: 97311   

 

running "go" makes no sense.  an LDR file is not directly executable -- it needs to be processed first.  think of "go 0" as "jump (0);".  you wouldnt attempt to jump to an ascii text file, right ?

 

as for the bootldr output, take that as a clue that your LDR isnt in the correct format.  you arent attempting to load an IHEX or something similarly useless to the hardware are you ?

QuoteReplyEditDelete

 

 

2011-01-10 17:59:44     Re: loading VisualDSP application with u-Boot

Matt Prewett (UNITED STATES)

Message: 97312   

 

I had read in another thread that bootldr would require binary format rather than intel-hex.  So I changed my Boot Format (under Project Options --> Load --> Options) from "Intel Hex" to "Binary".

 

Then I thought that I might need to change the start address from 0x0 to 0x01000000 (as it turns out, this isn't necessary), and this could not be modified when Boot Format was Binary.  It looks like I changed Boot Format to Intel Hex and then forgot to change it back to Binary.

 

After changing Boot Format to binary (I left Boot Mode = SPI since I did not see an option for SDRAM), the bootldr command detects the LDR and my application runs without any issues.

 

Thanks for the help!

Attachments

    Outcomes