Files
onepilot/panda/tests/libpanda/SConscript
T
mawei 237816d8f9 移植 IQ.Pilot panda 子系统
- 用 IQ.Pilot 的 panda/ 完整替换原版(含 board 固件、python 库、certs、构建脚本)
- 同步 selfdrive/pandad/ 为 IQ.Pilot 版(多 panda 管理,新增 panda_comms.cc)
- 修复 IQ.Pilot board 固件编译问题:
  - health.h 补充 CAN_PACKET_VERSION 宏定义
  - IQ.Pilot 特有变量/函数名改回 sunnypilot 原版
    (current_safety_param_iq→current_safety_param_sp 等)
- 固件编译通过:panda(F4)/panda_h7/panda_jungle_h7/body_h7
2026-06-03 16:10:12 +08:00

39 lines
1012 B
Python

import opendbc
import platform
CC = 'gcc'
system = platform.system()
mac_ver = platform.mac_ver()
# gcc installed by homebrew has version suffix (e.g. gcc-12) in order to be
# distinguishable from system one - which acts as a symlink to clang
# clang works on macOS 15 and greater but has issues on earlier macOS versions.
# see: https://github.com/commaai/openpilot/issues/35093
if system == 'Darwin' and mac_ver[0] and mac_ver[0] < '15':
CC += '-13'
env = Environment(
CC=CC,
CFLAGS=[
'-nostdlib',
'-fno-builtin',
'-std=gnu11',
'-Wfatal-errors',
'-Wno-pointer-to-int-cast',
],
CPPPATH=[".", "../../", "../../board/", opendbc.INCLUDE_PATH],
)
if system == "Darwin":
env.PrependENVPath('PATH', '/opt/homebrew/bin')
if GetOption('ubsan'):
flags = [
"-fsanitize=undefined",
"-fno-sanitize-recover=undefined",
]
env['CFLAGS'] += flags
env['LINKFLAGS'] += flags
panda = env.SharedObject("panda.os", "panda.c")
libpanda = env.SharedLibrary("libpanda.so", [panda])