[Nucleo-F411RE] Assign REPL on UART6

Discussion and questions about boards that can run MicroPython but don't have a dedicated forum.
Target audience: Everyone interested in running MicroPython on other hardware.
Post Reply
LuSP
Posts: 2
Joined: Thu Mar 19, 2020 2:25 am

[Nucleo-F411RE] Assign REPL on UART6

Post by LuSP » Sun Mar 22, 2020 6:32 pm

Hello. Is it possible to assign REPL on UART6 interface?

I tried to use pyb.repl_uart command, but got the following in the terminal:

Code: Select all

Connecting to COM6 (buffer-size 512)...
Trying to connect to REPL  connected
Testing if sys.stdin.buffer exists
The terminal was hanging on this.

The method with os.dupterm() command also did not help.

If I tried to initialize UART2 interface, the REPL said the following:

Code: Select all

ValueError: UART is static and can't be init'd
Is there a way to assign the REPL to UART6, and use UART2 as a regular interface through USB?

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: [Nucleo-F411RE] Assign REPL on UART6

Post by jimmo » Mon Mar 23, 2020 12:24 am

Yes this is possible, but you'll have to build your own firmware.

See the last paragraph of this reply: viewtopic.php?f=2&t=7844&#p44737 The built-in "default REPL uart" is separate to the dupterm mechanism.

So if you change the REPL UART in mpconfigboard.h to UART6, you'll be free to use UART2 for whatever you like.

LuSP
Posts: 2
Joined: Thu Mar 19, 2020 2:25 am

Re: [Nucleo-F411RE] Assign REPL on UART6

Post by LuSP » Tue Mar 24, 2020 7:02 pm

It seems that it's easier to learn C and write firmware from scratch in C than trying to compile micropython in Ubuntu. No arm-none-eabi-gcc package in repos, no way to add PPA repository (Says there are no files dedicated for my release). Crap!

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: [Nucleo-F411RE] Assign REPL on UART6

Post by dhylands » Tue Mar 24, 2020 11:09 pm

You can get the toolchain from ARM. The link is in the micropython readme: https://github.com/micropython/micropyt ... 32-version

In particular, the end of the first paragraph has: https://launchpad.net/gcc-arm-embedded which then points to the ARM site:
https://developer.arm.com/tools-and-sof ... ain/gnu-rm

ARM provides this particular toolchain and updates it quarterly. They have toolchains for Windows, Mac, and Linux.

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: [Nucleo-F411RE] Assign REPL on UART6

Post by jimmo » Wed Mar 25, 2020 1:43 am

Have you tried gcc-arm-none-eabi rather than arm-none-eabi-gcc

I'm not an Ubuntu user so I have no idea and this may be completely unhelpful but this seems almost unbelievable that Ubuntu wouldn't have this?

I looked at packages.ubuntu.com and they have it for xenial, bionic, disco, eoan, focal -- what are you running?

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: [Nucleo-F411RE] Assign REPL on UART6

Post by dhylands » Wed Mar 25, 2020 4:49 pm

I know that from time to time I have tried and used the Ubuntu version of arm-none-eabi-gcc provided with Ubuntu, but I've also had it not work. It also seems to lag behind the ARM version by quite a bit IIRC.

Post Reply