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

332 Commits

Author SHA1 Message Date
Thomas Eichinger
238dda4423 board/native: fix CFLAGS and LINKFLAGS for FreeBSD 2015-07-13 12:49:27 +02:00
86f3d25a19 native: remove ltc4150 2015-07-13 12:08:48 +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
Martine Lenders
8a33a62914 native: add address sanitizer make target 2015-07-09 15:00:19 +02:00
0835f577a3 native: add periph_timer to features 2015-07-09 02:43:04 +02:00
Joakim Gebart
30dee9c561 native: Add -ffunction-sections -fdata-sections to CFLAGS 2015-07-02 05:58:51 +02:00
Oleg Hahm
e634b8c5a8 Merge pull request #3056 from OlegHahm/board_leading_underscore_removal
boards: remove header guard under scores
2015-06-28 17:27:28 +02:00
BigDaddyD
b6bd067863 boards: removed leading underscores from macros
* also added a trailing underscore to header guards for consistency

Commit for PR 2623, repairing header file include guards.
This PR is intended to fix the include guards in files under RIOT/boards

SQUASH ME: fix underscore removal overdos

SQUASH ME: consistent macro naming

SQUASH ME: missed that one

SQUASH ME: fixed overdo

SQUASH ME: consistency
2015-06-24 15:54:36 +02:00
Hauke Petersen
e7c784e72f board/native: minor cleanup in Makefile.dep 2015-06-11 21:58:45 +02:00
Hauke Petersen
235a488977 board/native: adapted Makefile.dep for netif init
The new network stack does not now the concept of the
defaulttransceiver, so this fix makes auto_init_ng_netif
work for now.
2015-06-11 15:40:39 +02:00
Martine Lenders
5e7de0821b Merge pull request #3096 from OlegHahm/ng_nativenet_netdev_auto_foobar
ng_nativenet: auto initialization and improvements
2015-06-03 17:53:18 +02:00
Hauke Petersen
9943f51080 global: renamed cpu-conf.h into cpu_conf.h 2015-05-28 15:45:05 +02:00
Oleg Hahm
f4f328fa54 native: use ng_nativenet as default transceiver 2015-05-27 21:51:08 +02:00
Oleg Hahm
e2764e7464 native: append tap parameter for ng_nativenet, too 2015-05-27 21:49:29 +02:00
fbfb0954eb cpu: native: add tap implementation of dev_eth (ng_nativenet) 2015-05-26 15:37:55 +02:00
Tom Van den Eynde
e563e2df36 boards/native: split FEATURES_PROVIDED over multiple lines 2015-03-20 00:13:24 +01:00
Philipp Rosenkranz
02d0c88284 tests/travis: split buildtests into MCU groups. 2015-02-22 15:04:52 +01:00
Martine Lenders
449d2735c5 native: fix termflags 2015-02-21 16:14:36 +01:00
BytesGalore
714ee38355 boards: core: cpu: drivers: sys: added missing header guards 2015-01-27 19:10:57 +01:00
Oleg Hahm
d798539f86 make: boards: add feature config to Makefiles 2014-12-22 20:34:40 +01:00
Ludwig Ortmann
e7f6f640f6 Merge pull request #2060 from OlegHahm/periph_rtc
drivers: Adapt old platforms to periph rtc
2014-12-16 18:56:59 +01:00
Ludwig Ortmann
093085b4ff native: workaround for missing __builtin_bswap16
Implements a workaround for
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52624

This is present in current versions of ubuntu 12.04 and debian 7.7 (stable).
2014-12-15 09:27:40 +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
Ludwig Ortmann
07da49de40 native/make/osx: circumvent unavailable gobjcopy
It's not used anyways, so just create an empty hex file if gobjcopy is
not found.
2014-11-28 17:28:27 +01:00
Ludwig Ortmann
adb24b06b8 native: add random peripheral implementation 2014-11-19 14:26:58 +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
Thomas Eichinger
2382a4d320 native: fix Makefiles for OSX 2014-11-13 16:00:52 +01:00
BytesGalore
178b36ae0b exchanged BOARD_BLACKLIST with FEATURES_REQUIRED in the example Makefile
added cpp as feature for board native
2014-11-11 09:52:06 +01:00
Ludwig Ortmann
2117737302 Merge pull request #1806 from BytesGalore/extern_C_in_headers_boards
boards: add `extern "C"` to header files
2014-10-31 04:25:15 -07:00
BytesGalore
fc56535dd3 boards: add extern "C" to header files 2014-10-31 11:27:59 +01:00
Ludwig Ortmann
2c9c8bf2e0 make: remove dependency from flash to all
* print message when no hex file is found instead
* add objcopy for native so that flash can succeed
2014-10-31 10:31:47 +01:00
Oleg Hahm
3c0d91720b Revert "boards: introduced a HAS_RADIO define"
This reverts commit 4238f40429.
2014-10-30 23:13:52 +01:00
Oleg Hahm
4238f40429 boards: introduced a HAS_RADIO define 2014-10-30 17:52:37 +01:00
René Kijewski
765c88d08a make: allow drivers to implement features
This change allows drivers (or any module for that matter) to provide
features. This is e.g. useful if a board does not have a transceiver,
but your application uses `USEMODULE += some_driver`, which implements
the transceiver interface.

The line `FEATURES_PROVIDED += some_feature` should go to the guarded
block in `{sys,drivers}/Makefile.include`.
2014-10-26 23:54:10 +01:00
Oleg Hahm
481d4f2ee3 doc: fix ambiguous file name warnings
doxygen does a good job itself, identifying the unique part of the path
to identify a file.
2014-10-23 20:53:00 +02:00
Martine Lenders
b3f59eec65 make: initialize debugger with TERMFLAGS 2014-10-21 19:49:00 +02:00
Ludwig Ortmann
a20e287a96 make: introduce and use periph_cpuid feature 2014-10-16 19:35:41 +02:00
Martine Lenders
264785852e nativenet: Supply net_dev_t support for nativenet 2014-10-09 09:40:58 +02:00
René Kijewski
f49bd3e660 make: add Makefile.features telling the BOARDs' features
Please see #1715.
Closes #1715.

This PR implements the new Makefile variables "FEATURES_PROVIDED" and
"FEATURES_REQUIRED". A board *can* have a new file `Makefile.features`
which looks like:

```make
FEATURES_PROVIDED = transceiver
```

An application can have a corresponding line

```make
FEATURES_REQUIRED = transceiver
```

If the selected BOARD does not fulfil the requirements of the
application, then a *warning* is issued at compile time.

This change only includes the feature "transceiver", further features
are expected to be listed in further PRs. The requirement "transceiver"
is automatically added if the application uses the module
"defaulttransceiver".

`make buildtest` understands the new feature listing, so the user won't
need to add boards to `BOARD_BLACKLIST` manually.

Part of the change are the added Make targets
* `info-features-missing`, which prints the required features
  `\setminus` the provided features. The output is empty if there are no
  features missing.
* `info-boards-features-missing`, the same as `info-features-missing`
  but as a table for all boards, but heeded `BOARD_WHITELIST` and
  `BOARD_BLACKLIST`.

Applications don't have to use this new feature. This change does not
break existing Makefile.
2014-10-06 17:42:11 +02:00
Ludwig Ortmann
b849b848a0 native: add two more syscall declarations 2014-10-01 21:56:43 +02:00
René Kijewski
866c713a7e native: -DNATIVE_INCLUDES if using NATIVEINCLUDES
It can be useful to know if the current compilation builds the native
board module, because e.g. then we must not include `sys/types.h`.

This diff adds `-DNATIVE_INCLUDES` to the make variable
`NATIVEINCLUDES`.
2014-09-26 13:59:37 +02:00
Ludwig Ortmann
289c4c0ee4 doc: add license headers to some .h files 2014-09-18 17:45:11 +02:00
Ludwig Ortmann
3d29a9e3d3 native: add support for Linux on ARM 2014-09-04 16:39:33 +02:00
Ludwig Ortmann
2439bd839c doc: fix more license headers
Remove some cruft, set correct lgpl versions, update to lgpl where
this had been overlooked in the past, fix odd comment style...
2014-08-27 19:20:49 +02:00
Ludwig Ortmann
502fd23558 Merge pull request #1570 from LudwigOrtmann/native-ssp
native: add stack smashing protection
2014-08-23 17:39:57 +02:00
Ludwig Ortmann
db6d6ae95e native: add stack smashing protection
When `DEVELHELP` is defined, add `-fstack-protector-all`.
2014-08-23 10:56:39 +02:00
Ludwig Ortmann
ba59ecdaae native: fix and improve term-valgrind flags 2014-08-22 20:05:43 +02:00
Martine Lenders
248a8531a5 make: Fix TERMFLAGS
Sometimes boards/*/Makefile.include (e. g. in case of the msba2) gets included
twice somehow, leading the TERMFLAG to be set twice and faulty. This
fixes that.
2014-08-22 01:09:55 +02: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
df36f6304a native: remove stale TODOs and blank line
The values are quite OK.
2014-07-13 07:24:01 +02:00
René Kijewski
54047c72d3 native: override INCLUDES w/ NATIVEINCLUDES
Currrently native overrides the object file targets, because it needs
the different include paths to interact with libc and the OS.

This PR simplifies their makefiles to only override the variable
INCLUDES, instead of overriding the targets.
2014-07-07 23:09:14 +02:00
Pham Huu Dang Nhat
f7398f61ff Changed RIOT/Makefile.include, Makefile.base, Makefile.cflags, and native/Makefile.include to compile C and C++ files. 2014-06-25 22:26:10 +07:00
René Kijewski
2ae0c1b149 make: use abspath for better error messages 2014-06-23 15:50:10 +02:00
René Kijewski
a9a76cb2c2 make: create dependencies as side effect 2014-06-23 15:50:10 +02:00
Ludwig Ortmann
741d9beeb0 Merge pull request #1332 from Kijewski/native-fix-warnings-in-default
native: remove some warnings about undef functions
2014-06-19 17:28:16 +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
467b41ad49 make: easifier usage of module subdirectories
Many modules have subdirectories. Often these subdirectories should only
be included under certain circumstances. Modules that use submodules
currently need to use this pattern:

```make
DIRS = …

all: $(BINDIR)$(MODULE).a
   @for i in $(DIRS) ; do $(MAKE) -C $$i ; done ;

include $(RIOTBASE)/Makefile.base

clean::
   @for i in $(DIRS) ; do $(MAKE) -C $$i clean ; done ;
```

This PR moves the `all:` and `clean::` boilerplate into `Makefile.base`.
2014-06-17 15:49:32 +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
Thomas Eichinger
1e983c9670 s/PROJECT/APPLICATION/g
fixes #548
2014-05-26 13:21:09 +02:00
Ludwig Ortmann
98bbb80571 documentation: append my email to my name everywhere 2014-05-15 18:07:17 +02:00
Ludwig Ortmann
2c5c177f75 native: unify license headers 2014-05-15 18:07:17 +02:00
Ludwig Ortmann
d7b3d21bfe native: initialize maybe uninitialized variable
fixes #1118
2014-05-15 08:54:01 +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
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
e4e3ef4daf make/native: remove -gc flag
Yields warning on OSX.
Uncertain why it was there in the first place.

Fixes #1125
2014-05-09 12:23:34 +02:00
Hauke Petersen
7545eff784 core/cpu/board: moved F_CPU define to board 2014-05-06 10:36:09 +02:00
René Kijewski
a8064fd97c Automatically remove dups in $(USEMODULE) 2014-04-29 00:06:19 +02:00
René Kijewski
4c66f72ba3 Merge pull request #1022 from LudwigOrtmann/issue_505
native: update support for FreeBSD
2014-04-26 15:51:54 +02:00
Ludwig Ortmann
b089798bf9 native/make: add missing target 2014-04-22 16:53:08 +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
Ludwig Ortmann
b22f0e6a09 native/make: set all binutils with ?= instead of = 2014-04-20 07:28:21 +02:00
René Kijewski
300d6b3e35 Make: exterminate 'clean' buildtarget
Closes #993.

We do not need to descend into the modules to know what to do on
`make clean BOARD=blub`. We can just invoke `rm -rf bin/blub`.

This PR only keeps the descending into the USEPKGs, since they might
want to delete cached/downloaded/extracted data.
2014-04-09 23:07:52 +02:00
Ludwig Ortmann
9f24ae2e62 Merge pull request #946 from Kijewski/native-write
native: don't use RIOT read/write in UART
2014-04-09 18:17:09 +02:00
Ludwig Ortmann
b9ffc1a99e fixup for #710: use subfolder in bin dirs (native)
Update native Makefiles to provide changed object target paths
Fixes #989
2014-04-09 15:25:05 +02:00
René Kijewski
3f59eefbaf Use subfolders in bin dir
Creating all object files in one directory is bound to produce name
clashes. RIOT developers may take care to use unique file names, but
external packages surely don't.

With this change all the objects of a module (e.g. `shell`) will be
created in `bin/$(BOARD)/$(MODULE)`.

I compared the final linker command before and after the change. The
`.o` files (e.g. `startup.o`, `syscall.o` ...) are included in the same
order. Neglecting the changed path name where the `.o` files reside, the
linker command stays exactly the same.

A major problem could be third party boards, because the location of the
`startup.o` needs to the specified now in
`boards/$(BOARD)/Makefile.include`, e.g.
```Makefile
export UNDEF += $(BINDIR)msp430_common/startup.o
```
2014-04-09 00:28:14 +02:00
Oleg Hahm
1e9a43d0f8 Merge pull request #778 from LudwigOrtmann/dependency_files
Make: Prepend path to dependency info files with sed
2014-04-08 23:22:21 +02:00
René Kijewski
2749531324 Merge pull request #789 from LudwigOrtmann/native_gprof
native profiling tools support
2014-04-05 02:26:15 +02:00
Ludwig Ortmann
b2930113ef remove some newlines 2014-04-01 10:47:12 +02:00
Ludwig Ortmann
a1aa0df9ae change new/overlooked Makefiles 2014-04-01 10:44:10 +02:00
René Kijewski
0b75a11291 native: don't use RIOT read/write in UART 2014-03-30 22:33:50 +02:00
Martine Lenders
53264c7a45 Merge pull request #609 from LudwigOrtmann/transceiver_any
anytransceiver pseudomodule
2014-03-24 14:04:02 +01:00
Ludwig Ortmann
8ac4f3332d core cpu: add defaulttransceiver pseudomodule
update examples/default
2014-03-18 10:18:15 +01:00
Ludwig Ortmann
0501fe8980 native: config_load: set PID as id, net address 2014-03-18 08:07:30 +01:00
Ludwig Ortmann
dfd0b43cbe add variables for gprof, cg_annotate 2014-03-14 12:56:44 +01:00
Ludwig Ortmann
a62559de62 make: streamline native targets
The new target names are easier to remember / decipher:

term
term-cachegrind
term-gprof
term-valgrind

all
all-cachegrind
all-gprof
all-valgrind
all-debug

eval-gprof
eval-cachegrind
2014-03-14 12:50:50 +01:00
Ludwig Ortmann
ae898ef9eb rebase_fixup 2014-03-14 12:50:50 +01:00
Ludwig Ortmann
ad1d8df080 change target name, add cachegrind target 2014-03-14 12:50:50 +01:00
Ludwig Ortmann
8ef02d3b9d native profiling support
only works with Linux for now
2014-03-14 12:50:50 +01:00
Ludwig Ortmann
9b61d95545 make: don't ignore failures in for loops
Add `|| exit 1` to all constructs like `@for i in $(DIRS) ; do "$(MAKE)" -C $$i ; done ;`, so that compilation stops on the first error.
2014-03-12 11:09:04 +01:00
Ludwig Ortmann
2cd3f04fc6 Don't use INCLUDES for building any native at all.
native modules will never need the dynamic INCLUDES, so we define our
own NATIVEINCLUDES. Due to the current make structure, the only way to
not use INCLUDES is to redefine the build rules.
2014-02-27 10:30:30 +01:00
Oleg Hahm
93e32953b3 always build and initialize hwtimer
Eliminates special treatment of the hwtimer module and makes it a
mandatory part of the kernel.
2014-02-24 18:36:28 +01:00
Christian Mehlis
09bdb56d52 native: fix function prototype to match to api 2014-02-18 16:28:13 +01:00
Oleg Hahm
6c0482b976 Merge pull request #701 from Kijewski/issue-672
Use `filter` instead of `findstring`
2014-02-16 12:33:29 +01:00
René Kijewski
102dc45382 Eliminate findstring in more places 2014-02-14 14:30:16 +01:00
René Kijewski
caea069bcf Do not mandate input language
An application might want to use C11 features. The user would assume
that setting `CFLAGS=-std=gnu11` in the Makefile would work. It does not
since the board's Makefile.include shadows the `-std` flag.

This patch removes the `-std=gnu99` from the various Makefile.includes,
and sets the flag in the common Makefile.include of RIOT instead.
If an `-std` flag was provided by an earlier Makefile (the application,
the board, or the CPU [whilst only the former one should]), then no
additional flag is set. It is first tested if the supplied compiler
understands `-std=gnu99`, then `-std=c99`.
2014-02-14 00:06:02 +01:00
Ludwig Ortmann
336c5159b2 use pkg-config to add valgrind include path
makes knowledge of VALGRIND_VALGRIND_H vs. VALGRIND_H optional
2014-02-11 19:22:39 +01:00
Ludwig Ortmann
2525920426 remove trailing whitespace and newlines 2014-02-11 18:45:06 +01:00
Ludwig Ortmann
d40b6ac5b1 native+osx makefile cleanup
* add missing $(AD) to osx $(LINK) invocation
* move osx build determination to native makefile
* move old libc test to native makefile
* set objcopy to "true" - it is superfluous for native no matter what the system is
* add some documentation to natives makefile
2014-02-10 12:25:47 +01:00
Ludwig Ortmann
0ee91da42f valgrind target 2014-02-01 13:56:21 +01:00
Ludwig Ortmann
94ac6ddbd2 refactor and clean up native Makefile 2014-02-01 13:56:17 +01:00
Ludwig Ortmann
e083e9bcb8 configure debug target for native 2014-01-30 11:34:04 +01:00
Ludwig Ortmann
855eea6a53 add missing newlines 2014-01-22 18:26:53 +01:00
Ludwig Ortmann
b6781cdf0f add native flash and term targets
flash does nothing
term starts the project with PORT misused for the tap interface
PORT is unset if nativenet is not used
2014-01-09 12:53:40 +01:00
Oleg Hahm
9df07f9238 muting compiler and binutils optionally
Instead of muting all compiler and other binutils output by default,
introduce a variable to make this behaviour configurable.
2014-01-05 16:11:08 +01:00
Oleg Hahm
02612ff0ca further Makefile cleanup 2014-01-05 16:11:08 +01:00
Oleg Hahm
c7d985d371 removed redundant include pathes from Makefiles 2014-01-05 16:11:08 +01:00
Oleg Hahm
55f31a4829 simplify include structure for boards
* do not overwrite CFLAGS in boards Makefile
2014-01-05 16:11:07 +01:00
Oleg Hahm
1e665b49de build everything in the project directory 2014-01-05 16:11:07 +01:00
Ludwig Ortmann
cf87e647c0 make native includes RIOT posix compatible 2013-12-22 23:26:54 +01:00
Ludwig Ortmann
77e8cbb112 remove ltc disable race 2013-12-19 17:39:02 +01:00
Ludwig Ortmann
579c1edb04 clean up native ltc 2013-12-19 17:39:02 +01:00
Christian Mehlis
6aec050fc4 initialize id and only remove a valid timer 2013-12-19 17:39:01 +01:00
Christian Mehlis
a38928e5c3 rename variables to match the guidelines (use module prefix) 2013-12-19 17:39:01 +01:00
Christian Mehlis
4be9764f80 removed useless code 2013-12-19 17:39:01 +01:00
Oleg Hahm
903ec54a43 making include directives consistent 2013-12-19 15:31:37 +01:00
Christian Mehlis
d82a5b67db added missing thread include 2013-12-19 13:06:26 +01:00
Christian Mehlis
e065888cdb added ENABLE_DEBUG macro 2013-12-19 13:05:49 +01:00
Hauke Petersen
c629229e8d Added the boards folder to the doxygen tree
- added boards to riot.doxyfile
- fixed group definitions for all boards
2013-12-16 14:00:37 +01:00
Christian Mehlis
fc80c22c3c reduce LTC_TIMER_INTERVAL by the factor of 10 to be more precise 2013-12-10 22:22:33 +01:00
Christian Mehlis
7bc09fdc0f make LTC_TIMER_INTERVAL a named define 2013-12-10 22:21:51 +01:00
Christian Mehlis
ed4ed963ce added missing timer remove on the end of the measurement 2013-12-10 22:20:16 +01:00
Ludwig Ortmann
864267f238 daemonization, io socket and file redirection 2013-12-10 17:00:01 +01:00
Ludwig Ortmann
9e87d7a244 fix native board license headers 2013-11-23 13:11:56 +01:00
Ludwig Ortmann
d6c213fb47 fix grammar in license header 2013-11-23 13:11:56 +01:00
Ludwig Ortmann
6d16520387 add -Wextra -pedantic to native CFLAGS
it's all about code quality
2013-11-22 10:56:28 +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
Oleg Hahm
232e205137 moved boards into subdirectory 2013-11-06 10:11:57 -08:00