Skip to content

mbed sterm needs mbed-os project imported #880

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
coisme opened this issue Apr 2, 2019 · 9 comments
Closed

mbed sterm needs mbed-os project imported #880

coisme opened this issue Apr 2, 2019 · 9 comments

Comments

@coisme
Copy link

coisme commented Apr 2, 2019

I installed Mbed CLI into a new Windows 10 environment with executable binary Mbed_installer_v0.4.10.exe. Right after that, I tried connecting to K64F via serial terminal using mbed sterm command. The command resulted in error.

However, if I import mbed-os, the command works. Once installed mbed-os was installed, the mbed sterm command works even if I delete the mbed-os directory. Does this mean the Mbed CLI installer doesn't install necessary Python modules and mbed import resolved it?

(K64F is already connected to my PC. COM port can be seen on Device Manager.)

C:\Users\Owner>mbed sterm -b 115200
[mbed] Working path "C:\Users\Owner" (directory)
[mbed] Program path "C:\Users\Owner"
[mbed] Detecting connected targets/boards to your system...
[mbed] ERROR: Couldn't detect connected targets/boards to your system.
       You can manually specify COM port via the '--port' option.
---

C:\Users\Owner>mbed import https://github.com/ARMmbed/mbed-os.git
[mbed] Working path "C:\Users\Owner" (directory)
[mbed] Program path "C:\Users\Owner"
[mbed] Importing program "mbed-os" from "https://github.com/ARMmbed/mbed-os.git" at latest revision in the current branch
[mbed] Auto-installing missing Python modules (colorama, urllib3, prettytable, junit_xml, pyyaml, jsonschema, future, six, mbed_cloud_sdk, requests, idna, pyserial, jinja2, intelhex, mbed_ls, mbed_host_tests, mbed_greentea, beautifulsoup4, pyelftools, manifest_tool, icetea, pycryptodome, pyusb, cmsis_pack_manager)...

C:\Users\Owner>mbed sterm -b 115200
[mbed] Working path "C:\Users\Owner" (directory)
[mbed] Program path "C:\Users\Owner"
[mbed] Detecting connected targets/boards to your system...
[mbed] Opening serial terminal to "K64F"
--- Terminal on COM4 - 115200,8,N,1 ---
ato connect to network (-3014). Retrying...                                <-- Serial output
Unable to connect to network (-3014). Retrying...                     <-- Serial output
Unable to connect to network (-3014). Retrying...                     <-- Serial output
Unable to connect to network (-3014). Retrying...                     <-- Serial output

C:\Users\Owner> rd /s /q mbed-os

C:\Users\Owner> mbed sterm -b 115200
[mbed] Working path "C:\Users\Owner" (directory)
[mbed] Program path "C:\Users\Owner"
[mbed] Detecting connected targets/boards to your system...
[mbed] Opening serial terminal to "K64F"
--- Terminal on COM4 - 115200,8,N,1 ---
Unable to connect to network (-3014). Retrying...                       
Unable to connect to network (-3014). Retrying...                  
@ciarmcom
Copy link
Member

ciarmcom commented Apr 2, 2019

Internal Jira reference: https://jira.arm.com/browse/MBOCUSTRIA-1105

@coisme coisme changed the title mbed sterm needs mbed-os project mbed sterm needs mbed-os project imported Apr 2, 2019
@theotherjimmy
Copy link
Contributor

@coisme This is true of many other Mbed CLI subcommands. mbed compile does not work outside an mbed-os project either.

@coisme
Copy link
Author

coisme commented Apr 3, 2019

@theotherjimmy I understand that mbed compile needs mbed-os because it compiles an Mbed OS project. However, mbed sterm is a serial terminal, and my experiment above indicates mbed-os repository itself is not required. I'd like to request that mbed sterm works with only installing Mbed CLI because it is a nice feature for beginners.

For example, let's think about a beginner developing a Mbed OS program on online compiler. Usually, he/she needs to see the serial output from his target board to check if the program works correctly. At that time, if mbed sterm works just after installing Mbed CLI from executable, it is very easy for that user. Otherwise, user have to care about OS, terminal software, and a COM port.

@linlingao
Copy link

We'll treat this as a feature request then.

@coisme
Copy link
Author

coisme commented Apr 5, 2019

@linlingao Ok, thank you!

@bridadan
Copy link
Contributor

bridadan commented Apr 9, 2019

Hey @coisme, I took at look at this. Turns out mbed sterm doesn't require mbed-os to be cloned locally, but it does need mbed-ls to be installed if you do not supply the --port argument. Just run pip install mbed-ls to install it, then it should work.

@coisme
Copy link
Author

coisme commented Apr 10, 2019

Hi @bridadan, thank you for your research. Is it possible to include mbed-ls in the installer package? It is ideal for beginners that installing .exe is the only requirement for using mbed sterm.

@bridadan
Copy link
Contributor

Seems reasonable to me.

@theotherjimmy how do you feel about adding mbed-ls and pyserial as python dependencies for Mbed CLI? Since it directly imports them?

@theotherjimmy
Copy link
Contributor

I think it's the correct thing to do @bridadan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants