Search found 629 matches

by jickster
Sat May 25, 2019 6:49 pm
Forum: Development of MicroPython
Topic: Custom port A9G module: help wanted
Replies: 34
Views: 1775

Re: Custom port A9G module: help wanted

That’s a difficult thing to replicate because it totally depends on how your compiler generates the binary code aka assembly. I’m not surprised that you’re having a hard time creating that condition because in most(all?) cases, the registers will be flushed to memory. But I wouldn’t rely on this oth...
by jickster
Tue May 21, 2019 3:32 am
Forum: Development of MicroPython
Topic: Find out how much RAM will be used by MicroPython at compile the runtime
Replies: 5
Views: 455

Re: Find out how much RAM will be used by MicroPython at compile the runtime

You cannot discover the RAM usage statically like with flash usage. RAM usage depends on the code ie how much memory it Allocates. But in general you can’t deduce that info just by searching for “malloc” within the code. The number of mallocs could be dynamic, based on an input. There could be compl...
by jickster
Tue May 21, 2019 3:26 am
Forum: Development of MicroPython
Topic: Find out how much RAM will be used by MicroPython at compile the runtime
Replies: 5
Views: 455

Re: Find out how much RAM will be used by MicroPython at compile the runtime

The flash usage is trivial to discover: all the information is contained in the elf.

I think it’s easiest to transform the elf into a pure binary file and then take note of the size of said binary file.


Sent from my iPhone using Tapatalk Pro
by jickster
Mon May 20, 2019 12:43 am
Forum: Development of MicroPython
Topic: Find out how much RAM will be used by MicroPython at compile the runtime
Replies: 5
Views: 455

Re: Find out how much RAM will be used by MicroPython at compile the runtime

Do you mean at compile time of the C firmware?


Sent from my iPhone using Tapatalk Pro
by jickster
Sun May 19, 2019 5:08 pm
Forum: Development of MicroPython
Topic: Custom port A9G module: help wanted
Replies: 34
Views: 1775

Re: Custom port A9G module: help wanted

Yes it’s important. If you don’t you could delete an object erroneously.


Sent from my iPhone using Tapatalk Pro
by jickster
Thu May 02, 2019 2:14 am
Forum: Development of MicroPython
Topic: Custom port A9G module: help wanted
Replies: 34
Views: 1775

Re: Custom port A9G module: help wanted

Thank you. I understand and agree with what you are saying. I am just interested in some more details. So, there is my port and there is, for example, esp8266 port. My port has all gc initialization literally commented out: mpconfigport.h: 35 // #define MICROPY_ENABLE_GC (1) main.c: 168 // TODO: gc...
by jickster
Sun Apr 28, 2019 3:47 pm
Forum: Development of MicroPython
Topic: Custom port A9G module: help wanted
Replies: 34
Views: 1775

Re: Custom port A9G module: help wanted

OK, to try this out I need to also enable gc. So my question is: what does micropython gc actually do? What is the difference between micropython running with gc and without it? gc frees RAM once an object goes out of scope or is deleted. It depends on your exact code but generally Without gc you’l...
by jickster
Sun Apr 28, 2019 3:01 pm
Forum: Development of MicroPython
Topic: Custom port A9G module: help wanted
Replies: 34
Views: 1775

Re: Custom port A9G module: help wanted

What kind of mechanism finalizes objects (i.e. closes files on reference count = 0) in micropython? Is it GC? What do I need implement for it? There’s no reference counting in micropython unless you implement it yourself. You have to enable the macro MICROPY_ENABLE_FINALISER. Also for your object, ...
by jickster
Thu Apr 11, 2019 11:22 pm
Forum: Development of MicroPython
Topic: Custom port A9G module: help wanted
Replies: 34
Views: 1775

Re: Custom port A9G module: help wanted

That code by itself should compile.
Something in the .h is causing the error.


Sent from my iPhone using Tapatalk Pro
by jickster
Sat Apr 06, 2019 2:23 am
Forum: Other Boards
Topic: [TM4C123] how to disable debugging info in REPL
Replies: 4
Views: 287

Re: [TM4C123] gc info disabled in gccollect.c but still displaying in repl?

I gave you the code that does this and the macro you have to switch off.


Sent from my iPhone using Tapatalk Pro