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:
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 GTA command line and the GDB. This instruction details the steps to perform flash programming of the S32R41 EVB via the JTAG interface with the S32 Debug Probe.   Note: currently only QSPI flashing is supported.   Preparation Setup the software tools Install S32 Design Studio IDE Install the Development Package for the device you are debugging. In this case, the S32R41 development package. This is important as the S32 Debugger support within it contains the device-specific Python scripts required for initialization of the cores. Setup the hardware Confirm the setup of the S32R41 evaluation board. 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. Connect the S32 Debug Probe to the host PC via USB, or 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 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: Configure the EVB's Boot Mode switches for Serial Boot. Issue the following commands, replacing the PROBE_IP address and FLASH_NAME, as appropriate: source {S32DS Install Path}/S32DS/tools/S32Debugger/Debugger/scripts/gdb_extensions/flash/s32flash.py py _FLASH_TYPE = "qspi" py _PROBE_IP="10.81.64.66" py _JTAG_SPEED=20000 py _GDB_SERVER_PORT=45000 py _GDB_TIMEOUT=7200 py _REMOTE_TIMEOUT=30 py _RESET_DELAY=1 py _RESET_TYPE="default" py _INIT_SCRIPT="{S32DS Install Path}/S32DS/tools/S32Debugger/Debugger/scripts/s32r41/s32r41_generic_bareboard.py" py _FLASH_NAME="W25Q64J" py _IS_LOGGING_ENABLED=False py flash() Note: Replace the {S32DS Install Path} in the commands above with the actual path to your installation of S32 Design Studio. Now flash commands may be used. fl_blankcheck -- blank check fl_close -- close command fl_current -- current device command fl_dump -- dump command fl_erase -- erase section of memory command, will erase whole sectors starting from 'offset' through 'size' contiguously, so to erase only one sector, ensure that the 'offset' address is within the desired sector and 'size' does not extend into the following sector fl_erase_all -- erase all memory command fl_info -- info command, shows list of registered devices fl_protect -- protect section of memory command fl_unprotect -- unprotect section of memory command fl_write -- write memory command, hex or binary are supported, options to erase first and verify after write fl_write_elf -- write elf file to memory command, options to erase first, verify after, and rearrange flash base Type 'help fl_<command>' to print the help info on the specified command Type 'help support' to print a list of the fl_ commands For example, you may wish to write a binary file: fl_write -e 0x0 C:\\Users\\<userid_folder>\\workspaceS32DS\\hello_world\\Debug_RAM\\hello_world_blob.bin Happy flashing with S32DS Flash Programmer!
View full article
In this document, we show the steps to use the New Project Wizard to create a new application project for APEX2, ISP, or both.   1. Launch S32DS for Vision 2. Select File -> New -> S32DS Application Project 3. Enter a name for the project 4. Select the 'A53 APEX2/ISP Linux' processor option 5. Click Next 6. Select the APEX2/ISP options you need.       a. APEX2 programming - will add support to your project for an APEX2 application, you need this for any new APEX2 project       b. ISP programming - will add support to your project for an ISP application, you need this for any new ISP project       c. ISP visual modeling - will create a separate project for your ISP data flow diagram, you will not need this if you plan to use an existing graph diagram. This can also be created later. 7. Select the SDK(s) as appropriate for your setup. For example, 'VSDK_MODULE_WIN' for Windows OS or 'VSDK_MODULE_LINUX' for Linux OS, the one which corresponds to your OS is selected for you by default. 7. Click Finish 8. You now have a project or set of projects for development on the S32V234.
View full article
S32DS for Vision contains many example projects from which you can learn how S32DS, with the Vision Extension Package for V2xx, can be used with the help of the Vision SDK to develop vision applications. The example projects contain generated and hand-written code, which utilize the Vision SDK to demonstrate a workflow using S32DS. In this document, the procedure for creating a project from one of the provided ISP examples through to execution on the EVB is detailed. Prerequisite Before following the steps in this HOWTO, ensure you have the Vision Extension Package for V2xx (as well as the S32V2xx development package) installed to S32DS. 1) Launch S32DS 2) Select "New S32DS Project from example" 3) Select isp_sonyimx224_csi_dcu project and click Finish.    In this particular project, the ISP graph diagram is included. If you wish to view it, go to the Project Explorer panel and expand 'isp_sonyimx224_csi_dcu_graph'. Then double click on 'ISP data flow : mipi_simple'. The ISP graph diagram will appear in the editor panel. 5) We are ready to build the project, but first, select isp_sonyimx224_csi_dcu: A53 in the Project Explorer panel 6) Build project for A53  7) Start a debug session using method as described in HOWTO: Create S32V234 Cortex-A53 Linux Project in S32DS, beginning at step 10. 😎 Should get results similar to this:
View full article
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 S32R41 development package. This package is important as the S32 Debugger support component contains the device-specific Python scripts required for initialization of the cores. Open the application project from which the flash image will be generated. 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 S32R41. 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. 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 Flashing progress will be displayed. 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 's32r41_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”
View full article
The Vision SDK root is contributed to the Design Studio as a dynamic path variable “S32DS_VSDK_DIR”. Several Design Studio services use this variable to access the resources inside the Vision SDK. By default, this variable points to “${eclipse_home}../S32DS/s32v234_sdk”, i.e. to the Vision SDK shipment bundled with Design Studio. Technically you can change this variable to point to another instance of Vision SDK using the following steps: 1. Go to the main menu "Window -> Preferences" 2. Filter the preference dialog with "sub" keyword or just navigate to "Run/Debug -> String Substitution node. 3. Edit Variable "S32DS_VSDK_DIR" to assign another value to be substituted as Vision SDK root 4. Press OK when changes are complete.
View full article
1) Prepare the evaluation board hardware You can use the S32 Debug Probe to download code to target Connect S32 Debug Probe to S32V234 EVB using JTAG connector Connect S32 Debug Probe to PC via USB cable OR ethernet (if connected via ethernet, then USB power cable must also be connected) Connect the S32V234 EVB to PC via ethernet (typically via LAN) Connect power cable to evaluation board and switch on the power     2) Build the project using either the A53 or the TEST_A53 build options. 3) The project is now built and the ELF file is ready to be loaded to the EVB for execution. Before a debug session can be started, we must complete HOWTO: Setup A Remote Linux Connection in S32DS (S32V234). Start A53 Debug 4) Select the debug drop-down menu and click Debug Configurations     5) Make sure the Debug_Remote_Linux debug configuration is selected and the connection setup in step 4 is selected (points to the IP address of your EVB). Click Debug     6) The first time you connect to a new IP address (i.e. the first time you debug after creating a new workspace), you will receive a warning message, Click Yes and proceed.     The executable file is copied to Linux file system and gdbserver starts. You may get an error message on the first try, this is normal. Just try it again and it will work. 7) Once the Linux GDB has started on A53 core and the initial breakpoint is reached in main(), we need to set a breakpoint at the function apu_hal_Enable().    This breakpoint has already been created for you, you just need to enable it! Locate the breakpoint in the Breakpoints view. Due to some known issues with Eclipse CDT, it is necessary to enable->disable->enable the breakpoint so it will work properly. The issue only affects this breakpoint, due to the way it is provided, and will not affect breakpoints which you set elsewhere in the code. 😎 Press Resume twice, so that the breakpoint which was set at apu_hal_enable() is reached for the 2nd time. 9) Open Debug Configurations. You will see a debug configuration within the 'S32 Debugger' group (FAST9COLOR as shown below). This is the debug configuration we will use, however, it will require some setup.     10) You should notice the error message at the top of the window, just below the title and a red 'X' on the Debugger tab. Click on the Debugger tab to select it. We must setup the Debug Probe Connection before we can proceed. There are two options: Ethernet USB   If connecting the Probe via Ethernet, please refer to the Quick Start Guide or S32 Debug Probe User Guide provided with the S32 Debug Probe for instructions on how to connect it and determine the Hostname or IP address.     If connecting the Probe via USB, then the COM port will appear in the Port selection setting. If you have more than one S32 Debug Probe connected, you will need to determine which COM port is the correct one, otherwise, only the COM port for your S32 Debug Probe will appear.       11) Click Apply then Debug. It may take a few moments for the APEX core debug to launch.   12) It may take a moment or two before the APEX2 debug thread launch is complete, see the Thread listed within the <kernel_name>[S32 Debugger] in the Debug window. Also note, a new breakpoint is listed in the Breakpoints view. This breakpoint is set for you at the start of the APEX2 graph function. 13) The debugger context is still on the A53 thread. Press RESUME and then select the APEX2 thread to see that it has stopped on the graph function break point. Now you can step through the graph. 14) To step through a kernel, locate the call to the kernel function in the graph function and set a break point on the line. 15) Press RESUME to advance the program counter to the new break point 16) Press STEP INTO to advance the program counter into the kernel. It may take several steps as the optimizations performed by the compiler produce some synchronization inconsistencies. 17) You may need to help the IDE to locate the source files. Now you can see the kernel wrapper function... and the kernel! 18) Step through, monitor variables and registers and set breakpoints.
View full article
There are a number of existing ISP Graph diagrams provided within the VSDK. It is possible to import them into S32DS and use them in a new C/C++ project. The steps to do this are detailed within this document. Prerequisite Before following the steps in this HOWTO, ensure you have the Vision Extension Package for V2xx (as well as the S32V2xx development package) installed to S32DS. 1) Launch S32DS 2) Select File -> New -> S32DS Application Project. 3) Enter a project name, such as: ISP_ISP_Generic_demo 4) Select 'A53 APEX/ISP Linux' 5) Click Next 6) Deselect the APEX2 options and 'ISP Visual Modeling' option. 7) Click Finish 😎 Select File -> New -> S32DS Project from Example. 9) Select isp_generic. 10) Select Finish 11) Open isp_generic in the project explorer 12) Double-click ISP data flow ; isp_generic. The ISP data flow graph will appear in the editor 13) Define a new configuration for emitting code from the graph       a) Right-click in the ISP data flow window and select Emit As -> Emit Configurations...       b) Select ISP Emitter       c) Press New Launch Configuration       d) Enter a name       e) To select the graph, press Browse Workspace       f) Expand each item until you can select the .isp file. Click OK       g) Select the location of the emitted output to the application project, select Browse Workspace       h) Select the name of your application project, then press OK       i) Enter 'A53_gen' to the Dynamic sequences sources folder box. This is the folder within the target project that generated code will be stored. Check the box for Emit host code.       j)Now select the location to store the configuration file. Go to the Common tab, select Shared file and click Browse       k) Select the .launches folder inside ISP_ISP_Generic_demo and click OK       l) Click Apply and Emit. Dialog box will appear when code generation is successful              m) Expand the folders within ISP_ISP_Generic_demo, A53_gen, src and inc, to see the newly generated output files 14) Build the project 'ISP_ISP_Generic_demo' for ISP 15) Open file 'ISP_ISP_Generic_demo/A53_inc/isp_user_define.h', by double clicking on it in the Project Explorer. Change '#define DCU_BPP DCU_BPP_YCbCr422' to '#define DCU_BPP DCU_BPP_24' and change '#define __DCU_BPP' to "#undef __DCU_BPP". Before After 16) Using the method detailed in steps 8 - 10, create the example project 'isp_sonyimx224_csi_dcu'. Take from this project the file 'isp_sonyimx224_csi_dcu/A53_src/main.cpp' and use it to replace the file 'ISP_ISP_Generic_demo/A53_src/main.cpp' in the current project. Then make the following modifications:  On line 36, change <#include "mipi_simple_c.h"> to <#include "isp_generic_c.h">. On line 303, change <gpGraph_mipi_simple> to <gpGraph> AND <gGraphMetadata_mipi_simple> to <gGraphMetadata> On line 330, change <FDMA_IX_FastDMA_Out_MIPI_SIMPLE> to <FDMA_IX_ISP_OUTPUT>. Please see C:\NXP\S32DS.3.1\S32DS\software\VSDK_S32V2_RTM_1_3_0\s32v234_sdk\docs\drivers\SDI_Software_User_Guide.pdf for details on what this code is for. 17) In Project Explorer, right-click on "...\A53_gen\src\isp_process.cpp" and select Build path -> Remove from -> A53 18) Select 'ISP_ISP_Generic_demo:A53' in the Project Explorer panel, then Build for A53 19) Run it remotely on the target using the method fromHOWTO: Create S32V234 Cortex-A53 Linux Project in S32DS . Should get results similar to this:
View full article
One of the many great features of the S32DS is the ability to access the Linux BSP file system on the SD card in the S32V234-EVB. Once connected, you can drag and drop files between your PC and the EVB. Once you have completed HOWTO: Setup S32V234 EVB2 for debugging with S32DS and Linux BSP  and HOWTO: Setup A Remote Linux Connection in S32DS (S32V234), you are ready to setup the Remote Systems view to connect to the Linux files system to view and access the file system. Prerequisite Before starting this procedure, make sure the BSP is loaded onto the SD Card, the SD Card is inserted into the SD Card Slot, the ethernet cable is connected to both the EVB and the network port, and the EVB is powered up. 1) Go to 'Window -> Show View -> Other' 2) Expand 'Remote Systems', then select "Remote Systems' and click OK 3) Click 'Define a connection to remote system' button OR right-click in the Remote Systems window and select 'New Connection...' from the list Right-click menu 4) Select 'SSH Only' 5) Enter the IP address noted from HOWTO: Setup A Remote Linux Connection in S32DS (S32V234) for Host name, enter a descriptive name for the connection (optional) and click Finish. 6) Right-click on the connection name in the Remote Systems window and select 'Connect' OR expand the folders under the connection name until the login window appears: Connection_name -> Sftp Files -> Root (window appears) 7) Enter "root" for User ID and since the BSP comes with ID root without a set password, leave the password field blank. 😎 Click OK 9) The Linux file system is now visible in the Remote Systems window. You can drag and drop files to and from here. Expand the folders to see the contents.
View full article
S32DS for Vision contains many example projects from which you can learn how S32DS, with the Vision Extension Package for V2xx, can be used with the help of the Vision SDK to develop vision applications. The example projects contain generated and hand-written code, which utilize the Vision SDK to demonstrate a workflow using S32DS. In this document, the procedure for creating a project from one of the provided APEX2 examples through to execution on the EVB is detailed. Prerequisite Before following the steps in this HOWTO, ensure you have the Vision Extension Package for V2xx (as well as the S32V2xx development package) installed to S32DS. 1) Launch S32DS 2) Select 'New S32DS Project from example' 3) Select apex2_fast9 project 4) Click Finish 5) Select apex2_fast9: A53 in the Project Explorer panel. Build the project using build config 'TEST_A53'. 6) Start a debug session using method as described in HOWTO: Create A53 Linux Project in S32DS for Vision, beginning at step 9. 7) Click Resume  Should see something similar to what is pictured below There are green diamonds at the corners in the image as identified by the fast9 corner detection algorithm
View full article
The S32 Design Studio for S32 Platform supports the S32R41 device with the S32 Debugger. This document provides the details on how to setup and begin a debugging session on the S32R41 EVB (X-S32R45-EVB). 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 S32R41 Development Package. Setup the hardware Confirm the setup of the S32R41 evaluation board.        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.        Connect the S32 Debug Probe to the host PC via USB, or 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 RTD example project Port_ToggleLed_S32R41_M7'. 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. Proceed to section ‘Start Debugger’ 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 the case of our example, 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 multicore 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, then proceed to next section ‘Start Debugger’. Start Debugger 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().
View full article
  In some cases FreeRTOS heap can consume huge portion of RAM memory - especially on small devices like S32K312 and for example DTCM memory is unused. FreeRTOS allows user defined heap which can be moved in any section in RAM.  First step - make sure, that in FreeRTOS config is application allocated heap is disabled:   Second step - open linker script file and create new section which points into DTCM memory:     Third step - define ucHeap variable with section attribute:     We are done - FreeRTOS Heap is moved into DTCM memory:    In case, that DTCM memory is used - typically there can be Interrupt Vector Table, stack and so on, you can skip creating new section in linker script file and simply add *(my_head) at the end of existing section mapped into dtcm:    FreeRTOS heap will be placet at the end of used DTCM memory:     
View full article