parent
39e2e116d0
commit
9d54476330
|
@ -0,0 +1,19 @@
|
|||
# Set the default behavior, in case people don't have core.autocrlf set.
|
||||
* text=auto
|
||||
|
||||
# Explicitly declare text files you want to always be normalized and converted
|
||||
# to native line endings on checkout.
|
||||
*.c text
|
||||
*.cpp text
|
||||
*.h text
|
||||
*.S text
|
||||
*.txt text
|
||||
*.md text
|
||||
|
||||
# Declare files that will always have LF line endings on checkout.
|
||||
*.sh text eol=lf
|
||||
|
||||
# Denote all files that are truly binary and should not be modified.
|
||||
*.lib binary
|
||||
*.bin binary
|
||||
*.png binary
|
|
@ -1,46 +1,46 @@
|
|||
# Guard against multiple inclusion
|
||||
if(_RT_KERNEL_CMAKE_)
|
||||
return()
|
||||
endif()
|
||||
set(_RT_KERNEL_CMAKE_ TRUE)
|
||||
|
||||
cmake_minimum_required (VERSION 3.1.2)
|
||||
|
||||
# Get environment variables
|
||||
set(RTK $ENV{RTK} CACHE STRING
|
||||
"Location of rt-kernel tree")
|
||||
|
||||
# Avoid warning when re-running cmake
|
||||
set(DUMMY ${CMAKE_TOOLCHAIN_FILE})
|
||||
|
||||
include_directories(
|
||||
${RTK}/include/
|
||||
${RTK}/include/arch/${ARCH}
|
||||
${RTK}/include/kern
|
||||
${RTK}/include/drivers
|
||||
${RTK}/bsp/${BSP}/include
|
||||
${SOES_SOURCE_DIR}/soes/include/sys/gcc
|
||||
)
|
||||
link_directories(
|
||||
${RTK}/lib/${ARCH}/${CPU}
|
||||
)
|
||||
|
||||
# No support for shared libs
|
||||
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
|
||||
|
||||
set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
|
||||
set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
|
||||
set(CMAKE_EXECUTABLE_SUFFIX ".elf")
|
||||
|
||||
# Common compile flags
|
||||
add_compile_options(-Wall -Wextra -Wno-unused-parameter -Werror -fomit-frame-pointer -fno-strict-aliasing)
|
||||
|
||||
# Add machine flags to C_FLAGS so they take effect for linking also
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MACHINE_FLAGS}" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MACHINE_FLAGS}" CACHE STRING "" FORCE)
|
||||
|
||||
# Default libs
|
||||
set(RTK_LIBS "-l${BSP} -l${ARCH} -lkern -ldev -lsio -lblock -lfs -lusb -llwip -lptpd -leth -li2c -lrtc -lcan -lnand -lspi -lnor -lpwm -ladc -ltrace -lcounter -lc -lm")
|
||||
|
||||
set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> -nostartfiles -T${RTK}/bsp/${BSP}/${BSP}.ld -Wl,--start-group <LINK_LIBRARIES> ${RTK_LIBS} -Wl,--end-group")
|
||||
set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> -nostartfiles -T${RTK}/bsp/${BSP}/${BSP}.ld -Wl,--start-group <LINK_LIBRARIES> ${RTK_LIBS} -Wl,--end-group")
|
||||
# Guard against multiple inclusion
|
||||
if(_RT_KERNEL_CMAKE_)
|
||||
return()
|
||||
endif()
|
||||
set(_RT_KERNEL_CMAKE_ TRUE)
|
||||
|
||||
cmake_minimum_required (VERSION 3.1.2)
|
||||
|
||||
# Get environment variables
|
||||
set(RTK $ENV{RTK} CACHE STRING
|
||||
"Location of rt-kernel tree")
|
||||
|
||||
# Avoid warning when re-running cmake
|
||||
set(DUMMY ${CMAKE_TOOLCHAIN_FILE})
|
||||
|
||||
include_directories(
|
||||
${RTK}/include/
|
||||
${RTK}/include/arch/${ARCH}
|
||||
${RTK}/include/kern
|
||||
${RTK}/include/drivers
|
||||
${RTK}/bsp/${BSP}/include
|
||||
${SOES_SOURCE_DIR}/soes/include/sys/gcc
|
||||
)
|
||||
link_directories(
|
||||
${RTK}/lib/${ARCH}/${CPU}
|
||||
)
|
||||
|
||||
# No support for shared libs
|
||||
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
|
||||
|
||||
set(CMAKE_STATIC_LIBRARY_PREFIX "lib")
|
||||
set(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
|
||||
set(CMAKE_EXECUTABLE_SUFFIX ".elf")
|
||||
|
||||
# Common compile flags
|
||||
add_compile_options(-Wall -Wextra -Wno-unused-parameter -Werror -fomit-frame-pointer -fno-strict-aliasing)
|
||||
|
||||
# Add machine flags to C_FLAGS so they take effect for linking also
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${MACHINE_FLAGS}" CACHE STRING "" FORCE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MACHINE_FLAGS}" CACHE STRING "" FORCE)
|
||||
|
||||
# Default libs
|
||||
set(RTK_LIBS "-l${BSP} -l${ARCH} -lkern -ldev -lsio -lblock -lfs -lusb -llwip -lptpd -leth -li2c -lrtc -lcan -lnand -lspi -lnor -lpwm -ladc -ltrace -lcounter -lc -lm")
|
||||
|
||||
set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_CXX_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> -nostartfiles -T${RTK}/bsp/${BSP}/${BSP}.ld -Wl,--start-group <LINK_LIBRARIES> ${RTK_LIBS} -Wl,--end-group")
|
||||
set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> -nostartfiles -T${RTK}/bsp/${BSP}/${BSP}.ld -Wl,--start-group <LINK_LIBRARIES> ${RTK_LIBS} -Wl,--end-group")
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
# Guard against multiple inclusion
|
||||
if(_TOOLCHAIN_CMAKE_)
|
||||
return()
|
||||
endif()
|
||||
set(_TOOLCHAIN_CMAKE_ TRUE)
|
||||
|
||||
INCLUDE(CMakeForceCompiler)
|
||||
SET(CMAKE_SYSTEM_NAME rt-kernel)
|
||||
|
||||
# specify the cross compiler
|
||||
CMAKE_FORCE_C_COMPILER(arm-eabi-gcc GNU)
|
||||
CMAKE_FORCE_CXX_COMPILER(arm-eabi-g++ GNU)
|
||||
|
||||
set(ARCH kinetis)
|
||||
set(CPU cortex-m4f)
|
||||
set(BSP twrk60f)
|
||||
set(MACHINE_FLAGS "-mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16")
|
||||
|
||||
set(HAL_SOURCES
|
||||
${SOES_SOURCE_DIR}/soes/hal/rt-kernel-twrk60/esc_hw.c
|
||||
)
|
||||
# Guard against multiple inclusion
|
||||
if(_TOOLCHAIN_CMAKE_)
|
||||
return()
|
||||
endif()
|
||||
set(_TOOLCHAIN_CMAKE_ TRUE)
|
||||
|
||||
INCLUDE(CMakeForceCompiler)
|
||||
SET(CMAKE_SYSTEM_NAME rt-kernel)
|
||||
|
||||
# specify the cross compiler
|
||||
CMAKE_FORCE_C_COMPILER(arm-eabi-gcc GNU)
|
||||
CMAKE_FORCE_CXX_COMPILER(arm-eabi-g++ GNU)
|
||||
|
||||
set(ARCH kinetis)
|
||||
set(CPU cortex-m4f)
|
||||
set(BSP twrk60f)
|
||||
set(MACHINE_FLAGS "-mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16")
|
||||
|
||||
set(HAL_SOURCES
|
||||
${SOES_SOURCE_DIR}/soes/hal/rt-kernel-twrk60/esc_hw.c
|
||||
)
|
||||
|
|
|
@ -1,34 +1,34 @@
|
|||
|
||||
#ifndef __config_h__
|
||||
#define __config_h__
|
||||
|
||||
#define MBXSIZE 0x80
|
||||
#define MBXSIZEBOOT 0x80
|
||||
#define MBXBUFFERS 3
|
||||
|
||||
#define MBX0_sma 0x1000
|
||||
#define MBX0_sml MBXSIZE
|
||||
#define MBX0_sme MBX0_sma+MBX0_sml-1
|
||||
#define MBX0_smc 0x26
|
||||
#define MBX1_sma 0x1080
|
||||
#define MBX1_sml MBXSIZE
|
||||
#define MBX1_sme MBX1_sma+MBX1_sml-1
|
||||
#define MBX1_smc 0x22
|
||||
|
||||
#define MBX0_sma_b 0x1000
|
||||
#define MBX0_sml_b MBXSIZEBOOT
|
||||
#define MBX0_sme_b MBX0_sma_b+MBX0_sml_b-1
|
||||
#define MBX0_smc_b 0x26
|
||||
#define MBX1_sma_b 0x1080
|
||||
#define MBX1_sml_b MBXSIZEBOOT
|
||||
#define MBX1_sme_b MBX1_sma_b+MBX1_sml_b-1
|
||||
#define MBX1_smc_b 0x22
|
||||
|
||||
#define SM2_sma 0x1100
|
||||
#define SM2_smc 0x24
|
||||
#define SM2_act 0x01
|
||||
#define SM3_sma 0x1180
|
||||
#define SM3_smc 0x20
|
||||
#define SM3_act 0x01
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef __config_h__
|
||||
#define __config_h__
|
||||
|
||||
#define MBXSIZE 0x80
|
||||
#define MBXSIZEBOOT 0x80
|
||||
#define MBXBUFFERS 3
|
||||
|
||||
#define MBX0_sma 0x1000
|
||||
#define MBX0_sml MBXSIZE
|
||||
#define MBX0_sme MBX0_sma+MBX0_sml-1
|
||||
#define MBX0_smc 0x26
|
||||
#define MBX1_sma 0x1080
|
||||
#define MBX1_sml MBXSIZE
|
||||
#define MBX1_sme MBX1_sma+MBX1_sml-1
|
||||
#define MBX1_smc 0x22
|
||||
|
||||
#define MBX0_sma_b 0x1000
|
||||
#define MBX0_sml_b MBXSIZEBOOT
|
||||
#define MBX0_sme_b MBX0_sma_b+MBX0_sml_b-1
|
||||
#define MBX0_smc_b 0x26
|
||||
#define MBX1_sma_b 0x1080
|
||||
#define MBX1_sml_b MBXSIZEBOOT
|
||||
#define MBX1_sme_b MBX1_sma_b+MBX1_sml_b-1
|
||||
#define MBX1_smc_b 0x22
|
||||
|
||||
#define SM2_sma 0x1100
|
||||
#define SM2_smc 0x24
|
||||
#define SM2_act 0x01
|
||||
#define SM3_sma 0x1180
|
||||
#define SM3_smc 0x20
|
||||
#define SM3_act 0x01
|
||||
|
||||
#endif
|
||||
|
|
16
version.h.in
16
version.h.in
|
@ -1,8 +1,8 @@
|
|||
|
||||
#ifndef VERSION_H
|
||||
|
||||
#define SOES_VERSION_MAJOR @SOES_VERSION_MAJOR@
|
||||
#define SOES_VERSION_MINOR @SOES_VERSION_MINOR@
|
||||
#define SOES_VERSION_PATCH @SOES_VERSION_PATCH@
|
||||
|
||||
#endif /* VERSION_H */
|
||||
|
||||
#ifndef VERSION_H
|
||||
|
||||
#define SOES_VERSION_MAJOR @SOES_VERSION_MAJOR@
|
||||
#define SOES_VERSION_MINOR @SOES_VERSION_MINOR@
|
||||
#define SOES_VERSION_PATCH @SOES_VERSION_PATCH@
|
||||
|
||||
#endif /* VERSION_H */
|
||||
|
|
Loading…
Reference in New Issue