Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for latest SDK API Set #2

Open
wants to merge 35 commits into
base: AssignmentSolutions
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
ece30cb
Convert project to CMAKE build process
bawilless Dec 23, 2019
ca359b1
Remove extra gpio item from the list.
bawilless Dec 24, 2019
0cde4a8
Port direct method implementation from E14 code base.
bawilless Jan 12, 2020
34df195
Merge branch 'master' of https://github.com/Avnet/AzureSphereHacksterTTC
bawilless Jan 13, 2020
d0242f9
Tweek the LSM6DSO calibration settings.
bawilless Feb 10, 2020
eada2c1
Port Advanced application features into main code base. Add #defines…
bawilless Feb 12, 2020
2e92cb7
Corrections for cloud based build configurations.
bawilless Feb 12, 2020
8db7b74
Port advanced applicatoin into main branch. Intercore comms and OLED…
bawilless Feb 12, 2020
55e7f12
Correct calibration logic and comment
bawilless Feb 12, 2020
bbb9d89
Update for 20.01 release
bawilless Feb 25, 2020
b60d216
Update the project to use the new beta API
bawilless Mar 31, 2020
85778b7
Fix error where we don't correctly match the telemetry variables with…
bawilless Apr 14, 2020
5831392
Cleanup file
bawilless Apr 14, 2020
30c6e5a
Changes to support building with Visual Studio Code.
bawilless Apr 24, 2020
b10560e
Minor clean up
bawilless Apr 24, 2020
7a609f5
Updated ignore file
bawilless Apr 24, 2020
44d2047
Merge in changes
bawilless Apr 24, 2020
757b9c9
CMake changes to support latest 20.04 SDK release.
bawilless May 12, 2020
a1a81d3
Changes to support the 20.04 SDK CMake changes.
bawilless May 12, 2020
8d5bdf8
Changed system call deprecated by the 20.04 SDK release.
bawilless May 12, 2020
864eada
Changes to support building with VS Code. Tested with the InterCore …
bawilless Jun 8, 2020
0d28209
Correcting CMake generation errors
bawilless Jun 8, 2020
defb382
Update build files for 20.07 SDK
bawilless Jul 30, 2020
05feca4
Clean up make files for new 20.07 SDK.
bawilless Jul 31, 2020
5c3c8b1
Changes to support Visual Studio Code development environment
Oct 29, 2020
878fc00
Update both projects to target "latest-lts"
bwilless Oct 29, 2020
fce8cc4
Add files to support the new Starter Kit Rev2 Hardware.
bawilless Nov 6, 2020
e94e46d
Update for new 20.10 SDK
bawilless Nov 10, 2020
067ca09
Update showIoTCentralConfig tools from AzureIoT Example
bawilless Nov 11, 2020
2246aaa
Merge branch 'master' of https://github.com/Avnet/AzureSphereHacksterTTC
bawilless Nov 11, 2020
4f1932a
Remove the IOT_CENTRAL_APPLICATION #define and all specific code rela…
bawilless Nov 11, 2020
667203f
Clean up compile warnings
bawilless Dec 4, 2020
ef8fa5d
Update API set for VS Code builds
bawilless Dec 9, 2020
8ab8959
Add the ShowIoTCentralConfig utility
bawilless Dec 9, 2020
a2fde1d
Update for latest SDK API Set
bawilless Feb 8, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
*.dylib

# Executables
*.exe
*.out
*.app
*.i*86
Expand All @@ -54,3 +53,11 @@ dkms.conf
/AvnetStarterKitReferenceDesign/bin/ARM/Debug
/AvnetStarterKitReferenceDesign/obj/ARM/Debug
/AvnetStarterKitReferenceDesign/.vs/ConnectedServices.json
/AvnetStarterKitReferenceDesign/.vs
/AvnetStarterKitReferenceDesign/out/ARM-Debug-3
/AvnetStarterKitReferenceDesign/out/ARM-Release-3
/AvnetStarterKitReferenceDesign/out/ARM-Debug-3+Beta1909
/AvnetStarterKitReferenceDesign/out/ARM-Debug-3Beta1909
/InterCoreCommsMT3620_BMetal/.vs
/AvnetStarterKitReferenceDesign/out
/AvnetStarterKitReferenceDesign/app_manifest - Copy.json
25 changes: 0 additions & 25 deletions AvnetStarterKitReferenceDesign.sln

This file was deleted.

29 changes: 29 additions & 0 deletions AvnetStarterKitReferenceDesign/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{

// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch for Azure Sphere High-Level Applications (gdb)",
"type": "azurespheredbg",
"request": "launch",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": true,
"targetCore": "HLCore",
"partnerComponents": [ "005180bc-402f-4cb3-a662-72937dbcde47" ],
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
]
}
12 changes: 12 additions & 0 deletions AvnetStarterKitReferenceDesign/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"cmake.generator": "Ninja",
"cmake.buildDirectory": "${workspaceRoot}/out/${buildType}-${command:azuresphere.AzureSphereTargetApiSet}",
"cmake.buildToolArgs": [ "-v" ],
"cmake.configureArgs": [ "--no-warn-unused-cli" ],
"cmake.configureSettings": {
"CMAKE_TOOLCHAIN_FILE": "${command:azuresphere.AzureSphereSdkDir}/CMakeFiles/AzureSphereToolchain.cmake",
"AZURE_SPHERE_TARGET_API_SET": "latest-lts"
},
"cmake.configureOnOpen": true,
"C_Cpp.default.configurationProvider": "vector-of-bool.cmake-tools"
}

This file was deleted.

This file was deleted.

This file was deleted.

25 changes: 25 additions & 0 deletions AvnetStarterKitReferenceDesign/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

cmake_minimum_required(VERSION 3.10)

project(AvnetStarterKitReferenceDesign C)

azsphere_configure_tools(TOOLS_REVISION "20.10")
azsphere_configure_api(TARGET_API_SET "8")

set_source_files_properties(lsm6dso_reg.c PROPERTIES COMPILE_FLAGS -Wno-conversion)
set_source_files_properties(lps22hh_reg.c PROPERTIES COMPILE_FLAGS -Wno-conversion)
set_source_files_properties(oled.c PROPERTIES COMPILE_FLAGS -Wno-conversion)
set_source_files_properties(sd1306.c PROPERTIES COMPILE_FLAGS -Wno-conversion)
set_source_files_properties(i2c.c PROPERTIES COMPILE_FLAGS -Wno-conversion)

# Create executable
add_executable(${PROJECT_NAME} main.c epoll_timerfd_utilities.c oled.c parson.c azure_iot_utilities.c device_twin.c i2c.c lps22hh_reg.c lsm6dso_reg.c sd1306.c)
target_link_libraries(${PROJECT_NAME} m azureiot applibs pthread gcc_s c)
target_include_directories(${PROJECT_NAME} PUBLIC ${AZURE_SPHERE_API_SET_DIR}/usr/include/azureiot ${AZURE_SPHERE_API_SET_DIR}/usr/include/azure_prov_client)
target_compile_definitions(${PROJECT_NAME} PUBLIC AZURE_IOT_HUB_CONFIGURED)

azsphere_target_hardware_definition(${PROJECT_NAME} TARGET_DIRECTORY "${projectDir}../Hardware/avnet_mt3620_sk" TARGET_DEFINITION "avnet_mt3620_sk.json")
#azsphere_target_hardware_definition(${PROJECT_NAME} TARGET_DIRECTORY "${projectDir}../Hardware/avnet_mt3620_sk_rev2" TARGET_DEFINITION "avnet_mt3620_sk.json")
azsphere_target_add_image_package(${PROJECT_NAME})
47 changes: 47 additions & 0 deletions AvnetStarterKitReferenceDesign/CMakeSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"environments": [
{
"environment": "AzureSphere"
}
],
"configurations": [
{
"name": "ARM-Debug",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [
"AzureSphere"
],
"buildRoot": "${projectDir}\\out\\${name}",
"installRoot": "${projectDir}\\install\\${name}",
"cmakeToolchain": "${env.AzureSphereDefaultSDKDir}CMakeFiles\\AzureSphereToolchain.cmake",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"variables": [
{
"name": "AZURE_SPHERE_TARGET_API_SET",
"value": "latest-lts"
}
]
},
{
"name": "ARM-Release",
"generator": "Ninja",
"configurationType": "Release",
"inheritEnvironments": [
"AzureSphere"
],
"buildRoot": "${projectDir}\\out\\${name}",
"installRoot": "${projectDir}\\install\\${name}",
"cmakeToolchain": "${env.AzureSphereDefaultSDKDir}CMakeFiles\\AzureSphereToolchain.cmake",
"buildCommandArgs": "-v",
"ctestCommandArgs": "",
"variables": [
{
"name": "AZURE_SPHERE_TARGET_API_SET",
"value": "latest-lts"
}
]
}
]
}
21 changes: 16 additions & 5 deletions AvnetStarterKitReferenceDesign/app_manifest.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
{
"SchemaVersion": 1,
"Name": "AvnetStarterKit-Hackster.io-V1.0",
"Name": "AvnetStarterKit-Hackster.io-V2.0",
"ComponentId": "685f13af-25a5-40b2-8dd8-8cbc253ecbd8",
"EntryPoint": "/bin/app",
"CmdArgs": [ ],
"CmdArgs": [],
"Capabilities": {
"AllowedApplicationConnections": [ "005180bc-402f-4cb3-a662-72937dbcde47" ],
"AllowedConnections": [],
"AllowedTcpServerPorts": [],
"AllowedUdpServerPorts": [],
"Gpio": [ 0, 4, 5, 8, 9, 10, 12, 13, 34 ],
"Gpio": [
"$AVNET_MT3620_SK_GPIO0",
"$AVNET_MT3620_SK_WLAN_STATUS_LED_YELLOW",
"$AVNET_MT3620_SK_USER_LED_RED",
"$AVNET_MT3620_SK_USER_LED_GREEN",
"$AVNET_MT3620_SK_USER_LED_BLUE",
"$AVNET_MT3620_SK_USER_BUTTON_A",
"$AVNET_MT3620_SK_USER_BUTTON_B",
"$AVNET_MT3620_SK_GPIO34"
],
"Uart": [],
"I2cMaster": [ "ISU2" ],
"I2cMaster": [ "$AVNET_MT3620_SK_ISU2_I2C" ],
"SpiMaster": [],
"WifiConfig": true,
"NetworkConfig": false,
"SystemTime": false,
"DeviceAuthentication": "00000000-0000-0000-0000-000000000000"
}
},
"ApplicationType": "Default"
}
4 changes: 4 additions & 0 deletions AvnetStarterKitReferenceDesign/azure_iot_utilities.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ static const char *getReasonString(IOTHUB_CLIENT_CONNECTION_STATUS_REASON reason
case IOTHUB_CLIENT_CONNECTION_OK:
reasonString = "IOTHUB_CLIENT_CONNECTION_OK";
break;
case IOTHUB_CLIENT_CONNECTION_NO_PING_RESPONSE:
reasonString = "IOTHUB_CLIENT_CONNECTION_NO_PING_RESPONSE";
break;

}
return reasonString;
}
Expand Down
Loading