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

30 Commits

Author SHA1 Message Date
df7deccd25 Merge pull request #2976 from gebart/pr/cortex-m-initial-stack-alignment
cortex-m: initial stack alignment to 64bit
2015-05-18 15:01:30 +02:00
Joakim Gebart
01c5120039 cortex-m: Suppress cppcheck error about uninitialized result
False positive, the variable result is assigned from within inline assembly
2015-05-18 06:29:35 +02:00
Joakim Gebart
eddd3177a5 cortex-m4: Align initial stack pointer to 64 bits
AAPCS requires stack pointers to be aligned on a double word boundary.

In addition, Clang-3.6 assumes the stack pointer is always aligned to
a 8 byte boundary upon function entry, at least in armv7-m, causing
hard-to-find errors in the compiled code.
2015-05-13 09:15:56 +02:00
Oleg Hahm
cb1f047f59 core: unified core_panic implementation 2015-05-10 11:58:43 +02:00
Oleg Hahm
828839316b core: renamed crash.h to panic.h 2015-05-09 18:44:10 +02:00
Joakim Gebart
afc1dd3a6d cortex-m4: Add atomic_cas implementation 2015-05-07 18:52:13 +02:00
Joakim Gebart
215ccc1213 core: Introduce atomic counters
- Move generic implementation of atomic_set_return to core/atomic.c
 - Generic implementation of atomic compare and swap in core/atomic.c
 - atomic_cas is used to implement atomic counters in core/include/atomic.h
 - atomic_int_t is an atomic integer type
 - ATOMIC_INIT can be used as an initializer for atomic_int_t
 - ATOMIC_VALUE gets a reference to the value of an atomic integer
2015-05-07 18:52:13 +02:00
Joakim Gebart
791c57720a cortex-m4_common: Refactor context save/restore
Clang 3.6 is stricter than GCC and previous releases of Clang regarding
naked functions and now only allows inline asm inside naked functions.

This is a refactoring of the functions isr_pendsv, isr_svc,
context_save, context_restore to still be naked functions but allow
building with Clang 3.6
2015-03-21 18:43:01 +01:00
Joakim Gebart
972e61529c cortex-m4_common: Update crash.c author and copyright after recent changes. 2015-02-17 13:15:40 +01:00
Joakim Gebart
7829a55a8c cortex-m4_common: Minor fixes for string handling in core_panic() 2015-02-10 13:33:30 +01:00
Joakim Gebart
0b7a929ec6 cortex-m4_common: Add debugger break in crash.c 2015-02-10 13:09:43 +01:00
Hauke Petersen
68b167ca77 cpu/cortex-m4_common: added crash.c 2015-02-09 18:28:32 +01:00
Joakim Gebart
53b29f40e7 cortex-m4: Add extern "C" to core_cmInstr.h
Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2015-01-29 10:18:28 +01:00
Joakim Gebart
0d8aaf86a8 cortex-m4: Add extern "C" to core_cmFunc.h
Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2015-01-29 10:18:28 +01:00
Joakim Gebart
fe43bb2b7a cortex-m4: Update to CMSIS HAL 4.0
Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
2015-01-29 09:38:31 +01:00
BytesGalore
a4d2ee307c cpu: added extern "C" to headers 2014-11-24 19:10:15 +01:00
Hauke Petersen
1e863a322d cpu/cortex-mX_common: added delay to reboot_arch 2014-11-20 17:22:39 +01:00
Hauke Petersen
5600d86253 cpu/cortex-mX_common: fixed reboot_arch return val 2014-11-20 17:22:39 +01:00
Hauke Petersen
62b6522e01 cpu: moved reboot_arch for cortex cpus 2014-11-20 17:22:39 +01:00
Hauke Petersen
e7fbaf3815 cpu: removed NAKED attribute from ISRs
- removed the __attribute__((naked)) from ISRs
- removed ISR_ENTER() and ISR_EXIT() macros

Rationale: Cortex-Mx MCUs save registers R0-R4 automatically
on calling ISRs. The naked attribute tells the compiler not
to save any other registers. This is fine, as long as the
code in the ISR is not nested. If nested, it will use also
R4 and R5, which will then lead to currupted registers on
exit of the ISR. Removing the naked will fix this.
2014-10-30 19:33:32 +01:00
Oleg Hahm
db8f3d2650 cpu: use typed function pointer for thread_arch_init 2014-10-23 18:26:21 +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
Hinnerk van Bruinehsen
9933dd0b78 cpu: arm/cortex-mX/atmega: use uintptr_t for sp cast 2014-09-14 02:34:04 +02:00
Oleg Hahm
1de5c2b4a0 fixed remaining variables to kernel_pid_t 2014-08-07 17:29:53 +02:00
Hauke Petersen
be46f2047a cpu/cortex-mX_common: bugfix to arch_stack_init
- fixed cortex-[m0|m3|m4]
2014-08-05 18:38:06 +02:00
Hauke Petersen
938c61a5a2 Merge pull request #1456 from haukepetersen/board_stm32f3discovery
board/cpu: Added support for the stm32f3discovery board and stm32f3 cpu
2014-07-31 23:55:05 +02:00
Hauke Petersen
275e8f0278 cpu - cortex-m4_common: fixes to thread_arch.c 2014-07-31 19:42:05 +02:00
Hauke Petersen
14e65fc48d cpu/cortex-mX_common: fixed type issues
- added explicit cast for stack pointer
- fixed printf type inconsistency
2014-07-31 19:17:23 +02:00
Hauke Petersen
29e70c14d6 cpu: Initial import of cortex-m4_common 2014-07-16 17:20:50 +02:00