forked from TexasInstruments/ot-ti
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove legacy no-rtos examples * update build system * internalize mbedtls dependency
- Loading branch information
1 parent
89cfd4a
commit bcfd1ab
Showing
336 changed files
with
10,583 additions
and
182,099 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
build | ||
output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
[submodule "openthread"] | ||
path = openthread | ||
url = https://github.com/openthread/openthread.git | ||
[submodule "third_party/freertos/repo"] | ||
path = third_party/freertos/repo | ||
url = https://github.com/FreeRTOS/FreeRTOS-Kernel.git | ||
[submodule "third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx"] | ||
path = third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx | ||
url = https://github.com/TexasInstruments/cc13xx_cc26xx_sdk.git | ||
[submodule "mbedtls"] | ||
path = third_party/mbedtls/repo | ||
url = https://github.com/Mbed-TLS/mbedtls.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
# | ||
# Copyright (c) 2020, The OpenThread Authors. | ||
# All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are met: | ||
# 1. Redistributions of source code must retain the above copyright | ||
# notice, this list of conditions and the following disclaimer. | ||
# 2. Redistributions in binary form must reproduce the above copyright | ||
# notice, this list of conditions and the following disclaimer in the | ||
# documentation and/or other materials provided with the distribution. | ||
# 3. Neither the name of the copyright holder nor the | ||
# names of its contributors may be used to endorse or promote products | ||
# derived from this software without specific prior written permission. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
# POSSIBILITY OF SUCH DAMAGE. | ||
# | ||
|
||
set(TI_BOARD_VALUES | ||
"CC1352P1_LAUNCHXL" | ||
"CC1352P_2_LAUNCHXL" | ||
"CC1352P_4_LAUNCHXL" | ||
"CC1352R1_LAUNCHXL" | ||
"CC26X2R1_LAUNCHXL" | ||
"LP_CC1352P7_1" | ||
"LP_CC1352P7_4" | ||
"LP_CC2652PSIP" | ||
"LP_CC2652R7" | ||
"LP_CC2652RB" | ||
"LP_CC2652RSIP" | ||
) | ||
|
||
set_property(CACHE TI_SIMPLELINK_BOARD PROPERTY STRINGS ${TI_BOARD_VALUES}) | ||
|
||
if(TI_SIMPLELINK_BOARD STREQUAL "CC1352P1_LAUNCHXL") | ||
set(TI_SIMPLELINK_FAMILY "cc13x2_cc26x2" ) | ||
set(TI_SIMPLELINK_STARTUP "cc13x2_cc26x2" ) | ||
set(TI_SIMPLELINK_ISA "m4f" ) | ||
|
||
elseif(TI_SIMPLELINK_BOARD STREQUAL "CC1352P_2_LAUNCHXL") | ||
set(TI_SIMPLELINK_FAMILY "cc13x2_cc26x2" ) | ||
set(TI_SIMPLELINK_STARTUP "cc13x2_cc26x2" ) | ||
set(TI_SIMPLELINK_ISA "m4f" ) | ||
|
||
elseif(TI_SIMPLELINK_BOARD STREQUAL "CC1352P_4_LAUNCHXL") | ||
set(TI_SIMPLELINK_FAMILY "cc13x2_cc26x2" ) | ||
set(TI_SIMPLELINK_STARTUP "cc13x2_cc26x2" ) | ||
set(TI_SIMPLELINK_ISA "m4f" ) | ||
|
||
elseif(TI_SIMPLELINK_BOARD STREQUAL "CC1352R1_LAUNCHXL") | ||
set(TI_SIMPLELINK_FAMILY "cc13x2_cc26x2" ) | ||
set(TI_SIMPLELINK_STARTUP "cc13x2_cc26x2" ) | ||
set(TI_SIMPLELINK_ISA "m4f" ) | ||
|
||
elseif(TI_SIMPLELINK_BOARD STREQUAL "CC26X2R1_LAUNCHXL") | ||
set(TI_SIMPLELINK_FAMILY "cc13x2_cc26x2" ) | ||
set(TI_SIMPLELINK_STARTUP "cc13x2_cc26x2" ) | ||
set(TI_SIMPLELINK_ISA "m4f" ) | ||
|
||
elseif(TI_SIMPLELINK_BOARD STREQUAL "LP_CC1352P7_1") | ||
set(TI_SIMPLELINK_FAMILY "cc13x2x7_cc26x2x7") | ||
set(TI_SIMPLELINK_STARTUP "cc13x2_cc26x2" ) | ||
set(TI_SIMPLELINK_ISA "m4f" ) | ||
|
||
elseif(TI_SIMPLELINK_BOARD STREQUAL "LP_CC1352P7_4") | ||
set(TI_SIMPLELINK_FAMILY "cc13x2x7_cc26x2x7") | ||
set(TI_SIMPLELINK_STARTUP "cc13x2_cc26x2" ) | ||
set(TI_SIMPLELINK_ISA "m4f" ) | ||
|
||
elseif(TI_SIMPLELINK_BOARD STREQUAL "LP_CC2652PSIP") | ||
set(TI_SIMPLELINK_FAMILY "cc13x2_cc26x2" ) | ||
set(TI_SIMPLELINK_STARTUP "cc13x2_cc26x2" ) | ||
set(TI_SIMPLELINK_ISA "m4f" ) | ||
|
||
elseif(TI_SIMPLELINK_BOARD STREQUAL "LP_CC2652R7") | ||
set(TI_SIMPLELINK_FAMILY "cc13x2x7_cc26x2x7") | ||
set(TI_SIMPLELINK_STARTUP "cc13x2_cc26x2" ) | ||
set(TI_SIMPLELINK_ISA "m4f" ) | ||
|
||
elseif(TI_SIMPLELINK_BOARD STREQUAL "LP_CC2652RB") | ||
set(TI_SIMPLELINK_FAMILY "cc13x2_cc26x2" ) | ||
set(TI_SIMPLELINK_STARTUP "cc13x2_cc26x2" ) | ||
set(TI_SIMPLELINK_ISA "m4f" ) | ||
|
||
elseif(TI_SIMPLELINK_BOARD STREQUAL "LP_CC2652RSIP") | ||
set(TI_SIMPLELINK_FAMILY "cc13x2_cc26x2" ) | ||
set(TI_SIMPLELINK_STARTUP "cc13x2_cc26x2" ) | ||
set(TI_SIMPLELINK_ISA "m4f" ) | ||
|
||
else() | ||
if(TI_PLATFORM STREQUAL "cc13xx_cc26xx" | ||
AND NOT TI_SIMPLELINK_BOARD IN_LIST TI_BOARD_VALUES) | ||
message(FATAL_ERROR "Please select a supported board: ${TI_BOARD_VALUES}") | ||
endif() | ||
endif() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
if(TI_BUILD_EXECUTABLES) | ||
add_subdirectory(apps) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Examples Directory | ||
|
||
This directory should be a faithful copy of the examples directory from | ||
OpenThread with a few changes to support the specific build requirements for | ||
the TI SimpleLink devices. These include; | ||
|
||
1. Addition of the `*.out` suffix to executables | ||
2. Enabling RTOS operation | ||
|
||
## Adding out to the Executable | ||
|
||
Both CCS and Uniflash recognize files with the `*.out` suffix as programmable | ||
files. An executable file with no extension is not always recognized by default | ||
in the file explorer of the loading programs. And when loading a file with no | ||
suffix Uniflash will default to interpreting the file as a binary image. While | ||
an extension of `*.elf` may be more descriptive, it is not recognized by | ||
default in some programs. | ||
|
||
## Enabling an RTOS | ||
|
||
The SimpleLink drivers require a kernel running underneath them for certain | ||
primitives like semaphores. This requires the `main()` function to be used to | ||
setup the drivers and start the kernel. It is not easy to re-write the | ||
SimpleLink SDK `ResetISR` to create a new entry point. Instead two files have | ||
been added to each example, one to bootstrap TI-RTOS and one to bootstrap | ||
FreeRTOS. The `main()` function in the example applications have been re-named | ||
to `app_main()` to follow the conventions set in the SimpleLink SDK. | ||
|
||
### Possible changes | ||
|
||
Currently the `otSysProcessDrivers()` in `src/system.c` pends on a processing | ||
queue for driver events. Once a driver generates an event and places that on | ||
the queue, the function will continue to process this event. The two examples | ||
in this repository also define `otTaskletsSignalPending()` and handle | ||
processing tasklets within their main loops. This is handled by checking if | ||
there are any pending tasklets before pending on the queue and returning if | ||
there are any. | ||
|
||
A weak implementation of the `otTaskletsSignalPending()` function is provided | ||
in the `system.c` file if the application code does not handle this | ||
functionality. | ||
|
Oops, something went wrong.