This commit is contained in:
Vendored
+11
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"idf.customExtraVars": {
|
||||
"OPENOCD_SCRIPTS": "/home/ismail/.espressif/tools/openocd-esp32/v0.12.0-esp32-20240318/openocd-esp32/share/openocd/scripts",
|
||||
"ESP_ROM_ELF_DIR": "/home/ismail/.espressif/tools/esp-rom-elfs/20240305/",
|
||||
"IDF_TARGET": "esp32c3"
|
||||
},
|
||||
"idf.openOcdConfigs": [
|
||||
"board/esp32c3-builtin.cfg"
|
||||
],
|
||||
"idf.flashType": "UART"
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
# The following lines of boilerplate have to be in your project's CMakeLists
|
||||
# in this exact order for cmake to work correctly
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
|
||||
if(DEFINED ENV{RMAKER_PATH})
|
||||
set(RMAKER_PATH $ENV{RMAKER_PATH})
|
||||
else()
|
||||
set(RMAKER_PATH ${CMAKE_CURRENT_LIST_DIR}/../..)
|
||||
endif(DEFINED ENV{RMAKER_PATH})
|
||||
|
||||
# Add RainMaker components and other common application components
|
||||
set(EXTRA_COMPONENT_DIRS ${RMAKER_PATH}/examples/common)
|
||||
|
||||
set(PROJECT_VER "1.0")
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(gpio)
|
||||
@@ -0,0 +1,12 @@
|
||||
#
|
||||
# This is a project Makefile. It is assumed the directory this Makefile resides in is a
|
||||
# project subdirectory.
|
||||
#
|
||||
|
||||
PROJECT_NAME := gpio
|
||||
PROJECT_VER := 1.0
|
||||
|
||||
# Add RainMaker components and other common application components
|
||||
EXTRA_COMPONENT_DIRS += $(PROJECT_PATH)/../../components $(PROJECT_PATH)/../common
|
||||
|
||||
include $(IDF_PATH)/make/project.mk
|
||||
@@ -0,0 +1,18 @@
|
||||
# GPIO Example
|
||||
|
||||
## Build and Flash firmware
|
||||
|
||||
Follow the ESP RainMaker Documentation [Get Started](https://rainmaker.espressif.com/docs/get-started.html) section to build and flash this firmware. Just note the path of this example.
|
||||
|
||||
## What to expect in this example?
|
||||
|
||||
- This example just provides 3 boolean parameters, linked to 3 GPIOS.
|
||||
- Toggling the buttons on the phone app should toggle the GPIOs on your board (and the LEDs, if any, connected to the GPIOs), and also print messages like these on the ESP32-S2 monitor:
|
||||
|
||||
```
|
||||
I (16073) app_main: Received value = true for GPIO-Device - Red
|
||||
```
|
||||
|
||||
### Reset to Factory
|
||||
|
||||
Press and hold the BOOT button for more than 3 seconds to reset the board to factory defaults. You will have to provision the board again to use it.
|
||||
@@ -0,0 +1,2 @@
|
||||
idf_component_register(SRCS ./app_driver.c ./app_main.c
|
||||
INCLUDE_DIRS ".")
|
||||
@@ -0,0 +1,29 @@
|
||||
menu "Example Configuration"
|
||||
|
||||
config EXAMPLE_BOARD_BUTTON_GPIO
|
||||
int "Boot Button GPIO"
|
||||
default 9 if IDF_TARGET_ESP32C3 || IDF_TARGET_ESP32C6 || IDF_TARGET_ESP32C2 || IDF_TARGET_ESP32H2
|
||||
default 0
|
||||
help
|
||||
GPIO number on which the "Boot" button is connected. This is generally used
|
||||
by the application for custom operations like toggling states, resetting to defaults, etc.
|
||||
|
||||
config EXAMPLE_OUTPUT_GPIO_RED
|
||||
int "Red GPIO"
|
||||
default 2
|
||||
help
|
||||
Control digital RGB LEDs. Need to connect this GPIO to the red pin of the LED.
|
||||
|
||||
config EXAMPLE_OUTPUT_GPIO_GREEN
|
||||
int "Green GPIO"
|
||||
default 4
|
||||
help
|
||||
Control digital RGB LEDs. Need to connect this GPIO to the green pin of the LED.
|
||||
|
||||
config EXAMPLE_OUTPUT_GPIO_BLUE
|
||||
int "Blue GPIO"
|
||||
default 5
|
||||
help
|
||||
Control digital RGB LEDs. Need to connect this GPIO to the blue pin of the LED.
|
||||
|
||||
endmenu
|
||||
@@ -0,0 +1,61 @@
|
||||
/* Simple GPIO Demo
|
||||
|
||||
This example code is in the Public Domain (or CC0 licensed, at your option.)
|
||||
|
||||
Unless required by applicable law or agreed to in writing, this
|
||||
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
CONDITIONS OF ANY KIND, either express or implied.
|
||||
*/
|
||||
|
||||
#include <sdkconfig.h>
|
||||
#include <string.h>
|
||||
#include <esp_log.h>
|
||||
|
||||
#include <app_reset.h>
|
||||
#include "app_priv.h"
|
||||
|
||||
#define RMT_TX_CHANNEL RMT_CHANNEL_0
|
||||
/* This is the button that is used for toggling the power */
|
||||
#define BUTTON_GPIO CONFIG_EXAMPLE_BOARD_BUTTON_GPIO
|
||||
#define BUTTON_ACTIVE_LEVEL 0
|
||||
/* This is the GPIO on which the power will be set */
|
||||
|
||||
#define OUTPUT_GPIO_RED CONFIG_EXAMPLE_OUTPUT_GPIO_RED
|
||||
#define OUTPUT_GPIO_GREEN CONFIG_EXAMPLE_OUTPUT_GPIO_GREEN
|
||||
#define OUTPUT_GPIO_BLUE CONFIG_EXAMPLE_OUTPUT_GPIO_BLUE
|
||||
|
||||
#define WIFI_RESET_BUTTON_TIMEOUT 3
|
||||
#define FACTORY_RESET_BUTTON_TIMEOUT 10
|
||||
|
||||
esp_err_t app_driver_set_gpio(const char *name, bool state)
|
||||
{
|
||||
if (strcmp(name, "Red") == 0) {
|
||||
gpio_set_level(OUTPUT_GPIO_RED, state);
|
||||
} else if (strcmp(name, "Green") == 0) {
|
||||
gpio_set_level(OUTPUT_GPIO_GREEN, state);
|
||||
} else if (strcmp(name, "Blue") == 0) {
|
||||
gpio_set_level(OUTPUT_GPIO_BLUE, state);
|
||||
} else {
|
||||
return ESP_FAIL;
|
||||
}
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
void app_driver_init()
|
||||
{
|
||||
app_reset_button_register(app_reset_button_create(BUTTON_GPIO, BUTTON_ACTIVE_LEVEL),
|
||||
WIFI_RESET_BUTTON_TIMEOUT, FACTORY_RESET_BUTTON_TIMEOUT);
|
||||
|
||||
/* Configure power */
|
||||
gpio_config_t io_conf = {
|
||||
.mode = GPIO_MODE_OUTPUT,
|
||||
.pull_up_en = 1,
|
||||
};
|
||||
uint64_t pin_mask = (((uint64_t)1 << OUTPUT_GPIO_RED ) | ((uint64_t)1 << OUTPUT_GPIO_GREEN ) | ((uint64_t)1 << OUTPUT_GPIO_BLUE ));
|
||||
io_conf.pin_bit_mask = pin_mask;
|
||||
/* Configure the GPIO */
|
||||
gpio_config(&io_conf);
|
||||
gpio_set_level(OUTPUT_GPIO_RED, false);
|
||||
gpio_set_level(OUTPUT_GPIO_GREEN, false);
|
||||
gpio_set_level(OUTPUT_GPIO_BLUE, false);
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
/* GPIO Example
|
||||
|
||||
This example code is in the Public Domain (or CC0 licensed, at your option.)
|
||||
|
||||
Unless required by applicable law or agreed to in writing, this
|
||||
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
CONDITIONS OF ANY KIND, either express or implied.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include <freertos/FreeRTOS.h>
|
||||
#include <freertos/task.h>
|
||||
#include <esp_log.h>
|
||||
#include <nvs_flash.h>
|
||||
|
||||
#include <esp_rmaker_core.h>
|
||||
#include <esp_rmaker_standard_types.h>
|
||||
|
||||
#include <app_network.h>
|
||||
#include <app_insights.h>
|
||||
|
||||
#include "app_priv.h"
|
||||
|
||||
static const char *TAG = "app_main";
|
||||
|
||||
/* Callback to handle commands received from the RainMaker cloud */
|
||||
static esp_err_t write_cb(const esp_rmaker_device_t *device, const esp_rmaker_param_t *param,
|
||||
const esp_rmaker_param_val_t val, void *priv_data, esp_rmaker_write_ctx_t *ctx)
|
||||
{
|
||||
if (ctx) {
|
||||
ESP_LOGI(TAG, "Received write request via : %s", esp_rmaker_device_cb_src_to_str(ctx->src));
|
||||
}
|
||||
if (app_driver_set_gpio(esp_rmaker_param_get_name(param), val.val.b) == ESP_OK) {
|
||||
esp_rmaker_param_update(param, val);
|
||||
}
|
||||
return ESP_OK;
|
||||
}
|
||||
|
||||
void app_main()
|
||||
{
|
||||
/* Initialize Application specific hardware drivers and
|
||||
* set initial state.
|
||||
*/
|
||||
app_driver_init();
|
||||
|
||||
/* Initialize NVS. */
|
||||
esp_err_t err = nvs_flash_init();
|
||||
if (err == ESP_ERR_NVS_NO_FREE_PAGES || err == ESP_ERR_NVS_NEW_VERSION_FOUND) {
|
||||
ESP_ERROR_CHECK(nvs_flash_erase());
|
||||
err = nvs_flash_init();
|
||||
}
|
||||
ESP_ERROR_CHECK( err );
|
||||
|
||||
/* Initialize Wi-Fi. Note that, this should be called before esp_rmaker_node_init()
|
||||
*/
|
||||
app_network_init();
|
||||
|
||||
/* Initialize the ESP RainMaker Agent.
|
||||
* Note that this should be called after app_network_init() but before app_network_start()
|
||||
* */
|
||||
esp_rmaker_config_t rainmaker_cfg = {
|
||||
.enable_time_sync = false,
|
||||
};
|
||||
esp_rmaker_node_t *node = esp_rmaker_node_init(&rainmaker_cfg, "ESP RainMaker Device", "GPIO-Device");
|
||||
if (!node) {
|
||||
ESP_LOGE(TAG, "Could not initialise node. Aborting!!!");
|
||||
vTaskDelay(5000/portTICK_PERIOD_MS);
|
||||
abort();
|
||||
}
|
||||
|
||||
/* Create a device and add the relevant parameters to it */
|
||||
esp_rmaker_device_t *gpio_device = esp_rmaker_device_create("GPIO-Device", NULL, NULL);
|
||||
esp_rmaker_device_add_cb(gpio_device, write_cb, NULL);
|
||||
|
||||
esp_rmaker_param_t *red_param = esp_rmaker_param_create("Red", NULL, esp_rmaker_bool(false), PROP_FLAG_READ | PROP_FLAG_WRITE);
|
||||
esp_rmaker_param_add_ui_type(red_param, ESP_RMAKER_UI_TOGGLE);
|
||||
esp_rmaker_device_add_param(gpio_device, red_param);
|
||||
|
||||
esp_rmaker_param_t *green_param = esp_rmaker_param_create("Green", NULL, esp_rmaker_bool(false), PROP_FLAG_READ | PROP_FLAG_WRITE);
|
||||
esp_rmaker_param_add_ui_type(green_param, ESP_RMAKER_UI_TOGGLE);
|
||||
esp_rmaker_device_add_param(gpio_device, green_param);
|
||||
|
||||
esp_rmaker_param_t *blue_param = esp_rmaker_param_create("Blue", NULL, esp_rmaker_bool(false), PROP_FLAG_READ | PROP_FLAG_WRITE);
|
||||
esp_rmaker_param_add_ui_type(blue_param, ESP_RMAKER_UI_TOGGLE);
|
||||
esp_rmaker_device_add_param(gpio_device, blue_param);
|
||||
|
||||
esp_rmaker_node_add_device(node, gpio_device);
|
||||
|
||||
/* Enable OTA */
|
||||
esp_rmaker_ota_enable_default();
|
||||
|
||||
/* Enable Insights. Requires CONFIG_ESP_INSIGHTS_ENABLED=y */
|
||||
app_insights_enable();
|
||||
|
||||
/* Start the ESP RainMaker Agent */
|
||||
esp_rmaker_start();
|
||||
|
||||
/* Start the Wi-Fi.
|
||||
* If the node is provisioned, it will start connection attempts,
|
||||
* else, it will start Wi-Fi provisioning. The function will return
|
||||
* after a connection has been successfully established
|
||||
*/
|
||||
err = app_network_start(POP_TYPE_RANDOM);
|
||||
if (err != ESP_OK) {
|
||||
ESP_LOGE(TAG, "Could not start Wifi. Aborting!!!");
|
||||
vTaskDelay(5000/portTICK_PERIOD_MS);
|
||||
abort();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
/*
|
||||
This example code is in the Public Domain (or CC0 licensed, at your option.)
|
||||
|
||||
Unless required by applicable law or agreed to in writing, this
|
||||
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||||
CONDITIONS OF ANY KIND, either express or implied.
|
||||
*/
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <esp_err.h>
|
||||
|
||||
void app_driver_init(void);
|
||||
esp_err_t app_driver_set_gpio(const char *name, bool state);
|
||||
@@ -0,0 +1,4 @@
|
||||
#
|
||||
# "main" pseudo-component makefile.
|
||||
#
|
||||
# (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.)
|
||||
@@ -0,0 +1,8 @@
|
||||
## IDF Component Manager Manifest File
|
||||
dependencies:
|
||||
## Required IDF version
|
||||
idf:
|
||||
version: ">=5.0.0"
|
||||
espressif/esp_rainmaker:
|
||||
version: ">=1.0"
|
||||
override_path: '../../../components/esp_rainmaker/'
|
||||
@@ -0,0 +1,10 @@
|
||||
# Name, Type, SubType, Offset, Size, Flags
|
||||
# Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table
|
||||
esp_secure_cert, 0x3F, , 0xD000, 0x2000, encrypted
|
||||
nvs_key, data, nvs_keys, 0xF000, 0x1000, encrypted
|
||||
nvs, data, nvs, 0x10000, 0x6000,
|
||||
otadata, data, ota, , 0x2000
|
||||
phy_init, data, phy, , 0x1000,
|
||||
ota_0, app, ota_0, 0x20000, 1600K,
|
||||
ota_1, app, ota_1, , 1600K,
|
||||
fctry, data, nvs, 0x340000, 0x6000
|
||||
|
@@ -0,0 +1,11 @@
|
||||
# Name, Type, SubType, Offset, Size, Flags
|
||||
# Note: Firmware partition offset needs to be 64K aligned, initial 36K (9 sectors) are reserved for bootloader and partition table
|
||||
esp_secure_cert, 0x3F, , 0xD000, 0x2000, encrypted
|
||||
nvs_key, data, nvs_keys, 0xF000, 0x1000, encrypted
|
||||
nvs, data, nvs, 0x10000, 0x6000,
|
||||
otadata, data, ota, , 0x2000
|
||||
phy_init, data, phy, , 0x1000,
|
||||
ota_0, app, ota_0, 0x20000, 0x1E0000,
|
||||
ota_1, app, ota_1, 0x200000, 0x1E0000,
|
||||
reserved, 0x06, , 0x3E0000, 0x1A000,
|
||||
fctry, data, nvs, 0x3FA000, 0x6000
|
||||
|
@@ -0,0 +1,41 @@
|
||||
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||
|
||||
#
|
||||
# Use partition table which makes use of flash to the fullest
|
||||
# Can be used for other platforms as well. But please keep in mind that fctry partition address is
|
||||
# different than default, and the new address needs to be specified to `rainmaker.py claim`
|
||||
#
|
||||
CONFIG_PARTITION_TABLE_CUSTOM=y
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_4mb_optimised.csv"
|
||||
|
||||
# To accomodate security features
|
||||
CONFIG_PARTITION_TABLE_OFFSET=0xc000
|
||||
|
||||
# mbedtls
|
||||
CONFIG_MBEDTLS_DYNAMIC_BUFFER=y
|
||||
CONFIG_MBEDTLS_DYNAMIC_FREE_PEER_CERT=y
|
||||
CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA=y
|
||||
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN=y
|
||||
|
||||
# For BLE Provisioning using NimBLE stack (Not applicable for ESP32-S2)
|
||||
CONFIG_BT_ENABLED=y
|
||||
CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y
|
||||
CONFIG_BT_NIMBLE_ENABLED=y
|
||||
|
||||
# Temporary Fix for Timer Overflows
|
||||
CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=3120
|
||||
|
||||
# For additional security on reset to factory
|
||||
CONFIG_ESP_RMAKER_USER_ID_CHECK=y
|
||||
|
||||
# Secure Local Control
|
||||
CONFIG_ESP_RMAKER_LOCAL_CTRL_AUTO_ENABLE=y
|
||||
#CONFIG_ESP_RMAKER_LOCAL_CTRL_ENABLE is deprecated but will continue to work
|
||||
CONFIG_ESP_RMAKER_LOCAL_CTRL_SECURITY_1=y
|
||||
|
||||
# Application Rollback
|
||||
CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE=y
|
||||
|
||||
# If ESP-Insights is enabled, we need MQTT transport selected
|
||||
# Takes out manual efforts to enable this option
|
||||
CONFIG_ESP_INSIGHTS_TRANSPORT_MQTT=y
|
||||
@@ -0,0 +1 @@
|
||||
CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y
|
||||
@@ -0,0 +1,121 @@
|
||||
# Bluetooth
|
||||
CONFIG_BT_ENABLED=y
|
||||
CONFIG_BT_RELEASE_IRAM=y
|
||||
CONFIG_BT_NIMBLE_ENABLED=y
|
||||
|
||||
## NimBLE Options
|
||||
CONFIG_BT_NIMBLE_MAX_CONNECTIONS=1
|
||||
CONFIG_BT_NIMBLE_MAX_BONDS=2
|
||||
CONFIG_BT_NIMBLE_MAX_CCCDS=2
|
||||
CONFIG_BT_NIMBLE_HOST_TASK_STACK_SIZE=3072
|
||||
CONFIG_BT_NIMBLE_ROLE_CENTRAL=n
|
||||
CONFIG_BT_NIMBLE_ROLE_OBSERVER=n
|
||||
CONFIG_BT_NIMBLE_MSYS_1_BLOCK_COUNT=10
|
||||
CONFIG_BT_NIMBLE_MSYS_1_BLOCK_SIZE=100
|
||||
CONFIG_BT_NIMBLE_MSYS_2_BLOCK_COUNT=4
|
||||
CONFIG_BT_NIMBLE_ACL_BUF_COUNT=5
|
||||
CONFIG_BT_NIMBLE_HCI_EVT_HI_BUF_COUNT=5
|
||||
CONFIG_BT_NIMBLE_HCI_EVT_LO_BUF_COUNT=3
|
||||
CONFIG_BT_NIMBLE_GATT_MAX_PROCS=1
|
||||
CONFIG_BT_NIMBLE_ENABLE_CONN_REATTEMPT=n
|
||||
CONFIG_BT_NIMBLE_50_FEATURE_SUPPORT=n
|
||||
CONFIG_BT_NIMBLE_WHITELIST_SIZE=1
|
||||
## Controller Options
|
||||
CONFIG_BT_LE_CONTROLLER_TASK_STACK_SIZE=3072
|
||||
CONFIG_BT_LE_LL_RESOLV_LIST_SIZE=1
|
||||
CONFIG_BT_LE_LL_DUP_SCAN_LIST_COUNT=1
|
||||
|
||||
# SPI Configuration
|
||||
CONFIG_SPI_MASTER_ISR_IN_IRAM=n
|
||||
CONFIG_SPI_SLAVE_ISR_IN_IRAM=n
|
||||
|
||||
# Ethernet
|
||||
CONFIG_ETH_USE_SPI_ETHERNET=n
|
||||
|
||||
# Event Loop Library
|
||||
CONFIG_ESP_EVENT_POST_FROM_ISR=n
|
||||
|
||||
# Chip revision
|
||||
CONFIG_ESP32C2_REV2_DEVELOPMENT=y
|
||||
|
||||
# ESP Ringbuf
|
||||
CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH=y
|
||||
CONFIG_RINGBUF_PLACE_ISR_FUNCTIONS_INTO_FLASH=y
|
||||
|
||||
# ESP System Settings
|
||||
CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=16
|
||||
CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2048
|
||||
CONFIG_ESP_MAIN_TASK_STACK_SIZE=3072
|
||||
|
||||
# Bypass a bug. Use 26M XTAL Freq
|
||||
CONFIG_XTAL_FREQ_26=y
|
||||
|
||||
## Memory protection
|
||||
CONFIG_ESP_SYSTEM_PMP_IDRAM_SPLIT=n
|
||||
|
||||
# High resolution timer (esp_timer)
|
||||
CONFIG_ESP_TIMER_TASK_STACK_SIZE=2048
|
||||
|
||||
# Wi-Fi
|
||||
CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE=n
|
||||
CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=3
|
||||
CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=6
|
||||
CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=6
|
||||
CONFIG_ESP32_WIFI_IRAM_OPT=n
|
||||
CONFIG_ESP32_WIFI_RX_IRAM_OPT=n
|
||||
CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=n
|
||||
CONFIG_ESP32_WIFI_ENABLE_WPA3_OWE_STA=n
|
||||
CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE=n
|
||||
|
||||
# FreeRTOS
|
||||
## Kernel
|
||||
CONFIG_FREERTOS_HZ=1000
|
||||
CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y
|
||||
## Port
|
||||
CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=n
|
||||
CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y
|
||||
CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH=y
|
||||
|
||||
# Hardware Abstraction Layer (HAL) and Low Level (LL)
|
||||
CONFIG_HAL_ASSERTION_DISABLE=y
|
||||
|
||||
# LWIP
|
||||
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=16
|
||||
CONFIG_LWIP_DHCPS=n
|
||||
CONFIG_LWIP_IPV6_AUTOCONFIG=y
|
||||
CONFIG_LWIP_MAX_ACTIVE_TCP=5
|
||||
CONFIG_LWIP_MAX_LISTENING_TCP=5
|
||||
CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=n
|
||||
CONFIG_LWIP_TCP_SYNMAXRTX=12
|
||||
CONFIG_LWIP_TCP_MSL=40000
|
||||
CONFIG_LWIP_TCP_FIN_WAIT_TIMEOUT=16000
|
||||
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=4096
|
||||
CONFIG_LWIP_TCP_WND_DEFAULT=2440
|
||||
CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS=y
|
||||
CONFIG_LWIP_TCP_RTO_TIME=1500
|
||||
CONFIG_LWIP_MAX_UDP_PCBS=8
|
||||
CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=2560
|
||||
CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT=y
|
||||
CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT=y
|
||||
|
||||
# mbedTLS
|
||||
CONFIG_MBEDTLS_DYNAMIC_BUFFER=y
|
||||
CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA=y
|
||||
CONFIG_MBEDTLS_DYNAMIC_FREE_CA_CERT=y
|
||||
CONFIG_MBEDTLS_SSL_KEEP_PEER_CERTIFICATE=n
|
||||
CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN=y
|
||||
|
||||
# SPI Flash driver
|
||||
CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=n
|
||||
CONFIG_SPI_FLASH_ROM_IMPL=y
|
||||
|
||||
# Websocket
|
||||
CONFIG_WS_TRANSPORT=n
|
||||
|
||||
# Virtual file system
|
||||
CONFIG_VFS_SUPPORT_DIR=n
|
||||
CONFIG_VFS_SUPPORT_SELECT=n
|
||||
CONFIG_VFS_SUPPORT_TERMIOS=n
|
||||
|
||||
# Wear Levelling
|
||||
CONFIG_WL_SECTOR_SIZE_512=y
|
||||
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# Use partition table which makes use of flash to the fullest
|
||||
# Can be used for other platforms as well. But please keep in mind that fctry partition address is
|
||||
# different than default, and the new address needs to be specified to `rainmaker.py claim`
|
||||
#
|
||||
CONFIG_PARTITION_TABLE_CUSTOM=y
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_4mb_optimised.csv"
|
||||
|
||||
# To accomodate security features
|
||||
CONFIG_PARTITION_TABLE_OFFSET=0xc000
|
||||
@@ -0,0 +1,14 @@
|
||||
# Enable OpenThread
|
||||
CONFIG_OPENTHREAD_ENABLED=y
|
||||
CONFIG_OPENTHREAD_CLI=n
|
||||
|
||||
# Enable DNS64 client and Network connection resolve hook
|
||||
CONFIG_OPENTHREAD_DNS64_CLIENT=y
|
||||
CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_DEFAULT=y
|
||||
|
||||
# Increase network provisioning scan entries
|
||||
CONFIG_NETWORK_PROV_SCAN_MAX_ENTRIES=64
|
||||
|
||||
# Use 4MB optimised partition
|
||||
CONFIG_PARTITION_TABLE_CUSTOM=y
|
||||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_4mb_optimised.csv"
|
||||
@@ -0,0 +1,4 @@
|
||||
#
|
||||
# Bluetooth
|
||||
#
|
||||
CONFIG_BT_ENABLED=n
|
||||
Reference in New Issue
Block a user