WinARM and STR71x

OP #1172739
Rate this post
• ▲ 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
Attached files:
Moderator #1172740
Rate this post
• ▲ 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

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.