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 NON_GC_HEAP_RESERVATION 1024
|
|
|
|
|
2020-08-19 22:03:58 +02:00
|
|
|
#ifdef CODAL_CONFIG_H
|
|
|
|
#define MICROBIT_CODAL 1
|
|
|
|
#else
|
|
|
|
#define MICROBIT_CODAL 0
|
2021-11-25 17:27:39 +01:00
|
|
|
#define GC_BLOCK_SIZE 256
|
2020-08-19 22:03:58 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#if !MICROBIT_CODAL
|
|
|
|
#undef DMESG
|
2019-12-02 05:58:26 +01:00
|
|
|
#define DMESG NOLOG
|
2020-08-19 22:03:58 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#undef BYTES_TO_WORDS
|
2019-12-02 05:58:26 +01:00
|
|
|
|
|
|
|
#endif
|