Search found 53 matches

by v923z
Wed Nov 28, 2018 9:45 pm
Forum: Development of MicroPython
Topic: including math functions in module
Replies: 8
Views: 487

Re: including math functions in module

This is definitely true, thanks! However, there are still degrees and radians that are part of modmath.c, and I don't think they are exposed anywhere.
by v923z
Wed Nov 28, 2018 8:57 pm
Forum: Development of MicroPython
Topic: including math functions in module
Replies: 8
Views: 487

including math functions in module

Hi all, I would like to include a couple of functions from math in my C module. I can compile the module all right, but I get a linker error like so test.c:(.text.test_vec+0x5e): undefined reference to `acos' I have tried to add the file to SRC_LIBM in Makefile, but that didn't help (I got an other ...
by v923z
Wed May 23, 2018 9:10 am
Forum: Development of MicroPython
Topic: compiling on ubuntu 18.04
Replies: 3
Views: 840

Re: compiling on ubuntu 18.04

I went to https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads and downloaded the "Linux 64-bit" tarball. It seems to be working fine under ubuntu 18.04. Indeed. Thanks for the pointer! For reference, here are the steps required: 1. Download the tarball from the address above, and u...
by v923z
Tue May 22, 2018 6:44 pm
Forum: Development of MicroPython
Topic: compiling on ubuntu 18.04
Replies: 3
Views: 840

compiling on ubuntu 18.04

Hi all, I was just wondering, whether there is a workaround for compiling on ubuntu 18.04. According to the guidelines (https://github.com/micropython/micropython/wiki/Getting-Started#debian-ubuntu-mint-and-variants), one would have to add ppa:terry.guo/gcc-arm-embedded, but that ppa hasn't been upd...
by v923z
Sun May 13, 2018 5:36 pm
Forum: General Discussion and Questions
Topic: accessing REPL via pyserial
Replies: 13
Views: 1714

Re: accessing REPL via pyserial

OK, then it is probably a question of what is "invoking" the REPL in the first place. pyboard does not, but any serial terminal does. I see that this issue is probably not related to the board as such, but to the software on the computer.
by v923z
Thu May 10, 2018 7:35 pm
Forum: General Discussion and Questions
Topic: accessing REPL via pyserial
Replies: 13
Views: 1714

Re: accessing REPL via pyserial

In the REPL, each statement you execute is evaluated and if the return value from the statement is not equal to None, then the result is printed. Consider the following: >>> def foo(): ... print('Hey there') ... return 42 ... >>> foo() Hey there 42 >>> def foo2(): ... print('Another print') ... ret...
by v923z
Mon May 07, 2018 7:37 pm
Forum: General Discussion and Questions
Topic: accessing REPL via pyserial
Replies: 13
Views: 1714

Re: accessing REPL via pyserial

pyserial reads the data from the serial port. It does not print that data out anywhere. Any of the terminal programs will read data from the serial port and print it to stdout. If you try the python miniterm.py, then you'll see that it does the same thing. For example, here's a really simple serial...
by v923z
Sat May 05, 2018 4:38 pm
Forum: General Discussion and Questions
Topic: accessing REPL via pyserial
Replies: 13
Views: 1714

Re: accessing REPL via pyserial

pythoncoder wrote:
Sat May 05, 2018 5:14 am
Have you seen miniterm.py? This works well on the PC with MicroPython targets.
Thanks for the pointer, Peter! This works. Now I've just got to figure out, why ;)

Cheers,

Zoltán
by v923z
Fri May 04, 2018 7:46 pm
Forum: General Discussion and Questions
Topic: accessing REPL via pyserial
Replies: 13
Views: 1714

Re: accessing REPL via pyserial

Hi Dave, Thanks for the comments. At the more fundamental level, the question really is, why pyserial devours the output of REPL, while e.g., screen does not. My problem is not that I can't save the output of print, but why I have to use print in the first place. In other words, is it possible to em...
by v923z
Fri May 04, 2018 7:26 pm
Forum: General Discussion and Questions
Topic: accessing REPL via pyserial
Replies: 13
Views: 1714

accessing REPL via pyserial

Hi all, I think, the answer to my question is rather trivial, the snag is, I don't know what it is. In short, I would like to use the REPL from python, meaning that I would like to open the serial port on the PC from python, and then put the instructions on the serial line. This works fine till I en...