Skip to content

Commit

Permalink
megrge gloveboxes code (#8)
Browse files Browse the repository at this point in the history
* Update to CMake for Azure Sphere SDK 19.11

* added support for VS Code/Ubuntu

* updated samples for vs, vs code, windows, ubuntu

* refactored directory structure
  • Loading branch information
Pillar1989 authored Dec 28, 2019
1 parent 396dd64 commit 50869fc
Show file tree
Hide file tree
Showing 116 changed files with 1,499 additions and 2,414 deletions.
60 changes: 4 additions & 56 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,56 +1,4 @@
# Prerequisites
*.d

# Object files
*.o
*.ko
*.obj
*.elf

# Linker output
*.ilk
*.map
*.exp

# Precompiled Headers
*.gch
*.pch

# Libraries
*.lib
*.a
*.la
*.lo

# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib

# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex

# Debug files
*.dSYM/
*.su
*.idb
*.pdb

# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf

/.vs
/MT3620_Grove_Shield_Library/obj
/MT3620_Grove_Shield_Library/*.user
# Ignore output directories
/out/
/install/
.vs/
24 changes: 0 additions & 24 deletions MT3620_Grove_Shield_Library.sln

This file was deleted.

101 changes: 101 additions & 0 deletions MT3620_Grove_Shield_Library/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
CMAKE_MINIMUM_REQUIRED(VERSION 3.8)
PROJECT(MT3620_Grove_Shield_Library C)

################################################################################
# Source groups
################################################################################
set(no_group_source_files
"applibs_versions.h"
"Grove.h"
"mt3620_rdb.h"
)
source_group("" FILES ${no_group_source_files})

set(Common
"Common/Delay.c"
"Common/Delay.h"
)
source_group("Common" FILES ${Common})

set(HAL
"HAL/GroveI2C.c"
"HAL/GroveI2C.h"
"HAL/GroveShield.c"
"HAL/GroveShield.h"
"HAL/GroveUART.c"
"HAL/GroveUART.h"
)
source_group("HAL" FILES ${HAL})

set(Sensors
"Sensors/Grove4DigitDisplay.c"
"Sensors/Grove4DigitDisplay.h"
"Sensors/GroveAD7992.c"
"Sensors/GroveAD7992.h"
"Sensors/GroveLEDButton.c"
"Sensors/GroveLEDButton.h"
"Sensors/GroveLightSensor.c"
"Sensors/GroveLightSensor.h"
"Sensors/GroveOledDisplay96x96.c"
"Sensors/GroveOledDisplay96x96.h"
"Sensors/GroveRelay.c"
"Sensors/GroveRelay.h"
"Sensors/GroveRotaryAngleSensor.c"
"Sensors/GroveRotaryAngleSensor.h"
"Sensors/GroveTempHumiBaroBME280.c"
"Sensors/GroveTempHumiBaroBME280.h"
"Sensors/GroveTempHumiSHT31.c"
"Sensors/GroveTempHumiSHT31.h"
)
source_group("Sensors" FILES ${Sensors})

set(ALL_FILES
${no_group_source_files}
${Common}
${HAL}
${Sensors}
)

################################################################################
# Target
################################################################################
add_library(${PROJECT_NAME} STATIC ${ALL_FILES})


set(ROOT_NAMESPACE MT3620_Grove_Shield_Library)

set_target_properties(${PROJECT_NAME} PROPERTIES
VS_GLOBAL_KEYWORD "AzureSphere"
)


target_link_libraries (${PROJECT_NAME} applibs pthread gcc_s c)

################################################################################
# Compile definitions
################################################################################

################################################################################
# Compile and link options
################################################################################
#if(MSVC)
# target_compile_options(${PROJECT_NAME} PRIVATE
# $<$<CONFIG:Debug>:
# /showIncludes;
# ${DEFAULT_CXX_DEBUG_RUNTIME_LIBRARY}
# >
# $<$<CONFIG:Release>:
# ${DEFAULT_CXX_RUNTIME_LIBRARY}
# >
# ${DEFAULT_CXX_DEBUG_INFORMATION_FORMAT};
# ${DEFAULT_CXX_EXCEPTION_HANDLING}
# )
#endif()

################################################################################
# Dependencies
################################################################################
#target_link_directories(${PROJECT_NAME} PUBLIC
# "${CMAKE_CURRENT_SOURCE_DIR}/./azureiot/lib"
#)

56 changes: 56 additions & 0 deletions MT3620_Grove_Shield_Library/CMakeSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"environments": [
{
"environment": "AzureSphere",
"AzureSphereTargetApiSet": "3"
}
],
"configurations": [
{
"name": "ARM-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [
"AzureSphere"
],
"buildRoot": "${projectDir}\\out\\${name}-${env.AzureSphereTargetApiSet}",
"installRoot": "${projectDir}\\install\\${name}-${env.AzureSphereTargetApiSet}",
"cmakeCommandArgs": "--no-warn-unused-cli",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"variables": [
{
"name": "CMAKE_TOOLCHAIN_FILE",
"value": "${env.AzureSphereDefaultSDKDir}CMakeFiles\\AzureSphereToolchain.cmake"
},
{
"name": "AZURE_SPHERE_TARGET_API_SET",
"value": "${env.AzureSphereTargetApiSet}"
}
]
},
{
"name": "ARM-Release",
"generator": "Ninja",
"configurationType": "Release",
"inheritEnvironments": [
"AzureSphere"
],
"buildRoot": "${projectDir}\\out\\${name}-${env.AzureSphereTargetApiSet}",
"installRoot": "${projectDir}\\install\\${name}-${env.AzureSphereTargetApiSet}",
"cmakeCommandArgs": "--no-warn-unused-cli",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"variables": [
{
"name": "CMAKE_TOOLCHAIN_FILE",
"value": "${env.AzureSphereDefaultSDKDir}CMakeFiles\\AzureSphereToolchain.cmake"
},
{
"name": "AZURE_SPHERE_TARGET_API_SET",
"value": "${env.AzureSphereTargetApiSet}"
}
]
}
]
}
97 changes: 0 additions & 97 deletions MT3620_Grove_Shield_Library/MT3620_Grove_Shield_Library.vcxproj

This file was deleted.

Loading

0 comments on commit 50869fc

Please sign in to comment.