[arm] increase the abort stack to 4K to help early platform code

Since the abort stack is also used as the early init stack, early
platform code runs with this small-ish stack. This gives us a little
more room.

Change-Id: I619fe3ad3959c0395e4909f22b22a1e290db5758
Signed-off-by: Dima Zavin <dima@android.com>
[arm] let platforms run early startup code in reset vector

Add the option WITH_PLATFORM_RESET to allow platforms to
provide code that runs as the first thing in the reset vector.

This allows some platforms to save state that may have been
passed on by an early bootloader and/or ROM.

Change-Id: Ic25bac7958a6786966aaa997bc1c712ca9ce95cb
Signed-off-by: Dima Zavin <dima@android.com>
[arch] add -L $(LKROOT) to GLOBAL_LDFLAGS to let ld find common scripts

Change-Id: I497a8ef9c2b13b3b179db05986e7463688a21e5b
Signed-off-by: Dima Zavin <dima@android.com>
[include] add a limits.h that includes GCC's internal one

Change-Id: Ibcd63f5f142fd42dec0c87b71e784952cf15196a
Signed-off-by: Dima Zavin <dima@android.com>
[lib][heap] fix heap.h to include stddef.h

Change-Id: Ibc18da1b39767f49f158da48e00a42df0da036ea
Signed-off-by: Dima Zavin <dima@android.com>
[libc] move tracing out of debug into separate trace.h

Change-Id: I7476fc17b587a0ea2a42cbe3d49b72063e4c5dc8
Signed-off-by: Dima Zavin <dima@android.com>
[libc][stdio] cleanup printf definition and clients

Move implementation to stdio.c to sit next to the other
stdio definitions that use the debug output functions. Keep
the declaration of it, though, in printf.h to sit next to
sprintf, etc.

Don't include printf.h directly in other places, rely on stdio.h
to properly pull in these functions.

Change-Id: I357cb04a5c78185b8fde908193b672326c2ee542
Signed-off-by: Dima Zavin <dima@android.com>
[lib][stdio] implement a real FILE backing stdio descriptors

Allows different implementations of FILE handling to be provided.
Make lib/debug provide the default implementation for
stdin/stdout/stderr.

Change-Id: Icd9d30ac44884648603e91cfca856912bca1c0d3
Signed-off-by: Dima Zavin <dima@android.com>
[libc] add fprintf/vfprintf

Change-Id: Ibc0fe656295cb97f8839d6fbae7682a57bc395e1
Signed-off-by: Dima Zavin <dima@android.com>
[lib][lwip] change debug.h include to trace.h