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
|