Maker Pro
Maker Pro

mc68332 embedded programming problems

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.
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.

Any help would be greatly appreciated.

Rob McPherson
[email protected]
 
R

Rene Tschaggelar

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
 
Well, I fixed the first problem, it being a watchdog issue. Sorry
about that part. The second is still an issue. Any help would be
greatly appreciated.

Rob McPherson
 
Top