cancel
Showing results for 
Search instead for 
Did you mean: 

AZRTOS and FTP support

GreenGuy
Lead

STM32CubeIDE

Version: 1.14.1

STM32CubeMX - STM32 Device Configuration Tool

Version: 6.10.0-RC9

Build: 20231120-2037 (UTC)

OS: Linux (Mint 21)

I am trying to add support for FTP support using CubeIDE.  In the Software Packs Component Selector, under Network NetXDuo> NetXDuo> there are several Addons that can be applied.  One that I am currently using is Addons Web Server and that is working.  However, I do not see a selection for FTP.  I do find in the software packs repo for STM32H7 (version 3.2.0), in the Middlewares/ST/netxduo/addons folder another folder called ftp.  This folder contains the nxd_ftp_server.c and nxd_ftp_server.h files I need to support ftp service.  If I add those files to my project, in the same place the web addons are kept, when I regen the project the files I added are taken away.  It seems like there should be several more options available in the Software Packs selection so CubeMx knows to add them or at least not take them away. 

 

I guess for now, if have to put them in a safer location.  A little annoying.  

1 ACCEPTED SOLUTION

Accepted Solutions

Copy the files in Middlewares...addons/ftp to a location that cubemx does not update.  Two solutions.  1) add folder to project root and put the files there, or 2) in my case I added them to the common Src and Inc folders.  That way i dont have update the project includes and source paths.  Then create the ftp instance.

View solution in original post

21 REPLIES 21
Intector
Associate III

Hey GreenGuy,

I've the same issue. The files can be found in the X-CUBE-AZRTOS-F7 v1.1.0, at file location "x-cube-azrtos-f7\Middlewares\ST\netxduo\addons\ftp". I did the same as you and imported the "ftp" directory into my project, but as soon as I regenerate in X-Cube it'll remove everything. I don't know how many hours I spend unsuccessfully searching the internet for a solution. It's almost like nobody ever tried to run an FTP server on an STM32.

However, I kind of gave up on this issue and started thinking on switching to a different solution by using a different MCU. My actual candidates are ESP32, nRF52840, and maybe something from NXP.

 

Let me know if you ever find a solution for this issue.

Pavel A.
Evangelist III

 It's almost like nobody ever tried to run an FTP server on an STM32.

Indeed why could anyone want a ftp server on STM32? As there were no decent Linux boxes and Raspberry Pi's?

 

Copy the files in Middlewares...addons/ftp to a location that cubemx does not update.  Two solutions.  1) add folder to project root and put the files there, or 2) in my case I added them to the common Src and Inc folders.  That way i dont have update the project includes and source paths.  Then create the ftp instance.

Simple method to update files on the SD card and grab log files off of the sd.

Good idea, I'm going to try this.

Hey GreenGuy,

I did the same thing like you, copied the files in a different folder and created the instance. I can list the directories of the sd card with filezilla, but as soon as I try to copy anything to anywhere it fails. The stm32 is freezing up and goes into a timeout. Nothing gets copied. I cant find any examples anywhere. I checked the traffic with wireshark and the stm32 clearly just stops talking after the first few bytes are sent by the client. Do you have your ftp server running? Do you have any tips for me?

Pavel A.
Evangelist III

STM32 freezing up - where? have you tried to debug and find where it is?  does it spin on some while (1) ?

 

I have been using KonQueror to down and up load files.  FTP does not allow editing of files on the remote system (based on STM32H743).  I just installed filezilla (linux) and it will browse but it will not allow any file transfers.  Likely a default setting needs to changed.  I am not using any user or password since it is on a local network (PC to remote hard line).  Konqueror supports file drag and drop between windows so it is super simple.

Not sure what else to suggest since I do not have visibility to your project.  I mainly use FTP to up load xilinx bin files to a folder on the sd card which the remote system uses to load the fpga, and to up load modified html/json files used by the Web Server.

 

 

Hey Pavel,

I've tried to debug it, but I always lose my breakpoint somewhere and it's very random. It almost seems to be a memory issue, but I checked the memory too and it looks very good.

It's hard to believe that nobody ever made an application using the FTP-Server on a STM32H7.

I'm going to setup a "demo" version and post it here just to see if anybody can pinpoint it down.