Search found 30 matches

by rosenrot
Sat Jun 10, 2017 8:29 pm
Forum: ESP8266 boards
Topic: ESP8266 Building and flashing OTA firmware
Replies: 12
Views: 15041

Re: ESP8266 Building and flashing OTA firmware

Thanks for the description. I'm wondering a little bit that, at least for me, it seems the support in this forum is a little bit slow. I asked the question about the ota a month ago. In the beginning i thought there is a big community behind micropython but it seems rather small.
by rosenrot
Sat Jun 10, 2017 12:53 pm
Forum: ESP8266 boards
Topic: ESP8266 Building and flashing OTA firmware
Replies: 12
Views: 15041

Re: ESP8266 Building and flashing OTA firmware

Here the procedure for manually building and flashing the OTA version of micropython: build boot8266: cd <projects-dir>/yaota8266/boot8266; make build ota version: cd <projects-dir>/micropython/esp8266; make ota > make-ota.log flash: esptool.py --port your-port erase_flash esptool.py --port your-po...
by rosenrot
Sat Jun 10, 2017 8:30 am
Forum: ESP8266 boards
Topic: OTA via ftp or http
Replies: 0
Views: 1757

OTA via ftp or http

I was wondering if it would be possible to download firmware updates from a server and flashing it with those functions blockwise: https://github.com/micropython/micropython/blob/master/esp8266/modules/flashbdev.py I do have a project which is in the developing/testing phase and updating multiple es...
by rosenrot
Sat Jun 03, 2017 9:20 am
Forum: ESP8266 boards
Topic: @micropython.viper in frozen module
Replies: 1
Views: 1963

@micropython.viper in frozen module

Can't I add a function with a viper decorator to a module which should become frozen?

Placing the function in main.py works. Placing it in the modules folder for building it, gives me "invalid micropython decorator".
by rosenrot
Sat Jun 03, 2017 8:04 am
Forum: ESP8266 boards
Topic: Using persisting bytes array efficientlly
Replies: 9
Views: 8620

Re: Using persisting bytes array efficientlly

@pythencoder thanks for this example. For the record, I'm @160MHz already. I was thinking one could find a trade-of between the for loop and a certain temporary array size. However, I thought about moving this task to assembler. It is a long time ago that I used asm but I came up with the following ...
by rosenrot
Sat Jun 03, 2017 7:57 am
Forum: Development of MicroPython
Topic: Cross compiling native code
Replies: 3
Views: 3987

Re: Cross compiling native code

If I cross compile a module with code having the @micropython.native decorator I get an "invalid micropython decorator" message. I assume it's necessary to tell mpy-cross the target architecture (Arm Thumb) but it's not obvious how to do this. I get the same error for the @micropython.asm_thumb dec...
by rosenrot
Sat Jun 03, 2017 5:36 am
Forum: ESP8266 boards
Topic: Using persisting bytes array efficientlly
Replies: 9
Views: 8620

Re: Using persisting bytes array efficientlly

Well, now you're creating 500 temporary lists, and for each its bytes representation. Did you try something really simple like: arr = bytearray(1000) for i in range(0, 1000): ...arr = (i%2)+1 I know but doing it with the loop increases the computation time by a factor of 6. As I wrote above, fillin...
by rosenrot
Fri Jun 02, 2017 9:50 pm
Forum: ESP8266 boards
Topic: Using persisting bytes array efficientlly
Replies: 9
Views: 8620

Re: Using persisting bytes array efficientlly

I don't have device around to play with, but I guess it depends how it's implemented in micropython. First of all, [1,2]*500 is not really a good idea because that call creates temporary list that is then converted to bytesarray. Probably because the constructor sees list of integers, it unpacks ev...
by rosenrot
Fri Jun 02, 2017 8:53 pm
Forum: ESP8266 boards
Topic: Using persisting bytes array efficientlly
Replies: 9
Views: 8620

Re: Using persisting bytes array efficientlly

What is the fastest way to fill the bytearray? So far I did: ARR = bytes([1,2])*500 which allocates 1000 bytes When I do the same thing with the bytearray ARR = bytearray([1,2]*500) it allocates 4000 bytes. It seems to allocate integers. Actually: ARR = bytearray(1000) allocates 1000 bytes ARR = byt...
by rosenrot
Fri Jun 02, 2017 7:47 pm
Forum: ESP8266 boards
Topic: Using persisting bytes array efficientlly
Replies: 9
Views: 8620

Using persisting bytes array efficientlly

My scenario is as follows: I do have to change an array of 1000 bytes from different functions(not in parallel). I found out, that Depending on how I do it, I run into MemoryErrors. What is the most efficient way to do the following: create bytes(1000) func1 change 500 of these bytes, send all 1000 ...