当前位置:首页>Linux>汽车嵌入式工具中的 Linux 命令工作手册(实战版)

汽车嵌入式工具中的 Linux 命令工作手册(实战版)

  • 2026-08-18 23:10:37
汽车嵌入式工具中的 Linux 命令工作手册(实战版)

 Linux 命令工作手册(实战版)

面向 汽车 MCU(Infineon AURIX TC3x/TC4x、NXP S32K/S32R、Renesas RH850 等)
BSP / MCAL / 中间件 / 标定 工程师,按"工作场景 → 命令 → 实战片段"组织。


0. 为什么越来越多的嵌入式工程师在 Linux 下干活

维度
Windows 工具链
Linux 工具链
TASKING ctc
编译速度
基准 1×
3–5×
(FS / 进程开销 / Defender 拖累)
全速并行 make -j$(nproc)
受 antivirus 影响
拉满所有核
CI / 批构建
需要单独购买 headless 授权
命令直接落地 Jenkins / GitLab CI
ELF / 二进制分析
第三方 GUI
objdump
readelfnm原生
Git 大仓库
中等
飞快(core.fsyncpartial clone友好)
iSYSTEM 调试器
通过 WSL / 网络 USB 共享
直接 USB / ETH / TCP, 协议原生

一句话:Windows + IDE 给"研发期人肉调试",Linux + 脚本 给"批构建 / 回归 / CI / 自动化调试"。本文按场景归纳命令。


1. 文件与目录 —— 用得最多的 80%

命令
说明
嵌入式场景示例
pwd -L/-P
物理 / 逻辑路径
看 pwd -P真路径,排除软链
ls
llls -al
列表(ll是 ls -l常用别名)
看 Build/obj下 ELF 大小
cd -
pushdpopd
跳回上一个目录
源码 ↔ 构建目录来回切
mkdir -p a/b/c
递归创建
一次性搭出 inc/inc_private目录树
rm -rf build/*
清空构建
增量炸了直接重来
cp -r src dst
install -m 644 in out
拷贝 + 改权限
BSP 模板拷贝、固件分发给 PE
mv
改名 / 移动
切到 Git LFS 前的文件改名
touch
刷新 mtime / 建空文件
触发 make 重新编译某 TU
ln -sfn
软链
把工具链软链到 ~/bin
tree -L 2 -I 'build|.git'
树形结构
看 BSP/源码组织
realpath
readlink -f
真路径
软链到工具链,team 共享脚本
stat
filefile -z
元信息
看 ELF 类型 / ABI
fuser file
lsof file
谁在用文件
谁在握 .lock, 谁在占 debug 用 ELF
inotifywait -m .
文件事件
自动 inc / 重启脚本
watch -n 5
定时重复
盯构建 / 探测 trace 文件
# 1) 编译产物单独目录,不在源码里找 ELF
cd
 ~/work/aurix_tc39x/projectA && ls -lh build/out/*.elf

# 2) 仓库里谁最胖(找出意外提交的大件)

du
 -sh * .[!.]* | sort -hr | head -20

# 3) 工具链升级,链接只动一处

ln
 -sfn /opt/tasking_v6.3r1 ~/tools/tasking

# 4) 批量改后缀

for
 f in *.c; do mv -- "$f" "${f%.c}.cpp"; done

# 5) 工程根目录 template(autogen)

mkdir
 -p {src,include,test,scripts,tools,docs,ci}

# 6) 同步工具链脚本给同事(用 install,带权限)

install -m 0755 scripts/build.sh /opt/share/build.sh

# 7) 清空构建但保留 git index 目录

find build/ -mindepth 1 -maxdepth 1 -exec rm -rf {} +

# 8) 谁在锁住 ELF,造成下次 gdb 报错

fuser build/out/firmware.elf
# 或更详细

lsof build/out/firmware.elf

# 9) 新人第一件事:开 autocd / dirspell / cdspell

echo
 "shopt -s autocd dirspell cdspell" >> ~/.bashrc

# 10) 大仓里小心 `rm -rf *`——在脚本里强约束

shopt
 -s failglob
rm
 -rf -- "$builddir"/*  # 一定要带 --

2. 文本查看与编辑

命令
用途
场景
cat
一次性打到终端
小 .c / .h直接看
less
more
分页(可搜索)
看几百 KB 的 .map.log
head -n
tail -ntail -F
头 / 尾 / 实时
tail -F build.log
实时盯构建
nl
带行号
对照编译器报"line xxx"
wc -l
wc -lcw
行 / 字数
项目规模统计
diff -ru
vimdiffmeld
比较
看 patch / 同事的改动
vim
nvimnano
编辑
服务器上做小改
bat
(替代 cat)
高亮 / 翻页
看 .map.log时体验更好
hexdump -C
xxdhexyl
二进制
看 .hex / .srec / 不同 chip 的 ID
jq
(JSON)、yq(YAML)
结构化
autosar arxml / 内置配置
# 1) 反汇编 + 看 Busy 函数
objdump -dl firmware.elf | less

# 2) tail 复合实战:一边构建一边把 warning/error 拣出来

make -j8 2>&1 | tee build.log | grep -E 'warning:|error:|undefined|multiple def'

# 3) 大 map 文件只看 RAM 段

sed -n '/^Linker script and memory map/,$p; /\(RAM\|RAM_NV\)/,/0x/{p}' project.map | less

# 4) vim:删空行 + 改换行 + 内置 diff

:g/^\s*$/d
:set ff=unix
:diffthis

# 5) bat 取代 cat,看 .map / .ld 滚上下舒服

bat --style=plain build/project.map

# 6) 看 .hex 是否包含某段

xxd firmware.hex | grep -E 'DEADBEEF|12345678'

# 7) vim 中:term 终端 + 跑 make

:term make -j8

# 8) ARXML 里挑所有 5 秒周期的 EcuC 模块

xmllint --xpath '//*[contains(@SHORT-NAME,"EcuC")]/*' Config/Config_EcuC.arxml

# 9) sed 三招,车规代码常备

sed -i 's/Copyright 2022/Copyright 2026/g' $(find . -name '*.[ch]')
sed -i '/^[[:space:]]*\/\/ TODO/d' app.c   # 一键删 TODO 注释
sed -i 's/[[:space:]]\+$//' *.c            # 去尾空白

# 10) awk 把 .map 里最大的 30 个函数拎出来

awk 'index($0," .text.")>0 {sym=$0} /^ \.text/ {p=1} p && /\.text\./{p=0} p' project.map \
  | awk 'NF>=2 && $1 ~ /^[0-9a-f]+$/{print $1,$5,$6,$7,$8}' | sort -k1 | head -30

# 11) 列 git ls-files 出来的文件,grep 不进 .git 目录

git ls-files | xargs -n1 wc -l | sort -nr | head

3. 权限、用户与 Shell 脚本

命令
说明
chmod 755 run.sh
chmod -R u+rwX,g+rwX,o-rwx
给权限 / 锁权限
chown -R user:group dir
改属主(共享工程目录常用)
sudo -E
sudo -i
提权 / 保留环境
umask 022
默认 644 / 755
env
printenvexport VAR=...
看 / 写变量
which
typecommand -v
看命令真身
alias ll='ls -alF'
持久化写 ~/.bashrc
mkdir -m 0750 -p
建 dir 同时定权限
xargs -d'\n'
处理带空格的列表

车规工程里 TASKING / Keil / IAR 的 LIC server 锁 eth0MAC, 写脚本需要把环境拉满:

#!/usr/bin/env bash
# scripts/build.sh —— 车规工程的标准入口脚本

set
 -euo pipefail

: "${PROJECT_DIR:=$(cd "$(dirname "$0")/.." && pwd)}"
: "${BUILD_DIR:=$PROJECT_DIR/Build}"
: "${TARGET:=tc39x}"
: "${BUILD_TYPE:=release}"

export
 TASKING_HOME=/opt/tasking_v6.3r1
export
 LM_LICENSE_FILE=27000@licsrv
export
 LM_PROJECT=@licsrv:~/.flexlmrc
export
 PATH="$TASKING_HOME/bin:$PATH"

echo
 ">>> [$TARGET / $BUILD_TYPE]"
mkdir
 -p "$BUILD_DIR/$TARGET/$BUILD_TYPE"
cd
 "$BUILD_DIR/$TARGET/$BUILD_TYPE"

cmake -G Ninja \
      -DCMAKE_BUILD_TYPE="$BUILD_TYPE" \
      -DCMAKE_TOOLCHAIN_FILE="$PROJECT_DIR/toolchain/${TARGET}.cmake" \
      "$PROJECT_DIR"


cmake --build . --target firmware.elf -- -k
size firmware.elf
cp
 firmware.elf "$PROJECT_DIR/dist/$TARGET-$BUILD_TYPE.elf"
# 干净的脚本模板:set -euo pipefail + trap + mktemp + getopts
#!/usr/bin/env bash

set
 -euo pipefail
trap
 'echo "ERROR line $LINENO" >&2; exit 1' ERR

# 临时目录,退出自动清

tmp=$(mktemp -d); trap 'rm -rf "$tmp"' EXIT

while
 getopts ":c:t:hv" opt; do
  case
 $opt in
    c) cfg=$OPTARG ;;
    t) target=$OPTARG ;;
    v) VERBOSE=1 ;;
    h) sed -n '2,/^####/p' "$0"; exit 0 ;;
    *) echo "Bad option: -$OPTARG"; exit 2 ;;
  esac

done


# 安全拼命令,避免 split

find src -name '*.c' -print0 | xargs -0 -n1 -I{} echo "Compiling: {}"
# 系统共享的工具链,放进 /opt 后建群组
sudo
 groupadd eng
sudo
 chown -R :eng /opt/tasking_v6.3r1
sudo
 chmod -R g+rwX /opt/tasking_v6.3r1
sudo
 usermod -aG eng $USER
newgrp eng   # 立即生效

4. 进程与系统监控

命令
说明
uname -a
cat /etc/os-release
内核 / 发行版
nproc
lscpu
CPU 拓扑
free -h
/proc/meminfo
内存
df -h -T
du -sh
磁盘 / 文件类型
top
htopglancesbtop
实时
ps auxf
pstree -ppgrep -f ctc
进程树 / 找编译器
kill -TERM
-9
优雅 / 强杀(慎用 -9)
uptime
iostat 1vmstat 1mpstat -P ALL 1
采样
lsof -p PID
strace -p PIDperf top -p PID
进程级钻取
numactl --cpunodebind=0 --membind=0 ./a.out
NUMA 亲和(NV 内存机器上有用)
# 1) 编译是不是吃满了
make -j$(nproc) &
sleep
 10 && mpstat -P ALL 1 5

# 2) 谁在疯狂写盘

iotop -oP                 # 抓到 ctc 在烧,判断是缺内存 swap 还是 LTO
# 或

pidstat -dl 1             # 看每个进程的 IO 量
pidstat -w 1              # 看上下文切换

# 3) 构建卡住,怀疑 ctc 在死等文件

pgrep -af ctc
pstree -ap $(pgrep -of 'ctc.*main\.c')

# 4) 看编译进程当前在打开哪个文件

lsof -p $(pgrep -of ctc) | head

# 5) 看是不是锁住了

ls
 -l /work/.git/index.lock
fuser -v /work/.git/index.lock

# 6) 内存吃紧,swap 高,主动释放 dentry

sync
 && echo 3 > /proc/sys/vm/drop_caches   # 仅 root

# 7) NUMA 系统上,绑核跑 distcc server(避免跨 socket RTT)

numactl --cpunodebind=0 --membind=0 distccd --no-detach --daemon

# 8) perf 抓 ctc 的热点(看哪个 phase 慢)

perf record -F 99 -p $(pgrep -of ctc) -g -- sleep 5
perf script | stackcollapse-perf.pl | flamegraph.pl > flame.svg

# 9) 系统级 sar(需要 sysstat),跑一日次日整改

sudo
 apt install sysstat
sar -r -n DEV -u 5 60 > /tmp/sar_daily.txt

# 10) "哪些进程用了网络"——车规 OTA 用得上

ss -tunp | head -20
ss -bp '( sport = :443 )'

5. 搜索与文本处理 —— 高频区

工具
说明
grep -RIn
rgag
递归文本搜索
find
fd
按名 / 时间 / 大小 / 类型
sed
流编辑(批量改 / 替换)
awk
字段处理 / 统计报表
sort
uniq -ccuttrxargs
拼接神器
fzf
(模糊搜索) / fpp(路径)
交互找文件
ag
(The Silver Searcher) / rg(ripgrep)
比 grep 更快
# 1) 找工程里所有 TODO
rg -n --colors 'line:yellow' 'TODO|FIXME' .

# 2) 找谁在用未定义的宏 / 老 API

rg -n --no-heading '\bUNUSED\b' src/

# 3) 找 3 万行内超过 250 列的 source(大概率复制粘贴)

rg -n '.{250,}' src/

# 4) 看哪个 .c 包含最多的 
#include(代码味道)
rg -n '^#include' src/ --type c | awk -F: '{print $1}' | sort | uniq -c | sort -rn | head

# 5) AUTOSAR 模块版本一致性扫描

rg -n --hidden 'AR-VERSION\s*=' third_party/ | sort -t: -k2 -u

# 6) find 实战:C 文件中超过 100 KB 的,定位异常

find src -name '*.c' -size +100k -printf '%s %p\n' | sort -nr

# 7) find 实战:7 天内修改过的 build.sh

find scripts -name '*.sh' -mtime -7 -print

# 8) sed 一行把 team 旧版权改新版权

find . -type f \( -name '*.c' -o -name '*.h' \) | xargs sed -i 's/Copyright 2022/Copyright 2026/g'

# 9) sed 把所有 K&R 函数定义改成 ANSI

find src -name '*.c' | xargs sed -i 's/^\([A-Za-z_]\w*\)\s*(/&/

# 10) awk: 把 .map 里每个 .text 里函数按 size 排
awk '

  /\.text\.[0-9]+/ {block=$1}
  /0x[0-9a-f]+/ && $0 ~ /^0x/ {sym[block]++; bytes[block]+=($1+0)}
  END { for (b in bytes) printf "%-30s  %10d  %5d\n", b, bytes[b], sym[b] }
' project.map | sort -k2 -nr | head

# 11) 找 ELF 里包含的字符串 token(避免误删)
strings firmware.elf | rg -i '
CAN_|BSW_|OEM_' | sort -u

# 12) fzf + 工具:交互式跳到工程里的任一 BSP
fd -t d -d 2 . ~/work/bsp | fzf | cd

# 13) GNU parallel(替代 xargs,车规批量跑测试用例用)
fd -e c . test/ | parallel -j8 --bar make test SUITE={/}

# 14) rg 排除 noise:仓库 + 不进 build
rg -n '
TODO' --hidden --glob '!build/**' --glob '!.git/**'

# 15) 找 a2l 里的 calibrated variable 总数
rg -c '
<MEASUREMENT>' calibration.a2l

6. 网络与文件传输

命令
用途
ssh user@host
远程登录构建机
scp
sftp
单文件 / 拉数据
rsync -avzP
增量同步(仓库 / 镜像)
curl -O
wget
下载 SDK / 补丁
git clone
(详见 §9)
拉仓库
ping -c 3
mtrtraceroute -T
网络诊断
ss -tulpn
看监听端口(gdbserverlicd)
nc -lvnp 3333
端口复用 / 简易 server
sshfs user@host:/path ~/mnt
FUSE 挂远端目录
autossh -M 0 -o "ServerAliveInterval 10" ...
断线自动重连
mosh user@host
移动网络友好
# 1) rsync 增量同步 BSP,排除 build / .git
rsync -avzP -e ssh \
  --exclude '.git/' --exclude 'Build/' --exclude '*.bak' \
  /work/aurix_bsp/ user@buildsrv:/srv/bsp/

# 2) --dry-run 先核对不会动什么

rsync -avzPn -e ssh src/ user@host:dst/

# 3) 把 .elf 烧写设备推给小批量车队的 gbox

rsync -avzP build/out/*.elf user@gbox:/srv/ota/staged/

# 4) ssh 配 alias + 自动转发 license 端口

cat
 >> ~/.ssh/config <<'SSH_EOF'
Host buildsrv
    HostName 10.0.5.42
    User wang
    IdentityFile ~/.ssh/id_ed25519
    LocalForward 27000 10.0.5.42:27000       # 转发 Flexlm
    ServerAliveInterval 30
    Compression yes
Host gbox
    HostName 10.0.8.21
    User dev
    ProxyJump buildsrv                       # 跳板

SSH_EOF

# 5) autossh 防止 debug 断开

autossh -M 0 -N \
  -o "ServerAliveInterval 10" -o "ServerAliveCountMax 3" \
  -L 3333:127.0.0.1:3333 user@target          # 本地 3333 -> 远端 gdbserver

# 6) 拷贝到多机并行(车规机柜)

parallel -j5 "rsync -azP --delete build/out/ {}:/srv/ota/" \
  ::: host1:host2:host3:host4:host5

# 7) 拉公司 Nexus 上的 MCAL 包(可能要 token)

curl -L -H "Authorization: Bearer $NEXUS_TOKEN" \
  -o mcal-aurix-v6.5.zip https://nexus.example.com/mcal/AURIX/MCAL-6.5.zip

# 8) 局域网发现:License 端口 + iSYSTEM 守护端口

ss -tulpn | grep -E '27000|1234|3333|20000'

# 9) 把远端 PC 目录直接挂进来当本地路径

sshfs user@buildsrv:/work ~/mnt/build

# 10) netcat 写一个临时 HTTP proxy(迫不得已时)

nc -lvnp 8080 -c "echo -e 'HTTP/1.0 200 OK\r\n\r\nOK'; echo"

7. 交叉编译与构建系统

命令
说明
make -j$(nproc) -k
增量并行
cmake -B build -G Ninja
现代化构建
scons -j8
AUTOSAR / CommonAPI 常见
ninja -C build -t targets
列目标
ctc -t TC39XB -D__CPU__=tc39xb
TASKING 编译器
nm
readelfobjdumpsize
主机 binutils(从任何 ELF 看内情)
compcert
kirin
形式化验证(高端 ECU)
cloc
tokei
代码量统计
pycscope
gtagsctags -R
函数索引
bear -- make all
(把 compile_commands.json 抽出,给 clangd / IDE)
LSP 用

7.1 TASKING 在 Linux 上的典型工作流

# 姿态 A:直接 make + TASKING makefile
cd
 projectA/Build
export
 TASKING_HOME=/opt/tasking_v6.3r1
export
 LM_LICENSE_FILE=27000@licsrv
export
 PATH="$TASKING_HOME/bin:$PATH"
make -f makefile_tc39x BUILD=release all

# 姿态 B:Eclipse headless CDT build

/opt/tasking_v6.3r1/eclipse/eclipse \
  -noSplash -application org.eclipse.cdt.managedbuilder.core.buildheadless \
  -data ~/workspace -import /work/proj -build tc39x/release -vm /usr/bin/java

# 姿态 C:cmake 加 toolchain 文件

cmake -B build/tc39x -G Ninja \
      -DCMAKE_TOOLCHAIN_FILE=toolchain/tasking-tc39x.cmake \
      -DBSP_DIR=third_party/bsp \
      -DCMAKE_BUILD_TYPE=Release

# 当时编译首次释放脚本

scripts/build.sh -t tc39x -v

toolchain/tasking-tc39x.cmake:

set(CMAKE_SYSTEM_NAME Generic)
set
(CMAKE_C_COMPILER ctc)
set
(CMAKE_CXX_COMPILER ctc++)
set
(CMAKE_C_FLAGS_INIT   "-t TC39XB -D__CPU__=tc39xb --iso99 --float-honor-inf")
set
(CMAKE_CXX_FLAGS_INIT "-t TC39XB -D__CPU__=tc39xb --iso99 --float-honor-inf")
set
(CMAKE_ASM_COMPILER  ctc)
set
(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
set
(CMAKE_SYSTEM_PROCESSOR tricore)

7.2 ccache / distcc / sccache —— 提速

# 1) ccache 切到 NVMe 上的大目录
export
 CCACHE_DIR=/opt/ccache
mkdir
 -p "$CCACHE_DIR"
ccache --max-size=50G
ccache --set-config compression=1     # 老的吞吐不够, 默认开压缩更划算
CCACHE_PREFIX=distcc ccache ctc -O2 -c core.c

# 2) 跨机 distcc(局域网小机房, 1Gbps)

export
 DISTCC_HOSTS="build01 build02 build03 build04"
export
 DISTCC_BACKOFF=1
make -j32 CC='distcc ctc' CXX='distcc ctc++'

# 3) 用 pump 模式(更激进)

export
 DISTCC_PUMP=1

# 4) 命中率统计

ccache -s
ccache -p --verbose

# 5) sccache(Rust 工具,但也支持 c/c++,s3 后端)

RUSTC_WRAPPER=sccache sccache ctc -O2 -c core.c

7.3 链接脚本与内存(生成 map / 内存图)

# 1) 看每个 section 在 Flash 的占用
readelf -S firmware.elf | grep -E 'PROGBITS|NOBITS'
readelf -l firmware.elf | head

# 2) 看链接后函数落在哪

nm --size-sort -r firmware.elf | head -30

# 3) 把内存布局画成 .svg, 评审用

python3 -c '
import re, sys
data = open("project.map").read()
# 简化 parse — 实际写可以调 parseMap()
print("map parsed") '


# 4) 改完 ld 脚本后,看 warning

ld -T tc39x.ld -Map=out.map -no-warn-rwx-segment ./*.o 2>&1 \
  | rg -i 'warning|error|leftover'

# 5) 看固件里 RAM 占多少

size -A firmware.elf

7.4 MISRA / 静态分析

# Cppcheck(车规项目内网常用)
cppcheck --enable=all --inline-suppr \
  --suppress=missingIncludeSystem --platform=tricore \
  --suppress=configurationNotChecked \
  -i Build -i third_party -j$(nproc) src/

# Cppcheck 生成 sarif, 接 Sarif Viewer / GitHub Code Scanning

cppcheck --enable=all ... --rule-file=mapping.txt --output=sarif --output-file=result.sarif src/

# 商业工具(LDRA / Polyspace / Vector vADASdev / Parasoft / Coverity)

LDRA /path/to/testfile.prj /-batch
polyspace-code-prover -options batch.opt

# clang-tidy 车规 checklist

clang-tidy --checks='bugprone-*,cert-*,misc-*,readability-*' \
  -p build/compile_commands.json src/core.c

8. 调试与固件分析(iSYSTEM)

车规嵌入式几乎不用 GDB,iSYSTEM winIDEA覆盖 AURIX、C2000、Cortex-M/R、RH850 等目标;
在 Linux 上能整脚本化,通过 .dmm脚本 + Isystem.CLI.Runner接入 CI。

8.1 iSYSTEM winIDEA 实战

8.1.1 工程结构

~/work/aurix_proj/
├── workspace.iws
├── proj.iwd
└── scripts/
    ├── probe.dmm
    ├── flash.dmm
    └── dump_calibration.dmm

iSYSTEM 的脚本扩展名是 .dmm(debugger macro memory),语法和别家接近但风格自有特征。

8.1.2 启动 + 跑脚本

export ISYSTEM_HOME=/opt/isystem

# GUI

$ISYSTEM_HOME
/bin/winidea64 workspace.iws &

# Headless:通过 iSYSTEM CommandLineRunner

"$ISYSTEM_HOME/cmdline/Isystem.CLI.Runner.exe"
 \
  --workspace workspace.iws \
  --run     scripts/probe.dmm

# 批量(d 一组工况)

for
 f in scripts/auto/*.dmm; do
  echo
 ">>> $f"
  "$ISYSTEM_HOME/cmdline/Isystem.CLI.Runner.exe"
 \
       --workspace workspace.iws --run "$f" \
     | tee -a auto_$(date +%F).log
done

8.1.3 .dmm脚本片段

; scripts/probe.dmm —— reset + 跑 main + 显示寄存器
Reset
Go.Main
Break.Set app_main_loop
Go
Wait STATE.PROGRAM()
Register.View
EXIT

; scripts/dump_calibration.dmm —— 标定区 dump
LOCAL &addr &size
&addr = 0x80030000
&size = 0x4000
Memory.Save "out/calib_dump.bin" &addr /Size &size
EXIT

; scripts/flash.dmm —— 烧到内置 Flash
Memory.Load "build/out/firmware.hex" /Verify
EXIT

; scripts/watch_watchdog.dmm —— 看门狗到期前的现场
Break.Set T100ms_Watchdog /Write
Go
Wait STATE.PROGRAM()
Print "Watchdog timeout arrived, captured context"
EXIT

Connect
Reset.Pin
Memory.Load "build/out/firmware.elf" /DEBUG /CODE /RELAX
EXIT

8.1.4 排错速查

现象
原因
修法
蓝盒 attach 失败
USB 没切好 / 守护没起
lsusb
(找 iSYSTEM VID=0x21bf), sudo icd_usb start
Connect
超时
JTAG 时钟 / 模式不匹配
SetConnect RESET
/ 降 TCK
Variable.Watch 看不见值
编译时省了 debug info
ctc -g3
/ link 时加 --debug-info
PowerPro 模块没响应
缺 device driver
sudo systemctl restart isystem

8.2 固件命令行分析

调试器负责"把信息捞出来",怎么还原语义留给这层:

# 1) PC → 源码(崩溃栈还原)
addr2line -e firmware.elf -f 0x80001234 0x80001288

# 2) demangle + 谁最大(看哪些 function 撑胖了)

nm --size-sort -r firmware.elf | head -30 | c++filt

# 3) ELF section + Flash 占比

readelf -S firmware.elf | grep -E 'PROGBITS|NOBITS'
size    -A firmware.elf

# 4) 反汇编特定函数 + 反注释

objdump -d --disassemble=CanIf_TxConfirmation firmware.elf | less

# 5) 二进制字符串(库名 / OEM 标识 / OTA token)

strings firmware.elf | sort -u > /tmp/strs.txt

# 6) 嵌入签名 / 头信息

binwalk -e firmware.elf -C /tmp/binwalk_out/
readelf -a firmware.elf | head

# 7) 静态分析 / MISRA

cppcheck --enable=all --inline-suppr --platform=tricore \
  -i Build -i third_party -j$(nproc) src/

# 8) 地图文件解析:谁占用 Flash 最多

awk '/^\.text/ {p=1} /^\.(\.|rodata|data|bss)/ {p=0} p' project.map \
  | awk '$1 ~ /^0x/ {print $1, $5}' | sort -k1 | head

# 9) 反汇编里长 > 200 行的"巨函数"

objdump -d firmware.elf \
  | awk '/^[0-9a-f]+ <[^>]+>:/{sym=$0; cnt=0; next} /^[ \t]/{cnt++} /^$/{if(sym && cnt>200){print sym, cnt}; sym=""}'

# 10) 看 ICU 段,把 .text 里的所有函数列出(给覆盖率工具)

nm --defined-only -l firmware.elf \
  | rg ' [Tt] ' | awk '{print $3}' \
  | xargs -I{} c++filt --no-demangle <<< "{}" > coverage.lst

9. Git 工作流(汽车嵌入式强化版)

车规项目常常受 ASPICE / ISO 26262 / 功能安全约束,分支策略、追溯、签名都比普通后端严得多。

git config --global init.defaultBranch main
git config --global core.autocrlf input             # 提交以 LF, checkout 自动转
git config --global core.filemode false             # 容器 / 共享编译机必备
git config --global core.pager  'less -FRX'
git config --global core.fsmonitor true             # 把 fsmonitor 套起来
git config --global commit.gpgsign true             # 车规要求每个 commit 可追溯
git config --global user.signingkey ABB9C72D...     # 团队共享 key
git config --global user.name  "Wang XXX"
git config --global user.email "wang@oem.com"
git config --global pull.ff only                    # 显式拒绝 fast-forward 之外
git config --global push.autoSetupRemote true       # push 时自动建同名词
git config --global rebase.autoStash true           # 隐藏未提交再 rebase
git config --global rebase.missingCommits  warn

# 2.x 系列(≥ 2.32):用 switch / restore 替代 checkout,出厂语义

git switch feature/canif-asr422
git restore --staged file.c

9.1 高频工作流

# 1) 拉 / 切 / 同步(rebase 防止噪声合井)
git fetch origin
git switch feature/canif-asr422
git pull --rebase --autostash

# 2) 提交流程(车规常要求 review 每个 hunk)

git add -p                                       # s/y/n/q 逐块过
git status
git diff --staged
git commit -m "CANIF-321: fix NM timeout in PNC0 transition"
git push

# 3) 同步 fork / mirror

git remote add upstream git@internal.git:asw/bsp.git
git fetch upstream
git rebase upstream/main

# 4) 仓库 dry-run:提交遗漏大文件?(如 .elf / .a)

git rev-list --objects --all | sort -k2 | uniq | sort -rn | head

# 5) 找谁提交了 MCU-spec 上不允许的字符(CI 也可走这个)

git grep -P "[^\x00-\x7F]" -- '*.c' '*.h'

# 6) 团队要求 DCO / Signed-off-by(很多车厂硬性)

git config alias.commit 'commit -s'
git config alias.amend  'commit -s --amend'

9.2 二进制与大文件

# .gitattributes — 仓库根目录下
*                 text=auto eol=lf
*.c *.h *.md      text eol=lf
*.elf *.bin *.hex *.a *.so  binary
*.arxml *.dbc           text          # ARXML diff 友好
*.arxml                 diff=arxml
*.dbc                   diff=dbc
# 1) Git LFS 装一遍
git lfs install
git lfs track "*.elf" "*.bin" "*.hex" "*.arxml"
git lfs migrate import --everything   # 历史一次性迁过去

# 2) 看 LFS 存量

git lfs ls-files
git lfs status

# 3) LFS server 跑不通时,降级到 git-fs 顺序校验

git lfs fsck

9.3 Bisect + 自动 build(回归定位神器)

# 手动 bisect
git bisect start
git bisect bad  HEAD
git bisect good v3.4.0
git bisect run sh -c 'make clean >/dev/null && make -j8 all >/dev/null 2>&1 && ./test_runner'

# 全自动 bisect(配合 ccache,只跑必要 TU)

git bisect run sh -c 'ccache -z && make -j8 2>&1 | tail -50 && ./test_runner'

9.4 Worktree(并行多分支编译)

# 各自独立 build/ 目录,各跑 make,互不干扰
git worktree add ../feature-A feature/canif
git worktree add ../release    release/2025.Q4
git worktree add ../hotfix     hotfix/uds-srv-2025-12
# 每个 worktree 都是独立 working dir,但共享 git store

9.5 子模块 / 稀疏 checkout / 部分克隆(AUTOSAR / Vector / CommonAPI 大仓)

# 1) init 全树
git submodule update --init --recursive
git submodule foreach 'git checkout release/2025.Q4'
git config --global submodule.recurse true

# 2) sparse-checkout:只把 MCAL 拉下来给 build 用

git sparse-checkout init --cone
git sparse-checkout set src/mcal/Can third_party/CanIf include/

# 3) partial clone:带宽 / 磁盘都省

git clone --filter=blob:less=10M --sparse https://git.com/bsp.git

9.6 钩子(可强制车规规则)

# pre-commit:本地强制 cppcheck + commit 签名
cat
 > .git/hooks/pre-commit <<'HOOK_EOF'
#!/usr/bin/env bash

set
 -euo pipefail
git diff --cached --name-only --diff-filter=ACM \
  | grep -E '\.(c|h|cpp|hpp)$' \
  | xargs -r cppcheck --quiet --enable=warning --inline-suppr
HOOK_EOF
chmod
 +x .git/hooks/pre-commit

# commit-msg:必须含 Jira / Traceable ID

cat
 > .git/hooks/commit-msg <<'HOOK_EOF'
#!/usr/bin/env bash

set
 -euo pipefail
if
 ! grep -Eq '(CANIF|COMM|BSP|EASR|MCAL)-[0-9]+' "$1"; then
  echo
 "ERROR: commit message must contain a traceable id"
  exit
 1
fi

HOOK_EOF
chmod
 +x .git/hooks/commit-msg

# 团队统一钩子:用 husky / pre-commit 框架维护(而不是直接改 .git/hooks)

pip install pre-commit
cat
 > .pre-commit-config.yaml <<'YAML_EOF'
repos:
  - repo: local
    hooks:
      - id: cppcheck
        name: cppcheck
        entry: cppcheck --quiet --enable=warning --inline-suppr
        language: system
        types: [c, c++]
      - id: trailing
        name: strip-trailing-whitespace
        entry: scripts/strip-trailing
        language: system
YAML_EOF
pre-commit install

9.7 Tag + Release

# 1) 签名 tag(车规 release tag 必签)
git tag -s v2025.Q4 -m "Release 2025.Q4 - signed by wang"
git verify-tag v2025.Q4

# 2) 列 release note,从 log 自动产

git log --oneline v2025.Q3..v2025.Q4 --no-merges | tee CHANGELOG.txt

# 3) 找回被 reset 掉的提交

git reflog | head
git checkout -b recover-abc123

10. 常用别名前瞻(~/.bashrc节选)

# ls 彩蛋
alias
 ll='ls -alF --time-style=long-iso'
alias
 la='ls -A'
alias
 l='ls -CF'
alias
 duh='du -sh'
alias
 dfh='df -hT'
alias
 path='tr ":" "\n" <<< "$PATH"'

# 嵌入式工具链

alias
 tasking='cd "${TASKING_HOME:-/opt/tasking}" 2>/dev/null && ls bin/ | head'
alias
 isystem='cd "${ISYSTEM_HOME:-/opt/isystem}" 2>/dev/null && ls bin/'

# 构建快捷

alias
 b='make -j$(nproc) BUILD=release'
alias
 bc='make -j$(nproc) clean'
alias
 cr='cmake -B build -G Ninja && ninja -C build'
alias
 crelease='cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release && ninja -C build'

# Git

alias
 gs='git status -sb'
alias
 gd='git diff'
alias
 gdc='git diff --cached'
alias
 gpl='git pull --rebase --autostash'
alias
 gps='git push'
alias
 gb='git branch -vv'
alias
 gw='git switch'
alias
 gco='git checkout'
alias
 gm='git merge --no-ff'
alias
 gr='git rebase'
alias
 glg='git log --oneline --graph --decorate -20'
alias
 gll='git log --graph --pretty=format:"%h %ad %an  %s" --date=short'
alias
 gfp='git fetch --prune --tags'
alias
 gclean='git branch --merged | grep -v "^* main" | xargs -n1 git branch -d'

# 安全 rm(防粗心)

alias
 rm='rm -I --preserve-root'

# 工具栏函数 —— 一个 gdb-less 版调试器

fsize
() { du -sh "$@" 2>/dev/null; }                                          # file size
fwatch
() { while :; do clear; "$@"; sleep 2; done; }                         # 自动刷新
fd
()    { command -v fd >/dev/null 2>&1 && command fd "$@" || find "$@"; }   # 默认 fd
wgrep
() { rg --color=always -n "$@" | less -R; }                             # 带色 less

# Car-style 环境显示:打开 shell 时看一眼

bannermsg
() {
  local
 d=$(date +'%F %a')
  local
 j=$(jobs | wc -l)
  echo
 "[$d]  cores=$(nproc)  user=$(whoami)  jobs=$j"
}
bannermsg

刷新并永久保存:

echo "source ~/.bashrc" >> ~/.bash_profile
source
 ~/.bashrc

11. 速查表(打印贴墙版)

类别
命令
一句话作用
目录
pwd -Pcd -lltree -L 2pushd
/popd
当前 / 跳回 / 列表 / 树
文件
cp -rmvrm -rfln -stouchinstall
拷贝 / 改名 / 删除 / 链 / 刷新 / 部署
文本
catlessheadtail -Fvimbatxxd
查看 / 编辑 / 二进制
权限
chmodchownsudo -Eset -euo pipefailtrap
可执行 / 属主 / 提权 / 鲁棒脚本
进程
ps auxftopkill -TERMnproclsof -pstrace -pperf
进程 / 钻取 / 热点
资源
df -hTdu -shfree -hiostat 1vmstatmpstat
磁盘 / 内存 / IO / 多核
搜索
rg -ngrep -RInfindfdsed -iawkfzf
找 / 改 / 统计 / 交互
网络
sshscprsync -avzPcurlncsshfsautossh
远端 / 传输 / 转发
构建
make -j$(nproc)cmake -G Ninjaninjactcccache
编译构建
调试器
winidea64 -ws -run script.dmm
iSYSTEM 自动化
调试回灌
addr2linec++filtobjdumpreadelfnmsize
PC / 反汇编 / 内存布局
静态分析
cppcheck
clang-tidyPolyspaceLDRACoverity
车规自动扫描
Git
statusadd -pcommit -sswitchpull --rebasebisect runworktreelfs
提交 / 审查 / 多并行
Git 钩子
pre-commitcommit-msgpre-pushhushprepare-commit-msg
车规 gate
其他
lsusbipssenvwhichtreerealpathfuser
系统杂项

12. 一份"嵌入式新人第一周"的 Linux 任务清单

  1. 1. 把 ~/.bashrc改成像 §10那样,source后试 llgsgplgclean
  2. 2. 装 rgfdbathtoptreeccacheninjaparallelpre-commit,
    apt installdnf install一次过。
  3. 3. 用 ssh-keygen -t ed25519生成一对密钥,推到代码平台;写一份 ~/.ssh/config
  4. 4. 拉公司 demo BSP,跑 cmake -B build -G Ninja && ninja -C build,落地 firmware.elf
  5. 5. 在 build/下分别跑 sizenm --size-sortreadelf -h,把报告贴到团队 wiki。
  6. 6. 写 scripts/build.sh(带 set -euo pipefailtrapmktemp),接 ctc(并支持切 target)。
  7. 7. 落地 pre-commit:cppcheckclang-formatcommit-msg三件套。
  8. 8. 找同事一起跑一遍 git bisect run回归定位,只看不改。
  9. 9. 把当前固件 flash 一次:用 Isystem.CLI.Runner.exe --workspace workspace.iws --run scripts/flash.dmm,记录输出。
  10. 10. 将一个 .dmm脚本写到 scripts/regression/,让 CI 能跑。

写在最后:嵌入式 / 车规场景的命令生态,本质上是 「批构建能力 + 可追溯 + 可重复」三件事的工程化。
掌握以上命令,意味着你能从"敲代码的人"扩展为"能交付 release 工程的人"。

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-08-22 00:03:53 HTTP/2.0 GET : https://f.mffb.com.cn/a/505116.html
  2. 运行时间 : 0.176371s [ 吞吐率:5.67req/s ] 内存消耗:4,690.12kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=62387bf5599b1c35af54cd0a1e07047a
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000538s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000519s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.001777s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000232s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000466s ]
  6. SELECT * FROM `set` [ RunTime:0.000204s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000500s ]
  8. SELECT * FROM `article` WHERE `id` = 505116 LIMIT 1 [ RunTime:0.001873s ]
  9. UPDATE `article` SET `lasttime` = 1787328233 WHERE `id` = 505116 [ RunTime:0.008318s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 67 LIMIT 1 [ RunTime:0.000228s ]
  11. SELECT * FROM `article` WHERE `id` < 505116 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000412s ]
  12. SELECT * FROM `article` WHERE `id` > 505116 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000475s ]
  13. SELECT * FROM `article` WHERE `id` < 505116 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.001230s ]
  14. SELECT * FROM `article` WHERE `id` < 505116 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.008983s ]
  15. SELECT * FROM `article` WHERE `id` < 505116 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.031680s ]
0.180613s