forked from xuos/xiuos
solve the compile problem of tflite in xiuos
This commit is contained in:
@@ -242,7 +242,7 @@ static inline unsigned long KSwitch0(unsigned int knum)
|
||||
{
|
||||
uintptr_t param[1] = {0};
|
||||
uint8_t num = 0;
|
||||
SERVICETABLE[knum].fun(knum, param, num);
|
||||
return SERVICETABLE[knum].fun(knum, param, num);
|
||||
}
|
||||
|
||||
static inline unsigned long KSwitch1(unsigned int knum, unsigned long arg1)
|
||||
@@ -250,7 +250,7 @@ static inline unsigned long KSwitch1(unsigned int knum, unsigned long arg1)
|
||||
uintptr_t param[1] = {0};
|
||||
uint8_t num = 0;
|
||||
param[0] = arg1;
|
||||
SERVICETABLE[knum].fun(knum, param, num );
|
||||
return SERVICETABLE[knum].fun(knum, param, num );
|
||||
}
|
||||
|
||||
|
||||
@@ -261,7 +261,7 @@ static inline unsigned long KSwitch2(unsigned int knum, unsigned long arg1,
|
||||
uint8_t num = 0;
|
||||
param[0] = arg1;
|
||||
param[1] = arg2;
|
||||
SERVICETABLE[knum].fun(knum, param, num );
|
||||
return SERVICETABLE[knum].fun(knum, param, num );
|
||||
}
|
||||
|
||||
|
||||
@@ -274,7 +274,7 @@ static inline unsigned long KSwitch3(unsigned int knum, unsigned long arg1,
|
||||
param[1] = arg2;
|
||||
param[2] = arg3;
|
||||
|
||||
SERVICETABLE[knum].fun(knum, param, num );
|
||||
return SERVICETABLE[knum].fun(knum, param, num );
|
||||
}
|
||||
|
||||
static inline unsigned long KSwitch4(unsigned int knum, unsigned long arg1,
|
||||
@@ -287,7 +287,7 @@ static inline unsigned long KSwitch4(unsigned int knum, unsigned long arg1,
|
||||
param[1] = arg2;
|
||||
param[2] = arg3;
|
||||
param[3] = arg4;
|
||||
SERVICETABLE[knum].fun(knum, param, num );
|
||||
return SERVICETABLE[knum].fun(knum, param, num );
|
||||
}
|
||||
|
||||
static inline unsigned long KSwitch5(unsigned int knum, unsigned long arg1,
|
||||
@@ -301,7 +301,7 @@ static inline unsigned long KSwitch5(unsigned int knum, unsigned long arg1,
|
||||
param[2] = arg3;
|
||||
param[3] = arg4;
|
||||
param[4] = arg5;
|
||||
SERVICETABLE[knum].fun(knum, param, num );
|
||||
return SERVICETABLE[knum].fun(knum, param, num );
|
||||
}
|
||||
|
||||
static inline unsigned long KSwitch6(unsigned int knum, unsigned long arg1,
|
||||
@@ -317,7 +317,7 @@ static inline unsigned long KSwitch6(unsigned int knum, unsigned long arg1,
|
||||
param[3] = arg4;
|
||||
param[4] = arg5;
|
||||
param[5] = arg6;
|
||||
SERVICETABLE[knum].fun(knum, param, num );
|
||||
return SERVICETABLE[knum].fun(knum, param, num );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,6 +31,12 @@ SECTIONS
|
||||
*(.rodata .rodata*)
|
||||
*(.glue_7)
|
||||
*(.glue_7t)
|
||||
|
||||
PROVIDE(__ctors_start__ = .);
|
||||
KEEP (*(SORT(.init_array.*)))
|
||||
KEEP (*(.init_array))
|
||||
PROVIDE(__ctors_end__ = .);
|
||||
|
||||
PROVIDE(_uetext = ABSOLUTE(.));
|
||||
} > usram
|
||||
|
||||
|
||||
@@ -15,6 +15,14 @@ ifeq ($(CONFIG_SUPPORT_CONNECTION_FRAMEWORK), y)
|
||||
APPPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/connection #
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SUPPORT_KNOWING_FRAMEWORK), y)
|
||||
APPPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/knowing #
|
||||
APPPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/knowing/tensorflow-lite/tensorflow-lite-for-mcu/source #
|
||||
APPPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/knowing/tensorflow-lite/tensorflow-lite-for-mcu/source/third_party/gemmlowp #
|
||||
APPPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/knowing/tensorflow-lite/tensorflow-lite-for-mcu/source/third_party/flatbuffers/include #
|
||||
APPPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/knowing/tensorflow-lite/tensorflow-lite-for-mcu/source/third_party/ruy #
|
||||
endif
|
||||
|
||||
COMPILE_APP:
|
||||
@$(eval CPPPATHS=$(APPPATHS))
|
||||
@echo $(SRC_APP_DIR)
|
||||
|
||||
@@ -164,15 +164,40 @@ ifeq ($(CONFIG_FS_CH376), y)
|
||||
KERNELPATHS +=-I$(KERNEL_ROOT)/fs/compatibility_ch376 #
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_TRANSFORM_LAYER_ATTRIUBUTE), y)
|
||||
ifeq ($(CONFIG_ADD_XIUOS_FETURES), y)
|
||||
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/transform_layer/xiuos/user_api/posix_support/include #
|
||||
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/sensor #
|
||||
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/transform_layer/xiuos #
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ADD_NUTTX_FETURES), y)
|
||||
#
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ADD_RTTHREAD_FETURES), y)
|
||||
#
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Applications/general_functions/list #
|
||||
|
||||
ifeq ($(CONFIG_SUPPORT_SENSOR_FRAMEWORK), y)
|
||||
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/sensor #
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SUPPORT_CONNECTION_FRAMEWORK), y)
|
||||
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/connection #
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SUPPORT_KNOWING_FRAMEWORK), y)
|
||||
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/knowing #
|
||||
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/knowing/tensorflow-lite/tensorflow-lite-for-mcu/source #
|
||||
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/knowing/tensorflow-lite/tensorflow-lite-for-mcu/source/third_party/gemmlowp #
|
||||
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/knowing/tensorflow-lite/tensorflow-lite-for-mcu/source/third_party/flatbuffers/include #
|
||||
KERNELPATHS += -I$(KERNEL_ROOT)/../../APP_Framework/Framework/knowing/tensorflow-lite/tensorflow-lite-for-mcu/source/third_party/ruy #
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_CRYPTO), y)
|
||||
KERNELPATHS += -I$(KERNEL_ROOT)/framework/security/crypto/include #
|
||||
endif
|
||||
|
||||
@@ -30,7 +30,7 @@ static void CanDrvLinkInit()
|
||||
}
|
||||
|
||||
/*Find the regiter driver*/
|
||||
DriverType CanDriverFind(const char *drv_name, enum DriverType drv_type)
|
||||
DriverType CanDriverFind(const char *drv_name, enum DriverType_e drv_type)
|
||||
{
|
||||
NULL_PARAM_CHECK(drv_name);
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ static void I2cDrvLinkInit()
|
||||
}
|
||||
|
||||
/*Find the regiter driver*/
|
||||
DriverType I2cDriverFind(const char *drv_name, enum DriverType drv_type)
|
||||
DriverType I2cDriverFind(const char *drv_name, enum DriverType_e drv_type)
|
||||
{
|
||||
NULL_PARAM_CHECK(drv_name);
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ typedef struct HardwareDev *HardwareDevType;
|
||||
typedef struct Driver *DriverType;
|
||||
|
||||
/* need to add new bus type in ../tool/shell/letter-shell/cmd.c, ensure ShowBus cmd supported*/
|
||||
enum BusType
|
||||
enum BusType_e
|
||||
{
|
||||
TYPE_I2C_BUS = 0,
|
||||
TYPE_SPI_BUS,
|
||||
@@ -86,7 +86,7 @@ enum DevState
|
||||
DEV_UNINSTALL,
|
||||
};
|
||||
|
||||
enum DriverType
|
||||
enum DriverType_e
|
||||
{
|
||||
TYPE_I2C_DRV = 0,
|
||||
TYPE_SPI_DRV,
|
||||
@@ -168,7 +168,7 @@ struct HardwareDev
|
||||
struct Driver
|
||||
{
|
||||
int8 drv_name[NAME_NUM_MAX];
|
||||
enum DriverType driver_type;
|
||||
enum DriverType_e driver_type;
|
||||
enum DriverState driver_state;
|
||||
|
||||
uint32 (*configure)(void *drv, struct BusConfigureInfo *configure_info);
|
||||
@@ -182,7 +182,7 @@ struct Driver
|
||||
struct Bus
|
||||
{
|
||||
int8 bus_name[NAME_NUM_MAX];
|
||||
enum BusType bus_type;
|
||||
enum BusType_e bus_type;
|
||||
enum BusState bus_state;
|
||||
|
||||
int32 (*match)(struct Driver *driver, struct HardwareDev *device);
|
||||
|
||||
@@ -58,7 +58,7 @@ int CanDriverAttachToBus(const char *drv_name, const char *bus_name);
|
||||
int CanDriverRegister(struct Driver *driver);
|
||||
|
||||
/*Find the register driver*/
|
||||
DriverType CanDriverFind(const char *drv_name, enum DriverType drv_type);
|
||||
DriverType CanDriverFind(const char *drv_name, enum DriverType_e drv_type);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ int I2cDriverAttachToBus(const char *drv_name, const char *bus_name);
|
||||
int I2cDriverRegister(struct Driver *driver);
|
||||
|
||||
/*Find the register driver*/
|
||||
DriverType I2cDriverFind(const char *drv_name, enum DriverType drv_type);
|
||||
DriverType I2cDriverFind(const char *drv_name, enum DriverType_e drv_type);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ int LcdDriverAttachToBus(const char *drv_name, const char *bus_name);
|
||||
int LcdDriverRegister(struct Driver *driver);
|
||||
|
||||
/*Find the register driver*/
|
||||
DriverType LcdDriverFind(const char *drv_name, enum DriverType drv_type);
|
||||
DriverType LcdDriverFind(const char *drv_name, enum DriverType_e drv_type);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ int PinDriverAttachToBus(const char *drv_name, const char *bus_name);
|
||||
int PinDriverRegister(struct Driver *driver);
|
||||
|
||||
/*Find the register driver*/
|
||||
DriverType PinDriverFind(const char *drv_name, enum DriverType drv_type);
|
||||
DriverType PinDriverFind(const char *drv_name, enum DriverType_e drv_type);
|
||||
|
||||
/*Get the initialized Pin bus*/
|
||||
BusType PinBusInitGet(void);
|
||||
|
||||
@@ -86,7 +86,7 @@ int RtcDriverAttachToBus(const char *drv_name, const char *bus_name);
|
||||
int RtcDriverRegister(struct Driver *driver);
|
||||
|
||||
/*Find the register driver*/
|
||||
DriverType RtcDriverFind(const char *drv_name, enum DriverType drv_type);
|
||||
DriverType RtcDriverFind(const char *drv_name, enum DriverType_e drv_type);
|
||||
|
||||
/*Set Rtc time and date*/
|
||||
int RtcDrvSetFunction(char *driver_name, struct RtcSetParam *rtc_set_param);
|
||||
|
||||
@@ -103,7 +103,7 @@ int SerialDriverAttachToBus(const char *drv_name, const char *bus_name);
|
||||
int SerialDriverRegister(struct Driver *driver);
|
||||
|
||||
/*Find the regiter driver*/
|
||||
DriverType SerialDriverFind(const char *drv_name, enum DriverType drv_type);
|
||||
DriverType SerialDriverFind(const char *drv_name, enum DriverType_e drv_type);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ int SpiDriverAttachToBus(const char *drv_name, const char *bus_name);
|
||||
int SpiDriverRegister(struct Driver *driver);
|
||||
|
||||
/*Find the register driver*/
|
||||
DriverType SpiDriverFind(const char *drv_name, enum DriverType drv_type);
|
||||
DriverType SpiDriverFind(const char *drv_name, enum DriverType_e drv_type);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ int TouchDriverAttachToBus(const char *drv_name, const char *bus_name);
|
||||
int TouchDriverRegister(struct Driver *driver);
|
||||
|
||||
/*Find the register driver*/
|
||||
DriverType TouchDriverFind(const char *drv_name, enum DriverType drv_type);
|
||||
DriverType TouchDriverFind(const char *drv_name, enum DriverType_e drv_type);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ int UsbDriverAttachToBus(const char *drv_name, const char *bus_name);
|
||||
int UsbDriverRegister(struct Driver *driver);
|
||||
|
||||
/*Find the register driver*/
|
||||
DriverType UsbDriverFind(const char *drv_name, enum DriverType drv_type);
|
||||
DriverType UsbDriverFind(const char *drv_name, enum DriverType_e drv_type);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ static void LcdDrvLinkInit()
|
||||
InitDoubleLinkList(&lcddrv_linklist);
|
||||
}
|
||||
|
||||
DriverType LcdDriverFind(const char *drv_name, enum DriverType drv_type)
|
||||
DriverType LcdDriverFind(const char *drv_name, enum DriverType_e drv_type)
|
||||
{
|
||||
NULL_PARAM_CHECK(drv_name);
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ static void PinDrvLinkInit()
|
||||
InitDoubleLinkList(&pindrv_linklist);
|
||||
}
|
||||
|
||||
DriverType PinDriverFind(const char *drv_name, enum DriverType DrvType)
|
||||
DriverType PinDriverFind(const char *drv_name, enum DriverType_e DrvType)
|
||||
{
|
||||
NULL_PARAM_CHECK(drv_name);
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ static void RtcDrvLinkInit()
|
||||
InitDoubleLinkList(&rtcdrv_linklist);
|
||||
}
|
||||
|
||||
DriverType RtcDriverFind(const char *drv_name, enum DriverType drv_type)
|
||||
DriverType RtcDriverFind(const char *drv_name, enum DriverType_e drv_type)
|
||||
{
|
||||
NULL_PARAM_CHECK(drv_name);
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ static void SerialDrvLinkInit()
|
||||
InitDoubleLinkList(&serialdrv_linklist);
|
||||
}
|
||||
|
||||
DriverType SerialDriverFind(const char *drv_name, enum DriverType drv_type)
|
||||
DriverType SerialDriverFind(const char *drv_name, enum DriverType_e drv_type)
|
||||
{
|
||||
NULL_PARAM_CHECK(drv_name);
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ static void SpiDrvLinkInit()
|
||||
InitDoubleLinkList(&spidrv_linklist);
|
||||
}
|
||||
|
||||
DriverType SpiDriverFind(const char *drv_name, enum DriverType drv_type)
|
||||
DriverType SpiDriverFind(const char *drv_name, enum DriverType_e drv_type)
|
||||
{
|
||||
NULL_PARAM_CHECK(drv_name);
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ static void TouchDrvLinkInit()
|
||||
InitDoubleLinkList(&touchdrv_linklist);
|
||||
}
|
||||
|
||||
DriverType TouchDriverFind(const char *drv_name, enum DriverType drv_type)
|
||||
DriverType TouchDriverFind(const char *drv_name, enum DriverType_e drv_type)
|
||||
{
|
||||
NULL_PARAM_CHECK(drv_name);
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ static void UsbDrvLinkInit()
|
||||
}
|
||||
|
||||
/*Find the regiter driver*/
|
||||
DriverType UsbDriverFind(const char *drv_name, enum DriverType drv_type)
|
||||
DriverType UsbDriverFind(const char *drv_name, enum DriverType_e drv_type)
|
||||
{
|
||||
NULL_PARAM_CHECK(drv_name);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user