Topic : STR9lib/GCC contains files for IAR asm [was:Latest RIDE can not comp..

Forum : ARM

Original Post
Post Information Post
March 10, 2007 - 4:32am
Guest

I already placed an order for the STR91x starter kit. When I am waiting for the arrival of the kit, I downloaded & installed the RKit-STRx and its patches. When I played with the evaluation version of RIDE, it seems that it can not compile assembly code properly although it can with C code.

I tried to compile your sample codes of \RIDE\LIB\STRX\STR91X_LIB\STR91X_LIB.prj with a little change. The change is to add the file of \RIDE\LIB\STRX\STR91X_LIB\SOURCE\memcopy.s into the project. The node property of the memcopy.s is to translate it with AS-ARM. However, when translating the memcopy.s, it was arm-elf-gcc.exe to do the translation and for sure it doesn't understand the assembly code and complain about bad instructions in the memcopy.s

1st question: Why wasn't the arm-elf-as.exe called to translate the assembly codes?

2nd question: If I have to create my own AS-ARM-2, what are the options and settings for the arm-elf-as.exe? by the way, I can not inspect the settings or options with AS-ARM in the "options-->tools-->Edit" screen as it complains the tool can not be modified.

3rd question: In the directory of "\RIDE\LIB\STRX\STR91X_LIB\STARTUP", there are two assembly files, 91x_init.s and 91x_vect.s. They must be important. How can I understand them? When should I include them into a build?

Many Thanks in advanced,

Jim

Replies
Post Information Post
+1
0
-1
March 12, 2007 - 12:27am
Guest

I guess it has something to do with the memcopy.s 's syntax.

\RIDE\LIB\STRX\crt0_STR91x.s works with the arm-elf-gcc.exe

cheese,

Jim

+1
0
-1
March 12, 2007 - 9:29am
Raisonance Support Team

Hi,

1. It's normal to call arm-elf-gcc for compiling, assembling AND linking. That's how the gcc toolchain works! You probably get errors because of something else. My guess is that you are using the wrong mode (ARM/Thumb), but I'd need to see your project and sources to be sure.

2. Of course you don't need to create a tool on your own. If the existing ones don't work, just send us your project and we'll make them work! However, you can see the exact command line that is sent from RIDE to the gcc tools in the log files as explained in the "Getting Started STRx" documentation. And you'll find more information on the commands themselves in the gcc documentation.

3. These files are NOT important at all, because they are not for the gcc toolchain! The default startup from RIDE/gcc can be found in "\RIDE\LIB\STRX\" as explained in the documentation. ("Getting Started STRx" again)

Best Regards,

Vincent

+1
0
-1
March 12, 2007 - 9:54am
Guest

Hi all,

jimp, I took a look at the memcopy.s in STRX\STR91X_LIB\SOURCE and I notice that the syntax used in this file is adapted to IAR assembler compiler, in consequence try to convert (do modification ) it to AS-GCC.

+1
0
-1
March 12, 2007 - 10:04am
Raisonance Support Team

Hi,

Yes, MBS, you're right. ST wrote the library for IAR and we adapted it for gcc, but we kept their files. I forgot about that when I answered. Thanks for reminding me. :)

The source of the memcopy function used by gcc can be found in the sources of the compiler, which are provided by GNUARM.

Best Regards,

Vincent

+1
0
-1
March 13, 2007 - 9:47am
Raisonance Support Team

Hi,

jimp, I moved your answer to a new topic, as it starts a new discussion:
http://www.raisonance.com/Forum/punbb/viewtopic.php?id=2160

(I'd like to keep each topic with one question and only one for easier reference in case the same questions come again in the future)

Best Regards,

Vincent