Skip to content
Snippets Groups Projects
Commit b522c134 authored by Oleg Hahm's avatar Oleg Hahm
Browse files

example ccn-lite-relay; enable TLSF for native

With the previous commit TLSF should compile for native, too.
parent 60e283e6
No related branches found
No related tags found
No related merge requests found
......@@ -33,10 +33,7 @@ USEMODULE += xtimer
USEMODULE += random
USEMODULE += prng_minstd
ifneq (,$(filter-out native,$(BOARD)))
USEPKG += tlsf
endif
USEPKG += tlsf
USEPKG += ccn-lite
USEMODULE += ccn-lite-utils
......
......@@ -20,11 +20,7 @@
#include <stdio.h>
/* TODO: currently TLSF has to be disabled for native because of its stricter
* CFLAGS (-pedantic) */
#ifndef BOARD_NATIVE
# include "tlsf-malloc.h"
#endif
#include "tlsf-malloc.h"
#include "msg.h"
#include "shell.h"
#include "ccn-lite-riot.h"
......@@ -33,17 +29,13 @@
#define MAIN_QUEUE_SIZE (8)
static msg_t _main_msg_queue[MAIN_QUEUE_SIZE];
#ifndef BOARD_NATIVE
/* some buffer for the heap */
# define TLSF_BUFFER (10240 / sizeof(uint32_t))
static uint32_t _tlsf_heap[TLSF_BUFFER];
#endif
/* 10kB buffer for the heap should be enough for everyone */
#define TLSF_BUFFER (10240 / sizeof(uint32_t))
static uint32_t _tlsf_heap[TLSF_BUFFER];
int main(void)
{
#ifndef BOARD_NATIVE
tlsf_create_with_pool(_tlsf_heap, sizeof(_tlsf_heap));
#endif
msg_init_queue(_main_msg_queue, MAIN_QUEUE_SIZE);
puts("Basic CCN-Lite example");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment