Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
micropython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
micropython
Commits
b3a65791
Commit
b3a65791
authored
Aug 24, 2016
by
Paul Sokolovsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zephyr: Enable stack checking and micropython.mem_info().
parent
ac701197
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
zephyr/main.c
zephyr/main.c
+4
-0
zephyr/mpconfigport.h
zephyr/mpconfigport.h
+2
-0
No files found.
zephyr/main.c
View file @
b3a65791
...
...
@@ -7,6 +7,7 @@
#include "py/runtime.h"
#include "py/repl.h"
#include "py/gc.h"
#include "py/stackctrl.h"
#include "lib/utils/pyexec.h"
void
do_str
(
const
char
*
src
,
mp_parse_input_kind_t
input_kind
)
{
...
...
@@ -35,6 +36,9 @@ static char heap[16 * 1024];
int
real_main
(
void
)
{
int
stack_dummy
;
stack_top
=
(
char
*
)
&
stack_dummy
;
mp_stack_set_top
(
stack_top
);
// Should be set to stack size in prj.mdef minus fuzz factor
mp_stack_set_limit
(
3584
);
#if MICROPY_ENABLE_GC
gc_init
(
heap
,
heap
+
sizeof
(
heap
));
...
...
zephyr/mpconfigport.h
View file @
b3a65791
...
...
@@ -5,6 +5,7 @@
#define MICROPY_COMP_CONST (0)
#define MICROPY_COMP_DOUBLE_TUPLE_ASSIGN (0)
#define MICROPY_STACK_CHECK (1)
#define MICROPY_ENABLE_GC (1)
#define MICROPY_HELPER_REPL (1)
#define MICROPY_REPL_AUTO_INDENT (1)
...
...
@@ -23,6 +24,7 @@
#define MICROPY_PY_COLLECTIONS (0)
#define MICROPY_PY_CMATH (0)
#define MICROPY_PY_IO (0)
#define MICROPY_PY_MICROPYTHON_MEM_INFO (1)
#define MICROPY_PY_STRUCT (0)
#define MICROPY_PY_SYS_MODULES (0)
#define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_LONGLONG)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment