summaryrefslogtreecommitdiff
path: root/libcpu
diff options
context:
space:
mode:
authorseteiro <[email protected]>2026-10-28 15:15:55 +0800
committerRbb666 <[email protected]>2026-11-10 11:53:07 +0800
commitaee8d01b15a6613cb3b3650927193843058e62a0 (patch)
tree1a5c8669c4a3ac943f77683ef6da77561c4305c8 /libcpu
parent95e82ec2e44ac646d58d92107844ade49ff5a93c (diff)
[libcpu][esp32s3] fix xtensa_context.h include path
Use find_package_path CPPPATH for xtensa_context.h.
Diffstat (limited to 'libcpu')
-rw-r--r--libcpu/xtensa/esp32s3/SConscript25
1 files changed, 25 insertions, 0 deletions
diff --git a/libcpu/xtensa/esp32s3/SConscript b/libcpu/xtensa/esp32s3/SConscript
new file mode 100644
index 0000000000..062d3a623e
--- /dev/null
+++ b/libcpu/xtensa/esp32s3/SConscript
@@ -0,0 +1,25 @@
+# RT-Thread building script for ESP32-S3 (Xtensa LX7) CPU port
+
+from building import *
+import os
+from env_package import find_package_path
+
+cwd = GetCurrentDir()
+src = Glob('*.c') + Glob('*_gcc.S')
+
+# Resolve ESP-IDF package the same way idf_port does (for xtensa_context.h).
+bsp_root = os.path.normpath(os.path.join(cwd, '..', '..', '..', 'bsp', 'ESP', 'ESP32_S3'))
+PKG_IDF = find_package_path(bsp_root, 'ESP-IDF-latest',
+ marker='components/xtensa/esp32s3/include')
+
+_xtensa_freertos_inc = PKG_IDF + '/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos'
+_xtensa_portable = PKG_IDF + '/components/freertos/FreeRTOS-Kernel/portable/xtensa'
+_xtensa_inc = PKG_IDF + '/components/xtensa/include'
+_xtensa_s3_inc = PKG_IDF + '/components/xtensa/esp32s3/include'
+
+CPPPATH = [cwd, _xtensa_freertos_inc, _xtensa_portable, _xtensa_inc, _xtensa_s3_inc]
+ASFLAGS = ' '.join(['-I' + p for p in CPPPATH])
+
+group = DefineGroup('CPU', src, depend = [''], CPPPATH = CPPPATH, ASFLAGS = ASFLAGS)
+
+Return('group')