S32 Design Studio Knowledge Base

cancel
Showing results for 
Search instead for 
Did you mean: 

S32 Design Studio Knowledge Base

Discussions

S32DS contains many example projects from which you can learn how S32DS can be used with the help of the Vision SDK to develop vision applications. The example projects contain generated and hand-written code, which utilize the Vision SDK to demonstrate a workflow using S32DS. In this document, the procedure for creating a project from one of the provided ISP examples through to execution on the EVB is detailed. This project was run using S32DS version 3.2 and VSDK version 1.5.0.   1) Launch S32DS 2)  Select 'File -> New -> S32DS Project from Example' 3) Select 'isp_h264dec_single_stream' project    In this particular project, the ISP graph diagram is included. If you wish to view it, go to the Project Explorer panel and expand 'isp_h264dec_single_stream_graph'. Then double click on 'ISP data flow : h264dec_single_stream'. The ISP graph diagram will appear in the editor panel. 4) If not in the C/C++ Perspective, switch over by clicking on the icon showed below (Hovering over the correct icon should display 'C/C++'). The current perspective is displayed on the top bar. 5) Select isp_h264dec_single_stream: A53 in the Project Explorer panel 6) Build project for A53  7) Start a debug session using method as described in HOWTO Create A53 Linux Project in S32DS for Vision, beginning at step 9. 😎 Click Resume  The program takes the input H264 encoded image img_1280x960.h264 located in the /home/root/vsdk/data/common folder on the Linux BSP and outputs it on the display The output image should look like below.
View full article
S32DS contains many example projects from which you can learn how S32 can be used with the help of the Vision SDK to develop vision applications. The example projects contain generated and hand-written code, which utilize the Vision SDK to demonstrate a workflow using S32DS. In this document, the procedure for creating a project from one of the provided APEX2 examples through to execution on the EVB is detailed. This tutorial was made with S32DS Version 3.2 and VSDK Version 1.5.0. 1) Launch S32DS 2) Select 'File -> New -> S32DS Project from Example' 3) Select apex2_rotate_180 project 4) Click Finish 5) If not in the C/C++ Perspective, switch over by clicking on the icon showed below (Hovering over the correct icon should display 'C/C++'). The current perspective is displayed on the top bar. 6) Select apex2_rotate_180: A53 in the Project Explorer panel. Build the project using build config 'TEST_A53'. 7) Start a debug session using method as described in HOWTO: Create A53 Linux Project in S32DS for Vision, beginning at step 9. 😎 Click Resume  The program takes the input image  in_grey_256x256.png located in the /home/root/vsdk/data/common folder on the Linux BSP and rotates it 180 degrees The output image out.png is located inside the /home/root/vsdk folder 9) To see the output, access the device from the remote systems view. If this has not been set up, complete the steps described in HOWTO: Access Linux BSP file system on S32V234-EVB from S32DS for Vision.  10) Open both the input and output files from the remote systems view to verify that the program ran correctly.
View full article
When a new application project is created using the New Project Wizard, it is possible to select the debugger to be used. This results in the associated debugger configurations being created within the new project. But what if support for multiple debuggers is required or it is desired to switch to a different debugger? There is an easy way to resolve this. It is as simple as creating another new application project, selecting the new debugger to be supported. Then either directly modifying or copying then modifying the debug configurations to support instead the previously existing project. This minimizes the effort by benefiting from the automation of the New Project Wizard. Detailed below are the steps to add a new debug configuration. Add S32 Debugger configuration Create new project New -> S32DS Application Project New Project Wizard, processor and toolchain page Enter a project name Select the device and core to match the existing project If necessary, select the toolchain to match the existing project Click Next New Project Wizard, cores and parameters page Select the number of cores to match the existing project Select the debugger, S32 Debugger If necessary, select other parameters to match the existing project Click Finish Open existing project which does not already have the S32 Debugger debug configurations (for this demonstration, we will use the hello_world_s32v234 example project from the S32 SDK) Copy debug configurations and modify settings to adapt to existing project Run -> Debug Configurations... Debug Configurations window Within the S32 Debugger grouping, select the debug configuration for the new project which corresponds to the build configuration and core of the existing project Change the name of the debug configuration. Change the portion of the name containing the project name to match the name of the existing project. Main tab Project field Click Browse... Select existing project C/C++ Application Click Search Project... Select the ELF file Common tab Save as field Click Browse... Select {existing_project_name}\Project_Settings\Debugger Debugger tab Debug Probe Connection Setup connection parameters Click Apply Repeat as needed for all core/build config options The existing project now has the S32 Debugger configurations and is ready for debug with the S32 Debug Probe.
View full article
S32 Design Studio (S32DS) for ARM supports IAR Plugin, and the user can use IAR specific features in S32DS with IAR toolchain for ARM. This document describes the way to convert S32DS project to IAR EW based project using project exporting wizard in S32DS. This guidance is based on the NXP S32K144 microcontroller, and compatible with S32K14x / S32K11x family. The version of each IDE which is used for this document is as follows: S32 Design Studio for Arm 208.R1 IAR Embedded Workbench for ARM 8.32.1.18631 1. Install IAR Plugin using IAR Embedded Workbench plugin manager on S32DS Help - Install New Software Put "IAR Embedded Workbench for Eclipse " as the repository for new installation of software. Help - IAR Embedded Workbench Plugin Manager Install IAR Plugin which is matched with your IAR version. 2. Create S32DS Project File - New - S32DS Application Project The tool chain should be chosen as IAR Toolchain. Be noted that the IAR 7.x toolchain is different from the IAR 8.x. The project is created as follows. 3. Export S32DS Application Project File - Export Choose S32 Design Studio - Project Info Export Wizard Now "ProjectInfo.xml" was created. "ProjectInfo.xml" should be used for creating a project in the IAR EW. 4. Create IAR EW Project The way to create IAR project as described below. The snapshots are based on IAR EW 8.32.1. Details may vary. 5. Connect the Project Use the menu - Project - Add Project Connection, and choose "Freescale Processor Expert". Select the "ProjectInfo.xml" file which was created at step #3.  Now, the project which had been created in IAR was connected to the S32DS project. The created IAR project should be modified if the user wants to use the project with S32DS SDK to build and debug under IAR EW environment as follows. 1. Modify the Linker configuration and remove ProjectInfo.xml Remove "ProjectInfo.xml" Linker configuration from the project Options Even though the user modified the linker configuration, a definition in IAR EW  for "device_registers.h" from SDK will cause build error when trying building the project. This error will be eliminated by inserting Chip specific definition into IAR project. If you take a look into the "device_register.h", you can find the definition as follows. 2. Define symbols  Right mouse click on the Project name - Options Write the symbols referred from "device_register.h". The symbols may vary (e.g., CPU_S32K146, CPU_S32K142, ...). 3. Build and Debugger configuration Options - Debugger I used PE micro's OpenSDA on S32K144EVB for this document. After choosing debugger and clicking Download and Debug (Ctrl+D), you can see the P&E Configuration Manager as follows. Just choose appropriate configuration, and select the correct part number of S32K by clicking Select New Device. Finally, you can download and debug the converted IAR EW project with S32DS SDK.
View full article
In this document, we show the steps to use the New Project Wizard to create a new application project for APEX2, ISP, or both.   1. Launch S32DS for Vision 2. Select File -> New -> S32DS Application Project 3. Enter a name for the project 4. Select the 'A53 APEX2/ISP Linux' processor option 5. Click Next 6. Select the APEX2/ISP options you need.       a. APEX2 programming - will add support to your project for an APEX2 application, you need this for any new APEX2 project       b. ISP programming - will add support to your project for an ISP application, you need this for any new ISP project       c. ISP visual modeling - will create a separate project for your ISP data flow diagram, you will not need this if you plan to use an existing graph diagram. This can also be created later. 7. Select the SDK(s) as appropriate for your setup. For example, 'VSDK_MODULE_WIN' for Windows OS or 'VSDK_MODULE_LINUX' for Linux OS, the one which corresponds to your OS is selected for you by default. 7. Click Finish 8. You now have a project or set of projects for development on the S32V234.
View full article
In this document, the steps to create a new S32 Design Studio project from example will be detailed. 1. Launch S32 Design Studio 2. Select File -> New -> S32DS Project From Example 3. Select one of the projects, for example, hello_world_s23v234. Click Finish. 4. The project is added to the current workspace. It is ready to be built and can be executed on the target.
View full article
This document shows, how to set optimization level for whole project and how to edit single files with different optimization level. As soon as the project is created, it has set optimization level to 0 by default. This means, compiler do neither size optimization nor speed optimization. Optimization level can be set for every project according to the project requirements. 1) Optimization level set Right click the project and select project properties. Click C/C++ Build ->Settings->Standard S32DS C Compiler ->Optimization. You can see, optimization level is none -O0. Click the arrow on the right side of the list and choose the required optimization level. There are five options you can choose. Details description of the options are included in S32DS reference manual. Chosen optimization is used for all files in the project. 2) Change optimization level for single file in the project If you want to change optimization level for single file and do no affect another files, select required file, right click on it and select properties. As you can see, there are limited possibilities to set the file itself. Select required optimization level, click apply and close the window. Now, selected file has different options than the rest of the project. Hope it helps. Martin
View full article
In this document, we show the steps to use the New Project Wizard to create a new application project for APEX2, ISP, or both.   1. Launch S32DS for Vision 2. Select 'S32DS Application Project' 3. Enter a name for the project 4. Select the 'A53 APEX2/ISP Linux' processor option 5. Click Next 6. Select the APEX2/ISP options you need.       a. APEX2 programming - will add support to your project for an APEX2 application, you need this for any new APEX2 project       b. APEX2 visual modeling - will create a separate project for your APEX2 program diagram, you need this to connect your APEX2 graph diagrams together. But you could also create it separately later. The APEX graph diagram must be created separately with another New Project Wizard.       c. ISP programming - will add support to your project for an ISP application, you need this for any new ISP project       d. ISP visual modeling - will create a separate project for your ISP data flow diagram, you will not need this if you plan to use an existing graph diagram. This can also be created later.       e. ISP static sequencer - by default, a dynamic sequencer is generated from your graph diagram, enable this to generate a static sequencer instead. This can be set/changed later in the Emit Configurations. 7. Click Finish 8. You now have a project or set of projects for development on the S32V234.
View full article
Please note: AMMCLib SDK is standalone from S32/MPC SDK, it is intended for users who will not use the S32/MPC SDK. The AMMCLib SDK does not support all toolchains listed in S32DS new project wizard. For the toolchains it does support, It does not support all versions. The available SDKs will vary depending upon the toolchain which is selected. When creating a new S32DS Application Project, you may have noticed the S32K14x_AMMCLib_xxx SDK option in the Select SDK menu. This is the standalone version of the AMMCLib. If you plan to use one of the S32/MPC SDKs, then it most likely contains an integrated version of the AMMCLib. For this integrated case, the AMMCLib is accessed like any other S32/MPC SDK component and you would not need to add the standalone version. To add the AMMCLib SDK to your project, simply add it in the New Project Wizard (as pictured above) or add it later through the project properties menu, SDKs: Select the SDK from the list and then click 'Attach/Detach...' Click in the column for each build configuration for which you wish to have the SDK attached. You can remove SDKs by clicking the '+', causing it to disappear. It should also be noted that there exist example projects which demonstrate usage of the AMMCLib, though these show usage of the S32/MPC SDK integrated version. When working in your project, you can use the SDK Explorer to drag and drop macros and function calls into your code. To add the SDK Explorer view to your perspective, there are at least 2 methods: 1) Menu method a) Window -> Show View -> Other... OR Alt + Shift + Q, Q b) Filter on 'SDK' c) Select 'SDK Explorer' d) Click OK 2) Quick Access method a) Type 'SDK' b) Select 'SDK Explorer' To access the macros and function calls from the SDK Explorer: 1) Go to the Project Explorer and select your project to make it active. 2) Go to SDK Explorer and all of the SDKs you included in the project will be listed. 3) For the SDK you wish to access, expand the folders and files until you can see the function you wish to add. You can set some filters to hide unwanted content. 4) Simply drag and drop the macro/function call into your source file. The #include statement for the associated header file will be automatically added near the top of your source file. Happy math coding with AMMCLib!
View full article
S32 Design Studio (S32DS) for ARM supports IAR Eclipse plug-in that enables users to build and debug a S32DS project with IAR toolchain for ARM. This document describes how to install this plugin and how to enable IAR in the new project wizard. Current version of S32DS for ARM 2018.R1 supports IAR compilers  v7.x and v8.x. After the IAR eclipse plugin installation is finished you should be able to create, build and debug a new S32DS project (including SDKs) using IAR compiler/debugger interface directly under S32DS Eclipse environment.   Installation instructions First of all make sure you have IAR Embedded Workbench installed with a valid license from IAR. Now let's proceed to eclipse plug-in installation.   1. Install IAR Plugin manager  go to menu "Help" -> "Install New Software" and  click on "Add..." button to add a new IAR repository located here:  http://eclipse-update.iar.com/plugin-manager/1.0 Tick " I Accept the terms of the license agreement" and click "OK" to accept unsigned content software Finally you proceed to the installation. When the plugin is installed you will be asked to restart S32DS Anytime you create a new workspace you will be asked to enter path to IAR Embedded Workbench IDE   2. Configure IAR plugins in IAR Embedded Workbench plugin manager Run IAR plugin manager (Menu "Help" -> "IAR Embedded Workbench plugin manager...") Select the ARM version (8.x) and click "Install" button.  Select all the IAR components displayed and proceed to installation by clicking "Next" button.   3. New IAR project in the project wizard You can now create a new project in S32DS and select IAR toolchain for ARM instead of default GCC compiler. There should appear a new item it the Debugger selection - "IAR plugin Debugger". Please choose this option if you intend to debug using IAR supported probes (e.g. I-jet) IAR specific panels and settings are now displayed in the project properties for a new S32DS project with the IAR options enabled (see above). There is a new category "IAR C-SPY Application" in the debug configurations panel that contains all the debug configurations for projects with IAR debug plugin option selected. The Debugger perspective now offers several IAR specific Views and features. Enjoy building and debugging with IAR Eclipse plug-in in S32DS!
View full article
Perhaps you are just using the S32DS for Power for the first time, and maybe you've seen the provided examples and want to learn a bit more about how they were created. Here are the steps to create a simple application for the MCP5748G MCU which toggles a pin causing one of the user LEDs to blink. This example includes use of the S32 SDK for Power Architecture. Please note: There are options in the steps below to cover the case of either the DEV-KIT(DEVKIT-MPC5748G) or Motherboard(X-MPC574XG-MB) with Daughtercard(X-MPC574XG-324DS) hardware EVBs. 1) Launch S32DS for Power 2) Select File -> New -> New S32DS Project 3) Enter a name for the project, such as 'BlinkingLED' 4) Locate, from the list of processors, Family MPC574xG -> MPC5748G, and select it. 5) Click Next 6) Uncheck the boxes for cores e200z4 and e200z2, leaving just e200z4 (boot) checked. This is because the application will run on the boot core and will not use either of the other two cores. 7) Click on the '…' button next to SDKs, in the column for BlinkingLED_Z4_0. 😎 Check the box next to MPC5748G_SDK_Z4_0_GCC to include support for the SDK within the new project and for the core we have selected. 9) Click OK 10) Click Finish to close the New Project wizard window and start the project generation. 11) Wait a minute or two for the project generation script to complete. 12) Go to the 'Components Library' view then locate and double-click on 'pit' component to add it to the project.  Alternatively, right-click and select Add to project. You can verify it was added by inspecting the 'Components - <project_name>' view. 13) With 'pit' selected in the 'Components - BlinkingLED_Z4_0' view, go to the 'Component Inspector' view to see the configurations for the PIT component. Locate the section for 'Configuration 0'. You may have to scroll down to see it. Change the 'Time period' setting to 500000 microsec(0.5 sec). Note that we are editing the settings for Clock configuration 'clockMan_InitConfig0', you will need the name of this configuration later. 14) Back in the 'Components' view, select 'pin_mux' component and return to the 'Component Inspector' view 15) From the 'Routing' tab, select the 'SIUL2' sub-tab and scroll down the Signals list until 'GPIO_0' (DEV-KIT) or 'GPIO_99' (Motherboard) is shown. 16) Change to the following settings: a. Pin/Signal Selection: PA[0] (DEV-KIT) / PG[3] (Motherboard) b. Direction: Output Pin PA0/PG3 is connected to user LED 2 on the evaluation board. 17) All configuration settings are now complete. Click Generate Processor Expert code button in the 'Components' view or use the menu bar Project-> Generate Processor Expert Code. 18) Wait for the code generation to complete. 19) Now, from the 'Project Explorer' view, the generated code is visible in the folder 'Generated_Code' of the project 'BlinkingLED_Z4_0'. 20) If not already open, in 'Project Explorer' open the file 'BlinkngLED_Z4_0\Sources\main.c' by double-click. This will open the file in the editor view. 21) Scroll down until the following comments are shown: /* Write your code here */ /* For example: for(;;) { } */ We need to add some code here to initialize the clocks, timers and pins. Then we will setup a timer interrupt handler to toggle the pin. 22) First we need to initialize the clocks. From the 'Components' view, expand 'clock_manager' and then drag & drop CLOCK_DRV_Init   function into main() of main.c, just after the comments identified in the previous step within the text editor view. 23) Add to the function CLOCK_DRV_Init() , the parameter &clockMan1_InitConfig0 to give it the address of the user configuration structure generated by ProcessorExpert in '.../Generated_Code/clockMan1.c' . This is the clock configuration for which we edited the timer period in an earlier step. 24) Next we need to initialize the pins. Back in the 'Components' view, expand the 'pin_mux' then drag and drop the function PINS_DRV_Init after the clock initialization. 25) Again from the 'Components' view, expand 'interrupt_manager', then drag & drop INT_SYS_InstallHandler  in 'main()'. This installs the PIT channel 0 interrupt handler. 26) Enter the parameters: PIT_Ch0_IRQn, &pitCh0Handler, NULL 27) In the User includes section at the start of main.c, add the implementation of the handler a. Create a function called pitCh0Handler b. In the function body: clear the interrupt flag and toggle LED   /* IRQ handler for PIT ch0 interrupt */   void pitCh0Handler(void)   { /* Clear PIT channel 0 interrupt flag */ PIT_DRV_ClearStatusFlags(INST_PIT1, 0U); /* Toggle LED (GPIO 0 connected to user LED 2) */ SIUL2->GPDO[0] ^= SIUL2_GPDO_PDO_4n_MASK; // DEV-KIT /* SIUL2->GPDO[99/4] ^=SIUL2_GPDO_PDO_4n3_MASK;*/ // Motherboard   } Note: Get PIT_DRV_ClearStatusFlags by drag & drop from the 'pit' component. 28) In 'Components' view, expand 'pit' component and then drag & drop PIT_DRV_Init, PIT_DRV_InitChannel & PID_DRV_StartChannel in main() after INT_SYS_InstallHandler(). 29) Fill in the second parameter of the last function(channel number): 0U 30) Build the code. Click the down arrow next to the 'Build' button and select Debug_RAM. Check that there are no build errors. 31) Enter the 'Debug Configurations' menu: a. From the menu bar, Run -> Debug Configurations... b. From the toolbar, down arrow next to Debug button -> Debug Configurations... 32) The Debug Configurations window appears. Select the configuration BlinkingLED_Z4_0_Debug_RAM from within the GDB PEMicro Interface Debugging group. 33) Select the 'Debugger' tab to setup the connection to the debugger hardware device. 34) Select the PEMicro Interface which corresponds to your setup: a. If using the motherboard, you will likely use the USB Multilink, which is connected to your PC via USB cable (type A on one end, type B on the other) and is connected to the motherboard via the 14-pin JTAG cable. b. If using the DEV-KIT board, you will likely choose the OpenSDA, which is integrated into the DEV-KIT board and is connected with just a USB cable (type A on one end, type micro on the other). 35) Click Debug To launch the debugging session. This will also open the Debug perspective. 36) In the Debug perspective, once the debugging session has fully launched, the code will be executed to the start of main(), where a breakpoint was automatically set for you. Press Resume button in the toolbar, Run -> Resume in the menu bar, or F8 on your keyboard to run the application. 37) You should now see the User LED2 on the board blink every 0.5 seconds. 38) To see the value of the output register bit for the output pin connected to the LED: a. Set a breakpoint on a line within pitCh0Handler() b. Go to the EmbSys Registers view, expand the SIUL2 module and scroll down to the GPDO register index which is accessed in the code. Double-click it to read the value. Expand it to see the individual bits. c. Press Resume a few times to see the register value change
View full article