8000 feat(repo): support MicroPython · esp-arduino-libs/esp-lib-utils@1b57cb4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1b57cb4

Browse files
committed
feat(repo): support MicroPython
1 parent d6bfe55 commit 1b57cb4

29 files changed

+741
-407
lines changed

.codespellrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
[codespell]
2-
skip = ./src/touch/port/esp_lcd_touch_xpt2046.c

.github/workflows/build_test.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
build:
1010
strategy:
1111
matrix:
12-
idf_ver: ["release-v5.1", "release-v5.2", "release-v5.3"]
12+
idf_ver: ["release-v5.1", "release-v5.2", "release-v5.3"]
1313
idf_target: ["esp32", "esp32s3"]
1414
runs-on: ubuntu-20.04
1515
container: espressif/idf:${{ matrix.idf_ver }}
@@ -28,3 +28,7 @@ jobs:
2828
idf.py build
2929
rm -rf sdkconfig build managed_components dependencies.lock
3030
idf.py -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.ci.cxx_exceptions" build
31+
rm -rf sdkconfig build managed_components dependencies.lock
32+
idf.py -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.ci.cxx_exceptions;sdkconfig.ci.esp_mem" build
33+
rm -rf sdkconfig build managed_components dependencies.lock
34+
idf.py -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;sdkconfig.ci.cxx_exceptions;sdkconfig.ci.custom_mem" build

Kconfig

Lines changed: 54 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,120 @@
1-
menu "ESP Library Utils"
2-
config ESP_UTILS_CONFIG_FILE_SKIP
3-
bool "Unckeck this to ignore `esp_utils_config.h`"
1+
menu "ESP Library Utils Configurations"
2+
config ESP_UTILS_CONF_FILE_SKIP
3+
bool "Unckeck this to use custom `esp_utils_conf.h`"
44
default y
55

66
menu "Check functions"
7-
config ESP_UTILS_ENABLE_CHECK
8-
bool "Enable error check"
7+
depends on ESP_UTILS_CONF_FILE_SKIP
8+
config ESP_UTILS_CONF_ENABLE_CHECK
9+
bool "Enable check functions"
910
default y
1011
help
1112
If enabled, the driver will check the function parameters, return value, etc. Disable them will reduce the code size.
1213

13-
config ESP_UTILS_CHECK_WITH_ERROR_LOG
14-
bool "Print error message on error"
14+
config ESP_UTILS_CONF_CHECK_WITH_ERROR_LOG
15+
bool "Print log messages on error"
1516
default y
16-
depends on ESP_UTILS_ENABLE_CHECK
17+
depends on ESP_UTILS_CONF_ENABLE_CHECK
1718
help
1819
If enabled, the driver will print error message when check failed.
1920

20-
config ESP_UTILS_CHECK_WITH_ASSERT
21+
config ESP_UTILS_CONF_CHECK_WITH_ASSERT
2122
bool "Assert on error"
2223
default n
23-
depends on ESP_UTILS_ENABLE_CHECK
24+
depends on ESP_UTILS_CONF_ENABLE_CHECK
2425
help
2526
If enabled, the driver will assert when check failed.
2627
endmenu
2728

2829
menu "Log functions"
29-
config ESP_UTILS_ENABLE_LOG
30-
bool "Enable output debug log"
30+
depends on ESP_UTILS_CONF_FILE_SKIP
31+
config ESP_UTILS_CONF_ENABLE_LOG
32+
bool "Enable log functions"
3133
default y
3234
help
3335
If enabled, the driver will output log for debugging.
3436

35-
config ESP_UTILS_LOG_BUFFER_SIZE
36-
int "Buffer size for log messages"
37-
depends on ESP_UTILS_ENABLE_LOG
37+
config ESP_UTILS_CONF_LOG_BUFFER_SIZE
38+
int "Buffer size for formatting messages"
39+
depends on ESP_UTILS_CONF_ENABLE_LOG
3840
default 256
3941

40-
choice ESP_UTILS_LOG_LEVEL
41-
prompt "Log level for all messages"
42-
depends on ESP_UTILS_ENABLE_LOG
43-
default ESP_UTILS_LOG_LEVEL_INFO
42+
choice ESP_UTILS_CONF_LOG_LEVEL
43+
prompt "Select global log level"
44+
depends on ESP_UTILS_CONF_ENABLE_LOG
45+
default ESP_UTILS_CONF_LOG_LEVEL_INFO
4446

45-
config ESP_UTILS_LOG_LEVEL_DEBUG
47+
config ESP_UTILS_CONF_LOG_LEVEL_DEBUG
4648
bool "Debug"
4749
help
4850
Extra information which is not necessary for normal use (values, pointers, sizes, etc)
4951

50-
config ESP_UTILS_LOG_LEVEL_INFO
52+
config ESP_UTILS_CONF_LOG_LEVEL_INFO
5153
bool "Info"
5254
help
5355
Information messages which describe the normal flow of events
5456

55-
config ESP_UTILS_LOG_LEVEL_WARNING
57+
config ESP_UTILS_CONF_LOG_LEVEL_WARNING
5658
bool "Warning"
5759
help
5860
Error conditions from which recovery measures have been taken
5961

60-
config ESP_UTILS_LOG_LEVEL_ERROR
62+
config ESP_UTILS_CONF_LOG_LEVEL_ERROR
6163
bool "Error"
6264
help
6365
Critical errors, software module cannot recover on its own
6466
endchoice
6567

66-
config ESP_UTILS_LOG_GLOBAL_LEVEL
68+
config ESP_UTILS_CONF_LOG_LEVEL
6769
int
68-
default 0 if ESP_UTILS_LOG_LEVEL_DEBUG
69-
default 1 if ESP_UTILS_LOG_LEVEL_INFO
70-
default 2 if ESP_UTILS_LOG_LEVEL_WARNING
71-
default 3 if ESP_UTILS_LOG_LEVEL_ERROR
70+
default 0 if ESP_UTILS_CONF_LOG_LEVEL_DEBUG
71+
default 1 if ESP_UTILS_CONF_LOG_LEVEL_INFO
72+
default 2 if ESP_UTILS_CONF_LOG_LEVEL_WARNING
73+
default 3 if ESP_UTILS_CONF_LOG_LEVEL_ERROR
7274

73-
config ESP_UTILS_ENABLE_LOG_TRACE
75+
config ESP_UTILS_CONF_ENABLE_LOG_TRACE
7476
bool "Enable trace function"
75-
depends on ESP_UTILS_LOG_LEVEL_DEBUG
77+
depends on ESP_UTILS_CONF_LOG_LEVEL_DEBUG
7678
default n
7779
help
7880
If enabled, the driver will print trace log messages when enter/exit functions, useful for debugging
7981
endmenu
8082

8183
menu "Memory functions"
82-
choice ESP_UTILS_MEM_GENERAL_ALLOC_TYPE_CHOICE
84+
depends on ESP_UTILS_CONF_FILE_SKIP
85+
choice ESP_UTILS_CONF_MEM_GEN_ALLOC_TYPE_CHOICE
8386
prompt "Select general allocation type"
84-
default ESP_UTILS_MEM_GENERAL_ALLOC_TYPE_STDLIB
87+
default ESP_UTILS_CONF_MEM_GEN_ALLOC_TYPE_STDLIB
8588

86-
config ESP_UTILS_MEM_GENERAL_ALLOC_TYPE_STDLIB
89+
config ESP_UTILS_CONF_MEM_GEN_ALLOC_TYPE_STDLIB
8790
bool "Standard library (malloc, free)"
8891

89-
config ESP_UTILS_MEM_GENERAL_ALLOC_TYPE_ESP
92+
config ESP_UTILS_CONF_MEM_GEN_ALLOC_TYPE_ESP
9093
bool "ESP (heap_caps_malloc, free)"
9194

92-
config ESP_UTILS_MEM_GENERAL_ALLOC_TYPE_MICROPYTHON
95+
config ESP_UTILS_CONF_MEM_GEN_ALLOC_TYPE_MICROPYTHON
9396
bool "MicroPython (mp_malloc, mp_free)"
9497

95-
config ESP_UTILS_MEM_GENERAL_ALLOC_TYPE_CUSTOM
96-
bool "Custom (`ESP_UTILS_MEM_GENERAL_ALLOC_CUSTOM_MALLOC` and `ESP_UTILS_MEM_GENERAL_ALLOC_CUSTOM_FREE`)"
98+
config ESP_UTILS_CONF_MEM_GEN_ALLOC_TYPE_CUSTOM
99+
bool "Custom (`ESP_UTILS_CONF_MEM_GEN_ALLOC_CUSTOM_MALLOC` and `ESP_UTILS_CONF_MEM_GEN_ALLOC_CUSTOM_FREE`)"
97100
endchoice
98101

99-
config ESP_UTILS_MEM_GENERAL_ALLOC_TYPE
102+
config ESP_UTILS_CONF_MEM_GEN_ALLOC_TYPE
100103
int
101-
default 0 if ESP_UTILS_MEM_GENERAL_ALLOC_TYPE_STDLIB
102-
default 1 if ESP_UTILS_MEM_GENERAL_ALLOC_TYPE_ESP
103-
default 2 if ESP_UTILS_MEM_GENERAL_ALLOC_TYPE_MICROPYTHON
104-
default 3 if ESP_UTILS_MEM_GENERAL_ALLOC_TYPE_CUSTOM
105-
106-
config ESP_UTILS_MEM_GENERAL_ALLOC_CUSTOM_INCLUDE
104+
default 0 if ESP_UTILS_CONF_MEM_GEN_ALLOC_TYPE_STDLIB
105+
default 1 if ESP_UTILS_CONF_MEM_GEN_ALLOC_TYPE_ESP
106+
default 2 if ESP_UTILS_CONF_MEM_GEN_ALLOC_TYPE_MICROPYTHON
107+
default 3 if ESP_UTILS_CONF_MEM_GEN_ALLOC_TYPE_CUSTOM
108+
109+
config ESP_UTILS_CONF_MEM_GEN_ALLOC_ESP_ALIGN
110+
int "General esp memory alignment (bytes)"
111+
depends on ESP_UTILS_CONF_MEM_GEN_ALLOC_TYPE_ESP
112+
default 1
113+
range 1 1024
114+
115+
config ESP_UTILS_CONF_MEM_GEN_ALLOC_CUSTOM_INCLUDE
107116
string "General custom memory header file"
108-
depends on ESP_UTILS_MEM_GENERAL_ALLOC_TYPE_CUSTOM
117+
depends on ESP_UTILS_CONF_MEM_GEN_ALLOC_TYPE_CUSTOM
109118
default "stdlib.h"
110119
endmenu
111120
endmenu

0 commit comments

Comments
 (0)
0