2011-10-09 21:43:27     May be wrong forum for this; boot loader/user program

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

2011-10-09 21:43:27     May be wrong forum for this; boot loader/user program

n a (UNITED STATES)

Message: 103756   

 

I couldn't find a better forum for this question so if there is please point me to it.

 

New to Blackfin, have programmed microcontrollers and other DSP type processors so comfortable with assembly level coding, etc. My target product will require bare metal programming therefor reading up on, well, everything.

 

Questions I have are on the boot and user program loading: Do I write my own boot loader to load the main program into user program SRAM then jump to the start of the code? Can this program code live in the same flash as the boot code? Is there a better way to do this?

 

Processors I've used in the past didn't seperate boot from user program space (think 8051 type) so I'm looking to learn best practice from the start. I am reading the manuals but there are 2000+ pages so gonna take a while, just trying to get a very basic idea of the h/w I will need and how it will be connected.

QuoteReplyEditDelete

 

 

2011-10-09 22:26:04     May be wrong forum for this; boot loader/user program

Akash Agarwal (UNITED STATES)

Message: 103757    > Hi,

 

I am also new to programming blackfin, so I am not very sure.

But the information you are looking for you can get from the default

linker script and the basiccrt file.

 

 

http://docs.blackfin.uclinux.org/doku.php?id=toolchain:bare_metal:startup

 

Hope the information helps you

QuoteReplyEditDelete

 

 

2011-10-09 22:58:46     Re: May be wrong forum for this; boot loader/user program

Mike Frysinger (UNITED STATES)

Message: 103759   

 

Blackfin itself supports booting LDRs out of flash, so you probably don't need to write your own boot loader

 

note that BF592 doesn't have a u-boot port because of its lack of external memory ...

QuoteReplyEditDelete

 

 

2011-10-10 12:43:42     Re: May be wrong forum for this; boot loader/user program

n a (UNITED STATES)

Message: 103773   

 

Thanks guys, I guess I missed that info, so much to read and learn on this processor. I am assuming that if the Blackfin boots the LDR out of flash the processor is left in supervisor mode, correct? The example I had read about leaving the processor in supervisor mode upon running the program in user RAM showed the code to allow this was in the boot code (at least I think it was, am now at day job and this project is for a side business so don't have pdfs here to refer to). In any case, more to read later.

 

Again, thanks for the replies, appreciate the pointer to the code and note on booting LDRs.

QuoteReplyEditDelete

 

 

2011-10-10 20:19:35     Re: May be wrong forum for this; boot loader/user program

Mike Frysinger (UNITED STATES)

Message: 103774   

 

yes, the LDR loads/executes in supervisor mode.  as to which IVG level exactly that is, it depends on the Blackfin variant, but iirc, all the recent ones (which means BF59x) should leave you in IVG15.

 

you will probably want to study:

http://docs.blackfin.uclinux.org/doku.php?id=bootloaders

QuoteReplyEditDelete

 

 

2011-10-11 00:41:51     Re: May be wrong forum for this; boot loader/user program

n a (UNITED STATES)

Message: 103776   

 

I found that page a little while ago and the link on it to http://docs.blackfin.uclinux.org/doku.php?id=bootloaders:bootrom showing all the boot modes really helps. Thanks for the replies, I think I'm getting a feel for the blackfin now and getting better at figuring out what to search for on the site.

Attachments

    Outcomes