Commit 684aa53c authored by Evan Gao's avatar Evan Gao
Browse files

platfrom update

parent b17f8a12
......@@ -8,7 +8,8 @@ ENDIF()
MESSAGE(STATUS "SDK_DIR: " ${SDK_DIR})
SET(FREERTOS_ENV_VARIABLE_NAME SEMIDRIVE_X9_FREERTOS_DIR)
set(FREERTOS_DIR $ENV{${FREERTOS_ENV_VARIABLE_NAME}})
SET(FREERTOS_DIR $ENV{${FREERTOS_ENV_VARIABLE_NAME}})
if (NOT DEFINED FREERTOS_DIR)
message(FATAL_ERROR "***${FREERTOS_ENV_VARIABLE_NAME} environment variable is undefined!***")
endif()
......@@ -50,11 +51,13 @@ target_sources(Platform PRIVATE
# ${FREERTOS_DIR}/tasks.c
# ${FREERTOS_DIR}/list.c
${SDK_DIR}/lib/libc/include/assert.h
${PLATFORM_COMMON_SRC_DIR}/singlepointtoucheventdispatcher.cpp
# ${PLATFORM_COMMON_SRC_DIR}/freertos/memalloc.cpp
${PLATFORM_COMMON_SRC_DIR}/freertos/os.c
# ${PLATFORM_COMMON_SRC_DIR}/freertos/os.c
)
include(${PLATFORM_COMMON_SRC_DIR}/freertos/freertos.cmake)
target_include_directories(Platform PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
......@@ -90,6 +93,7 @@ target_include_directories(Platform PRIVATE
${SDK_DIR}/hal/g2dlite_hal/sd_g2dlite_hal/inc/
${SDK_DIR}/hal/res/inc
${SDK_DIR}/chipdev/timer/sd_timer/inc
${SDK_DIR}/chipdev/disp/sd_disp/inc
${SDK_DIR}/chipcfg/generate/x9_mid/chip
${SDK_DIR}/chipcfg/generate/x9_mid/projects/serdes
${SDK_DIR}/chipcfg/generate/x9_mid/projects/serdes/safety
......@@ -104,10 +108,19 @@ target_include_directories(Platform PRIVATE
target_compile_options(
Platform
PRIVATE
-Wno-shadow
-Wno-unused-parameter
-Wno-sign-compare
-Wno-missing-field-initializers
-Wno-implicit-fallthrough
-Wno-return-type
-Wno-type-limits
-Wno-unused-variable
-Wno-reorder
-Wno-ignored-qualifiers
-Wno-unused-but-set-variable
-Wno-unused-function
)
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdinc")
......
......@@ -12,10 +12,10 @@ set (QUL_PLATFORM_ARCHITECTURE "cortex-r5-hf-vfpv3-d16")
set(QUL_OS "FreeRTOS" CACHE INTERNAL "Operating system")
#if(NOT DEFINED FREERTOS_DIR)
# set(FREERTOS_DIR "${SEMIDRIVE_X9_FREERTOS_DIR}")
# message(STATUS "FREERTOS_DIR cache entry not set. Using default: ${FREERTOS_DIR}")
#endif()
if(NOT DEFINED FREERTOS_DIR)
set(FREERTOS_DIR "${SEMIDRIVE_X9_FREERTOS_DIR}")
message(STATUS "FREERTOS_DIR cache entry not set. Using default: ${FREERTOS_DIR}")
endif()
set(QUL_PLATFORM_REQUIRED_IMAGE_ALIGNMENT "8")
set(QUL_PLATFORM_REQUIRED_PIXEL_WIDTH_ALIGNMENT "16")
......
......@@ -84,7 +84,8 @@ extern void *qul_malloc(std::size_t size);
static volatile bool waitingForBufferFlip = false;
static uint32_t idleTimeWaitingForDisplay = 0;
static int QT_DISPLAY_ID = SCREEN_1;
//static int QT_DISPLAY_ID = SCREEN_1;
static int QT_DISPLAY_ID = SCREEN;
struct g2dlite {
int index;
......@@ -92,6 +93,15 @@ struct g2dlite {
uint32_t irq_num;
};
//! [currentTimestamp]
uint64_t currentTimestamp()
{
uint32_t time = current_time();
//printf("kyle currentTimestamp %d, %llu\n", time, (uint64_t)time);
return time;
}
//! [currentTimestamp]
static sdm_display_t * m_sdm;
static struct sdm_buffer sdm_buf = DISPLAY_QT_TEMPLATE;
static struct sdm_post_config post_data;
......@@ -142,8 +152,11 @@ static const int BytesPerPixel = 4;
static unsigned char* framebuffer[2];//[BytesPerPixel * ScreenWidth * ScreenHeight];
static int backBufferIndex = 0;
//! [framebuffer]
static const int ScreenWidth = QUL_DEFAULT_SCREEN_WIDTH;
static const int ScreenHeight = QUL_DEFAULT_SCREEN_HEIGHT;
//static const int ScreenWidth = QUL_DEFAULT_SCREEN_WIDTH;
//static const int ScreenHeight = QUL_DEFAULT_SCREEN_HEIGHT;
static const int ScreenWidth = QUL_PLATFORM_DEFAULT_SCREEN_WIDTH;
static const int ScreenHeight = QUL_PLATFORM_DEFAULT_SCREEN_HEIGHT;
static unsigned char * temp;
static unsigned char * bgtemp;
......@@ -298,15 +311,6 @@ double rand()
}
//! [rand]
//! [currentTimestamp]
uint64_t currentTimestamp()
{
uint32_t time = current_time();
//printf("kyle currentTimestamp %d, %llu\n", time, (uint64_t)time);
return time;
}
//! [currentTimestamp]
//! [nextUpdate]
static uint64_t nextUpdate = 0llu;
......
......@@ -113,7 +113,8 @@ using namespace sdm;
#define THREE_BIT 3
#define TWO_BIT 2
static int QT_DISPLAY_ID = SCREEN_1;
//static int QT_DISPLAY_ID = SCREEN_1;
static int QT_DISPLAY_ID = SCREEN;
static void *G2D = NULL;
struct g2dlite {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment