[En-Nut-Discussion] Ethernut on TI's Cortex-M3 (Stellaris LM3S...)

Ole Reinhardt ole.reinhardt at embedded-it.de
Tue Nov 6 12:59:22 CET 2012


> Yes, now I remember. :-)
> Quite strange, because dev_write_P should never appear when compiling
> for ARM. And the compiler should throw an error, if someone tries to add
> more members in the related variable initialization.

Yes indeed very strange. I reviewed his code and could not find any
obviously wrong initialisation.

But what I observed is that nearly no USART driver correctly initialize
the RINGBUF structs in the DCB (hopefully this should not matter).

Anyway, when looking to philips GDB printout, it looks like the whole
structure is moved by 4 bytes. I tried to figure out at which point
(e.g. if one variable is missing) but for me it looks like the address
of the whole struct was moved.

Perhaps we are searching the wrong bug? Perhaps it is some kind of
buffer-overflow anywhere?

But as the device struct is a global variable it's address should not be
changable, right? 

Could this be a linker problem?

I compared the lm3s linker script with the linker script of LPC and CM3
and found some minor differences. E.g. it does not contain a .ramfunc
definition and places the .rodata at a different place. Could this
result in such problems?

I will create a new linker script based on the STM linker script and
send it philipp for testing. 




Thermotemp GmbH, Embedded-IT

Embedded Hard-/ Software and Open Source Development, 
Integration and Consulting


Geschäftsstelle Siegen - Steinstraße 67 - D-57072 Siegen - 
tel +49 (0)271 5513597, +49 (0)271-73681 - fax +49 (0)271 736 97

Hauptsitz - Hademarscher Weg 7 - 13503 Berlin
Tel +49 (0)30 4315205 - Fax +49 (0)30 43665002
Geschäftsführer: Jörg Friedrichs, Ole Reinhardt
Handelsregister Berlin Charlottenburg HRB 45978 UstID DE 156329280 

More information about the En-Nut-Discussion mailing list