Merge pull request #1317 from liu2guang/master
[BSP] add fire board support and optimize bsp.|添加野火开发板支持并优化bsp.
This commit is contained in:
commit
161778df80
|
@ -76,6 +76,7 @@ CONFIG_FINSH_USING_HISTORY=y
|
||||||
CONFIG_FINSH_HISTORY_LINES=5
|
CONFIG_FINSH_HISTORY_LINES=5
|
||||||
CONFIG_FINSH_USING_SYMTAB=y
|
CONFIG_FINSH_USING_SYMTAB=y
|
||||||
CONFIG_FINSH_USING_DESCRIPTION=y
|
CONFIG_FINSH_USING_DESCRIPTION=y
|
||||||
|
# CONFIG_FINSH_ECHO_DISABLE_DEFAULT is not set
|
||||||
CONFIG_FINSH_THREAD_PRIORITY=20
|
CONFIG_FINSH_THREAD_PRIORITY=20
|
||||||
CONFIG_FINSH_THREAD_STACK_SIZE=4096
|
CONFIG_FINSH_THREAD_STACK_SIZE=4096
|
||||||
CONFIG_FINSH_CMD_SIZE=80
|
CONFIG_FINSH_CMD_SIZE=80
|
||||||
|
@ -297,6 +298,7 @@ CONFIG_LWIP_NETIF_LOOPBACK=0
|
||||||
# tools packages
|
# tools packages
|
||||||
#
|
#
|
||||||
# CONFIG_PKG_USING_CMBACKTRACE is not set
|
# CONFIG_PKG_USING_CMBACKTRACE is not set
|
||||||
|
# CONFIG_PKG_USING_EASYFLASH is not set
|
||||||
# CONFIG_PKG_USING_EASYLOGGER is not set
|
# CONFIG_PKG_USING_EASYLOGGER is not set
|
||||||
# CONFIG_PKG_USING_SYSTEMVIEW is not set
|
# CONFIG_PKG_USING_SYSTEMVIEW is not set
|
||||||
# CONFIG_PKG_USING_IPERF is not set
|
# CONFIG_PKG_USING_IPERF is not set
|
||||||
|
@ -307,12 +309,30 @@ CONFIG_LWIP_NETIF_LOOPBACK=0
|
||||||
# CONFIG_PKG_USING_FASTLZ is not set
|
# CONFIG_PKG_USING_FASTLZ is not set
|
||||||
# CONFIG_PKG_USING_MINILZO is not set
|
# CONFIG_PKG_USING_MINILZO is not set
|
||||||
# CONFIG_PKG_USING_QUICKLZ is not set
|
# CONFIG_PKG_USING_QUICKLZ is not set
|
||||||
|
# CONFIG_PKG_USING_MULTIBUTTON is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# example package: hello
|
# example package: hello
|
||||||
#
|
#
|
||||||
# CONFIG_PKG_USING_HELLO is not set
|
# CONFIG_PKG_USING_HELLO is not set
|
||||||
# CONFIG_PKG_USING_MULTIBUTTON is not set
|
|
||||||
CONFIG_SOC_IMXRT1052=y
|
CONFIG_SOC_IMXRT1052=y
|
||||||
|
CONFIG_BOARD_RT1050_EVK=y
|
||||||
|
# CONFIG_BOARD_RT1050_FIRE is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# RT1050_EVK Bsp Config
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# Select uart device
|
||||||
|
#
|
||||||
CONFIG_RT_USING_UART1=y
|
CONFIG_RT_USING_UART1=y
|
||||||
CONFIG_RT_USING_HP_RTC=y
|
# CONFIG_RT_USING_UART2 is not set
|
||||||
|
# CONFIG_RT_USING_UART3 is not set
|
||||||
|
# CONFIG_RT_USING_UART4 is not set
|
||||||
|
# CONFIG_RT_USING_UART5 is not set
|
||||||
|
# CONFIG_RT_USING_UART6 is not set
|
||||||
|
# CONFIG_RT_USING_UART7 is not set
|
||||||
|
# CONFIG_RT_USING_UART8 is not set
|
||||||
|
CONFIG_RT_USING_SDRAM=y
|
||||||
|
CONFIG_RT_USING_RTC_HP=y
|
||||||
|
|
|
@ -23,17 +23,66 @@ config SOC_IMXRT1052
|
||||||
select ARCH_ARM_CORTEX_M7
|
select ARCH_ARM_CORTEX_M7
|
||||||
default y
|
default y
|
||||||
|
|
||||||
if RT_USING_SERIAL
|
# RT1050 board select!
|
||||||
config RT_USING_UART1
|
choice
|
||||||
bool "Using RT_USING_UART1"
|
prompt "RT1050 Board select"
|
||||||
default y
|
default BOARD_RT1050_EVK
|
||||||
endif
|
config BOARD_RT1050_EVK
|
||||||
|
bool "RT1050_EVK"
|
||||||
|
config BOARD_RT1050_FIRE
|
||||||
|
bool "RT1050_FIRE"
|
||||||
|
endchoice
|
||||||
|
|
||||||
if RT_USING_RTC
|
if BOARD_RT1050_EVK
|
||||||
config RT_USING_HP_RTC
|
menu "RT1050_EVK Bsp Config"
|
||||||
bool "Using RT_USING_HP_RTC"
|
|
||||||
default n
|
menu "Select uart device"
|
||||||
endif
|
config RT_USING_UART1
|
||||||
|
bool "Using uart1"
|
||||||
|
select RT_USING_SERIAL
|
||||||
|
default y
|
||||||
|
config RT_USING_UART2
|
||||||
|
bool "Using uart2"
|
||||||
|
select RT_USING_SERIAL
|
||||||
|
default n
|
||||||
|
config RT_USING_UART3
|
||||||
|
bool "Using uart3"
|
||||||
|
select RT_USING_SERIAL
|
||||||
|
default n
|
||||||
|
config RT_USING_UART4
|
||||||
|
bool "Using uart4"
|
||||||
|
select RT_USING_SERIAL
|
||||||
|
default n
|
||||||
|
config RT_USING_UART5
|
||||||
|
bool "Using uart5"
|
||||||
|
select RT_USING_SERIAL
|
||||||
|
default n
|
||||||
|
config RT_USING_UART6
|
||||||
|
bool "Using uart6"
|
||||||
|
select RT_USING_SERIAL
|
||||||
|
default n
|
||||||
|
config RT_USING_UART7
|
||||||
|
bool "Using uart7"
|
||||||
|
select RT_USING_SERIAL
|
||||||
|
default n
|
||||||
|
config RT_USING_UART8
|
||||||
|
bool "Using uart8"
|
||||||
|
select RT_USING_SERIAL
|
||||||
|
default n
|
||||||
|
endmenu
|
||||||
|
|
||||||
|
#menu "SDRAM drive support"
|
||||||
|
config RT_USING_SDRAM
|
||||||
|
bool "Using sdram"
|
||||||
|
default y
|
||||||
|
#endmenu
|
||||||
|
|
||||||
|
#menu "RTC drive support"
|
||||||
|
config RT_USING_RTC_HP
|
||||||
|
bool "Using hp rtc"
|
||||||
|
select RT_USING_RTC
|
||||||
|
default n
|
||||||
|
#endmenu
|
||||||
|
|
||||||
if RT_USING_USB_DEVICE
|
if RT_USING_USB_DEVICE
|
||||||
choice
|
choice
|
||||||
|
@ -47,4 +96,59 @@ if RT_USING_USB_DEVICE
|
||||||
endchoice
|
endchoice
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
endmenu
|
||||||
|
endif
|
||||||
|
|
||||||
|
if BOARD_RT1050_FIRE
|
||||||
|
menu "RT1050_FIRE Bsp Config"
|
||||||
|
|
||||||
|
menu "Select uart device"
|
||||||
|
config RT_USING_UART1
|
||||||
|
bool "Using uart1"
|
||||||
|
select RT_USING_SERIAL
|
||||||
|
default y
|
||||||
|
config RT_USING_UART2
|
||||||
|
bool "Using uart2"
|
||||||
|
select RT_USING_SERIAL
|
||||||
|
default n
|
||||||
|
config RT_USING_UART3
|
||||||
|
bool "Using uart3"
|
||||||
|
select RT_USING_SERIAL
|
||||||
|
default n
|
||||||
|
config RT_USING_UART4
|
||||||
|
bool "Using uart4"
|
||||||
|
select RT_USING_SERIAL
|
||||||
|
default n
|
||||||
|
config RT_USING_UART5
|
||||||
|
bool "Using uart5"
|
||||||
|
select RT_USING_SERIAL
|
||||||
|
default n
|
||||||
|
config RT_USING_UART6
|
||||||
|
bool "Using uart6"
|
||||||
|
select RT_USING_SERIAL
|
||||||
|
default n
|
||||||
|
config RT_USING_UART7
|
||||||
|
bool "Using uart7"
|
||||||
|
select RT_USING_SERIAL
|
||||||
|
default n
|
||||||
|
config RT_USING_UART8
|
||||||
|
bool "Using uart8"
|
||||||
|
select RT_USING_SERIAL
|
||||||
|
default n
|
||||||
|
endmenu
|
||||||
|
|
||||||
|
#menu "SDRAM drive support"
|
||||||
|
config RT_USING_SDRAM
|
||||||
|
bool "Using sdram"
|
||||||
|
default y
|
||||||
|
#endmenu
|
||||||
|
|
||||||
|
#menu "RTC drive support"
|
||||||
|
config RT_USING_RTC_HP
|
||||||
|
bool "Using hp rtc"
|
||||||
|
select RT_USING_RTC
|
||||||
|
default n
|
||||||
|
#endmenu
|
||||||
|
|
||||||
|
endmenu
|
||||||
|
endif
|
||||||
|
|
|
@ -38,29 +38,29 @@
|
||||||
|
|
||||||
void dump_clock(void)
|
void dump_clock(void)
|
||||||
{
|
{
|
||||||
rt_kprintf("CPU clock: %d\n", CLOCK_GetFreq(kCLOCK_CpuClk));
|
rt_kprintf("OSC clock : %d\n", CLOCK_GetFreq(kCLOCK_OscClk));
|
||||||
rt_kprintf("AHB clock : %d\n", CLOCK_GetFreq(kCLOCK_AhbClk));
|
rt_kprintf("RTC clock : %d\n", CLOCK_GetFreq(kCLOCK_RtcClk));
|
||||||
rt_kprintf("SEMC clock : %d\n", CLOCK_GetFreq(kCLOCK_SemcClk));
|
rt_kprintf("CPU clock: %d\n", CLOCK_GetFreq(kCLOCK_CpuClk));
|
||||||
rt_kprintf("IPG clock : %d\n", CLOCK_GetFreq(kCLOCK_IpgClk));
|
rt_kprintf("AHB clock : %d\n", CLOCK_GetFreq(kCLOCK_AhbClk));
|
||||||
rt_kprintf("OSC clock selected : %d\n", CLOCK_GetFreq(kCLOCK_OscClk));
|
rt_kprintf("SEMC clock : %d\n", CLOCK_GetFreq(kCLOCK_SemcClk));
|
||||||
rt_kprintf("RTC clock: %d\n", CLOCK_GetFreq(kCLOCK_RtcClk));
|
rt_kprintf("IPG clock : %d\n", CLOCK_GetFreq(kCLOCK_IpgClk));
|
||||||
rt_kprintf("ARMPLLCLK : %d\n", CLOCK_GetFreq(kCLOCK_ArmPllClk));
|
rt_kprintf("ARMPLLCLK(PLL1) : %d\n", CLOCK_GetFreq(kCLOCK_ArmPllClk));
|
||||||
rt_kprintf("USB1PLLCLK : %d\n", CLOCK_GetFreq(kCLOCK_Usb1PllClk));
|
rt_kprintf("SYSPLLCLK(PLL2/528_PLL) : %d\n", CLOCK_GetFreq(kCLOCK_SysPllClk));
|
||||||
rt_kprintf("USB1PLLPDF0CLK : %d\n", CLOCK_GetFreq(kCLOCK_Usb1PllPfd0Clk));
|
rt_kprintf("SYSPLLPDF0CLK : %d\n", CLOCK_GetFreq(kCLOCK_SysPllPfd0Clk));
|
||||||
rt_kprintf("USB1PLLPFD1CLK : %d\n", CLOCK_GetFreq(kCLOCK_Usb1PllPfd1Clk));
|
rt_kprintf("SYSPLLPFD1CLK : %d\n", CLOCK_GetFreq(kCLOCK_SysPllPfd1Clk));
|
||||||
rt_kprintf("USB1PLLPFD2CLK : %d\n", CLOCK_GetFreq(kCLOCK_Usb1PllPfd2Clk));
|
rt_kprintf("SYSPLLPFD2CLK : %d\n", CLOCK_GetFreq(kCLOCK_SysPllPfd2Clk));
|
||||||
rt_kprintf("USB1PLLPFD3CLK : %d\n", CLOCK_GetFreq(kCLOCK_Usb1PllPfd3Clk));
|
rt_kprintf("SYSPLLPFD3CLK : %d\n", CLOCK_GetFreq(kCLOCK_SysPllPfd3Clk));
|
||||||
rt_kprintf("USB2PLLCLK : %d\n", CLOCK_GetFreq(kCLOCK_Usb2PllClk));
|
rt_kprintf("USB1PLLCLK(PLL3) : %d\n", CLOCK_GetFreq(kCLOCK_Usb1PllClk));
|
||||||
rt_kprintf("SYSPLLCLK : %d\n", CLOCK_GetFreq(kCLOCK_SysPllClk));
|
rt_kprintf("USB1PLLPDF0CLK : %d\n", CLOCK_GetFreq(kCLOCK_Usb1PllPfd0Clk));
|
||||||
rt_kprintf("SYSPLLPDF0CLK : %d\n", CLOCK_GetFreq(kCLOCK_SysPllPfd0Clk));
|
rt_kprintf("USB1PLLPFD1CLK : %d\n", CLOCK_GetFreq(kCLOCK_Usb1PllPfd1Clk));
|
||||||
rt_kprintf("SYSPLLPFD1CLK : %d\n", CLOCK_GetFreq(kCLOCK_SysPllPfd1Clk));
|
rt_kprintf("USB1PLLPFD2CLK : %d\n", CLOCK_GetFreq(kCLOCK_Usb1PllPfd2Clk));
|
||||||
rt_kprintf("SYSPLLPFD2CLK : %d\n", CLOCK_GetFreq(kCLOCK_SysPllPfd2Clk));
|
rt_kprintf("USB1PLLPFD3CLK : %d\n", CLOCK_GetFreq(kCLOCK_Usb1PllPfd3Clk));
|
||||||
rt_kprintf("SYSPLLPFD3CLK : %d\n", CLOCK_GetFreq(kCLOCK_SysPllPfd3Clk));
|
rt_kprintf("Audio PLLCLK(PLL4) : %d\n", CLOCK_GetFreq(kCLOCK_AudioPllClk));
|
||||||
rt_kprintf("Enet PLLCLK ref_enetpll0 : %d\n", CLOCK_GetFreq(kCLOCK_EnetPll0Clk));
|
rt_kprintf("Video PLLCLK(PLL5) : %d\n", CLOCK_GetFreq(kCLOCK_VideoPllClk));
|
||||||
rt_kprintf("Enet PLLCLK ref_enetpll1 : %d\n", CLOCK_GetFreq(kCLOCK_EnetPll1Clk));
|
rt_kprintf("Enet PLLCLK ref_enetpll0 : %d\n", CLOCK_GetFreq(kCLOCK_EnetPll0Clk));
|
||||||
rt_kprintf("Enet PLLCLK ref_enetpll2 : %d\n", CLOCK_GetFreq(kCLOCK_EnetPll2Clk));
|
rt_kprintf("Enet PLLCLK ref_enetpll1 : %d\n", CLOCK_GetFreq(kCLOCK_EnetPll1Clk));
|
||||||
rt_kprintf("Audio PLLCLK : %d\n", CLOCK_GetFreq(kCLOCK_AudioPllClk));
|
rt_kprintf("Enet PLLCLK ref_enetpll2 : %d\n", CLOCK_GetFreq(kCLOCK_EnetPll2Clk));
|
||||||
rt_kprintf("Video PLLCLK : %d\n", CLOCK_GetFreq(kCLOCK_VideoPllClk));
|
rt_kprintf("USB2PLLCLK(PLL7) : %d\n", CLOCK_GetFreq(kCLOCK_Usb2PllClk));
|
||||||
}
|
}
|
||||||
|
|
||||||
void dump_cc_info(void)
|
void dump_cc_info(void)
|
||||||
|
|
|
@ -8,35 +8,42 @@ cwd = os.path.join(str(Dir('#')), 'drivers')
|
||||||
src = Split("""
|
src = Split("""
|
||||||
board.c
|
board.c
|
||||||
drv_uart.c
|
drv_uart.c
|
||||||
hyper_flash_boot.c
|
|
||||||
drv_sdram.c
|
|
||||||
""")
|
""")
|
||||||
|
|
||||||
CPPPATH = [cwd]
|
CPPPATH = [cwd]
|
||||||
CPPDEFINES = []
|
CPPDEFINES = []
|
||||||
|
|
||||||
|
# add sdram driver code
|
||||||
|
if GetDepend('RT_USING_SDRAM'):
|
||||||
|
src = src + ['./drv_sdram.c']
|
||||||
|
|
||||||
if GetDepend('RT_USING_PIN'):
|
if GetDepend('RT_USING_PIN'):
|
||||||
src += ['drv_pin.c']
|
src += ['drv_pin.c']
|
||||||
|
|
||||||
if GetDepend('RT_USING_HP_RTC'):
|
# add rtc driver code
|
||||||
src += ['drv_hp_rtc.c']
|
if GetDepend('RT_USING_RTC_HP'):
|
||||||
|
src = src + ['./drv_rtc.c']
|
||||||
|
|
||||||
if GetDepend('RT_USING_LWIP'):
|
if GetDepend('BOARD_RT1050_EVK'):
|
||||||
src += ['drv_eth.c', 'fsl_phy.c']
|
src += ['hyper_flash_boot.c']
|
||||||
CPPDEFINES += ['FSL_FEATURE_PHYKSZ8081_USE_RMII50M_MODE']
|
|
||||||
|
if GetDepend('RT_USING_LWIP'):
|
||||||
if GetDepend('RT_USING_SDIO'):
|
src += ['drv_eth.c', 'fsl_phy.c']
|
||||||
src += ['drv_sdio.c']
|
CPPDEFINES += ['FSL_FEATURE_PHYKSZ8081_USE_RMII50M_MODE']
|
||||||
if GetDepend('RT_USING_USB_DEVICE'):
|
|
||||||
src += Glob('usb/phy/*.c')
|
if GetDepend('RT_USING_SDIO'):
|
||||||
CPPDEFINES += ['ENDIANNESS']
|
src += ['drv_sdio.c']
|
||||||
|
|
||||||
if GetDepend('RT_USING_USB_DEVICE'):
|
if GetDepend('RT_USING_USB_DEVICE'):
|
||||||
src += ['drv_usbd.c']
|
src += Glob('usb/phy/*.c')
|
||||||
src += Glob('usb/device/*.c')
|
CPPDEFINES += ['ENDIANNESS']
|
||||||
|
|
||||||
if GetDepend('RT_USING_RTGUI') or GetDepend('PKG_USING_GUIENGINE'):
|
if GetDepend('RT_USING_USB_DEVICE'):
|
||||||
src += ['drv_lcd.c', 'drv_ft5406.c', 'drv_i2c.c']
|
src += ['drv_usbd.c']
|
||||||
|
src += Glob('usb/device/*.c')
|
||||||
|
|
||||||
|
if GetDepend('RT_USING_RTGUI') or GetDepend('PKG_USING_GUIENGINE'):
|
||||||
|
src += ['drv_lcd.c', 'drv_ft5406.c', 'drv_i2c.c']
|
||||||
|
|
||||||
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES=CPPDEFINES)
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH, CPPDEFINES=CPPDEFINES)
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,9 @@
|
||||||
#include "board.h"
|
#include "board.h"
|
||||||
#include "drv_uart.h"
|
#include "drv_uart.h"
|
||||||
|
|
||||||
|
#if defined(RT_USING_SDRAM) && defined(RT_USING_MEMHEAP_AS_HEAP)
|
||||||
static struct rt_memheap system_heap;
|
static struct rt_memheap system_heap;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ARM PLL configuration for RUN mode */
|
/* ARM PLL configuration for RUN mode */
|
||||||
const clock_arm_pll_config_t armPllConfig = { .loopDivider = 100U };
|
const clock_arm_pll_config_t armPllConfig = { .loopDivider = 100U };
|
||||||
|
@ -162,12 +164,14 @@ void rt_lowlevel_init(void)
|
||||||
{
|
{
|
||||||
BOARD_ConfigMPU();
|
BOARD_ConfigMPU();
|
||||||
|
|
||||||
|
#if defined(RT_USING_SDRAM)
|
||||||
extern int imxrt_sdram_init(void);
|
extern int imxrt_sdram_init(void);
|
||||||
imxrt_sdram_init();
|
imxrt_sdram_init();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function will initial LPC8XX board.
|
* This function will initial rt1050 board.
|
||||||
*/
|
*/
|
||||||
void rt_hw_board_init()
|
void rt_hw_board_init()
|
||||||
{
|
{
|
||||||
|
@ -184,11 +188,18 @@ void rt_hw_board_init()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef RT_USING_HEAP
|
#ifdef RT_USING_HEAP
|
||||||
rt_kprintf("sdram heap, begin: 0x%p, end: 0x%p\n", SDRAM_BEGIN, SDRAM_END);
|
|
||||||
rt_system_heap_init((void*)SDRAM_BEGIN, (void*)SDRAM_END);
|
|
||||||
|
|
||||||
rt_kprintf("sram heap, begin: 0x%p, end: 0x%p\n", HEAP_BEGIN, HEAP_END);
|
#if defined(RT_USING_SDRAM) && defined(RT_USING_MEMHEAP_AS_HEAP)
|
||||||
rt_memheap_init(&system_heap, "sram", (void *)HEAP_BEGIN, HEAP_SIZE);
|
rt_kprintf("sdram heap, begin: 0x%p, end: 0x%p\n", SDRAM_BEGIN, SDRAM_END);
|
||||||
|
rt_system_heap_init((void *)SDRAM_BEGIN, (void*)SDRAM_END);
|
||||||
|
|
||||||
|
rt_kprintf("sram heap, begin: 0x%p, end: 0x%p\n", HEAP_BEGIN, HEAP_END);
|
||||||
|
rt_memheap_init(&system_heap, "sram", (void *)HEAP_BEGIN, HEAP_SIZE);
|
||||||
|
#else
|
||||||
|
rt_kprintf("sram heap, begin: 0x%p, end: 0x%p\n", HEAP_BEGIN, HEAP_END);
|
||||||
|
rt_system_heap_init((void *)HEAP_BEGIN, (void*)HEAP_END);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* File : drv_hp_rtc.c
|
* File : drv_rtc.c
|
||||||
* This file is part of RT-Thread RTOS
|
* This file is part of RT-Thread RTOS
|
||||||
* COPYRIGHT (C) 2006-2013, RT-Thread Development Team
|
* COPYRIGHT (C) 2006-2013, RT-Thread Development Team
|
||||||
*
|
*
|
||||||
|
@ -11,11 +11,12 @@
|
||||||
* Date Author Notes
|
* Date Author Notes
|
||||||
* 2018-03-15 Liuguang the first version.
|
* 2018-03-15 Liuguang the first version.
|
||||||
*/
|
*/
|
||||||
#include "drv_hp_rtc.h"
|
#include "drv_rtc.h"
|
||||||
#include <time.h>
|
|
||||||
#include "fsl_common.h"
|
#include "fsl_common.h"
|
||||||
#include "fsl_snvs_hp.h"
|
#include "fsl_snvs_hp.h"
|
||||||
#include "fsl_snvs_lp.h"
|
#include "fsl_snvs_lp.h"
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
#ifdef RT_USING_RTC
|
#ifdef RT_USING_RTC
|
||||||
|
|
||||||
|
@ -35,7 +36,7 @@ static time_t get_timestamp(void)
|
||||||
tm_new.tm_hour = rtcDate.hour;
|
tm_new.tm_hour = rtcDate.hour;
|
||||||
|
|
||||||
tm_new.tm_mday = rtcDate.day;
|
tm_new.tm_mday = rtcDate.day;
|
||||||
tm_new.tm_mon = rtcDate.month - 1;
|
tm_new.tm_mon = rtcDate.month - 1;
|
||||||
tm_new.tm_year = rtcDate.year - 1900;
|
tm_new.tm_year = rtcDate.year - 1900;
|
||||||
|
|
||||||
return mktime(&tm_new);
|
return mktime(&tm_new);
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* File : drv_hp_rtc.h
|
* File : drv_rtc.h
|
||||||
* This file is part of RT-Thread RTOS
|
* This file is part of RT-Thread RTOS
|
||||||
* COPYRIGHT (C) 2006-2013, RT-Thread Development Team
|
* COPYRIGHT (C) 2006-2013, RT-Thread Development Team
|
||||||
*
|
*
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -8,9 +8,7 @@
|
||||||
|
|
||||||
#define RT_NAME_MAX 8
|
#define RT_NAME_MAX 8
|
||||||
#define RT_ALIGN_SIZE 4
|
#define RT_ALIGN_SIZE 4
|
||||||
/* RT_THREAD_PRIORITY_8 is not set */
|
|
||||||
#define RT_THREAD_PRIORITY_32
|
#define RT_THREAD_PRIORITY_32
|
||||||
/* RT_THREAD_PRIORITY_256 is not set */
|
|
||||||
#define RT_THREAD_PRIORITY_MAX 32
|
#define RT_THREAD_PRIORITY_MAX 32
|
||||||
#define RT_TICK_PER_SECOND 100
|
#define RT_TICK_PER_SECOND 100
|
||||||
#define RT_DEBUG
|
#define RT_DEBUG
|
||||||
|
@ -19,7 +17,6 @@
|
||||||
#define RT_DEBUG_THREAD 0
|
#define RT_DEBUG_THREAD 0
|
||||||
#define RT_USING_HOOK
|
#define RT_USING_HOOK
|
||||||
#define IDLE_THREAD_STACK_SIZE 256
|
#define IDLE_THREAD_STACK_SIZE 256
|
||||||
/* RT_USING_TIMER_SOFT is not set */
|
|
||||||
|
|
||||||
/* Inter-Thread communication */
|
/* Inter-Thread communication */
|
||||||
|
|
||||||
|
@ -28,26 +25,19 @@
|
||||||
#define RT_USING_EVENT
|
#define RT_USING_EVENT
|
||||||
#define RT_USING_MAILBOX
|
#define RT_USING_MAILBOX
|
||||||
#define RT_USING_MESSAGEQUEUE
|
#define RT_USING_MESSAGEQUEUE
|
||||||
/* RT_USING_SIGNALS is not set */
|
|
||||||
|
|
||||||
/* Memory Management */
|
/* Memory Management */
|
||||||
|
|
||||||
/* RT_USING_MEMPOOL is not set */
|
|
||||||
#define RT_USING_MEMHEAP
|
#define RT_USING_MEMHEAP
|
||||||
/* RT_USING_NOHEAP is not set */
|
|
||||||
/* RT_USING_SMALL_MEM is not set */
|
|
||||||
/* RT_USING_SLAB is not set */
|
|
||||||
#define RT_USING_MEMHEAP_AS_HEAP
|
#define RT_USING_MEMHEAP_AS_HEAP
|
||||||
#define RT_USING_HEAP
|
#define RT_USING_HEAP
|
||||||
|
|
||||||
/* Kernel Device Object */
|
/* Kernel Device Object */
|
||||||
|
|
||||||
#define RT_USING_DEVICE
|
#define RT_USING_DEVICE
|
||||||
/* RT_USING_INTERRUPT_INFO is not set */
|
|
||||||
#define RT_USING_CONSOLE
|
#define RT_USING_CONSOLE
|
||||||
#define RT_CONSOLEBUF_SIZE 128
|
#define RT_CONSOLEBUF_SIZE 128
|
||||||
#define RT_CONSOLE_DEVICE_NAME "uart1"
|
#define RT_CONSOLE_DEVICE_NAME "uart1"
|
||||||
/* RT_USING_MODULE is not set */
|
|
||||||
#define ARCH_ARM
|
#define ARCH_ARM
|
||||||
#define ARCH_ARM_CORTEX_M
|
#define ARCH_ARM_CORTEX_M
|
||||||
#define ARCH_ARM_CORTEX_M7
|
#define ARCH_ARM_CORTEX_M7
|
||||||
|
@ -60,7 +50,6 @@
|
||||||
|
|
||||||
/* C++ features */
|
/* C++ features */
|
||||||
|
|
||||||
/* RT_USING_CPLUSPLUS is not set */
|
|
||||||
|
|
||||||
/* Command shell */
|
/* Command shell */
|
||||||
|
|
||||||
|
@ -73,10 +62,8 @@
|
||||||
#define FINSH_THREAD_PRIORITY 20
|
#define FINSH_THREAD_PRIORITY 20
|
||||||
#define FINSH_THREAD_STACK_SIZE 4096
|
#define FINSH_THREAD_STACK_SIZE 4096
|
||||||
#define FINSH_CMD_SIZE 80
|
#define FINSH_CMD_SIZE 80
|
||||||
/* FINSH_USING_AUTH is not set */
|
|
||||||
#define FINSH_USING_MSH
|
#define FINSH_USING_MSH
|
||||||
#define FINSH_USING_MSH_DEFAULT
|
#define FINSH_USING_MSH_DEFAULT
|
||||||
/* FINSH_USING_MSH_ONLY is not set */
|
|
||||||
|
|
||||||
/* Device virtual file system */
|
/* Device virtual file system */
|
||||||
|
|
||||||
|
@ -91,67 +78,38 @@
|
||||||
|
|
||||||
#define RT_DFS_ELM_CODE_PAGE 437
|
#define RT_DFS_ELM_CODE_PAGE 437
|
||||||
#define RT_DFS_ELM_WORD_ACCESS
|
#define RT_DFS_ELM_WORD_ACCESS
|
||||||
/* RT_DFS_ELM_USE_LFN_0 is not set */
|
|
||||||
/* RT_DFS_ELM_USE_LFN_1 is not set */
|
|
||||||
/* RT_DFS_ELM_USE_LFN_2 is not set */
|
|
||||||
#define RT_DFS_ELM_USE_LFN_3
|
#define RT_DFS_ELM_USE_LFN_3
|
||||||
#define RT_DFS_ELM_USE_LFN 3
|
#define RT_DFS_ELM_USE_LFN 3
|
||||||
#define RT_DFS_ELM_MAX_LFN 255
|
#define RT_DFS_ELM_MAX_LFN 255
|
||||||
#define RT_DFS_ELM_DRIVES 2
|
#define RT_DFS_ELM_DRIVES 2
|
||||||
#define RT_DFS_ELM_MAX_SECTOR_SIZE 512
|
#define RT_DFS_ELM_MAX_SECTOR_SIZE 512
|
||||||
/* RT_DFS_ELM_USE_ERASE is not set */
|
|
||||||
#define RT_DFS_ELM_REENTRANT
|
#define RT_DFS_ELM_REENTRANT
|
||||||
#define RT_USING_DFS_DEVFS
|
#define RT_USING_DFS_DEVFS
|
||||||
/* RT_USING_DFS_NET is not set */
|
|
||||||
/* RT_USING_DFS_ROMFS is not set */
|
|
||||||
/* RT_USING_DFS_RAMFS is not set */
|
|
||||||
/* RT_USING_DFS_UFFS is not set */
|
|
||||||
/* RT_USING_DFS_JFFS2 is not set */
|
|
||||||
/* RT_USING_DFS_NFS is not set */
|
|
||||||
|
|
||||||
/* Device Drivers */
|
/* Device Drivers */
|
||||||
|
|
||||||
#define RT_USING_DEVICE_IPC
|
#define RT_USING_DEVICE_IPC
|
||||||
#define RT_USING_SERIAL
|
#define RT_USING_SERIAL
|
||||||
/* RT_USING_CAN is not set */
|
|
||||||
/* RT_USING_HWTIMER is not set */
|
|
||||||
/* RT_USING_CPUTIME is not set */
|
|
||||||
#define RT_USING_I2C
|
#define RT_USING_I2C
|
||||||
#define RT_USING_I2C_BITOPS
|
#define RT_USING_I2C_BITOPS
|
||||||
#define RT_USING_PIN
|
#define RT_USING_PIN
|
||||||
/* RT_USING_MTD_NOR is not set */
|
|
||||||
/* RT_USING_MTD_NAND is not set */
|
|
||||||
#define RT_USING_RTC
|
#define RT_USING_RTC
|
||||||
/* RT_USING_SOFT_RTC is not set */
|
|
||||||
/* RTC_SYNC_USING_NTP is not set */
|
|
||||||
#define RT_USING_SDIO
|
#define RT_USING_SDIO
|
||||||
/* RT_USING_SPI is not set */
|
|
||||||
/* RT_USING_WDT is not set */
|
|
||||||
/* RT_USING_WIFI is not set */
|
|
||||||
|
|
||||||
/* Using USB */
|
/* Using USB */
|
||||||
|
|
||||||
/* RT_USING_USB_HOST is not set */
|
|
||||||
/* RT_USING_USB_DEVICE is not set */
|
|
||||||
|
|
||||||
/* POSIX layer and C standard library */
|
/* POSIX layer and C standard library */
|
||||||
|
|
||||||
#define RT_USING_LIBC
|
#define RT_USING_LIBC
|
||||||
/* RT_USING_PTHREADS is not set */
|
|
||||||
/* RT_USING_POSIX is not set */
|
|
||||||
/* HAVE_SYS_SIGNALS is not set */
|
|
||||||
|
|
||||||
/* Network stack */
|
/* Network stack */
|
||||||
|
|
||||||
/* light weight TCP/IP stack */
|
/* light weight TCP/IP stack */
|
||||||
|
|
||||||
#define RT_USING_LWIP
|
#define RT_USING_LWIP
|
||||||
/* RT_USING_LWIP141 is not set */
|
|
||||||
#define RT_USING_LWIP202
|
#define RT_USING_LWIP202
|
||||||
/* RT_USING_LWIP_IPV6 is not set */
|
|
||||||
/* RT_LWIP_IGMP is not set */
|
|
||||||
#define RT_LWIP_ICMP
|
#define RT_LWIP_ICMP
|
||||||
/* RT_LWIP_SNMP is not set */
|
|
||||||
#define RT_LWIP_DNS
|
#define RT_LWIP_DNS
|
||||||
#define RT_LWIP_DHCP
|
#define RT_LWIP_DHCP
|
||||||
#define IP_SOF_BROADCAST 1
|
#define IP_SOF_BROADCAST 1
|
||||||
|
@ -164,8 +122,6 @@
|
||||||
#define RT_LWIP_MSKADDR "255.255.255.0"
|
#define RT_LWIP_MSKADDR "255.255.255.0"
|
||||||
#define RT_LWIP_UDP
|
#define RT_LWIP_UDP
|
||||||
#define RT_LWIP_TCP
|
#define RT_LWIP_TCP
|
||||||
/* RT_LWIP_RAW is not set */
|
|
||||||
/* RT_LWIP_PPP is not set */
|
|
||||||
#define RT_MEMP_NUM_NETCONN 8
|
#define RT_MEMP_NUM_NETCONN 8
|
||||||
#define RT_LWIP_PBUF_NUM 16
|
#define RT_LWIP_PBUF_NUM 16
|
||||||
#define RT_LWIP_RAW_PCB_NUM 4
|
#define RT_LWIP_RAW_PCB_NUM 4
|
||||||
|
@ -180,33 +136,24 @@
|
||||||
#define RT_LWIP_ETHTHREAD_PRIORITY 12
|
#define RT_LWIP_ETHTHREAD_PRIORITY 12
|
||||||
#define RT_LWIP_ETHTHREAD_STACKSIZE 1024
|
#define RT_LWIP_ETHTHREAD_STACKSIZE 1024
|
||||||
#define RT_LWIP_ETHTHREAD_MBOX_SIZE 8
|
#define RT_LWIP_ETHTHREAD_MBOX_SIZE 8
|
||||||
/* RT_LWIP_REASSEMBLY_FRAG is not set */
|
|
||||||
#define LWIP_NETIF_STATUS_CALLBACK 1
|
#define LWIP_NETIF_STATUS_CALLBACK 1
|
||||||
#define SO_REUSE 1
|
#define SO_REUSE 1
|
||||||
#define LWIP_SO_RCVTIMEO 1
|
#define LWIP_SO_RCVTIMEO 1
|
||||||
#define LWIP_SO_SNDTIMEO 1
|
#define LWIP_SO_SNDTIMEO 1
|
||||||
#define LWIP_SO_RCVBUF 1
|
#define LWIP_SO_RCVBUF 1
|
||||||
/* RT_LWIP_NETIF_LOOPBACK is not set */
|
|
||||||
#define LWIP_NETIF_LOOPBACK 0
|
#define LWIP_NETIF_LOOPBACK 0
|
||||||
|
|
||||||
/* Modbus master and slave stack */
|
/* Modbus master and slave stack */
|
||||||
|
|
||||||
/* RT_USING_MODBUS is not set */
|
|
||||||
/* LWIP_USING_DHCPD is not set */
|
|
||||||
|
|
||||||
/* VBUS(Virtual Software BUS) */
|
/* VBUS(Virtual Software BUS) */
|
||||||
|
|
||||||
/* RT_USING_VBUS is not set */
|
|
||||||
|
|
||||||
/* Utilities */
|
/* Utilities */
|
||||||
|
|
||||||
/* RT_USING_LOGTRACE is not set */
|
|
||||||
/* RT_USING_RYM is not set */
|
|
||||||
|
|
||||||
/* ARM CMSIS */
|
/* ARM CMSIS */
|
||||||
|
|
||||||
/* RT_USING_CMSIS_OS is not set */
|
|
||||||
/* RT_USING_RTT_CMSIS is not set */
|
|
||||||
|
|
||||||
/* RT-Thread online packages */
|
/* RT-Thread online packages */
|
||||||
|
|
||||||
|
@ -214,72 +161,44 @@
|
||||||
|
|
||||||
/* RT-Thread GUI Engine */
|
/* RT-Thread GUI Engine */
|
||||||
|
|
||||||
/* PKG_USING_GUIENGINE is not set */
|
|
||||||
/* PKG_USING_PERSIMMON is not set */
|
|
||||||
/* PKG_USING_LWEXT4 is not set */
|
|
||||||
/* PKG_USING_PARTITION is not set */
|
|
||||||
/* PKG_USING_SQLITE is not set */
|
|
||||||
/* PKG_USING_RTI is not set */
|
|
||||||
|
|
||||||
/* IoT - internet of things */
|
/* IoT - internet of things */
|
||||||
|
|
||||||
/* PKG_USING_PAHOMQTT is not set */
|
|
||||||
/* PKG_USING_WEBCLIENT is not set */
|
|
||||||
/* PKG_USING_MONGOOSE is not set */
|
|
||||||
/* PKG_USING_WEBTERMINAL is not set */
|
|
||||||
/* PKG_USING_CJSON is not set */
|
|
||||||
/* PKG_USING_LJSON is not set */
|
|
||||||
/* PKG_USING_EZXML is not set */
|
|
||||||
/* PKG_USING_NANOPB is not set */
|
|
||||||
/* PKG_USING_GAGENT_CLOUD is not set */
|
|
||||||
|
|
||||||
/* Wi-Fi */
|
/* Wi-Fi */
|
||||||
|
|
||||||
/* Marvell WiFi */
|
/* Marvell WiFi */
|
||||||
|
|
||||||
/* PKG_USING_WLANMARVELL is not set */
|
|
||||||
|
|
||||||
/* Wiced WiFi */
|
/* Wiced WiFi */
|
||||||
|
|
||||||
/* PKG_USING_WLAN_WICED is not set */
|
|
||||||
/* PKG_USING_COAP is not set */
|
|
||||||
/* PKG_USING_NOPOLL is not set */
|
|
||||||
/* PKG_USING_NETUTILS is not set */
|
|
||||||
|
|
||||||
/* security packages */
|
/* security packages */
|
||||||
|
|
||||||
/* PKG_USING_MBEDTLS is not set */
|
|
||||||
/* PKG_USING_libsodium is not set */
|
|
||||||
/* PKG_USING_TINYCRYPT is not set */
|
|
||||||
|
|
||||||
/* language packages */
|
/* language packages */
|
||||||
|
|
||||||
/* PKG_USING_JERRYSCRIPT is not set */
|
|
||||||
/* PKG_USING_MICROPYTHON is not set */
|
|
||||||
|
|
||||||
/* multimedia packages */
|
/* multimedia packages */
|
||||||
|
|
||||||
/* PKG_USING_OPENMV is not set */
|
|
||||||
|
|
||||||
/* tools packages */
|
/* tools packages */
|
||||||
|
|
||||||
/* PKG_USING_CMBACKTRACE is not set */
|
|
||||||
/* PKG_USING_EASYLOGGER is not set */
|
|
||||||
/* PKG_USING_SYSTEMVIEW is not set */
|
|
||||||
/* PKG_USING_IPERF is not set */
|
|
||||||
|
|
||||||
/* miscellaneous packages */
|
/* miscellaneous packages */
|
||||||
|
|
||||||
/* PKG_USING_FASTLZ is not set */
|
|
||||||
/* PKG_USING_MINILZO is not set */
|
|
||||||
/* PKG_USING_QUICKLZ is not set */
|
|
||||||
|
|
||||||
/* example package: hello */
|
/* example package: hello */
|
||||||
|
|
||||||
/* PKG_USING_HELLO is not set */
|
|
||||||
/* PKG_USING_MULTIBUTTON is not set */
|
|
||||||
#define SOC_IMXRT1052
|
#define SOC_IMXRT1052
|
||||||
|
#define BOARD_RT1050_EVK
|
||||||
|
|
||||||
|
/* RT1050_EVK Bsp Config */
|
||||||
|
|
||||||
|
/* Select uart device */
|
||||||
|
|
||||||
#define RT_USING_UART1
|
#define RT_USING_UART1
|
||||||
#define RT_USING_HP_RTC
|
#define RT_USING_SDRAM
|
||||||
|
#define RT_USING_RTC_HP
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue