Search found 10 matches

by Krasn4ck
Thu Mar 25, 2021 3:06 am
Forum: Development of MicroPython
Topic: Problem with MP_DEFINE_CONST_FUN_OBJ_3
Replies: 1
Views: 2096

Problem with MP_DEFINE_CONST_FUN_OBJ_3

Hi again, I have tried to implement the function init_function to initialize some data of type mp_hal_pin_obj_t , but when I try to define the function with its uPython object it is not compatible. STATIC mp_obj_t init_function(mp_obj_t self_in, mp_hal_pin_obj_t trigger, mp_hal_pin_obj_t echo) { hcs...
by Krasn4ck
Tue Mar 16, 2021 3:45 am
Forum: General Discussion and Questions
Topic: __init__.py problem with compilation
Replies: 0
Views: 1008

__init__.py problem with compilation

I have this problem with manifest.py of ports/stm32/boards, I added some libraries in this file and the compilation is ok, but now compiling again i have the issue: GEN build-OPHYRA/genhdr/compressed.data.h MPY uasyncio/__init__.py error compiling /cygdrive/c/users/dcarl/desktop/micropython-1.14/ext...
by Krasn4ck
Tue Mar 09, 2021 9:08 pm
Forum: Programs, Libraries and Tools
Topic: Link to class methods in composition technique
Replies: 3
Views: 1955

Re: Link to class methods in composition technique

ales.coppelli wrote:
Thu Dec 24, 2020 9:39 am
Thank you very much Stijn. Sorry for my goofy post.
I'll try immidiatly your suggestions.
Hi ales, were you able to try to implement the methods of machine_i2c.c in your C module?
by Krasn4ck
Tue Mar 09, 2021 7:24 am
Forum: Development of MicroPython
Topic: Call I2C to method of Micropython from C
Replies: 1
Views: 2210

Call I2C to method of Micropython from C

Hi, again I have a doubt about how to implement some methods to use the I2C from C, this is as an educational purpose, currently I want to use the functions contained in the pyb_i2c.c file located in ports/stm32 . using these functions that are defined for micropython: { MP_ROM_QSTR(MP_QSTR_init), M...
by Krasn4ck
Wed Feb 24, 2021 9:51 pm
Forum: Development of MicroPython
Topic: Create a native C library for use in micropython for stm32
Replies: 7
Views: 3279

Re: Create a native C library for use in micropython for stm32

Do you actually need to code this in C? There are MicroPython libraries for accessing EEPROM chips and for displaying text on TFT screens which work fast enough for most purposes, except maybe gaming. For example micropython_eeprom and nano-gui along with other micro GUIs for touch displays. And th...
by Krasn4ck
Wed Feb 24, 2021 8:06 am
Forum: Development of MicroPython
Topic: Create a native C library for use in micropython for stm32
Replies: 7
Views: 3279

Re: Create a native C library for use in micropython for stm32

The link about user C modules can do that exactly. However wanting a static library only makes things more complicated than needed (need a separate build step in which you manually provide all correct include paths, qstr processing, ....): unless you have very good reasons for it, I suggest you jus...
by Krasn4ck
Wed Feb 24, 2021 7:20 am
Forum: Development of MicroPython
Topic: Create a native C library for use in micropython for stm32
Replies: 7
Views: 3279

Re: Create a native C library for use in micropython for stm32

When you say 'library', is it possible you actually just mean 'code'? Or do you really mean 'library' as used in C lingo i.e. a 'static library' or a 'dynamic library'? Can you provide some more focus for the question: what exactly do you want to know? Have you read http://docs.micropython.org/en/l...
by Krasn4ck
Wed Feb 24, 2021 5:27 am
Forum: Development of MicroPython
Topic: Create a native C library for use in micropython for stm32
Replies: 7
Views: 3279

Create a native C library for use in micropython for stm32

Hello, I intend to create some libraries to connect to read and write an external eeprom and another to display text on a tft screen , I have some experience in C, I have been looking at the code with which micropython was written and there are some things I understand, but not others, in this case ...
by Krasn4ck
Thu Feb 11, 2021 5:11 pm
Forum: Development of MicroPython
Topic: Compiling for a personalized card STM32F407VGT6
Replies: 3
Views: 1962

Re: Compiling for a personalized card STM32F407VGT6

Update, now have this issue: How did you fix the first issue? Are you able to successfully build other boards? For example the OLIMEX_F407 is a good test as it uses the same MCU. Hi Jimmo with OLIMEX_F407 I had no problem, now I simply corrected this error, but now I got this one: CC build-OPHYRA/f...
by Krasn4ck
Wed Feb 10, 2021 6:45 pm
Forum: Development of MicroPython
Topic: Compiling for a personalized card STM32F407VGT6
Replies: 3
Views: 1962

Compiling for a personalized card STM32F407VGT6

Hello. I am trying to compile MicroPython version 1.14 on a custom board with STM32F407VGT6 , I have all the compile files needed to compile are as follows: mpconfigboard.h mpconfigboard.mk pins.csv stm32f4xx_hal_conf.h I put the folder of these files in the path /ports/stm32/boards/ but I get the f...