Showing results for 
Search instead for 
Did you mean: 

Cannot debug CM4, "Unable to create ... because of " inputstream is closed"

Mario Luzeiro

I'm trying to program/debug a CM4 co processor on a STM32MP151 3rd party board.

I setup the Debug as "thru Linux core" Serial port and Inet address looks ok, I got a green connection light, "status connected", and after trying to debug, I got this message:

Error in final launch sequence:
Failed pre launch
Failed pre launch
Transfer has failed, please:
     1. check your physical connection
     2. make sure that your target is still running Linux
     3. make sure that your target has enough storage space
     4. make sure that remote directory has valid access rights
   > you can open a Console View for this...
Original message: Unable to create /usr/local/projects/STM32MP151_Test_CM4/lib/firmware because of " inputstream is closed"

Any suggestions how to setup the debug?

ST Employee

Hi @Mario Luzeiro​ ,

In this mode of debug, Cortex-M elf is downloaded from your PC to the Cortex-A7 Linux via network. This download is based onto sftp, implying that you need the support also on your device.

Could you check if ftp transfer from your PC to your device works ?

Best regards,


ST Employee

If not, you need to adjust your 3rd party board embedded Linux.

It looks it is not present. Which packages are need to support this debug?

Any pointer where can I learn how to enable and build with this packages?

Mario Luzeiro

I managed to get it work. However, I found that I'm not able to debug if I have breakpoints set before the program start. So the workarround is to let the debug sessions start and then add breakpoints.

Is that a known issue / limitation ?