[apps/code][mpy][makefile] Fix size error on n0100 (#30)

This commit is contained in:
ArtichautCosmique
2021-09-26 20:37:56 +02:00
committed by GitHub
parent 8c949d7048
commit 0a5e9e0889
8 changed files with 53 additions and 15 deletions

View File

@@ -604,6 +604,7 @@ Q(username)
Q(rename)
Q(listdir)
#if defined(INCLUDE_ULAB)
// ulab QSTRs
Q(threshold)
Q(edgeitems)
@@ -721,3 +722,4 @@ Q(from_int16_buffer)
Q(from_uint16_buffer)
Q(from_int32_buffer)
Q(from_uint32_buffer)
#endif

View File

@@ -34,13 +34,7 @@
// Determines, whether scipy is defined in ulab. The sub-modules and functions
// of scipy have to be defined separately
#ifndef ULAB_HAS_SCIPY
#if defined(DEVICE_N0100)
#define ULAB_HAS_SCIPY (0)
#else
#define ULAB_HAS_SCIPY (1)
#endif
#endif
// The maximum number of dimensions the firmware should be able to support
// Possible values lie between 1, and 4, inclusive

View File

@@ -136,6 +136,19 @@ extern const struct _mp_obj_module_t modpyplot_module;
extern const struct _mp_obj_module_t modtime_module;
extern const struct _mp_obj_module_t modos_module;
extern const struct _mp_obj_module_t modturtle_module;
#if !defined(INCLUDE_ULAB)
#define MICROPY_PORT_BUILTIN_MODULES \
{ MP_ROM_QSTR(MP_QSTR_ion), MP_ROM_PTR(&modion_module) }, \
{ MP_ROM_QSTR(MP_QSTR_kandinsky), MP_ROM_PTR(&modkandinsky_module) }, \
{ MP_ROM_QSTR(MP_QSTR_matplotlib), MP_ROM_PTR(&modmatplotlib_module) }, \
{ MP_ROM_QSTR(MP_QSTR_matplotlib_dot_pyplot), MP_ROM_PTR(&modpyplot_module) }, \
{ MP_ROM_QSTR(MP_QSTR_time), MP_ROM_PTR(&modtime_module) }, \
{ MP_ROM_QSTR(MP_QSTR_os), MP_ROM_PTR(&modos_module) }, \
{ MP_ROM_QSTR(MP_QSTR_turtle), MP_ROM_PTR(&modturtle_module) }, \
#else
extern const struct _mp_obj_module_t ulab_user_cmodule;
#define MICROPY_PORT_BUILTIN_MODULES \
@@ -146,7 +159,10 @@ extern const struct _mp_obj_module_t ulab_user_cmodule;
{ MP_ROM_QSTR(MP_QSTR_time), MP_ROM_PTR(&modtime_module) }, \
{ MP_ROM_QSTR(MP_QSTR_os), MP_ROM_PTR(&modos_module) }, \
{ MP_ROM_QSTR(MP_QSTR_turtle), MP_ROM_PTR(&modturtle_module) }, \
{ MP_ROM_QSTR(MP_QSTR_ulab), MP_ROM_PTR(&ulab_user_cmodule) }, \
{ MP_ROM_QSTR(MP_QSTR_ulab), MP_ROM_PTR(&ulab_user_cmodule) }, \
#endif
// Enable setjmp in debug mode. This is to avoid some optimizations done
// specifically for x86_64 using inline assembly, which makes the debug binary

View File

@@ -61,7 +61,9 @@ extern "C" {
#include "mphalport.h"
#include "mod/turtle/modturtle.h"
#include "mod/matplotlib/pyplot/modpyplot.h"
#if defined(INCLUDE_ULAB)
#include "mod/ulab/ulab.h"
#endif
}
#include <escher/palette.h>