1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
Commit Graph

34410 Commits

Author SHA1 Message Date
Martine Lenders
271d1ae3a2
pyterm: read space after prompt into prompt
Currently, when the prompt is read in `pyterm` the space after it is
ignored for the prompt and the output command just adds its own prompt.
This leads to the next output always having a leading space, see e.g.
this output from `tests/shell` using `RIOT_TERMINAL=pyterm`:

```
make: Entering directory '/home/mlenders/Repositories/RIOT-OS/RIOT2/tests/shell'
/home/mlenders/Repositories/RIOT-OS/RIOT2/dist/tools/pyterm/pyterm -p "/dev/ttyUSB1" -b "500000"
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2021-02-09 14:47:15,071 # Connect to serial port /dev/ttyUSB1
Welcome to pyterm!
Type '/exit' to exit.
bufsize
2021-02-09 14:47:19,712 # bufsize
2021-02-09 14:47:19,712 # 128
> bufsize
2021-02-09 14:47:21,535 #  bufsize
2021-02-09 14:47:21,536 # 128
>
```

While this isn't necessarily a problem in most cases, it becomes a
problem when the prompt is expected and the output of a command is
empty. In that case, the space is added to the empty output, making it
" ", so the prompt output command is never triggered and the prompt is
added to the next command in the log output. To demonstrate I added a
command `empty` to `tests/shell` that just does nothing and deactivated
the command echoing using `CFLAGS=-DCONFIG_SHELL_NO_ECHO=1`:

```
empty
> empty
empty
bufsize
2021-02-09 14:54:33,753 #  > > 128
>
```

This fixes that problem by also reading the assumed space (we already
assume the prompt, so I don't see no harm in that) and if it is not a
space to skip the reading of the next char in the next iteration of the
reader loop.
2021-02-09 17:17:25 +01:00
Martine Lenders
40da80085e
pyterm: move char reading and reconnect to their own private functions 2021-02-09 16:51:52 +01:00
benpicco
64779b6f98
Merge pull request #15944 from jeandudey/2021_02_08-cc26x0-cc13x0
cpu/cc26x0: rename to cc26x0_cc13x0
2021-02-08 21:10:06 +01:00
Martine Lenders
209b48e385
Merge pull request #15694 from maribu/gnrc_tx_sync
sys/net/gnrc/tx_sync: new module
2021-02-08 19:47:43 +01:00
Jean Pierre Dudey
aec0edbcb9 cpu/cc26x0_cc13x0: use SetupTrimDevice only on cc26x0
Signed-off-by: Jean Pierre Dudey <me@jeandudey.tech>
2021-02-08 17:25:42 +01:00
Jean Pierre Dudey
7db791476e cpu/cc26x0: rename to cc26x0_cc13x0
Signed-off-by: Jean Pierre Dudey <me@jeandudey.tech>
2021-02-08 17:25:42 +01:00
Marian Buschsieweke
bd37457e14
tests/gnrc_tx_sync: add test for gnrc_tx_sync 2021-02-08 16:13:11 +01:00
Marian Buschsieweke
9895b840cd
sys/net: gnrc_tx_sync not implemented for gnrc_sixlowpand_frag_sfr
It is currently not possible to use both gnrc_tx_sync and
gnrc_sixlowpand_frag_sfr at the same time - this will be added in a follow
up PR.
2021-02-08 16:13:11 +01:00
317534fe7b
Merge pull request #15942 from bergzand/pr/riscv_common/thread_yield_in_irq
riscv_common: make thread_yield_higher IRQ compatible
2021-02-08 14:59:56 +01:00
0b2810a856
riscv_common: make thread_yield_higher IRQ compatible 2021-02-08 11:04:18 +01:00
50cf93c719
Merge pull request #15718 from bergzand/pr/rv32i/fe310_rv32i_refactor
riscv_common: Refactor common fe310 code to riscv_common
2021-02-08 10:27:41 +01:00
Marian Buschsieweke
83fbde1e91
Merge pull request #15934 from leandrolanzieri/pr/pkg/wakaama_patch_native_exception
pkg/wakaama: add patch to cast macro to time_t
2021-02-06 13:12:37 +01:00
Martine Lenders
492000f232
Merge pull request #15909 from leandrolanzieri/pr/ieee802154_security_radio_hal
net/ieee802154_security: remove radio hal dependency and cleanup
2021-02-05 17:08:52 +01:00
Martine Lenders
bc59d60be6
Merge pull request #15929 from cgundogan/pr/uriparser
uri_parser: fix out-of-bounds and additional enhancements
2021-02-05 17:06:01 +01:00
Leandro Lanzieri
0492cc5177
pkg/wakaama: cast macro to time_t
Currently on some toolchains the wakaama package is raising a floating
point exception on native. This seems to be fixing the issue.
2021-02-05 16:20:08 +01:00
Cenk Gündoğan
6ef29d9b53
tests: uri_parser: new test to check empty host 2021-02-05 13:32:49 +01:00
Cenk Gündoğan
e399ef5d76
uri_parser: terminate, if nothing to consume after scheme 2021-02-05 13:32:49 +01:00
Cenk Gündoğan
6f13325a52
uri_parser: do not parse path if end-of-uri 2021-02-05 13:24:36 +01:00
Cenk Gündoğan
1040cf9862
uri_parser: allow empty host part even if userinfo and port exist 2021-02-05 13:24:36 +01:00
Cenk Gündoğan
f9b8fadd85
uri_parser: check boundaries if host is empty, but userinfo exists 2021-02-05 13:24:36 +01:00
Cenk Gündoğan
07f1254d85
Merge pull request #15930 from nmeum/pr/uri_parser_scheme
uri_parser: check if uri is long enough to even contain a ://
2021-02-05 13:23:43 +01:00
19bb182a92
uncrustify: also include riscv_common in the whitelist 2021-02-05 09:32:19 +01:00
2692957c0e
riscv_common: Refactor common fe310 code to riscv_common 2021-02-05 09:32:19 +01:00
Francisco
89922e8d54
Merge pull request #15921 from haukepetersen/fix_nimble_autoconn_deps
pkg/nimble/autoconn: add missing 'random' dep
2021-02-04 21:24:32 +01:00
Sören Tempel
333572e091 uri_parser: check if uri is long enough to even contain a ://
Before attempting to access these characters. This fixes an
out-of-bounds read on the provided URI buffer.
2021-02-04 20:08:26 +01:00
Martine Lenders
d6e43fd07a
Merge pull request #15924 from leandrolanzieri/pr/kconfig/sys_shell_fix_symbol
sys/shell: rename Kconfig symbol to adhere to convention
2021-02-04 14:43:35 +01:00
Leandro Lanzieri
f0762c5114
tests: check Kconfig before setting CFLAGS for shell configs 2021-02-04 12:46:26 +01:00
Leandro Lanzieri
8a29cf285d
sys/shell: fix menuconfig symbol name 2021-02-04 12:46:19 +01:00
Martine Lenders
4cc0420550
Merge pull request #15913 from jia200x/pr/release_notes
release-notes.txt: add 2021.01 release notes
2021-02-04 12:37:29 +01:00
Martine Lenders
8610f84629
Merge pull request #15918 from leandrolanzieri/pr/kconfig/sys_shell
sys/shell: document configs and add them to Kconfig
2021-02-04 10:56:05 +01:00
Jose Alamos
3634599318
release-notes.txt: add 2021.01 release notes 2021-02-04 10:17:59 +01:00
Hauke Petersen
ee9a573455 pkg/nimble/autoconn: add missing 'random' dep 2021-02-04 09:30:42 +01:00
Leandro Lanzieri
67f36d78a9
sys/shell: document configs and add to Kconfig 2021-02-04 09:19:43 +01:00
Marian Buschsieweke
89c69c5450
sys/net/gnrc/tx_sync: new module
The new `gnrc_tx_sync` module allows users of the GNRC network stack to
synchronize with the actual transmission of outgoing packets. This is directly
integrated into gnrc_sock. Hence, if `gnrc_tx_sync` is used, calls to e.g.
sock_udp_send() will block until the network stack has processed the message.

Use cases:
1. Prevent packet drop when sending at high rate
    - If the application is sending faster than the stack can handle, the
      message queues will overflow and outgoing packets are lost
2. Passing auxiliary data about the transmission back the stack
    - When e.g. the number of required retransmissions, the transmission time
      stamp, etc. should be made available to a user of an UDP sock, a
      synchronization mechanism is needed
3. Simpler error reporting without footguns
    - The current approach of using `core/msg` for passing up error messages is
      difficult to use if other message come in. Currently, gnrc_sock is
      busy-waiting and fetching messages from the message queue until the number
      of expected status reports is received. It will enqueue all
      non-status-report messages again at the end of the queue. This has
      multiple issues:
        - Busy waiting is especially in lower power scenarios with time slotted
          MAC protocols harmful, as the CPU will remain active and consume
          power even though the it could sleep until the TX slot is reached
        - The status reports from the network stack are send to the user thread
          blocking. If the message queue of the user thread is full, the network
          stack would block until the user stack can fetch the messages. If
          another higher priority thread would start sending a message, it
          would busy wait for its status reports to completely come in. Hence,
          the first thread doesn't get CPU time to fetch messages and unblock
          the network stack. As a result, the system would lock up completely.
    - Just adding the error/status code to the gnrc_tx_sync_t would preallocate
      and reserve memory for the error reporting. That way gnrc_sock does not
      need to search through the message queue for status reports and the
      network stack does not need to block for the user thread fetching it.
2021-02-03 15:16:42 +01:00
Hauke Petersen
1edb583a69
Merge pull request #15919 from haukepetersen/fix_nimble_netifsenderrret
pkg/nimble/netif: improve _send_pkt() error return value
2021-02-03 14:24:25 +01:00
Hauke Petersen
101bc6184c pkg/nimble/netif: improve _send() error return val 2021-02-03 12:30:58 +01:00
b666b78602
Merge pull request #15914 from fjmolinas/pr_stm32_flashpage_fix_per
cpu/stm32/flashpage: reset PER after erase
2021-02-03 10:21:04 +01:00
Francisco
3b2a55a923
Merge pull request #15865 from benpicco/pm_layered-default
cpu: make pm_layered a DEFAULT_MODULE
2021-02-03 08:17:29 +01:00
Martine Lenders
6da60c933d
Merge pull request #15802 from miri64/treewide/cleanup/cppcheck-whitelisted
treewide: re-uncrustify whitelisted files
2021-02-03 07:59:27 +01:00
Marian Buschsieweke
f685996cd0
Merge pull request #15405 from benpicco/boards/bluepill-stm32f030c8t6
boards/bluepill-stm32f030c8: add STM32F030C8 based bluepill board
2021-02-03 07:45:14 +01:00
Benjamin Valentin
4f587bedb5 examples: add bluepill-stm32f030c8 to Makefile.ci 2021-02-02 23:47:40 +01:00
Benjamin Valentin
d3ca85ad65 tests: add bluepill-stm32f030c8 to Makefile.ci 2021-02-02 23:47:40 +01:00
benpicco
2313cefbd3
Merge pull request #15910 from maribu/sys-arduino-spi-fix
sys/arduino: Bug and style fixes in SPI
2021-02-02 23:41:04 +01:00
Benjamin Valentin
762decd207 boards/common/e104-bt50xxa-tb: software reset depends on periph_pm 2021-02-02 23:40:21 +01:00
Benjamin Valentin
118cf0e9e6 riotboot_usb_dfu: depend on periph_pm 2021-02-02 23:40:21 +01:00
Benjamin Valentin
32c30aaeaa pm_layered: depend on periph_pm 2021-02-02 23:40:21 +01:00
Benjamin Valentin
00289b08a4 riotboot: don't select periph_pm 2021-02-02 23:40:21 +01:00
Martine Lenders
8730733b97
uncrustify: fix ztimer whitelist pattern 2021-02-02 22:21:15 +01:00
Martine Lenders
7e3846b6a4
ztimer: apply uncrustify patches 2021-02-02 22:21:15 +01:00
Martine Lenders
8a31d2ec9f
uncrustify: add cpu/fe310/include/atomic_utils_arch.h to blacklist 2021-02-02 22:21:15 +01:00