Search found 61 matches
- Mon Nov 21, 2022 9:47 am
- Forum: Development of MicroPython
- Topic: Error while I try to make UNix port
- Replies: 6
- Views: 164076
Re: Error while I try to make UNix port
For my setup (WSL 1), I couldn't the "git config --global core.symlinks true" solution to work. Didn't matter if I cloned from the command line in WSL or if I was using SmartGit. The git install in WSL, Windows, and the settings in SmartGit all had symlinks set to true, but still didn't work. I fina...
- Fri Oct 04, 2019 7:02 am
- Forum: ESP8266 boards
- Topic: Creating larger ROMs
- Replies: 23
- Views: 20438
Re: Creating larger ROMs
Below are some updates that can be made to makeimg.py to allow automatic creation of a file system with files baked into firmware-combined.bin. Just create a directory named micropython/ports/esp8266/fs_files and put the files you want on your ESP8266 into that directory. If the the fs_files direct...
- Wed Sep 25, 2019 2:00 pm
- Forum: ESP8266 boards
- Topic: How to measure time accurately?
- Replies: 6
- Views: 7375
Re: How to measure time accurately?
and time.ticks_us() is only slightly better (fell 10 seconds behind in a 10 minute test). Then you made a mistake or your device is broken. time.ticks_us() is very accurate. (about 2 seconds per 24 hours or less). Are you aware that ticks_us() uses a 30-bits counter that overflows after about 17 mi...
- Tue Sep 24, 2019 11:23 pm
- Forum: ESP8266 boards
- Topic: Readproof Code
- Replies: 5
- Views: 5797
Re: Readproof Code
As a simple measure you can use frozen bytecode, which embeds compiled code into flash. Then there is no python code in the file system except maybe main.py or boot.py. But even the code there can be compiled into flash, or put into _boot.py, which anyhow resides in the flash memory. Still, people ...
- Tue Sep 24, 2019 11:17 pm
- Forum: ESP8266 boards
- Topic: How to measure time accurately?
- Replies: 6
- Views: 7375
How to measure time accurately?
There is a GitHub issue related to the inability of the ESP8266 to keep accurate time: https://github.com/micropython/micropython/issues/2724 The issue has been open for nearly 3 years and has an associated pull request, but it appears there is some debate about the integrity of the change. My testi...
- Tue Sep 24, 2019 8:35 pm
- Forum: ESP8266 boards
- Topic: Building firmware without SSL
- Replies: 8
- Views: 6659
Re: Building firmware without SSL
Using this post by @jimmo as guidance I did a bit of experimentation to see which flags could be disabled to reclaim some heap. This isn't an exhaustive list, but these were the only things I was able to disable to keep my program running as desired. Note the large bbs savings when MICROPY_PY_WEBREP...
- Tue Sep 24, 2019 7:12 pm
- Forum: ESP8266 boards
- Topic: Global Variables
- Replies: 3
- Views: 7981
Re: Global Variables
Depending on your variable you can do as @stijn suggested in this post.
- Tue Sep 24, 2019 6:26 pm
- Forum: ESP8266 boards
- Topic: Is there an easy way to expose the value of a #define from mpconfigport.h to Python code?
- Replies: 9
- Views: 8962
Re: Is there an easy way to expose the value of a #define from mpconfigport.h to Python code?
Works like a charm! Thanks man!
- Tue Sep 24, 2019 5:33 pm
- Forum: ESP8266 boards
- Topic: Is there an easy way to expose the value of a #define from mpconfigport.h to Python code?
- Replies: 9
- Views: 8962
Re: Is there an easy way to expose the value of a #define from mpconfigport.h to Python code?
Since you modify main.c anyway, you could store the value as an integer in globals() so no need for a module? Can you expand on this a bit? I did some searching for "globals" and I do see some functions of interest like mp_load_global() and mp_globals_set(). Unfortunately the term "globals" is used...
- Tue Sep 24, 2019 1:21 pm
- Forum: ESP8266 boards
- Topic: Is there an easy way to expose the value of a #define from mpconfigport.h to Python code?
- Replies: 9
- Views: 8962
Re: Is there an easy way to expose the value of a #define from mpconfigport.h to Python code?
I change MICROPY_PY_OS_DUPTERM from its default value of 2 to 1 to regain 8 bbs and also only run this bit of code in main.c if the value is 2: #if MICROPY_PY_OS_DUPTERM == 2 dupterm_task_init(); // Activate UART(0) on dupterm slot 1 for the REPL { mp_obj_t args[2]; args[0] = MP_OBJ_NEW_SMALL_INT(0)...