Re: Relocate from nor to ddr CE 5.0



That is the job of the bootloader; nothing special on the part of Platform
Builder. Your bootloader needs to have code that recognizes if the image is
targeted to flash, and if it is then the bootloader programs it. We can't
tell you if your bootloader supports the functionality, but if your BSP is
based on one of the reference designs that comes with PB then it probably
does.

--
Dean Ramsier - eMVP
BSQUARE Corporation


"fabio antonini" <fabioantonini@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E7A53157-0EF5-4826-AB79-F0CC2C83D1C9@xxxxxxxxxxxxxxxx
Hi Marteen
sorry for the delayed reply.
what do you mean when you say "to get it into flash"?
thanks for your feedback
fabio

"Maarten" wrote:

Hi Fabio,

what are you using to get it into flash? Is there a standard solution
from
platformbuilder?
--
Maarten


"fabio antonini" wrote:

Hi Marten
I faced the problem you are talking about. I have added the following
piece
of asm code at the end of the startup.s in the your OAL just before
jumping
into KernelStart section

;CUSTOM ADD - BEGIN
IF :LNOT: BOOTLOADER
IF :LNOT: IMAGE_NORAMRELOCATION

; Copy the nk image from flash to RAM. The image is configured
; to run in RAM, but is stored in flash. Absolute address
references
; should be avoided until the image has been relocated and the MMU
enabled.
;
; NOTE: The destination (RAM) address must match the address in the
; nk's .bib file. The latter dictates the code fix-up addresses.
;

; Check if we are running from NOR flash
mov r0, pc
ldr r1, =IMAGE_BOOT_NORDEV_NOR_PA_START
cmp r0, r1
blt CODEINRAM

ldr r1, =IMAGE_BOOT_NORDEV_NOR_PA_END
cmp r0, r1
bgt CODEINRAM

ldr r8, =IMAGE_BOOT_NKIMAGE_NOR_PA_START
ldr r1, =IMAGE_BOOT_NKIMAGE_RAM_PA_START
ldr r2, =(IMAGE_BOOT_NKIMAGE_NOR_SIZE / 16) ; NK image
length
(this must be <= the NK
; length in the .bib
file). We are block-copying
; 16-bytes per
iteration.

; Do 4x32-bit block copies from flash->RAM (corrupts r4-r7).
;
10 ldmia r8!, {r4-r7} ; Loads from flash (post increment).
stmia r1!, {r4-r7} ; Stores to RAM (post increment).
subs r2, r2, #1 ;
bne %B10 ; Done?


; Now that we've copied ourselves to RAM, jump to the RAM image.
Use
the "CodeInRAM" label
; to determine the RAM-based code address to which we should jump.
;
ldr r1, =IMAGE_BOOT_NKIMAGE_NOR_PA_START
adr r2, CODEINRAM
sub r2, r2, r1
ldr r0, =IMAGE_BOOT_NKIMAGE_RAM_PA_START
add r2, r0, r2
mov pc, r2
nop
nop
nop

CODEINRAM
; Now that we're running out of RAM
;
ENDIF
ENDIF
;CUSTOM ADD - END

adr r0, g_oalAddressTable
b KernelStart

Of course you have to define the IMAGE_NORAMRELOCATION macro in your
settings
please let me know your feedback
regards
fabio antonini

"Maarten" wrote:

Hi,

my freescale platform has originally been setup to run from NOR
(XIP), but
due to performance problems, I must move to DDR first.

Does anyone know what steps to make?
--
Maarten


.



Relevant Pages

  • Re: Relocate from nor to ddr CE 5.0
    ... it depends on the bootloader implementation; ... programmed into flash. ... but the image info says it belongs to ram. ... blt CODEINRAM ...
    (microsoft.public.windowsce.platbuilder)
  • Re: How to update OS image(nk.bin) while the OS is running?
    ... flash to ram without any processing. ... For saving the image to flash, you'll need some sort of driver, yes. ... Exactly what support is needed also depends on what the bootloader ... and a new NK.bin both stored in USB disk, when the OS is running, I ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Relocate from nor to ddr CE 5.0
    ... bootloader and let it think it is a flash image. ... but the image info says it belongs to ram. ... blt CODEINRAM ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Relocate from nor to ddr CE 5.0
    ... programmed into flash. ... but the image info says it belongs to ram. ... Your bootloader needs to have code that recognizes if the image is ... blt CODEINRAM ...
    (microsoft.public.windowsce.platbuilder)
  • RE: Relocate from nor to ddr CE 5.0
    ... I have used Platform builder with the "write to flash" option set. ... Eboot prompt but it will be launched in RAM. ... "fabio antonini" wrote: ...
    (microsoft.public.windowsce.platbuilder)

Loading