DSPRelated.com
Forums

How to create ldr file without a loader kernel, 21065L

Started by John Henry March 7, 2005


Hi,
I have a situation where I want to generate a file in loader format,
BUT, without a loader, and only includes the program code in loader
format (e.g. tagged so a boot loader type code can decode it and put
it into its respective memory type and location)

My situation is as follows:
I have a single 21065L, using an external flash memory. In the Flash
memory, I will program different "product codes".

Upon reset, depending upon different HW input configurations, I want
to be able to run a different set of "product code".

Some of the different "product codes" already fill the entire
available code/data space of the 21065L. So I can't combine all of the
different scenario codes into one, I have to be able to run more than
one from the same Flash.

I have written a "custom boot" program that does include the default
kernel, and utilizes input pins to determine which "product code" is
desired, and also allows for reprogramming of each of the "product
codes" independently. This "custom boot" code is written and already
works, figures out what configuration is expected, and then lights an
LED to indicate such.

My current approach for each of the "product codes" is to build a
loader file with the default kernel. Manually edit the loader hex
file, and delete the lines including the default kernel, so that I am
left with the hex code for lines startng at memory location 062a
onwards to the end of the file. I then run a differnt program to
change the memory locations at which these lines will be stored into
flash.
I then program the flash in those memory areas for that specific
"product code".
I have performed these steps, and beena ble to get the entire process
to work. e.g. including burning in the "custom boot", seting the HW
configuration so that I can choose a "product code", programming into
flash through the "custom boot" each of the "product codes", and
execute each of the "product codes" via the "custom boot" which has
the tag decoding of the default kernel included.

If I have it working? what do I want to change?
I want to get the whole process to work automatically, without the
manual step of deleting out of a "product code" loader file the loader
code.
So my question, after all of this verbose story, is how do I create a
loader format file witout a loader?
Can't use a method of using a custom kernel, as it stil defaults to
the same method of having to manualy delete lines. I'm looking for
automation, so that I can run a command line to do the build, moving
of product code to its proper flash memory location, etc., without a
human manual step.

Restrictions:
-each product code can fill available memory, so I can't combine them.
-decision of which product code to run is based on HW configuration,
working already.
-only one 21065L, so no multi-boot to worry about
-MS lines are all allocated to other HW, so I can't external memroy
execute.
-

Appreciate any insight and help,

Thanks,
John Henry





I've done this in 2 different ways.
I have written a C program which I run after I run the elfloader, that
strips off the boot loader. This works very well since I never
compile using the GUI. I always use a makefile or batch file.
I have also written my custom boot loader such that it ignores the
additional bootloader that is stored in memory.

Dan --- In , "John Henry" <jshenry1963@y...> wrote:
>
>
> Hi,
> I have a situation where I want to generate a file in loader format,
> BUT, without a loader, and only includes the program code in loader
> format (e.g. tagged so a boot loader type code can decode it and put
> it into its respective memory type and location)
>
> My situation is as follows:
> I have a single 21065L, using an external flash memory. In the Flash
> memory, I will program different "product codes".
>
> Upon reset, depending upon different HW input configurations, I want
> to be able to run a different set of "product code".
>
> Some of the different "product codes" already fill the entire
> available code/data space of the 21065L. So I can't combine all of the
> different scenario codes into one, I have to be able to run more than
> one from the same Flash.
>
> I have written a "custom boot" program that does include the default
> kernel, and utilizes input pins to determine which "product code" is
> desired, and also allows for reprogramming of each of the "product
> codes" independently. This "custom boot" code is written and already
> works, figures out what configuration is expected, and then lights an
> LED to indicate such.
>
> My current approach for each of the "product codes" is to build a
> loader file with the default kernel. Manually edit the loader hex
> file, and delete the lines including the default kernel, so that I am
> left with the hex code for lines startng at memory location 062a
> onwards to the end of the file. I then run a differnt program to
> change the memory locations at which these lines will be stored into
> flash.
> I then program the flash in those memory areas for that specific
> "product code".
> I have performed these steps, and beena ble to get the entire process
> to work. e.g. including burning in the "custom boot", seting the HW
> configuration so that I can choose a "product code", programming into
> flash through the "custom boot" each of the "product codes", and
> execute each of the "product codes" via the "custom boot" which has
> the tag decoding of the default kernel included.
>
> If I have it working? what do I want to change?
> I want to get the whole process to work automatically, without the
> manual step of deleting out of a "product code" loader file the loader
> code.
> So my question, after all of this verbose story, is how do I create a
> loader format file witout a loader?
> Can't use a method of using a custom kernel, as it stil defaults to
> the same method of having to manualy delete lines. I'm looking for
> automation, so that I can run a command line to do the build, moving
> of product code to its proper flash memory location, etc., without a
> human manual step.
>
> Restrictions:
> -each product code can fill available memory, so I can't combine them.
> -decision of which product code to run is based on HW configuration,
> working already.
> -only one 21065L, so no multi-boot to worry about
> -MS lines are all allocated to other HW, so I can't external memroy
> execute.
> -
>
> Appreciate any insight and help,
>
> Thanks,
> John Henry





John Henry wrote:
...
> My situation is as follows:
> I have a single 21065L, using an external flash memory. In the Flash
> memory, I will program different "product codes".
>
> Upon reset, depending upon different HW input configurations, I want
> to be able to run a different set of "product code".
...
> Appreciate any insight and help,

John, that sounds like an awfully complicated way of achieving your
desired result. Wouldn't it be much simpler using memory overlays?

It would work something like this: At boot time, the loader loads the
main program. The main program then executes the function indicated
by the "product code" - loading the appropriate code from flash is
then done automatically by the overlay manager.

Regards,
Andor



We load our code from a host, so we can upload a completely different
program at any time.

At 04:13 PM 3/13/2005, andor_bariska wrote:
>John Henry wrote:
>...
> > My situation is as follows:
> > I have a single 21065L, using an external flash memory. In the Flash
> > memory, I will program different "product codes".
> >
> > Upon reset, depending upon different HW input configurations, I want
> > to be able to run a different set of "product code".
>...
> > Appreciate any insight and help,
>
>John, that sounds like an awfully complicated way of achieving your
>desired result. Wouldn't it be much simpler using memory overlays?
>
>It would work something like this: At boot time, the loader loads the
>main program. The main program then executes the function indicated
>by the "product code" - loading the appropriate code from flash is
>then done automatically by the overlay manager.
>
>Regards,
>Andor >
>

Steve Holle
Link Communications, Inc.
1035 Cerise Rd.
Billings, MT 59101



Hai John Henry,
Well we have an option for loading multiple dxe files in BF533 EZ KIT
LITE as given in one of the EE Note why dont you search for the same
or try the same i think it can be done even for your specific
processor. The selection of the code will be dependant on the PF on
the board in EZ kit lite

Please Chek this out

Bye
With Regards
Yuvaraj On Mon, 14 Mar 2005 07:55:21 -0700, Steve Holle <> wrote:
>
> We load our code from a host, so we can upload a completely different
> program at any time.
>
> At 04:13 PM 3/13/2005, andor_bariska wrote: >
> >John Henry wrote:
> >...
> > > My situation is as follows:
> > > I have a single 21065L, using an external flash memory. In the Flash
> > > memory, I will program different "product codes".
> > >
> > > Upon reset, depending upon different HW input configurations, I want
> > > to be able to run a different set of "product code".
> >...
> > > Appreciate any insight and help,
> >
> >John, that sounds like an awfully complicated way of achieving your
> >desired result. Wouldn't it be much simpler using memory overlays?
> >
> >It would work something like this: At boot time, the loader loads the
> >main program. The main program then executes the function indicated
> >by the "product code" - loading the appropriate code from flash is
> >then done automatically by the overlay manager.
> >
> >Regards,
> >Andor
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
>
> Steve Holle
> Link Communications, Inc.
> 1035 Cerise Rd.
> Billings, MT 59101
> >