Commit Graph

7 Commits

Author SHA1 Message Date
Abtin Keshavarzian fb216d335c [cmake] update CMake configurations for Apple platforms (#12729)
This commit updates various CMake configuration files to simplify
the check for Apple platforms. It replaces the `CMAKE_CXX_COMPILER_ID`
check for `AppleClang` with the built-in `APPLE` variable across
multiple targets (such as `ftd`, `mtd`, `cli`, and others). This
ensures that Apple-specific linker and compiler flags (like `-Wl,-map`
and `-Wimplicit-int-conversion`) are correctly applied when building
on macOS, regardless of the specific compiler used.

Additionally, this commit updates `CMakeLists.txt` to explicitly set
the `CMAKE_AR` and `CMAKE_RANLIB` paths to the default system
locations (`/usr/bin/ar` and `/usr/bin/ranlib`) when the `APPLE`
variable is set.
2026-03-20 13:19:29 -05:00
Jonathan Hui 412596c990 [examples] define OPENTHREAD_FTD and OPENTHREAD_MTD (#11516) 2025-05-20 14:59:24 -07:00
Mason Tran f3701b746a [build] add cmake option for generating .map files (#9006)
This adds the CMake option `OT_LINKER_MAP` which will generate `.map`
files for any executables built when the option is `ON`.
2023-04-28 13:39:59 -07:00
Mason Tran cc8e4cce15 [cmake] add interface libraries ot-config-(ftd|mtd|radio) (#8190)
This allows for more granular control of any configuration which
might need to be incorporated in the core library build.
2022-09-22 23:20:35 -07:00
Mason Tran c8556dfd66 [cmake] add option for RCP specific mbedtls library (#7781)
This commit enables a different mbedtls library to be used for RCP
builds. This will make it possible to use a PSA Crypto mbedtls library
for FTD/MTD images while using a non-PSA crypto library on RCPs.
2022-06-02 19:26:29 -07:00
nikita-s-wrk f4e1526a49 [cmake] add ability to pick custom lib for MTD/FTD (#7041)
This commit enables different libraries option for ftd, mtd and rcp
builds.
2021-10-19 17:28:02 -07:00
Li Cao 097aa4f65d [cli] add cli-radio build (#6769)
Background:

In an early stage of developing a new product, developers may want to
verify the Thread related hardware functionality, for example, send,
receive, etc.  However if the product uses the posix <-> RCP mode,
it's hard to verify it before the posix daemon can run on the
host. cli-ftd and cli-mtd could be an alternative. However, if the
product uses the posix <-> RCP mode, the space of the 802.15.4 radio
chip will be very small. For example, nRF52811 doesn't have enough
space to flash cli-ftd or cli-mtd firmware. So this PR creates a new
firmware ot-cli-radio which has very limited functionality for
verifying the hardware.

Basically, the ot-cli-radio consists of openthread-radio and
libopenthread-cli-radio.a. It supports very few cli commands. The most
important command is diag. Currently, there are: diag, help, reset,
version.

Currently, the diag commands have different implementation on RCP:

- For commands like diag start, the process function
  (Diags::ProcessStart) is first called on host. Then host sends an
  SPI frame to the RCP and Diags::ProcessStart (different
  implementation) is called again on RCP.

- For commands like diag send, Diags::ProcessSend is first called on
  host.  Then host sends an SPI frame to the RCP, directly calling
  send API. And there is no Diags::ProcessSend implemented on RCP.

Let's call the implementation of Diags::Process* currently on host as
native diag commands. When we run ot-cli-radio, we should use the
native diag commands because it won't interact with a posix daemon and
it processes the diag commands through the whole process. So this PR
adds a new option OPENTHREAD_CONFIG_DIAG_NATIVE_CMDS_ON_RCP to control
whether to use the native diag implementation on RCP. When we use a
normal RCP, the option should be disabled. While when use
ot-cli-radio, the option should be enabled.
2021-09-18 09:51:35 -07:00