S32 Design Studio Knowledge Base

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32 Design Studio Knowledge Base

Discussions

Sort by:
This document contains the instructions how to download separate elf/srec/hex file to the microcontroller using S32 Design Studio and USB PE Micro Universal Multilink/OpenSDA debug probes. This could be used in case you get an executable/binary image file only without any project or source code. There are basically three ways: flash programming support in IDE. This is only useful for programming the device. (it is available in S32DS ARM v1.3+, S32DS Power v1.2+) Create a new configuration, adjust its name and browse for elf/srec/hex file: Select MCU and specific core you are targeting: Select where the Flash Configuration should be saved into - workspace metadata (local file) or as a specific file e.g. part of an existing project (shared file). This way the config could be e.g.transferred with this project. Click on "Flash" button to proceed to programming. As soon as the device is programmed it's disconnected. 2. Executable file importer. Go to menu File -> Import -> Select "Executable File Importer"  this starts the wizard. This is for programming and debugging an executable elf object file only. Select the MCU/core you are targeting and browse for the .elf file Adjust the project name and create a debug/launch configuration (PEMicro GDB server example). If the .elf file is built on another machine and the source files are available but located in a different folder the source path could be adjusted. Source-level debugging is then possible. Finish the wizard and new "container" project for your elf is created. Its debug configuration opens automatically. "Debug" button starts the load/debug of the selected elf file. 3. reuse an existing project debug configuration or create a new dummy project for loading .elf/srec/hex Create new project which will provide basic debug settings Compile the project Copy the required .elf file to the created project Debug folder Open new project Debug configuration Choose correct project and set the correct .elf/srec/hex you want to download Click Apply button and then Debug button. The debug window with correct .elf file will be opened. Program is downloaded and you are able to debug or run it.
View full article
Hello,   The new official release of S32DS for Power Architecture v1.1 is available now! You can download it from S32DS product web page: S32 Design Studio IDE|NXP       This release requires the product activation! Please enter the Activation code from the notification email (it is sent after you click on S32DS download button) into the installer dialog (see the screenshots below). The Activation code is valid for both versions (Windows/Linux).     S32 Design Studio is based on Eclipse open development platform and integrates the Eclipse IDE, GNU Compiler Collection (GCC), GNU Debugger (GDB) and other open-source software to offer designers a straightforward development tool with no code-size limitations. This release supports Windows 7/8/8.1/10 (32/64 bit) and Linux versions as well.   S32DS Power v1.1 main features Free of charge tool with no code size limitation (no license file required - Only acti) Eclipse Luna 4.4 Framework GNU Build Tools for e200 processors supports VLE and BookE ISA, LSP, SPE/SPE2 based on gcc 4.9.2, binutils 2.24 and gdb 7.8.2 Libraries included: newlib, newlib-nano and Freescale EWL2 (ewl and ewl-nano) P&E Multilink (with P&E GDB Server) Graphical tool for creating SPT algorithms SDK management included (FreeMASTER for 560xP, AMMCLIBs) GreenHills and Diab compilers support by new project wizard Lauterbach, iSystem** and PLS debuggers support by new project wizard Kernel Aware Debugging FreeRTOS, eCOS, OSEK. "New S32DS project from” added to support project creating from examples Devices supported MPC56xx MPC5601P, MPC5602P, MPC5603P, MPC5604P MPC5644B, MPC5644C, MPC5645B, MPC5645C, MPC5646B, MPC5646C MPC5601D, MPC5602B, MPC5602C, MPC5602D, MPC5603B, MPC5603C, MPC5604B, MPC5604C, MPC5605B, MPC5606B, MPC5607B MPC5606S MPC5604E MPC5644A MPC5643L MPC5676R MPC57xx MPC5775K, MPC5774K MPC5746R, MPC5745R, MPC5743R MPC5777M MPC5777C MPC5748G, MPC5747G, MPC5746G MPC5746C, MPC5745C, MPC5746D, MPC5746B, MPC5745D, MPC5745B MPC5744P, MPC5743P, MPC5742P, MPC5741P S32 S32R274   Host Operating System Support Microsoft Windows 7/8/8.1/10 32-bit and 64-bit (Home and Pro Editions) Linux versions Ubuntu 12.04/14.04, Debian 8, CentOS 7   Technical Support S32 Design Studio is supported on NXP community - https://community.freescale.com/community/s32/s32ds/ For more details see the attached release notes (product & GCC build tools)   * Red items are the new features ** iSystem plugin integration with the project wizard will be available in S32DS PA v1.2   Regards, Stan
View full article
Function printf is C library function, which sends formatted output to stdout. Because microcontroller does not contain stdout, it it necessary to redirect it to a different type of output. One of the possible way is using UART. All MPC57xx has LinFlexD module, which supports UART mode.   For proper use the LinFlexD module, it is necessary to initialize it and also create simple functions for transmit and receive data. You can create your own file or use the file uart.c in the attachment. If you want to create your own file, please do not forget to implement the methods, which are called by MW MSL libraries to perform console IO (please look at the attached file uart.c).   In uart.h file, you will find correct function prototypes for functions used in uart.c and also some important enum data types.   Third important file is uart_console_io.c which you find in folder, where S32DS was installed. Open the folder and choose path: S32DS/e200_ewl2/EWL_C/src/sys. This file contains routines which implement low-level console IO routines.   Now, we have all basic files which help us to use printf function. So lets create new project and test printf. Example project is created for MPC5744P.   Create new project, choose EWL library and finish project wizard. Include stdio.h to the file, where you want to call printf function.   Now add uart.c and uart_console_io.c files to the project folder src. Add uart.h file to project folder include.   Initialize system clock and clock for peripherals (look at the attached project). In uart.c file, there are settings for GPIO pins, LinFlex initialization for UART mode and also baud rate calculation (please look at the uart.c file in the attachment).   Now it is possible to use printf function. Important point is, that \n character triggers the data sending. Also, if you do not use this \n character, you will get compile error, but I will explain this further in this tutorial.   Run some terminal emulation, for example Putty and use the following settings:   Now open terminal and  run the code in the microcontroller. This should be the result:   /*************************************************************************************************************************************************************************************/ /*************************************************************************************************************************************************************************************/ /*************************************************************************************************************************************************************************************/   This was the easiest way, how to use printf function. But printf also provides some format characters for printing decimals, floating points, etc. All options you can find in ewl_c_reference.pdf document which is place in S32DS installation folder S32DS/help/pdf.   When you want to use some of the characters mentioned above, you get the following compile error:   When you do not use any format characters in printf argument, function _EWL_CDECL puts(const char_t * s) from puts.c file is called on background. But when you use format characters in printf argument, function int_t _EWL_CDECL printf(const char_t * _EWL_RESTRICT format, ...) from printf.c file is called instead of puts.   Variable result saves value, which function __pformatter returns. But function __pformatter is not implemented. Instead of __pformatter, function __pformatterFP (placed in __printformat.c file) is implemented.   So there are two possible workarounds.   First workaround is place the following code to the Linker flags in project properties: -Xlinker --undefined=__pformatterFP -Xlinker --defsym=__pformatter=__pformatterFP   The code says that there is undefined symbol __pformatterFP (part -Xlinker --undefined=__pformatterFP) and define symbol alias __pformatter=__pformatterFP (-Xlinker --defsym=__pformatter=__pformatterFP ). So from my point of view, symbol __pformatter is replaced by __pformatterFP. Now the correct function is called and the project could be successfully built.     Second workaround is add the printf.c file from S32DS installation folder S32DS/e200_ewl2/EWL_C/src/stdio to the project src folder and exchange __pformatter for __pformaterFP. Clean project and recompile.       I hope this document helps you while implementing printf function in your projects.   Regards, Martin
View full article
Hello,   The new official release of S32DS for ARM v1.2 is available in the download section of S32DS web page: http://www.nxp.com/s32ds       To  install the product the Activation Code is needed. You can Find it under "License keys" tab.   S32 Design Studio is based on Eclipse open development platform and integrates the Eclipse IDE, GNU Compiler Collection (GCC), GNU Debugger (GDB), and other open-source software. This release supports Windows 7/8/8.1/10 (32/64 bit) and Linux versions as well.   S32DS ARM v1.2 main features Free of charge tool with no code size limitation (no license file required) Eclipse Luna 4.4 Framework GNU Tools for ARM embedded processors (launchpad, based on gcc 4.9.3) and ARM64: 4.9.3 20141031 Linaro Libraries included: newlib, newlib-nano and Freescale EWL2 (ewl and ewl-nano) SEGGER J-Link (with SEGGER GDB Server), P&E Multilink (with P&E GDB Server) Fully integrated S32 SDK for S32K144 EAR release v.0.8.1 SDK management included (KEA drivers, FreeMASTER for KEA, AMMCLIB for KEA and S32K) CodeWarrior/KDS project importer GreenHills/IAR compiler support by the new Project Wizard iSystem/Lauterbach debuggers support by the new Project Wizard Kernel Aware Debugging FreeRTOS, OSEK. Devices supported SKEAZN8, SKEAZN16, SKEAZN32, SKEAZN64, SKEAZ128, SKEAZ64 S32K144 S32V234 MAC57D54H   Technical Support S32 Design Studio is supported by NXP community - https://community.freescale.com/community/s32/s32ds/ For more details see the attached release notes.     * Red items are the new features   Regards, Stanislav  
View full article
Hello,   The first official release of S32DS for Power Architecture is available in the download section of S32DS web page: http://www.nxp.com/s32ds S32 Design Studio is based on Eclipse open development platform and integrates the Eclipse IDE, GNU Compiler Collection (GCC), GNU Debugger (GDB), and other open-source software. This release supports Windows 7/8/8.1 (32/64 bit), version for Linux will be released later on.   S32DS Power Architecture v1.0 main features Free of charge tool with no code size limitation (no license file required) Eclipse Luna 4.4 Framework GNU Tools for e200 processors build tools (support VLE ISA only, based on gcc 4.9.2, binutils 2.24 and gdb 7.8) Libraries included: newlib, newlib-nano and Freescale EWL2 P&E Multilink (with P&E GDB Server) New Project wizard to create application and library projects for supported devices Peripherals Register View   Devices supported MPC56xx MPC5601P, MPC5602P, MPC5603P, MPC5604P MPC5644B, MPC5644C, MPC5645B, MPC5645C, MPC5646B, MPC5646C MPC5601D, MPC5602B, MPC5602C, MPC5602D, MPC5603B, MPC5603C, MPC5604B, MPC5604C, MPC5605B, MPC5606B, MPC5607B MPC5606S MPC57xx MPC5775K, MPC5774K MPC5746R, MPC5745R, MPC5743R MPC5777M MPC5777C MPC5748G, MPC5747G, MPC5746G MPC5746C, MPC5745C, MPC5746D, MPC5746B, MPC5745D, MPC5745B MPC5744P, MPC5743P, MPC5742P, MPC5741P   Technical Support S32 Design Studio is supported by NXP community - https://community.freescale.com/community/s32/s32ds/ For more details see the attached release notes.   Regards, Stanislav
View full article
1. Build the project. a. Select the build configuration. (optional) b. Click on Build. c. Check there are no compiler errors. 2. Configure the debug configuration to start a debug session. a. Click down arrow next to Debug button. b. Select 'Debug Configurations…' c. Select the debug configuration associated with your current build configuration. d. Select whether to rebuild code each time debug session start is requested. e. Click on Debugger tab. f. Verify proper interface and port. 3. Click Debug
View full article
In recent releases of S32DS (Power v2017.R1, ARM v2.0, Vision v2.0) is new feature - you can add custom example into example list by copy example folder into [S32DS_INSTALL]\S32DS\examples path:  If you select New project from example - you can see your recently added project in User Examples folder. You can filter all examples by name or MCU model (for example all examples for S32K148):  Another useful improvement is possibility rename project before is inserted into active workspace. It allows you to have more projects based on the same example: If in your project folder is present description.txt file - the content of the file is shown in Create project dialog:
View full article
Building Projects There is already a significant amount of information already available on this topic. Please explore the external references listed below for detailed information. External References Building Projects with Eclipse Build Several CDT C++ projects from command line With the following command line, it is possible to build the project KEA128: eclipsec -nosplash -application org.eclipse.cdt.managedbuilder.core.headlessbuild -data C:\Users\username\workspaceS32DS.ARM2.0 -build KEA128/Release   The project was located in workspace - C:\Users\username\workspaceS32DS.ARM2.0 Project Name is: KEA128 Build Configuration is: Release Emitting Source Code S32 Design Studio for Vision Emitting the source code from the command line: There are 2 sections in the Reference Manual, one for each of the ISP and APEX2 Visual Graph Tools. Processor Expert Software - S32 Design Studio There is a section in the Processor Expert User Guide titled 'Command Line Interface'
View full article
S32 Design Studio (S32DS) supports Lauterbach Eclipse plug-in to debug S32DS projects via a Lauterbach probe + TRACE32 standalone application. Currently (S32DS Power 1.1, S32DS ARM 1.3) supports "loose coupling" version of the plug-in. 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. 1. go to menu "Help" -> "Install New Software" and  click on "Add..." button 2. select the Loose Coupling version of component and click "Next" 3. Tick " I Accept the terms of the license agreement" and Select all Lauterbach certificates to trust. 4. Finally you proceed to the installation. When the plugin is installed you will be asked to restart S32DS Now you should be able to create a project with Lauterbach Debugger support: or manage (create, delete, adjust) Lauterbach eclipse debug configurations: Enjoy debugging with TRACE32 Eclipse plug-in in S32DS!
View full article
Sometimes you would like to share sources between projects and - even better - between platforms. Let's say that we are developing software with the very same functionality for S32K144 and MPC5744P. In this case, we can identify platform independent functions - generic, platform specific functions - not related to MCU itself, but related to the way some peripheral works (for example different ADC result range) - and MCU dependent functions like clock init. In attachment is a very simple SDK which can be shared with S32K144 and MPC5744P (each in different S32DS editions).  Unzip my_sdk.zip archive (for example C:\NXP folder). You can import example projects, but instead let's start from the beginning. Create a new S32DS Application project and choose MCU: You can use default project configurations and click through to finish: Right click on project name -> Properties and select SDKs -> Add Complete the Name, Version and Description fields in New SDK dialog and click on Change button next to Location field. In Change SDK Location dialog, leave Define new variable setting selected, click Browse and find the my_sdk path: Now we can select files (sources, headers...) from selected SDK, you can select all available files. If you select a folder, then all files in that folder will be selected as well. Don't forget to select header files too: If you choose Copy - the files will be copied into project folder and you can do local changes. Without this option (default) - changes will be shared between all projects depended on this particular SDK. The ability to individually select the files to be included from the SDK as well as to copy into the project folder, provides much flexibility to customize SDK usage in your projects. Click on OK, then Attach/Detach... to attach this SDK into your project:  If you like to use your SDK for newly created projects (as an option in SDK select list) - click on Make global button: Now you can see changes in your project: As well, the SDK can be viewed in SDK Explorer (Window -> Show View -> Other...), where functions and macros are available for drag and drop functionality into your code: Platform specific code is filtered by preprocessor-defined macro. So - let's define if we are working with S32K144 or MPC5744P. Right click on project name -> Properties -> C/C++ Build -> Settings -> <Standard S32DS C Compiler OR name of your compiler> -> Preprocessor: We are done - now we can use SDK functions - S32K144:  and MPC5744P (enabling interrupts is default part of empty project for MPC5744P - that's only difference):
View full article