HOWTO: Create A New Makefile Project in S32DS With Existing Code From NXP Vision SDK Example Project

Document created by Mike Doidge Employee on Mar 8, 2019
Version 1Show Document
  • View in full screen mode

This document details how to create a new project in S32 Design Studio and build using the existing code and makefile provided within the NXP Vision SDK example projects. If you are creating a new makefile project with code from any other source, the procedure may be different.

 

Before creating a new makefile project from existing code we need to add some paths to the environment variable PATH and a couple of new environment variables. There are 3 main methods for adding these paths and variables. Which method depends upon your needs.

 

Method 1

The paths and variables can be added to each project individually. This is useful if you only want these changes to affect a small number of projects. Or if your projects require different paths and variables. Note: these changes would be made after the project is created (shown in steps 15 - 17 below)

 

Method 2

The paths and variables can be added to the entire workspace within S32DS . These will not be visible outside of S32DS and therefore will not affect the entire Windows environment. This is useful if you have a large number of projects with common requirements for paths and variables and do not want them visible any tools outside of S32DS.

 

Method 3

The paths and variables can be added globally to the Windows environment and will affect all installed tools. This method is not recommended.

 

Once you have selected a method, add the following paths to the PATH variable (paths shown using the default installation settings for S32DS):

C:\NXP\S32DS.3.1\S32DS\build_tools\gcc-6.3-arm32-eabi\bin

C:\NXP\S32DS.3.1\S32DS\build_tools\gcc-6.3-arm64-eabi\bin

C:\NXP\S32DS.3.1\S32DS\build_tools\gcc-6.3-arm64-linux\bin

C:\NXP\S32DS.3.1\S32DS\build_tools\msys32\mingw32\bin

or if within Eclipse (can use variables, which don't need to be updated should the layout of S32DS installation change in a future release)

${S32DS_ARM32_TOOLCHAIN_DIR}

${S32DS_ARM64_LINUX_TOOLCHAIN_DIR}

${S32DS_ARM64_TOOLCHAIN_DIR}

${S32DS_GCC_TOOCHAIN_DIR}

 

It is also necessary to add the following Windows system variables:

Variable Name: S32V234_SDK_ROOT

Variable Value: C:\NXP\S32DS_Vision_v2018.R1\S32DS\s32v234_sdk

 

Variable Name: APU_TOOLS

Variable Value: C:\NXP\S32DS_Vision_v2018.R1\S32DS\APUC

 

The following steps demonstrate the procedure based on Method 1 above.

 

1) Launch S32DS for Vision

2) Click New

 

 

3) Select 'Makefile Project with Existing Code'

4) Select Next

 

 

5) Enter a name for the project.

6) For 'Existing Code Location',

   a) Select 'Browse...' and then select the directory  C:\NXP\S32DS.3.1\S32DS\software\VSDK_S32V2_RTM_1_3_0\s32v234_sdk\demos\isp\isp_sonyimx224_rgb_yuv_gs8

   b) Click OK

7) For 'Toolchain for Indexer Settings', select the option which matches your desired build configuration. For our example here, we will select 'ARM Linux 64-bit Target Binary Toolchain'. See the Vision Extension Package User Guide for more details on the toolchain options. This sets up some toolchain paths, but later we will set more for the specific needs of the VSDK examples.

8) Click Finish

 

 

9) Right-click on the project from the Project Explorer. Select Properties

 

 

10) Go to section 'C/C++ Build'

 

 

11) Go to the 'Behavior' tab and in the field next to 'Build', enter:

   ISP examples: 'allsub'

   APEX examples: 'APU_COMP=nxp allsub'

 

 

12) Go to 'Builder Settings' tab, in 'Build location' section change the path for the 'Build directory'. Click on 'Workspace...' button

 

 

13) In the Folder selection menu, select the subfolder 'build-v234ce-gnu-linux-d' and click OK

 

 

14) Go to section 'Environment'

15) Select the environment variable 'PATH' and click 'Edit...'

 

 

16) Add the path variables to the value field, each separated by a comma ';'

${S32DS_ARM32_TOOLCHAIN_DIR}

${S32DS_ARM64_LINUX_TOOLCHAIN_DIR}

${S32DS_ARM64_TOOLCHAIN_DIR}

${S32DS_GCC_TOOCHAIN_DIR}

Click OK

 

 

17) Click 'Add...'

 

 

18) Click 'Add...' and enter variable name 'APU_TOOLS' and value '${S32DS_APU_TOOLCHAIN_DIR}'

Click OK

 

 

19) Click OK to close the Properties menu.

20) Click on 'Build'

 

 

21) Once the build is complete, the binary file (ELF) will be created

 

Attachments

    Outcomes