Skip to content
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

tests/drivers/console: drivers.console.semihost can't work #25191

Closed
erwango opened this issue May 11, 2020 · 4 comments · Fixed by #25195
Closed

tests/drivers/console: drivers.console.semihost can't work #25191

erwango opened this issue May 11, 2020 · 4 comments · Fixed by #25195
Assignees
Labels
area: Console area: Tests Issues related to a particular existing or missing test bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Comments

@erwango
Copy link
Member

erwango commented May 11, 2020

Describe the bug
When running sanitycheck, drivers.console.semihost is run on all cortex-m boards.
Though, it is failed on all boards I could test (various STM32, frdm_k64f_reel_board)
When running with west, test doesn't output anything on console.

To Reproduce
Run test with sanitycheck, west

Expected behavior
Test runs successfully

Environment (please complete the following information):

  • OS: Linux
  • Toolchain (e.g Zephyr SDK, ...)
  • Commit SHA or Version used

Additional context

@erwango erwango added bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug area: Console area: Tests Issues related to a particular existing or missing test labels May 11, 2020
@stephanosio stephanosio self-assigned this May 11, 2020
@stephanosio
Copy link
Member

While the test can run on real hardware targets, sanitycheck will not be able to validate its output, unless the semihosting console output is somehow redirected to the serial port to which sanitycheck is connected.

I will provide a fix for this.

@erwango
Copy link
Member Author

erwango commented May 11, 2020

@stephanosio Txs for the fix.

About this feature, is that complying will all cortex-m ?
I checked given link: https://developer.arm.com/docs/dui0471/k/what-is-semihosting/what-is-semihosting

And they mention: "ARM processors use the SVC instructions, formerly known as SWI instructions, to make semihosting calls. However, if you are compiling for an ARMv6-M or ARMv7-M, for example a Cortex-M1 or Cortex-M3 processor, semihosting is implemented using the BKPT instruction."

I don't see these cases in

static int semihost_console_out(int ch)

@stephanosio
Copy link
Member

About this feature, is that complying will all cortex-m ?
I checked given link: https://developer.arm.com/docs/dui0471/k/what-is-semihosting/what-is-semihosting

@erwango Yes, it works on all Cortex-M cores.

image

@erwango
Copy link
Member Author

erwango commented May 11, 2020

@stephanosio Txs for the confirmation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Console area: Tests Issues related to a particular existing or missing test bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants