Infineon MOTIX™ MCU TLE988x/9x Device Family SDK
Creating a project from scratch using the Config Wizard 2

This tutorial gives a step-by-step guidance on how a new project can be created along with the Config Wizard 2.

Create a new Keil µVision5 project

Creating the project for a dedicated device

1. Select Project --> New µVision Project...


2. Select the target folder and enter the name of the project, here tutorial1.
3. Click on Save to close the dialog window.


4. Select the target family and device, here TLE9893_2QKW62S.
5. Click on OK to close the dialog window.


6. In the Device branch select Startup and ConfigWizard.

Note
The yellow background means that certain components are missing for a complete runtime environment selection.

7. Click on Resolve to automatically select all missing items.


8. All essential modules are checked, check more modules if this is required for the project.
9. Click on OK to close the dialog window.


Adding a main.c file

10. A main.c file is still missing in the project, right click on Source Group 1.


11. Click on Add New Item to Group 'Source Group 1'....


12. Select User Code Template.
13. Expand Device and select Startup, this will add a simple main.c to the project.
14. Click on Add to close the dialog window.


15. The main.c file is present in the project now.
16. The function TLE_init() initializes the selected hardware modules (step 8) according to the Config Wizard 2 settings. Until this point a default configuration of the modules is given.
17. The function PMU_serviceFailSafeWatchdog() service inside an endless loop finalizes the simple main file.

Note
The function names TLE_init() as well as PMU_serviceFailSafeWatchdog() are underlined. This indicates that an online help is available for these functions. This online help can be reached by placing the cursor on the function name and pressing the F1 key.


Adding a linker file

Note
The C startup file provided by the SDK needs a Linker file to be configured. The SDK provided a default linker file, which is under your_project_path\RTE\Device\your_device_name\tle9883_93.sct or tle9881_91.sct (depending on your device selection). Please perform the following steps to add it to your project.

18. Open the Options for Target... dialog window.


19. Select the tab Linker.
20. Uncheck Use Memory Layout from Target Dialog.
21. Click on ... next to the scatter file config.


22. Navigate to your_project_path\RTE\Device\your_device_name\tle9883_93.sct or tle9881_91.sct and click Open to select the file.
23. Save the settings and close the Options for Target... dialog window by clicking OK.


Compiling the project

24. The project is now ready to be compiled, press the Rebuild button to build the project.
25. The Build Output window displays the compiling and linking outputs along with the code size and number of errors and warnings.


Flashing the project to a target device (debugger settings)

Note
If a Keil U-Link2 debugger is used for the code download, then the code can be downloaded to the device directly. If you are using the evalboard or the application kits, the on-board Segger J-Link is used. The desired debugger has to be selected selected and configured in the following steps:

26. Open the Options for Target... dialog window.


27. Select the tab Debug.
28. From the drop-down box on the top right select J-LINK / J-TRACE Cortex.


29. Click on Settings to open the settings dialog window.


30. Select SW (serial wire) port, JTAG is not supported by the device. 31. If the device is powered, the ARM CoreSight ID should be listed here. This confirms that the debugger can see the target device.
This ARM CoreSight ID is for an ARM Cortex-M3.
32. Click on OK to close all dialog windows.


33. Click on Download to flash the project executable to the device.


Opening and working with Config Wizard

34. From the Tools menu select Config Wizard 2.x.x to start up the Config Wizard 2.

Note
In case Config Wizard 2.x.x does not show up in the Tools menu, the Config Wizard 2 may not be installed. Download and install Config Wizard 2 from the tools section of Infineon Developer Center and restart Keil µVision5.


35. Make all the adjustments and settings to the peripheral modules as required for the project. Press CTRL + S to save your settings.

SDK Usage Hints