Search found 2754 matches

by jimmo
Wed Jun 29, 2022 11:57 pm
Forum: Programs, Libraries and Tools
Topic: How to configure CMAKE to detect source code changes?
Replies: 2
Views: 2169

Re: How to configure CMAKE to detect source code changes?

When I change a line in my source code, (located in the top level directory) calling `make all` does not pick up the changes. This looks like a bug in our CMake config... CMake makes this very difficult. It looks ninja only understands the final step in the chain (firmware->frozen_content.c) but no...
by jimmo
Wed Jun 29, 2022 11:56 pm
Forum: General Discussion and Questions
Topic: bits to bytes
Replies: 58
Views: 23660

Re: bits to bytes

Regarding bytes/bytearrays. When I need to get into the details I tend to use this simple hex dump tool I wrote. It makes it far easier to look at data, from, say, a communications protocol or a chip you might be talking to. FYI, https://github.com/micropython/micropython-example-boards/blob/main/s...
by jimmo
Wed Jun 29, 2022 11:40 pm
Forum: General Discussion and Questions
Topic: add payload to POST request
Replies: 5
Views: 4142

Re: add payload to POST request

thanks, this was really helpful, it was really a matter of encoding and content-length parameters. the code below works perfectly: Unless you're really optimising for every last byte of RAM and flash, then using urequests would be simpler -- see https://github.com/micropython/micropython-lib/blob/m...
by jimmo
Wed Jun 29, 2022 11:37 pm
Forum: General Discussion and Questions
Topic: bits to bytes
Replies: 58
Views: 23660

Re: bits to bytes

I have also identified a lot of opportunities to make the MicroPython faster. Great! One of the most useful tools for improving MicroPython's performance is the performance test suite. See https://github.com/micropython/micropython/tree/master/tests#perf_bench for details. One thing I would like to...
by jimmo
Wed Jun 29, 2022 11:23 pm
Forum: General Discussion and Questions
Topic: Getting errors when requesting some HTTPS URLs
Replies: 6
Views: 2770

Re: Getting errors when requesting some HTTPS URLs

Do you know if the ESP32 port already use mbedtls? Should all of this be documented? Yes, ESP32 uses mbedtls (and I have confirmed that using urequests to fetch that letsencrypt.org URL above works on ESP32). Yes, documentation would be good. And definitely we should move Unix over to mbedtls to ma...
by jimmo
Wed Jun 29, 2022 12:30 am
Forum: General Discussion and Questions
Topic: Getting errors when requesting some HTTPS URLs
Replies: 6
Views: 2770

Re: Getting errors when requesting some HTTPS URLs

Hi, if you write import urequests as requests This won't change anything, just renames the module on import. I think there's something wrong with dealing with the SSL certificate of these websites? Yes, the github issue you linked to (and also https://github.com/micropython/micropython/issues/3198 ...
by jimmo
Tue Jun 28, 2022 11:54 pm
Forum: General Discussion and Questions
Topic: Thonny freezing when trying to flash firmware
Replies: 6
Views: 2206

Re: Thonny freezing when trying to flash firmware

piotrmichna wrote:
Tue Jun 28, 2022 1:59 pm
More so if I am trying to do exactly the same it freezes Mu Editor as well! Weirdly enough I can do anything else in both.
I didn't know Mu supported flashing firmware... although it has been a while since I looked. Can you clarify what you mean by "open .bin firmware file"?
by jimmo
Tue Jun 28, 2022 11:52 pm
Forum: Programs, Libraries and Tools
Topic: Initialize watchdog timer from function
Replies: 14
Views: 9286

Re: Initialize watchdog timer from function

PM-TPI wrote:
Tue Jun 28, 2022 9:12 pm
wdt.feed() got... NameError: name 'wdt' isn't defined
You'll need to post more of your code. Something else is accessing the wdt variable.
by jimmo
Tue Jun 28, 2022 3:22 pm
Forum: General Discussion and Questions
Topic: EXTERNAL_CLOCK_VALUE
Replies: 1
Views: 775

Re: EXTERNAL_CLOCK_VALUE

Is there anyone who have an idea about the utility of that variable EXTERNAL_CLOCK_VALUE , it is defined in the stm32f4xx_hal_conf.h and stm32f7xx_hal_conf.j for some boards . /** * @brief External clock source for I2S peripheral * This value is used by the I2S HAL module to compute the I2S clock s...
by jimmo
Tue Jun 28, 2022 3:08 pm
Forum: General Discussion and Questions
Topic: bits to bytes
Replies: 58
Views: 23660

Re: bits to bytes

Can you explain 'escape' in this context? Yes I mean escape characters -- in Python (like C, Java, etc), the backslash is the escape character. It indicates the start of a sequence to let you tell the compiler exactly what character you want -- useful if that character isn't printable. So for examp...