Skip to content

Commit

Permalink
Merge pull request openthread#382 in TPS/openthread from feature/comm…
Browse files Browse the repository at this point in the history
…s/COM-4784-gh-sync to master

* commit '7e4a8daa8a0c3baa40fa2ae4e9a138c82021ba91':
  [toranj] test case to verify child restoration after parent reset (openthread#2935)
  [mle] fix issue with saving child info to non-volatile (openthread#2935)
  [travis] remove lib32z1 from arm-gcc-6/7 build checks (openthread#2928)
  [github] update issue templates (openthread#2920)
  [flash] move example flash driver from c++ to c (openthread#2919)
  [kw41z] load bytes into TX Packet Buffer in order (openthread#2882)
  [config] add check for OPENTHREAD_CONFIG_DISABLE_CCA_ON_LAST_ATTEMPT (openthread#2925)
  [config] update comment/docs for MAX_TX_ATTEMPTS_INDIRECT_POLLS (openthread#2924)
  [efr32] do not use CCA/CSMA when it is disabled (openthread#2923)
  [mac] fix build failure with CONFIG_DISABLE_CSMA_CA_ON_LAST_ATTEMPT (openthread#2922)
  [mle] support for long routes (openthread#2775)
  • Loading branch information
abtink committed Aug 6, 2018
2 parents 4913d21 + 7e4a8da commit 1386026
Show file tree
Hide file tree
Showing 25 changed files with 646 additions and 199 deletions.
8 changes: 2 additions & 6 deletions .github/ISSUE_TEMPLATE.md
@@ -1,7 +1,3 @@
GitHub Issues are for bugs and feature requests. To make bugs and feature requests more easy to find and organize, we close issues that are deemed out of scope for GitHub Issues.
GitHub Issues are for bugs and feature requests. To make bugs and feature requests more easy to find and organize, we close issues that are deemed out of scope for GitHub Issues.

Usage questions? Post questions to [Stack Overflow](http://stackoverflow.com/) using the [[openthread] tag](http://stackoverflow.com/questions/tagged/openthread). We also use Google Groups for discussion and announcements:

* [openthread-announce](https://groups.google.com/forum/#!forum/openthread-announce) - subscribe for release notes and new updates on OpenThread
* [openthread-users](https://groups.google.com/forum/#!forum/openthread-users) - the best place for users to discuss OpenThread and interact with the OpenThread team
* [openthread-devel](https://groups.google.com/forum/#!forum/openthread-devel) - team members discuss the on-going development of OpenThread
The openthread-users Google Group is the recommended place for users to discuss OpenThread and interact directly with the OpenThread community. https://groups.google.com/forum/#!forum/openthread-users
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,24 @@
---
name: Bug report
about: Create a report to help us improve

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Information to reproduce the behavior, including:
1. Git commit id
2. IEEE 802.15.4 hardware platform
3. Build steps
4. Network topology

**Expected behavior**
A clear and concise description of what you expected to happen.

**Console/log output**
If applicable, add console/log output to help explain your problem.

**Additional context**
Add any other context about the problem here.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,17 @@
---
name: Feature request
about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
8 changes: 4 additions & 4 deletions .travis.yml
Expand Up @@ -92,16 +92,16 @@ matrix:
- llvm-toolchain-trusty-5.0
packages:
- clang-5.0
- env: BUILD_TARGET="arm-gcc49"
- env: BUILD_TARGET="arm-gcc-4"
os: linux
compiler: gcc
- env: BUILD_TARGET="arm-gcc54"
- env: BUILD_TARGET="arm-gcc-5"
os: linux
compiler: gcc
- env: BUILD_TARGET="arm-gcc63"
- env: BUILD_TARGET="arm-gcc-6"
os: linux
compiler: gcc
- env: BUILD_TARGET="arm-gcc7"
- env: BUILD_TARGET="arm-gcc-7"
os: linux
compiler: gcc
- env: BUILD_TARGET="posix" CC=clang-5.0 CXX=clang++-5.0
Expand Down
12 changes: 5 additions & 7 deletions .travis/before_install.sh
Expand Up @@ -60,24 +60,23 @@ cd /tmp || die
sudo apt-get install clang || die
}

[ $BUILD_TARGET != arm-gcc49 ] || {
[ $BUILD_TARGET != arm-gcc-4 ] || {
sudo apt-get install lib32z1 || die
wget https://launchpad.net/gcc-arm-embedded/4.9/4.9-2015-q3-update/+download/gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2 || die
tar xjf gcc-arm-none-eabi-4_9-2015q3-20150921-linux.tar.bz2 || die
export PATH=/tmp/gcc-arm-none-eabi-4_9-2015q3/bin:$PATH || die
arm-none-eabi-gcc --version || die
}

[ $BUILD_TARGET != arm-gcc54 ] || {
[ $BUILD_TARGET != arm-gcc-5 ] || {
sudo apt-get install lib32z1 || die
wget https://launchpad.net/gcc-arm-embedded/5.0/5-2016-q3-update/+download/gcc-arm-none-eabi-5_4-2016q3-20160926-linux.tar.bz2 || die
wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/5_4-2016q3/gcc-arm-none-eabi-5_4-2016q3-20160926-linux.tar.bz2 || die
tar xjf gcc-arm-none-eabi-5_4-2016q3-20160926-linux.tar.bz2 || die
export PATH=/tmp/gcc-arm-none-eabi-5_4-2016q3/bin:$PATH || die
arm-none-eabi-gcc --version || die
}

[ $BUILD_TARGET != arm-gcc63 ] || {
sudo apt-get install lib32z1 || die
[ $BUILD_TARGET != arm-gcc-6 ] || {
wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/6-2017q2/gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2 || die
tar xjf gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2 || die
export PATH=/tmp/gcc-arm-none-eabi-6-2017-q2-update/bin:$PATH || die
Expand All @@ -89,8 +88,7 @@ cd /tmp || die
arc-elf32-gcc --version || die
}

[ $BUILD_TARGET != arm-gcc7 ] || {
sudo apt-get install lib32z1 || die
[ $BUILD_TARGET != arm-gcc-7 ] || {
wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/7-2017q4/gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2 || die
tar xjf gcc-arm-none-eabi-7-2017-q4-major-linux.tar.bz2 || die
export PATH=/tmp/gcc-arm-none-eabi-7-2017-q4-major/bin:$PATH || die
Expand Down
8 changes: 4 additions & 4 deletions .travis/script.sh
Expand Up @@ -121,7 +121,7 @@ EOF
test -f out/target/product/generic/obj/EXECUTABLES/ot-cli_intermediates/LINKED/ot-cli || die
}

[ $BUILD_TARGET != arm-gcc49 ] || {
[ $BUILD_TARGET != arm-gcc-4 ] || {
export PATH=/tmp/gcc-arm-none-eabi-4_9-2015q3/bin:$PATH || die

git checkout -- . || die
Expand Down Expand Up @@ -199,7 +199,7 @@ EOF
arm-none-eabi-size output/samr21/bin/ot-ncp-mtd || die
}

[ $BUILD_TARGET != arm-gcc54 ] || {
[ $BUILD_TARGET != arm-gcc-5 ] || {
export PATH=/tmp/gcc-arm-none-eabi-5_4-2016q3/bin:$PATH || die

git checkout -- . || die
Expand Down Expand Up @@ -277,7 +277,7 @@ EOF
arm-none-eabi-size output/samr21/bin/ot-ncp-mtd || die
}

[ $BUILD_TARGET != arm-gcc63 ] || {
[ $BUILD_TARGET != arm-gcc-6 ] || {
export PATH=/tmp/gcc-arm-none-eabi-6-2017-q2-update/bin:$PATH || die

git checkout -- . || die
Expand Down Expand Up @@ -366,7 +366,7 @@ EOF
arc-elf32-size output/emsk/bin/ot-ncp-mtd || die
}

[ $BUILD_TARGET != arm-gcc7 ] || {
[ $BUILD_TARGET != arm-gcc-7 ] || {
export PATH=/tmp/gcc-arm-none-eabi-7-2017-q4-major/bin:$PATH || die

git checkout -- . || die
Expand Down
2 changes: 1 addition & 1 deletion etc/visual-studio/libopenthread-windows.vcxproj
Expand Up @@ -64,7 +64,7 @@
<ClCompile Include="..\..\examples\platforms\posix\random.c" />
<ClCompile Include="..\..\examples\platforms\posix\spi-stubs.c" />
<ClCompile Include="..\..\examples\platforms\posix\uart-windows.c" />
<ClCompile Include="..\..\examples\platforms\utils\settings.cpp" />
<ClCompile Include="..\..\examples\platforms\utils\settings_flash.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\examples\platforms\posix\platform-posix.h" />
Expand Down
2 changes: 1 addition & 1 deletion etc/visual-studio/libopenthread-windows.vcxproj.filters
Expand Up @@ -37,7 +37,7 @@
<ClCompile Include="..\..\examples\platforms\posix\uart-windows.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\examples\platforms\utils\settings.cpp">
<ClCompile Include="..\..\examples\platforms\utils\settings_flash.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
Expand Down
9 changes: 8 additions & 1 deletion examples/platforms/efr32/radio.c
Expand Up @@ -346,7 +346,14 @@ otError otPlatRadioTransmit(otInstance *aInstance, otRadioFrame *aFrame)
txOptions |= RAIL_TX_OPTION_WAIT_FOR_ACK;
}

status = RAIL_StartCcaCsmaTx(sRailHandle, aFrame->mChannel, txOptions, &csmaConfig, NULL);
if (aFrame->mInfo.mTxInfo.mCsmaCaEnabled)
{
status = RAIL_StartCcaCsmaTx(sRailHandle, aFrame->mChannel, txOptions, &csmaConfig, NULL);
}
else
{
status = RAIL_StartTx(sRailHandle, aFrame->mChannel, txOptions, NULL);
}
assert(status == RAIL_STATUS_NO_ERROR);

otPlatRadioTxStarted(aInstance, aFrame);
Expand Down
11 changes: 10 additions & 1 deletion examples/platforms/kw41z/radio.c
Expand Up @@ -101,6 +101,7 @@ static otError sTxStatus;

static otRadioFrame sTxFrame;
static otRadioFrame sRxFrame;
static uint8_t sTxData[OT_RADIO_FRAME_MAX_SIZE];
#if DOUBLE_BUFFERING
static uint8_t sRxData[OT_RADIO_FRAME_MAX_SIZE];
#endif
Expand Down Expand Up @@ -357,6 +358,14 @@ otError otPlatRadioTransmit(otInstance *aInstance, otRadioFrame *aFrame)

*(uint8_t *)ZLL->PKT_BUFFER_TX = aFrame->mLength;

/* MKW41Z Reference Manual Section 44.6.2.7 states: "The 802.15.4
* Link Layer software prepares data to be transmitted, by loading
* the octets, in order, into the Packet Buffer." */
for (int i = 0; i < aFrame->mLength - sizeof(uint16_t); i++)
{
((uint8_t *)ZLL->PKT_BUFFER_TX)[1 + i] = sTxFrame.mPsdu[i];
}

/* Set CCA mode */
ZLL->PHY_CTRL &= ~ZLL_PHY_CTRL_CCATYPE_MASK;
ZLL->PHY_CTRL |= ZLL_PHY_CTRL_CCATYPE(DEFAULT_CCA_MODE);
Expand Down Expand Up @@ -929,7 +938,7 @@ void kw41zRadioInit(void)
rf_set_tx_power(0);

sTxFrame.mLength = 0;
sTxFrame.mPsdu = (uint8_t *)ZLL->PKT_BUFFER_TX + 1;
sTxFrame.mPsdu = sTxData;
sRxFrame.mLength = 0;
#if DOUBLE_BUFFERING
sRxFrame.mPsdu = sRxData;
Expand Down
2 changes: 1 addition & 1 deletion examples/platforms/utils/Makefile.am
Expand Up @@ -38,7 +38,7 @@ libopenthread_platform_utils_a_CPPFLAGS = \

libopenthread_platform_utils_a_SOURCES = \
debug_uart.c \
settings.cpp \
settings_flash.c \
$(NULL)

noinst_HEADERS = \
Expand Down

0 comments on commit 1386026

Please sign in to comment.