This is the mail archive of the
mailing list for the GCC project.
Re: Problems with the m32c target and M16C6N cpu
- From: DJ Delorie <dj at redhat dot com>
- To: fvzeppelin at mail dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 3 Sep 2005 11:35:05 -0400
- Subject: Re: Problems with the m32c target and M16C6N cpu
- References: <43196D8F.firstname.lastname@example.org>
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:
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.