sh architecture, "hello" sample doesn't work
Steve Battazzo
sbattazzo at gmail.com
Fri Jun 25 15:36:39 UTC 2010
Ralf and Alberico,
Thanks for the replies!
> As Ralf said: nearly surely you need to compile with the rtems toolchain and
> the memory layout (the linkcmds file )should reflect your hardware memory map.
>
The rtems application of course is compiled with the rtems toolchain,
but as the BSP's readme said, the gdbstubs should be compiled with
sh-elf-gcc, right?
I have been using the precompiled sh-elf-gcc from KPIT GNU tools because
it has worked so far for me (for bare sh2 code anyway), and I always
have issues when trying to compile the GCC for this target from source.
The gdbstubs on sourceforge wouldn't compile because of some syntax
regarding some pointers, and I didn't really want to bother with trying
to fix it, so I tried the one provided by KPIT, which at least
successfully connected and loaded the program.
> Stated this, here's the main problems I recall to run "hello.exe" :
>
> Overlap of the gdbstub working memory by loading the program.
In my case, a look at the gdbstub linker script shows no reference to
the external memory at all, but now that you mention it, there could be
an issue with the chip's internal memory!
Running objcopy and taking a look at the generated srec file shows some
data is written to the on-chip RAM region, which might overwrite some
of the gdbstub's memory as you suggest.
> Disassemble the start address and see if the program is correctly loaded.
> depending on your gdbstub implementation, you may need to setup some cpu
> registers to fit the memory configuration before to load the executable.
>
I will try this next time I get some time to do so.. thank you!
Cheers,
Steve
More information about the users
mailing list