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

146 Commits

Author SHA1 Message Date
Hauke Petersen
37d4f44379 cpus: mv vendor headers to include/vendor/. 2017-03-07 08:55:15 +01:00
Hauke Petersen
4bfce892d3 drivers/periph&cpu: add and use common periph_init() 2017-01-25 16:46:46 +01:00
d1db946188 Merge pull request #6344 from haukepetersen/opt_pm_misc
pm: misc cleanup and fixes
2017-01-24 14:07:36 +01:00
3e49d0c8c6 Merge pull request #6434 from aabadie/petersen_typo
cpu: fix typo in author email
2017-01-20 10:43:24 +01:00
245f60edfa cpu: fix typo in author email 2017-01-19 21:45:23 +01:00
Oleg Hahm
7ee7801c10 *: remove trailing underscores from header guards 2017-01-19 18:30:53 +01:00
Hauke Petersen
61045d127c cpu/lpc1768: unuse module periph_common 2017-01-19 11:05:44 +01:00
Oleg Hahm
d0316fa7ae periph timer: remove timer_irq_(en|dis)able 2017-01-14 15:34:53 +01:00
52d53a92ab cpu: lpc1768: adapt to periph/pm 2017-01-12 16:26:01 +01:00
0194091673 remove obsolete lpm code 2017-01-12 11:24:15 +01:00
Hauke Petersen
3a00fe8e49 cpus: make use of cortexm_isr_end() 2016-12-21 11:28:46 +01:00
Hauke Petersen
2eebf36eb2 cpu/uart: make use of named return values 2016-10-28 10:32:00 +02:00
5ab97fe38b cpu: build cortexm vectors.c without LTO 2016-08-29 13:30:17 +02:00
Joakim Nohlgård
5f313898bf cpu/lpc1768: Add __attribute__((used)) to interrupt vector 2016-08-10 16:18:29 +02:00
zhuoshuguo
1cbe79a373 CPU: fix include header guards
Fix cpu/lpc2387/include/lpc2387.h
2016-06-08 16:38:20 +02:00
Hauke Petersen
b23cde98cf cpus: adapted UART implementations to cb type change 2016-03-15 11:02:06 +01:00
nqdinh
5ad659a54a cpu/lpc1768: added cpuid periph driver implementation 2016-03-10 11:01:34 +07:00
6881f65f46 cpu: cortexm*: move cpu_conf.h stuff from cpu.h into cpu_conf_common.h 2016-03-05 18:20:17 +01:00
Peter Kietzmann
c8829a49b8 Merge pull request #4838 from haukepetersen/fix_periph_timerarg
drivers/timer: added callback argument
2016-03-01 08:55:54 +01:00
Hauke Petersen
b11a3ad74b cpus: adapted timer implementations to API changes 2016-02-29 14:45:00 +01:00
9082273746 core: header cleanup 2016-02-28 22:46:28 +01:00
Joakim Nohlgård
8d4fd5a814 cpu/lpc1768: Update to match timer_init API change 2016-02-13 21:29:36 +01:00
938ff5c5e7 core: cpu: sys: simplify reboot() 2016-01-27 13:30:01 +01:00
Hauke Petersen
68670f038f cpu/lpc1768: adapted UART driver 2015-10-27 14:59:38 +01:00
Joakim Nohlgård
cbaeccdb90 periph/timer: Drop timer_reset 2015-10-17 20:11:03 +02:00
8b46d1dfc4 cpu: lpc1768: remove obsolete hwtimer support 2015-09-16 10:58:52 +02:00
Hauke Petersen
3d6661fa62 cpu/lpc1768: included dev_enums.h in periph_cpu.h 2015-08-03 13:56:16 +02:00
Hauke Petersen
7173b41069 cpu/lpc1768: use hwtimer_compat module 2015-07-15 16:06:08 +02:00
Hauke Petersen
983e8abd74 cpu/lpc1768: optimized startup code
- make use of common cortexm isr vectors
- use common cortexm startup code
- renamed startup.c to vectors.c
2015-06-15 16:00:51 +02:00
Hauke Petersen
17c8640708 cpu/lpc1768: added periph_cpu.h 2015-06-12 19:10:49 +02:00
Hauke Petersen
744ec88a74 cpu: use cortexm common linkerscript 2015-05-30 13:43:19 +02:00
Joakim Gebart
c09a8484e2 cortexm: Move ldscripts into separate directory
Less clutter inside the cpu/* directories by placing linker scripts
under cpu/*/ldscripts/CPUNAME.ld
2015-05-30 12:20:07 +02:00
Hauke Petersen
aa728e0506 cpu/lpc1768: adapted to centralized cpu conf 2015-05-29 16:42:05 +02:00
haukepetersen
0d5c8546f3 cpu: adapted Makefiles to unified cortexm module 2015-05-28 19:30:07 +02:00
Hauke Petersen
9943f51080 global: renamed cpu-conf.h into cpu_conf.h 2015-05-28 15:45:05 +02:00
484c3e3697 cpu: lpc1768: use cortex common makefile and newlib module 2015-05-26 10:46:03 +02:00
Joakim Gebart
13832d8e62 everything: Remove filename from @file Doxygen command 2015-05-22 07:34:41 +02:00
Lucas Jenss
426170b064 Improve naming of thread stacksize/priority constants
As discussed in #2725, this commit renames a number of stacksize constants to
better convey their intended usage. In addition, constants for thread priority
are given a `THREAD_` prefix. Changes are:

* KERNEL_CONF_STACKSIZE_PRINTF renamed to THREAD_EXTRA_STACKSIZE_PRINTF
* KERNEL_CONF_STACKSIZE_DEFAULT renamed to THREAD_STACKSIZE_DEFAULT
* KERNEL_CONF_STACKSIZE_IDLE renamed to THREAD_STACKSIZE_IDLE
* KERNEL_CONF_STACKSIZE_MAIN renamed to THREAD_STACKSIZE_MAIN
* Move thread stacksizes from kernel.h to thread.h, since the prefix changed
* PRIORITY_MIN renamed to THREAD_PRIORITY_MIN
* PRIORITY_IDLE renamed to THREAD_PRIORITY_IDLE
* PRIORITY_MAIN renamed to THREAD_PRIORITY_MAIN
* Move thread priorities from kernel.h to thread.h since the prefix has changed
* MINIMUM_STACK_SIZE renamed to THREAD_STACKSIZE_MINIMUM for consistency
2015-05-21 00:14:23 +02:00
mryndzionek
37f03c6f52 lpc1768: propagate the timer setting result up 2015-05-10 15:44:19 +02:00
Hauke Petersen
31a6e81bd9 cpu/lpc1768: fixed UART PCLK selection 2014-12-19 13:47:58 +01:00
Hauke Petersen
765c4f38e5 Merge pull request #2201 from BytesGalore/mbed_lpc1768_uartUSB
board/mbed_lpc1768 changed the serial device to UART0
2014-12-17 10:35:03 +01:00
BytesGalore
c40e5267a6 board/mbed_lpc1768 changed the serial device to UART0
-> enables USB/serial communication
2014-12-17 07:27:28 +01:00
Hauke Petersen
78eed22dd2 cpu/lpc1768: added basic timer implementation 2014-12-16 16:57:31 +01:00
Hauke Petersen
67b4dfd89d cpu/lpc1768: added basic UART driver 2014-12-08 19:48:20 +01:00
BytesGalore
a4d2ee307c cpu: added extern "C" to headers 2014-11-24 19:10:15 +01:00
Hauke Petersen
2220a9fab0 core/cpu/boards: removed fw_puts from RIOT 2014-11-21 13:09:02 +01:00
Hauke Petersen
9214990aee cpu/lpc1768: heavy clean-up of existing code
- moved to new port structure
- rewrote startup code
- added implementation dummies for UART and timer
- switched to atmel linkerscript
- cleaned up Makefiles
2014-11-20 17:40:57 +01:00
Hauke Petersen
92f5b150b6 cpu/lpc1768: made _kill(_r) syscalls weak 2014-11-18 18:34:30 +01:00
Hinnerk van Bruinehsen
ec98c85a05 lint: fix unusedVariable warnings
SQUASH ME: into unusedVariable (annotated)

SQUASH ME: into unusedVariable (II)

SQUASH ME: into unreadVariable (II)
2014-10-31 01:24:29 +01:00
René Kijewski
677d690e2b core: introduce thread_yield_higher(), yield less
Fixes #1708.

Currently involuntary preemption causes the current thread not only to
yield for a higher prioritized thread, but all other threads of its own
priority class, too.

This PR adds the function `thread_yield_higher()`, which will yield the
current thread in favor of higher prioritized functions, but not for
threads of its own priority class.

Boards now need to implement `thread_yield_higher()` instead of
`thread_yield()`, but `COREIF_NG` boards are not affected in any way.

`thread_yield()` retains its old meaning: yield for every thread that
has the same or a higher priority.

This PR does not touch the occurrences of `thread_yield()` in the periph
drivers, because the author of this PR did not look into the logic of
the various driver implementations.
2014-10-24 00:09:56 +02:00
René Kijewski
aa086158ee Add copyright information to lpc1768/include/cpu.h 2014-10-23 20:50:31 +02:00
Hinnerk van Bruinehsen
d5fe9de5e5 cpu: change __ASM to asm (cppcheck uninitvar error) 2014-09-17 00:20:20 +02:00
Ludwig Ortmann
651cb6ca9f doc: tailor CMSIS doxygen for license checker
Remove '@par' within the license header to allow the existing regular
expression to match it.
2014-09-15 08:27:59 +02:00
René Kijewski
ba07d6a5a2 Merge pull request #1664 from N8Fear/unsignedLessThanZero
lint: _sbrk_r: change parameter type from size_t to ptrdiff_t
2014-09-14 23:33:17 +02:00
Hinnerk van Bruinehsen
129e9b0bfa cpu: multiple: change size_t to ptrdiff_t for_sbrk_r 2014-09-14 22:07:05 +02:00
Hinnerk van Bruinehsen
4d2ca13fcf lint: lpc1768/msp430: remove arith ops on void ptrs 2014-09-14 02:33:44 +02:00
René Kijewski
2cb4166c3e all over the place: use sched_active_pid
In many places we needlessly use `sched_active_thread->pid` whilst we
already have `sched_active_pid` with the same value, and one less
indirection.

`thread_getpid()` is made `static inline` so that there is no penalty in
using this function over accessing `sched_active_pid` directly.
2014-08-17 21:04:25 +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
Ludwig Ortmann
d55da67fb6 Merge pull request #1329 from LudwigOrtmann/riot_license
RIOT default license header change
2014-07-31 23:12:47 +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
Cenk Gündoğan
3989945679 converting tabs to spaces in cpu (#1439)
This PR converts tabs to white spaces.
The statement I used for the conversion:
```find . -name "*.[ch]" -exec zsh -c 'expand -t 4 "$0" > /tmp/e && mv /tmp/e "$0"' {} \;```
Afterwards, I had a quick overview of the converted files to prevent odd indentation.
2014-07-31 20:46:28 +02:00
René Kijewski
867246a09f Add argument to thread_create 2014-07-09 10:07:54 +02:00
René Kijewski
17d89cee7e lpc1768: cleanup Makefile
`cpu/lpc1768/Makefile` contains many lines that don't belong into this
file, but the maybe `Makefile.include`. Either way, this Makefile is
never called with these goals.
2014-06-21 01:17:09 +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
Thomas Eichinger
1e983c9670 s/PROJECT/APPLICATION/g
fixes #548
2014-05-26 13:21:09 +02:00
Oleg Hahm
ad28f4f1c0 cosmetics: converted tabs into spaces for lpc1768 header 2014-05-24 15:57:29 +02:00
Oleg Hahm
ef4fe6616c documentation: unified descriptive text for cpu 2014-05-24 15:56:57 +02:00
Oleg Hahm
bf00b019e4 documentation: CMSIS cleanup
Put all CMSIS documentation into a dedicated subgroup of cpu.
2014-05-22 13:01:36 +02:00
Oleg Hahm
ef5ec344fd core: prefix API functions correctly
Also changed names for bitarithm functions and rename thread_pid to sched_active_pid.
2014-05-18 08:53:20 +02:00
Oleg Hahm
5d7f7dd686 Merge pull request #1079 from BytesGalore/add_NORETURNs
core: and cpu: Added NORETURN to functions that should not return
2014-05-16 00:33:20 +02:00
Jan S
ba907471f3 fixed printf specifiers 2014-05-15 17:42:57 +02:00
Ludwig Ortmann
2314915ff2 license: fix license header grammar
insert missing "is"
2014-05-14 09:49:09 +02:00
Martin
4e73169b38 added NORETURNs to functions that should not return
and added `UNREACHABLE();` to hint the compiler unreachable lines

added right signature for first parameter of `thread_stack_init()`
added `UNREACHABLE();` macro to `cpu/lpc1768/atom.c` and `cpu/msp430-common/cpu.c`
2014-05-08 06:25:25 +02:00
René Kijewski
6f3d0871aa core/cpu: put __builtin_unreachable() into one place 2014-05-07 19:24:55 +02:00
Hauke Petersen
7545eff784 core/cpu/board: moved F_CPU define to board 2014-05-06 10:36:09 +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
Oleg Hahm
aeb54158f6 cpu: satisfy compiler in crash.c 2014-04-09 12:27:53 +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
Ludwig Ortmann
91814e52ae make: replace MAKEBASE with RIOTBASE
closes https://github.com/RIOT-OS/RIOT/issues/959
2014-04-01 16:40:28 +02:00
Hauke Petersen
28f267f8f6 Merge pull request #923 from haukepetersen/mbed_enableIRQ
cpu: added enableIRQ implementation to cpu/lpc1768
2014-03-26 13:55:43 +01:00
Hauke Petersen
8a937e1a1c hwtimer: clean up of interfaces to board/cpu 2014-03-26 13:19:18 +01:00
Hauke Petersen
d3678ca9dd cpu: added enableIRG implementation to cpu/lpc1768 2014-03-25 19:54:06 +01:00
Oleg Hahm
3c54edf4d6 Merge pull request #822 from LudwigOrtmann/reboot_signature
core: change reboot signature.
2014-03-16 18:42:23 +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
063a15ce9b Change reboot signature.
Change from `void reboot(void)` to `int reboot(int mode)`.
Move reboot definition to core, rename architecture implementations
from reboot to reboot_arch.
Declare reboot mode(s) in kernel.h, reboot_arch in kernel_internal.h
Currently only one reboot mode is handled, its use is enforced.

Rationale:
A reboot function is already defined in <unistd.h> on BSD systems.
(See: http://www.openbsd.org/cgi-bin/man.cgi?query=reboot&sektion=2)
This patch not only allows native to build sensibly on these systems
but also streamlines RIOTs compatability with existing software.
2014-03-10 11:14:27 +01:00
Oleg Hahm
0c14597ec2 Merge pull request #685 from rousselk/panic
Panic
2014-02-26 16:26:27 +01:00
Oleg Hahm
07b0cd8863 added gettimeofday syscall
RIOT's gettimeofday needs to be called from syscalls.c to assure that gcc actually links it.

If an RTC if available and enabled it will be used instead.
2014-02-25 17:41:45 +01:00
Kévin Roussel
f4f2519a58 LPC1768 implementation of 'core_panic()'
copied from 'arm_common', for make-related reasons...
2014-02-25 10:50:51 +01:00
Oleg Hahm
0467181093 replaced tabs with spaces 2014-02-15 17:29:49 +01:00
Oleg Hahm
85a05dd794 added reboot and reset handler for lpc1768 2014-02-15 17:29:49 +01:00
Ludwig Ortmann
2525920426 remove trailing whitespace and newlines 2014-02-11 18:45:06 +01:00
Oleg Hahm
4bc6dfbf69 added license headers and doxygen file information
plus replaced tabs with spaces
2014-02-02 22:22:03 +01:00
56ee585c81 update Kaspar's email address
kaspar.schleiser@fu-berlin.de is obsolete.
(2nd try, first try was overwritten by some overzealous documenter)
2014-01-28 11:53:19 +01:00
Oleg Hahm
02612ff0ca further Makefile cleanup 2014-01-05 16:11:08 +01:00
Oleg Hahm
26c50522d5 simplified and unified cpu build structure 2014-01-05 16:11:07 +01:00
Oleg Hahm
b6a7dc953f initial support for the mbed NXP LPC168
* http://mbed.org/platforms/mbed-LPC1768/
2013-11-09 18:40:25 -08:00