Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions firmware/.config
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ CONFIG_RT_DFS_ELM_MAX_SECTOR_SIZE=4096
CONFIG_RT_DFS_ELM_REENTRANT=y
CONFIG_RT_USING_DFS_DEVFS=y
CONFIG_RT_USING_DFS_NET=y
# CONFIG_HAVE_SYS_SELECT_H is not set
CONFIG_HAVE_SYS_SELECT_H=y
# CONFIG_HAVE_SYS_SOCKET_H is not set
# CONFIG_RT_USING_DFS_ROMFS is not set
# CONFIG_RT_USING_DFS_RAMFS is not set
Expand Down Expand Up @@ -137,6 +137,11 @@ CONFIG_RT_SFUD_USING_FLASH_INFO_TABLE=y
# CONFIG_RT_USING_ENC28J60 is not set
# CONFIG_RT_USING_SPI_WIFI is not set
CONFIG_RT_USING_WDT=y
CONFIG_RT_USING_WIFI=y

#
# Using USB
#
# CONFIG_RT_USING_USB_HOST is not set
# CONFIG_RT_USING_USB_DEVICE is not set

Expand Down Expand Up @@ -243,12 +248,12 @@ CONFIG_LWIP_SO_RCVBUF=1
#
# Marvell WiFi
#
# CONFIG_PKG_USING_MARVELLWIFI is not set
# CONFIG_PKG_USING_WLANMARVELL is not set

#
# Wiced WiFi
#
# CONFIG_PKG_USING_WLAN_WICED is not set
# CONFIG_PKG_USING_WLANWICED is not set

#
# security packages
Expand Down Expand Up @@ -289,7 +294,6 @@ CONFIG_RT_USING_DSP=y
CONFIG_RT_USING_ISP=y
CONFIG_RT_USING_SADC=y
CONFIG_RT_USING_PWM=y
CONFIG_RT_USING_WIFI=y
CONFIG_SOC_FH8620=y
CONFIG_FH_USING_ADVAPI_MD=y
CONFIG_FH_USING_ADVAPI_ISP=y
Expand Down
44 changes: 20 additions & 24 deletions firmware/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,23 @@ config RT_USING_UART2
default y

config RT_USING_GC1024
bool "Using GC1024 sensor"
bool "Enable GC1024 sensor"
default y

config RT_USING_FH_DMA
bool "Using Fullhan DMA"
bool "Enable Fullhan DMA"
default y

config RT_USING_DMA_MEM
bool "DMA memory management"
bool "Enable DMA memory management"
default y

config RT_USING_FH_ACW
bool "Using Fullhan ACW driver"
bool "Enable Fullhan ACW driver"
default y

config CONFIG_CHIP_FH8620
bool "Fullhan FH8620 chip"
bool "Enable Fullhan FH8620 chip"
default y

config CONFIG_BOARD_IOTCAM
Expand All @@ -55,15 +55,15 @@ config CONFIG_PLAT_V2
default y

config RT_USING_DSP
bool "DSP"
bool "Enable DSP"
default y

config RT_USING_ISP
bool "ISP"
bool "Enable ISP"
default y

config RT_USING_SFUD
bool "SFUD"
bool "Enable SFUD"
default y

if RT_USING_SFUD
Expand All @@ -79,36 +79,32 @@ config RT_USING_SFUD
endif

config RT_USING_SADC
bool "SADC driver"
bool "Enable SADC driver"
default y

config RT_USING_PWM
bool "PWM driver"
bool "Enable PWM driver"
default y

config RT_USING_WIFI
bool "Support WiFi"
default y

if RT_USING_WIFI
config SOC_FH8620
bool "Enable SOC_FH8620"
default y
help
please use online packages iot/wifi/wiced also
endif
if RT_USING_WIFI
config SOC_FH8620
bool "Enable SOC_FH8620"
default y
help
please use online packages iot/wifi/wiced also
endif


config FH_USING_ADVAPI_MD
bool "Advance MD API"
bool "Enable Advance MD API"
default y

config FH_USING_ADVAPI_ISP
bool "Advance ISP API"
bool "Enable Advance ISP API"
default y

config FH_USING_RTSP
bool "RTSP protocol"
bool "Enable RTSP protocol"
default y

if FH_USING_RTSP
Expand Down
22 changes: 11 additions & 11 deletions firmware/Libraries/inc/fh_i2c.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,20 +184,20 @@ struct fh_i2c_obj
};

void I2C_Init(struct fh_i2c_obj *i2c_obj);
inline void I2C_Enable(struct fh_i2c_obj *i2c_obj, int enable);
inline void I2C_SetSlaveAddress(struct fh_i2c_obj *i2c_obj, rt_uint16_t addr);
inline UINT32 I2C_GetTransmitFifoLevel(struct fh_i2c_obj *i2c_obj);
inline UINT32 I2C_GetReceiveFifoLevel(struct fh_i2c_obj *i2c_obj);
inline UINT32 I2C_SetTransmitThreshold(struct fh_i2c_obj *i2c_obj, int txtl);
extern inline void I2C_Enable(struct fh_i2c_obj *i2c_obj, int enable);
extern inline void I2C_SetSlaveAddress(struct fh_i2c_obj *i2c_obj, rt_uint16_t addr);
extern inline UINT32 I2C_GetTransmitFifoLevel(struct fh_i2c_obj *i2c_obj);
extern inline UINT32 I2C_GetReceiveFifoLevel(struct fh_i2c_obj *i2c_obj);
extern inline UINT32 I2C_SetTransmitThreshold(struct fh_i2c_obj *i2c_obj, int txtl);
int I2C_HandleTxAbort(struct fh_i2c_obj *i2c_obj);
UINT32 I2C_ClearAndGetInterrupts(struct fh_i2c_obj *i2c_obj);
inline void I2C_SetInterruptMask(struct fh_i2c_obj *i2c_obj, UINT32 mask);
inline UINT32 I2C_GetInterruptMask(struct fh_i2c_obj *i2c_obj);
inline void I2C_SetDataCmd(struct fh_i2c_obj *i2c_obj, UINT32 reg);
inline UINT8 I2C_GetData(struct fh_i2c_obj *i2c_obj);
extern inline void I2C_SetInterruptMask(struct fh_i2c_obj *i2c_obj, UINT32 mask);
extern inline UINT32 I2C_GetInterruptMask(struct fh_i2c_obj *i2c_obj);
extern inline void I2C_SetDataCmd(struct fh_i2c_obj *i2c_obj, UINT32 reg);
extern inline UINT8 I2C_GetData(struct fh_i2c_obj *i2c_obj);
int I2C_WaitMasterIdle(struct fh_i2c_obj *i2c_obj);
int I2C_WaitSlaveIdle(struct fh_i2c_obj *i2c_obj);
int I2C_WaitDeviceIdle(struct fh_i2c_obj *i2c_obj);
inline int I2C_Abort(struct fh_i2c_obj *i2c_obj);
extern inline int I2C_Abort(struct fh_i2c_obj *i2c_obj);

#endif /* FH_I2C_H_ */
#endif /* FH_I2C_H_ */
32 changes: 17 additions & 15 deletions firmware/Libraries/inc/fh_mmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,35 +204,37 @@ struct fh_mmc_obj
MMC_DMA_Descriptors *descriptors;
void (*mmc_reset)(struct fh_mmc_obj *);
};
inline void MMC_SetBlockSize(struct fh_mmc_obj *mmc_obj, rt_uint32_t size);
inline void MMC_SetByteCount(struct fh_mmc_obj *mmc_obj, rt_uint32_t bytes);
inline rt_uint32_t MMC_GetWaterlevel(struct fh_mmc_obj *mmc_obj);
inline rt_uint32_t MMC_GetResponse(struct fh_mmc_obj *mmc_obj, int resp_num);
inline rt_uint32_t MMC_GetRegCmd(struct fh_mmc_obj *mmc_obj);
inline rt_uint32_t MMC_GetRegCtrl(struct fh_mmc_obj *mmc_obj);
inline rt_uint32_t MMC_SetInterruptMask(struct fh_mmc_obj *mmc_obj,
extern inline void MMC_SetBlockSize(struct fh_mmc_obj *mmc_obj, rt_uint32_t size);
extern inline void MMC_SetByteCount(struct fh_mmc_obj *mmc_obj, rt_uint32_t bytes);
extern inline rt_uint32_t MMC_GetWaterlevel(struct fh_mmc_obj *mmc_obj);
extern inline rt_uint32_t MMC_GetResponse(struct fh_mmc_obj *mmc_obj, int resp_num);
extern inline rt_uint32_t MMC_GetRegCmd(struct fh_mmc_obj *mmc_obj);
extern inline rt_uint32_t MMC_GetRegCtrl(struct fh_mmc_obj *mmc_obj);
extern inline rt_uint32_t MMC_SetInterruptMask(struct fh_mmc_obj *mmc_obj,
rt_uint32_t mask);
inline rt_uint32_t MMC_GetInterruptMask(struct fh_mmc_obj *mmc_obj);
inline rt_uint32_t MMC_ClearRawInterrupt(struct fh_mmc_obj *mmc_obj,
extern inline rt_uint32_t MMC_GetInterruptMask(struct fh_mmc_obj *mmc_obj);
extern inline rt_uint32_t MMC_GetUnmaskedInterrupt(struct fh_mmc_obj *mmc_obj);
extern inline rt_uint32_t MMC_ClearRawInterrupt(struct fh_mmc_obj *mmc_obj,
rt_uint32_t interrupts);
inline rt_uint32_t MMC_GetRawInterrupt(struct fh_mmc_obj *mmc_obj);
inline rt_uint32_t MMC_GetStatus(struct fh_mmc_obj *mmc_obj);
inline rt_uint32_t MMC_GetCardStatus(struct fh_mmc_obj *mmc_obj);
extern inline rt_uint32_t MMC_GetRawInterrupt(struct fh_mmc_obj *mmc_obj);
extern inline rt_uint32_t MMC_GetStatus(struct fh_mmc_obj *mmc_obj);
extern inline rt_uint32_t MMC_GetCardStatus(struct fh_mmc_obj *mmc_obj);

void MMC_Init(struct fh_mmc_obj *mmc_obj);
int MMC_ResetFifo(struct fh_mmc_obj *mmc_obj);
int MMC_SetCardWidth(struct fh_mmc_obj *mmc_obj, int width);
int MMC_UpdateClockRegister(struct fh_mmc_obj *mmc_obj, int div);
int MMC_SendCommand(struct fh_mmc_obj *mmc_obj, rt_uint32_t cmd,
rt_uint32_t arg, rt_uint32_t flags);
extern inline rt_uint32_t MMC_IsDataStateBusy(struct fh_mmc_obj *mmc_obj);
int MMC_WriteData(struct fh_mmc_obj *mmc_obj, rt_uint32_t *buf,
rt_uint32_t size);
int MMC_ReadData(struct fh_mmc_obj *mmc_obj, rt_uint32_t *buf,
rt_uint32_t size);

inline void MMC_StartDma(struct fh_mmc_obj *mmc_obj);
inline void MMC_StopDma(struct fh_mmc_obj *mmc_obj);
extern inline void MMC_StartDma(struct fh_mmc_obj *mmc_obj);
extern inline void MMC_StopDma(struct fh_mmc_obj *mmc_obj);
void MMC_InitDescriptors(struct fh_mmc_obj *mmc_obj, rt_uint32_t *buf,
rt_uint32_t size);

#endif /* FH_MMC_H_ */
#endif /* FH_MMC_H_ */
4 changes: 2 additions & 2 deletions firmware/Libraries/inc/fh_wdt.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ struct fh_wdt_obj
};

void WDT_Enable(struct fh_wdt_obj *wdt_obj, int enable);
inline int WDT_IsEnable(struct fh_wdt_obj *wdt_obj);
extern inline int WDT_IsEnable(struct fh_wdt_obj *wdt_obj);
void WDT_SetTopValue(struct fh_wdt_obj *wdt_obj, int top);
void WDT_SetCtrl(struct fh_wdt_obj *wdt_obj, UINT32 reg);
void WDT_Kick(struct fh_wdt_obj *wdt_obj);
unsigned int WDT_GetCurrCount(struct fh_wdt_obj *wdt_obj);

#endif /* FH_WDT_H_ */
#endif /* FH_WDT_H_ */
62 changes: 50 additions & 12 deletions firmware/link.ld
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ SECTIONS
{
*(.init)
*(.text)
KEEP(*(.fini))
*(.gnu.linkonce.t*)

/* section information for finsh shell */
Expand Down Expand Up @@ -49,14 +50,19 @@ SECTIONS
.ctors :
{
PROVIDE(__ctors_start__ = .);
KEEP(*(SORT(.ctors.*)))
KEEP(*(.ctors))
/* new GCC version uses .init_array */
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
PROVIDE(__ctors_end__ = .);
*crtbegin.o(.ctors)
*crtbegin?.o(.ctors)
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)
*(SORT(.ctors.*))
*(.ctors)
PROVIDE(__ctors_end__ = .);
}

.ARM.extab :
{
*(.ARM.extab* .gnu.linkonce.armextab.*)
}

/* The .ARM.exidx section is used for C++ exception handling. */
/* .ARM.exidx is sorted, so has to go in its own output section. */
__exidx_start = .;
Expand All @@ -72,17 +78,45 @@ SECTIONS
.dtors :
{
PROVIDE(__dtors_start__ = .);
KEEP(*(SORT(.dtors.*)))
KEEP(*(.dtors))
*crtbegin.o(.dtors)
*crtbegin?.o(.dtors)
*(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)
*(SORT(.dtors.*))
*(.dtors)
PROVIDE(__dtors_end__ = .);
}

. = ALIGN(4);
__data_start = .;
.data :
{
*(.data)
*(.data.*)
*(vtable)
*(.data*)

. = ALIGN(4);
/* preinit data */
PROVIDE_HIDDEN (__preinit_array_start = .);
KEEP(*(.preinit_array))
PROVIDE_HIDDEN (__preinit_array_end = .);

. = ALIGN(4);
/* init data */
PROVIDE_HIDDEN (__init_array_start = .);
KEEP(*(SORT(.init_array.*)))
KEEP(*(.init_array))
PROVIDE_HIDDEN (__init_array_end = .);


. = ALIGN(4);
/* finit data */
PROVIDE_HIDDEN (__fini_array_start = .);
KEEP(*(SORT(.fini_array.*)))
KEEP(*(.fini_array))
PROVIDE_HIDDEN (__fini_array_end = .);

KEEP(*(.jcr*))
. = ALIGN(4);
/* All data end */
*(.gnu.linkonce.d*)
}
__data_end = .;
Expand All @@ -92,7 +126,11 @@ SECTIONS

. = ALIGN(4);
__bss_start = .;
.bss : { *(.bss) }
.bss :
{
*(.bss*)
*(COMMON)
}
__bss_end = .;

/* stabs debugging sections. */
Expand All @@ -110,4 +148,4 @@ SECTIONS
.debug_aranges 0 : { *(.debug_aranges) }

_end = .;
}
}
11 changes: 7 additions & 4 deletions firmware/rtconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
#define RT_DFS_ELM_REENTRANT
#define RT_USING_DFS_DEVFS
#define RT_USING_DFS_NET
/* HAVE_SYS_SELECT_H is not set */
#define HAVE_SYS_SELECT_H
/* HAVE_SYS_SOCKET_H is not set */
/* RT_USING_DFS_ROMFS is not set */
/* RT_USING_DFS_RAMFS is not set */
Expand Down Expand Up @@ -128,6 +128,10 @@
/* RT_USING_ENC28J60 is not set */
/* RT_USING_SPI_WIFI is not set */
#define RT_USING_WDT
#define RT_USING_WIFI

/* Using USB */

/* RT_USING_USB_HOST is not set */
/* RT_USING_USB_DEVICE is not set */

Expand Down Expand Up @@ -219,11 +223,11 @@

/* Marvell WiFi */

/* PKG_USING_MARVELLWIFI is not set */
/* PKG_USING_WLANMARVELL is not set */

/* Wiced WiFi */

/* PKG_USING_WLAN_WICED is not set */
/* PKG_USING_WLANWICED is not set */

/* security packages */

Expand Down Expand Up @@ -259,7 +263,6 @@
#define RT_USING_ISP
#define RT_USING_SADC
#define RT_USING_PWM
#define RT_USING_WIFI
#define SOC_FH8620
#define FH_USING_ADVAPI_MD
#define FH_USING_ADVAPI_ISP
Expand Down
Loading