S32 デザインスタジオ・ナレッジベース

キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

S32 Design Studio Knowledge Base

ディスカッション

ソート順:
In embedded systems development, attention to memory utilization is universal. In S32 Design Studio, this information can easily be provided at the end of a successful build by invoking a linker option. Right-click on the project name in the Project Explorer panel and select 'Properties' from the menu. Navigate to the C/C++ Build -> Settings ->Standard S32DS C Linker -> Miscellaneous menu. From the Other options section, click Add. In the 'Enter Value' pop-up menu, enter: -print-memory-usage Click OK, then Apply and Close. Now build the project and see the memory usage information displayed in the Console window.
記事全体を表示
Migrating an SDK project for S32K1xx devices between SDK v4.0.1 and v4.0.2 is not as simple as attach and detaching the SDKs. It is complicated by the fact that SDK v4.0.1 is supported by only S32DS v3.3 and SDK v4.0.2 is supported by only S32DS v3.4. So this means both SDKs will not be present at the same time in one version of S32DS. In addition, the method for attaching the SDKs changed between SDK v4.0.1 and v4.0.2. In v4.0.1, the SDKs were added to the S32DS project via a link. In v4.0.2, the SDK files are added to the S32DS project by copying the actual files into the project. To overcome this, it is necessary to perform some manual operations. The steps required are detailed in this document, along with the necessary steps to adapt the .mex file containing the S32 Configuration Tools settings. Due to differences in projects based on the method of creation, there are 3 scenarios to be covered here which are assumed to be the most common: Project was created by 'New Project from Example' wizard and one of the SDK example projects was selected. Project was created by 'New Application Project' wizard and the SDK was selected for attachment within the wizard. Project was existing one and SDK was attached using the SDK management tool. Due to enough similarities between the projects, the last two will be covered as one scenario, under the heading 'New Application Project'. The first one will be covered under the heading 'New Project from Example'. Prerequisites Install S32 Design Studio IDE 3.4 Install the S32K1xx development package and S32SDK S32K1XX RTM 4.0.2 package Procedure New Project from Example For this demonstration, the S32K1xx SDK v4.0.1 example project 'flexio_i2s_master_s32k144' will be used. Open or create the project within S32DS 3.3 Expand project directory in Project Explorer and look for .mex file If no .mex file is present, then right click on project name and select 'S32 Configuration Tool -> Open Pins' (could select any tool within S32 Configuration Tool). Even though the .mex file contains the settings for S32 Configuration Tools, the same settings are also preserved in YAML code placed into the headers of each of the .c files generated by the S32 Configuration Tools into the 'board' folder in the project. By opening the S32 Configuration Tools, it detects there is no .mex file and scans the generated files for the YAML code. If YAML code is found, then a new .mex file is produced and placed in the project. The perspective is changed to the Pins Tool, nothing more needs to be done, .mex file has been created from the YAML code. If no YAML code had been found, then the user would be presented with a menu to select target device and SDK. Switch back to C/C++ perspective to confirm. Open S32DS 3.4 and import the project. It is important to note that separate workspaces should be used for S32DS 3.3 and S32DS 3.4. The project should be imported into the S32DS 3.4 workspace so the checkbox 'Copy projects into workspace' should be ticked. Right-click on Project -> Properties -> C/C++ Build -> Settings -> Standard S32DS C Compiler -> Includes, then delete all paths which contain 'S32_SDK_PATH' Repeat for Standard S32DS Assembler -> General Apply and Close The files in the SDK folder were included in the project as links and not actual files, and since the SDK 4.0.1 is not installed to S32DS 3.4, the links point to non-existing files. This means the Attach function in the SDK manager will not be able to replace them with the corresponding files from SDK 4.0.2 because it doesn't know how to replace files which don't exist. From Project Explorer, delete folder ' SDK' from the project. Now the project is ready to use the SDK manager to detach the old SDK and attach the new SDK. In Project Explorer, right-click on Project -> SDKs. When the SDK manager launches, it scans the project for any attached SDKs. In the case of this example, an SDK is detected as attached, but since it does not match any installed SDKs, a message appears asking to detach SDK 4.0.1. Since this is a desired action, click OK. With SDK 4.0.1 already detached, select SDK 4.0.2, click 'Attach/Detach...' Click 'Select All' to attach the SDK to all build configurations. This sets up the include paths, and linker paths for the SDK for each build configuration. If desired, the build configurations could be selected individually. Click OK to complete the selections. To apply the changes and exit the SDK manager, click 'Apply and Close'. The SDK Manager detects that some of the files from the new SDK are replacing existing files in the project. By default, all conflicting files are set to replace the existing file. If desired, individual files can be deselected. Please note, with the checkbox for 'Backup project files' ticked, any files replaced will be preserved in a backup folder for future recovery, comparison, etc. In general, it may be wise to allow the file to be replaced and later merge with the customizations in the backup folder. For this example, no modifications were made, so default settings are kept. Click OK to complete the process. The new SDK is attached and the new SDK folder can be identified. The .mex file contains the settings for the S32 Configuration Tools, however, it is still set for the SDK 4.0.1. It must be manually updated so the S32 Configuration Tools can be used to generate the new code for the 'board' folder. Right-click on .mex file and select 'Open With -> Text Editor'. All that is required is to modify the mcu_data section containing the SDK name: 's32sdk_s32k1xx_rtm_401' -> 's32sdk_s32k1xx_rtm_402' Now save the change. Next, the files in the 'board' folder must be regenerated from the S32 Configuration Tools to reflect the new SDK. Right-click on the .mex file and select 'Open With -> S32 Configuration Tools'. A warning message appears indicating that it has detected the mex file was created in an older version of the tool and that once the mex file is saved in the current tool, it may no longer open in an older version of the tool. This is expected. Click OK. Notice the error symbol. Mouse-over to see the details. It is an error with Peripherals tool. Select Peripherals tool. The issue is with edma_config_1, because it is highlighted red. Click on it to see the interface. The interface changed from the previous version to allow for multiple configurations where previously it supported only one. To resolve the error a new configuration must be added to the list. Click on the '+' as shown to add the new configuration. This particular error will only appear for projects which include the EDMA module. The Problem Indicator is now green, this means there are no warnings or errors. It is now time to generate the code, click 'Update Code' A menu appears identifying new and/or updated files. If desired, selecting 'change' on a row will open a comparison tool showing the changes between the existing and the new versions of the associated file. Click OK to proceed. Switch to C/C++ perspective Errors on project are now gone. If the project successfully built before the conversion, then build again to confirm everything was converted properly.   New Application Project For this demonstration, a new project will be created in S32DS 3.3 using the New Application Project wizard and the S32K1xx SDK 4.0.1 will be selected during project creation. Import the project into S32DS 3.4 Use the SDK Manager to detach the old SDK and then attach the new SDK. In Project Explorer, right-click on Project -> SDKs. When the SDK manager launches, it scans the project for any attached SDKs. In the case of this example, an SDK is detected as attached, but since it does not match any installed SDKs, a message appears asking to detach SDK 4.0.1. Since this is a desired action, click OK With SDK 4.0.1 already detached, select SDK 4.0.2, click 'Attach/Detach...' Click 'Select All' to attach the SDK to all build configurations. This sets up the include paths, and linker paths for the SDK for each build configuration. If desired, the build configurations could be selected individually. Click OK to complete the selections. To apply the changes and exit the SDK manager, click 'Apply and Close'. The SDK Manager detects that some of the files from the new SDK are replacing existing files in the project. By default, all conflicting files are set to replace the existing file. If desired, individual files can be deselected. Please note, with the checkbox for 'Backup project files' ticked, any files replaced will be preserved in a backup folder for future recovery, comparison, etc. In general, it may be wise to allow the file to be replaced and later merge with the customizations in the backup folder. For this example, no modifications were made, so default settings are kept. Click OK to complete the process. The .mex file contains the settings for the S32 Configuration Tools, however, it is still set for the SDK 4.0.1. It must be manually updated so the S32 Configuration Tools can be used to generate the new code for the 'board' folder. Right-click on .mex file and select 'Open With -> Text Editor'. All that is required is to modify the mcu_data section containing the SDK name: 's32sdk_s32k1xx_rtm_401' -> 's32sdk_s32k1xx_rtm_402' Now save the change. Next, the files in the 'board' folder must be regenerated from the S32 Configuration Tools to reflect the new SDK. Right-click on the .mex file and select 'Open With -> S32 Configuration Tools'. A warning message appears indicating that it has detected the mex file was created in an older version of the tool and that once the mex file is saved in the current tool, it may no longer open in an older version of the tool. This is expected. Click OK. Check for any errors or warnings by looking for the yield sign. It will change color based on the conditions: Green = No Problems, Yellow = Warnings, Red = Errors. Mouse-over the icon for more information on the location of the error. Aside from resolving warnings and errors, there should be no changes required as the settings have been preserved from the original project. In this example, there are no warnings or errors, so it is possible to proceed with updating the generated files. Click 'Update Code' A menu appears identifying new and/or updated files. If desired, selecting 'change' on a row will open a comparison tool showing the changes between the existing and the new versions of the associated file. Click OK to proceed. Change back to C/C++ perspective. Errors on project are now gone. If the project successfully built before the conversion, then build again to confirm everything was converted properly.
記事全体を表示
**************************************************************************************** IDE: S32 Design Studio Version 3.4 Workspace: C:\Projects\S32DS_3_4 Project name: S32K314_00_blank_00 Project location: C:\Projects\S32DS_3_4\S32K314_00_blank_00 **************************************************************************************** 1. After you finish the edit on your codes, please close S32DS 2. Input the command(as below) at your clean_and_build_s32k3_commandLine.bat 3. Run command prompt with Administrator right. 4. Run clean_and_build_s32k3_commandLine.bat at command prompt   You will get the *.elf under the folder of C:\Projects\S32DS_3_4\S32K314_00_blank_00\Debug_FLASH Cheers! Oliver
記事全体を表示
**************************************************************************************** IDE: S32 Design Studio for ARM Version 2.2 Workspace: C:\Projects\S32DS_ARM_22 Project name: S32K142_08_CommandLine Project location: C:\Projects\S32DS_ARM_22\S32K142_08_CommandLine **************************************************************************************** 1. After you finish the edit on your codes, please close S32DS 2. Input the command(as below) at your command_line.bat  3. Run command prompt with Administrator right. 4. Run command_line.bat at command prompt   You will get the *.elf under the folder of C:\Projects\S32DS_ARM_22\S32K142_08_CommandLine\Debug_FLASH   Cheers! Oliver
記事全体を表示
This document details the steps to program external EEPROM with the 32 reset configuration bits in support of the 'Boot from serial RCON' method detailed in the S32G Reference Manual. The Python scripts used for this task are designed and tested to work on the S32G-VNP-EVB with S32G2xx Rev2 and the Atmel AT24C01C it contains.(Serial EEPROM is not implemented on NXP VNP-RDB board)   The RCON can be set by the following: Fuses (internal to the device) Parallel (GPIO pins/DIP Switches on EVB) Serial (EEPROM connected via I2C) The Serial option can be programmed using a debug probe connected via JTAG. This enables the RCON to be controlled remotely, assuming the debug probe is setup to allow remote connections.    Preparation Install   S32 Design Studio IDE  Install the Development Package for the device you are debugging. This is important as the S32 Debugger provides access to the EEPROM programming capabilities via I2C of the S32 Debug Probe.  Connect the S32 Debug Probe to the S32G-VNP-EVB and the host PC containing S32 Design Studio installation. Set BOOTMOD pins to boot from RCON Set BOOT_CFG[8]=1 on the S32G-VNP-EVB, for serial RCON mode VNP-EVB shown here with switch BOOT_CFG[8] = 0 See the EVB documentation and device reference manual for more details. Procedure   Open cmd window to the S32 Debugger folder where the device-specific scripts are located. C:\NXP\S32DS.3.4\S32DS\tools\S32Debugger\Debugger\scripts\s32g2xx Set Python path so correct version is used (if not already set in env vars) set PYTHONPATH=C:\NXP\S32DS.3.4\S32DS\build_tools\msys32\mingw32\lib\python2.7;C:\NXP\S32DS.3.4\S32DS\build_tools\msys32\mingw32\lib\python2.7\site-packages Edit the python script to adjust the value to be programmed to RCON, s32g2xx_i2c_RCON.py . Note: The listed examples show only the minimum values required to configure each of the external memory types. Additional settings may be required for your specific application. Adjust the RCON_DATA for the configuration you wish to program.  Do not adjust RCON_ADDR. Adjust the S32DBG_IP for the IP address of your S32 Debug Probe.  Adjust the INTERACTIVE_MODE  Set True, if desired to be prompted to enter RCON_DATA Set False, if desired to have script automatically enter RCON_DATA, based on the value set within the file. Adjust _SOC_NAME as appropriate for the specific S32G2xx device you are using. The valid options are defined in s32g2xx_context.py. Enter the command to start GDB, passing in the RCON Python script: Windows OS: C:\NXP\S32DS.3.4\S32DS\build_tools\gcc_b1620\gcc-6.3-arm32-eabi\bin\arm-none-eabi-gdb-py.exe -x s32g2xx_i2c_RCON.py OR C:\NXP\S32DS.3.4\S32DS\build_tools\gcc_v9.2\gcc-9.2-arm32-eabi\bin\arm-none-eabi-gdb-py.exe -x s32g2xx_i2c_RCON.py Linux OS:  arm-none-eabi-gdb-py -x .\s32g274a_i2c_RCON.py If everything worked properly, then the value you programmed will be displayed to the screen. To exit GDB, enter 'quit'.
記事全体を表示
Introduction In this document, we will discuss the S32DS Extensions & Updates tool and how to use it to install the device support you need. S32 Design Studio for S32 Platform has been designed to allow users to customize their installation, enabling them to integrate support for just the NXP devices they need and just the tools they need. With the new modular design, parts of the tool have been moved into one of 4 different package types. The Platform and Tools Packages are default packages which are included as part of the base install, cannot be uninstalled, however, they can be updated. The Platform package contains the base components of the IDE, modular installer, general documentation and integration mechanisms. The Tools Package contains the compilers, debuggers, and MSYS2. The Development Package contains hardware specific support such as New Project Wizard, S32 Configuration Tools, SDKs and Libraries. The Extension Package contains Accelerator Compiler, Debugger, Graph Tool and advanced SDKs. Downloading the various components from our cloud-based update server, allows you to assemble and complete the customized installation of the tools and software to meet your development needs. It is also via the update server that the updates and bug fixes will be provided. And of course, all of these will be available as downloads from our product page for users who are installing to an offline PC. S32DS Extensions and Updates Menu When you first launch the S32 Design Studio for S32 Platform, you are presented with the S32DS Extensions and Updates menu. This menu provides a listing of the add-on packages which have been installed, those that are available to be installed, and those which have updates available to be installed. In the panel to the right is displayed detailed information specific to the package which is selected in the panel to the left. If there is an update available for the selected package, the currently installed version number will be shown on the left and the update version number will be shown on the right. Online Package Installation Setup If your PC is connected to the internet, then it will link to NXP's update server (http://www.nxp.com/lgfiles/updates/Eclipse/S32DS_3.2) and any new or updated packages will be automatically added to the list. See Package Installation section below for installation procedure and details. Offline Package Installation Setup If your PC is not connected to the internet, you must first download the desired packages from the NXP website, in the form of an archive file, to a separate PC and have them transferred to your target PC. Then you would select the link 'Go to Preferences' and add each downloaded archive file as a separate software site. After selecting OK, you will see the new packages contained within the archive files listed. Procedure: Go to  S32 Design Studio for S32 Platform download page and select   Download for the package or update you need. Sign in to your account. Select the package name Select 'I Agree' to accept the Software Terms and Conditions Select the filename of the package to begin the download. You will be asked to select a location to save the downloaded file. Once the file is downloaded, it must be installed within S32 Design Studio. Launch S32DS and wait for the S32DS Extensions and Updates window to appear. Then select the 'Go to Preferences' link. The Preferences window appears. Select the 'Add...' button to add a new software site to the list. The file you downloaded will be a software site. Now the Add Site window appears. Since the downloaded file is an archive of type ZIP, the 'Archive...' button should be used to select it. Navigate to the location where the file was saved. Select the downloaded file and then Open. Enter a name for the site you are adding, this will make it easier to recognize later. Suggest using the name of the package as listed on the Product Page, Downloads section. Then select OK. Now the downloaded file has been added as a new site. Select OK to return to the main S32DS Extensions and Updates window. Now the new package(s) will appear in the S32DS Extensions and Updates window, just as it would from the update server.  See  Package Installation   section below for installation procedure and details.   Package Installation To install the new packages or updates, check the box to the left of the desired package in the left panel and select 'Install/Update'. The tool will automatically detect any dependencies on other packages and select them to meet all requirements for the installation. Follow the prompts and the packages will be installed, followed by a request to restart S32 Design Studio. Dependencies and Errors If there are dependencies between two or more updates, the tool will detect this and inform you of the package which cannot yet be installed. If you try to install a package which is not compatible with the version of S32 Design Studio you have installed, a notice will appear, and the package will not be listed in the S32DS Extensions and Updates menu. Example Dependency Message Example Notice Message - Unsupported Package Uninstalling Unwanted Packages If you no longer need a particular package or installed one by mistake, just check the box next to the package and select 'Uninstall'.   Reinstalling Packages If you believe your installed package has become corrupted, if you accidentally deleted part of it (such as an example project, etc.), or if for any reason you need to restore the package, just check the box next to the package and select 'Reinstall'.   Additional Information If you wish to not see the S32DS Extensions and Updates menu at startup, you can uncheck the box at the lower left. For internet connected PCs, the update server will still be linked and checked for new packages at S32DS startup, but you will no longer see the S32DS Extensions and Updates menu. However, you will still see a notice at the lower right of the tool at startup when new packages are detected. Example of Available Update Notification
記事全体を表示
S32 Design Studio is free-of-charge software that just requires to be activated. The activation process is incorporated into the S32DS installer. Before you proceed to the installation you always need to get an activation code. The activation code is typically sent automatically to your email registered on nxp.com account when you proceed to downloading of S32DS installer. The example of notification email is below:     There are two types of activation you can choose from - online and offline. If your machine is connected to the Internet then in most cases you just select online activation and S32DS gets activated automatically without any additional steps required.   Anyway if the computer that you are installing S32 Design Studio into has no internet access or there are some firewall/antivirus/infrastructure restrictions that voids the online activation you can select offline activation type instead. This document describes the offline activation process step-by-step:   Step 1. S32 Design studio for Arm/Power/Vision installer pops up the "S32DS Activation" dialog  where you first enter your activation ID and select activation type as offline Step 2. The Offline process will require to save an activation request file -"request.xml". Please save this file into a local folder or an USB drive. Step 3. Software will then require an activation response. To get this file move to a station with the Internet connection. We will get back here once we have activation response file ready. Step 4. Look for the Internet connection and take the "request.xml" file with you. Go to https://www.nxp.com/security/login  click on Apps and Services >  "Software Licensing and Support > Click on View Accounts Step 5. In product information page look for the "Offline Activation" option on the left menu. Step 6. C lick on "Choose File" and  select the "request.xml" file generated in Step 2.  Press "Process" button to get the "activation.xml" file. This file will be downloaded.   Step 7. Save "activation.xml" file and take it to the original offline station, go back to the Activation response dialog described by Step 3. Step 8.  Load file and installation will be finished. S32 design studio will be activated with your activation ID.
記事全体を表示
This instruction details the steps to create an image vector table, then subsequently generate a blob image which can be written to external flash on the S32G274A EVB. For this, the 'hello_world_s32g274a' example project from the S32G274 SDK installed to S32 Design Studio IDE. This instruction shows the process for QSPI, however, SD, MMC, and eMMC are also supported. The Image Vector Table (IVT) image is a set of pointers to other images which are required by the BootROM. It typically contains the following images, though not all are required to create a valid IVT image: DCD Self-Test DCD HSE Application Bootloader The IVT Tool enables configuration and generation of the IVT image as specified in the BootROM reference manual. Prerequisites Before using the IVT Tool, it will be useful to have already generated the binary image from your application project, it will be an input to the IVT. For application bootloader image, follow the steps in HOWTO: Generate S-Record/Intel HEX/Binary file, selecting 'Raw binary' option. For DCD image, follow the steps in   HOWTO: Use DCD Tool To Create A Device Configuration Data Image  . Procedure With desired project open in project explorer (C/C++ perspective), switch to IVT perspective. C lick on 'Open IVT' . In the Boot Configuration section, check that the correct Boot Target is selected. For the demonstration here, M7_0 is the correct selection. Check the 'Interface selection' section. If your intended boot device is SD, MMC or eMMC, then change the setting from QuadSPI Serial Flash. If your intended boot device is QuadSPI AND you do not have a QuadSPI parameter file to specify, then uncheck the box for 'Configure QuadSPI parameters'. QuadSPI parameters change some flash registers' settings away from the default setting and are generally required for larger memory sizes (for ex. applications over 1 MB in size, for some supported devices).  From the Image Table section, depending on your configuration, turn off all unused images. For the demonstration here, the following will be changed to Reserved: Self-Test DCD, Self-Test DCD (backup), DCD (backup), Application bootloader (backup). The following images will remain enabled: DCD, Application bootloader. In DCD section of the Image Table, click 'Browse File' and select the DCD binary file. Some of the fields may become red shaded after the file is loaded. This is OK as it is showing the memory layout is no longer aligned. This will be resolved in a later step. In Application bootloader section of the Image Table, click 'Browse File' icon and select the image as noted in the Prerequisites section. When the application boot image is loaded, the tool processes the file to check if it contains the header for the application bootloader image. If the header is not found, it means that the file is only the raw code (the bin generated by S32 Design Studio) and it will be necessary to provide the values for RAM start & entry addresses (code length is automatically calculated), as noted with the expanded view and red shading. To set the RAM start pointer and entry pointer addresses, from to the C/C++ perspective: Open the linker file and locate the RAM start address and enter it in both the RAM start pointer AND RAM entry pointer fields in the IVT Tool. Use copy and paste to add the values to the Application Boot Image settings. The length must be adjusted since it is not 8 byte aligned. Since 14020 / 8  = 1752.5, we will round up to 1753. Then, 1753 * 8 = 14024, so we will enter 14024. Since the application binary file which was loaded is just a raw binary file, it is necessary to generate the full application bootloader image. The Export Image function takes the values entered for the RAM start & entry pointers and Code length, then generates the Application bootloader header. This header is added to the raw binary file producing a new image, the full application bootloader image file. Within the Application bootloader section, click 'Export Image' and enter a meaningful name for the image file. In addition to being a necessary source component of the IVT image, this file can more easily be shared or re-used to as an input to other IVT images. After the file has been generated, you will notice that the address settings section has collapsed to represent that this information is now included in the application bootloader image which will be used to generate the Blob image file. Click 'Export Blob Image' to generate the blob image file. This is what will be flashed to the target. Now that the Blob Image is generated, the 'Flash Image' button could be used to program the image to the target over serial connection, use the S32 Flash Tool, or over the JTAG connection using the Flash Programmer within the S32 Debugger (QSPI only).
記事全体を表示
Quick Fix is a feature of the Java editor in Eclipse which enables a user to resolve problems found in the Java code of their project. This feature is available to be used within S32 Design Studio for some problems. Such problems will be identified with the 'light bulb' icon in the description field, as shown below: For example, such problems sometimes occur when importing a project created in a previous version of S32 Design Studio, are provided from another user, or some files in a project have become corrupted. To resolve issues identified with the 'light bulb' icon, right-click on the problem and from the pop-up menu, select 'Quick Fix'.  The Quick Fix menu will appear, providing the available solutions for the problem. In most cases, there will be just one solution. Click finish to implement the fix. In some cases, more information will be required from the user to complete the fix. Complete the form to provide the additional information, then click OK. Now the problem should be resolved.
記事全体を表示
        Product Release Announcement Automotive Microcontrollers and Processors S32 Design Studio for Power Architecture v2.1         The Automotive Microcontrollers and Processors’ Embedded Tools Team at NXP Semiconductors, is pleased to announce the release of the  S32 Design Studio for Power Architecture version  v2. 1. It is the successor of S32 Design Studio for Power 2017.R1. - the versioning scheme has changed. Release content   ( What is new? ) Eclipse Neon 4.6 Framework GNU Build Tools for e200 processors bld=1607 rev=gceb1328 (support VLE and BookE ISA, based on gcc 4.9.4 [1.February 2019], binutils 2.28 and gdb 7.8.2) - see the complete GCC release notes Libraries included: newlib, newlib-nano and Freescale EWL2 P&E Multilink/Cyclone/OpenSDA (with P&E GDB Server) -   updated (v1.7.2.201709281658) New Project wizards to create application and library projects and projects from project examples for supported devices Peripherals Register and Special Purpose Registers View Fully integrated S32 SDK RTM v.3.0.0 (Windows only) . For the details on the feature set  of SDK please refer to SDK Release notes attached and Reference Manuals ( Please note that SDK has Early Access Release status, which means that there could be some limitations and/or issues. Also note, the SDK is available for Windows host only). SDK management included: o   FreeMASTER  Serial Communication driver (v2.0 August 31th 2016) o Automotive Math and Motor Control Libraries(v1.1.15) o Support for importing MCAL configuration to a custom SDK o An SDK can be attached to a library project using the project wizard Windriver Diab, and GreenHills compiler support by new project wizard (The Green Hills Software (GHS) compiler support depends on the availability of the Eclipse plug-in integrating GHS compiler compatible with the Eclipse Neon. Full support for the Green Hills Software compiler Eclipse Neon-compatible plug-in within S32DS for PA 2.1 was not validated in time for this release.) Lauterbach, iSystem, and PLS debuggers support by new project wizard (The plugins to support Diab, iSystem, Lauterbach, and GreenHills are not included and have to be installed from the corresponding update site or installation.) Kernel Aware debugging for FreeRTOS, eCOS, OSEK Devices supported: S32R274 S32R372 MPC5775B, MPC5775E MPC5775K, MPC5774K MPC5746R, MPC5745R, MPC5743R MPC5777M MPC5777C MPC5748G, MPC5747G, MPC5746G MPC5744B, MPC5745B , MPC5746B , MPC5744C , MPC5745C, MPC5746C MPC5744P, MPC5743P, MPC5742P, MPC5741P MPC5601P, MPC5602P, MPC5603P, MPC5604P MPC5644B, MPC5644C, MPC5645B, MPC5645C, MPC5646B, MPC5646C MPC5601D, MPC5602B, MPC5602C, MPC5602D, MPC5603B, MPC5603C, MPC5604B, MPC5604C, MPC5605B, MPC5606B, MPC5607B MPC5606S MPC5604E MPC5644A, MPC5642A MPC5643L MPC5676R MPC5632M, MPC5633M, MPC5634M MPC5674F MPC5673K, MPC5674K, MPC5675K Collateral Getting Started page The S32DS Extensions and Updates tool Migration guide to help migrate projects from an earlier version to S32 Design Studio for Power Architecture 2. Bug Fixes For detailed list of the GNU Tools bug fixes, refer to the release notes located in S32DS/ build_tools/powerpc-eabivle-4_9/ Fixed the semihosting issues with the EWL and NewLib libraries Fixed the FLASH programming algorithm for MPC5744P Added missing linker script sections for MPC5748G Fixed reading values from the peripheral bridge A registers for MPC5634M Fixed access to the RAM memory for MPC5634M Removed unavailable addresses from the MPC574xB linker files Added the -fstrict-volatile-bitfield compiler option to the project settings Fixed secure connection to MPC5744P Disabled RTTI for EWL library due to incompatibility with the GNU tools Fixed importing/exporting projectinfo.xml with library settings Complete S32 Design Studio for Power Architecture v2.1 release notes are available   here Installation Notes To download the installer please visit the S32DS for Power Architecture product page:  downloads section. The installer requires the the NEW Activation ID to be entered during the installation. You should receive an email that includes your Activation ID after starting the installer downloading process: Technical Support S32 Design Studio issues are tracked through the S32DS Public NXP Community space: https://community.nxp.com/community/s32/s32ds    
記事全体を表示
Application based on FreeRTOS S32DS example performs prinf/scanf functionality in FreeRTOS. Application runs in two modes - standard run-time mode with two tasks maintained by scheduler and command mode implementing basic memory monitor. Application was tested with putty terminal ( http://www.putty.org/ ). Putty serial terminal settings: 115200 8N1, no HW control. USAGE: In run-time mode is green LED blinking and on terminal are shown task counter values. To enter into COMMAND MODE - press button (next to LED diode). LED light switches to red and you can enter commands. Available commands: =================== F show free heap memory A set memory address V print value on address M set address to main() P previous mem page N next mem page ? help X Exit from command mode Putty configuration: Terminal output:
記事全体を表示
        Product Release Announcement Automotive Microcontrollers and Processors S32 Design Studio  2018.R1         Austin, Texas, USA December 28, 2018   The Automotive Microcontrollers and Processors’ Embedded Tools Team at NXP Semiconductors, is pleased to announce the release of the   S32 Design Studio 2018.R1 for S32 Automotive Platform|NXP.  Major features  • NXP GCC toolchains for ARM32 and aarch64 bareboard and Linux targets  (GCC version 6.3.1 20170509, build 1574 revision g924fb68) • S32 Debug Probe support provided with S32 Debugger (support for S32V23x, RAM + FLASH) and S32 Trace tool for S32V23x • S32 Trace tool is integrated to provide software analysis features (profiling, code coverage, and other) • PEMicro® hardware debugger support provided with P&E Debugger • Lauterbach Trace32® support • S32 Flash Tool is delivered to support Flash/SD/MMC memory programming for S32V234 • S32 SDK for S32V23x 0.8.1 EAR is integrated • S32DS Extensions and Updates tool for automatic lookup and on-demand installation of software packages adding support for the NXP Arm® based processor families • S32 Configuration Tool framework (EAR6) with the Pin, Clock, Peripheral configuration tools Complete S32 Design Studio 2018.R1 release notes are available here.   Installation To download the installer please visit the S32 Design Studio product page download section or click the direct here.     The installer requires the Activation ID to be entered. You should receive a notification email including the Activation ID after the download of the installation package starts. The installer installs just the base tools/package. In order to start development it is necessary to install at least one Development package. Currently the only application package available is Vision S32V2xx  (Other packages are coming soon). The application packages are managed by S32DS Extensions and Updates. Technical Support S32 Design Studio issues are tracked through the S32DS Public NXP Community space. https://community.nxp.com/community/s32/s32ds  
記事全体を表示
  The S32 Debugger included within the S32 Design Studio for S32 Platform IDE provides the capability to access the flash programming capabilities of the S32 Debug Probe via the S32 Debugger. Note: currently only QSPI flashing is supported. Preparation Install S32 Design Studio IDE  Install the Development Package for the device you are debugging. In this case, the S32G2xx development package. This package is important as the S32 Debugger support component contains the device-specific Python scripts required for performing the flash programming operations. Open the application project containing the application to be programmed to the flash memory device. Follow the steps in HOWTO: Generate S-Record/Intel HEX/Binary file , selecting the 'Raw Binary' option. Build the project, generating the binary executable. This will be our application binary input to the IVT Tool. The IVT Tool must be used to generate the BLOB image which can be programmed to flash memory device and loaded to the RAM by the BootROM. Follow the steps in HOWTO: Use IVT Tool To Create A BLOB Image S32G274A. The resulting BLOB image file is what can be flashed to the device.   Procedure Open Debug Configuration menu Select 'S32 Debugger Flash Programmer', then right-click and select New. Enter an name for the new configuration and click Add... to add the file to be flashed. Click Browse... to select the project from the workspace where the application binary is located Select the project and click OK By default, the ELF file is found. Click Search in project to select the binary file. Select the .bin file and click OK Now we must enter the base address. Typically, this could be 0, but you may have other requirements. Click OK. Just the memory required by the new image needs to be cleared, so only check the box 'Erase all flash memory' if truly needed. Now we are ready to configure the debugger connection settings. Click on the Debugger tab. Starting from the top and working our way down, click on Select device. Select the device and click OK The correct Initialization script will automatically be set. Set the Debug Probe Connection settings to match your setup. When done, click Apply To start the flashing, click Debug When complete, the Debug perspective will show at terminated thread. Happy flashing with GDB!   Note, to debug this application since it will be subsequently started by the BootROM: use 's32gxx_attach.py' in the Initialization script field on the debugger tab of the Debug Configurations menu Make the following adjustments on the Startup tab within the Debug Configurations menu: Uncheck "Load image"  Check "Set program counter at:" and enter the value "Reset_Handler"  
記事全体を表示
        Product Release Announcement Automotive Microcontrollers and Processors S32 Design Studio for ARM 2018.R1         February 6, 2017 NXP Semiconductors is pleased to announce the release of the S32 Design Studio for ARM 2018.R1 for Automotive and Ultra-Reliable MCUs. The S32 Design Studio is based on the Eclipse open development platform and integrates the Eclipse IDE, GNU Compiler Collection (GCC), GNU Debugger (GDB), and other open-source software to offer designers a straightforward development tool with no code-size limitations. Red highlighted items below are new/updated features in comparison to previous releases/updates. Release content   ( What is new? ) Eclipse Neon 4.6 Framework GNU Tools for ARM® Embedded Processors (Launchpad) build (4.9.3 20150529) ARM64: Linaro GCC 4.9-2015.05 GNU Tools for ARM® Embedded Processors build (6.3.1 20170824) - supported by New Project Wizard for S32K1xx device. See the complete GNU ARM 6.3.1 release notes attached below. GCC Source code package is available here. Libraries included: newlib, newlib-nano and ewl2 (ewl and ewlnano). GDB 7.12.1 with Python P&E Multilink/Cyclone/OpenSDA (with P&E GDB Server) - updated (v3.3.5.201801101746) SEGGER J-Link (with SEGGER GDB Server) - updated (V6.22e_B180108) New Project wizard to create application and library projects for supported devices Fully integrated S32 SDK for S32K14x EAR release v.0.8.6. For the details on the feature set of SDK please refer to SDK Release notes and Reference Manuals. S32 SDK Release notes attached. Please note that S32K SDK has Early Access Release status, that means that there could be some limitations and issues. The S32K SDK is available for Windows host only. There is limitation on the supported GreenHills compiler version – the SDK released with GreenHills v2014.4, but due to GreenHills plugin limitation support for GreenHills compiler v2017.1 integrated, so new project wizard would not provide possibility to create SDK project with GreenHills compiler. SDK management included Sample Drivers  for KEA family (Evaluation grade) FreeMASTER Serial Communication driver for KEA and S32K families Automotive Math and Motor Control Libraries for KEA,S32K and S32V234 devices supporting the ARM Cortex-M4 core v1.1.11 (the particular version availability for a device could be limited by supported compiler versions) Import projects from CodeWarrior for MCU v.10.6 and Kinetis Design Studio for respective supported processors IAR v7.x and v8.11.2 compiler support by new project wizard GreenHills v2017.1.4 compiler support by new project wizard iSystem, Lauterbach and IAR debuggers support by new project wizard. Kernel Aware debugging for FreeRTOS, OSEK. MQX 4.2 for MAC57D54H with possibility to create project from example Devices supported SKEAZN8, SKEAZN16, SKEAZN32, SKEAZN64, SKEAZ128, SKEAZ64 S32K144 v2.0, S32K142, S32K146, S32K148 S32V234 MAC57D54 Getting started page to allow the centralized access to documentation and additional materials Bug Fixes Updated header and register description files to fix issues and synchronize with latest Ref Manual versions [S32DS-4629] Clean rule doesn't work after particular user actions in "C/C++ Build -> Behavior" [S32DS-301] After some debugging work (using BP, Stepping, Resume...) Disassembly view content disappears. [S32DS-1093] Debugging session hangs when "c" step over is done on a loop statement that has its entire block in a single line. [S32DS-273] Can not suspend after set condition of breakpoint = 0 and resume [S32DS-61] Breakpoint properties disappeared after right-click into breakpoint [S32DS-6072] Unable to export S32K144 SDK project into ProjectInfo.xml The complete S32 Design Studio for ARM 2018.R1 release notes are attached below. Installation Notes Please visit the S32DS for ARM product page - download section to download the installer. The installer requires the NEW Activation ID to be entered during the installation. You should receive an email that includes your Activation ID after starting the download. Technical Support S32 Design Studio issues are tracked through the S32DS Public NXP Community space: https://community.nxp.com/community/s32/s32ds    
記事全体を表示
Suppose you created an application project for one MCU (S32K144, for example), but your requirements changed, or perhaps you are reusing a previous project to start a new project on a different MCU (derivative from same family). If you are working with the S32 SDK, there is a way to do it. We have detailed the steps in this document. 1) Open the project to be modified and select the C/C++ perspective, ensure that the Processor Expert views are shown 2) From the Components Library, Processors tab, select the new MCU derivative 3) Either double-click OR right-click and select 'Add to project', to add the new processor to your components list for your project. Be sure to select just one of the pin packages, whichever is appropriate for you application. 4) From the Component Inspector*, you will see a message in red text asking if you would like to switch into the configuration for the new processor. Click on the button 'Switch Configuration'. *may have to select pin_mux:PinSettings in the Components view for the project to see the message 5) Open the Project Properties, either select from File menu or right-click on project name and select from the menu. Then go to C/C++ Build -> Settings -> Standard S32DS C Compiler -> Includes and delete all include paths starting with $(S32K1**_SDK_VER_PATH). Repeat this step for the Standard S32DS Assembler -> General include paths. Note: For all changes in C/C++ Build -> Settings, make sure to repeat for all build configurations (RAM, FLASH, Debug, Release, etc.). 6) The paths to the SDK should now be gone. The result should look similar to this: 7) In Standard S32DS C Compiler -> Preprocessor settings, change the defined symbol to the one which is appropriate for the new MCU and click OK. (e.g. CPU_S32K142 for S32K142, CPU_S32K148 for S32K148, etc.) If you are not sure what should be here, then create a new empty project for the new MCU and refer to the settings there. 😎 The Preprocessor setting after the change 9) Click on the 'Generate Processor Expert Code' button in the Components view for your project 10) From Project Explorer, remove the startup and linker files from Project Settings folder 11) Copy startup and linker files for the new MCU from <SDK_PATH>/platform/devices/<CPU>/startup/<Compiler> and <SDK_PATH>/platform/devices/<CPU>/linker/<Compiler> 12) Open the Project Properties, then C/C++ Build -> Settings -> Standard S32DS C Linker -> General and update the linker file path to reflect the new filename and click OK. (in this case: S32K144_64_flash.id to S32K142_32_flash.id) 13) After the change 14) Perform a Clean and a Build operations of the project. 15) Update the device in the debug configurations Now you can change your MCU derivatives!
記事全体を表示
The document describes the steps that need to be done in order to place and execute a library function from a custom memory section - typically RAM using GNU Build tools. The instructions are applicable to any GNU tool-chain. It is demonstrated on a New S32DS Project created in S32 Design Studio for ARM. Lets assume that we'd like to execute memcpy() function from the standard library (NewLib). 1) The first step is to exclude specific library object file(s) from the input section (using EXCLUDE_FILE) so they will not be linked into the standard .text* flash section.  The input section associated with EXCLUDE_FILE shall not interfere with the same input section used later in section list (e.g. with *(.text*) input section deleted from the list below). EXCLUDE_FILE in behaves the same was as *.(text*) rule - it only exclude selected file(s) but places all the remaining (non-excluded) input data. /* The program code and other data goes into internal flash */ . text : { . = ALIGN ( 4 ) ; * ( . text ) /* .text sections (code) */ /* Exclude file(s) from NewLib libc.a from .text.* section */ * ( EXCLUDE_FILE ( * libc . a : lib_a - memcpy - stub . o ) . text * ) * ( . rodata ) /* .rodata sections (constants, strings, etc.) */ * ( . rodata * ) /* .rodata* sections (constants, strings, etc.) */ * ( . glue_7 ) /* glue arm to thumb code */ * ( . glue_7t ) /* glue thumb to arm code */ * ( . eh_frame ) KEEP ( * ( . init ) ) KEEP ( * ( . fini ) ) . = ALIGN ( 4 ) ; } > m_text ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ 2) Now let's place the memcpy object into a code_ram section which is already defined in the project .ld file. This section is dedicated to a code that shall be executed from RAM (startup routine initializes this section). For more details see HOWTO: Run a routine from RAM in S32 Design Studio  . The following line places the code (.text* section) from the object file (lib_a-memcpy-stub.o) from the standard NewLib (libc.a)  * libc . a : lib_a - memcpy - stub . o ( . text * ) ‍ into .code section: . code : AT ( __CODE_ROM ) { . = ALIGN ( 4 ) ; __CODE_RAM = . ; __code_start__ = . ; /* Create a global symbol at code start. */ __code_ram_start__ = . ; * ( . code_ram ) /* Custom section for storing code in RAM */ * libc . a : lib_a - memcpy - stub . o ( . text * ) /* add memcpy from the NewLib library here*/ . = ALIGN ( 4 ) ; __code_end__ = . ; /* Define a global symbol at code end. */ __code_ram_end__ = . ; } > m_data ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ After building the project you can check the map file to confirm memcpy is indeed placed into .code section in RAM memory: . code 0x1fff881c 0x18 load address 0x00000d90 0x1fff881c . = ALIGN ( 0x4 ) 0x1fff881c __CODE_RAM = . 0x1fff881c __code_start__ = . 0x1fff881c __code_ram_start__ = . * ( . code_ram ) * libc . a : lib_a - memcpy - stub . o ( . text * ) . text . memcpy 0x1fff881c 0x16 C : / NXP / S32DS_ARM_v2018 . R1 / Cross_Tools / gcc -6.3 - arm32 - eabi / arm - none - eabi / newlib / lib / thumb / v7e - m\libc . a ( lib_a - memcpy - stub . o ) 0x1fff881c memcpy 0x1fff8834 . = ALIGN ( 0x4 ) * fill * 0x1fff8832 0x2 0x1fff8834 __code_end__ = . 0x1fff8834 __code_ram_end__ = . 0x00000da8 __CODE_END = ( __CODE_ROM + ( __code_end__ - __code_start__ ) ) 0x00000da8 __CUSTOM_ROM = __CODE_END ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ ‍ Note If you are placing a function into RAM always consider to add sub-functions called by that function (typically located in a different object file).
記事全体を表示
On reset, all module registers have default values. These settings are typically not ideal for achieving optimal system performance. Also, some peripherals must be configured before they can be used. DCD is the configuration information contained in the DCD image that BootROM uses to configure peripherals on the device. BootROM determines the location of the DCD table from the associated pointer in the IVT.   The main functionality of the DCD Tool is to generate the Device Configuration Data (DCD) image using the format and constraints as specified in the Boot ROM reference manual.   In the steps below, an example process for creating the DCD binary for initializing SRAM is shown. To initialize the SRAM, a logic '1' must be written to the INITREQ bit within the PRAMCR register of the SRAMC and SRAMC_1 peripherals.   Procedure With a project open in project explorer (C/C++ perspective), switch to DCD perspective. Click on the arrow next to the 'Open S32 Configuration' button and select 'Open DCD'. Check that correct project is selected  In DCD Commands panel, select Command Type 'Write', then click 'Set' Click 'Add Register', then set the following settings. Can start typing the names to filter the list for faster setting selection.   For Peripheral setting, select 'SRAMC'. You can search for it by typing the name. Register setting, select 'PRAMCR'. The list is short, so it is not necessary to type the name. In Bitfields, select 'INITREQ' Now click on the highlighted bit to set it. Again using 'New Command' box, repeat settings of steps 3 & 4, however, this time select Peripheral 'SRAMC_1'. If everything was done correctly, in the DCD Binary panel to the right, should appear as shown. If so, click 'Export'. The generated DCD file will be displayed. By default, C format is selected. Select Binary format and click OK. Select a location to save the file (such as the project folder in the workspace directory) and give it a meaningful name. Click Save. You are done! DCD image file is created in binary format and ready to be imported to IVT Tool.  
記事全体を表示
For S32 Design Studio v3.5 and earlier, there is a known issue when the S32 Configuration Tools are invoked from command line from a location outside of the S32DS installation directory. The following error is reported: java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source) at com.nxp.swtools.common.utils.runtime.SingletonProvider.getSingletonInstance(SingletonProvider.java:46) at com.nxp.swtools.common.ui.utils.swt.internal.SWTFactory.getSingletonInstance(SWTFactory.java:421) at com.nxp.swtools.common.ui.utils.swt.SWTFactoryProxy.getSingletonInstance(SWTFactoryProxy.java:448) at com.nxp.swtools.dcd.controller.DCDController.getInstance(DCDController.java:84) at com.nxp.swtools.dcd.DCDStartup.earlyStartup(DCDStartup.java:23) at com.nxp.swtools.provider.SWToolsPlatform.initializeAllTools(SWToolsPlatform.java:702) at com.nxp.swtools.framework.Application.start(Application.java:475) at com.nxp.swtools.framework.Application.start(Application.java:445) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:654) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591) at org.eclipse.equinox.launcher.Main.run(Main.java:1462) Caused by: java.lang.NoClassDefFoundError: javafx/beans/property/SimpleBooleanProperty at com.nxp.swtools.bootimage.controller.ABootController.<init>(ABootController.java:37) at com.nxp.swtools.dcd.dcf.common.DCDCommonController.<init>(DCDCommonController.java:90) at com.nxp.swtools.dcd.controller.DCDController.<init>(DCDController.java:43) ... 24 more Caused by: java.lang.ClassNotFoundException: javafx.beans.property.SimpleBooleanProperty cannot be found by com.nxp.swtools.bootimage_1.0.0.202207251223 at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:519) at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:170) at java.base/java.lang.ClassLoader.loadClass(Unknown Source)   Resolution: To resolve the issue: Invoke the command from within the installation directory, for example, from 'C:\NXP\S32DS.3.5\eclipse' OR Change "{S32DS Installation Folder}\eclipse\s32ds.ini" by setting the javafx path from relative to absolute. So, if default installation is used, then: Change -Defxclipse.java-modules.dir=jre/javafx-sdk-11.0.2/lib To -Defxclipse.java-modules.dir=C:/NXP/S32DS.3.5/eclipse/jre/javafx-sdk-11.0.2/lib   In addition, if it is desired to suppress unimportant warning messages: go to {S32DS installation folder}\eclipse\configuration, open logging.properties file and change com.nxp.swtools.level = SEVERE
記事全体を表示
This document shows the step-by-step process to create a simple blinking LED application for the S32R41 family using the S32 RTD AUTOSAR drivers. This example used for the S32R41 EVB, connected via ethernet connection through S32 Debugger. Preparation Setup the software tools Install S32 Design Studio for S32 Platform Install the S32R41 development package and the S32R41 RTD AUTOSAR 4.4. Both of these are required for the S32 Configuration Tools. Launch S32 Design Studio for S32 Platform Procedure New S32DS Project OR Provide a name for the project, for example 'Blinking_LED_RTD_With_AUTOSAR'. The name must be entered with no space characters. Expand Family S32R41, Select S32R418AB Cortex-M7  Click Next Click '…' button next to SDKs Check box next to PlatformSDK_SAF85_S32R41_2022_08_S32R418AB _M7_0. Click OK And also, uncheck the other core Cortex_M7_1 Click Finish. Wait for project generation wizard to complete, then expand the project within the Project Explorer view to show the contents. To control the LED on the board, some configuration needs to be performed within the Pins Tool. There are several ways to do this. One simple way by double-click on the MEX file. Select the overview tab and disable Pins tool. Make sure to overview tab windows shows settings shown as below.  Here, we are disabling pin tools and using MCAL driver from peripheral tools for using AUTOSAR drivers. Now from Overview menu, select peripheral tools and double click to open it. In the driver sections, “Siul2_Port_1 driver” is the non-AUTOSAR version driver and so it must be replaced. Right click on ‘Siul2_Port_1’ and remove it. Keep BaseNXP driver as it is. Click on the ‘+’ next to the MCAL box. Locate and then select the ‘Dem’ component from the list and click OK. Click on the ‘+’ next to the MCAL box again, and Locate and then select the ‘Dio’ component from the list and click OK. Click on the ‘+’ next to the MCAL box again, and Locate and then select the ‘Mcu’ component from the list and click OK. Click on the ‘+’ next to the MCAL box again, and Locate and then select the ‘Port’ component from the list and click OK. Now components tab should show like below : Now we required to configure the different MCAL drivers that we added. Starting with Dio configuration, open the Dio configuration. No change is required for Dem configuration. Now, open the ‘DioGeneral’ tab, and select checkmark as per shown below: Now, open the ”DioConfig” tab. In that Select  “+” sign adjacent to Dio Channel. Then Edit Name to “Digital_Output_LED_0” and Dio Channel Id to ‘4’ instead of ‘0’. From the schematic for S32R41 EVB, checking for signal line for the user LED, channel 4 is connected to user LED signal, so we use channel 4 for signal line for user LED on the chip. So, we select the signal line for Dio channel Id 4 for the LED connected on the S32R41 EVB. Now Select Port tab for Port configuration. And open the Port Configuration tab, and from that open “PortConfigSet” tab. Change the PortPin Mscr to 36 , PortPin Direction to PORT_PIN_INOUT as shown below: Now, at the bottom you will find the “UnTouchedPortPin ’’ . Click on “+’’ and add PortPins. Now add port pins 0, 1, 2, 3,4 as per below configuration Now configure MCU component. Select Mcu component in MCAL, and then open the Mcu configuration. In Mcu configuration click MCUModuleConfiguration and then select  “McuModesettingConf” from the dropdown menu as shown below. From McuModeSettingConf select McuPartitionConfiguration Now open “McuPartition0Config” tab. And under the McuCore0Configuration for “McuCoreClockEnable” select checkbox and for “McuCoreResetEnable” uncheck  the checkbox. Similarly, And under the McuCore1Configuration for “McuCoreClockEnable” select checkbox and for “McuCoreResetEnable” uncheck  the checkbox. After modification it should be as shown below: Now open the “McuPartition1Config” tab. for "McuPartitionClockEnable" select checkmark to true and for "McuPartitionResetEnable" uncheck  the checkmark   And under McuCore0Configuration for "McuCoreClockEnable"  select checkmark to true and for "McuCoreResetEnable" uncheck  the checkmark After modification it should be as shown below: Now, click on global setting icon as shown below: And, Confirm that ComponentGenerationMethod is set to “FunctionalGroups” Now the device configurations are complete and the RTD configuration code can be generated. Click ‘Update Code’ from the menu bar. To control the output pin which was just configured, some application code will need to be written. Return to the ‘C/C++’ perspective. If not already open, in the project window click the ‘>’ next to the ‘src’ folder to show the contents, then double click ‘main.c’ file to open it. This is where the application code will be added. Before anything else is done, Initialize the clock tree and apply PLL as system clock, Apply a mode configuration, Initialize all pins using the Port driver by adding – editing code before write code here comment in main function.        /* Initialize the Mcu driver */        Mcu_Init(&Mcu_Config_BOARD_InitPeripherals);        /* Initialize the clock tree and apply PLL as system clock */        Mcu_InitClock(McuClockSettingConfig_0);        /* Apply a mode configuration */        Mcu_SetMode(McuModeSettingConf_0);        /* Initialize all pins using the Port driver */        Port_Init(NULL_PTR); Now replace the logic of for loop as shown below code section, which will enable the LED blinking for 10 times: You also need to declare and initialize the loop variable: uint8 i = 0U; Then replace the code as below after write your code comment: /*Logic for blinking LED 10 times*/ while (i++ < 10) {       /* Get input level of channels */       Dio_WriteChannel(DioConf_DioChannel_Digital_Output_LED_0, STD_HIGH);       TestDelay(3000000);       Dio_WriteChannel(DioConf_DioChannel_Digital_Output_LED_0, STD_LOW);       TestDelay(3000000); } Before the 'main' function, add a delay function as follows: void TestDelay(uint32 delay); void TestDelay(uint32 delay) {     static volatile uint32 DelayTimer = 0;     while(DelayTimer<delay)     {         DelayTimer++;     }     DelayTimer=0; } Update the includes lines at the top of the main.c file to include the headers for the drivers used in the application: Add #include "Mcu.h" #include "Port.h" #include "Dio.h" Now, in open peripheral tools again by clicking on icon as shown below. And then click on global setting icon as shown below: And, Confirm that ComponentGenerationMethod is set to “FunctionalGroups” Build 'Blinking_LED_RTD_AUTOSAR'. Select the project name in 'C/C++ Projects' view and then press 'Build'. After the build completes, check that there are no errors. Open Debug Configurations and select 'Blinking_LED_RTD_with_AUTOSAR_Debug_RAM'. Make sure to select the configuration which matches the build type performed, otherwise it may report an error if the build output doesn’t exist. And make selection as shown in screenshot below. You need to select the ethernet connection for S32 debugger and provide its IP address Click Debug To see the LED blink, click ‘Resume' This code as it will blink the LED 10 times, you can make changes in for loop condition to blink it infinitely.
記事全体を表示