2019-12-02 05:58:26 +01:00
|
|
|
#ifndef __PXTCORE_H
|
|
|
|
#define __PXTCORE_H
|
|
|
|
|
|
|
|
#include "MicroBit.h"
|
|
|
|
#include "MicroBitImage.h"
|
|
|
|
#include "ManagedString.h"
|
|
|
|
#include "ManagedType.h"
|
|
|
|
|
|
|
|
namespace pxt {
|
|
|
|
void debuglog(const char *format, ...);
|
|
|
|
}
|
|
|
|
|
|
|
|
// #define GC_GET_HEAP_SIZE() device_heap_size(0)
|
|
|
|
#define xmalloc malloc
|
|
|
|
#define xfree free
|
|
|
|
|
|
|
|
#define GC_MAX_ALLOC_SIZE 9000
|
|
|
|
|
|
|
|
#define GC_BLOCK_SIZE 256
|
|
|
|
#define NON_GC_HEAP_RESERVATION 1024
|
|
|
|
|
2020-09-08 11:04:25 +02:00
|
|
|
|
|
|
|
#ifdef CODAL_CONFIG_H
|
|
|
|
#define MICROBIT_CODAL 1
|
|
|
|
#else
|
|
|
|
#define MICROBIT_CODAL 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !MICROBIT_CODAL
|
|
|
|
#undef DMESG
|
2019-12-02 05:58:26 +01:00
|
|
|
#define DMESG NOLOG
|
2020-09-08 11:04:25 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#undef BYTES_TO_WORDS
|
2019-12-02 05:58:26 +01:00
|
|
|
|
|
|
|
#endif
|