Search found 512 matches

by jimmo
Fri Jun 07, 2019 5:48 am
Forum: ESP32 boards
Topic: HTTP server - query string
Replies: 1
Views: 166

Re: HTTP server - query string

Hi,

You'll find it a lot easier to use one of the HTTP server libraries instead of sockets directly. Here's a good one https://github.com/miguelgrinberg/microdot

The author has also started writing some great tutorials too -- https://blog.miguelgrinberg.com/
by jimmo
Thu Jun 06, 2019 10:40 pm
Forum: General Discussion and Questions
Topic: Need help freeing memory from unused modules
Replies: 13
Views: 522

Re: Need help freeing memory from unused modules

If you're feeling adventurous, frozen modules are a good way to claim some RAM back, but you will need to build your own firmware images.
by jimmo
Thu Jun 06, 2019 10:19 pm
Forum: Other Boards
Topic: STM32F407VE: mpy-cross ValueError with @micropython.native decorator
Replies: 3
Views: 196

Re: STM32F407VE: mpy-cross ValueError with @micropython.native decorator

For some extra background, an .mpy file is platform agnostic -- it just contains MicroPython bytecode that run anywhere. But when you use @native, it has to know which architecture to emit native machine code for. This is the purpose of the march flag. Unfortunately you end up with a platform-specif...
by jimmo
Thu Jun 06, 2019 10:06 pm
Forum: General Discussion and Questions
Topic: Need help freeing memory from unused modules
Replies: 13
Views: 522

Re: Need help freeing memory from unused modules

I guess it's making two objects if I get rid of the 'del res' line. There's a brief moment where there are two objects. Think of it like this. a = big_thing() a = big_thing() is really the same as tmp = big_thing() a = tmp del tmp tmp = big_thing() # now we have a and tmp pointing to separate big t...
by jimmo
Thu Jun 06, 2019 10:17 am
Forum: Development of MicroPython
Topic: MicroPython external C modules
Replies: 3
Views: 292

Re: MicroPython external C modules

The command : " make USER_C_MODULES=../../../modules CFLAGS_EXTRA=-DMODULE_EXAMPLE_ENABLED=1 all " dosen't work. Are you using ESP32 by any chance? For some reason the ESP32 makefile doesn't use CFLAGS_EXTRA. I don't have an ESP32 board or the ESP32 toolchain set up but maybe you could send a PR?
by jimmo
Thu Jun 06, 2019 10:10 am
Forum: ESP32 boards
Topic: SPI hardware
Replies: 5
Views: 404

Re: SPI hardware

Also check that the cs pin is initialized with Pin.OUT.
by jimmo
Thu Jun 06, 2019 10:08 am
Forum: Pyboard D-series
Topic: Nut mounted to bottom of sensor tile
Replies: 2
Views: 173

Re: Nut mounted to bottom of sensor tile

Are the screw size and thread pitch for the nut that is mounted to the bottom of the sensor tile available? It mates up to the holes in the back plane board. I searched the documentation unsuccessfully. I'm fairly sure they're M1.6 thread. The 3D model in the reference schematics is SMTSO-M1.6-1ET-...
by jimmo
Tue Jun 04, 2019 10:30 pm
Forum: Other Boards
Topic: BLACK_F407VE: @micropython.native in frozen bytecode decorator build fails
Replies: 6
Views: 276

Re: BLACK_F407VE: @micropython.native in frozen bytecode decorator build fails

Does anyone know how much speedup I can expect when using viper and native emitters w.r.t. pure Python for integer and string operations? It's hard to say because it depends so much on what the code is doing. So you've just got to measure it. In one project where I used it quite a lot it made the d...
by jimmo
Tue Jun 04, 2019 10:20 pm
Forum: Other Boards
Topic: BLACK_F407VE: @micropython.native in frozen bytecode decorator build fails
Replies: 6
Views: 276

Re: BLACK_F407VE: @micropython.native in frozen bytecode decorator build fails

Can you post a follow-up to the bug?
That warning definitely sounds like it would be related to your problem.
by jimmo
Tue Jun 04, 2019 10:18 pm
Forum: Development of MicroPython
Topic: MicroPython external C modules
Replies: 3
Views: 292

Re: MicroPython external C modules

Are you able to post your code (e.g. to github).

Can you verify that your module is definitely being linked into the final firmware image (e.g. use nm or objdump).