Search found 3455 matches

by dhylands
Fri Jul 17, 2020 3:08 pm
Forum: MicroPython pyboard
Topic: [SOLVED] can't connect to REPL
Replies: 14
Views: 551

Re: can't connect to REPL

Note that you need to logoff and log back in again (or reboot) after changing groups.

You can use the id command to confirm your group membership.
by dhylands
Fri Jul 17, 2020 2:56 pm
Forum: General Discussion and Questions
Topic: Using sockets but keep getting syntax error.
Replies: 4
Views: 257

Re: Using sockets but keep getting syntax error.

You need to surround the argument to http_get in quotes.
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: 172

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: 21
Views: 4723

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: 21
Views: 4723

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: 21
Views: 4723

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: 377

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: 209

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: 196

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: 179

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.