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

126 Commits

Author SHA1 Message Date
Ludwig Ortmann
71b961bef7 make: .PHONY missing targets from Makefile.include 2014-09-27 08:11:44 +02:00
Ludwig Ortmann
9053cfe2de make: add objdump target 2014-09-27 08:11:29 +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
René Kijewski
a70ee0f022 make: centralize wget/curl & unzip/7z feature test
With many open PRs that could benefit from loading SDKs when needed,
instead adding vast amounts of code to RIOTs master, this PR provides
the "functions" `$(DOWNLOAD_TO_STDOUT)`, `$(DOWNLOAD_TO_FILE)`, and
`$(UNZIP_HERE)`.

The first "function" takes one argument, the URL from where to download
the content. It is then piped to stdout. To be used e.g. with `tar xz`.

The second "function" taken two arguments, the destination file name,
and the source URL. If the previous invocation was interrupted, then the
download gets continued, if possible.

The last "function" takes one argument, the source ZIP file. The file
gets extracted into the cwd, so best use this "function" with
`cd $(SOME_WHERE) &&`.

The clumsy name `$(UNZIP_HERE)` is taken because the program "unzip"
takes the environment variable `UNZIP` as the source file, even if
another file name was given on the command line. The rationale for that
is that the hackers of "unzip" hate their users. Also they sacrifice
hamsters to Satan.
2014-08-21 19:07:52 +02:00
Martine Lenders
04489be771 [SQUASH ME] make: Move buildtest related PHONY targets to Makefile.buildtests 2014-08-13 21:24:07 +02:00
Martine Lenders
86d8dede48 [SQUASH ME] make: Add info prefix for non-building targets in Makefile.buildtests 2014-08-11 11:33:18 +02:00
Martine Lenders
30fc8671cd [SQUASH ME] make: move info-boards-supported to Makefile.buildtests 2014-08-11 11:28:17 +02:00
Martine Lenders
0c68712fa8 make: Add target to show if boards that are supported by apps 2014-08-09 03:33:45 +02:00
Hauke Petersen
34abdbe5f2 make: added targets 'debug-server' and 'reset'
- added targets to Makefile.include
- added DEBUGSERVER and RESET vars to Makefile.vars
- added output of those to Makefile.buildtests
2014-08-05 22:52:34 +02:00
Oleg Hahm
6340123558 make: introduced TERMFLAGS
Also added the missing -p flag for the new pyterm version where
necessary.
2014-08-01 17:09:45 +02:00
René Kijewski
b7b7fd3bc1 make: provide BOARD, MCU and CPU name as a string
This PR adds the defined `RIOT_BOARD`, `RIOT_CPU` and `RIOT_MCU`.
They each are defined as `BOARD_${BOARD}`, `CPU_${CPU}`, and
`MCU_${CPU}`, resp.

`BOARD_${BOARD}` is defined as the string `"${BOARD}"`, but not in upper
case. Same for the other two.
2014-08-01 02:40:40 +02:00
René Kijewski
f183730917 make: force traversal into PKG's, same as normal modules 2014-07-31 14:22:34 +02:00
Ludwig Ortmann
e677aa4ec0 make: add RIOTBASE to UNKNOWN RIOT_VERSION 2014-07-30 15:50:44 +02:00
Ludwig Ortmann
9d9d2aff93 make: make RIOT_VERSION fail-safe 2014-07-30 15:33:07 +02:00
Ludwig Ortmann
e5613d308a make: allow setting RIOT_VERSION externally
also make the RIOT_VERSION variable available in buildtest
2014-07-29 19:08:41 +02:00
René Kijewski
919cddef19 make: rename VERSION into RIOT_VERSION
Building MSP boards gives an error, because `VERSION` is somewhere
defined in their toolchain as an integer.

This PR renames `VERSION` into `RIOT_VERSION`, because that's what it
is.
2014-07-10 21:48:22 +02:00
René Kijewski
747138cf99 make: move exported make vars to one place 2014-07-10 15:20:37 +02:00
Leon George
215c9aae2b make: allow chosing ld-like over gcc-like options
make automatically adds '-Wl,' to linker-options. Supply `LINKFLAGPREFIX :=` to avoid that.
2014-07-05 01:33:08 +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
2f66319a3a make: OSX: don't fail for empty .a archives
Fixes issue #1333.
2014-06-24 20:29:32 +02:00
René Kijewski
d19fc447ed make: make DIRS usable for applications 2014-06-23 15:50:10 +02:00
René Kijewski
35e74ad725 make: refactor make system (parallelism, deduplication)
Almost everything was build sequentially in RIOT, because we employed
explicit for-loops to build directories (DIRS). This PR makes our make
system use normal dependencies to build directories.

All our compiling rules were duplicated, once for the application, once
for modules. This PR makes the application a normal module, removing
this duplication.
2014-06-23 15:49:55 +02:00
René Kijewski
35d024fff0 Merge pull request #1340 from Kijewski/evaluate-git-sha-once
make: evaluate the Git SHA only once
2014-06-21 19:19:24 +02:00
René Kijewski
1d34522703 make: evaluate the Git SHA only once 2014-06-21 18:29:16 +02:00
Ludwig Ortmann
de4677eb60 make: s/PROJDEPS/APPDEPS/
fixes https://github.com/RIOT-OS/RIOT/issues/1284
2014-06-21 18:28:34 +02:00
Oleg Hahm
bd94bd22f6 Merge pull request #1209 from Kijewski/buildinfo
make: add comprehensive `buildinfo` list
2014-06-02 14:04:01 +02:00
Thomas Eichinger
1e983c9670 s/PROJECT/APPLICATION/g
fixes #548
2014-05-26 13:21:09 +02:00
René Kijewski
054f9fd026 make: fix clean together with TLSF 2014-05-24 19:22:18 +02:00
René Kijewski
4198b7518c make: add BOARD_INSUFFICIENT_RAM blacklisting
Currently most blacklistings for examples and tests are done because the
board provides too little RAM or ROM. Besides of the actual linking all
the compiling should nevertheless work just fine.

This PR adds the variable `BOARD_INSUFFICIENT_RAM` to tell the
`buildtest` to compile the code for a board, but omit the linking step.
2014-05-23 14:29:38 +02:00
René Kijewski
27ae094413 make: remove clutter
Remove some outdated example code.
2014-05-23 14:28:27 +02:00
René Kijewski
9f40d019e3 Merge pull request #1201 from Kijewski/exclusive-make-clean
make: make clean usable together with `-j`
2014-05-23 03:48:55 +02:00
René Kijewski
5cb1d03ef4 make: add comprehensive buildinfo list
Sometimes it is difficult to track down build errors for boards that you
are unfamiliar with.

This change adds `make buildinfo` that prints out all the relevant build
information for the selected board and project:

```
PROJECT: default
BOARD:   msba2
CPU:     lpc2387
MCU:     lpc2387

RIOTBASE:  /home/kijewski/RIOT/RIOT
RIOTBOARD: /home/kijewski/RIOT/RIOT/boards
RIOTCPU:   /home/kijewski/RIOT/RIOT/cpu

DEFAULT_MODULE: auto_init core cpu sys
DISABLE_MODULE:
USEMODULE:      arm_common cc110x_ng cc110x_spi config defaulttransceiver gpioint lib lpc_common ltc4150 mci net_help posix protocol_multiplex ps random rtc shell shell_commands sht11 timex transceiver uart0 vtimer

ELFFILE: /home/kijewski/RIOT/RIOT/examples/default/bin/msba2/default.elf
HEXFILE: /home/kijewski/RIOT/RIOT/examples/default/bin/msba2/default.hex

CC: arm-none-eabi-gcc
CFLAGSS:
        -DBOARD_MSBA2
        -DCPU_LPC2387
        -DMODULE_ARM_COMMON
        -DMODULE_AUTO_INIT
        -DMODULE_CC110X_NG
        -DMODULE_CC110X_SPI
        -DMODULE_CONFIG
        -DMODULE_CORE
        -DMODULE_CPU
        -DMODULE_DEFAULTTRANSCEIVER
        -DMODULE_GPIOINT
        -DMODULE_LIB
        -DMODULE_LPC_COMMON
        -DMODULE_LTC4150
        -DMODULE_MCI
        -DMODULE_NET_HELP
        -DMODULE_POSIX
        -DMODULE_PROTOCOL_MULTIPLEX
        -DMODULE_PS
        -DMODULE_RANDOM
        -DMODULE_RTC
        -DMODULE_SHELL
        -DMODULE_SHELL_COMMANDS
        -DMODULE_SHT11
        -DMODULE_SYS
        -DMODULE_TIMEX
        -DMODULE_TRANSCEIVER
        -DMODULE_UART0
        -DMODULE_VTIMER
        -O2
        -Wall
        -Wstrict-prototypes
        -mcpu=arm7tdmi-s
        -gdwarf-2
        -std=gnu99
        -fno-delete-null-pointer-checks
        -Wstrict-prototypes
        -Werror=strict-prototypes
        -Wold-style-definition
        -Werror=old-style-definition

LINK: arm-none-eabi-gcc
LINKFLAGS:
        -gdwarf-2
        -mcpu=arm7tdmi-s
        -static
        -lgcc
        -nostartfiles
        -T/home/kijewski/RIOT/RIOT/cpu/lpc2387/linkerscript.x

OBJCOPY: arm-none-eabi-objcopy
OFLAGS:  -O ihex

FLASHER: lpc2k_pgm
FFLAGS:  /dev/ttyUSB0 /home/kijewski/RIOT/RIOT/examples/default/bin/msba2/default.hex

TERMPROG: /home/kijewski/RIOT/RIOT/dist/tools/pyterm/pyterm.py
PORT:     /dev/ttyUSB0

DEBUGGER:
DEBUGGER_FLAGS:

MAKEFILE_LIST:
        /home/kijewski/RIOT/RIOT/examples/default/Makefile
        /home/kijewski/RIOT/RIOT/Makefile.include
        /home/kijewski/RIOT/RIOT/Makefile.modules
        /home/kijewski/RIOT/RIOT/Makefile.pseudomodules
        /home/kijewski/RIOT/RIOT/Makefile.defaultmodules
        /home/kijewski/RIOT/RIOT/boards/msba2/Makefile.include
        /home/kijewski/RIOT/RIOT/boards/msba2-common/Makefile.include
        /home/kijewski/RIOT/RIOT/boards/msba2-common/Makefile.dep
        /home/kijewski/RIOT/RIOT/cpu/lpc2387/Makefile.include
        /home/kijewski/RIOT/RIOT/cpu/arm_common/Makefile.include
        /home/kijewski/RIOT/RIOT/cpu/lpc_common/Makefile.include
        /home/kijewski/RIOT/RIOT/Makefile.dep
        /home/kijewski/RIOT/RIOT/Makefile.cflags
        /home/kijewski/RIOT/RIOT/sys/Makefile.include
        /home/kijewski/RIOT/RIOT/drivers/Makefile.include
        /home/kijewski/RIOT/RIOT/Makefile.buildtests
```
2014-05-18 18:59:51 +02:00
René Kijewski
3d6c7008e5 make: make clean usable together with -j 2014-05-16 19:11:55 +02:00
René Kijewski
66a3d7da77 make: fix #1197
Partial revert of 85b7eca19e

Fixes #1197.
2014-05-16 18:18:35 +02:00
René Kijewski
e189064171 make: print error if make was executed in the root
Fixes #1104, alternative to #1178.
2014-05-15 20:07:32 +02:00
Martine Lenders
47373a9e4a Merge pull request #1098 from authmillenon/make-addon
make: Make make more flexible
2014-05-15 01:19:11 +02:00
René Kijewski
fe8710ce05 make: put buildtest goals into an own file
`Makefile.include` is too long as is.
2014-05-14 19:12:09 +02:00
Martin Lenders
8fd09c575c Make directory creation in object compilation more makey 2014-05-14 18:16:40 +02:00
Martin Lenders
85b7eca19e Move .elf file to it's own target 2014-05-14 18:16:40 +02:00
Martin Lenders
c710062f86 Introduce macro to define files that should be deleted on make clean 2014-05-14 18:16:39 +02:00
René Kijewski
073bdfe9ec make: add own file for CFLAGS feature tests 2014-05-12 21:57:09 +02:00
René Kijewski
f02e5b97e2 make: show diffence in buildsizes for two folders 2014-04-23 17:19:19 +02:00
René Kijewski
bb3b3bffa7 make: add maketarget to to show the biggest obj files 2014-04-23 17:18:50 +02:00
René Kijewski
f2e73863cb make: comprehensive list of the boards' filesizes 2014-04-23 17:18:19 +02:00
René Kijewski
542a2e5d9d Merge pull request #995 from Kijewski/issue-993
Make: exterminate 'clean' buildtarget clutter
2014-04-18 16:11:15 +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
René Kijewski
49c3fd666c Make: fix linebreaks in buildtest 2014-04-09 12:40:58 +02:00
Oleg Hahm
4fd851bccf Merge pull request #855 from authmillenon/board_macro
make: Fix BOARD and CPU macros
2014-04-09 01:24:58 +02:00
René Kijewski
e740fbc800 make: Add DEFAULT_MODULE and DISABLE_MODULE
Closes #926
2014-04-01 23:42:00 +02:00
René Kijewski
de29e4184c Add include paths automatocally for USEMODULES
Application developers use `$(USEMODULES)` in their Makefiles to have
the relevant functionally automagically added to their apps. This even
does basic dependency tracking by means of `Makefile.dep`.

But an important thing is missing: the automatic adding of include
paths. This is inconvenient, error prone, and will hinder the RIOT core
developers in future to change folder structures.
2014-03-29 16:27:55 +01:00