Search found 2754 matches

by jimmo
Thu Jun 23, 2022 4:01 am
Forum: Programs, Libraries and Tools
Topic: Writing new C API into micropython firmware
Replies: 20
Views: 5919

Re: Writing new C API into micropython firmware

Firas_Baccouri wrote:
Wed Jun 22, 2022 2:38 pm
But the question still is there any possibility to use some array in a C module so you can than use it by the python code ?
Yes you can construct any Python object (e.g. array, or bytearray, or bytes) and return that from your C module.
by jimmo
Thu Jun 23, 2022 3:59 am
Forum: Programs, Libraries and Tools
Topic: mpremote... interrupt to copy files
Replies: 3
Views: 1733

Re: mpremote... interrupt to copy files

PM-TPI wrote:
Wed Jun 22, 2022 8:28 pm
Can mpremote send a ctrl-c prior to uploading files?
Yes, it does. Is it not working?
by jimmo
Thu Jun 23, 2022 3:58 am
Forum: Raspberry Pi microcontroller boards
Topic: Firmware for RP2040 Zero
Replies: 2
Views: 4615

Re: Firmware for RP2040 Zero

etolocka wrote:
Wed Jun 22, 2022 8:37 pm
What is the most appropriate firmware to program a RP2040 Zero board?
Ideally a board definition should be written, but yeah like you say, any firmware for a board with 2MiB flash will work, including the two you mentioned.
by jimmo
Thu Jun 23, 2022 3:56 am
Forum: ESP32 boards
Topic: Building micropython with 240mhz
Replies: 9
Views: 2691

Re: Building micropython with 240mhz

So I added "boards/sdkconfig.240mhz" to "mpconfigboard.cmake". Unfortunatly the firmware is still 160mhz. How to fix this? This works on the UM_TINYPICO - just checked here. Did you do a `make clean` after changing mpconfigboard.cmake? everything loaded before boot.py is worked on with 160mhz. Ther...
by jimmo
Wed Jun 22, 2022 10:00 am
Forum: ESP32 boards
Topic: minor memory in mpy v1.19.1
Replies: 3
Views: 84794

Re: minor memory in mpy v1.19.1

1) in mpy version v.19.1 there is less memory available, software that runs on version 1.18 from failed memory allocation on version 1.19.1. I can't see this in your screenshots... both have 128000 total and almost identical free (within ~100 bytes). Can you post the error you're seeing? 2) In the ...
by jimmo
Wed Jun 22, 2022 9:45 am
Forum: Programs, Libraries and Tools
Topic: Writing new C API into micropython firmware
Replies: 20
Views: 5919

Re: Writing new C API into micropython firmware

Firas_Baccouri wrote:
Wed Jun 22, 2022 6:54 am
I am wondering if there are a way to use the unsigned integer , or is there a solution to avoid that overflow besides using negative number .
This has been proposed in https://github.com/micropython/micropython/pull/8089

But if you just want the full 32 bits then cast to uint32_t
by jimmo
Wed Jun 22, 2022 6:37 am
Forum: Development of MicroPython
Topic: Access to UART ring buffers
Replies: 4
Views: 21978

Re: Access to UART ring buffers

Is there a way to have direct access to the UART ring buffers from assembler? In theory, yes, you could. When you call an @asm_thumb method, each argument is placed in a register, via the convert_obj_for_inline_asm function (see py/objfun.c). So what you'll get in (say) r0 is the address of a machi...
by jimmo
Wed Jun 22, 2022 12:36 am
Forum: Programs, Libraries and Tools
Topic: Writing new C API into micropython firmware
Replies: 20
Views: 5919

Re: Writing new C API into micropython firmware

I really need to know how to deal with that because I do need to write the module in C . When you write a function that is exposed to Python, the only argument types supported are mp_obj_t (i.e. Python objects). The key is that Python only has "arbritrary precision signed integer" it has no concept...
by jimmo
Wed Jun 22, 2022 12:33 am
Forum: ESP8266 boards
Topic: 如何使用micropython连接ch375
Replies: 6
Views: 2189

Re: 如何使用micropython连接ch375

connecting to the host function of ch375 The ch375 has built-in USB MSC support, so what you would need to do is write a block device implementation (in Python or C) that talks to the SPI interface on the ch375. This block device could be mounted using the built-in filesystem drivers (FAT, LFS) usi...
by jimmo
Wed Jun 22, 2022 12:21 am
Forum: Development of MicroPython
Topic: Using mpy files in an MP library
Replies: 6
Views: 24345

Re: Using mpy files in an MP library

I was able to put the mpy file in the same directory as the mp executable, but that doesn't work with my application. What do you mean by "doesn't work"... having the file in the same directory isn't what you want (does sys.path help?) or it just flat out doesn't load? As you're running on x86/x64 ...