Re: update OS on custom device
- From: "Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT com>
- Date: Tue, 27 May 2008 09:55:36 -0700
Those are *all* device-specific questions. Usually, the bootloader is
responsible for doing flash image upgrades, so it doesn't have to "allocate"
memory; it's the only possible code using the memory so it just says, hey,
I'm going to use the X MB starting at address Y to store the image, so get
used to it! Same goes for the interrupts. The bootloader generally doesn't
enable interrupts at all, so no need to disable them.
You really can't partially write to flash if you're executing XIP. Think
about it. When you are executing code, you're constantly grabbing the next
few instructions from the flash to execute them. When interrupts are
enabled, you might be grabbing some code from application X, then driver Y,
then the kernel, etc., etc. Since writing to a flash region has to be done
a block at a time, you have to be able to assure that *NO CODE WILL BE
EXECUTED FROM FLASH* while that is happening. NONE. You can't do that when
using XIP and running with interrupts enabled.
Paul T.
"PaoloC" <PaoloC@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6286C649-FC1B-4B9F-9D27-9ABB46DD715C@xxxxxxxxxxxxxxxx
Good morning,
I have already seen a thread about OS update where the suggested operation
is :
"Easy to do if your OS is running from RAM. In case its XIP, you can
write an app which is loaded completely into RAM. This app should read
the update, turns off interrupts and erases/writes to flash directly."
I have to questions about this approach:
1) How can I allocate in my application enough memory to hold the new
image
(> 27 MB)
2) How can I disable inerrupts from application layer (may be an IOCTl to
a
custom driver ?)
Currently I am loading new image from external flash in chuncks and write
each chunck to the internal flash with interrupt enabled (just high
priority
thread).
Anyway this method is not reliable :-)
Best regards,
PaoloC
.
- Follow-Ups:
- Re: update OS on custom device
- From: PaoloC
- Re: update OS on custom device
- Prev by Date: Re: Wifi Zero Config not displayed with WinCE 5.0
- Next by Date: Re: Lap settings into Nk.bin
- Previous by thread: How to load display driver under CE6 without K flag?
- Next by thread: Re: update OS on custom device
- Index(es):
Relevant Pages
|