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

137 Commits

Author SHA1 Message Date
Gaëtan Harter
9c5688ea27
boards/native: remove toolchain variables duplication
The toolchain variables were overwritten anyway in
`makefiles/toolchain/gnu|llvm.inc.mk` as they use `=` affectation,
except for `OBJCOPY`.

On my Linux ubuntu bionic machine, the only difference for `info-build`
with both gnu/llvm and also with LTO=1
is that it now uses an absolute path for `objcopy`

    -OBJCOPY: objcopy
    +OBJCOPY: /usr/bin/objcopy

On the OSX 17.7.0 I tested, there was no difference.
2019-06-04 16:00:24 +02:00
Gaëtan Harter
c103b3f6ba serial: Do not export PORT.
This variable is only used for the term recipe (and maybe for flashing). They
should not be evaluated if they are not needed and the user should not see a
warning that the port is not set if he does not use port (for example in make
all.)
2019-06-03 16:31:21 +02:00
Gaëtan Harter
7306dbd382
boards/tools: remove exporting DEBUG*
DEBUGGER/DEBUGGER_FLAGS/DEBUGSERVER/DEBUGSERVER_FLAGS are evaluated by the
main Makefile.include or by file included by it.
Their value does not need to be exported.

Testing
-------

`git diff --word-diff` only reports `export` being removed.

`git show --stat` reports `55 insertions(+), 55 deletions(-)`
Which is the same amount as lines that where matching
`export[[:blank::]]\+VARIABLE`.
2019-05-28 09:58:35 +02:00
Gaëtan Harter
ac113ca2f8
boards/tools: remove exporting FLASHER/FFLAGS
FLASHER and FFLAGS are evaluated by the main Makefile.include or by file
included by it. Their value does not need to be exported.

This will also prevent evaluating 'PORT' for FFLAGS when not needed.

Testing
-------

`git diff --word-diff` only reports `export` being removed.

`git show --stat` reports `84 insertions(+), 84 deletions(-)`
Which is the same amount as lines that where matching
`export[[:blank::]]\+VARIABLE`.
2019-05-28 09:56:00 +02:00
Martine Lenders
790f763d3d native: use -g3 instead of -g 2019-03-26 18:53:27 +01:00
Gaëtan Harter
3b119cc5ba
boards/native: unexport TERM* variables
TERMPROG and TERMFLAGS variables do not need to be exported as they are
used directly by a make receipe.
2019-02-25 17:26:03 +01:00
Vincent Dupont
0cbef09575 native: use gnu99 by default 2018-10-04 08:48:43 +02:00
Gaëtan Harter
40c28d78c0 Revert "native: remove non required NATIVEINCLUDES"
This reverts commit 93a521c501.
2018-04-12 17:48:07 +02:00
cladmi
3f145413f5 boards/makefiles: Remove '-Otype' from OFLAGS
* Remove '-Oihex' and '-Obinary' from OFLAGS for all boards
  It is now provided by the Makefile.include rule.
2018-04-09 17:32:46 +02:00
cladmi
70c5079b16 Makefile.include: add %.hex and %.bin rules
Replace HEXFILE rule by a rule for each type.
HACK: Adding '-Oformat' after OFLAGS overwrite the value in flags.
2018-04-09 17:32:46 +02:00
Gaëtan Harter
21a9958323
Merge pull request #8822 from aabadie/pr/make_curly
make: replace curly braces with parenthesis
2018-03-27 15:44:36 +02:00
61f1b941ce make: replace curly braces with parenthesis 2018-03-22 20:43:15 +01: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
Pieter Willemsen
f2f6801987 board/native: use ELFFILE for 'make term' 2018-01-31 11:59:07 +01:00
56fa737d83 boards: makefiles indentation cleanup 2017-09-22 14:53:01 +02:00
Oleg Hahm
ccb9179c23 Merge pull request #5824 from kaspar030/change_default_c_dialect
make: use -std=c99 as default
2016-12-08 13:44:34 -05:00
Martine Lenders
235375f664 native: always assert() verbosely 2016-11-29 19:28:23 +01:00
517efe4ccc cpu: native: use gnu99 C dialect 2016-11-15 14:59:36 +01:00
Martine Lenders
2d89169d00 Merge pull request #5991 from Yonezawa-T2/use_lldb
make: use LLDB if GDB is not available on native platform
2016-10-31 15:43:39 +01:00
Takuo Yonezawa
f2ea42c043 NEED SQUASHING make: use LLDB on Darwin 2016-10-27 14:50:16 +09:00
Cenk Gündoğan
41011184a5 Merge pull request #5988 from cgundogan/pr/native/term
boards/native: set PORT to tap0
2016-10-25 19:40:44 +02:00
Takuo Yonezawa
160ef548f8 make: use LLDB if GDB is not available 2016-10-25 16:31:40 +09:00
Martine Lenders
3225f020e5 Merge pull request #5964 from kaspar030/make_fix_appdir_bindir
make: remove trailing slash from BINDIR and APPDIR variables
2016-10-24 14:33:40 +02:00
Cenk Gündoğan
50a77aa7e6 boards/native: set PORT to tap0
`PORT` is unset if `netdev2_tap` is not in `USEMODULES`.
But unfortunately, `netdev2_tap` is set by boards/native/Makefile.dep
*after* `PORT` is set, so that `PORT` remains empty.

This commit breaks this circular dependency by checking for
`netdev_default` and `gnrc_netdev_default` instead.

Without this commit, `make term` throws an error for examples that
require a tap interface, when `PORT` is not explicitely given.
2016-10-24 12:05:10 +02:00
560a509036 make: remove trailing slash from BINDIR variable 2016-10-18 23:27:59 +02:00
10e9336c78 boards: adapt to automatically included boards/$board/Makefile.dep 2016-09-29 15:41:12 +02:00
Martine Lenders
fc1e974102 Merge pull request #5493 from OlegHahm/silent_valgrind
native: let valgrind print the leak summary at the end
2016-09-29 08:41:35 +02:00
Oleg Hahm
7767d5a101 native: enable valgrind's leak summary 2016-09-29 00:37:33 +02:00
smlng
291c1a54eb native: correcting linker LTO flags for OSX
- corrects and enhances changes introduced in #5742
2016-09-12 15:41:38 +02:00
Joakim Nohlgård
5fcb09f6b9 boards/native/Makefile.include: Add -Wl,--gc-sections to linker options 2016-08-10 16:18:29 +02:00
Joakim Nohlgård
0e5522950a boards/native: Use gcc-ar when building with LTO 2016-08-10 16:18:29 +02:00
Toon Stegen
cf431e696c make debug: start gdb quietly 2016-04-22 12:00:10 +02:00
2a69cf2af5 make: native: allow overriding of TERMPROG 2016-03-23 23:56:18 +01:00
Oleg Hahm
0530bc9c6c make: export VALGRIND_PID only for debug-valgrind 2016-03-15 13:53:55 +01:00
Joakim Nohlgård
e9d7087a05 boards/native: Use another module name for drivers subdirectory 2016-03-08 14:19:52 +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
ef972735dc sys: net: replace dev_eth with netdev2, adapt native tap driver 2015-09-04 15:39:04 +02:00
Thomas Eichinger
9c4b511e7d native: don't warn for deprecated code
As native uses the `ucontext` API this change is needed on OS X
as this API is marked as deprecated.
2015-09-02 17:34:47 +02:00
Hauke Petersen
ca8c27a753 boards/native: fixed PORT selection for dev_eth_tap 2015-08-11 19:04:26 +02:00
Thomas Eichinger
3aaa431262 Merge pull request #3297 from gebart/pr/native-linker-sections
native: Add -ffunction-sections -fdata-sections to CFLAGS
2015-07-15 11:26:42 +02:00
Thomas Eichinger
238dda4423 board/native: fix CFLAGS and LINKFLAGS for FreeBSD 2015-07-13 12:49:27 +02:00
Martine Lenders
8a33a62914 native: add address sanitizer make target 2015-07-09 15:00:19 +02:00
Joakim Gebart
30dee9c561 native: Add -ffunction-sections -fdata-sections to CFLAGS 2015-07-02 05:58:51 +02:00
Oleg Hahm
e2764e7464 native: append tap parameter for ng_nativenet, too 2015-05-27 21:49:29 +02:00
Martine Lenders
449d2735c5 native: fix termflags 2015-02-21 16:14:36 +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
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
Thomas Eichinger
2382a4d320 native: fix Makefiles for OSX 2014-11-13 16:00:52 +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
Martine Lenders
b3f59eec65 make: initialize debugger with TERMFLAGS 2014-10-21 19:49:00 +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
3d29a9e3d3 native: add support for Linux on ARM 2014-09-04 16:39:33 +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
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
Thomas Eichinger
1e983c9670 s/PROJECT/APPLICATION/g
fixes #548
2014-05-26 13:21: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
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
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
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
8ac4f3332d core cpu: add defaulttransceiver pseudomodule
update examples/default
2014-03-18 10:18:15 +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
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
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
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
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
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