Search found 3393 matches

by dhylands
Tue Jul 14, 2020 4:46 pm
Forum: General Discussion and Questions
Topic: Is it possible to run micropython scripts loaded from hTTP?
Replies: 1
Views: 41

Re: Is it possible to run micropython scripts loaded from hTTP?

It should definitely be possible to do. Basically, it mostly boils down to how much memory you have. But you can use exec to execute a string containing python source code.

Code: Select all

>>> exec('for i in range(5):\n  print("i =", i)\n')
i = 0
i = 1
i = 2
i = 3
i = 4
>>> 
by dhylands
Tue Jul 14, 2020 4:42 pm
Forum: Development of MicroPython
Topic: Memory allocation and deallocation
Replies: 19
Views: 3908

Re: Memory allocation and deallocation

...For the bare-metal ports, malloc doesn't appear to exist at all. m_malloc gets mapped to gc_alloc inside the py/malloc.c file... Does that mean that, on bare-metal ports, C allocates memory from the Python heap? The python heap is the only heap available on the bare metal ports. The code would n...
by dhylands
Mon Jul 13, 2020 10:38 pm
Forum: Development of MicroPython
Topic: Memory allocation and deallocation
Replies: 19
Views: 3908

Re: Memory allocation and deallocation

Right - if you allocate something in C land (using malloc or whatever) then a pointer to that object either needs to be stored inside a python object or needs to be stored someplace in the root pointers area or the garbage collector will consider the alloced memory to be "unused" and will free it t...
by dhylands
Mon Jul 13, 2020 5:59 pm
Forum: Development of MicroPython
Topic: Memory allocation and deallocation
Replies: 19
Views: 3908

Re: Memory allocation and deallocation

Right - if you allocate something in C land (using malloc or whatever) then a pointer to that object either needs to be stored inside a python object or needs to be stored someplace in the root pointers area or the garbage collector will consider the alloced memory to be "unused" and will free it th...
by dhylands
Mon Jul 13, 2020 5:53 pm
Forum: Other Boards
Topic: WeActSTM32F411CEU6 filesystem corruption
Replies: 4
Views: 96

Re: WeActSTM32F411CEU6 filesystem corruption

Also keep in mind that the STM32F411CEU6 only has 512K of flash. The default firmware and filesystem take up 376K Due to the way the flash is laid out, this means that the only available flash block is a 128K one that starts at the 384K mark. Due to RAM memory constraints you can only use 64K of any...
by dhylands
Sun Jul 12, 2020 4:30 pm
Forum: General Discussion and Questions
Topic: Disabling REPL on ESP32
Replies: 1
Views: 81

Re: Disabling REPL on ESP32

Disabling the REPL won't really help you.

You can still run esptool.py and download the entire flash and then just grab stuff from the filesystem using code running on the host.
by dhylands
Fri Jul 10, 2020 11:24 pm
Forum: Other Boards
Topic: WeActSTM32F411CEU6 uart problem
Replies: 1
Views: 57

WeActSTM32F411CEU6 uart problem

@davef posted about the WEACT and UART1, and then the post was deleted. The mpconfigboard.h file for the WEACT sets up the REPL to mirror on UART1: https://github.com/mcauser/WEACT_F411CEU6/blob/40061c9ed43dc7fb5e0363f808843ce2cda7e0e1/mpconfigboard.h#L35-L36 You'll want to comment out those 2 lines...
by dhylands
Fri Jul 10, 2020 2:03 pm
Forum: ESP32 boards
Topic: SD Card over USB MCS
Replies: 2
Views: 59

Re: SD Card over USB MCS

No. This is because there is no USB on the ESP32. It uses an external USB-to-serial chip and there is no way to get MCS through a USB-to-serial chip.
by dhylands
Fri Jul 03, 2020 4:32 pm
Forum: General Discussion and Questions
Topic: RTC callback
Replies: 8
Views: 209

Re: RTC callback

It would be possible to make the RTC callback not have an argument.

I think it takes an argument just because it’s actually an EXTI interrupt and they all take arguments.
by dhylands
Thu Jul 02, 2020 6:33 pm
Forum: Programs, Libraries and Tools
Topic: How to file/report a bug
Replies: 4
Views: 116

Re: How to file/report a bug

What board are you running on?
What version of MicroPython are you using?