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

799 Commits

Author SHA1 Message Date
Leandro Lanzieri
df7ce1c647
makefiles/kconfig: use two lists for boards and CPUs default configs
This introduces KCONFIG_BOARD_CONFIG and KCONFIG_CPU_CONFIG variable for
boards and CPUs (including common directories) to add default
configuration files to be merged. The current approach, as it uses
Makefile.features, would include boards first, not allowing them to
override CPU configurations.
2021-12-13 12:33:21 +01:00
Benjamin Valentin
41a5b7ef7a core: change return type of irq_is_in(), irq_is_enabled() to bool
This only cleans up the API, no change in behavior or users of the API
is expected.
2021-12-08 15:53:15 +01:00
José Alamos
ce8cda2fd8
Merge pull request #16932 from benpicco/socket_zep-hal
socket_zep: port to radio HAL
2021-12-07 18:24:33 +01:00
Leandro Lanzieri
368ccdf3f8
sys/vfs: model Kconfig 2021-11-29 10:30:49 +01:00
Leandro Lanzieri
c5f9d50a57 socket_zep: add Kconfig 2021-11-18 14:17:29 +01:00
Benjamin Valentin
fa2d9bde56 socket_zep: port to radio HAL 2021-11-18 11:51:14 +01:00
83c2f2d367
Merge pull request #17155 from maribu/cpu/native
cpu/native: align stack in thread_stack_init()
2021-11-16 20:48:32 +01:00
326b0c980a
cpu/native: migrate periph_rtc to ztimer 2021-11-11 10:54:30 +01:00
Marian Buschsieweke
09b8387df4
cpu/native: align stack in thread_stack_init()
Unaligned accesses on x86(_64) are allowed, but slow. However, some host systems
might not be that forgiving. Aligning the stack to sizeof(uintptr_t) should be
a pretty safe safety measure.

And with this done, all casts of the stack pointer that increase alignment
requirements are now intermediately casted to `uintptr_t` to silence
warnings from -Wcast-align - after all the stacks are now manually aligned.
2021-11-06 20:22:10 +01:00
Francisco
7f3344870d
Merge pull request #16972 from Ollrogge/flashpage_pr
periph/flashpage: extend API
2021-10-26 12:51:05 +02:00
Francisco
96e2ad1f0e
Merge pull request #16956 from fjmolinas/pr_native_relative_stacksize
cpu/native/include: other stacksizes based on default
2021-10-26 09:04:16 +02:00
Ollrogge
cdd9f303cf cpu/native: extend flashpage API 2021-10-25 15:07:37 +02:00
Francisco Molina
5070489aa6 cpu/native/include: other stacksizes based on default 2021-10-25 09:13:21 +02:00
Benjamin Valentin
1a2984b786 cpu/native: fix build with gcc 11
This fixes the following warning with GCC 11.2:

    cpu/native/include/native_internal.h:153:13: error: variably modified ‘__isr_stack’ at file scope
      153 | extern char __isr_stack[SIGSTKSZ];
          |             ^~~~~~~~~~~
    cpu/native/include/native_internal.h:154:13: error: variably modified ‘__end_stack’ at file scope
      154 | extern char __end_stack[SIGSTKSZ];
2021-10-12 14:56:11 +02:00
benpicco
cc3df3ec85
Merge pull request #16822 from benpicco/cpu/native-stdio
cpu/native: make use of stdio_read() / stdio_write()
2021-09-22 20:47:45 +02:00
Benjamin Valentin
13e16fa34f cpu/native: make use of stdio_read() / stdio_write()
On `native` the functions stdio_read() / stdio_write() were not
used.
Those functions are intended for alternative stdio implementations.
As a result, no alternative stdio could be used on `native`.

To fix this, call the functions in `_native_read()` / `_native_write()`
when dealing with stdio fds.
2021-09-22 17:22:30 +02:00
Francisco
0b7eb2bbc9
Merge pull request #16836 from fjmolinas/pr_kconfig_mtd
drivers/mtd: fix Kconfig dependencies
2021-09-22 10:08:14 +02:00
Francisco Molina
14ef09b8b4 drivers/mtd: fix Kconfig dependencies
Currently implementations of the MTD api are selecting the module,
this makes it easy for default backends to be selected. But the
correct modeling is simply selecting the MTD api and then selecting
a backend. BOARDs providing one of the backends can expose this and
then that backend can be selected by default.

There is also currently nothing preventing from using the MTD api
with no backend since a mock backend can easily be provided as is
done in all mtd tests.
2021-09-22 09:22:51 +02:00
Jean Pierre Dudey
ffff68deaf
Merge pull request #16813 from jeandudey/doc1
cpu: fix doxygen grouping warnings
2021-09-13 11:30:27 +02:00
Jean-Pierre De Jesus DIAZ
d1f9cd0647 cpu/native: fix doxygen grouping warnings
Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
2021-09-11 12:45:15 +02:00
Benjamin Valentin
9a6fc85b16 treewide: replace gnrc_netdev_default with netdev_default 2021-09-06 15:43:40 +02:00
Hugues Larrive
f292cfc8ce drivers/periph_spi: remove duplicated includes introduced in #15902 2021-09-02 09:40:31 +02:00
Francisco
a1cbcc9ede
Merge pull request #15902 from maribu/spi-api-change-1
drivers/periph_spi: let spi_acquire return void
2021-09-02 08:50:56 +02:00
Marian Buschsieweke
f04b522601
cpu/periph_spi: update implementations to new API
Make all spi_acquire() implementations return `void` and add assertions to
check for valid parameters, where missing.
2021-09-01 21:38:40 +02:00
Francisco
3db378e015
Merge pull request #11117 from haukepetersen/add_core_irqisen
core: add irq_is_enabled() function to irq interface
2021-08-26 18:41:02 +02:00
Hauke Petersen
d4181b91fa cpu/native: implement irq_is_enabled() 2021-08-25 08:01:05 +02:00
87b49d04ab cpu/native: defer yield when IRQs are disabled.
This makes native behave like Cortex-M, which flags PENDSV, which then
gets triggered once IRQs are re-enabled.
2021-08-24 09:49:40 +02:00
Jan Romann
4384795cb9
treewide: Remove excessive newlines 2021-08-13 19:50:38 +02:00
Jose Alamos
853b3a0918
netdev_tap: avoid explicit cast to netdev 2021-07-09 10:38:34 +02:00
Jose Alamos
686c81caf7
socket_zep: avoid explicit cast to netdev 2021-07-09 10:38:33 +02:00
benpicco
1407559f33
Merge pull request #15773 from benpicco/tools/zep_dispatch-topology
tools/zep_dispatch: add support for advanced topologies
2021-07-07 12:14:43 +02:00
MrKevinWeiss
9917b37c1c cpu/native: Add native mtd kconfig dep 2021-06-18 11:27:33 +02:00
136c630870
cpu/native: make thread size defines overridable 2021-05-07 13:12:01 +02:00
Karl Fessel
15f2d0008a native/rtc: ensure no struct tm extra information is used 2021-04-01 18:19:15 +02:00
Karl Fessel
72213ec99a native/rtc: avoid dealing with DST 2021-04-01 18:19:15 +02:00
Tobias Nießen
8a56692236
cpu/native: rename _get_promiscous/_set_promiscous 2021-03-03 17:50:19 +01:00
Francisco
c91499997e
Merge pull request #16030 from benpicco/drivers/mtd_flashpage-fix_native
drivers/mtd_flashpage: fixes for native (and stm32l0, stm32l4)
2021-02-23 15:12:06 +01:00
Benjamin Valentin
65093a47a3 cpu/native: timer: fix style issue 2021-02-23 09:52:05 +01:00
Benjamin Valentin
7eb159c2a2 cpu/native: timer: implement timer_set_periodic()
The native timer is not free running, so we can't honor it's flags.
But setitimer() already provides an interval option, we only have to enable it.
2021-02-23 09:51:53 +01:00
Benjamin Valentin
934d1c1f7f socket_zep: include HW address with HELLO packet 2021-02-20 20:37:14 +01:00
Benjamin Valentin
99341a3dc4 cpu/native: export send() as real_send() 2021-02-20 20:35:33 +01:00
Martine Lenders
de4ee0f934
Merge pull request #15562 from benpicco/socket_zep_register
socket_zep: register with netdev, provide EUI-64 as command line parameter
2021-02-20 20:32:01 +01:00
Benjamin Valentin
033c0110d0 cpu/native: flashpage: sector-slign the flashpage area 2021-02-18 14:22:11 +01:00
ee9d6c879a cpu/native: add XFA support 2021-02-18 10:46:08 +01:00
Benjamin Valentin
17199dbb1c socket_zep: allow to specify MAC address of ZEP device
Add a command-line parameter for setting the EUI-64 of a ZEP device.
This allows a native node to use a persistent ZEP address across reboots.
2021-02-16 18:57:27 +01:00
Benjamin Valentin
1acbd6e560 cpu/native: add periph/flashpage implementation
Add a simple RAM-backed flashpage implementation for native, to
allow for easier testing of flashpage based applications / features.
2021-02-05 23:31:46 +01:00
Benjamin Valentin
61bce4dc9c socket_zep: get MAC address from EUI provider 2021-01-25 22:59:04 +01:00
Benjamin Valentin
d8918c24fa socket_zep: register with netdev 2021-01-25 22:59:01 +01:00
Benjamin Valentin
ac9cd80aa7 cpu/native: clean up usage output
Remove newlines between block of arguments.
Add a newline at the end.

Makes usage output look tidier.
2021-01-25 22:58:38 +01:00
517fc585b1
cpu/native: Add dummy thread_arch.h header 2021-01-22 09:21:46 +01:00
Daniel Lockau
33afc0ddab cpu/native/rtc: add rtc_set_time implementation 2020-12-15 12:52:35 +01:00
Benjamin Valentin
d7ed3418b5 cpu/native: pm: fix build with pm_layered 2020-12-08 18:24:02 +01:00
1d5e2e9cd9 all: remove traces of kernel_types.h
Automatically removed using:

    $ git grep -l kernel_types | xargs sed -i '/^#include .kernel_types/d'
2020-11-25 17:52:34 +01:00
575189510d
Merge pull request #15465 from maribu/atomic-utils-volatile
sys/atomic_utils: Use volatile qualifier
2020-11-24 22:05:33 +01:00
Marian Buschsieweke
dd48ced151
cpu/*/atomic_utils_arch.h: Add volatile qualifier 2020-11-24 14:00:52 +01:00
Leandro Lanzieri
43cc7beb26
cpu/native: add periph_spidev module to Kconfig 2020-11-18 10:08:01 +01:00
Leandro Lanzieri
2306516d0d
drivers/periph_common: add CPU specific RTC Kconfig 2020-11-18 10:08:00 +01:00
Leandro Lanzieri
c4fda9f4a9
cpu/native/backtrace: add module to Kconfig 2020-11-18 10:08:00 +01:00
Leandro Lanzieri
1d868f2b7b
cpu/native: select needed modules in Kconfig 2020-11-18 10:07:59 +01:00
Leandro Lanzieri
8715f19c26
cpu/native/periph: add Native GPIO modules to Kconfig 2020-11-18 10:07:59 +01:00
Leandro Lanzieri
8df4512960
cpu/native: add default configuration 2020-11-18 10:07:58 +01:00
benpicco
dbba4f9393
Merge pull request #15378 from benpicco/native/mtd_pagewise
native/mtd: implement .write_page()
2020-11-17 10:34:55 +01:00
Martine Lenders
a07d3e0fc9
Merge pull request #14755 from benpicco/examples/gnrc_border_router-native
examples/gnrc_border_route: simplify ZEP setup on native
2020-11-13 18:41:03 +01:00
Benjamin Valentin
90f3c15084 socket_zep: send dummy HELLO packet on connect 2020-11-13 18:10:57 +01:00
Leandro Lanzieri
d4be753df8
cpu/native: remove unused can_linux module
b4f29035ce adapted the can_linux module to
the periph_can interface. This is a cleanup of some things that stayed
behind. Here the makefile is removed, the references to can_linux in the
dependency resolution and configuration Makefile are changed to the
standard periph_can, and the startup code is adapted.
2020-11-13 09:11:50 +01:00
792e031a95
Merge pull request #14331 from maribu/atomic_utils
sys/atomic_utils: Functions for atomic access
2020-11-12 21:44:53 +01:00
Marian Buschsieweke
56a54a773e
cpu/native: Add atomic_utils_arch.h 2020-11-10 10:55:14 +01:00
Benjamin Valentin
5ecfd67a6e native/mtd: implement .write_page() 2020-11-03 22:45:27 +01:00
Bas Stottelaar
94171b7389 cpu/*: replace #if ENABLE_DEBUG with IS_ACTIVE 2020-11-02 21:34:12 +01:00
Marian Buschsieweke
125c892c03
drivers/periph/timer: Use uint32_t for frequency
For all currently supported platforms `unsigned long` is 32 bit in width. But
better use `uint32_t` to be safe.
2020-10-30 22:02:12 +01:00
Benjamin Valentin
3f58672351 cpu/native: make sure help text does not exceed 80 columns 2020-10-29 16:15:42 +01:00
Benjamin Valentin
22ba75e8be socket_zep: don't listen on local address by default
If no local port is specified for socket_zep to listen on, don't listen
on a local port at all instead of listening on a default port.

This does not work with multiple instances of socket_zep anyway.
2020-10-29 12:46:10 +01:00
Bas Stottelaar
22243aec7a cpu/*: realign ENABLE_DEBUG 2020-10-23 00:46:26 +02:00
Bas Stottelaar
fb61443bbd cpu/*: remove unused assert.h include 2020-10-22 11:13:09 +02:00
Bas Stottelaar
ab6188cea3 cpu/*: add missing include of assert.h 2020-10-22 11:13:08 +02:00
avinash
7d21cb9bb8 cpu/native: fix memory leak
In make_message API in syscall.c, memory should be freed before returning
Fixes issue: #15016

Signed-off-by: avinash <avitahakiknash@gmail.com>
2020-10-21 03:16:25 -07:00
Karl Fessel
dbeda8ec1f cpu/native: move socket_can include to Makefile.include 2020-10-05 18:27:58 +02:00
Karl Fessel
9a89b84c2c Makefile.dep: sort dependencies
move most dependencies from <RIOTBASE>/Makefile.dep to the Makefile.dep where
dependant module resides
2020-10-05 18:27:58 +02:00
81a0566c12
cpu/native: fix typo 'funtion' -> 'function' 2020-10-02 07:57:27 +02:00
Francisco
b5c51d244e
Merge pull request #14909 from OTAkeys/pr/conn_can_clean_up
can: add proper checks for ifnum validity
2020-10-01 09:22:28 +02:00
Vincent Dupont
b4f29035ce native/can: fix CAN init
Native CAN device was not properly ported to periph_can interface.
This commit fixes this by renaming all needed structures and files so
auto_init_can can initialize the native device. FEATURES_PROVIDED is
also updated for native.
2020-09-30 12:59:03 +02:00
Marian Buschsieweke
e66d5fad31
cpu/native: Add architecture_arch.h 2020-09-29 12:34:00 +02:00
MrKevinWeiss
7893158b5a drivers/dev_enums: Remove unused dev_enums.h 2020-09-24 09:27:39 +02:00
MrKevinWeiss
d95452b979 cpu/native: Remove unused TIMER_0_EN 2020-09-22 16:26:01 +02:00
Cenk Gündoğan
0d0bc91553
Merge pull request #14754 from leandrolanzieri/pr/no_archives
build system: link object files
2020-09-10 09:36:29 +02:00
Leandro Lanzieri
24d2578606
cpu/native: pull xtimer when RTC is used 2020-09-09 16:59:18 +02:00
Leandro Lanzieri
81cb769cad
makefiles: avoid building archives when compiling 2020-09-04 15:01:10 +02:00
benpicco
029ae8c7d2
Merge pull request #14766 from benpicco/cpu/native-rtc_set_alarm
cpu/native: RTC: implement rtc_set_alarm()
2020-08-28 17:39:47 +02:00
Martine Lenders
3d457b76cc
Merge pull request #14757 from benpicco/socket_zep_reboot
socket_zep: fix reboot
2020-08-26 19:41:16 +02:00
Benjamin Valentin
a41817bebd socket_zep: fix reboot
The `_zep_params_setup()` function will modify the `argv` string passed to it.
This is a problem because that string is re-used on reboot.

The modified string is then later processed in `socket_zep_setup()`, so we have to keep
the memory around.

The `strdup()` fulfills all this and the memory is freed by `execve()` on reboot.
A proper solution would be to parse the strings in `_zep_params_setup()`.
2020-08-26 15:38:03 +02:00
Benjamin Valentin
d2e0af2941 cpu/native: gpio: provide dummy implementations for GPIO IRQ 2020-08-25 13:53:14 +02:00
Benjamin Valentin
39b41d62cd cpu/native: allow to disable native periph implementations 2020-08-25 13:53:14 +02:00
Frank Hessel
4275b36cdb cpu/native: Adapt HW SPI for HW GPIO support 2020-08-25 13:53:14 +02:00
Benjamin Valentin
ea25e8580c cpu/native: add Linux GPIO implementation 2020-08-25 13:53:14 +02:00
Marian Buschsieweke
b657ebc39a
cpu/native: Don't access sched_active_*
Replaced accesses to sched_active_* with API calls in C files
2020-08-17 12:16:08 +02:00
Benjamin Valentin
bdc43c245c cpu/native: RTC: implement rtc_set_alarm()
Use xtimer to simulate an RTC timer.
This allows to simulate software that makes use of `rtc_set_alarm()`
on native.
2020-08-16 23:28:30 +02:00
Benjamin Valentin
bd2e6c30e6 cpu/native/async_read: close fds on cleanup
This was lost when moving to poll().
We need to close the fds on cleanup.

fixes #14636
2020-07-28 14:47:59 +02:00
Marian Buschsieweke
7d4911e3ad
cpu/native/Kconfig: Select HAS_LIBSTDCPP 2020-07-23 20:34:20 +02:00
benpicco
f3bce19646
Merge pull request #14503 from maribu/cpp-feature
build system: Add libstdcpp feature and doc
2020-07-23 19:05:10 +02:00
47e2885f80 cpu/native: async_read: add native_async_read_add_int_handler()
fcntl(fd, F_SETOWN, getpid()); doesn't seem to work on Linux
to get generate a signal when an event on the GPIO fd occurs.

So fall back to the same method as on OS X and call poll() in
a child process.
2020-07-21 11:50:18 +02:00
a274ea45fc cpu/native: async_read: rewrite select() call to poll()
select() can not listen to POLLPRI events which are used by the
Kernel's GPIO API.

In preparation for that, rewrite async_read() to use poll() instead
of select().
2020-07-21 11:50:18 +02:00
Leandro Lanzieri
64970ab131
cpu/native: Add Kconfig symbols 2020-07-16 13:53:45 +02:00
Marian Buschsieweke
0ed7ead587
cpu/native: Workaround for libstdcpp for FreeBSD
On FreeBSD, libstdc++ is known to not work with -m32. Thus, we don't provide
it feature libstdcpp there.
2020-07-15 20:29:02 +02:00
Marian Buschsieweke
cf482c5d46
build system: Add libstdcpp feature and doc
- Add libstdcpp feature to indicate a platform is providing a libstdc++
  implementation ready for use
- The existing cpp feature now only indicates a working C++ toolchain without
  libstdc++. (E.g. still useful for the Arduino compatibility layer.)
- Added libstdcpp as required feature were needed
- Added some documentation on C++ on RIOT
2020-07-15 11:45:22 +02:00
Akshai M
5523d119b6 gnrc/pktbuf : Move 'GNRC_PKTBUF_SIZE' to 'CONFIG_' 2020-06-11 14:46:36 +05:30
49375e1e10 cpu/native: rename trace -> backtrace 2020-06-04 14:37:01 +02:00
Leandro Lanzieri
9f41acaac6
cpu/native: Move dependencies to Makefile.dep 2020-05-20 18:24:39 +02:00
fabian18
a3a1c160ee mtd: Change API to return 0 on success
Returning the number of bytes written/read could return a negative integer
because a uint32_t is expected for the length in read()/write() operations.
2020-05-06 20:24:27 +02:00
5a9f01d91a
native: pass eeprom file path via command line 2020-04-29 08:56:33 +02:00
cbdda3c990
cpu/native: read/persist EEPROM data at startup/reboot/exit 2020-04-29 08:55:10 +02:00
4e1d7abddc
cpu/native: implement eeprom peripheral driver
The driver simply manages an internal buffer in memory that can be filled/dumped from/to a file
2020-04-29 08:55:08 +02:00
Martine Lenders
55a7010a0a
Merge pull request #13157 from nmeum/pr/fuzzing_tcp_only
Add AFL-based fuzzing setup for network modules
2020-04-18 10:54:14 +02:00
Jose Alamos
77325b4cde ieee802154: add CONFIG_ prefix to config macros 2020-04-08 19:08:25 +02:00
Sören Tempel
d7104e4992 makefiles/toolchain: add support for afl 2020-04-07 14:24:10 +02:00
0bb3304df3
native: don't export NATIVEINCLUDES 2020-03-26 10:25:49 +01:00
Jose Alamos
3ad574a822 drivers/netdev: use netdev_trigger_event_isr function 2020-03-06 14:03:43 +01:00
Wouter Symons
d477b5bc24 cpu/native/can/candev_linux: add check for real can when setting bittimings in init 2020-02-21 09:36:19 +01:00
Sebastian Meiling
32f1178ff0 native: fix c11_atomic sizes on FreeBSD
There is size difference for atomic_int_fast8 and atomiic_uint_fast8
on FreeBSD, i.e., they match uint32_t with size of 4 bytes instead of
uint8_t with size of 8. Hence, tests/c11_atomics_cpp_compat buildtest
fails on FreeBSD.
2020-01-23 13:23:02 +01:00
Sören Tempel
5ef5ab7e4b Add CPU feature for stack smash protections 2020-01-22 15:59:02 +01:00
Martine Lenders
7430ea98ed
Merge pull request #13096 from nmeum/pr/fix_asan_target
boards/native: fix all-asan Makefile target
2020-01-14 13:43:22 +01:00
Sören Tempel
e2b8231796 boards/native: fix crash with all-asan
Without this change a RIOT application compiled with all-asan will
segfault as RIOT provides its own malloc by default. Add a define for
disabling custom malloc, calloc and realloc implementations and use it
when compiling with all-asan.
2020-01-12 16:17:48 +01:00
Hyungsin
6eed5b9d43 remove XTIMER_OVERHEAD 2020-01-10 13:22:11 -08:00
Francisco
f6f4469542
Merge pull request #11889 from miri64/tapsetup/enh/sudo
tapsetup: require to be executed with sudo
2020-01-04 10:43:06 +01:00
Martine S. Lenders
bacef29086 native: adapt doc on tapsetup for new sudo requirement 2020-01-03 21:00:54 +01:00
Martine S. Lenders
0957b6301b
stdio_native: initial import 2019-12-18 14:15:40 +01:00
Sebastian Meiling
912f003a35
Merge pull request #12864 from smlng/pr_freebsd_zep
cpu/native: add missing header in socket zep
2019-12-03 17:47:27 +01:00
Sebastian Meiling
6dd7d6010f cpu/native: add missing header in socket zep
Building e.g. gnrc_border_router example on FreeBSD fails due to
missing defines related to sockets. This adds the missing header
<sys/socket.h> to fix compiling.
2019-12-03 15:34:25 +01:00
Martine Lenders
2f74d9d644
Merge pull request #12517 from miri64/native/enh/reset-command
native: allow for native to be resetable via SIGUSR1
2019-12-03 10:56:11 +01:00
Martine Lenders
fa317910d0
native: allow for native to be resetable via SIGUSR1 2019-12-03 09:51:52 +01:00
31b027124b cpu/native: fix typos 2019-11-23 22:39:36 +01:00
Francois Berder
4a31f94cfc many typo fixes
Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com>
2019-11-23 22:39:07 +01:00
Francisco Molina
97dda76e7a cpu/native/irq_cpu.c: fix cpp.check unitialized variable 2019-11-21 11:58:07 +01:00
MrKevinWeiss
5c085d711d cpu/native: Suppress cpu specific spi_clk_t in doxygen 2019-11-18 11:44:13 +01:00
Benjamin Valentin
0ea2cbf1eb boards: remove RTT_NUMOF/RTC_NUMOF
Those macros are defined but never used.
2019-11-08 14:20:33 +01:00
Marian Buschsieweke
314184adb5
cpu: Platform specific C11 atomics compat headers
Added headers to define platform specific sizes and types for the C11 atomics
compatibility module for C++.
2019-10-24 23:08:36 +02:00
Francisco Molina
45c8eafd42 Makefile.include: remove repeated OS declaration 2019-10-18 10:36:43 +02:00
Francisco Molina
f3482de277 REMOVEME: add OS and OS_ARCH variable 2019-10-18 08:46:51 +02:00
Frank Hessel
51194b9c0d
cpu/native: Implement hardware SPI access (Linux) 2019-10-16 14:32:53 +02:00
ebf43616b7 cpu: add arch_* features 2019-10-13 21:03:41 +02:00
Sebastian Meiling
935bb51e14 cpu/native: adapt timer to return 0 on success
Adapt periph/timer implementation of native based MCUs
to return 0 on success for all functions.
2019-09-11 13:51:02 +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
smlng
2de4b3011b periph_common: add as dependency to periph drivers
Rational: the periph_common module is required by (most) other periph drivers
and also during startup of the CPU/MCU to run periph_init. The latter is only
required if other periph drivers are used, hence periph_common should be a
depency of periph_* modules and *not* of the CPU/MCU. This PR fixes that
by making periph_common a depency of periph_* and removing the explicit
include in the CPU/MCU implementation.
2019-06-03 13:44:10 +02:00
Gilles DOFFE
90f819eee2 cpu/native: return 0 if GPIO is an output in gpio_init
If the GPIO is in an output state, gpio_init() can return 0 without bad
consequences.
-1 was return until now.

Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
2019-03-11 01:44:22 +01:00
Gilles DOFFE
dc8a44ce14 cpu/native: correct emails in header
Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
2019-03-11 01:44:22 +01:00
Gilles DOFFE
1da6a03f09 cpu/native: add pwm implementation
Simulate PWM signals with a 2 dimensions array.

Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
2019-03-11 01:44:22 +01:00
aa90f93de3
Merge pull request #10891 from kaspar030/fix_native_thread_yield_higher
cpu/native: fix race in thread_yield_higher()
2019-02-01 16:10:54 +01:00
smlng
6183d5f5c5 netdev: remove layer2 netstats from netdev drivers
Removing usage of netdev->stats in all net drivers, as it is
handled by gnrc_netif.
2019-02-01 11:25:27 +02:00
62bb4cc526 cpu/native: fix race condition in thread_yield_higher()
Error case:
1. thread_yield_higher() stores the thread's ucontext
2. creates an "isr ucontext" for isr_thread_yield, switches to it

Case 1: no signals are pending, continues in isr_thread_yield()
3a. sched_run is called
4a. return to sched_active_thread ucontext

Case 2: signals pending (the crashing scenario), continues in native_irq_handler()
3b. handles signals
4b. if sched_context_switch_request is set, call sched_run
5b. return to sched_active_thread ucontext

4b misses the call to sched_run(), leading to a possible return into a
non-ready thread.
2019-01-28 17:12:01 +01:00
Martine Lenders
83bc4b162f socket_zep: fix undefined timestamp conversion behavior 2019-01-24 14:05:31 +01:00
Gunar Schorcht
c5e9f12243 doc: fix undocumented func in socket_zep_params.h 2019-01-18 07:18:06 +01:00