Search found 80 matches

by cduran
Thu Jul 21, 2022 5:27 pm
Forum: Development of MicroPython
Topic: Using mpy files in an MP library
Replies: 6
Views: 23498

Re: Using mpy files in an MP library

I was able to put the mpy file in the same directory as the mp executable, but that doesn't work with my application. What do you mean by "doesn't work"... having the file in the same directory isn't what you want (does sys.path help?) or it just flat out doesn't load? As you're running on x86/x64 ...
by cduran
Thu Jul 21, 2022 4:59 pm
Forum: Development of MicroPython
Topic: Building the unix port as a library (.a file)
Replies: 4
Views: 21184

Re: Building the unix port as a library (.a file)

These are the undefined symbols. Note they are also undefined in their corresponding object files. I added exactly the fragment you posted to unix/Makefile and I get (for example, gc_collect) $ nm libmicropython.a | grep 'gc_collect' U gc_collect 0000000000000000 T gc_collect_end 0000000000000000 T...
by cduran
Fri Jul 08, 2022 12:41 pm
Forum: Development of MicroPython
Topic: Building the unix port as a library (.a file)
Replies: 4
Views: 21184

Re: Building the unix port as a library (.a file)

I've had success building the minimal port as a library (.a) but when I try the same with the Unix port I get a lot of undefined objects despite the source compiling properly. Can you post some examples of the missing symbols and also a minimal example of a program linking against your static libra...
by cduran
Wed Jul 06, 2022 6:59 pm
Forum: Development of MicroPython
Topic: Building the unix port as a library (.a file)
Replies: 4
Views: 21184

Building the unix port as a library (.a file)

I've had success building the minimal port as a library (.a) but when I try the same with the Unix port I get a lot of undefined objects despite the source compiling properly. To make the library I add the following: staticlib: $(OBJ) $(Q)$(AR) -r -o libmicropython.a $(OBJ) to the Unix port makefile...
by cduran
Fri Jun 24, 2022 8:08 pm
Forum: Development of MicroPython
Topic: Using mpy files in an MP library
Replies: 6
Views: 23498

Re: Using mpy files in an MP library

I was able to put the mpy file in the same directory as the mp executable, but that doesn't work with my application. What do you mean by "doesn't work"... having the file in the same directory isn't what you want (does sys.path help?) or it just flat out doesn't load? As you're running on x86/x64 ...
by cduran
Tue Jun 21, 2022 2:39 pm
Forum: Development of MicroPython
Topic: Using mpy files in an MP library
Replies: 6
Views: 23498

Re: Using mpy files in an MP library

I'm currently building MicroPython as a library to be used in another application as an embedded python interpreter. I would like to be able to include new mpy files without having to rebuild mp or the application it is embedded in. How would I do this? Now I understand your other post (https://for...
by cduran
Tue Jun 21, 2022 2:36 pm
Forum: Development of MicroPython
Topic: Loading mpy files at runtime?
Replies: 2
Views: 2571

Re: Loading mpy files at runtime?

I would like to know where to put the mpy files so that I can create libraries without needing to rebuild mp? I'm currently trying to do this with the Minimal build. Are there any changes I need to make to mpconfigport? Normally they would be imported from the filesystem. `import foo` will first tr...
by cduran
Wed Jun 15, 2022 8:11 pm
Forum: Development of MicroPython
Topic: Loading mpy files at runtime?
Replies: 2
Views: 2571

Loading mpy files at runtime?

I would like to know where to put the mpy files so that I can create libraries without needing to rebuild mp? I'm currently trying to do this with the Minimal build. Are there any changes I need to make to mpconfigport?
by cduran
Wed Jun 08, 2022 8:27 pm
Forum: Development of MicroPython
Topic: Using mpy files in an MP library
Replies: 6
Views: 23498

Using mpy files in an MP library

I'm currently building MicroPython as a library to be used in another application as an embedded python interpreter. I would like to be able to include new mpy files without having to rebuild mp or the application it is embedded in. How would I do this?
by cduran
Mon May 23, 2022 12:43 pm
Forum: Development of MicroPython
Topic: Building without the REPL
Replies: 2
Views: 1645

Re: Building without the REPL

Thank you, this was a lot of help.