integrate libosmocore logging into firmware
We do so using our own 'raw' log target to avoid the 4k-on-stack
buffer of libosmocore _output() function.
Change-Id: I7a10b5b2b50bcee0154a1fa3fc43756aec836226
diff --git a/sysmoOCTSIM/main.c b/sysmoOCTSIM/main.c
index 80b52dc..01ea0a8 100644
--- a/sysmoOCTSIM/main.c
+++ b/sysmoOCTSIM/main.c
@@ -946,11 +946,12 @@
}
extern void testmode_init(void);
+extern void libosmo_emb_init(void);
#include "talloc.h"
+#include "logging.h"
#include <osmocom/core/msgb.h>
void *g_tall_ctx;
-void *g_msgb_ctx;
DEFUN(_talloc_report, cmd_talloc_report, "talloc-report", "Generate a talloc report")
{
@@ -1039,8 +1040,10 @@
talloc_enable_null_tracking();
g_tall_ctx = talloc_named_const(NULL, 0, "global");
printf("g_tall_ctx=%p\r\n", g_tall_ctx);
- g_msgb_ctx = talloc_pool(g_tall_ctx, 20480);
- talloc_set_memlimit(g_msgb_ctx, 20480);
+
+ libosmo_emb_init();
+
+ LOGP(DUSB, LOGL_ERROR, "foobar usb\n");
command_print_prompt();
while (true) { // main loop