Search found 52 matches

by cduran
Tue Jan 28, 2020 3:31 pm
Forum: Development of MicroPython
Topic: How can I manually add a C module without micropython.mk?
Replies: 5
Views: 183

Re: How can I manually add a C module without micropython.mk?

I don't want to tinker too much with my codes makefile. At least no more than just adding the files I need to build. How did you integrate MicroPython core then? Do you separately build libmicropython (i.e. like the examples/embeddeding example) and link against that? I include all of MP's files in...
by cduran
Wed Jan 22, 2020 4:01 pm
Forum: Development of MicroPython
Topic: How can I manually add a C module without micropython.mk?
Replies: 5
Views: 183

Re: How can I manually add a C module without micropython.mk?

This sounds like it might require a lot more knowledge of your codebase to answer. But when you say "I don't want to tinker with the existing makefile" -- is that the existing makefile for your codebase, or for MicroPython's makefile. If it's the former, surely you had to modify your makefile to ad...
by cduran
Tue Jan 21, 2020 4:09 pm
Forum: Development of MicroPython
Topic: How can I manually add a C module without micropython.mk?
Replies: 5
Views: 183

How can I manually add a C module without micropython.mk?

I currently have a very mature code base that I have added Micropython to. Now I want to add a C module but I don't want to tinker with the existing makefile. The C module will be very complex and interconnected with the existing firmware so building it as a separate file and building mp on its own ...
by cduran
Wed Aug 07, 2019 9:05 pm
Forum: Development of MicroPython
Topic: How to determine heap usage?
Replies: 2
Views: 478

How to determine heap usage?

Running mp on an ARM using the minimal build. I would like to know if there are any built in methods for analyzing heap usage.
by cduran
Wed Apr 24, 2019 2:26 pm
Forum: General Discussion and Questions
Topic: Microcontroller Quitting Mid-Script
Replies: 4
Views: 353

Re: Microcontroller Quitting Mid-Script

I have this same question. Are you suggesting a long jump? Will re-initializing python from within the C function work?
by cduran
Thu Nov 01, 2018 4:38 pm
Forum: Development of MicroPython
Topic: Corresponding get for mp_obj_get_ function for long?
Replies: 1
Views: 339

Corresponding get for mp_obj_get_ function for long?

How can I retrieve a long (in my case 32bit value) from a mp object?
by cduran
Thu Nov 01, 2018 4:26 pm
Forum: Development of MicroPython
Topic: mp_obj_new_int causing uncaught exception when value passed is greater than 30 bits
Replies: 2
Views: 388

Re: mp_obj_new_int causing uncaught exception when value passed is greater than 30 bits

Fixed my problem.

Setting MICROPY_LONGINT_IMPL to MICROPY_LONGINT_IMPL_LONGLONG did the trick.
by cduran
Wed Oct 31, 2018 5:20 pm
Forum: Development of MicroPython
Topic: mp_obj_new_int causing uncaught exception when value passed is greater than 30 bits
Replies: 2
Views: 388

mp_obj_new_int causing uncaught exception when value passed is greater than 30 bits

Like the subject line says.

I'm using mp_obj_new_int to pass values between C and python. When I try to pass a number that is greater than 30 bits long I get an "uncaught exception".

Should I be using a different function for larger integers?
by cduran
Wed Oct 11, 2017 3:55 pm
Forum: Development of MicroPython
Topic: Looking for help using MP in Windows with QT
Replies: 20
Views: 4415

Re: Looking for help using MP in Windows with QT

What are you initializing stack_top to? It looks like you're passing in an uninitialized global which will be NULL. For a desktop port (windows, unix, etc) I would expect that you'd pass in the address of a variable located on the stack. Or use mp_stack_ctrl_init which does that (takes the address ...
by cduran
Mon Oct 09, 2017 6:13 pm
Forum: Development of MicroPython
Topic: Looking for help using MP in Windows with QT
Replies: 20
Views: 4415

Re: Looking for help using MP in Windows with QT

So this is the content of my mpconfigport.h is there something I'm missing or needs to be different? #include <stdint.h> // options to control how Micro Python is built #define MICROPY_QSTR_BYTES_IN_HASH (1) #define MICROPY_ALLOC_PATH_MAX (256) #define MICROPY_ALLOC_PARSE_CHUNK_INIT (16) #define MIC...