Getting Started with ADSP-BF537 EZ-KIT Lite
2-7
Running a TCP/IP application on an ADSP-BF537 EZ-KIT Lite
To enable multiple clients (computers) to connect concurrently to the
same host (the EZ-KIT Lite), TCP/IP applications typically use multiple
operating system threads of execution as follows.
1. The main application thread begins polling the port number(s) rel-
evant to the application.
2. When a client connects, a new “worker” thread is spawned to inter-
act with the client.
3. Meanwhile, the main application thread continues polling for new
connections.
The following procedure creates a Caesar Cipher application from the
skeleton template. The steps implement a thread to interact with the cli-
ent, producing a Caesar Cipher on input received from the client.
Alternatively, the project
<
install_path
>\Blackfin\Examples\ADSP-BF537 EZ-Kit Lite\Getting
Started Examples\Part_2_1\Caesar_Cipher.dpj
can be loaded to the PC
if you are unconcerned about the details herein and want to avoid typing
in source code. (If you load the project, skip the following procedure).
To create a new thread type,
Caesar_Cipher_ThreadType
:
1. From the
Kernel
page of Vi+
Project
window, navigate
to
Kernel
–>
Threads
–>
Thread Types
. Right-click and select
New
thread type. Type
Caesar_Cipher_ThreadType
in the
Name
field,
leave
Source File
and
Header File
as is, automatic source code gen-
eration as
Yes
, and leave the
Language
as
C++
(
).
2. Click
OK
. The new thread displays in the
Vi+ Kernel
tab.
3. Switch back to the
Project
page and open the newly-created source
file
Caesar_Cipher_ThreadType.cpp
. Replace the method
Caesar_Cipher_ThreadType::Run()
with the contents of
2-1. Caesar_Cipher_ThreadType::Run() Implementation” on
www.BDTIC.com/ADI
Содержание EZ-KIT Lite ADSP-BF537
Страница 4: ...www BDTIC com ADI ...
Страница 8: ...CONTENTS viii Getting Started with ADSP BF537 EZ KIT Lite www BDTIC com ADI ...
Страница 52: ...Listing 1 3 Exercise 1 Part 3 1 30 Getting Started with ADSP BF537 EZ KIT Lite www BDTIC com ADI ...
Страница 88: ...What s Next 3 22 Getting Started with ADSP BF537 EZ KIT Lite www BDTIC com ADI ...