一.介紹
ADAS(Advanced Driver Assistance Systems)進階輔助駕駛,是利用安裝于車上的各式各樣的傳感器, 在第一時間收集車内外的環境資料, 進行靜、動态物體的辨識、偵測與追蹤等技術上的處理, 進而能夠讓駕駛者在最快的時間察覺可能發生的危險, 以引起注意和提高安全性的主動安全技術。
二.s32v234介紹
S32V234是nxp公司第二代視訊處理器系列,基于64位ARM Cortex-A53CPU,具有高達1000MHz 四核ARM Cortex-A53,內建了32 KB/32 KB I-/D- L1高速緩存,NEON MPE協處理器,雙精度FPU,帶2 CPU和256KB L2緩存的2叢集,存儲器管理單元,GIC中斷控制器,提供ISP,功能強大的3D GPU,兩個APEX-2可視加速器,支援SafeAssure™安全性,具有汽車級的可靠性,功能安全性,支援汽車和工業自動化,适用于汽車ADAS,NCAP前置攝像頭,物體檢測和識别,車載全景可視系統以及機器學習和傳感器融合應用。
s32v234的主要特性:
• ARM Cortex-A53, 64-bit CPU
– Up to 1000 MHz Quad ARM Cortex-A53
– 32 KB/32 KB I-/D- L1 Cache
– NEON MPE co-processor
– Dual precision FPU
– 2 clusters with 2 CPUs and 256 KB L2 cache each
– Memory Management Unit
– GIC Interrupt Controller
– ECC/parity error support for its memories
– Generic timers
– Fault encapsulation by hardware for redundantexecuted application software on multiple corecluster
• ARM Cortex-M4, 32-bit CPU
– Up to 133 MHz
– 16 KB/16 KB I-/D- L1 Cache
– 32+32 KB tightly coupled memory (TCM)
– ECC/parity support for its memories
• Clocks
– Phase Locked Loops (PLLs)
– 1 external crystal oscillator (FXOSC)
– 1 FIRC oscillator
• System protection and power management features
– Flexible run modes to consume low power based onapplication needs
– Peripheral clock enable register can disable clocks tounused modules, thereby reducing currents
– Power gating of unused A53 cores and GPU
– Low and high voltage warning and detect
– Hardware CRC module to support fast cyclicredundancy checks (CRC)
– 120-bit unique chip identifier
– Hardware watchdog
– eDMA controller with 32 channels (withDMAMUX)
– Extended Resource Domain Controller
• Safety concept
– ISO 26262, ASIL level target
– Measures to detect faults in memory and logic
– Measures to detect single point and latent faults
– Quantitative out of context analysis of functionalsafety (FMEDA) tailored to application specifics
– Safety manual and FMEDA report available
• Security
– CSE with 16 KB of on-chip Secure RAM and ROM.
– ARM TrustZone (TZ) architecture support
– Boot from NOR flash with AES-128 (CTR)
– On-Chip One-Time Programmable elementController (OCOTP_CTRL) with on chip electricalfuse array.
– System JTAG Controller (SJC)
• Debug functionality
– Standard JTAG and Compact JTAG
– 16-bit Trace port, Serial Wire Output port
• Timers
– General purpose timers (FTM)
– Two Periodic Interrupt Timer (PIT)
– IEEE 1588 Timers (part of Ethernet Subsystem)
• Analog
– 1x 12-bit 1.8 V SAR ADC with self-test
• Communications
– UART(w/ LIN2.1l)
– Serial peripheral interface (SPI)
– I2C blocks
– PCI express 2.0 with endpoint and root complexsupport
– LFAST serial link
– 1 GBit Ethernet with PTP IEEE 1588
– FD-CAN
– FlexRay Dual Channel, Version 2.1 RevA
• Memory interfaces
– 32-bit DRAM Controller with support for LPDDR2/DDR3/DDR3L - Up to 1066 MHz data rate with ECC (SEC-DEDTED)triple errror detection support for subregion
– QuadSPI supporting Execute-In-Place (XIP)
– Boot flash fault detection and correction using two-dimensional parity.
– Triple fault detection and single fault correction scheme for external DDR-RAM including address/page fault detection.
• Video input interfaces, Image processing, graphics processing, display
– Display Control Unit (2D-ACE) with 24-bit RGB, GPU frame buffer decoding
– GPU GC3000 with frame buffer compression
– 2x VIU (Video interface unit) for camera input
– 2x MIPICSI2 with four lanes for camera input (support 1080 pixel @ 30 fps)
– Image signal processor (ISP), supporting 2x1 or 1x2 megapixel @ 30 fps and 4x2 megapixel for subset of functions(exposure control, gamma correction)
– 2x APEX2-CL Image cognition processor supporting OpenCL 1.2. APEX-642CL comprises two Array Processing Unit
(APU) cores configurable as single SIMD engine with 64 16-bit Computational Units (CU), or configurable as two coreMIMD engines with 32 16-bit CUs each.
– CUs are comprised of four Functional Units: 16-bit Multiplier, Load Store Unit, ALU, and Shifter
– JPEG video decoder (8/12-bit)
– H.264 video decoder (8/10/12-bit), High-intra and constrained baseline formats
– H.264 video encode (8/10/12-bit), High-intra only
– Fast DMA for data transfers between DRAM and System RAM with CRC
• Human-Machine Interface (HMI)
– GPIO pins with interrupt support, DMA request capability, digital glitch filter
– Configurable slew rate and drive strength on all output pins
• System RAM
– 4 MB On-Chip System RAM with ECC
三.官方源碼編譯教程
3.1 Download the Yocto Project Environment into your directory:
1. mkdir fsl-auto-yocto-bsp
2. cd fsl-auto-yocto-bsp
3. repo init -u https://source.codeaurora.org/external/autobsps32/auto_yocto_bsp -b hotfix/bsp17.0.hf1 -m adas.xml
4. repo sync
Note:如果你的機器沒有安裝repo,那麼請遵循下面的步驟:
1. mkdir ~/bin
2. curl http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo> ~/bin/repo
3. PATH=~/bin:$PATH
4. chmod a+x ~/bin/repo
打開repo将改為:
#REPO_URL='git://codeaurora.org/tools/repo.git'
REPO_URL = 'https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/'
3.2Create build folder:
1../sources/meta-alb/scripts/host-prepare.sh
2,source nxp-setup-alb.sh -m s32v234sbc
運作完以上步驟:你将會如下目錄:
[email protected]:~/ccion/fsl-auto-yocto-bsp/build_s32v234sbc$ ls
bitbake-cookerdaemon.log cache conf SOURCE_THIS tmp
然後修改此目錄下面的conf/local.conf.j将vsdk加入yocto系統。
FSL_LOCAL_MIRROR = "file:///your path/fsl_local_mirror"
LICENSE_FLAGS_WHITELIST_append = " commercial "
操作完以上步驟後,請在nxp官網下載下傳VisionSDK_S32V2xx_RTM_xxx.bin。網站:https://www.nxp.com/cn/search?keyword=s32v234#
bitbake fsl-image-vsdk
接下來就是漫長的等待編譯,由于很多源碼會從網上下載下傳,是以第一次編譯需要很長時間,大概12小時。編譯完後,可以将downloads目錄下的源碼包儲存。
[email protected]:~/ccion/code/fsl-auto-yocto-bsp/build_s32v234sbc/tmp/deploy$ ls
images licenses rpm
編完後,如上目錄images就是我們所需要的鏡像。
[email protected]:~/ccion/code/fsl-auto-yocto-bsp/build_s32v234sbc/tmp/work/aarch64-fsl-linux$ ls
acl boost flac inputproto libical libxft nfs-utils setserial
alsa-lib bridge-utils flex iozone3 libice libxi nspr shadow
alsa-plugins busybox fontconfig iperf3 libidn libxml2 ocv shadow-sysroot
apex-add bzip2 freetype iproute2 libjpeg-turbo libxrandr ofono shared-mime-info
apexcv-basic cairo gawk iptables libmnl libxrender openssh speexdsp
apexcv-orb canutils gcc iputils libmpc libxshmfence openssl sqlite3
apexcv-remap cnn-classifier gcc-runtime isl libnfsidmap libxt opkg-utils stat
apexcv-simple consolekit gconf isp-h264dec-single-stream libnl libxtst pango strace
apex-downsample-upsample-cv coreutils gd isp-jpeg-4stream libnss-mdns libxv pciutils strongswan
apex-emulation-test cracklib gdb isp-ov10635-viu-dcu libogg libxxf86vm pedestrian-detection sysfsutils
apex-face-detection-cv cryptodev-linux gdbm isp-ov10640-quad libpam lighttpd pedestrian-detection-aggcf sysstat
apex-fast9-cv curl gdk-pixbuf isp-sonyimx224-csi-dcu libpcap linux-libc-headers perl sysvinit
apex-gauss5x5-cv damageproto gettext isp-sonyimx224-default libpciaccess lmbench pixman tcpdump
apex-histogram-cv db giflib isp-sonyimx224-h264enc libpcre lmsensors pkgconfig tcpreplay
apex-indirect-input-cv dbus glib-2.0 isp-sonyimx224-rgb-yuv-gs8 libpng lrzsz polkit tcp-wrappers
apex-integral-image-cv dbus-glib glibc isp-stereo-apexbm libpthread-stubs lzo presentproto tiff
apex-isp-face-detection-cv demos-data glibc-initial isp-stereo-calib librsvg m4 procps u-boot-environment
apex-isp-fast9 devmem2 glibc-locale kbproto
可以看到在此目錄下,就是vsdk提供過來的demo應用執行個體。