Kévin Roussel
25ac0db606
Robust use of TimerA for 'hwtimer' module
2014-12-19 10:53:12 +01:00
Kévin Roussel
d101b30dd8
Make hwtimer_spin() work even with interrupts disabled
...
by using only 16 significative bits on MSP430 hardware timers
2014-12-17 12:21:07 +01:00
BytesGalore
a4d2ee307c
cpu: added extern "C"
to headers
2014-11-24 19:10:15 +01:00
Oleg Hahm
10a4540f2d
license: added missing license for msp430 time.h
2014-11-21 15:10:19 +01:00
Oleg Hahm
39abba1bc2
licenses: fix miss-spelled & missing boiler plates
2014-11-10 18:59:55 +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
Martine Lenders
a569f2b92c
net: Initial import of a global packet buffer
2014-10-16 11:52:30 +02:00
René Kijewski
4e50d74272
core: Provide ssize_t in a common place
...
Now you can include `kernel_types.h` if you need the `ssize_t`, without
facing problems due to the terrible MSP toolchain.
2014-09-26 14:04:30 +02:00
René Kijewski
d4f144eb47
Add license statement to {msp430_types,net_help}.h
2014-09-25 10:14:58 +02:00
Hinnerk van Bruinehsen
4d2ca13fcf
lint: lpc1768/msp430: remove arith ops on void ptrs
2014-09-14 02:33:44 +02:00
Kévin Roussel
a691d0798a
Fixed comments
2014-09-09 13:18:39 +02:00
Kévin Roussel
4421de003b
Fix the race condition when an interruption occured at the beginning
...
of thread_yield(), i.e.: just after SR(R2) was pushed but before
the rest of the suspended thread's context was pushed!
2014-08-29 15:09:23 +02:00
Kévin Roussel
3df5a2745f
Prevent the compiler to add an unwanted prologue in thread_yield()
2014-08-29 15:09:22 +02:00
Kévin Roussel
cf683d9866
Fix thread_yield by avoiding the (too) early re-enablement of IRQ,
...
that is: before the newly selected thread's context is totally restored
2014-08-29 15:09:22 +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
d55da67fb6
Merge pull request #1329 from LudwigOrtmann/riot_license
...
RIOT default license header change
2014-07-31 23:12:47 +02:00
Ludwig Ortmann
c40b281873
doc: use lgplv2.1-short license header instead of lgplv2-short-v3
2014-07-31 22:57:20 +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
Hauke Petersen
9001e0c2fb
core: removed duplicated hwtimer_arch.h
2014-07-09 21:08:13 +02:00
René Kijewski
867246a09f
Add argument to thread_create
2014-07-09 10:07:54 +02:00
René Kijewski
1b89f334e3
msp430: provide oneway-malloc implicitly
...
For MSP430 boards oneway-malloc is already used *if* `malloc.h` was
included. The problem is that `malloc.h` is not a standard header, even
though it is common. `stdlib.h` in the right place to look for
`malloc()` and friends.
This change removes this discrepancy. `malloc()` is just named like
that, without the leading underscore. The symbols now are weak, which
means that they won't override library functions if MSP's standard
library will provide these functions at some point. (Unlikely, since
using `malloc()` on tiny systems is less then optimal ...)
Closes #1061 and #863 .
2014-05-22 15:40:25 +02:00
Oleg Hahm
31351a0dc0
msp430: workaround: define errno values if not provided by MSP430 lib
2014-05-19 18:54:20 +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
René Kijewski
55b12034a9
msp430: fix missing members in struct tm
...
Closes #1150 .
2014-05-14 19:57:41 +02:00
René Kijewski
9a9caf2c68
Exterminate old-style function definitions
2014-05-12 21:57: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
Martin
619039e0e2
add pthread condition variable implementation
2014-04-29 18:39:03 +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
Kévin Roussel
b6fbe33539
Handle race conditions preventing timers to be set correctly on MSP430 MCUs
...
when the counter is incrementing and/or overflowing
2014-04-09 10:28:39 +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
Oleg Hahm
c25b785984
msp430: don't enable Timer 0 by default
2014-03-26 15:00:56 +01:00
Oleg Hahm
ef8bfb38a1
msp430: show overflow counter in hwtimer debug
2014-03-26 14:09:16 +01:00
Oleg Hahm
e93b44e8b5
msp430: remove expensive modulo call
2014-03-26 14:09:16 +01:00
Hauke Petersen
8a937e1a1c
hwtimer: clean up of interfaces to board/cpu
2014-03-26 13:19:18 +01:00
Oleg Hahm
a427cce09b
Merge pull request #881 from rousselk/msp430-stackptr-align
...
Ensure that stack pointer is correctly aligned during thread creation on MSP430
2014-03-17 17:37:49 +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
Kévin Roussel
054367c23a
Ensure that stack pointer is correctly aligned during thread creation on MSP430
2014-03-13 12:40:57 +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
72966fec39
adding sys/time.h for msp-430
2014-02-27 00:17:14 +01:00
Kévin Roussel
1183555cc3
Implement the crash-handling/reboot mechanism for MSP430 MCUs
2014-02-25 10:50:51 +01:00
Kévin Roussel
f6d7910352
Added while(1) to ensure GCC valids NORETURN; fixed indentation
2014-02-14 16:33:47 +01:00
Kévin Roussel
7073489dac
Implemented reboot() function for MSP430 MCUs
2014-02-12 15:26:02 +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
Oleg Hahm
8de53e2b78
Merge pull request #530 from thomaseichinger/msp430-intrinsics.h-fix
...
safeguard intrinsics.h include in lpm_cpu.c
2014-01-22 10:59:11 -08:00
Thomas Eichinger
eff2c9aea3
safeguard intrinsics.h include since it is only provided by msp430-gcc >= 4.6
2014-01-21 11:27:21 +01:00
Oleg Hahm
a57b853401
removed own implementation of errno headers
2014-01-20 14:05:47 +01:00
Oleg Hahm
9eebc532ef
Merge pull request #459 from rousselk/msp430-lpm-freq
...
Msp430 lpm freq
2014-01-16 04:57:27 -08:00
Oleg Hahm
fe575d52df
Merge pull request #364 from OlegHahm/float_stack_sizes
...
added a dedicated stacksize for float printfs
2014-01-09 10:48:38 -08:00
Kévin Roussel
32a6e168ff
function 'lpm_get()' now returns LPM_UNKNOWN by default
2014-01-08 09:59:05 +01:00
Oleg Hahm
c7d985d371
removed redundant include pathes from Makefiles
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
Kévin Roussel
5d393d270b
Sets MCU frequency in 'board.h', instead of the common 'cpu.h' file
2013-12-24 15:41:32 +01:00
Kévin Roussel
2b4febf8df
Basic implementation of LPM-related functions for MSP430 MCUs
2013-12-24 15:38:26 +01:00
Martin Lenders
69809928d3
Make UART0_BUFSIZE configurable by CPU
2013-12-20 11:10:42 +01:00
Oleg Hahm
903ec54a43
making include directives consistent
2013-12-19 15:31:37 +01:00
Ludwig Ortmann
50d488e6bc
remove suprerfluous thread_yield declaration
2013-12-19 13:05:53 +01:00
Ludwig Ortmann
437c0ee5c9
msp430 lpm stub
2013-12-19 13:04:08 +01:00
Ludwig Ortmann
76cfdc33b1
stack alignment workaround
...
Should be fixed in thread.c instead, this is just a temporary
workaround to enable msp-430 threads in the mean time.
2013-12-19 13:04:08 +01:00
Ludwig Ortmann
2a8411b6a3
fix main return for msp430
...
mspgcc handles main specially, this introduces code to make main
behave normally
2013-12-19 13:04:08 +01:00
Ludwig Ortmann
69f6748a7c
clean up msp430 cpu-conf.h
2013-12-19 13:04:08 +01:00
Kévin Roussel
c6e43adb62
Removed 'flashrom.c' from the 'msp430-common' directory
...
since flash management differs with the MSP430 family
2013-12-18 10:51:46 +01:00
Kévin Roussel
6428daf9c7
Removed all references to a specific MCU in "generic" files
...
Inclusion of generic <msp430.h> file is done in cpu.h
2013-12-18 10:49:23 +01:00
Hauke Petersen
edcabf7cb6
Fixed a lot of comments by removing tabs and correcting format.
2013-12-16 14:00:33 +01:00
Hauke Petersen
3785fe956b
Fixed doxygen comments, focused on file headers and group definitions
2013-12-16 14:00:24 +01:00
Ludwig Ortmann
926c1d3da0
GNU Lesser General Public License -> LGPLv2
2013-11-23 13:43:47 +01:00
Ludwig Ortmann
d6c213fb47
fix grammar in license header
2013-11-23 13:11:56 +01:00
Oleg Hahm
6a1fcaf288
added a dedicated stacksize for float printfs
2013-11-21 20:41:28 +01:00
Ludwig Ortmann
c1ea408274
move struct timeval to msp430_types.h
2013-11-19 17:56:05 +01:00
Ludwig Ortmann
7caf7881a2
fix msb-430 Makefiles and includes
2013-11-14 15:08:32 +01:00
Oleg Hahm
cc45909ffc
Merge pull request #236 from OlegHahm/telosb
...
Telosb
2013-11-14 01:55:47 -08:00
Christian Mehlis
7fb1ac4402
msp430: add time_t and struct timespec
2013-10-22 11:07:18 +02:00
Oleg Hahm
46deefe0f8
make Makefiles proof for spaces in $PATH
2013-10-09 15:28:53 +02:00
Kévin Roussel
c7501ce5e0
Added mising reference to cpu/msp430-common/include/cpu.h
...
so as to get the needed definition of F_RC_OSCILLATOR
2013-10-09 15:10:22 +02:00
Kévin Roussel
49c8c419bf
Updated the MSP430 hwtimer implementation, to cope with the lack of consistency
...
of of TI with the TimerX register names.
2013-10-09 15:10:22 +02:00
Oleg Hahm
0a02b060a8
adjusted default stack sizes for msp430
...
* stack size for idle thread was too small
* main stack gets initialized with KERNEL_CONF_STACKSIZE_DEFAULT +
KERNEL_CONF_STACKSIZE_PRINTF, leading to a huge main thread stack
2013-09-19 13:51:09 +02:00
Oleg Hahm
d284db620d
Merge pull request #178 from OlegHahm/telosb
...
Telosb support
2013-09-16 15:34:57 -07:00
Oleg Hahm
5f537c38ac
changed to _types.h definition for ssize_t
2013-09-12 23:17:27 +02:00
Oleg Hahm
43eea48d25
added define for calloc in msp430-common
2013-09-12 16:08:40 +02:00
Oleg Hahm
a50db45909
added header for msp430 to define missing ssize_t
2013-09-12 14:33:37 +02:00
Milan Babel
09b0baad66
fixed hwtimer on msp430
2013-08-23 22:03:04 +02:00
Oleg Hahm
ebc0b9b552
renamed and moved some defines
2013-08-19 19:00:48 +02:00
Oleg Hahm
38ae187b61
added prototype for msp430_cpu_init()
2013-08-15 10:31:54 +02:00
Oleg Hahm
366d25ae38
Merge pull request #112 from OlegHahm/msb430_uart0
...
Changes according to the pull requests from dc5e7d7e1f
introducnig uart for MSB430 and changing the name of the terminal variable.
2013-08-13 08:57:59 -07:00
Oleg Hahm
6239ea2a0b
minor changes according to 7a2cc4ae09
2013-08-09 15:57:34 +02:00
Martin
63146190b3
fix changed prototype parameter 1 of thread_stack_init from void* to void(*)(void)
2013-08-09 12:19:03 +02:00
Oleg Hahm
39a4dc684e
fixes for #62 : eliminate unused parameter warnings
...
NOTE: this commit introduces a kernel API change for mutex_unlock
2013-08-04 04:10:33 +02:00
Oleg Hahm
599e266b55
Revert "removed redefined ENABLE_DEBUG"
...
This reverts commit 69c526f44d
.
Instead of removing ENABLE_DEBUG, define it as zero and replacing the
ifdef preprocessor commands by a simple #if
2013-07-24 00:38:43 +02:00
Oleg Hahm
33423cdadb
redefining default stack sizes dependent on the use of printf
2013-07-23 13:42:58 +02:00
Christian Mehlis
837bad38eb
rename kernel_intern.h
...
german "intern" to english "internal"
2013-07-16 16:36:37 +02:00
Oliver Hahm
57cc002c67
Merge branch 'wsn430'
...
Conflicts:
core/include/queue.h
core/queue.c
cpu/msp430-common/hwtimer_cpu.c
cpu/msp430x16x/hwtimer_msp430.c
sys/lib/hashtable.c
sys/net/ieee802154/ieee802154_frame.c
sys/shell/commands/sc_cc110x_ng.c
sys/transceiver/transceiver.c
sys/vtimer/vtimer.c
2013-06-25 15:33:40 +02:00
Oliver Hahm
c8bee9e554
fixed coding style (space after most keywords)
2013-06-24 22:37:35 +02:00
Oliver Hahm
5d70656343
fixed coding conventions (mostly by astyle)
2013-06-21 03:52:57 +02:00
Oliver Hahm
0d6d8390c0
* updated copyright and license headers in various files
2013-06-18 17:21:38 +02:00