S32 Design Studio知识库

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

S32 Design Studio Knowledge Base

讨论

排序依据:
The S32 Design Studio for S32 Platform supports the S32R45 device with the S32 Debugger. This document provides the details on how to setup and begin a debugging session on the S32R45 evaluation board.   Preparation Setup the software tools Install S32 Design Studio IDE   Use the Extensions and Updates menu within S32 Design Studio for S32 Platform to add the S32R4xx Development Package.   Setup the hardware Confirm the setup of the S32R45 evaluation board.  Configure the JTAG. The S32R45 evaluation board supports both 10- and 20- pin JTAG connections. The default board configuration is set to 20-pin, change the position of the jumper J59 from 2-3(default)  to 1-2, if you are using the 10 Pin JTAG interface. Both are supported by the S32 Debugger and S32 Debug Probe. Connect the power supply cable Setup the S32 Debug Probe Connect the S32 Debug Probe to the evaluation board via JTAG cable. Refer to the S32 Debug Probe User Manual for installation instructions. Use the JTAG connection as was confirmed in the previous step. Connect the S32 Debug Probe to the host PC via USB OR via Ethernet (via LAN or directly connected, and configured for static IP address) and power supply connected to USB port. Launch S32 Design Studio for S32 Platform Create new or open existing project and check that it successfully builds. If creating a new project, be sure the S32 Debugger is selected in the New Project Wizard.     Procedure Open the Debug Configurations menu, then follow the steps depending on whether an S32 Debugger configuration exists for your project. If the project was created using the New Project Wizard in S32 Design Studio for S32 Platform, and the S32 Debugger was selected as the debugger, then it likely has existing debug configuration(s).       S32 Debugger Configuration(s) Exist If existing S32 Debugger configuration, proceed with probe configuration. Otherwise, skip to the next section. Below is shown the debug configuration which appears for the provided SDK example project 'hello_world_s32r45'. The suffixes 'debug', 'ram', and 's32debugger' refer to how the project was built and the debugger the configuration is for. Select the debug configuration which corresponds to the project, build type debug, and primary core (if a multicore project) Select the Debugger tab Select the Interface (Ethernet/USB) by which the S32 Debug Probe is connected. If connected via USB and this option is selected for interface, then the COM port will be detected automatically (in the rare event where 2 or more S32 Debug Probes are connected via USB to the host PC, then it may be necessary to select which COM port is correct for the probe which is connected to the EVB) If connected via Ethernet, enter the IP address of the probe. See the S32 Debug Probe User Manual for ways to determine the IP address.   S32 Debugger Configuration(s) Do Not Exist There might be no existing debug configuration if the project is being ported from another IDE or was created to use another debugger. Select the S32 Debugger heading and click New Launch configuration (or double click on the S32 Debugger heading, or right click on the S32 Debugger heading and select New from the context menu) A new debug configuration appears with the name set to the name of the active project in the Project Explorer window(this can be set by opening a file from the project or selecting an already opened file from the project in the editor), and the build type which was used to build it. If this is not matching your intended project then it can either be modified to match or deleted and recreated after the active project has been changed to the desired project. Adjust the name of the project as desired. From the Main tab, check that the Project field is set to the correct project name, as listed in the Project Explorer, and that the C/C++ Application is set to the ELF file which was built. The name of the project can be customized, but '_' must be used instead of spaces. If the Project field is not set or incorrect, click Browse... and then select the correct project name from the list. If more than one project is open in the workspace, then each will be listed. This shows how, regardless of which project is active in the C/C++ perspective, any available workspace project could be associated. This can be useful when reusing a debug configuration from one project in another. If the C/C++ Application is not set or incorrect, click Search Project... and then select the correct binary file (will only work if Project field is correct and project was successfully built). Switch to the Debugger tab, Click 'Select device and core' and then select the correct core from the list. In this case, the M7_0 core is correct. If this is not the primary core, then uncheck the box next to 'Initial core'. This is done only for multi-core projects for the non-boot cores. This causes the scripts to skip the initialization of the core as the boot core will launch the other cores so additional initialization will not be required. Select the Interface (Ethernet/USB) by which the S32 Debug Probe is connected. If connected via USB and this option is selected for interface, then the COM port will be detected automatically (in the rare event where 2 or more S32 Debug Probes are connected to the host PC, then it may be necessary to select which COM port is correct for the probe which is connected to the EVB) If connected via Ethernet, enter the IP address of the probe. See the S32 Debug Probe User Manual for ways to determine the IP address. Click Apply Click Debug. This will launch the S32 Debugger. When the debugger has been successfully started, the Debug perspective is opened and the application is executed until a breakpoint is reached on the first line in main().  
查看全文
The S32 Design Studio for S32 Platform supports the S32G274A device with the S32 Debugger. This document provides the details on how to setup and begin a debugging session on the S32G274A evaluation board.   Preparation Setup the software tools Install S32 Design Studio for S32 Platform Use the Extensions and Updates menu within S32 Design Studio for S32 Platform to add the S32G2xx Development Package.   Setup the hardware Confirm the setup of the S32G274A evaluation board.  Configure the JTAG. The S32G274A evaluation board supports both 10- and 20- pin JTAG connections. The default board configuration is set to 20-pin, change the position of the jumper J59 from 2-3(default)  to 1-2, if you are using the 10 Pin JTAG interface. Both are supported by the S32 Debugger and S32 Debug Probe. Connect the power supply cable Setup the S32 Debug Probe Connect the S32 Debug Probe to the evaluation board via JTAG cable. Refer to the S32 Debug Probe User Manual for installation instructions. Use the JTAG connection as was confirmed in the previous step. Connect the S32 Debug Probe to the host PC via USB OR via Ethernet (via LAN or directly connected, and configured for static IP address) and power supply connected to USB port. Launch S32 Design Studio for S32 Platform Create new or open existing project and check that it successfully builds. If creating a new project, be sure the S32 Debugger is selected in the New Project Wizard.   Procedure Open the Debug Configurations menu, then follow the steps depending on whether an S32 Debugger configuration exists for your project. If the project was created using the New Project Wizard in S32 Design Studio for S32 Platform, and the S32 Debugger was selected as the debugger, then it likely has existing debug configuration(s).     S32 Debugger Configuration(s) Exist If existing S32 Debugger configuration, proceed with probe configuration. Otherwise, skip to the next section. Below is shown the debug configuration which appears for the provided SDK example project 'hello_world_s32g275a'. The suffixes 'debug', 'ram', and 's32debugger' refer to how the project was built and the debugger the configuration is for. Select the debug configuration which corresponds to the project, build type debug, and primary core (if a multicore project) Select the Debugger tab Select the Interface (Ethernet/USB) by which the S32 Debug Probe is connected. If connected via USB and this option is selected for interface, then the COM port will be detected automatically (in the rare event where 2 or more S32 Debug Probes are connected via USB to the host PC, then it may be necessary to select which COM port is correct for the probe which is connected to the EVB) If connected via Ethernet, enter the IP address of the probe. See the S32 Debug Probe User Manual for ways to determine the IP address.   S32 Debugger Configuration(s) Do Not Exist There might be no existing debug configuration if the project is being ported from another IDE or was created to use another debugger. Select the S32 Debugger heading and click New Launch configuration (or double click on the S32 Debugger heading, or right click on the S32 Debugger heading and select New from the context menu) A new debug configuration appears with the name set to the name of the active project in the Project Explorer window(this can be set by opening a file from the project or selecting an already opened file from the project in the editor), and the build type which was used to build it. If this is not matching your intended project then it can either be modified to match or deleted and recreated after the active project has been changed to the desired project. Adjust the name of the project as desired. From the Main tab, check that the Project field is set to the correct project name, as listed in the Project Explorer, and that the C/C++ Application is set to the ELF file which was built. If the Project field is not correct, click Browse... and then select the correct project name from the list. If more than one project is open in the workspace, then each will be listed. This shows how, regardless of which project is active in the C/C++ perspective, any available workspace project could be associated. This can be useful when reusing a debug configuration from one project in another. This is not common, but if the C/C++ Application is not correct, click Search Project... and then select the correct binary file (will only work if Project field is correct and project was successfully built). Switch to the Debugger tab, Click 'Select device and core' and then select the correct core from the list. In this case, the M7_0 core is correct. If this is not the primary core, then uncheck the box next to 'Initial core'. This is done only for multi-core projects for the non-boot cores. This causes the scripts to skip the initialization of the core as the boot core will launch the other cores so additional initialization will not be required. Select the Interface (Ethernet/USB) by which the S32 Debug Probe is connected. If connected via USB and this option is selected for interface, then the COM port will be detected automatically (in the rare event where 2 or more S32 Debug Probes are connected to the host PC, then it may be necessary to select which COM port is correct for the probe which is connected to the EVB) If connected via Ethernet, enter the IP address of the probe. See the S32 Debug Probe User Manual for ways to determine the IP address. Click Apply Click Debug. This will launch the S32 Debugger. When the debugger has been successfully started, the Debug perspective is opened and the application is executed until a breakpoint is reached on the first line in main().    
查看全文
The NXP device S32R45 has accelerators that can be programmed. The S32 Debugger included within the S32 Design Studio for S32 Platform IDE with the S32 Debug Probe provides the ability to debug these accelerators. The accelerator covered in this document: Linear Algebra Accelerator (LAX).      Section map:           Preparation               Setup the software tools                              Setup the hardware             Procedure                Create A New Debug Configuration                             Simulator                             Physical Hardware                Start A Debug Session                             Standalone                             Multi-Core                Debugging LAX Once Debug Session is Started               Multi-thread LAX Debugging: IPPU & VCPU                     Multi-LAX core Debugging                     Preparation   Setup the software tools   Install S32 Design Studio for S32 Platform    Install the S32R4xx development package and the Radar extension package for S32R4xx. Both of these are required for the LAX accelerator.      Setup the hardware   Confirm the setup of the S32R45 evaluation board. Connect the power supply cable   Setup the S32 Debug Probe. Refer to the S32 Debug Probe User Manual for installation instructions. Connect the S32 Debug Probe to the evaluation board via JTAG cable. Connect the S32 Debug Probe to the host PC via USB cable OR via Ethernet cable (via LAN or directly connected and configured for static IP address)  and power supply connected to USB port.   Launch S32 Design Studio for S32 Platform   Open existing project or create a new project and check that it successfully builds. If creating a new project, be sure the S32 Debugger is selected in the New Project Wizard.     Procedure   The procedure for starting a debug session and accessing the associated accelerator-specific registers is detailed here.    Application code executing on the LAX accelerator can be debugged using a simulation as well as on physical hardware.   Debugging using simulation occurs entirely on the PC and no physical hardware is required.      When debugging LAX on physical hardware, this is primarily conducted through one of two methods:   Standalone: the LAX executable is loaded by a debugger over JTAG using a probe and only the LAX core is executed and available for debugging.   Multi-core: the LAX executable is included within A53 executable, the A53 application loads the LAX executable to the LAX core and both A53 and LAX core are available for debugging. The debug connection is made to the two cores through one of two methods:   Baremetal/Bareboard: the debugger connects to both the A53 and LAX cores using the probe over JTAG.   Linux BSP: the debugger connects to the A53 core, which is running Linux BSP, using a remote Linux connection over Ethernet and then connects to the LAX core using the debug probe over JTAG.      Before a debug session can be started a debug configuration must exist.       Create A New Debug Configuration   If the New Project Wizard was used to create the project using the S32DS Application Project option, then there was an opportunity to select the desired debugger from within the wizard. If the desired debugger option was selected at this time, then the needed configuration already exists and will only require adjustments to the hardware connection settings (no hardware settings for LAX Simulator).     If the New Project Wizard was not used to create the project OR the currently desired debugger was not the one selected at the time of project creation, a new debug configuration must be created.       With the existing project selected in Project Explorer, open the Debug Configurations Menu: Run -> Debug Configurations     Having the existing project selected in the Project Explorer view will make the creation of a new launch configuration easier as many settings will be imported from the selected project. To select a project, click on it so it becomes highlighted.   Next, select the debugger for which the new debug configuration will be created.                    Simulator   To create the new configuration, either click on the ‘New launch configuration’ button from the toolbar at the top and to the left, or right-click on the ‘LAX Simulator’ and select ‘New Configuration’ from the menu.     Once the configuration is created it will be displayed and any errors with the configuration will be shown. If the project was selected in the Project Explorer, then the Name of the debug configuration will contain the project’s name and the Project and C/C++ Application fields will be populated as well. The C/C++ Application field will only be populated if the build output executable exists. Confirm these values are correct before moving on.     There is an error showing that the Device core ID is not specified on the Debugger tab. Switch to the Debugger tab and click on the button ‘Select device and core’.     From the Select Target Device and Core window, expand the listing until all cores are listed. Since the LAX Simulator only supports LAX cores on the S32R45, that is all which is listed. Select the desired LAX core and click OK.     Now that the device and core are selected, the only correct initialization script associated with the LAX is selected automatically.     No further changes are required. Click Apply to save the changes or if you are ready to debug with the LAX Simulator, then click Debug and the changes will be saved and the debug session will launch.      Physical Hardware   To create the new configuration, either click on the ‘New launch configuration’ button from the toolbar at the top and to the left, or right-click on the ‘S32 Debugger’ and select ‘New Configuration’ from the menu.     Once the configuration is created it will be displayed and any errors with the configuration will be shown. If the project was selected in the Project Explorer, then the Name of the debug configuration will contain the project’s name and the Project and C/C++ Application fields will be populated as well. The C/C++ Application field will only be populated if the build output executable exists. Confirm these values are correct before moving on.     There is an error showing that the Device core ID is not specified on the Debugger tab. Switch to the Debugger tab and click on the button ‘Select device and core’.     From the Select Target Device and Core window, expand the listing until all cores are listed. Notice that all supported cores on the S32R45 are listed. Select the desired LAX core and click OK.     Now that the device and core are selected, a generic initialization script associated with the LAX is selected automatically, however, this may not be the correct one. If debugging Standalone, meaning only LAX core will be debugged, then the automatic selection   ‘s32r45_generic_bareboard_all_cores.py’ is correct. This script will initialize all of the cores so the LAX can execute properly. If debugging Multicore, meaning both A53 and LAX will be debugged, then the A53 and LAX cores will already be initialized by the time the debugging on LAX begins. So a different script that doesn't initialize all of the cores is needed. Click ‘Browse’ and navigate to ‘{install_dir}\S32DS.3.5\S32DS\tools\S32Debugger\Debugger\scripts\s32r45’ and select the script ‘s32r45_attach.py’. The attach script will allow to start debugging on a core that is already initialized. Refer to the S32 Debugger User Guide, or the document 'README.txt' located in the same folder as these script files for details on all of the provided scripts.     Confirm the setting of the ‘Initial core’ checkbox. This box should be checked within the debug configuration that establishes the first connection to the target device via S32 Debug Probe. When this box is checked, the Debug Probe Connection interface and GDB Server settings become available. The probe connection only needs to be configured once and only one GDB Server needs to be running for each debug session. Therefore, this box should be checked for standalone debugging or for multicore debugging where A53 core is debugged via Remote Linux. If the A53 and LAX cores are debugged via the S32 Debug Probe, then this box should be checked for the A53 debug configuration and should not be checked for the LAX debug configuration.   If this is a standalone debugging of only the LAX core, setup the Debug Probe Connection. Select either USB or Ethernet, depending upon your hardware setup. If USB is selected, the COM port for the S32 Debug Probe will automatically be detected (unless not connected or more than one probe is connected). If Ethernet is selected, then enter either the hostname (fsl + last 6 digits of MAC address) or IP address. It is highly recommended to press the ‘Test connection’ button to confirm the hardware connection is correctly configured. See the included ‘S32_Debug_Probe_User_Guide.pdf’ for more details on the setup of the S32 Debug Probe.     Check that the GDB Client section has the correct path to the LAX GDB executable. It should point to the variable ‘S32DS_R45_GDB_LAX_PATH’.     Startup tab check the following settings   Load image is checked for standalone debugging, NOT checked for multicore debugging. Basically, if it is loaded by A53 core (contained in A53 ELF file), then it does not need to be loaded.   Load symbols is checked. The only time you would not check this box is if there is no project binary containing symbols available.   Set breakpoint at main and Resume are checked for standalone debugging, NOT checked for multicore debugging.     Now you are ready to start debugging. If debugging Standalone, click ‘Debug’. If debugging Multicore, switch to the A53 debug configuration (either C/C++ Remote Application or S32 Debugger) and start the A53 debug session first. Once the A53 debug session is running, advance the program counter to the line just after LAX is initialized.       Start A Debug Session   Starting a LAX debug session are different depending upon whether Standalone or Multi-core debugging is required. The steps for each method are detailed in separate sections below.   For convenience, the example project for S32 Design Studio from the RSDK, ‘RSDK_S32DS_template’, will be used to demonstrate multi-core A53/LAX debugging. Note: Unfortunately, this example project is not setup for standalone debugging because there is no main() executing on LAX to call the    LaxVectorAddGraph(). So the standalone debugging steps will be presented only to highlight the different setup required. For instructions on loading this example project to your workspace, see ‘HOWTO: Create New Project from Example  RSDK_S32DS_template from Radar SDK’.      Standalone   If the standalone bareboard debugging of only LAX core was supported by the RSDK_S32DS_template example, here are the steps which would be required.   Click on the LAX project so it is highlighted, then build it to ensure it builds clean and that the executable exists.     From the menu at the top, select Run -> Debug Configurations…     Select the standalone debug configuration for LAX core. In the case of the RSDK_S32DS_template example project, only the multi-core debug configuration is supported. In this case, the standalone configuration will need to be created. Right click on the multi-core configuration and select Duplicate.  This will create an identical configuration.      Change the name as desired and then select the Debugger tab.     Click Browse next to Initialization script and navigate to the directory   ‘{install_dir}\S32DS.3.4\S32DS\tools\S32Debugger\Debugger\scripts\s32r45’. Select the script  ‘ s32r45_generic_bareboard_all_cores.py’.     Adjust the Debug Probe Connection settings to match your HW setup. Use the Test connection button to confirm.      Select the Startup tab. For standalone debugging the image file will not be loaded by the A53 core, so it must be loaded by the S32 Debugger. Check the boxes for Load image, Set breakpoint at: and Resume.     Click Debug to start the debug session. All of the settings made will be applied and the debug session will be launched.      A53 / LAX Multi-Core   For multi-core debugging, the A53 core is executing an application on the Linux BSP. The EVB should be setup to boot from a flash device which has been loaded with the S32R45 Linux BSP.   Before beginning the debug sessions, be sure to load the driver dependencies (oal_driver, rsdk_spt_driver, and rsdk_lax_driver) as described in the RSDK User Manual, RSDK Offline Example section ‘Running the application’.   Start A53 debug. From the menu at the top, select Run -> Debug Configurations…     In the Debug Configurations menu, from the configuration list, expand the ‘C/C++ Remote Application’ group and select the ‘RSDK_S32DS_template_A53_Debug’ configuration.     On the Main tab, create a new connection for using the IP address of the EVB. The IP address could   be determined either by issuing a Linux command over the serial connection, such as ‘ifconfig’, by accessing the local network connected device list, or perhaps the EVB was setup with a static IP address and it is already known.     Click New… in the Connection section.   Select ‘SSH’ for connection type.   Enter the IP address in Host: field, use ‘root’ in User: field, and leave password field empty        Click Debug to start debugging on the A53 core.     The debugger will launch and execute until the first executable line in main(). See Debugger tab in Debug Configurations menu to adjust this setting.     Now that the A53 is launched, it is necessary to execute the A53 code until just after the LAX core is  initialized and buffers are allocated. Open ‘lax_processing.c’ from the ‘src’ folder in the A53 project and set a breakpoint on line 100. One way is by double-click in the space on the left side of source code editor. This is the executable line just after ‘RsdkLaxInit()’ is called.     Now press ‘Resume’ from the toolbar to advance the program counter to the breakpoint.     Wait for the breakpoint to occur.     Return to the Debug Configurations menu, select the ‘RSDK_S32DS_template_LAX_0_attach’ debug configuration and select the Debugger tab.     Adjust the Debug Probe Connection settings to match your HW setup. Use the Test connection button to confirm.     Click Debug to start the LAX debug session.   Wait for the LAX debug session to launch and stop in the disassembly. Set a breakpoint in the source code. For our example, place one in ‘lax_custom_graph.c’ on line 97, where the kernel ‘ Rsdk_LA_add_VV’ is called.     Select the LAX debug thread and press Resume so it will be ready to run to the breakpoint which was just setup.     Select the A53 debug thread and press Resume to allow execution to resume and then wait for the breakpoint to be reached in the LAX code.       The breakpoint in the LAX code has been reached. Now it is possible to perform some debugging activities on the LAX core.        Debugging LAX Once Debug Session is Started   Once the LAX debug session is started, it will be stopped and only disassembly can be viewed. Select the LAX debug thread to see.     Open the C code source file and set a breakpoint within the kernel of interest.     Press Resume on the LAX debug thread.   Now switch back to the A53 debug thread and press Resume.   The breakpoint you set in LAX will be reached and you can now start stepping through and looking at registers, etc.         Multi-thread LAX Debugging: IPPU & VCPU    Load a project which uses both IPPU and VCPU and start the debug session on LAX using one of the methods provided.   Once the debug session is started on LAX, set a breakpoint on the line containing RSDK function ‘Rsdk_AU_sync_i()’     Press Resume to advance the program counter to the breakpoint. When the breakpoint is reached, the second thread appears. The first thread contains the VCPU and the second thread contains the IPPU.     Select the second thread to see the IPPU disassembly. Now instruction stepping can be performed on the IPPU. Registers can be viewed as well.     To see the opcodes, do not use the codes shown in the disassembly view. The disassembly view does not handle cases where many opcodes are packed into a single address. Instead, use the Memory Spaces view.        If the memory spaces view is not already present, then add it from the menu Window -> Show View -> Memory Spaces.   To add a memory space, right click in the panel on the left or click on the + button at the upper right.      Multi-LAX-core Debugging   The S32R45 device contains 2 LAX cores: LAX_0 and LAX_1. To debug the additional LAX core, simply add a new debug configuration and setup for LAX_1.   Create a new debug configuration for LAX_1 by first duplicating the existing debug configuration for LAX_0.      Rename the configuration to reference LAX_1, but the project name and application file (ELD) will remain the same.     On the Debugger tab, use ‘Select device and core’ button to change the core to LAX_1, change the initialization script to ‘<device>_attach.py’, and uncheck the box next to Initial core.    Depending on how you started the debug session for LAX_0, you may need to adjust the Startup tab. The settings on Startup tab should be set to match the LAX_0 debug configuration.   Start the LAX_0 debug session first, then the LAX_1 debug session. Stepping within each can be conducted independently.
查看全文
S32 Design Studio (S32DS) supports Lauterbach’s “loos coupling” version of Eclipse plug-in to debug S32DS projects via a Lauterbach probe + TRACE32 standalone application. This configuration uses Eclipse IDE for development and standalone TRACE32 for debugging.    This plug-in supports the features below: Start TRACE32 from an Eclipse launch configuration Support for multiple projects (multi-core) Synchronization of breakpoints between Eclipse and TRACE32 Open source file' functionality from TRACE32 to Eclipse and vice versa See the Lauterbach document for additional information about the plug-in.   Installation instructions First of all make sure you have TRACE32 installed. Now let's proceed to eclipse plug-in installation.   First of all make sure you have TRACE32 installed. Now let's proceed to eclipse plug-in installation.   go to menu "Help" -> "Install New Software"    Click on the arrow to bring up the list.  Select ‘LauterbachGmbHUpdateSite - http://www.lauterbach.com/eclipse‘                 Check the box next to the Lauterbach TRACE32 Eclipse Loose Coupling and click "Next"   Check "I Accept the terms of the license agreement" and Select all Lauterbach certificates to trust. Finally you proceed to the installation. When the plugin is installed you will be asked to restart S32DS   Now you should be able to use the New Project Wizard create an application project with Lauterbach Debugger support:     Or manage (create, delete, adjust) Lauterbach eclipse debug configurations:   Enjoy debugging with TRACE32 Eclipse plug-in in S32DS!  
查看全文
Installation & Activation HOWTO: Activate S32 Design Studio   HOWTO: S32 Design Studio - Offline Install of Extensions and Updates  S32DS Extensions & Updates: Explanation and How To Use  HOWTO: Install Lauterbach TRACE32 debugger plug-in into S32 Design Studio HOWTO: Install GHS Compiler Plugin    Getting Started S32DS Quick Start Guide  S32 Design Studio 3.5 Tips and Tricks HOWTO: S32 Design Studio - Create a New S32DS Project from Example  HOWTO: S32 Design Studio - Create a New Application Project  HOWTO: Create a Blinking LED example project using S32K1xx RTD with AUTOSAR HOWTO: Create a Blinking LED example project using S32K1xx RTD without AUTOSAR HOWTO: Create a Blinking LED application project for S32G using S32 RTD No AUTOSAR HOWTO: Create a Blinking LED application project for S32G using S32 RTD with AUTOSAR HOWTO: Create a Blinking LED application project for S32M2xx using S32 RTD with AUTOSAR  HOWTO: Create a Blinking LED application project for S32M2xx using S32 RTD No AUTOSAR  HOWTO: Create a Blinking LED application project for S32R45 using S32 RTD No AUTOSAR HOWTO: Create a Blinking LED application project for S32R45 using S32 RTD with AUTOSAR HOWTO: Create a Blinking LED application project for S32R41 using S32 RTD No AUTOSAR  HOWTO: Create a Blinking LED application project for S32R41 using S32 RTD AUTOSAR HOWTO: Create a simple blinking LED project using S32 Config Tool (S32V2xx)  HOWTO: Create APEX2 Project From Example in S32DS for S32 Platform  HOWTO: Create An ISP Project From Example in S32DS for S32 Platform HOWTO: Create New Project from Example ‘RSDK_S32DS_template’    Build tools & Standard libraries  HOWTO: Add a static library file into S32 Design Studio GCC project HOWTO: Link a binary file(s) into the application project using GNU build tools   HOWTO: Display Percentage Of Memory Usage At End Of Build    Debug  & Flash Programming HOWTO: Setup S32V234 EVB for debugging with S32DS for Vision and Linux BSP  Using GDB Server Monitor Commands from Eclipse GDB Console HOWTO Build a Project and Setup Debugging with GDB PEMicro Debugging Interface  HOWTO: Setup static IP address for S32 debug probe  HOWTO: Start S32 Debugger from S32 Design Studio on S32G274A EVB HOWTO: Start S32 Debugger from S32 Design Studio on S32R45 EVB  HOWTO: Start S32 Debugger from S32 Design Studio on S32R41 EVB HOWTO: Command Line GDB Debugging with S32 Debug Probe for S32G2xx HOWTO: Command Line GDB Debugging with S32 Debug Probe for S32R45  HOWTO: Command Line GDB Debugging with S32 Debug Probe for S32R41 HOWTO: JTAG Flash Programming with S32 Debugger and S32 Debug Probe for S32G274A EVB HOWTO: JTAG Flash Programming with S32 Debugger and S32 Debug Probe for S32R45 EVB  HOWTO: JTAG Flash Programming with S32 Debugger and S32 Debug Probe for S32R41 EVB  HOWTO: Secure Debugging from S32DS IDE with S32 Debugger and S32 Debug Probe on S32G274A HOWTO: Secure Debugging from S32DS IDE with S32 Debugger and S32 Debug Probe on S32R45  HOWTO: Start Trace with S32 Debugger and S32 Debug Probe on S32G2xx HOWTO: Start Trace with S32 Debugger and S32 Debug Probe on S32R45  HOWTO: Start Trace with S32 Debugger and S32 Debug Probe on S32V2xx  Sharing Debug Configuration with Eclipse Debugging the Startup Code with Eclipse and GDB | MCU on Eclipse  HOWTO: Add a new debugger configuration to an existing project  HOWTO: Command Line JTAG flash programming with S32 Debug Probe on S32G274A EVB HOWTO: Command Line JTAG flash programming with S32 Debug Probe on S32R45 EVB  HOWTO: Command Line JTAG flash programming with S32 Debug Probe on S32R41 EVB HOWTO: Use FlashSDK to add support for QuadSPI flash memory devices for S32 Flash Tool  HOWTO: Program Serial RCON using S32 Debug Probe S32G2xx  HOWTO: Program Serial RCON using S32 Debug Probe S32R4xx on S32R45 EVB  Secure Debug Support on S32K3 | PEmicro  HOWTO: Debugging LAX on S32R45 Using S32 Debugger HOWTO: Debugging SPT on S32R45 Using S32 Debugger HOWTO: Debugging BBE32 DSP on S32R45 Using S32 Debugger HOWTO: Debugging SPT on S32R41 Using S32 Debugger S32Debugger Zephyr Thread Awareness User Manual    S32 Configuration Tools HOWTO: Use DCD Tool To Create A Device Configuration Data Image  HOWTO: Use IVT Tool To Create A Blob Image HOWTO: Use IVT Tool To Create A Blob Image S32G274A HOWTO: Use IVT Tool To Create A Blob Image S32R45    Real-Time Drivers (RTD), S32 SDK & Other SDKs HOWTO: Working with AMMCLib SDKs  HOWTO: Add custom SDK into existing project  HOWTO: Migrate S32K1xx SDK project from SDK v4.0.1 to v4.0.2  HOWTO Use FreeRTOS OS Awareness with S32Debugger and PEMicro  Implementing FreeRTOS Performance Counters on ARM Cortex-M | MCU on Eclipse  HOWTO: Move FreeRTOS Heap into DTCM memory - S32K3xx + RTD   General Usage HOWTO: S32 Design Studio Command Line Interface  HOWTO: Generate S-Record/Intel HEX/Binary file  HOWTO: Migrate Application Projects from S32DS for Vision 2018.R1 to S32DS 3.x  HOWTO: Add user example into S32DS   Troubleshooting Troubleshooting: Incompatible JVM Error When Launching S32 Flash Tool v2.1 Troubleshooting: PEmicro Debug Connection: Target Communication Speed  Troubleshooting: Indexer errors on header file  Troubleshooting: PEMicro Debugging: PIT and STM modules cannot count when Debug Mode is entered  Troubleshooting: PEMicro Debugging: Problems resuming from breakpoint in vTaskDelay  Troubleshooting: Quick Fix Option in Problems View  Troubleshooting: S32 Design Studio exits unexpectedly or Installer rolls back immediately following activation code entry  Troubleshooting: Activation fails with error message FNP ERROR 0  Troubleshooting: Can't See AMMCLib for S32K3 in S32DS Extensions and Updates Troubleshooting: Java Error When Config Tools Used From Command Line    
查看全文
Use the New Project Wizard in S32 Design Studio to create a bare board project. The process is very straightforward, but there are some choices to be made. Which processor, toolchain, SDKs, and debugger you want supported, are the most important. However, you also have options to select on how many cores should be enabled, which C library to use,  I/O Support, FPU Support, C/C++ language. All of these are explained within the user manual, but the default settings should work for most users. In this document, we walk you through the process from start to finish.   1. Launch S32 Design Studio 2. Select File->New->S32DS Application Project or use quick button S32DS Application Project from Dashboard view 3. Enter a project name. 4. Expand the folder family and select the desired core. For example 'S32Z270 (Boot core:M33)' 5. Click Next 6. Notice there are options for I/O Support, FPU Support, Language, SDKs, and Debugger. Notice different options are supported for Debugger, depending upon the selected Processor. Also, some families have multicore projects. If you want to use single core, leave only the first Boot core checked. 7. Click Finish. The new project is generated. It contains a sample bareboard application. It is possible to build and debug this project without any changes. Add your content to this base project.  
查看全文
Introduction In this document, we will discuss the S32DS Extensions & Updates tool and how to use it to install the device support you need.   S32 Design Studio for S32 Platform has been designed to allow users to customize their installation, enabling them to integrate support for just the NXP devices they need and just the tools they need. With the new modular design, parts of the tool have been moved into one of 4 different package types. The Platform and Tools Packages are default packages which are included as part of the base install, cannot be uninstalled, however, they can be updated.   The Platform package contains the base components of the IDE, modular installer, general documentation and integration mechanisms. The Tools Package contains the compilers, debuggers, and MSYS2. The Development Package contains hardware specific support such as New Project Wizard, S32 Configuration Tools, SDKs and Libraries. The Extension Package contains Accelerator Compiler, Debugger, Graph Tool and advanced SDKs.   Downloading the various components from our cloud-based update server, allows you to assemble and complete the customized installation of the tools and software to meet your development needs. It is also via the update server that the updates and bug fixes will be provided. And of course, all of these will be available as downloads from our product page for users who are installing to an offline PC. S32DS Extensions and Updates Menu When you first launch the S32 Design Studio for S32 Platform, you are presented with the S32DS Extensions and Updates menu. This menu provides a listing of the add-on packages which have been installed, those that are available to be installed, and those which have updates available to be installed. In the panel to the right is displayed detailed information specific to the package which is selected in the panel to the left. If there is an update available for the selected package, the currently installed version number will be shown on the left and the update version number will be shown on the right.       Online Package Installation Setup If your PC is connected to the internet, then it will link to NXP's update server (http://www.nxp.com/lgfiles/updates/Eclipse/S32DS_3.5) and any new or updated packages will be automatically added to the list. See Package Installation section below for installation procedure and details.       Offline Package Installation Setup If your PC is not connected to the internet, you must first download the desired packages from the NXP website, in the form of an archive file, to a separate PC and have them transferred to your target PC. Then you would select the link 'Go to Preferences' and add each downloaded archive file as a separate software site. After selecting OK, you will see the new packages contained within the archive files listed.   Procedure: Go to S32 Design Studio for S32 Platformdownload page and select Download for the package or update you need. Once the file is downloaded, it must be installed within S32 Design Studio. Launch S32DS and wait for the S32DS Extensions and Updates window to appear. Then select the 'Manage Sites' link. The Preferences window appears. Select the 'Add...' button to add a new software site to the list. The file you downloaded will be a software site. Now the Add Site window appears. Since the downloaded file is an archive of type ZIP, the 'Archive...' button should be used to select it. Navigate to the location where the file was saved. Now the downloaded file has been added as a new site. Select OK to return to the main S32DS Extensions and Updates window. Now the new package(s) will appear in the S32DS Extensions and Updates window, just as it would from the update server. See Package Installation section below for installation procedure and details.   Package Installation To install the new packages or updates, check the box to the left of the desired package in the left panel and select 'Install/Update'. The tool will automatically detect any dependencies on other packages and select them to meet all requirements for the installation.     Follow the prompts and the packages will be installed, followed by a request to restart S32 Design Studio.     Dependencies and Errors If there are dependencies between two or more updates, the tool will detect this and inform you of the package which cannot yet be installed. If you try to install a package which is not compatible with the version of S32 Design Studio you have installed, a notice will appear, and the package will not be listed in the S32DS Extensions and Updates menu.   Uninstalling Unwanted Packages If you no longer need a particular package or installed one by mistake, just check the box next to the package and select 'Uninstall'.       Reinstalling Packages If you believe your installed package has become corrupted, if you accidentally deleted part of it (such as an example project, etc.), or if for any reason you need to restore the package, just check the box next to the package and select 'Reinstall'.   Additional Information If you wish to not see the S32DS Extensions and Updates menu at startup, you can uncheck the box at the lower left. For internet connected PCs, the update server will still be linked and checked for new packages at S32DS startup, but you will no longer see the S32DS Extensions and Updates menu. However, you will still see a notice at the lower right of the tool at startup when new packages are detected.      
查看全文
To install updates and additional packages to S32 Design Studio: 1) Download the Update from the S32 Design Studio page at NXP.com. 2) From S32 Design Studio, got to Help – S32DS Extensions and Updates. 3) Click on ‘Manage Sites’ link. 4) Select 'Add...' 5) Select 'Archive...', locate the downloaded update: 6) Click OK. 7) Click Apply and Close on the Preferences menu 😎 Notice the S32DS Extensions and Updates menu displays the new content. 9) Check the box next to the new package and click Install/Update. 10) Accept license terms and click Finish. 11) After the installation is complete, restart S32 Design Studio.
查看全文
When you use the New Project Wizard within S32 Design Studio to create a project, starting a debugging session is easy since the wizard creates the debug configuration for you. In this document, the case for NXP devices supported by the GDB PEMicro Debugging Interface is detailed.    Prerequisites The project to be debugged should be loaded to the workspace and open                 Procedure Build the project. Select the build configuration. (optional) If you already know which build configuration is desired, you can preselect it. If not, one is already selected for you by default. It will be noted with a check mark. Typical options contain choices between RAM and FLASH memory builds and for each a choice between Debug and Release. For debugging purposes the Debug option should be selected.                 Click on Build. Clicking this button will start the build using the preset build type.     Or, select the build type from the pick list. This will start the build for the build type selected, regardless of which one is marked with a check mark.       Check there are no compiler errors.                     Configure the debug configuration to start a debug session. Click ‘Run’ pulldown menu. Select 'Debug Configurations…'     Select the debug configuration associated with your current build configuration.     Select whether to rebuild code each time debug session start is requested.   Click on Debugger tab.     Verify proper interface and port.     Click Debug      
查看全文
In this document, the steps to create a new S32 Design Studio project from example will be detailed. 1. Launch S32 Design Studio 2. Use quick S32DS Project from Example button from Dashboard.  or select File -> New -> S32DS Project From Example   3. Select one of the projects, for example, S32K58_PI_MonteCarlo_BM. Click Finish.     4. The project is added to the current workspace. It is ready to be built and can be executed on the target.  
查看全文
The Quick Start describes how to use the S32 Design Studio to create, build, and debug a project. Starting S32DS Design Studio for S32 Platform 3.5 To start S32 Design Studio and begin to work with it: Launch S32 Design Studio : locate the shortcut depending on your selection during the installation, and double-click the product icon. The Eclipse Launcher dialog box appears to let you define the location of your workspace.   Note: A workspace is the folder where S32 Design Studio stores projects that you create or import. Select a folder for your workspace. It is recommended to create a new workspace for each product instance. To choose the default location, click OK. To use a different location, click Browse. In the Select Workspace Directory dialog box, select the preferred folder or click Make New Folder to create a new folder for storing your projects. Click OK. S32 Design Studio is launched. Browse through the Getting Started tab and close it. The workbench appears:   Creating and building a project   To create and build a project: Click File > New > S32DS Application Project or S32DS Library Project on the menu bar. The first page of the wizard appears. Specify the name of the new project in the Project name text box. Note: The Location field shows the default project location. If you want to change this location, clear the Use default location check box, click Browse and specify a different location. Click OK. Select the target processor from the Processors panel. Click Next. The second page of the wizard appears. Check the project settings, select the cores and parameters. Click Finish. The new project appears in the Project Explorer view. Note: The wizard creates one or multiple projects, depending on the number of selected cores. To build your project, do any of the following: Right-click the project in the Project Explorer view and click Build Project Select the project in the Project Explorer view, then click Project > Build Project on the menu Select the project in the Project Explorer view and click on the tool icon on the toolbar.        The build process starts.   If a build generates any errors or warnings, you can see them in the Problems view. Read through the build messages in the Console view to make sure that the project is built successfully.   Debugging a project   To debug a project: Set the debug configuration for your project. Select the project in the Project Explorer view. Open the debug configuration in any of these ways: Right-click the project and select Debug as > Debug Configurations… from the context menu. Choose Run > Debug Configurations… from the menu bar. Click an arrow next to Debug picture on the toolbar and select DebugConfigurations…. In the Debug Configurations dialog box, select the required debug configuration. The name of the debug configuration is composed of the project name, debugging interface and build configuration. The configuration settings appear on the tabs.   Modify the configuration settings where required and click Apply to save the changes. Click Debug. The debugger downloads the program to the memory of the target processor. The Debug perspective is displayed. The execution halts at the first statement of the main() function. The program counter icon on the marker bar points the next statement to be executed.   To set and run to a breakpoint: Double-click on the marker bar next to a statement. The breakpoint indicator (blue dot) appears next to the statement. From the Debug view, select Run > Resume on the menu bar. The debugger executes all statements up to (but not including) the breakpoint statement. To control the program: From the Debug view, select Run > Step Over from the menu bar. The debugger executes the breakpoint statement and halts at the next statement. From the Debug view, select Run > Resume from the menu bar. The debugger resumes the program execution. From the Debug view, select Run > Terminate. The debug session ends.
查看全文
Purpose   This document holds information about how S32 Design Studio and S32Debugger probe or PE Micro Debug probe can be used to debug applications running on NXP’s S32 family processors from the operating system perspective using OSEK Kernel awareness.   Abbreviations Abbreviation Description OSEK Open Systems and their Interfaces for Automotive Electronics is a standard developed in the automotive industry to define a common architecture for embedded Real-Time Operating Systems (RTOS). NXP RTOS NXP Real Time Operating System compliant with OSEK specification  ORTI OSEK Run Time Interface.  ORTI file is generated based on NXP RTOS configuration *.ort / *.orti OSEK system builder ORTI file extension MSI Microsoft Software Installer   Background OSEK Kernel awareness within S32 Design Studio allows you to debug your application from the operating system perspective. ORTI is a specification that enables OS awareness for external debuggers (e.g NXP S32 Debugger, Lauterbach T32, PEmicro's debug probe).  Most OSEK system builders are able to extract all necessary information of the OS component into a text file, called “ORTI file”. NXP RTOS generates an *.ort file based on the user configuration. Debuggers can load this ORTI file to add support for the operating system. S32Design Studio can load such an ORTI file and adds some special views that will allow the user to inspect the configured OS objects: Tasks, Alarms, Counters, Scheduletable.   Document structure The basic workflow for setting up and managing OSEK OS Awareness projects in S32 Design Studio remains consistent across both single-core and multi-core projects, irrespective of the debug probe used. The focus will be on the universal steps that are described in single-core projects case. For OSEK OS Awareness multi-core projects and for projects utilizing PE Micro debug probes, only the specific considerations will be highlighted.                 Hardware Support OSEK OS Awareness support in S32 Design Studio is available for: S32G27x, S32G39x S32E/Z  S32K396 S32R41 SAF85xx   OS Support OSEK OS Awareness support is available only on Windows.   How to use OSEK OS Awareness with S32 Design Studio and S32Debugger probe   Single core projects   Prerequisites Note: This HOWTo Guide describes the required steps for using OSEK Run Time Interface on a single-core example project for S32R418AA Cortex-M7 in S32 Design Studio. Prerequisites might differ depending on the project hardware type.   Software environment S32 Design Studio project or example project delivered with the NXP RTOS imported in S32 Design Studio Workspace S32R41 Development Package S32R41 Real-Time Drivers Version 1.0.0 SW32R41 RTOS 4.7.0 version 0.9.0 BETA   !Note: For this example project, NXP RTOS SysGen requires Java Runtime Environment OpenJDK-JRE 11.0.11 installed on your computer. The OpenJDK-JRE can be downloaded from the following URL (please search with exact keyword "jre-11.0.11-x64 MSI" or “jdk-11.0.11-x64 MSI” for correct version): https://developers.redhat.com/products/openjdk/download Using the installer (MSI) is recommended because it creates the HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\JDK registry entry. JAVA_HOME environment variable must be set to point to location of Java Runtime Environment. For example: JAVA_HOME=C:\Program Files\RedHat\java-11-openjdk-jre-11.0.11-1 (Please choose correct path for your machine). Error or unexpected behavior may occur if the version of Java is different than 11.0.11 when NXP RTOS SysGen is executed (steps that are described Chapter III – “Generating Configuration”). If Java version is not found in the HKEY_LOCAL_MACHINE (HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft) a warning is reported.    Hardware environment Silicon: - Chip P/S32R418AAU(K1)MUFT (rev 1.1) Board: - X-S32R41-EVB PCB 48194 RevD SCH RevD Debug Probe: S32 Debug Probe       Project setup While in Design Studio, go to File -> New -> S32DS Project From Example  and select one of the existing single core S32 Design Studio Sample applications delivered with the NXP RTOS or import your own S32 Design Studio project.   Select the desired project from the list of examples and click finish       Generating configuration Before running the example, a configuration needs to be generated. First, go to Project Explorer View in S32 Design Studio and select the current project.   Right click and select the "S32 Configuration Tool" menu then click "Open Peripherals".  Click on the "Update Code" button.   Click on Select directory under "Generate" field to select the directory which contains example project (E.g.: D:\WorkspaceS32DS\RTOS_example_S32R418AA_SC1_M7) then click on Generate Configuration.  Click "Update Code" again.   Building the project Select the project in the S32 Design Studio Workspace and click on Build. Clicking this button will start the build using the preset build type.    Debug configuration Click on Debug Configurations   Setup the Debug Probe Connection for the project. Select either USB or Ethernet, depending upon your hardware setup. If USB is selected, the COM port for the S32 Debug Probe will automatically be detected (unless not connected or more than one probe is connected). If Ethernet is selected, then enter either the hostname (fsl + last 6 digits of MAC address) or IP address. See ‘S32_Debug_Probe_User_Guide.pdf’ ({S32DS_installation_directory}/S32DS/tools/S32Debugger/Debugger/Docs/S32_Debug_Probe_User_Guid e.pdf) for more details on the setup of the S32 Debug Probe.      Loading the ORTI file and starting debug From the OS Awareness tab select “OSEK” from the OS dropdown list. Browse and select from local system or Workspace the required *.ort file Click the Debug button.     OS Details Browser view Navigate to go to Window -> Show View -> Other…  and select the OS Details Browser view     Using the OS Details Browser view, Design Studio can display information about the tasks status on the target.   Tasks tab In the “Tasks”  tab from the OS Details Browser view you can see information about the operating system (the number of tasks, current task states, system objects):   Implementation tab Switch to the “Implementation” tab to see more detailed information gathered from the .ort file:   OS – current state Tasks – priority, state and assigned stack Stacks – usage and attributes Other OS resources defined and declared through ORTI Detailed info about ORTI data object Customize data presentation (HEX format, re-arrange the table columns) Colored presentation of data: -   White fields are static Blue fields are non-static Yellow fields are fields that changed their values from the last time they were inspected/checked.   OS information: Tasks information:   Stacks information:   Multi-core projects Prerequisites Note: This HOWTo Guide describes the required steps for using OSEK Run Time Interface on a multi-core example project for S32Z270 Cortex-R52 in S32 Design Studio. Prerequisites might differ depending on the project hardware type.   Software environment: S32 Design Studio project or example project delivered with the NXP RTOS imported in S32 Design Studio Workspace S32Z2/E2 Development Package S32Z/E Real Time Drivers Version 0.9.0 S32ZE RTOS R21-11 version 0.9.0   !Note: For this multi-core example project, NXP RTOS SysGen requires Java Runtime Environment OpenJDK-JRE 1.8 installed on your computer. The OpenJDK-JRE can be downloaded from the following URL (please search with exact keyword "jdk-8u372-x86 MSI" for correct version): https://developers.redhat.com/products/openjdk/download - Using the JDK 1.8 installer (MSI) is recommended. JAVA_HOME environment variable must be set to point to location of Java Runtime Environment. For example: JAVA_HOME= C:\Program Files (x86)\Java\java-1.8.0-openjdk-1.8.0.372-1 (Please choose correct path for your machine). Error or unexpected behavior may occur if the version of Java is different than 1.8 when NXP RTOS SysGen is executed (steps that are described in Chapter III – “Generating Configuration”).   Please notice that SysGen is not stable in JRE 1.8 64 bit. Using SG with JRE 1.8 32 bit is recommended.     Hardware environment:             Boards: S32Z27X-DC PCB 50588 RevA1 SCH RevB (DC2)             Silicon chip: P32Z270ADCK0MJFT P65C ATTJ2151A (E2). (21x21, 594 BGA) Debug Probe: S32 Debug Probe               Boards: S32Z270-DC PCB 50912 RevA SCH RevA (DC1)             Silicon chip: S32Z270ADCK0MJET (17x17, 400 BGA) Debug Probe: S32 Debug Probe   Project setup Go to File -> New -> S32DS Project From Example  and select one of the existing multi-core S32 Design Studio Sample applications delivered with the NXP RTOS or import your own S32 Design Studio project.      Generating configuration The steps for generating configuration must be performed for all projects: RTOS_example_S32Z270_SC1_multi_instance_R52_0_0, RTOS_example_S32Z270_SC1_multi_instance_R52_0_1, RTOS_example_S32Z270_SC1_multi_instance_R52_0_2, RTOS_example_S32Z270_SC1_multi_instance_R52_0_3.   Building the projects Before running, you must build all projects: RTOS_example_S32Z270_SC1_multi_instance_R52_0_0, RTOS_example_S32Z270_SC1_multi_instance_R52_0_1, RTOS_example_S32Z270_SC1_multi_instance_R52_0_2, RTOS_example_S32Z270_SC1_multi_instance_R52_0_3.     Debug configuration Click on Debug Configurations. Click the initial core under S32 Debugger in Debug configurations menu.  Setup the Debug Probe Connection.    Loading the ORTI file   Loading the ORTI file must be done for all the project configurations:  RTOS_example_S32Z270_SC1_multi_instance_R52_0_0 RTOS_example_S32Z270_SC1_multi_instance_R52_0_1 RTOS_example_S32Z270_SC1_multi_instance_R52_0_2 RTOS_example_S32Z270_SC1_multi_instance_R52_0_3   Starting debug on multi core project From the Debug Configuration menu, click on Launch Group for S32 Debugger. Check all the cores that you want to debug. Click the Debug button.   OS Details Browser view Compared with single core projects, when debugging multi core projects you can switch between the debugging sessions and information from all debugged cores   Tasks tab     Implementation tab The information displayed in Implementation tab is the same as in single-core projects case, but you can switch between the debugged cores       How to use OSEK OS Awareness with S32 Design Studio and PE Micro Debug probe Prerequisites Note: This HOWTo Guide describes the required steps for using OSEK Run Time Interface on a single-core example project for S32K396 Cortex-M7 in S32 Design Studio. Prerequisites might differ depending on the project hardware type.   Software environment: S32 Design Studio project or example project delivered with the NXP RTOS imported in S32 Design Studio Workspace S32 Design Studio 3.5.6 development package with support for S32K396 devices S32K3 Real-Time Drivers Version 3.0.0 P01 SW32K396 RTOS version 0.9.0 BETA   !Note: check the note from S32 Debugger – multi-core projects and install requires Java Runtime Environment OpenJDK-JRE 1.8   Hardware environment: Board:             Mini-module: XS32K396-BGA-DC PCB 54614 RevX1 SCH RevA              Silicon: Chip P32K396EHMJBS OP40E QAD2222F  Debug Probe: PE Micro Debug Probe     Project setup Select the desired project from the list of examples delivered with PE Micro Debug probe support or import your own S32 Design Studio project and click finish For this How To Guide, RTOS_example_S32K396_SC1_M7_0_0 was used   Generating configuration     Building the projects Select the project in the S32 Design Studio Workspace and click on Build.    Debug configuration Click on Debug Configurations. Select the debug configuration associated with your current build configuration and click on the “PEmicro Debugger” tab. Verify proper interface and port and if the device is properly detected.   Loading the ORTI file and starting debug From the OS Awareness tab select “OSEK” from the OS dropdown list. Browse and select from local system or Workspace the required *.ort file Click the Debug button.   OS Details Browser view Go to Window -> Show View -> Other…  and select the OS Details Browser view   Tasks tab In the “Tasks”  tab from the OS Details Browser view you can see information about the operating system (the number of tasks, current task states, system objects):   Implementation tab  “Implementation” tab displays more detailed information gathered from the .ort file:   Revision history: Revision no. Revision date Description 01 Nov 2023 Created document about how to use OSEK OS Awareness in S32 Design Studio on single and multi core projects with PE Micro and S32 Debug probes    
查看全文
Purpose   This document holds information about how S32 Design Studio and S32Debugger probe or PE Micro Debug probe can be used to debug applications running on NXP’s S32 family processors from the operating system perspective using FreeRTOS Kernel awareness.   Abbreviations Abbreviation Description RTOS Real Time Operating System RTD Real-Time Drivers   Background FreeRTOS is a market-leading open-source RTOS designed for microcontrollers and small microprocessors. It includes a kernel and a growing set of libraries. In S32 Design Studio, FreeRTOS Kernel awareness allows you to debug your application from the operating system perspective. Hardware Support FreeRTOS OS Awareness support in S32 Design Studio is available for: S32Z S32E S32G (Cortex-M7) -S32R45 (Cortex-M7) S32K1 S32K3 (K3xx and K396) S32M2 (S32M24x)   OS Support OSEK OS Awareness support is available only on Windows.     OS Information The FreeRTOS download includes source code for every processor port, and every demo application. Currently, FreeRTOS support is available only for single-core projects.   The core RTOS code is contained in three files, which are called tasks.c, queue.c and list.c. These three files are in the FreeRTOS/Source directory. The same directory contains two optional files called timers.c and croutine.c which implement software timer and co-routine functionality respectively. Each supported processor architecture requires a small amount of architecture specific RTOS code. This is the RTOS portable layer, and it is located in the FreeRTOS/Source/Portable/[compiler]/[architecture] sub directories, where [compiler] and [architecture] are the compiler used to create the port, and the architecture on which the port runs, respectively.    Document structure The basic workflow for setting up and managing FreeRTOS OS Awareness projects in S32 Design Studio remains consistent, irrespective of the debug probe used. The universal steps are described in “How to use FreeRTOS OS Awareness with S32 Design Studio and S32Debugger probe” section. For FreeRTOS OS Awareness projects utilizing PE Micro debug probe, only the specific considerations will be highlighted.   How to use FreeRTOS OS Awareness with S32 Design Studio and S32Debugger probe   Prerequisites Note: This HOWTo Guide describes the required steps for using FreeRTOS on a single-core example project for S32G399A Cortex-M7 in S32 Design Studio. Prerequisites might differ depending on the project hardware type.   Software environment S32 Design Studio project or example project delivered with FreeRTOS imported in S32 Design Studio Workspace S32G Development Package S32 RTD Autosar 4.4 Version 4.0.0 S32G3 RTD Autosar 4.4 Version 4.0.0 S32G FreeRTOS 10.4.6 version 4.0 Hardware environment Supported boards S32G-PROCEVB-S PCB RevX3 SCH RevB1 (Daughter Board) S32GRV-PLATEVB PCB RevA SCH RevB (Mother Board) S32G-VNP-RDB3 PCB 53060 RevC SCH RevF Connections PB_08 is controlling the LED. Debugger The debugger (S32 Debugger) must be connected to J64 20-pin JTAG Cortex Debug connector.     Project setup While in Design Studio, go to File -> New -> S32DS Project From Example  and select one of the existing single core S32 Design Studio Sample applications delivered with the NXP FreeRTOS or import your own S32 Design Studio project.       Select the desired project from the list of examples and click finish     Generating configuration Before running the example a configuration needs to be generated. First go to Project Explorer View in S32 Design Studio and right-click the current project.         Select the "S32 Configuration Tool" menu then click on the desired configuration tool (Pins, Clocks, Peripherals etc...).         Clicking on any one of those will generate all the components. Make the desired changes (if any) then click on the "S32 Configuration Tool → Update Code" button.     Building the project Select the project in the S32 Design Studio Workspace and click on Build. Clicking this button will start the build using the preset build type.    Debug configuration Click on Debug Configurations     Setup the Debug Probe Connection for the project. Select either USB or Ethernet, depending upon your hardware setup. If USB is selected, the COM port for the S32 Debug Probe will automatically be detected (unless not connected or more than one probe is connected). If Ethernet is selected, then enter either the hostname (fsl + last 6 digits of MAC address) or IP address. See ‘S32_Debug_Probe_User_Guide.pdf’ ({S32DS_installation_directory}/S32DS/tools/S32Debugger/Debugger/Docs/S32_Debug_Probe_User_Guid e.pdf) for more details on the setup of the S32 Debug Probe.      Selecting FreeRTOS OS Awareness and starting debug From the OS Awareness tab select “FreeRTOS” from the OS dropdown list and click Debug.      FreeRTOS views Navigate to go to Window -> Show View -> Other…  and select the FreeRTOS view       Using the Heap Usage, Queue List, Task List and Timer list views, Design Studio can display information about the tasks status on the target. Heap usage view     Queue List view Queues are the primary form of inter-task communications. They can be used to send messages between tasks, and between interrupts and tasks. In most cases they are used as thread safe FIFO (First In First Out) buffers with new data being sent to the back of the queue, although data can also be sent to the front.   Task List view A real time application that uses an RTOS can be structured as a set of independent tasks. Each task executes within its own context with no coincidental dependency on other tasks within the system or the RTOS scheduler itself       Timer List view A software timer (or just a 'timer') allows a function to be executed at a set time in the future. The function executed by the timer is called the timer's callback function. The time between a timer being started, and its callback function being executed, is called the timer's period. Put simply, the timer's callback function is executed when the timer's period expires. Note, a software timer must be explicitly created before it can be used. How to use FreeRTOS OS Awareness with S32 Design Studio and PE Micro Debug probe   Prerequisites Note: This HOWTo Guide describes the required steps for using FreeRTOS on a single-core example project for S32K396 Cortex-M7 in S32 Design Studio. Prerequisites might differ depending on the project hardware type.   Software environment S32 Design Studio project or example project delivered with the NXP FreeRTOS imported in S32 Design Studio Workspace S32 Design Studio 3.5.6 development package with support for S32K396 devices: SW32K39x_S32DS_3.5.6_D2309 S32K396 RTD AUTOSAR 4.4 Version 3.0.0 Code Drop 02 FreeRTOS for S32K396 version 0.8.0 Hardware environment •    Supported boards X-S32K396-BGA-DCConnections PB_08 is controlling the LED - PTH7 is controlling the LED_BLUE in X-S32K396-BGA-DC board - when HIGH LED is ON or when LOW LED is OFF •     Debugger The debugger (PE Micro Debugger) must be connected to J20 20-pin JTAG Cortex Debug connector   Project setup Go to File -> New -> S32DS Project From Example  Select the desired project from the list of examples delivered with PE Micro Debug probe support or import your own S32 Design Studio project and click finish   Generating configuration   Please refer to the steps described in the “Generating configuration” section from “How to use FreeRTOS OS Awareness with S32 Design Studio and S32Debugger probe”.   Building the project Select the project in the S32 Design Studio Workspace and click on Build. Clicking this button will start the build using the preset build type.    Debug configuration Click on Debug Configurations. Select the debug configuration associated with your current build configuration and click on the “PEmicro Debugger” tab. Verify proper interface and port and if the device is properly detected.     Selecting FreeRTOS OS Awareness and starting debug From the OS Awareness tab select “FreeRTOS” from the OS dropdown list and click Debug.      FreeRTOS views Navigate to go to Window -> Show View -> Other…  and select the FreeRTOS view Using the Heap Usage, Queue List, Task List and Timer list views, Design Studio can display information about the tasks status on the target.   Further details can be found in the “FreeRTOS views” section from “How to use FreeRTOS OS Awareness with S32 Design Studio and S32Debugger probe”         Revision history: Revision no. Revision date Description 01 Nov 2023 Created document about how to use FreeRTOS OS Awareness in S32 Design Studio with PE Micro and S32 Debug probes    
查看全文
S32 Design Studio (S32DS) supports Eclipse plug-in of Green Hills Software (GHS) compiler to compile S32DS projects via GHS compiler. This document describes how to install this plug-in and enable GHS in the new project wizard. After the GHS Eclipse plug-in is installed successfully, you can be able to create and build S32DS project using GHS compiler under S32DS Eclipse environment if the device and SDKs support GHS compiler.   Installation instructions To able to use GHS compiler, you need to make sure that GHS compiler is installed with a valid license. Follow the steps below to install eclipse plugin: Install GHS Eclipse plug-in On S32DS graphical user interface, go to menu "Help" -> "Install New Software"   In the "Install" dialog appears, click on "Add" button. In the "Add Repository" dialogappears, click on "Local". Navigate to the eclipse directory located in your MULTI compiler installation(eg: C:\ghs\comp_202114\eclipse) In the Name box, enter "GHS Eclipse". Click on "Add" button.  In the Name/Version list, expand the Green Hills MULTI for Eclipse item. Select GreenHills MULTI for Eclipse corresponding to your target architecture(eg: Green Hills MULTI for Eclipse(ARM) and Green Hills MULTI for Eclipse(ARM64)). If you have MULTI licenses for more than one architecture, you can select all the targets you are licensed for. Click Next until you see the license acceptance page.  If you accept the terms of the feature license, select I accept the terms in the license agreement. And click on "Finish" button.   If the Security Warning window appears, click on "Install anyway".   In the "Software Updates" dialog box appears, click on "Restart Now" to restart S32DS.- Go to "Window" -> select "Preference" -> "S32 Design Studio for S32 Platform" -> "S32DS Variables". Set your GHS installation path for S32DS_GHS_PATH variable (ex "C:\ghs\comp_202114").   Create new S32DS project using GHS in the project wizard. Now you can create a new S32DS project and select GHS toolchain for the device andSDKs support GHS toolchain.   And you can see the GHS settings are showed in the S32DS project properties.    
查看全文
This document shows the step-by-step process to create a simple blinking LED application for the S32M2xx family using the S32 RTD AUTOSAR drivers. This example used for the S32M244 EVB, connected to a PC through P&E Debugger.  Preparation  Setup the software tools  Install S32 Design Studio for S32 Platform   Install the S32M2xx development package and the S32M24 RTD AUTOSAR 1.9.0 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 S32M2xx, Select S32M244  Click Next   Click '…' button next to SDKs      Check box next to PlatformSDK_S32K1_S32M24_2_0_0_S32M244_M4F (or whichever latest SDK for the S32M2xxx 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.     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, “Port_Ip_1 driver” is the non-AUTOSAR version driver and so it must be replaced. Right click on ‘Port_Ip_1’ and remove it. Keep the BaseNXP driver as it is.     Click on the ‘+’ next to the MCAL box.   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 ‘Dio’ 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 :    Ignore the error for Port component for now.     Now we required to configure the different MCAL drivers that we added. Starting with Dio configuration, open the Dio configuration.     Now, open the ”DioConfig” tab. From that change Dio Port Id to 4 instead of 0    In that, select  “+” sign adjacent to Dio Channel.     Then edit Name to “DioChannel_0”and “Dio Channel Id”  to ‘6’ instead of ‘0’.       From the schematic for S32M244 EVB, we can select signal line for user LED from the schematic, channel 6 is connected to user LED signal, so we use channel 6 signal line to the chip on the user LED.            Now Select Port tab for Port configuration.   And select and open Port Configuration tab, and from that open “PortConfigSet” tab.  Edit PortPin Pcr to “134” instead of “0”.           Also, change Portpin Direction to “PORT_PIN_OUT” And PortPin Level Value to “PORT_PIN_LEVEL_LOW”.  After change it should be as below.        At the bottom you will find the “UnTouchedPortPin ’’ . Click on “+’’ and add PortPins.         Now add 6 port pins as per below configuration. Pins 0, 1,2,3, 4,5, and 6 should be setup.    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);          while ( MCU_PLL_LOCKED != Mcu_GetPllStatus() )          {                 /* Busy wait until the System PLL is locked */          }          Mcu_DistributePllClock();          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 count = 0U       Then replace the code as below:                                     /* Logic for blinking LED 10 times */        while (count++ < 10)       {           /* Get input level of channels */           Dio_WriteChannel(DioConf_DioChannel_DioChannel_0, STD_HIGH);           TestDelay(2000000);           Dio_WriteChannel(DioConf_DioChannel_DioChannel_0, STD_LOW);           TestDelay(2000000);        }         Before the 'main' function, add a delay function as follows:  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, select and open max file again. Then, select and open peripheral tools.      Now, from the toolbar selection menu at the top, select and double click on the symbol as shown as below:     Now, from the global settings, for ComponentGenerationMethod from that select  “FunctionalGroups” from the drop down menu as shown below:          Now. click ‘Update Code’ from the menu bar.    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.    Now, you need configuration for P&E MULTILINK Debug Probe.   Connect PE Micro debugger to EVB using USB, and to make sure that debugger is connected via USB interface, then the COM port will be detected automatically (in the rare event where 2 or more 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).  Now, Select PEMicro Multilink debugger, select “Run”, and select debug configuration tab, then select GDB PE Micro Interface Debugging, and from the option available under it, select option with Debug_FLASH_PNE.   Now, in the debug configuration window, select the tab PEmicro Debugger, and in the PEMicro Interface settings, select the interface USB Multilink.   Clink apply and debug     Click Debug    To see the LED blink, click ‘Resume'     This code as it is will blink the LED 10 times, you can make changes in for loop condition to blink it infinitely.      
查看全文
Purpose This document holds information about how the Design Studio and S32Debugger probe can be used to debug Zephyr OS (Operating System) applications running on NXP’ S32 family processors.    Scope    This document is addressed to the software developer or tester (referred below as user) looking to debug or verify its software using the S32Debugger probe.    The document assumes the user has basic knowledge about Zephyr OS and he can rebuild the image with debug configuration.    The information about the building of the Zephyr application using NXP’s Zephyr distribution is not in the scope of this document. This is part of the user manual delivered with the Zephyr NXP release.    Hardware support    This support is available for Cortex-A53 and Cortex-R52 cores only.    It has been confirmed on S32R41, S32R45 and S32Z/E SoCs (System on Chip).    Software support    This feature is available starting with Design Studio 3.5.3.    It is confirmed with Zephyr OS versions 2.7.2 (S32R41), 3.2.0 (S32Z/E), 3.3.0 (S32R41).    Background    Zephyr is a lightweight RTOS (Real Time Operating System) that supplies support for multiple architectures (aarch64, arm, riscv, x86).    The thread awareness support stands for the capability of the debugger to supply low-level information about OS threads (referred below as standard support) or system-level OS information (referred below as extended support).      Standard support    Design Studio can supply low-level information about Zephyr threads:    Name    State    CPU registers - including FPU (Floating Point Unit)    Call stack    Priority    User options    Core number    Prerequisites    S32Debugger automatically detects the Zephyr OS image using the specific debug symbols.    The Zephyr application image should include the following configuration options:    CONFIG_DEBUG_THREAD_INFO    Mandatory    If this choice is not set, the debugger is not able to parse the kernel internal data.    In debug view, the user will see one thread only and no extra information about this.                                         Debug window    The Zephyr threads are listed in the Debug window when the CPU is stopped.      This is an example about how to follow thread entry can be read:      The Thread with index #15 and thread ID 868402064 (TCB (Thread Control Block) address in decimal format) is running on the CPU core 0 and it is in the Stopped state.    It has running priority 15, the user options 0x01 and its name is “idle 00”.    This is suspended in a breakpoint set in function arch_cpu_idle();    Thread states    The thread states names reported by debugger are accordingly with the output of the kernel function k_thread_state_str() excluding Stopped, that is the active Zephyr thread suspended by debugger.    Thread’s state values:    Stopped    Dummy    Pending    Prestart    Dead    Suspended    Aborting    Queued      CPU registers    The CPU registers of the thread selected in the Debug window can be read from the Registers window. This window is updated automatically when other thread is selected.    Known limitations    The warning message “ccs: Invalid parameter” is printed twice into the Design Studio IDE console (for S32Z/E only).    These can be ignored because the functionality is not affected.      Breakpoint per thread is not supported    Write thread registers is not supported (excluding the thread in state Stopped)    Performance may be affected by high number of Zephyr threads    FPU registers read support requires patch of Zephyr OS to save the offset in the table for ARM64 build. This is the snippet code that must be added in the initialization of _kernel_thread_info_offsets  into file thread_info.c😞    #elif defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING) && defined(CONFIG_ARM64)     [THREAD_INFO_OFFSET_T_PREEMPT_FLOAT] = offsetof(struct _thread_arch,                          saved_fp_context),        [THREAD_INFO_OFFSET_T_COOP_FLOAT] = THREAD_INFO_UNIMPLEMENTED,        Extended support    Design Studio can supply system-level information about Zephyr OS resources like:    Timer    Semaphore    Mutex    Stack    Message queue    Mailboxes    Pipes    Queues    Threads    This implementation is not CPU architecture specific like standard support.    Prerequisites    The Zephyr application image should include the following configuration options:      CONFIG_DEBUG_THREAD_INFO    Mandatory    If this choice is not set, the debugger is not able to parse kernel internal data and to supply information about resource owners or waiting lists.    CONFIG_TRACING    CONFIG_TRACING_OBJECT_TRACKING    CONFIG_TRACING_NONE    Mandatory    Enable the kernel object tracking. If this is not set, the debugger can show system information about Threads only. Note: This configuration is working on Zephyr version 3.0.0 or higher.    CONFIG_INIT_STACKS    Optional    Enable the fill of stack with a marker that can be used by debugger to report the peak stack usage.    This information might be useful for stack size tunning.    CONFIG_THREAD_STACK_INFO    Recommended    The debugger supplies information about the stack (address, size or usage).        GDB (GNU Debugger)    This support is available through extended GDB commands.    Command name    Description    thread-aware-list-supported-os    List the supported OS types and the detected OS    thread-aware-list-supported-objs    List the supported kernel objects by the detected or specified OS. This is based on types used by the current image only.    thread-aware-read-objs    Read the specified or all objects supported by current image.        These commands can be configured to supply the output in JSON (JavaScript Object Notation) or table format.    Use the help command to get more information about these thread awareness commands.      Figure 2 GDB - Get Thread, Mutex & Semaphore info    Common attributes    Most of the object's attributes are type specific with 2 exceptions:    Attribute name    Description    Format               S32Debugger Zephyr Thread Awareness                                                                       User Manual v1.3                                                                        address    Object data address                     integer                                 name    ELF Symbol name                          string                                    Thread attributes    Attribute name    Description    Format    user_options    User options    integer    state    Thread state – see Thread states    string    prio    Thread priority    integer    stack_addr        integer    stack_delta        integer    stack_size        integer    stack_usage_max    Largest stack usage    float    stack_usage    Current stack usage    float    MemSlab attributes    Attribute name    Description    Format    num_blocks        integer    block_size        integer    buffer        integer    free_list        integer    num_used        integer    locked    Locked by this thread (name)    string    waiting    Threads (name) waiting for this object    string list    Queue attributes    Attribute name    Description    Format    locked    Locked by this thread (name)    string      waiting    Threads (name) waiting for this object    string list    Pipe attributes    Attribute name    Description    Format    buffer        integer    size        integer    bytes_used        integer    read_index        integer    write_index        integer    flags        integer    locked    Locked by this thread (name)    string    waiting_tx    Threads (name) waiting for this object on write    string list    waiting_rx    Threads (name) waiting for this object on read    string list    MBox attributes    Attribute name    Description    Format    locked    Locked by this thread (name)    string    waiting_tx    Threads (name) waiting for this object on write    string list    waiting_rx    Threads (name) waiting for this object on read    string list    Attribute name    Description    Format    timeout        integer      period        integer    MsgQ Attribute name    Description    Format    attributes    Attribute name    Description    Format    msg_size        integer    max_msgs        integer    buffer_start        integer    buffer_end        integer    read_ptr        integer    write_ptr        integer    used_msgs        integer    flags        integer    locked    Locked by this thread (name)    string    waiting    Threads (name) waiting for this object    string list    Stack attributes    Attribute name    Description    Format    base        integer    next        integer    top        integer    flags        integer    locked    Locked by this thread (name)    string    waiting    Threads (name) waiting for this object on write    string list    Timer attributes    status        integer    waiting    Threads (name) waiting for this object on write    string list    Mutex attributes      owner    Own by this thread (name)    string    lock_count        integer    owner_orig_prio        integer    waiting    Threads (name) waiting for this object on write    string list    Semaphore attributes    Attribute name    Description    Format    limit        integer    count        integer    waiting    Threads (name) waiting for this object on write    string list        DS (Design Studio)    The DS version 3.5.3 or higher offers the possibility to display the Thread information only into a dedicated view.    The extended support is still available in DS by running the extended GDB commands directly from the Debugger Console window.            Figure 3 DS - Execute thread awareness GDB commands    Thread view    This window can be accessed from the menu RTOS/Zephyr RTOS/Threads.                  Figure 4 DS IDE - Thread view    Some information can be missing from the view depending on the build configuration used. For example, in the above figure, the Peak stack usage is not available because the CONFIG_INIT_STACKS is not set.    Note the Thread’s field names into DS IDE Thread view can be different than GDB Thread attributes.    Stack    The thread view holds more information about the stack.    The Stack usage stands for the current stack usage, and it is based on SP (Stack Pointer) register while the Peak stack usage stands for the maximum usage of the stack.    Known limitations    Performance may be affected by number of OS resources    Limited configurations tested       
查看全文
In order to improve user experience with S32 Design Studio, in this article you can find some tips and tricks.   Use-Case #1: S32 Design Studio takes to much time to perform some of UI update operations Workaround: Manually update the Eclipse configuration parameters in the s32ds.ini file Use-Case #2: S32 Design Studio takes a lot of time to open waiting for updates checking to finish Solution: Update your environment to use at least Update12 or newer or disable the checking at startup Use-Case #3: Control of package dependencies between RTD and S32DS during install/update flow Solution: Transition to Package Manager as the main/single delivery solution for SW and Tools installation. The concept of “Bundles & Use Cases” guarantee interoperability and come with customer support.    
查看全文
Included in the Radar Software Development Kit (RSDK) is an example project ‘RSDK_S32DS_template’. This example shows an example radar application which uses the Arm Cortex-A53 and accelerators SPT, LAX and BBE32 DSP. The A53 core is used to execute the Linux application and launches the SPT, LAX, and BBE32 DSP cores. In this HOWTO, we will show how to load the project into the S32 Design Studio workspace and build. Debugging instructions, using the S32 Debugger and S32 Debug Probe are provided in separate documents for each accelerator. Preparation Setup the software tools Install S32 Design Studio for S32 Platform Install the S32R4xx development package, the Radar extension package for s32R4xx, and the BBE32 DSP Add-On Package for S32R45.   Install the ‘S32R45_RSDK_0.9.4_D2112’ last. It contains the ‘RSDK_S32DS_template’ example project. This package must be downloaded from the NXP website. If the .exe version is used, then the RSDK installer will install an XML file containing the install path of the RSDK into the S32 Design Studio installation directory. A prompt during the installation process will request the user to locate the S32DS installation directory. If the S32DS installation folder doesn’t exist, then it can’t be selected and the file will be missed. So, it is important to install this after installing S32 Design Studio and to use the .exe version. Once installed, S32 Design Studio will be able to locate the project from the New Project from Example wizard. If the .zip version is used, then the XML file must be updated manually and then placed in the S32DS installation folder. For example, with the 0.9.4 version of the RSDK: Locate the XML file in the RSDK installation folder. It is located in the base installation folder: "C:\NXP\S32R45_RSDK__0.9.4\swm.rsdk.s32r45.0.9.4.xml" Edit the following line by inserting the path to the RSDK: <variable name="RSDK_S32R45_0_9_4_DIR" value="${{RSDK_INSTALL_DIR}}" /> change to: <variable name="RSDK_S32R45_0_9_4_DIR" value="C:/NXP/S32R45_RSDK__0.9.4" /> Copy file to S32DS install folder. For example, if S32 Design Studio v3.4 installed: “C:\NXP\S32DS.3.4\S32DS\integration” Procedure Create the Project. Launch S32 Design Studio for S32 Platform and execute the following command: File -> New -> New S32DS Project from Example OR from the Dashboard Enter search text ‘rsdk’. The RSDK_S32DS_template project will be shown. Select it and click Finish. Examine the project Notice there are separate projects for each core. This project structure is due to the separate compilers, linkers, and assemblers required for each core type. When the A53 project is built, it will automatically build the other projects and then include the executable outputs into the A53 executable output. This way the code for all cores is loaded at one time and each core can be launched by the A53 core.
查看全文
When a new application project is created using the New Project Wizard, it is possible to select the debugger to be used. This results in the associated debugger configurations being created within the new project. But what if support for multiple debuggers is required or it is desired to switch to a different debugger? There are easy ways to resolve this. One is as simple as creating a new debug configuration. Another method is by creating new application project, selecting the new debugger to be supported. Then either repurposing the associated debug configuration or duplicating then modifying the debug configuration to support instead the previously existing project. This minimizes the effort by benefiting from the automation of the New Project Wizard.   Detailed below are the steps to add a new debug configuration.  Create A New S32 Debugger Configuration Load the existing project. For this demonstration, the SDK project ‘hello_world_s32v234’ will be used. Select the project so it appears highlighted in blue. Notice that the other project, ‘New_App_Project’, is bold text. This is because the main.c file open in the editor window to the right is the currently selected source file and is from this project. This has no effect on the process detailed in this document. Check that the existing project has been build and the executable is present. If the executable is not present, then an error will be displayed within the Debug Configurations menu and the executable file will need to be selected in a later additional step after it has been created. Open the Debug Configurations menu. Run -> Debug Configurations   Now select the Debugger Group for which you wish to create the new configuration. In this case, we will select ‘S32 Debugger’. Next, click ‘New Launch Configuration’ Now a new Debug Configuration has been created for your project and for the S32 Debugger. Most of the fields are already completed for you. Select the Debugger tab to see the source of the error message. The error message indicates ‘Specify Device and Core’. So click on ‘Select device and core’. Now expand the lists until the Device and Core are visible. Select the correct core for your project. In the demonstration example, the correct Device and Core are ‘S32V234’ and ‘M4’, respectively. Click OK, when done. If you have a debug probe connected, it may have been detected. If not, the Debug Probe Connection section will need to be completed. Now select the ‘Common’ tab to setup the storage location for this new Debug Configuration. Select ‘Shared file’ and then ‘Browse…’ Expand the lists until ‘Project_Settings/Debugger’ is open. Select ‘Debugger’, then click OK. Now the basic debug configuration settings are complete. It is now ready to be used and the Debug button could be clicked to start debug. Otherwise, you may have more customizations to make, such as for Attach Mode. Repurpose S32 Debugger Configuration From A New Project Create new project New -> S32DS Application Project New Project Wizard, processor and toolchain page Enter a project name Select the device and core to match the existing project If necessary, select the toolchain to match the existing project Click Next New Project Wizard, cores and parameters page Select the number of cores to match the existing project Select the debugger, S32 Debugger If necessary, select other parameters to match the existing project Click Finish   Open existing project which does not already have the S32 Debugger debug configurations (for this demonstration, we will use the hello_world_s32v234 example project from the S32 SDK) Copy debug configurations and modify settings to adapt to existing project Run -> Debug Configurations... Debug Configurations window Within the S32 Debugger grouping, select the debug configuration for the new project which corresponds to the build configuration and core of the existing project Change the name of the debug configuration. Change the portion of the name containing the project name to match the name of the existing project. Main tab Project field Click Browse... Select existing project C/C++ Application Click Search Project... Select the Elf file Common tab Save as field Click Browse... Select {existing_project_name}\Project_Settings\Debugger Debugger tab, Debug Probe Connection Setup connection parameters Click Apply Repeat as needed for all core/build config options The existing project now has the S32 Debugger configurations and is ready for debug with the S32 Debug Probe.
查看全文
The S32 Debugger included within the S32 Design Studio for S32 Platform IDE provides the ability to access the flash programming and debugging of the S32 Debug Probe via GDB command line. This document provides only the necessary commands specific to launching a debug session on NXP devices. It does not cover general GDB command line operations, these are covered in detail in the GNU communities and other public websites which are not associated with NXP.   Preparation Setup the software tools Install S32 Design Studio for S32 Platform  Install the Development Package for the device you are debugging. In this case, the S32G2xx development package. This package is important as the S32 Debugger support component contains the device-specific Python scripts required for initialization of the cores. Setup the hardware Confirm the setup of the S32G274A evaluation board.  Configure the JTAG. The S32G274A evaluation board supports both 10- and 20- pin JTAG connections. The default board configuration is set to 20-pin, change the position of the jumper J59 from 2-3(default)  to 1-2, if you are using the 10 Pin JTAG interface. Both are supported by the S32 Debugger and S32 Debug Probe. Connect the power supply cable Setup the S32 Debug Probe Connect the S32 Debug Probe to the evaluation board via JTAG cable. Refer to the S32 Debug Probe User Manual for installation instructions. Use the JTAG connection as was confirmed in the previous step. Connect the S32 Debug Probe to the host PC via USB OR via Ethernet (via LAN or directly connected, and configured for static IP address) and power supply connected to USB port. Launch S32 Design Studio for S32 Platform Create new or open existing project and check that it successfully builds. If creating a new project, be sure the S32 Debugger is selected in the New Project Wizard.     Procedure As separate debug threads need to be started for each core to be debugged, and the method for launching a debug thread differs depending upon whether it is a primary core or secondary core and if the executable image will be loaded or if the executable is already running and the debugger just needs to be attached. These scenarios will be covered by the following 3 sections: Primary Core Load Image and Run: The application image will be loaded directly to memory by the debugger and then initialized and started. The primary core will launch any secondary cores used by the application. Secondary Cores: The primary core has launched a secondary core, it is now running and the debugger will connect through the attach method. Primary Core Image Already In Memory and Running: The primary core has already been initialized and launched by other means, such as via a Linux OS on the target, so the debugger will connect through the attach method without initializing or loading the image to memory.   Please proceed with the section which applies to the core for which you are starting a debug thread.   Primary Core Load Image and Run Prepare the initialization script for the core(s) to be debugged. Open the core initialization Python script: {S32DS Install Path}\S32DS\tools\S32Debugger\Debugger\scripts\s32g2xx\s32g2xx_generic_bareboard_all_cores.py Uncomment the following lines: #_JTAG_SPEED = 16000 #_PROBE_IP = "10.112.101.91" #_GDB_SERVER_PORT = 45000 #_CORE_NAME = 'M7_0' #_RESET_TYPE = "default" #_RESET_DELAY = 1 #_REMOTE_TIMEOUT = 60 #_IS_LOGGING_ENABLED = True This file is used by the S32 Debugger within the S32 Design Studio IDE where the settings are provided from the GUI, so these lines are commented out in order to allow the GUI settings to have control. The commented lines are provided so the script could more easily be run by the command line method. Update the IP address line (_PROBE_IP) to match the IP address of the S32 Debug Probe which is connected to your PC. See the user guide for the S32 Debug Probe for details on how to obtain the IP address.  Update the core name (_CORE_NAME), if necessary. See s32g2xx_context.py for complete list of supported cores. Save the file with a new name to preserve the original. For example, s32g2xx_gen_bb_all_c_my_probe.py. This ensures the S32 Debugger will still function correctly. Launch GTA server. From command prompt or Windows File Explorer run the command: {S32DS Install Path}\S32DS\tools\S32Debugger\Debugger\Server\gta\gta.exe  Should see a window appear like this: Ensure Environment Variable for Python is set. From command prompt, run the command:  set PYTHONPATH={S32DS Install Path}\S32DS\build_tools\msys32\mingw32\lib\python2.7;{S32DS Install Path}\S32DS\build_tools\msys32\mingw32\lib\python2.7\site-packages Start GDB. In a command window, run the command: Windows OS: {S32DS Install Path}\S32DS\tools\gdb-arm\arm32-eabi\bin\arm-none-eabi-gdb-py.exe (for arm32) OR {S32DS Install Path}\S32DS\tools\gdb-arm\arm64-eabi\bin\aarch64-none-elf-gdb-py.exe (for arm64) Linux OS: arm-none-eabi-gdb-py A (gdb) prompt should now be displayed in the command window: From (gdb) prompt, enter the following commands(in this order): source {S32DS Install Path}\\S32DS\\tools\\S32Debugger\\Debugger\\scripts\\s32g2xx\\s32g2xx_gen_bb_all_c_my_probe.py This specifies the script for initialization. py board_init() This initializes the board. It should only be called for the initial core. In a multicore debugging workflow, the debugger launch for additional cores would omit this step. py core_init() This initializes the core specified in the initialization script in step 1. Now standard GDB commands may be used. For example, you may wish to load an ELF file: file {S32DS Workspace Path}\\New_S32G_Project\\New_S32G_Project_M7_0\\Debug_RAM\\New_S32G_Project_M7_0.elf load   Secondary Cores After completing the launch of debug for the primary core, it is possible to perform multicore debug by launching GDB debugging on the secondary cores. Some additional steps will need to be performed from within the primary core GDB session, enter the following commands: set *0x34100000 = 0x34200000  set *0x34100004 = 0x34100025 set *0x34100024 = 0xFFFEF7FF set *0x34200000 = 0x34300000 set *0x34200004 = 0x34200025 set *0x34200024 = 0xFFFEF7FF b main c These lines prepare the environment for launching debugging on secondary cores. This will allow for multicore debugging in the case of separate ELF files for each core. These can be found in the Run Commands field of the Startup tab on the Debug Configuration for the primary core within S32 Design Studio IDE, of any multicore project created from the New Application Project Wizard. Note: If there is just one ELF file for all cores, then these 'set *0x... = 0x...' commands should be skipped. In general, it will be correct to set the break-point at main, as shown, but this might need to be changed depending on when the secondary cores are started within the project. Prepare the initialization script for the secondary core to be debugged. Open the core initialization Python script: {S32DS Install Path}\S32DS\tools\S32Debugger\Debugger\scripts\s32g2xx\s32g2xx_attach.py This is a different script than the one used for the primary core. It is designed to launch a debug session on a core which is already initialized and running. Edit the script for the secondary core to be debugged. Since this script is setup for the primary core, some adjustments need to be made to setup for a secondary core Uncomment the following lines: #_JTAG_SPEED = 14000 #_GDB_SERVER_PORT = "127.0.0.1:45000" #_RESET_TYPE = "default" #_PROBE_IP = "s32dbg:10.222.24.64" #_CORE_NAME = 'M7' #_RESET_DELAY = 1 #_CMD_TIMEOUT = 7200 #_REMOTE_TIMEOUT = 60 #_IS_LOGGING_ENABLED = True #_SOC_NAME = "S32G274A" Make the following changes to the lines: _JTAG_SPEED = 14000 ->  None _GDB_SERVER_PORT = "127.0.0.1:45000" -> 45000 _RESET_TYPE = "default" _PROBE_IP = "s32dbg:10.222.24.64" -> None _CORE_NAME = 'M7' -> 'M7_1' (this should be set to match the name of the core to be debugged, see s32g2xx_context.py for complete list) _RESET_DELAY = 1 _CMD_TIMEOUT = 7200 _REMOTE_TIMEOUT = 60 _IS_LOGGING_ENABLED = True _SOC_NAME = "S32G274A" Save the file with a new name to preserve the original. For example, s32g2xx_attach_my_probe_core1.py. This ensures the S32 Debugger will still function correctly. The existing GTA server is used, so do not launch a new one. Open an new command window and follow similar steps as done for the primary core. Setup the Python environment variable, if not done globally set PYTHONPATH={S32DS Install Path}\S32DS\build_tools\msys32\mingw32\lib\python2.7;{S32DS Install Path}\S32DS\build_tools\msys32\mingw32\lib\python2.7\site-packages Start GDB Windows OS: {S32DS Install Path}\S32DS\tools\gdb-arm\arm32-eabi\bin\arm-none-eabi-gdb-py.exe (for arm32) OR {S32DS Install Path}\S32DS\tools\gdb-arm\arm64-eabi\bin\aarch64-none-elf-gdb-py.exe (for arm64) Linux OS: arm-none-eabi-gdb-py A (gdb) prompt should now be displayed in the command window: From (gdb) prompt, enter the following commands(in this order): source {S32DS Install Path}\\S32DS\\tools\\S32Debugger\\Debugger\\scripts\\s32g2xx\\s32g2xx_attach_my_probe_core1.py This specifies the script for initialization. We will not execute the py board_init() as this was already done for the primary core. py core_init() This initializes the core specified in the initialization script in step 2. Now standard GDB commands may be used. For example, you may wish to load an ELF file: file {S32DS Workspace Path}\\S32G_MultiCore\\S32G_MultiCore_M7_1\\Debug_RAM\\S32G_MultiCore_M7_1.elf load Repeat 3-6 for each additional core. Primary Core Image Already in Memory and Running The core is running and does not need to be initialized. Prepare the initialization script for the core to be debugged. Open the core initialization Python script: {S32DS Install Path}\S32DS\tools\S32Debugger\Debugger\scripts\s32g2xx\s32g2xx_attach.py This is a different script than the one used for the primary core. It is designed to launch a debug session on a core which is already initialized and running. Edit the script for the secondary core to be debugged. Since this script is setup for the primary core, some adjustments need to be made to setup for a secondary core Uncomment the following lines: #_JTAG_SPEED = 14000 #_GDB_SERVER_PORT = "127.0.0.1:45000" #_RESET_TYPE = "default" #_PROBE_IP = "s32dbg:10.222.24.64" #_CORE_NAME = 'M7' #_RESET_DELAY = 1 #_CMD_TIMEOUT = 7200 #_REMOTE_TIMEOUT = 60 #_IS_LOGGING_ENABLED = True #_SOC_NAME = "S32G274A" Make the following changes to the lines: _JTAG_SPEED = 14000 _GDB_SERVER_PORT = "127.0.0.1:45000" -> 45000 _RESET_TYPE = "default" _PROBE_IP = "s32dbg:10.222.24.64" -> (enter the IP address of your probe) _CORE_NAME = 'M7' -> 'M7_0' (this should be set to match the name of the core to be debugged, see s32g2xx_context.py for complete list) _RESET_DELAY = 1 _CMD_TIMEOUT = 7200 _REMOTE_TIMEOUT = 60 _IS_LOGGING_ENABLED = True _SOC_NAME = "S32G274A" Save the file with a new name to preserve the original. For example, s32g2xx_attach_my_probe_core0.py. This ensures the S32 Debugger will still function correctly. Launch GTA server. From command prompt or Windows File Explorer run the command: {S32DS Install Path}\S32DS\tools\S32Debugger\Debugger\Server\gta\gta.exe Should see a window appear like this: Ensure Environment Variable for Python is set. From command prompt, run the command: set PYTHONPATH={S32DS Install Path}\S32DS\build_tools\msys32\mingw32\lib\python2.7;{S32DS Install Path}\S32DS\build_tools\msys32\mingw32\lib\python2.7\site-packages Start GDB. In a command window, run the command: Windows OS: {S32DS Install Path}\S32DS\tools\gdb-arm\arm32-eabi\bin\arm-none-eabi-gdb-py.exe (for arm32) OR {S32DS Install Path}\S32DS\tools\gdb-arm\arm64-eabi\bin\aarch64-none-elf-gdb-py.exe (for arm64) Linux OS: arm-none-eabi-gdb-py A (gdb) prompt should now be displayed in the command window: From (gdb) prompt, enter the following commands(in this order): source {S32DS Install Path}\\S32DS\\tools\\S32Debugger\\Debugger\\scripts\\s32g2xx\\s32g2xx_attach_my_probe_core0.py This specifies the script for debugger initialization. Do not execute the py board_init() as this will initialize the board, and reset the currently executing application, which is not desired for this case. py core_init() This initializes the debugger connection to the core specified in the initialization script in step 1. Now standard GDB commands may be used. For example, you may wish to load an ELF file: file {S32DS Workspace Path}\\S32G_Multicore\\S32G_Multicore_M7_0\ \Debug_RAM\\S32G_Multicore_M7_0.elf load After completing the launch of debug for the primary core, it is possible to perform multicore debug by launching GDB debugging on the secondary cores. See section ‘Secondary Cores’ for each additional core to be debugged.
查看全文