| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584 |
- #ifndef _BOARD_H
- #define _BOARD_H
- /********** display configuration **********/
- #define LCD_INTERFACE_TTL 0
- #define LCD_INTERFACE_LVDS 1
- #define LCD_INTERFACE_CPU 2
- #define LCD_INTERFACE_MIPI 3
- #define LCD_WIRING_MODE_RGB 0
- #define LCD_WIRING_MODE_RBG 1
- #define LCD_WIRING_MODE_GRB 2
- #define LCD_WIRING_MODE_GBR 3
- #define LCD_WIRING_MODE_BRG 4
- #define LCD_WIRING_MODE_BGR 5
- #define LCD_WIRING_BIT_ORDER_MSB 0
- #define LCD_WIRING_BIT_ORDER_LSB 1
- #define LVDS_PANEL_FORMAT_VESA 0
- #define LVDS_PANEL_FORMAT_JEDIA 1
- #define LVDS_PANEL_DATA_8BIT 0
- #define LVDS_PANEL_DATA_6BIT 1
- #define LVDS_CLKEDGE_POSITIVE 0
- #define LVDS_CLKEDGE_NEGATIVE 1
- #define CPU_PANEL_18BIT_MODE 0
- #define CPU_PANEL_16BIT_MODE 1
- #define CPU_PANEL_9BIT_MODE 2
- #define CPU_PANEL_8BIT_MODE 3
- #define LCD_ROTATE_ANGLE_0 0
- #define LCD_ROTATE_ANGLE_90 1
- #define LCD_ROTATE_ANGLE_180 2
- #define LCD_ROTATE_ANGLE_270 3
- #define LCD_H_FLIP 0 //水平镜像
- #define LCD_V_FLIP 0 //垂直镜像
- //#define LCD_CLK_INVERSE //LCD时钟极性反向
- #define LCD_ROTATE_ANGLE LCD_ROTATE_ANGLE_0
- #define LCD_WIDTH 1920
- #define LCD_HEIGHT 720
- #define LCD_BPP 32
- #define LCD_INTERFACE_TYPE LCD_INTERFACE_LVDS
- #define DOUBLE_LVDS_ENABLE 1
- #if !DOUBLE_LVDS_ENABLE
- #define SINGLE_LVDS_CH0_EN 1
- #define SINGLE_LVDS_CH1_EN 0
- #endif
- #if LCD_INTERFACE_TYPE == LCD_INTERFACE_TTL
- #define LCD_WIRING_MODE LCD_WIRING_MODE_RGB
- //#define LCD_WIRING_BIT_ORDER LCD_WIRING_BIT_ORDER_LSB
- #define LCD_WIRING_BIT_ORDER LCD_WIRING_BIT_ORDER_MSB
- #elif LCD_INTERFACE_TYPE == LCD_INTERFACE_LVDS
- #define LCD_WIRING_MODE LCD_WIRING_MODE_RGB
- #define LCD_WIRING_BIT_ORDER LCD_WIRING_BIT_ORDER_MSB
- #define LVDS_PANEL_FORMAT LVDS_PANEL_FORMAT_VESA
- #define LVDS_PANEL_DATA LVDS_PANEL_DATA_8BIT
- #define LVDS_CLKEDGE LVDS_CLKEDGE_POSITIVE
- #define LVDS_SCREEN_RST_GPIO 74
- #elif LCD_INTERFACE_TYPE == LCD_INTERFACE_CPU
- #define CPU_PANEL_DATA CPU_PANEL_8BIT_MODE
- #elif LCD_INTERFACE_TYPE == LCD_INTERFACE_MIPI
- #define LCD_WIRING_MODE LCD_WIRING_MODE_RGB
- #define LCD_WIRING_BIT_ORDER LCD_WIRING_BIT_ORDER_MSB
- #endif
- #define FB_SIZE (LCD_WIDTH * LCD_HEIGHT * LCD_BPP / 8)
- #define VIDEO_DISPLAY_WIDTH ((LCD_WIDTH + 15) & (~0xF))
- #define VIDEO_DISPLAY_HEIGHT ((LCD_HEIGHT + 15) & (~0xF))
- #define VIDEO_DISPLAY_BUF_NUM 2
- #if (LCD_WIDTH == 1024 && LCD_HEIGHT == 600)
- #define LCD_TIMING_VBP 1
- #define LCD_TIMING_VFP 1
- #define LCD_TIMING_VSW 30
- #define LCD_TIMING_HBP 100
- #define LCD_TIMING_HFP 100
- #define LCD_TIMING_HSW 370
- #define LCD_CLK_FREQ 50000000
- #elif (LCD_WIDTH == 1920 && LCD_HEIGHT == 720)
- #define LCD_TIMING_VBP 11
- #define LCD_TIMING_VFP 14
- #define LCD_TIMING_VSW 7
- #define LCD_TIMING_HBP 38*2
- #define LCD_TIMING_HFP 30*2
- #define LCD_TIMING_HSW 36*2
- #define LCD_CLK_FREQ 96000000
- #elif (LCD_WIDTH == 800 && LCD_HEIGHT == 480)
- #define LCD_TIMING_VBP 1
- #define LCD_TIMING_VFP 1
- #define LCD_TIMING_VSW 30
- #define LCD_TIMING_HBP 50
- #define LCD_TIMING_HFP 50
- #define LCD_TIMING_HSW 180
- #define LCD_CLK_FREQ 35000000
- #elif (LCD_WIDTH == 1280 && LCD_HEIGHT == 720)
- #define LCD_TIMING_VBP 5
- #define LCD_TIMING_VFP 65
- #define LCD_TIMING_VSW 2
- #define LCD_TIMING_HBP 16
- #define LCD_TIMING_HFP 42
- #define LCD_TIMING_HSW 2
- #define LCD_CLK_FREQ 60000000
- #elif (LCD_WIDTH == 1280 && LCD_HEIGHT == 480)
- #define LCD_TIMING_VBP 5
- #define LCD_TIMING_VFP 8
- #define LCD_TIMING_VSW 3
- #define LCD_TIMING_HBP 16
- #define LCD_TIMING_HFP 28 //26
- #define LCD_TIMING_HSW 12
- #define LCD_CLK_FREQ 40000000
- #elif (LCD_WIDTH == 480 && LCD_HEIGHT == 1280)
- #define LCD_TIMING_VBP 6// 14
- #define LCD_TIMING_VFP 6// 16
- #define LCD_TIMING_VSW 16// 2
- #define LCD_TIMING_HBP 16
- #define LCD_TIMING_HFP 36
- #define LCD_TIMING_HSW 26
- #define LCD_CLK_FREQ 50000000
- #else
- #error "no lcd timing configuraion."
- #endif
- /*******************************************/
- /************ adc configuration ************/
- //#define ADC_TOUCH
- //#define ADC_KEY
- /*******************************************/
- /******* video in configuration *******/
- #define VIDEO_DECODER_RN6752
- //#define VIDEO_DECODER_MIPI
- //#define VIDEO_DECODER_ARK7116M
- //#define VIDEO_DECODER_ARK7116
- #define VIN_CVBS_PAL 0
- #define VIN_CVBS_NTSC 1
- #define VIN_AHD_720P_25 2
- #define VIN_AHD_720P_30 3
- #define VIN_AHD_1080P_25 4
- #define VIN_AHD_1080P_30 5
- #define VIDEO_IN_FORMAT VIN_AHD_720P_25//VIN_CVBS_NTSC
- #if VIDEO_IN_FORMAT == VIN_CVBS_PAL
- #define VIN_WIDTH 720
- #define VIN_HEIGHT 288
- #elif VIDEO_IN_FORMAT == VIN_CVBS_NTSC
- #define VIN_WIDTH 720
- #define VIN_HEIGHT 240
- #elif VIDEO_IN_FORMAT == VIN_AHD_720P_25 || VIDEO_IN_FORMAT == VIN_AHD_720P_30
- #define VIN_WIDTH 1280
- #define VIN_HEIGHT 720
- #elif VIDEO_IN_FORMAT == VIN_AHD_1080P_25 || VIDEO_IN_FORMAT == VIN_AHD_1080P_30
- #define VIN_WIDTH 1920
- #define VIN_HEIGHT 1080
- #endif
- #if VIN_WIDTH * VIN_HEIGHT > 0x96000
- #define VIN_SMALL_MEM
- #endif
- /*******************************************/
- /************ carback configuration ********/
- //#define CARBACK_DETECT
- /*******************************************/
- /********* touchscreen configuration *******/
- //#define TP_SUPPORT
- /********* wrap configuration *******/
- //#define WRAP_SUPPORT
- #ifdef TP_SUPPORT
- /* Select one tp IC */
- //#define TP_USE_GT9XX
- //#define TP_USE_GA657X
- //#define TP_USE_FT6336U
- /* Config tp parameters */
- #define TP_GPIO_INT 4
- #define TP_GPIO_RST 5
- #define TP_INV_X 0
- #define TP_INV_Y 0
- #define TP_INV_XY_AXIS 0 //翻转XY轴
- #define TP_MT_TOUCH 0 //支持多点触摸
- #endif
- /*******************************************/
- /*********** sdmmc configuration ***********/
- #define SDMMC0_SUPPORT
- #define SDMMC1_SUPPORT
- #if defined(SDMMC0_SUPPORT) || defined(SDMMC1_SUPPORT)
- #define SDMMC_SUPPORT
- #endif
- /*******************************************/
- /*********** uart configuration ************/
- #define UART_MCU_PORT 3
- #define UART_DEBUG_PORT UART_ID0
- /*******************************************/
- /************ rtc configuration ************/
- //#define RTC_SUPPORT
- /*******************************************/
- /************ remote configuration ************/
- //#define REMOTE_SUPPORT
- /*******************************************/
- /************ pwm capture configuration ************/
- //#define PWM_CAP_SUPPORT
- /*******************************************/
- /************ i2c configuration ************/
- #define DW_I2C0_SUPPORT
- //#define DW_I2C1_SUPPORT
- //#define ANALOG_I2C_SUPPORT
- #define I2C_GPIO0_SDA_PIN 66
- #define I2C_GPIO0_SCL_PIN 65
- /*******************************************/
- /************ dw spi configuration ************/
- #define DW_SPI0_SUPPORT
- #define DW_SPI2_SUPPORT
- /*******************************************/
- /************ ecspi configuration ************/
- #define EC_SPI1_SUPPORT
- /*******************************************/
- /************ adc configuration ************/
- //#define ADC_SUPPORT
- #ifdef ADC_SUPPORT
- //#define ADC0_SUPPORT
- //#define ADC1_SUPPORT
- //#define ADC2_SUPPORT
- #endif
- /*******************************************/
- /************ dma configuration ************/
- /* the smaller channel has higher priority */
- #define SPI0_RX_DMA_CH 0
- #define I2S_DMA_RXCH 3
- #define I2S_DMA_TXCH 4
- #define I2S1_DMA_RXCH I2S_DMA_RXCH
- #define I2S1_DMA_TXCH I2S_DMA_TXCH
- #define ECSPI_TX_DMA_CH 5
- #define ECSPI_RX_DMA_CH 6
- /*******************************************/
- /************ usb configuration ************/
- #define USB_SUPPORT
- #define USB_MODE_ID -1
- //#define USB_DMA
- //#define USB_UVC_SUPPORT
- #define CONFIG_USB_DWC2_HOST 1
- #define CONFIG_USB_NEW_DWC2_HOST 1
- #define CONFIG_USB_DWC2_PERIPHERAL 1
- #define CONFIG_USB_NEW_DWC2_GADGET 1
- #if USB_MODE_ID && USB_MODE_ID != -1
- #define CONFIG_USB_DEVICE_CDC_NCM 1
- #endif
- /*******************************************/
- /************ carlink configuration ************/
- #ifdef CARLINK_ENABLE /* define in iar options */
- #define WIFI_SUPPORT
- #endif
- #ifdef WIFI_SUPPORT
- #define CARLINK_EY 0
- #define CARLINK_EC 1
- #define WIFI_RESET_IO 95
- #else
- #define CARLINK_EY 0
- #define CARLINK_EC 0
- #endif
- #if CARLINK_EY && CARLINK_EC
- #error "Do not choose two car links"
- #endif
- #if CARLINK_EC == 1
- #define USE_LWIP 1
- #else
- #define USE_LWIP 0
- #endif
- #define BT_RESET_IO 94
- #define BT_UART_PORT 1
- //#define RELTECK_WIFI_AP_MODE
- /*******************************************/
- /************ audio configuration ************/
- #define I2S_ID0 0
- #define I2S_ID1 1
- #define I2S_NUMS 2
- /* add your adc type */
- #define AUDIO_CODEC_ADC_NONE 0 //Not use codec adc ic or no need driver.
- #define AUDIO_CODEC_ADC_ES7243E 1 //Use codec adc ic es7243e.
- /* add your dac type */
- #define AUDIO_CODEC_DAC_NONE 0 //Not use codec adc ic or no need driver.
- #define AUDIO_CODEC_DAC_ES8156 1 //Use codec dac ic es8156.
- /* choose your audio use type */
- //#define AUDIO_REPLAY
- //#define AUDIO_RECORD
- #ifdef AUDIO_REPLAY
- #define AUDIO_REPLAY_I2S I2S_ID0 /* Select i2s id */
- #define AUDIO_CODEC_DAC_IC AUDIO_CODEC_DAC_NONE /* Select your codec dac type */
- #endif
- #ifdef AUDIO_RECORD
- #define AUDIO_RECORD_I2S I2S_ID1 /* Select i2s id */
- #define AUDIO_CODEC_ADC_IC AUDIO_CODEC_ADC_ES7243E /* Select your codec adc type */
- #endif
- #ifndef AUDIO_CODEC_DAC_IC
- #define AUDIO_CODEC_DAC_IC AUDIO_CODEC_DAC_NONE /* Do not use codec dac by default */
- #endif
- #ifndef AUDIO_CODEC_ADC_IC
- #define AUDIO_CODEC_ADC_IC AUDIO_CODEC_ADC_NONE /* Do not use codec adc by default */
- #endif
- #if (AUDIO_CODEC_DAC_IC == AUDIO_CODEC_DAC_ES8156)
- #define AUDIO_CODEC_DAC_NAME "ES8156"
- #else
- #define AUDIO_CODEC_DAC_NAME ""
- #endif
- #if (AUDIO_CODEC_ADC_IC == AUDIO_CODEC_ADC_ES7243E)
- #define AUDIO_CODEC_ADC_NAME "ES7243E"
- #else
- #define AUDIO_CODEC_ADC_NAME ""
- #endif
- /*******************************************/
- /********** mailbox configuration **********/
- #define MAILBOX_SUPPORT
- /*******************************************/
- /************ eth configuration ************/
- // #define ETH_SUPPORT
- #define ETH_TXC_PAD_DIR_OUTPUT 1 // 0:TXC作为输入 1:TXC作为输出
- #define PHY_JL3101_SEL 0
- #define PHY_JL3101_RST_IO 21
- #if PHY_JL3101_SEL
- #define ETH_AUTONEGOTIATION 0
- #define CLAUSE45_ENABLE 1
- #else
- #define ETH_AUTONEGOTIATION 1
- #define CLAUSE45_ENABLE 0
- #endif
- /*******************************************/
- /********** romfile configuration **********/
- /* 没有定义ROMFILE_USE_SMALL_MEM,romfile内容会全部加载到ddr
- * 内存不足时可以定义ROMFILE_USE_SMALL_MEM节省内存使用 */
- #define ROMFILE_USE_SMALL_MEM
- #ifndef ROMFILE_USE_SMALL_MEM
- /* 定义READ_ROMFILE_ONCE,romfile内容会整个一次加载到ddr,如果
- * 文件过大会导致启动时间慢 */
- //#define READ_ROMFILE_ONCE
- #else
- /* 缓存在DDR里的文件数,未缓存的文件需要重新从flash里读取 */
- #define ROMFILE_CACHE_DEF_SIZE 0
- #endif
- /*******************************************/
- /********** animation configuration **********/
- #define ANIMATION_NONE 0
- #define ANIMATION_USE_SMALL_MEM 1
- #define ANIMATION_NORMAL 2
- #define ANIMATION_POLICY ANIMATION_NORMAL
- /*********************************************/
- /************ flash type configuration ************/
- #define SPI_NOR_FLASH 0
- #define SPI_NAND_FLASH 1
- #define EMMC_FLASH 2
- #define DEVICE_TYPE_SELECT EMMC_FLASH //需要与MCU工程amt630hv160_conf.h中CPU_DEVICE_TYPE_SELECT对应
- #define MCU_DEVICE_TYPE_SELECT DEVICE_TYPE_SELECT //需要与MCU工程amt630hv160_conf.h中DEVICE_TYPE_SELECT对应
- #if DEVICE_TYPE_SELECT != EMMC_FLASH
- //#define SPI0_QSPI_MODE
- #else
- #if DEVICE_TYPE_SELECT != MCU_DEVICE_TYPE_SELECT
- #undef DW_SPI0_SUPPORT
- #endif
- #define DEVICE_PARTITION_NAME "/emmc"
- #endif
- /*******************************************/
- /********** update mode configuration **********/
- #define OTA_UPDATE_SUPPORT
- #ifdef OTA_UPDATE_SUPPORT
- #define IMAGE_RESOURCES_BACKUP
- //#define DELTA_UPDATE_SUPPORT
- #define MAILBOX_UPDATE_SUPPORT
- //#define WIFI_UPDATE_SUPPORT
- #if defined(WIFI_UPDATE_SUPPORT) && !defined(USB_SUPPORT)
- #error "Error! Should define USB_SUPPORT to support wifi simu update"
- #endif
- //#define NCM_UPDATE_SUPPORT
- #if defined(NCM_UPDATE_SUPPORT) && !CONFIG_USB_DEVICE_CDC_NCM
- #error "Error! Should define CONFIG_USB_DEVICE_CDC_NCM=1 to support ncm update"
- #endif
- //#define NCM_LOG_SUPPORT
- #if defined(NCM_LOG_SUPPORT) && !CONFIG_USB_DEVICE_CDC_NCM
- #error "Error! Should define CONFIG_USB_DEVICE_CDC_NCM=1 to support ncm log"
- #endif
- #else
- #error "Error! Should define OTA_UPDATE_SUPPORT to support other update options"
- #endif
- /*********************************************/
- /********** update address configuration **********/
- #if DEVICE_TYPE_SELECT == SPI_NOR_FLASH
- #define MCU_RESERVE_SIZE 0x100000ul //1MB
- #define SYSINFO_MAX_SIZE 0x1000 //4KB
- #define LOADER_MAX_SIZE 0x8000 //32KB
- #define APPFILE_MAX_SIZE 0x200000 //2MB
- #define ANIMFILE_MAX_SIZE 0x500000 //5MB
- #define ROMFILE_MAX_SIZE 0x1000000 //16MB
- #define OTA_MEDIA_SIZE 0xa00000 //10MB
- /**********************************************************************************************************************************
- spi nor flash address space( 0 address start)-(resources AB backup)
- |-----1MB-----|---4KB---|---4KB---|--32KB--|--32KB--|---2MB---|---5MB---|---16MB---|---2MB---|---5MB---|---16MB---|---10MB---|---end
- |-------------|---------|---------|--------|--------|---------|---------|----------|---------|---------|----------|----------|
- |0 |0x100000 |0x101000 |0x102000|0x10A000|0x112000 |0x312000 | 0x812000 |0x1812000|0x1A12000|0x1F12000 |0x2F12000 |
- |MCU reserved | SYSINFO |SYSINFO B| AMTLDR |AMTLDR B| APP | ANIM | ROM | APP B | ANIM B | ROM B | OTA |
- |_____________|_________|_________|________|________|_________|_________|__________|_________|_________|__________|__________|
- spi nor flash address space( 0 address start)
- |-----1MB-----|---4KB---|---4KB---|--32KB--|--32KB--|---2MB---|---5MB---|---16MB---|---2MB---|---5MB---|---end
- |-------------|---------|---------|--------|--------|---------|---------|--------- |---------|---------|
- |0 |0x100000 |0x101000 |0x102000|0x10A000|0x112000 |0x312000 | 0x812000 |0x1812000|0x1A12000|
- |MCU reserved | SYSINFO |SYSINFO B| AMTLDR |AMTLDR B| APP | ANIM | ROM | APP B | OTA |
- |_____________|_________|_________|________|________|_________|_________|__________|_________|_________|
- ***********************************************************************************************************************************/
- #elif DEVICE_TYPE_SELECT == EMMC_FLASH
- #define MCU_RESERVE_SIZE 0x1000000ul //16MB
- #define SYSINFO_MAX_SIZE 0x80000 //512KB
- #define LOADER_MAX_SIZE 0x80000 //512KB
- #define APPFILE_MAX_SIZE 0x1000000 //16MB
- #define ANIMFILE_MAX_SIZE 0x500000 //5MB
- #define ROMFILE_MAX_SIZE 0x8000000 //128MB
- #define OTA_MEDIA_SIZE 0x10000000 //256MB
- /***********************************************************************************************************************************
- emmc address space( 0 address start)-(resources AB backup)
- |----16MB-----|---512KB---|---512KB---|---512KB---|---512KB---|---16MB---|---5MB---|---128MB--|---16MB---|---5MB----|---128MB---|--256MB---|---end
- |-------------|-----------|-----------|-----------|-----------|----------|---------|----------|----------|----------|-----------|----------|
- |0 | 0x1000000 | 0x1080000 | 0x1100000 | 0x1180000 |0x1200000 |0x2200000|0x2700000 |0xA700000 |0xB700000 | 0xBC00000 |0x13C00000|
- |MCU reserved | SYSINFO | SYSINFO B | AMTLDR | AMTLDR B | APP | ANIM | ROM | APP B | ANIM B | ROM B | OTA |
- |_____________|___________|___________|___________|___________|__________|_________|__________|__________|__________|___________|__________|
- emmc address space( 0 address start)
- |----16MB-----|---512KB---|---512KB---|---512KB---|---512KB---|---16MB---|---5MB---|---128MB--|---16MB---|--256MB---|---end
- |-------------|-----------|-----------|-----------|-----------|----------|---------|----------|----------|----------|
- |0 | 0x1000000 | 0x1080000 | 0x1100000 | 0x1180000 |0x1200000 |0x2200000|0x2700000 |0xA700000 |0xB700000 |
- |MCU reserved | SYSINFO | SYSINFO B | AMTLDR | AMTLDR B | APP | ANIM | ROM | APP B | OTA |
- |_____________|___________|___________|___________|___________|__________|_________|__________|__________|__________|
- *************************************************************************************************************************************/
- #else
- #error "Invalid flash type."
- #endif
- #define SYSINFO_OFFSET MCU_RESERVE_SIZE
- #define SYSINFO_B_OFFSET (SYSINFO_OFFSET + SYSINFO_MAX_SIZE)
- #define LOADER_OFFSET (SYSINFO_B_OFFSET + SYSINFO_MAX_SIZE)
- #define LOADER_B_OFFSET (LOADER_OFFSET + LOADER_MAX_SIZE)
- #define APPFILE_OFFSET (LOADER_B_OFFSET + LOADER_MAX_SIZE)
- #define ANIMFILE_OFFSET (APPFILE_OFFSET + APPFILE_MAX_SIZE)
- #define ROMFILE_OFFSET (ANIMFILE_OFFSET + ANIMFILE_MAX_SIZE)
- #define APPFILE_B_OFFSET (ROMFILE_OFFSET + ROMFILE_MAX_SIZE)
- #ifdef IMAGE_RESOURCES_BACKUP
- #define ANIMFILE_B_OFFSET (APPFILE_B_OFFSET + APPFILE_MAX_SIZE)
- #define ROMFILE_B_OFFSET (ANIMFILE_B_OFFSET + ANIMFILE_MAX_SIZE)
- #define OTA_MEDIA_OFFSET (ROMFILE_B_OFFSET + ROMFILE_MAX_SIZE)
- #else
- #define ANIMFILE_B_OFFSET ANIMFILE_OFFSET
- #define ROMFILE_B_OFFSET ROMFILE_OFFSET
- #define OTA_MEDIA_OFFSET (APPFILE_B_OFFSET + APPFILE_MAX_SIZE)
- #endif
- /*********************************************/
- /************ DDR config configuration ************/
- #define DDR_BASE 0x60000000ul
- #define DDR_TOTAL_SIZE 0x8000000 //128MB
- #define DDR_DRV_USE_SIZE 0x800000 //8MB
- #define DDR_MCU_ACCESS_MODULE_SIZE 0x40000 //256KB
- #define DDR_CPU_ACCESS_MODULE_SIZE 0x40000 //256KB
- #define DDR_MEDIA_USE_SIZE 0x80000 //512KB
- #if DEVICE_TYPE_SELECT == SPI_NOR_FLASH
- #define DDR_CAN_UPDATE_SIZE 0x200000 //2MB
- #define DDR_RESERVED_SIZE 0x500000 //5MB
- #elif DEVICE_TYPE_SELECT == EMMC_FLASH
- #define DDR_CAN_UPDATE_SIZE 0x400000 //4MB
- #define DDR_RESERVED_SIZE 0x300000 //3MB
- #endif
- #define DDR_DRV_USE_ADDR (DDR_BASE + DDR_TOTAL_SIZE - DDR_DRV_USE_SIZE)
- #define DDR_MCU_ACCESS_MODULE_ADDR (DDR_DRV_USE_ADDR)
- #define DDR_CPU_ACCESS_MODULE_ADDR (DDR_MCU_ACCESS_MODULE_ADDR + DDR_MCU_ACCESS_MODULE_SIZE)
- #define DDR_MEDIA_USE_ADDR (DDR_CPU_ACCESS_MODULE_ADDR + DDR_CPU_ACCESS_MODULE_SIZE)
- #define DDR_CAN_USE_ADDR (DDR_MEDIA_USE_ADDR + DDR_MEDIA_USE_SIZE)
- /*********************************************************************
- spi nor flash DDR address space
- |----120MB----|------256KB------|------256KB------|----512KB----|-----2MB-----|-----5MB-----|---end
- |-------------|-----------------|-----------------|-------------|-------------|-------------|
- |0x60000000 |0x67800000 |0x67840000 |0x67880000 |0x67900000 |0x67B00000 |
- |CPU USE |MCU Access module|CPU Access module|Media update |Can update |Reserved |
- |_____________|_________________|_________________|_____________|_____________|_____________|
- ***********************************************************************
- emmc DDR address space
- |----120MB----|------256KB------|------256KB------|----512KB----|-----4MB-----|-----3MB-----|---end
- |-------------|-----------------|-----------------|-------------|-------------|-------------|
- |0x60000000 |0x67800000 |0x67840000 |0x67880000 |0x67900000 |0x67D00000 |
- |CPU USE |MCU Access module|CPU Access module|Media update |Can update |Reserved |
- |_____________|_________________|_________________|_____________|_____________|_____________|
- **********************************************************************/
- /*********************************************/
- /********** ulog configuration **********/
- //#define USE_ULOG
- #define ULOG_NAME_MAX 8
- #define ULOG_LINE_BUF_SIZE 1024
- #define ULOG_OUTPUT_LEVEL
- #define ULOG_OUTPUT_TIME
- //#define ULOG_TIME_USING_TIMESTAMP
- //#define ULOG_OUTPUT_TAG
- //#define ULOG_USING_COLOR
- #define ULOG_USING_ISR_LOG
- #define ULOG_BACKEND_USING_CONSOLE
- #define ULOG_EASYFLASH_BACKEND_ENABLE
- #ifdef ULOG_EASYFLASH_BACKEND_ENABLE
- #define EASYFLASH_LOG
- #if DEVICE_TYPE_SELECT != EMMC_FLASH
- #define EASYFLASH_LOG_AREA_SIZE 0x100000
- #define EASYFLASH_ERASE_GRAN 0x1000
- #define EASYFLASH_WRITE_GRAN 0x100
- #define EASYFLASH_START_ADDR 0x1700000
- #else
- #define EASYFLASH_LOG_AREA_SIZE 0x100000
- #define EASYFLASH_ERASE_GRAN 0x10000
- #define EASYFLASH_WRITE_GRAN 0x200
- #define EASYFLASH_START_ADDR 0x60000000
- #endif
- #endif
- //#define ULOG_FILE_BACKEND_ENABLE
- #ifdef ULOG_FILE_BACKEND_ENABLE
- #if DEVICE_TYPE_SELECT != EMMC_FLASH
- #define ULOG_FILE_ROOT_PATH "/sf/logs"
- #else
- #define ULOG_FILE_ROOT_PATH "/emmc/logs"
- #endif
- #define ULOG_FILE_NAME_BASE "ulog.log"
- #define ULOG_FILE_MAX_NUM 10
- #define ULOG_FILE_MAX_SIZE (1024 * 32)
- #endif
- //#define ULOG_USING_ASYNC_OUTPUT //ulog异步输出
- #define ULOG_ASYNC_OUTPUT_BUF_SIZE 32768 //32K
- #define ULOG_ASYNC_OUTPUT_THREAD_STACK 2048
- #define ULOG_ASYNC_OUTPUT_THREAD_PRIORITY 10
- /*********************************************/
- #endif
|