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:
          Product Release Announcement Automotive Processing S32 Design Studio for S32 Platform v3.4           Austin, Texas, USA Dec 22, 2020   The Automotive Processing's Software Development Tools Engineering Team at NXP Semiconductors is pleased to announce the release of the  S32 Design Studio v3.4 Here are some of the major features: Eclipse Neon 2019.12 Framework GNU tools: GCC version 6.3.1 20170509, build 1620 revision g01b30c3 GCC version 9.2.0 20190812, build 1649 revision gaf57174 NPW support for GCC 9.2 toolchain (available for selected devices only) S32 Configuration Tool framework 1.3 with the Pin, Clock, Peripheral, DCD, IVT, DDR and QuadSPI Configuration tools (SDK/RTD packages required to get support for particular device)  The wizards for creating application, library projects and projects from project examples for the supported processor families The S32DS Extensions and Updates tool S32 Trace Tool S32 Debugger support PEMicro® debugger support Lauterbach Trace32® support Green Hills compiler support S32 Flash Tool Peripheral and System Registers view SDK management Support for importing MCAL configuration to a custom SDK Support for migration: project with GCC 6.3.1 toolchain to GCC 9.2 toolchain S32DS for ARM  projects for S32K1 device to S32DS 3.3, including SDK* * available with S32K1 package, not yet released, more details could be found in Release Notes  Release is available for download on NXP web and from S32DS 3.4. Please make sure that you get new activation ID for this version. Support for S32S247TV and S32V23x is available on public update site and release location. S32V23x support: S32SDK S32V234 RTM 1.0.1  S32 Configuration tools - Pins, Clocks, Peripheral (installed with SDK package) S32 Debugger (with S32 Debug Probe) support for ARM cores S32 Trace for A53 cores GCC version 6.3.1 20170509, build 1574 S32 Flash Tool support AMMCLIB 1.1.20 P&E and Lauterbach debuggers support Note: Vision Extension package 1.2.0 with support for S32 Design Studio 3.4 is not yet available, if you need to work with VSDK and Vision tools - it is recommended to stay on S32DS 3.3 until a new version of Vision Extension package is released   S32S247TV support: Support for S32S247TV new project wizards, GCC 6.3.1 and GHS compilers S32SDK S32S247TV EAR 0.8.1  S32 Configuration tools - Pins, CLocks, Peripheral, DCD, IVT (installed with SDK package) S32 Debugger (with S32 Debug Probe) support  S32 Flash Tool support Lauterbach support S32K1 support: Support for S32K1xx new project wizards, GCC 6.3.1, IAR and GHS compilers NXP GCC version 6.3.1 20170509, build 2017 S32SDK S32K1xx RTM 4.0.1 AMMCLIB 1.1.22 S32 Configuration tools - Pins, CLocks, Peripheral (installed with SDK package) PEmicro, iSystem, Segger, IAR, Lauterbach  debuggers support Support for S32V23x, S32S247TC, S32K1xx is provided on update site and archive SW32_S32DS_3.4.0_D2012.zip for offline use    Complete S32 Design Studio for S32 Platform v3.4 release notes and Installation Guide are attached.   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 development 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
**************************************************************************************** IDE: S32 Design Studio for ARM Version 2.2 Workspace: C:\Projects\S32DS_ARM_22 Project name: S32K142_08_CommandLine Project location: C:\Projects\S32DS_ARM_22\S32K142_08_CommandLine **************************************************************************************** 1. After you finish the edit on your codes, please close S32DS 2. Input the command(as below) at your command_line.bat  3. Run command prompt with Administrator right. 4. Run command_line.bat at command prompt   You will get the *.elf under the folder of C:\Projects\S32DS_ARM_22\S32K142_08_CommandLine\Debug_FLASH   Cheers! Oliver
View full article
Build your project and choose Debug Configuration option  On the left side select Launch Group of your choice (Flash/RAM) and press Debug button Wait while debug session is fully started. If you left default startup configuration - all cores has active break-point at the beginning of main() function. You can chose any core for debugging just by clicking on the core's thread. Sometimes are init functions - including startup of other cores - inside main() of boot core (for S32R274 is boot core Z4). In this case you should let boot core perform init sequence first and then try debug other cores. On next picture are all cores halted.  On this picture are core 1 (Z4) and 2 (Z7_0) running - and third one is stopped. You can perform any debug operation on this core (memory/registers view, instruction step...) without effect on other cores.  On the last picture are running cores 1 (Z4) and 3 (Z7_1) and second core (Z7_0) is stopped and any debug operation can be performed on this core. 
View full article
      Product Release Announcement Automotive Microcontrollers and Processors S32 Design Studio for Power Architecture 2017.R1 Update 2          What is new? S32 SDK for Power Architecture 0.9.0 BETA for MPC574x-B-C-G and MPC574xP derivatives (see attached release notes for more details) S32 SDK  Power Architecture v0.9.0  BETA Examples - "Create S32DS Project from Example" Updated version of GNU Build tools for e200 (see the release notes attached below) Support of GHS compiler in New Project Wizard - please contact GreenHills support to obtain toolchain plugin compatible with Eclipse Neon version Updated P&E Plugin (v1.7.3.201803261737) and drivers (v12.7.0) Fixed Defects • S32DS-3506 - [e200][MPC5744P] unable to connect to secured device - addressed by adding unsecure support for MPC5744P devices • S32DS-7326 - [e200][MPC5634M] Exception occurs when accessing peripheral A registers - MMU init script error is resolved by updating the script • S32DS-7991 - [e200 2017.R1] Semihosting disabling interrupts is resolved by not disabling interrupts when stepping over specific instruction • S32DS-7177 - [MPC5634M] unable to access RAM in the debug session • S32DS-7896 - [e200] default linker sections (.got2, .jsr...) are missing in the linker script file • S32DS-3681 - [S32DS E200 B170421] Project build fail with Library support = newlib, the startup.S update to add section _fini Installation instructions The update is available for online (via S32DS 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_POWER_2017.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
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
S32 Design Studio (S32DS) supports Wind River Eclipse plug-in which integrates Wind River Diab tool chain for e200 (PowerPC architecture) into Eclipse IDE. S32DS integration by a new project wizard that allows to create a new project with Wind River Diab build tools. The generated executable can be then debugged by any supported debugger plug-in (PEMicro, iSystem, PLS, Lauterbach) S32 Design Studio versions that support Wind River Diab plugin: S32DS Power v1.1+   Installation instructions First of all make sure you have Wind River Diab tools installed on your machine.  You can start with Wind River Diab Compiler 5.9.6 Evaluation  Anyway, after your evaluation period expires you need a valid license from Wind River to be able to use this plug-in in S32DS. The plug-in is available with the Diab compiler and it's located here: "<WindRiver home folder>\compilers\eclipse_cdt"   1. Run S32 Design Studio and go to menu "Help" -> "Install New Software" and  click on "Add..." button. Enter the local location to the folder above. 2. select the "Diab Compiler Support for Eclipse C/C++ IDE " and click "Next"   3. Read and Tick " I Accept the terms of the license agreement" and agree with installation of the unsigned content. 4. When the plug-in is successfully installed you will be asked to restart S32DS.     5. Set the path to the Diab compiler for your workspace (S32DS_DIAB_PATH environment variable) in the Window->Preferences->C/C++->Build->Build Variables (Show System Variables). If you switch the workspace you will need to enter this path again. Now you should be able to create a new project with Wind River Diab toolchain available: The created project includes Diab specific files such as "dld", startup code as well as tools specific setup in the project properties (Project Properties->C/C++ Build->Settings (Tools Settings Tab)    Enjoy building with Wind River Diab plug-in in S32DS!
View full article
Function printf is C library function, which sends formatted output to stdout. Because microcontroller does not contain stdout, it it necessary to redirect it to a different type of output. One of the possible way is using UART. All MPC57xx has LinFlexD module, which supports UART mode.   For proper use the LinFlexD module, it is necessary to initialize it and also create simple functions for transmit and receive data. You can create your own file or use the file uart.c in the attachment. If you want to create your own file, please do not forget to implement the methods, which are called by MW MSL libraries to perform console IO (please look at the attached file uart.c).   In uart.h file, you will find correct function prototypes for functions used in uart.c and also some important enum data types.   Third important file is uart_console_io.c which you find in folder, where S32DS was installed. Open the folder and choose path: S32DS/e200_ewl2/EWL_C/src/sys. This file contains routines which implement low-level console IO routines.   Now, we have all basic files which help us to use printf function. So lets create new project and test printf. Example project is created for MPC5744P.   Create new project, choose EWL library and finish project wizard. Include stdio.h to the file, where you want to call printf function.   Now add uart.c and uart_console_io.c files to the project folder src. Add uart.h file to project folder include.   Initialize system clock and clock for peripherals (look at the attached project). In uart.c file, there are settings for GPIO pins, LinFlex initialization for UART mode and also baud rate calculation (please look at the uart.c file in the attachment).   Now it is possible to use printf function. Important point is, that \n character triggers the data sending. Also, if you do not use this \n character, you will get compile error, but I will explain this further in this tutorial.   Run some terminal emulation, for example Putty and use the following settings:   Now open terminal and  run the code in the microcontroller. This should be the result:   /*************************************************************************************************************************************************************************************/ /*************************************************************************************************************************************************************************************/ /*************************************************************************************************************************************************************************************/   This was the easiest way, how to use printf function. But printf also provides some format characters for printing decimals, floating points, etc. All options you can find in ewl_c_reference.pdf document which is place in S32DS installation folder S32DS/help/pdf.   When you want to use some of the characters mentioned above, you get the following compile error:   When you do not use any format characters in printf argument, function _EWL_CDECL puts(const char_t * s) from puts.c file is called on background. But when you use format characters in printf argument, function int_t _EWL_CDECL printf(const char_t * _EWL_RESTRICT format, ...) from printf.c file is called instead of puts.   Variable result saves value, which function __pformatter returns. But function __pformatter is not implemented. Instead of __pformatter, function __pformatterFP (placed in __printformat.c file) is implemented.   So there are two possible workarounds.   First workaround is place the following code to the Linker flags in project properties: -Xlinker --undefined=__pformatterFP -Xlinker --defsym=__pformatter=__pformatterFP   The code says that there is undefined symbol __pformatterFP (part -Xlinker --undefined=__pformatterFP) and define symbol alias __pformatter=__pformatterFP (-Xlinker --defsym=__pformatter=__pformatterFP ). So from my point of view, symbol __pformatter is replaced by __pformatterFP. Now the correct function is called and the project could be successfully built.     Second workaround is add the printf.c file from S32DS installation folder S32DS/e200_ewl2/EWL_C/src/stdio to the project src folder and exchange __pformatter for __pformaterFP. Clean project and recompile.       I hope this document helps you while implementing printf function in your projects.   Regards, Martin
View full article
      Product Release Announcement Automotive Microcontrollers and Processors S32 Design Studio for ARM 2018.R1  Update 1          What is new? This update adds device support for S32K116  and installs the S32 SDK 1.8.7 EAR (Early Access Release) supporting the S32K116 (see attached S32K116 SDK release notes for more details) S32K116 EAR SDK v1.8.7 Examples - "Create S32DS Project from Example" 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
Version of MPC5777C Bootloader .rbf file for BookE (non-VLE) applications  + Supported UART0/eSCI_0(J20 on DB): GPIO89-90 pins(Speed: 115200b/s) + Supported  MCAN0(J5 on MB):  GPIO83-84 pins(Speed: 500Kb/s) + BookE (Non-VLE) code 
View full article
Perhaps you are just using the S32DS for Power for the first time, and maybe you've seen the provided examples and want to learn a bit more about how they were created. Here are the steps to create a simple application for the MCP5748G MCU which toggles a pin causing one of the user LEDs to blink. This example includes use of the S32 SDK for Power Architecture. Please note: There are options in the steps below to cover the case of either the DEV-KIT(DEVKIT-MPC5748G) or Motherboard(X-MPC574XG-MB) with Daughtercard(X-MPC574XG-324DS) hardware EVBs. 1) Launch S32DS for Power 2) Select File -> New -> New S32DS Project 3) Enter a name for the project, such as 'BlinkingLED' 4) Locate, from the list of processors, Family MPC574xG -> MPC5748G, and select it. 5) Click Next 6) Uncheck the boxes for cores e200z4 and e200z2, leaving just e200z4 (boot) checked. This is because the application will run on the boot core and will not use either of the other two cores. 7) Click on the '…' button next to SDKs, in the column for BlinkingLED_Z4_0. 😎 Check the box next to MPC5748G_SDK_Z4_0_GCC to include support for the SDK within the new project and for the core we have selected. 9) Click OK 10) Click Finish to close the New Project wizard window and start the project generation. 11) Wait a minute or two for the project generation script to complete. 12) Go to the 'Components Library' view then locate and double-click on 'pit' component to add it to the project.  Alternatively, right-click and select Add to project. You can verify it was added by inspecting the 'Components - <project_name>' view. 13) With 'pit' selected in the 'Components - BlinkingLED_Z4_0' view, go to the 'Component Inspector' view to see the configurations for the PIT component. Locate the section for 'Configuration 0'. You may have to scroll down to see it. Change the 'Time period' setting to 500000 microsec(0.5 sec). Note that we are editing the settings for Clock configuration 'clockMan_InitConfig0', you will need the name of this configuration later. 14) Back in the 'Components' view, select 'pin_mux' component and return to the 'Component Inspector' view 15) From the 'Routing' tab, select the 'SIUL2' sub-tab and scroll down the Signals list until 'GPIO_0' (DEV-KIT) or 'GPIO_99' (Motherboard) is shown. 16) Change to the following settings: a. Pin/Signal Selection: PA[0] (DEV-KIT) / PG[3] (Motherboard) b. Direction: Output Pin PA0/PG3 is connected to user LED 2 on the evaluation board. 17) All configuration settings are now complete. Click Generate Processor Expert code button in the 'Components' view or use the menu bar Project-> Generate Processor Expert Code. 18) Wait for the code generation to complete. 19) Now, from the 'Project Explorer' view, the generated code is visible in the folder 'Generated_Code' of the project 'BlinkingLED_Z4_0'. 20) If not already open, in 'Project Explorer' open the file 'BlinkngLED_Z4_0\Sources\main.c' by double-click. This will open the file in the editor view. 21) Scroll down until the following comments are shown: /* Write your code here */ /* For example: for(;;) { } */ We need to add some code here to initialize the clocks, timers and pins. Then we will setup a timer interrupt handler to toggle the pin. 22) First we need to initialize the clocks. From the 'Components' view, expand 'clock_manager' and then drag & drop CLOCK_DRV_Init function into main() of main.c, just after the comments identified in the previous step within the text editor view. 23) Add to the function CLOCK_DRV_Init(), the parameter &clockMan1_InitConfig0 to give it the address of the user configuration structure generated by ProcessorExpert in '.../Generated_Code/clockMan1.c'. This is the clock configuration for which we edited the timer period in an earlier step. 24) Next we need to initialize the pins. Back in the 'Components' view, expand the 'pin_mux' then drag and drop the function PINS_DRV_Init after the clock initialization. 25) Again from the 'Components' view, expand 'interrupt_manager', then drag & drop INT_SYS_InstallHandler in 'main()'. This installs the PIT channel 0 interrupt handler. 26) Enter the parameters: PIT_Ch0_IRQn, &pitCh0Handler, NULL 27) In the User includes section at the start of main.c, add the implementation of the handler a. Create a function called pitCh0Handler b. In the function body: clear the interrupt flag and toggle LED   /* IRQ handler for PIT ch0 interrupt */   void pitCh0Handler(void)   { /* Clear PIT channel 0 interrupt flag */ PIT_DRV_ClearStatusFlags(INST_PIT1, 0U); /* Toggle LED (GPIO 0 connected to user LED 2) */ SIUL2->GPDO[0] ^= SIUL2_GPDO_PDO_4n_MASK; // DEV-KIT /* SIUL2->GPDO[99/4] ^=SIUL2_GPDO_PDO_4n3_MASK;*/ // Motherboard   } Note: Get PIT_DRV_ClearStatusFlags by drag & drop from the 'pit' component. 28) In 'Components' view, expand 'pit' component and then drag & drop PIT_DRV_Init, PIT_DRV_InitChannel & PID_DRV_StartChannel in main() after INT_SYS_InstallHandler(). 29) Fill in the second parameter of the last function(channel number): 0U 30) Build the code. Click the down arrow next to the 'Build' button and select Debug_RAM. Check that there are no build errors. 31) Enter the 'Debug Configurations' menu: a. From the menu bar, Run -> Debug Configurations... b. From the toolbar, down arrow next to Debug button -> Debug Configurations... 32) The Debug Configurations window appears. Select the configuration BlinkingLED_Z4_0_Debug_RAM from within the GDB PEMicro Interface Debugging group. 33) Select the 'Debugger' tab to setup the connection to the debugger hardware device. 34) Select the PEMicro Interface which corresponds to your setup: a. If using the motherboard, you will likely use the USB Multilink, which is connected to your PC via USB cable (type A on one end, type B on the other) and is connected to the motherboard via the 14-pin JTAG cable. b. If using the DEV-KIT board, you will likely choose the OpenSDA, which is integrated into the DEV-KIT board and is connected with just a USB cable (type A on one end, type micro on the other). 35) Click Debug To launch the debugging session. This will also open the Debug perspective. 36) In the Debug perspective, once the debugging session has fully launched, the code will be executed to the start of main(), where a breakpoint was automatically set for you. Press Resume button in the toolbar, Run -> Resume in the menu bar, or F8 on your keyboard to run the application. 37) You should now see the User LED2 on the board blink every 0.5 seconds. 38) To see the value of the output register bit for the output pin connected to the LED: a. Set a breakpoint on a line within pitCh0Handler() b. Go to the EmbSys Registers view, expand the SIUL2 module and scroll down to the GPDO register index which is accessed in the code. Double-click it to read the value. Expand it to see the individual bits. c. Press Resume a few times to see the register value change
View full article
If your EVB with OpenSDA debugger can't start debug session - you can try to update OpenSDA firmware on your board.  Go to PE Micro web pages - http://www.pemicro.com/opensda/ and get the latest firmware archive.  Extract .SDA file related to your EVB - for example            DEBUG-OPENSDA-E200_Pemicro_v110.SDA for DEVKIT-MPC5748G            MSD-DEBUG-EVB-S32K144_Pemicro_v119.SDA for S32K144EVB  Press and hold SW3 (Reset for S32K144EVB) button and connect OpenSDA connector on EVB to PC. New BOOTLOADER Drive should appear on your PC.  Copy .SDA file in BOOTLOADER drive Reset EVB.   More details you can find in "Updating the OpenSDA Firmware.pdf" file. It is part of downloaded zip file from PE Micro web pages. 
View full article
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. It may also be necessary to include a DCD image, for example, to initialize the SRAM. 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.  Scroll down to the Application bootloader section, again use  'Browse File' and select the application binary. 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: From Project Explorer on the C/C++ perspective, open the linker file (in this case: hello_world\Project_Settings\Linker_Files\<device_name>_common_ram.ld) 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. Since the application binary file which was loaded for this example 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 the automatically calculated 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. This is because it has replaced the file you originally selected with the newly generated one and the tool has recognized that the file contains the required header information. Before the Blob image can be generated, all of the images must be properly aligned within the memory map. You will likely also see error messages regarding segment overlaps, but even without this error it is good to check that the alignment is correct. In the Automatic Align section, if you have a dedicated area of the memory you can specify the start address and then click 'Align'. If you don't have a dedicated area, then use the default automatic align start address of 0x0 (QSPI), or 0x1000 (SD, MMC, eMMC). Click 'Align' to automatically align the images to this address. Upon successful completion of the alignment, all of the red shading will be removed. 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, or use the S32 Flash Tool.
View full article
This simple example shows how to attach GPIO Interrupt handler to particular GPIO Pin. Example is for S32K148 EVB and uses SW4 connected to PTC 13 and Green LED connected to PTE 22. Pressing SW4 invoke interrupt and Interrupt handler toggles Green LED. 
View full article
Right click on the Project name in Project Explorer -> Settings -> Cross Settings Be sure to click Apply so the 'Standard S32DS Create Flash Image' section will appear In the Tool Settings tab. Select 'General' under 'Standard S32DS Create Flash Image', now you can specify output in newly appeared option Standard S32DS Create flash image
View full article
S32 Design Studio (S32DS) for ARM supports IAR Eclipse plug-in that enables users to build and debug a S32DS project with IAR toolchain for ARM. This document describes how to install this plugin and how to enable IAR in the new project wizard. Current version of S32DS for ARM 2018.R1 supports IAR compilers  v7.x and v8.x. After the IAR eclipse plugin installation is finished you should be able to create, build and debug a new S32DS project (including SDKs) using IAR compiler/debugger interface directly under S32DS Eclipse environment.   Installation instructions First of all make sure you have IAR Embedded Workbench installed with a valid license from IAR. Now let's proceed to eclipse plug-in installation.   1. Install IAR Plugin manager  go to menu "Help" -> "Install New Software" and  click on "Add..." button to add a new IAR repository located here: http://eclipse-update.iar.com/plugin-manager/1.0 Tick " I Accept the terms of the license agreement" and click "OK" to accept unsigned content software Finally you proceed to the installation. When the plugin is installed you will be asked to restart S32DS Anytime you create a new workspace you will be asked to enter path to IAR Embedded Workbench IDE   2. Configure IAR plugins in IAR Embedded Workbench plugin manager Run IAR plugin manager (Menu "Help" -> "IAR Embedded Workbench plugin manager...") Select the ARM version (8.x) and click "Install" button.  Select all the IAR components displayed and proceed to installation by clicking "Next" button.   3. New IAR project in the project wizard You can now create a new project in S32DS and select IAR toolchain for ARM instead of default GCC compiler. There should appear a new item it the Debugger selection - "IAR plugin Debugger". Please choose this option if you intend to debug using IAR supported probes (e.g. I-jet) IAR specific panels and settings are now displayed in the project properties for a new S32DS project with the IAR options enabled (see above). There is a new category "IAR C-SPY Application" in the debug configurations panel that contains all the debug configurations for projects with IAR debug plugin option selected. The Debugger perspective now offers several IAR specific Views and features. Enjoy building and debugging with IAR Eclipse plug-in in S32DS!
View full article
In this document, the steps to create a new S32 Design Studio project from example will be detailed. 1. Launch S32 Design Studio 2. Select File -> New -> S32DS Project From Example 3. Select one of the projects, for example, hello_world_s23v234. Click Finish. 4. The project is added to the current workspace. It is ready to be built and can be executed on the target.
View full article
For S32 Design Studio v3.5 and earlier, there is a known issue when the S32 Configuration Tools are invoked from command line from a location outside of the S32DS installation directory. The following error is reported: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source) at com.nxp.swtools.common.utils.runtime.SingletonProvider.getSingletonInstance(SingletonProvider.java:46) at com.nxp.swtools.common.ui.utils.swt.internal.SWTFactory.getSingletonInstance(SWTFactory.java:421) at com.nxp.swtools.common.ui.utils.swt.SWTFactoryProxy.getSingletonInstance(SWTFactoryProxy.java:448) at com.nxp.swtools.dcd.controller.DCDController.getInstance(DCDController.java:84) at com.nxp.swtools.dcd.DCDStartup.earlyStartup(DCDStartup.java:23) at com.nxp.swtools.provider.SWToolsPlatform.initializeAllTools(SWToolsPlatform.java:702) at com.nxp.swtools.framework.Application.start(Application.java:475) at com.nxp.swtools.framework.Application.start(Application.java:445) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:654) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591) at org.eclipse.equinox.launcher.Main.run(Main.java:1462) Caused by: java.lang.NoClassDefFoundError: javafx/beans/property/SimpleBooleanProperty at com.nxp.swtools.bootimage.controller.ABootController.<init>(ABootController.java:37) at com.nxp.swtools.dcd.dcf.common.DCDCommonController.<init>(DCDCommonController.java:90) at com.nxp.swtools.dcd.controller.DCDController.<init>(DCDController.java:43) ... 24 more Caused by: java.lang.ClassNotFoundException: javafx.beans.property.SimpleBooleanProperty cannot be found by com.nxp.swtools.bootimage_1.0.0.202207251223 at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:519) at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:170) at java.base/java.lang.ClassLoader.loadClass(Unknown Source)   Resolution: To resolve the issue: Invoke the command from within the installation directory, for example, from 'C:\NXP\S32DS.3.5\eclipse' OR Change "{S32DS Installation Folder}\eclipse\s32ds.ini" by setting the javafx path from relative to absolute. So, if default installation is used, then: Change -Defxclipse.java-modules.dir=jre/javafx-sdk-11.0.2/lib To -Defxclipse.java-modules.dir=C:/NXP/S32DS.3.5/eclipse/jre/javafx-sdk-11.0.2/lib   In addition, if it is desired to suppress unimportant warning messages: go to {S32DS installation folder}\eclipse\configuration, open logging.properties file and change com.nxp.swtools.level = SEVERE
View full article
This document shows the step-by-step process to create a simple blinking LED application for the S32R41 family using the S32 RTD AUTOSAR drivers. This example used for the S32R41 EVB, connected via ethernet connection through S32 Debugger. Preparation Setup the software tools Install S32 Design Studio for S32 Platform Install the S32R41 development package and the S32R41 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_With_AUTOSAR'. The name must be entered with no space characters. Expand Family S32R41, Select S32R418AB Cortex-M7  Click Next Click '…' button next to SDKs Check box next to PlatformSDK_SAF85_S32R41_2022_08_S32R418AB _M7_0. Click OK And also, uncheck the other core Cortex_M7_1 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. Select the overview tab and disable Pins tool. Make sure to overview tab windows shows settings shown as below.  Here, we are disabling pin tools and using MCAL driver from peripheral tools for using AUTOSAR drivers. Now from Overview menu, select peripheral tools and double click to open it. In the driver sections, “Siul2_Port_1 driver” is the non-AUTOSAR version driver and so it must be replaced. Right click on ‘Siul2_Port_1’ and remove it. Keep BaseNXP driver as it is. Click on the ‘+’ next to the MCAL box. Locate and then select the ‘Dem’ component from the list and click OK. Click on the ‘+’ next to the MCAL box again, and Locate and then select the ‘Dio’ component from the list and click OK. Click on the ‘+’ next to the MCAL box again, and Locate and then select the ‘Mcu’ component from the list and click OK. Click on the ‘+’ next to the MCAL box again, and Locate and then select the ‘Port’ component from the list and click OK. Now components tab should show like below : Now we required to configure the different MCAL drivers that we added. Starting with Dio configuration, open the Dio configuration. No change is required for Dem configuration. Now, open the ‘DioGeneral’ tab, and select checkmark as per shown below: Now, open the ”DioConfig” tab. In that Select  “+” sign adjacent to Dio Channel. Then Edit Name to “Digital_Output_LED_0” and Dio Channel Id to ‘4’ instead of ‘0’. From the schematic for S32R41 EVB, checking for signal line for the user LED, channel 4 is connected to user LED signal, so we use channel 4 for signal line for user LED on the chip. So, we select the signal line for Dio channel Id 4 for the LED connected on the S32R41 EVB. Now Select Port tab for Port configuration. And open the Port Configuration tab, and from that open “PortConfigSet” tab. Change the PortPin Mscr to 36 , PortPin Direction to PORT_PIN_INOUT as shown below: Now, at the bottom you will find the “UnTouchedPortPin ’’ . Click on “+’’ and add PortPins. Now add port pins 0, 1, 2, 3,4 as per below configuration Now configure MCU component. Select Mcu component in MCAL, and then open the Mcu configuration. In Mcu configuration click MCUModuleConfiguration and then select  “McuModesettingConf” from the dropdown menu as shown below. From McuModeSettingConf select McuPartitionConfiguration Now open “McuPartition0Config” tab. And under the McuCore0Configuration for “McuCoreClockEnable” select checkbox and for “McuCoreResetEnable” uncheck  the checkbox. Similarly, And under the McuCore1Configuration for “McuCoreClockEnable” select checkbox and for “McuCoreResetEnable” uncheck  the checkbox. After modification it should be as shown below: Now open the “McuPartition1Config” tab. for "McuPartitionClockEnable" select checkmark to true and for "McuPartitionResetEnable" uncheck  the checkmark   And under McuCore0Configuration for "McuCoreClockEnable"  select checkmark to true and for "McuCoreResetEnable" uncheck  the checkmark After modification it should be as shown below: Now, click on global setting icon as shown below: And, Confirm that ComponentGenerationMethod is set to “FunctionalGroups” 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 tree and apply PLL as system clock, Apply a mode configuration, Initialize all pins using the Port driver by adding – editing code before write code here comment in main function.        /* Initialize the Mcu driver */        Mcu_Init(&Mcu_Config_BOARD_InitPeripherals);        /* Initialize the clock tree and apply PLL as system clock */        Mcu_InitClock(McuClockSettingConfig_0);        /* Apply a mode configuration */        Mcu_SetMode(McuModeSettingConf_0);        /* Initialize all pins using the Port driver */        Port_Init(NULL_PTR); Now replace the logic of for loop as shown below code section, which will enable the LED blinking for 10 times: You also need to declare and initialize the loop variable: uint8 i = 0U; Then replace the code as below after write your code comment: /*Logic for blinking LED 10 times*/ while (i++ < 10) {       /* Get input level of channels */       Dio_WriteChannel(DioConf_DioChannel_Digital_Output_LED_0, STD_HIGH);       TestDelay(3000000);       Dio_WriteChannel(DioConf_DioChannel_Digital_Output_LED_0, STD_LOW);       TestDelay(3000000); } 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: Add #include "Mcu.h" #include "Port.h" #include "Dio.h" Now, in open peripheral tools again by clicking on icon as shown below. And then click on global setting icon as shown below: And, Confirm that ComponentGenerationMethod is set to “FunctionalGroups” 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_with_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. And make selection as shown in screenshot below. You need to select the ethernet connection for S32 debugger and provide its IP address Click Debug To see the LED blink, click ‘Resume' This code as it will blink the LED 10 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 for the S32R41 device using the S32 RTD non-AUTOSAR drivers. For this example used for the S32R41 EVB, connected via ethernet connection through S32 Debugger. Preparation Setup the software tools Install S32 Design Studio for S32 Platform Install the S32R41 development package and the S32R41 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 S32R41, Select S32R418AB Cortex-M7 Click Next Now, uncheck the selection mark for other core, i.e. for Cortex-M7-1 And Click '…' button next to SDKs Check box next to PlatformSDK_SAF85_S32R41_2022_08_S32R418AB _M7_0. (or whichever latest SDK for the S32R41 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. The schematic for S32R41 EVB, checking for signal line for the user LED, channel 4 is connected to user LED signal, so we use channel 4 for signal line for user LED on the chip. So, we select the signal line for Dio channel Id 4 for the LED connected on the S32R41 EVB. 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,36 PC_04” option as per shown in the following image. We are using PC_04 for the GPIO usage, so we are routing SIUL2_0 GPIO signal to this pin. 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 PC_04 pin. Code Preview Go to Peripherals tool and add Siul2_Dio to enable LED blinking, it adjacent to the Blue LED on S32R41  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 tab and uncheck the checkmark 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 is will blink the LED 10 times, you can make changes in for loop condition to blink it infinitely.
View full article