[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: jump at boot
> > The code is actually linked to run from DRAM,
> > but in the beginning it is really executed from flash
> > so you must use position independent code
> > /Johan
> I wish i could say it worked... A gave it a try changing the
> linkerscript arch/cris/boot/compressed/decompress.ld for linking to
> flash (0x00000) instead of ram (0x40700000) but with no luck. Sure it'll
> break many things but I modified my last attached file to give
> "heartbeats" via the yellow network led on the board. It works with
> branch but not jump nor jsr. Se modified version below (at mid area).
Changing the origin to address 0 will obviously not work since the
decompressor (typically) isn't located at the start of the flash.
for a decsription of the layout in flash.
Just do as Johan said instead, i.e. avoid jump and jsr until after
the code has copied itself to DRAM.