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

67 Commits

Author SHA1 Message Date
4133908fe0 cpu/native: fix doxygen grouping 2018-06-11 19:12:02 +02:00
Bas Stottelaar
a05d1b1004 cpu/board: native: use common peripheral initialization 2018-03-15 23:26:01 +01:00
Martine Lenders
81ef15287a native: provide socket-based ZEP device 2018-01-18 09:15:37 +01: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
Vincent Dupont
68f1ea8fd0 native: add a CAN device using socketCAN 2017-06-19 15:36:20 +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
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
Joakim Nohlgård
d1ea50a600 mtd: Redefine MTD_0 as a mtd_dev_t * 2017-03-28 17:00:39 +02: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
Martine Lenders
1f6f02e196 cpu/native: adapt start-up and auto-init for multiple netdev2_tap 2017-01-19 12:07:10 +01:00
Martine Lenders
e9d13d73bc native: prettify argument parsing 2017-01-12 23:40:17 +01:00
Ludwig Ortmann
83886d61c7 native: start with interrupts disabled 2016-10-15 07:50:44 +02: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
59674a679b netdev2: use params parameter for setup 2016-03-28 20:22:20 +02:00
9082273746 core: header cleanup 2016-02-28 22:46:28 +01:00
Ludwig Knüpfer
eda6328e21 documentation: update my name (Ortmann -> Knüpfer) 2015-09-27 18:58:30 +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
Martine Lenders
f0cb1429f0 native: rename ng_nativenet to dev_eth_tap 2015-08-09 22:04:26 +02:00
5d8349298f remove bulk of legacy network stack and drivers 2015-08-06 12:12:47 +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
haukepetersen
e32b6c9504 cpu/native: improved error msg for netivenet 2015-06-11 15:40:40 +02:00
fbfb0954eb cpu: native: add tap implementation of dev_eth (ng_nativenet) 2015-05-26 15:37:55 +02: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
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
7901d24053 native: add missing syscall declarations 2014-11-25 22:47:26 +01:00
Ludwig Ortmann
8d2a5b22b4 native: add daemonize argv filter
When daemonizing, only the first instance should do so.
2014-11-17 12:51:42 +01:00
Ludwig Ortmann
3ca4f18479 doc: use lgplv2.1-short license header instead of lgpl-short-riot 2014-07-31 22:57:20 +02:00
Ludwig Ortmann
3cda0369cb native: cleanup
fix style
fix some syscall declarations
reorder syscall declarations
init syscalls in dedicated function
substitute 1 with EXIT_FAILURE
2014-07-27 15:16:38 +02:00
Ludwig Ortmann
c6bcc344ca native: uart reconnect buffer replay
When using socket stdio, add option to replay what has been written to
stdout while not connected (`-r`).

The implementation is to simply use the existing log file (which is
implicitly created when the option is used), and read from it until
EOF upon reconnect.

closes #476
2014-07-27 15:16:38 +02:00
Ludwig Ortmann
2aa9f6b045 native: clean up and clarify help
- reorder option details to mirror the order given in usage
- list option arguments in option details
- clarify option arguments
2014-07-22 16:25:00 +02:00
René Kijewski
3063e3c2b1 Fix all warnings for native and qemu-i386
Missing returns, unused variables (only used for debugging), empty
translation units, missing function prototypes, and GNU extensions.
2014-06-24 16:50:32 +02:00
René Kijewski
2f871ca885 native: remove some warnings about undef functions
This PR implements `real_X` for `X in (fork, dup2, unlink, execve)`.
These function caused warnings while making the default example.
2014-06-18 20:34:12 +02:00
René Kijewski
2e9a1773e9 native: use real_pipe() and read_close() 2014-06-14 00:39:02 +02:00
Ludwig Ortmann
dbc36fc2c5 native: add id option 2014-06-06 16:30:54 +02:00
Ludwig Ortmann
1e5e19bc23 native: set optional path with unix socket option
fixes #1045
2014-06-03 16:46:40 +02:00
Ludwig Ortmann
e36590cda7 native: fix coding style 2014-06-03 16:46:40 +02:00
Ludwig Ortmann
c9f68e79b9 native: set _native_pid correctly in daemon mode
This fixes a bug that leads to all unix sockets being created as
`/tmp/riot.tty.0`.
2014-05-20 08:53:26 +02:00
Ludwig Ortmann
98bbb80571 documentation: append my email to my name everywhere 2014-05-15 18:07:17 +02:00
René Kijewski
8038e96d09 Merge pull request #1119 from Kijewski/error_old-style-definition
Exterminate old-style function definitions
2014-05-14 13:31:30 +02:00
Ludwig Ortmann
166b88f1ae native: internal getpid syscall 2014-05-14 09:13:57 +02:00
Ludwig Ortmann
4c961bfb6e native: refactor getpid calls 2014-05-14 09:13:57 +02:00
René Kijewski
9a9caf2c68 Exterminate old-style function definitions 2014-05-12 21:57:09 +02:00
Ludwig Ortmann
6044dc28dc native: add help option
Closes: #840
2014-04-19 12:44:11 +02:00
Ludwig Ortmann
8ef02d3b9d native profiling support
only works with Linux for now
2014-03-14 12:50:50 +01:00