cpu/arm/k60: Add missing system_MK60DZ10.h

This file is identical to system_MK60D10.h.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
platform/mulle: Refactor set_rime_addr()

Refactored set_rime_addr() to prevent warnings about differing
signedness in the debug printfs.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
platform/mulle: Add WITH_ASCII to contiki-conf.h.

PETSCII is the character set used on Commodore platforms, and Contiki
uses this encoding by default in some situations. Every non-Commodore
platform should define WITH_ASCII.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
cpu/arm/k60: fault-handlers: fix warnings.

Cast to unsigned int when printing with %x to silence a gcc warning.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
cpu/arm/k60: Refactor C99 loop initializer.

SystemInit had an for loop defined variable only allowed in C99.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
platform/mulle: Add comments to slip_arch_init.

Added comments and todo for later reference.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
cpu/arm/k60: SystemCoreClockUpdate readability.

Replaced magic numbers with symbolic macros.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
platform/mulle: Add more debug output during boot.

 - Adds a printout for system frequencies.
 - Replaced printf() with PRINTF() to match other parts of the file.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
cpu/arm/k60: implement newlib syscalls.
cpu/arm/k60: Reimplement newlib syscalls.

All newlib syscalls are somewhat implemented now. File IO is split into
device IO and actual file IO based on fd number. File IO is mapped to
CFS functions, device IO is mapped using a platform device operations
table. stdin, stdout, stderr is currently mapped to UART1.

See also: http://neptune.billgatliff.com/newlib.html

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
cpu/arm/k60: Implement TX buffering in UART1.

Uses a ring buffer of configurable size and TX interrupts.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
cpu/arm/k60: Build fixes for Clang+Newlib.

Clang needs to be told where to look for Newlib includes, this is not
necessary on GCC where the cross compiler is usually installed in a
separate directory structure with specified include directories.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
cpu/arm/k60: Add missing header in devoptab.h

reent.h needed for struct _reent

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
cpu/arm/k60: Correct types on syscall declarations.

Adds some const correctness and different return types on the syscalls
that caused build errors on Clang. Now matches newlib syscall definitions.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
cpu/arm/k60: WIP UART TX buffering.

This is a work in progress, currently seem to work fine for UART1.
Hard coded to always use UART1 for some RX things.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
cpu/arm/k60: Suppress some compiler warnings.

Specifically, suppress warnings about unused parameters in syscall
definitions that are not implemented yet, or otherwise limited in
embedded platforms.

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>