sh architecture, "hello" sample doesn't work

Steve Battazzo sbattazzo at gmail.com
Fri Jun 25 08:03:46 UTC 2010


Hi,

We have very slightly modified the gensh2 bsp such that the code should 
run on an SH7145 chip. The internal registers are mostly the same, so 
for now the only thing that probably needed to be changed was an extra 
write to disable individual module power down modes for SCI0 and SCI1 
which didn't exist in the 7045 that the bsp was intended for.

In the gensh2 source folder there is a README which provides 
instructions on running hello.exe through gdb using gdbstubs.

Using sh-elf-gcc and a gdbstub both provided by KPIT GNU tools,  the 
code can be loaded into RAM just fine with sh-rtems4.9-gdb, but when I 
try to run it with the "continue" command, I get an Illegal Instruction 
signal at 0x00400000 (the first address of SRAM).
I tried running objcopy to generate an s-record file, and loaded that 
through sh-elf-gdb instead of the rtems gdb, this time no SIGILL, but 
ran into a segfault a few hundred bytes into the code memory.

I know the sh architecture probably has been untouched for quite a 
while, but does anybody happen to know what might be a cause of this?

Regards,

Steve



More information about the users mailing list