Upload
mac-an
View
9
Download
0
Embed Size (px)
DESCRIPTION
Tivam4 Tut Bai1 Ccs
Citation preview
7/21/2019 Tivam4 Tut Bai1 Ccs
http://slidepdf.com/reader/full/tivam4-tut-bai1-ccs 1/22
1
7/21/2019 Tivam4 Tut Bai1 Ccs
http://slidepdf.com/reader/full/tivam4-tut-bai1-ccs 2/22
Giơi thiêu
Code Composer Studio (CCS)cho Tiva C series
28/10/2014
TIVA ARM Cortex-M4
TM4C123G Tutorial
2
7/21/2019 Tivam4 Tut Bai1 Ccs
http://slidepdf.com/reader/full/tivam4-tut-bai1-ccs 3/22
TIVA ARM Cortex-M4 TM4C123G Tutorial11/5/2014 3
Cai đăt CCS
Cai đăt TivaWare
To project mơi
Np code va debug
7/21/2019 Tivam4 Tut Bai1 Ccs
http://slidepdf.com/reader/full/tivam4-tut-bai1-ccs 4/22
TIVA ARM Cortex-M4 TM4C123G Tutorial
Download CCS ti đach :http://processors.wiki.t
i.com/index.php/Down
load_CCS Khi ci đt, trong
phn Processor
Support, chn “Tiva C
Series ARM MCUs”
4
Cai đăt CCS
7/21/2019 Tivam4 Tut Bai1 Ccs
http://slidepdf.com/reader/full/tivam4-tut-bai1-ccs 5/22
TIVA ARM Cortex-M4 TM4C123G Tutorial 5
Cai đăt CCS
Project
explorer
Editor
Problems and console
7/21/2019 Tivam4 Tut Bai1 Ccs
http://slidepdf.com/reader/full/tivam4-tut-bai1-ccs 6/22
TIVA ARM Cortex-M4 TM4C123G Tutorial
Khi ci đt CCS xong, bndng dây cp nôi cng
USB trên my tnh vi
cng USB trên mch v
tr như hnh ve . My tnh s tư đng ci
driver ca mch. Sau khi
my ci driver xong, bn
vo Device Manager, chn
mc Ports s thy hin
cng COM o.
6
Cai đăt CCS
7/21/2019 Tivam4 Tut Bai1 Ccs
http://slidepdf.com/reader/full/tivam4-tut-bai1-ccs 7/22
TIVA ARM Cortex-M4 TM4C123G Tutorial
TivaWare l thư vin do hng TI cung cp nhăm
gip ngưi dng sư dng cc module ca dng
Tiva mt cch dê dng hơn.
Download va ci đt Tivaware ti đa chhttp://www.ti.com/tool/sw-tm4c.
Khi ci đt xong, bn c thê xem ti liu vê Tivaware năm trong thư mc TivaWare_C_Series-
x.x\docs trong thư mc ci đt (thưng l C:\TI).
7
Cai đăt TivaWare
7/21/2019 Tivam4 Tut Bai1 Ccs
http://slidepdf.com/reader/full/tivam4-tut-bai1-ccs 8/22
TIVA ARM Cortex-M4 TM4C123G Tutorial 8
File-> New-> CCS Project
va chn như hnh ve .
To project mơi
7/21/2019 Tivam4 Tut Bai1 Ccs
http://slidepdf.com/reader/full/tivam4-tut-bai1-ccs 9/22
TIVA ARM Cortex-M4 TM4C123G Tutorial 9
Bn c thể add (copy hoc link) mt file c sn vo
project băng cch click phi vo tên project trong
ca sô Project Explorer va chn Add Files.
“Copy files”: file s đưc copy vo thư mc ca
project.“Link to files”: đưng dn ti file s đưc lưu li.
Add file vao project
7/21/2019 Tivam4 Tut Bai1 Ccs
http://slidepdf.com/reader/full/tivam4-tut-bai1-ccs 10/22
TIVA ARM Cortex-M4 TM4C123G Tutorial 10
Copy Link
Thay đi trên file s khôngnh hưng file gôc. Thay đi trc tip trên file gôc.
File năm trong thư mc
project.
File không năm trong thư mc
project, ch c đưng dn ti
file đưc lưu li.
Khi thay đi v tr project, ta
không cn ch nh sa đưng
dn.
C thê phi ch nh sa đưng
dn ti file khi ta thay đi v tr project.
7/21/2019 Tivam4 Tut Bai1 Ccs
http://slidepdf.com/reader/full/tivam4-tut-bai1-ccs 11/22
TIVA ARM Cortex-M4 TM4C123G Tutorial
Chia s project vi my khc dê dng.
Di chuyển project dê dng.
Thay đi phiên bn thư vin dê dng.
11
Portable project
7/21/2019 Tivam4 Tut Bai1 Ccs
http://slidepdf.com/reader/full/tivam4-tut-bai1-ccs 12/22
TIVA ARM Cortex-M4 TM4C123G Tutorial
Path variable: cha đưng dn nn (base path)
để to đưng dn tương đôi ti cc file đưc add
vo project. V d: PROJECT_LOC l mt path
variable. Build variable: đưc dng khi trong qu trnh
build, để link ti cc file header hay thư vin cn
cho qu trnh build project.
12
Path variable va Build variable
7/21/2019 Tivam4 Tut Bai1 Ccs
http://slidepdf.com/reader/full/tivam4-tut-bai1-ccs 13/22
TIVA ARM Cortex-M4 TM4C123G Tutorial
Bn không cn ch nh sa cc file đưc copy vo
project.
Tuy nhiên vi nhng file đưc link ti project, để
to portable project ta không thê sư dng đưng
dn ca project lm đưng dn nn m phi chn
mt đưng dn cô đnh lm đưng dn nn,
đây ta chn đưng dn ti thư vin Tivaware lm
đưng dn nn.
13
Portable project
7/21/2019 Tivam4 Tut Bai1 Ccs
http://slidepdf.com/reader/full/tivam4-tut-bai1-ccs 14/22
TIVA ARM Cortex-M4 TM4C123G Tutorial
Bn click phi vo tên project trong ca sô Project
Explorer, chn Properties. Chn Resource -> Linked
Resources -> Path Variables -> New.
14
To path variable
7/21/2019 Tivam4 Tut Bai1 Ccs
http://slidepdf.com/reader/full/tivam4-tut-bai1-ccs 15/22
TIVA ARM Cortex-M4 TM4C123G Tutorial 15
Nhp tên bin va nhn Folder, chn đưng dn tifolder cha thư vin TivaWare (mc đnh l
C:\ti\TivaWare_C_Series-x.x)
To path variable
7/21/2019 Tivam4 Tut Bai1 Ccs
http://slidepdf.com/reader/full/tivam4-tut-bai1-ccs 16/22
7/21/2019 Tivam4 Tut Bai1 Ccs
http://slidepdf.com/reader/full/tivam4-tut-bai1-ccs 17/22
TIVA ARM Cortex-M4 TM4C123G Tutorial 17
Nhp tên bin va nhn Folder, chn đưng dn tifolder cha thư vin TivaWare (mc đnh l
C:\ti\TivaWare_C_Series-x.x)
To build variable
7/21/2019 Tivam4 Tut Bai1 Ccs
http://slidepdf.com/reader/full/tivam4-tut-bai1-ccs 18/22
TIVA ARM Cortex-M4 TM4C123G Tutorial 18
Click phi vo tên project trong ca sô ProjectExplorer -> Add Files -> ch đưng dn ti file
drivelib.lib (năm trong folder TivaWare_C_Series-
x.x->driverlib/ccs/Debug) va check vo ô “Create
link locations relative to”, chn tên bin mi to.
To đưng dân tơi driverlib
7/21/2019 Tivam4 Tut Bai1 Ccs
http://slidepdf.com/reader/full/tivam4-tut-bai1-ccs 19/22
TIVA ARM Cortex-M4 TM4C123G Tutorial 19
To đưng dân tơi cc file header
7/21/2019 Tivam4 Tut Bai1 Ccs
http://slidepdf.com/reader/full/tivam4-tut-bai1-ccs 20/22
TIVA ARM Cortex-M4 TM4C123G Tutorial 20
Nhn biểu tưng trên thanh công c để np
code, ca sô debug s xut hin.
Sư dng cc nt trên thanh công c để debug
chương trnh.
Np code va debug
7/21/2019 Tivam4 Tut Bai1 Ccs
http://slidepdf.com/reader/full/tivam4-tut-bai1-ccs 21/22
TIVA ARM Cortex-M4 TM4C123G Tutorial
Tài liêu tham khảo
[1] Peripheral Driver Library.pdf[2] TM4C123G_LaunchPad_Workshop_Workbook.pdf
21
7/21/2019 Tivam4 Tut Bai1 Ccs
http://slidepdf.com/reader/full/tivam4-tut-bai1-ccs 22/22
22