From b7b16de429c5ed536e6a62c05221a0c5a750117d Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Tue, 16 Jun 2015 16:22:55 +1000 Subject: [PATCH] Alias ets_printf directly to printf at link time I thought maybe ets_printf had some special properties, but it doesn't seem to have any so far. --- core/sdk_compat.c | 13 ------------- ld/eagle.app.v6.ld | 3 +++ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/core/sdk_compat.c b/core/sdk_compat.c index 5abee60..62d458c 100644 --- a/core/sdk_compat.c +++ b/core/sdk_compat.c @@ -13,16 +13,3 @@ void *zalloc(size_t nbytes) { return calloc(1, nbytes); } - -/* this is currently just a stub to see where in the SDK it gets - called, and with what arguments... - - In the binary SDK printf & ets_printf are aliased together, most - references appear to be to printf but libphy, libwpa & libnet80211 - all call ets_printf sometimes... Seems to not be in common code - paths, haven't investigated exactly where. -*/ -int ets_printf(const char *format, ...) { - return printf("ets_printf format=%s\r\n", format); -} - diff --git a/ld/eagle.app.v6.ld b/ld/eagle.app.v6.ld index ef36d70..173db63 100644 --- a/ld/eagle.app.v6.ld +++ b/ld/eagle.app.v6.ld @@ -18,6 +18,9 @@ _lock_try_acquire_recursive = vPortEnterCritical; _lock_release = vPortExitCritical; _lock_release_recursive = vPortExitCritical; +/* SDK compatibility */ +ets_printf = printf; + /* Linker Script for ld -N */ MEMORY {