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

[TI] Resolve linker reenable ci #28869

Merged
merged 8 commits into from
Aug 25, 2023
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions .github/workflows/examples-cc13x2x7_26x2x7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@ jobs:
BUILD_TYPE: gn_cc26x2x7

runs-on: ubuntu-latest
# This CI is disabled because running out of flash and a solution was not found in time, see https://github.com/project-chip/connectedhomeip/pull/26186
# An issue was opened at https://github.com/project-chip/connectedhomeip/issues/26957
# TODO : Enable this once we have a way to run without out of flash failure or remove platform if it cannot support the SDK
if: github.actor != 'restyled-io[bot]' && false
if: github.actor != 'restyled-io[bot]'

container:
image: ghcr.io/project-chip/chip-build-ti:1
Expand All @@ -61,9 +58,10 @@ jobs:
./scripts/build/build_examples.py \
--target ti-cc13x2x7_26x2x7-lock-mtd \
--target ti-cc13x2x7_26x2x7-pump-mtd \
--target ti-cc13x2x7_26x2x7-lighting \
--target ti-cc13x2x7_26x2x7-lighting-mtd \
--target ti-cc13x2x7_26x2x7-pump-controller-mtd \
--target ti-cc13x4_26x4-lighting \
--target ti-cc13x4_26x4-lighting-ftd \
--target ti-cc13x4_26x4-lighting-mtd \
--target ti-cc13x4_26x4-lock-ftd \
--target ti-cc13x4_26x4-lock-mtd \
--target ti-cc13x4_26x4-pump-mtd \
Expand All @@ -79,13 +77,13 @@ jobs:
cc13x2_26x2 LP_CC2652R7 lock-mtd \
out/artifacts/ti-cc13x2x7_26x2x7-lock-mtd/chip-LP_CC2652R7-lock-example.out \
/tmp/bloat_reports/
- name: Get Pump App size stats
- name: Get Pump MTD size stats
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cc13x2_26x2 LP_CC2652R7 pump-app \
out/artifacts/ti-cc13x2x7_26x2x7-pump-mtd/chip-LP_CC2652R7-pump-example.out \
/tmp/bloat_reports/
- name: Get Pump Controller App size stats
- name: Get Pump Controller MTD size stats
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cc13x2_26x2 LP_CC2652R7 pump-controller-app \
Expand All @@ -109,17 +107,17 @@ jobs:
cc13x4_26x4 LP_EM_CC1354P10_6 pump-app \
out/artifacts/ti-cc13x4_26x4-pump-mtd/chip-LP_EM_CC1354P10_6-pump-example.out \
/tmp/bloat_reports/
- name: Get Pump Controller App size stats
- name: Get Pump Controller MTD size stats
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cc13x4_26x4 LP_EM_CC1354P10_6 pump-controller-app \
out/artifacts/ti-cc13x4_26x4-pump-controller-mtd/chip-LP_EM_CC1354P10_6-pump-controller-example.out \
/tmp/bloat_reports/
- name: Get Lighting App size stats
- name: Get Lighting FTD size stats
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
cc13x4_26x4 LP_EM_CC1354P10_6 lighting-app \
out/artifacts/ti-cc13x4_26x4-lighting/chip-LP_EM_CC1354P10_6-lighting-example.out \
out/artifacts/ti-cc13x4_26x4-lighting-mtd/chip-LP_EM_CC1354P10_6-lighting-example.out \
/tmp/bloat_reports/
- name: Uploading Size Reports
uses: ./.github/actions/upload-size-reports
Expand Down
1 change: 1 addition & 0 deletions examples/all-clusters-app/cc13x4_26x4/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ lwip_debug = false
chip_enable_ota_requestor = false

openthread_external_platform = "${chip_root}/third_party/openthread/platforms/cc13x4_26x4:libopenthread-cc13x4_cc26x4"
chip_openthread_ftd = true

# Disable CHIP Logging
#chip_progress_logging = false
Expand Down
24 changes: 10 additions & 14 deletions examples/lighting-app/cc13x2x7_26x2x7/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ ti_simplelink_sdk("sdk") {
}

ti_sysconfig("sysconfig") {
sources = [ "${project_dir}/chip.syscfg" ]

outputs = [
"ti_radio_config.c",
"ti_radio_config.h",
Expand All @@ -45,20 +43,18 @@ ti_sysconfig("sysconfig") {
"ti_ble_config.h",
"ti_dmm_application_policy.c",
"ti_dmm_application_policy.h",

# disabled until upstream generation is aligned
#"tiop_config.h",
#"tiop_config.c",

# not traditional source files
#"ti_utils_build_linker.cmd.genlibs",
#"syscfg_c.rov.xs",
#"ti_utils_runtime_model.gv",
#"ti_utils_runtime_Makefile",
#"ti_ble_app_config.opt",
#"ti_build_config.opt",
]

if (chip_enable_ota_requestor) {
sources = [ "${project_dir}/chip_ota.syscfg" ]
} else {
sources = [ "${project_dir}/chip.syscfg" ]
outputs += [
"ti_devices_config.c",
"ti_devices_config.h",
]
}

public_configs = [ ":sdk_dmm_config" ]

cflags = [
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/cc13x2x7_26x2x7/args.gni
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ openthread_external_platform = "${chip_root}/third_party/openthread/platforms/cc
chip_progress_logging = false

#chip_detail_logging = false
#chip_automation_logging = false
chip_automation_logging = false

# BLE options
chip_config_network_layer_ble = true
Expand Down
3 changes: 1 addition & 2 deletions examples/lighting-app/cc13x2x7_26x2x7/chip.syscfg
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ for(var setting in ccfgSettings)
CCFG[setting] = ccfgSettings[setting];
}

// Disable CCFG generation, this is added by the BIM project
CCFG.enableCodeGeneration = false;
CCFG.enableCodeGeneration = true;

/* NVS */
NVS1.$name = "CONFIG_NVSINTERNAL";
Expand Down
238 changes: 238 additions & 0 deletions examples/lighting-app/cc13x2x7_26x2x7/chip_ota.syscfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
/*
*
* Copyright (c) 2020 Project CHIP Authors
* Copyright (c) 2020 Texas Instruments Incorporated
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/


/* Modules */
var AESCCM = scripting.addModule("/ti/drivers/AESCCM");
var AESECB = scripting.addModule("/ti/drivers/AESECB");
var Button = scripting.addModule("/ti/drivers/apps/Button");
var LED = scripting.addModule("/ti/drivers/apps/LED");
var NVS = scripting.addModule("/ti/drivers/NVS");
var RF = scripting.addModule("/ti/drivers/RF");
var RFDesign = scripting.addModule("ti/devices/radioconfig/rfdesign");
var RFCustom = scripting.addModule("/ti/devices/radioconfig/custom");
var TRNG = scripting.addModule("/ti/drivers/TRNG");
var SHA2 = scripting.addModule("/ti/drivers/SHA2");
var UART2 = scripting.addModule("/ti/drivers/UART2");
var ble = scripting.addModule("/ti/ble5stack/ble");
var dmm = scripting.addModule("/ti/dmm/dmm");
var AESCTRDRBG = scripting.addModule("/ti/drivers/AESCTRDRBG");
var ECDH = scripting.addModule("/ti/drivers/ECDH");

/* Instances */
var AESCCM1 = AESCCM.addInstance();
var AESECB1 = AESECB.addInstance();
var AESECB2 = AESECB.addInstance();
var Button1 = Button.addInstance();
var Button2 = Button.addInstance();
var NVS1 = NVS.addInstance();
var NVS2 = NVS.addInstance();
var SHA21 = SHA2.addInstance();
var LED1 = LED.addInstance();
var LED2 = LED.addInstance();
var TRNG1 = TRNG.addInstance();
var TRNG2 = TRNG.addInstance();
var TRNG3 = TRNG.addInstance();
var UART2 = UART2.addInstance();
var AESCTRDRBG1 = AESCTRDRBG.addInstance();
var ECDH1 = ECDH.addInstance();

AESCTRDRBG1.$name = "CONFIG_AESCTRDRBG_0";

AESCCM1.$name = "CONFIG_AESCCM0";

AESECB1.$name = "CONFIG_AESECB0";
AESECB2.$name = "CONFIG_AESECB_1";

ECDH1.$name = "CONFIG_ECDH0";

/* Left Button */
Button1.$name = "CONFIG_BTN_LEFT";
Button1.$hardware = system.deviceData.board.components["BTN-1"];
Button1.gpioPin.$name = "CONFIG_GPIO_BTN1";
Button1.gpioPin.pull = "Pull Up";
Button1.gpioPin.interruptTrigger = "Falling Edge";

/* Left Button */
Button2.$name = "CONFIG_BTN_RIGHT";
Button2.$hardware = system.deviceData.board.components["BTN-2"];
Button2.gpioPin.$name = "CONFIG_GPIO_BTN2";
Button2.gpioPin.pull = "Pull Up";
Button2.gpioPin.interruptTrigger = "Falling Edge";

/* ======== CCFG ======== */
var CCFG = scripting.addModule("/ti/devices/CCFG");
const ccfgSettings = system.getScript("/ti/common/lprf_ccfg_settings.js").ccfgSettings;
for(var setting in ccfgSettings)
{
CCFG[setting] = ccfgSettings[setting];
}

// Disable CCFG generation, this is added by the BIM project
CCFG.enableCodeGeneration = false;

/* NVS */
NVS1.$name = "CONFIG_NVSINTERNAL";
NVS1.internalFlash.regionBase = 0xAA000;
NVS1.internalFlash.regionSize = 0x4000;

NVS2.$name = "CONFIG_NVSEXTERNAL";
NVS2.nvsType = "External"; // NVS Region Type
NVS2.$hardware = system.deviceData.board.components.MX25R8035F;

/* RF */
/* if an antenna component exists, assign it to the rf instance */
if (system.deviceData.board && system.deviceData.board.components.RF) {
RF.$hardware = system.deviceData.board.components.RF;
}

const rfDesignSettings = system.getScript("/ti/common/lprf_rf_design_settings.js").rfDesignSettings;
for(var setting in rfDesignSettings)
{
RFDesign[setting] = rfDesignSettings[setting];
}

/* Handling for RF frontend characterization */
if(RFDesign.rfDesign.match(/LP_CC2652PSIP/))
{
RFCustom.ieee = ["ieee154p10"];
var rfCodeExportConfig = RFCustom.radioConfigieee154p10.codeExportConfig
}
else
{
RFCustom.ieee = ["ieee154"];
var rfCodeExportConfig = RFCustom.radioConfigieee154.codeExportConfig
}

var cmdList = [
"cmdIeeeTx",
"cmdIeeeRx",
"cmdIeeeCsma",
"cmdIeeeEdScan",
"cmdIeeeRxAck",
"cmdTxTest"
];

rfCodeExportConfig.useConst = true;
rfCodeExportConfig.useMulti = true;
rfCodeExportConfig.symGenMethod = "Custom";

const deviceId = system.deviceData.deviceId;

// Add high PA options if present
if(deviceId.match(/CC(265[12]R|2674R|1352R1|1354R)/))
{
cmdList.push("cmdRadioSetup");
rfCodeExportConfig.cmdRadioSetup = "RF_cmdIeeeRadioSetup";
}
else if(deviceId.match(/CC(265[12]P|2674P|1352P)/))
{
cmdList.push("cmdRadioSetupPa");
rfCodeExportConfig.cmdRadioSetupPa = "RF_cmdIeeeRadioSetup";
rfCodeExportConfig.paExport = "combined";
}
else if(deviceId.match(/CC(265[34]|1354)P/))
{
cmdList.push("cmdRadioSetupPa");
rfCodeExportConfig.cmdRadioSetupPa = "RF_cmdIeeeRadioSetup";
// currently not characterized for high PA
}
else
{
throw new Error("Could not match platform to any known platform types");
}

rfCodeExportConfig.cmdList_ieee_15_4 = cmdList;

/* Red LED */
LED1.$name = "CONFIG_LED_RED";
LED1.$hardware = system.deviceData.board.components.LED_RED;
LED1.gpioPin.$name = "CONFIG_GPIO_RLED";
LED1.gpioPin.mode = "Output";
LED1.gpioPin.callbackFunction = "";

/* Green LED */
LED2.$name = "CONFIG_LED_GREEN";
LED2.$hardware = system.deviceData.board.components.LED_GREEN;
LED2.gpioPin.$name = "CONFIG_GPIO_GLED";
LED2.gpioPin.mode = "Output";
LED2.gpioPin.callbackFunction = "";

/* Debug UART */
UART2.$hardware = system.deviceData.board.components.XDS110UART;
UART2.$name = "CONFIG_UART2_DEBUG";

/* TRNG */
TRNG1.$name = "CONFIG_TRNG_0";
TRNG2.$name = "CONFIG_TRNG_THREAD";
TRNG3.$name = "CONFIG_TRNG_APP";

/* BLE */
ble.addressMode = "ADDRMODE_RP_WITH_PUBLIC_ID";
ble.maxConnNum = 1;
ble.numOfAdvSets = 1;
ble.lockProject = true;
ble.oneLibSizeOpt = true;
ble.maxPDUSize = 255;
ble.radioConfig.codeExportConfig.$name = "ti_devices_radioconfig_code_export_param2";
ble.connUpdateParamsPeripheral.$name = "ti_ble5stack_general_ble_conn_update_params0";
ble.connUpdateParamsPeripheral.reqMinConnInt = 30;
ble.connUpdateParamsPeripheral.reqMaxConnInt = 50;


ble.advSet1.$name = "ti_ble5stack_broadcaster_advertisement_set0";
ble.advSet1.advParam1.$name = "ti_ble5stack_broadcaster_advertisement_params0";

/* DMM */
dmm.project = "ti_thread_thermostat_remote_display";
dmm.stackRoles = ["blePeripheral","threadFTD"];
dmm.lockStackRoles = true;
dmm.numApplicationStates = 10;
dmm.applicationState0 = "ANY";
dmm.applicationState1 = "DMMPOLICY_BLE_IDLE";
dmm.applicationState2 = "DMMPOLICY_BLE_ADV";
dmm.applicationState3 = "DMMPOLICY_BLE_CONNECTING";
dmm.applicationState4 = "DMMPOLICY_BLE_HIGH_BANDWIDTH";
dmm.applicationState5 = "DMMPOLICY_BLE_CONNECTED";
dmm.applicationState6 = "DMMPOLICY_BLE_OAD";
dmm.applicationState7 = "DMMPOLICY_THREAD_IDLE";
dmm.applicationState8 = "DMMPOLICY_THREAD_LINK_EST";
dmm.applicationState9 = "DMMPOLICY_THREAD_DATA";
dmm.policyArray.create(4);
dmm.policyArray[0].$name = "ti_dmm_policy_dmm_policy0";
dmm.policyArray[0].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble0";
dmm.policyArray[0].blePeripheral.applicationStates = ["applicationState6"];
dmm.policyArray[0].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread0";
dmm.policyArray[0].threadFTD.pause = "DMMPOLICY_PAUSED";
dmm.policyArray[1].$name = "ti_dmm_policy_dmm_policy1";
dmm.policyArray[1].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble1";
dmm.policyArray[1].blePeripheral.applicationStates = ["applicationState3","applicationState4"];
dmm.policyArray[1].blePeripheral.weight = 25;
dmm.policyArray[1].blePeripheral.appliedActivity = ["DMMPOLICY_APPLIED_ACTIVITY_BLE_CONNECTION"];
dmm.policyArray[1].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread1";
dmm.policyArray[2].$name = "ti_dmm_policy_dmm_policy2";
dmm.policyArray[2].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble2";
dmm.policyArray[2].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread2";
dmm.policyArray[2].threadFTD.weight = 30;
dmm.policyArray[2].threadFTD.applicationStates = ["applicationState8"];
dmm.policyArray[2].threadFTD.appliedActivity = ["DMMPOLICY_APPLIED_ACTIVITY_ALL"];
dmm.policyArray[3].$name = "ti_dmm_policy_dmm_policy3";
dmm.policyArray[3].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble3";
dmm.policyArray[3].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread3";
dmm.policyArray[3].threadFTD.weight = 1;
Loading