EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Bootloader

Started by prashanthgr.1992 February 4, 2014
Hi all,
I am new to Embedded design industry.
I have some questions regarding C and bootloader.
1. What is the use of pointers, function pointers, structures, structure
pointer, array of structures, array of pointers, unions with respect to
embedded programming?
2. Why we need bootloader? What is the use of bootloader although we ve
debuggers for programming?
3. Why PBL and SBL?? Why not a single memory?

	   
					
---------------------------------------		
Posted through http://www.EmbeddedRelated.com
On 04/02/14 18:19, prashanthgr.1992 wrote:
> What is the use of bootloader although we ve > debuggers for programming
It is all explained here... http://bit.ly/1fELd5R
On 2014-02-04, prashanthgr.1992 <99090@embeddedrelated> wrote:

> I have some questions regarding C and bootloader. > > 1. What is the use of pointers, function pointers, structures, > structure pointer, array of structures, array of pointers, unions > with respect to embedded programming?
They are used the same way they are in non-embedded programming.
> 2. Why we need bootloader?
Maybe you don't. Some platforms use them, some don't. Whether you need one or not depends on your hardware and software architecture. Small embedded systems often don't have a bootloader.
> What is the use of bootloader
A bootloader initailizes the hardware and then loads/starts a second, larger application.
> although we've debuggers for programming?
No clue what you mean by that.
> 3. Why PBL and SBL?? Why not a single memory?
Don't know what you mean by that either. -- Grant Edwards grant.b.edwards Yow! Catsup and Mustard all at over the place! It's the gmail.com Human Hamburger!
On Tue, 04 Feb 2014 12:19:29 -0600, prashanthgr.1992 wrote:

> Hi all, > I am new to Embedded design industry. > I have some questions regarding C and bootloader.
> 1. What is the use of pointers, function pointers, structures, structure > pointer, array of structures, array of pointers, unions with respect to > embedded programming?
Mostly the same as desktop programming, although on a small embedded application your usage of all that is heavily shaped by the fact that you don't have a lot of memory or processor time to waste.
> 2. Why we need bootloader? What is the use of bootloader although we ve > debuggers for programming?
You don't _need_ a bootloader, per se. Often if you've got some really big software load (like linux with applications, or VxWorks, etc.) a bootloader makes your life easy. A shippable product does not have a debugger attached to it, any more than your average 18 year old kid still has an umbilical cord.
> 3. Why PBL and SBL?? Why not a single memory?
Presumably you are asking a question about a specific processor or board. This may sound odd, but not everyone here has used everything available. Perhaps this has to do with people having finite lifetimes. I suggest you either tell us more about what PBL and SBL are, or that you study the documentation for the product in which you've found those terms and see if you can figure it out for yourself. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Grant Edwards schreef op 04-Feb-14 7:36 PM:
>> 2. Why we need bootloader? > > Maybe you don't. Some platforms use them, some don't. Whether you > need one or not depends on your hardware and software architecture. > Small embedded systems often don't have a bootloader.
You interpret the term 'bootloader' as a minimal piece of software that always gets control at startup, and is responsible for the loading of the 'real' application. There is another interpretation, mainly for small microcontrollers with flash memeory. In this case the bootloader is a small piece of software that CAN be run at startup to load new content for the flash over some communication link, after which the chip can be reset another time, this time enabling the (new) application in flash. This second form of bootloader is very common on small micronctrollers, for instance all LPC ARM/Cortex UC's I know have a built-in serial bootloader, and some have an additional bootload option over CAN or USB. For this interpretation, an answer could be 'to facilitate in-field software updates'. Wouter
On 2014-02-04, Grant Edwards <invalid@invalid.invalid> wrote:
> On 2014-02-04, prashanthgr.1992 <99090@embeddedrelated> wrote: > >> 3. Why PBL and SBL?? Why not a single memory? > > Don't know what you mean by that either. >
Given the context from the other questions, my _guess_ would be the OP means Primary Boot Loader and Secondary Boot Loader. My _guess_ would be the PBL is the on-chip boot ROM and the SBL is something like the U-Boot SPL loader. Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world
On 04/02/14 19:19, prashanthgr.1992 wrote:
> Hi all, > I am new to Embedded design industry.
When you have homework questions, be honest about them. You are a /long/ way from being in any industry as yet.
On 04/02/14 19:51, Tim Wescott wrote:
> On Tue, 04 Feb 2014 12:19:29 -0600, prashanthgr.1992 wrote: > >> 2. Why we need bootloader? What is the use of bootloader although we ve >> debuggers for programming? > > You don't _need_ a bootloader, per se. Often if you've got some really > big software load (like linux with applications, or VxWorks, etc.) a > bootloader makes your life easy. > > A shippable product does not have a debugger attached to it, any more > than your average 18 year old kid still has an umbilical cord. >
I made a shipping product with a debugger still attached. I used an FTDI 2232C chip with one channel connected to the microcontroller's UART (for normal PC to board communication while running), and the other as a JTAG-style connection (BDM, to be accurate) to the microcontroller. While it didn't support full debugging, it supported "programming over the debugger" from the PC for downloading and updating the software. It worked very well, and is a method I could well use again - especially for ARM chips with OpenOCD running on the PC side.
prashanthgr.1992 wrote:
> Hi all, > I am new to Embedded design industry.
Get out while you can.
> I have some questions regarding C and bootloader. > 1. What is the use of pointers, function pointers, structures, structure > pointer, array of structures, array of pointers, unions with respect to > embedded programming?
Yes!
> 2. Why we need bootloader? What is the use of bootloader although we ve > debuggers for programming?
You don't need it since you use debugger.
> 3. Why PBL and SBL?? Why not a single memory? >
Some memory is more equal than other.
> > > --------------------------------------- > Posted through http://www.EmbeddedRelated.com >
-- Les Cargill
Les Cargill <lcargill99@comcast.com> writes:

> prashanthgr.1992 wrote: >> Hi all, >> I am new to Embedded design industry. > > Get out while you can. > >> I have some questions regarding C and bootloader. >> 1. What is the use of pointers, function pointers, structures, structure >> pointer, array of structures, array of pointers, unions with respect to >> embedded programming? > > Yes! > >> 2. Why we need bootloader? What is the use of bootloader although we ve >> debuggers for programming? > > You don't need it since you use debugger. > >> 3. Why PBL and SBL?? Why not a single memory? >> > > Some memory is more equal than other.
Vladimir, come back, we need you... -- John Devereux

The 2024 Embedded Online Conference