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

254 Commits

Author SHA1 Message Date
Ludwig Ortmann
9a130e2e84 cpu/native: add some syscall wrappers
Add wrappers for chdir, setsid, and umask.
2015-02-17 22:00:14 +01:00
Cenk Gündoğan
432f0014c0 cpu: restrict => __restrict 2015-02-08 19:15:14 +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
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
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
d92e9af91c doc: fixed broken param descriptions 2014-11-30 22:34:50 +01:00
Oleg Hahm
f8ecbf2a0a doc: add to group instead of redefining 2014-11-30 21:45:24 +01:00
Oleg Hahm
df9c09d946 doc: fixed typos and other misspellings 2014-11-30 21:32:12 +01:00
Oleg Hahm
cc73296d43 doc: added missing titles 2014-11-30 21:22:52 +01:00
Ludwig Ortmann
00092e8308 native: add time syscalls 2014-11-25 22:47:27 +01:00
Ludwig Ortmann
7901d24053 native: add missing syscall declarations 2014-11-25 22:47:26 +01:00
BytesGalore
a4d2ee307c cpu: added extern "C" to headers 2014-11-24 19:10:15 +01:00
Ludwig Ortmann
adb24b06b8 native: add random peripheral implementation 2014-11-19 14:26:58 +01:00
Ludwig Ortmann
d8641ff525 native: add random syscalls 2014-11-19 14:26:58 +01:00
Ludwig Ortmann
42e43d5e12 FIXUP: remove erroneous comment 2014-11-17 09:56:03 +01:00
Ludwig Ortmann
acaa6481cb native: add more syscall declarations 2014-11-14 20:52:17 +01:00
Ludwig Ortmann
641cb4c488 native: add accept syscall declaration 2014-11-14 17:49:56 +01:00
Martine Lenders
bbeb4941fa nativenet: add missing include 2014-11-10 05:19:28 +01:00
Ludwig Ortmann
4545c15f70 native: inrease default transceiver buffer 2014-10-30 13:20:51 +01:00
Ludwig Ortmann
5d606b676d native: set net buffer defaults conditionally 2014-10-30 13:20:45 +01:00
Ludwig Ortmann
7bcf896ec6 native: add and use callback type 2014-10-30 12:11:22 +01:00
Martine Lenders
264785852e nativenet: Supply net_dev_t support for nativenet 2014-10-09 09:40:58 +02:00
Ludwig Ortmann
b849b848a0 native: add two more syscall declarations 2014-10-01 21:56:43 +02:00
Ludwig Ortmann
289c4c0ee4 doc: add license headers to some .h files 2014-09-18 17:45:11 +02:00
Ludwig Ortmann
b7992922ce fix license headers in non-.c files 2014-08-23 16:16:26 +02:00
Ludwig Ortmann
1c3f481702 tests, native: fixup for cpuid
- adopt test name to new scheme
- make cppcheck happy / dont overwrite the target memory location twice
- fix license header
- don't redefine define if it already exists
- don't write more cpuid than is defined as size
2014-08-05 16:55:42 +02:00
Oleg Hahm
983d056c75 core: harmonizes the data type for the process ID
Instead of using differing integer types use kernel_pid_t for process
identifier. This type is introduced in a new header file to avoid
circular dependencies.
2014-08-01 12:02:54 +02:00
Martine Lenders
b1bc11c7fc native: cpu: Add documentatiton for CPUID_ID_LEN 2014-07-31 23:27:38 +02:00
Martin Lenders
239f2e0f24 Implement CPU id getter for native 2014-07-31 23:05:15 +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
df36f6304a native: remove stale TODOs and blank line
The values are quite OK.
2014-07-13 07:24:01 +02:00
René Kijewski
63dd8546af Merge pull request #1335 from Kijewski/fix-all-warnings-for-native-and-qemu-i386
Fix all warnings for native and qemu-i386
2014-07-02 10:58:48 +02:00
Oleg Hahm
44e5d8cfd0 nativenet: change max packet size to 127
Real IEEE 802.15.4 transceivers have a payload of 127. Hence, for
testing - particular 6lowpan - it would make sense to have the same
limitation in nativenet. Especially to test fragmentation this is
helpful.
2014-07-01 18:31:40 +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
Oleg Hahm
ef4fe6616c documentation: unified descriptive text for cpu 2014-05-24 15:56:57 +02:00
Ludwig Ortmann
98bbb80571 documentation: append my email to my name everywhere 2014-05-15 18:07:17 +02:00
Thomas Eichinger
7a031e5669 net: handle macro redefinitions for OS X
undefine macros and reorder header includes to get rid of system
defined macros on OS X

fixes #1165
2014-05-14 19:43:58 +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
628419eb11 Exterminate old-style function declaration/prototypes 2014-05-12 21:57:09 +02:00
Hauke Petersen
7545eff784 core/cpu/board: moved F_CPU define to board 2014-05-06 10:36:09 +02:00
Ludwig Ortmann
42aa3d9f5b native: update support for FreeBSD
works with FreeBSD 10.0 amd64/i386

fixes: #505
2014-04-20 07:31:40 +02:00
René Kijewski
0b75a11291 native: don't use RIOT read/write in UART 2014-03-30 22:33:50 +02:00
Hauke Petersen
8a937e1a1c hwtimer: clean up of interfaces to board/cpu 2014-03-26 13:19:18 +01:00
Ludwig Ortmann
0501fe8980 native: config_load: set PID as id, net address 2014-03-18 08:07:30 +01:00
Ludwig Ortmann
561eefab07 implement rudimentary native reboot 2014-02-14 16:20:36 +01:00
Ludwig Ortmann
114aaa65e5 Merge pull request #626 from LudwigOrtmann/issue_621
add EUI-64 support for nativenet
2014-02-11 19:30:23 +01:00
Ludwig Ortmann
2525920426 remove trailing whitespace and newlines 2014-02-11 18:45:06 +01:00
Ludwig Ortmann
d5d3bbcd44 add EUI-64 support for nativenet 2014-02-10 08:33:57 +01:00
Ludwig Ortmann
4939473afb guard malloc/free family 2014-01-24 17:30:47 +01:00
Ludwig Ortmann
6fe1ecd1b4 Merge pull request #479 from LudwigOrtmann/nativenet_lenchck
Nativenet length check and cleanup
2014-01-10 01:47:35 -08:00
Oleg Hahm
fe575d52df Merge pull request #364 from OlegHahm/float_stack_sizes
added a dedicated stacksize for float printfs
2014-01-09 10:48:38 -08:00
Ludwig Ortmann
ac0ec1f6b3 nativenet clean up
Make nativenet tap payload type consistent with radio_packet_t
Also remove a trailing space
2014-01-08 14:57:11 +01:00
Ludwig Ortmann
ea8b735232 fix nativenet_send documentation 2013-12-24 11:57:54 +01:00
Ludwig Ortmann
cf87e647c0 make native includes RIOT posix compatible 2013-12-22 23:26:54 +01:00
Ludwig Ortmann
ef315ed662 improve nativenet send functions return type 2013-12-21 16:56:42 +01:00
Martin Lenders
69809928d3 Make UART0_BUFSIZE configurable by CPU 2013-12-20 11:10:42 +01:00
Oleg Hahm
ead2e117a1 Merge pull request #439 from OlegHahm/thread_yield_prototype
put prototype for thread_yield() in core/include
2013-12-18 13:36:55 -08:00
Christian Mehlis
2a9aac7f0b Merge pull request #423 from OlegHahm/fix_warnings
Fix warnings
2013-12-18 12:02:37 -08:00
Oleg Hahm
2cdfc5b585 Merge pull request #382 from OlegHahm/transceiver_return
transceiver return signed values for sending
2013-12-18 09:33:32 -08:00
Oleg Hahm
d87d827d88 transceiver return signed values for sending
negative values indicate an error value
2013-12-18 18:22:59 +01:00
Oleg Hahm
227c847135 put prototype for thread_yield() in core/include 2013-12-18 17:47:49 +01:00
Hauke Petersen
edcabf7cb6 Fixed a lot of comments by removing tabs and correcting format. 2013-12-16 14:00:33 +01:00
Hauke Petersen
3785fe956b Fixed doxygen comments, focused on file headers and group definitions 2013-12-16 14:00:24 +01:00
Oleg Hahm
72586f7a6d limit maximum payload size to 255 for nativenet if 6lowpan is used 2013-12-13 18:53:48 +01:00
Ludwig Ortmann
916757cf4c implement err.h
valgrind reported invalid reads/writes with glibc err[x]|warn[x] (in
glibc printf) when stdio had been redirected in between.

define _progname (pointing to argv[0])
2013-12-10 17:00:01 +01:00
Ludwig Ortmann
d6c213fb47 fix grammar in license header 2013-11-23 13:11:56 +01:00
Oleg Hahm
6a1fcaf288 added a dedicated stacksize for float printfs 2013-11-21 20:41:28 +01:00
Ludwig Ortmann
c764728398 pre-init native hwtimer
make it behaver more like a regular timer
2013-11-13 01:31:31 +01:00
Ludwig Ortmann
7b9d199ec8 make system calls safer/clean up headers
wrap some libc functions that do system calls (terminal output)
wrap read/write with syscall guard
define real_read/write (next dynamic linker find for read/write)
guard system calls in remaining code
introduce native_internhal.h
throw out some debug statements that break things
clean up includes a bit
declare board_init in native_internhal.h
add -ldl to LINKFLAGS for cpu/syscalls
2013-11-13 00:01:42 +01:00
Christian Mehlis
4f4c4bfedd use radio_packet_length_t for native frames 2013-10-29 20:36:13 +01:00
Ludwig Ortmann
7f7290a26a normalize stack defines 2013-10-25 11:40:33 +02:00
Ludwig Ortmann
24b2cfd95a general clean up
make some variables volatile
remove rx_buffer_next from header
more DEBUG output
fix warnings
coding conventions
change puts to DEBUG
rename end-context/stack
2013-09-30 18:03:53 +02:00
Ludwig Ortmann
c6180a6e4f fix NATIVE_MAX_DATA_LENGTH 2013-08-29 16:16:47 +02:00
Ludwig Ortmann
74b1a74525 documentation for nativenet interface 2013-08-29 16:16:47 +02:00
Ludwig Ortmann
37c3059e1c clean up nativenet, add src addr 2013-08-29 16:16:46 +02:00
Ludwig Ortmann
52b4370e7d fix register_interrupt callback parameter 2013-08-18 11:25:43 +02:00
Oleg Hahm
2d4de90a9c added missing header guards 2013-08-15 19:39:29 +02:00
Ludwig Ortmann
708ece68cc cc1100 -> nativenet 2013-08-15 14:05:26 +02:00
Ludwig Ortmann
a634709c00 native cc1100x_ng network
not properly passing received data to transceiver atm
2013-08-15 14:05:26 +02:00
Oleg Hahm
3ad55cce8b changed default stacksize
* the default stacksize no longer set for a thread using printf
* the stacksize for the main thread therefore adds the necessary space
2013-08-14 18:04:25 +02:00
Oleg Hahm
3adb6fa217 removed senseless include of debug.h in a header 2013-07-25 21:56:09 +02:00
Oleg Hahm
33423cdadb redefining default stack sizes dependent on the use of printf 2013-07-23 13:42:58 +02:00
Christian Mehlis
837bad38eb rename kernel_intern.h
german "intern" to english "internal"
2013-07-16 16:36:37 +02:00
Oliver Hahm
b571286574 * fixed typo 2013-06-18 17:26:53 +02:00
Oliver Hahm
ac10da4509 Merge branch 'fixes-06-14' of git://github.com/mehlis/RIOT into mehlis-fixes-06-14 2013-06-18 17:25:44 +02:00
Oliver Hahm
0d6d8390c0 * updated copyright and license headers in various files 2013-06-18 17:21:38 +02:00
Martin
0dd314afbb fix multiple definition of TRANSCEIVER_STACK_SIZE for using with native cpu 2013-06-14 20:21:22 +02:00
Ludwig Ortmann
4f0e4dec90 fix ucontext.h include for OSX, FreeBSD 2013-06-03 13:10:42 +02:00
Ludwig Ortmann
35f9062e37 inital OSX support for native port 2013-05-15 17:45:43 +02:00
Ludwig Ortmann
7bf9fa0314 increase MINIMUM_STACK_SIZE to allow for DEBUG 2013-05-15 10:46:09 +02:00
Ludwig Ortmann
c6553f6492 interrupt handling rewrite
(including uart0 integration, rt-extension removal)
2013-05-14 18:31:47 +02:00
Ludwig Ortmann
2d29a26b64 fix stack and interrupt bugs 2013-04-15 20:08:46 +02:00
Ludwig Ortmann
2f74d35709 removed posix real-time extension timers from cpu 2013-04-03 18:53:19 +02:00
Ludwig Ortmann
671cb6560f native cc110x_ng placebo 2013-03-21 17:08:41 +01:00
Ludwig Ortmann
175300e58c add native cpu doxygen documentation,
also fix and improve some of the existing
2013-03-13 21:56:56 +01:00
Ludwig Ortmann
795ab695c0 copyright preambel 2013-03-06 10:29:49 +01:00
Ludwig Ortmann
d65536f77b native cpu initial import 2013-03-06 01:08:15 +01:00