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:
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
This document describes how to link a binary file(s) with an existing project in S32 Design Studio using GCC build tools. Let's demonstrate this on S32K144 project in S32DS for ARM. Nevertheless it should work with any other GCC based development tools. The first step is to add the binary file(s) into your project folder in the workspace. In the example below I created two binary files "my_bin.bin" and "my_bin2.bin" and added them into a custom folder "bin_files". I also entered 10 characters into each file. my_bin.bin: 0x41 0x41 0x41 0x41 0x41 0x41 0x41 0x41 0x41 0x41  (represents 10 characters "A") my_bin2.bin: 0x42 0x42 0x42 0x42 0x42 0x42 0x42 0x42 0x42 0x42  (represents 10 characters "B") The next step is to modify the linker configuration file (.ld) in order to specify input file format and path to the binary files (see the line 14-17) /* Specify the memory areas */ MEMORY { /* Flash */ m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x00000400 m_flash_config (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010 m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x0007FBF0 /* SRAM_L */ m_data (RW) : ORIGIN = 0x1FFF8000, LENGTH = 0x00008000 /* SRAM_U */ m_data_2 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00007000 } TARGET(binary) /* specify the file format of binary file */ INPUT (..\bin_files\my_bin.bin) /* first bin file path (relative to the output folder)*/ INPUT (..\bin_files\my_bin2.bin) /* second bin file path (relative to the output folder)*/ OUTPUT_FORMAT(default) /* restore the out file format */ /* Define output sections */ SECTIONS { ... ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Finally, in the SECTIONS block of .ld file specify where to place the binary files (in the example it is placed at the end of .text section - see the line 37,38). /* Define output sections */ SECTIONS { /* The startup code goes first into internal flash */ .interrupts : { __VECTOR_TABLE = .; __interrupts_start__ = .; . = ALIGN(4); KEEP(*(.isr_vector)) /* Startup code */ __interrupts_end__ = .; . = ALIGN(4); } > m_interrupts .flash_config : { . = ALIGN(4); KEEP(*(.FlashConfig)) /* Flash Configuration Field (FCF) */ . = ALIGN(4); }> m_flash_config /* The program code and other data goes into internal flash */ .text : { . = ALIGN(4); *(.text) /* .text sections (code) */ *(.text*) /* .text* sections (code) */ *(.rodata) /* .rodata sections (constants, strings, etc.) */ *(.rodata*) /* .rodata* sections (constants, strings, etc.) */ *(.glue_7) /* glue arm to thumb code */ *(.glue_7t) /* glue thumb to arm code */ *(.eh_frame) KEEP (*(.init)) KEEP (*(.fini)) . = ALIGN(4); ..\bin_files\my_bin.bin /* First binary file */ ..\bin_files\my_bin2.bin /* Second binary file */ } > m_text ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ After successful compilation and link let's check map and s-record file (HOWTO: Generate S-Record/Intel HEX/Binary file ) to confirm the binary files have been linked correctly: .glue_7t 0x0000080c 0x0 linker stubs *(.eh_frame) *(.init) *(.fini) 0x0000080c . = ALIGN (0x4) ..\bin_files\my_bin.bin() .data 0x0000080c 0xa ..\bin_files\my_bin.bin 0x0000080c _binary____bin_files_my_bin_bin_start 0x00000816 _binary____bin_files_my_bin_bin_end ..\bin_files\my_bin2.bin() .data 0x00000816 0xa ..\bin_files\my_bin2.bin 0x00000816 _binary____bin_files_my_bin2_bin_start 0x00000820 _binary____bin_files_my_bin2_bin_end .vfp11_veneer 0x00000820 0x0 .vfp11_veneer 0x00000820 0x0 linker stubs‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ If you need a reference to the binary file block start/end address in your code you can use the linker symbols generated automatically or you can define your own symbols in the linker script. /* declare symbols from linker script file */ extern unsigned int _binary____bin_files_my_bin_bin_start; extern unsigned int _binary____bin_files_my_bin_bin_end; int main(void) { #define COUNTER_LIMIT 100 unsigned int counter = 0; unsigned int * bin_start_ptr; unsigned int * bin_end_ptr; bin_start_ptr = &_binary____bin_files_my_bin_bin_start; bin_end_ptr = &_binary____bin_files_my_bin_bin_end; for(;;) { counter++; counter = *(bin_start_ptr); /*loads 0x4141_4141 into counter*/ if(counter > COUNTER_LIMIT) { counter = 0; } } return 0; }‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Note: if it is intended to place the binary file at specific absolute address (e.g. if binary file that represent bootloader) you have to create a separate custom MEMORY and SECTION block in .ld file. /* Specify the memory areas */ MEMORY { /* Flash */ m_bootloader (RX) : ORIGIN = 0x001000, LENGTH = 0x00010000 /* section for bootloadeer*/ m_text (RX) : ORIGIN = 0x00011000, LENGTH = 0x0040000 /*section for application code*/ ... } TARGET(binary) /* specify the file format of binary file */ INPUT (..\bin_files\my_booloader.bin) /* bootloader bin file path (relative to the output folder)*/ OUTPUT_FORMAT(default) /* restore the out file format */ /* Define output sections */ SECTIONS { /* place the bootloader binary into 0x0..0x10000 */ .bootloader : { ..\binary_files\my_bootloader.bin /* place the binary file here */ } > m_bootloader ... ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Enjoy linking binaries in S32 Design Studio!
View full article
So you have created a project in S32DS for Vision with target of S32V234 Cortex-A53 APEX2/ISP Linux . You have built the project and now want to execute it on the S32V234-EVB, which is running the Linux BSP from the VSDK on a SD card. There are many ways to do this, however, the simplest is to use the built-in support within S32DS to run and/or debug over an Ethernet connection to the Linux BSP OS running on the EVB. In order for S32DS to connect to the Linux BSP OS, the following steps should be followed: 1) First, we must complete the steps to Setup S32V234 EVB for debugging with Linux BSP. 2) With the Linux running on the EVB, start a terminal program (for ex. PuTTY) on your PC 3) Set Connection type to Serial 4) Set speed to 115200, Data bits 8, Stop bits 1, Parity None 5) Set Serial line to the COM port associated with the USB port setup in step 1 of this document. (for ex. COM3) 6) Click Open to start the terminal session 7) Press enter key to bring up login prompt 😎 Log into Linux (login name is "root") 10) Get IP address, enter command:    ifconfig       Make note of the IP address 11) Launch S32DS for Vision. From the C/C++ Perspective, select Run->Debug Configurations... 12) From 'C/C++ Remote Application'. Select '<project_name>_Remote_Linux' debug configuration. 13) Select New to create new debug connection. 14) Select SSH 15) Enter the IP address noted earlier 16) Enter user ID as "root". The Linux BSP uses Password based authentication, but by default, no password is set. So the password can be left blank. 17) Select Finish 19) Select Apply, and then if you wish, Debug
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
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
        Product Release Announcement Automotive Microcontrollers and Processors S32 Design Studio for Power Architecture 2017.R1         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 2017.R1. It is the successor of S32 Design Studio for Power v1.2. - the versioning scheme has changed. Release content (What is new?) Eclipse Neon 4.6 Framework GNU Build Tools for e200 processors (support VLE and BookE ISA, based on gcc 4.9.4 [7.October 2017], 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 wizard to create application and library projects for supported devices Peripherals Register and Special Purpose Registers View Fully integrated MPC5748G/MPC5746C SDK EAR v.0.8.1. 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.9) Windriver Diab compiler support by new project wizard Lauterbach, iSystem, and PLS debuggers support by new project wizard (The plugins to support Diab, iSystem, Lauterbach are not included and have to be installed from the corresponding update site or installation. The current version of the GreenHills plugin is not compatible with Eclipse Neon version, so it should not be used with this release) Kernel Aware debugging for FreeRTOS, eCOS, OSEK Devices supported: S32R274 S32R372 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 Bug Fixes C preprocessor tool added for C++ projects configuration The makefile generation is updated to fix and issue with building a project on the Korean version of Windows - Code page switch command cannot be executed. The Rename Project functionality is improved to cover referenced projects and launch configurations Complete S32 Design Studio for Power Architecture 2017.R1 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
      Product Release Announcement Automotive Microcontrollers and Processors S32 Design Studio 3.3  S32K1xx dev package and S32 SDK for S32K1xx RTM 4.0.0          What is new? S32K1xx Development Package: New Project Wizard support for S32K1xx family, including S32K14xW P&E debugger support for S32K1 family NXP GCC for ARM NXP GCC for Arm version 6.3 build 2017 (same as was used in S32DS for ARM 2.2) S32 SDK for S32K1xx RTM 4.0.0: S32 SDK RTM 4.0.0 package adding support for S32K1xx and S32K1xxW families, cumulative release containing also the changes present in S32 SDK for S32K1xx RTM 3.0.0, 3.0.1, 3.0.2 and 3.0.3 Supports S32 Design Studio for S32 Platform v3.3 with S32 Configuration tools - Pin Wizard, Clock Configuration,... Supports creating project with NXP GCC for Arm Release version 6.3.1, GreenHills Multi and IAR Compiler Examples for supported devices with P&E Debugger and Segger J-link support Migration support for projects created in S32DS for ARM v2.2 (with Processor Expert) For more details, please review the S32SDK_for_S32K1xx_RTM_4.0.0_ReleaseNotes.pdf attached to this notice. See below. Installation instructions The update is available for online (via Eclipse Updater) or offline installation   online installation:  go to menu "Help" -> "S32DS Extensions and Updates" dialog  select from available items and click "Install/Update" button   offline installation:   go to S32 Design Studio v3.3 product download page: S32 Design Studio for S32 Platform -> Downloads, click 'Download' button next to S32DS for S32 Platform v3.3, then select 'S32DS.S32K1.3.3.0_D2006.zip' to download the update archive zip file Start S32 Design Studio and go to "Help" -> "S32DS Extensions and Updates" Add a new "Add.." S32DS Software Site and browse to select the downloaded update archive .zip file you downloaded in the previous step         Select from available items and click "Install/Update" button. This will start the update installation process.
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
Included in the S32DS for ARM is a set of example projects, which include one called 'hello'. This example shows a basic application which activates an LED when a button is pressed on the S32K144EVB-Q100 evaluation board. The S32K SDK is not used in this example. In this HOWTO, we will show how to load the project into the workspace, build, download to the target, and run debug. 1. Create Project a. File -> New -> New S32DS Project from Example   OR from the Dashboard b. Select S32DS Example Projects -> S32K144 -> hello 2. Examine the code a. Locate the project in C/C++ Projects view b. Expand 'hello', then 'src' c. Double-click on 'hello.c', to open the file in the editor 3. Build the project a. Click to select hello project, this is to ensure that the tool knows which project you wish to build. b. Click Build button. By default, the standard 'Debug' build configuration will be used. Projects created using either the New S32DS Project from Example, or New S32DS Project wizard are setup with 3 build configurations: Debug, Debug_RAM, and Release. The 'Debug' configuration contains settings to build the project with the lowest compiler optimization setting and to occupy the Flash memory space on the target. The 'Debug_RAM' configuration is very similar to the 'Debug' configuration with one exception. It is set to occupy the RAM memory space on the target. The 'Release' configuration will build the project with the highest optimization setting and to occupy the Flash memory space on the target. c. From the console tab, the build status output is displayed. Check here to confirm the build completed and there were no errors. 4. Setup Debug Configuration a. Click Run -> Debug Configurations… OR from the Debug button menu b. Expand the 'GDB PEMicro Interface Debugging' group. c. Select the configuration which matches the build configuration you just used to build the project. For each build configuration generated by the new project wizard, it also generates a matching debug configuration. d. Select the Debugger tab. The debug configuration was created with the 'PE Micro GDB server' option selected, but there are several hardware options for this. Select the option which matches your hardware setup. For example, for the S32K144, most likely you have the standard evaluation board, which has OpenSDA integrated. In this case, you would use the OpenSDA interface option. For other MCUs, you may have hardware which requires the USB Multilink or Cyclone. e. Click Refresh to ensure the correct port is selected. 5. Click Debug to start the debugger launch sequence. It is not necessary to click on the 'Apply' button unless setting changes are being made without intention to launch the debugger. The scripts behind the Debug button include the actions of the script behind the Apply button. 6. When the launch sequence completes, the application is executed until the start of main(), where a breakpoint was automatically set. 7. It is now possible to run or step through the code, view variables and registers. 8. Click Resume and when Button 0 is pressed, the LED will turn on as Blue, and when Button 0 is released, the LED turns off. 9. To end the debug session, click the 'Terminate' button. It is a good idea to also click on 'Remove All Terminated Launches', before starting another debug session.
View full article
      Product Release Announcement Automotive Microcontrollers and Processors S32 Design Studio for ARM® 2018.R1  Update 11          What is new? S32K1xx SDK RTM-SR 3.0.2: SBC driver now supports UJA1169 as well as both UJA1168 and UJA1168A SBC variants (S32 SDK release notes) AMMCLIB v.1.1.18 for S32K1xx, KEA and S32V234 (AMMCLIB release notes) This is a cumulative update - it includes all the content of previous updates (Update 1, Update 2, Update 3, Update 4, Update 5, Update 6, Update 7, Update 8, Update 9, Update 10  ) Installation instructions The update is available for online (via Eclipse Updater) or offline installation (direct download link)  installation:  go to menu "Help" -> "Install New Software..." dialog  select predefined update site "S32DesignStudio - http://www.nxp.com/lgfiles/updates/Eclipse/S32DS_ARM_2018.R1/updatesite" select all available items and click "Next" button   offline installation:   go to S32 Design Studio for ARM product page -> Downloads section or use direct link to download the update archive zip file Start S32DS and go to "Help" -> "Install New Software..." Add a new "Archive" repository and browse to select the downloaded update archive .zip file you downloaded in the previous step Select all available items and click "Next" button.   This will starts the update installation process.
View full article
Hello,   The new official release of S32DS for ARM v1.2 is available in the download section of S32DS web page: http://www.nxp.com/s32ds       To  install the product the Activation Code is needed. You can Find it under "License keys" tab.   S32 Design Studio is based on Eclipse open development platform and integrates the Eclipse IDE, GNU Compiler Collection (GCC), GNU Debugger (GDB), and other open-source software. This release supports Windows 7/8/8.1/10 (32/64 bit) and Linux versions as well.   S32DS ARM v1.2 main features Free of charge tool with no code size limitation (no license file required) Eclipse Luna 4.4 Framework GNU Tools for ARM embedded processors (launchpad, based on gcc 4.9.3) and ARM64: 4.9.3 20141031 Linaro Libraries included: newlib, newlib-nano and Freescale EWL2 (ewl and ewl-nano) SEGGER J-Link (with SEGGER GDB Server), P&E Multilink (with P&E GDB Server) Fully integrated S32 SDK for S32K144 EAR release v.0.8.1 SDK management included (KEA drivers, FreeMASTER for KEA, AMMCLIB for KEA and S32K) CodeWarrior/KDS project importer GreenHills/IAR compiler support by the new Project Wizard iSystem/Lauterbach debuggers support by the new Project Wizard Kernel Aware Debugging FreeRTOS, OSEK. Devices supported SKEAZN8, SKEAZN16, SKEAZN32, SKEAZN64, SKEAZ128, SKEAZ64 S32K144 S32V234 MAC57D54H   Technical Support S32 Design Studio is supported by NXP community - https://community.freescale.com/community/s32/s32ds/ For more details see the attached release notes.     * Red items are the new features   Regards, Stanislav  
View full article
******************************************************************************** * Detailed Description: * This example shows, how to use printf function in project. * Files uart_console_io.c, uart.c and uart.h was added. These files contain * necessary functions for correct printf() functionality * * * Test HW:         FRDMPK144-Q100 * MCU:             PS32K144HFVLL 0N77P * Terminal:        9600-8-no parity-1 stop bit-no flow control on LPUART1 * Fsys:            160 MHz * Debugger:        Lauterbach Trace32 *                  PeMicro USB-ML-PPCNEXUS *                  OpenSDA embedded debug * Target:          internal_FLASH, internal RAM * EVB connection:  default
View full article
To prepare an SD card for a Linux boot, it is necessary to connect the SD card to a machine with Linux OS. If a Linux OS machine is not available, then a virtual machine installed to a Windows OS machine may be used. If you have access to a Linux OS machine, skip to step 4. Procedure 1) Download and install a virtual machine VMware Workstation Player Virtual Box 2) Download Ubuntu. This tutorial uses the Ubuntu version 14.04.5.  The image will be ubuntu-14.04.5-desktop-amd64.iso. 3) Launch VMware or Virtual Box and create a new virtual machine Use downloaded Ubuntu image when requested for installer disc image file Hit Next and select Linux as the guest operating system and select Ubuntu for the version. Hit Next and name your virtual machine and specify where you want to store it. Increase the disk size to 40 GB Hit Finish and install VMware Tools for Linux, if asked 4) Within C:\NXP\S32DS_Vision_v2.0\S32DS\s32v234_sdk\os extract 'build_content.tar.gz', then extract 'build_content.tar' and navigate to the 'v234_linux_build' folder 5) Start virtual machine May need to manually connect USB-mounted SD card reader Log in to virtual machine 6) In files, go to 'Home' directory and create a folder "VSDK" 7) Within VSDK folder, copy the files image, u-boot.s32, s32v234-evb.dtb, and rootfs.tar from the 'v234_linux_build' folder.  Note: The file s32v234-evb.dtb and u-boot.s32 will have names with XXXXX-suffix for the schematic number printed on the evaluation board (EVB) you are using. Be sure to use the files which correspond to your EVB. 😎 Load the card into the reader. If you are using a virtual machine, it is recommended to use a USB adapter instead of a built-in reader in the PC. 9) Within the virtual machine, launch the terminal program 10) Within the terminal program, enter command 'cat /proc/partitions' to view the names of the partitions and identify the names of the partitions on your SD card. Perhaps it is named 'sdb'. 11) Delete all existing partitions.    a) Enter command 'sudo fdisk /dev/sdb'.    b) Enter command 'd' and then the number of the partition to delete. Repeat as necessary until all partitions have been deleted 12) Create new partitions    a) Enter command 'n' for new    b) Enter 'p' (or just hit <enter>, as this is the default) for primary    c) Enter '1' (or just hit <enter>, as this is the default) for partition number 1.    d) Press <enter> to select the default value for the First sector    e) Enter '+255M' to set the size    b) Enter command 'n' again, for partition number 2, however, press <enter> to select the default value for the 'Last sector' 13) Set the partition type    a) Enter command 't' for type    b) Enter '1' for partition number 1    c) Enter 'c' for partition type FAT32    d) Enter command 't' again, for partition number 2, however, enter '83' for partition type LINUX If you get error 16: Device or resource busy, as shown above, use commands 'umount /dev/sdb1' and 'umount /dev/sdb2' to free the pre-existing partitions. Then try again and should be ok now 14) Write the new configuration, enter 'w' 15) Try to setup the filesystems. Enter 'sudo mkfs.vfat -n boot /dev/sdb1'. If you get the error '/dev/sdb1 contains a mounted filesystem', you will need to unmount the partition first. To save time, unmount both /dev/sdb1 and /dev/sdb2. Enter 'umount /dev/sdb1' and then 'umount /dev/sdb2' Now try 'sudo mkfs.vfat -n boot /dev/sdb1' again 16) It worked, so now enter 'sudo mkfs.ext3 -L rootfs /dev/sdb2'. It will take a minute or two for this to complete. Wait until you get the command prompt again. 17) Now it's time to load the BSP content from the VSDK. But first, change the directory to the one we created earlier for the BSP files. Enter 'cd /home/user/VSDK' or 'cd VSDK'. Enter the following commands: sudo dd if=u-boot.s32 of=/dev/sdb bs=512 seek=8 conv=fsync sudo cp Image /media/user/boot sudo cp s32v234-evb.dtb /media/user/boot 18) Now we need to extract the root filesystem, change the directory to its location 19) Enter command 'sudo tar -xvf /home/user/VSDK/rootfs.tar' 20) Once the files are extracted, enter command 'sync'   Now the SD card is ready to be used in the S32V234-EVB.
View full article
There are situations that require debugging multiple executable files within one debug session. Typical example is debugging the bootloader + application together where each one is a separate executable elf file or S32DS eclipse project. S32DS project loads the debug information of the generated executable file by default. Anyway GDB supports command to add additional elf files debug information into same debug session. If the executable source files are present on the same machine then the source level debugging of all the elf files is possible. Let's assume there are two elf files (bootloader and application) and both are built with debug information enabled - build configuration is named "Debug". Generation of the debug information for GCC compiler could be set in the Project Properties -> C/C++ Build -> Settings -> Standard  S32DS C Compiler -> Debug Level  Each debug configuration in S32 Design Studio supports loading or ignoring debug information. "Load symbols" loads just the debug information whereas "Load executable" basically loads program/code/data sections into MCU memory without debug information. Both options are enabled by default. Before starting the debugger it's necessary to load both executable files into your MCU memory. This could be easily achieved in S32DS (GDB) debug configuration where you specify to add the additional object files. In this specific case we need just 1 additional file - bootloader elf. The bootloader project in this example is actually another project in the same workspace (workspace relative path to elf file entered). After starting debugger the Debugger Console view now shows the details about programming of two elf files instead of one including load address of each section. When loading is finished the debug information for bootloader is not yet available ("No source available..." message displayed in the source level debug view) In order to display source and symbols for the bootloader elf please enter "add-symbol-file"  GDB command into Debugger Console View: add-symbol-file "C:/Users/NXA21306/workspaceS32DS.ARM.2018.R1/s32K144_Bootloader/Debug/s32K144_Bootloader.elf" 0x0000000‍‍‍‍‍ The GDB client command could be executed automatically when launching a debug session: The first argument is path to the elf file and the second argument (0x00000000) is the load address of the elf file (see the first bootloader load address ). Finally the debug session needs to be refreshed in order to display changes from just added symbol file. The refresh can be forced by performing a single step or issuing the target reset from the debugger.
View full article
This document describes how to generate an executable file that includes data flash content and how to program it into DFLASH using PEMicro GDB debugger. The default project generated by the project wizard builds an executable with code flash sections only.  Note: It is demonstrated on MPC5744P project but with some small adjustments it's applicable to any other MPC56xx/57xx derivative supported by S32 Design Studio for Power. Let's first explain how to build an executable that contains DFLASH section:  Check the memory map of the target device in the reference manual to figure out where DFLASH is mapped into. Add DFLASH memory segment/section into the linker file  (MPC57xx_flash.ld).   MEMORY {     flash_rchw : org = 0x00FA0000,   len = 0x4     cpu0_reset_vec : org = 0x00FA0004,   len = 0x4             m_text :        org = 0x1000000, len = 2048K        m_data :        org = 0x40000000,   len = 384K        int_dram  : org = 0x50800000,   len = 64K                m_dflash :  org = 0x800000, len = 96K    /* data flash memory segment */ }  SECTIONS {   …   .dflash : { KEEP (*(.dflash)) } > m_dflash  /* place .dflash section into dflsah memory*/   … }‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Select the data you want to place into the DFLASH section in the source code and associate it with the memory section you created in previous step (".dflash"). __attribute__((section(".dflash"))) const unsigned int dflash_int = 0xFEEDCAFE; __attribute__((section(".dflash"))) const char dflash_char[]= "Hello World form DFLASH!";‍‍‍‍‍‍‍‍ Build the project and check the generated .map file.  The custom".dflash" section should contain the selected data objects. .dflash         0x00800000       0x1d  *(.dflash)  .dflash        0x00800000       0x1d ./src/main.o                 0x00800000                dflash_int                 0x00800004                dflash_char‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ Let's now adjust the project debug configuration to be able to program DFLASH.  First  make sure you installed the latest version of PEMicro Eclipse Plugin. See the post below - it's about ARM version of S32DS but the update process for S32DS for Power is exactly the same. You just need is to select e200 component instead of ARM: error while dubbing: "ERROR loading to the device"  If you need to control DFLASH programming separately from code flash you would need a separate debug configuration for DFLASH. You can use "Duplicate" feature on an existing Debug configuration. This creates a new configuration with pre-populated fields so you don't have to enter them all manually. Change the debug configuration name and press "Apply" Switch to the Debugger tab -> Advanced Options and tick "Use Alternative Algorithm" option. Open Browse dialog and go to the folder below where all flash programming algorithms are located (*.pcp) and  select the appropriate DFLASH programming algorithm e.g. for this example: freescale_mpc5744p_1x32x20k_dflash_cut2.pcp          "<S32_Power_v1.x>\eclipse\plugins\com.pemicro.debug.gdbjtag.ppc_1.5.6.201703011834\win32\gdi\P&E"   Note: Folder name "com.pemicro.debug.gdbjtag.ppc_1.5.6.201703011834" may differ depending on the latest version of Pemicro GDB plugin version installed on your machine. It's recommended to enter the latest version folder if there are multiple plugin versions available.   If you want to program DFLASH and code flash at once you can just adjust the existing debug configuration. In this case you should select combined cflash+dflash flash algorithm such as e.g. freescale_mpc5744p_cflash_dflash_cut2.pcp  Click on debug button and as soon as the debug session is established check the DFLASH memory space in the Memory View
View full article
Installation & Activation HOWTO: Activate S32 Design Studio  HOWTO: Install Lauterbach TRACE32 debugger plug-in into S32 Design Studio  Create a New Project  HOWTO: Create APEX2 Project From Example in S32DS for Vision  HOWTO: Create An ISP Project From Example in S32DS for Vision  HOWTO: Create A53 Linux Project in S32DS for Vision  HOWTO: Create An ISP Project From Existing VSDK Graph in S32DS for Vision  HOWTO: Create A New Makefile Project With Existing Code From NXP Vision SDK Example Project   HOWTO: Build a Project and Setup a Debug Configuration for debugging in S32 Design Studio  HOWTO: Create A53 APEX2 and/or ISP Linux Project in S32DS for Vision DDR Configuration & Validation and Stress Test Tools HOWTO: Use DDR Configuration and Validation Tool  HOWTO: Use DDR Stress Test Tool  Hardware Setup HOWTO: Setup S32V234 EVB for debugging with S32DS for Vision and Linux BSP HOWTO: Prepare and boot S32V234 EVB from eMMC  HOWTO: Setup static IP address for S32 debug probe  Debugging HOWTO: Setup S32V234 EVB for debugging with S32DS for Vision and Linux BSP  HOWTO: S32V234-EVB debugging with Linux and gdbserver on target machine  HOWTO: Start Debug on an ISP Application Project with S32 Debugger and S32 Debug Probe  HOWTO: Start Debug on an APEX2 Application Project with S32 Debugger and S32 Debug Probe  Debugging the Startup Code with Eclipse and GDB | MCU on Eclipse   VSDK HOWTO: Change Vision SDK root in S32DS for Vision  HOWTO: Create A New Makefile Project With Existing Code From NXP Vision SDK Example Project  HOWTO: Prepare A SD Card For Linux Boot Of S32V234-EVB Using BSP From VSDK  Linux HOWTO: S32V234 EVB Linux - Static IP address configuration  HOWTO: S32V234 EVB Linux - DHCP IP address setup  HOWTO: Prepare A SD Card For Linux Boot Of S32V234-EVB Using BSP From VSDK  HOWTO: Access Linux BSP file system on S32V234-EVB from S32DS for Vision HOWTO: Setup A Remote Linux Connection in S32DS for Vision  General Usage HOWTO: S32 Design Studio Command Line Interface  HOWTO: Add user example into S32DS  HOWTO: Generate S-Record/Intel HEX/Binary file  HOWTO: Update S32 Design Studio  Troubleshooting Help! I just relaunched S32DS for Vision and my visual graph is collapsed!  Help! I just updated to new version of S32DS and now my projects have errors and I can't build!  Troubleshooting: PEmicro Debug Connection: Target Communication Speed  Troubleshooting: Indexer errors on header file  S32 Design Studio Offline activation issue hot fix  https://community.nxp.com/docs/DOC-345238 
View full article
This document explains how to change the package of a processor expert project, for example, from S32K144 100LQFP to S32K144 64LQFP.  It does NOT explain how to change processor derivatives (e.g. S32K144 to S32K142). 1. Assuming that the project is opened and active, go to Components Library View and click on Processors     2. Expand the repository folders and double click on your processor (e.g. S32K144) 3. Select new package (e.g.S32K144_64) and click on finish. Now the new variant will be added to your project 4. Go to PinSettings component and click on Switch Configuration. This action will change the pins configuration for new package and will discard the original pin configuration.
View full article
This document describes two ways how to add a static library file (*.a) into your S32 Design Studio GCC project. These methods differs from each other in sense how a library update is reflected into project build process. Adding a static library WITHOUT dependency to executable (elf) file This approach assumes a library does not change. An update of the library does not trigger project rebuild process. If the library changes the project needs to be manually cleaned (assuming no other source file has changed) and next build links the updated library. The path to the library and the library name shall be entered into Project Properties -> C/C++ Build -> Settings -> Standard S32DS C Linker -> Libraries Please note that GCC adds prefix "lib" and the extension ".a"  to the library name entered into the above dialog by default. GCC linker will search for the library file named: "libtestlib.a" in the folder "c:\my_libs" In the example above. In case a library cannot be found the linker error occurs e.g. one depicted below. The linker library file name option "-ltestlib.a" is expanded into file name "libtestlib.a.a" which does not exist. 10:28:53 **** Incremental Build of configuration Debug for project S32K144_Project_with_library **** make -j8 all Building target: S32K144_Project_with_library.elf Executing target #5 S32K144_Project_with_library.elf Invoking: Standard S32DS C Linker arm-none-eabi-gcc -o "S32K144_Project_with_library.elf" "@S32K144_Project_with_library.args" c:/nxp/s32ds_arm_v2.0/cross_tools/gcc-arm-none-eabi-4_9/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: cannot find -ltestlib.a collect2.exe: error: ld returned 1 exit status make: *** [makefile:49: S32K144_Project_with_library.elf] Error 1 10:28:54 Build Finished (took 1s.332ms)‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍ For a custom library name add colon character ":" at the beginning of the library name to disable the default prefix/extension expansion. GCC linker now searches for file name "testlib.lib" in the example below:   Adding a static library WITH dependency to executable (elf) file If a static library has changed - "touched"  it is sometimes desired to trigger project rebuild. In this scenario the library shall be added into a different project dialog: Project Properties -> C/C++ Build -> Settings -> Standard S32DS C Linker -> Miscellaneous -> Other objects The items from "Other objects" list is propagated into USER_OBJS makefile variable which is prerequisite for auto-generated makefile rule that build the target (elf): Enjoy linking static libraries in S32DS!
View full article
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
1. Build the project. a. Select the build configuration. (optional) b. Click on Build. c. Check there are no compiler errors. 2. Configure the debug configuration to start a debug session. a. Click down arrow next to Debug button. b. Select 'Debug Configurations…' c. Select the debug configuration associated with your current build configuration. d. Select whether to rebuild code each time debug session start is requested. e. Click on Debugger tab. f. Verify proper interface and port. 3. Click Debug
View full article