cancel
Showing results for 
Search instead for 
Did you mean: 

Transfer data form STM32 to Linux

gapryun
Associate II
Posted on December 10, 2013 at 03:19

Hello everyone,

I wrote a hello world program, which is used eCos, for STM32F4 Cortex-M4 platform. Then, I type the command, which is sudo screen /dev/ttyUSB0 -115200, to see the result in the Ubuntu 12.04. It always loses the first character. But, I use putty to see the result in the Window 7. It is fine. No character data is lost.

Thank you in advance for your help.

#stm32f4 #ecos #ubuntu
4 REPLIES 4
Andrew Neil
Evangelist
Posted on December 10, 2013 at 08:03

PuTTY is  a terminal; screen (AIUI) is not.

http://en.wikipedia.org/wiki/PuTTY

http://www.rackaid.com/resources/linux-screen-tutorial-and-how-to/

Have you tried this with a proper terminal under Ubuntu?

Maybe your Ubuntu is expecting (hardware) flow control to be observed...?
gapryun
Associate II
Posted on December 10, 2013 at 10:25

Thanks you for your hits.

I change to use minicom to see the result. It's successful. 🙂

tommy_lee
Associate
Posted on April 18, 2014 at 18:39

Gapry,

I suppose your ''Hello World'' program must have printf() in it. If it is true, I hope you would tell me how do you build that program.

My platform is same like yours - stm32f4discovery. My host system is 32-bit Ubuntu-13.10 with arm-none-eabi-gcc-4.8.3 20140228 and stlink installed. The stlink st-util utility and the arm-none-eabi-gdb debugger work good on the debugging of my LED blinking program. I am now trying to enable the logging mechanism. Yesterday I encountered a problem of building my program which has the printf() code in it. Your feedback, I believe, could help me to resolve this building problem.

Thanks,

Tommy

Posted on April 18, 2014 at 20:27

Probably need to add some additional code to get printf() working and fix up linkage issues.

see

https://docs.google.com/file/d/0B7OY5pub_GfIcnFFUGJRT3ZTV00/edit

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..