Commit 7c46cecc authored by Damien George's avatar Damien George
Browse files

leon: Add leon-spacebel port with configuration close to Spacebel's.

parent f4a0aeaf
# This file is part of the MicroPython port to LEON platforms
# Copyright (c) 2015-2016 George Robotics Limited
#
# Provided to the European Space Agency as part of the project "Porting of
# MicroPython to LEON platforms", contract number 4000114080/15/NL/FE/as.
#
# This Makefile builds the LEON port used for running the test suite.
# the location of the MicroPython LEON support code
LEON_COMMON = leon-common
LEON_COMMON_FROM_HERE = ../$(LEON_COMMON)
include ../py/mkenv.mk
# qstr definitions (must come before including py.mk)
QSTR_DEFS = $(LEON_COMMON_FROM_HERE)/qstrdefsport.h
# include py core make definitions
include ../py/py.mk
# include LEON common makefile settings
include $(LEON_COMMON_FROM_HERE)/mkenv.mk
INC =
INC += -I. -I.. -I$(BUILD) -I$(LEON_COMMON_FROM_HERE)
CFLAGS += $(INC) -Wall -Werror -ansi -std=gnu99 $(COPT) -mcpu=v8
# Use this to optimise the static hash tables
#CFLAGS += -no-integrated-cpp -B$(shell pwd)/../tools
# Debugging/Optimization
ifeq ($(DEBUG), 1)
CFLAGS += -O0 -ggdb
else
CFLAGS += -Os -DNDEBUG
endif
LIBS += -lm
SRC_C = \
main.c \
lib/libc/memcmp.c \
lib/libc/memcpy.c \
lib/libc/memmove.c \
lib/libc/memset.c \
lib/libc/strchr.c \
lib/libc/strcmp.c \
lib/libc/strlen.c \
lib/libc/strncmp.c \
$(LEON_COMMON)/mputil.c \
$(LEON_COMMON)/mphalport.c \
$(LEON_COMMON)/modtime.c \
$(LEON_COMMON)/modrtems.c \
$(LEON_COMMON)/modrtemstask.c \
$(LEON_COMMON)/modrtemsqueue.c \
$(LEON_COMMON)/modrtemssem.c \
$(LEON_COMMON)/modmem.c \
$(LEON_COMMON)/moddatapool.c \
SRC_S = \
$(LEON_COMMON)/sparcjmp.s \
$(LEON_COMMON)/gchelper.s \
OBJ = $(PY_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o) $(SRC_S:.s=.o) $(SRC_RTEMS:.c=.o))
all: $(BUILD)/firmware.elf $(BUILD)/firmware.srec $(BUILD)/firmware.tab
$(BUILD)/firmware.elf: $(OBJ)
$(ECHO) "LINK $@"
$(Q)$(LD) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
$(Q)$(SIZE) $@
$(BUILD)/firmware.srec: $(BUILD)/firmware.elf
$(ECHO) "SREC $@"
$(Q)$(OBJCOPY) -O srec $< $@
$(BUILD)/firmware.tab: $(BUILD)/firmware.elf
$(ECHO) "TAB $@"
$(Q)$(OBJDUMP) --syms $< > $@
# Preprocess all the source files, producing .pp output in the $(BUILD) dir.
# We first build all the object files so that qstrs etc are generated correctly.
PREPROC_IGNORE = py/emitn%.pp leon-common/sparcjmp.pp leon-common/gchelper.pp
preprocess: $(OBJ) $(filter-out $(addprefix $(BUILD)/,$(PREPROC_IGNORE)),$(OBJ:.o=.pp))
include ../py/mkrules.mk
/*
* This file is part of the MicroPython port to LEON platforms
* Copyright (c) 2015-2016 George Robotics Limited
*
* Provided to the European Space Agency as part of the project "Porting of
* MicroPython to LEON platforms", contract number 4000114080/15/NL/FE/as.
*/
#include <stdio.h>
#include <rtems.h>
#define CONFIGURE_INIT
#define CONFIGURE_INIT_TASK_ENTRY_POINT Init
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_MAXIMUM_TASKS (13)
#define CONFIGURE_MAXIMUM_SEMAPHORES (4)
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES (4)
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_EXTRA_TASK_STACKS (20 * RTEMS_MINIMUM_STACK_SIZE)
rtems_task Init(rtems_task_argument argument);
rtems_task mp_manager_task(rtems_task_argument unused);
rtems_task mp_worker_task(rtems_task_argument unused);
#include <rtems/confdefs.h>
#include "leon-common/sparcisr.h"
#include "leon-common/moddatapool.h"
#define MICROPY_RTEMS_TASK_ATTRIBUTES (RTEMS_APPLICATION_TASK | RTEMS_FLOATING_POINT)
#define MICROPY_RTEMS_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 3)
#define MICROPY_RTEMS_HEAP_SIZE (48 * 1024)
#define MICROPY_RTEMS_NUM_TASKS (10)
#define MICROPY_RTEMS_PYSTACK_WORD_SIZE (512)
#define DATAPOOL_HEAP_SIZE (4 * 1024)
static uint8_t datapool_heap[DATAPOOL_HEAP_SIZE];
/******************************************************************************/
// RTEMS initialisation task
// this task runs at highest priority and is non-preemptive
rtems_task Init(rtems_task_argument ignored) {
sparc_install_ta_3_window_flush_isr();
// set the time
rtems_time_of_day time;
time.year = 2016;
time.month = 1;
time.day = 1;
time.hour = 0;
time.minute = 0;
time.second = 0;
time.ticks = 0;
rtems_clock_set(&time);
// initialise the message queue subsystem
#if RTEMS_4_8
_Message_queue_Manager_initialization(4);
#else
//_Message_queue_Manager_initialization();
//_Semaphore_Manager_initialization();
#endif
// initialise the timer subsystem
#if RTEMS_4_8
_Timer_Manager_initialization(2);
#else
//_Timer_Manager_initialization();
#endif
// bring up the datapool
datapool_init(datapool_heap, DATAPOOL_HEAP_SIZE);
// start the manager task to do the rest of the work
rtems_name task_name = rtems_build_name('M', 'P', 'M', 'A');
rtems_id task_id;
rtems_status_code status;
status = rtems_task_create(
task_name, 1, RTEMS_MINIMUM_STACK_SIZE, RTEMS_DEFAULT_MODES,
MICROPY_RTEMS_TASK_ATTRIBUTES, &task_id
);
if (status != RTEMS_SUCCESSFUL) {
return;
}
status = rtems_task_start(task_id, mp_manager_task, 0);
if (status != RTEMS_SUCCESSFUL) {
return;
}
rtems_task_delete(RTEMS_SELF);
}
/******************************************************************************/
// MicroPython manager task
// these variables define the location of the externally-loaded .mpy files
#define MPY_MEM_BASE (0x40200000)
#define MPY_MEM_STRIDE (0x00010000)
#include "py/mpprint.h"
#include "py/mphal.h"
// this function is used as a hook to set a breakpoint to terminate emu
void emu_terminate(void) {
mp_printf(&mp_plat_print, "emu_terminate\n");
}
rtems_task mp_manager_task(rtems_task_argument ignored) {
mp_printf(&mp_plat_print, "\nMicroPython manager task started\n");
// detect the number of tasks needed by looking for valid scripts
int num_tasks = 0;
for (int i = 0; i < MICROPY_RTEMS_NUM_TASKS; ++i) {
const void *mpy_base = (const void*)(MPY_MEM_BASE + MPY_MEM_STRIDE * i);
size_t mpy_len = *(const uint32_t*)mpy_base;
const uint8_t *mpy_data = (const uint8_t*)(mpy_base + 4);
if (mpy_len > 0 && mpy_data[0] == 'M') {
num_tasks += 1;
} else {
break;
}
}
mp_printf(&mp_plat_print, "Detected %u scripts\n", num_tasks);
// we must use hexlified output so it isn't modified by the UART
mp_hal_stdout_enable_hexlify();
rtems_name task_name[MICROPY_RTEMS_NUM_TASKS];
rtems_id task_id[MICROPY_RTEMS_NUM_TASKS];
// spawn all worker tasks
for (int i = 0; i < num_tasks; ++i) {
rtems_status_code status;
task_name[i] = rtems_build_name('M', 'P', '0', '0' + i);
status = rtems_task_create(
task_name[i], 1, MICROPY_RTEMS_STACK_SIZE, RTEMS_DEFAULT_MODES,
MICROPY_RTEMS_TASK_ATTRIBUTES, &task_id[i]
);
if (status != RTEMS_SUCCESSFUL) {
mp_printf(&mp_plat_print, "Error creating task #%u: %u\n", i, status);
emu_terminate();
}
status = rtems_task_start(task_id[i], mp_worker_task, i);
if (status != RTEMS_SUCCESSFUL) {
mp_printf(&mp_plat_print, "Error starting task #%u: %u\n", i, status);
emu_terminate();
}
}
// wait for all scripts to finish
for (;;) {
rtems_task_wake_after(200);
int num_tasks_complete = 0;
for (int i = 0; i < num_tasks; ++i) {
uint32_t note;
rtems_task_get_note(task_id[i], RTEMS_NOTEPAD_0, &note);
if (note != 0) {
num_tasks_complete += 1;
}
}
if (num_tasks_complete == num_tasks) {
mp_hal_stdout_disable_hexlify();
emu_terminate();
}
}
}
/******************************************************************************/
// MicroPython worker task
#include "py/runtime.h"
#include "py/gc.h"
#include "py/stackctrl.h"
#include "py/pystack.h"
#include "mputil.h"
static mp_state_ctx_t mp_state_ctx[MICROPY_RTEMS_NUM_TASKS];
static byte mp_heap[MICROPY_RTEMS_NUM_TASKS * MICROPY_RTEMS_HEAP_SIZE];
static mp_obj_t mp_pystack[MICROPY_RTEMS_NUM_TASKS * MICROPY_RTEMS_PYSTACK_WORD_SIZE];
rtems_task mp_worker_task(rtems_task_argument task_index) {
// set the MicroPython context for this task
_Thread_Executing->Start.numeric_argument = (uint32_t)&mp_state_ctx[task_index];
// set value for rtems.script_id() function
MP_STATE_PORT(rtems_script_id) = mp_obj_new_int(task_index);
// initialise the stack limit checking
mp_stack_ctrl_init();
mp_stack_set_limit(MICROPY_RTEMS_STACK_SIZE - 2048);
// initialise the heap
byte *heap_start = &mp_heap[task_index * MICROPY_RTEMS_HEAP_SIZE];
gc_init(heap_start, heap_start + MICROPY_RTEMS_HEAP_SIZE);
// initialise the Python stack
mp_pystack_init(&mp_pystack[task_index * MICROPY_RTEMS_PYSTACK_WORD_SIZE],
&mp_pystack[(task_index + 1) * MICROPY_RTEMS_PYSTACK_WORD_SIZE]);
// initialise the MicroPython runtime
mp_init();
// get the precompiled bytecode from the fixed address in RAM
const void *mpy_base = (const void*)(MPY_MEM_BASE + MPY_MEM_STRIDE * task_index);
size_t mpy_len = *(const uint32_t*)mpy_base;
const byte *mpy_data = (const byte*)(mpy_base + 4);
// execute the bytecode
uint32_t retval = mp_exec_mpy(mpy_data, mpy_len);
// check the return value
if (retval != 0) {
mp_printf(&mp_plat_print, "retval = %u\n", (uint)retval);
}
// deinitialise the MicroPython runtime
mp_deinit();
// indicate that the script has completed
rtems_task_set_note(RTEMS_SELF, RTEMS_NOTEPAD_0, 1);
// wait for termination
for (;;) {
rtems_task_wake_after(200);
}
}
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2013-2015 Damien P. George
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
// include common options for LEON/SPARC
#define MICROPY_USE_64BIT_NAN_BOXING (1)
#include "leon-common/mpconfigport_common.h"
#define MICROPY_ENABLE_PYSTACK (1)
#define MICROPY_STACKLESS (1)
#define MICROPY_STACKLESS_STRICT (1)
#define MICROPY_ENABLE_SCHEDULER (0)
#define MICROPY_FLOAT_HIGH_QUALITY_HASH (0)
#define MICROPY_MODULE_FROZEN_MPY (0)
#define MICROPY_MODULE_FROZEN_STR (0)
#define MICROPY_FULL_CHECK (1)
#define MICROPY_KBD_EXCEPTION (0)
#define MICROPY_PY_BUILTINS_INPUT (0)
#define MICROPY_PY_FRAMEBUF (0)
#define MICROPY_PY_IO_BUFFEREDWRITER (0)
#define MICROPY_PY_IO_RESOURCE_STREAM (0)
#define MICROPY_PY_MACHINE_I2C (0)
#define MICROPY_PY_MACHINE_PULSE (0)
#define MICROPY_PY_MACHINE_SPI (0)
#define MICROPY_PY_THREAD (0)
#define MICROPY_PY_THREAD_GIL (0)
#define MICROPY_PY_THREAD_GIL_DIVISOR (0)
#define MICROPY_PY_USELECT (0)
#define MICROPY_PY_UTIMEQ (0)
#define MICROPY_PY_UTIME_MP_HAL (0)
#define MICROPY_PY_WEBSOCKET (0)
#define MICROPY_READER_VFS (0)
#define MICROPY_SCHEDULER_DEPTH (0)
#define MICROPY_STREAMS_POSIX_API (0)
#define MICROPY_ALLOC_GC_STACK_SIZE (64)
#define MICROPY_GC_CONSERVATIVE_CLEAR (MICROPY_ENABLE_GC)
#define MICROPY_GC_ALLOC_THRESHOLD (1)
#define MICROPY_ALLOC_QSTR_CHUNK_INIT (128)
#define MICROPY_ALLOC_LEXER_INDENT_INIT (10)
#define MICROPY_ALLOC_LEXEL_INDENT_INC (8)
#define MICROPY_ALLOC_PARSE_RULE_INIT (64)
#define MICROPY_ALLOC_PARSE_RULE_INC (16)
#define MICROPY_ALLOC_PARSE_RESULT_INIT (32)
#define MICROPY_ALLOC_PARSE_RESULT_INC (16)
#define MICROPY_ALLOC_PARSE_INTERN_STRING_LEN (10)
#define MICROPY_ALLOC_PARSE_CHUNK_INIT (128)
#define MICROPY_ALLOC_SCOPE_ID_INIT (4)
#define MICROPY_ALLOC_SCOPE_ID_INC (6)
#define MICROPY_ALLOC_PATH_MAX (512)
#define MICROPY_MODULE_DICT_SIZE (1)
#define MICROPY_MALLOC_USES_ALLOCATED_SIZE (0)
#define MICROPY_QSTR_BYTES_IN_LEN (1)
#define MICROPY_QSTR_BYTES_IN_HASH (2)
#define MICROPY_EMIT_X64 (0)
#define MICROPY_EMIT_X86 (0)
#define MICROPY_EMIT_THUMB (0)
#define MICROPY_EMIT_INLINE_THUMB (0)
#define MICROPY_EMIT_INLINE_THUMB_ARMV7M (1)
#define MICROPY_EMIT_INLINE_THUMB_FLOAT (1)
#define MICROPY_EMIT_ARM (0)
#define MICROPY_EMIT_XTENSA (0)
#define MICROPY_EMIT_INLINE_XTENSA (0)
#define MICROPY_COMP_CONST_FOLDING (1)
#define MICROPY_COMP_MODULE_CONST (0)
#define MICROPY_COMP_CONST (1)
#define MICROPY_COMP_DOUBLE_TUPLE_ASSIGN (1)
#define MICROPY_COMP_TRIPLE_TUPLE_ASSIGN (0)
#define MICROPY_COMP_RETURN_IF_EXPR (0)
#define MICROPY_MEM_STATS (0)
#define MICROPY_DEBUG_PRINTERS (0)
#define MICROPY_OPT_COMPUTED_GOTO (0)
#define MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE (0)
#define MICROPY_OPT_MPZ_BITWISE (0)
#define MICROPY_READER_VFS (0)
#define MICROPY_ENABLE_GC (1)
#define MICROPY_ENABLE_IMMORTAL_GC (0)
#define MICROPY_ENABLE_FINALISER (0)
#define MICROPY_STACK_CHECK (1)
#define MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF (1)
#define MICROPY_EMERGENCY_EXCEPTION_BUF_SIZE (256)
#define MICROPY_KBD_EXCEPTION (0)
#define MICROPY_ASYNC_KBD_INTR (0)
#define MICROPY_HELPER_REPL (0)
#define MICROPY_REPL_EMACS_KEYS (0)
#define MICROPY_REPL_AUTO_INDENT (0)
#define MICROPY_REPL_EVENT_DRIVEN (0)
#define MICROPY_HELPER_LEXER_UNIX (0)
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_MPZ)
#define MICROPY_ENABLE_SOURCE_LINE (1)
#define MICROPY_ENABLE_DOC_STRING (0)
#define MICROPY_ERROR_REPORTING (MICROPY_ERROR_REPORTING_NORMAL)
#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_DOUBLE)
#define MICROPY_PY_BUILTINS_COMPLEX (0)
#define MICROPY_CPYTHON_COMPAT (1)
#define MICROPY_PY_ASYNC_AWAIT (0)
#define MICROPY_PY_BUILTINS_STR_UNICODE (0)
#define MICROPY_PY_BUILTINS_STR_CENTER (0)
#define MICROPY_PY_BUILTINS_STR_PARTITION (0)
#define MICROPY_PY_BUILTINS_STR_SPLITLINES (1)
#define MICROPY_PY_BUILTINS_BYTEARRAY (1)
#define MICROPY_PY_BUILTINS_MEMORYVIEW (1)
#define MICROPY_PY_BUILTINS_SET (1)
#define MICROPY_PY_BUILTINS_SLICE (1)
#define MICROPY_PY_BUILTINS_SLICE_ATTRS (0)
#define MICROPY_PY_BUILTINS_FROZENSET (0)
#define MICROPY_PY_BUILTINS_PROPERTY (0)
#define MICROPY_PY_BUILTINS_RANGE_ATTRS (1)
#define MICROPY_PY_BUILTINS_TIMEOUTERROR (0)
#define MICROPY_PY_ALL_SPECIAL_METHODS (0)
#define MICROPY_PY_BUILTINS_COMPILE (0)
#define MICROPY_PY_BUILTINS_ENUMERATE (1)
#define MICROPY_PY_BUILTINS_EXECFILE (0)
#define MICROPY_PY_BUILTINS_FILTER (1)
#define MICROPY_PY_BUILTINS_REVERSED (1)
#define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (0)
#define MICROPY_PY_BUILTINS_MIN_MAX (1)
#define MICROPY_PY_BUILTINS_POW3 (0)
#define MICROPY_PY_BUILTINS_HELP (0)
#define MICROPY_PY_BUILTINS_HELP_MODULES (0)
#define MICROPY_PY_ARRAY (1)
#define MICROPY_PY_ARRAY_SLICE_ASSIGN (1)
#define MICROPY_PY_ATTRTUPLE (0)
#define MICROPY_PY_COLLECTIONS (1)
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (0)
#define MICROPY_PY_MATH (1)
#define MICROPY_PY_MATH_SPECIAL_FUNCTIONS (0)
#define MICROPY_PY_CMATH (0)
#define MICROPY_PY_GC (1)
#define MICROPY_PY_GC_COLLECT_RETVAL (0)
#define MICROPY_PY_IO (0)
#define MICROPY_PY_IO_RESOURCE_STREAM (0)
#define MICROPY_PY_IO_FILEIO (0)
#define MICROPY_PY_IO_BYTESIO (0)
#define MICROPY_PY_IO_BUFFEREDWRITER (0)
#define MICROPY_PY_STRUCT (1)
#define MICROPY_PY_SYS (1)
#define MICROPY_PY_SYS_MAXSIZE (0)
#define MICROPY_PY_SYS_MODULES (0)
#define MICROPY_PY_SYS_EXC_INFO (0)
#define MICROPY_PY_SYS_EXIT (1)
#define MICROPY_PY_SYS_STDFILES (0)
#define MICROPY_PY_SYS_STDIO_BUFFER (0)
#define MICROPY_PY_UERRNO (0)
#define MICROPY_PY_UERRNO_ERRORCODE (0)
#define MICROPY_PY_USELECT (0)
#define MICROPY_PY_UTIME_MP_HAL (0)
#define MICROPY_PY_THREAD (0)
#define MICROPY_PY_UCTYPES (0)
#define MICROPY_PY_UZLIB (0)
#define MICROPY_PY_UJSON (0)
#define MICROPY_PY_URE (0)
#define MICROPY_PY_UHEAPQ (0)
#define MICROPY_PY_UTIMEQ (0)
#define MICROPY_PY_UHASHLIB (0)
#define MICROPY_PY_UBINASCII (1)
#define MICROPY_PY_UBINASCII_CRC32 (0)
#define MICROPY_PY_URANDOM (0)
#define MICROPY_PY_URANDOM_EXTRA_FUNCS (0)
#define MICROPY_PY_MACHINE (0)
#define MICROPY_PY_MACHINE_PULSE (0)
#define MICROPY_PY_MACHINE_I2C (0)
#define MICROPY_PY_MACHINE_SPI (0)
#define MICROPY_PY_USSL (0)
#define MICROPY_PY_USSL_FINALISER (0)
#define MICROPY_PY_WEBSOCKET (0)
#define MICROPY_PY_FRAMEBUF (0)
#define MICROPY_PY_BTREE (0)
#define MICROPY_MULTIPLE_INHERITANCE (1)
#define MICROPY_PY_ALL_SPECIAL_METHODS (0)
#define MICROPY_PY_ALL_INPLACE_SPECIAL_METHODS (0)
#define MICROPY_PY_REVERSE_SPECIAL_METHODS (0)
#define MICROPY_PY_COLLECTIONS_NAMEDTUPLE__ASDICT (0)
#define MICROPY_PY_BUILTINS_STR_UNICODE_CHECK (0)
// definitions specific to SPARC
#define MP_ENDIANNESS_BIG (1)
#define MICROPY_MAKE_POINTER_CALLABLE(p) ((void*)p)
#define MICROPY_SPARC_NUM_REG_WINDOWS (8)
// definitions specific to VM (vs cross-compiler)
#define MICROPY_ENABLE_COMPILER (0)
#define MICROPY_READER_POSIX (0)
#define MICROPY_PERSISTENT_CODE_LOAD (1)
#define MICROPY_PERSISTENT_CODE_SAVE (0)
#define MICROPY_DYNAMIC_COMPILER (0)
#define MICROPY_USE_INTERNAL_PRINTF (0)
#define MICROPY_PY_MICROPYTHON_MEM_INFO (1)
#define MICROPY_PY___FILE__ (1)
#define MICROPY_USE_INTERNAL_ERRNO (1)
#if 0
// settings for Gaisler RTEMS
#define MICROPY_NLR_SPARC (0)
#define MICROPY_NLR_SETJMP (1)
#define MICROPY_NO_ALLOCA (0)
#else
// settings for Edisoft RTEMS
#define MICROPY_NLR_SPARC (1)
#endif
// Root pointers
#define MICROPY_PORT_ROOT_POINTERS \
mp_obj_t rtems_script_id; \
mp_map_t datapool_index; \
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment