Search found 3015 matches

by dhylands
Sun Jun 15, 2014 3:52 pm
Forum: Development of MicroPython
Topic: Wanted: Porting guide / developer guide
Replies: 25
Views: 13555

Re: Wanted: Porting guide / developer guide

IRCCloud is publicly open now but thanks anyway; 4$ a month is a bit steep though or am I missing the point? I mean, about 5$ a month fives you a complete linux VM (on DigitalOcean or Azure for instance) on which you can keep a native client open 24/7, next to all the goodness that comes from a ser...
by dhylands
Fri Jun 13, 2014 5:53 pm
Forum: Development of MicroPython
Topic: Wanted: Porting guide / developer guide
Replies: 25
Views: 13555

Re: Wanted: Porting guide / developer guide

ps. Is there IRC channel or something for more realtime pestering of the resident gurus ?? So I'll be hanging around in the #micropython channel on freenode (irc.freenode.net). My IRC nick is dhylands. My nick will be there 24/7 (I use irccloud.com), although I won't be. When I'm not available (i.e...
by dhylands
Fri Jun 13, 2014 3:59 pm
Forum: General Discussion and Questions
Topic: Developping on pyboard
Replies: 6
Views: 2810

Re: Developping on pyboard

So, you don't need to umount the virtual file system when doing a soft-reboot (Ctrl-D)? Changes are not lost? Are such amovible devices mounted with sync option, under linux? So FAT file systems (under both Windows 7 and linux) tend to get written to fairly quickly and not keep alot of cached data ...
by dhylands
Thu Jun 12, 2014 7:22 pm
Forum: General Discussion and Questions
Topic: Stalled SPI Transfer
Replies: 4
Views: 3148

Re: Stalled SPI Transfer

OK - spi.send winds up calling HAL_SPI_Transmit which basically just has a loop in C which send 16 bits at a time to the SPI peripheral. I'm going to guess that the gaps are caused by interrupts (millisecond tick timer, USB, etc). So I think that you have 2 options: 1 - disable interrupts around the...
by dhylands
Thu Jun 12, 2014 6:40 pm
Forum: General Discussion and Questions
Topic: Stalled SPI Transfer
Replies: 4
Views: 3148

Re: Stalled SPI Transfer

Is this from a single invocation of spi.send ?

If not, then I would expect there to be a pause between each call to spi.send (even if this were coded in C).

The typical way of combating this is to have some type of FIFO. If the HW doesn't provide one, then you can sometimes implement one using DMA.
by dhylands
Thu Jun 12, 2014 6:35 pm
Forum: General Discussion and Questions
Topic: Irregular processing power
Replies: 21
Views: 9626

Re: Irregular processing power

I'm not familiar with the actual gc algorithm, but its possible that its not linear, which means that it may be taking much more time than the sum of the smaller garbage collections being done. OK, might be the case. If so, this behaviour feels sub-optimal. I took the example code from Espruino, wh...
by dhylands
Thu Jun 12, 2014 5:02 pm
Forum: Development of MicroPython
Topic: Wanted: Porting guide / developer guide
Replies: 25
Views: 13555

Re: Wanted: Porting guide / developer guide

I think that you probably want the amount of memory to be fairly easy to configure. It's really going to depend on the project and how much heap the chibi portion of your code uses, versus how much the python portion will use. I would probably start off with a simple scheme (pyhon gets X, chibi gets...
by dhylands
Wed Jun 11, 2014 11:07 pm
Forum: Development of MicroPython
Topic: Wanted: Porting guide / developer guide
Replies: 25
Views: 13555

Re: Wanted: Porting guide / developer guide

And about the memory. Right now, the garbage collector assumes that it owns the memory you pass to it via gc_init. Right now, for a bare metal port, that corresponds the to beginning and end of the heap. For an os, presumably, you'd allocate some block of memory, and pass the address of the beginnin...
by dhylands
Wed Jun 11, 2014 11:00 pm
Forum: Development of MicroPython
Topic: Wanted: Porting guide / developer guide
Replies: 25
Views: 13555

Re: Wanted: Porting guide / developer guide

stmhal/led.c/.h is probably a fairly nice example to look at. https://github.com/micropython/micropython/blob/master/stmhal/led.c#L301 introduces a type, which has its name denoted by MP_QSTR_LED. This particular constant if generated from: https://github.com/micropython/micropython/blob/master/stmh...
by dhylands
Wed Jun 11, 2014 3:18 pm
Forum: General Discussion and Questions
Topic: Irregular processing power
Replies: 21
Views: 9626

Re: Irregular processing power

When you do the gc.collect() manually, it's doing a small (and consistent) amount of work, so it will take approximately the same amount of time each time. When you remove the gc.collect call, then gc.collect will be deferred until the heap runs out of memory, at which point it will garbage collect ...