Search found 27 matches

by jcea
Tue Apr 04, 2017 2:59 pm
Forum: ESP8266 boards
Topic: Use of "@micropython.asm_xtensa"
Replies: 2
Views: 1193

Re: Use of "@micropython.asm_xtensa"

Errr... I inadvertently tried this under Micropython 1.8.6. Sory for wasting your time. As an example of what can be done: >>> @micropython.asm_xtensa ... def a(a2, a3): ... mov(a4, a2) ... movi(a2, 0) ... movi(a5, 1) ... label(LOOP) ... add(a2, a2, a4) ... sub(a3, a3, a5) ... bnez(a3, LOOP) >>> a(1...
by jcea
Tue Apr 04, 2017 11:44 am
Forum: ESP8266 boards
Topic: Use of "@micropython.asm_xtensa"
Replies: 2
Views: 1193

Use of "@micropython.asm_xtensa"

As documented in the changelog (https://github.com/micropython/micropython/releases) of release 1.8.7, we have a native assembler emitter. https://github.com/micropython/micropython/commit/f76b1bfa9f59fcfa03837c6934ad51d2db3ff4a3 shows it as "@micropython.asm_xtensa". I don't see any kind of documen...
by jcea
Tue Apr 04, 2017 11:36 am
Forum: ESP8266 boards
Topic: MQTT and Timers exceptions
Replies: 3
Views: 1344

Re: MQTT and Timers exceptions

Would be nice if MQTT library included a timeout value. I do monkey patching: This code implements a 5 seconds timeout. Somebody should do a pull request for micropython-lib... Thank you for your answer. However, it may seems dumb to you as I'm just a beginner, but I thought that the problem was th...
by jcea
Sat Apr 01, 2017 1:59 pm
Forum: ESP8266 boards
Topic: MQTT and Timers exceptions
Replies: 3
Views: 1344

Re: MQTT and Timers exceptions

Would be nice if MQTT library included a timeout value. I do monkey patching: class timeout_socket(umqtt.simple.socket.socket): def __init__(self): super().__init__() self.settimeout(5) def setblocking(self, flag): # "setblocking()" está documentado como # variantes de "settimeout()". # https://docs...
by jcea
Sat Apr 01, 2017 12:53 am
Forum: ESP8266 boards
Topic: Watchdog in ESP8266
Replies: 2
Views: 2034

Watchdog in ESP8266

There exists a "machine.WDT" class in ESP8266 micropython, as documented in https://docs.micropython.org/en/latest/esp8266/library/machine.WDT.html#machine.WDT , but it is raising an exception. It seems not usable: ``` >>> a=machine.WDT(timeout=5) Traceback (most recent call last): File "<stdin>", l...
by jcea
Wed Mar 29, 2017 11:18 pm
Forum: General Discussion and Questions
Topic: Importing a module from memory, not disk
Replies: 0
Views: 635

Importing a module from memory, not disk

My project (running on an ESP8266) downloads the last version of the code from the web, at every boot. I would like very much to be able to "import" that code without touching the flash filesystem, possibly from memory. Is that possible?. Any idea?. PS: My current approach is to store the new module...
by jcea
Wed Mar 22, 2017 11:20 am
Forum: ESP8266 boards
Topic: Native code generation, "esp.set_native_code_location()" and how to find spare space in the flash
Replies: 9
Views: 2021

Re: Native code generation, "esp.set_native_code_location()" and how to find spare space in the flash

I would store the size of the reserved area for native code, location and size of the fat FS, spare area (to directly read/delete flash for raw access), OTA area, etc. Kind of a partition table. I would like to have a fat filesystem, but for some applications a "raw" flash area is very convenient. I...
by jcea
Wed Mar 22, 2017 2:07 am
Forum: ESP8266 boards
Topic: Native code generation, "esp.set_native_code_location()" and how to find spare space in the flash
Replies: 9
Views: 2021

Re: Native code generation, "esp.set_native_code_location()" and how to find spare space in the flash

Thanks, Roberthh. That is valuable. What would you think about storing metadata in the last area (before the SDK area) of the flash describing reservations and FAT layout?. In this way we could change sizes with a method call instead of recompiling and flashing a new image. As I understand, flashing...
by jcea
Sat Mar 18, 2017 12:38 am
Forum: ESP8266 boards
Topic: Native code generation, "esp.set_native_code_location()" and how to find spare space in the flash
Replies: 9
Views: 2021

Re: Native code generation, "esp.set_native_code_location()" and how to find spare space in the flash

Roberthh, do you have a link to the thread about persistent flash storage of native code? I am not able to find anything relevant.

Thanks a lot.
by jcea
Fri Mar 17, 2017 4:21 pm
Forum: ESP8266 boards
Topic: Native code generation, "esp.set_native_code_location()" and how to find spare space in the flash
Replies: 9
Views: 2021

Re: Native code generation, "esp.set_native_code_location()" and how to find spare space in the flash

Robert, great answer. Very useful. This should documented somewhere. Using Google I found this useful discussion https://github.com/micropython/micropython/issues/2735 describing the feature. Great. But this should be documented SOMEWHERE in the official docs. "esp.flash_user_start()" is NOT documen...