Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CC13xx/CC26xx SimpleLink Core SDK 5.40.02.00 #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# CC13xx/CC26xx SimpleLink Core SDK 5.40.02.00

## Source

The CoreSDK can be downloaded as part of the "SimpleLink™ CC13x2_26x2 SDK". While the SimpleLink™ SDK is released under a proprietary license, the Core SDK is released untder BSD 3-Clause license.

* Release notes of the SimpleLink™ CC13x2_26x2 SDK: https://software-dl.ti.com/simplelink/esd/simplelink_cc13x2_26x2_sdk/4.40.04.04/exports/docs/Documentation_Overview.html
* Release notes of the CC13xx/CC26xx SimpleLink Core SDK: https://software-dl.ti.com/simplelink/esd/simplelink_cc13x2_26x2_sdk/4.40.04.04/exports/docs/simplelink_mcu_sdk/release_notes_coresdk_cc13xx_cc26xx_5_40_02_00.html
* License: https://software-dl.ti.com/simplelink/esd/simplelink_cc13x2_26x2_sdk/4.40.04.04/exports/manifest_simplelink_cc13x2_26x2_sdk_4_40_04_04.html


# Extracting from SimpleLink™ CC13x2_26x2 SDK

The license manifest contains a list of all components of the SimpleLink™ CC13x2_26x2 SDK. Each files extracted from the SimpleLink™ CC13x2_26x2 SDK must be carefully compared with the license manifest to ensure that the file is part of the SimpleLink Core SDK and it is BSD licensed.

The following files are required for Contiki-NG:

* kernel/nortos
* License: the whole folder "kernel" is part of the Core SDK (BSD-3-Clause), except some files in kernel/freertos and kernel/tirtos. So kernel/nortos is all BSD-3-Clause
* The subfolders lib/ccs lib/gcc lib/iar and lib/ticlang are not used and can be deleted (saves ~50 MB)

* source/ti/devices
* License: the folder is mostly part of Core SDK (BSD-3-Clause). source/ti/devices/cc13x2_cc26x2/ contains Radio Firmware (also BSD-3-Clause). source/ti/devices/radioconfig/.meta contains Radio Config (also BSD-3-Clause)
* The subfolder can be deleted

* source/ti/drivers
* License: the folder is mostly part of Core SDK (BSD-3-Clause). Some files belong to other components but all of these are BSD-3-Clause
* The subfolders lib/ccs lib/gcc lib/iar and lib/ticlang are not used and can be deleted (saves ~50 MB)

* source/ti/posix
* License: the folder is part of Core SDK (BSD-3-Clause)


4 changes: 3 additions & 1 deletion kernel/nortos/NoRTOS.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Texas Instruments Incorporated
* Copyright (c) 2017-2020, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -39,6 +39,8 @@

#include "NoRTOS.h"

extern uint32_t ClockP_tickPeriod;

/*
* ======== NoRTOS_getConfig ========
*/
Expand Down
15 changes: 14 additions & 1 deletion kernel/nortos/dpl/HwiPCC26XX_nortos.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Texas Instruments Incorporated
* Copyright (c) 2017-2020, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -44,6 +44,7 @@
#include DeviceFamily_constructPath(inc/hw_types.h)
#include DeviceFamily_constructPath(inc/hw_cpu_scs.h)
#include DeviceFamily_constructPath(inc/hw_ints.h)
#include DeviceFamily_constructPath(driverlib/cpu.h)
#include DeviceFamily_constructPath(driverlib/interrupt.h)
#include DeviceFamily_constructPath(driverlib/rom.h)

Expand Down Expand Up @@ -222,6 +223,18 @@ void HwiP_enableInterrupt(int interruptNum)
IntEnable((uint32_t)interruptNum);
}

/*
* ======== HwiP_interruptsEnabled ========
*/
bool HwiP_interruptsEnabled(void)
{
uint32_t priMask;

priMask = CPUprimask();

return (priMask == 0);
}

/*
* ======== HwiP_construct ========
*/
Expand Down
23 changes: 22 additions & 1 deletion kernel/nortos/dpl/PowerCC26X2_nortos.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2018, Texas Instruments Incorporated
* Copyright (c) 2017-2020, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -36,6 +36,7 @@
#include <stdio.h>
#include <stdlib.h>

#include <ti/drivers/ITM.h>
#include <ti/drivers/Power.h>
#include <ti/drivers/power/PowerCC26X2.h>

Expand All @@ -53,6 +54,8 @@

extern PowerCC26X2_ModuleState PowerCC26X2_module;

extern uint32_t ClockP_tickPeriod;

static uintptr_t PowerCC26X2_swiKey;

/*
Expand Down Expand Up @@ -93,7 +96,12 @@ void PowerCC26XX_standbyPolicy()
(1 << PowerCC26XX_DISALLOW_IDLE))) ==
((1 << PowerCC26XX_DISALLOW_STANDBY) |
(1 << PowerCC26XX_DISALLOW_IDLE))) {

/* Flush any remaining log messages in the ITM */
ITM_flush();
PRCMSleep();
/* Restore ITM settings */
ITM_restore();
}
/*
* check if any sleep modes are allowed for automatic activation
Expand Down Expand Up @@ -124,8 +132,15 @@ void PowerCC26XX_standbyPolicy()
ClockP_start(ClockP_handle((ClockP_Struct *)
&PowerCC26X2_module.clockObj));

/* Flush any remaining log messages in the ITM */
ITM_flush();

/* go to standby mode */
Power_sleep(PowerCC26XX_STANDBY);

/* Restore ITM settings */
ITM_restore();

ClockP_stop(ClockP_handle((ClockP_Struct *)
&PowerCC26X2_module.clockObj));
justIdle = false;
Expand All @@ -135,6 +150,9 @@ void PowerCC26XX_standbyPolicy()
/* idle if allowed */
if (justIdle) {

/* Flush any remaining log messages in the ITM */
ITM_flush();

/*
* Power off the CPU domain; VIMS will power down if SYSBUS is
* powered down, and SYSBUS will power down if there are no
Expand Down Expand Up @@ -170,6 +188,9 @@ void PowerCC26XX_standbyPolicy()
else {
PRCMSleep();
}

/* Restore ITM settings */
ITM_restore();
}
}

Expand Down
4 changes: 3 additions & 1 deletion kernel/nortos/dpl/PowerCC26XX_nortos.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2018, Texas Instruments Incorporated
* Copyright (c) 2017-2020, Texas Instruments Incorporated
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -55,6 +55,8 @@
extern PowerCC26XX_ModuleState PowerCC26XX_module;
extern const PowerCC26XX_Config PowerCC26XX_config;

extern uint32_t ClockP_tickPeriod;

static uintptr_t PowerCC26XX_swiKey;


Expand Down
Binary file removed kernel/nortos/lib/nortos_cc13x0.am3g
Binary file not shown.
Binary file removed kernel/nortos/lib/nortos_cc13x0.arm3
Binary file not shown.
Binary file added kernel/nortos/lib/nortos_cc13x2.aem4f
Binary file not shown.
Binary file added kernel/nortos/lib/nortos_cc13x2.am4f
Binary file not shown.
Binary file modified kernel/nortos/lib/nortos_cc13x2.am4fg
Binary file not shown.
Binary file modified kernel/nortos/lib/nortos_cc13x2.arm4f
Binary file not shown.
Binary file added kernel/nortos/lib/nortos_cc13x2x7.aem4f
Binary file not shown.
Binary file added kernel/nortos/lib/nortos_cc13x2x7.am4f
Binary file not shown.
Binary file added kernel/nortos/lib/nortos_cc13x2x7.am4fg
Binary file not shown.
Binary file added kernel/nortos/lib/nortos_cc13x2x7.arm4f
Binary file not shown.
Binary file removed kernel/nortos/lib/nortos_cc26x0.am3g
Binary file not shown.
Binary file removed kernel/nortos/lib/nortos_cc26x0.arm3
Binary file not shown.
Binary file added kernel/nortos/lib/nortos_cc26x2.aem4f
Binary file not shown.
Binary file added kernel/nortos/lib/nortos_cc26x2.am4f
Binary file not shown.
Binary file modified kernel/nortos/lib/nortos_cc26x2.am4fg
Binary file not shown.
Binary file modified kernel/nortos/lib/nortos_cc26x2.arm4f
Binary file not shown.
Binary file added kernel/nortos/lib/nortos_cc26x2x7.aem4f
Binary file not shown.
Binary file added kernel/nortos/lib/nortos_cc26x2x7.am4f
Binary file not shown.
Binary file added kernel/nortos/lib/nortos_cc26x2x7.am4fg
Binary file not shown.
Binary file added kernel/nortos/lib/nortos_cc26x2x7.arm4f
Binary file not shown.
54 changes: 54 additions & 0 deletions kernel/nortos/makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#
# ======== makefile ========
#

CORESDK_INSTALL_DIR ?= $(abspath ../..)
include $(CORESDK_INSTALL_DIR)/imports.mak

#
# Set XDCARGS to some of the variables above. XDCARGS are passed
# to the XDC build engine... which will load tirtos.bld... which will
# extract these variables and use them to determine what to build and which
# toolchains to use.
#
# Note that not all of these variables need to be set to something valid.
# If you leave one or more of them unassigned, the libraries for that target
# will not be built.
#
# Some background is here:
# http://rtsc.eclipse.org/docs-tip/Command_-_xdc#Environment_Variables
#
XDCARGS= \
ti.targets.arm.elf.M4F=\"$(CCS_ARMCOMPILER)\" \
ti.targets.arm.clang.M4F=\"$(TICLANG_ARMCOMPILER)\" \
gnu.targets.arm.M4F=\"$(GCC_ARMCOMPILER)\" \
iar.targets.arm.M4F=\"$(IAR_ARMCOMPILER)\" \
CC26XXWARE=$(CORESDK_INSTALL_DIR)

#
# Set XDCPATH to contain necessary repositories.
#
XDCPATH=$(CORESDK_INSTALL_DIR)/source;$(CORESDK_INSTALL_DIR)/kernel/tirtos/packages

#
# Set XDCOPTIONS. Use -v for a verbose build.
#
# XDCOPTIONS=v
XDCOPTIONS=
export XDCOPTIONS

j = 1
#
# Set XDC executable command
# Note that XDCBUILDCFG points to the coresdk.bld file which uses
# the arguments specified by XDCARGS
#
XDC = $(XDC_INSTALL_DIR)/xdc -j $(j) XDCBUILDCFG=$(CORESDK_INSTALL_DIR)/kernel/tirtos/packages/coresdk.bld

all:
@ echo building packages ...
@ $(XDC) XDCARGS="$(XDCARGS)" XDCPATH="$(XDCPATH)" all -PR .

clean:
@ echo cleaning packages ...
@ $(XDC) XDCARGS="$(XDCARGS)" XDCPATH="$(XDCPATH)" clean -PR .
Loading