Problems with the m32c target and M16C6N cpu
DJ Delorie
dj@redhat.com
Sat Sep 3 15:35:00 GMT 2005
The most likely problem is that you're not providing a reset vector
that points at your program, so the board doesn't know the starting
location (neither kd30 nor the flash program honor the "start address"
s-record). I should probably have the tools do that automatically.
With the tools you have, create a reset.S file that looks like this:
.section ".resetvec","a"
.word _start
.text
and add that to your compile line.
I just checked in a fix yesterday that lets you do this:
typedef void (*ifunc)() __attribute__((mode(SI)));
extern void start();
const ifunc __attribute__((section(".resetvec"))) reset_vector = start;
Anyway, you can also use "objdump -f" on the ELF executable to find
out where it wants its start address, then flash the chip, then verify
that the program was loaded there. Then you can double-click on $pc
in the register window to force it to start in the right place.
More information about the Gcc
mailing list