Ivan Grokhotkov
9b2b86b7d9
console: fix linenoiseProbe never timing out
...
Fixes a regression from 753a92952: if cb was negative, read_bytes
overflowed, because the type was changed from int to size_t.
Also fixes incorrect timeout calculation: timeout_ms was 200, but
each iteration delayed for 10ms, and reduced timeout_ms by 1. This
made the effective timeout to be 2000ms.
2021-01-15 09:22:04 +01:00
morris
753a929525
global: fix sign-compare warnings
2021-01-12 14:05:08 +08:00
Armando
fb8b905539
uart: add uart support on esp32s3
2020-11-24 19:12:51 +08:00
morris
e039a28821
console: support create REPL over USB CDC
2020-11-13 10:51:40 +08:00
Angus Gratton
66fb5a29bb
Whitespace: Automated whitespace fixes (large commit)
...
Apply the pre-commit hook whitespace fixes to all files in the repo.
(Line endings, blank lines at end of file, trailing whitespace)
2020-11-11 07:36:35 +00:00
Jakob Hasse
20c068ef3b
cmock: added cmock as component
...
* changing dependencies from unity->cmock
* added component.mk and Makefile.projbuild
* ignore test dir in gen_esp_err_to_name.py
* added some brief introduction of CMock in IDF
2020-09-02 16:38:37 +08:00
houwenxiang
8e00522cd7
vfs: support vfs uart set line endings with specified uart number
2020-07-10 11:15:09 +08:00
morris
29f8aecfc0
console_repl: change config structure to support different devices
2020-07-02 07:39:46 +00:00
Ivan Grokhotkov
f54d771cd3
linenoise: actively flush the output stream, in case it is buffered
2020-06-24 15:50:51 +02:00
Ivan Grokhotkov
30a6a8f932
Update linenoise.c: calloc returning NULL is not handled
...
Calloc function tries to allocate 4096 bytes.
If such memory is not available, it returns NULL pointer.
This exception was not handled in the code, causing a dirty crash.
2020-05-06 13:21:56 +08:00
Ivan Grokhotkov
ece41b04e3
console: make empty line behavior run-time configurable
2020-04-29 23:44:46 +02:00
Michael 'ASAP' Weinrich
c34352549a
Added Kconfig for enabling 0 length returns from linenoise
2020-04-29 23:44:46 +02:00
MadnessASAP
dfd4227e7a
Don't return NULL on 0 length input
...
A 0 length string is still a valid input and should be treated as such, a NULL return should be reserved for when errors occur during line editing or EOF is reached.
Merges https://github.com/espressif/esp-idf/pull/4926
2020-04-29 23:44:46 +02:00
David Cermak
585633b254
console: ignore static analysis warnings
2020-03-27 19:19:20 +01:00
Renz Bagaporo
3d0967a58a
test: declare requirements and include dirs private
2020-03-23 10:58:50 +08:00
morris
46a3f3e516
console: make uart param configurable
...
Closes https://github.com/espressif/esp-idf/issues/4845
2020-03-07 13:23:23 +08:00
suda-morris
75cadc2e41
console: simplify examples
...
1. simplify console examples
2. add "quit" command
3. support console command overwrite
4. add API reference
2020-02-07 20:15:06 +08:00
Anton Maklakov
afbaf74007
tools: Mass fixing of empty prototypes (for -Wstrict-prototypes)
2019-08-01 16:28:56 +07:00
Renz Christian Bagaporo
9b350f9ecc
cmake: some formatting fixes
...
Do not include bootloader in flash target when secure boot is enabled.
Emit signing warning on all cases where signed apps are enabled (secure
boot and signed images)
Follow convention of capital letters for SECURE_BOOT_SIGNING_KEY
variable, since it is
relevant to other components, not just bootloader.
Pass signing key and verification key via config, not requiring
bootloader to know parent app dir.
Misc. variables name corrections
2019-06-21 19:53:29 +08:00
Renz Christian Bagaporo
9eccd7c082
components: use new component registration api
2019-06-21 19:53:29 +08:00
Renz Christian Bagaporo
ffec9d4947
components: update with build system changes
2019-05-13 19:59:17 +08:00
morris
c159984264
separate rom from esp32 component to esp_rom
...
1. separate rom include files and linkscript to esp_rom
2. modefiy "include rom/xxx.h" to "include esp32/rom/xxx.h"
3. Forward compatible
4. update mqtt
2019-03-21 18:51:45 +08:00
Ivan Grokhotkov
fa57fb3c1c
console/linenoise: support buffered stdout
2019-03-13 20:17:25 +08:00
Ivan Grokhotkov
271a2e8e97
console, ulp: don’t use nested functions
...
These are not supported by clang
Ref LLVM-12
2018-12-06 16:12:47 +08:00
Renz Christian Bagaporo
944014f9f2
cmake: fix source list issues
2018-09-13 08:56:59 +08:00
Renz Christian Bagaporo
d9939cedd9
cmake: make main a component again
2018-09-11 09:44:12 +08:00
Angus Gratton
ff2404a272
Merge branch 'master' into feature/cmake
2018-08-16 17:14:17 +10:00
Renz Bagaporo
8ce14d0406
console: Suppress unused warning asprintf result
2018-07-24 06:08:48 +00:00
Renz Bagaporo
4355eb1bc2
console: Ignore var cloberred warning for argtable
2018-07-24 06:08:48 +00:00
Alexey Gerenkov
c2dc09304c
gcc8_newlib3: Compilation warnings and errors not specific to newlib v3
2018-07-09 13:22:24 +03:00
Angus Gratton
6b9784cc45
Merge branch 'master' into feature/cmake_update
2018-05-31 14:46:23 +10:00
Anuj Deshpande
87adbd3229
console: Fix formatting
2018-04-30 14:22:45 +05:30
Anuj Deshpande
b3894dba97
console: Free alloc'd memory after error conditions
...
Closes https://github.com/espressif/esp-idf/issues/1901
2018-04-30 14:21:03 +05:30
Angus Gratton
1cb5712463
cmake: Add component dependency support
...
Components should set the COMPONENT_REQUIRES & COMPONENT_PRIVATE_REQUIRES variables to define their
requirements.
2018-04-30 09:59:20 +10:00
Angus Gratton
4f1a856dbf
cmake: Remove defaults for COMPONENT_SRCDIRS, COMPONENT_SRCS, COMPONENT_ADD_INCLUDEDIRS
...
* Philosophical: "explicit is better than implicit".
* Practical: Allows useful errors if invalid directories given in components as the defaults aren't
always used. Also trims the -I path from a number of components that have no actual include
directory.
* Simplifies knowing which components will be header-only and which won't
2018-04-30 09:59:20 +10:00
Angus Gratton
c671a0c3eb
build system: Initial cmake support, work in progress
2018-04-30 09:59:20 +10:00
Roland Dobai
744c2dcdd9
Resolve problems found by enabling -Wwrite-strings compilation flag
2018-04-10 08:53:43 +02:00
Angus Gratton
2536d50d2e
console: Add C++ guards to header
...
As reported on forum https://esp32.com/viewtopic.php?f=2&t=4478&p=19659
2018-01-29 09:22:04 +08:00
Roman Valls Guimera
519edc332d
Fix compilation errors when using gcc-7.2.0 for the crosstool-ng toolchain
...
* Change snprintf for strlcat does not complain w/gcc7.2.0 and it is safer, thanks @projectgus
* Use proper quotes for character literals
Merges https://github.com/espressif/esp-idf/pull/1163
2017-12-04 10:18:40 +11:00
Ivan Grokhotkov
4d42b5ea24
console: handle empty input to esp_console_run correctly
...
Fixes https://github.com/espressif/esp-idf/issues/1067
Ref. TW15752
2017-10-13 07:14:53 +08:00
Ivan Grokhotkov
0ed64da963
console: initialize buf_size before calling open_memstream
...
POSIX open_memstream documentation [1] does not mention that it may use
the value supplied in buf_size before the call.
newlib implementation of open_memstream does use it as a hint of the
buffer size [2]. To avoid using potential garbage in this variable,
newlib caps the size to 64kB (!).
If the allocation of this initial buffer fails, NULL file pointer is
returned. Previous code did not check returned file pointer and crashed
when it was used.
Initialize size to zero (in which case newlib allocates a 64 byte
buffer), and check the returned file pointer.
[1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/open_memstream.html
[2] https://github.com/espressif/newlib-esp32/blob/23c0f21/newlib/libc/stdio/open_memstream.c#L26-L29
https://github.com/espressif/newlib-esp32/blob/23c0f21/newlib/libc/stdio/open_memstream.c#L324-L336
2017-08-23 01:10:30 +08:00
Ivan Grokhotkov
abe9516fdc
newlib: implement usleep
2017-08-21 15:58:28 +08:00
Ivan Grokhotkov
10f0543080
console: add support for terminal probing and dumb terminal mode
2017-08-21 15:58:28 +08:00
Ivan Grokhotkov
a8075ea140
console/argtable3: expose arg_print_formatted function
2017-08-21 15:58:28 +08:00
Ivan Grokhotkov
160f842d35
console/argtable3: fix usage of char as argument to ctype functions
2017-08-21 15:58:27 +08:00
Ivan Grokhotkov
5de7c91a54
add console component and example
2017-08-21 15:58:27 +08:00