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:
The S32K3 RTD 2.0.0 lacks SIUL2 external interrupt function. Siul2_Icu is part of Icu(Input Capture Unit), the main function of the example should have been: use the Icu and Dio drivers to toggle a LED on a push button. But it doesn't. So this document will show the step-by-step process to add 'SIUL2 external interrupt' function in Siul2_Port_Ip_Example_S32K344 using the S32K3xx RTD LLD(Low Level Driver) and the S32 Configuration Tools. This example is for the S32K3X4EVB-Q257, 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 1. Import Siul2_Port_Ip_Example_S32K344 example File->New->S32DS Project from Example It can be seen that in the Icu (Input Capture Unit Driver) folder of S32K3 RTD 2.0.0, there are only interrupt routines implemented by the Emios module for the time being, and external interrupt routines for the EIRQ pin of the Siul2 module does not exist. Here we import the Siul2_Port_Ip_Example_S32K344 routine, and add the Siul2_Icu part on this basis.   2. Add push button and LED in Pins tool Add the pins for user buttons (SW4 PTB26 SIUL2 eirq13) according to the S32K3X4EVB-Q257.   3. Add IntCtrl_Ip component Go to Peripherals tool. Here we can see that the ‘Siul2_Dio’ and ‘Siul2_Port’ components are already added. 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 ‘IntCtrl_Ip’ component from the list and click OK. Option 1: Keep the default setting after add ‘IntCtrl_Ip’ component(Here we didn't change the settings of ‘IntCtrl_Ip’, nor use IntCtrl_Ip_Init and IntCtrl_Ip_ConfigIrqRouting API to enable interrupts and install handlers in IntCtrl_Ip).This routine only uses one interrupt, so we will call IntCtrl_Ip_InstallHandler and IntCtrl_Ip_EnableIrq those two APIs to install and enable the SIUL2 EIRQ13 IRQ separately. Option 2: User can enable many interrupts in the Interrupt Controller configuration(Note user can only add one interrupt controller configuration in the RTD); Meanwhile, it can set interrupt’s priority separately. The two APIs IntCtrl_Ip_Init and IntCtrl_Ip_ConfigIrqRouting can initialize these interrupts as a whole. The name of the Handler in the Generic Interrupt Settings tab needs to be the same as the name in peripheral_Ip_Irq.c of the corresponding peripheral. For example, this routine uses the PTB26 SIUL2 EIRQ13 external interrupt, which can be found in RTD/src/Siul2_Icu_Ip_Irq.c: ISR(SIUL2_EXT_IRQ_8_15_ISR) According to the "Table 35" of S32K3XXRM reference manual, we can see the SIUL2 EIRQ13(PTB26) external interrupt used in this routine belongs to SIUL_1_IRQn and the Handler name SIUL2_EXT_IRQ_8_15_ISR.   4. Add Siul2_Icu component Click on ‘Add a new configuration component…’ button from the Drivers category. Locate and then select the ‘Siul2_Icu’ component from the list and click OK. Step 5 select SIUL2_0_IRQ_CH_13 because this routine selects the onboard SW4 PTB26 SIUL2 EIRQ13 external interrupt (the onboard SW5 PTB19 pin has no EIRQ external interrupt function, so I did not added here). Step 6 set DIRER0[EIREn] to enable this external interrupt pin. Step 8 set the IFCPR[IFCP] filter clock prescaler. Step 10 input 13 for the Hardware channel due to we use SIUL2 EIRQ13. Step 11 set IFER0[IFEn] to enable the glitch filter for the external interrupt pin. Step 12 set IFMCRn[MAXCNT] to assign value to the external interrupt filter counter. Step 14 select the IcuSiu2Channel_0 channel configured in the IcuSiul2 tab above. Step 15 select the ICU_RISING_EDGE according to the SW4 button circuit (press to generate a rising edge). Step 16 Because the SIUL2 EIRQ external interrupt is used in this routine, ICU_MODE_SIGNAL_EDGE_DETECT mode must be selected. Step 17 add the corresponding callback function name. That is, it corresponds to the notification after the SIUL2 EIRQ external interrupt pin captures the rising edge (the interrupt flag does not need to be cleared here, the driver has already been implemented it).   5. Include the headers for the drivers used in the application #include "Siul2_Icu_Ip.h" #include "IntCtrl_Ip.h"   6. Add Siul2_Icu LLD APIs Siul2_Icu_Ip_Init is used to initialize all Siul2_Icu channels generated by the S32 Configuration Tools (this routine only configures the channel SW4 PTB26 SIUL2 EIRQ13). Siul2_Icu_Ip_EnableInterrupt enable Siul2 IRQ interrupt for the specified channels. Siul2_Icu_Ip_EnableNotification enable callback function of Siul2 IRQ interrupt for the specified channels. This routine uses the SW4 button to trigger the PTB26 SIUL2 EIRQ13 external interrupt callback function SW4_eirq13_PTB26_Callback to flip the PTB18 D33 red LED.   7. Add IntCtrl LLD APIs IntCtrl_Ip_InstallHandler installs the SIUL2_EXT_IRQ_8_15_ISR interrupt handler generated by the S32 Configuration Tools. IntCtrl_Ip_EnableIrq enables the corresponding interrupt. Why input SIUL_1_IRQn and SIUL2_EXT_IRQ_8_15_ISR has been explained at the end of "4. Adding the IntCtrl_Ip component" above. References - S32K3xx Pins and Clocks with RTD - Training - AN13435: SDK/MCAL to Real-Time Drivers - Integration Manual for S32K3 ICU Driver (RTD_ICU_IM.pdf) - User Manual for S32K3 ICU Driver (RTD_ICU_UM.pdf) - Integration Manual for S32K3 PLATFORM Driver (RTD_PLATFORM_IM.pdf) - User Manual for S32K3 PLATFORM Driver (RTD_PLATFORM_UM.pdf)
View full article
Hi,     Hope this will be helpful and useful for you. Cheers! Oliver
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
The S32 Design Studio for S32 Platform supports the S32R41 device with the S32 Debugger. This document provides the details on how to setup and begin a debugging session on the S32R41 EVB (X-S32R45-EVB). Preparation Setup the software tools Install S32 Design Studio IDE Use the Extensions and Updates menu within S32 Design Studio for S32 Platform to add the S32R41 Development Package. Setup the hardware Confirm the setup of the S32R41 evaluation board.        Connect the power supply cable Setup the S32 Debug Probe        Connect the S32 Debug Probe to the evaluation board via JTAG cable. Refer to the S32 Debug Probe User Manual for installation instructions.        Connect the S32 Debug Probe to the host PC via USB, or Ethernet (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 Create new or open existing 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 Open the Debug Configurations menu, then follow the steps depending on whether an S32 Debugger configuration exists for your project. If the project was created using the New Project Wizard in S32 Design Studio for S32 Platform, and the S32 Debugger was selected as the debugger, then it likely has existing debug configuration(s). S32 Debugger Configuration(s) Exist If existing S32 Debugger configuration, proceed with probe configuration. Otherwise, skip to the next section. Below is shown the debug configuration which appears for the provided RTD example project Port_ToggleLed_S32R41_M7'. The suffixes 'debug', 'ram', and 's32debugger' refer to how the project was built and the debugger the configuration is for. Select the debug configuration which corresponds to the project, build type debug, and primary core (if a multicore project) Select the Debugger tab Select the Interface (Ethernet/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. Proceed to section ‘Start Debugger’ S32 Debugger Configuration(s) Do Not Exist There might be no existing debug configuration if the project is being ported from another IDE or was created to use another debugger. Select the S32 Debugger heading and click New Launch configuration (or double click on the S32 Debugger heading, or right click on the S32 Debugger heading and select New from the context menu) A new debug configuration appears with the name set to the name of the active project in the Project Explorer window(this can be set by opening a file from the project or selecting an already opened file from the project in the editor), and the build type which was used to build it. If this is not matching your intended project then it can either be modified to match or deleted and recreated after the active project has been changed to the desired project. Adjust the name of the project as desired. From the Main tab, check that the Project field is set to the correct project name, as listed in the Project Explorer, and that the C/C++ Application is set to the ELF file which was built. The name of the project can be customized, but '_' must be used instead of spaces. If the Project field is not set or incorrect, click Browse... and then select the correct project name from the list. If more than one project is open in the workspace, then each will be listed. This shows how, regardless of which project is active in the C/C++ perspective, any available workspace project could be associated. This can be useful when reusing a debug configuration from one project in another. If the C/C++ Application is not set or incorrect, click Search Project... and then select the correct binary file (will only work if Project field is correct and project was successfully built). Switch to the Debugger tab. Click 'Select device and core' and then select the correct core from the list. In the case of our example, the M7_0 core is correct. If this is not the primary core, then uncheck the box next to 'Initial core'. This is done only for multicore projects for the non-boot cores. This causes the scripts to skip the initialization of the core as the boot core will launch the other cores so additional initialization will not be required. Select the Interface (Ethernet/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 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 Apply, then proceed to next section ‘Start Debugger’. Start Debugger Click Debug. This will launch the S32 Debugger. When the debugger has been successfully started, the Debug perspective is opened and the application is executed until a breakpoint is reached on the first line in main().
View full article
In embedded systems development, attention to memory utilization is universal. In S32 Design Studio, this information can easily be provided at the end of a successful build by invoking a linker option. Right-click on the project name in the Project Explorer panel and select 'Properties' from the menu. Navigate to the C/C++ Build -> Settings ->Standard S32DS C Linker -> Miscellaneous menu. From the Other options section, click Add. In the 'Enter Value' pop-up menu, enter: -print-memory-usage Click OK, then Apply and Close. Now build the project and see the memory usage information displayed in the Console window.
View full article
Migrating an SDK project for S32K1xx devices between SDK v4.0.1 and v4.0.2 is not as simple as attach and detaching the SDKs. It is complicated by the fact that SDK v4.0.1 is supported by only S32DS v3.3 and SDK v4.0.2 is supported by only S32DS v3.4. So this means both SDKs will not be present at the same time in one version of S32DS. In addition, the method for attaching the SDKs changed between SDK v4.0.1 and v4.0.2. In v4.0.1, the SDKs were added to the S32DS project via a link. In v4.0.2, the SDK files are added to the S32DS project by copying the actual files into the project. To overcome this, it is necessary to perform some manual operations. The steps required are detailed in this document, along with the necessary steps to adapt the .mex file containing the S32 Configuration Tools settings. Due to differences in projects based on the method of creation, there are 3 scenarios to be covered here which are assumed to be the most common: Project was created by 'New Project from Example' wizard and one of the SDK example projects was selected. Project was created by 'New Application Project' wizard and the SDK was selected for attachment within the wizard. Project was existing one and SDK was attached using the SDK management tool. Due to enough similarities between the projects, the last two will be covered as one scenario, under the heading 'New Application Project'. The first one will be covered under the heading 'New Project from Example'. Prerequisites Install S32 Design Studio IDE 3.4 Install the S32K1xx development package and S32SDK S32K1XX RTM 4.0.2 package Procedure New Project from Example For this demonstration, the S32K1xx SDK v4.0.1 example project 'flexio_i2s_master_s32k144' will be used. Open or create the project within S32DS 3.3 Expand project directory in Project Explorer and look for .mex file If no .mex file is present, then right click on project name and select 'S32 Configuration Tool -> Open Pins' (could select any tool within S32 Configuration Tool). Even though the .mex file contains the settings for S32 Configuration Tools, the same settings are also preserved in YAML code placed into the headers of each of the .c files generated by the S32 Configuration Tools into the 'board' folder in the project. By opening the S32 Configuration Tools, it detects there is no .mex file and scans the generated files for the YAML code. If YAML code is found, then a new .mex file is produced and placed in the project. The perspective is changed to the Pins Tool, nothing more needs to be done, .mex file has been created from the YAML code. If no YAML code had been found, then the user would be presented with a menu to select target device and SDK. Switch back to C/C++ perspective to confirm. Open S32DS 3.4 and import the project. It is important to note that separate workspaces should be used for S32DS 3.3 and S32DS 3.4. The project should be imported into the S32DS 3.4 workspace so the checkbox 'Copy projects into workspace' should be ticked. Right-click on Project -> Properties -> C/C++ Build -> Settings -> Standard S32DS C Compiler -> Includes, then delete all paths which contain 'S32_SDK_PATH' Repeat for Standard S32DS Assembler -> General Apply and Close The files in the SDK folder were included in the project as links and not actual files, and since the SDK 4.0.1 is not installed to S32DS 3.4, the links point to non-existing files. This means the Attach function in the SDK manager will not be able to replace them with the corresponding files from SDK 4.0.2 because it doesn't know how to replace files which don't exist. From Project Explorer, delete folder ' SDK' from the project. Now the project is ready to use the SDK manager to detach the old SDK and attach the new SDK. In Project Explorer, right-click on Project -> SDKs. When the SDK manager launches, it scans the project for any attached SDKs. In the case of this example, an SDK is detected as attached, but since it does not match any installed SDKs, a message appears asking to detach SDK 4.0.1. Since this is a desired action, click OK. With SDK 4.0.1 already detached, select SDK 4.0.2, click 'Attach/Detach...' Click 'Select All' to attach the SDK to all build configurations. This sets up the include paths, and linker paths for the SDK for each build configuration. If desired, the build configurations could be selected individually. Click OK to complete the selections. To apply the changes and exit the SDK manager, click 'Apply and Close'. The SDK Manager detects that some of the files from the new SDK are replacing existing files in the project. By default, all conflicting files are set to replace the existing file. If desired, individual files can be deselected. Please note, with the checkbox for 'Backup project files' ticked, any files replaced will be preserved in a backup folder for future recovery, comparison, etc. In general, it may be wise to allow the file to be replaced and later merge with the customizations in the backup folder. For this example, no modifications were made, so default settings are kept. Click OK to complete the process. The new SDK is attached and the new SDK folder can be identified. The .mex file contains the settings for the S32 Configuration Tools, however, it is still set for the SDK 4.0.1. It must be manually updated so the S32 Configuration Tools can be used to generate the new code for the 'board' folder. Right-click on .mex file and select 'Open With -> Text Editor'. All that is required is to modify the mcu_data section containing the SDK name: 's32sdk_s32k1xx_rtm_401' -> 's32sdk_s32k1xx_rtm_402' Now save the change. Next, the files in the 'board' folder must be regenerated from the S32 Configuration Tools to reflect the new SDK. Right-click on the .mex file and select 'Open With -> S32 Configuration Tools'. A warning message appears indicating that it has detected the mex file was created in an older version of the tool and that once the mex file is saved in the current tool, it may no longer open in an older version of the tool. This is expected. Click OK. Notice the error symbol. Mouse-over to see the details. It is an error with Peripherals tool. Select Peripherals tool. The issue is with edma_config_1, because it is highlighted red. Click on it to see the interface. The interface changed from the previous version to allow for multiple configurations where previously it supported only one. To resolve the error a new configuration must be added to the list. Click on the '+' as shown to add the new configuration. This particular error will only appear for projects which include the EDMA module. The Problem Indicator is now green, this means there are no warnings or errors. It is now time to generate the code, click 'Update Code' A menu appears identifying new and/or updated files. If desired, selecting 'change' on a row will open a comparison tool showing the changes between the existing and the new versions of the associated file. Click OK to proceed. Switch to C/C++ perspective Errors on project are now gone. If the project successfully built before the conversion, then build again to confirm everything was converted properly.   New Application Project For this demonstration, a new project will be created in S32DS 3.3 using the New Application Project wizard and the S32K1xx SDK 4.0.1 will be selected during project creation. Import the project into S32DS 3.4 Use the SDK Manager to detach the old SDK and then attach the new SDK. In Project Explorer, right-click on Project -> SDKs. When the SDK manager launches, it scans the project for any attached SDKs. In the case of this example, an SDK is detected as attached, but since it does not match any installed SDKs, a message appears asking to detach SDK 4.0.1. Since this is a desired action, click OK With SDK 4.0.1 already detached, select SDK 4.0.2, click 'Attach/Detach...' Click 'Select All' to attach the SDK to all build configurations. This sets up the include paths, and linker paths for the SDK for each build configuration. If desired, the build configurations could be selected individually. Click OK to complete the selections. To apply the changes and exit the SDK manager, click 'Apply and Close'. The SDK Manager detects that some of the files from the new SDK are replacing existing files in the project. By default, all conflicting files are set to replace the existing file. If desired, individual files can be deselected. Please note, with the checkbox for 'Backup project files' ticked, any files replaced will be preserved in a backup folder for future recovery, comparison, etc. In general, it may be wise to allow the file to be replaced and later merge with the customizations in the backup folder. For this example, no modifications were made, so default settings are kept. Click OK to complete the process. The .mex file contains the settings for the S32 Configuration Tools, however, it is still set for the SDK 4.0.1. It must be manually updated so the S32 Configuration Tools can be used to generate the new code for the 'board' folder. Right-click on .mex file and select 'Open With -> Text Editor'. All that is required is to modify the mcu_data section containing the SDK name: 's32sdk_s32k1xx_rtm_401' -> 's32sdk_s32k1xx_rtm_402' Now save the change. Next, the files in the 'board' folder must be regenerated from the S32 Configuration Tools to reflect the new SDK. Right-click on the .mex file and select 'Open With -> S32 Configuration Tools'. A warning message appears indicating that it has detected the mex file was created in an older version of the tool and that once the mex file is saved in the current tool, it may no longer open in an older version of the tool. This is expected. Click OK. Check for any errors or warnings by looking for the yield sign. It will change color based on the conditions: Green = No Problems, Yellow = Warnings, Red = Errors. Mouse-over the icon for more information on the location of the error. Aside from resolving warnings and errors, there should be no changes required as the settings have been preserved from the original project. In this example, there are no warnings or errors, so it is possible to proceed with updating the generated files. Click 'Update Code' A menu appears identifying new and/or updated files. If desired, selecting 'change' on a row will open a comparison tool showing the changes between the existing and the new versions of the associated file. Click OK to proceed. Change back to C/C++ perspective. Errors on project are now gone. If the project successfully built before the conversion, then build again to confirm everything was converted properly.
View full article
**************************************************************************************** IDE: S32 Design Studio Version 3.4 Workspace: C:\Projects\S32DS_3_4 Project name: S32K314_00_blank_00 Project location: C:\Projects\S32DS_3_4\S32K314_00_blank_00 **************************************************************************************** 1. After you finish the edit on your codes, please close S32DS 2. Input the command(as below) at your clean_and_build_s32k3_commandLine.bat 3. Run command prompt with Administrator right. 4. Run clean_and_build_s32k3_commandLine.bat at command prompt   You will get the *.elf under the folder of C:\Projects\S32DS_3_4\S32K314_00_blank_00\Debug_FLASH Cheers! Oliver
View full article
This short video will present an overview of S32 Configuration Tool. Tools that are briefly overviewed: Pins tool, clock tool, peripheral tool, DCD tool and IVT tool.
View full article
This document details the steps to program external EEPROM with the 32 reset configuration bits in support of the 'Boot from serial RCON' method detailed in the S32G Reference Manual. The Python scripts used for this task are designed and tested to work on the S32G-VNP-EVB with S32G2xx Rev2 and the Atmel AT24C01C it contains.(Serial EEPROM is not implemented on NXP VNP-RDB board)   The RCON can be set by the following: Fuses (internal to the device) Parallel (GPIO pins/DIP Switches on EVB) Serial (EEPROM connected via I2C) The Serial option can be programmed using a debug probe connected via JTAG. This enables the RCON to be controlled remotely, assuming the debug probe is setup to allow remote connections.    Preparation Install S32 Design Studio IDE  Install the Development Package for the device you are debugging. This is important as the S32 Debugger provides access to the EEPROM programming capabilities via I2C of the S32 Debug Probe.  Connect the S32 Debug Probe to the S32G-VNP-EVB and the host PC containing S32 Design Studio installation. Set BOOTMOD pins to boot from RCON Set BOOT_CFG[8]=1 on the S32G-VNP-EVB, for serial RCON mode VNP-EVB shown here with switch BOOT_CFG[8] = 0 See the EVB documentation and device reference manual for more details. Procedure   Open cmd window to the S32 Debugger folder where the device-specific scripts are located. C:\NXP\S32DS.3.4\S32DS\tools\S32Debugger\Debugger\scripts\s32g2xx Set Python path so correct version is used (if not already set in env vars) set PYTHONPATH=C:\NXP\S32DS.3.4\S32DS\build_tools\msys32\mingw32\lib\python2.7;C:\NXP\S32DS.3.4\S32DS\build_tools\msys32\mingw32\lib\python2.7\site-packages Edit the python script to adjust the value to be programmed to RCON, s32g2xx_i2c_RCON.py. Note: The listed examples show only the minimum values required to configure each of the external memory types. Additional settings may be required for your specific application. Adjust the RCON_DATA for the configuration you wish to program.  Do not adjust RCON_ADDR. Adjust the S32DBG_IP for the IP address of your S32 Debug Probe.  Adjust the INTERACTIVE_MODE  Set True, if desired to be prompted to enter RCON_DATA Set False, if desired to have script automatically enter RCON_DATA, based on the value set within the file. Adjust _SOC_NAME as appropriate for the specific S32G2xx device you are using. The valid options are defined in s32g2xx_context.py. Enter the command to start GDB, passing in the RCON Python script: Windows OS: C:\NXP\S32DS.3.4\S32DS\build_tools\gcc_b1620\gcc-6.3-arm32-eabi\bin\arm-none-eabi-gdb-py.exe -x s32g2xx_i2c_RCON.py OR C:\NXP\S32DS.3.4\S32DS\build_tools\gcc_v9.2\gcc-9.2-arm32-eabi\bin\arm-none-eabi-gdb-py.exe -x s32g2xx_i2c_RCON.py Linux OS: arm-none-eabi-gdb-py -x .\s32g274a_i2c_RCON.py If everything worked properly, then the value you programmed will be displayed to the screen. To exit GDB, enter 'quit'.
View full article
Introduction In this document, we will discuss the S32DS Extensions & Updates tool and how to use it to install the device support you need. S32 Design Studio for S32 Platform has been designed to allow users to customize their installation, enabling them to integrate support for just the NXP devices they need and just the tools they need. With the new modular design, parts of the tool have been moved into one of 4 different package types. The Platform and Tools Packages are default packages which are included as part of the base install, cannot be uninstalled, however, they can be updated. The Platform package contains the base components of the IDE, modular installer, general documentation and integration mechanisms. The Tools Package contains the compilers, debuggers, and MSYS2. The Development Package contains hardware specific support such as New Project Wizard, S32 Configuration Tools, SDKs and Libraries. The Extension Package contains Accelerator Compiler, Debugger, Graph Tool and advanced SDKs. Downloading the various components from our cloud-based update server, allows you to assemble and complete the customized installation of the tools and software to meet your development needs. It is also via the update server that the updates and bug fixes will be provided. And of course, all of these will be available as downloads from our product page for users who are installing to an offline PC. S32DS Extensions and Updates Menu When you first launch the S32 Design Studio for S32 Platform, you are presented with the S32DS Extensions and Updates menu. This menu provides a listing of the add-on packages which have been installed, those that are available to be installed, and those which have updates available to be installed. In the panel to the right is displayed detailed information specific to the package which is selected in the panel to the left. If there is an update available for the selected package, the currently installed version number will be shown on the left and the update version number will be shown on the right. Online Package Installation Setup If your PC is connected to the internet, then it will link to NXP's update server (http://www.nxp.com/lgfiles/updates/Eclipse/S32DS_3.2) and any new or updated packages will be automatically added to the list. See Package Installation section below for installation procedure and details. Offline Package Installation Setup If your PC is not connected to the internet, you must first download the desired packages from the NXP website, in the form of an archive file, to a separate PC and have them transferred to your target PC. Then you would select the link 'Go to Preferences' and add each downloaded archive file as a separate software site. After selecting OK, you will see the new packages contained within the archive files listed. Procedure: Go to S32 Design Studio for S32 Platformdownload page and select Download for the package or update you need. Sign in to your account. Select the package name Select 'I Agree' to accept the Software Terms and Conditions Select the filename of the package to begin the download. You will be asked to select a location to save the downloaded file. Once the file is downloaded, it must be installed within S32 Design Studio. Launch S32DS and wait for the S32DS Extensions and Updates window to appear. Then select the 'Go to Preferences' link. The Preferences window appears. Select the 'Add...' button to add a new software site to the list. The file you downloaded will be a software site. Now the Add Site window appears. Since the downloaded file is an archive of type ZIP, the 'Archive...' button should be used to select it. Navigate to the location where the file was saved. Select the downloaded file and then Open. Enter a name for the site you are adding, this will make it easier to recognize later. Suggest using the name of the package as listed on the Product Page, Downloads section. Then select OK. Now the downloaded file has been added as a new site. Select OK to return to the main S32DS Extensions and Updates window. Now the new package(s) will appear in the S32DS Extensions and Updates window, just as it would from the update server. See Package Installation section below for installation procedure and details.   Package Installation To install the new packages or updates, check the box to the left of the desired package in the left panel and select 'Install/Update'. The tool will automatically detect any dependencies on other packages and select them to meet all requirements for the installation. Follow the prompts and the packages will be installed, followed by a request to restart S32 Design Studio. Dependencies and Errors If there are dependencies between two or more updates, the tool will detect this and inform you of the package which cannot yet be installed. If you try to install a package which is not compatible with the version of S32 Design Studio you have installed, a notice will appear, and the package will not be listed in the S32DS Extensions and Updates menu. Example Dependency Message Example Notice Message - Unsupported Package Uninstalling Unwanted Packages If you no longer need a particular package or installed one by mistake, just check the box next to the package and select 'Uninstall'.   Reinstalling Packages If you believe your installed package has become corrupted, if you accidentally deleted part of it (such as an example project, etc.), or if for any reason you need to restore the package, just check the box next to the package and select 'Reinstall'.   Additional Information If you wish to not see the S32DS Extensions and Updates menu at startup, you can uncheck the box at the lower left. For internet connected PCs, the update server will still be linked and checked for new packages at S32DS startup, but you will no longer see the S32DS Extensions and Updates menu. However, you will still see a notice at the lower right of the tool at startup when new packages are detected. Example of Available Update Notification
View full article
S32 Design Studio is free-of-charge software that just requires to be activated. The activation process is incorporated into the S32DS installer. Before you proceed to the installation you always need to get an activation code. The activation code is typically sent automatically to your email registered on nxp.com account when you proceed to downloading of S32DS installer. The example of notification email is below:     There are two types of activation you can choose from - online and offline. If your machine is connected to the Internet then in most cases you just select online activation and S32DS gets activated automatically without any additional steps required.   Anyway if the computer that you are installing S32 Design Studio into has no internet access or there are some firewall/antivirus/infrastructure restrictions that voids the online activation you can select offline activation type instead. This document describes the offline activation process step-by-step:   Step 1. S32 Design studio for Arm/Power/Vision installer pops up the "S32DS Activation" dialog  where you first enter your activation ID and select activation type as offline Step 2. The Offline process will require to save an activation request file -"request.xml". Please save this file into a local folder or an USB drive. Step 3. Software will then require an activation response. To get this file move to a station with the Internet connection. We will get back here once we have activation response file ready. Step 4. Look for the Internet connection and take the "request.xml" file with you. Go to https://www.nxp.com/security/login  click on Apps and Services >  "Software Licensing and Support > Click on View Accounts Step 5. In product information page look for the "Offline Activation" option on the left menu. Step 6. Click on "Choose File" and select the "request.xml" file generated in Step 2.  Press "Process" button to get the "activation.xml" file. This file will be downloaded.   Step 7. Save "activation.xml" file and take it to the original offline station, go back to the Activation response dialog described by Step 3. Step 8.  Load file and installation will be finished. S32 design studio will be activated with your activation ID.
View full article
This instruction details the steps to create an image vector table, then subsequently generate a blob image which can be written to external flash on the S32G274A EVB. For this, the 'hello_world_s32g274a' example project from the S32G274 SDK installed to S32 Design Studio IDE. This instruction shows the process for QSPI, however, SD, MMC, and eMMC are also supported. The Image Vector Table (IVT) image is a set of pointers to other images which are required by the BootROM. It typically contains the following images, though not all are required to create a valid IVT image: DCD Self-Test DCD HSE Application Bootloader The IVT Tool enables configuration and generation of the IVT image as specified in the BootROM reference manual. Prerequisites Before using the IVT Tool, it will be useful to have already generated the binary image from your application project, it will be an input to the IVT. For application bootloader image, follow the steps in HOWTO: Generate S-Record/Intel HEX/Binary file, selecting 'Raw binary' option. For DCD image, follow the steps in HOWTO: Use DCD Tool To Create A Device Configuration Data Image . Procedure With desired project open in project explorer (C/C++ perspective), switch to IVT perspective. Click on 'Open IVT'. In the Boot Configuration section, check that the correct Boot Target is selected. For the demonstration here, M7_0 is the correct selection. Check the 'Interface selection' section. If your intended boot device is SD, MMC or eMMC, then change the setting from QuadSPI Serial Flash. If your intended boot device is QuadSPI AND you do not have a QuadSPI parameter file to specify, then uncheck the box for 'Configure QuadSPI parameters'. QuadSPI parameters change some flash registers' settings away from the default setting and are generally required for larger memory sizes (for ex. applications over 1 MB in size, for some supported devices).  From the Image Table section, depending on your configuration, turn off all unused images. For the demonstration here, the following will be changed to Reserved: Self-Test DCD, Self-Test DCD (backup), DCD (backup), Application bootloader (backup). The following images will remain enabled: DCD, Application bootloader. In DCD section of the Image Table, click 'Browse File' and select the DCD binary file. Some of the fields may become red shaded after the file is loaded. This is OK as it is showing the memory layout is no longer aligned. This will be resolved in a later step. In Application bootloader section of the Image Table, click 'Browse File' icon and select the image as noted in the Prerequisites section. When the application boot image is loaded, the tool processes the file to check if it contains the header for the application bootloader image. If the header is not found, it means that the file is only the raw code (the bin generated by S32 Design Studio) and it will be necessary to provide the values for RAM start & entry addresses (code length is automatically calculated), as noted with the expanded view and red shading. To set the RAM start pointer and entry pointer addresses, from to the C/C++ perspective: Open the linker file and locate the RAM start address and enter it in both the RAM start pointer AND RAM entry pointer fields in the IVT Tool. Use copy and paste to add the values to the Application Boot Image settings. The length must be adjusted since it is not 8 byte aligned. Since 14020 / 8  = 1752.5, we will round up to 1753. Then, 1753 * 8 = 14024, so we will enter 14024. Since the application binary file which was loaded is just a raw binary file, it is necessary to generate the full application bootloader image. The Export Image function takes the values entered for the RAM start & entry pointers and Code length, then generates the Application bootloader header. This header is added to the raw binary file producing a new image, the full application bootloader image file. Within the Application bootloader section, click 'Export Image' and enter a meaningful name for the image file. In addition to being a necessary source component of the IVT image, this file can more easily be shared or re-used to as an input to other IVT images. After the file has been generated, you will notice that the address settings section has collapsed to represent that this information is now included in the application bootloader image which will be used to generate the Blob image file. Click 'Export Blob Image' to generate the blob image file. This is what will be flashed to the target. Now that the Blob Image is generated, the 'Flash Image' button could be used to program the image to the target over serial connection, use the S32 Flash Tool, or over the JTAG connection using the Flash Programmer within the S32 Debugger (QSPI only).
View full article
Quick Fix is a feature of the Java editor in Eclipse which enables a user to resolve problems found in the Java code of their project. This feature is available to be used within S32 Design Studio for some problems. Such problems will be identified with the 'light bulb' icon in the description field, as shown below: For example, such problems sometimes occur when importing a project created in a previous version of S32 Design Studio, are provided from another user, or some files in a project have become corrupted. To resolve issues identified with the 'light bulb' icon, right-click on the problem and from the pop-up menu, select 'Quick Fix'.  The Quick Fix menu will appear, providing the available solutions for the problem. In most cases, there will be just one solution. Click finish to implement the fix. In some cases, more information will be required from the user to complete the fix. Complete the form to provide the additional information, then click OK. Now the problem should be resolved.
View full article
        Product Release Announcement Automotive Microcontrollers and Processors S32 Design Studio for Power Architecture v2.1         The Automotive Microcontrollers and Processors’ Embedded Tools Team at NXP Semiconductors, is pleased to announce the release of the S32 Design Studio for Power Architecture version v2.1. It is the successor of S32 Design Studio for Power 2017.R1. - the versioning scheme has changed. Release content (What is new?) Eclipse Neon 4.6 Framework GNU Build Tools for e200 processors bld=1607 rev=gceb1328 (support VLE and BookE ISA, based on gcc 4.9.4 [1.February 2019], binutils 2.28 and gdb 7.8.2) - see the complete GCC release notes Libraries included: newlib, newlib-nano and Freescale EWL2 P&E Multilink/Cyclone/OpenSDA (with P&E GDB Server) - updated (v1.7.2.201709281658) New Project wizards to create application and library projects and projects from project examples for supported devices Peripherals Register and Special Purpose Registers View Fully integrated S32 SDK RTM v.3.0.0 (Windows only). For the details on the feature set of SDK please refer to SDK Release notes attached and Reference Manuals (Please note that SDK has Early Access Release status, which means that there could be some limitations and/or issues. Also note, the SDK is available for Windows host only). SDK management included: o FreeMASTER Serial Communication driver (v2.0 August 31th 2016) o Automotive Math and Motor Control Libraries(v1.1.15) o Support for importing MCAL configuration to a custom SDK o An SDK can be attached to a library project using the project wizard Windriver Diab, and GreenHills compiler support by new project wizard (The Green Hills Software (GHS) compiler support depends on the availability of the Eclipse plug-in integrating GHS compiler compatible with the Eclipse Neon. Full support for the Green Hills Software compiler Eclipse Neon-compatible plug-in within S32DS for PA 2.1 was not validated in time for this release.) Lauterbach, iSystem, and PLS debuggers support by new project wizard (The plugins to support Diab, iSystem, Lauterbach, and GreenHills are not included and have to be installed from the corresponding update site or installation.) Kernel Aware debugging for FreeRTOS, eCOS, OSEK Devices supported: S32R274 S32R372 MPC5775B, MPC5775E MPC5775K, MPC5774K MPC5746R, MPC5745R, MPC5743R MPC5777M MPC5777C MPC5748G, MPC5747G, MPC5746G MPC5744B, MPC5745B, MPC5746B, MPC5744C, MPC5745C, MPC5746C MPC5744P, MPC5743P, MPC5742P, MPC5741P MPC5601P, MPC5602P, MPC5603P, MPC5604P MPC5644B, MPC5644C, MPC5645B, MPC5645C, MPC5646B, MPC5646C MPC5601D, MPC5602B, MPC5602C, MPC5602D, MPC5603B, MPC5603C, MPC5604B, MPC5604C, MPC5605B, MPC5606B, MPC5607B MPC5606S MPC5604E MPC5644A, MPC5642A MPC5643L MPC5676R MPC5632M, MPC5633M, MPC5634M MPC5674F MPC5673K, MPC5674K, MPC5675K Collateral Getting Started page The S32DS Extensions and Updates tool Migration guide to help migrate projects from an earlier version to S32 Design Studio for Power Architecture 2. Bug Fixes For detailed list of the GNU Tools bug fixes, refer to the release notes located in S32DS/ build_tools/powerpc-eabivle-4_9/ Fixed the semihosting issues with the EWL and NewLib libraries Fixed the FLASH programming algorithm for MPC5744P Added missing linker script sections for MPC5748G Fixed reading values from the peripheral bridge A registers for MPC5634M Fixed access to the RAM memory for MPC5634M Removed unavailable addresses from the MPC574xB linker files Added the -fstrict-volatile-bitfield compiler option to the project settings Fixed secure connection to MPC5744P Disabled RTTI for EWL library due to incompatibility with the GNU tools Fixed importing/exporting projectinfo.xml with library settings Complete S32 Design Studio for Power Architecture v2.1 release notes are available here Installation Notes To download the installer please visit the S32DS for Power Architecture product page: downloads section. The installer requires the the NEW Activation ID to be entered during the installation. You should receive an email that includes your Activation ID after starting the installer downloading 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
Application based on FreeRTOS S32DS example performs prinf/scanf functionality in FreeRTOS. Application runs in two modes - standard run-time mode with two tasks maintained by scheduler and command mode implementing basic memory monitor. Application was tested with putty terminal (http://www.putty.org/). Putty serial terminal settings: 115200 8N1, no HW control. USAGE: In run-time mode is green LED blinking and on terminal are shown task counter values. To enter into COMMAND MODE - press button (next to LED diode). LED light switches to red and you can enter commands. Available commands: =================== F show free heap memory A set memory address V print value on address M set address to main() P previous mem page N next mem page ? help X Exit from command mode Putty configuration: Terminal output:
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 2018.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
        Product Release Announcement Automotive Microcontrollers and Processors S32 Design Studio 2018.R1         Austin, Texas, USA December 28, 2018   The Automotive Microcontrollers and Processors’ Embedded Tools Team at NXP Semiconductors, is pleased to announce the release of the S32 Design Studio 2018.R1 for S32 Automotive Platform|NXP.  Major features  • NXP GCC toolchains for ARM32 and aarch64 bareboard and Linux targets  (GCC version 6.3.1 20170509, build 1574 revision g924fb68) • S32 Debug Probe support provided with S32 Debugger (support for S32V23x, RAM + FLASH) and S32 Trace tool for S32V23x • S32 Trace tool is integrated to provide software analysis features (profiling, code coverage, and other) • PEMicro® hardware debugger support provided with P&E Debugger • Lauterbach Trace32® support • S32 Flash Tool is delivered to support Flash/SD/MMC memory programming for S32V234 • S32 SDK for S32V23x 0.8.1 EAR is integrated • S32DS Extensions and Updates tool for automatic lookup and on-demand installation of software packages adding support for the NXP Arm® based processor families • S32 Configuration Tool framework (EAR6) with the Pin, Clock, Peripheral configuration tools Complete S32 Design Studio 2018.R1 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 package available is Vision S32V2xx  (Other packages are coming soon). 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
  The S32 Debugger included within the S32 Design Studio for S32 Platform IDE provides the capability to access the flash programming capabilities of the S32 Debug Probe via the S32 Debugger. Note: currently only QSPI flashing is supported. Preparation Install S32 Design Studio IDE  Install the Development Package for the device you are debugging. In this case, the S32G2xx development package. This package is important as the S32 Debugger support component contains the device-specific Python scripts required for performing the flash programming operations. Open the application project containing the application to be programmed to the flash memory device. Follow the steps in HOWTO: Generate S-Record/Intel HEX/Binary file , selecting the 'Raw Binary' option. Build the project, generating the binary executable. This will be our application binary input to the IVT Tool. The IVT Tool must be used to generate the BLOB image which can be programmed to flash memory device and loaded to the RAM by the BootROM. Follow the steps in HOWTO: Use IVT Tool To Create A BLOB Image S32G274A. The resulting BLOB image file is what can be flashed to the device.   Procedure Open Debug Configuration menu Select 'S32 Debugger Flash Programmer', then right-click and select New. Enter an name for the new configuration and click Add... to add the file to be flashed. Click Browse... to select the project from the workspace where the application binary is located Select the project and click OK By default, the ELF file is found. Click Search in project to select the binary file. Select the .bin file and click OK Now we must enter the base address. Typically, this could be 0, but you may have other requirements. Click OK. Just the memory required by the new image needs to be cleared, so only check the box 'Erase all flash memory' if truly needed. Now we are ready to configure the debugger connection settings. Click on the Debugger tab. Starting from the top and working our way down, click on Select device. Select the device and click OK The correct Initialization script will automatically be set. Set the Debug Probe Connection settings to match your setup. When done, click Apply To start the flashing, click Debug When complete, the Debug perspective will show at terminated thread. Happy flashing with GDB!   Note, to debug this application since it will be subsequently started by the BootROM: use 's32gxx_attach.py' in the Initialization script field on the debugger tab of the Debug Configurations menu Make the following adjustments on the Startup tab within the Debug Configurations menu: Uncheck "Load image"  Check "Set program counter at:" and enter the value "Reset_Handler"  
View full article