nuttx/tools/ameba
raul_chen 84106b9152 arch/arm/ameba: resolve the asdk toolchain per-IC
Each ameba IC pins its asdk (arm-none-eabi) version in the SDK
(component/soc/<soc>/project/CMakeLists.txt): RTL8720F needs 12.3.1 while
RTL8721Dx needs 10.3.1.  Both share the same arm-none-eabi triple and differ
only by install directory.  The make + cmake setup previously read only the
global default, so the NuttX objects for an IC pinning a newer asdk were built
with the wrong compiler (not the one its SDK archives were built with).

Resolve the version per-IC from a single helper (ameba_asdk_version.sh, keyed
by the SoC) used by every caller:
  - toolchain.mk / ameba_board.mk: make picks the right asdk automatically
    (it already knows the SoC), no user action.
  - ameba_fetch_toolchain.sh: fetches the version the SoC pins.
  - tools/ameba/env.sh: takes an optional board (`. tools/ameba/env.sh
    <board>`) so cmake, which locks the compiler at project() time, gets the
    matching asdk on PATH before it probes.  No board -> the global default.
  - ameba_sdk.cmake: fail configure with a fix-it message if the on-PATH
    compiler is not the version this IC needs (e.g. a stale env from another
    board), instead of silently mis-compiling.

Assisted-by: Claude Code:claude-opus-4-8
Signed-off-by: raul_chen <raul_chen@realsil.com.cn>
2026-07-17 08:30:47 -03:00
..
ameba_menuconfig.sh arch/arm/ameba: cache SDK config, add ameba_menuconfig, silence vendor warning 2026-07-16 12:11:19 -04:00
Config.mk arch/arm/ameba: add CMake build support for RTL8721Dx and RTL8720F 2026-07-17 08:30:47 -03:00
env.sh arch/arm/ameba: resolve the asdk toolchain per-IC 2026-07-17 08:30:47 -03:00