esp-idf/components/newlib/esp32-spiram-rom-functions-...

321 wiersze
11 KiB
Plaintext

# If the Newlib functions in ROM aren't used (eg because the external SPI RAM workaround is active), these functions will
# be linked into the application directly instead. Normally, they would end up in flash, which is undesirable because esp-idf
# and/or applications may assume that because these functions normally are in ROM, they are accessible even when flash is
# inaccessible. To work around this, this ld fragment places these functions in RAM instead. If the ROM functions are used,
# these defines do nothing, so they can still be included in that situation.
#
#
# Note: the only difference between esp32-spiram-rom-functions-c.lf
# and esp32-spiram-rom-functions-psram-workaround.lf is the archive name.
[mapping:libc]
archive:
if NEWLIB_NANO_FORMAT = y:
libc_nano.a
else:
libc.a
entries:
if SPIRAM_CACHE_WORKAROUND = y:
# The following libs are either used in a lot of places or in critical
# code. (such as panic or abort)
# Thus, they shall always be placed in IRAM.
if IDF_TOOLCHAIN = "gcc": # TODO: IDF-8134
libc_a-itoa (noflash)
libc_a-memcmp (noflash)
libc_a-memcpy (noflash)
libc_a-memset (noflash)
libc_a-strcat (noflash)
libc_a-strcmp (noflash)
libc_a-strlen (noflash)
else:
lib_a-itoa (noflash)
lib_a-memcmp (noflash)
lib_a-memcpy (noflash)
lib_a-memset (noflash)
lib_a-strcat (noflash)
lib_a-strcmp (noflash)
lib_a-strlen (noflash)
if SPIRAM_CACHE_LIBJMP_IN_IRAM = y:
if IDF_TOOLCHAIN = "gcc":
libc_a-longjmp (noflash)
libc_a-setjmp (noflash)
else:
lib_a-longjmp (noflash)
lib_a-setjmp (noflash)
if SPIRAM_CACHE_LIBMATH_IN_IRAM = y:
if IDF_TOOLCHAIN = "gcc":
libc_a-abs (noflash)
libc_a-div (noflash)
libc_a-labs (noflash)
libc_a-ldiv (noflash)
libc_a-quorem (noflash)
libc_a-s_fpclassify (noflash)
libc_a-sf_nan (noflash)
else:
lib_a-abs (noflash)
lib_a-div (noflash)
lib_a-labs (noflash)
lib_a-ldiv (noflash)
lib_a-quorem (noflash)
lib_a-s_fpclassify (noflash)
lib_a-sf_nan (noflash)
if SPIRAM_CACHE_LIBNUMPARSER_IN_IRAM = y:
if IDF_TOOLCHAIN = "gcc":
libc_a-utoa (noflash)
libc_a-atoi (noflash)
libc_a-atol (noflash)
libc_a-strtol (noflash)
libc_a-strtoul (noflash)
else:
lib_a-utoa (noflash)
lib_a-atoi (noflash)
lib_a-atol (noflash)
lib_a-strtol (noflash)
lib_a-strtoul (noflash)
if SPIRAM_CACHE_LIBIO_IN_IRAM = y:
if IDF_TOOLCHAIN = "gcc":
libc_a-wcrtomb (noflash)
libc_a-fvwrite (noflash)
libc_a-wbuf (noflash)
libc_a-wsetup (noflash)
libc_a-fputwc (noflash)
libc_a-wctomb_r (noflash)
libc_a-ungetc (noflash)
libc_a-makebuf (noflash)
libc_a-fflush (noflash)
libc_a-refill (noflash)
libc_a-sccl (noflash)
else:
lib_a-wcrtomb (noflash)
lib_a-fvwrite (noflash)
lib_a-wbuf (noflash)
lib_a-wsetup (noflash)
lib_a-fputwc (noflash)
lib_a-wctomb_r (noflash)
lib_a-ungetc (noflash)
lib_a-makebuf (noflash)
lib_a-fflush (noflash)
lib_a-refill (noflash)
lib_a-sccl (noflash)
if SPIRAM_CACHE_LIBTIME_IN_IRAM = y:
if IDF_TOOLCHAIN = "gcc":
libc_a-asctime (noflash)
libc_a-asctime_r (noflash)
libc_a-ctime (noflash)
libc_a-ctime_r (noflash)
libc_a-lcltime (noflash)
libc_a-lcltime_r (noflash)
libc_a-gmtime (noflash)
libc_a-gmtime_r (noflash)
libc_a-strftime (noflash)
libc_a-mktime (noflash)
libc_a-tzset_r (noflash)
libc_a-tzset (noflash)
libc_a-time (noflash)
libc_a-gettzinfo (noflash)
libc_a-systimes (noflash)
libc_a-month_lengths (noflash)
libc_a-timelocal (noflash)
libc_a-tzvars (noflash)
libc_a-tzlock (noflash)
libc_a-tzcalc_limits (noflash)
libc_a-strptime (noflash)
else:
lib_a-asctime (noflash)
lib_a-asctime_r (noflash)
lib_a-ctime (noflash)
lib_a-ctime_r (noflash)
lib_a-lcltime (noflash)
lib_a-lcltime_r (noflash)
lib_a-gmtime (noflash)
lib_a-gmtime_r (noflash)
lib_a-strftime (noflash)
lib_a-mktime (noflash)
lib_a-tzset_r (noflash)
lib_a-tzset (noflash)
lib_a-time (noflash)
lib_a-gettzinfo (noflash)
lib_a-systimes (noflash)
lib_a-month_lengths (noflash)
lib_a-timelocal (noflash)
lib_a-tzvars (noflash)
lib_a-tzlock (noflash)
lib_a-tzcalc_limits (noflash)
lib_a-strptime (noflash)
if SPIRAM_CACHE_LIBCHAR_IN_IRAM = y:
if IDF_TOOLCHAIN = "gcc":
libc_a-ctype_ (noflash)
libc_a-toupper (noflash)
libc_a-tolower (noflash)
libc_a-toascii (noflash)
libc_a-strupr (noflash)
libc_a-bzero (noflash)
libc_a-isalnum (noflash)
libc_a-isalpha (noflash)
libc_a-isascii (noflash)
libc_a-isblank (noflash)
libc_a-iscntrl (noflash)
libc_a-isdigit (noflash)
libc_a-isgraph (noflash)
libc_a-islower (noflash)
libc_a-isprint (noflash)
libc_a-ispunct (noflash)
libc_a-isspace (noflash)
libc_a-isupper (noflash)
else:
lib_a-ctype_ (noflash)
lib_a-toupper (noflash)
lib_a-tolower (noflash)
lib_a-toascii (noflash)
lib_a-strupr (noflash)
lib_a-bzero (noflash)
lib_a-isalnum (noflash)
lib_a-isalpha (noflash)
lib_a-isascii (noflash)
lib_a-isblank (noflash)
lib_a-iscntrl (noflash)
lib_a-isdigit (noflash)
lib_a-isgraph (noflash)
lib_a-islower (noflash)
lib_a-isprint (noflash)
lib_a-ispunct (noflash)
lib_a-isspace (noflash)
lib_a-isupper (noflash)
if SPIRAM_CACHE_LIBMEM_IN_IRAM = y:
if IDF_TOOLCHAIN = "gcc":
libc_a-memccpy (noflash)
libc_a-memchr (noflash)
libc_a-memmove (noflash)
libc_a-memrchr (noflash)
else:
lib_a-memccpy (noflash)
lib_a-memchr (noflash)
lib_a-memmove (noflash)
lib_a-memrchr (noflash)
if SPIRAM_CACHE_LIBSTR_IN_IRAM = y:
if IDF_TOOLCHAIN = "gcc":
libc_a-strcasecmp (noflash)
libc_a-strcasestr (noflash)
libc_a-strchr (noflash)
libc_a-strcoll (noflash)
libc_a-strcpy (noflash)
libc_a-strcspn (noflash)
libc_a-strdup (noflash)
libc_a-strdup_r (noflash)
libc_a-strlcat (noflash)
libc_a-strlcpy (noflash)
libc_a-strlwr (noflash)
libc_a-strncasecmp (noflash)
libc_a-strncat (noflash)
libc_a-strncmp (noflash)
libc_a-strncpy (noflash)
libc_a-strndup (noflash)
libc_a-strndup_r (noflash)
libc_a-strnlen (noflash)
libc_a-strrchr (noflash)
libc_a-strsep (noflash)
libc_a-strspn (noflash)
libc_a-strstr (noflash)
libc_a-strtok_r (noflash)
libc_a-strupr (noflash)
else:
lib_a-strcasecmp (noflash)
lib_a-strcasestr (noflash)
lib_a-strchr (noflash)
lib_a-strcoll (noflash)
lib_a-strcpy (noflash)
lib_a-strcspn (noflash)
lib_a-strdup (noflash)
lib_a-strdup_r (noflash)
lib_a-strlcat (noflash)
lib_a-strlcpy (noflash)
lib_a-strlwr (noflash)
lib_a-strncasecmp (noflash)
lib_a-strncat (noflash)
lib_a-strncmp (noflash)
lib_a-strncpy (noflash)
lib_a-strndup (noflash)
lib_a-strndup_r (noflash)
lib_a-strnlen (noflash)
lib_a-strrchr (noflash)
lib_a-strsep (noflash)
lib_a-strspn (noflash)
lib_a-strstr (noflash)
lib_a-strtok_r (noflash)
lib_a-strupr (noflash)
if SPIRAM_CACHE_LIBRAND_IN_IRAM = y:
if IDF_TOOLCHAIN = "gcc":
libc_a-srand (noflash)
libc_a-rand (noflash)
libc_a-rand_r (noflash)
else:
lib_a-srand (noflash)
lib_a-rand (noflash)
lib_a-rand_r (noflash)
if SPIRAM_CACHE_LIBENV_IN_IRAM = y:
if IDF_TOOLCHAIN = "gcc":
libc_a-environ (noflash)
libc_a-envlock (noflash)
libc_a-getenv_r (noflash)
else:
lib_a-environ (noflash)
lib_a-envlock (noflash)
lib_a-getenv_r (noflash)
if SPIRAM_CACHE_LIBFILE_IN_IRAM = y:
lock (noflash)
isatty (noflash)
creat (noflash)
if IDF_TOOLCHAIN = "gcc":
libc_a-fclose (noflash)
libc_a-open (noflash)
libc_a-close (noflash)
libc_a-creat (noflash)
libc_a-read (noflash)
libc_a-rshift (noflash)
libc_a-sbrk (noflash)
libc_a-stdio (noflash)
libc_a-syssbrk (noflash)
libc_a-sysclose (noflash)
libc_a-sysopen (noflash)
libc_a-sysread (noflash)
libc_a-syswrite (noflash)
libc_a-impure (noflash)
libc_a-fwalk (noflash)
libc_a-findfp (noflash)
else:
lib_a-fclose (noflash)
lib_a-open (noflash)
lib_a-close (noflash)
lib_a-creat (noflash)
lib_a-read (noflash)
lib_a-rshift (noflash)
lib_a-sbrk (noflash)
lib_a-stdio (noflash)
lib_a-syssbrk (noflash)
lib_a-sysclose (noflash)
lib_a-sysopen (noflash)
lib_a-sysread (noflash)
lib_a-syswrite (noflash)
lib_a-impure (noflash)
lib_a-fwalk (noflash)
lib_a-findfp (noflash)
if SPIRAM_CACHE_LIBMISC_IN_IRAM = y:
if IDF_TOOLCHAIN = "gcc":
libc_a-raise (noflash)
libc_a-system (noflash)
else:
lib_a-raise (noflash)
lib_a-system (noflash)