Search found 735 matches
- Wed May 04, 2022 6:01 am
- Forum: ESP32 boards
- Topic: IDF veteran need some help with custom mp firmware under WSL Ubuntu
- Replies: 2
- Views: 1522
Re: IDF veteran need some help with custom mp firmware under WSL Ubuntu
3) To get code from a pull request you can add a git alias to your ~/.gitconfig like [alias] fetchpr = !sh -c 'git fetch upstream pull/'$1'/head:pr/'$1'' then use 'git fetchpr 8000` to create a new branch pr/8000 with the code from PR #8000 of upstream, assuming 'upstream' points to the main micropy...
- Wed Apr 27, 2022 6:49 pm
- Forum: General Discussion and Questions
- Topic: Writing a function to invert a boolean?
- Replies: 16
- Views: 5556
Re: Writing a function to invert a boolean?
The event handler can only execute functions, so I cannot use the not operator. Can you elaborate? Under the hood operators are implemented almost just like function calls. Anyway if you really cannot use 'not' nor operators then things become tricky. No operators would mean no +, no == etc? I coul...
- Wed Apr 27, 2022 4:34 pm
- Forum: General Discussion and Questions
- Topic: Writing a function to invert a boolean?
- Replies: 16
- Views: 5556
Re: Writing a function to invert a boolean?
The function which inverts a boolean is just since it's Python. There shouldn't be any good reasons why you cannot use it. What are you really trying to achieve?
Code: Select all
not
- Wed Apr 27, 2022 7:08 am
- Forum: General Discussion and Questions
- Topic: Minimal MicroPython Init/Deinit For Scripts
- Replies: 1
- Views: 909
Re: Minimal MicroPython Init/Deinit For Scripts
What you show is about right, but it also depends on build options and how garbage collection is implemented exactly, and so on. So it's not really possible to give one correct answer here. E.g. mp_stack_set_limit() is only needed if you have MICROPY_STACK_CHECK. And you don't have mp_stack_ctrl_ini...
- Tue Apr 26, 2022 11:19 am
- Forum: ESP32 boards
- Topic: Any newbie guides to build firmware with custom C modules?
- Replies: 6
- Views: 2308
Re: Any newbie guides to build firmware with custom C modules?
https://micropython-usermod.readthedocs.io/en/latest/ is good foor starters (would indeed be better if something like that is part of MicroPython), and once you can do that you probably know enough to derive the rest from the MicroPython source code
- Tue Apr 26, 2022 8:25 am
- Forum: ESP32 boards
- Topic: Any newbie guides to build firmware with custom C modules?
- Replies: 6
- Views: 2308
Re: Any newbie guides to build firmware with custom C modules?
What do you need to know exactly? The documentation linked above is actually rather complete: it shows where to find working example source code, a link to docs showing how to get started from scratch in case you haven't yet, and how to build that example module.
- Mon Apr 25, 2022 10:10 am
- Forum: General Discussion and Questions
- Topic: How to determine if there are exceptions to be handled.
- Replies: 5
- Views: 1564
Re: How to determine if there are exceptions to be handled.
I have seen people put all of their main code in a try ... except block. That can be useful if you want to log that exception or if there's a good chance that if you put the whole thing in a while loop gets something which works and doesn't go out of memory. Otherwise just have the controller reboo...
- Mon Apr 25, 2022 6:39 am
- Forum: General Discussion and Questions
- Topic: How to determine if there are exceptions to be handled.
- Replies: 5
- Views: 1564
Re: How to determine if there are exceptions to be handled.
As part of the software development task am I suppose to dig into the under-lying code of every method I use and ensure that I handle every exception that could be thrown? Not really: you just suppose that every method could throw an exception (because it's Python, and that's the Python way of doin...
- Sat Apr 23, 2022 1:19 pm
- Forum: Programs, Libraries and Tools
- Topic: Details of build environment for micropython releases (esp. ESP32)
- Replies: 7
- Views: 5245
Re: Details of build environment for micropython releases (esp. ESP32)
See also https://github.com/micropython/micropython/blob/master/.github/workflows/ports_esp32.yml that's the toplevel stuff. Basically: in a shell with access to build tools like make/git you'd run source tools/ci.sh ci_esp32_idf402_setup ci_esp32_build Alternatively if you have the idf installed al...
- Sat Apr 23, 2022 7:06 am
- Forum: Programs, Libraries and Tools
- Topic: Details of build environment for micropython releases (esp. ESP32)
- Replies: 7
- Views: 5245
Re: Details of build environment for micropython releases (esp. ESP32)
I'm currently also looking into this, I've build mine now with all the supported ESP-IDF versions and none of them works. I'm wondering if one of them works for you? I'm not sure whether the relesaes do this as well, but following all steps from tools/ci.sh always worked for me; it should because i...