incubator-nuttx/libc/syslog
Dimitry Kloper 06d83c6261 Introduce support for Atmel toolchain in-flash strings
Atmel toolchain AVR compiler provides a transparent in-flash object support using __flash and __memx symbols. The former indicates to compiler that this is a flash-based object.  The later used with pointer indicates that the referenced object may reside either in flash or in RAM. The compiler automatically makes 32-bit pointer with flag indicating whether referenced object is in flash or RAM and generates code to access either in run-time. Thus, any function that accepts __memx object can transparently work with RAM and flash objects.

For platforms with a Harvard architecture and a very small RAM like AVR this allows to move all constant strings used in trace messages to flash in the instruction address space, releasing resources for other things.

This change introduces IOBJ and IPTR type qualifiers.  The 'I' indicates that the object may like in instruction space on a Harvard architecture machine.

For platforms that do not have __flash and __memx or similar symbols IOBJ and IPTR are empty, making the types equivalent to, for example, 'const char' and 'const char*'.  For Atmel compiler these will become 'const __flash char' and 'const __memx char*'.  All printf() functions and syslog() functions are changed so that the qualifier is used with the format parameter.

From: Dimitry Kloper <dikloper@cisco.com>
2016-01-05 10:29:29 -06:00
..
Make.defs Move syslog back to libc/syslog from fs/syslog 2014-10-09 07:08:36 -06:00
lib_lowsyslog.c Introduce support for Atmel toolchain in-flash strings 2016-01-05 10:29:29 -06:00
lib_setlogmask.c Update comments and function headers 2014-10-09 07:38:38 -06:00
lib_syslog.c Introduce support for Atmel toolchain in-flash strings 2016-01-05 10:29:29 -06:00
lib_syslogstream.c Move syslog back to libc/syslog from fs/syslog 2014-10-09 07:08:36 -06:00
syslog.h Move syslog back to libc/syslog from fs/syslog 2014-10-09 07:08:36 -06:00