This implements special handling for SYS_OPEN to catch requests for
":tt" which is reserved by ARM for console input/output. They're
mapped to the appropriate GDB file descriptors automatically.
An additional file handle offset is introduced because ARM doesn't
consider zero handle to be valid.
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Implement bare minimum necessary to support console IO.
This works with standard newlib builds and is based on the reference
documentation:
http://infocenter.arm.com/help/topic/com.arm.doc.dui0471c/CHDJHHDI.html
Tested using gcc-arm-none-eabi-4_7-2013q1-20130313 for both
stm32f1-based BMP and stm32f0 target.
Signed-off-by: Paul Fertser <fercerpav@gmail.com>