Linking CW10.5 S12 library files with CW5 S12 application projects

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Linking CW10.5 S12 library files with CW5 S12 application projects

ソリューションへジャンプ
1,368件の閲覧回数
adeveloper
Contributor I

Hello,
we have developed a static library using the S12Z version of CW10. It works well and links with any S12Z project that we develop in CW10.
We also have S12G projects developed in CW5 and must use the same static library with those projects.

However, if we try to link an S12G project in CW5 with the .lib library file created in CW10 then we get the following link error:

"Link Error: L1400: Incompatible processor: Freescale HC12 in previous files and Freescale S12XG in current file MyLibraryFile.lib"

This is odd for 2 reasons:
1) The CW5 App project is not a 'Freescale HC12' file, but an S12 project, so it looks like CW5 is not expressing the correct architecture in it's .o object file.

2) The CW10 library is not a 'Freescale S12XG' file, but a generic S12 library, possibly of type S12Z because that's the only S12 type installed here. So it looks like CW10 is not expressing the correct architecture in it's .lib file.


Has anybody successfully linked a CW10 S12 library file with a CW5 S12 application? If so, how please?

thank you,

A Developer

ラベル(1)
タグ(5)
1 解決策
1,034件の閲覧回数
MJW
NXP Employee
NXP Employee

Hello,

a library compiled with CW10 for S12Z cannot be linked to an S12/S12X project from CW5.1. S12Z and S12(X) are not binary compatible (S12Z cannot directly execute S12/S12X code and vice versa).

Best Regards,

MJW

元の投稿で解決策を見る

3 返答(返信)
1,035件の閲覧回数
MJW
NXP Employee
NXP Employee

Hello,

a library compiled with CW10 for S12Z cannot be linked to an S12/S12X project from CW5.1. S12Z and S12(X) are not binary compatible (S12Z cannot directly execute S12/S12X code and vice versa).

Best Regards,

MJW

1,034件の閲覧回数
BlackNight
NXP Employee
NXP Employee

About 1): from a compiler perspective the HC12 and S12 are compatible, so the object file format uses the former HC12 notation/identifier for it.

About 2): you could decode the library/object files with the decoder.exe utility (in the prog folder). I have not tried this for a long time, but I think it shows the architectural information.

I hope this helps,

Erich

1,034件の閲覧回数
adeveloper
Contributor I

Thank you Erich, that could be the basis of a usable workaround. I think the bigger problem (as MJW points out) is that CW10 only supports the Magnivi S12 object code set (e.g. S12Z),

whereas CW5 is only supporting the classic HC12/S12 set (e.g. S12G), so linking these is not feasible anyway until we get CW10 support for any classic HC12/S12 device.

Our library is generic C code and does not deal with the peripherals or memory map so we'd overlooked the object code differences between some S12 families.

We'll just have build our S12 Magnivi lib and Doxygen docs in CW10, then create a mirrored CW5 project for building the classic HC12/S12 lib.

It would be nice if the CW5 linker error message was improved from:

"Link Error: L1400: Incompatible processor: Freescale HC12 in previous files and Freescale S12XG in current file MyLibraryFile.lib"

to

"Link Error: L1400: Incompatible processor: Freescale HC12/S12 (classic) in previous files and Freescale S12 (Magnivi) in current file MyLibraryFile.lib"


I've put that request in a ticket.


Thanks for your help!

0 件の賞賛
返信