Search found 20 matches
- Wed Sep 24, 2014 5:21 pm
- Forum: Development of MicroPython
- Topic: /unix/seg_helpers.c
- Replies: 8
- Views: 10568
Re: /unix/seg_helpers.c
I seem to have hit rock, just because I can't get BSS start and end from generic C-code. I'm interested in the idea of implementing a reference counting system. If there is any existing discussion on this, please could someone link it? I can't find it... The idea might be to have a preprocessor flag...
- Wed Sep 24, 2014 2:01 pm
- Forum: Development of MicroPython
- Topic: /unix/seg_helpers.c
- Replies: 8
- Views: 10568
Re: /unix/seg_helpers.c
Thanks for the explanations. I can see this is awkward in terms of creating a generic build. My goal is still to be able to drop a wodge of C code into some C/C++project (on unspecified platform) and instantly have embedded Python. I think this could eventually go in a /generic/ folder But this issu...
- Wed Sep 24, 2014 12:45 am
- Forum: Development of MicroPython
- Topic: Parser errors
- Replies: 3
- Views: 5419
Re: Parser errors
So now I am using brackets for print, thanks! I've switched from using the bare_arm do_str function to using the one in /unix/main.c uint mp_verbose_flag = 1; uint emit_opt = MP_EMIT_OPT_NONE; bool compile_only = false; // returns standard error codes: 0 for success, 1 for all other errors STATIC in...
- Tue Sep 23, 2014 4:02 pm
- Forum: Development of MicroPython
- Topic: /unix/seg_helpers.c
- Replies: 8
- Views: 10568
/unix/seg_helpers.c
This file contains the following: /* This is a stub used to create the symbols __bss_start and _end in a Mach-O object file. Thoses are needed by the GC, and should point to the start and end of the bss section. We reach this goal by linking this file last (putting _end at the end...), and using an ...
- Tue Sep 23, 2014 1:17 pm
- Forum: Development of MicroPython
- Topic: Parser errors
- Replies: 3
- Views: 5419
Parser errors
I'm getting a parser error: void test_python() { #if MICROPY_ENABLE_GC // Heap size of GC heap (if enabled) // Make it larger on a 64 bit machine, because pointers are larger. long heap_size = 128*1024 * (sizeof(mp_uint_t) / 4); char *heap = malloc(heap_size); gc_init(heap, heap + heap_size); #endif...
- Tue Sep 23, 2014 12:44 pm
- Forum: Development of MicroPython
- Topic: EXC_BAD_ACCESS in nlrsetjmp.c
- Replies: 5
- Views: 8250
- Tue Sep 23, 2014 12:13 am
- Forum: Development of MicroPython
- Topic: EXC_BAD_ACCESS in nlrsetjmp.c
- Replies: 5
- Views: 8250
EXC_BAD_ACCESS in nlrsetjmp.c
My last post I got µPy to build inside my C++ project. Now I'm testing it by copying across the following code block from bare-arm's main.c : // // foo.c // JuceDemo // // Created by π on 21/09/2014. // // #include "foo.h" #include "mpconfig.h" #include "nlr.h" // <-- port specific nlr_jmp_fail #inc...
- Mon Sep 22, 2014 12:14 am
- Forum: Development of MicroPython
- Topic: First successful build
- Replies: 0
- Views: 3293
First successful build
I have finally managed to get µPy to build in a generic C/C++ project. (I am on OSX/Xcode by the way). Copy /micropython-master/py/*.{c,h} into my C++ project's source tree /myProj/uPy/py/ Next I get /micropython-master/unix/ to build, which creates /micropython-master/unix/build/genhdr/qstrdefs.gen...
- Sun Sep 21, 2014 6:33 pm
- Forum: Development of MicroPython
- Topic: Linker errors (OSX)
- Replies: 2
- Views: 4655
Linker errors (OSX)
I have copied /py/* into my project and am trying to to get it build. I'm getting Linker errors: Undefined symbols for architecture x86_64: "_malloc_with_finaliser", referenced from: _m_malloc_with_finaliser in malloc.o (maybe you meant: _m_malloc_with_finaliser) "_mp_builtin_input_obj", referenced ...
- Sun Sep 21, 2014 5:38 pm
- Forum: Development of MicroPython
- Topic: nlr_raise NULL error
- Replies: 2
- Views: 4972
Re: nlr_raise NULL error
UNdeclared!
Argh! I use speech recognition (RSI) and it sometimes catches me out.
Yes, you were right, it was missing a definition for NULL itself. Fixed!
Argh! I use speech recognition (RSI) and it sometimes catches me out.
Yes, you were right, it was missing a definition for NULL itself. Fixed!