EmbDev.net

Forum: ARM programming with GCC/GNU tools WinARM and STR71x


von Jeremy M. (jmaccelari)


Attached files:

Rate this post
0 useful
not useful
I have tried to get the following project to compile and work on an
Olimex STR-P711 with gcc. It's the STR71xLibrary rtc example hacked
for the above board from the the examples. If I build this example as
distributed with EWARM, it works.

The project is at:
http://www.maccelari.com/rtc.zip

I then took the C files, added the STR71x .S files for gcc and the .ld
files and built it with WinARM-20060606. The resulting bin file does
not work. As a newbie, I am completely stumped.

Does anyone have a suggestion as to where the problem may lie?

I have also tried Martin Thomas' str71_bootloader (with the button
set to Pin 1.14 instead of 1.8) and also cannot get it to work.

I have also tried several other projects and all refuse to run
on my board if compiled and built with WinARM. They all work with
EWARM!!!

Thanks
Jeremy

von Martin T. (mthomas) (Moderator)


Rate this post
0 useful
not useful
Jeremy Maccelari wrote:
> I have tried to get the following project to compile and work on an
> Olimex STR-P711 with gcc. It's the STR71xLibrary rtc example hacked
> for the above board from the the examples. If I build this example as
> distributed with EWARM, it works.
>
> The project is at:
> http://www.maccelari.com/rtc.zip
>
> I then took the C files, added the STR71x .S files for gcc and the .ld
> files and built it with WinARM-20060606. The resulting bin file does
> not work. As a newbie, I am completely stumped.
>
> Does anyone have a suggestion as to where the problem may lie?
>
> I have also tried Martin Thomas' str71_bootloader (with the button
> set to Pin 1.14 instead of 1.8) and also cannot get it to work.
>
> I have also tried several other projects and all refuse to run
> on my board if compiled and built with WinARM. They all work with
> EWARM!!!

Since your are porting from EWARM to gnu you migth have fall into a
"trap".  In code done for IAR EWARM I often found bitfields to access
hardware-registers. For arm-gcc (at least up to Ver 4.1.2, I have not
tested 4.2.x) this does not work (well sometimes it will...) since some
of the bitfield-accesses get optimized to assembler-instructions for
8bit/byte read/write which are not allowed for hardware-register access.
So review your c-sources for lines like regfoo.bitxy = 1 and repleace
them with REGFOO |= (1UL << bitxypos) where REFOO points to the same
register (address).

About the bootloader: I have tested it successfully with an STR710
eval-board from ST. Since the STR711 might be a little different it's
possible that small modifications are needed. I do not have a board with
an STR711 here for tests.

Regards,
Martin Thomas

von Jeremy M. (jmaccelari)


Rate this post
0 useful
not useful
Martin,

Sorry - we don't use bitcodes at all!

Thanks
Jeremy

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.