This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
16. RTX_Blinky example program with Keil RTX RTOS: 12
17. RTX Kernel Awareness: 13
18. DSP SINE example using ARM CMSIS-DSP Libraries: 14
19. Creating Your Own MDK 5 project from scratch: 17
Changing the Processor Clock Speed: 19
20. Creating Your Own RTX MDK 5 project from scratch: 20
Part C: Projects created with Infineon DAVE: 21. Blinky: 23
22. RTX_Blinky 30
Appendix:
23. Document Resources: 38
24. Keil Products and contact information: 39
In
P
1
2Wr
Ka
3TUd
4Tth
5
M
F
A
I
nfineon XMC110
Part A: O
1) Keil So1. Down
2. Install
3. We re
4. If you
5. The ex
6. You d
2) ComplWithout a licenreferred to MD
Keil offers a coa license. Insta
3) The onThe on-board JUSB drivers codrivers as well
4) ExampThe UART_Blihis document a
5) Getting
More Inform
For more inform
ARM Commu
Infineon Comm
ConcepIn order toregister bmanual taUsing DAYou can dproject wDAVE Apsoftware tbecome Cadd that aOnce DAplug-ins fDAVE anDAVE wYour proj
Documen
DAVE tuDAVE HUsing DA
00 Cortex-M0 Lab
btaining a
oftware Dnload MDK 5.1
l MDK into the
commend you
install MDK o
xamples Blinky
do not need any
imentary nse, MDK funcK Lite. You c
omplimentary Mallation instruct
n-board J-J-Link Lite adaome with the Das instructions
ple Prograinky example pat www.keil.co
g Started
mation and K
mation about K
unity Forums:
munity Forum
pt: Why Useo successfully its in complica
asks rather easiAVE for even mdevelop and deith the periphepps are programthat configures
C source files thare specific to y
AVE creates a pfor µVision or nd the new filesill not modify jects can use R
ntation and He
utorials are avaielp is available
AVE with MDK
b with XMC 2Go
and Instal
ownload a1a or later from
e default direct
use the defaul
or the example
y5, DSP5 and R
y external debu
MDK Licections but is limcan use MDK L
MDK license ftions are also a
-Link Lite apter is used exDAVE downloas on installing t
ams: program is proom/appnotes/do
MDK 5: O
Keil Contacts:
Keil support for
www.keil.com
m: www.infine
e DAVE ? configure mod
ated data sheetsily. DAVE takmildly complicebug your progeral configuratims that are sels elements suchhat are compileyour project. project, you canDAVE are nees will be imporor delete them
RTX RTOS or n
elp:
ilable on wwwe by selecting HK 5: www.keil
board
lling MDK
and Instam the Keil web
tory. You can
lt examples dir
s into a differe
RTX_Blinky5
ug adapters: jus
ense: mited to a 32K Lite for this tut
for Infineon XMavailable at this
Debug Adxclusively in thad and are also the USB driver
vided in the Mocs/apnt_260.a
Obtain this usef
:
r Infineon prod
m/forum and
eonforums.com
dern microconts is required. Dkes care of the mcated developmgrams either wiions that you sected and confh as peripheraled by DAVE a
n easily importeded. Do not mrted into µVisi. not. Using RT
w.infineon.com/Help/Help Conl.com/appnotes
3
and the E
llation: bsite. www.ke
install into any
ectories for thi
ent directory, y
are available o
st the 2Go boar
compilation siorial. Adding
MC1100 proces URL.
dapter: is lab. Instructincluded with
rs. This docum
MDK 5 Softwarasp. The next p
ful book here: w
ducts please vi
http://commun
m/
trollers peripheDAVE is a grapmany details th
ment can save aith MDK by itsselect. figured to yours and other com
Infineon XMC1100 Cortex-M0 Lab with XMC 2Go board www.keil.com
4
6) µVision Software Packs Download and Install Process: 1) Start µVision and open Pack Installer:
1. Connect your computer to the internet. This is normally needed to download the Software Packs.
2. Start µVision by clicking on its desktop icon.
3. Open the Pack Installer by clicking on its icon: A Pack Installer Welcome screen will open. Read and close it.
4. This window opens up: Select the Devices tab: Under the Devices tab, Select Infineon XMC1100 as shown below: This will filter the list under the Packs tab.
5. Note “ONLINE” is displayed at the bottom right. If “OFFLINE” is displayed, connect to the Internet.
6. If there are no entries shown because you were not connected to the Internet when Pack Installer
opened, select Packs/Check for Updates or to refresh once you have connected to the Internet.
2) Install The XMC1000 Software Pack:
1. Select the Packs tab.
2. Initially, the Software Pack ARM::CMSIS is installed by default. These contain system headers and source files.
3. Select Infineon::XMC1000_DFP and click on Install. This Software Pack will download and install to C:\Keil_v5\ARM\Pack\Infineon\XMC1000\ by default. This download can take two to four minutes.
4. A Software Pack status is indicated by the “Up to date” icon:
TIP: If you click on the Boards tab, you can select the board you are using and only relevant Packs are displayed.
3) Install the UART Blinky MDK 5.11a Example:
1. Select the Boards tab. Select XMC 2Go (V1):
2. Select the Examples tab.
3. Select UART Blinky (XMC 2Go):
4. Select Copy as shown here:
5. This window opens up: Select Use Pack Folder Structure. Unselect Launch µVision as shown below
6. Type in C:\MDK. Click OK to copy the RTX_Blinky project.
7. UART Blinky will copy to C:\MDK\Boards\Infineon\XMC_2Go\. Pack Installer creates the rest of the directory tree after C:\MDK\.
TIP: The default directory for copied examples the first time you install MDK is C:\Users\<user>\Documents. For simplicity, we will use the default directory of C:\MDK\ in this tutorial. You can use any directory you prefer.
8. Close the Packs Installer. You can open it any time by clicking on its icon.
9. Select Yes when Reload Packs box is displayed. This updates the µVision Pack database
4) Install the RTX_Blinky5 and DSP5 examples from Keil.com:
1. Obtain the example software zip file from www.keil.com/appnotes/docs/apnt_260.asp.
2. Unzip this into the directory C:\MDK\Boards\Infineon\XMC_2Go\.
3. RTX_txt, RTX_Blinky5 and DSP5 folders will be created with the UART_Blinky folder as shown:
TIP: An Update icon means there is an updated Software Pack available for download.
TIP: If you look in the directory C:\Keil_v5\ARM\Pack\Infineon\XMC1000_DFP\1.0.2\Boards\Infineon\XMC_2Go, you will find another UART Blinky. This is the read-only version you downloaded for backup purposes. Use only the projects you copied over from the Examples tab to the directory you chose: in this tutorial we have used C:\MDK.
The next page has a few notes on Software Packs Maintenance plus how to test the J-Link debug connection:
Infineon XMC1100 Cortex-M0 Lab with XMC 2Go board www.keil.com
7
11) Call Stack + Locals Window: Local Variables: The Call Stack and Local windows are incorporated into one integrated window. Whenever the program is stopped, the Call Stack + Locals window will display call stack contents as well as any local variables belonging to the active function. If possible, the values of the local variables will be displayed and if not, the message <not in scope> will be displayed.
1. Open the Call Stack + Locals window by clicking on its tab.
2. Shown is the Locals window for the main function with the hardware breakpoint active from the previous page.
3. The contents of the local variables are displayed.
4. This display results when the breakpoint is set on the line if (ticks_uart == TICKS_UART_EVENT).
5. With the breakpoint set as in the previous page, each time you click on RUN, these locals will update as appropriate.
TIP: The contents of the local variables are displayed as well as names of active functions. Each function name will be displayed as it is called from the function before it or from an interrupt or exception. Exactly which local variable that will be visible or not depends on precisely where you stop the program.
When a function exits, it is removed from the list.
The most recent called function is at the top of this table.
This table is active only when the program is stopped.
6. Click on the Step In icon or F11:
7. Variables will update as appropriate. You will probably exit SysTick_Handler quickly in a few steps.
8. If not in the SysTick_Handler, click on RUN to get back in it. Your breakpoint will stop in it.
9. Click on the StepOut icon (Ctrl-F11) to exit the SysTick_Handler function to return to main().
10. Remove any breakpoints when you are done. You can click on them individually or Ctrl-B and select Kill All.
TIP: You can modify a variable value in the Call Stack & Locals window when the program is stopped.
Call Stack: The list of called functions is displayed when the program is stopped. This is very useful for debugging when you need to know which functions have been called and are stored on the stack.
11. Right click on a function name and try the Show Callee Code and Show Caller Code options as shown here: The appropriate code will be shown in the source and/or disassembly windows.
TIP: Use the Symbol window to locate and view components of your program including variables, structures and arrays. Select View/Symbol Window while in Debug mode.
TIP: For help finding Fault Exceptions see: www.keil.com/appnotes/docs/apnt_209.asp
In
1
WA
TWm
To
M
TS
Ty
TP
nfineon XMC110
12) WatcThe WatchCoreSight into the Memanually.
Watch windoAdd a global v
1. Stop th
2. Declar
3. Add th
4. Select
5. Click
6. Enter runnin
7. Select
8. In Blinopen.
9. count
TIP: You can Watch or Memmanually by do
TIP: To Drag ‘opens, move yo
Memory win1. Right
2. Note taddres
3. Add an
4. Right
5. The da
6. Both t
7. Right-select variab
TIP: No CPU Structures can a
TIP: To viewyou select a var
These Read andPort (DAP), wh
00 Cortex-M0 Lab
h and Memh and Memory debugging techemory windowYou can also
ow: variable: Call
he processor
re a global vari
unsigned
he statements n
counter+
if (count
t File/Save All.
on Rebuild
Debug mode. ng or not. You
t View and sele
nky.c, right cli counter will
ter will update
also block a vamory windows. ouble-clicking
‘n Drop into a our mouse into
ndow: click on count
the value of coss a pointer is p
n ampersand “
click in the me
ata contents of
the Watch and
-click with the Modify Memo
ble on-the-fly w
cycles are usedalso be display
w variables and riable from the
d Write accesshich provides o
b with XMC 2Go
mory Winwindows will hnology that is
w in real-time. right click on a
Stack, Watch
and exit Deb
iable is the usu
d int counter =
near line 185 ju
++;
ter > 0xF) cou
.
and program
Click on Ru can also do th
ect Periodic W
ck on counterl be displayed a
e in real time.
ariable name dYou can also
<Enter express
tab that is not ao the appropriat
ter and select
ounter is disppointing to: but
“&” in front of
emory window
f counter is di
Memory wind
mouse cursor ory. You can cwhile the progra
d to perform thyed and expand
their location ue Symbols wind
es are handled on-the-fly mem
board
ndows anddisplay updates a component It is possible t
Infineon XMC1100 Cortex-M0 Lab with XMC 2Go board www.keil.com
22
Compile and Run Your RTX BlinkyNEW Project:
1. Build the files. If there are errors or warnings please fix these before continuing.
2. Program the Flash:
3. Enter Debug mode: Click on the RUN icon.
4. No LEDS will blink. This program does not use them.
Add the two global variables countA and countB to the Watch 1 window.
5. Right click on countA and select Add countA to… and select Watch 1.
6. Right click on countB and select Add countB to… and select Watch 1.
7. These two variables will be displayed in Watch 1 and will be incrementing as shown here:
Congratulations: Your First RTX program is running correctly !
TIP: counter and SystemCoreClock are left over from previous steps.
Open the System and Threads Viewer:
8. Select Debug/OS Support and select System and Threads Viewer. the following window opens up: You probably have to drag into the middle of your screen.
9. The various elements will be updating in real-time as your RTX program is running.
10. Note the idle daemon is running most of the time. You can change this ratio if you want to.
11. Set a breakpoint in each thread.
12. Each time you click on RUN the program will advance to the next thread repeatedly.
13. The active thread will display Running in the State column.
This ends the exercise creating your own RTX Blinky project. You can easily add more threads and modify the timing. When you are finished, stop the program and leave Debug mode. Obtain the Keil Getting Started MDK 5 Manual: www.keil.com/mdk. It contains valuable information of using RTX. Extensive help files are included with MDK 5. So far, we have created projects from scratch or a fundamental beginning. The next section deals with creating projects using Infineon DAVE.
Infineon XMC1100 Cortex-M0 Lab with XMC 2Go board www.keil.com
23
PART C: Creating projects with Infineon DAVE and MDK 5: This document uses DAVE 3.1.10 or later to create both a Blinky and an RTX_Blinky project. Please install DAVE to your computer in the usual manner. See installing the J-Link drivers on page 4. They must be correctly installed.
Select Help/Check for Updates to make sure you have the latest software.
You must have downloaded and installed the XMC1100 Packs into µVision as shown on page 4.
21) Blinky using DAVE: We will create a µVision project using DAVE to blink the two LEDs on the 2Go board. Two PWMs will be created and configured: each one blinks one LED. DAVE will then create a µVision project and µVision will then import it.
Start DAVE and create a DAVE project:
1. Start DAVE by clicking on its icon:
2. Select File/New/Dave Project and this window will open:
3. Select DAVE CE Project: Always select Dave CE.
4. In Project Name box enter Blinky as shown here:
5. Select Next > and the Target Selection Page opens:
6. Select XMC1100-QO24F0064 or the processor you are using:
7. Confirm Add/Update startup files is enabled.
8. Click on Finish. DAVE will create your project.
9. The Blinky project will be displayed in the DAVE C/C++ Projects window as shown below.
10. Expand some of the elements.
11. You will see a Main.c and two CMSIS startup files.
12. Double click on Main.c, it will open in a window.
13. You can see DAVE has created a template Main.c with an int main(void) function but not much else.
14. If you open the startup files found in the Startup folder, you can see startup_XMC1100.s which contains processor initialization code and system_XMC1100.c contains mostly clock settings.
TIP: DAVE dynamically saves all your work as you progress into your default workspace: C:\DAVE3_workspace. You can manually save your work with File/Save or Ctrl-S.
15. We will next create two PWMs to blink the LEDs.
Infineon XMC1100 Cortex-M0 Lab with XMC 2Go board www.keil.com
24
DAVE Apps: DAVE includes Apps that you can graphically configure to create programs to suit your needs. These are programs DAVE uses to create the source code files that will become part of your µVision project. Select Help/Check for DAVE App Updates to make sure you have the latest software.
1. Apps are listed in the App Selection View. 2. Scroll through them to see your options. 3. Enter pwm in the Search filter:
TIP: If you hover your mouse over an App, a description of it will display. See the TIP: below for more details.
4. We will use two instances of the App PWMSP001 to blink each LED on and off.
Create Two PWMs to Blink the LEDs: 1. Under the heading PWM Generation, double click on
the PWMSP001. 2. This will be added in the S/W App Connectivity View. 3. Double click again on the same PWMSP001 App. 4. The Apps Shareability window will open. Select
app/ccu4global/0 as shown below: 5. Click on OK. 6. The second instance will now be added: 7. Your S/W App Connectivity View will be similar to the
one shown below: You can move your Apps around. 8. Note there are two instances of PWMSP001 (denoted by
/0 and /1), a Capture/CompareUnit 4(CCU) and a CLK002/0 clock App. These last two Apps are automatically inserted by Dave.
TIP: App Help: Select Help and click on Help Contents. On the left, click on DAVE Apps. A listing of the Apps will open.
Infineon XMC1100 Cortex-M0 Lab with XMC 2Go board www.keil.com
25
Configure PWM /0:
1. Right click on PWMSP001/0 and select UIEditor. This window opens up: 2. Set Start to Start during initialization: 3. Set CCU4 Resolution to 32000 nsec. 4. Set PWM freq to 1 Hz: 5. Select the Signal Configurations tab and set
the Output Level to Passive High. 6. Leave all else at their defaults.
Connect PWM /0 output to GPIO Port Pin P1.0:
1. Right click on PWMSP001/0 again and select Manual Pin Assignment and the next window opens up.
2. Select Resource to pin_directoutput and Port Pin number P1.0/ #14 as shown below:
3. Select Solve And Save and then Close to assign this pin.
Configure PWM /1:
1. Right click on PWMSP001/1 and select UIEditor and a similar window opens up. 2. Set Start to Start during initialization: 3. Set CCU4 Resolution to 32000 nsec. 4. Set PWM freq to 1 Hz: 5. Select the Signal Configurations tab and set the Output Level to Passive Low. This puts PWMMSP001/1 180 º out
of phase with PWMMSP001/0. When one LED is on, the other will be off. Connect PWM /1 output to GPIO Port Pin P1.1:
1. Right click on PWMSP001/0 again and select Manual Pin Assignment and the next window opens up. 2. Select Resource to pin_directoutput and Port Pin number P1.1/ #13 as shown below:
Note: P1.0 is no longer listed. DAVE knows you have already assigned Pin 1.0 so it removes it from the list. 3. Select Solve And Save and then Close to assign this pin.
4. The PWMs are now completely configured. All we need do is Build the project and export it into µVision 5. TIP: If your entries do not seem to work: ensure they are accepted by pressing Enter or clicking on another element.
Infineon XMC1100 Cortex-M0 Lab with XMC 2Go board www.keil.com
26
Generator Package Description (gpdsc) File: DAVE produces a complete µVision project and in addition a gpdsc file. This file is used to start, import and configure the appropriate files into µVision.
Configure DAVE to create a gpdsc file: (you only have to do this once in DAVE for all your projects)
1. In the DAVE main window, select Window/Preferences and this window opens up:
2. Expand Dave and select DAVE CE Preferences as shown here:
3. Select Generate gpdsc file as shown:
4. Click on OK.
Generate the Code:
5. Click on the Generate Code icon or select DAVE/Generate Code.
6. The appropriate files will be created and a progress bar will be displayed.
7. The C/C++ Projects window will display the files in this project.
8. Blinky.gpdsc will be visible in the window as shown below right:
TIP: If you do not want another instance of µVision running, close the running instance(s) of µVision before double clicking on the gpdsc file. Running multiple instances of µVision is permitted but a conflict with the J-Link Lite might arise in this case.
Import into µVision:
1. Close µVision.
2. Double click on Blinky.gpdsc and a new instance of µVision will be started.
TIP: At this time you can shut DAVE down if you prefer. It is not needed again unless you want to add or modify any settings that must be done in DAVE. Otherwise, µVision can work stand alone with the files DAVE created for it.
On the next page, we will configure µVision, build the project, program it to Flash and run it.
In
C
Ac
Ty
.
Tth
C
Aµp
nfineon XMC110
Configure µVi
After double clcreated are liste
This is almost cyour own, or us
1. Right
2. In the
3. Main.c
TIP: If you crehat you can ch
Configure the
1. Plug y
2. In µVi
3. Select
4. Select
5. Select
6. Select
7. Select
8. ConfirIf this your 2EnsureUSB d
9. The SNconneSW Dalso coproces
10. Click
11. SelectDebug
12. SelectFlash displayhighligalgorit
13. Click
14. Select
At this point, yµVision to be aproject that DA
00 Cortex-M0 Lab
ision:
licking on Blined in the projec
complete: youse the one DAV
click on Sourc
Add Files win
c will now be a
eate and add yohoose from.
Debug Adapt
your 2Go board
ision, select th
t the Target tab
t the Debug tab
t J-Link / J-Tra
t Settings: on th
t SW and not JT
rm you see an Ibox is blank, o
2Go board is ple you have the drivers installed
N: box indicatected to the J-L
Device box indionnected to thessor CoreSight
on OK to leave
t the Utilities tag Driver:
t Settings. If thalgorithm is noyed, select Addght the correct thm as shown b
on OK twice to
t File/Save All
ou have now cable to build anAVE created.
b with XMC 2Go
nky.gpdsc, µVict window as s
u must now addVE created. W
ce Group 1 and
ndow, highlight
added to Sourc
our own new f
ter and Flash p
d to your PC w
e Options for T
b. Select Use M
b.
ace Cortex as sh
he right side of
TAG as shown
IDCODE and Dor an error is dlugged in. correct J-Link
d.
es µVision is ink Lite. The cates µVision e XMC1100 debug module
Infineon XMC1100 Cortex-M0 Lab with XMC 2Go board www.keil.com
30
22) Create an RTX_Blinky project using DAVE: We will create a µVision project using DAVE to blink the two LEDs on the 2Go board. RTX is used. We will use direct software control of Port 1.0 and 1.1 to blink the LEDS using two simple threads. DAVE will then create a µVision project and µVision will then import it. It is easy to add additional threads.
Start DAVE and create a DAVE project:
1. Start DAVE by clicking on its icon:
2. Select File/New/Dave Project and this window will open:
3. Select DAVE CE Project:
4. In Project name box enter RTX_Blinky as shown here:
5. Select Next > and the Target Selection Page opens:
6. Select XMC1100-QO24F0064 or the processor you are using as shown in the Target Selection window::
7. Confirm Add/Update startup files is enabled.
8. Click on Finish. DAVE will create your project.
9. The Blinky project will be displayed in the C/C++ Projects window as shown below.
10. Expand some of the elements.
11. You will see a Main.c and two CMSIS startup files.
12. Double click on Main.c, it will open in a window.
13. You can see DAVE has created a template main.c with an int main(void) function but not containing much else.
14. If you open the startup files, you can see startup_XMC1100.s which contains processor initialization code and system_XMC1100.c which contains mostly clock settings.
TIP: DAVE dynamically saves all your work as you progress with your default workspace: C:\DAVE3_workspace. You can manually save your work with File/Save or Ctrl-S.
15. On the next page, we will create and configure the two IO ports to blink the LEDs.
Infineon XMC1100 Cortex-M0 Lab with XMC 2Go board www.keil.com
31
DAVE Apps:
Dave includes Apps that you can graphically configure to create programs to suit your needs. We will use the RTOS001 App and two instances of the IO Ports App IO004 to create our demonstration program.
In this project, RTX RTOS files are supplied by DAVE. Apps available are listed in the App Selection View.
1. Scroll through them to see your options.
TIP: If you hover your mouse over an App, a description of it will display as shown in this window.
2. We will use two instances of the App IO004 to blink each LED on and off directly through the GPIO ports.
3. Enter io in the Search filter as shown here:
Create Two IO ports to Blink the LEDs:
6. Under the heading I/O Ports/Software Controlled IO App: Double click on the IO04 App as shown here:
7. This will be added in the S/W App Connectivity View.
8. Double click again on the same IO04 App.
9. The second instance will now be added:
10. Your S/W App Connectivity View will contain the two IO Apps. There are two instances of IO04 (denoted by /0 and /1)
Create the RTX RTOS001 Instance:
11. Enter rtos in the Search filter as shown here: Press Enter to make it active.
12. Double-click on RTOS001. This will be entered in your project.
13. The clock CLK002/0 is inserted automatically by DAVE.
14. Your completed App Connectivity View will look like the one below. You can move the icons around.
15. The next steps will configure the IO and RTOS Apps.
TIP: App Help: Select Help and click on Help Contents. On the left click on DAVE Apps. A listing of the Apps will open.
Infineon XMC1100 Cortex-M0 Lab with XMC 2Go board www.keil.com
32
Configure IO004/0: 1. Right click on IO004/0 and select UIEditor. This window opens up: 2. Enable Output Enable as shown here: 3. Select Default Output level to High: 4. Leave all else at their defaults.
Connect IO004/0 output to GPIO Port Pin P1.0: 5. Right click on IO004/0 again and select Manual
Pin Assignment and the next window opens up. 6. Select pin in the Resource box. Select P1.0/ #14
in the Port Pin Number box as shown below: 7. Select Solve And Save and then Close to assign
this pin. Configure IO004/1:
1. Right click on IO004/1 and select UIEditor and a similar window to the one above opens up. 2. Enable Output Enable as shown above the same way you configured IO004/0.
Connect IO004/1 output to GPIO Port Pin P1.1:
3. Right click on IO004/1 again and select Manual Pin Assignment and the Manual Pin Assignment window opens. 4. Select Resource to pin and Port Pin number P1.1/ #13 similar to the above screen. 5. Select Solve And Save and then Close to assign this pin. 6. The IO ports are now configured.
Configure RTOS001/0:
1. Right click on RTOS001/0 and select UIEditor, This window that opens has various tabs:.
2. Leave everything at their default values. 3. Click through the tabs to view the various
options available to you. 7. RTX is now completely configured. All we
need do is Build the project and export it into µVision 5.
Infineon XMC1100 Cortex-M0 Lab with XMC 2Go board www.keil.com
33
Generator Package Description (gpdsc) File: DAVE produces a complete µVision project and in addition a gpdsc file. This file is used to start, import and configure the appropriate files into µVision.
Configure DAVE to create a gpdsc file: TIP: You need set the Generate gpdsc bit only once for all your DAVE projects.
1. In the DAVE main window, select Window/Preferences and this window opens up: 2. Expand Dave and select DAVE CE
Preferences as shown here: 3. Select Generate gpdsc file… as shown: 4. Click on OK.
Generate the Code:
5. Click on the Generate Code icon or select DAVE/Generate Code.
6. The appropriate files will be created and a progress bar will be displayed.
7. The C/C++ Projects window will display the files in this project.
8. Blinky.gpdsc will be visible as shown below right:
Import into µVision: 1. Close uVision. This prevents multiple instances from opening.
2. Locate the file Blinky.gpdsc as shown here:
3. Double click on Blinky.gpdsc and a new instance of µVision will be started.
TIP: If you do not want another instance of µVision running, close the running instance(s) before double clicking on the gpdsc file. Running multiple instances of µVision is permitted but a conflict concerning the J-Link Lite might arise in this case. On the next page, we will configure µVision, add source code, build the project, program the Flash and run it.
TIP: You can close DAVE now or leave it open. It is not needed as µVision can work with the project independently. You will only need DAVE if you want to modify or add an App.
In
C
Aa
Eth
.
Tt
C
AM
nfineon XMC110
Configure µVi
After double clare listed in the
Enter Main.c: he one DAVE
1. Right
2. In the
TIP: If you creemplates will b
Configure the
1. Conne
2. In µVi
3. Select
4. Select
5. Select
6. Select
7. ConfirIf this your 2correc
8. The SNthe J-LµVisioproces
9. Click
10. SelectDriver
11. Selectprogradisplay
12. Selectappropbelow
13. Click the ma
14. Select
At this point, yMain.c does no
00 Cortex-M0 Lab
ision:
licking on Bline project windo
You must addcreated. We w
click on Sourc
Add Files win
eate and add yobe offered that
Debug Adapt
ect your 2Go b
ision, select th
t Use MicroLIB
t the Debug tab
t Settings: on th
t SW as shown
rm you see an Ibox is blank, o
2Go board is plct J-Link USB d
N: box indicateLink Lite. Theon is connectedssor CoreSight
on OK to close
t the Utilities tar as shown here
t Settings and iamming algorityed, you must
t Add and highpriate entry as . Click on Add
OK to close anain µVision wi
t File/Save All
ou have configot yet have the
b with XMC 2Go
nky.gpdsc, µViow as shown he
d a file containwill use the one
ce Group 1 and
ndow, highlight
our own file, yyou can choos
ter and Flash p
oard to your PC
e Options for T
B for smaller c
b. Select J-Link
he right side of
here in the Po
IDCODE and Dor an error is dlugged in. Ensdrivers are inst
es µVision is ce SW Device bod to the XMC1debug module
Infineon XMC1100 Cortex-M0 Lab with XMC 2Go board www.keil.com
38
23) Document Resources: See www.keil.com/infineon Books:
1. NEW! Getting Started MDK 5: Obtain this free book here: www.keil.com/mdk5/.
2. There is a good selection of books available on ARM processors. A good list of books on ARM processors is found at www.arm.com/university by selecting “Teaching Resources”. You can also select ARM Related Books but make sure to also select the “Books suited for Academia” tab to see the full selection.
3. µVision contains a window titled Books. Many documents including data sheets are located there.
4. A list of resources is located at: www.arm.com/products/processors/cortex-m/index.php Click on the Resources tab. Or search for “Cortex-M3” on www.arm.com and click on the Resources tab.
5. The Definitive Guide to the ARM Cortex-M0/M0+ by Joseph Yiu. Search the web for retailers.
6. The Definitive Guide to the ARM Cortex-M3/M4 by Joseph Yiu. Search the web for retailers.
7. Embedded Systems: Introduction to Arm Cortex-M Microcontrollers (3 volumes) by Jonathan Valvano.