Skip to content

Add TI CC13x2 and CC13x4 device support#61

Open
pradeep-hn wants to merge 4 commits into
CiscoDevNet:mainfrom
TexasInstruments:main_ti
Open

Add TI CC13x2 and CC13x4 device support#61
pradeep-hn wants to merge 4 commits into
CiscoDevNet:mainfrom
TexasInstruments:main_ti

Conversation

@pradeep-hn

Copy link
Copy Markdown

No description provided.

a1257330 and others added 4 commits May 11, 2026 15:36
  Introduce the TI CC13xx/CC13x4 Wi-SUN FAN family as a supported
  csmp-agent-lib target. The implementation uses SDK-only prebuilt
  libraries (no external source repositories required); all Wi-SUN
  MAC, Nanostack, and TLS symbols are supplied by the SDK's
  maclib_secure, wisun_rn_mbed_ns_tls_lib, and wisun_ncp_lib
  archives, selected automatically by SysConfig via
  ti_utils_build_linker.cmd.genlibs.

  Five LaunchPad variants are supported and built in a single
  ./build.sh ti_simplelink_wisun invocation by a BOARD_DIRS wildcard
  over Vendors/TI/*/csmp_example_tirf/freertos/ticlang/. Adding a
  new board requires only placing a directory there.

    osal/ti_simplelink_wisun:
    - osal_ti_simplelink_wisun.c: FreeRTOS/Nanostack OSAL implementation;
      socket, thread, mutex, timer, and NV-storage bindings for CC13xx
    - osal_platform_types.h: platform type definitions and mbed_tracef
      forward declaration; guards main() in CsmpAgentLib_sample.c via
      OSAL_TI_SIMPLELINK_WISUN so the library compiles without a duplicate
      entry point when linked into the board firmware
    - ti_simplelink_wisun.mak: SDK include paths for device headers,
      FreeRTOS portable layer, Nanostack public API, mbedTLS, and NVOCMP;
      supports CC13X4, CC13X2X7, CC13X2, and CC13X1 via DEVICE_FAMILY

    sample/tlvs/ti_simplelink_wisun_tlvs.c:
    - TI-specific TLV callbacks: wpanstatus, RPL, interface metrics,
      firmware image info, and hardware description; reads live data
      from Nanostack ws_management_api and nwk_stats_api
    - g_tx_power_dbm: file-scoped variable set by application.c from
      CONFIG_TRANSMIT_POWER; extern declaration removed from the shared
      CsmpAgentLib_sample_tlvs.h to keep platform-specific symbols out
      of the common header

    Vendors/TI/application (shared across all boards):
    - main.c / application.c: Wi-SUN border router node application;
      initialises mesh_system, opens UDP socket to NMS, starts CSMP
      agent task; sets g_tx_power_dbm from SysConfig CONFIG_TRANSMIT_POWER
    - mbed_config_app.h / advanced_config.h: Wi-SUN PHY configuration
      (FAN 1.1, North America 915 MHz, FH mode)
    - wisun_certificates.h / ws_router_fan_cert_certificates.h: device
      and CA certificate buffers for WPA2 network authentication
    - defines/router.opts: compile-time CSMP options; NMS address set
      via -DCSMP_AGENT_NMS_ADDRESS; device type OPENCSMP

    Vendors/TI/<BOARD>/csmp_example_tirf:
    - Five board configurations: LP_CC1312R7, LP_CC1352P7_1 (Cortex-M4F,
      CC13X2X7) and LP_EM_CC1314R10, LP_EM_CC1354P10_1, LP_EM_CC1354P10_6
      (Cortex-M33, CC13X4); each board carries only its board-specific
      csmp_example.syscfg (--board target) and ticlang/makefile (CPU
      flags, device include paths, linker command file)
    - M4F boards: -mcpu=cortex-m4 -march=armv7e-m -mfpu=fpv4-sp-d16,
      cc13x2x7_cc26x2x7.cmd, ARM_CM4F FreeRTOS port
    - M33F boards: -mcpu=cortex-m33 -mfpu=fpv5-sp-d16,
      cc13x4_cc26x4.cmd, ARM_CM33/non_secure FreeRTOS port
    - genLibs: TI154Stack.genLibs = "none" removed from syscfg so
      SysConfig emits prebuilt .a paths into genlibs; build previously
      required compiling ~250 MAC/Nanostack/TLS source files from the
      wisunfan development repo — now resolved entirely from SDK

    ti_simplelink_wisun.target / sample/ti_simplelink_wisun.target:
    - Root library target builds csmp_agent_lib_ti_simplelink_wisun.a
      using TI ARM Clang; board target loops over BOARD_DIRS and invokes
      each board makefile with CSMP_AGENT_LIB_INSTALL_DIR and SDK paths
    - Tool paths (SYSCONFIG_TOOL, TICLANG_ARMCOMPILER) sourced from
      SDK's imports.mak; user edits SIMPLELINK_SDK_LINUX in two .target
      files and imports.mak once per machine

    Vendors/TI/README.md:
    - Complete setup guide covering network architecture (Linux Host
      container + wfantund container two-container model), build
      configuration, TPD pre-provisioning, border router setup,
      flashing, IPv6 routing, and end-to-end verification

    build.sh / sample/Makefile / Makefile:
    - sample/Makefile clean: invoke ti_simplelink_wisun.target clean to
      remove board .obj, .hex, .out, and SysConfig-generated files
    - Board makefile clean uses *.obj glob instead of $(OBJECTS) to
      catch stale artifacts from previous full-source builds

  Signed-off-by: Aryan Arora <a1257330@ti.com>
  Extend the TI SimpleLink Wi-SUN example with clock synchronisation,
  over-the-air firmware upgrade support

  Changes:
  - application/sntp_sync.c, sntp_sync.h: new SNTP client (RFC 4330)
    that queries the IPv6 NTP server (default fd00::1) immediately after
    Wi-SUN join; falls back to CSMP_BUILD_EPOCH if the server is
    unreachable, keeping FND OTA schedule timers accurate
  - application/application.c: replace fixed CSMP_APPROX_EPOCH seed with
    sntp_sync() call; patch default_run_slot_image with TI-specific
    hwid/filename/version before sample_data_init() writes NV on first
    boot; add ti_ota_check_pending_activation() after osal_kernel_start()
  - all board makefiles: add application_sntp_sync.obj to object lists;
  - all board csmp_example.syscfg: increase FreeRTOS heapSize from
    0x8000 to 0xC000 and timerStackSize from 0x800 to 0x1000 to
    accommodate the additional SNTP and OTA stack usage
  - all board SecureBoot.mak: fix SDK env var (SCCM_ → SIMPLELINK_);
    embed build-date version stamp via $(shell date +%Y%m%d)
  - Makefile: default ti_simplelink_wisun target to CONFIG=SECUREBOOT
    so the signed MCUBoot binary is always produced alongside the hex
  - tools/tpd_config_cc13xx.json: new TPD header config used by
    add_tpdheader.py to wrap the signed .bin before FND upload;
    hwid="CC13XX" must match hw_info in the FND cc13xx device meta file
  - Vendors/TI/README.md: add Part C FND device type provisioning steps
    (addGenericEndpoints.sh, cc13xxMeta.json, CSV import); add Step B.2
    IANA PEN change (CISCO → TI); add Step F.5 Linux host mesh route;
    add Step F.10 ntpd server setup; add Part H OTA firmware update
    walkthrough (Steps H.1–H.13 covering build, flash, wrap, upload,
    and verify)

  Signed-off-by: Aryan Arora <a-arora@ti.com>
  Drop the manual CsmpAgentLib_sample.c version-string step from the
  OTA upgrade guide - FND reads the version from the signed image
  header, so the source edit was redundant and error-prone.

  Renumber the OTA checklist steps (H.3-H.13 → H.3-H.12) and correct
  the flash artifact reference from ns_node_csmp.hex to ns_node_csmp.bin.

  Replace the hardcoded SecureBoot.mak imgtool version (2.0.0) with
  1.0.0+<YYYYMMDD> so each build carries a unique build number without
  requiring a manual version bump between OTA cycles.

  Remove the stale ti_ota_check_pending_activation() call from
  application.c that is now handled elsewhere in the startup sequence.
@manojnacsl manojnacsl added the TI Texas Instruments | ti.com label Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

TI Texas Instruments | ti.com

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants