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

763 Commits

Author SHA1 Message Date
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
Martine Lenders
d34bf526c1
Merge pull request #10783 from kaspar030/fix_native_timer
cpu/native/periph/timer: fix type conversion
2019-01-17 11:11:01 +01:00
f5345fbd38 cpu/native/periph/timer: fix undefined behaviour 2019-01-16 15:16:54 +01:00
Kees Bakker
2d04cdfb89 cpu/native: do normal assignment instead of memcpy 2019-01-10 19:43:43 +01:00
7ed3f80989
zep: Remove PAN ID initialization from reset 2018-11-28 11:31:02 +01:00
Semjon Kerner
5b0152f4f7 drivers/netdev_ieee802154: drop NETOPT_MAX_PKT_SIZE 2018-10-16 13:28:03 +02:00
Joakim Nohlgård
4a5ef1d2f6 native/netdev_tap: Rename variable to fix Wshadow warning 2018-09-28 09:57:30 +02:00
Hauke Petersen
a965532d07 cpu/native/gpio: remove empty gpio irq func stubs 2018-09-20 14:51:19 +02:00
c0fdce22b3
netdev_tap: declare netdev_driver struct as const 2018-08-23 17:31:45 +02:00
Martine Lenders
c0a7da3068 native: Mark llvm and gnu as supported toolchains 2018-08-16 16:41:58 +02:00
Martine Lenders
ad133da209 native: ignore -Wformat-nonliteral for formatting syscalls
The point of that call is to wrap the actual host system's formatting
functions, so the non-literal formatting string is alright here.
2018-08-01 09:03:01 +02:00
608f0135d7
zep: Use netdev reset function 2018-07-16 15:36:34 +02:00
4133908fe0 cpu/native: fix doxygen grouping 2018-06-11 19:12:02 +02:00
Simon Brummer
323a38819a native: Enforce safe strncpy usage in tap device setup 2018-06-10 17:16:46 +02:00
Joakim Nohlgård
2d88cfca15 native: Define PROVIDES_PM_SET_LOWEST 2018-05-15 10:58:05 +02:00
Gaëtan Harter
40c28d78c0 Revert "native: remove non required NATIVEINCLUDES"
This reverts commit 93a521c501.
2018-04-12 17:48:07 +02:00
Martine Lenders
f52b17022e netdev_tap: fix return value of set option function 2018-04-10 15:12:15 +02:00
Martine Lenders
690c36b3cf
Merge pull request #8652 from cladmi/pr/remove_nativeincludes
native: remove non required NATIVEINCLUDES
2018-03-22 15:57:38 +00:00
Gaëtan Harter
93a521c501 native: remove non required NATIVEINCLUDES
Some modules used a 'NATIVEINCLUDES' with different include path and no other
included directories.
It was defining basic 'include' in a different order and not using other things
defined in INCLUDES.
After doing some checks with the given include path and possible conflicting
files, there should be no conflict when using the default one.

* No common headers between all the NATIVEINCLUDES directories
* No common headers files between board/native/include, cpu/native/include and
  other files in the repository (except other boards/cpus of course).
2018-03-20 17:51:03 +01:00
Martine Lenders
875a5c165d trace: initial import of a stack backtrace function for native
Sometimes the debugger just isn't fast enough to debug that pesky race
conditions. This module provides at least a little help.
2018-03-20 15:12:48 +00:00
Bas Stottelaar
a05d1b1004 cpu/board: native: use common peripheral initialization 2018-03-15 23:26:01 +01:00
23b414b732 drivers: net: adapt to iolist-using netdev 2018-03-06 14:00:31 +01:00
ff6b8aa4f1 cpu/native/netdev_tap: adapt to netdev with iolist 2018-03-06 14:00:31 +01:00
Hauke Petersen
4fd16b0bcc cpu/native: add empty uart/power_x functions 2018-03-02 10:54:21 +01:00
c450cdebeb
Merge pull request #8482 from cogip/qdec
drivers: Initial import of low-level QDEC driver interface
2018-02-26 17:44:58 +01:00
MichelRottleuthner
bad08596f6
Merge pull request #8399 from OTAkeys/fix/mtd_native_write
mtd_native: fix overlapping pages write check
2018-02-26 15:38:46 +01:00
Vincent Dupont
f04ecee9f6 mtd_native: fix overlapping pages write check 2018-02-26 15:32:06 +01:00
Gilles DOFFE
07158755ea cpu/native: add qdec implementation
* Add support for the native encoder interface
* Native QDEC is there mostly for simulation
* Calling code will have to simulate QDEC increment/decrement

Signed-off-by: Gilles DOFFE <g.doffe@gmail.com>
2018-02-23 23:16:42 +01:00
smlng
15a7e6bb98 cpu/native: reduce scope of CFLAGS for OSX compatibility 2018-02-09 17:44:41 +01:00
7847a91e12 cpu: instead of cpp-style, use C-style comments 2018-02-06 16:59:58 +01:00
Martine Lenders
c982cc81ed
Merge pull request #8278 from smlng/cpu/native/replace_timex
cpu, native: replace timex_t in syscalls
2018-02-01 12:55:29 +01:00
4fe2490bc5 cpu/native/socket_zep: add ref to net_zep doxygen group 2018-01-24 21:41:31 +01:00
smlng
f63f3b2a4b cpu, native: replace timex_t in syscalls 2018-01-23 14:35:24 +01:00
f4d687502e cpu/native/socket_zep: fix doxygen grouping 2018-01-23 09:02:00 +01:00
smlng
5c38e1a56f socket_zep: remove unnecessary include 2018-01-22 15:28:19 +01:00
Sebastian Meiling
5c0b058db4
Merge pull request #6121 from miri64/native/feat/zep_socket
native: provide socket-based ZEP device
2018-01-18 10:03:08 +01:00
Martine Lenders
81ef15287a native: provide socket-based ZEP device 2018-01-18 09:15:37 +01:00
c398b74ae0 cpu: native: uart: adapt to changed DEBUG 2018-01-15 14:37:04 +01:00
MichelRottleuthner
ee17dae5af pkg/fatfs: add vfs integration 2018-01-09 14:46:40 +01:00
86665b71bf cpu: adapt to COREIF_NG removal 2017-11-16 14:40:16 +01:00
565eb9cf63 cpu: native: always select periph_uart 2017-11-06 12:01:19 +01:00
a20745b6c5 cpu: make use of Makefile.periph 2017-11-06 12:01:19 +01:00
f0a532932c cpu: native: reorganize Makefile.features 2017-11-02 12:59:46 +01:00
Hauke Petersen
5920d99752 pm: fix weak-based default implementations
Instead of using `weak` function definitions, this PR handles
default implementations using `PROVIDES_x` defines, allowing
for cpus/pm realted modules to use their own implementations.
2017-10-16 14:27:35 +02:00
Martine Lenders
2097f6810f Merge pull request #7647 from LudwigKnuepfer/pr/native-startup-switchcase
cpu/native: add missing breaks in option parser
2017-09-26 10:27:51 +02:00
Ludwig Knüpfer
9f3abcd372 cpu/native: add missing breaks in option parser 2017-09-26 09:41:21 +02:00
035d266d49 makefile: indentation cleanup 2017-09-22 12:00:47 +02:00
Joakim Nohlgård
065bc62e0a netdev: Make set() value parameter const void * 2017-08-25 13:41:19 +02:00
Francisco Acosta
f2efd88f98 Merge pull request #7129 from haukepetersen/opt_periph_sharetimerset
cpu: add and use shared code for timer_set()
2017-08-01 15:09:48 +02:00
268c6b647e drivers/can: fix doxygen documentation + typo 2017-07-03 20:43:51 +02:00
067231936f Merge pull request #5793 from OTAkeys/pr/can_stack
can: add a CAN stack for RIOT
2017-06-26 16:02:35 +02:00
smlng
692cf96297 doc: fix doxygen grouping of cpu periph drivers 2017-06-26 14:42:11 +02:00
Vincent Dupont
68f1ea8fd0 native: add a CAN device using socketCAN 2017-06-19 15:36:20 +02:00
Hauke Petersen
a1499f4190 cpu: add and use shared code for timer_set() 2017-06-02 12:21:56 +02:00
Cenk Gündoğan
044fac8d17 native: add break to satisfy compiler gcc-7.1.1
Building any application with gcc 7.1.1 fails with the following error:

```
~/RIOT % make -C examples/hello-world
make: Entering directory 'RIOT/examples/hello-world'
Building application "hello-world" for "native" with MCU "native".

"make" -C RIOT/boards/native
"make" -C RIOT/boards/native/drivers
"make" -C RIOT/core
"make" -C RIOT/cpu/native
RIOT/cpu/native/startup.c: In function ‘startup’:
RIOT/cpu/native/startup.c:292:17: error: this statement may fall through [-Werror=implicit-fallthrough=]
       usage_exit(EXIT_SUCCESS);
       ^~~~~~~~~~~~~~~~~~~~~~~~
RIOT/cpu/native/startup.c:293:13: note: here
   case 'i':
   ^~~~
cc1: all warnings being treated as errors
make[2]: *** [RIOT/Makefile.base:81: RIOT/examples/hello-world/bin/native/cpu/startup.o] Error 1
make[1]: *** [RIOT/Makefile.base:20: ALL--RIOT/cpu/native] Error 2
make: *** [RIOT/examples/hello-world/../../Makefile.include:297: all] Error 2
make: Leaving directory 'RIOT/examples/hello-world'
```

```
% gcc --version
gcc (GCC) 7.1.1 20170528
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```

fixed by adding a `break` statement after `usage_exit()`
2017-05-30 13:56:17 +02:00
0fcc7d3834 cleanup: apply headerguard script output 2017-05-24 17:54:02 +02:00
Hauke Petersen
31dfe382a3 net/gnrc/eth: enable filtering of L2 addresses 2017-05-18 15:24:25 +02:00
cfd10c394a adapt to changed byteorder.h 2017-04-13 11:35:35 +02:00
Joakim Nohlgård
ad01950b97 native: Finish iterating constructor calls before moving on to native_cpu_init 2017-04-09 17:22:17 +02:00
Martine Lenders
6a6b9e8f16 doc: fix grouping of mtd_native 2017-03-31 13:38:01 +02:00
Joakim Nohlgård
d1ea50a600 mtd: Redefine MTD_0 as a mtd_dev_t * 2017-03-28 17:00:39 +02:00
Martine Lenders
25b2e65b77 cpu: native: make syscalls vfs ready (introduce real_fcntl) 2017-03-22 20:18:57 +01:00
Vincent Dupont
1b2b5d9df9 Merge pull request #5624 from OTAkeys/pr/mtdi_flash
mtd: add a generic low level flash interface
2017-03-17 17:18:13 +01:00
Vincent Dupont
9e8cb3d135 native: add mtd-compliant flash emulation 2017-03-16 11:24:22 +01:00
Martine Lenders
29842bb5e4 netdev2: rename to netdev and remove gnrc_netdev
With some minor hand-edits I used the following chain of commands:

```sh
git rm sys/include/net/gnrc/netdev.h
git grep --name-only -i netdev2 | \
        xargs sed -i -e 's/^\(NETDEV\)2\(.*\)\( [("]\)/\1\2 \3/g' \
                     -e 's/\(netdev\)2\(.*\)\( \/\*\*<\)/\1\2 \3/I' \
                     -e 's/\(netdev\)2/\1/gI'
git add -p
git commit --amend
git ls-tree --full-tree -r HEAD --name-only | \
        grep "netdev2" | xargs -I'{}' dirname '{}' | uniq | \
        grep "netdev2" | while read dir; do
                new_dir="$(echo "$dir" | sed "s/netdev2/netdev/g")"
                git mv -f "$dir" "$new_dir"
        done
git commit --amend
git ls-tree --full-tree -r HEAD --name-only | \
        grep "netdev2" | while read file; do
                new_file="$(echo "$file" | sed "s/netdev2/netdev/g")"
                git mv -f "$file" "$new_file"
        done
git commit --amend
git grep --name-only "\<drivers_netdev_netdev\>" | \
        xargs sed -i "s/\<drivers_netdev_netdev\>/drivers_netdev_api/g"
git add -p
git commit --amend
```
2017-03-15 09:31:20 +01:00
26b99a57be cpu: native: add vfs wrappers 2017-03-07 17:59:59 +01:00
2d92661b76 cpu: native: fix thread_yield_higher inisr() case 2017-02-27 16:10:12 +01:00
Hauke Petersen
2f9e3c89e1 periph/hwrng: use void* buf for hwrng_read() 2017-02-07 13:20:39 +01:00
3e49d0c8c6 Merge pull request #6434 from aabadie/petersen_typo
cpu: fix typo in author email
2017-01-20 10:43:24 +01:00
245f60edfa cpu: fix typo in author email 2017-01-19 21:45:23 +01:00
Oleg Hahm
7ee7801c10 *: remove trailing underscores from header guards 2017-01-19 18:30:53 +01:00
Martine Lenders
1f6f02e196 cpu/native: adapt start-up and auto-init for multiple netdev2_tap 2017-01-19 12:07:10 +01:00
Toon Stegen
37c4810fba cpu/native: allow multiple netdev2 tap devices
With arg added to async_read callback in 7020b7c0, we don't need to keep
track of netdev2_tap locally. As a result we can use multiple
netdev2_tap instances.
2017-01-18 23:03:44 +01:00
Hauke Petersen
a35709b4f8 Merge pull request #6360 from OlegHahm/periph_timer_remove_irq
periph timer: remove timer_irq_(en|dis)able
2017-01-18 22:58:21 +01:00
Oleg Hahm
7c04f05d29 Merge pull request #6337 from miri64/native/enh/pretty-startup
native: prettify argument parsing
2017-01-18 22:56:12 +01:00
Oleg Hahm
bfc439aa04 doc: native: do not parse internal functions 2017-01-15 13:06:43 +01:00
Oleg Hahm
d0316fa7ae periph timer: remove timer_irq_(en|dis)able 2017-01-14 15:34:53 +01:00
Martine Lenders
e9d13d73bc native: prettify argument parsing 2017-01-12 23:40:17 +01:00
Martine Lenders
72a3e7e6e1 Merge pull request #6174 from cgundogan/pr/netdev2_tap/assert_to_if
netdev2_tap: assert address len >= ETHERNET_ADDR_LEN
2017-01-12 22:28:56 +01:00
Cenk Gündoğan
aaf012ad83 netdev2_tap: assert address len >= ETHERNET_ADDR_LEN 2017-01-12 18:14:14 +01:00
4291c1f839 native: support add periph/pm support 2017-01-12 11:24:15 +01:00
0194091673 remove obsolete lpm code 2017-01-12 11:24:15 +01:00
Cenk Gündoğan
0b85959efc Revert "netdev2_tap: return actual byte number on read request"
This reverts commit 613bceeae3.

FIONREAD seems to be unsupported for tun/tap interfaces in Linux.
2016-12-14 14:17:14 +01:00
Peter Kietzmann
e547ff1d60 Merge pull request #6013 from haukepetersen/opt_periph_uartreturntypes
periph/uart: added names to return values
2016-11-29 19:14:09 +01:00
Martine Lenders
613bceeae3 netdev2_tap: return actual byte number on read request 2016-11-16 23:57:04 +01:00
smlng
e9aba880cd native: fix netdev2_tap for macOS 2016-11-16 18:50:49 +01:00
smlng
e867d83eff cbor: fix redefined macro error on macOS 2016-11-10 16:16:06 +01:00
Hauke Petersen
2eebf36eb2 cpu/uart: make use of named return values 2016-10-28 10:32:00 +02:00
Ludwig Ortmann
0b72be7c87 native: add syscall-leave trampoline 2016-10-15 07:50:44 +02:00
Ludwig Ortmann
237340b3e3 native: add thread_yield_higher misuse warning 2016-10-15 07:50:44 +02:00
Ludwig Ortmann
83886d61c7 native: start with interrupts disabled 2016-10-15 07:50:44 +02:00
Ludwig Ortmann
3b6d0595ef native: indicate interrupt status in ISR context 2016-10-15 07:50:44 +02:00
Ludwig Ortmann
535eda8805 native: improve comments, coding style 2016-10-15 07:40:49 +02:00
Oleg Hahm
b428979a1d debug: add missing line breaks 2016-09-27 23:38:41 +02:00
Martine Lenders
16cae9771f Merge pull request #5613 from OTAkeys/pr/async_read_cb_args
cpu/native: add args to async_read callback
2016-08-05 14:17:18 +02:00
Martine Lenders
bd2429f299 cpu: drivers: adapt devices for netdev2 parameter type change 2016-08-03 12:30:51 +02:00
Ludwig Knüpfer
05d4b2f8fa cpu/native: fix thread_stack_init
The pointer arithmetic for the calculation of the context storage was off
due to the change of the stack's pointer type from unsigned int to char.
Fix offset calculation by not adjusting for unsigned int width anymore.
2016-07-26 20:07:08 +02:00
Ludwig Knüpfer
d639f0b9a3 cpu/native: rewrite cpu_print_last_instruction
circumvent assembly by using a GCC/LLVM builtin
2016-07-26 12:44:43 +02:00
Joakim Nohlgård
b02e0eca47 ps: Add current stack pointer and start of stack to isr_stack ps output (DEVELHELP) 2016-07-12 10:17:49 +02:00
Toon Stegen
7020b7c09c cpu/native: add args to async_read callback
this makes it possible to pass some generic pointer that's given back as
an argument when the callback is called.
2016-07-07 17:40:13 +02:00
zhuoshuguo
efbbca1322 cpu: Fix header include guards 2016-06-20 10:18:59 +02:00
Iván Briano
6846b4ebdd cpu: native: Add [v]fprintf to syscalls
External packages that may use fprintf(stderr, ...) for logging will
link directly to the libc version of it, and for some reason that
results in the application crashing.
2016-06-03 16:05:14 -03:00
Martine Lenders
35077bb224 Merge pull request #4871 from kaspar030/remove_netdev2_isr_arg
drivers: netdev2: remove netdev2 event_callback isr_arg
2016-06-02 13:30:30 +02:00
d7b17684e4 drivers: net: adapt to removed event_callback argument 2016-06-02 11:11:40 +02:00
MohmadAyman
53df3e8b57 core: cpu: provide function to acquire ISR stack usage 2016-06-01 23:01:35 +02:00
MohmadAyman
720136491a cpu: unify naming of ISR stacksize macro 2016-06-01 22:47:34 +02:00
Yonezawa-T2
3c16e8426f native: add timeout for select. Fixes #5442 2016-06-01 12:31:19 +09:00
Martine Lenders
c24e91d4df Merge pull request #5229 from OlegHahm/pktbuf_minimal_check
netdev ethernet: deal with too small packet buffer
2016-04-20 14:44:30 +02:00
Oleg Hahm
3f1c2e1f1b native: assert that the pktbuf is big enough
Rationale: the netdev2_tap Ethernet driver for native requires to temporarily store at least a maximum sized Ethernet frame.
2016-04-20 09:10:55 +02:00
334481559d cpu: native: make netdev2_tap internal functions static 2016-04-11 17:03:28 +02:00
Oleg Hahm
900528b2f2 netdev2_tap: check for existence before calling cb 2016-04-03 18:04:03 +02:00
Yonezawa-T2
c4bc42419b netdev2_tap: continue reading even if no spaces left in pktbuf
On OS X, `netdev2_tap` suspends monitoring file descriptor until `_recv` is
called. If no spaces in left in pktbuf, `gnrc_netdev2_eth` does not call `_recv`
that results in deadlock.

With this commit, `gnrc_netdev2_eth` calls `_recv` with NULL buffer and non-zero
length parameter, that indicates the driver to drop frame and resume working.
2016-03-31 16:59:12 +09:00
Yonezawa-T2
79d33897cb native: add UART driver based on /dev/tty
uart0 functionality is removed by #3164. This patch implements periph/uart,
rather than deprecated uart0, using /dev/tty.
To use with netdev2_tap simultaneously, this patch adds asynchronus read system
and modifies netdev2_tap to use it.

A TTY device is specified on command line with -c (COM) option, since -t was
used by the old implementation.

This patch also implements empty GPIO driver needed by the xbee driver.
2016-03-31 16:59:12 +09:00
Oleg Hahm
1f4d73dde1 Merge pull request #4801 from OlegHahm/netstats
netstats: introduce L2 netstats
2016-03-30 14:42:49 +02:00
Oleg Hahm
021e94ee6a netdev2: introduce linklayer netstats 2016-03-29 22:34:09 +02:00
Yonezawa-T2
1ce140d910 debug: fix compilation error for %p formatter 2016-03-29 11:46:29 +09:00
Oleg Hahm
59674a679b netdev2: use params parameter for setup 2016-03-28 20:22:20 +02:00
Oleg Hahm
26b3263f8a netdev2: moved ethernet header into subdir 2016-03-25 15:10:07 +01:00
Cenk Gündoğan
30217f8a7b Merge pull request #5040 from kYc0o/rid_of_vtimer
sys/compat/vtimer: get rid of
2016-03-25 14:35:35 +01:00
Oleg Hahm
9370e49375 Merge pull request #5142 from Yonezawa-T2/native_rename_enable_irq
native: fix build on OS X
2016-03-25 14:17:27 +01:00
kYc0o
f92b025b85 vtimer: get rid of 2016-03-24 17:10:54 +01:00
Oleg Hahm
10f5f1aa33 make: introduce netif_default pseudomodule
Additionally the dependencies for GNRC specific modules are centralized in Makefile.dep.
2016-03-24 16:47:30 +01:00
Yonezawa-T2
56be13d5da native: fix build on OS X 2016-03-23 12:23:32 +09:00
DipSwitch
0bb4748a94 core: Fix/refactor function naming in core/incude/irq.h 2016-03-20 16:47:34 +01:00
Martine Lenders
c6bad1ce07 Merge pull request #5056 from Yonezawa-T2/os_x_thread_t
native: workaround for thread_t name collision
2016-03-16 12:51:05 +01:00
Joakim Nohlgård
405811da2b native: remove unused XTIMER_USLEEP_UNTIL_OVERHEAD 2016-03-14 08:26:44 +01:00
Yonezawa-T2
6d4abb96dc native: workaround for thread_t name collision 2016-03-14 14:23:38 +09:00
Oleg Hahm
8e6dc1a03f doc: updated and clarified tapsetup usage 2016-03-10 17:40:22 +01:00
Cenk Gündoğan
d15bc43302 Merge pull request #4688 from OlegHahm/valgrind_debug_for_native
native: add debug-valgrind target
2016-03-04 07:55:45 +01:00
Oleg Hahm
2b949fcce1 native: add debug-valgrind target
debug-valgrind-server: Starts valgrind as gdb-server (vgdb)
debug-valgrind:        Connects to vgdb
2016-03-03 11:26:17 +01:00
Peter Kietzmann
c8829a49b8 Merge pull request #4838 from haukepetersen/fix_periph_timerarg
drivers/timer: added callback argument
2016-03-01 08:55:54 +01:00
Hauke Petersen
b11a3ad74b cpus: adapted timer implementations to API changes 2016-02-29 14:45:00 +01:00
9082273746 core: header cleanup 2016-02-28 22:46:28 +01:00
Martine Lenders
8db42427cb native/drivers/sys: adapt ethernet netdev2 for info struct 2016-02-22 12:37:26 +01:00
60122cca82 cpu: native: netdev2_tap: don't pass isr_arg on rx complete event 2016-02-21 21:55:33 +01:00
Martine Lenders
eb4d9859a3 netdev2_tap: fix strange event_callback argument 2016-02-20 15:55:35 +01:00
Joakim Nohlgård
e2f7ac78f0 Merge pull request #4040 from gebart/pr/periph-timer-init-freq
periph/timer: Change timer_init API to support arbitrary (integer) frequencies
2016-02-15 23:36:44 +01:00
Hauke Petersen
c9e9fcf662 cpu/native: adapted HWRNG implementation 2016-02-14 12:59:46 +01:00
Joakim Nohlgård
d24cdd7cde cpu/native: Update timer_init to match API changes 2016-02-13 21:29:36 +01:00
Hauke Petersen
940097336a cpu: cleanup and unification of CPUID implementations
- moved definition of CPUID_LEN to periph_cpu.h
- fixed some doxygen
- simplyfied some implementations
2016-02-08 14:36:03 +01:00
Hauke Petersen
35eb99a46e Merge pull request #3984 from kaspar030/simplify_reboot
core: cpu: sys: simplify reboot()
2016-01-29 14:24:08 +01:00
938ff5c5e7 core: cpu: sys: simplify reboot() 2016-01-27 13:30:01 +01:00
Frank Holtz
1c32a536bc pkg/driver: native random fix for micro-ecc 2016-01-25 21:03:03 +01:00
5f44a6938d cpu: native: adapt xtimer backoff values to periph/timer change 2016-01-06 22:07:13 +01:00
ceaeee5c5d Revert "native: periph/timer: prevent underflow in timer_set_absolute"
This reverts commit ec441e9aa6.
2016-01-06 22:07:13 +01:00
Oleg Hahm
6d135d3579 native: make use of TLSF malloc and co
In order to make native behave more similar to other platforms, it should also use TLSF's dynamic memory allocation if included. It will still fall back to the system's malloc implementation when building for use with valgrind, to leverage its memory leak detection mechanisms.
2016-01-03 20:53:08 +01:00
14a54bddce cpu: native: netdev2_tap: make use of netdev2_eth module 2015-12-07 11:40:39 +01:00
BytesGalore
529e83675e cpp11: switched to use xtimer
Also switched the syscalls of cpu/native to use xtimer, only at _gettimeofday()
2015-11-27 18:36:25 +01:00
Ludwig Knüpfer
a86866ea9f cpu/native: malloc.h for osx: fix doxygen, move 2015-11-15 12:14:59 +01:00
Joakim Nohlgård
cbaeccdb90 periph/timer: Drop timer_reset 2015-10-17 20:11:03 +02:00
Ludwig Knüpfer
dd3229aa62 native: dynamically load malloc
g++ 5.2.0 apparently requires malloc before startup is run.
2015-10-04 18:13:12 +02:00
effb15a2cc Merge pull request #3313 from gebart/pr/eINT-fixes
eINT/dINT fixes
2015-09-29 12:39:16 +02:00
Ludwig Knüpfer
eda6328e21 documentation: update my name (Ortmann -> Knüpfer) 2015-09-27 18:58:30 +02:00
Hauke Petersen
1664bcbf59 native/timer: fix return value for invalid channel 2015-09-23 14:48:23 +02:00
Joakim Gebart
27565a655e cpu/native: remove dINT/eINT definitions 2015-09-19 10:38:18 +02:00
Joakim Gebart
0d2efd5fe7 native/syscalls: Use restoreIRQ 2015-09-19 10:35:58 +02:00
4e8bf2cb69 cpu: native: remove hwtimer traces 2015-09-16 10:58:53 +02:00
2cd4a80054 cpu: native: minor timer-related doxygen updates 2015-09-16 10:58:53 +02:00
fb773bf90a cpu: native: remove hwtimer_compat dependency 2015-09-16 10:58:51 +02:00
dd87073a60 Merge pull request #3826 from OlegHahm/netdev2_tap_buffer_size
netdev2_tap: set maximum buffer size correctly
2015-09-15 13:23:28 +02:00
Martine Lenders
93f555ef69 Merge pull request #3782 from OlegHahm/RIOT_assert
core: RIOT's own assert macro
2015-09-12 13:12:34 +02:00
Oleg Hahm
49917a5797 core: cpu: fix check for DEVELHELP 2015-09-12 12:43:15 +02:00
Oleg Hahm
fd121a94e6 netdev2_tap: set maximum buffer size correctly 2015-09-12 12:02:48 +02:00
Oleg Hahm
f3245cecac core: panic: last instruction's address for assert 2015-09-11 23:23:31 +02:00
Oleg Hahm
d7161b6d4b cpu: inline function to print instruction register 2015-09-11 23:23:31 +02:00
Martine Lenders
1c0cf3bf9c native: netdev2_tap: fix NETOPT_IS_WIRED flag 2015-09-11 13:11:33 +02:00
344b56bca8 Merge pull request #3167 from haukepetersen/fix_native_stacksizes
cpu/native: adjusted stacksizes
2015-09-05 23:17:45 +02:00
Hauke Petersen
7701aed546 Merge pull request #3164 from kaspar030/remove_uart0
sys: remove uart0
2015-09-04 18:54:30 +02:00
0e4386a46f native: remove uart0 2015-09-04 17:46:23 +02:00
ef972735dc sys: net: replace dev_eth with netdev2, adapt native tap driver 2015-09-04 15:39:04 +02:00
Thomas Eichinger
3fba38e47b cpu/native: fix wrong type for _sigio_child() 2015-09-03 11:49:57 +02:00
Thomas Eichinger
f841811a49 cpu/native: fix OS X includes and declarations 2015-09-02 17:34:47 +02:00
Thomas Eichinger
f10939c01e cpu/native: add conditional include on OS X for IFNAMSIZ 2015-09-02 17:34:47 +02:00
Martine Lenders
58ff31bfe9 gnrc: make all gnrc modules sub-modules of gnrc 2015-08-18 23:00:07 +02:00
Martine Lenders
664f51e149 doc: adapt documentation on tapsetup script 2015-08-14 12:05:34 +02:00
Martine Lenders
5760f9042d native: unify and simplify usage of tapsetup script 2015-08-14 12:05:34 +02:00
Martine Lenders
f0cb1429f0 native: rename ng_nativenet to dev_eth_tap 2015-08-09 22:04:26 +02:00
Martine Lenders
ca71ae4f59 dev_eth: fix documentation 2015-08-09 22:02:10 +02:00
Martine Lenders
472ee315f0 ethernet/ethertype: remove ng_ prefix 2015-08-07 17:09:19 +02:00
Hauke Petersen
75472eddf4 cpu: remove transceiver defines from cpu_conf files 2015-08-06 12:13:54 +02:00
5d8349298f remove bulk of legacy network stack and drivers 2015-08-06 12:12:47 +02:00
Benoît Canet
22da1f834b native: ng: net: Close tap device and cleanup on reboot 2015-08-03 18:17:53 +02:00
Benoît Canet
008b105166 native: net: Take care of unregistering SIGIO on reboot 2015-08-03 18:17:53 +02:00
Benoît Canet
800b057fac native: net: Make _native_tap_fd static
One global variable less is always good.
2015-08-03 18:17:52 +02:00
Benoît Canet
4893d4daea native: irq: Get rid of dINT() and eINT()
Get rid of internal usage of the old IRQ
API and keep it's implementation while
waiting for other modules to kill it.
2015-07-29 16:51:22 +02:00
21238b2ccc Merge pull request #3347 from benoit-canet/timer
native: timer: synchronize HWTIMER_SPIN_BARRIER with native timer min resolution
2015-07-29 10:14:58 +02:00
Thomas Eichinger
e416937398 Merge pull request #3390 from thomaseichinger/pr/fix_warning_errors_freebsd
native: fix warning errors freebsd
2015-07-23 10:11:29 +02:00
Oleg Hahm
9922d2600c native: removed dead code
num was never read, because native will exit before.
2015-07-22 14:36:21 +02:00
Thomas Eichinger
cbc9ddc639 native: add missing include for FreeBSD 2015-07-21 18:31:13 +02:00
Thomas Eichinger
0c15084db5 native: fix wrong pointer type warning 2015-07-21 18:31:13 +02:00
Hauke Petersen
08c4732fba cpu/native: adjusted stacksizes
The stacksizes for native were defined in a way, so that
DEBUG did not work inside of interrupt routines. The new
values should still be large enough but allow now for this.
2015-07-14 15:06:50 +02:00
d15f0990b3 Merge pull request #3344 from kaspar030/fix_native_timer_possible_underflow
native: periph/timer: prevent underflow in timer_set_absolute
2015-07-09 22:17:44 +02:00
Benoît Canet
e01329796d native: timer: synchronize HWTIMER_SPIN_BARRIER with timer min resolution
This keeps the test/hwtimer_wait test duration correct.
2015-07-09 20:42:21 +02:00
Peter Kietzmann
f95aaa6bf6 Merge pull request #3327 from authmillenon/native/enh/address-sanitizer
native: add address sanitizer make target
2015-07-09 16:07:00 +02:00
ec441e9aa6 native: periph/timer: prevent underflow in timer_set_absolute 2015-07-09 15:23:21 +02:00
Benoît Canet
e8e89d8ca9 native: timer: Do not cancel timer when setting it to 0 2015-07-09 15:08:47 +02:00
Martine Lenders
8a33a62914 native: add address sanitizer make target 2015-07-09 15:00:19 +02:00
b2272fc016 Merge pull request #3282 from benoit-canet/timer
native: Resurect native/perif/timer and handle #715 (WIP)
2015-07-09 11:12:24 +02:00
Benoît Canet
dfbd4f946e cpu: native: switch to hwtimer_compat
The hwtimer_wait test was tortured with the
following script which ran several hours.

----

make clean all-debug

while :
do

date
./bin/native/hwtimer_wait.elf > log &
pid=$!
sleep 20

success=$(cat log|grep success)

if [ "$success" != "success"  ]
then
date
echo "BUG"
exit
fi

kill $pid

done
----

Closes #715.
2015-07-09 02:43:04 +02:00
fe96d379f6 native: add periph/timer.h timer implementation 2015-07-09 02:43:04 +02:00
Benoît Canet
ced541cc67 native: irq_cpu: Rewrite IRQs (de)registration 2015-07-09 02:43:04 +02:00
Benoît Canet
4832a1a6b0 native: irq_cpu: Whitelist signals 2015-07-09 02:43:03 +02:00
Benoît Canet
a035d27414 native: irq_cpu: Make IRQ enabling/disabling safe 2015-07-09 02:43:01 +02:00
52599fde66 cpu: native: work around shared errno in _native_lpm_sleep 2015-07-09 00:31:31 +02:00
Hauke Petersen
5abd2ffc0a cpu/native: added periph_cpu.h 2015-06-12 19:10:49 +02:00
haukepetersen
e32b6c9504 cpu/native: improved error msg for netivenet 2015-06-11 15:40:40 +02:00
Hauke Petersen
a5e4b02ed8 cpu: fixed doxygen for multiple headers 2015-05-28 15:45:05 +02:00
Hauke Petersen
9943f51080 global: renamed cpu-conf.h into cpu_conf.h 2015-05-28 15:45:05 +02:00
1c91baed8b sys: net: add ng_netdev_eth netdev driver for dev_eth based ethernet devices 2015-05-26 21:05:19 +02:00
cfd9a5905a Merge pull request #2766 from kaspar030/add_dev_eth
sys: net: introduce low-level ethernet driver API
2015-05-26 19:28:14 +02:00
fbfb0954eb cpu: native: add tap implementation of dev_eth (ng_nativenet) 2015-05-26 15:37:55 +02:00
Joakim Gebart
13832d8e62 everything: Remove filename from @file Doxygen command 2015-05-22 07:34:41 +02:00
Lucas Jenss
426170b064 Improve naming of thread stacksize/priority constants
As discussed in #2725, this commit renames a number of stacksize constants to
better convey their intended usage. In addition, constants for thread priority
are given a `THREAD_` prefix. Changes are:

* KERNEL_CONF_STACKSIZE_PRINTF renamed to THREAD_EXTRA_STACKSIZE_PRINTF
* KERNEL_CONF_STACKSIZE_DEFAULT renamed to THREAD_STACKSIZE_DEFAULT
* KERNEL_CONF_STACKSIZE_IDLE renamed to THREAD_STACKSIZE_IDLE
* KERNEL_CONF_STACKSIZE_MAIN renamed to THREAD_STACKSIZE_MAIN
* Move thread stacksizes from kernel.h to thread.h, since the prefix changed
* PRIORITY_MIN renamed to THREAD_PRIORITY_MIN
* PRIORITY_IDLE renamed to THREAD_PRIORITY_IDLE
* PRIORITY_MAIN renamed to THREAD_PRIORITY_MAIN
* Move thread priorities from kernel.h to thread.h since the prefix has changed
* MINIMUM_STACK_SIZE renamed to THREAD_STACKSIZE_MINIMUM for consistency
2015-05-21 00:14:23 +02:00
Oleg Hahm
cb1f047f59 core: unified core_panic implementation 2015-05-10 11:58:43 +02:00
Oleg Hahm
828839316b core: renamed crash.h to panic.h 2015-05-09 18:44:10 +02:00
Joakim Gebart
46b9358e84 native: Remove generic atomic_set_return implementation
The removed implementation is the same as the generic implementation in core/atomic.c
2015-05-07 18:52:13 +02:00
Oleg Hahm
3dd3bbb461 transceiver: use transceiver specific broadcast 2015-04-19 20:35:11 +02:00
Cenk Gündoğan
4fae22bf3d cpu/native: do not exit when real_read returns 0 2015-04-06 10:18:46 +02:00
James Hollister
93cff5613f cpu/native: Fix for missing malloc.h in OSX 2015-03-21 01:41:54 -07:00
Ludwig Ortmann
88f1dc5cbc cpu/native: improve daemonization
- detach from working directory
- detach from process group
- set umask
2015-02-17 22:01:02 +01:00
Ludwig Ortmann
9a130e2e84 cpu/native: add some syscall wrappers
Add wrappers for chdir, setsid, and umask.
2015-02-17 22:00:14 +01:00
Ludwig Ortmann
dd2da2fb71 Merge pull request #2405 from cgundogan/restrict_with_leading_underscores
Use `__restrict` instead of `restrict`
2015-02-08 22:07:23 +01:00
Cenk Gündoğan
432f0014c0 cpu: restrict => __restrict 2015-02-08 19:15:14 +01:00
Martine Lenders
0eb2d78dda doc: use my real name 2015-02-08 18:52:16 +01:00
Ludwig Ortmann
3465213118 cpu/native: warn about uninitialized random module 2015-01-19 11:21:01 +01:00
Ludwig Ortmann
c4d4458651 Merge pull request #2243 from LudwigOrtmann/native-calloc
native: fix real_calloc, _native_in_calloc  initialization
2015-01-14 14:05:06 +01:00
Ludwig Ortmann
88fa49ab38 cpu/native: add high-quality random implementation
Per default random data is read from `/dev/random` now.

If specified (e.g. `-s 4711`), data is generated by calls to POSIX
random function like before. The POSIX random API is initialize with
the given seed (`srandom(4711);` in this example).
2015-01-14 11:51:23 +01:00
Ludwig Ortmann
3ab73bc633 cpu/native: init _native_in_calloc explicitly 2015-01-11 10:59:49 +01:00
Ludwig Ortmann
f5cfda977a cpu/native: fix real_calloc initialization 2015-01-11 10:59:49 +01:00
Oleg Hahm
6dac96ad1b Merge pull request #1904 from LudwigOrtmann/native_bufferbloat
native: increase buffer size, set defaults conditionally
2015-01-07 03:00:01 +01:00
Ludwig Ortmann
2ec0a1ca02 native/rtc: apply naming conventions 2014-12-16 15:46:56 +01:00
Ludwig Ortmann
474c8afd93 native/rtc: define ENABLE_DEBUG, move include 2014-12-16 15:41:51 +01:00
Ludwig Ortmann
f35981a6d7 native/rtc: improve implementation
* add error checking / warnings
* implement parts of alarm functionality
* clean up
2014-12-13 15:21:52 +01:00
Ludwig Ortmann
37a1a105bc native/rtc: clean up documentation 2014-12-13 15:21:52 +01:00
Ludwig Ortmann
c0ef84bb9f native: move rtc to periph
* adapt implementation to new interface
* remove now superfluous drivers directory
2014-12-13 15:21:52 +01:00
Oleg Hahm
000450c894 Merge pull request #2117 from OlegHahm/doxygen_eliminate_warnings
Doxygen eliminate warnings pt. 2
2014-12-04 17:18:42 +01:00
Ludwig Ortmann
015f5598e4 native: cleanup irq_cpu, native_cpu debug output 2014-12-04 10:48:15 +01:00