This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: small custom bootloader to start an app stored in flash
- From: Oleg Uzenkov <o dot uzenkov at unicore dot co dot ua>
- To: Sergei Gavrikov <sergei dot gavrikov at gmail dot com>
- Cc: eCos Discussion <ecos-discuss at sourceware dot org>
- Date: Fri, 24 Oct 2014 12:13:31 +0300
- Subject: Re: small custom bootloader to start an app stored in flash
- Authentication-results: sourceware.org; auth=none
- References: <544618E5 dot 90101 at unicore dot co dot ua> <CAPrjMDAi=cqTSQ-d-c9FF53W-c6=v0j8rzSLQfuTcBQUY43Zpw at mail dot gmail dot com> <54479031 dot 9080106 at unicore dot co dot ua> <CAPrjMDCiZ0Lkwfgv=dfw8fhjmZXjeLAdgHSiiK9o6RZXLM-G=g at mail dot gmail dot com> <5447C1D0 dot 3070906 at unicore dot co dot ua> <CAPrjMDBeetQ+sEYswv7dF=bcFuqpjpqOhtjfNBC+oMFuXzT_8A at mail dot gmail dot com> <CAPrjMDCdT9ddPowRvQmaKh396tYwt7yWLzKNQB+83Asi0f71jw at mail dot gmail dot com> <544918B9 dot 7000601 at unicore dot co dot ua> <alpine dot DEB dot 2 dot 00 dot 1410232338250 dot 7986 at sg-laptop> <544A0349 dot 9020702 at unicore dot co dot ua> <alpine dot DEB dot 2 dot 00 dot 1410241058110 dot 4666 at sg-pc dot belvok dot com>
Thanks,
I will give it a try with ROM builds.
On Fri, 24 Oct 2014, Oleg Uzenkov wrote:
Redboot is a great piece of software. It is just I found that when you
enable some important features like FIS support, Redboot reserves
extra space in RAM memory.
The size of this reserved extra space in RAM equals to the size of the
largest section size in Flash. In case of stm32f407 it is 128KB.
Internal RAM is 128KB. As John Dallaway pointed out there is very
little sense in using Redboot without enough of external RAM on
stm32f4 devices. For example for Kinetis it is a different story, the
flash sections are uniform and quite small.
For small systems external RAM chip significantly adds up to the cost
of a device.
I understand John's point and agree with him. But, he told about using
debug infrastructure of RedBoot (debugging eCos applications in RAM).
But, RedBoot is *debug* and *bootstrap* environment for eCos. I pointed
on another side of RedBoot, *bootstrap*. You can quite run eCos [ROM]
builds from FIS.
FIS support requires 128KB of ram on stm32.
Those [ROM] applications may utilize all RAM (128K +
64K) on your target. On start ROM application just does overlay RedBoot
memory. You saw that yesterday with Rainer's approach (exec). If you
cannot manage run [ROM] applications with RedBoot command 'go', just
implement one new command for RedBoot, e.g. 'xip' (as RedBoot already
uses 'exec' name to run Linux kernel).
As far as I understand, 'go' command should work in theory as it sets
program counter (pc) to the address of Entry point (not sure about stack
pointer).
To make a jump we need to set stack pointer and program counter. And
this can be implemented inside a new 'xip' command.
RedBoot will let you to use
FLASH I/O, load any images, use start scripts, etc., etc. Of course it
is my opinion only.
Sergei
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss