This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problems with the m32c target and M16C6N cpu


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]