Hello everyone, I have a stm32 F401RE and I installed the firmware Micropython, at least I hope I did ..Using putty I observed that some modules of pyb are unknown to him . Most of the modules see them, but it gives me error on pin named X1.Any idea?
Even using Thonny same problem.
I attach putty jpeg connected with the card.
Thank you
chipxx
ps
I installed the firmware with St-link but did not use the jumper on 5V and boot the card. I am new to this card.
The firmware downloaded from the Microputhon site is as follows:
NUCLEO-F401RE board : NUCLEO_F401RE-20190529-v1.11.dfu
then, I extracted the .hex file
nucleo F401RE cannot import name Servo
nucleo F401RE cannot import name Servo
- Attachments
-
- 1.jpg (28.89 KiB) Viewed 4503 times
-
- 2.jpg (39 KiB) Viewed 4503 times
-
- 3.jpg (41.79 KiB) Viewed 4503 times
-
- Posts: 363
- Joined: Sun Apr 17, 2016 1:55 pm
Re: nucleo F401RE cannot import name Servo
nucleo F401RE firmware doesn't enable servo default, you can enable it by add
#define MICROPY_HW_ENABLE_SERVO (1)
to mpconfigboard.h and recompile source code.
#define MICROPY_HW_ENABLE_SERVO (1)
to mpconfigboard.h and recompile source code.
Re: nucleo F401RE cannot import name Servo
Thanks for the answer, but it's too complicated for me.
chippx
chippx
Re: nucleo F401RE cannot import name Servo
Hello everyone, I'm trying to recompile micropython-master because I would like to add the Servo library that on my F401RE with micropython 1.11 is not implemented. Under shaoziyang's suggestion
I modified the mpconfigboard.h file related to my card joining:
Now I have loaded everything in Eclipse, with the toolchain, but I did not understand if I have to recompile everything or just some sources.
Thanks
chippx
seems easy...
I modified the mpconfigboard.h file related to my card joining:
Code: Select all
#define MICROPY_HW_ENABLE_SERVO (1).
Thanks
chippx
seems easy...
- Attachments
-
- Eclipse- Micropython-master.png (214.05 KiB) Viewed 4440 times
Re: nucleo F401RE cannot import name Servo
Hi,
Unfortunately MicroPython is not an Eclipse project. You can edit the files and browse the project in Eclipse of course, but the way to build the STM32 firmware is via arm-none-eabi-gcc and the Makefiles.
The instructions are here: https://github.com/micropython/micropyt ... /README.md
Unfortunately I don't know much about how to do this from Windows... hopefully someone else can chime in. You should just need git, arm-none-eabi-gcc and a way to run the Makefile... perhaps cygwin? Unlike other platforms (like ESP32), the STM32 port has no other dependencies. Try searching this forum, I'm sure other people have done it.
Unfortunately MicroPython is not an Eclipse project. You can edit the files and browse the project in Eclipse of course, but the way to build the STM32 firmware is via arm-none-eabi-gcc and the Makefiles.
The instructions are here: https://github.com/micropython/micropyt ... /README.md
Unfortunately I don't know much about how to do this from Windows... hopefully someone else can chime in. You should just need git, arm-none-eabi-gcc and a way to run the Makefile... perhaps cygwin? Unlike other platforms (like ESP32), the STM32 port has no other dependencies. Try searching this forum, I'm sure other people have done it.
Re: nucleo F401RE cannot import name Servo
The easiest way to build MicroPython is to load Ubuntu from the Microsoft Store. Type bash in the search box to launch a Ubuntu bash shell using WSL (Windows subsystem for Linux). Then follow the MicroPython readme for building under Ubuntu.
I use Tortoise Git and a Windows programmer's editor to manage files on a Windows drive and mount that drive in the shell (eg cd /mnt/c/mypath). Make sure editor handles Linux line endings (eg Notepad++).
You can build under Eclipse if you install MSYS 2 and the toolchain. Then import a makefile project instead of building an Eclipse project.
I use Tortoise Git and a Windows programmer's editor to manage files on a Windows drive and mount that drive in the shell (eg cd /mnt/c/mypath). Make sure editor handles Linux line endings (eg Notepad++).
You can build under Eclipse if you install MSYS 2 and the toolchain. Then import a makefile project instead of building an Eclipse project.
-
- Posts: 847
- Joined: Mon Nov 20, 2017 10:18 am
Re: nucleo F401RE cannot import name Servo
I originally started building STM32 projects like this but found it easier to use "system workbench". System workbench is basically a modified version of eclipse with all the needed tools for building STM32 projects and is maintained by the STM32 community
Re: nucleo F401RE cannot import name Servo
Guys thanks for the support but I solved it by buying a STM32F405 PyBoard Clone.
I have to enjoy programming not being a scientist...
chipxx
I have to enjoy programming not being a scientist...
chipxx