Search found 12 matches

by ales.coppelli
Fri Aug 09, 2019 5:04 pm
Forum: General Discussion and Questions
Topic: Embedding Micropython in a standalone C application (micropython/examples/embedding )
Replies: 9
Views: 502

Re: Embedding Micropython in a standalone C application (micropython/examples/embedding )

Try this: in your 'Makefile.uplib' change the CFLAGS option from "-std=gnu99" to "-std=c99". You should to have my second issue. Ah I misunderstood what you were saying before. Why do you need to change it from gnu99 to c99? Are you compiling with something that isn't gcc? If there's a specific rea...
by ales.coppelli
Fri Aug 09, 2019 12:55 pm
Forum: General Discussion and Questions
Topic: Embedding Micropython in a standalone C application (micropython/examples/embedding )
Replies: 9
Views: 502

Re: Embedding Micropython in a standalone C application (micropython/examples/embedding )

I resolved the second issue: I have changed in Makefile.upylib the CFLAGS option -std=gnu99 ( the correct option ) to -std=c99 ( the wrong one ). I don't know why this solved your problem...? usleep() is in unistd.h, which is already included in mphal.h. When I build examples/embedded, I did see th...
by ales.coppelli
Thu Aug 08, 2019 10:19 am
Forum: General Discussion and Questions
Topic: Embedding Micropython in a standalone C application (micropython/examples/embedding )
Replies: 9
Views: 502

Re: Embedding Micropython in a standalone C application (micropython/examples/embedding )

Jimmo, I resolved the second issue: I have changed in Makefile.upylib the CFLAGS option -std=gnu99 ( the correct option ) to -std=c99 ( the wrong one ). Now is all ok: the program is compiled. By thre way, how I do make the 'Pull request' ? 'Pull request' tab --> New pull request ( green tab ) --> a...
by ales.coppelli
Thu Aug 08, 2019 7:35 am
Forum: General Discussion and Questions
Topic: Embedding Micropython in a standalone C application (micropython/examples/embedding )
Replies: 9
Views: 502

Re: Embedding Micropython in a standalone C application (micropython/examples/embedding )

Thank you very much Jimmo, I added #include <stdint.h> to the top of micropython/py/mphal.h and the old error is disappear but now there is this one: In file included from ../../py/mphal.h:35:0, from ../../py/mpprint.c:33: ../../ports/unix/mphalport.h: In function ‘mp_hal_delay_ms’: ../../ports/unix...
by ales.coppelli
Tue Aug 06, 2019 3:12 pm
Forum: Programs, Libraries and Tools
Topic: Write a guide FreeRTOS and Micropython: looking for interested people
Replies: 0
Views: 500

Write a guide FreeRTOS and Micropython: looking for interested people

Hi everyone, I would like to learn, and then write a guide, on how to compile Micropython to be used as a low priority standalone task on FreeRTOS. I use the STM32CubeMX tool and the ide SW4STM32 to program cards like the STM32F4-Discovery. My idea is to use FreeRTOS for deadline tasks (control task...
by ales.coppelli
Tue Aug 06, 2019 2:34 pm
Forum: General Discussion and Questions
Topic: Embedding Micropython in a standalone C application (micropython/examples/embedding )
Replies: 9
Views: 502

Embedding Micropython in a standalone C application (micropython/examples/embedding )

Hi everyone, I'm trying to compile the "micropython/examples/embedding" program. After running the make command I get this error: "error: unknown type name 'uintptr_t'. Does anyone know how to solve it? Enviroment: PC: Ubuntu 16.04 MicroPython: $ git clone https://github.com/micropython/micropython....
by ales.coppelli
Sun Sep 16, 2018 9:45 am
Forum: Other Boards
Topic: [STM32F411E-DISCO] Giroscope and accelerometer in STM32F411E-DISCO
Replies: 4
Views: 578

Re: [STM32F411E-DISCO] Giroscope and accelerometer in STM32F411E-DISCO

Thank you for your answer. No, my hardware is different ( STM32F411-DISCO ). I found in "ports/stm/boards/STM32F4DISCO" the class STAccel and I put it in 'boot.py' file. When I try >>> a = STAccell() I obtain Traceback error: Exception: LIS302DL or LIS3DSH accelerometer not present and... is correct...
by ales.coppelli
Sat Sep 15, 2018 6:19 pm
Forum: Other Boards
Topic: [STM32F411E-DISCO] Giroscope and accelerometer in STM32F411E-DISCO
Replies: 4
Views: 578

[STM32F411E-DISCO] Giroscope and accelerometer in STM32F411E-DISCO

Hi to all.

I have installed latest MiicroPython in STM32F411E-DISCO board.

Are there classes for handle giroscope and/or accelerometer ?

I trayed

>>> dir(machine) and dir(pyb)

but I don't saw any class 'giro' and/or 'accel'.

Someone can help me ?

Thanks