Skip to content

Commit dc585fc

Browse files
author
Pegah Nikbakht Bideh
committed
Add all files
0 parents  commit dc585fc

File tree

1,292 files changed

+146461
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,292 files changed

+146461
-0
lines changed

Diff for: CMakeLists.txt

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# The following lines of boilerplate have to be in your project's CMakeLists
2+
# in this exact order for cmake to work correctly
3+
cmake_minimum_required(VERSION 3.5)
4+
5+
# (Not part of the boilerplate)
6+
# This example uses an extra component for common functions such as Wi-Fi and Ethernet connection.
7+
set(EXTRA_COMPONENT_DIRS $ENV{IDF_PATH}/examples/common_components/protocol_examples_common)
8+
9+
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
10+
project(native_ota)

Diff for: Makefile

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#
2+
# This is a project Makefile. It is assumed the directory this Makefile resides in is a
3+
# project subdirectory.
4+
#
5+
6+
PROJECT_NAME := native_ota
7+
8+
EXTRA_COMPONENT_DIRS = $(IDF_PATH)/examples/common_components/protocol_examples_common
9+
10+
include $(IDF_PATH)/make/project.mk
11+

Diff for: README.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Native OTA example
2+
3+
This example is based on `app_update` component's APIs.
4+
5+
## Configuration
6+
7+
Refer the README.md in the parent directory for the setup details.

Diff for: example_test.py

+379
Large diffs are not rendered by default.

Diff for: main/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Embed the server root certificate into the final binary
2+
idf_build_get_property(project_dir PROJECT_DIR)
3+
idf_component_register(SRCS "native_ota_example.c"
4+
INCLUDE_DIRS "."
5+
EMBED_TXTFILES ${project_dir}/server_certs/ca_cert.pem)

Diff for: main/Kconfig.projbuild

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
menu "Example Configuration"
2+
3+
config EXAMPLE_FIRMWARE_UPG_URL
4+
string "Firmware Upgrade URL"
5+
default "https://192.168.2.106:8070/hello-world.bin"
6+
help
7+
URL of server which hosts the firmware image.
8+
9+
config EXAMPLE_FIRMWARE_UPGRADE_URL_FROM_STDIN
10+
bool
11+
default y if EXAMPLE_FIRMWARE_UPG_URL = "FROM_STDIN"
12+
13+
config EXAMPLE_SKIP_COMMON_NAME_CHECK
14+
bool "Skip server certificate CN fieldcheck"
15+
default n
16+
help
17+
This allows you to skip the validation of OTA server certificate CN field.
18+
19+
config EXAMPLE_SKIP_VERSION_CHECK
20+
bool "Skip firmware version check"
21+
default n
22+
help
23+
This allows you to skip the firmware version check.
24+
25+
config EXAMPLE_GPIO_DIAGNOSTIC
26+
int "Number of the GPIO input for diagnostic"
27+
range 0 39
28+
default 4
29+
help
30+
Used to demonstrate how a rollback works.
31+
The selected GPIO will be configured as an input with internal pull-up enabled.
32+
To trigger a rollback, this GPIO must be pulled low while the message
33+
`Diagnostics (5 sec)...` which will be on first boot.
34+
If GPIO is not pulled low then the operable of the app will be confirmed.
35+
36+
config EXAMPLE_OTA_RECV_TIMEOUT
37+
int "OTA Receive Timeout"
38+
default 5000
39+
help
40+
Maximum time for reception
41+
42+
endmenu

0 commit comments

Comments
 (0)