Commit Graph

185 Commits (pr/rotary)

Author SHA1 Message Date
Ludwig Ortmann ba59ecdaae native: fix and improve term-valgrind flags 9 years ago
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.
9 years ago
Ludwig Ortmann 3ca4f18479 doc: use lgplv2.1-short license header instead of lgpl-short-riot 9 years ago
Ludwig Ortmann 3cda0369cb native: cleanup
fix style
fix some syscall declarations
reorder syscall declarations
init syscalls in dedicated function
substitute 1 with EXIT_FAILURE
9 years ago
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
9 years ago
Ludwig Ortmann df36f6304a native: remove stale TODOs and blank line
The values are quite OK.
9 years ago
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.
9 years ago
Pham Huu Dang Nhat f7398f61ff Changed RIOT/Makefile.include, Makefile.base, Makefile.cflags, and native/Makefile.include to compile C and C++ files. 9 years ago
René Kijewski 2ae0c1b149 make: use abspath for better error messages 9 years ago
René Kijewski a9a76cb2c2 make: create dependencies as side effect 9 years ago
Ludwig Ortmann 741d9beeb0 Merge pull request #1332 from Kijewski/native-fix-warnings-in-default
native: remove some warnings about undef functions
9 years ago
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.
9 years ago
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`.
9 years ago
Ludwig Ortmann dbc36fc2c5 native: add id option 9 years ago
Ludwig Ortmann 1e5e19bc23 native: set optional path with unix socket option
fixes #1045
9 years ago
Thomas Eichinger 1e983c9670 s/PROJECT/APPLICATION/g
fixes #548
9 years ago
Ludwig Ortmann 98bbb80571 documentation: append my email to my name everywhere 9 years ago
Ludwig Ortmann 2c5c177f75 native: unify license headers 9 years ago
Ludwig Ortmann d7b3d21bfe native: initialize maybe uninitialized variable
fixes #1118
9 years ago
René Kijewski 8038e96d09 Merge pull request #1119 from Kijewski/error_old-style-definition
Exterminate old-style function definitions
9 years ago
Ludwig Ortmann 4c961bfb6e native: refactor getpid calls 9 years ago
René Kijewski 9a9caf2c68 Exterminate old-style function definitions 9 years ago
Ludwig Ortmann e4e3ef4daf make/native: remove -gc flag
Yields warning on OSX.
Uncertain why it was there in the first place.

Fixes #1125
9 years ago
Hauke Petersen 7545eff784 core/cpu/board: moved F_CPU define to board 9 years ago
René Kijewski a8064fd97c Automatically remove dups in `$(USEMODULE)` 9 years ago
René Kijewski 4c66f72ba3 Merge pull request #1022 from LudwigOrtmann/issue_505
native: update support for FreeBSD
9 years ago
Ludwig Ortmann b089798bf9 native/make: add missing target 9 years ago
Ludwig Ortmann 42aa3d9f5b native: update support for FreeBSD
works with FreeBSD 10.0 amd64/i386

fixes: #505
9 years ago
Ludwig Ortmann b22f0e6a09 native/make: set all binutils with ?= instead of = 9 years ago
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.
9 years ago
Ludwig Ortmann 9f24ae2e62 Merge pull request #946 from Kijewski/native-write
native: don't use RIOT read/write in UART
9 years ago
Ludwig Ortmann b9ffc1a99e fixup for #710: use subfolder in bin dirs (native)
Update native Makefiles to provide changed object target paths
Fixes #989
9 years ago
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
```
9 years ago
Oleg Hahm 1e9a43d0f8 Merge pull request #778 from LudwigOrtmann/dependency_files
Make: Prepend path to dependency info files with sed
9 years ago
René Kijewski 2749531324 Merge pull request #789 from LudwigOrtmann/native_gprof
native profiling tools support
9 years ago
Ludwig Ortmann b2930113ef remove some newlines 9 years ago
Ludwig Ortmann a1aa0df9ae change new/overlooked Makefiles 9 years ago
René Kijewski 0b75a11291 native: don't use RIOT read/write in UART 9 years ago
Martine Lenders 53264c7a45 Merge pull request #609 from LudwigOrtmann/transceiver_any
anytransceiver pseudomodule
9 years ago
Ludwig Ortmann 8ac4f3332d core cpu: add defaulttransceiver pseudomodule
update examples/default
9 years ago
Ludwig Ortmann 0501fe8980 native: config_load: set PID as id, net address 9 years ago
Ludwig Ortmann dfd0b43cbe add variables for gprof, cg_annotate 9 years ago
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
9 years ago
Ludwig Ortmann ae898ef9eb rebase_fixup 9 years ago
Ludwig Ortmann ad1d8df080 change target name, add cachegrind target 9 years ago
Ludwig Ortmann 8ef02d3b9d native profiling support
only works with Linux for now
9 years ago
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.
9 years ago
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.
9 years ago
Oleg Hahm 93e32953b3 always build and initialize hwtimer
Eliminates special treatment of the hwtimer module and makes it a
mandatory part of the kernel.
9 years ago
Christian Mehlis 09bdb56d52 native: fix function prototype to match to api 9 years ago
Oleg Hahm 6c0482b976 Merge pull request #701 from Kijewski/issue-672
Use `filter` instead of `findstring`
9 years ago
René Kijewski 102dc45382 Eliminate findstring in more places 9 years ago
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`.
9 years ago
Ludwig Ortmann 336c5159b2 use pkg-config to add valgrind include path
makes knowledge of VALGRIND_VALGRIND_H vs. VALGRIND_H optional
9 years ago
Ludwig Ortmann 2525920426 remove trailing whitespace and newlines 9 years ago
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
9 years ago
Ludwig Ortmann 0ee91da42f valgrind target 9 years ago
Ludwig Ortmann 94ac6ddbd2 refactor and clean up native Makefile 9 years ago
Ludwig Ortmann e083e9bcb8 configure debug target for native 9 years ago
Ludwig Ortmann 855eea6a53 add missing newlines 10 years ago
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
10 years ago
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.
10 years ago
Oleg Hahm 02612ff0ca further Makefile cleanup 10 years ago
Oleg Hahm c7d985d371 removed redundant include pathes from Makefiles 10 years ago
Oleg Hahm 55f31a4829 simplify include structure for boards
* do not overwrite CFLAGS in boards Makefile
10 years ago
Oleg Hahm 1e665b49de build everything in the project directory 10 years ago
Ludwig Ortmann cf87e647c0 make native includes RIOT posix compatible 10 years ago
Ludwig Ortmann 77e8cbb112 remove ltc disable race 10 years ago
Ludwig Ortmann 579c1edb04 clean up native ltc 10 years ago
Christian Mehlis 6aec050fc4 initialize id and only remove a valid timer 10 years ago
Christian Mehlis a38928e5c3 rename variables to match the guidelines (use module prefix) 10 years ago
Christian Mehlis 4be9764f80 removed useless code 10 years ago
Oleg Hahm 903ec54a43 making include directives consistent 10 years ago
Christian Mehlis d82a5b67db added missing thread include 10 years ago
Christian Mehlis e065888cdb added ENABLE_DEBUG macro 10 years ago
Hauke Petersen c629229e8d Added the boards folder to the doxygen tree
- added boards to riot.doxyfile
- fixed group definitions for all boards
10 years ago
Christian Mehlis fc80c22c3c reduce LTC_TIMER_INTERVAL by the factor of 10 to be more precise 10 years ago
Christian Mehlis 7bc09fdc0f make LTC_TIMER_INTERVAL a named define 10 years ago
Christian Mehlis ed4ed963ce added missing timer remove on the end of the measurement 10 years ago
Ludwig Ortmann 864267f238 daemonization, io socket and file redirection 10 years ago
Ludwig Ortmann 9e87d7a244 fix native board license headers 10 years ago
Ludwig Ortmann d6c213fb47 fix grammar in license header 10 years ago
Ludwig Ortmann 6d16520387 add -Wextra -pedantic to native CFLAGS
it's all about code quality
10 years ago
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
10 years ago
Oleg Hahm 232e205137 moved boards into subdirectory 10 years ago