-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
65ac41f
commit 9576bc6
Showing
8 changed files
with
130 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-B build-noota -DSDKCONFIG=build-noota/sdkconfig -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.noota" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-B build-ota -DSDKCONFIG=build-ota/sdkconfig -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.ota" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
# | ||
# Enabled Features | ||
# | ||
## OTA ## | ||
# CONFIG_OTA_ENABLE is not set | ||
# | ||
# Partition Table | ||
# | ||
CONFIG_OPENTHREAD_ENABLED=y | ||
CONFIG_PARTITION_TABLE_CUSTOM=y | ||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions_no_ota.csv" | ||
CONFIG_PARTITION_TABLE_FILENAME="partitions_no_ota.csv" | ||
CONFIG_PARTITION_TABLE_OFFSET=0x8000 | ||
CONFIG_PARTITION_TABLE_MD5=y | ||
# end of Partition Table | ||
|
||
# | ||
# Log Level | ||
# | ||
CONFIG_LOG_DEFAULT_LEVEL_NONE=y | ||
# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set | ||
# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set | ||
# CONFIG_LOG_DEFAULT_LEVEL_INFO is not set | ||
# CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set | ||
# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set | ||
CONFIG_LOG_DEFAULT_LEVEL=0 | ||
CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y | ||
# CONFIG_LOG_MAXIMUM_LEVEL_ERROR is not set | ||
# CONFIG_LOG_MAXIMUM_LEVEL_WARN is not set | ||
# CONFIG_LOG_MAXIMUM_LEVEL_INFO is not set | ||
# CONFIG_LOG_MAXIMUM_LEVEL_DEBUG is not set | ||
# CONFIG_LOG_MAXIMUM_LEVEL_VERBOSE is not set | ||
CONFIG_LOG_MAXIMUM_LEVEL=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
# | ||
# Enabled Features | ||
# | ||
## OTA ## | ||
CONFIG_OTA_ENABLE=y | ||
# | ||
# Partition Table | ||
# | ||
CONFIG_OPENTHREAD_ENABLED=y | ||
CONFIG_PARTITION_TABLE_CUSTOM=y | ||
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" | ||
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv" | ||
CONFIG_PARTITION_TABLE_OFFSET=0x8000 | ||
CONFIG_PARTITION_TABLE_MD5=y | ||
# end of Partition Table | ||
|
||
# | ||
# Log Level | ||
# | ||
CONFIG_LOG_DEFAULT_LEVEL_NONE=y | ||
# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set | ||
# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set | ||
# CONFIG_LOG_DEFAULT_LEVEL_INFO is not set | ||
# CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set | ||
# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set | ||
CONFIG_LOG_DEFAULT_LEVEL=0 | ||
CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y | ||
# CONFIG_LOG_MAXIMUM_LEVEL_ERROR is not set | ||
# CONFIG_LOG_MAXIMUM_LEVEL_WARN is not set | ||
# CONFIG_LOG_MAXIMUM_LEVEL_INFO is not set | ||
# CONFIG_LOG_MAXIMUM_LEVEL_DEBUG is not set | ||
# CONFIG_LOG_MAXIMUM_LEVEL_VERBOSE is not set | ||
CONFIG_LOG_MAXIMUM_LEVEL=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#!/bin/bash | ||
|
||
PARTITIONS_FILE_OTA="partitions.csv" | ||
PARTITIONS_FILE_NO_OTA="partitions_no_ota.csv" | ||
|
||
PROJECT_PATH="." | ||
|
||
# Función para mostrar cómo usar el script | ||
function usage() { | ||
echo "Uso: $0 [--ota | --no-ota]" | ||
echo " --ota Compila el proyecto con soporte para OTA." | ||
echo " --no-ota Compila el proyecto sin soporte para OTA." | ||
exit 1 | ||
} | ||
|
||
# Verificación de argumentos | ||
if [ "$#" -ne 1 ]; then | ||
usage | ||
fi | ||
|
||
# Verificación de entorno IDF | ||
if [ -z "$IDF_PATH" ]; then | ||
echo "Error: El entorno IDF no está configurado. Asegúrate de que el IDF_PATH esté definido y el entorno esté activado." | ||
exit 1 | ||
fi | ||
|
||
|
||
# Selección del archivo de particiones basado en el argumento | ||
case "$1" in | ||
--ota) | ||
echo "Compilando con soporte para OTA..." | ||
PARTITIONS_FILE=$PARTITIONS_FILE_OTA | ||
;; | ||
--no-ota) | ||
echo "Compilando sin soporte para OTA..." | ||
PARTITIONS_FILE=$PARTITIONS_FILE_NO_OTA | ||
;; | ||
*) | ||
usage | ||
;; | ||
esac | ||
|
||
# Comprobación si el archivo de particiones existe | ||
if [ ! -f "$PARTITIONS_FILE" ]; then | ||
echo "Error: No se encuentra el archivo de particiones $PARTITIONS_FILE." | ||
exit 1 | ||
fi | ||
# Ejecutar build | ||
idf.py build | ||
|
||
# Verificar si la compilación fue exitosa | ||
if [ $? -eq 0 ]; then | ||
echo "Compilación completada con éxito." | ||
else | ||
echo "Error: Falló la compilación." | ||
exit 1 | ||
fi |