Change to cmake build system

This commit is contained in:
Mikael Heden 2015-07-09 17:57:59 +02:00
parent 57c648ab7c
commit 77da52b89d
58 changed files with 207 additions and 1275 deletions

65
CMakeLists.txt Normal file
View File

@ -0,0 +1,65 @@
cmake_minimum_required(VERSION 2.8.4)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules")
project(SOEM C)
set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/install)
message("CMAKE_SYSTEM_NAME is ${CMAKE_SYSTEM_NAME}")
if(WIN32)
set(OS "win32")
include_directories(oshw/win32/wpcap/Include)
link_directories(${CMAKE_SOURCE_DIR}/oshw/win32/wpcap/Lib)
elseif(UNIX)
set(OS "linux")
elseif(${CMAKE_SYSTEM_NAME} MATCHES "rt-kernel")
set(OS "rtk")
message("ARCH is ${ARCH}")
message("BSP is ${BSP}")
include_directories(oshw/${OS}/${ARCH})
add_definitions("-Wno-unused-but-set-variable")
add_definitions("-Wno-unused-function")
add_definitions("-Wno-format")
endif()
message("OS is ${OS}")
include_directories(soem)
include_directories(osal)
include_directories(osal/${OS})
include_directories(oshw/${OS})
if (MSVC)
set(CMAKE_C_FLAGS_RELEASE "/D _CRT_SECURE_NO_WARNINGS /EHsc")
set(CMAKE_C_FLAGS_DEBUG "/D _CRT_SECURE_NO_WARNINGS /EHsc /ZI /Od")
endif()
file(GLOB SOEM_SOURCES soem/*.c)
file(GLOB OSAL_SOURCES osal/${OS}/*.c)
file(GLOB OSHW_SOURCES oshw/${OS}/*.c)
if(WIN32)
set(SOEM_SOURCES ${SOEM_SOURCES})
endif()
file(GLOB SOEM_HEADERS soem/*.h)
file(GLOB OSAL_HEADERS osal/osal.h osal/${OS}/*.h)
file(GLOB OSHW_HEADERS oshw/${OS}/*.h)
if(${CMAKE_SYSTEM_NAME} MATCHES "rt-kernel")
file(GLOB OSHW_ARCHSOURCES oshw/${OS}/${ARCH}/*.c)
endif()
add_library(soem STATIC ${SOEM_SOURCES} ${OSAL_SOURCES} ${OSHW_SOURCES} ${OSHW_ARCHSOURCES})
if(WIN32)
target_link_libraries(soem wpcap.lib Packet.lib Ws2_32.lib Winmm.lib ${HDF5_LIBRARIES})
elseif(UNIX)
target_link_libraries(soem pthread rt)
endif()
install(TARGETS soem DESTINATION bin)
install(FILES ${SOEM_HEADERS} ${OSAL_HEADERS} ${OSHW_HEADERS} DESTINATION include)
add_subdirectory(test/linux/slaveinfo)
add_subdirectory(test/linux/eepromtool)
add_subdirectory(test/linux/simple_test)

View File

@ -1,20 +0,0 @@
#*****************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: Makefile 125 2012-04-01 17:36:17Z rtlaka $
#------------------------------------------------------------------------------
include $(PRJ_ROOT)/make/subdir.mk

27
README
View File

@ -1,27 +0,0 @@
To compile for linux:
go to project directory
source ./setup.sh linux
make all
Please read the doxygen documentation in doc/html/index.html
--------------------------------------------------------------
To complie for windows:
go to project directory
Build soem libary make_libsoem_lib.bat <Path to MSVC VC> <arch>
Ex: make_libsoem_lib.bat "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC" x86
Build test folder make_test_win32.bat <Path to MSVC VC> <arch>
Ex: make_test_win32.bat "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC" x86
Test: slavinfo.exe <wpcap device name>. slaveinfo.exe will print the \Device\NPF_{xxxxxx}'s
Ex. slaveinfo.exe \Device\NPF_{735D4B45-68D6-47A6-B826-E0DA26AC761A}

24
README.md Normal file
View File

@ -0,0 +1,24 @@
BUILDING
========
Prerequisites for all platforms
-------------------------------
* CMake 2.8.0 or later
Windows (Visual Studio)
-----------------------
* Start a Visual Studio command prompt then:
$ mkdir build
$ cd build
$ cmake .. -G "NMake Makefiles"
$ nmake
Linux
-----
$ mkdir build
$ cmake ..
$ make

View File

@ -1,10 +0,0 @@
@echo off
if NOT EXIST obj goto skip_obj
RMDIR /S /Q obj
:skip_obj
if NOT EXIST lib\win32 goto skip_lib
RMDIR /S /Q lib\win32
:skip_lib
echo clean done

View File

@ -1,54 +0,0 @@
@echo off
REM Build slave info
if NOT EXIST test\win32\slaveinfo\obj goto skip_obj
RMDIR /S /Q test\win32\slaveinfo\obj
:skip_obj
if NOT EXIST test\win32\slaveinfo\*.exe goto skip_exe
DEL /Q test\win32\slaveinfo\*.exe
:skip_exe
if NOT EXIST test\win32\slaveinfo\*.ilk goto skip_ilk
DEL /Q test\win32\slaveinfo\*.ilk
:skip_ilk
if NOT EXIST test\win32\slaveinfo\*.pdb goto skip_pdb
DEL /Q test\win32\slaveinfo\*.pdb
:skip_pdb
if NOT EXIST test\win32\slaveinfo\*.idb goto skip_idb
DEL /Q test\win32\slaveinfo\*.idb
:skip_idb
REM Simple_test info
if NOT EXIST test\win32\simple_test\obj goto skip_obj2
RMDIR /S /Q test\win32\simple_test\obj
:skip_obj2
if NOT EXIST test\win32\simple_test\*.exe goto skip_exe2
DEL /Q test\win32\simple_test\*.exe
:skip_exe2
if NOT EXIST test\win32\simple_test\*.ilk goto skip_ilk2
DEL /Q test\win32\simple_test\*.ilk
:skip_ilk2
if NOT EXIST test\win32\simple_test\*.pdb goto skip_pdb2
DEL /Q test\win32\simple_test\*.pdb
:skip_pdb2
if NOT EXIST test\win32\simple_test\*.idb goto skip_idb2
DEL /Q test\win32\simple_test\*.idb
:skip_idb2
REM eepromtool info
if NOT EXIST test\win32\eepromtool\obj goto skip_obj3
RMDIR /S /Q test\win32\eepromtool\obj
:skip_obj3
if NOT EXIST test\win32\eepromtool\*.exe goto skip_exe3
DEL /Q test\win32\eepromtool\*.exe
:skip_exe3
if NOT EXIST test\win32\eepromtool\*.ilk goto skip_ilk3
DEL /Q test\win32\eepromtool\*.ilk
:skip_ilk3
if NOT EXIST test\win32\eepromtool\*.pdb goto skip_pdb3
DEL /Q test\win32\eepromtool\*.pdb
:skip_pdb3
if NOT EXIST test\win32\eepromtool\*.idb goto skip_idb3
DEL /Q test\win32\eepromtool\*.idb
:skip_idb3
echo clean done

View File

@ -0,0 +1,13 @@
message("rt-kernel-C.cmake")
# Determine toolchain
include(CMakeForceCompiler)
if(${ARCH} MATCHES "kinetis")
cmake_force_c_compiler(arm-eabi-gcc GNU)
cmake_force_cxx_compiler(arm-eabi-g++ GNU)
elseif(${ARCH} MATCHES "bfin")
cmake_force_c_compiler(bfin-elf-gcc GNU)
cmake_force_cxx_compiler(bfin-elf-g++ GNU)
endif()

View File

@ -0,0 +1,3 @@
set(MACHINE "-mcpu=bf537")
set(LDFLAGS "-T${RT_KERNEL_PATH}/bsp/${BSP}/${BSP}.ld")

View File

@ -0,0 +1,7 @@
message("rt-kernel-gcc-kinetis.cmake")
#SET_PROPERTY(GLOBAL PROPERTY ARCH kinetis)
#SET_PROPERTY(GLOBAL PROPERTY BSP twrk60)
set(MACHINE "-mfpu=vfp -mcpu=cortex-m3 -mthumb")

View File

@ -0,0 +1,19 @@
message("rt-kernel-gcc.cmake")
set(CMAKE_C_OUTPUT_EXTENSION .o)
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
set(CFLAGS "${CFLAGS} -Wall -Wextra -Wno-unused-parameter -Werror")
set(CFLAGS "${CFLAGS} -fomit-frame-pointer -fno-strict-aliasing -fshort-wchar")
#set(CFLAGS" ${CFLAGS} -B$(GCC_PATH)/libexec/gcc")
set(CXXFLAGS "${CXXFLAGS} -fno-rtti -fno-exceptions")
set(LDFLAGS "${LDFLAGS} -nostartfiles")
set(CMAKE_C_FLAGS "${CFLAGS} ${MACHINE}" CACHE STRING "")
set(CMAKE_EXE_LINKER_FLAGS "${MACHINE} ${LDFLAGS}" CACHE STRING "")

View File

@ -0,0 +1,20 @@
if(__RTK_CMAKE_INCLUDED)
return()
endif()
set(__RTK_CMAKE_INCLUDED TRUE)
message("rt-kernel.cmake")
include_directories(
${RT_KERNEL_PATH}/include
${RT_KERNEL_PATH}/include/kern
${RT_KERNEL_PATH}/kern
${RT_KERNEL_PATH}/include/drivers
${RT_KERNEL_PATH}/include/arch/${ARCH}
${RT_KERNEL_PATH}/bsp/${BSP}/include
${RT_KERNEL_PATH}/lwip/src/include
${RT_KERNEL_PATH}/lwip/src/include/ipv4
)
link_directories(
${RT_KERNEL_PATH}/lib/${ARCH}
)

View File

@ -0,0 +1,9 @@
message("rt-kernel-kinetis.cmake")
set(CMAKE_SYSTEM_NAME rt-kernel)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSTEM_PROCESSOR bfin)
set(ARCH bfin CACHE STRING "Architecture")
set(BSP stamp537 CACHE STRING "Board")

View File

@ -0,0 +1,9 @@
message("rt-kernel-kinetis.cmake")
set(CMAKE_SYSTEM_NAME rt-kernel)
set(CMAKE_SYSTEM_VERSION 1)
set(CMAKE_SYSTEM_PROCESSOR kinetis)
set(ARCH kinetis CACHE STRING "Architecture")
set(BSP twrk60 CACHE STRING "Board")

View File

@ -1,58 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: app.mk 452 2013-02-26 21:02:58Z smf.arthur $
#------------------------------------------------------------------------------
OBJDIR = obj/$(ARCH)
LIBS += oshw osal soem
include $(PRJ_ROOT)/make/rules.mk
include $(PRJ_ROOT)/make/files.mk
ifeq ($(ARCH),linux)
LIBS += -lpthread -lrt
endif
SUBDIRS = $(patsubst %/,%,$(dir $(wildcard */Makefile)))
# Use .PHONY so link step always occurs. This is a simple way
# to avoid computing dependencies on libs
.PHONY: $(APPNAME)
$(APPNAME): $(OBJDIR) $(SUBDIRS) $(OBJDIR_OBJS) $(EXTRA_OBJS)
@echo --- Linking $@
$(SILENT)$(CC) $(LDFLAGS) $(LD_PATHS) $(OBJDIR)/*.o -o $@ $(LIBS)
$(OBJDIR):
@test -e $(OBJDIR) || $(MKDIR) $(OBJDIR)
.PHONY: $(SUBDIRS)
$(SUBDIRS):
@echo --- Entering $(CURDIR)/$@
@$(MAKE) -C $@ $(MAKECMDGOALS)
@echo --- Leaving $(CURDIR)/$@
.PHONY: clean
clean: $(SUBDIRS)
@$(RM) $(OBJDIR)/*
rm -rf obj/
@$(RM) $(APPNAME)
@$(RM) $(APPNAME).elf
@$(RM) $(APPNAME).map
ifneq ($(MAKECMDGOALS),clean)
-include $(DEPENDS)
endif

View File

@ -1,2 +0,0 @@
/c /I "soem" /I "osal" /I "osal\win32" /I "oshw\win32" /I "oshw\win32\wpcap\Include" /ZI /W3 /WX- /Od /Oy- /D "_CRT_SECURE_NO_WARNINGS" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /Gm /EHsc /RTC1 /MTd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"test\win32\eepromtool\obj\\" /Fd"test\win32\simple_test\vc100.pdb" /Gd /TC /analyze-
test\win32\eepromtool\eepromtool.c

View File

@ -1,12 +0,0 @@
/c /Zi /W3 /WX- /Od /Oy- /D "_CRT_SECURE_NO_WARNINGS" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /Gm /EHsc /RTC1 /MTd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"obj\\" /Fd"obj\vc100.pdb" /Gd /TC /analyze- /Odi /I "oshw\win32\wpcap\include" /I "osal" /I "osal\win32" /I "oshw\win32" /I "soem"
oshw\win32\nicdrv.c
oshw\win32\oshw.c
soem\ethercatbase.c
soem\ethercatcoe.c
soem\ethercatconfig.c
soem\ethercatdc.c
soem\ethercatfoe.c
soem\ethercatmain.c
soem\ethercatprint.c
soem\ethercatsoe.c
osal\win32\osal.c

View File

@ -1,2 +0,0 @@
/c /I "soem" /I "osal" /I "osal\win32" /I "oshw\win32" /I "oshw\win32\wpcap\Include" /ZI /W3 /WX- /Od /Oy- /D "_CRT_SECURE_NO_WARNINGS" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /Gm /EHsc /RTC1 /MTd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"test\win32\simple_test\obj\\" /Fd"test\win32\simple_test\vc100.pdb" /Gd /TC /analyze-
test\win32\simple_test\simple_test.c

View File

@ -1,2 +0,0 @@
/c /I "soem" /I "osal" /I "osal\win32" /I "oshw\win32" /I "oshw\win32\wpcap\Include" /ZI /W3 /WX- /Od /Oy- /D "_CRT_SECURE_NO_WARNINGS" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_UNICODE" /D "UNICODE" /Gm /EHsc /RTC1 /MTd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Fo"test\win32\slaveinfo\obj\\" /Fd"test\win32\slaveinfo\vc100.pdb" /Gd /TC /analyze-
test\win32\slaveinfo\slaveinfo.c

View File

@ -1,34 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: arm-eabi-gcc.mk 125 2012-04-01 17:36:17Z rtlaka $
#------------------------------------------------------------------------------
# Prefix of the cross-compiler
CROSS_GCC := arm-eabi
# Common settings
include $(PRJ_ROOT)/make/compilers/gcc.mk
# Machine settings
-include $(PRJ_ROOT)/make/compilers/$(ARCH).mk
# Default machine settings
MACHINE ?= -mthumb-interwork -mlittle-endian -mthumb
# Compiler flags
CFLAGS += $(MACHINE) -fshort-wchar
LDFLAGS += $(MACHINE) -Wl,--no-wchar-size-warning

View File

@ -1,34 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: bfin-elf-gcc.mk 125 2012-04-01 17:36:17Z rtlaka $
#------------------------------------------------------------------------------
# Prefix of the cross-compiler
CROSS_GCC := bfin-elf
# Common settings
include $(PRJ_ROOT)/make/compilers/gcc.mk
# Machine settings
-include $(PRJ_ROOT)/make/compilers/$(ARCH).mk
# Default machine settings
MACHINE ?= -mcpu=bf537
# Compiler flags
CFLAGS += $(MACHINE) -fshort-wchar
LDFLAGS += $(MACHINE)

View File

@ -1,64 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2008. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: gcc.mk 125 2012-04-01 17:36:17Z rtlaka $
#------------------------------------------------------------------------------
# Compiler executables
ifeq ($(ARCH),linux)
CC := $(GCC_PATH)/gcc
AS := $(GCC_PATH)/as
LD := $(GCC_PATH)/ld
AR := $(GCC_PATH)/ar
SIZE := $(GCC_PATH)/size
CPP :=$(CC) -E -xc -P
OBJCOPY := $(GCC_PATH)/objcopy
else
CC := $(GCC_PATH)/bin/$(CROSS_GCC)-gcc
AS := $(GCC_PATH)/bin/$(CROSS_GCC)-as
LD := $(GCC_PATH)/bin/$(CROSS_GCC)-ld
AR := $(GCC_PATH)/bin/$(CROSS_GCC)-ar
SIZE := $(GCC_PATH)/bin/$(CROSS_GCC)-size
CPP :=$(CC) -E -xc -P
OBJCOPY := $(GCC_PATH)/bin/$(CROSS_GCC)-objcopy
LDFLAGS = -nostartfiles -T"$(LD_SCRIPT)"
endif
# Host executables (TODO: move to host-specific settings)
RM := rm -f
MKDIR := mkdir -p
# Include paths
CC_INC_PATH = $(GCC_PATH)/$(CROSS_GCC)/include
# Compiler flags
CFLAGS = -Wall -Wextra -Wno-unused-parameter #-Werror
CFLAGS += -fomit-frame-pointer -fno-strict-aliasing
CFLAGS += -B$(GCC_PATH)/libexec/gcc
# Compiler C++ flags
CPPFLAGS = -fno-rtti -fno-exceptions
# Linker flags
LDFLAGS += -Wl,-Map=$(APPNAME).map
# Libraries
LLIBS = $(patsubst %,-l%,$(LIBS))
LIBS := -Wl,--start-group $(LLIBS) -lc -lm -Wl,--end-group
# Directories
LIBDIR = "$(PRJ_ROOT)/lib/$(ARCH)"

View File

@ -1,27 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: linux-gcc.mk 125 2012-04-01 17:36:17Z rtlaka $
#------------------------------------------------------------------------------
# Prefix of the cross-compiler
# Common settings
include $(PRJ_ROOT)/make/compilers/gcc.mk
# Compiler flags
CFLAGS += $(MACHINE)
LDFLAGS += $(MACHINE)

View File

@ -1,39 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: powerpc-eabi-gcc.mk 125 2012-04-01 17:36:17Z rtlaka $
#------------------------------------------------------------------------------
# Prefix of the cross-compiler
CROSS_GCC := powerpc-eabi
# Common settings
include $(PRJ_ROOT)/make/compilers/gcc.mk
# Machine settings
-include $(PRJ_ROOT)/make/compilers/$(ARCH).mk
# Default machine settings
# mcpu 750 use an 603,604 specific instuction stfiwx
# this inst is not implemnted OK in QEMU, cause a program expection 7
# mcpu=powerpc is a generic type used for now
#MACHINE ?= -mbig -mregnames -mcpu=750 -mcall-sysv -meabi
MACHINE ?= -mbig -mregnames -mcpu=powerpc -mcall-sysv -meabi
# Compiler flags
CFLAGS += $(MACHINE) -fshort-wchar
LDFLAGS += $(MACHINE)

View File

@ -1,35 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2007. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: powerpc-eabispe-gcc.mk 125 2012-04-01 17:36:17Z rtlaka $
#------------------------------------------------------------------------------
# Prefix of the cross-compiler
CROSS_GCC := powerpc-eabispe
# Common settings
include $(PRJ_ROOT)/make/compilers/gcc.mk
# Machine settings
-include $(PRJ_ROOT)/make/compilers/$(ARCH).mk
# Default machine settings
MACHINE ?= -mcpu=8540 -mregnames -mmultiple -mabi=spe
# Compiler flags
CFLAGS += $(MACHINE) -fshort-wchar
LDFLAGS += $(MACHINE)

View File

@ -1,30 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: files.mk 125 2012-04-01 17:36:17Z rtlaka $
#------------------------------------------------------------------------------
S_SRC ?= $(wildcard *.S)
C_SRC ?= $(wildcard *.c)
CPP_SRC ?= $(wildcard *.cpp)
S_OBJS := $(patsubst %.S,%.o,$(S_SRC))
C_OBJS := $(patsubst %.c,%.o,$(C_SRC))
CPP_OBJS := $(patsubst %.cpp,%.o,$(CPP_SRC))
OBJS := $(S_OBJS) $(C_OBJS) $(CPP_OBJS) $(TT_OBJS)
OBJDIR_OBJS = $(patsubst %,$(OBJDIR)/%,$(OBJS))
DEPENDS := $(patsubst %.o,%.d,$(OBJDIR_OBJS))

View File

@ -1,51 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: lib.mk 452 2013-02-26 21:02:58Z smf.arthur $
#------------------------------------------------------------------------------
OBJDIR = ./obj/$(ARCH)
include $(PRJ_ROOT)/make/rules.mk
include $(PRJ_ROOT)/make/files.mk
SUBDIRS = $(patsubst %/,%,$(dir $(wildcard */Makefile)))
all: lib$(LIBNAME).a
lib$(LIBNAME).a: $(OBJDIR) $(SUBDIRS) $(OBJDIR_OBJS)
@echo --- Create library $@
@test -e $(LIBDIR) || $(MKDIR) $(LIBDIR)
$(SILENT)$(AR) crus $(LIBDIR)/$@ $(OBJDIR)/*.o
$(OBJDIR):
@test -e $(OBJDIR) || $(MKDIR) $(OBJDIR)
.PHONY: $(SUBDIRS)
$(SUBDIRS):
@echo --- Entering $(CURDIR)/$@
@$(MAKE) -C $@ $(MAKECMDGOALS)
@echo --- Leaving $(CURDIR)/$@
.PHONY: clean
clean: $(SUBDIRS)
$(RM) $(OBJDIR)/*
rm -rf ./obj
$(RM) $(LIBDIR)/lib$(LIBNAME).a
ifneq ($(MAKECMDGOALS),clean)
-include $(DEPENDS)
endif

View File

@ -1,12 +0,0 @@
/OUT:lib\win32\libsoem.lib
.\obj\nicdrv.obj
.\obj\oshw.obj
.\obj\ethercatbase.obj
.\obj\ethercatcoe.obj
.\obj\ethercatconfig.obj
.\obj\ethercatdc.obj
.\obj\ethercatfoe.obj
.\obj\ethercatmain.obj
.\obj\ethercatprint.obj
.\obj\ethercatsoe.obj
.\obj\osal.obj

View File

@ -1,3 +0,0 @@
/OUT:"test\win32\eepromtool\eepromtool.exe" /LIBPATH:"oshw\win32\wpcap\Lib" /LIBPATH:"lib\win32" Ws2_32.lib Winmm.lib Packet.lib wpcap.lib libsoem.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /DEBUG /PDB:"test\win32\eepromtool\eepromtool.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86
"test\win32\eepromtool\obj\eepromtool.obj"

View File

@ -1,3 +0,0 @@
/OUT:"test\win32\simple_test\simple_test.exe" /LIBPATH:"oshw\win32\wpcap\Lib" /LIBPATH:"lib\win32" Ws2_32.lib Winmm.lib Packet.lib wpcap.lib libsoem.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /DEBUG /PDB:"test\win32\simple_test\simple_test.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86
"test\win32\simple_test\obj\simple_test.obj"

View File

@ -1,3 +0,0 @@
/OUT:"test\win32\slaveinfo\slaveinfo.exe" /LIBPATH:"oshw\win32\wpcap\Lib" /LIBPATH:"lib\win32" Ws2_32.lib Winmm.lib Packet.lib wpcap.lib libsoem.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /DEBUG /PDB:"test\win32\slaveinfo\slaveinfo.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /MACHINE:X86
"test\win32\slaveinfo\obj\slaveinfo.obj"

View File

@ -1,68 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: rules.mk 414 2012-12-03 10:48:42Z rtlaka $
#------------------------------------------------------------------------------
# Compiler specific settings
include $(PRJ_ROOT)/make/compilers/$(CROSS_GCC)-gcc.mk
# Include paths
DEFAULT_INC_PATH += $(PRJ_ROOT)/osal
DEFAULT_INC_PATH += $(PRJ_ROOT)/osal/$(BSP)
DEFAULT_INC_PATH += $(PRJ_ROOT)/oshw/$(BSP)
DEFAULT_INC_PATH += $(PRJ_ROOT)/soem
INC_PATH = $(DEFAULT_INC_PATH) $(CC_INC_PATH) $(EXTRA_INCLUDES)
INC_PATHS = $(patsubst %,-I"%",$(INC_PATH))
# Library paths
LD_PATH += $(LIBDIR)
LD_PATH += $(EXTRA_LD_PATHS)
LD_PATHS = $(patsubst %,-L%,$(LD_PATH))
# Dependency generation
CFLAGS += -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@:%.o=%.d)"
# Common settings
CFLAGS += -g -O0 -ffunction-sections
LDFLAGS += -Wl,--gc-sections
# Command-line overrides
CFLAGS += $(EXTRA_CFLAGS)
CPPFLAGS += $(EXTRA_CPPFLAGS)
LDFLAGS += $(EXTRA_LDFLAGS)
SILENT=@
# Rules
.SUFFIXES:
$(OBJDIR)/%.o: %.S
@echo --- Assembling $<
$(SILENT)$(CC) $(CFLAGS) $(INC_PATHS) -c $< -o $@
$(OBJDIR)/%.o: %.c
@echo --- Compiling $<
$(SILENT)$(CC) $(CFLAGS) $(INC_PATHS) -c $< -o $@
$(OBJDIR)/%.o: %.cpp
@echo --- Compiling $<
$(SILENT)$(CC) $(CFLAGS) $(CPPFLAGS) $(INC_PATHS) -c $< -o $@

View File

@ -1,54 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: subdir.mk 125 2012-04-01 17:36:17Z rtlaka $
#------------------------------------------------------------------------------
OBJDIR ?= ../obj/$(ARCH)
include $(PRJ_ROOT)/make/rules.mk
include $(PRJ_ROOT)/make/files.mk
SUBDIRS ?= $(patsubst %/,%,$(dir $(wildcard */Makefile)))
LATEDIRS ?= $(patsubst %/,%,$(dir $(wildcard */.late)))
EARLYDIRS ?= $(filter-out $(LATEDIRS), $(SUBDIRS))
ALLDIRS = $(EARLYDIRS) $(LATEDIRS)
ifneq ($(strip $(OBJS)),)
all: $(OBJDIR) $(ALLDIRS) $(OBJDIR_OBJS)
else
all: $(ALLDIRS) $(OBJDIR_OBJS)
endif
$(LATEDIRS): $(EARLYDIRS)
$(OBJDIR):
@test -e $(OBJDIR) || $(MKDIR) $(OBJDIR)
.PHONY: $(ALLDIRS)
$(ALLDIRS):
@echo --- Entering $(CURDIR)/$@
@$(MAKE) --no-print-directory -C $@ $(MAKECMDGOALS)
@echo --- Leaving $(CURDIR)/$@
.PHONY: clean
clean: $(ALLDIRS)
$(RM) $(OBJDIR)/*
ifneq ($(MAKECMDGOALS),clean)
-include $(DEPENDS)
endif

View File

@ -1,40 +0,0 @@
REM @echo off
rem give path as arg
if "%~1"=="" goto exit_err_arg
if NOT EXIST %1 goto exit_err_arg
rem call cvarsall to load the env
call "%~1\vcvarsall.bat" %2
rem cd to folder containing .bat file
cd /d "%0\.."
rem compile and build library
if EXIST obj goto skip_obj
MKDIR obj
:skip_obj
cl.exe @make\cl_libsoem.rsp /errorReport:prompt
if EXIST lib\win32 goto skip_lib
MKDIR lib\win32
:skip_lib
lib.exe @make\lib_libsoem.rsp /nologo /errorReport:prompt
echo make done
goto :eof
:exit_err_arg
echo supply path to MSVC folder that contain vcvarsall.bat as ARG to batch file and ARCH
echo "Ex. make_libsoem_lib.bat "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC" x86
goto :eof
:usage
echo Error in script usage. The correct usage is:
echo %0 [option]
echo where [option] is: x86 ^| ia64 ^| amd64 ^| x86_amd64 ^| x86_ia64
echo:
echo For example:
echo %0 x86_ia64
goto :eof

View File

@ -1,35 +0,0 @@
REM @echo off
rem give path as arg
if "%~1"=="" goto exit_err_arg
if NOT EXIST %1 goto exit_err_arg
rem call cvarsall to load the env
call "%~1\vcvarsall.bat" %2
rem cd to folder containing .bat file
cd /d "%0\.."
rem compile and build library
if EXIST test\win32\slaveinfo\obj goto skip_obj
MKDIR test\win32\slaveinfo\obj
:skip_obj
cl.exe @make\cl_slaveinfo.rsp /errorReport:prompt
link.exe @make\link_slaveinfo.rsp /nologo /errorReport:prompt
echo make done
goto :eof
:exit_err_arg
echo supply path to MSVC folder that contain vcvarsall.bat as ARG to batch file and ARCH
echo "Ex. make_libsoem_lib.bat "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC" x86
goto :eof
:usage
echo Error in script usage. The correct usage is:
echo %0 [option]
echo where [option] is: x86 ^| ia64 ^| amd64 ^| x86_amd64 ^| x86_ia64
echo:
echo For example:
echo %0 x86_ia64
goto :eof

View File

@ -1,33 +0,0 @@
@echo off
rem compile and build library
if EXIST obj goto skip_obj
MKDIR obj
:skip_obj
cl.exe @make\cl_libsoem.rsp /errorReport:prompt
if EXIST lib\win32 goto skip_lib
MKDIR lib\win32
:skip_lib
lib.exe @make\lib_libsoem.rsp /nologo /errorReport:prompt
rem compile and build test applications
if EXIST test\win32\slaveinfo\obj goto skip_obj
MKDIR test\win32\slaveinfo\obj
:skip_obj
cl.exe @make\cl_slaveinfo.rsp /errorReport:prompt
link.exe @make\link_slaveinfo.rsp /nologo /errorReport:prompt
if EXIST test\win32\simple_test\obj goto skip_obj2
MKDIR test\win32\simple_test\obj
:skip_obj2
cl.exe @make\cl_simple_test.rsp /errorReport:prompt
link.exe @make\link_simple_test.rsp /nologo /errorReport:prompt
if EXIST test\win32\eepromtool\obj goto skip_obj3
MKDIR test\win32\eepromtool\obj
:skip_obj3
cl.exe @make\cl_eepromtool.rsp /errorReport:prompt
link.exe @make\link_eepromtool.rsp /nologo /errorReport:prompt
echo make done
goto :eof

View File

@ -1,23 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: Makefile 175 2012-06-21 07:14:12Z rtlaka $
#------------------------------------------------------------------------------
SUBDIRS = $(BSP)
include $(PRJ_ROOT)/make/subdir.mk

View File

@ -1,21 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: Makefile 175 2012-06-21 07:14:12Z rtlaka $
#------------------------------------------------------------------------------
SUBDIRS = $(BSP)
include $(PRJ_ROOT)/make/subdir.mk

View File

@ -1,21 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2009. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: Makefile 262 2012-08-14 06:14:07Z rtlaka $
#------------------------------------------------------------------------------
LIBNAME = oshw
include $(PRJ_ROOT)/make/lib.mk

View File

@ -1,62 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2007. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: setup.sh 125 2012-04-01 17:36:17Z rtlaka $
#------------------------------------------------------------------------------
arch=$1
bsp=$2
case $arch in
arm9e|lpc21xx|lpc23xx|lpc31xx|lpc32xx|at91|stm32|omapl1xx|efm32| \
imx53|kinetis|imx28|am37xx|lpc17xx)
export CROSS_GCC=arm-eabi
;;
bfin)
export CROSS_GCC=bfin-elf
;;
ppc604)
export CROSS_GCC=powerpc-eabi
;;
mpc55xx|mpc551x)
export CROSS_GCC=powerpc-eabispe
;;
linux)
bsp=$arch
export CROSS_GCC=linux
;;
win32)
;;
*)
echo "Unknown architecture $arch"
;;
esac
export PRJ_ROOT=`pwd`
if [ "$arch" == "linux" ]; then
export GCC_PATH=${COMPILERS:-/usr/bin}
else
export GCC_PATH=${COMPILERS:-/opt/rt-tools/compilers}/$CROSS_GCC
fi
export ARCH=$arch
export BSP=$bsp
# Set path for binaries
export PATH=$GCC_PATH/bin:$PATH

View File

@ -1,21 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2009. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: Makefile 126 2012-04-01 17:40:22Z rtlaka $
#------------------------------------------------------------------------------
LIBNAME = soem
include $(PRJ_ROOT)/make/lib.mk

View File

@ -1,21 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: Makefile 175 2012-06-21 07:14:12Z rtlaka $
#------------------------------------------------------------------------------
SUBDIRS = $(BSP)
include $(PRJ_ROOT)/make/subdir.mk

View File

@ -1,33 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: Makefile 178 2012-06-21 11:51:19Z rtlaka $
#------------------------------------------------------------------------------
SUBDIRS = ebox eepromtool red_test simple_test slaveinfo firm_update
all: subdirs
subdirs:
@for dir in $(SUBDIRS); do \
($(MAKE) -C $$dir all) || exit; \
done
clean:
@for dir in $(SUBDIRS); do \
($(MAKE) -C $$dir clean) \
done

View File

@ -1,24 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: Makefile 125 2012-04-01 17:36:17Z rtlaka $
#------------------------------------------------------------------------------
APPNAME = ebox
all: $(APPNAME)
include $(PRJ_ROOT)/make/app.mk

View File

@ -0,0 +1,12 @@
set(SOURCES eepromtool.c)
add_executable(eepromtool ${SOURCES})
target_link_libraries(eepromtool soem)
if(WIN32)
target_link_libraries(eepromtool wpcap.lib Packet.lib Ws2_32.lib Winmm.lib)
elseif(UNIX)
target_link_libraries(eepromtool pthread rt)
endif()
install(TARGETS eepromtool DESTINATION bin)

View File

@ -1,24 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: Makefile 125 2012-04-01 17:36:17Z rtlaka $
#------------------------------------------------------------------------------
APPNAME = eepromtool
all: $(APPNAME)
include $(PRJ_ROOT)/make/app.mk

View File

@ -1,24 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: Makefile 178 2012-06-21 11:51:19Z rtlaka $
#------------------------------------------------------------------------------
APPNAME = firm_update
all: $(APPNAME)
include $(PRJ_ROOT)/make/app.mk

View File

@ -1,24 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: Makefile 125 2012-04-01 17:36:17Z rtlaka $
#------------------------------------------------------------------------------
APPNAME = red_test
all: $(APPNAME)
include $(PRJ_ROOT)/make/app.mk

View File

@ -0,0 +1,12 @@
set(SOURCES simple_test.c)
add_executable(simple_test ${SOURCES})
target_link_libraries(simple_test soem)
if(WIN32)
target_link_libraries(simple_test wpcap.lib Packet.lib Ws2_32.lib Winmm.lib)
elseif(UNIX)
target_link_libraries(simple_test pthread rt)
endif()
install(TARGETS simple_test DESTINATION bin)

View File

@ -1,24 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: Makefile 125 2012-04-01 17:36:17Z rtlaka $
#------------------------------------------------------------------------------
APPNAME = simple_test
all: $(APPNAME)
include $(PRJ_ROOT)/make/app.mk

View File

@ -0,0 +1,14 @@
set(SOURCES slaveinfo.c)
add_executable(slaveinfo ${SOURCES})
target_link_libraries(slaveinfo soem)
if(WIN32)
target_link_libraries(slaveinfo wpcap.lib Packet.lib Ws2_32.lib Winmm.lib)
elseif(UNIX)
target_link_libraries(slaveinfo pthread rt)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "rt-kernel")
target_link_libraries(slaveinfo "-Wl,--start-group -l${BSP} -l${ARCH} -lkern -ldev -lsio -lblock -lfs -lusb -llwip -leth -li2c -lrtc -lcan -lnand -lspi -lnor -lpwm -ladc -ltrace -lc -lm -Wl,--end-group")
endif()
install(TARGETS slaveinfo DESTINATION bin)

View File

@ -1,24 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: Makefile 125 2012-04-01 17:36:17Z rtlaka $
#------------------------------------------------------------------------------
APPNAME = slaveinfo
all: $(APPNAME)
include $(PRJ_ROOT)/make/app.mk

View File

@ -1,33 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: Makefile 262 2012-08-14 06:14:07Z rtlaka $
#------------------------------------------------------------------------------
SUBDIRS = ebox eepromtool red_test simple_test slaveinfo firm_update
all: subdirs
subdirs:
@for dir in $(SUBDIRS); do \
($(MAKE) -C $$dir all) || exit; \
done
clean:
@for dir in $(SUBDIRS); do \
($(MAKE) -C $$dir clean) \
done

View File

@ -1,24 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: Makefile 262 2012-08-14 06:14:07Z rtlaka $
#------------------------------------------------------------------------------
APPNAME = ebox
all: $(APPNAME)
include $(PRJ_ROOT)/make/app.mk

View File

@ -1,24 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: Makefile 262 2012-08-14 06:14:07Z rtlaka $
#------------------------------------------------------------------------------
APPNAME = eepromtool
all: $(APPNAME)
include $(PRJ_ROOT)/make/app.mk

View File

@ -1,24 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: Makefile 262 2012-08-14 06:14:07Z rtlaka $
#------------------------------------------------------------------------------
APPNAME = firm_update
all: $(APPNAME)
include $(PRJ_ROOT)/make/app.mk

View File

@ -1,24 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: Makefile 262 2012-08-14 06:14:07Z rtlaka $
#------------------------------------------------------------------------------
APPNAME = red_test
all: $(APPNAME)
include $(PRJ_ROOT)/make/app.mk

View File

@ -1,24 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: Makefile 262 2012-08-14 06:14:07Z rtlaka $
#------------------------------------------------------------------------------
APPNAME = simple_test
all: $(APPNAME)
include $(PRJ_ROOT)/make/app.mk

View File

@ -1,24 +0,0 @@
#******************************************************************************
# * *** ***
# *** *** ***
# *** **** ********** *** ***** *** **** *****
# ********* ********** *** ********* ************ *********
# **** *** *** *** *** **** ***
# *** *** ****** *** *********** *** **** *****
# *** *** ****** *** ************* *** **** *****
# *** **** **** *** *** *** **** ***
# *** ******* ***** ************** ************* *********
# *** ***** *** ******* ** ** ****** *****
# t h e r e a l t i m e t a r g e t e x p e r t s
#
# http://www.rt-labs.com
# Copyright (C) 2006. rt-labs AB, Sweden. All rights reserved.
#------------------------------------------------------------------------------
# $Id: Makefile 262 2012-08-14 06:14:07Z rtlaka $
#------------------------------------------------------------------------------
APPNAME = slaveinfo
all: $(APPNAME)
include $(PRJ_ROOT)/make/app.mk