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

23598 Commits

Author SHA1 Message Date
francisco
3d62fa05b8 core/schedstatistics: refactor
- add init_schedstatistics function to be called after
  auto_init, that way xtimer_is init is called before
  the first call to xtimer_now
- register schedstatics code as a callback to be executed
  on each sched_run()
2019-09-10 17:07:54 +02:00
benpicco
999fffdc59
Merge pull request #11997 from gschorcht/cpu/esp32/esp_wifi/cleanups
cpu/esp32: esp_wifi improvements and cleanups
2019-09-05 13:51:10 +02:00
Gunar Schorcht
b3737715e5
Merge pull request #12170 from benpicco/esp32-fix_doc
cpu/esp32: fix documentation about toolchain installation
2019-09-05 12:58:32 +02:00
Gunar Schorcht
6d77529c83 cpu/esp32: cleaning up left overs in esp_wifi 2019-09-05 12:49:43 +02:00
Gunar Schorcht
3d5ef14650 cpu/esp32: local buffer in send of esp_wifi
Instead of having a send buffer as member `esp_wifi` netdev, a local variable is used now as send buffer. This avoids the need for a locking mechanism and reduces the risk of deadlocks.
2019-09-05 12:49:43 +02:00
Gunar Schorcht
74cbc410b7 cpu/esp32: ringbuffer introduced in esp_wifi
Receive call back function `_esp_wifi_rx_cb` is called from WiFi hardware driver with a pointer to a frame buffer that is allocated in the WiFi hardware driver. This frame buffer was freed immediately after copying its content to a single local receive buffer of the `esp_wifi` netdev. The local receive buffer remained occupied until the protocol stack had processed it. Further incoming packets were dropped.  However, very often a number of subsequent WiFi frames are received at the same time before the first one is processed completely. Having the single local receive buffer to hold only one received frame, led to a number of lost packets, even at low network load. Therefore, a ringbuffer of rx_buf elements was introduced which doesn't store the frames directly but only references to the frame buffers allocated in WiFi hardware driver. Since there is enough memory to hold several frames, the frames buffers allocated in WiFi hardware driver aren't freed immediatly any longer but are kept until the frame is processed by the protocol stack. This results in a much less loss rate of packets.
2019-09-05 12:49:02 +02:00
Gunar Schorcht
0e4ab63735 cpu/esp32: uniform debug output in esp_wifi 2019-09-05 12:49:02 +02:00
Gunar Schorcht
1ed09492a4 cpu/esp32: param checks replaced by asserts in esp_wifi 2019-09-05 12:49:02 +02:00
Gunar Schorcht
28ce17e64c cpu/esp32: event handling changed in esp_wifi
Events of different type can be pending at the same time. Therefore it is not possible to use ascending identifiers for the presence of a pending event. Rather, each event type has to be represented by one bit. Thes bits ORed identify all types of pending events. In the esp_wifi_isr function all pending events are then handled in one call. Otherwise, some events might be lost.
2019-09-05 12:49:02 +02:00
Gunar Schorcht
5cc990fb7c cpu/esp32: cleanup of includes in esp_wifi 2019-09-05 12:49:02 +02:00
benpicco
dbd97b7588
Merge pull request #11947 from gschorcht/cpu/esp32/freertos-critcial-sections
cpu/esp32: critcial section handling changed in FreeRTOS adaptation layer
2019-09-05 12:40:45 +02:00
Sebastian Meiling
c4dbdb7626
Merge pull request #12134 from gschorcht/cpu/esp/fix_i2c_ack_err_errno
cpu/esp*: fix of the error code for I2C address ACK errors
2019-09-05 12:23:24 +03:00
Gunar Schorcht
cb8b1b12c1 cpu/esp32: fix errno for I2C addr ack error
fixup! cpu/esp32: fix errno for I2C addr ack error
2019-09-05 10:35:02 +02:00
benpicco
f421cb7d9d
Merge pull request #12116 from maribu/arduino-millis
sys/arduino: Added millis()
2019-09-05 04:12:46 +02:00
Benjamin Valentin
7fc7272394 cpu/esp32: fix documentation about toolchain installation
Checking out the submodules first and then the commit makes a mess.
Doing it the other way round results in a working toolchain.
2019-09-05 01:01:09 +02:00
benpicco
a55230eee7
Merge pull request #12133 from gschorcht/cpu/esp8266/fix_stdio_problems
cpu/esp8266: fix stdio problems
2019-09-04 16:07:45 +02:00
Gunar Schorcht
37ecb4fc5d cpu/esp8266: periph/uart FIFO resized to 1 byte
UART FIFO must contain only 1 byte when newlib's `printf` function is used. Otherwise, outputs that are still not sent over UART are lost when `printf` is called asynchronousely.
2019-09-04 14:58:59 +02:00
Gunar Schorcht
7fe1056aa7 cpu/esp8266: enable newlib with nano-formatted-io 2019-09-04 14:41:31 +02:00
Gunar Schorcht
646a173738 cpu/esp8266: fix unresolved symbols
To avoid unresolved symbols for unused functions during linking, compiler option `-ffunction-sections` is used now. Linker option `--warn-unresolved-symbols` is removed to get errors if required symbols cannot be resolved.
2019-09-04 14:41:31 +02:00
Gunar Schorcht
69a5cc753d cpu/esp8266: use always newlib stdio functions
The modules `newlib, `newlib_syscalls_default` and `stdio_uart` are now used by default for output to the UART interface. This also reduces the dependency rules.
2019-09-04 14:41:31 +02:00
Gunar Schorcht
ae8afaf42e cpu/esp8266: remove overridden stdio functions
The overridden stdio functions `puts`, `putchar` and `printf` were removed. Instead, the corresponding newlib functions are always used. Using the newlib functions fixes output conflicts when using `f *` functions like `fprintf`,` fputs`, ... with `stdout` as the file parameter.
2019-09-04 14:41:31 +02:00
benpicco
205d431979
Merge pull request #12167 from maribu/cc110x-doc
driver/cc110x: Fixed indent/alignment in doc
2019-09-04 14:40:41 +02:00
Gunar Schorcht
98dfdef276
Merge pull request #12135 from benpicco/libb2-fix
pkg/libb2: rename config.h to avoid conflicts in the global namespace, set HAVE_ALIGNED_ACCESS_REQUIRED based on CPU (fixes build on esp8266)
2019-09-04 14:39:07 +02:00
Benjamin Valentin
4707f6b749 pkg/libb2: rename config.h to libb2_config.h
This is to avoid conflics with other config.h files, e.g. when building
for esp8266 where $(NEWLIB)/xtensa-lx106-elf/include/config.h gets
included instead.
2019-09-04 14:15:52 +02:00
Benjamin Valentin
bf410c84f1 pkg/libb2: define HAVE_ALIGNED_ACCESS_REQUIRED based on CPU
Most architectures do not support unaligned memory access, so set the define accordingly.
2019-09-04 14:15:52 +02:00
Benjamin Valentin
7047a200af cpu/native: advertise support for unaligned memory access
On Linux, even if the architecture does not support it, the kernel will
catch the fault and emulate the unaligned accesss.
2019-09-04 14:15:52 +02:00
Marian Buschsieweke
3da3280930
driver/cc110x: Fixed indent/alignment in doc
The Doxygen documentation blocks have not been correctly aligned. This commit
fixes this.
2019-09-04 13:15:15 +02:00
aa6f9e5b25
Merge pull request #12164 from keestux/driver_sht2x_cleanup
tests/driver_sht2x: avoid negative number after decimal dot
2019-09-04 07:58:18 +02:00
040978e3f5
Merge pull request #12165 from aabadie/pr/tests/driver_hts221_cleanup
tests/driver_hts221: cleanup temperature display logic
2019-09-04 07:48:30 +02:00
f750c3a474
tests/driver_hts221: cleanup temperature display logic
This saves 12 bytes when building for samr21-xpro
2019-09-03 21:36:26 +02:00
Kees Bakker
3d6b6d868d tests/driver_sht2x: avoid negative number after decimal dot
Also don't include printf_float
2019-09-03 20:50:25 +02:00
Francisco
0bf2be43eb
Merge pull request #12157 from aabadie/pr/tools/openocd_default_connect_assert_srst_val
tools/openocd: check if variable for extra reset_config is set
2019-09-03 19:22:57 +02:00
benpicco
1ffe2e5e30
Merge pull request #11512 from skullbox305/cpu-nrf5x
cpu/nrf52: i2c bugfix
2019-09-03 18:43:38 +02:00
benpicco
364f8e8076
Merge pull request #12162 from aabadie/pr/tests/driver_bmx280_cleanup
tests/driver_bmx280: cleanup temperature value display
2019-09-03 18:39:11 +02:00
benpicco
7f487ac807
Merge pull request #12131 from brummer-simon/gnrc_tcp-release_after_failed_send
gnrc_tcp - Release pakets on failed gnrc_netapi_send()
2019-09-03 15:59:21 +02:00
d0a8060ea6
tests/driver_bmx280: cleanup temperature value display 2019-09-03 12:58:56 +02:00
9065f8358c
tools/openocd: correctly check reset_config variable value
This avoids the following warning message when running OpenOCD: 'openocd.sh: line 124: [: : integer expression expected'
2019-09-03 12:44:09 +02:00
Martine Lenders
fa9bf485d1
Merge pull request #12159 from fjmolinas/pr_icmp6_echo
shell/commands: fix, only accept proper pong response to icmpv6_echo
2019-09-03 09:48:11 +02:00
Francisco Molina
5e1558ba57 shell/commands: fix, only accept proper pong response 2019-09-03 09:07:29 +02:00
Francisco
900b23626a
Merge pull request #12148 from aabadie/pr/boards/nrf52832-mdk_i2c
boards/nrf52832-mdk: enable I2C and use default configuration
2019-09-03 08:52:24 +02:00
benpicco
7cbc239a00
Merge pull request #12140 from aabadie/pr/tests/driver_bmp180_cleanup
tests/driver_bmp180: cleanup application
2019-09-02 21:55:29 +02:00
Juan I Carrano
ffd7264497
Merge pull request #12154 from cladmi/pr/tests/evtimer_msg/blacklist_on_master
tests/evtimer_msg|xtimer_periodic_wakeup: blacklist testing on native
2019-09-02 18:47:47 +02:00
db12eeb1a7
tests/driver_bmp180: remove useless printf_float module 2019-09-02 18:33:02 +02:00
73e1c563b4
tests/driver_bmp180: fix display with negative temperature 2019-09-02 18:33:02 +02:00
Gaëtan Harter
c59d263c61
tests/xtimer_periodic_wakeup: blacklist testing on native
The test randomly fails on `native` due to timers being not accurate but
it cannot be otherwise. So better disable it than raising fake errors.

    ...
    151 diff=3
    150 diff=4
    149 diff=3539
    148 diff=4
    147 diff=3
    ....
    min/max error: 1/3539
    too large difference.

    Test Failed.

    Timeout in expect script at "child.expect_exact("Test complete.")"
    (tests/xtimer_periodic_wakeup/tests/01-run.py:22)
2019-09-02 18:12:04 +02:00
Gaëtan Harter
52000b83be
tests/evtimer: blacklist testing on native
The test randomly fails on `native` due to timers being not accurate but
it cannot be otherwise. So better disable it than raising fake errors.

    main(): This is RIOT! (Version: buildtest)
    Testing generic evtimer
    This should list 2 items
    ev #1 offset=1000
    ev #2 offset=500
    This should list 4 items
    ev #1 offset=659
    ev #2 offset=341
    ev #3 offset=500
    ev #4 offset=2454
    Are the reception times of all 4 msgs close to the supposed values?
    At    662 ms received msg 0: "#2 supposed to be 659"
    At   1009 ms received msg 1: "#0 supposed to be 1000"
    At   1511 ms received msg 2: "#1 supposed to be 1500"

    Traceback (most recent call last):
      File "/tmp/dwq.0.3125418833043728/ef3af88c4b3615788b164464a437df5c/tests/evtimer_msg/tests/01-run.py", line 33, in <module>
        sys.exit(run(testfunc))
      File "/tmp/dwq.0.3125418833043728/ef3af88c4b3615788b164464a437df5c/dist/pythonlibs/testrunner/__init__.py", line 29, in run
        testfunc(child)
      File "/tmp/dwq.0.3125418833043728/ef3af88c4b3615788b164464a437df5c/tests/evtimer_msg/tests/01-run.py", line 26, in testfunc
        assert(actual in range(expected - ACCEPTED_ERROR, expected + ACCEPTED_ERROR))
    AssertionError
2019-09-02 16:37:05 +02:00
Kevin "Tristate Tom" Weiss
d9b0db0d61
Merge pull request #11976 from fjmolinas/pr_stm32f0x_extra_flash
dist/tools/openocd: add OPENOCD_EXTRA_INIT_RESET use for nucleo-f091rc
2019-09-02 15:54:24 +02:00
Francisco Molina
06c830e8cd boards/nucleo-f091rc: set OPENOCD_RESET_USE_CONNECT_ASSERT_SRST
- Nucleo-f091rc can become unflashable when hardfaults occure.
  To make sure flashing succeeds `connect_assert_srst` is called
  before connecting to flash threw openocd.
2019-09-02 14:54:38 +02:00
Francisco Molina
900875c603 dist/tools/openocd: add OPENOCD_EXTRA_INIT_RESET
- Add a variable to add extra openocd commands before resetting
  a board. These will not be called when `debug`, in contrast
  to OPENOCD_CONFIG, OPENOCD_EXTRA_INIT and OPENOCD_ADAPTER_INIT.
- Add connect_assert_srst to reset config if
  OPENOCD_RESET_USE_CONNECT_ASSERT_SRST=1
2019-09-02 14:53:51 +02:00
cb51cee2ba
boards/nrf52832-mdk: enable I2C and use default configuration 2019-09-02 13:12:40 +02:00