Software Integration Guide For S32R274RRUEVB AND S32R372RRSEVB - NXP

Transcription

S32R274RRUEVB AND S32R372RRSEVBSOFTWARE INTEGRATION GUIDE (SWIG)Ultra-Reliable MCUs for Industrial and Automotive Applicationswww.nxp.com/S32DSEXTERNAL USE

S32 DESIGN STUDIO IDE FOR POWER ARCHITECTUREwww.nxp.com/S32DS1 To develop an application, one needs an Integrated Development Environment (IDE) S32 Design Studio IDE meets the need! S32DS v2017.R1 is the latest (Aug 2018) This document provides stepwise tutorial on “How to use S32 Design Studio IDE” to build anapplication and uses images from the S32DS for Power v1.2 installation process, but the installationsteps apply for later versions as wellEXTERNAL USE

Contents S32 Design Studio IDE for Power Architecture Supported DevicesInstalling S32 Design Studio IDE for Power Architecture Download Getting started with a New Project Create, 2and Install the new IDEbuild and debug the new projectMaking Projects from built-in ExamplesEXTERNAL USE

S32 Design Studio IDE for Power Architecture v2017.R1Supported Devices MPC560xB/C/D FamilyMPC560xE FamilyMPC560xP FamilyMPC560xS FamilyMPC564xA FamilyMPC564xB FamilyMPC564xC FamilyMPC564xL FamilyMPC567xR FamilyMPC563xM FamilyMPC5674FMPC567xK Family 3EXTERNAL USEMPC574xB/C/D FamilyMPC574xG FamilyMPC577xK FamilyMPC574xP FamilyMPC574xR FamilyMPC5777CMPC5777MMPC5775B/ES32R274S32R372

INSTALLING S32 DESIGN STUDIO IDE FORPOWER ARCHITECTURE4EXTERNAL USE

Step-1 5Go to www.nxp.com/S32DS to download latest version of S32DSFrom Downloads folder, run the installation fileClick on Run if any administrative privilege issues result from unknown softwarepublisherThe “preparing to install” dialogue box will appearEXTERNAL USE

Step-2 6An Installer welcome window will bedisplayed, click Next to continueEXTERNAL USE

Step-3 Choose additional Features Selecting“S32 Design Studio” option willonly install S32 Design Studio Selecting“Additionally install ” will allowyou to install other software too Click on Next7EXTERNAL USE

Step-4 8Scroll down the text and read thelicense agreement.Select the radio button acknowledgingthe license agreement terms and clickNext to continue.EXTERNAL USE

Step-4 9Click Next to accept the defaultinstallation location (could be changed,but recommended to install into pathwithout spaces).EXTERNAL USE

Step-5 10Select folder where you want to Verify settings on “Pre-Installationgenerate a Shortcut and click on Next toSummery” tab and click Install to startcontinue.InstallationEXTERNAL USE

Step-7 11The installation starts by installingrequired libraries from the MicrosoftVisual C 2013 package. Read thelicense terms and select I agree option and hit the InstallIf the libraries of the Visual C 2013package were already installed on thesystem then the Modify Setup dialogbox appears. Now click on Repair tocontinueEXTERNAL USE

Step-8 12When asked for Activation ID, copy andpest the key from the Download pageThen click on OK.Next: In activation type window. Clickon OnlineEXTERNAL USE

Step-9 13During the Installation it may ask you toinstall P&E Device DriversRead license agreement and Click onI Agree.In next window Select the destinationfolder and click InstallOnce the installation is done. Click onClose to close the P&E Device DriverSetup window.EXTERNAL USE

Step-10 14Once the installation is completed clickon Done to exit the installation wizard.EXTERNAL USE

GETTING STARTED WITH A NEW PROJECT15EXTERNAL USE

Create a new project Start program: Click on “S32 Design Studio for Power Architecture [version]” iconSelect workspace: Choosedefault or specify new one Suggestion: Click161 of 5OKEXTERNAL USEUncheck the box “Use this as the default and do not ask again”

Create a new project 17Go to: File – New – New S32DS ProjectEXTERNAL USE2 of 5

Create a new project Project Name: Example: FirstProjectProject Type: Recommended: Select Controller: Example:18use Elf S32DS ProjectS32R274EXTERNAL USE3 of 5

Create a new project 19Select coresSelect Flash and RAM sizeSelect Programming LanguageSelect the LibrarySelect the DebuggerRecommended: use Default settings(for beginners)EXTERNAL USE4 of 5

Create a new project5 of 5 20EXTERNAL USEA projectwill becreated forevery corethe devicehas.S32R274has three

Build a Project To build a project follow one of the methods If project is built successfully, followingbelow:message will be displayed on the1.Project – Build Project2.- Click on hammer symbol to build thatproject- Click on page symbol to build all projects21EXTERNAL USEConsole

Debug a Project Connect a debugger to both, the boardand the PC S32R274RRUEVBsupports JTAG. Use aJTAG debugger such as P&E Micro USBMultilink 22Click on arrow in theiconAnd Open Debug Configurations EXTERNAL USE1 of 4

Debug a Project Each core is represented by a project Debug each core individuallyOR All cores at once Debug Program to FlashDebug RAM Program to RAM (more on this later) 23EXTERNAL USE2 of 4

Debug a Project (Single Core) Select Project: Example:FirstProject Z4 Debug Select Interface: Example: 24USB MultilinkClick on Debug to startdebuggingEXTERNAL USE3 of 4

Debug a Project (All Cores) Select boot core project: Example:FirstProject Z4 Debug Configure port and interfacelike with single core debugClick ApplySelect launch group: Example:FirstProject LaunchGroup 25Click on Debug to startdebuggingEXTERNAL USE4 of 4

Debug a Project from RAMFirstly, Configure a project to debug from RAM Lastly, to debug from RAM select the RAM relatedsession/launch group while debugging Follow the Steps shown on Debug a Project pagesFollow one of the Steps:1.Project – Build Configurations – Set Active –Debug RAM2.Select Debug RAM by clicking Down Arrow next tohammer Repeat above for all related projects. Follow the steps shown on “Build a Project” Page26EXTERNAL USE

Debug Basics: Step, Run, Suspend, Resume Step Into (F5) Step Over (F6) Run Suspend Resume (F8) Terminate (Ctrl F2)27EXTERNAL USE

Debug Basics: View & Alter Variables 28View variables in “Variables” tab.Click on a value to allow typing in a different value.EXTERNAL USE1 of 2

Debug Basics: View & Alter Registers View CPU registers in the “Registers” tabClick on a value to allow typing in a different value View peripheral registers in the EmbSysReg tab 29EXTERNAL USE2 of 2

Debug Basics: View Memory Add Memory Monitor Clickonicon Select Base AddressExample : 0x0000fff8 View Memory30EXTERNAL USE

Debug Basics: Breakpoints Add Breakpoint: Point mouse pointer at circled area and Double Click there Light31blue dot will pop up that represents debugger breakpointEXTERNAL USE

Switching Context (Multicore Debug) 32When debugging multiple cores, each core project creates its own debug contextwhich shows what each particular core is executingDebug controls only affect the current selected contextSwitch between the contexts in the Debug windowEXTERNAL USE

Terminating a Session (Multicore Debug) 33To terminate debug on all cores at once, go to Project Name LaunchGroup inthe Debug windowClick on the “terminate” iconAll cores will close at the same timeEXTERNAL USE

MAKING PROJECTS FROM BUILT-INEXAMPLES34EXTERNAL USE

Step-1 35Go to: File – New – New S32DS Project from ExampleEXTERNAL USE

Step-2 Select the built-in project of your choice*Click on FinishProject will be copied to the activeworkspace as shown below*As of time of writing (Aug 2018), S32R prebuilt examples not included. S32R274 SDK support will bereleased Q3 2018. Screenshots use MPC5744P.36EXTERNAL USE

IMPORTING PROJECTS37EXTERNAL USE

Step-1 38Go to: File – ImportEXTERNAL USE Click on: “Existing Projects intoWorkspace” – Hit Next Click on: Browse & Select ExampleFolder

Step-2 39Select the ProjectClick on Finish to Import a Project intoWorkspaceEXTERNAL USE

MORE INFORMATION For more information about S32DS go toStart – All Programs – NXP S32 Design Studio – S32 Design Studio for power Architecture[version] – Quick Start/Documentation 40Also Visit www.nxp.com/community to post questions about S32DSEXTERNAL USE

1 EXTERNAL USE To develop an application, one needs an Integrated Development Environment (IDE) S32 Design Studio IDE meets the need! S32DS v2017.R1 is the latest (Aug 2018) This document provides stepwise tutorial on "How to use S32 Design Studio IDE" to build an application and uses images from the S32DS for Power v1.2 installation process, but the installation