Z-Stack-firmware/coordinator/Z-Stack_3.x.0/COMPILE.md
Koen Kanters afd5ac4666
Z-Stack 3.x.0 20210708 (#301)
* Z-Stack_3.x.0 20210430 firmware

* Z-Stack_3.x.0 20210708 firmware
2021-08-01 20:46:21 +02:00

2.2 KiB

Compiling the firmware

Setup development environment

  1. Download and install SIMPLELINK-CC13X2-26X2-SDK_5.10.00.48.
  2. Download and install Code Composer Studio 10.3.0.00007.

Compiling

  1. Start Code Composer Studio
  2. Go to File -> Import -> Code Composer Studio -> CCS Projects -> Select search-directory: simplelink_cc13x2_26x2_sdk_4_40_00_44/examples/rtos. Select znp_CC26X2R1_LAUNCHXL_tirtos_css, znp_CC1352P_2_LAUNCHXL_tirtos_css and znp_LP_CC2652RB_tirtos_ccs. Press Finish.
  3. In Code Composer Studio, expand the 3 projects and for each open znp.syscfg, change Minimal Poll Period (ms) to 1000, change it back to 100 immediately and save the file.
  4. Go to your CCS workspace and copy firmware.patch to the root.
  5. Open Git Bash, go to your CCS root and apply the patch using git apply firmware.patch --ignore-space-change.
  6. Only for znp_CC1352P_2_LAUNCHXL_tirtos_css:
    • Right click on znp.syscfg -> Delete
    • Right click on znp_CC1352P_2_LAUNCHXL_tirtos_css -> Properties.
      • Go to (CCS) Build - ARM Compiler - Include Options -> Under Add dir to #include search path (--include_path, -l) add ${PROJECT_ROOT}/syscfg as the last entry.
      • Go to (CCS) Build - ARM Linker - File Search Path -> Under Include library file or command file as input (--library, -l) change ${PROJECT_BUILD_DIR}/syscfg/ti_utils_build_linker.cmd.genlibs to ${PROJECT_ROOT}/syscfg/ti_utils_build_linker.cmd.genlibs
  7. Build the 3 projects; right click -> Build project.
    • Important: by default the launchpad variant of the CC1352P2_CC2652P (= znp_CC1352P_2_LAUNCHXL_tirtos_ccs) is build. To build the other variant comment #define LAUNCHPAD_CONFIG 1 in preinclude.h (located under Stack/Config/), don't forget to save.
  8. Once finished, the firmware can be found under znp_[CC26X2R1/CC1352P_2/CC2652RB]_LAUNCHXL_tirtos_ccs/default/znp_[CC26X2R1/CC2652RB/CC1352P_2]_LAUNCHXL_tirtos_ccs.hex
    • znp_CC26X2R1_LAUNCHXL_tirtos_ccs.hex -> CC2652R
    • znp_CC2652RB_LAUNCHXL_tirtos_ccs.hex -> CC2652RB
    • znp_CC1352P_2_LAUNCHXL_tirtos_ccs.hex -> CC1352P-2 and CC2652P