S32 Design Studio Knowledge Base

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

S32 Design Studio Knowledge Base

Discussions

Sort by:
NOTICE: This may NOT work with the newer versions of PEmicro eclipse plugin (e.g. with S32DS for Power 2017.R1). Please use an alternative way described here: https://community.nxp.com/thread/486662?commentID=1068206#comment-1068206 This document describes how to program DCF record into UTEST flash with S32DS for Power v1.1+ using PEMICRO Probe (OpenSDA, USB Multilink, USB Multilink FX...) In  S32 Design Studio for Power v1.2+  the Pemicro plugin update step is not required since it's already included so you can skip  Step 1) Step 1) Update Pemicro Plugin.  See the post below - it's about ARM version of S32DS but the update process for S32DS for Power is exactly the same. You just need is to select e200 component instead of ARM  error while dubbing: "ERROR loading to the device" Step 2) Download and extract Flash programming algorithms for MPC5xxx directly from PEMICRO website into your computer. http://www.pemicro.com/downloads/download_file.cfm?download_id=422 Step 3) Create or reuse an existing S32DS project to connect to the board and inspect the existing content of UTEST/DCF user area memory section. See e.g. MPC5644P example below. Next available address for DCF record of this specific chip is 0x0040_0220 .. 0x0040_0227   Step 3a)  You can export this 64bit free region into a srecord file e.g. MyNewDCF.srec Step 3b)  Adjust Srecord file created to match with DCF record you intend to write. Don't forget to re-calculate Srec checksum. e.g. NOP 0x00000000 00000000   S3 0D 004002200 0000 0000 0000 0000 90 Step 4) Create/clone an existing debugger configuration that will load DCF into UTEST and adjust its parameters. Step 4a) Change the debugger configuration Name and enter the srecord path + file name adjusted in step 3b) as a C/C++ application. Step 4b) Debugger Tab -> Advanced Options - select Use Alternative Algorithm and browse the location where you extracted flash algorithms at step 2)  E.g. Freescale_MPC5744P_1x32x4k_UTest.pcp Step 4c)  Adjust Startup options - Disable Load Symbols and Run on Reset since this configuration is only for programming DCF record and not for debugging. Step 5) Now press Debug button and it should program your DCF record into UTEST flash memory. After debug session is established you can check if the DCF has been programmed correctly into DCF user area in Memory View. Note: The device will process these DCF records during the system reset sequence before the CPU leaves reset.
View full article
This document shows the step-by-step process to create a simple 'Blinking_LED' application using the S32K1xx RTD and the S32 Configuration Tools. This example is for the S32K144EVB-Q100 EVB, connected to a PC through USB (OpenSDA) connection. Preparation Setup the software tools Install S32 Design Studio for S32 Platform Install the S32K1xx development package and the S32K1 RTD AUTOSAR 4.4. Both of these are required for the S32 Configuration Tools. Launch S32 Design Studio for S32 Platform Procedure New S32DS Project OR Provide a name for the project, for example 'Blinking_LED_RTD_AUTOSAR'. The name must be entered with no space characters. Expand Family S32K1xx, Select S32K144 Under Toolchain, select NXP GCC 9.2 Click Next Click '…' button next to SDKs Check box next to PlatformSDK_S32K1_2022_02_S32K144_M4F. Click OK Click Finish. Wait for project generation wizard to complete, then expand the project within the Project Explorer view to show the contents. To control the LED on the board, some configuration needs to be performed within the Pins Tool. There are several ways to do this. One simple way by double-click on the MEX file. By default, the Pins tool is then presented. Since the AUTOSAR drivers will be used, click the switch to disable this tool from the Overview tab. Once the Pins tool is disabled, the Config Tools Overview menu appears. Select the Peripherals tool. After the Peripherals tool opens, look to the Components tab. By default, new projects are created with the osif and Port_Ip drivers. Leave the osif driver, but remove the Port_Ip driver.  This will be replaced by AUTOSAR version. Right-click on the Port_Ip box and select Remove. Add the AUTOSAR version of the Port driver. Click on the ‘+’ next to the MCAL box. This will bring up a list of AUTOSAR components. Locate then select ‘Port’ and click OK. Do not worry about the warning message. It is only indicating that the driver is not already part of the current project. The associated driver package will be added automatically. There are a couple of other drivers needed. Click the ‘+’ next to MCAL again and this time select ‘Dio’. Once more, click the ‘+’ and select ‘Mcu’. Select the ‘Dio’ component. Now select the DioConfig tab. Under DioPort_0, change the Dio Port Id to 3. Click ‘+’ next to DioChannel to add a channel. Select the ‘Port’ component. Now select the PortConfigSet tabl. Under PortPin, change the setting for PortPin_0, PortPin Pcr from 0 to 96. Then change the setting PortPin Direction from PORT_PIN_IN to PORT_PIN_OUT. Change the setting PortPin Level Value from PORT_PIN_LEVEL_HIGH to PORT_PIN_LEVEL_LOW. Under UnTouchedPortPin, click ‘+’ and add the following 5 PortPin Pcr numbers: 4, 5, 10, 68, 69 Now select the PortGeneral tab, uncheck ‘Port Ci Port Ip Development Error Detect’. Now the device configurations are complete and the RTD configuration code can be generated. Click ‘Update Code’ from the menu bar. To control the output pin which was just configured, some application code will need to be written. Return to the ‘C/C++’ perspective. If not already open, in the project window click the ‘>’ next to the ‘src’ folder to show the contents, then double click ‘main.c’ file to open it. This is where the application code will be added. Before anything else is done, initialize the mcu driver, the clock tree, and apply PLL as system clock. Insert the following line into main, after the comment 'Write your code here': Mcu_Init(&Mcu_Config_BOARD_InitPeripherals); Mcu_InitClock(McuClockSettingConfig_0); while ( MCU_PLL_LOCKED != Mcu_GetPllStatus() )     {         /* Busy wait until the System PLL is locked */     } Mcu_DistributePllClock(); Mcu_SetMode(McuModeSettingConf_0); Before the pin can be controlled, it needs to be initialized using the configuration information that was generated from the S32 Configuration tools. Initialize all pins using the Port driver by adding the following line: Port_Init(NULL_PTR); Turn the pin on and off with some delays in-between to cause the LED to blink. Make the delays long enough to be perceptible. Within the provided for loop, add the following lines: Dio_WriteChannel(DioConf_DioChannel_DioChannel_0, STD_HIGH); TestDelay(2000000); Dio_WriteChannel(DioConf_DioChannel_DioChannel_0, STD_LOW); TestDelay(2000000); Before the 'main' function, add a delay function as follows: voidTestDelay(uint32 delay); voidTestDelay(uint32 delay) {     staticvolatile uint32 DelayTimer = 0;     while(DelayTimer<delay)     {         DelayTimer++;     }     DelayTimer=0; } Update the includes lines at the top of the main.c file to include the headers for the drivers used in the application: Remove #include "Mcal.h" Add #include "Mcu.h" #include "Port.h" #include "Dio.h" Build 'Blinking_LED_RTD_AUTOSAR'. Select the project name in 'C/C++ Projects' view and then press 'Build'. After the build completes, check that there are no errors. Open Debug Configurations and select 'Blinking_LED_RTD_AUTOSAR_Debug_FLASH'. Make sure to select the configuration which matches the build type performed, otherwise it may report an error if the build output doesn’t exist. Confirm the EVB is connected to the PC via USB cable, then check the Debugger tab settings and ensure that 'OpenSDA Embedded Debug - USB Port' is selected for interface. Click Debug To see the LED blink, click ‘Resume'
View full article
        Product Release Announcement Automotive Microcontrollers and Processors S32 Design Studio for S32 Platform v3.2         Austin, Texas, USA Sep 30, 2019    The Automotive Microcontrollers and Processors' Embedded Tools Team at NXP Semiconductors is pleased to announce the release of the S32 Design Studio for S32 Platform v3.2.  Here are some of its major new features: Multiple builds of the GNU tools can be installed. The SDK integration is provided with additional software packages. The SDK packages can be installed and updated with the S32DS Extensions and Updates tool. The GHS toolchain support is provided by the project wizard (available for particular devices). The CMSIS-DAP debugging is supported by particular devices. The UART communication speed of S32 Flash Tool is improved. The latest versions of P&E debugger plug-in and drivers are provided. S32 Debugger provides OS Awareness support for FreeRTOS and OSEK. S32 Debugger provides preliminary support for secure debugging with the Password and Challenge/Response authentication methods. New type of Launch Groups is defined for S32 Debugger, which allows you to create S32 Debugger specific configurations and use the new "Wait for stop on breakpoint" post launch action. The SDK migration support is provided to upgrade an SDK version attached to the project. The S32DS Extensions and Updates tool notifies about dependencies and incompatible packages. The progress bar is displayed for the S32 Debugger flash programmer. S32 Design Studio Versions   S32DS IDE for S32 Platform S32DS IDE for Arm® S32DS IDE for Power Architecture® S32DS IDE for Vision Devices Supported S32V23x S32K1xx MPC56xx S32V234 S32S247TV KEA MPC57xx   S32 Platform Devices MAC57D54H S32R2xx/S32R3xx   Integrated NXP Tools S32 Flash Tool FreeMASTER FreeMASTER DDR stress tool DDR stress tool     Integrated Configuration Tools S32 Configuration Tools Processor Expert Configuration Tool Processor Expert Configuration Tool  DDR configuration tool Pins Wizard Pins Wizard Pins Wizard Clocks configuration Peripheral/Drivers configuration   Peripheral/Drivers configuration   Peripheral/Drivers configuration   DCD/IVT configuration       DDR configuration tool       Integrated NXP Software S32 SDK S32K1 SDK S32 SDK Vision SDK FreeRTOS FreeRTOS FreeRTOS Linux BSP AMMCLib for S32V23x AMMCLib for KEA and S32K AMMCLib for MPC56xx and MPC57xx MCUs   Vision SDK KEA SDK Radar SDK Linux BSP MQX OS/MQX Drivers for MAC57D54H     Compilers: NXP GCC 6.3.1* NXP GCC 6.3.1* NXP GCC 4.9* NXP GCC 6.3.1* GreenHills GreenHills GreenHills   IAR IAR Diab     GCC 4.9*     DEBUGGERS Built-in GDB interface: S32 Debugger/S32 Debug Probe P&E Multilink/Cyclone/OpenSDA P&E Multilink/Cyclone/OpenSDA S32 Debugger/S32 Debug Probe P&E Multilink/Cyclone/OpenSDA Segger J-Link   P&E Multilink/Cyclone/OpenSDA DEBUGGERS supported: Lauterbach Lauterbach Lauterbach Lauterbach   iSystem iSystem   IAR PLS   Host Operating Systems: Microsoft Windows® 7/8/10 64-bit OS (with 32-bit binaries)  – Ubuntu 14.04, 16.04 (64 bit) – Debian 8 (64 bit) – CentOS 7 (64 bit) Microsoft Windows® 7/8/10 32/64-bit OS (with 32-bit binaries)  – Ubuntu 14.04, 16.04 (64 bit) – Debian 8 (64 bit) – CentOS 7 (64 bit) Microsoft Windows® 7/8/10 32/64-bit OS (with 32-bit binaries)  – Ubuntu 14.04, 16.04 (64 bit) – Debian 8 (64 bit) – CentOS 7 (64 bit) Microsoft Windows® 7/8/10 32/64-bit OS (with 32-bit binaries)  – Ubuntu 14.04, 16.04 (64 bit) – Debian 8 (64 bit) – CentOS 7 (64 bit) Vision specific tools : NXP APU Compiler     NXP APU Compiler ISP assembler     ISP assembler ISP and APEX graph tools     ISP and APEX graph tools Radar specific tools :     SPT assembler       SPT Explorer/ SPT graph tool   Complete S32 Design Studio for S32 Platform v3.2 release notes are available here.   Installation To download the installer please visit the S32 Design Studio product page download section or click the direct here.     The installer requires the Activation ID to be entered. You should receive a notification email including the Activation ID after the download of the installation package starts. The installer installs just the base tools/package. In order to start development it is necessary to install at least one Development package. Currently the only application packages available are S32S2xxTV and S32V2xx. The application packages are managed by S32DS Extensions and Updates. Technical Support S32 Design Studio issues are tracked through the S32DS Public NXP Community space. https://community.nxp.com/community/s32/s32ds  
View full article
        Product Release Announcement Automotive Microcontrollers and Processors S32 Design Studio for ARM v2.0             Austin, Texas, USA August 16, 2017 The Automotive Microcontrollers and Processors’ Embedded Tools Team at NXP Semiconductors, is pleased to announce the first release of the S32 Design Studio for ARM  v2.0  Release content (What is new?) • Eclipse Neon 4.6 Framework • GNU Tools for ARM® Embedded Processors (Launchpad) build (4.9.3 20150529) • ARM64: Linaro GCC 4.9-2015.05 • Libraries included: newlib, newlib-nano and ewl2 (ewl and ewlnano) • P&E Multilink/Cyclone/OpenSDA (with P&E GDB Server) - updated (v3.1.1.20180808) • SEGGER J-Link (with SEGGER GDB Server) -  (V616f_b170707) • New Project wizard to create application and library projects for supported devices • Fully integrated S32 SDK for S32K14x EAR release v.0.8.4. For the details on the feature set  of SDK please refer to SDK Release notes and Reference Manuals attached below. • SDK management included: o Sample Drivers for KEA family (Evaluation grade) o FreeMASTER Serial Communication driver for KEA and S32K families o Automotive Math and Motor Control Libraries for KEA and S32K devices v1.1.8  • Import projects from CodeWarrior for MCU v.10.6 and Kinetis Design Studio for respective supported processors • IAR v7.x compiler support by new project wizard • iSystem, Lauterbach and IAR debuggers support by new project wizard • Kernel Aware debugging for FreeRTOS, OSEK. • Devices supported: o SKEAZN8, SKEAZN16, SKEAZN32, SKEAZN64, SKEAZ128, SKEAZ64 o S32K144 v2.0, S32K148, S32K142 o S32V234 o MAC57D54H Complete S32 Design Studio for ARM v2.0 release notes are available here Installation Notes To download the installer please visit the S32DS product page downloads section. The installer requires the the NEW Activation ID to be entered during the installation. You should receive an email including the Activation ID after starting the download process:   Technical Support S32 Design Studio issues are tracked through the S32DS Public NXP Community space. https://community.nxp.com/community/s32/s32ds
View full article
      Product Release Announcement Automotive Microcontrollers and Processors S32 Design Studio for ARM® 2018.R1  Update 6          What is new? S3214x SDK RTM 2.0.0. This is a cumulative update - it includes all the content of previous updates (Update 1, Update 2, Update 3, Update 4, Update 5) To select the new SDK in the New Project Wizard, the Toolchain must be changed to 'ARM Bare-Metal 32-bit Target Binary Toolchain' Installation instructions The update is available for online (via Eclipse Updater) or offline installation (direct download link) online installation:  go to menu "Help" -> "Install New Software..." dialog  select predefined update site "S32DesignStudio - http://www.nxp.com/lgfiles/updates/Eclipse/S32DS_ARM_2018.R1/updatesite" select all available items and click "Next" button   offline installation:   go to S32 Design Studio for ARM product page -> Downloads section or use direct link to download the update archive zip file Start S32DS and go to "Help" -> "Install New Software..." Add a new "Archive" repository and browse to select the downloaded update archive .zip file you downloaded in the previous step Select all available items and click "Next" button.   This will starts the update installation process.
View full article
******************************************************************************** * Detailed Description: * This example shows, how to use printf function in project. * Files uart_console_io.c, uart.c and uart.h was added. These files contain * necessary functions for correct printf() functionality * * * Test HW:         FRDMPK144-Q100 * MCU:             PS32K144HFVLL 0N77P * Terminal:        9600-8-no parity-1 stop bit-no flow control on LPUART1 * Fsys:            160 MHz * Debugger:        Lauterbach Trace32 *                  PeMicro USB-ML-PPCNEXUS *                  OpenSDA embedded debug * Target:          internal_FLASH, internal RAM * EVB connection:  default
View full article
Bare-metal project migration from an older version of S32DS into a newer one is typically pretty straightforward. Despite of that the migration into S32DS Power v1.2+ requires more attention due the fact it includes a new version of GCC compiler + GCC binutils (see the GCC release notes - here). This version of GCC is now fully EABI VLE compliant  (in contrast to previous versions of S32DS Power  v1.0 and v1.1) and it has several consequences for the project migration object code/libraries are not backward compatible - if you have an object code/library built by a previous version of S32DS Power v1.x you have to rebuild it in new S32DS v1.2+ compiler. default compiler setup has changed - bitfield access is not volatile anymore. This may have a impact on a peripheral registers access via standard header file bitfield structures. Such access may require a specific load/store instruction e.g. "stw" but if compiler is allowed to optimize the access (e.g. use "stb" instead of "stw") an exception may occur. Therefore it is recommended to add  -fstrict-volatile-bitfields  flag into your project GCC compiler settings: linker script file (*.ld) requires some additional linker sections - Linker script file in S32DS Power v1.2+ must contain the sections below: •  KEEP for .init and .fini sections • .ctors and .dtors sections • .preinit array .init array and .fini array sections If the linker script file is not updated and the linker warnings are ignored you may experience an exception at the runtime - typically when __init routine is executed. Missing .init section causes that an invalid instructions is fetched and causes the core IVOR exception. There is an easy way how to automatically fix the linker script file issue directly in IDE. If you import and build an older project in S32DS Power v1.2 the linker issues these linker script related warnings: Right click on the warning and select Quick Fix: Select "Add missed section in linker script"  + "Select All" and press "Finish". Repeat these steps until all the linker script warnings disappears. If you don't use IDE project you have to add the sections below into your linker script manually: .text_vle : { INPUT_SECTION_FLAGS (SHF_PPC_VLE) *(.text.startup) *(.text) *(.text.*) KEEP (*(.init)) KEEP (*(.fini)) . = ALIGN(16); } > m_text /* that will force pick VLE .text sections */ .ctors : { __CTOR_LIST__ = .; /* gcc uses crtbegin.o to find the start of the constructors, so we make sure it is first. Because this is a wildcard, it doesn't matter if the user does not actually link against crtbegin.o; the linker won't look for a file to match a wildcard. The wildcard also means that it doesn't matter which directory crtbegin.o is in. */ KEEP (*crtbegin.o(.ctors)) KEEP (*crtbegin?.o(.ctors)) /* We don't want to include the .ctor section from from the crtend.o file until after the sorted ctors. The .ctor section from the crtend file contains the end of ctors marker and it must be last */ KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)) KEEP (*(SORT(.ctors.*))) KEEP (*(.ctors)) __CTOR_END__ = .; } > m_text .dtors : { __DTOR_LIST__ = .; KEEP (*crtbegin.o(.dtors)) KEEP (*crtbegin?.o(.dtors)) KEEP (*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)) KEEP (*(SORT(.dtors.*))) KEEP (*(.dtors)) __DTOR_END__ = .; } > m_text .preinit_array : { PROVIDE_HIDDEN (__preinit_array_start = .); KEEP (*(.preinit_array*)) PROVIDE_HIDDEN (__preinit_array_end = .); } > m_text .init_array : { PROVIDE_HIDDEN (__init_array_start = .); KEEP (*(SORT(.init_array.*))) KEEP (*(.init_array*)) PROVIDE_HIDDEN (__init_array_end = .); } > m_text .fini_array : { PROVIDE_HIDDEN (__fini_array_start = .); KEEP (*(SORT(.fini_array.*))) KEEP (*(.fini_array*)) PROVIDE_HIDDEN (__fini_array_end = .); } > m_text‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ This may help you to avoid time consuming debugging to figure out the root cause of the core exception. 
View full article
      Product Release Announcement Automotive Microcontrollers and Processors S32 Design Studio for ARM® 2018.R1  Update 5          What is new? Service Pack WCT101xS. This is a cumulative update - it includes all the content of previous updates (Update 1, Update 2, Update 3, Update 4) Installation instructions The update is available for online (via Eclipse Updater) or offline installation (direct download link) online installation:  go to menu "Help" -> "Install New Software..." dialog  select predefined update site "S32DesignStudio - http://www.nxp.com/lgfiles/updates/Eclipse/S32DS_ARM_2018.R1/updatesite" select all available items and click "Next" button   offline installation:   go to S32 Design Studio for ARM product page -> Downloads section or use direct link to download the update archive zip file Start S32DS and go to "Help" -> "Install New Software..." Add a new "Archive" repository and browse to select the downloaded update archive .zip file you downloaded in the previous step Select all available items and click "Next" button.   This will starts the update installation process.
View full article
S32DS for Vision contains many example projects from which you can learn how S32DS for Vision 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 for Vision. In this document, the procedure for creating a project from one of the provided ISP examples through to execution on the EVB is detailed. 1) Launch S32DS for Vision 2) Select "New S32DS Project from example" 3) Select isp_sonyimx224_csi_dcu 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_sonyimx224_csi_dcu_graph'. Then double click on 'ISP data flow : isp_sonyimx224_csi_dcu_graph'. The ISP graph diagram will appear in the editor panel. 4) Change to C/C++ perspective, click on 'Switch to C/C++ Development' 5) Select isp_sonyimx224_csi_dcu: 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. 😎 Should get results similar to this:
View full article
The FreeMASTER serial communication driver is a piece of code that enables an embedded application to communicate with the FreeMASTER PC application. Please note: The FreeMASTER_S32xx does not support all Toolchains and not all versions of supported Toolchains. The available SDKs will vary depending upon the toolchain which is selected. It is independent of the S32/MPC SDKs. In most cases, it is not integrated with the S32/MPC SDKs, although this could change in the future. When creating a new S32DS Application Project, you may have noticed the FreeMASTER_S32xx SDK option in the Select SDK menu. To add the FreeMASTER 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 desired SDK from the list, 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 '+', making it disappear. It should also be noted that there exists example projects which demonstrate usage of the FreeMASTER serial communication driver, though these do not use the FreeMASTER SDK, the driver was added manually. 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 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 FreeMASTER serial communicating!
View full article
This document describes two ways how to add a static library file (*.a) into your S32 Design Studio GCC project. These methods differs from each other in sense how a library update is reflected into project build process. Adding a static library WITHOUT dependency to executable (elf) file This approach assumes a library does not change. An update of the library does not trigger project rebuild process. If the library changes the project needs to be manually cleaned (assuming no other source file has changed) and next build links the updated library. The path to the library and the library name shall be entered into Project Properties -> C/C++ Build -> Settings -> Standard S32DS C Linker -> Libraries Please note that GCC adds prefix "lib" and the extension ".a"  to the library name entered into the above dialog by default. GCC linker will search for the library file named: "libtestlib.a" in the folder "c:\my_libs" In the example above. In case a library cannot be found the linker error occurs e.g. one depicted below. The linker library file name option "-ltestlib.a" is expanded into file name "libtestlib.a.a" which does not exist. 10:28:53 **** Incremental Build of configuration Debug for project S32K144_Project_with_library **** make -j8 all Building target: S32K144_Project_with_library.elf Executing target #5 S32K144_Project_with_library.elf Invoking: Standard S32DS C Linker arm-none-eabi-gcc -o "S32K144_Project_with_library.elf" "@S32K144_Project_with_library.args" c:/nxp/s32ds_arm_v2.0/cross_tools/gcc-arm-none-eabi-4_9/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -ltestlib.a collect2.exe: error: ld returned 1 exit status make: *** [makefile:49: S32K144_Project_with_library.elf] Error 1 10:28:54 Build Finished (took 1s.332ms)‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ For a custom library name add colon character ":" at the beginning of the library name to disable the default prefix/extension expansion. GCC linker now searches for file name "testlib.lib" in the example below:   Adding a static library WITH dependency to executable (elf) file If a static library has changed - "touched"  it is sometimes desired to trigger project rebuild. In this scenario the library shall be added into a different project dialog: Project Properties -> C/C++ Build -> Settings -> Standard S32DS C Linker -> Miscellaneous -> Other objects The items from "Other objects" list is propagated into USER_OBJS makefile variable which is prerequisite for auto-generated makefile rule that build the target (elf): Enjoy linking static libraries in S32DS!
View full article
      Product Release Announcement Automotive Microcontrollers and Processors S32 Design Studio for ARM® 2018.R1  Update 7          What is new? S32K1xx SDK BETA 2.9.0 supporting S32K116, S32K118, S32K142, S32K144, S32K146, and S32K148.  Also included is AMMCLIB 1.1.13 for S32K11x and S32K14x. This is a cumulative update - it includes all the content of previous updates (Update 1, Update 2, Update 3, Update 4, Update 5, Update 6) Installation instructions The update is available for  (via Eclipse Updater) or offline installation (direct download link)  installation:  go to menu "Help" -> "Install New Software..." dialog  select predefined update site "S32DesignStudio - http://www.nxp.com/lgfiles/updates/Eclipse/S32DS_ARM_2018.R1/updatesite" select all available items and click "Next" button   offline installation:   go to S32 Design Studio for ARM product page -> Downloads section or use direct link to download the update archive zip file Start S32DS and go to "Help" -> "Install New Software..." Add a new "Archive" repository and browse to select the downloaded update archive .zip file you downloaded in the previous step Select all available items and click "Next" button.   This will starts the update installation process.
View full article
        Product Release Announcement Automotive Microcontrollers and Processors S32 Design Studio for Vision 2018.R1          Austin, Texas, USA November 23, 2018 The Automotive Microcontrollers and Processors’ Embedded Tools Team at NXP Semiconductors, is pleased to announce the release of the S32 Design Studio for Vision  2018.R1. The S32 Design Studio enablement simplifies and accelerates the deployment of ADAS vision and neural network solutions in automotive, transportation and industrial applications. Here are some of its major features: Release Content S32 Debugger ISP Graph Tool APEX2 Graph Tool NXP GCC Compiler 6.3 NXP Compiler for APU Vision SDK 1.2.0 Complete S32 Design Studio for Vision 2018.R1 release notes are available here. Installation To download the installer please visit the S32 Design Studio product page downloads section or click the direct here. The installer requires the Activation ID to be entered. You should receive a notification email including the Activation ID after the download of the installation package starts. For more information about the product installation see S32DS Vision Installation Manual.   Technical Support S32 Design Studio issues are tracked through the S32DS Public NXP Community space. https://community.nxp.com/community/s32/s32ds  
View full article
Dear S32DS users, S32 Design Studio for Power v1.1 Update 1 has been released.  The Offline update package could be downloaded here:   https://www.nxp.com/webapp/Download?colCode=S32DS_PA_v1.1_UP1&appType=license&location=null&Parent_nodeId=14320533561557…    For online installation please select predefined NXP repository "Help" -> "lnstall New Software..." dialog:  ${p2.metadata.repo.name} - http://www.nxp.com/lgfiles/updates/Eclipse/S32DS_POWER_1_1/com.freescale.s32power.updatesite       The list of changes:  new compiler build 1.1.3 – see details in compiler release notes (attached) MS Visual C++ 2010 Redistributable x86 included for SPT tools for Windows 10 Updated SPT tools: ENGR00381373 - Error build after Generate SPT Fixed ADD, SUB, CMP when destination register is different from src1 ENGR00380758 64 bits operands are not supported for spt2 on windows  Updated Examples  New SPT1 example for MPC5775K o SingleElf_MPC5748G launch files updated with GDB command "set architecture powerpc:vle" Graph Tools ENGR00380255 [SPT] default graph should be created with standard includes Bug fixes: ENGR00375995 MPC5746C Embsys register definitons are missing SPI register set ENGR00379744 SPT assembler shall have initialized 'Include paths (-I) options after MPC577xK or S32R274 project creation ENGR00380796 Linker files section .spt should be corrected for SPT1/SPT2
View full article
This tutorial walks a user through the steps to create a new application for the S32V234 MCU using S32DS for Vision and the built in APEX2 Visual Graph tool. The completed application will take a PNG image, upscale and downscale it using APEX engines and return the processed images. Prerequisites: Some knowledge of the S32V234 System on a Chip (SoC) Have an understanding of the APEX architecture and APEX Core Framework (ACF) Refer to UG-10267-03-14-ACF_User_Guide.pdf to learn about ACF Path: s32ds_installation_directory\S32DS\s32v234_sdk\docs\apex\acf Be familiar with the NXP Vision SDK software Looking for Interactive Tutorial? You can view this tutorial as a video: S32 Design Studio: Getting Started – APEX2 Graph Tool Tutorial
View full article
1. Install S32Design Studio 3.5: S32DS.3.5_b220726_win32.x86_64.exe 2. Download and Install S32 Design Studio 3.5 Update 2 D2302: SW32_S32DS_3.5.2_D2302.zip  (com.nxp.s32ds.update_3.5.2.20230227110156)   3. Download and Install S32 Design Studio 3.5.0 Development Package with support for S32K3xx devices(3.5.0_D2303): SW32K3xx_S32DS_3.5.0_D2303.zip  (com.nxp.s32ds.sp1.s32k3xx.update_3.5.0.20230405175452)   4. For users who need to install S32K396 RTD for development, please download and install S32 Design Studio Service Pack 1 RTM with support for S32K39x devices(3.5.0_D2303): SW32K39x_S32DS_3.5.0_D2303.zip (com.nxp.s32ds.sp1.s32k396.update_3.5.0.20230330)   5.a) For users who need to install S32M276 RTD in S32K3 RTD 3.0.0\P01\P01 HF01\P01 HF02 for development, please download and install S32 Design Studio Service Pack 2 CD with support for S32M2xx devices (3.5.0_D2302😞 SW32M2xx_S32DS_3.5.0_D2302.zip(com.nxp.s32ds.s32m2.update_3.5.0.20230222151347)  Note: Please contact your local FAE to enable for you download the S32M276 development package. 5.b) For users who need to install S32M276 RTD in S32K3 RTD 3.0.0 P07 for development, , please download and install S32 Design Studio Service Pack 2 EAR2 with support for S32M2xx devices(3.5.0_D2303😞 SW32M2xx_S32DS_3.5.0_D2303.zip(com.nxp.s32ds.s32m2.update_3.5.0.20230328160305)   6. Select and install one of the following updatesite for S32K3 RTD 3.0.0: 6.a) Download and install S32K3 Real-Time Drivers Version 3.0.0: SW32K3_RTD_4.4_R21-11_3.0.0_D2303_DS_updatesite.zip   6.b) Download and install S32K3 Real-Time Drivers Version 3.0.0 P01 : SW32K3_RTD_4.4_3.0.0_P01_D2303_DS_updatesite.zip   6.c) Download and install S32K3 Real-Time Drivers Version 3.0.0 P01 HotFix 02 (3.0.0_P01_HF02😞 SW32K3_RTD_4.4_3.0.0_P01_HF02_DS_updatesite_D2305.zip   6.d) Download and install S32K3_M27X Real-Time Drivers Version 3.0.0 P07: SW32K3_RTD_R21-11_3.0.0 _P07_D2307.zip  
View full article
     This summary records my process of using J-LINK Plus in S32 Design Studio for S32 Platform, hoping to help people who use the same tool.   1.Download the latest package: https://www.segger.com/downloads/jlink/   2.Install the downloaded package and some note will show like this.   3.Open J-Link GDB Server V7.8 , if you current firmware version is too low, you will be prompted to upgrade to the latest firmware version.       At this point ,if you use the default configuration to debug the application, the following error will appear.   Modified the "Debug configurations" for S32 Design Studio platform V3.4   Change the highlighted part to the path below. C:\Program Files (x86)\SEGGER\JLink\JLinkGDBServerCL.exe C:\NXP\S32DS.3.4\S32DS\tools\gdb-arm\arm32-eabi\bin\arm-none-eabi-gdb.exe   Modified the "Debug configurations" for S32 Design Studio platform V3.5 Change the highlight part to the path below. C:\Program Files (x86)\SEGGER\JLink\JLinkGDBServerCL.exe C:\NXP\S32DS.3.5\S32DS\tools\gdb-arm\arm32-eabi\bin\arm-none-eabi-gdb.exe   For now, you may debug your project with SEGGER J-Link Plus Tools. Hope it works for you!
View full article
This document shows the step-by-step process to create a simple blinking LED application for the S32G family using the S32 RTD non-AUTOSAR drivers. For this example used for the S32G-VNP-RDB2 EVB, connected via ethernet connection through S32 Debugger. Preparation Setup the software tools Install S32 Design Studio for S32 Platform Install the S32G development package and the S32 RTD AUTOSAR 4.4. Both of these are required for the S32 Configuration Tools. Launch S32 Design Studio for S32 Platform Procedure New S32DS Project OR Provide a name for the project, for example 'Blinking_LED_RTD_No_AUTOSAR'. The name must be entered with no space characters. Expand Family S32G2, Select S32G274A_Rev2 Cortex-M7 Click Next Now, uncheck the selection mark for other two cores.  Click '…' button next to SDKs Check box next to PlatformSDK_S32XX_2022_07_S32G274A_Rev2_M7_0. (or whichever latest SDK for the S32G is installed). Click OK Click Finish. Wait for project generation wizard to complete, then expand the project within the Project Explorer view to show the contents. To control the LED on the board, some configuration needs to be performed within the Pins Tool. There are several ways to do this. One simple way by double-click on the MEX file. By default, the Pins tool is then presented. For the Blinking LED example, one pin must be configured as output. The S32G-VNP-RDB2 EVB has an RGB LED for which each color is connect to a separate pin on the S32G-VNP-RDB2 EVB. For the blue LED the desired pin is PA_06. From the Peripheral Signals tab left to the Pins tool perspective layout, locate Open the Siul2_0 from the peripheral signals tab. And from the drop down menu select “gpio,6 PA_06” option as per shown in the following image. We are using PA_06 for the GPIO usage, so we are routing the SIUL2_0 GPIO signal to this pin. (This pin is also available for other modules like -FR, FTM, SPI_1) . The Direction required! menu will appear. Select Output then OK. In Routing Details view, notice a new line has been added and highlighted in yellow. Add ‘LED’ to the Label and Identifier columns for the PORTD 0 pin. Code Preview Go to Peripherals tool and add Siul2_Dio to enable LED blinking, it adjacent to the Blue LED on S32G-VNP-RDB2 EVB. Click on the Peripherals Tool icon from the Eclipse Perspective navigation bar. From the Components view, click on ‘Add a new configuration component…’ button from the Drivers category. This will bring up a list of all configuration components. Locate and then select the ‘Siul2_Dio’ component from the list and click OK. Do not worry about the warning message. It is only indicating that the driver is not already part of the current project. The associated driver package will be added automatically. Note: It may be necessary to change the selection at the top from ‘Present in the tool-chain project’ to ‘All’. The DIO driver provides services for reading and writing to/from DIO Channels. Also, select the Siul2_Port_1 tab and select the check mark against ‘Siul2 IP Port Development Error Detect’ option as below. The Gpio_Dio driver requires no further configuration. Click Save to store all changes to the .MEX file. Now the device configurations are complete and the RTD configuration code can be generated. Click ‘Update Code’ from the menu bar. To control the output pin which was just configured, some application code will need to be written. Return to the ‘C/C++’ perspective. If not already open, in the project window click the ‘>’ next to the ‘src’ folder to show the contents, then double click ‘main.c’ file to open it. This is where the application code will be added. Before the pin can be controlled, it needs to be initialized using the configuration information that was generated from the S32 Configuration tools. Initialize all pins using the Port driver by adding the following line: Insert the following line into main, after the comment 'Write your code here': /* Initialize all pins using the Port driver */ Siul2_Port_Ip_Init(NUM_OF_CONFIGURED_PINS0, g_pin_mux_InitConfigArr0); Now, add logic for the LED turn and off. To turn the pin on and off with some delays in-between to cause the LED to blink. Make the delays long enough to be perceptible. Add line to initialize variable uint8 i = 0; Change the code within the provided for loop, and add the following lines: //logic for blinking LED 10 times for (i=0; i<10; i++) {       Siul2_Dio_Ip_WritePin(LED_PORT, LED_PIN, 1U);       level = Siul2_Dio_Ip_ReadPin(LED_PORT, LED_PIN);       TestDelay(2000000);       Siul2_Dio_Ip_WritePin(LED_PORT, LED_PIN, 0U);       level = Siul2_Dio_Ip_ReadPin(LED_PORT, LED_PIN);       TestDelay(2000000); } return (0U); And add this line above the main() function to initialize the variable volatile uint8 level; Before the 'main' function, add a delay function as follows: void TestDelay(uint32 delay); void TestDelay(uint32 delay) {    static volatile uint32 DelayTimer = 0;    while (DelayTimer<delay)    {        DelayTimer++;    }    DelayTimer=0; } Update the includes lines at the top of the main.c file to include the headers for the drivers used in the application: Remove #include "Mcal.h" Add #include "Siul2_Port_Ip.h" #include "Siul2_Dio_Ip.h" Build 'Blinking_LED_RTD_No_AUTOSAR'. Select the project name in 'C/C++ Projects' view and then press 'Build'. After the build completes, check that there are no errors. Open Debug Configurations and select 'Blinking_LED_RTD_No_AUTOSAR_Debug_RAM'. Make sure to select the configuration which matches the build type performed, otherwise it may report an error if the build output doesn’t exist. Now, you need to Select the Interface (Ethernet or USB) by which the S32 Debug Probe is connected. If connected via USB and this option is selected for interface, then the COM port will be detected automatically (in the rare event where 2 or more S32 Debug Probes are connected via USB to the host PC, then it may be necessary to select which COM port is correct for the probe which is connected to the EVB) If connected via Ethernet, enter the IP address of the probe. See the S32 Debug Probe User Manual for ways to determine the IP address. Click Debug To see the LED blink, click ‘Resume'. This code as it will blink the LED times, you can make changes in for loop condition to blink it infinitely.
View full article
This document shows the step-by-step process to create a simple 'Blinking_LED' application using the S32K1xx RTD and the S32 Configuration Tools. This example is for the S32K144EVB-Q100 EVB, connected to a PC through USB (OpenSDA) connection.   Preparation Setup the software tools Install S32 Design Studio for S32 Platform Install the S32K1xx development package and the S32K1 RTD AUTOSAR 4.4. Both of these are required for the S32 Configuration Tools. Launch S32 Design Studio for S32 Platform Procedure New S32DS Project OR  Provide a name for the project, for example 'Blinking_LED_RTD_No_AUTOSAR'. The name must be entered with no space characters. Expand Family S32K1xx, Select S32K144 Under Toolchain, select NXP GCC 9.2 Click Next Click '…' button next to SDKs Check box next to PlatformSDK_S32K1_2022_02_S32K144_M4F. Click OK Click Finish. Wait for project generation wizard to complete, then expand the project within the Project Explorer view to show the contents. To control the LED on the board, some configuration needs to be performed within the Pins Tool. There are several ways to do this. One simple way by double-click on the MEX file. By default, the Pins tool is then presented. For the Blinking LED example, one pin must be configured as output. The S32K144 EVB has an RGB LED for which each color is connect to a separate pin on the S32K144 device. For the blue LED the desired pin is PTD0. From the Peripheral Signals tab in the view to the upper left in the standard Pins tool perspective layout, locate PORTD, then PTD0 and check the box next to it. The Direction required! menu will appear. Select Output then OK. In Routing Details view, notice a new line has been added and highlighted in yellow. Add ‘LED’ to the Label and Identifier columns for the PORTD 0 pin. Notice the changes which appear in the following views: Peripherals Signals Package Code Preview Go to Peripherals tool and add Gpio_Dio. Click on the Peripherals Tool icon from the Eclipse Perspective navigation bar. From the Components view, click on ‘Add a new configuration component…’ button from the Drivers category. This will bring up a list of non-AUTOSAR components. Locate and then select the ‘Gpio_Dio’ component from the list and click OK. Do not worry about the warning message. It is only indicating that the driver is not already part of the current project. The associated driver package will be added automatically. The Gpio_Dio driver requires no further configuration. Click Save to store all changes to the .MEX file. Now the device configurations are complete and the RTD configuration code can be generated. Click ‘Update Code’ from the menu bar. To control the output pin which was just configured, some application code will need to be written. Return to the ‘C/C++’ perspective. If not already open, in the project window click the ‘>’ next to the ‘src’ folder to show the contents, then double click ‘main.c’ file to open it. This is where the application code will be added. Before anything else is done, initialize the clock driver. Insert the following line into main, after the comment 'Write your code here': Clock_Ip_InitClock(Clock_Ip_aClockConfig); Before the pin can be controlled, it needs to be initialized using the configuration information that was generated from the S32 Configuration tools. Initialize all pins using the Port driver by adding the following line: Port_Ci_Port_Ip_Init(NUM_OF_CONFIGURED_PINS0, g_pin_mux_InitConfigArr0); Turn the pin on and off with some delays in-between to cause the LED to blink. Make the delays long enough to be perceptible. Within the provided for loop, add the following lines: Gpio_Dio_Ip_WritePin(LED_PORT, LED_PIN, 1U); delay(720000); Gpio_Dio_Ip_WritePin(LED_PORT, LED_PIN, 0U); delay(720000); Before the 'main' function, add a delay function as follows: voiddelay(volatileint cycles) {      /* Delay function - do nothing for a number of cycles */      while(cycles--); } Update the includes lines at the top of the main.c file to include the headers for the drivers used in the application: Remove #include "Mcal.h" Add #include "Port_Ci_Port_Ip.h" #include "Gpio_Dio_Ip.h" #include "Clock_Ip.h" Build 'Blinking_LED_RTD_No_AUTOSAR'. Select the project name in 'C/C++ Projects' view and then press 'Build'. After the build completes, check that there are no errors. Open Debug Configurations and select 'Blinking_LED_RTD_No_AUTOSAR_Debug_FLASH'. Make sure to select the configuration which matches the build type performed, otherwise it may report an error if the build output doesn’t exist. Confirm the EVB is connected to the PC via USB cable, then check the Debugger tab settings and ensure that 'OpenSDA Embedded Debug - USB Port' is selected for interface. Click Debug To see the LED blink, click ‘Resume'
View full article
NXP devices can be secured either with password or challenge and response authentication scheme. The S32 Debugger included within the S32 Design Studio for S32 Platform IDE with the S32 Debug Probe provides the ability to debug a secured device. This document provides only the necessary commands specific to launching a debug session on secured NXP devices.. Once the device is unsecured, it will remain so until a power-on-reset or destructive reset occurs. Preparation Setup the software tools Install S32 Design Studio for S32 Platform Install the Development Package for the device you are debugging. In this case, the S32G2xx development package. This package is important as it contains the S32 Debugger support component Setup the hardware Confirm the setup of the S32G274A evaluation board. Connect the power supply cable Setup the S32 Debug Probe. Refer to the S32 Debug Probe User Manual for installation instructions. Connect the S32 Debug Probe to the evaluation board via JTAG cable. Connect the S32 Debug Probe to the host PC via USB cable OR via Ethernet cable (via LAN or directly connected and configured for static IP address) and power supply connected to USB port. Launch S32 Design Studio for S32 Platform Open existing project or create a new project and check that it successfully builds. If creating a new project, be sure the S32 Debugger is selected in the New Project Wizard.     Procedure Before starting a secure debug session, first confirm that the device is indeed secure. Once one core is unlocked, all cores are unlocked and will remain so until a power-on-reset or destructive reset occurs. After confirming the device is secured, then select the procedure which applies to the lifecycle of the SoC to be debugged.   Check the state of the SoC Open a command window from the installation directory containing the GTA server: {S32DS Install Path}\S32DS\tools\S32Debugger\Debugger\Server\gta\ Execute the following command: gta.exe -t s32dbg This will invoke a utility that launces a new GTA server instance and then communicates with the target via the S32 Debug Probe and will request a set of properties of the SoC. These properties are available to be read regardless of security state. The GTA server will close once the information is returned. As is shown above, the Debug state is ‘Locked’. This means it is secured and the secure debug steps outlined within this document must be used. There is no way to determine the security enabled on the SoC, so this should be known by the user in order to select the correct authentication scheme. Proceed from here using the method (Password or Challenge & Response) which applies for your SoC security configuration. Password From S32DS, open the Debug Configurations menu, select the configuration for the project you wish to debug, select the ‘Debugger’ tab and scroll down until the ‘Secure debugging’ section is visible. Check the box for ‘Enable secure debugging’ and then select the Debugging type ‘Password’. Click Debug. When the debug session initialization reaches the stage where the password must be entered to unsecure the SoC, the following menu will appear. Enter the password. This is a 16-byte value entered as a hexadecimal without the leading ‘0x’. If you choose to check the box for ‘Store keyword in secure storage’, the value entered will be stored within the Eclipse secure storage and will remain available for the duration of the current S32DS instance. This saves the user from having to enter the password again, should the security state of the SoC becomes once again secured. Now the debug session initialization will complete and debug activities may be executed as with any SoC which is not secured. After terminating the debug session, the GTA utility can be used again to see the new state of the SoC. This utility cannot be executed while the debug session is running. It launches a new instance of the GTA server, which would be blocked by the already running debug session. Challenge & Response For the Challenge & Response security scheme, the included Volkano Browser must be used. From the S32DS menu bar, select Window -> Show View -> Other -> ‘Volkano Browser’. The Volkano Browser will now appear in the current perspective. Since there is no current key stored in the Volkano local storage, a new key must be registered. Click on ‘Register Key’ to register a new key. This will bring up the Volkano command dialog. Now enter the ADKP value (Application Debug Key/Password) which is correct for the SoC to be debugged. The Volkano utility uses the same functionality as the command-line GTA utility shown earlier to check the state of the SoC. This will read the UID from the Soc. Click Connect to the SoC and load the UID (Device Unique ID). The UID is associated with the ADKP when it is registered within the Volkano local storage for easier access in the future. Click OK to complete the registration of the new key. Now the key is registered, the debug session can be setup and started. Open the Debug Configurations menu, select the configuration for the project you wish to debug, select the ‘Debugger’ tab and scroll down until the ‘Secure debugging’ section is visible. Check the box for ‘Enable secure debugging’ and then select the Debugging type ‘Challenge & Response’. Click Debug. Now the debug session initialization will complete and debug activities may be executed as with any SoC which is not secured. During debug session initialization, the key that was registered will be used to unsecure the SoC. After terminating the debug session, the GTA utility used earlier can be used again to see the new state of the SoC. This utility cannot be executed while the debug session is running. It launches a new instance of the GTA server, which would be blocked by the already running debug session. Troubleshooting There are some messages displayed when things go wrong that can help to identify the cause of the issue. Due to the sensitive nature of the Secure Debug, the error indications detailed below are inherently general and are provided as a guide for interpreting them to determine the likely cause. Debug session started when SoC is still secured There is an error message reported in the S32 Debugger Console to indicate the SoC is still secure. To see this message the GDB Server log must be enabled in Debug Configurations -> Debugger tab, GDB Server section: When this error is incurred, first indication is popup error message for Error code 102: Next, the following text will be displayed in the S32 Debugger console window: If needed, select this view from the menu: In addition, if GDB Traces log is enabled, the following error message can be found in the gdb traces console view: Enable the GDB Traces log in Window->Preferences, then search on GDB: To select the view from console: Incorrect Challenge/Response Or Password If the SoC is setup for Challenge & Response security scheme, but Password security scheme is selected in Debug Configuration, or Challenge & Response is correctly selected but the wrong ADKP value is provided, below are the expected error messages. The result is same if the SoC is setup for Password and either Challenge & Response or wrong password is used. First error message is Error code 601: Next, the gdb traces console displays the following error: There is no error displayed in the S32 Debugger console.
View full article