wolfssl-examples/tirtos_ccs_examples
Kaleb Joseph Himes e954df7828 Update README.md 2015-08-12 15:09:56 -06:00
..
tcpEcho_Client_TivaTM4C1294NCPDT Updated TiRTOS example headers 2015-05-26 13:08:23 -06:00
tcpEcho_Server_TivaTM4C1294NCPDT CYASSL -> WOLFSSL 2015-01-12 14:54:12 -07:00
wolfssl_tests Updated TiRTOS example headers 2015-05-26 13:08:23 -06:00
wolfssl_tirtos_benchmark Updated TiRTOS example headers 2015-05-26 13:08:23 -06:00
README.md Update README.md 2015-08-12 15:09:56 -06:00
TI-RTOS AND WOLFSSL README README and make file updates 2015-01-09 20:20:46 -07:00
nameReplace.sh Ctao -> wolf 2015-01-12 15:02:11 -07:00
tirtos.mak remove cyassl versions, only wolfssl support going forward 2015-01-12 13:41:34 -07:00

README.md

Step 1: Download CCS

(If you already have Code Composer Studio (CCS) installed skip to step 2)
Download CCS here: http://www.ti.com/tool/ccstudio

Installer will walk you through setting up CCS. Choose options for your platform and desired compiler(s).

expected install location: C:\ti

Step 2: Download tivac

(If you already have TIRTOS for TivaC skip to step 3)
Find CCS App Center it will be an option on the "Getting Started" page or click View -> CCS App Center
Under the title "Code Composer Studio Add-ons" check the box under "TI-RTOS for TivaC"
Now on the top of the page click "Install Software"

expected install location: C:\ti

Step 3: Download wolfSSL

Download wolfSSL from here: https://wolfssl.com/wolfSSL/download/downloadForm.php
or
clone wolfSSL development branch from here: https://github.com/wolfSSL/wolfssl

expected install location: C:\wolfssl

Step 4: Build the libraries

At this point we are ready to build wolfssl libraries with TIRTOS

WINDOWS:
In the file browser navigate to: C:\ti\ccsv6\tools\compiler and see which
compiler you have installed ti-cgt-arm_x.x.x and make a note of it.

Now in the file browser navigate to C:\ti\tirtos_tivac_xxxxxxx open tirtos.mak in your
preferred text editor

Locate the line specifying the compiler. You should find this on or around line 11 and it will look
something like this:
ti.targets.arm.elf.M4F ?= $(DEFAULT_INSTALLATION_DIR)/ccsv6/tools/compiler/ti-cgt-arm_5.2.5

Make sure you are using the ti-cgt-agrm_x.x.x that you noted previously

Next locate the wolfSSL section should be on or around line 45 and looks like this:
WolfSSL settings
WOLFSSL_INSTALLATION_DIR ?= C:\wolfssl
WOLFSSL_TIRTOS_DIR = $(WOLFSSL_INSTALLATION_DIR)/tirtos<br/>

Modify WOLFSSL_INSTALLATION_DIR to be the location of your wolfssl directory. Should be C:\wolfssl.

Open a command promp and navigate to C:\ti\tirtos_tivac_xxxxxxx

Use the following command to build TIRTOS and wolfssl
..\xdctools_3_31_01_33_core\gmake.exe -f tirtos.mak wolfssl

The libraries should build without issues.

Step 5: Loading first example

In CCS click dropdown for "Project" and select "Examples..."

    Locate: TI-RTOS for TivaC
-> Tiva C Series
-> Tiva TM4C1294NCPDT
-> EK-TM4C1294XL Evaluation Kit
-> Network Examples
-> TI Network Examples
-> Ethernet Examples
-> TCP Echo with TLS
In the "TI Resource Explorer window" Click on the link in "Step 1" to import the project.<br/>

Step 6: Setting up the environment -- Before building we have to do a little setup.
Step 6.a
Right click on the imported project and select `Properties`

Under `Build -> ARM Compiler -> Include Options`
You will see a little file with a green "plus" symbol in the browser window
(NOTE: include the quotes)
Click on that and add this line `"C:/wolfssl"`

Step 6.b
Now still in the Properties window
Under `Build -> ARM Linker -> File Search Path`

In the browser window on the right under "Include library file or command file as input"
Click the add button and add this line `"C:\wolfssl\tirtos\packages\ti\net\wolfssl\lib\wolfssl.aem4f"`

In the browser window on the right under "Add to library search path"
Click the add button and add this line `"C:\wolfssl\tirtos\packages\ti\net\wolfssl\lib"`


Step 6.c
Hit OK and we're ready to build the example project.
Step 7: Build the project -- In the "TI Resource Explorer window" Click on the link in "Step 2" to build the project.

Step 8: Prepare for debugging -- (If you have already hooked up your board skip to step 9)
Take a Micro-USB cable and plug the micro-USB end into the port on the Tiva Board labeled "DEBUG"
(This is the Micro-USB port on the opposite end of the board from the Ethernet port)
Insert the USB end into your PC
Plug one end of an Ethernet cable into the Tiva board Ethernet port and the other end
into your local network.

Step 9: Get Debug Working -- In the "TI Resource Explorer window" Click on the link in "Step 3"
Click the drop down options and select "Stellaris In-Circuit Debug Interface"
In the "TI Resource Explorer window" Click on the link in "Step 4"
This should alert you to the need for some additional setup. Click OK and a new tab will open.
In the field "Board or Device" type in `Tiva TM4C1294NCPDT` and check the box
In the right-hand side of this same window click "save" to save the configuration.
Close this tab.
In the "TI Resource Explorer window" Click on the link in "Step 4" a second time.
The project will be flashed onto the Tiva Board. Wait for a few seconds.
Now hit the key "F8" or in the top left of CCS click the green "Play" Button
(The buton says "Resume" in the drop down if you scroll over it)
You will see output in the "Console" Window at the bottom of CCS.
A line will read `Network Added: If-1:192.168.1.xxx` or some other IP
This is the IP of the tcpEchoTLS server that is now running on the board in step 9
we will refer to this IP as `TCP_ECHO_IP`

Step 10: Test the server -- Option 1:
To test the server here at wolfSSL we either build the client example in Microsoft Visual Studios
and run it against the IP above and using port 1000 (the default port for the tcpEchoTLS example)

Option 2:
Using Linux or Unix build our libraries and run the following command from the wolfssl root
directory from any computer running on the local network
`./examples/client/client -h TCP_ECHO_IP -p 1000`

The client should receive the following response:
` SSL version is TLS1.2
SSL cipher suite is
Server response: hello wolfssl!
`

Step 11: Success -- If you received that response your server is working correctly.
You are now ready to begin development for your project!

Contact us anytime with questions:
`info@wolfssl.com`
`support@wolfssl.com`