Cortex M4 on CW10 in Win7: How to build code with stricmp() support?

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

Cortex M4 on CW10 in Win7: How to build code with stricmp() support?

ソリューションへジャンプ
1,994件の閲覧回数
UnisvrTim
Contributor III

Hi! I am new in CW. I searched the forum but not get the answer.

 

I created a new basic application project with mfs and rtcs support. Then I just added the following lines:

if(stricmp("abc", "Def") == 0) {

  printf("match\n");

} else {

  printf("not match\n");

}

 

the problem is:

 

if I do not #include <extras/extras_string.h>, then it complains about stricmp not defined.

 

If I do include the extras, then it will complain about: _io_strcasecmp... redeclared as ..., and: was originally defined as ... etc.

 

How to solve this problem?

 

Thank you for your help!

 

best regards,

 

Tim

ラベル(1)
0 件の賞賛
返信
1 解決策
1,613件の閲覧回数
UnisvrTim
Contributor III

Just switched to CW10.2 and seems I can rebuild EWL as described.:smileyhappy:

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
1,613件の閲覧回数
CrasyCat
Specialist III

Hello

 

    stricmp is not an ANSI standard library function. It is part of the EWL extra library.

 

    So if you want to be able to use that function in your code you need to rebuild the EWL library with EWL Extras Library  

    enabled.

    Please refer to the EWL C Reference manual chapter Configuring EWL for more information on how  to

    Configure EWL Extra library.

 

   Note that you can import the project arm-cortexm_lib from folder {Install]\MCU\ARM_EABI_Support\ewl to rebuild the library.

 

CrasyCat

0 件の賞賛
返信
1,613件の閲覧回数
UnisvrTim
Contributor III

I cannot rebuild the EWL library :smileysad:

 

In CW10+MQX3.7, the EWL project imported from {Install]\MCU\ARM_EABI_Support\ewl is named as: EWL_C.prject. The only build configuration is: Coldfire Toolchain Tools and selecting Build Project will do nothing.

 

Am I forced to write my own "extras"?

 

0 件の賞賛
返信
1,614件の閲覧回数
UnisvrTim
Contributor III

Just switched to CW10.2 and seems I can rebuild EWL as described.:smileyhappy:

0 件の賞賛
返信
1,613件の閲覧回数
UnisvrTim
Contributor III

Thank you for the reply! I will try that right away.

 

best regards,

 

Tim

0 件の賞賛
返信