S32 Configuration Tool Knowledge Base

cancel
Showing results for 
Search instead for 
Did you mean: 

S32 Configuration Tool Knowledge Base

Labels

Discussions

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. It may also be necessary to include a DCD image, for example, to initialize the SRAM. 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.  Scroll down to the Application bootloader section, again use  'Browse File' and select the application binary. 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: From Project Explorer on the C/C++ perspective, open the linker file (in this case: hello_world\Project_Settings\Linker_Files\<device_name>_common_ram.ld) 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. Since the application binary file which was loaded for this example 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 the automatically calculated 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. This is because it has replaced the file you originally selected with the newly generated one and the tool has recognized that the file contains the required header information. Before the Blob image can be generated, all of the images must be properly aligned within the memory map. You will likely also see error messages regarding segment overlaps, but even without this error it is good to check that the alignment is correct.  In the Automatic Align section, if you have a dedicated area of the memory you can specify the start address and then click 'Align'. If you don't have a dedicated area, then use the default automatic align start address of 0x0 (QSPI), or 0x1000 (SD, MMC, eMMC). Click 'Align' to automatically align the images to this address. Upon successful completion of the alignment, all of the red shading will be removed. 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, or use the S32 Flash Tool.
View full article
Pin muxing is the process of assigning a peripheral function to a physical pin .  This video will explain how fast and easy is to a configured pin muxing using Pins Tool from S32 Configuration Tool suite. Example is a UART project from S32V microcontroller SDK.
View full article
IVT - short for Image Vector Table, is an image with a set of pointers to other images which are required at boot by the embedded BootROM.  This video will explain using S32V chip how IVT tool works and covers create and flash SDK's PIT example.
View full article
DCD(short for Device Configuration Data) is the configuration information that BootROM uses to configure the peripherals on the device. This video will explain using S32V how DCD works and create a simple example to have RUN1 as default run mode.
View full article
This short video will present an overview of S32 Configuration Tool. Tools that are briefly overviewed: Pins tool, clock tool, peripheral tool, DCD tool and IVT tool.
View full article
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 4 & 5, 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.
View full article
This document shows the step-by-step process to create a simple project which recreates the included example 'hello_world_s32v234'. The purpose of this demo is to provide the user with an example application for S32V234 platform, using S32 SDK. The demo toggles two LEDs (PTA8 and PTA9). This HW used in this demo is the SBC-S32V234 EVB, connected to a PC through NXP's S32 Debug Probe or P&E Micro's debug probe. Setup S32 Design Studio 3.1 or later installed AND S32V2xx development package installed SBC-S32V234 EVB connected to power AND switched ON Either S32 Debug Probe OR P&E Micro debug probe connected to the SBC-S32V234 EVB through JTAG connection. S32 Debug Probe connected to PC via either USB cable OR Ethernet cable (also requires power via included power supply and connected to USB port). For more information on HW setup, see HOWTO: Start Debug on an ISP Application Project with S32 Debugger and S32 Debug Probe . P&E Micro debug probe connected to PC via USB cable Procedure Create a new application project for M4 core File -> New -> S32DS Application Project Enter project name, select processor S32V234 Cortex-M4, click Next. Click '...' to select the SDK Select S32V234 SDK v1.0.0 (or later version) Notice the box is now checked for S32 Configuration Tool. The S32 Configuration Tool is dependent upon the S32 SDK. Select either S32 Debugger (default) or PE Micro GDB server. Click Finish The new project appears in the Project Explorer, notice the S32V234_M4.mex file is there as well. This .mex file contains all of the configuration data for the S32 Configuration Tool for this project. After clicking on the project name, the toolbar icon for the S32 Configuration Tool is now active. Click the S32 Configuration Tool button or double-click on the .mex file to open the S32 Configuration Tool perspectives. Notice the new perspective buttons in the toolbar: Go to Pins tool perspective, this is the default perspective that opens when the S32 Configuration Tool is launched. Notice there are errors at the lower right. There is a dependency upon the PINS driver from the S32 SDK. This driver is not mandatory, and while there are some rare cases where the drivers would not be needed, in most cases the user should choose to include them.                                                                                                                            To resolve the error, right-click on the error message to bring up the context menu and then select the option Add SDK component 'PINS' into the project '<project_name>'. After selecting the context menu option, you are presented with a confirmation window to review the list of files which will be added to the project. In this case, the option did not result in any new files, so there is nothing to review. You can check a box to avoid seeing this confirmation window in the future. Click Yes to confirm the changes. Select the Peripheral Signals tab at the upper left of the Pins perspective Check box for SIUL2 In the popup window Peripheral SIUL2, scroll to find gpio, 8 >> [A11] PA8 and gpio, 9 >> [B11] PA9. Check the box next to each. For each pin that is selected, an additional popup menu appears. Set both pins as Output. Then click OK and then Done. Set Identifiers for each as follows Pin Identifier PTA8/A11 LED1 PTA9/B11 LED2 Go to Peripherals tool Select Peripherals tab at upper left, check box to enable MC_ME Click OK. Now the driver is installed. Go to Clocks tool Change the following settings. They are not Run Mode specific. Hovering the mouse pointer over the object in the diagram will produce a tooltip window with information about the object including the name, current setting, output value, etc. Change prescaler ENETPLL_PHI0 (.pll2Config/.phi0Divider) from 2 to 8 Change the setting by first clicking on the prescaler box in the diagram, then clicking on the value in the 'Details' panel to the right. This brings up a list of available values. Select the desired value from the list. Once successfully changed, the values will be highlighted. Alternatively, a double-click on the value inside the prescaler box will bring up a drop list of the values and the selection can be made. Change prescaler VIDEOPLL_PHI0 (.pll4Config/.phi0Divider) from 4 to 2 Change mux AUX0_MUX (CGM0_AUX0_MUX) from FIRC to DDRPLL_DFS1 Change mux AUX8_MUX (CGM0_AUX8_MUX) from FIRC to DDRPLL_PHI0 To locate the next two, it is necessary to scroll down on the Clocks Diagram: Change mux CGM0_AUX7_MUX (MC_CGM_0_AUX7_MUX) from FIRC_CLK to ENETPLL_PHI0 Change mux CGM2_AUX2_MUX (MC_CGM_2_AUX2_MUX) from FIRC_CLK to ENETPLL_PHI0 Click Update Code Click OK Switch to C/C++ perspective Insert pins init using the configuration from 'board\pin_mux.c' If not already open, double-click on the following files from Project Explorer: 'board\pin_mux.c' 'src\main.c' Use the SDK Explorer Go to Quick Access field and enter 'sdk' Select 'SDK Explorer' If needed, drag the new SDK Explorer tab to the pane you prefer. In general, for this tool, a taller tab window works better. Select the project name in the Project Explorer tab and then expand the list under the SDK until you can see the list of CLOCK_DRV function defines. Drag and drop the function 'CLOCK_DRV_Init()' into main()  of 'main.c', after the comment '/* Write your code here */'. Now locate the PINS_DRV function defines. . Drag and drop the following functions into the main() function of 'main.c', after the function call CLOCK_DRV_Init(): PINS_DRV_Init() PINS_DRV_ClearPins() The function calls are not in the format we need so let's modify them: Drag and dropped from SDK Explorer Change to this for our application status_t = CLOCK_DRV_Init(const clock_user_config_t*); CLOCK_DRV_Init(&clock_InitConfig0); status_t = PINS_DRV_Init(uint32_t, const pin_settings_config_t[]); PINS_DRV_Init(NUM_OF_CONFIGURED_PINS, g_pin_mux_InitConfigArr); PINS_DRV_ClearPins (GPIO_Type* const, pins_channel_type_t); PINS_DRV_ClearPins( LED1_PORT, ((1<<LED1_PIN)|(1<<LED2_PIN)) ); clock_InitConfig0 is defined in 'board/clock_config.c' NUM_OF_CONFIGURED_PINS, LED1_PORT, LED1_PIN, LED2_PORT, LED2_PIN are defined in 'board/pin_mux.h' g_pin_mux_InitConfig_Arr is defined in 'board/pin_mux.h' LED1_PORT == LED2_PORT Replace the contents of the FOR loop to toggle the pins (PINS_DRV_TogglePins() comes from SDK Explorer) Original New for(;;) {      if(exit_code != 0)      {           break;      } } for (;;) {      /* Insert a small delay to make the blinking visible */      delay(720000);      /* Toggle output value LED1 & LED2 */      PINS_DRV_TogglePins(LED1_PORT, (1 << LED1_PIN)|(1 << LED2_PIN)); } Insert delay function code in main.c delay() void delay(volatile int cycles) {      /* Delay function - do nothing for a number of cycles */      while(cycles--); } Now main.c should look as follows Build the project Now we have the ELF file We are ready to run on the hardware. Open the Debug Configurations Select the debug configuration within the debugger grouping for the debugger that was chosen in the new project wizard (step 1f), and for build type Debug_TCM S32 Debugger/S32 Debug Probe Select the Debugger tab. Some setup is required to configure how we are connected to the S32 Debug Probe 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.   PEMicro GDB Server When debug probe setup is done, then click Debug to run the code. Agree to launch the debug perspective Now the debugger starts and you can see it has stopped on the default breakpoint at the first line in main(). From here you can Resume, Step, set a breakpoint, set watch variables and monitor registers. If you Resume, then you will see the LEDs on the EVB blinking. You can set a breakpoint on the PINS_DRV_TogglePins() and use Resume to see the LEDs come on and off.
View full article