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

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

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

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

Rate this post
 0 ▲ useful ▼ not useful
Martin,

Sorry - we don't use bitcodes at all!

Thanks
Jeremy

• $formula (LaTeX syntax)$