S32DS2.0 Automotive Math and Motor Control Library

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

S32DS2.0 Automotive Math and Motor Control Library

2,004件の閲覧回数
nanshang
Contributor II

Hi NXP team,

I'm using S32DS for armbut meet two problems in using the Automotive Math and Motor Control Library.
1)According to the chapter 3.11 of document "S32K14XMCLUG.pdf", I need to choose ToolChain when building a project. Mtarget is S32K14x, so I should choose ARM Bare-Metal 32-bit Target Binary Toolchain”as Fig.1. But actually my S32DS has only Standard S32DS ”to be selected, as Fig.2. How can I get the ARM Bare-Metal 32-bit Target Binary Toolchain”option?
1.jpg
2.jpg
2) I chosed Standard S32DS ”as ToolChain, then complete the rest step of the document. I include header "gflib.h" in my source, because I need to call the function "GFLIB_SinCos_F32( a, &b, GFLIB_SINCOS_DEFAULT_F32 )", and then build my project. All errors are due to the Automotive Math and Motor Control Library, as Fig.3 shows. I guess it may due to the wrong choice of ToolChain. Can you solve my problems?
3.jpg
0 件の賞賛
返信
7 返答(返信)

1,670件の閲覧回数
jiri_kral
NXP Employee
NXP Employee

Hi, 

you probably didn't install latest update(s). Please check this thread: 

https://community.nxp.com/thread/490693 

Jiri

0 件の賞賛
返信

1,670件の閲覧回数
nanshang
Contributor II

Hi,Jiri

 Thanks for your reply. I installed SD32 2018R1 then the problem disappeared.

But there are errors after building, as the Fig. below. I check the library source and find "SWLIBS_DEFAULT_IMPLEMENTATION" seems undefined. There is also no example project for library"S32K14x_AMMCLIB" in S32DS 2018R1.

QQ图片20181212201754.png

The attachment is my project, can you  check it for me? The source comes from sample code of function GFLIB_SinCos_F32 in S32K14XMCLUG.pdf.

thankyou

0 件の賞賛
返信

1,670件の閲覧回数
jiri_kral
NXP Employee
NXP Employee

Hi, 

you need to define  SWLIBS_DEFAULT_IMPLEMENTATION macro in SWLIBS_Config.h file:

pastedImage_1.png

Jiri

0 件の賞賛
返信

1,670件の閲覧回数
nanshang
Contributor II

Hi,

I try to define SWLIBS_DEFAULT_IMPLEMENTATION in  file SWLIBS_Config.h,and then include it in main.c, but there is still error as the Fig. below.

111.png

The attachment is my project.

In fact, I had tried to define SWLIBS_DEFAULT_IMPLEMENTATION as 3 before consulting you, the same error occurred.

Maybe there are some other configurations need to be done.

0 件の賞賛
返信

1,670件の閲覧回数
jiri_kral
NXP Employee
NXP Employee

Hi, 

make sure that you have selected Float ABI to hard:

pastedImage_2.png

Also check the .args file if contain all settings:

pastedImage_3.png

Sometimes there is missing -mfpu argument. If it is your case - double click on fpv4-sp-d16 option in project properties:

pastedImage_4.png

Hope it helps 

Jiri 

1,670件の閲覧回数
nanshang
Contributor II

Hi,

I had selected Float ABI to hard, but there is no FP settings in the .args file. It is still missing even after double click on fpv4-sp-d16 option. Then I added it manually, but it returned to th original state after building. After many times of "double click", FP settings finally appeared and errors disappeared.

It seems FP settings in the .args file can appear only after many tries.

Anyway, I can debug now.

Thx.

0 件の賞賛
返信

1,670件の閲覧回数
jiri_kral
NXP Employee
NXP Employee

Hi, 

thanks for report. I'll try to reproduce this issue and rise ticket for this bug. 

Jiri

0 件の賞賛
返信