| @@ -0,0 +1,181 @@ | ||
| #Generated by VisualGDB project wizard. | ||
| #Note: VisualGDB will automatically update this file when you add new sources to the project. | ||
| #All other changes you make in this file will be preserved. | ||
| #Visit http://visualgdb.com/makefiles for more details | ||
|
|
||
| #VisualGDB: AutoSourceFiles #<--- remove this line to disable auto-updating of SOURCEFILES and EXTERNAL_LIBS | ||
|
|
||
| TARGETNAME := qr-test. | ||
| #TARGETTYPE can be APP, STATIC or SHARED | ||
| TARGETTYPE := APP | ||
|
|
||
| to_lowercase = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1)))))))))))))))))))))))))) | ||
|
|
||
| CONFIG ?= DEBUG | ||
|
|
||
| CONFIGURATION_FLAGS_FILE := $(call to_lowercase,$(CONFIG)).mak | ||
|
|
||
| include $(CONFIGURATION_FLAGS_FILE) | ||
|
|
||
| #LINKER_SCRIPT defined inside the configuration file (e.g. debug.mak) should override any linker scripts defined in shared .mak files | ||
| CONFIGURATION_LINKER_SCRIPT := $(LINKER_SCRIPT) | ||
|
|
||
| include $(ADDITIONAL_MAKE_FILES) | ||
|
|
||
| ifneq ($(CONFIGURATION_LINKER_SCRIPT),) | ||
| LINKER_SCRIPT := $(CONFIGURATION_LINKER_SCRIPT) | ||
| endif | ||
|
|
||
| ifneq ($(LINKER_SCRIPT),) | ||
| LDFLAGS += -T$(LINKER_SCRIPT) | ||
| endif | ||
|
|
||
| ifeq ($(BINARYDIR),) | ||
| error: | ||
| $(error Invalid configuration, please check your inputs) | ||
| endif | ||
|
|
||
| SOURCEFILES := CaptureDevice.cpp qr-test.cpp | ||
| EXTERNAL_LIBS := | ||
| EXTERNAL_LIBS_COPIED := $(foreach lib, $(EXTERNAL_LIBS),$(BINARYDIR)/$(notdir $(lib))) | ||
|
|
||
| CFLAGS += $(COMMONFLAGS) | ||
| CXXFLAGS += $(COMMONFLAGS) | ||
| ASFLAGS += $(COMMONFLAGS) | ||
| LDFLAGS += $(COMMONFLAGS) | ||
|
|
||
| CFLAGS += $(addprefix -I,$(INCLUDE_DIRS)) | ||
| CXXFLAGS += $(addprefix -I,$(INCLUDE_DIRS)) | ||
|
|
||
| CFLAGS += $(addprefix -D,$(PREPROCESSOR_MACROS)) | ||
| CXXFLAGS += $(addprefix -D,$(PREPROCESSOR_MACROS)) | ||
| ASFLAGS += $(addprefix -D,$(PREPROCESSOR_MACROS)) | ||
|
|
||
| CXXFLAGS += $(addprefix -framework ,$(MACOS_FRAMEWORKS)) | ||
| CFLAGS += $(addprefix -framework ,$(MACOS_FRAMEWORKS)) | ||
| LDFLAGS += $(addprefix -framework ,$(MACOS_FRAMEWORKS)) | ||
|
|
||
| LDFLAGS += $(addprefix -L,$(LIBRARY_DIRS)) | ||
|
|
||
| ifeq ($(GENERATE_MAP_FILE),1) | ||
| LDFLAGS += -Wl,-Map=$(BINARYDIR)/$(basename $(TARGETNAME)).map | ||
| endif | ||
|
|
||
| LIBRARY_LDFLAGS = $(addprefix -l,$(LIBRARY_NAMES)) | ||
|
|
||
| ifeq ($(IS_LINUX_PROJECT),1) | ||
| RPATH_PREFIX := -Wl,--rpath='$$ORIGIN/../ | ||
| LIBRARY_LDFLAGS += $(EXTERNAL_LIBS) | ||
| LIBRARY_LDFLAGS += -Wl,--rpath='$$ORIGIN' | ||
| LIBRARY_LDFLAGS += $(addsuffix ',$(addprefix $(RPATH_PREFIX),$(dir $(EXTERNAL_LIBS)))) | ||
|
|
||
| ifeq ($(TARGETTYPE),SHARED) | ||
| CFLAGS += -fPIC | ||
| CXXFLAGS += -fPIC | ||
| ASFLAGS += -fPIC | ||
| LIBRARY_LDFLAGS += -Wl,-soname,$(TARGETNAME) | ||
| endif | ||
|
|
||
| ifneq ($(LINUX_PACKAGES),) | ||
| PACKAGE_CFLAGS := $(foreach pkg,$(LINUX_PACKAGES),$(shell pkg-config --cflags $(pkg))) | ||
| PACKAGE_LDFLAGS := $(foreach pkg,$(LINUX_PACKAGES),$(shell pkg-config --libs $(pkg))) | ||
| CFLAGS += $(PACKAGE_CFLAGS) | ||
| CXXFLAGS += $(PACKAGE_CFLAGS) | ||
| LIBRARY_LDFLAGS += $(PACKAGE_LDFLAGS) | ||
| endif | ||
| else | ||
| LIBRARY_LDFLAGS += $(EXTERNAL_LIBS) | ||
| endif | ||
|
|
||
| LIBRARY_LDFLAGS += $(ADDITIONAL_LINKER_INPUTS) | ||
|
|
||
| all_make_files := $(firstword $(MAKEFILE_LIST)) $(CONFIGURATION_FLAGS_FILE) $(ADDITIONAL_MAKE_FILES) | ||
|
|
||
| ifeq ($(STARTUPFILES),) | ||
| all_source_files := $(SOURCEFILES) | ||
| else | ||
| all_source_files := $(STARTUPFILES) $(filter-out $(STARTUPFILES),$(SOURCEFILES)) | ||
| endif | ||
|
|
||
| source_obj1 := $(all_source_files:.cpp=.o) | ||
| source_obj2 := $(source_obj1:.c=.o) | ||
| source_obj3 := $(source_obj2:.s=.o) | ||
| source_obj4 := $(source_obj3:.S=.o) | ||
| source_obj5 := $(source_obj4:.cc=.o) | ||
| source_objs := $(source_obj5:.cxx=.o) | ||
|
|
||
| all_objs := $(addprefix $(BINARYDIR)/, $(notdir $(source_objs))) | ||
|
|
||
| PRIMARY_OUTPUTS := | ||
|
|
||
| ifeq ($(GENERATE_BIN_FILE),1) | ||
| PRIMARY_OUTPUTS += $(BINARYDIR)/$(basename $(TARGETNAME)).bin | ||
| endif | ||
|
|
||
| ifeq ($(GENERATE_IHEX_FILE),1) | ||
| PRIMARY_OUTPUTS += $(BINARYDIR)/$(basename $(TARGETNAME)).ihex | ||
| endif | ||
|
|
||
| ifeq ($(PRIMARY_OUTPUTS),) | ||
| PRIMARY_OUTPUTS := $(BINARYDIR)/$(TARGETNAME) | ||
| endif | ||
|
|
||
| all: $(PRIMARY_OUTPUTS) | ||
|
|
||
| $(BINARYDIR)/$(basename $(TARGETNAME)).bin: $(BINARYDIR)/$(TARGETNAME) | ||
| $(OBJCOPY) -O binary $< $@ | ||
|
|
||
| $(BINARYDIR)/$(basename $(TARGETNAME)).ihex: $(BINARYDIR)/$(TARGETNAME) | ||
| $(OBJCOPY) -O ihex $< $@ | ||
|
|
||
| ifneq ($(LINKER_SCRIPT),) | ||
| $(BINARYDIR)/$(TARGETNAME): $(LINKER_SCRIPT) | ||
| endif | ||
|
|
||
| ifeq ($(TARGETTYPE),APP) | ||
| $(BINARYDIR)/$(TARGETNAME): $(all_objs) $(EXTERNAL_LIBS) | ||
| $(LD) -o $@ $(LDFLAGS) $(START_GROUP) $(all_objs) $(LIBRARY_LDFLAGS) $(END_GROUP) | ||
| endif | ||
|
|
||
| ifeq ($(TARGETTYPE),SHARED) | ||
| $(BINARYDIR)/$(TARGETNAME): $(all_objs) $(EXTERNAL_LIBS) | ||
| $(LD) -shared -o $@ $(LDFLAGS) $(START_GROUP) $(all_objs) $(LIBRARY_LDFLAGS) $(END_GROUP) | ||
| endif | ||
|
|
||
| ifeq ($(TARGETTYPE),STATIC) | ||
| $(BINARYDIR)/$(TARGETNAME): $(all_objs) | ||
| $(AR) -r $@ $^ | ||
| endif | ||
|
|
||
| -include $(all_objs:.o=.dep) | ||
|
|
||
| clean: | ||
| ifeq ($(USE_DEL_TO_CLEAN),1) | ||
| cmd /C del /S /Q $(BINARYDIR) | ||
| else | ||
| rm -rf $(BINARYDIR) | ||
| endif | ||
|
|
||
| $(BINARYDIR): | ||
| mkdir $(BINARYDIR) | ||
|
|
||
| #VisualGDB: FileSpecificTemplates #<--- VisualGDB will use the following lines to define rules for source files in subdirectories | ||
| $(BINARYDIR)/%.o : %.cpp $(all_make_files) |$(BINARYDIR) | ||
| $(CXX) $(CXXFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) | ||
|
|
||
| $(BINARYDIR)/%.o : %.c $(all_make_files) |$(BINARYDIR) | ||
| $(CC) $(CFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) | ||
|
|
||
| $(BINARYDIR)/%.o : %.S $(all_make_files) |$(BINARYDIR) | ||
| $(CC) $(CFLAGS) $(ASFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) | ||
|
|
||
| $(BINARYDIR)/%.o : %.s $(all_make_files) |$(BINARYDIR) | ||
| $(CC) $(CFLAGS) $(ASFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) | ||
|
|
||
| $(BINARYDIR)/%.o : %.cc $(all_make_files) |$(BINARYDIR) | ||
| $(CC) $(CFLAGS) $(CXXFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) | ||
|
|
||
| $(BINARYDIR)/%.o : %.cxx $(all_make_files) |$(BINARYDIR) | ||
| $(CC) $(CFLAGS) $(CXXFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) | ||
|
|
||
| #VisualGDB: GeneratedRules #<--- All lines below are auto-generated |
| @@ -0,0 +1,181 @@ | ||
| #Generated by VisualGDB project wizard. | ||
| #Note: VisualGDB will automatically update this file when you add new sources to the project. | ||
| #All other changes you make in this file will be preserved. | ||
| #Visit http://visualgdb.com/makefiles for more details | ||
|
|
||
| #VisualGDB: AutoSourceFiles #<--- remove this line to disable auto-updating of SOURCEFILES and EXTERNAL_LIBS | ||
|
|
||
| TARGETNAME := qr-test.so | ||
| #TARGETTYPE can be APP, STATIC or SHARED | ||
| TARGETTYPE := SHARED | ||
|
|
||
| to_lowercase = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1)))))))))))))))))))))))))) | ||
|
|
||
| CONFIG ?= DEBUG | ||
|
|
||
| CONFIGURATION_FLAGS_FILE := $(call to_lowercase,$(CONFIG)).mak | ||
|
|
||
| include $(CONFIGURATION_FLAGS_FILE) | ||
|
|
||
| #LINKER_SCRIPT defined inside the configuration file (e.g. debug.mak) should override any linker scripts defined in shared .mak files | ||
| CONFIGURATION_LINKER_SCRIPT := $(LINKER_SCRIPT) | ||
|
|
||
| include $(ADDITIONAL_MAKE_FILES) | ||
|
|
||
| ifneq ($(CONFIGURATION_LINKER_SCRIPT),) | ||
| LINKER_SCRIPT := $(CONFIGURATION_LINKER_SCRIPT) | ||
| endif | ||
|
|
||
| ifneq ($(LINKER_SCRIPT),) | ||
| LDFLAGS += -T$(LINKER_SCRIPT) | ||
| endif | ||
|
|
||
| ifeq ($(BINARYDIR),) | ||
| error: | ||
| $(error Invalid configuration, please check your inputs) | ||
| endif | ||
|
|
||
| SOURCEFILES := CaptureDevice.cpp qr-test.cpp | ||
| EXTERNAL_LIBS := | ||
| EXTERNAL_LIBS_COPIED := $(foreach lib, $(EXTERNAL_LIBS),$(BINARYDIR)/$(notdir $(lib))) | ||
|
|
||
| CFLAGS += $(COMMONFLAGS) | ||
| CXXFLAGS += $(COMMONFLAGS) | ||
| ASFLAGS += $(COMMONFLAGS) | ||
| LDFLAGS += $(COMMONFLAGS) | ||
|
|
||
| CFLAGS += $(addprefix -I,$(INCLUDE_DIRS)) | ||
| CXXFLAGS += $(addprefix -I,$(INCLUDE_DIRS)) | ||
|
|
||
| CFLAGS += $(addprefix -D,$(PREPROCESSOR_MACROS)) | ||
| CXXFLAGS += $(addprefix -D,$(PREPROCESSOR_MACROS)) | ||
| ASFLAGS += $(addprefix -D,$(PREPROCESSOR_MACROS)) | ||
|
|
||
| CXXFLAGS += $(addprefix -framework ,$(MACOS_FRAMEWORKS)) | ||
| CFLAGS += $(addprefix -framework ,$(MACOS_FRAMEWORKS)) | ||
| LDFLAGS += $(addprefix -framework ,$(MACOS_FRAMEWORKS)) | ||
|
|
||
| LDFLAGS += $(addprefix -L,$(LIBRARY_DIRS)) | ||
|
|
||
| ifeq ($(GENERATE_MAP_FILE),1) | ||
| LDFLAGS += -Wl,-Map=$(BINARYDIR)/$(basename $(TARGETNAME)).map | ||
| endif | ||
|
|
||
| LIBRARY_LDFLAGS = $(addprefix -l,$(LIBRARY_NAMES)) | ||
|
|
||
| ifeq ($(IS_LINUX_PROJECT),1) | ||
| RPATH_PREFIX := -Wl,--rpath='$$ORIGIN/../ | ||
| LIBRARY_LDFLAGS += $(EXTERNAL_LIBS) | ||
| LIBRARY_LDFLAGS += -Wl,--rpath='$$ORIGIN' | ||
| LIBRARY_LDFLAGS += $(addsuffix ',$(addprefix $(RPATH_PREFIX),$(dir $(EXTERNAL_LIBS)))) | ||
|
|
||
| ifeq ($(TARGETTYPE),SHARED) | ||
| CFLAGS += -fPIC | ||
| CXXFLAGS += -fPIC | ||
| ASFLAGS += -fPIC | ||
| LIBRARY_LDFLAGS += -Wl,-soname,$(TARGETNAME) | ||
| endif | ||
|
|
||
| ifneq ($(LINUX_PACKAGES),) | ||
| PACKAGE_CFLAGS := $(foreach pkg,$(LINUX_PACKAGES),$(shell pkg-config --cflags $(pkg))) | ||
| PACKAGE_LDFLAGS := $(foreach pkg,$(LINUX_PACKAGES),$(shell pkg-config --libs $(pkg))) | ||
| CFLAGS += $(PACKAGE_CFLAGS) | ||
| CXXFLAGS += $(PACKAGE_CFLAGS) | ||
| LIBRARY_LDFLAGS += $(PACKAGE_LDFLAGS) | ||
| endif | ||
| else | ||
| LIBRARY_LDFLAGS += $(EXTERNAL_LIBS) | ||
| endif | ||
|
|
||
| LIBRARY_LDFLAGS += $(ADDITIONAL_LINKER_INPUTS) | ||
|
|
||
| all_make_files := $(firstword $(MAKEFILE_LIST)) $(CONFIGURATION_FLAGS_FILE) $(ADDITIONAL_MAKE_FILES) | ||
|
|
||
| ifeq ($(STARTUPFILES),) | ||
| all_source_files := $(SOURCEFILES) | ||
| else | ||
| all_source_files := $(STARTUPFILES) $(filter-out $(STARTUPFILES),$(SOURCEFILES)) | ||
| endif | ||
|
|
||
| source_obj1 := $(all_source_files:.cpp=.o) | ||
| source_obj2 := $(source_obj1:.c=.o) | ||
| source_obj3 := $(source_obj2:.s=.o) | ||
| source_obj4 := $(source_obj3:.S=.o) | ||
| source_obj5 := $(source_obj4:.cc=.o) | ||
| source_objs := $(source_obj5:.cxx=.o) | ||
|
|
||
| all_objs := $(addprefix $(BINARYDIR)/, $(notdir $(source_objs))) | ||
|
|
||
| PRIMARY_OUTPUTS := | ||
|
|
||
| ifeq ($(GENERATE_BIN_FILE),1) | ||
| PRIMARY_OUTPUTS += $(BINARYDIR)/$(basename $(TARGETNAME)).bin | ||
| endif | ||
|
|
||
| ifeq ($(GENERATE_IHEX_FILE),1) | ||
| PRIMARY_OUTPUTS += $(BINARYDIR)/$(basename $(TARGETNAME)).ihex | ||
| endif | ||
|
|
||
| ifeq ($(PRIMARY_OUTPUTS),) | ||
| PRIMARY_OUTPUTS := $(BINARYDIR)/$(TARGETNAME) | ||
| endif | ||
|
|
||
| all: $(PRIMARY_OUTPUTS) | ||
|
|
||
| $(BINARYDIR)/$(basename $(TARGETNAME)).bin: $(BINARYDIR)/$(TARGETNAME) | ||
| $(OBJCOPY) -O binary $< $@ | ||
|
|
||
| $(BINARYDIR)/$(basename $(TARGETNAME)).ihex: $(BINARYDIR)/$(TARGETNAME) | ||
| $(OBJCOPY) -O ihex $< $@ | ||
|
|
||
| ifneq ($(LINKER_SCRIPT),) | ||
| $(BINARYDIR)/$(TARGETNAME): $(LINKER_SCRIPT) | ||
| endif | ||
|
|
||
| ifeq ($(TARGETTYPE),APP) | ||
| $(BINARYDIR)/$(TARGETNAME): $(all_objs) $(EXTERNAL_LIBS) | ||
| $(LD) -o $@ $(LDFLAGS) $(START_GROUP) $(all_objs) $(LIBRARY_LDFLAGS) $(END_GROUP) | ||
| endif | ||
|
|
||
| ifeq ($(TARGETTYPE),SHARED) | ||
| $(BINARYDIR)/$(TARGETNAME): $(all_objs) $(EXTERNAL_LIBS) | ||
| $(LD) -shared -o $@ $(LDFLAGS) $(START_GROUP) $(all_objs) $(LIBRARY_LDFLAGS) $(END_GROUP) | ||
| endif | ||
|
|
||
| ifeq ($(TARGETTYPE),STATIC) | ||
| $(BINARYDIR)/$(TARGETNAME): $(all_objs) | ||
| $(AR) -r $@ $^ | ||
| endif | ||
|
|
||
| -include $(all_objs:.o=.dep) | ||
|
|
||
| clean: | ||
| ifeq ($(USE_DEL_TO_CLEAN),1) | ||
| cmd /C del /S /Q $(BINARYDIR) | ||
| else | ||
| rm -rf $(BINARYDIR) | ||
| endif | ||
|
|
||
| $(BINARYDIR): | ||
| mkdir $(BINARYDIR) | ||
|
|
||
| #VisualGDB: FileSpecificTemplates #<--- VisualGDB will use the following lines to define rules for source files in subdirectories | ||
| $(BINARYDIR)/%.o : %.cpp $(all_make_files) |$(BINARYDIR) | ||
| $(CXX) $(CXXFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) | ||
|
|
||
| $(BINARYDIR)/%.o : %.c $(all_make_files) |$(BINARYDIR) | ||
| $(CC) $(CFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) | ||
|
|
||
| $(BINARYDIR)/%.o : %.S $(all_make_files) |$(BINARYDIR) | ||
| $(CC) $(CFLAGS) $(ASFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) | ||
|
|
||
| $(BINARYDIR)/%.o : %.s $(all_make_files) |$(BINARYDIR) | ||
| $(CC) $(CFLAGS) $(ASFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) | ||
|
|
||
| $(BINARYDIR)/%.o : %.cc $(all_make_files) |$(BINARYDIR) | ||
| $(CC) $(CFLAGS) $(CXXFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) | ||
|
|
||
| $(BINARYDIR)/%.o : %.cxx $(all_make_files) |$(BINARYDIR) | ||
| $(CC) $(CFLAGS) $(CXXFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) | ||
|
|
||
| #VisualGDB: GeneratedRules #<--- All lines below are auto-generated |
| @@ -0,0 +1,36 @@ | ||
| #Generated by VisualGDB (http://visualgdb.com) | ||
| #DO NOT EDIT THIS FILE MANUALLY UNLESS YOU ABSOLUTELY NEED TO | ||
| #USE VISUALGDB PROJECT PROPERTIES DIALOG INSTEAD | ||
|
|
||
| BINARYDIR := Debug | ||
|
|
||
| #Toolchain | ||
| CC := C:/SysGCC/Beaglebone/bin/arm-angstrom-linux-gnueabi-gcc.exe | ||
| CXX := C:/SysGCC/Beaglebone/bin/arm-angstrom-linux-gnueabi-g++.exe | ||
| LD := $(CXX) | ||
| AR := C:/SysGCC/Beaglebone/bin/arm-angstrom-linux-gnueabi-ar.exe | ||
| OBJCOPY := C:/SysGCC/Beaglebone/bin/arm-angstrom-linux-gnueabi-objcopy.exe | ||
|
|
||
| #Additional flags | ||
| PREPROCESSOR_MACROS := DEBUG=1 | ||
| INCLUDE_DIRS := | ||
| LIBRARY_DIRS := | ||
| LIBRARY_NAMES := pthread opencv_core opencv_highgui opencv_imgproc | ||
| ADDITIONAL_LINKER_INPUTS := | ||
| MACOS_FRAMEWORKS := | ||
| LINUX_PACKAGES := | ||
|
|
||
| CFLAGS := -ggdb -ffunction-sections -O0 -std=c++11 | ||
| CXXFLAGS := -ggdb -ffunction-sections -O0 -std=c++11 | ||
| ASFLAGS := | ||
| LDFLAGS := -Wl,-gc-sections | ||
| COMMONFLAGS := | ||
| LINKER_SCRIPT := | ||
|
|
||
| START_GROUP := -Wl,--start-group | ||
| END_GROUP := -Wl,--end-group | ||
|
|
||
| #Additional options detected from testing the toolchain | ||
| USE_DEL_TO_CLEAN := 1 | ||
| CP_NOT_AVAILABLE := 1 | ||
| IS_LINUX_PROJECT := 1 |
| @@ -0,0 +1,36 @@ | ||
| #Generated by VisualGDB (http://visualgdb.com) | ||
| #DO NOT EDIT THIS FILE MANUALLY UNLESS YOU ABSOLUTELY NEED TO | ||
| #USE VISUALGDB PROJECT PROPERTIES DIALOG INSTEAD | ||
|
|
||
| BINARYDIR := Debug | ||
|
|
||
| #Toolchain | ||
| CC := C:/SysGCC/Beaglebone/bin/arm-angstrom-linux-gnueabi-gcc.exe | ||
| CXX := C:/SysGCC/Beaglebone/bin/arm-angstrom-linux-gnueabi-g++.exe | ||
| LD := $(CXX) | ||
| AR := C:/SysGCC/Beaglebone/bin/arm-angstrom-linux-gnueabi-ar.exe | ||
| OBJCOPY := C:/SysGCC/Beaglebone/bin/arm-angstrom-linux-gnueabi-objcopy.exe | ||
|
|
||
| #Additional flags | ||
| PREPROCESSOR_MACROS := DEBUG=1 | ||
| INCLUDE_DIRS := | ||
| LIBRARY_DIRS := | ||
| LIBRARY_NAMES := opencv_core | ||
| ADDITIONAL_LINKER_INPUTS := | ||
| MACOS_FRAMEWORKS := | ||
| LINUX_PACKAGES := | ||
|
|
||
| CFLAGS := -ggdb -ffunction-sections -O0 -std=c++11 | ||
| CXXFLAGS := -ggdb -ffunction-sections -O0 -std=c++11 | ||
| ASFLAGS := | ||
| LDFLAGS := -Wl,-gc-sections | ||
| COMMONFLAGS := | ||
| LINKER_SCRIPT := | ||
|
|
||
| START_GROUP := -Wl,--start-group | ||
| END_GROUP := -Wl,--end-group | ||
|
|
||
| #Additional options detected from testing the toolchain | ||
| USE_DEL_TO_CLEAN := 1 | ||
| CP_NOT_AVAILABLE := 1 | ||
| IS_LINUX_PROJECT := 1 |
| @@ -0,0 +1,147 @@ | ||
| <?xml version="1.0"?> | ||
| <VisualGDBProjectSettings2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
| <ConfigurationName>Debug</ConfigurationName> | ||
| <Project xsi:type="com.visualgdb.project.linux"> | ||
| <CustomSourceDirectories> | ||
| <Directories /> | ||
| <PathStyle>MinGWUnixSlash</PathStyle> | ||
| </CustomSourceDirectories> | ||
| <DeploymentHost> | ||
| <HostName>192.168.7.2</HostName> | ||
| <Transport>SSH</Transport> | ||
| <UserName>root</UserName> | ||
| </DeploymentHost> | ||
| <AllowChangingHostForMainCommands>false</AllowChangingHostForMainCommands> | ||
| <SkipBuildIfNoSourceFilesChanged>false</SkipBuildIfNoSourceFilesChanged> | ||
| <IgnoreFileTransferErrors>false</IgnoreFileTransferErrors> | ||
| <RemoveRemoteDirectoryOnClean>false</RemoveRemoteDirectoryOnClean> | ||
| <SkipDeploymentTests>false</SkipDeploymentTests> | ||
| <MainSourceDirectoryForLocalBuilds>$(ProjectDir)</MainSourceDirectoryForLocalBuilds> | ||
| </Project> | ||
| <Build xsi:type="com.visualgdb.build.make"> | ||
| <MakeFilePathRelativeToSourceDir>Makefile</MakeFilePathRelativeToSourceDir> | ||
| <MakeConfigurationName>Debug</MakeConfigurationName> | ||
| <AdditionalMakeArguments /> | ||
| <Toolchain> | ||
| <Name>Beaglebone</Name> | ||
| <UniqueID>com.visualgdb.beaglebone</UniqueID> | ||
| <Location>C:\SysGCC\Beaglebone</Location> | ||
| <UnixSystem>false</UnixSystem> | ||
| <GCC>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-gcc.exe</GCC> | ||
| <GXX>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-g++.exe</GXX> | ||
| <GDB>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-gdb.exe</GDB> | ||
| <AR>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-ar.exe</AR> | ||
| <OBJCOPY>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-objcopy.exe</OBJCOPY> | ||
| <Make>C:\SysGCC\Beaglebone\bin\make.exe</Make> | ||
| <AdditionalPathDirectories> | ||
| <string>C:\SysGCC\Beaglebone\bin</string> | ||
| </AdditionalPathDirectories> | ||
| <RequireCmdExe>true</RequireCmdExe> | ||
| <RequireCtrlBreak>false</RequireCtrlBreak> | ||
| <SourceDirMapping> | ||
| <Directories /> | ||
| <PathStyle>MinGWUnixSlash</PathStyle> | ||
| </SourceDirMapping> | ||
| </Toolchain> | ||
| <MakeCommandTemplate> | ||
| <SkipWhenRunningCommandList>false</SkipWhenRunningCommandList> | ||
| <Command>cmd.exe</Command> | ||
| <Arguments>/c "C:\SysGCC\Beaglebone\bin\make.exe"</Arguments> | ||
| <WorkingDirectory>$(BuildDir)</WorkingDirectory> | ||
| <Environment> | ||
| <Records> | ||
| <Record> | ||
| <VariableName>LANG</VariableName> | ||
| <Value>en_US.UTF-8</Value> | ||
| </Record> | ||
| <Record> | ||
| <VariableName>PATH</VariableName> | ||
| <Value>C:\SysGCC\Beaglebone\bin;%PATH%</Value> | ||
| </Record> | ||
| </Records> | ||
| </Environment> | ||
| </MakeCommandTemplate> | ||
| </Build> | ||
| <Debug xsi:type="com.visualgdb.debug.remote"> | ||
| <AdditionalStartupCommands /> | ||
| <AdditionalGDBSettings> | ||
| <FilterSpuriousStoppedNotifications>false</FilterSpuriousStoppedNotifications> | ||
| <ForceSingleThreadedMode>false</ForceSingleThreadedMode> | ||
| <PendingBreakpointsSupported>true</PendingBreakpointsSupported> | ||
| <DisableChildRanges>false</DisableChildRanges> | ||
| <UseAppleExtensions>false</UseAppleExtensions> | ||
| <CanAcceptCommandsWhileRunning>false</CanAcceptCommandsWhileRunning> | ||
| <MakeLogFile>false</MakeLogFile> | ||
| <IgnoreModuleEventsWhileStepping>true</IgnoreModuleEventsWhileStepping> | ||
| <UseRelativePathsOnly>false</UseRelativePathsOnly> | ||
| <ExitAction>None</ExitAction> | ||
| <Features> | ||
| <DisableAutoDetection>false</DisableAutoDetection> | ||
| <UseFrameParameter>false</UseFrameParameter> | ||
| <SimpleValuesFlagSupported>false</SimpleValuesFlagSupported> | ||
| <ListLocalsSupported>false</ListLocalsSupported> | ||
| <ByteLevelMemoryCommandsAvailable>false</ByteLevelMemoryCommandsAvailable> | ||
| <ThreadInfoSupported>false</ThreadInfoSupported> | ||
| <PendingBreakpointsSupported>false</PendingBreakpointsSupported> | ||
| <SupportTargetCommand>false</SupportTargetCommand> | ||
| <ReliableBreakpointNotifications>false</ReliableBreakpointNotifications> | ||
| </Features> | ||
| <DisableDisassembly>false</DisableDisassembly> | ||
| <ExamineMemoryWithXCommand>false</ExamineMemoryWithXCommand> | ||
| <StepIntoNewInstanceEntry>main</StepIntoNewInstanceEntry> | ||
| <ExamineRegistersInRawFormat>true</ExamineRegistersInRawFormat> | ||
| <EnableSmartStepping>false</EnableSmartStepping> | ||
| <DisableSignals>false</DisableSignals> | ||
| <EnableAsyncExecutionMode>false</EnableAsyncExecutionMode> | ||
| <EnableNonStopMode>false</EnableNonStopMode> | ||
| </AdditionalGDBSettings> | ||
| <LaunchGDBSettings xsi:type="GDBLaunchParametersNewInstance"> | ||
| <GDBEnvironment> | ||
| <Records> | ||
| <Record> | ||
| <VariableName>LANG</VariableName> | ||
| <Value>en_US.UTF-8</Value> | ||
| </Record> | ||
| <Record> | ||
| <VariableName>PATH</VariableName> | ||
| <Value>C:\SysGCC\Beaglebone\bin;%PATH%</Value> | ||
| </Record> | ||
| </Records> | ||
| </GDBEnvironment> | ||
| <DebuggedProgram>$(TargetPath)</DebuggedProgram> | ||
| <GDBServerPort>2000</GDBServerPort> | ||
| <ProgramArguments /> | ||
| </LaunchGDBSettings> | ||
| <GenerateCtrlBreakInsteadOfCtrlC>false</GenerateCtrlBreakInsteadOfCtrlC> | ||
| <DeploymentTargetPath>/home/root//$(TargetFileName)</DeploymentTargetPath> | ||
| <X11WindowMode>Local</X11WindowMode> | ||
| <KeepConsoleAfterExit>false</KeepConsoleAfterExit> | ||
| <RunGDBUnderSudo>false</RunGDBUnderSudo> | ||
| <DeploymentMode>Auto</DeploymentMode> | ||
| <DeployWhenLaunchedWithoutDebugging>true</DeployWhenLaunchedWithoutDebugging> | ||
| </Debug> | ||
| <CustomBuild> | ||
| <PreBuildActions /> | ||
| <PostBuildActions /> | ||
| <PreCleanActions /> | ||
| <PostCleanActions /> | ||
| </CustomBuild> | ||
| <CustomDebug> | ||
| <PreDebugActions /> | ||
| <PostDebugActions /> | ||
| <DebugStopActions /> | ||
| <BreakMode>Default</BreakMode> | ||
| </CustomDebug> | ||
| <CustomShortcuts> | ||
| <Shortcuts /> | ||
| <ShowMessageAfterExecuting>true</ShowMessageAfterExecuting> | ||
| </CustomShortcuts> | ||
| <UserDefinedVariables /> | ||
| <ImportedPropertySheets /> | ||
| <CodeSense> | ||
| <Enabled>Unknown</Enabled> | ||
| <ExtraSettings> | ||
| <HideErrorsInSystemHeaders>true</HideErrorsInSystemHeaders> | ||
| </ExtraSettings> | ||
| </CodeSense> | ||
| </VisualGDBProjectSettings2> |
| @@ -0,0 +1,145 @@ | ||
| <?xml version="1.0"?> | ||
| <VisualGDBProjectSettings2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
| <ConfigurationName>Release</ConfigurationName> | ||
| <Project xsi:type="com.visualgdb.project.linux"> | ||
| <CustomSourceDirectories> | ||
| <Directories /> | ||
| <PathStyle>MinGWUnixSlash</PathStyle> | ||
| </CustomSourceDirectories> | ||
| <DeploymentHost> | ||
| <HostName>192.168.7.2</HostName> | ||
| <Transport>SSH</Transport> | ||
| <UserName>root</UserName> | ||
| </DeploymentHost> | ||
| <AllowChangingHostForMainCommands>false</AllowChangingHostForMainCommands> | ||
| <SkipBuildIfNoSourceFilesChanged>false</SkipBuildIfNoSourceFilesChanged> | ||
| <IgnoreFileTransferErrors>false</IgnoreFileTransferErrors> | ||
| <RemoveRemoteDirectoryOnClean>false</RemoveRemoteDirectoryOnClean> | ||
| <SkipDeploymentTests>false</SkipDeploymentTests> | ||
| <MainSourceDirectoryForLocalBuilds>$(ProjectDir)</MainSourceDirectoryForLocalBuilds> | ||
| </Project> | ||
| <Build xsi:type="com.visualgdb.build.make"> | ||
| <MakeFilePathRelativeToSourceDir>Makefile</MakeFilePathRelativeToSourceDir> | ||
| <MakeConfigurationName>Release</MakeConfigurationName> | ||
| <Toolchain> | ||
| <Name>Beaglebone</Name> | ||
| <UniqueID>com.visualgdb.beaglebone</UniqueID> | ||
| <Location>C:\SysGCC\Beaglebone</Location> | ||
| <UnixSystem>false</UnixSystem> | ||
| <GCC>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-gcc.exe</GCC> | ||
| <GXX>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-g++.exe</GXX> | ||
| <GDB>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-gdb.exe</GDB> | ||
| <AR>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-ar.exe</AR> | ||
| <OBJCOPY>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-objcopy.exe</OBJCOPY> | ||
| <Make>C:\SysGCC\Beaglebone\bin\make.exe</Make> | ||
| <AdditionalPathDirectories> | ||
| <string>C:\SysGCC\Beaglebone\bin</string> | ||
| </AdditionalPathDirectories> | ||
| <RequireCmdExe>true</RequireCmdExe> | ||
| <RequireCtrlBreak>false</RequireCtrlBreak> | ||
| <SourceDirMapping> | ||
| <Directories /> | ||
| <PathStyle>MinGWUnixSlash</PathStyle> | ||
| </SourceDirMapping> | ||
| </Toolchain> | ||
| <MakeCommandTemplate> | ||
| <SkipWhenRunningCommandList>false</SkipWhenRunningCommandList> | ||
| <Command>cmd.exe</Command> | ||
| <Arguments>/c "C:\SysGCC\Beaglebone\bin\make.exe"</Arguments> | ||
| <WorkingDirectory>$(BuildDir)</WorkingDirectory> | ||
| <Environment> | ||
| <Records> | ||
| <Record> | ||
| <VariableName>LANG</VariableName> | ||
| <Value>en_US.UTF-8</Value> | ||
| </Record> | ||
| <Record> | ||
| <VariableName>PATH</VariableName> | ||
| <Value>C:\SysGCC\Beaglebone\bin;%PATH%</Value> | ||
| </Record> | ||
| </Records> | ||
| </Environment> | ||
| </MakeCommandTemplate> | ||
| </Build> | ||
| <Debug xsi:type="com.visualgdb.debug.remote"> | ||
| <AdditionalStartupCommands /> | ||
| <AdditionalGDBSettings> | ||
| <FilterSpuriousStoppedNotifications>false</FilterSpuriousStoppedNotifications> | ||
| <ForceSingleThreadedMode>false</ForceSingleThreadedMode> | ||
| <PendingBreakpointsSupported>true</PendingBreakpointsSupported> | ||
| <DisableChildRanges>false</DisableChildRanges> | ||
| <UseAppleExtensions>false</UseAppleExtensions> | ||
| <CanAcceptCommandsWhileRunning>false</CanAcceptCommandsWhileRunning> | ||
| <MakeLogFile>false</MakeLogFile> | ||
| <IgnoreModuleEventsWhileStepping>true</IgnoreModuleEventsWhileStepping> | ||
| <UseRelativePathsOnly>false</UseRelativePathsOnly> | ||
| <ExitAction>None</ExitAction> | ||
| <Features> | ||
| <DisableAutoDetection>false</DisableAutoDetection> | ||
| <UseFrameParameter>false</UseFrameParameter> | ||
| <SimpleValuesFlagSupported>false</SimpleValuesFlagSupported> | ||
| <ListLocalsSupported>false</ListLocalsSupported> | ||
| <ByteLevelMemoryCommandsAvailable>false</ByteLevelMemoryCommandsAvailable> | ||
| <ThreadInfoSupported>false</ThreadInfoSupported> | ||
| <PendingBreakpointsSupported>false</PendingBreakpointsSupported> | ||
| <SupportTargetCommand>false</SupportTargetCommand> | ||
| <ReliableBreakpointNotifications>false</ReliableBreakpointNotifications> | ||
| </Features> | ||
| <DisableDisassembly>false</DisableDisassembly> | ||
| <ExamineMemoryWithXCommand>false</ExamineMemoryWithXCommand> | ||
| <StepIntoNewInstanceEntry>main</StepIntoNewInstanceEntry> | ||
| <ExamineRegistersInRawFormat>true</ExamineRegistersInRawFormat> | ||
| <EnableSmartStepping>false</EnableSmartStepping> | ||
| <DisableSignals>false</DisableSignals> | ||
| <EnableAsyncExecutionMode>false</EnableAsyncExecutionMode> | ||
| <EnableNonStopMode>false</EnableNonStopMode> | ||
| </AdditionalGDBSettings> | ||
| <LaunchGDBSettings xsi:type="GDBLaunchParametersNewInstance"> | ||
| <GDBEnvironment> | ||
| <Records> | ||
| <Record> | ||
| <VariableName>LANG</VariableName> | ||
| <Value>en_US.UTF-8</Value> | ||
| </Record> | ||
| <Record> | ||
| <VariableName>PATH</VariableName> | ||
| <Value>C:\SysGCC\Beaglebone\bin;%PATH%</Value> | ||
| </Record> | ||
| </Records> | ||
| </GDBEnvironment> | ||
| <DebuggedProgram>$(TargetPath)</DebuggedProgram> | ||
| <GDBServerPort>2000</GDBServerPort> | ||
| <ProgramArguments /> | ||
| </LaunchGDBSettings> | ||
| <GenerateCtrlBreakInsteadOfCtrlC>false</GenerateCtrlBreakInsteadOfCtrlC> | ||
| <DeploymentTargetPath>/home/root//$(TargetFileName)</DeploymentTargetPath> | ||
| <X11WindowMode>Local</X11WindowMode> | ||
| <KeepConsoleAfterExit>false</KeepConsoleAfterExit> | ||
| <RunGDBUnderSudo>false</RunGDBUnderSudo> | ||
| <DeploymentMode>Auto</DeploymentMode> | ||
| <DeployWhenLaunchedWithoutDebugging>true</DeployWhenLaunchedWithoutDebugging> | ||
| </Debug> | ||
| <CustomBuild> | ||
| <PreBuildActions /> | ||
| <PostBuildActions /> | ||
| <PreCleanActions /> | ||
| <PostCleanActions /> | ||
| </CustomBuild> | ||
| <CustomDebug> | ||
| <PreDebugActions /> | ||
| <PostDebugActions /> | ||
| <DebugStopActions /> | ||
| <BreakMode>Default</BreakMode> | ||
| </CustomDebug> | ||
| <CustomShortcuts> | ||
| <Shortcuts /> | ||
| <ShowMessageAfterExecuting>true</ShowMessageAfterExecuting> | ||
| </CustomShortcuts> | ||
| <UserDefinedVariables /> | ||
| <CodeSense> | ||
| <Enabled>Unknown</Enabled> | ||
| <ExtraSettings> | ||
| <HideErrorsInSystemHeaders>true</HideErrorsInSystemHeaders> | ||
| </ExtraSettings> | ||
| </CodeSense> | ||
| </VisualGDBProjectSettings2> |
| @@ -0,0 +1,39 @@ | ||
| #include <iostream> | ||
| #include "CaptureDevice.h" | ||
| #include <unistd.h> | ||
|
|
||
| #define MAX_TIMEOUTS 5 | ||
|
|
||
| using namespace std; | ||
|
|
||
| int main(int argc, char *argv[]) | ||
| { | ||
| CaptureDevice* camera = new CaptureDevice; | ||
| camera->openDevice(); | ||
| GrabFrameResponse gfResp; | ||
| auto timeouts = MAX_TIMEOUTS; | ||
|
|
||
| camera->startCapturing(); | ||
|
|
||
| while (timeouts > 0) | ||
| { | ||
| gfResp = camera->grabFrame(); | ||
| if (gfResp.status == -1) | ||
| { | ||
| std::cerr << "Capture device timeout out - " << timeouts << " attempts remaining" << std::endl; | ||
| timeouts--; | ||
| continue; | ||
| } | ||
| else if (gfResp.status == 1) | ||
| { | ||
| cv::imwrite("/home/root/capture.jpg", gfResp.frame); | ||
| } | ||
| gfResp.frame.release(); | ||
| usleep(75000); | ||
| } | ||
|
|
||
| camera->stopCapturing(); | ||
| camera->closeDevice(); | ||
| std::cout << "The capture device timed out " << MAX_TIMEOUTS << " times. Program Exiting." << std::endl; | ||
| exit(EXIT_FAILURE); | ||
| } |
| @@ -0,0 +1,82 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <ItemGroup Label="ProjectConfigurations"> | ||
| <ProjectConfiguration Include="Debug|Win32"> | ||
| <Configuration>Debug</Configuration> | ||
| <Platform>Win32</Platform> | ||
| </ProjectConfiguration> | ||
| <ProjectConfiguration Include="Release|Win32"> | ||
| <Configuration>Release</Configuration> | ||
| <Platform>Win32</Platform> | ||
| </ProjectConfiguration> | ||
| </ItemGroup> | ||
| <PropertyGroup Label="Globals"> | ||
| <ProjectGuid>{790CA9EF-9B93-4F62-BFDA-1EAFF5FBE3D7}</ProjectGuid> | ||
| </PropertyGroup> | ||
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> | ||
| <ConfigurationType>Makefile</ConfigurationType> | ||
| <UseDebugLibraries>true</UseDebugLibraries> | ||
| <PlatformToolset>v140</PlatformToolset> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | ||
| <ConfigurationType>Makefile</ConfigurationType> | ||
| <UseDebugLibraries>false</UseDebugLibraries> | ||
| <PlatformToolset>v140</PlatformToolset> | ||
| </PropertyGroup> | ||
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
| <ImportGroup Label="ExtensionSettings"> | ||
| </ImportGroup> | ||
| <ImportGroup Label="Shared"> | ||
| </ImportGroup> | ||
| <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | ||
| <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
| </ImportGroup> | ||
| <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||
| <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
| </ImportGroup> | ||
| <PropertyGroup Label="UserMacros" /> | ||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | ||
| <NMakeIncludeSearchPath>c:\sysgcc\beaglebone\arm-angstrom-linux-gnueabi\include\c++\4.7.3;c:\sysgcc\beaglebone\arm-angstrom-linux-gnueabi\include\c++\4.7.3\arm-angstrom-linux-gnueabi;c:\sysgcc\beaglebone\arm-angstrom-linux-gnueabi\include\c++\4.7.3\backward;c:\sysgcc\beaglebone\lib\gcc\arm-angstrom-linux-gnueabi\4.7.3\include;c:\sysgcc\beaglebone\lib\gcc\arm-angstrom-linux-gnueabi\4.7.3\include-fixed;c:\sysgcc\beaglebone\arm-angstrom-linux-gnueabi\include;c:\sysgcc\beaglebone\arm-angstrom-linux-gnueabi\sysroot\usr\include;$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath> | ||
| <NMakeForcedIncludes>$(ProjectDir)\gcc_Debug.h;$(VISUALGDB_DIR)\gcc_compat.h;$(NMakeForcedIncludes)</NMakeForcedIncludes> | ||
| <NMakeBuildCommandLine>"$(VISUALGDB_DIR)\VisualGDB.exe" /build "$(ProjectPath)" "/solution:$(SolutionPath)" "/config:$(Configuration)" "/platform:$(Platform)"</NMakeBuildCommandLine> | ||
| <NMakeCleanCommandLine>"$(VISUALGDB_DIR)\VisualGDB.exe" /clean "$(ProjectPath)" "/solution:$(SolutionPath)" "/config:$(Configuration)" "/platform:$(Platform)"</NMakeCleanCommandLine> | ||
| <NMakeReBuildCommandLine>"$(VISUALGDB_DIR)\VisualGDB.exe" /rebuild "$(ProjectPath)" "/solution:$(SolutionPath)" "/config:$(Configuration)" "/platform:$(Platform)"</NMakeReBuildCommandLine> | ||
| <NMakeOutput>$(ProjectDir)qr-test-Debug.vgdbsettings</NMakeOutput> | ||
| <IncludePath /> | ||
| <ReferencePath /> | ||
| <LibraryPath /> | ||
| <NMakePreprocessorDefinitions>__VisualGDB_CFG_Debug;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||
| <NMakeIncludeSearchPath>c:\sysgcc\beaglebone\arm-angstrom-linux-gnueabi\include\c++\4.7.3;c:\sysgcc\beaglebone\arm-angstrom-linux-gnueabi\include\c++\4.7.3\arm-angstrom-linux-gnueabi;c:\sysgcc\beaglebone\arm-angstrom-linux-gnueabi\include\c++\4.7.3\backward;c:\sysgcc\beaglebone\lib\gcc\arm-angstrom-linux-gnueabi\4.7.3\include;c:\sysgcc\beaglebone\lib\gcc\arm-angstrom-linux-gnueabi\4.7.3\include-fixed;c:\sysgcc\beaglebone\arm-angstrom-linux-gnueabi\include;c:\sysgcc\beaglebone\arm-angstrom-linux-gnueabi\sysroot\usr\include;$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath> | ||
| <NMakeForcedIncludes>$(ProjectDir)\gcc_Release.h;$(VISUALGDB_DIR)\gcc_compat.h;$(NMakeForcedIncludes)</NMakeForcedIncludes> | ||
| <NMakePreprocessorDefinitions>__VisualGDB_CFG_Release;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions> | ||
| <NMakeBuildCommandLine>"$(VISUALGDB_DIR)\VisualGDB.exe" /build "$(ProjectPath)" "/solution:$(SolutionPath)" "/config:$(Configuration)" "/platform:$(Platform)"</NMakeBuildCommandLine> | ||
| <NMakeCleanCommandLine>"$(VISUALGDB_DIR)\VisualGDB.exe" /clean "$(ProjectPath)" "/solution:$(SolutionPath)" "/config:$(Configuration)" "/platform:$(Platform)"</NMakeCleanCommandLine> | ||
| <NMakeReBuildCommandLine>"$(VISUALGDB_DIR)\VisualGDB.exe" /rebuild "$(ProjectPath)" "/solution:$(SolutionPath)" "/config:$(Configuration)" "/platform:$(Platform)"</NMakeReBuildCommandLine> | ||
| <NMakeOutput>$(ProjectDir)qr-test-Release.vgdbsettings</NMakeOutput> | ||
| <IncludePath /> | ||
| <ReferencePath /> | ||
| <LibraryPath /> | ||
| </PropertyGroup> | ||
| <ItemDefinitionGroup> | ||
| </ItemDefinitionGroup> | ||
| <ItemGroup> | ||
| <ClCompile Include="CaptureDevice.cpp" /> | ||
| <ClCompile Include="qr-test.cpp" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <None Include="debug.mak" /> | ||
| <None Include="Makefile" /> | ||
| <None Include="qr-test-Debug.vgdbsettings" /> | ||
| <None Include="qr-test-Release.vgdbsettings" /> | ||
| <None Include="release.mak" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <ClInclude Include="CaptureDevice.h" /> | ||
| </ItemGroup> | ||
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
| <ImportGroup Label="ExtensionTargets"> | ||
| </ImportGroup> | ||
| </Project> |
| @@ -0,0 +1,53 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <ItemGroup> | ||
| <Filter Include="Source files"> | ||
| <UniqueIdentifier>{42c1bc55-861d-4eca-89ca-df74aa789434}</UniqueIdentifier> | ||
| <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> | ||
| </Filter> | ||
| <Filter Include="Header files"> | ||
| <UniqueIdentifier>{6addfc91-a262-463c-96d5-ce7b84497d13}</UniqueIdentifier> | ||
| <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> | ||
| </Filter> | ||
| <Filter Include="Resource files"> | ||
| <UniqueIdentifier>{e2fbd8b8-a2f4-4fcb-a4ca-2c119eb4ddc3}</UniqueIdentifier> | ||
| <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> | ||
| </Filter> | ||
| <Filter Include="Make files"> | ||
| <UniqueIdentifier>{e530c977-9c4c-4e50-bb12-cc500e201d6f}</UniqueIdentifier> | ||
| <Extensions>*.mak</Extensions> | ||
| </Filter> | ||
| <Filter Include="VisualGDB settings"> | ||
| <UniqueIdentifier>{e9a75c1a-89b5-4f3a-be87-4aa9aee1e85e}</UniqueIdentifier> | ||
| <Extensions>*.vgdbsettings</Extensions> | ||
| </Filter> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <ClCompile Include="qr-test.cpp"> | ||
| <Filter>Source files</Filter> | ||
| </ClCompile> | ||
| <ClCompile Include="CaptureDevice.cpp"> | ||
| <Filter>Source files</Filter> | ||
| </ClCompile> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <None Include="Makefile" /> | ||
| <None Include="debug.mak"> | ||
| <Filter>Make files</Filter> | ||
| </None> | ||
| <None Include="qr-test-Debug.vgdbsettings"> | ||
| <Filter>VisualGDB settings</Filter> | ||
| </None> | ||
| <None Include="release.mak"> | ||
| <Filter>Make files</Filter> | ||
| </None> | ||
| <None Include="qr-test-Release.vgdbsettings"> | ||
| <Filter>VisualGDB settings</Filter> | ||
| </None> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <ClInclude Include="CaptureDevice.h"> | ||
| <Filter>Header files</Filter> | ||
| </ClInclude> | ||
| </ItemGroup> | ||
| </Project> |
| @@ -0,0 +1,36 @@ | ||
| #Generated by VisualGDB (http://visualgdb.com) | ||
| #DO NOT EDIT THIS FILE MANUALLY UNLESS YOU ABSOLUTELY NEED TO | ||
| #USE VISUALGDB PROJECT PROPERTIES DIALOG INSTEAD | ||
|
|
||
| BINARYDIR := Release | ||
|
|
||
| #Toolchain | ||
| CC := C:/SysGCC/Beaglebone/bin/arm-angstrom-linux-gnueabi-gcc.exe | ||
| CXX := C:/SysGCC/Beaglebone/bin/arm-angstrom-linux-gnueabi-g++.exe | ||
| LD := $(CXX) | ||
| AR := C:/SysGCC/Beaglebone/bin/arm-angstrom-linux-gnueabi-ar.exe | ||
| OBJCOPY := C:/SysGCC/Beaglebone/bin/arm-angstrom-linux-gnueabi-objcopy.exe | ||
|
|
||
| #Additional flags | ||
| PREPROCESSOR_MACROS := NDEBUG=1 RELEASE=1 | ||
| INCLUDE_DIRS := | ||
| LIBRARY_DIRS := | ||
| LIBRARY_NAMES := | ||
| ADDITIONAL_LINKER_INPUTS := | ||
| MACOS_FRAMEWORKS := | ||
| LINUX_PACKAGES := | ||
|
|
||
| CFLAGS := -ggdb -ffunction-sections -O3 | ||
| CXXFLAGS := -ggdb -ffunction-sections -O3 | ||
| ASFLAGS := | ||
| LDFLAGS := -Wl,-gc-sections | ||
| COMMONFLAGS := | ||
| LINKER_SCRIPT := | ||
|
|
||
| START_GROUP := -Wl,--start-group | ||
| END_GROUP := -Wl,--end-group | ||
|
|
||
| #Additional options detected from testing the toolchain | ||
| USE_DEL_TO_CLEAN := 1 | ||
| CP_NOT_AVAILABLE := 1 | ||
| IS_LINUX_PROJECT := 1 |
| @@ -0,0 +1 @@ | ||
| This file was last opened by PID 7216 |
| @@ -0,0 +1 @@ | ||
| This file was last opened by PID 7216 |
| @@ -0,0 +1,24 @@ | ||
|
|
||
| Microsoft Visual Studio Solution File, Format Version 12.00 | ||
| # Visual Studio 14 | ||
| VisualStudioVersion = 14.0.25123.0 | ||
| MinimumVisualStudioVersion = 10.0.40219.1 | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "skip32-test", "skip32-test\skip32-test.vcxproj", "{9E73A86C-D838-40B8-B2DC-A5F0E4FE536E}" | ||
| EndProject | ||
| Global | ||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
| Debug|x86 = Debug|x86 | ||
| Release|x86 = Release|x86 | ||
| EndGlobalSection | ||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
| {9E73A86C-D838-40B8-B2DC-A5F0E4FE536E}.Debug|x64.ActiveCfg = Debug|Win32 | ||
| {9E73A86C-D838-40B8-B2DC-A5F0E4FE536E}.Debug|x86.ActiveCfg = Debug|Win32 | ||
| {9E73A86C-D838-40B8-B2DC-A5F0E4FE536E}.Debug|x86.Build.0 = Debug|Win32 | ||
| {9E73A86C-D838-40B8-B2DC-A5F0E4FE536E}.Release|x64.ActiveCfg = Release|Win32 | ||
| {9E73A86C-D838-40B8-B2DC-A5F0E4FE536E}.Release|x86.ActiveCfg = Release|Win32 | ||
| {9E73A86C-D838-40B8-B2DC-A5F0E4FE536E}.Release|x86.Build.0 = Release|Win32 | ||
| EndGlobalSection | ||
| GlobalSection(SolutionProperties) = preSolution | ||
| HideSolutionNode = FALSE | ||
| EndGlobalSection | ||
| EndGlobal |
| @@ -0,0 +1,181 @@ | ||
| #Generated by VisualGDB project wizard. | ||
| #Note: VisualGDB will automatically update this file when you add new sources to the project. | ||
| #All other changes you make in this file will be preserved. | ||
| #Visit http://visualgdb.com/makefiles for more details | ||
|
|
||
| #VisualGDB: AutoSourceFiles #<--- remove this line to disable auto-updating of SOURCEFILES and EXTERNAL_LIBS | ||
|
|
||
| TARGETNAME := skip32-test | ||
| #TARGETTYPE can be APP, STATIC or SHARED | ||
| TARGETTYPE := APP | ||
|
|
||
| to_lowercase = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1)))))))))))))))))))))))))) | ||
|
|
||
| CONFIG ?= DEBUG | ||
|
|
||
| CONFIGURATION_FLAGS_FILE := $(call to_lowercase,$(CONFIG)).mak | ||
|
|
||
| include $(CONFIGURATION_FLAGS_FILE) | ||
|
|
||
| #LINKER_SCRIPT defined inside the configuration file (e.g. debug.mak) should override any linker scripts defined in shared .mak files | ||
| CONFIGURATION_LINKER_SCRIPT := $(LINKER_SCRIPT) | ||
|
|
||
| include $(ADDITIONAL_MAKE_FILES) | ||
|
|
||
| ifneq ($(CONFIGURATION_LINKER_SCRIPT),) | ||
| LINKER_SCRIPT := $(CONFIGURATION_LINKER_SCRIPT) | ||
| endif | ||
|
|
||
| ifneq ($(LINKER_SCRIPT),) | ||
| LDFLAGS += -T$(LINKER_SCRIPT) | ||
| endif | ||
|
|
||
| ifeq ($(BINARYDIR),) | ||
| error: | ||
| $(error Invalid configuration, please check your inputs) | ||
| endif | ||
|
|
||
| SOURCEFILES := skip32-test.cpp skip32.cc | ||
| EXTERNAL_LIBS := | ||
| EXTERNAL_LIBS_COPIED := $(foreach lib, $(EXTERNAL_LIBS),$(BINARYDIR)/$(notdir $(lib))) | ||
|
|
||
| CFLAGS += $(COMMONFLAGS) | ||
| CXXFLAGS += $(COMMONFLAGS) | ||
| ASFLAGS += $(COMMONFLAGS) | ||
| LDFLAGS += $(COMMONFLAGS) | ||
|
|
||
| CFLAGS += $(addprefix -I,$(INCLUDE_DIRS)) | ||
| CXXFLAGS += $(addprefix -I,$(INCLUDE_DIRS)) | ||
|
|
||
| CFLAGS += $(addprefix -D,$(PREPROCESSOR_MACROS)) | ||
| CXXFLAGS += $(addprefix -D,$(PREPROCESSOR_MACROS)) | ||
| ASFLAGS += $(addprefix -D,$(PREPROCESSOR_MACROS)) | ||
|
|
||
| CXXFLAGS += $(addprefix -framework ,$(MACOS_FRAMEWORKS)) | ||
| CFLAGS += $(addprefix -framework ,$(MACOS_FRAMEWORKS)) | ||
| LDFLAGS += $(addprefix -framework ,$(MACOS_FRAMEWORKS)) | ||
|
|
||
| LDFLAGS += $(addprefix -L,$(LIBRARY_DIRS)) | ||
|
|
||
| ifeq ($(GENERATE_MAP_FILE),1) | ||
| LDFLAGS += -Wl,-Map=$(BINARYDIR)/$(basename $(TARGETNAME)).map | ||
| endif | ||
|
|
||
| LIBRARY_LDFLAGS = $(addprefix -l,$(LIBRARY_NAMES)) | ||
|
|
||
| ifeq ($(IS_LINUX_PROJECT),1) | ||
| RPATH_PREFIX := -Wl,--rpath='$$ORIGIN/../ | ||
| LIBRARY_LDFLAGS += $(EXTERNAL_LIBS) | ||
| LIBRARY_LDFLAGS += -Wl,--rpath='$$ORIGIN' | ||
| LIBRARY_LDFLAGS += $(addsuffix ',$(addprefix $(RPATH_PREFIX),$(dir $(EXTERNAL_LIBS)))) | ||
|
|
||
| ifeq ($(TARGETTYPE),SHARED) | ||
| CFLAGS += -fPIC | ||
| CXXFLAGS += -fPIC | ||
| ASFLAGS += -fPIC | ||
| LIBRARY_LDFLAGS += -Wl,-soname,$(TARGETNAME) | ||
| endif | ||
|
|
||
| ifneq ($(LINUX_PACKAGES),) | ||
| PACKAGE_CFLAGS := $(foreach pkg,$(LINUX_PACKAGES),$(shell pkg-config --cflags $(pkg))) | ||
| PACKAGE_LDFLAGS := $(foreach pkg,$(LINUX_PACKAGES),$(shell pkg-config --libs $(pkg))) | ||
| CFLAGS += $(PACKAGE_CFLAGS) | ||
| CXXFLAGS += $(PACKAGE_CFLAGS) | ||
| LIBRARY_LDFLAGS += $(PACKAGE_LDFLAGS) | ||
| endif | ||
| else | ||
| LIBRARY_LDFLAGS += $(EXTERNAL_LIBS) | ||
| endif | ||
|
|
||
| LIBRARY_LDFLAGS += $(ADDITIONAL_LINKER_INPUTS) | ||
|
|
||
| all_make_files := $(firstword $(MAKEFILE_LIST)) $(CONFIGURATION_FLAGS_FILE) $(ADDITIONAL_MAKE_FILES) | ||
|
|
||
| ifeq ($(STARTUPFILES),) | ||
| all_source_files := $(SOURCEFILES) | ||
| else | ||
| all_source_files := $(STARTUPFILES) $(filter-out $(STARTUPFILES),$(SOURCEFILES)) | ||
| endif | ||
|
|
||
| source_obj1 := $(all_source_files:.cpp=.o) | ||
| source_obj2 := $(source_obj1:.c=.o) | ||
| source_obj3 := $(source_obj2:.s=.o) | ||
| source_obj4 := $(source_obj3:.S=.o) | ||
| source_obj5 := $(source_obj4:.cc=.o) | ||
| source_objs := $(source_obj5:.cxx=.o) | ||
|
|
||
| all_objs := $(addprefix $(BINARYDIR)/, $(notdir $(source_objs))) | ||
|
|
||
| PRIMARY_OUTPUTS := | ||
|
|
||
| ifeq ($(GENERATE_BIN_FILE),1) | ||
| PRIMARY_OUTPUTS += $(BINARYDIR)/$(basename $(TARGETNAME)).bin | ||
| endif | ||
|
|
||
| ifeq ($(GENERATE_IHEX_FILE),1) | ||
| PRIMARY_OUTPUTS += $(BINARYDIR)/$(basename $(TARGETNAME)).ihex | ||
| endif | ||
|
|
||
| ifeq ($(PRIMARY_OUTPUTS),) | ||
| PRIMARY_OUTPUTS := $(BINARYDIR)/$(TARGETNAME) | ||
| endif | ||
|
|
||
| all: $(PRIMARY_OUTPUTS) | ||
|
|
||
| $(BINARYDIR)/$(basename $(TARGETNAME)).bin: $(BINARYDIR)/$(TARGETNAME) | ||
| $(OBJCOPY) -O binary $< $@ | ||
|
|
||
| $(BINARYDIR)/$(basename $(TARGETNAME)).ihex: $(BINARYDIR)/$(TARGETNAME) | ||
| $(OBJCOPY) -O ihex $< $@ | ||
|
|
||
| ifneq ($(LINKER_SCRIPT),) | ||
| $(BINARYDIR)/$(TARGETNAME): $(LINKER_SCRIPT) | ||
| endif | ||
|
|
||
| ifeq ($(TARGETTYPE),APP) | ||
| $(BINARYDIR)/$(TARGETNAME): $(all_objs) $(EXTERNAL_LIBS) | ||
| $(LD) -o $@ $(LDFLAGS) $(START_GROUP) $(all_objs) $(LIBRARY_LDFLAGS) $(END_GROUP) | ||
| endif | ||
|
|
||
| ifeq ($(TARGETTYPE),SHARED) | ||
| $(BINARYDIR)/$(TARGETNAME): $(all_objs) $(EXTERNAL_LIBS) | ||
| $(LD) -shared -o $@ $(LDFLAGS) $(START_GROUP) $(all_objs) $(LIBRARY_LDFLAGS) $(END_GROUP) | ||
| endif | ||
|
|
||
| ifeq ($(TARGETTYPE),STATIC) | ||
| $(BINARYDIR)/$(TARGETNAME): $(all_objs) | ||
| $(AR) -r $@ $^ | ||
| endif | ||
|
|
||
| -include $(all_objs:.o=.dep) | ||
|
|
||
| clean: | ||
| ifeq ($(USE_DEL_TO_CLEAN),1) | ||
| cmd /C del /S /Q $(BINARYDIR) | ||
| else | ||
| rm -rf $(BINARYDIR) | ||
| endif | ||
|
|
||
| $(BINARYDIR): | ||
| mkdir $(BINARYDIR) | ||
|
|
||
| #VisualGDB: FileSpecificTemplates #<--- VisualGDB will use the following lines to define rules for source files in subdirectories | ||
| $(BINARYDIR)/%.o : %.cpp $(all_make_files) |$(BINARYDIR) | ||
| $(CXX) $(CXXFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) | ||
|
|
||
| $(BINARYDIR)/%.o : %.c $(all_make_files) |$(BINARYDIR) | ||
| $(CC) $(CFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) | ||
|
|
||
| $(BINARYDIR)/%.o : %.S $(all_make_files) |$(BINARYDIR) | ||
| $(CC) $(CFLAGS) $(ASFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) | ||
|
|
||
| $(BINARYDIR)/%.o : %.s $(all_make_files) |$(BINARYDIR) | ||
| $(CC) $(CFLAGS) $(ASFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) | ||
|
|
||
| $(BINARYDIR)/%.o : %.cc $(all_make_files) |$(BINARYDIR) | ||
| $(CC) $(CFLAGS) $(CXXFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) | ||
|
|
||
| $(BINARYDIR)/%.o : %.cxx $(all_make_files) |$(BINARYDIR) | ||
| $(CC) $(CFLAGS) $(CXXFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) | ||
|
|
||
| #VisualGDB: GeneratedRules #<--- All lines below are auto-generated |
| @@ -0,0 +1,181 @@ | ||
| #Generated by VisualGDB project wizard. | ||
| #Note: VisualGDB will automatically update this file when you add new sources to the project. | ||
| #All other changes you make in this file will be preserved. | ||
| #Visit http://visualgdb.com/makefiles for more details | ||
|
|
||
| #VisualGDB: AutoSourceFiles #<--- remove this line to disable auto-updating of SOURCEFILES and EXTERNAL_LIBS | ||
|
|
||
| TARGETNAME := skip32-test | ||
| #TARGETTYPE can be APP, STATIC or SHARED | ||
| TARGETTYPE := APP | ||
|
|
||
| to_lowercase = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1)))))))))))))))))))))))))) | ||
|
|
||
| CONFIG ?= DEBUG | ||
|
|
||
| CONFIGURATION_FLAGS_FILE := $(call to_lowercase,$(CONFIG)).mak | ||
|
|
||
| include $(CONFIGURATION_FLAGS_FILE) | ||
|
|
||
| #LINKER_SCRIPT defined inside the configuration file (e.g. debug.mak) should override any linker scripts defined in shared .mak files | ||
| CONFIGURATION_LINKER_SCRIPT := $(LINKER_SCRIPT) | ||
|
|
||
| include $(ADDITIONAL_MAKE_FILES) | ||
|
|
||
| ifneq ($(CONFIGURATION_LINKER_SCRIPT),) | ||
| LINKER_SCRIPT := $(CONFIGURATION_LINKER_SCRIPT) | ||
| endif | ||
|
|
||
| ifneq ($(LINKER_SCRIPT),) | ||
| LDFLAGS += -T$(LINKER_SCRIPT) | ||
| endif | ||
|
|
||
| ifeq ($(BINARYDIR),) | ||
| error: | ||
| $(error Invalid configuration, please check your inputs) | ||
| endif | ||
|
|
||
| SOURCEFILES := | ||
| EXTERNAL_LIBS := | ||
| EXTERNAL_LIBS_COPIED := $(foreach lib, $(EXTERNAL_LIBS),$(BINARYDIR)/$(notdir $(lib))) | ||
|
|
||
| CFLAGS += $(COMMONFLAGS) | ||
| CXXFLAGS += $(COMMONFLAGS) | ||
| ASFLAGS += $(COMMONFLAGS) | ||
| LDFLAGS += $(COMMONFLAGS) | ||
|
|
||
| CFLAGS += $(addprefix -I,$(INCLUDE_DIRS)) | ||
| CXXFLAGS += $(addprefix -I,$(INCLUDE_DIRS)) | ||
|
|
||
| CFLAGS += $(addprefix -D,$(PREPROCESSOR_MACROS)) | ||
| CXXFLAGS += $(addprefix -D,$(PREPROCESSOR_MACROS)) | ||
| ASFLAGS += $(addprefix -D,$(PREPROCESSOR_MACROS)) | ||
|
|
||
| CXXFLAGS += $(addprefix -framework ,$(MACOS_FRAMEWORKS)) | ||
| CFLAGS += $(addprefix -framework ,$(MACOS_FRAMEWORKS)) | ||
| LDFLAGS += $(addprefix -framework ,$(MACOS_FRAMEWORKS)) | ||
|
|
||
| LDFLAGS += $(addprefix -L,$(LIBRARY_DIRS)) | ||
|
|
||
| ifeq ($(GENERATE_MAP_FILE),1) | ||
| LDFLAGS += -Wl,-Map=$(BINARYDIR)/$(basename $(TARGETNAME)).map | ||
| endif | ||
|
|
||
| LIBRARY_LDFLAGS = $(addprefix -l,$(LIBRARY_NAMES)) | ||
|
|
||
| ifeq ($(IS_LINUX_PROJECT),1) | ||
| RPATH_PREFIX := -Wl,--rpath='$$ORIGIN/../ | ||
| LIBRARY_LDFLAGS += $(EXTERNAL_LIBS) | ||
| LIBRARY_LDFLAGS += -Wl,--rpath='$$ORIGIN' | ||
| LIBRARY_LDFLAGS += $(addsuffix ',$(addprefix $(RPATH_PREFIX),$(dir $(EXTERNAL_LIBS)))) | ||
|
|
||
| ifeq ($(TARGETTYPE),SHARED) | ||
| CFLAGS += -fPIC | ||
| CXXFLAGS += -fPIC | ||
| ASFLAGS += -fPIC | ||
| LIBRARY_LDFLAGS += -Wl,-soname,$(TARGETNAME) | ||
| endif | ||
|
|
||
| ifneq ($(LINUX_PACKAGES),) | ||
| PACKAGE_CFLAGS := $(foreach pkg,$(LINUX_PACKAGES),$(shell pkg-config --cflags $(pkg))) | ||
| PACKAGE_LDFLAGS := $(foreach pkg,$(LINUX_PACKAGES),$(shell pkg-config --libs $(pkg))) | ||
| CFLAGS += $(PACKAGE_CFLAGS) | ||
| CXXFLAGS += $(PACKAGE_CFLAGS) | ||
| LIBRARY_LDFLAGS += $(PACKAGE_LDFLAGS) | ||
| endif | ||
| else | ||
| LIBRARY_LDFLAGS += $(EXTERNAL_LIBS) | ||
| endif | ||
|
|
||
| LIBRARY_LDFLAGS += $(ADDITIONAL_LINKER_INPUTS) | ||
|
|
||
| all_make_files := $(firstword $(MAKEFILE_LIST)) $(CONFIGURATION_FLAGS_FILE) $(ADDITIONAL_MAKE_FILES) | ||
|
|
||
| ifeq ($(STARTUPFILES),) | ||
| all_source_files := $(SOURCEFILES) | ||
| else | ||
| all_source_files := $(STARTUPFILES) $(filter-out $(STARTUPFILES),$(SOURCEFILES)) | ||
| endif | ||
|
|
||
| source_obj1 := $(all_source_files:.cpp=.o) | ||
| source_obj2 := $(source_obj1:.c=.o) | ||
| source_obj3 := $(source_obj2:.s=.o) | ||
| source_obj4 := $(source_obj3:.S=.o) | ||
| source_obj5 := $(source_obj4:.cc=.o) | ||
| source_objs := $(source_obj5:.cxx=.o) | ||
|
|
||
| all_objs := $(addprefix $(BINARYDIR)/, $(notdir $(source_objs))) | ||
|
|
||
| PRIMARY_OUTPUTS := | ||
|
|
||
| ifeq ($(GENERATE_BIN_FILE),1) | ||
| PRIMARY_OUTPUTS += $(BINARYDIR)/$(basename $(TARGETNAME)).bin | ||
| endif | ||
|
|
||
| ifeq ($(GENERATE_IHEX_FILE),1) | ||
| PRIMARY_OUTPUTS += $(BINARYDIR)/$(basename $(TARGETNAME)).ihex | ||
| endif | ||
|
|
||
| ifeq ($(PRIMARY_OUTPUTS),) | ||
| PRIMARY_OUTPUTS := $(BINARYDIR)/$(TARGETNAME) | ||
| endif | ||
|
|
||
| all: $(PRIMARY_OUTPUTS) | ||
|
|
||
| $(BINARYDIR)/$(basename $(TARGETNAME)).bin: $(BINARYDIR)/$(TARGETNAME) | ||
| $(OBJCOPY) -O binary $< $@ | ||
|
|
||
| $(BINARYDIR)/$(basename $(TARGETNAME)).ihex: $(BINARYDIR)/$(TARGETNAME) | ||
| $(OBJCOPY) -O ihex $< $@ | ||
|
|
||
| ifneq ($(LINKER_SCRIPT),) | ||
| $(BINARYDIR)/$(TARGETNAME): $(LINKER_SCRIPT) | ||
| endif | ||
|
|
||
| ifeq ($(TARGETTYPE),APP) | ||
| $(BINARYDIR)/$(TARGETNAME): $(all_objs) $(EXTERNAL_LIBS) | ||
| $(LD) -o $@ $(LDFLAGS) $(START_GROUP) $(all_objs) $(LIBRARY_LDFLAGS) $(END_GROUP) | ||
| endif | ||
|
|
||
| ifeq ($(TARGETTYPE),SHARED) | ||
| $(BINARYDIR)/$(TARGETNAME): $(all_objs) $(EXTERNAL_LIBS) | ||
| $(LD) -shared -o $@ $(LDFLAGS) $(START_GROUP) $(all_objs) $(LIBRARY_LDFLAGS) $(END_GROUP) | ||
| endif | ||
|
|
||
| ifeq ($(TARGETTYPE),STATIC) | ||
| $(BINARYDIR)/$(TARGETNAME): $(all_objs) | ||
| $(AR) -r $@ $^ | ||
| endif | ||
|
|
||
| -include $(all_objs:.o=.dep) | ||
|
|
||
| clean: | ||
| ifeq ($(USE_DEL_TO_CLEAN),1) | ||
| cmd /C del /S /Q $(BINARYDIR) | ||
| else | ||
| rm -rf $(BINARYDIR) | ||
| endif | ||
|
|
||
| $(BINARYDIR): | ||
| mkdir $(BINARYDIR) | ||
|
|
||
| #VisualGDB: FileSpecificTemplates #<--- VisualGDB will use the following lines to define rules for source files in subdirectories | ||
| $(BINARYDIR)/%.o : %.cpp $(all_make_files) |$(BINARYDIR) | ||
| $(CXX) $(CXXFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) | ||
|
|
||
| $(BINARYDIR)/%.o : %.c $(all_make_files) |$(BINARYDIR) | ||
| $(CC) $(CFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) | ||
|
|
||
| $(BINARYDIR)/%.o : %.S $(all_make_files) |$(BINARYDIR) | ||
| $(CC) $(CFLAGS) $(ASFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) | ||
|
|
||
| $(BINARYDIR)/%.o : %.s $(all_make_files) |$(BINARYDIR) | ||
| $(CC) $(CFLAGS) $(ASFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) | ||
|
|
||
| $(BINARYDIR)/%.o : %.cc $(all_make_files) |$(BINARYDIR) | ||
| $(CC) $(CFLAGS) $(CXXFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) | ||
|
|
||
| $(BINARYDIR)/%.o : %.cxx $(all_make_files) |$(BINARYDIR) | ||
| $(CC) $(CFLAGS) $(CXXFLAGS) -c $< -o $@ -MD -MF $(@:.o=.dep) | ||
|
|
||
| #VisualGDB: GeneratedRules #<--- All lines below are auto-generated |
| @@ -0,0 +1,36 @@ | ||
| #Generated by VisualGDB (http://visualgdb.com) | ||
| #DO NOT EDIT THIS FILE MANUALLY UNLESS YOU ABSOLUTELY NEED TO | ||
| #USE VISUALGDB PROJECT PROPERTIES DIALOG INSTEAD | ||
|
|
||
| BINARYDIR := Debug | ||
|
|
||
| #Toolchain | ||
| CC := C:/SysGCC/Beaglebone/bin/arm-angstrom-linux-gnueabi-gcc.exe | ||
| CXX := C:/SysGCC/Beaglebone/bin/arm-angstrom-linux-gnueabi-g++.exe | ||
| LD := $(CXX) | ||
| AR := C:/SysGCC/Beaglebone/bin/arm-angstrom-linux-gnueabi-ar.exe | ||
| OBJCOPY := C:/SysGCC/Beaglebone/bin/arm-angstrom-linux-gnueabi-objcopy.exe | ||
|
|
||
| #Additional flags | ||
| PREPROCESSOR_MACROS := DEBUG=1 | ||
| INCLUDE_DIRS := | ||
| LIBRARY_DIRS := | ||
| LIBRARY_NAMES := | ||
| ADDITIONAL_LINKER_INPUTS := | ||
| MACOS_FRAMEWORKS := | ||
| LINUX_PACKAGES := | ||
|
|
||
| CFLAGS := -ggdb -ffunction-sections -O0 -std=c++11 | ||
| CXXFLAGS := -ggdb -ffunction-sections -O0 -std=c++11 | ||
| ASFLAGS := | ||
| LDFLAGS := -Wl,-gc-sections | ||
| COMMONFLAGS := | ||
| LINKER_SCRIPT := | ||
|
|
||
| START_GROUP := -Wl,--start-group | ||
| END_GROUP := -Wl,--end-group | ||
|
|
||
| #Additional options detected from testing the toolchain | ||
| USE_DEL_TO_CLEAN := 1 | ||
| CP_NOT_AVAILABLE := 1 | ||
| IS_LINUX_PROJECT := 1 |
| @@ -0,0 +1,36 @@ | ||
| #Generated by VisualGDB (http://visualgdb.com) | ||
| #DO NOT EDIT THIS FILE MANUALLY UNLESS YOU ABSOLUTELY NEED TO | ||
| #USE VISUALGDB PROJECT PROPERTIES DIALOG INSTEAD | ||
|
|
||
| BINARYDIR := Debug | ||
|
|
||
| #Toolchain | ||
| CC := C:/SysGCC/Beaglebone/bin/arm-angstrom-linux-gnueabi-gcc.exe | ||
| CXX := C:/SysGCC/Beaglebone/bin/arm-angstrom-linux-gnueabi-g++.exe | ||
| LD := $(CXX) | ||
| AR := C:/SysGCC/Beaglebone/bin/arm-angstrom-linux-gnueabi-ar.exe | ||
| OBJCOPY := C:/SysGCC/Beaglebone/bin/arm-angstrom-linux-gnueabi-objcopy.exe | ||
|
|
||
| #Additional flags | ||
| PREPROCESSOR_MACROS := DEBUG=1 | ||
| INCLUDE_DIRS := | ||
| LIBRARY_DIRS := | ||
| LIBRARY_NAMES := | ||
| ADDITIONAL_LINKER_INPUTS := | ||
| MACOS_FRAMEWORKS := | ||
| LINUX_PACKAGES := | ||
|
|
||
| CFLAGS := -ggdb -ffunction-sections -O0 | ||
| CXXFLAGS := -ggdb -ffunction-sections -O0 | ||
| ASFLAGS := | ||
| LDFLAGS := -Wl,-gc-sections | ||
| COMMONFLAGS := | ||
| LINKER_SCRIPT := | ||
|
|
||
| START_GROUP := -Wl,--start-group | ||
| END_GROUP := -Wl,--end-group | ||
|
|
||
| #Additional options detected from testing the toolchain | ||
| USE_DEL_TO_CLEAN := 1 | ||
| CP_NOT_AVAILABLE := 1 | ||
| IS_LINUX_PROJECT := 1 |
| @@ -0,0 +1,50 @@ | ||
| #pragma once | ||
|
|
||
| #include <iostream> | ||
| #include <sstream> | ||
| #include <stdexcept> | ||
| #include <string> | ||
|
|
||
| class CryptDBError { | ||
| public: | ||
| CryptDBError(const std::string &m) : msg(m) {} | ||
| std::string msg; | ||
| }; | ||
|
|
||
| class CryptoError : public CryptDBError { | ||
| public: | ||
| CryptoError(const std::string &m) : CryptDBError(m) {} | ||
| }; | ||
|
|
||
| inline void | ||
| throw_c(bool test, const std::string &msg = "crypto fail") | ||
| { | ||
| if (false == test) { | ||
| throw CryptoError(msg); | ||
| } | ||
|
|
||
| return; | ||
| } | ||
| class fatal : public std::stringstream { | ||
| public: | ||
| ~fatal() __attribute__((noreturn)) { | ||
| std::cerr << str() << std::endl; | ||
| exit(-1); | ||
| } | ||
| }; | ||
|
|
||
| class cryptdb_err : public std::stringstream { | ||
| public: | ||
| ~cryptdb_err() __attribute__((noreturn)) { | ||
| std::cerr << str() << std::endl; | ||
| throw CryptDBError(str()); | ||
| } | ||
| }; | ||
|
|
||
| class thrower : public std::stringstream { | ||
| public: | ||
| ~thrower() __attribute__((noreturn)) { | ||
| throw std::runtime_error(str()); | ||
| } | ||
| }; | ||
|
|
| @@ -0,0 +1,36 @@ | ||
| #Generated by VisualGDB (http://visualgdb.com) | ||
| #DO NOT EDIT THIS FILE MANUALLY UNLESS YOU ABSOLUTELY NEED TO | ||
| #USE VISUALGDB PROJECT PROPERTIES DIALOG INSTEAD | ||
|
|
||
| BINARYDIR := Release | ||
|
|
||
| #Toolchain | ||
| CC := C:/SysGCC/Beaglebone/bin/arm-angstrom-linux-gnueabi-gcc.exe | ||
| CXX := C:/SysGCC/Beaglebone/bin/arm-angstrom-linux-gnueabi-g++.exe | ||
| LD := $(CXX) | ||
| AR := C:/SysGCC/Beaglebone/bin/arm-angstrom-linux-gnueabi-ar.exe | ||
| OBJCOPY := C:/SysGCC/Beaglebone/bin/arm-angstrom-linux-gnueabi-objcopy.exe | ||
|
|
||
| #Additional flags | ||
| PREPROCESSOR_MACROS := NDEBUG=1 RELEASE=1 | ||
| INCLUDE_DIRS := | ||
| LIBRARY_DIRS := | ||
| LIBRARY_NAMES := | ||
| ADDITIONAL_LINKER_INPUTS := | ||
| MACOS_FRAMEWORKS := | ||
| LINUX_PACKAGES := | ||
|
|
||
| CFLAGS := -ggdb -ffunction-sections -O3 | ||
| CXXFLAGS := -ggdb -ffunction-sections -O3 | ||
| ASFLAGS := | ||
| LDFLAGS := -Wl,-gc-sections | ||
| COMMONFLAGS := | ||
| LINKER_SCRIPT := | ||
|
|
||
| START_GROUP := -Wl,--start-group | ||
| END_GROUP := -Wl,--end-group | ||
|
|
||
| #Additional options detected from testing the toolchain | ||
| USE_DEL_TO_CLEAN := 1 | ||
| CP_NOT_AVAILABLE := 1 | ||
| IS_LINUX_PROJECT := 1 |
| @@ -0,0 +1,147 @@ | ||
| <?xml version="1.0"?> | ||
| <VisualGDBProjectSettings2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
| <ConfigurationName>Debug</ConfigurationName> | ||
| <Project xsi:type="com.visualgdb.project.linux"> | ||
| <CustomSourceDirectories> | ||
| <Directories /> | ||
| <PathStyle>MinGWUnixSlash</PathStyle> | ||
| </CustomSourceDirectories> | ||
| <DeploymentHost> | ||
| <HostName>192.168.7.2</HostName> | ||
| <Transport>SSH</Transport> | ||
| <UserName>root</UserName> | ||
| </DeploymentHost> | ||
| <AllowChangingHostForMainCommands>false</AllowChangingHostForMainCommands> | ||
| <SkipBuildIfNoSourceFilesChanged>false</SkipBuildIfNoSourceFilesChanged> | ||
| <IgnoreFileTransferErrors>false</IgnoreFileTransferErrors> | ||
| <RemoveRemoteDirectoryOnClean>false</RemoveRemoteDirectoryOnClean> | ||
| <SkipDeploymentTests>false</SkipDeploymentTests> | ||
| <MainSourceDirectoryForLocalBuilds>$(ProjectDir)</MainSourceDirectoryForLocalBuilds> | ||
| </Project> | ||
| <Build xsi:type="com.visualgdb.build.make"> | ||
| <MakeFilePathRelativeToSourceDir>Makefile</MakeFilePathRelativeToSourceDir> | ||
| <MakeConfigurationName>Debug</MakeConfigurationName> | ||
| <AdditionalMakeArguments /> | ||
| <Toolchain> | ||
| <Name>Beaglebone</Name> | ||
| <UniqueID>com.visualgdb.beaglebone</UniqueID> | ||
| <Location>C:\SysGCC\Beaglebone</Location> | ||
| <UnixSystem>false</UnixSystem> | ||
| <GCC>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-gcc.exe</GCC> | ||
| <GXX>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-g++.exe</GXX> | ||
| <GDB>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-gdb.exe</GDB> | ||
| <AR>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-ar.exe</AR> | ||
| <OBJCOPY>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-objcopy.exe</OBJCOPY> | ||
| <Make>C:\SysGCC\Beaglebone\bin\make.exe</Make> | ||
| <AdditionalPathDirectories> | ||
| <string>C:\SysGCC\Beaglebone\bin</string> | ||
| </AdditionalPathDirectories> | ||
| <RequireCmdExe>true</RequireCmdExe> | ||
| <RequireCtrlBreak>false</RequireCtrlBreak> | ||
| <SourceDirMapping> | ||
| <Directories /> | ||
| <PathStyle>MinGWUnixSlash</PathStyle> | ||
| </SourceDirMapping> | ||
| </Toolchain> | ||
| <MakeCommandTemplate> | ||
| <SkipWhenRunningCommandList>false</SkipWhenRunningCommandList> | ||
| <Command>cmd.exe</Command> | ||
| <Arguments>/c "C:\SysGCC\Beaglebone\bin\make.exe"</Arguments> | ||
| <WorkingDirectory>$(BuildDir)</WorkingDirectory> | ||
| <Environment> | ||
| <Records> | ||
| <Record> | ||
| <VariableName>LANG</VariableName> | ||
| <Value>en_US.UTF-8</Value> | ||
| </Record> | ||
| <Record> | ||
| <VariableName>PATH</VariableName> | ||
| <Value>C:\SysGCC\Beaglebone\bin;%PATH%</Value> | ||
| </Record> | ||
| </Records> | ||
| </Environment> | ||
| </MakeCommandTemplate> | ||
| </Build> | ||
| <Debug xsi:type="com.visualgdb.debug.remote"> | ||
| <AdditionalStartupCommands /> | ||
| <AdditionalGDBSettings> | ||
| <FilterSpuriousStoppedNotifications>false</FilterSpuriousStoppedNotifications> | ||
| <ForceSingleThreadedMode>false</ForceSingleThreadedMode> | ||
| <PendingBreakpointsSupported>true</PendingBreakpointsSupported> | ||
| <DisableChildRanges>false</DisableChildRanges> | ||
| <UseAppleExtensions>false</UseAppleExtensions> | ||
| <CanAcceptCommandsWhileRunning>false</CanAcceptCommandsWhileRunning> | ||
| <MakeLogFile>false</MakeLogFile> | ||
| <IgnoreModuleEventsWhileStepping>true</IgnoreModuleEventsWhileStepping> | ||
| <UseRelativePathsOnly>false</UseRelativePathsOnly> | ||
| <ExitAction>None</ExitAction> | ||
| <Features> | ||
| <DisableAutoDetection>false</DisableAutoDetection> | ||
| <UseFrameParameter>false</UseFrameParameter> | ||
| <SimpleValuesFlagSupported>false</SimpleValuesFlagSupported> | ||
| <ListLocalsSupported>false</ListLocalsSupported> | ||
| <ByteLevelMemoryCommandsAvailable>false</ByteLevelMemoryCommandsAvailable> | ||
| <ThreadInfoSupported>false</ThreadInfoSupported> | ||
| <PendingBreakpointsSupported>false</PendingBreakpointsSupported> | ||
| <SupportTargetCommand>false</SupportTargetCommand> | ||
| <ReliableBreakpointNotifications>false</ReliableBreakpointNotifications> | ||
| </Features> | ||
| <DisableDisassembly>false</DisableDisassembly> | ||
| <ExamineMemoryWithXCommand>false</ExamineMemoryWithXCommand> | ||
| <StepIntoNewInstanceEntry>main</StepIntoNewInstanceEntry> | ||
| <ExamineRegistersInRawFormat>true</ExamineRegistersInRawFormat> | ||
| <EnableSmartStepping>false</EnableSmartStepping> | ||
| <DisableSignals>false</DisableSignals> | ||
| <EnableAsyncExecutionMode>false</EnableAsyncExecutionMode> | ||
| <EnableNonStopMode>false</EnableNonStopMode> | ||
| </AdditionalGDBSettings> | ||
| <LaunchGDBSettings xsi:type="GDBLaunchParametersNewInstance"> | ||
| <GDBEnvironment> | ||
| <Records> | ||
| <Record> | ||
| <VariableName>LANG</VariableName> | ||
| <Value>en_US.UTF-8</Value> | ||
| </Record> | ||
| <Record> | ||
| <VariableName>PATH</VariableName> | ||
| <Value>C:\SysGCC\Beaglebone\bin;%PATH%</Value> | ||
| </Record> | ||
| </Records> | ||
| </GDBEnvironment> | ||
| <DebuggedProgram>$(TargetPath)</DebuggedProgram> | ||
| <GDBServerPort>2000</GDBServerPort> | ||
| <ProgramArguments /> | ||
| </LaunchGDBSettings> | ||
| <GenerateCtrlBreakInsteadOfCtrlC>false</GenerateCtrlBreakInsteadOfCtrlC> | ||
| <DeploymentTargetPath>/home/root//$(TargetFileName)</DeploymentTargetPath> | ||
| <X11WindowMode>Local</X11WindowMode> | ||
| <KeepConsoleAfterExit>false</KeepConsoleAfterExit> | ||
| <RunGDBUnderSudo>false</RunGDBUnderSudo> | ||
| <DeploymentMode>Auto</DeploymentMode> | ||
| <DeployWhenLaunchedWithoutDebugging>true</DeployWhenLaunchedWithoutDebugging> | ||
| </Debug> | ||
| <CustomBuild> | ||
| <PreBuildActions /> | ||
| <PostBuildActions /> | ||
| <PreCleanActions /> | ||
| <PostCleanActions /> | ||
| </CustomBuild> | ||
| <CustomDebug> | ||
| <PreDebugActions /> | ||
| <PostDebugActions /> | ||
| <DebugStopActions /> | ||
| <BreakMode>Default</BreakMode> | ||
| </CustomDebug> | ||
| <CustomShortcuts> | ||
| <Shortcuts /> | ||
| <ShowMessageAfterExecuting>true</ShowMessageAfterExecuting> | ||
| </CustomShortcuts> | ||
| <UserDefinedVariables /> | ||
| <ImportedPropertySheets /> | ||
| <CodeSense> | ||
| <Enabled>Unknown</Enabled> | ||
| <ExtraSettings> | ||
| <HideErrorsInSystemHeaders>true</HideErrorsInSystemHeaders> | ||
| </ExtraSettings> | ||
| </CodeSense> | ||
| </VisualGDBProjectSettings2> |
| @@ -0,0 +1,145 @@ | ||
| <?xml version="1.0"?> | ||
| <VisualGDBProjectSettings2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
| <ConfigurationName>Release</ConfigurationName> | ||
| <Project xsi:type="com.visualgdb.project.linux"> | ||
| <CustomSourceDirectories> | ||
| <Directories /> | ||
| <PathStyle>MinGWUnixSlash</PathStyle> | ||
| </CustomSourceDirectories> | ||
| <DeploymentHost> | ||
| <HostName>192.168.7.2</HostName> | ||
| <Transport>SSH</Transport> | ||
| <UserName>root</UserName> | ||
| </DeploymentHost> | ||
| <AllowChangingHostForMainCommands>false</AllowChangingHostForMainCommands> | ||
| <SkipBuildIfNoSourceFilesChanged>false</SkipBuildIfNoSourceFilesChanged> | ||
| <IgnoreFileTransferErrors>false</IgnoreFileTransferErrors> | ||
| <RemoveRemoteDirectoryOnClean>false</RemoveRemoteDirectoryOnClean> | ||
| <SkipDeploymentTests>false</SkipDeploymentTests> | ||
| <MainSourceDirectoryForLocalBuilds>$(ProjectDir)</MainSourceDirectoryForLocalBuilds> | ||
| </Project> | ||
| <Build xsi:type="com.visualgdb.build.make"> | ||
| <MakeFilePathRelativeToSourceDir>Makefile</MakeFilePathRelativeToSourceDir> | ||
| <MakeConfigurationName>Release</MakeConfigurationName> | ||
| <Toolchain> | ||
| <Name>Beaglebone</Name> | ||
| <UniqueID>com.visualgdb.beaglebone</UniqueID> | ||
| <Location>C:\SysGCC\Beaglebone</Location> | ||
| <UnixSystem>false</UnixSystem> | ||
| <GCC>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-gcc.exe</GCC> | ||
| <GXX>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-g++.exe</GXX> | ||
| <GDB>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-gdb.exe</GDB> | ||
| <AR>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-ar.exe</AR> | ||
| <OBJCOPY>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-objcopy.exe</OBJCOPY> | ||
| <Make>C:\SysGCC\Beaglebone\bin\make.exe</Make> | ||
| <AdditionalPathDirectories> | ||
| <string>C:\SysGCC\Beaglebone\bin</string> | ||
| </AdditionalPathDirectories> | ||
| <RequireCmdExe>true</RequireCmdExe> | ||
| <RequireCtrlBreak>false</RequireCtrlBreak> | ||
| <SourceDirMapping> | ||
| <Directories /> | ||
| <PathStyle>MinGWUnixSlash</PathStyle> | ||
| </SourceDirMapping> | ||
| </Toolchain> | ||
| <MakeCommandTemplate> | ||
| <SkipWhenRunningCommandList>false</SkipWhenRunningCommandList> | ||
| <Command>cmd.exe</Command> | ||
| <Arguments>/c "C:\SysGCC\Beaglebone\bin\make.exe"</Arguments> | ||
| <WorkingDirectory>$(BuildDir)</WorkingDirectory> | ||
| <Environment> | ||
| <Records> | ||
| <Record> | ||
| <VariableName>LANG</VariableName> | ||
| <Value>en_US.UTF-8</Value> | ||
| </Record> | ||
| <Record> | ||
| <VariableName>PATH</VariableName> | ||
| <Value>C:\SysGCC\Beaglebone\bin;%PATH%</Value> | ||
| </Record> | ||
| </Records> | ||
| </Environment> | ||
| </MakeCommandTemplate> | ||
| </Build> | ||
| <Debug xsi:type="com.visualgdb.debug.remote"> | ||
| <AdditionalStartupCommands /> | ||
| <AdditionalGDBSettings> | ||
| <FilterSpuriousStoppedNotifications>false</FilterSpuriousStoppedNotifications> | ||
| <ForceSingleThreadedMode>false</ForceSingleThreadedMode> | ||
| <PendingBreakpointsSupported>true</PendingBreakpointsSupported> | ||
| <DisableChildRanges>false</DisableChildRanges> | ||
| <UseAppleExtensions>false</UseAppleExtensions> | ||
| <CanAcceptCommandsWhileRunning>false</CanAcceptCommandsWhileRunning> | ||
| <MakeLogFile>false</MakeLogFile> | ||
| <IgnoreModuleEventsWhileStepping>true</IgnoreModuleEventsWhileStepping> | ||
| <UseRelativePathsOnly>false</UseRelativePathsOnly> | ||
| <ExitAction>None</ExitAction> | ||
| <Features> | ||
| <DisableAutoDetection>false</DisableAutoDetection> | ||
| <UseFrameParameter>false</UseFrameParameter> | ||
| <SimpleValuesFlagSupported>false</SimpleValuesFlagSupported> | ||
| <ListLocalsSupported>false</ListLocalsSupported> | ||
| <ByteLevelMemoryCommandsAvailable>false</ByteLevelMemoryCommandsAvailable> | ||
| <ThreadInfoSupported>false</ThreadInfoSupported> | ||
| <PendingBreakpointsSupported>false</PendingBreakpointsSupported> | ||
| <SupportTargetCommand>false</SupportTargetCommand> | ||
| <ReliableBreakpointNotifications>false</ReliableBreakpointNotifications> | ||
| </Features> | ||
| <DisableDisassembly>false</DisableDisassembly> | ||
| <ExamineMemoryWithXCommand>false</ExamineMemoryWithXCommand> | ||
| <StepIntoNewInstanceEntry>main</StepIntoNewInstanceEntry> | ||
| <ExamineRegistersInRawFormat>true</ExamineRegistersInRawFormat> | ||
| <EnableSmartStepping>false</EnableSmartStepping> | ||
| <DisableSignals>false</DisableSignals> | ||
| <EnableAsyncExecutionMode>false</EnableAsyncExecutionMode> | ||
| <EnableNonStopMode>false</EnableNonStopMode> | ||
| </AdditionalGDBSettings> | ||
| <LaunchGDBSettings xsi:type="GDBLaunchParametersNewInstance"> | ||
| <GDBEnvironment> | ||
| <Records> | ||
| <Record> | ||
| <VariableName>LANG</VariableName> | ||
| <Value>en_US.UTF-8</Value> | ||
| </Record> | ||
| <Record> | ||
| <VariableName>PATH</VariableName> | ||
| <Value>C:\SysGCC\Beaglebone\bin;%PATH%</Value> | ||
| </Record> | ||
| </Records> | ||
| </GDBEnvironment> | ||
| <DebuggedProgram>$(TargetPath)</DebuggedProgram> | ||
| <GDBServerPort>2000</GDBServerPort> | ||
| <ProgramArguments /> | ||
| </LaunchGDBSettings> | ||
| <GenerateCtrlBreakInsteadOfCtrlC>false</GenerateCtrlBreakInsteadOfCtrlC> | ||
| <DeploymentTargetPath>/home/root//$(TargetFileName)</DeploymentTargetPath> | ||
| <X11WindowMode>Local</X11WindowMode> | ||
| <KeepConsoleAfterExit>false</KeepConsoleAfterExit> | ||
| <RunGDBUnderSudo>false</RunGDBUnderSudo> | ||
| <DeploymentMode>Auto</DeploymentMode> | ||
| <DeployWhenLaunchedWithoutDebugging>true</DeployWhenLaunchedWithoutDebugging> | ||
| </Debug> | ||
| <CustomBuild> | ||
| <PreBuildActions /> | ||
| <PostBuildActions /> | ||
| <PreCleanActions /> | ||
| <PostCleanActions /> | ||
| </CustomBuild> | ||
| <CustomDebug> | ||
| <PreDebugActions /> | ||
| <PostDebugActions /> | ||
| <DebugStopActions /> | ||
| <BreakMode>Default</BreakMode> | ||
| </CustomDebug> | ||
| <CustomShortcuts> | ||
| <Shortcuts /> | ||
| <ShowMessageAfterExecuting>true</ShowMessageAfterExecuting> | ||
| </CustomShortcuts> | ||
| <UserDefinedVariables /> | ||
| <CodeSense> | ||
| <Enabled>Unknown</Enabled> | ||
| <ExtraSettings> | ||
| <HideErrorsInSystemHeaders>true</HideErrorsInSystemHeaders> | ||
| </ExtraSettings> | ||
| </CodeSense> | ||
| </VisualGDBProjectSettings2> |
| @@ -0,0 +1,19 @@ | ||
| #include <iostream> | ||
| #include "skip32.hh" | ||
|
|
||
| using namespace std; | ||
|
|
||
| int main(int argc, char *argv[]) | ||
| { | ||
| const std::vector<uint8_t> key = { 0x9b, 0x21, 0x96, 0xe, 0x1a, 0xcf, 0x24, 0x5f, 0x14, 0x93 }; | ||
| // const std::vector<uint8_t> key = { 'p', 'o', 'i', 'u', 'y', 't', 'r', 'e', 'w', 'q' }; | ||
| auto skip = new skip32(key); | ||
| int plain = 42; | ||
| std::cout << "Encrypted: " << plain << endl; | ||
| int ecrypt, dcrypt; | ||
| skip->block_encrypt(&plain, &ecrypt); | ||
| std::cout << "Encrypted: " << ecrypt << endl; | ||
| skip->block_decrypt(&ecrypt, &dcrypt); | ||
| std::cout << "Decrypted: " << dcrypt << endl; | ||
| cin.get(); | ||
| } |
| @@ -0,0 +1,83 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <ItemGroup Label="ProjectConfigurations"> | ||
| <ProjectConfiguration Include="Debug|Win32"> | ||
| <Configuration>Debug</Configuration> | ||
| <Platform>Win32</Platform> | ||
| </ProjectConfiguration> | ||
| <ProjectConfiguration Include="Release|Win32"> | ||
| <Configuration>Release</Configuration> | ||
| <Platform>Win32</Platform> | ||
| </ProjectConfiguration> | ||
| </ItemGroup> | ||
| <PropertyGroup Label="Globals"> | ||
| <ProjectGuid>{9E73A86C-D838-40B8-B2DC-A5F0E4FE536E}</ProjectGuid> | ||
| </PropertyGroup> | ||
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> | ||
| <ConfigurationType>Makefile</ConfigurationType> | ||
| <UseDebugLibraries>true</UseDebugLibraries> | ||
| <PlatformToolset>v140</PlatformToolset> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | ||
| <ConfigurationType>Makefile</ConfigurationType> | ||
| <UseDebugLibraries>false</UseDebugLibraries> | ||
| <PlatformToolset>v140</PlatformToolset> | ||
| </PropertyGroup> | ||
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
| <ImportGroup Label="ExtensionSettings"> | ||
| </ImportGroup> | ||
| <ImportGroup Label="Shared"> | ||
| </ImportGroup> | ||
| <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | ||
| <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
| </ImportGroup> | ||
| <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||
| <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
| </ImportGroup> | ||
| <PropertyGroup Label="UserMacros" /> | ||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | ||
| <NMakeIncludeSearchPath>c:\sysgcc\beaglebone\arm-angstrom-linux-gnueabi\include\c++\4.7.3;c:\sysgcc\beaglebone\arm-angstrom-linux-gnueabi\include\c++\4.7.3\arm-angstrom-linux-gnueabi;c:\sysgcc\beaglebone\arm-angstrom-linux-gnueabi\include\c++\4.7.3\backward;c:\sysgcc\beaglebone\lib\gcc\arm-angstrom-linux-gnueabi\4.7.3\include;c:\sysgcc\beaglebone\lib\gcc\arm-angstrom-linux-gnueabi\4.7.3\include-fixed;c:\sysgcc\beaglebone\arm-angstrom-linux-gnueabi\include;c:\sysgcc\beaglebone\arm-angstrom-linux-gnueabi\sysroot\usr\include;$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath> | ||
| <NMakeForcedIncludes>$(ProjectDir)\gcc_Debug.h;$(VISUALGDB_DIR)\gcc_compat.h;$(NMakeForcedIncludes)</NMakeForcedIncludes> | ||
| <NMakeBuildCommandLine>"$(VISUALGDB_DIR)\VisualGDB.exe" /build "$(ProjectPath)" "/solution:$(SolutionPath)" "/config:$(Configuration)" "/platform:$(Platform)"</NMakeBuildCommandLine> | ||
| <NMakeCleanCommandLine>"$(VISUALGDB_DIR)\VisualGDB.exe" /clean "$(ProjectPath)" "/solution:$(SolutionPath)" "/config:$(Configuration)" "/platform:$(Platform)"</NMakeCleanCommandLine> | ||
| <NMakeReBuildCommandLine>"$(VISUALGDB_DIR)\VisualGDB.exe" /rebuild "$(ProjectPath)" "/solution:$(SolutionPath)" "/config:$(Configuration)" "/platform:$(Platform)"</NMakeReBuildCommandLine> | ||
| <NMakeOutput>$(ProjectDir)skip32-test-Debug.vgdbsettings</NMakeOutput> | ||
| <IncludePath /> | ||
| <ReferencePath /> | ||
| <LibraryPath /> | ||
| <NMakePreprocessorDefinitions>__VisualGDB_CFG_Debug;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||
| <NMakeIncludeSearchPath>c:\sysgcc\beaglebone\arm-angstrom-linux-gnueabi\include\c++\4.7.3;c:\sysgcc\beaglebone\arm-angstrom-linux-gnueabi\include\c++\4.7.3\arm-angstrom-linux-gnueabi;c:\sysgcc\beaglebone\arm-angstrom-linux-gnueabi\include\c++\4.7.3\backward;c:\sysgcc\beaglebone\lib\gcc\arm-angstrom-linux-gnueabi\4.7.3\include;c:\sysgcc\beaglebone\lib\gcc\arm-angstrom-linux-gnueabi\4.7.3\include-fixed;c:\sysgcc\beaglebone\arm-angstrom-linux-gnueabi\include;c:\sysgcc\beaglebone\arm-angstrom-linux-gnueabi\sysroot\usr\include;$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath> | ||
| <NMakeForcedIncludes>$(ProjectDir)\gcc_Release.h;$(VISUALGDB_DIR)\gcc_compat.h;$(NMakeForcedIncludes)</NMakeForcedIncludes> | ||
| <NMakePreprocessorDefinitions>__VisualGDB_CFG_Release;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions> | ||
| <NMakeBuildCommandLine>"$(VISUALGDB_DIR)\VisualGDB.exe" /build "$(ProjectPath)" "/solution:$(SolutionPath)" "/config:$(Configuration)" "/platform:$(Platform)"</NMakeBuildCommandLine> | ||
| <NMakeCleanCommandLine>"$(VISUALGDB_DIR)\VisualGDB.exe" /clean "$(ProjectPath)" "/solution:$(SolutionPath)" "/config:$(Configuration)" "/platform:$(Platform)"</NMakeCleanCommandLine> | ||
| <NMakeReBuildCommandLine>"$(VISUALGDB_DIR)\VisualGDB.exe" /rebuild "$(ProjectPath)" "/solution:$(SolutionPath)" "/config:$(Configuration)" "/platform:$(Platform)"</NMakeReBuildCommandLine> | ||
| <NMakeOutput>$(ProjectDir)skip32-test-Release.vgdbsettings</NMakeOutput> | ||
| <IncludePath /> | ||
| <ReferencePath /> | ||
| <LibraryPath /> | ||
| </PropertyGroup> | ||
| <ItemDefinitionGroup> | ||
| </ItemDefinitionGroup> | ||
| <ItemGroup> | ||
| <ClCompile Include="skip32-test.cpp" /> | ||
| <ClCompile Include="skip32.cc" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <None Include="debug.mak" /> | ||
| <None Include="Makefile" /> | ||
| <None Include="release.mak" /> | ||
| <None Include="skip32-test-Debug.vgdbsettings" /> | ||
| <None Include="skip32-test-Release.vgdbsettings" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <ClInclude Include="errstream.hh" /> | ||
| <ClInclude Include="skip32.hh" /> | ||
| </ItemGroup> | ||
| <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
| <ImportGroup Label="ExtensionTargets"> | ||
| </ImportGroup> | ||
| </Project> |
| @@ -0,0 +1,52 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <ItemGroup> | ||
| <Filter Include="Source files"> | ||
| <UniqueIdentifier>{b13b3e00-d9aa-4c7d-992e-21cedd7a0636}</UniqueIdentifier> | ||
| <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> | ||
| </Filter> | ||
| <Filter Include="Header files"> | ||
| <UniqueIdentifier>{2dbc621d-e11c-4c6f-aec2-87a805e64c0d}</UniqueIdentifier> | ||
| <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> | ||
| </Filter> | ||
| <Filter Include="Resource files"> | ||
| <UniqueIdentifier>{4a5625ef-d667-4b20-8616-0b45b4ecf508}</UniqueIdentifier> | ||
| <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> | ||
| </Filter> | ||
| <Filter Include="Make files"> | ||
| <UniqueIdentifier>{f72ac226-ad6a-4948-beb2-bba803ff4f68}</UniqueIdentifier> | ||
| <Extensions>*.mak</Extensions> | ||
| </Filter> | ||
| <Filter Include="VisualGDB settings"> | ||
| <UniqueIdentifier>{9dad35bf-5f64-44db-ab07-14c48ec4151e}</UniqueIdentifier> | ||
| <Extensions>*.vgdbsettings</Extensions> | ||
| </Filter> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <ClCompile Include="skip32-test.cpp"> | ||
| <Filter>Source files</Filter> | ||
| </ClCompile> | ||
| <ClCompile Include="skip32.cc"> | ||
| <Filter>Source files</Filter> | ||
| </ClCompile> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <None Include="Makefile" /> | ||
| <None Include="debug.mak"> | ||
| <Filter>Make files</Filter> | ||
| </None> | ||
| <None Include="skip32-test-Debug.vgdbsettings"> | ||
| <Filter>VisualGDB settings</Filter> | ||
| </None> | ||
| <None Include="release.mak"> | ||
| <Filter>Make files</Filter> | ||
| </None> | ||
| <None Include="skip32-test-Release.vgdbsettings"> | ||
| <Filter>VisualGDB settings</Filter> | ||
| </None> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <ClInclude Include="skip32.hh" /> | ||
| <ClInclude Include="errstream.hh" /> | ||
| </ItemGroup> | ||
| </Project> |
| @@ -0,0 +1,91 @@ | ||
| #include "skip32.hh" | ||
|
|
||
| /* | ||
| * C++ version of skip32 based on code from | ||
| * http://www.qualcomm.com.au/PublicationsDocs/skip32.c | ||
| */ | ||
|
|
||
| /* | ||
| SKIP32 -- 32 bit block cipher based on SKIPJACK. | ||
| Written by Greg Rose, QUALCOMM Australia, 1999/04/27. | ||
| In common: F-table, G-permutation, key schedule. | ||
| Different: 24 round feistel structure. | ||
| Based on: Unoptimized test implementation of SKIPJACK algorithm | ||
| Panu Rissanen <bande@lut.fi> | ||
| SKIPJACK and KEA Algorithm Specifications | ||
| Version 2.0 | ||
| 29 May 1998 | ||
| Not copyright, no rights reserved. | ||
| */ | ||
|
|
||
| const uint8_t ftable[256] = { | ||
| 0xa3,0xd7,0x09,0x83,0xf8,0x48,0xf6,0xf4,0xb3,0x21,0x15,0x78,0x99,0xb1,0xaf,0xf9, | ||
| 0xe7,0x2d,0x4d,0x8a,0xce,0x4c,0xca,0x2e,0x52,0x95,0xd9,0x1e,0x4e,0x38,0x44,0x28, | ||
| 0x0a,0xdf,0x02,0xa0,0x17,0xf1,0x60,0x68,0x12,0xb7,0x7a,0xc3,0xe9,0xfa,0x3d,0x53, | ||
| 0x96,0x84,0x6b,0xba,0xf2,0x63,0x9a,0x19,0x7c,0xae,0xe5,0xf5,0xf7,0x16,0x6a,0xa2, | ||
| 0x39,0xb6,0x7b,0x0f,0xc1,0x93,0x81,0x1b,0xee,0xb4,0x1a,0xea,0xd0,0x91,0x2f,0xb8, | ||
| 0x55,0xb9,0xda,0x85,0x3f,0x41,0xbf,0xe0,0x5a,0x58,0x80,0x5f,0x66,0x0b,0xd8,0x90, | ||
| 0x35,0xd5,0xc0,0xa7,0x33,0x06,0x65,0x69,0x45,0x00,0x94,0x56,0x6d,0x98,0x9b,0x76, | ||
| 0x97,0xfc,0xb2,0xc2,0xb0,0xfe,0xdb,0x20,0xe1,0xeb,0xd6,0xe4,0xdd,0x47,0x4a,0x1d, | ||
| 0x42,0xed,0x9e,0x6e,0x49,0x3c,0xcd,0x43,0x27,0xd2,0x07,0xd4,0xde,0xc7,0x67,0x18, | ||
| 0x89,0xcb,0x30,0x1f,0x8d,0xc6,0x8f,0xaa,0xc8,0x74,0xdc,0xc9,0x5d,0x5c,0x31,0xa4, | ||
| 0x70,0x88,0x61,0x2c,0x9f,0x0d,0x2b,0x87,0x50,0x82,0x54,0x64,0x26,0x7d,0x03,0x40, | ||
| 0x34,0x4b,0x1c,0x73,0xd1,0xc4,0xfd,0x3b,0xcc,0xfb,0x7f,0xab,0xe6,0x3e,0x5b,0xa5, | ||
| 0xad,0x04,0x23,0x9c,0x14,0x51,0x22,0xf0,0x29,0x79,0x71,0x7e,0xff,0x8c,0x0e,0xe2, | ||
| 0x0c,0xef,0xbc,0x72,0x75,0x6f,0x37,0xa1,0xec,0xd3,0x8e,0x62,0x8b,0x86,0x10,0xe8, | ||
| 0x08,0x77,0x11,0xbe,0x92,0x4f,0x24,0xc5,0x32,0x36,0x9d,0xcf,0xf3,0xa6,0xbb,0xac, | ||
| 0x5e,0x6c,0xa9,0x13,0x57,0x25,0xb5,0xe3,0xbd,0xa8,0x3a,0x01,0x05,0x59,0x2a,0x46 | ||
| }; | ||
|
|
||
| static uint16_t | ||
| g(const uint8_t *key, int k, uint16_t w) | ||
| { | ||
| uint8_t g1, g2, g3, g4, g5, g6; | ||
|
|
||
| g1 = (w>>8)&0xff; | ||
| g2 = w&0xff; | ||
|
|
||
| g3 = ftable[g2 ^ key[(4*k)%10]] ^ g1; | ||
| g4 = ftable[g3 ^ key[(4*k+1)%10]] ^ g2; | ||
| g5 = ftable[g4 ^ key[(4*k+2)%10]] ^ g3; | ||
| g6 = ftable[g5 ^ key[(4*k+3)%10]] ^ g4; | ||
|
|
||
| return ((g5<<8) + g6); | ||
| } | ||
|
|
||
| void | ||
| skip32::process(uint8_t buf[4], int encrypt) const | ||
| { | ||
| int k; /* round number */ | ||
| int i; /* round counter */ | ||
| int kstep; | ||
| uint16_t wl, wr; | ||
|
|
||
| /* sort out direction */ | ||
| if (encrypt) { | ||
| kstep = 1; | ||
| k = 0; | ||
| } else { | ||
| kstep = -1; | ||
| k = 23; | ||
| } | ||
|
|
||
| /* pack into words */ | ||
| wl = (buf[0] << 8) + buf[1]; | ||
| wr = (buf[2] << 8) + buf[3]; | ||
|
|
||
| /* 24 feistel rounds, doubled up */ | ||
| for (i = 0; i < 24/2; ++i) { | ||
| wr ^= g(&key[0], k, wl) ^ k; | ||
| k += kstep; | ||
| wl ^= g(&key[0], k, wr) ^ k; | ||
| k += kstep; | ||
| } | ||
|
|
||
| /* implicitly swap halves while unpacking */ | ||
| buf[0] = wr >> 8; buf[1] = wr & 0xFF; | ||
| buf[2] = wl >> 8; buf[3] = wl & 0xFF; | ||
| } |
| @@ -0,0 +1,32 @@ | ||
| #pragma once | ||
|
|
||
| #include <string.h> | ||
| #include <stdint.h> | ||
| #include <vector> | ||
|
|
||
| #include "errstream.hh" | ||
|
|
||
| class skip32 { | ||
| public: | ||
| skip32(const std::vector<uint8_t> &k) { | ||
| throw_c(k.size() == 10); | ||
| key = k; | ||
| } | ||
|
|
||
| void block_encrypt(const void *ptext, void *ctext) const { | ||
| memcpy(ctext, ptext, 4); | ||
| process((uint8_t*) ctext, 1); | ||
| } | ||
|
|
||
| void block_decrypt(const void *ctext, void *ptext) const { | ||
| memcpy(ptext, ctext, 4); | ||
| process((uint8_t*) ptext, 0); | ||
| } | ||
|
|
||
| static const size_t blocksize = 4; | ||
|
|
||
| private: | ||
| void process(uint8_t *data, int encrypt) const; | ||
|
|
||
| std::vector<uint8_t> key; | ||
| }; |
| @@ -0,0 +1,28 @@ | ||
|
|
||
| Microsoft Visual Studio Solution File, Format Version 12.00 | ||
| # Visual Studio 14 | ||
| VisualStudioVersion = 14.0.25123.0 | ||
| MinimumVisualStudioVersion = 10.0.40219.1 | ||
| Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "skip32", "skip32\skip32.vcxproj", "{9129E8E7-93A8-47A1-BEB6-26D56FA78F32}" | ||
| EndProject | ||
| Global | ||
| GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
| Debug|x64 = Debug|x64 | ||
| Debug|x86 = Debug|x86 | ||
| Release|x64 = Release|x64 | ||
| Release|x86 = Release|x86 | ||
| EndGlobalSection | ||
| GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
| {9129E8E7-93A8-47A1-BEB6-26D56FA78F32}.Debug|x64.ActiveCfg = Debug|x64 | ||
| {9129E8E7-93A8-47A1-BEB6-26D56FA78F32}.Debug|x64.Build.0 = Debug|x64 | ||
| {9129E8E7-93A8-47A1-BEB6-26D56FA78F32}.Debug|x86.ActiveCfg = Debug|Win32 | ||
| {9129E8E7-93A8-47A1-BEB6-26D56FA78F32}.Debug|x86.Build.0 = Debug|Win32 | ||
| {9129E8E7-93A8-47A1-BEB6-26D56FA78F32}.Release|x64.ActiveCfg = Release|x64 | ||
| {9129E8E7-93A8-47A1-BEB6-26D56FA78F32}.Release|x64.Build.0 = Release|x64 | ||
| {9129E8E7-93A8-47A1-BEB6-26D56FA78F32}.Release|x86.ActiveCfg = Release|Win32 | ||
| {9129E8E7-93A8-47A1-BEB6-26D56FA78F32}.Release|x86.Build.0 = Release|Win32 | ||
| EndGlobalSection | ||
| GlobalSection(SolutionProperties) = preSolution | ||
| HideSolutionNode = FALSE | ||
| EndGlobalSection | ||
| EndGlobal |
| @@ -0,0 +1,40 @@ | ||
| ======================================================================== | ||
| CONSOLE APPLICATION : skip32 Project Overview | ||
| ======================================================================== | ||
|
|
||
| AppWizard has created this skip32 application for you. | ||
|
|
||
| This file contains a summary of what you will find in each of the files that | ||
| make up your skip32 application. | ||
|
|
||
|
|
||
| skip32.vcxproj | ||
| This is the main project file for VC++ projects generated using an Application Wizard. | ||
| It contains information about the version of Visual C++ that generated the file, and | ||
| information about the platforms, configurations, and project features selected with the | ||
| Application Wizard. | ||
|
|
||
| skip32.vcxproj.filters | ||
| This is the filters file for VC++ projects generated using an Application Wizard. | ||
| It contains information about the association between the files in your project | ||
| and the filters. This association is used in the IDE to show grouping of files with | ||
| similar extensions under a specific node (for e.g. ".cpp" files are associated with the | ||
| "Source Files" filter). | ||
|
|
||
| skip32.cpp | ||
| This is the main application source file. | ||
|
|
||
| ///////////////////////////////////////////////////////////////////////////// | ||
| Other standard files: | ||
|
|
||
| StdAfx.h, StdAfx.cpp | ||
| These files are used to build a precompiled header (PCH) file | ||
| named skip32.pch and a precompiled types file named StdAfx.obj. | ||
|
|
||
| ///////////////////////////////////////////////////////////////////////////// | ||
| Other notes: | ||
|
|
||
| AppWizard uses "TODO:" comments to indicate parts of the source code you | ||
| should add to or customize. | ||
|
|
||
| ///////////////////////////////////////////////////////////////////////////// |
| @@ -0,0 +1,50 @@ | ||
| #pragma once | ||
|
|
||
| #include <iostream> | ||
| #include <sstream> | ||
| #include <stdexcept> | ||
| #include <string> | ||
|
|
||
| class CryptDBError { | ||
| public: | ||
| CryptDBError(const std::string &m) : msg(m) {} | ||
| std::string msg; | ||
| }; | ||
|
|
||
| class CryptoError : public CryptDBError { | ||
| public: | ||
| CryptoError(const std::string &m) : CryptDBError(m) {} | ||
| }; | ||
|
|
||
| inline void | ||
| throw_c(bool test, const std::string &msg = "crypto fail") | ||
| { | ||
| if (false == test) { | ||
| throw CryptoError(msg); | ||
| } | ||
|
|
||
| return; | ||
| } | ||
| class fatal : public std::stringstream { | ||
| public: | ||
| ~fatal() __attribute__((noreturn)) { | ||
| std::cerr << str() << std::endl; | ||
| exit(-1); | ||
| } | ||
| }; | ||
|
|
||
| class cryptdb_err : public std::stringstream { | ||
| public: | ||
| ~cryptdb_err() __attribute__((noreturn)) { | ||
| std::cerr << str() << std::endl; | ||
| throw CryptDBError(str()); | ||
| } | ||
| }; | ||
|
|
||
| class thrower : public std::stringstream { | ||
| public: | ||
| ~thrower() __attribute__((noreturn)) { | ||
| throw std::runtime_error(str()); | ||
| } | ||
| }; | ||
|
|
| @@ -0,0 +1,147 @@ | ||
| <?xml version="1.0"?> | ||
| <VisualGDBProjectSettings2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
| <ConfigurationName>Debug</ConfigurationName> | ||
| <Project xsi:type="com.visualgdb.project.linux"> | ||
| <CustomSourceDirectories> | ||
| <Directories /> | ||
| <PathStyle>MinGWUnixSlash</PathStyle> | ||
| </CustomSourceDirectories> | ||
| <DeploymentHost> | ||
| <HostName>192.168.7.2</HostName> | ||
| <Transport>SSH</Transport> | ||
| <UserName>root</UserName> | ||
| </DeploymentHost> | ||
| <AllowChangingHostForMainCommands>false</AllowChangingHostForMainCommands> | ||
| <SkipBuildIfNoSourceFilesChanged>false</SkipBuildIfNoSourceFilesChanged> | ||
| <IgnoreFileTransferErrors>false</IgnoreFileTransferErrors> | ||
| <RemoveRemoteDirectoryOnClean>false</RemoveRemoteDirectoryOnClean> | ||
| <SkipDeploymentTests>false</SkipDeploymentTests> | ||
| <MainSourceDirectoryForLocalBuilds>$(ProjectDir)</MainSourceDirectoryForLocalBuilds> | ||
| </Project> | ||
| <Build xsi:type="com.visualgdb.build.make"> | ||
| <MakeFilePathRelativeToSourceDir>Makefile</MakeFilePathRelativeToSourceDir> | ||
| <MakeConfigurationName>Debug</MakeConfigurationName> | ||
| <AdditionalMakeArguments /> | ||
| <Toolchain> | ||
| <Name>Beaglebone</Name> | ||
| <UniqueID>com.visualgdb.beaglebone</UniqueID> | ||
| <Location>C:\SysGCC\Beaglebone</Location> | ||
| <UnixSystem>false</UnixSystem> | ||
| <GCC>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-gcc.exe</GCC> | ||
| <GXX>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-g++.exe</GXX> | ||
| <GDB>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-gdb.exe</GDB> | ||
| <AR>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-ar.exe</AR> | ||
| <OBJCOPY>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-objcopy.exe</OBJCOPY> | ||
| <Make>C:\SysGCC\Beaglebone\bin\make.exe</Make> | ||
| <AdditionalPathDirectories> | ||
| <string>C:\SysGCC\Beaglebone\bin</string> | ||
| </AdditionalPathDirectories> | ||
| <RequireCmdExe>true</RequireCmdExe> | ||
| <RequireCtrlBreak>false</RequireCtrlBreak> | ||
| <SourceDirMapping> | ||
| <Directories /> | ||
| <PathStyle>MinGWUnixSlash</PathStyle> | ||
| </SourceDirMapping> | ||
| </Toolchain> | ||
| <MakeCommandTemplate> | ||
| <SkipWhenRunningCommandList>false</SkipWhenRunningCommandList> | ||
| <Command>cmd.exe</Command> | ||
| <Arguments>/c "C:\SysGCC\Beaglebone\bin\make.exe"</Arguments> | ||
| <WorkingDirectory>$(BuildDir)</WorkingDirectory> | ||
| <Environment> | ||
| <Records> | ||
| <Record> | ||
| <VariableName>LANG</VariableName> | ||
| <Value>en_US.UTF-8</Value> | ||
| </Record> | ||
| <Record> | ||
| <VariableName>PATH</VariableName> | ||
| <Value>C:\SysGCC\Beaglebone\bin;%PATH%</Value> | ||
| </Record> | ||
| </Records> | ||
| </Environment> | ||
| </MakeCommandTemplate> | ||
| </Build> | ||
| <Debug xsi:type="com.visualgdb.debug.remote"> | ||
| <AdditionalStartupCommands /> | ||
| <AdditionalGDBSettings> | ||
| <FilterSpuriousStoppedNotifications>false</FilterSpuriousStoppedNotifications> | ||
| <ForceSingleThreadedMode>false</ForceSingleThreadedMode> | ||
| <PendingBreakpointsSupported>true</PendingBreakpointsSupported> | ||
| <DisableChildRanges>false</DisableChildRanges> | ||
| <UseAppleExtensions>false</UseAppleExtensions> | ||
| <CanAcceptCommandsWhileRunning>false</CanAcceptCommandsWhileRunning> | ||
| <MakeLogFile>false</MakeLogFile> | ||
| <IgnoreModuleEventsWhileStepping>true</IgnoreModuleEventsWhileStepping> | ||
| <UseRelativePathsOnly>false</UseRelativePathsOnly> | ||
| <ExitAction>None</ExitAction> | ||
| <Features> | ||
| <DisableAutoDetection>false</DisableAutoDetection> | ||
| <UseFrameParameter>false</UseFrameParameter> | ||
| <SimpleValuesFlagSupported>false</SimpleValuesFlagSupported> | ||
| <ListLocalsSupported>false</ListLocalsSupported> | ||
| <ByteLevelMemoryCommandsAvailable>false</ByteLevelMemoryCommandsAvailable> | ||
| <ThreadInfoSupported>false</ThreadInfoSupported> | ||
| <PendingBreakpointsSupported>false</PendingBreakpointsSupported> | ||
| <SupportTargetCommand>false</SupportTargetCommand> | ||
| <ReliableBreakpointNotifications>false</ReliableBreakpointNotifications> | ||
| </Features> | ||
| <DisableDisassembly>false</DisableDisassembly> | ||
| <ExamineMemoryWithXCommand>false</ExamineMemoryWithXCommand> | ||
| <StepIntoNewInstanceEntry>main</StepIntoNewInstanceEntry> | ||
| <ExamineRegistersInRawFormat>true</ExamineRegistersInRawFormat> | ||
| <EnableSmartStepping>false</EnableSmartStepping> | ||
| <DisableSignals>false</DisableSignals> | ||
| <EnableAsyncExecutionMode>false</EnableAsyncExecutionMode> | ||
| <EnableNonStopMode>false</EnableNonStopMode> | ||
| </AdditionalGDBSettings> | ||
| <LaunchGDBSettings xsi:type="GDBLaunchParametersNewInstance"> | ||
| <GDBEnvironment> | ||
| <Records> | ||
| <Record> | ||
| <VariableName>LANG</VariableName> | ||
| <Value>en_US.UTF-8</Value> | ||
| </Record> | ||
| <Record> | ||
| <VariableName>PATH</VariableName> | ||
| <Value>C:\SysGCC\Beaglebone\bin;%PATH%</Value> | ||
| </Record> | ||
| </Records> | ||
| </GDBEnvironment> | ||
| <DebuggedProgram>$(TargetPath)</DebuggedProgram> | ||
| <GDBServerPort>2000</GDBServerPort> | ||
| <ProgramArguments /> | ||
| </LaunchGDBSettings> | ||
| <GenerateCtrlBreakInsteadOfCtrlC>false</GenerateCtrlBreakInsteadOfCtrlC> | ||
| <DeploymentTargetPath>/home/root//$(TargetFileName)</DeploymentTargetPath> | ||
| <X11WindowMode>Local</X11WindowMode> | ||
| <KeepConsoleAfterExit>false</KeepConsoleAfterExit> | ||
| <RunGDBUnderSudo>false</RunGDBUnderSudo> | ||
| <DeploymentMode>Auto</DeploymentMode> | ||
| <DeployWhenLaunchedWithoutDebugging>true</DeployWhenLaunchedWithoutDebugging> | ||
| </Debug> | ||
| <CustomBuild> | ||
| <PreBuildActions /> | ||
| <PostBuildActions /> | ||
| <PreCleanActions /> | ||
| <PostCleanActions /> | ||
| </CustomBuild> | ||
| <CustomDebug> | ||
| <PreDebugActions /> | ||
| <PostDebugActions /> | ||
| <DebugStopActions /> | ||
| <BreakMode>Default</BreakMode> | ||
| </CustomDebug> | ||
| <CustomShortcuts> | ||
| <Shortcuts /> | ||
| <ShowMessageAfterExecuting>true</ShowMessageAfterExecuting> | ||
| </CustomShortcuts> | ||
| <UserDefinedVariables /> | ||
| <ImportedPropertySheets /> | ||
| <CodeSense> | ||
| <Enabled>Unknown</Enabled> | ||
| <ExtraSettings> | ||
| <HideErrorsInSystemHeaders>true</HideErrorsInSystemHeaders> | ||
| </ExtraSettings> | ||
| </CodeSense> | ||
| </VisualGDBProjectSettings2> |
| @@ -0,0 +1,145 @@ | ||
| <?xml version="1.0"?> | ||
| <VisualGDBProjectSettings2 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> | ||
| <ConfigurationName>Release</ConfigurationName> | ||
| <Project xsi:type="com.visualgdb.project.linux"> | ||
| <CustomSourceDirectories> | ||
| <Directories /> | ||
| <PathStyle>MinGWUnixSlash</PathStyle> | ||
| </CustomSourceDirectories> | ||
| <DeploymentHost> | ||
| <HostName>192.168.7.2</HostName> | ||
| <Transport>SSH</Transport> | ||
| <UserName>root</UserName> | ||
| </DeploymentHost> | ||
| <AllowChangingHostForMainCommands>false</AllowChangingHostForMainCommands> | ||
| <SkipBuildIfNoSourceFilesChanged>false</SkipBuildIfNoSourceFilesChanged> | ||
| <IgnoreFileTransferErrors>false</IgnoreFileTransferErrors> | ||
| <RemoveRemoteDirectoryOnClean>false</RemoveRemoteDirectoryOnClean> | ||
| <SkipDeploymentTests>false</SkipDeploymentTests> | ||
| <MainSourceDirectoryForLocalBuilds>$(ProjectDir)</MainSourceDirectoryForLocalBuilds> | ||
| </Project> | ||
| <Build xsi:type="com.visualgdb.build.make"> | ||
| <MakeFilePathRelativeToSourceDir>Makefile</MakeFilePathRelativeToSourceDir> | ||
| <MakeConfigurationName>Release</MakeConfigurationName> | ||
| <Toolchain> | ||
| <Name>Beaglebone</Name> | ||
| <UniqueID>com.visualgdb.beaglebone</UniqueID> | ||
| <Location>C:\SysGCC\Beaglebone</Location> | ||
| <UnixSystem>false</UnixSystem> | ||
| <GCC>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-gcc.exe</GCC> | ||
| <GXX>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-g++.exe</GXX> | ||
| <GDB>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-gdb.exe</GDB> | ||
| <AR>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-ar.exe</AR> | ||
| <OBJCOPY>C:\SysGCC\Beaglebone\bin\arm-angstrom-linux-gnueabi-objcopy.exe</OBJCOPY> | ||
| <Make>C:\SysGCC\Beaglebone\bin\make.exe</Make> | ||
| <AdditionalPathDirectories> | ||
| <string>C:\SysGCC\Beaglebone\bin</string> | ||
| </AdditionalPathDirectories> | ||
| <RequireCmdExe>true</RequireCmdExe> | ||
| <RequireCtrlBreak>false</RequireCtrlBreak> | ||
| <SourceDirMapping> | ||
| <Directories /> | ||
| <PathStyle>MinGWUnixSlash</PathStyle> | ||
| </SourceDirMapping> | ||
| </Toolchain> | ||
| <MakeCommandTemplate> | ||
| <SkipWhenRunningCommandList>false</SkipWhenRunningCommandList> | ||
| <Command>cmd.exe</Command> | ||
| <Arguments>/c "C:\SysGCC\Beaglebone\bin\make.exe"</Arguments> | ||
| <WorkingDirectory>$(BuildDir)</WorkingDirectory> | ||
| <Environment> | ||
| <Records> | ||
| <Record> | ||
| <VariableName>LANG</VariableName> | ||
| <Value>en_US.UTF-8</Value> | ||
| </Record> | ||
| <Record> | ||
| <VariableName>PATH</VariableName> | ||
| <Value>C:\SysGCC\Beaglebone\bin;%PATH%</Value> | ||
| </Record> | ||
| </Records> | ||
| </Environment> | ||
| </MakeCommandTemplate> | ||
| </Build> | ||
| <Debug xsi:type="com.visualgdb.debug.remote"> | ||
| <AdditionalStartupCommands /> | ||
| <AdditionalGDBSettings> | ||
| <FilterSpuriousStoppedNotifications>false</FilterSpuriousStoppedNotifications> | ||
| <ForceSingleThreadedMode>false</ForceSingleThreadedMode> | ||
| <PendingBreakpointsSupported>true</PendingBreakpointsSupported> | ||
| <DisableChildRanges>false</DisableChildRanges> | ||
| <UseAppleExtensions>false</UseAppleExtensions> | ||
| <CanAcceptCommandsWhileRunning>false</CanAcceptCommandsWhileRunning> | ||
| <MakeLogFile>false</MakeLogFile> | ||
| <IgnoreModuleEventsWhileStepping>true</IgnoreModuleEventsWhileStepping> | ||
| <UseRelativePathsOnly>false</UseRelativePathsOnly> | ||
| <ExitAction>None</ExitAction> | ||
| <Features> | ||
| <DisableAutoDetection>false</DisableAutoDetection> | ||
| <UseFrameParameter>false</UseFrameParameter> | ||
| <SimpleValuesFlagSupported>false</SimpleValuesFlagSupported> | ||
| <ListLocalsSupported>false</ListLocalsSupported> | ||
| <ByteLevelMemoryCommandsAvailable>false</ByteLevelMemoryCommandsAvailable> | ||
| <ThreadInfoSupported>false</ThreadInfoSupported> | ||
| <PendingBreakpointsSupported>false</PendingBreakpointsSupported> | ||
| <SupportTargetCommand>false</SupportTargetCommand> | ||
| <ReliableBreakpointNotifications>false</ReliableBreakpointNotifications> | ||
| </Features> | ||
| <DisableDisassembly>false</DisableDisassembly> | ||
| <ExamineMemoryWithXCommand>false</ExamineMemoryWithXCommand> | ||
| <StepIntoNewInstanceEntry>main</StepIntoNewInstanceEntry> | ||
| <ExamineRegistersInRawFormat>true</ExamineRegistersInRawFormat> | ||
| <EnableSmartStepping>false</EnableSmartStepping> | ||
| <DisableSignals>false</DisableSignals> | ||
| <EnableAsyncExecutionMode>false</EnableAsyncExecutionMode> | ||
| <EnableNonStopMode>false</EnableNonStopMode> | ||
| </AdditionalGDBSettings> | ||
| <LaunchGDBSettings xsi:type="GDBLaunchParametersNewInstance"> | ||
| <GDBEnvironment> | ||
| <Records> | ||
| <Record> | ||
| <VariableName>LANG</VariableName> | ||
| <Value>en_US.UTF-8</Value> | ||
| </Record> | ||
| <Record> | ||
| <VariableName>PATH</VariableName> | ||
| <Value>C:\SysGCC\Beaglebone\bin;%PATH%</Value> | ||
| </Record> | ||
| </Records> | ||
| </GDBEnvironment> | ||
| <DebuggedProgram>$(TargetPath)</DebuggedProgram> | ||
| <GDBServerPort>2000</GDBServerPort> | ||
| <ProgramArguments /> | ||
| </LaunchGDBSettings> | ||
| <GenerateCtrlBreakInsteadOfCtrlC>false</GenerateCtrlBreakInsteadOfCtrlC> | ||
| <DeploymentTargetPath>/home/root//$(TargetFileName)</DeploymentTargetPath> | ||
| <X11WindowMode>Local</X11WindowMode> | ||
| <KeepConsoleAfterExit>false</KeepConsoleAfterExit> | ||
| <RunGDBUnderSudo>false</RunGDBUnderSudo> | ||
| <DeploymentMode>Auto</DeploymentMode> | ||
| <DeployWhenLaunchedWithoutDebugging>true</DeployWhenLaunchedWithoutDebugging> | ||
| </Debug> | ||
| <CustomBuild> | ||
| <PreBuildActions /> | ||
| <PostBuildActions /> | ||
| <PreCleanActions /> | ||
| <PostCleanActions /> | ||
| </CustomBuild> | ||
| <CustomDebug> | ||
| <PreDebugActions /> | ||
| <PostDebugActions /> | ||
| <DebugStopActions /> | ||
| <BreakMode>Default</BreakMode> | ||
| </CustomDebug> | ||
| <CustomShortcuts> | ||
| <Shortcuts /> | ||
| <ShowMessageAfterExecuting>true</ShowMessageAfterExecuting> | ||
| </CustomShortcuts> | ||
| <UserDefinedVariables /> | ||
| <CodeSense> | ||
| <Enabled>Unknown</Enabled> | ||
| <ExtraSettings> | ||
| <HideErrorsInSystemHeaders>true</HideErrorsInSystemHeaders> | ||
| </ExtraSettings> | ||
| </CodeSense> | ||
| </VisualGDBProjectSettings2> |
| @@ -0,0 +1,19 @@ | ||
| #include <iostream> | ||
| #include "skip32.hh" | ||
|
|
||
| using namespace std; | ||
|
|
||
| int main(int argc, char *argv[]) | ||
| { | ||
| const std::vector<uint8_t> key = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; | ||
| // const std::vector<uint8_t> key = { 'p', 'o', 'i', 'u', 'y', 't', 'r', 'e', 'w', 'q' }; | ||
| auto skip = new skip32(key); | ||
| unsigned int plain = 42; | ||
| std::cout << "Encrypted: " << plain << endl; | ||
| unsigned int ecrypt, dcrypt; | ||
| skip->block_encrypt(&plain, &ecrypt); | ||
| std::cout << "Encrypted: " << ecrypt << endl; | ||
| skip->block_decrypt(&ecrypt, &dcrypt); | ||
| std::cout << "Decrypted: " << dcrypt << endl; | ||
| cin.get(); | ||
| } |