1 Star 0 Fork 0

chenchi/HeliosSDK

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
plat.mk 12.40 KB
一键复制 编辑 原始数据 按行查看 历史
chenchi 提交于 2024-03-09 17:42 . EC800GCNLD 更新为 1M 内存
# Copyright (c) Quectel Wireless Solution, Co., Ltd.All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##########################################
# flags and libs on Unisoc & Unisoc_8850 #
##########################################
ifeq ($(strip $(PLAT)), $(filter $(PLAT),Unisoc Unisoc_8850 Unisoc_8910_R05 Unisoc_8850_R02))
CFLAGS_PLAT = -mcpu=cortex-a5 -mtune=generic-armv7-a -mthumb \
-mfpu=neon-vfpv4 -mfloat-abi=hard -mno-unaligned-access
CPPFLAGS_PLAT = -mcpu=cortex-a5 -mtune=generic-armv7-a -mthumb \
-mfpu=neon-vfpv4 -mfloat-abi=hard -mno-unaligned-access
include config/config.mk
# ifeq ($(CONFIG_CAMERA_DECODE), y)
ifeq ($(CONFIG_CAMERA), y)
# $(info USE nano lib)
USE_NANO_LIB = y
endif
ifeq ($(strip $(BOARD)),$(filter $(strip $(BOARD)),EC800GCN_LD))
# $(info USE nano lib)
USE_NANO_LIB = y
endif
ifeq ($(USE_NANO_LIB), y) # use nano lib
STD_LIBS += $(COMPILER_PATH)/$(CROSS)/lib/thumb/v7-a+fp/hard/libc_nano.a
else
STD_LIBS += $(COMPILER_PATH)/$(CROSS)/lib/thumb/v7-a+fp/hard/libc.a
endif
ifneq ($(USE_NOSYS_LIB), n) # use nosys lib
STD_LIBS += $(COMPILER_PATH)/$(CROSS)/lib/thumb/v7-a+fp/hard/libnosys.a
endif
STD_LIBS += $(COMPILER_PATH)/$(CROSS)/lib/thumb/v7-a+fp/hard/libm.a \
$(COMPILER_PATH)/lib/gcc/$(CROSS)/10.2.1/thumb/v7-a+fp/hard/libgcc.a
ifeq ($(strip $(PLAT)),$(filter $(PLAT),Unisoc_8850 Unisoc_8850_R02))
DFLAGS_PLAT = _SYS__TIMEVAL_H_
endif
endif
##########################
# flags and libs on ASR #
##########################
ifeq ($(strip $(PLAT)), ASR)
CFLAGS_PLAT = -mcpu=cortex-r5 -mtune=cortex-r5 -mthumb \
-mthumb-interwork -mfloat-abi=soft -g -Os
DFLAGS_PLAT = _SYS_SELECT_H
ifeq ($(USE_NANO_LIB), y) # use nano lib
STD_LIBS += $(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libc_nano.a
else
STD_LIBS += $(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libc.a
endif
ifneq ($(USE_NOSYS_LIB), n) # use nosys lib
STD_LIBS += $(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libnosys.a
endif
STD_LIBS += $(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libm.a \
$(COMPILER_PATH)/lib/gcc/$(CROSS)/10.2.1/thumb/v7/nofp/libgcc.a
endif
ifeq ($(strip $(PLAT)), aic8800m40)
CFLAGS_PLAT = -mthumb -mabi=aapcs -mfloat-abi=softfp -mfpu=fpv4-sp-d16 -fms-extensions \
-Wall -Wchar-subscripts -Wformat -Wuninitialized \
-Winit-self -Wignored-qualifiers -std=c99 -fno-builtin \
-fdata-sections -ffunction-sections
DFLAGS_PLAT = _SYS_SELECT_H
ifeq ($(USE_NANO_LIB), y) # use nano lib
STD_LIBS += $(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libc_nano.a
else
STD_LIBS += $(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libc.a
endif
ifneq ($(USE_NOSYS_LIB), n) # use nosys lib
STD_LIBS += $(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libnosys.a
endif
STD_LIBS += $(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libm.a \
$(COMPILER_PATH)/lib/gcc/$(CROSS)/9.2.1/thumb/v7/nofp/libgcc.a
# ifeq ($(USE_NANO_LIB), y) # use nano lib
# STD_LIBS += $(COMPILER_PATH)/$(CROSS)/lib/libc_nano.a
# else
# STD_LIBS += $(COMPILER_PATH)/$(CROSS)/lib/libc.a
# endif
# ifneq ($(USE_NOSYS_LIB), n) # use nosys lib
# STD_LIBS += $(COMPILER_PATH)/$(CROSS)/lib/libnosys.a
# endif
# STD_LIBS += $(COMPILER_PATH)/$(CROSS)/lib/libm.a \
# $(COMPILER_PATH)/lib/gcc/$(CROSS)/9.2.1/libgcc.a
endif
##########################
# flags and libs on ASR_1803s #
##########################
ifeq ($(strip $(PLAT)), ASR_1803s)
#CFLAGS_PLAT = -mcpu=cortex-r4 -mtune=cortex-r4 -mthumb \
# -mthumb-interwork -mfloat-abi=soft -mlong-calls
FNO_BUILTIN_FLAGS := -fno-builtin-printf \
-fno-builtin-time \
-fno-builtin-gmtime \
-fno-builtin-gettimeofday \
-fno-builtin-mktime \
-fno-builtin-puts
CFLAGS_PLAT = -c -MMD -mcpu=cortex-r5 -mfloat-abi=soft -mlittle-endian -mthumb -mthumb-interwork -Wall -ffunction-sections -fdata-sections $(FNO_BUILTIN_FLAGS) -D__OCPU_COMPILER_GCC__ -D_WANT_USE_LONG_TIME_T -std=c99 -g -Os
DFLAGS_PLAT = _SYS_SELECT_H
ifeq ($(USE_NANO_LIB), y) # use nano lib
STD_LIBS += $(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libc_nano.a
else
STD_LIBS += $(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libc.a
endif
ifneq ($(USE_NOSYS_LIB), n) # use nosys lib
STD_LIBS += $(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libnosys.a
endif
STD_LIBS += $(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libm.a \
$(COMPILER_PATH)/lib/gcc/$(CROSS)/10.2.1/thumb/v7/nofp/libgcc.a
endif
##########################
# flags and libs on ASR_1606 #
##########################
ifeq ($(strip $(PLAT)), ASR_1606)
FNO_BUILTIN_FLAGS := -fno-builtin-printf \
-fno-builtin-time \
-fno-builtin-gmtime \
-fno-builtin-gettimeofday \
-fno-builtin-mktime \
-fno-builtin-puts
CFLAGS_PLAT = -c -MMD -mcpu=cortex-r5 -mfloat-abi=soft \
-mlittle-endian -mthumb -mthumb-interwork -Wall -ffunction-sections -fdata-sections \
$(FNO_BUILTIN_FLAGS) -D__OCPU_COMPILER_GCC__ -D_WANT_USE_LONG_TIME_T -std=c99
DFLAGS_PLAT = _SYS_SELECT_H
STD_LIBS = $(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libc_nano.a \
$(COMPILER_PATH)/$(CROSS)/lib/libstdc++.a \
$(COMPILER_PATH)/$(CROSS)/lib/libg.a
STD_LIBS += $(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libm.a \
$(COMPILER_PATH)/lib/gcc/$(CROSS)/10.2.1/thumb/v7/nofp/libgcc.a \
$(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libnosys.a
endif
##########################
# flags and libs on ASR_1602 #
##########################
ifeq ($(strip $(PLAT)), ASR_1602)
FNO_BUILTIN_FLAGS := -fno-builtin-printf \
-fno-builtin-time \
-fno-builtin-gmtime \
-fno-builtin-gettimeofday \
-fno-builtin-mktime \
-fno-builtin-puts
CFLAGS_PLAT = -c -MMD -mcpu=cortex-r5 -mfloat-abi=soft \
-mlittle-endian -mthumb -mthumb-interwork -Wall -ffunction-sections -fdata-sections \
$(FNO_BUILTIN_FLAGS) -D__OCPU_COMPILER_GCC__ -D_WANT_USE_LONG_TIME_T -std=c99
DFLAGS_PLAT = _SYS_SELECT_H
STD_LIBS = $(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libc_nano.a \
$(COMPILER_PATH)/$(CROSS)/lib/libstdc++.a \
$(COMPILER_PATH)/$(CROSS)/lib/libg.a
STD_LIBS += $(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libm.a \
$(COMPILER_PATH)/lib/gcc/$(CROSS)/10.2.1/thumb/v7/nofp/libgcc.a \
$(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libnosys.a
endif
##########################
# flags and libs on ASR_1609 #
##########################
ifeq ($(strip $(PLAT)), ASR_1609)
FNO_BUILTIN_FLAGS := -fno-builtin-printf \
-fno-builtin-time \
-fno-builtin-gmtime \
-fno-builtin-gettimeofday \
-fno-builtin-mktime \
-fno-builtin-puts
CFLAGS_PLAT = -c -MMD -mcpu=cortex-r5 -mfloat-abi=soft \
-mlittle-endian -mthumb -mthumb-interwork -Wall -ffunction-sections -fdata-sections \
$(FNO_BUILTIN_FLAGS) -D__OCPU_COMPILER_GCC__ -D_WANT_USE_LONG_TIME_T -std=c99
DFLAGS_PLAT = _SYS_SELECT_H
STD_LIBS = $(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libc_nano.a \
$(COMPILER_PATH)/$(CROSS)/lib/libstdc++.a \
$(COMPILER_PATH)/$(CROSS)/lib/libg.a
STD_LIBS += $(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libm.a \
$(COMPILER_PATH)/lib/gcc/$(CROSS)/10.2.1/thumb/v7/nofp/libgcc.a \
$(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libnosys.a
endif
##########################
# flags and libs on RDA #
##########################
ifeq ($(strip $(PLAT)), RDA)
EL_FLAG = -EL
CFLAGS_PLAT = -march=xcpu2 -mtune=xcpu2 -mips16 -msoft-float \
-minterlink-mips16 -mexplicit-relocs -pipe $(EL_FLAG) \
-mmemcpy \
-fno-inline-small-functions \
-fno-inline-functions \
-fno-align-functions \
-fno-align-jumps \
-fno-align-loops \
-fno-align-labels \
-fno-builtin-iswspace \
-frename-registers \
-fwide-exec-charset=UTF-16LE \
-fshort-wchar \
-ffixed-t3 -ffixed-t4 -ffixed-t5 -ffixed-t6 -ffixed-t7 \
-ffixed-s2 -ffixed-s3 -ffixed-s4 -ffixed-s5 -ffixed-s6 -ffixed-s7 \
-ffixed-fp \
-fweb \
-G0
LDFLAGS_PLAT = $(EL_FLAG)
STD_LIBS += $(COMPILER_PATH)/lib/gcc/$(CROSS)/7.1.0/xcpu2/mips16/libgcc.a \
$(COMPILER_PATH)/$(CROSS)/lib/libc.a \
$(COMPILER_PATH)/$(CROSS)/lib/libm.a
endif
##########################
# flags and libs on Qual #
##########################
ifeq ($(strip $(PLAT)), Qualcomm)
CFLAGS_PLAT = -mthumb -target armv7m-none-musleabi -mfloat-abi=softfp -mfpu=none -mcpu=cortex-a7 \
-mno-unaligned-access -fms-extensions -fshort-enums -Wbuiltin-macro-redefined -flto -Os
DFLAGS_PLAT = QAPI_TXM_MODULE \
TXM_MODULE \
TX_DAM_QC_CUSTOMIZATIONS \
TX_ENABLE_PROFILING \
TX_ENABLE_EVENT_TRACE \
TX_DISABLE_NOTIFY_CALLBACKS \
FX_FILEX_PRESENT \
TX_ENABLE_IRQ_NESTING \
TX3_CHANGES
STD_LIBS += $(COMPILER_PATH)/armv7m-none-eabi/libc/lib/libc.a \
$(COMPILER_PATH)/lib/clang/4.0.3/lib/baremetal/libclang_rt.builtins-armv7m.a
LDFLAGS_PLAT = --wrap=malloc --wrap=calloc --wrap=free
endif
##########################
# flags and libs on SONY #
##########################
ifeq ($(strip $(PLAT)), SONY)
CFLAGS_PLAT = -mthumb -mcpu=cortex-m4 -Wl,-EL -funwind-tables -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wnull-dereference -Wshadow
STD_LIBS += \
$(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libc_nano.a \
$(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libnosys.a \
$(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libm.a \
$(COMPILER_PATH)/lib/gcc/$(CROSS)/10.2.1/thumb/v7/nofp/libgcc.a
endif
##########################
# flags and libs on EIGEN #
##########################
ifeq ($(strip $(PLAT)), EIGEN)
EIGEN_CFLAGS = -mcpu=cortex-m3 -mthumb -mslow-flash-data -specs=nano.specs -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--wrap=_malloc_r -Wl,--wrap=_free_r -Wl,--wrap=_realloc_r -Wl,--wrap=printf
EIGEN_PLAT_CFLAGS = -Wall -Wno-format -Werror -std=gnu99 -nostartfiles -mapcs-frame -Wl,--print-memory-usage
EIGEN_PLAT_CPPFLAGS = -Wall -Wno-format -Werror -nostartfiles -mapcs-frame -Wl,--print-memory-usage
CFLAGS_PLAT = $(EIGEN_CFLAGS) $(EIGEN_PLAT_CFLAGS)
CPPFLAGS_PLAT = $(EIGEN_CFLAGS) $(EIGEN_PLAT_CPPFLAGS)
STD_LIBS += \
$(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libm.a \
$(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libc_nano.a \
$(COMPILER_PATH)/lib/gcc/$(CROSS)/10.2.1/thumb/v7/nofp/libgcc.a
endif
##########################
# flags and libs on ECR6600 #
##########################
ifeq ($(strip $(PLAT)), ECR6600)
ECR6600_CFLAGS = -nostartfiles -nostdlib -Wl,--no-whole-archive -nostartfiles -nostdlib -Wl,--gc-sections -ffunction-sections -fdata-sections -fno-delete-null-pointer-checks -mcmodel=large -Os
CFLAGS_PLAT = $(ECR6600_CFLAGS)
LDFLAGS_PLAT = $(ECR6600_CFLAGS)
STD_LIBS = system/platform/$(PLAT)/boards/$(BOARD)/libraries/libs/libandes.a
endif
##########################
# flags and libs on EIGEN 718 #
##########################
ifeq ($(strip $(PLAT)), EIGEN_718)
EIGEN_CFLAGS = -mcpu=cortex-m3 -mthumb -mslow-flash-data -specs=nano.specs -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--wrap=printf -DLWIP_CONFIG_FILE="lwip_config_cat.h"
EIGEN_PLAT_CFLAGS = -Wl,--print-memory-usage -DQUECTEL_OPEN_MODE_SUPPORT -DFEATURE_OS_ENABLE -DFEATURE_FREERTOS_ENABLE -DTYPE_EC718P -DOPEN_CPU_MODE -DLITE_FEATURE_MODE -DLSPD_FEATURE_MODE -DLOW_SPEED_SERVICE_ONLY -DTRACE_LEVEL=5 -DSOFTPACK_VERSION="\"\"" -DHAVE_STRUCT_TIMESPEC
EIGEN_PLAT_CPPFLAGS = -Wall -Wno-format -Werror -nostartfiles -mapcs-frame -Wl,--print-memory-usage
CFLAGS_PLAT = $(EIGEN_CFLAGS) $(EIGEN_PLAT_CFLAGS)
CPPFLAGS_PLAT = $(EIGEN_CFLAGS) $(EIGEN_PLAT_CPPFLAGS)
LDFLAGS_PLAT = --wrap=_malloc_r --wrap=_free_r --wrap=_realloc_r --wrap=malloc --wrap=free -u _printf_float --wrap=printf --wrap=puts
STD_LIBS += \
$(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libm.a \
$(COMPILER_PATH)/$(CROSS)/lib/thumb/v7/nofp/libc_nano.a \
$(COMPILER_PATH)/lib/gcc/$(CROSS)/10.2.1/thumb/v7/nofp/libgcc.a
endif
##########################
# export for STD_LIBS #
##########################
export STD_LIBS
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/brian_chenchi/HeliosSDK.git
git@gitee.com:brian_chenchi/HeliosSDK.git
brian_chenchi
HeliosSDK
HeliosSDK
master

搜索帮助