Benjamin Valentin
6d42c9fcfe
cpu: make newlib_nano a DEFAULT_MODULE
...
This allows to disable nanospecs with
DISABLE_MODULE += newlib_nano
if a full-features version of newlib is desired.
2021-05-04 12:12:36 +02:00
Hauke Petersen
ccca9855fe
cpu/msp430_common/kconfig: add dbgpin feature
2021-02-26 11:34:52 +01:00
Hauke Petersen
717a12507a
cpu/msp430_common: add dbgpin initialization
2021-02-26 11:34:52 +01:00
f411fd4814
cpu/msp430_common: add XFA support
2021-02-18 10:46:08 +01:00
Francisco Molina
63a2a6ce1b
treewide: model newlib as a FEATURE
2021-01-27 09:24:25 +01:00
Leandro Lanzieri
2e2dcd5c27
cpu/msp430: move default module to Makefile.default
2021-01-25 09:17:00 +01:00
bce9e3caeb
cpu/msp430_common: Add dummy thread_arch.h header
2021-01-19 11:03:22 +01:00
Marian Buschsieweke
dfb67cef91
cpu/msp430_common: use malloc_thread_safe
...
This should fix concurrent dynamic memory allocation.
2020-12-18 17:30:40 +01:00
Marian Buschsieweke
dd48ced151
cpu/*/atomic_utils_arch.h: Add volatile qualifier
2020-11-24 14:00:52 +01:00
benpicco
d9598a0f54
Merge pull request #15412 from bergzand/pr/flashpage/merge_raw
...
periph_flashpage: Make pagewise API optional
2020-11-12 22:32:21 +01:00
792e031a95
Merge pull request #14331 from maribu/atomic_utils
...
sys/atomic_utils: Functions for atomic access
2020-11-12 21:44:53 +01:00
61052dbed7
msp430: Adapt to flashpage/flashpage_pagewise API
2020-11-11 23:16:41 +01:00
Marian Buschsieweke
3f4577d430
cpu/msp430_common: Add atomic_utils_arch.h
2020-11-10 10:55:13 +01:00
Marian Buschsieweke
008e2d3b97
cpu/msp430_common: Prevent conflicting defines
...
irq_arch.h previously included cpu.h, which in term included the vendor header
files. Those were needed to get the GIE define (general interrupt enable bit).
However, the vendor files use fancy defines like `#define N (0x0004)` that
easily conflict with application code. Due to the widespread use of the IRQ API,
it is better to not include the vendor files in irq_arch.h.
This commit adds a local define for the GIE bit and uses this instead of
including cpu.h.
2020-11-06 21:10:19 +01:00
Bas Stottelaar
ab6188cea3
cpu/*: add missing include of assert.h
2020-10-22 11:13:08 +02:00
Marian Buschsieweke
3812ff7689
cpu/msp430_common: Add architecture_arch.h
2020-09-29 12:33:59 +02:00
Leandro Lanzieri
81cb769cad
makefiles: avoid building archives when compiling
2020-09-04 15:01:10 +02:00
Leandro Lanzieri
d25fc243c4
treewide: change prefix for generated Kconfig symbols.
...
This changes the prefixes of the symbols generated from USEMODULE and
USEPKG variables. The changes are as follow:
KCONFIG_MODULE_ => KCONFIG_USEMODULE_
KCONFIG_PKG_ => KCONFIG_USEPKG_
MODULE_ => USEMODULE_
PKG_ => USEPKG_
2020-08-31 09:37:09 +02:00
Marian Buschsieweke
c01ef33ccc
cpu/msp430_common: Don't access sched_active_*
...
Replaced accesses to sched_active_* with API calls in C files
2020-08-17 12:16:07 +02:00
789f10e816
cpu/msp430_common: increase THREAD_STACKSIZE_DEFAULT to 384
...
Both tests/pthread_tls and tests/prng_sha256prng fail without this, but
other platforms run fine with their defaults. Lets consider the higher
value a better default.
2020-08-05 14:32:58 +02:00
038823c731
cpu/msp430_common/vendor/README.md: add some explanation
2020-08-05 14:32:58 +02:00
5a00e2e36c
cpu/msp430_common: use __stack for ISR stacks
2020-08-05 14:32:58 +02:00
aa2f500d51
cpu/msp430_common: update thread_stack_init to changed ABI
...
The old mspgcc used R15-R12 for args 0-3. The newer MSP430 EABI uses
R12-15.
See https://www.ti.com/lit/an/slaa664/slaa664.pdf for more details.
2020-08-05 14:32:58 +02:00
909d740d37
cpu/msp430_common: bump msp430-gcc-support-files to 1.210
2020-08-05 14:32:58 +02:00
ef099f9d46
cpu/msp430_common: add NOPs to irq functions
...
They might not be necessary, but GCC warns if they're absent.
Thus let's pay the one or two extra instructions for silencing the
warnings.
2020-08-05 14:32:58 +02:00
08c50947cc
cpu/msp430_common: move newlib default module decl to Makefile.dep
2020-08-05 14:32:58 +02:00
fd335d30ee
cpu/msp430: re-create c11_atomics_compat_cpu.hpp using msp430-elf-gcc
2020-08-05 14:32:58 +02:00
10213057b1
cpu/msp430: update deps, move to Makefile.dep
2020-08-05 14:32:57 +02:00
260ec3666f
cpu/msp430: select newlib_nano module if newlib is used
2020-08-05 14:29:07 +02:00
8753457e45
cpu/msp430_common: use default newlib heap_stats
2020-08-05 14:29:07 +02:00
dbcf59f196
cpu/msp430: call newlib _init() in startup script
2020-08-05 14:29:07 +02:00
30cf61dd35
cpu/msp430: remove obsolete msp430 specific headers
2020-08-05 14:29:07 +02:00
a0aeeb5ff4
cpu/msp430: update to modern gcc & newlib
2020-08-05 14:29:00 +02:00
bf072bdd55
cpu/msp430_common: add msp430-gcc-support-files 1.208
2020-08-05 14:27:25 +02:00
0268a772ed
Revert "cpu/msp430_common: set top of heap for sbrk"
...
This reverts commit 55f433103b
.
2020-08-05 14:27:25 +02:00
5b6534e02d
Revert "cpu/msp430_common: add real malloc/free functions"
...
This reverts commit 419cedf58e
.
2020-08-05 14:27:25 +02:00
1d46cf70eb
cpu/msp430_common: fix thread_yield_higher() when called in isr
2020-07-28 13:27:55 +02:00
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