Using Shell commands with STM32F3

Hello,

I am trying to use the Shell commands with commands on the UART with the STM32F3 Discovery board and am having some problems. I am using the test_shell main file to check this functionality but I am having some problems. Is this feature already used for the STM boards.

I can see that the physical UART interrupt gets triggered and I add bytes to the ringbuffer_t rx_buf defined in line 50 of file /cpu/stm32f3/syscalls.c. However the _read_r function in syscalls never seems to get called. The shell thread seems to be waiting for a message from the uart0_handler_pid thread (declared in file /sys/uart0/uart0.c).

Thanks a lot for your help.

Regards,

Abhinav

Hi Somaraju,

a quick and running solution is the alternative workaround from @haukepetersen:

Regards, Peter

Hi Abhinav,

this is a known (at least to us :slight_smile: ) issue. The problem is, that I have not implemented any uart0 functionality for the newer cortex-m ports, as we expect the uart0 to be succeeded by something more general for stdio in the future… There are two possible ways to solve this for now:

  1. just substitute the ‘posix_read()’ stuff in the shell application with ‘getchar()’ or
  2. have a look at this PR [2]

And by the way, the STM32F3 got merged into master yesterday night :slight_smile:

Cheers, Hauke

[2]

Hi Hauke, Peter,

Thanks for the info – I have it working now.

Regards,

Abhinav