Re: mc68332 embedded programming problems



Amateur.N7TZG@xxxxxxxxx wrote:

Hi all,

I am trying very unsuccessfully to load my code from my Flash into ram,
and then jump to ram. I am finding 2 issues:
1. I can only load so many bytes to ram before the system resets.

This is not understood. Why does the system reset ?
Is there a watchdog ?

2. when i make a jump to the code in ramspace, the chip wanders off
and gets lost, not knowing where it is going. I have examined ram
memory through the bdm port, and I find that the instructions are there
just before the jump, but it hangs up when I jump.

Yes, this stuff is tricky. Consider interrupts,
consider the stack, what code is loaded to RAM ?
Was the code linked to run at the specified location ?
With absolute or relative jumps within the code ?
Are there segment registers ?

Rene
--
Ing.Buero R.Tschaggelar - http://www.ibrtses.com
& commercial newsgroups - http://www.talkto.net
.



Relevant Pages

  • Re: Confused about Flash
    ... doing the flash and hope the power stays on. ... code from Flash to the RAM, jump to it, and when it is ... copied from the flash to the RAM is on a different adress, ... or that you add to the linker script yourself. ...
    (sci.electronics.design)
  • Re: Confused about Flash
    ... doing the flash and hope the power stays on. ... code from Flash to the RAM, jump to it, and when it is ... copied from the flash to the RAM is on a different adress, ... or that you add to the linker script yourself. ...
    (sci.electronics.design)
  • Re: nk.nb0 startup prolems
    ... "Michael Schaffner, P.E." ... location of the jump instruction, but not what it jumps to (which is the ... > build-to-build (which would mean your always swapping in different FLASH ... RAM, not Flash. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: copy function and run it
    ... jump to it. ... The executing function then copies a vxworks image ... A compiler could have optimized your function away as a dead code. ... Make sure that the location in the RAM is not used by anything else. ...
    (comp.arch.embedded)
  • Cannot call C function in "Simple" boot loader
    ... The vxworks boot loader can load the "Simple" boot loader and ... so when comparing a RAM address to a Flash address ... * relocation to work when the load address is in Flash. ...
    (comp.os.linux.embedded)