Re: [arm-gnu] arm-none-eabi-sprite problems..
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [arm-gnu] arm-none-eabi-sprite problems..



Carlos,

Let me try with 'device="ulink"' and get back to you.  I suspect that is the problem.

Best Regards,
Mark Deneen
Saucon Technologies

----- "Carlos O'Donell" <carlos@xxxxxxxxxxxxxxxx> wrote:
Mark Deneen wrote:
> I'm trying to get CodeSourcery G++ to work with a STM32F103RE
> microprocessor.  I'm familiar with the GNU toolchain and GDB, but this
> sprite thing is all new to me!

To put it simply the Sprite is a gdb server i.e. On one side can
communicate to gdb using the gdb remote protocol, and on the other end
it can communicate one of several different pieces of hardware including
ULINK2, RDI, P&E USB-ML-CF etc.

> I start GDB and issue:
>
> (gdb) target remote | arm-none-eabi-sprite ulink://cm/?opts=config
> stm32f103re
>
> (gdb) load cs-test.elf
> Loading section .text, size 0xe7f8 lma 0x8000000
> Load failed
>
> Boooo!

What does your "config" file contain? What options did you use for both
of the ULINK2 configuration dialogs? What do you get if you run the
Sprite in verbose mode with "-v"?

> I'm using a Keil ULINK2.  If I flash the board with another tool, I
> can connect with GDB and tell it to continue, examine registers and
> whatnot.

Did you use the same ULINK2 configuration options with these other tools?

> Since CodeSourcery doesn't support STM32 out of the "box", so I've
> created the startup code by following the Luminary code
> (stm32f103re-reset.S), and creating the proper interrupt vector table
> symbols.  (stm32-isrs.S and stm32-vector.S) My stm32f103re.xml follows:
>
> <?xml version="1.0"?>
> <!DOCTYPE board SYSTEM "board.dtd">
> <board>
>   <properties>
>     <property name="system-v7-m"/>
>   </properties>
>   <memory-map>
>     <memory-device address="0x20000000" size="64K" type="ram">
>       <description>
>         ITCM
>       </description>
>     </memory-device>
>     <memory-device address="0x8000000" size="512K" type="rom">

You need a 'device="ulink"' attribute here to tell the Sprite that the
flash is programmable by the ULINK2. I apologize that this isn't
documented, I've filed an internal documentation issue.

>       <description>
>         Flash
>       </description>
>     </memory-device>
>   </memory-map>
> </board>
>
> Any idea where I went wrong?

Does your board need any initialization before memory is useable?

> Additionally, in thumb2/libcs3.a, there are object files for each
> supported processor, as well as the common startup code (start.S and
> start_c.c).  Also in the archive is heap.o, but I was not able to find
> source for that.  Is this something that is available?

CodeSourcery only provides the source for the board startup. You can
think of CS3 like an SDK for writing startup code, the library internals
may change, but you get the same API.

Cheers,
Carlos.