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

53 Commits

Author SHA1 Message Date
Marian Buschsieweke
1a8defd209
cpu/msp430_common: Refactor cpu.{c,h}
Drop `__enable_irq()` and `__disable_irq()` and replace single remaining
call of them with the standard IRQ API, as this is now equally fast.
2020-07-15 13:09:11 +02:00
Marian Buschsieweke
c5c83cfe3c
cpu/msp430_common: Update to inline-able IRQ API
- Updated to inline-able IRQ API
- Improved robustness of functions
    - Added memory barrier to prevent the compiler from moving code outside of
      a critical section guarded by irq_disable() ... irq_restore()
- Reduced overhead of `irq_disable()`
    - After clearing the global interrupt enable (GIE) bit, IRQs remain enabled
      for up to one CPU cycle
    - The previous implementation just added a nop to fill that cycle
    - This implementation uses the cycle for masking the return value
- Reduced overhead of `irq_restore()`
    - Now only one CPU cycle is needed
- `irq_disable()`, `irq_restore()`, and `irq_enable()` work now in constant time
2020-06-25 21:32:17 +02:00
Leandro Lanzieri
c86bf5074d
cpu/msp430_common: Add Kconfig symbols
Also specify CPU_ARCH and CPU_CORE in Makefile.features.
2020-06-24 09:26:05 +02:00
Akshai M
6450d9989e gnrc/pktbuf : Set Kconfig defaults and conditions
Set Kconfig defaults for CPU and conditions to avoid
conflict with CFLAGS

Co-authored-by: Leandro Lanzieri <leandro.lanzieri@haw-hamburg.de>
2020-06-11 14:47:27 +05:30
Akshai M
5523d119b6 gnrc/pktbuf : Move 'GNRC_PKTBUF_SIZE' to 'CONFIG_' 2020-06-11 14:46:36 +05:30
Marian Buschsieweke
ac246cfd10
cpu/msp430_common: Fix missing include 2020-05-04 10:58:36 +02:00
92f2b820cd
cpu: remove exports of UNDEF vars 2020-02-25 09:40:34 +01:00
6d46621610
cpu/msp430: move dependencies to Makefile.dep 2020-01-28 13:20:51 +01:00
d0d6e53ff4
Merge pull request #11960 from fjmolinas/pr_msp430_flashpage_raw
cpu/msp430_common: add flashpage_raw
2019-11-25 12:48:48 +01:00
Francisco Molina
0a68323570 tests/periph_flashpage: use before last page for msp430
- msp430 holds the isr vector on the last page so avoid erasing
  that page when testing.
2019-11-24 13:19:20 +01:00
fjmolinas
5368415c9a cpu/msp430_common: add flashpage_raw support 2019-11-24 13:19:19 +01:00
Francisco Molina
291727c9e7 cpu/msp430_common: specify FLASHPAGE_SIZE/NUMOF type
- Since msp430 uses 16bit it is important that the variables
  are treated as unsigned and not int so FLASHPAGE_NUMOF*FLASHPAGE_SIZE
  doesn't overflow
2019-11-24 13:19:17 +01:00
Francisco Molina
22177258df msp430_common/include: fix FLASHPAGE definitions
- TI documentation for msp430f1xx is ambiguous regarding length
  of some memmory sectors. For some cpu's the acual size is 1/4 byte
  smaller than advertised and one of the sectors is actually 256b and
  not 512.
  ref: https://e2e.ti.com/support/microcontrollers/msp430/f/166/p/798838/2962979#2962979
- Remove the first 256b sector from usage since there is not support for
  variable sized pages
- Fix msp430f2617 FLASHPAGE_NUMOFF to represent accesible memory
2019-11-24 13:18:54 +01:00
ac7027268c cpu/msp430_common: fix typos 2019-11-23 22:39:36 +01:00
Francois Berder
4a31f94cfc many typo fixes
Signed-off-by: Francois Berder <18538310+francois-berder@users.noreply.github.com>
2019-11-23 22:39:07 +01:00
Marian Buschsieweke
314184adb5
cpu: Platform specific C11 atomics compat headers
Added headers to define platform specific sizes and types for the C11 atomics
compatibility module for C++.
2019-10-24 23:08:36 +02:00
ebf43616b7 cpu: add arch_* features 2019-10-13 21:03:41 +02:00
Kevin "Tristate Tom" Weiss
4b7c5915ec
Merge pull request #10953 from gschorcht/sys/shell/heap_cmd/pr
sys/shell: add heap command
2019-10-04 13:49:57 +02:00
Gaëtan Harter
4b93f27d83
cpu: use makefiles/utils uppercase
Convert the variables to uppercase using the 'makefiles/utils' function.
2019-09-30 17:25:24 +02:00
benpicco
729ba07e9a
Merge pull request #11229 from maribu/msp430_cleanup
cpu/msp430_common: Cleanup
2019-09-11 20:12:55 +02:00
Gunar Schorcht
a9db53e04a cpu/msp430_common: changes for heap command 2019-09-05 09:20:55 +02:00
Gaëtan Harter
1be5b7b10b
cpu: do not locally export compilation variables
These are already exported by `makefiles/vars.inc.mk`.
It is a prerequisite to allow handling compilation without global exports.
2019-08-29 10:35:53 +02:00
smlng
2de4b3011b periph_common: add as dependency to periph drivers
Rational: the periph_common module is required by (most) other periph drivers
and also during startup of the CPU/MCU to run periph_init. The latter is only
required if other periph drivers are used, hence periph_common should be a
depency of periph_* modules and *not* of the CPU/MCU. This PR fixes that
by making periph_common a depency of periph_* and removing the explicit
include in the CPU/MCU implementation.
2019-06-03 13:44:10 +02:00
10d5554f03
Merge pull request #10944 from gschorcht/cpu/msp430_common_heap_real
cpu/msp430_common: add real malloc/free functions
2019-04-12 10:59:00 +02:00
Gunar Schorcht
419cedf58e cpu/msp430_common: add real malloc/free functions
For this purpose, adapted AVR libc functions are used. When used, malloc and free functions require 304 additional bytes of code compared to the oneway_malloc module.
2019-04-03 09:21:03 +02:00
Marian Buschsieweke
9a2f69b79c
cpu/msp430_common: Cleanup
`void cpu_switch_context_exit(void)` assigns `sched_active_thread` just before
calling `sched_run()`. This is unneeded, as `sched_run()` will updated that
anyway. Also generally speaking, changing internal scheduler data from outside
the scheduler is a risky thing to do.
2019-03-21 16:53:53 +01:00
Gunar Schorcht
55f433103b cpu/msp430_common: set top of heap for sbrk
Set __heap_end to current SP before entering thread mode to make the remaining RAM available as heap for module oneway_malloc.
2019-03-13 13:30:56 +01:00
PeterKietzmann
df58b7293b cpu/msp430: increase default stacksize for gnrc_ipv6 thread 2018-09-26 11:06:05 +02:00
Vincent Dupont
5a2a4cf1e0 cpu/msp430: use const pointer in flashpage 2018-03-14 16:28:32 +01:00
7847a91e12 cpu: instead of cpp-style, use C-style comments 2018-02-06 16:59:58 +01:00
Matthieu Berthomé
1c6321791c puts => LOG_INFO for the MSP430 startup message 2018-01-11 09:27:20 +01:00
86665b71bf cpu: adapt to COREIF_NG removal 2017-11-16 14:40:16 +01:00
a20745b6c5 cpu: make use of Makefile.periph 2017-11-06 12:01:19 +01:00
33adde02d1 cpu: msp430: reorganize Makefile.features 2017-11-02 12:59:45 +01:00
Joakim Nohlgård
d512967fb6 Merge pull request #7512 from aabadie/cpu_mips_doc
cpu: doxygen cleanup
2017-09-01 11:34:08 +02:00
Hauke Petersen
25f285f1d1 cpu/msp430: added flashpage driver implementation 2017-08-29 12:08:33 +02:00
7222f76ac0 cpu/msp430: cleanup doxygen grouping 2017-08-28 14:26:10 +02:00
Hauke Petersen
10d357e847 cpu/msp430: call periph_init during CPU init 2017-07-13 14:21:30 +02:00
smlng
692cf96297 doc: fix doxygen grouping of cpu periph drivers 2017-06-26 14:42:11 +02:00
0fcc7d3834 cleanup: apply headerguard script output 2017-05-24 17:54:02 +02:00
Hauke Petersen
9aad0e528f cpu: cleanup unused/umimplemented isr stack code
- removed ISR_STACKSIZE define where unused (set to 0)
- removed thread_arch_isr_stack_usage(), thread_arch_isr_stack_start(),
  and/or thread_arch_isr_stack_pointer() where not implemented
2017-05-12 18:07:08 +02:00
Joakim Nohlgård
339a4da9dc Makefiles: move to new directory /makefiles 2017-04-04 15:11:54 +02:00
Joakim Nohlgård
5e27bf4f31 msp430: Add all expected POSIX unistd.h declarations 2017-03-07 17:59:57 +01:00
Vincent Dupont
3485ab4e96 msp430: add libc missing symbols and defines 2017-03-07 17:59:57 +01:00
Joakim Nohlgård
33566a2fe7 msp430: Discard order argument when using __sync_xxx for atomics 2017-03-07 10:21:37 +01:00
Joakim Nohlgård
ee0cae69a5 msp430_common: Add supplemental __clzhi2, __ctzhi2, for old MSPGCC 2017-02-08 16:23:48 +01:00
Joakim Nohlgård
0cb384829c msp430-common: Add stdatomic.h, sys/cdefs.h, sys/features.h from newlib 2017-02-08 16:23:47 +01:00
Joakim Nohlgård
48eeda4126 msp430-common: stdio.h: Move extern "C" brace to correct place 2017-02-08 16:06:09 +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
Oleg Hahm
7ee7801c10 *: remove trailing underscores from header guards 2017-01-19 18:30:53 +01:00