Browse Source

Add sensor, modify makefile

pull/3/head
Zhao_Jiasheng 2 years ago
parent
commit
cb87bea665
  1. 2
      Ubiquitous/XiUOS/Makefile
  2. 9
      Ubiquitous/XiUOS/compiler.mk
  3. 2
      Ubiquitous/XiUOS/kernel/memory/byte_manage.c
  4. 69
      Ubiquitous/XiUOS/path_app.mk
  5. 2
      Ubiquitous/XiUOS/path_kernel.mk

2
Ubiquitous/XiUOS/Makefile

@ -31,7 +31,7 @@ export HOSTTOOLS_DIR ?= $(KERNEL_ROOT)/tool/hosttools
export CONFIG2H_EXE ?= $(HOSTTOOLS_DIR)/xsconfig.sh
export CPPPATHS
export SRC_APP_DIR := applications framework
export SRC_APP_DIR := ../../APP_Framework
export SRC_KERNEL_DIR := arch board lib fs kernel resources tool
export SRC_DIR:= $(SRC_APP_DIR) $(SRC_KERNEL_DIR)

9
Ubiquitous/XiUOS/compiler.mk

@ -11,6 +11,7 @@ CFLAGS += $(DEFINES)
AFLAGS += $(DEFINES)
CXXFLAGS += $(DEFINES)
BUILD_DIR := $(KERNEL_ROOT)/build
APP_DIR := Ubiquitous/XiUOS
.PHONY:COMPILER
@ -26,7 +27,7 @@ COMPILER:
################################################
define add_c_file
$(eval COBJ := $(1:%.c=%.o)) \
$(eval COBJ := $(COBJ:$(KERNEL_ROOT)/%=%)) \
$(eval COBJ := $(subst $(subst $(APP_DIR),,$(KERNEL_ROOT)),,$(COBJ))) \
$(eval LOCALC := $(addprefix $(BUILD_DIR)/,$(COBJ))) \
$(eval OBJS += $(LOCALC)) \
$(if $(strip $(LOCALC)),$(eval $(LOCALC): $(1)
@ -39,7 +40,7 @@ endef
define add_cpp_file
$(eval COBJ := $(1:%.cpp=%.o)) \
$(eval COBJ := $(COBJ:$(KERNEL_ROOT)/%=%)) \
$(eval COBJ := $(subst $(subst $(APP_DIR),,$(KERNEL_ROOT)),,$(COBJ))) \
$(eval LOCALCPP := $(addprefix $(BUILD_DIR)/,$(COBJ))) \
$(eval OBJS += $(LOCALCPP)) \
$(if $(strip $(LOCALCPP)),$(eval $(LOCALCPP): $(1)
@ -52,7 +53,7 @@ endef
define add_cc_file
$(eval COBJ := $(1:%.cc=%.o)) \
$(eval COBJ := $(COBJ:$(KERNEL_ROOT)/%=%)) \
$(eval COBJ := $(subst $(subst $(APP_DIR),,$(KERNEL_ROOT)),,$(COBJ))) \
$(eval LOCALCPP := $(addprefix $(BUILD_DIR)/,$(COBJ))) \
$(eval OBJS += $(LOCALCPP)) \
$(if $(strip $(LOCALCPP)),$(eval $(LOCALCPP): $(1)
@ -65,7 +66,7 @@ endef
define add_S_file
$(eval SOBJ := $(1:%.S=%.o)) \
$(eval SOBJ := $(SOBJ:$(KERNEL_ROOT)/%=%)) \
$(eval SOBJ := $(subst $(subst $(APP_DIR),,$(KERNEL_ROOT)),,$(SOBJ))) \
$(eval LOCALS := $(addprefix $(BUILD_DIR)/,$(SOBJ))) \
$(eval OBJS += $(LOCALS)) \
$(if $(strip $(LOCALS)),$(eval $(LOCALS): $(1)

2
Ubiquitous/XiUOS/kernel/memory/byte_manage.c

@ -953,7 +953,7 @@ void *x_umalloc(x_size_t size)
lock = CriticalAreaLock();
/* alignment */
size = ALIGN_MEN_UP(size, MEM_ALIGN_SIZE);
ret = UserByteManager.dynamic_buddy_manager.done->malloc(&UserByteManager.dynamic_buddy_manager,size);
ret = UserByteManager.dynamic_buddy_manager.done->malloc(&UserByteManager.dynamic_buddy_manager,size, DYNAMIC_BLOCK_NO_EXTMEM_MASK);
if(ret != NONE)
CHECK(UserByteManager.dynamic_buddy_manager.done->JudgeLegal(&UserByteManager.dynamic_buddy_manager, ret - SIZEOF_DYNAMICALLOCNODE_MEM));

69
Ubiquitous/XiUOS/path_app.mk

@ -2,69 +2,10 @@
export APPPATHS :=-I$(BSP_ROOT) \
APPPATHS +=-I$(KERNEL_ROOT)/applications/user_api/switch_api \
-I$(KERNEL_ROOT)/applications/user_api/general_functions/linklist \
-I$(KERNEL_ROOT)/applications/user_api/include #
ifeq ($(CONFIG_CONNECTION_AT), y)
APPPATHS +=-I$(KERNEL_ROOT)/framework/connection/AT/at_device/inc \
-I$(KERNEL_ROOT)/framework/connection/communication/wifi/esp8266 \
-I$(KERNEL_ROOT)/framework/connection/communication/4G/air720 \
-I$(KERNEL_ROOT)/framework/connection/communication/4G/ec20 \
-I$(KERNEL_ROOT)/framework/connection/communication/4G/ec200x \
-I$(KERNEL_ROOT)/framework/connection/communication/nbiot/bc26 \
-I$(KERNEL_ROOT)/framework/connection/communication/nbiot/me3616 #
APPPATHS +=-I$(KERNEL_ROOT)/framework/connection/AT/at_protocol/include \
-I$(KERNEL_ROOT)/framework/connection/AT/at_protocol/at_socket #
APPPATHS +=-I$(KERNEL_ROOT)/framework/connection/AT/sal_socket/include \
-I$(KERNEL_ROOT)/framework/connection/AT/sal_socket/include/vfs_net \
-I$(KERNEL_ROOT)/framework/connection/AT/sal_socket/include/socket \
-I$(KERNEL_ROOT)/framework/connection/AT/sal_socket/include/socket/sys_socket \
-I$(KERNEL_ROOT)/framework/connection/AT/sal_socket/impl #
APPPATHS +=-I$(KERNEL_ROOT)/framework/connection/AT/netdev/include #
endif
ifeq ($(CONFIG_CONNECTION_MQTT), y)
APPPATHS +=-I$(KERNEL_ROOT)/framework/connection/MQTT/MQTTClient-C \
-I$(KERNEL_ROOT)/framework/connection/MQTT/MQTTPacket/src #
endif
ifeq ($(CONFIG_CONNECTION_COMMUNICATION_LORA), y)
APPPATHS +=-I$(KERNEL_ROOT)/framework/connection/Adapter/lora/inc \
-I$(KERNEL_ROOT)/framework/connection/Adapter/lora/src/radio #
endif
APPPATHS +=-I$(KERNEL_ROOT)/framework/connection/Adapter/include \
-I$(KERNEL_ROOT)/framework/connection/Adapter/4G \
-I$(KERNEL_ROOT)/framework/connection/Adapter/5G \
-I$(KERNEL_ROOT)/framework/connection/Adapter/bluetooth \
-I$(KERNEL_ROOT)/framework/connection/Adapter/can \
-I$(KERNEL_ROOT)/framework/connection/Adapter/ethernet \
-I$(KERNEL_ROOT)/framework/connection/Adapter/lora \
-I$(KERNEL_ROOT)/framework/connection/Adapter/nbiot \
-I$(KERNEL_ROOT)/framework/connection/Adapter/rs485 \
-I$(KERNEL_ROOT)/framework/connection/Adapter/wifi \
-I$(KERNEL_ROOT)/framework/connection/Adapter/zigbee #
ifeq ($(CONFIG_PERCEPTION_SENSORDEVICE), y)
APPPATHS +=-I$(KERNEL_ROOT)/framework/perception
endif
APPPATHS +=-I$(KERNEL_ROOT)/lib/libcpp #
ifeq ($(CONFIG_INTELLIGENT_TFLITE),y)
APPPATHS += \
-I$(KERNEL_ROOT)/framework/intelligent/tflite-mcu/source \
-I$(KERNEL_ROOT)/framework/intelligent/tflite-mcu/source/third_party/gemmlowp \
-I$(KERNEL_ROOT)/framework/intelligent/tflite-mcu/source/third_party/flatbuffers/include \
-I$(KERNEL_ROOT)/framework/intelligent/tflite-mcu/source/third_party/ruy
endif
APPPATHS += -I$(KERNEL_ROOT)/applications/app_newlib/include #
APPPATHS +=-I$(KERNEL_ROOT)/../../APP_Framework/Applications/general_functions/linklist \
-I$(KERNEL_ROOT)/../../APP_Framework/lib/app_newlib/include \
-I$(KERNEL_ROOT)/../../APP_Framework/Framework/sensor \
-I$(KERNEL_ROOT)/../../APP_Framework/Framework/transform_layer #
COMPILE_APP:
@ -74,6 +15,6 @@ COMPILE_APP:
$(MAKE) -C $$dir; \
done
@cp link.mk build/Makefile
@$(MAKE) -C build COMPILE_TYPE="_app" TARGET=XiaoShanOS_$(BOARD)_app.elf LINK_FLAGS=APPLFLAGS
@$(MAKE) -C build COMPILE_TYPE="_app" TARGET=XiUOS_$(BOARD)_app.elf LINK_FLAGS=APPLFLAGS
@rm build/Makefile build/make.obj

2
Ubiquitous/XiUOS/path_kernel.mk

@ -217,6 +217,6 @@ COMPILE_KERNEL:
$(MAKE) -C $$dir; \
done
@cp link.mk build/Makefile
@$(MAKE) -C build COMPILE_TYPE="_kernel" TARGET=XiaoShanOS_$(BOARD)_kernel.elf LINK_FLAGS=LFLAGS
@$(MAKE) -C build COMPILE_TYPE="_kernel" TARGET=XiUOS_$(BOARD)_kernel.elf LINK_FLAGS=LFLAGS
@rm build/Makefile build/make.obj

Loading…
Cancel
Save