S32DS library

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32DS library

2,464 Views
hansonhe
NXP Employee
NXP Employee
  • Hello,

If we create a lib project, whether we could add another lib in this file?

For example, we have our own algorithm library, and we need to call nxp Motor library, we want to merge these two library into only one library, how to do this? Thanks.

Labels (2)
Tags (3)
0 Kudos
Reply
5 Replies

1,919 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

you can use GNU ar tool (it is part of S32DS installation - located in Cross_Tools folder). You need to extract all object files (*.o) from both libraries and re-pack all *.o into new library archive. 

For example - you have library libOne.a and libTwo.a in one folder - the procedure in command line is: 

arm-none-eabi-ar.exe -x libOne.a

arm-none-eabi-ar.exe -x libTwo.a

arm-none-eabi-ar.exe -c libOneTwo.a *.o

The arm-none-eabi-ar.exe is not set in the enviroment path - you can copy the executable into folder with libraries or add into windows path settings. 

Hope it helps. 

Jiri 

0 Kudos
Reply

1,919 Views
hansonhe
NXP Employee
NXP Employee

Jiri,

Where is the arm-none-eabi-ar.exe? Could you help tell it? Thanks.

0 Kudos
Reply

1,919 Views
jiri_kral
NXP Employee
NXP Employee

Hi, 

you can find it in S32DS installation folder. With the  default installation path you can locate GNU ar in

c:\NXP\S32DS_ARM_v2018.R1\Cross_Tools\gcc-6.3-arm32-eabi\bin\

Jiri

0 Kudos
Reply

1,919 Views
hansonhe
NXP Employee
NXP Employee

Jiri,

Thanks, customer their own library need call mpc5744p AMMCLIB\MPC574xP_AMMCLIB_v1.1.15 library GFLIB_Sqrt and GFLIB_AtanYX function, so they will make a new library which need AMCCLIB function, do you have some document which use in S32DS library project? We do not find setting document about how to add another new library project in S32DS library project.

0 Kudos
Reply

1,919 Views
jiri_kral
NXP Employee
NXP Employee

Hi,

unfortunately S32 Design studio doesn't support new project inside another project. You can use two solutions. First one - add new build configuration into existing project and specify different output target (but you need to switch between configurations manually): 

pastedImage_1.png

Second option is add new project into workspace and set dependency on your first project or projects. In this case - all dependent project will be build together: 

pastedImage_2.png

In my example case - the LPUART_s32k144 project depends on lpuart_echo_s32k144 project and each time when I'll build LPUART_s32k144 the lpuart_echo_s32k144 project will be build as well. 

Jiri

0 Kudos
Reply