cancel
Showing results for 
Search instead for 
Did you mean: 

Compilation problems using Metrowerks compiler and 5in1 source code

smitt
Associate II
Posted on February 17, 2005 at 10:25

Compilation problems using Metrowerks compiler and 5in1 source code

3 REPLIES 3
smitt
Associate II
Posted on February 13, 2005 at 10:22

Hi.

Im trying to compile the soucecode for the 5in1 evaluationboard. The code is written for the Hiware compiler so im using Metroverks STM V2.0 and the compiler that comes with it. hw_st7_compiler v.5.0.12.4242.

I use STVD7 2.5.4 as IDE. The problem is that I get compilation erros using metrowerks compiler. When compiling the USB fullspeed library I get:

ERROR L1206: .stack overlaps with a segment which appear in the PLACEMENT block

When I compile the USB fullspeed library using Cosmic C I dont get any errors and the compilation works fine. Therefore its probably not anything wrong on ST´s reference code.

The source code for ST´s 5in1 reader can only be compiled on Metrowerks compiler. When i do that, after changing the paths in the default.env file, I get som errors aswell.

The errors are generated from the MAL_MMC.c file. The erros are:

ERROR C5691: Instruction operand missmatch

asm code generation the error is:

SLL temp // this line is in 7 places in the code => 7 errors of same type

temp is a WORD type initiated in the ''Init_buffer'' function.

SLL instruction is ShiftLeftLogical and works on a variable @ 2bytes size which WORD is.

And this file ''MAL_MMC.c'' is read-only so I really dont think I should have to change the code.

I really need some help. My best guess is that there is something wrong with my project settings or that something should be changed in the .map file.

And because I could compile USB Fullspeed library with Cosmic C but got errors compoiling it with Metrowerks, I suspect something is wrong with my projectsettings using Metrowerks.

Hoping for some help.

// Smitt

alain2399
Associate II
Posted on February 16, 2005 at 06:07

Hi,

the Metrowerks V2.0 is very new and has introduced some changes in the compiler options. I would suspect that the source code and its project were compiled with a previous version of the metrowerks C compiler. If you want to use V2.0 you will have to look for the changes from the previous version.

I hope this can help,

Alain

smitt
Associate II
Posted on February 17, 2005 at 10:25

Thanks.

I have mailed Metrowerks regarding this issue. I also asked them if they got an old Hiware compiler version from around 2000 they could send me.

The code is compiled using Hiware compiler (year 2000). Since Hiware is now Metrowerks and some changes in the compiler certainly have been made since 2000.

Thanks for your help