Skip to content

Commit

Permalink
syscfg: Patch stored config
Browse files Browse the repository at this point in the history
Since we are now tracking the config file in git, we no longer have to
post-patch the workspace.

This has multiple advantages. We no longer have to build all targets,
patch all targets and can actually track changes in code.

Signed-off-by: Olliver Schinagl <[email protected]>
  • Loading branch information
oliv3r committed Aug 17, 2024
1 parent d3a3a13 commit dde9ff5
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 177 deletions.
21 changes: 16 additions & 5 deletions coordinator/Z-Stack_3.x.0/COMPILE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

## Compiling
1. Create a folder called `workspace` in the folder where the SDK is installed. In the SDK installation folder you should see files like `Makefile` and `license_simplelink_cc13xx_cc26xx_sdk_7_10_00_98.txt`.
1. Copy `patches/*.patch` to the SDK installation folder, open a Git Bash in this folder and apply the patch using `git apply --exclude='cc13xx_cc26xx_sdk' --ignore-space-change 00*.patch`.
1. Copy `patches/*.patch` to the SDK installation folder, open a Git Bash in this folder and apply the patch using `git apply --exclude='cc13xx_cc26xx_sdk' --ignore-space-change 0*.patch`.
1. Start Code Composer Studio, it will ask you to select a workspace folder, select the `workspace` folder you created in the previous step.
1. Go to *File -> Import -> Code Composer Studio -> CCS Projects -> Select* search-directory: `simplelink_cc13xx_cc26xx_sdk_7_10_00_98/examples/rtos`.
1. Select:
1. Select the desired project(s), choose based on chip, ignore `LP` or `LAUNCHXL` naming:
- `znp_CC1352P_2_LAUNCHXL_tirtos7_ticlang`
- `znp_CC26X2R1_LAUNCHXL_tirtos7_ticlang`
- `znp_LP_CC1352P7_4_tirtos7_ticlang`
Expand All @@ -18,8 +18,7 @@
1. Press *Finish*.
1. Close Code Composer Studio and then copy the appropriate `syscfg` file as `znp.syscfg` into the appropriate workspace folder(s).
- For example copy `znp_CC26X2R1_LAUNCHXL.syscfg` into `workspace/znp_CC26X2R1_LAUNCHXL_tirtos7_ticlang/znp.syscfg`.
1. Apply the final patch using `git apply --exclude='cc13xx_cc26xx_sdk' --ignore-space-change 0999-firmware.patch`.
1. Build the 5 projects; right click -> *Build project*.
1. Build the project(s); right click -> *Build project*.
- **Important:** by default the **launchpad** variant of the CC1352P2_CC2652P (= `znp_CC1352P_2_LAUNCHXL_tirtos7_ticlang`) is build. To build the **other** variant configure the correct pins in Code Compose Studio, don't forget to save.
1. Once finished, the firmware can be found under `znp_*_tirtos7_ticlang/default/znp_*_tirtos7_ticlang.hex`
- `znp_CC1352P_2_LAUNCHXL_tirtos7_ticlang.hex` -> CC1352P-2 and CC2652P based boards
Expand Down Expand Up @@ -61,7 +60,19 @@ $ docker run \
> __Note:__ The local directory `./workspace` is volume-mounted into the containers `/build/workspace` directory to be able to keep files from the container, but can be freely removed when done.
Within the container, we now follow the same steps as above. The GUI is still needed and instructions below explain how this can be achieved.
Within the container, we now follow similar steps as above, however the GUI is not needed.

1. Within the container, import the project into the workspace
`# eclipse -noSplash -data "${HOME}/workspace" -application 'com.ti.ccstudio.apps.projectImport' -ccs.location "${SLF2_SDK}/examples/rtos/CC1352P_2_LAUNCHXL/zstack/znp/tirtos7/ticlang/znp_CC1352P_2_LAUNCHXL_tirtos7_ticlang.projectspec"`

1. Copy the board configuration file
`# cp '/src/znp_CC1352P_2_LAUNCHXL.syscfg' "${HOME}/workspace/znp_CC1352P_2_LAUNCHXL_tirtos7_ticlang/znp.syscfg"`

1. Compile!
`# eclipse -noSplash -data "${HOME}/workspace" -application 'com.ti.ccstudio.apps.projectBuild' -ccs.projects 'znp_CC1352P_2_LAUNCHXL_tirtos7_ticlang'`
The output can then be found `./workspace/znp_CC1352P_2_LAUNCHXL_tirtos7_ticlang/default/znp_CC1352P_2_LAUNCHXL_tirtos7_ticlang.hex` on the host.

> __Note:__ The path used here depends on the location used in the previous step.
### Launching eclipse in the container
To launch eclipse in the container to test/check things out. This does require a X11 compatible host.
Expand Down
164 changes: 2 additions & 162 deletions coordinator/Z-Stack_3.x.0/patches/0999-firmware.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
From 995449cb349571fe7081821225f10ea869c9bfd5 Mon Sep 17 00:00:00 2001
From: Koen Kanters <[email protected]>
Date: Sun, 7 May 2023 20:55:19 +0200
Subject: [PATCH 1/1] Own changes
Subject: [PATCH 1/1] Version patch

---
source/ti/zstack/mt/mt_version.c | 10 +-
.../znp.syscfg | 6 +-
.../znp.syscfg | 6 +-
.../znp.syscfg | 6 +-
.../znp.syscfg | 6 +-
.../znp.syscfg | 6 +-
6 files changed, 33 insertions(+), 11 deletions(-)
1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/source/ti/zstack/mt/mt_version.c b/source/ti/zstack/mt/mt_version.c
index 6a9b760d..0fa8f7c0 100644
Expand Down Expand Up @@ -41,161 +36,6 @@ index 6a9b760d..0fa8f7c0 100644
};

/******************************************************************************
diff --git a/workspace/znp_CC1352P_2_LAUNCHXL_tirtos7_ticlang/znp.syscfg b/workspace/znp_CC1352P_2_LAUNCHXL_tirtos7_ticlang/znp.syscfg
index 2725d0f8..af3fc593 100644
--- a/workspace/znp_CC1352P_2_LAUNCHXL_tirtos7_ticlang/znp.syscfg
+++ b/workspace/znp_CC1352P_2_LAUNCHXL_tirtos7_ticlang/znp.syscfg
@@ -65,6 +69,7 @@ CCFG.enableBootloaderBackdoor = true;
CCFG.dioBootloaderBackdoor = 15;
CCFG.levelBootloaderBackdoor = "Active low";
CCFG.forceVddr = true;
+CCFG.enableDCDC = false;
CCFG.ccfgTemplate.$name = "ti_devices_CCFG_CCFGCC26XXTemplate0";

rfdesign.rfDesign = "LAUNCHXL-CC1352P-2";
@@ -87,8 +92,8 @@ ECDSA1.$name = "CONFIG_ECDSA_0";

NVS1.$name = "CONFIG_NVSINTERNAL";
NVS1.internalFlash.$name = "ti_drivers_nvs_NVSCC26XX0";
-NVS1.internalFlash.regionSize = 0x4000;
-NVS1.internalFlash.regionBase = 0x52000;
+NVS1.internalFlash.regionSize = 0x6000;
+NVS1.internalFlash.regionBase = 0x50000;

NVS2.$name = "CONFIG_NVSEXTERNAL";
NVS2.nvsType = "External";
@@ -179,6 +184,7 @@ zstack.deviceTypeReadOnly = true;
zstack.touchlink.$name = "ti_zstack_touchlink_zstack_touchlink0";
zstack.pm.$name = "ti_zstack_pm_zstack_pm0";
zstack.rf.$name = "ti_zstack_rf_zstack_rf0";
+zstack.rf.txPower = "9";
zstack.rf.radioConfig.$name = "ti_devices_radioconfig_settings_ieee_15_40";
zstack.rf.radioConfig.codeExportConfig.$name = "ti_devices_radioconfig_code_export_param0";
zstack.rf.coexSettings.$name = "ti_zstack_rf_zstack_coex_mod0";
diff --git a/workspace/znp_CC26X2R1_LAUNCHXL_tirtos7_ticlang/znp.syscfg b/workspace/znp_CC26X2R1_LAUNCHXL_tirtos7_ticlang/znp.syscfg
index 77fed0fd..1d1f2ebb 100644
--- a/workspace/znp_CC26X2R1_LAUNCHXL_tirtos7_ticlang/znp.syscfg
+++ b/workspace/znp_CC26X2R1_LAUNCHXL_tirtos7_ticlang/znp.syscfg
@@ -62,6 +62,7 @@ CCFG.enableBootloader = true;
CCFG.enableBootloaderBackdoor = true;
CCFG.dioBootloaderBackdoor = 13;
CCFG.levelBootloaderBackdoor = "Active low";
+CCFG.enableDCDC = false;
CCFG.ccfgTemplate.$name = "ti_devices_CCFG_CCFGCC26XXTemplate0";

Display1.$hardware = system.deviceData.board.components.XDS110UART;
@@ -82,8 +83,8 @@ ECDSA1.$name = "CONFIG_ECDSA_0";

NVS1.$name = "CONFIG_NVSINTERNAL";
NVS1.internalFlash.$name = "ti_drivers_nvs_NVSCC26XX0";
-NVS1.internalFlash.regionSize = 0x4000;
-NVS1.internalFlash.regionBase = 0x52000;
+NVS1.internalFlash.regionBase = 0x50000;
+NVS1.internalFlash.regionSize = 0x6000;

NVS2.$name = "CONFIG_NVSEXTERNAL";
NVS2.nvsType = "External";
@@ -172,6 +173,7 @@ zstack.deviceTypeReadOnly = true;
zstack.touchlink.$name = "ti_zstack_touchlink_zstack_touchlink0";
zstack.pm.$name = "ti_zstack_pm_zstack_pm0";
zstack.rf.$name = "ti_zstack_rf_zstack_rf0";
+zstack.rf.txPower = "5";
zstack.rf.radioConfig.$name = "ti_devices_radioconfig_settings_ieee_15_40";
zstack.rf.radioConfig.codeExportConfig.$name = "ti_devices_radioconfig_code_export_param0";
zstack.rf.coexSettings.$name = "ti_zstack_rf_zstack_coex_mod0";
diff --git a/workspace/znp_LP_CC1352P7_4_tirtos7_ticlang/znp.syscfg b/workspace/znp_LP_CC1352P7_4_tirtos7_ticlang/znp.syscfg
index 6bdc13f9..dd2a4bcc 100644
--- a/workspace/znp_LP_CC1352P7_4_tirtos7_ticlang/znp.syscfg
+++ b/workspace/znp_LP_CC1352P7_4_tirtos7_ticlang/znp.syscfg
@@ -64,6 +64,7 @@ CCFG.enableBootloader = true;
CCFG.enableBootloaderBackdoor = true;
CCFG.dioBootloaderBackdoor = 15;
CCFG.levelBootloaderBackdoor = "Active low";
+CCFG.enableDCDC = false;
CCFG.ccfgTemplate.$name = "ti_devices_CCFG_CCFGCC26XXTemplate0";

rfdesign.rfDesign = "LP_CC1352P7-4";
@@ -86,8 +87,8 @@ ECDSA1.$name = "CONFIG_ECDSA_0";

NVS1.$name = "CONFIG_NVSINTERNAL";
NVS1.internalFlash.$name = "ti_drivers_nvs_NVSCC26XX0";
-NVS1.internalFlash.regionSize = 0x4000;
-NVS1.internalFlash.regionBase = 0xAA000;
+NVS1.internalFlash.regionSize = 0x8000;
+NVS1.internalFlash.regionBase = 0xA6000;

NVS2.$name = "CONFIG_NVSEXTERNAL";
NVS2.nvsType = "External";
@@ -178,6 +179,7 @@ zstack.deviceTypeReadOnly = true;
zstack.touchlink.$name = "ti_zstack_touchlink_zstack_touchlink0";
zstack.pm.$name = "ti_zstack_pm_zstack_pm0";
zstack.rf.$name = "ti_zstack_rf_zstack_rf0";
+zstack.rf.txPower = "5";
zstack.rf.radioConfig.$name = "ti_devices_radioconfig_settings_ieee_15_40";
zstack.rf.radioConfig.codeExportConfig.$name = "ti_devices_radioconfig_code_export_param0";
zstack.rf.coexSettings.$name = "ti_zstack_rf_zstack_coex_mod0";
diff --git a/workspace/znp_LP_CC2652R7_tirtos7_ticlang/znp.syscfg b/workspace/znp_LP_CC2652R7_tirtos7_ticlang/znp.syscfg
index 3f127f08..6cf7f943 100644
--- a/workspace/znp_LP_CC2652R7_tirtos7_ticlang/znp.syscfg
+++ b/workspace/znp_LP_CC2652R7_tirtos7_ticlang/znp.syscfg
@@ -62,6 +62,7 @@ CCFG.enableBootloader = true;
CCFG.enableBootloaderBackdoor = true;
CCFG.dioBootloaderBackdoor = 13;
CCFG.levelBootloaderBackdoor = "Active low";
+CCFG.enableDCDC = false;
CCFG.ccfgTemplate.$name = "ti_devices_CCFG_CCFGCC26XXTemplate0";

Display1.$hardware = system.deviceData.board.components.XDS110UART;
@@ -82,8 +83,8 @@ ECDSA1.$name = "CONFIG_ECDSA_0";

NVS1.$name = "CONFIG_NVSINTERNAL";
NVS1.internalFlash.$name = "ti_drivers_nvs_NVSCC26XX0";
-NVS1.internalFlash.regionSize = 0x4000;
-NVS1.internalFlash.regionBase = 0xAA000;
+NVS1.internalFlash.regionSize = 0x8000;
+NVS1.internalFlash.regionBase = 0xA6000;

NVS2.$name = "CONFIG_NVSEXTERNAL";
NVS2.nvsType = "External";
@@ -172,6 +173,7 @@ zstack.deviceTypeReadOnly = true;
zstack.touchlink.$name = "ti_zstack_touchlink_zstack_touchlink0";
zstack.pm.$name = "ti_zstack_pm_zstack_pm0";
zstack.rf.$name = "ti_zstack_rf_zstack_rf0";
+zstack.rf.txPower = "5";
zstack.rf.radioConfig.$name = "ti_devices_radioconfig_settings_ieee_15_40";
zstack.rf.radioConfig.codeExportConfig.$name = "ti_devices_radioconfig_code_export_param0";
zstack.rf.coexSettings.$name = "ti_zstack_rf_zstack_coex_mod0";
diff --git a/workspace/znp_LP_CC2652RB_tirtos7_ticlang/znp.syscfg b/workspace/znp_LP_CC2652RB_tirtos7_ticlang/znp.syscfg
index 210efb92..5666eb13 100644
--- a/workspace/znp_LP_CC2652RB_tirtos7_ticlang/znp.syscfg
+++ b/workspace/znp_LP_CC2652RB_tirtos7_ticlang/znp.syscfg
@@ -63,6 +63,7 @@ CCFG.enableBootloaderBackdoor = true;
CCFG.dioBootloaderBackdoor = 13;
CCFG.levelBootloaderBackdoor = "Active low";
CCFG.srcClkLF = "Derived from HF XOSC";
+CCFG.enableDCDC = false;
CCFG.ccfgTemplate.$name = "ti_devices_CCFG_CCFGCC26XXTemplate0";

Display1.$hardware = system.deviceData.board.components.XDS110UART;
@@ -83,8 +84,8 @@ ECDSA1.$name = "CONFIG_ECDSA_0";

NVS1.$name = "CONFIG_NVSINTERNAL";
NVS1.internalFlash.$name = "ti_drivers_nvs_NVSCC26XX0";
-NVS1.internalFlash.regionSize = 0x4000;
-NVS1.internalFlash.regionBase = 0x52000;
+NVS1.internalFlash.regionBase = 0x50000;
+NVS1.internalFlash.regionSize = 0x6000;

NVS2.$name = "CONFIG_NVSEXTERNAL";
NVS2.nvsType = "External";
@@ -173,6 +174,7 @@ zstack.deviceTypeReadOnly = true;
zstack.touchlink.$name = "ti_zstack_touchlink_zstack_touchlink0";
zstack.pm.$name = "ti_zstack_pm_zstack_pm0";
zstack.rf.$name = "ti_zstack_rf_zstack_rf0";
+zstack.rf.txPower = "5";
zstack.rf.radioConfig.$name = "ti_devices_radioconfig_settings_ieee_15_40";
zstack.rf.radioConfig.codeExportConfig.$name = "ti_devices_radioconfig_code_export_param0";
zstack.rf.coexSettings.$name = "ti_zstack_rf_zstack_coex_mod0";
--
2.38.1

6 changes: 4 additions & 2 deletions coordinator/Z-Stack_3.x.0/znp_CC1352P_2_LAUNCHXL.syscfg
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ CCFG.enableBootloaderBackdoor = true;
CCFG.dioBootloaderBackdoor = 15;
CCFG.levelBootloaderBackdoor = "Active low";
CCFG.forceVddr = true;
CCFG.enableDCDC = false;
CCFG.ccfgTemplate.$name = "ti_devices_CCFG_CCFGCC26XXTemplate0";

rfdesign.rfDesign = "LAUNCHXL-CC1352P-2";
Expand All @@ -87,8 +88,8 @@ ECDSA1.$name = "CONFIG_ECDSA_0";

NVS1.$name = "CONFIG_NVSINTERNAL";
NVS1.internalFlash.$name = "ti_drivers_nvs_NVSCC26XX0";
NVS1.internalFlash.regionSize = 0x4000;
NVS1.internalFlash.regionBase = 0x52000;
NVS1.internalFlash.regionSize = 0x6000;
NVS1.internalFlash.regionBase = 0x50000;

NVS2.$name = "CONFIG_NVSEXTERNAL";
NVS2.nvsType = "External";
Expand Down Expand Up @@ -179,6 +180,7 @@ zstack.deviceTypeReadOnly = true;
zstack.touchlink.$name = "ti_zstack_touchlink_zstack_touchlink0";
zstack.pm.$name = "ti_zstack_pm_zstack_pm0";
zstack.rf.$name = "ti_zstack_rf_zstack_rf0";
zstack.rf.txPower = "9";
zstack.rf.radioConfig.$name = "ti_devices_radioconfig_settings_ieee_15_40";
zstack.rf.radioConfig.codeExportConfig.$name = "ti_devices_radioconfig_code_export_param0";
zstack.rf.coexSettings.$name = "ti_zstack_rf_zstack_coex_mod0";
Expand Down
6 changes: 4 additions & 2 deletions coordinator/Z-Stack_3.x.0/znp_CC26X2R1_LAUNCHXL.syscfg
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ CCFG.enableBootloader = true;
CCFG.enableBootloaderBackdoor = true;
CCFG.dioBootloaderBackdoor = 13;
CCFG.levelBootloaderBackdoor = "Active low";
CCFG.enableDCDC = false;
CCFG.ccfgTemplate.$name = "ti_devices_CCFG_CCFGCC26XXTemplate0";

Display1.$hardware = system.deviceData.board.components.XDS110UART;
Expand All @@ -82,8 +83,8 @@ ECDSA1.$name = "CONFIG_ECDSA_0";

NVS1.$name = "CONFIG_NVSINTERNAL";
NVS1.internalFlash.$name = "ti_drivers_nvs_NVSCC26XX0";
NVS1.internalFlash.regionSize = 0x4000;
NVS1.internalFlash.regionBase = 0x52000;
NVS1.internalFlash.regionSize = 0x6000;
NVS1.internalFlash.regionBase = 0x50000;

NVS2.$name = "CONFIG_NVSEXTERNAL";
NVS2.nvsType = "External";
Expand Down Expand Up @@ -172,6 +173,7 @@ zstack.deviceTypeReadOnly = true;
zstack.touchlink.$name = "ti_zstack_touchlink_zstack_touchlink0";
zstack.pm.$name = "ti_zstack_pm_zstack_pm0";
zstack.rf.$name = "ti_zstack_rf_zstack_rf0";
zstack.rf.txPower = "5";
zstack.rf.radioConfig.$name = "ti_devices_radioconfig_settings_ieee_15_40";
zstack.rf.radioConfig.codeExportConfig.$name = "ti_devices_radioconfig_code_export_param0";
zstack.rf.coexSettings.$name = "ti_zstack_rf_zstack_coex_mod0";
Expand Down
6 changes: 4 additions & 2 deletions coordinator/Z-Stack_3.x.0/znp_LP_CC1352P7_4.syscfg
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ CCFG.enableBootloader = true;
CCFG.enableBootloaderBackdoor = true;
CCFG.dioBootloaderBackdoor = 15;
CCFG.levelBootloaderBackdoor = "Active low";
CCFG.enableDCDC = false;
CCFG.ccfgTemplate.$name = "ti_devices_CCFG_CCFGCC26XXTemplate0";

rfdesign.rfDesign = "LP_CC1352P7-4";
Expand All @@ -86,8 +87,8 @@ ECDSA1.$name = "CONFIG_ECDSA_0";

NVS1.$name = "CONFIG_NVSINTERNAL";
NVS1.internalFlash.$name = "ti_drivers_nvs_NVSCC26XX0";
NVS1.internalFlash.regionSize = 0x4000;
NVS1.internalFlash.regionBase = 0xAA000;
NVS1.internalFlash.regionSize = 0x8000;
NVS1.internalFlash.regionBase = 0xA6000;

NVS2.$name = "CONFIG_NVSEXTERNAL";
NVS2.nvsType = "External";
Expand Down Expand Up @@ -178,6 +179,7 @@ zstack.deviceTypeReadOnly = true;
zstack.touchlink.$name = "ti_zstack_touchlink_zstack_touchlink0";
zstack.pm.$name = "ti_zstack_pm_zstack_pm0";
zstack.rf.$name = "ti_zstack_rf_zstack_rf0";
zstack.rf.txPower = "5";
zstack.rf.radioConfig.$name = "ti_devices_radioconfig_settings_ieee_15_40";
zstack.rf.radioConfig.codeExportConfig.$name = "ti_devices_radioconfig_code_export_param0";
zstack.rf.coexSettings.$name = "ti_zstack_rf_zstack_coex_mod0";
Expand Down
6 changes: 4 additions & 2 deletions coordinator/Z-Stack_3.x.0/znp_LP_CC2652R7.syscfg
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ CCFG.enableBootloader = true;
CCFG.enableBootloaderBackdoor = true;
CCFG.dioBootloaderBackdoor = 13;
CCFG.levelBootloaderBackdoor = "Active low";
CCFG.enableDCDC = false;
CCFG.ccfgTemplate.$name = "ti_devices_CCFG_CCFGCC26XXTemplate0";

Display1.$hardware = system.deviceData.board.components.XDS110UART;
Expand All @@ -82,8 +83,8 @@ ECDSA1.$name = "CONFIG_ECDSA_0";

NVS1.$name = "CONFIG_NVSINTERNAL";
NVS1.internalFlash.$name = "ti_drivers_nvs_NVSCC26XX0";
NVS1.internalFlash.regionSize = 0x4000;
NVS1.internalFlash.regionBase = 0xAA000;
NVS1.internalFlash.regionSize = 0x8000;
NVS1.internalFlash.regionBase = 0xA6000;

NVS2.$name = "CONFIG_NVSEXTERNAL";
NVS2.nvsType = "External";
Expand Down Expand Up @@ -172,6 +173,7 @@ zstack.deviceTypeReadOnly = true;
zstack.touchlink.$name = "ti_zstack_touchlink_zstack_touchlink0";
zstack.pm.$name = "ti_zstack_pm_zstack_pm0";
zstack.rf.$name = "ti_zstack_rf_zstack_rf0";
zstack.rf.txPower = "5";
zstack.rf.radioConfig.$name = "ti_devices_radioconfig_settings_ieee_15_40";
zstack.rf.radioConfig.codeExportConfig.$name = "ti_devices_radioconfig_code_export_param0";
zstack.rf.coexSettings.$name = "ti_zstack_rf_zstack_coex_mod0";
Expand Down
Loading

0 comments on commit dde9ff5

Please sign in to comment.