-
Notifications
You must be signed in to change notification settings - Fork 14
/
sphere_a7_launch_cl.sh
57 lines (45 loc) · 2.04 KB
/
sphere_a7_launch_cl.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/sh
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
# *****************************************************************************
# -- File: sphere_a7_launch_cl.sh
#
# -- Description:
# This script runs some azure sphere commands to launch a SEAL-Embedded
# application in debug mode on an azure sphere and follows the instructions
# listed under 'Run the Sample' and 'Debug the Sample' at the following URL:
#
# https://docs.microsoft.com/en-us/azure-sphere/install/qs-blink-application
#
# This script is meant to be run in conjuction with gdb_launch_a7.sh (from
# another terminal) and targets the a7 core.
#
# Note that the component ID for the SEAL Embedded image package can be found
# in app_manifest.json or via the following command:
#
# azsphere image-package show --image-package SEAL_EMBEDDED.imagepackage
#
# -- Instructions:
# Nagivate to the folder where SEAL_EMBEDDED.imagepackage is created and run
# this script.
# *****************************************************************************
# -- Application component ID, found in app_manifest.json
comp_id=5a4b43d1-a3b0-4f9f-a9c9-30a4cc52a2f2
AZSPHERE_SDK_PATH="/opt/azurespheresdk"
IMAGE_DIR_PATH="./build"
SCRIPT_DIR_PATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
cp $SCRIPT_DIR_PATH/app_manifest_sphere_a7.txt app_manifest.json
# -- Make sure we are connected
$AZSPHERE_SDK_PATH/DeviceConnection/azsphere_connect.sh
# -- Uncomment this to delete any applications that were previously loaded
# on the device first
azsphere device sideload delete
# -- If the application is already running, stop it first
azsphere device app stop --component-id $comp_id
# -- Load the applicaiton onto the device
azsphere device sideload deploy --image-package $IMAGE_DIR_PATH/SEAL_EMBEDDED.imagepackage
# -- Start running the application in debug mode
azsphere device app start --debug-mode --component-id $comp_id
#azsphere device app start --component-id $comp_id
# -- Connect to the output port
telnet 192.168.35.2 2342