Quality RTOS & Embedded Software

 Real time embedded FreeRTOS RSS feed 
Real time embedded FreeRTOS mailing list 
Quick Start Supported MCUs PDF Books Trace Tools Ecosystem TCP & FAT Training




Loading

FreeRTOS_FTP_server.c does not compile if ffconfigTIME_SUPPORT is 0

Posted by rasty1 on August 3, 2016

Hi, What do I miss? Thanks Rasty

./FreeRTOS-Plus-TCP/protocols/FTP/FreeRTOSFTPserver.c: In function 'prvSizeDateFile': ../FreeRTOS-Plus-TCP/protocols/FTP/FreeRTOSFTPserver.c:2322:27: error: 'FFStatt' has no member named 'stmtime' timet secs = xStatBuf.st_mtime;

In function prvSizeDateFile if( xSendDate != pdFALSE ) { FFTimeStructt tmStruct; timet secs = xStatBuf.stmtime; <<------ no st_mtime


FreeRTOS_FTP_server.c does not compile if ffconfigTIME_SUPPORT is 0

Posted by heinbali01 on August 3, 2016

The "MDTM" command is quite essential to FTP. It needs support for time & date in +FAT. So unless you have a good reason not to use it, I would enable it in your FreeRTOSFATConfig.h:

#define ffconfigTIME_SUPPORT      1

and also include the source file "ff_time.c".

Regards


FreeRTOS_FTP_server.c does not compile if ffconfigTIME_SUPPORT is 0

Posted by rasty1 on August 3, 2016

I have several reasons why I try to remove it 1. I do not have RTC 2. I was trying to optimize footprint 2. I had the impresion that some "time" stuff drawn in from glibc. But I'm not sure.


FreeRTOS_FTP_server.c does not compile if ffconfigTIME_SUPPORT is 0

Posted by heinbali01 on August 4, 2016

I do not have RTC

But you dohave NTP :-) What I often do is synchronise with NTP and use FreeRTOS to maintain the real time.

I was trying to optimize footprint

I'm not sure if it saves a lot of code. Have you calculated that?

I had the impression that some "time" stuff drawn in from glibc. But I'm not sure.

Not that I'm aware off. Several time-functions have been rewritten in order make it independent from the libraries provided by the compiler.

Now if you insist on not using time-support, I (or you) could make a change, remove the MDTM line from:

~~~~ static const char pcFeatAnswer[] = "211-Features:x0a"

if( ffconfigTIME_SUPPORT != 0 )
    "MDTM\x0a"
endif
    " REST STREAM\x0a"
    " SIZE\x0d\x0a"
    "211 End\x0d\x0a";

~~~~

and also:

~~~~ #if ffconfigTIMESUPPORT == 0 { xLength = snprintf( pcCOMMANDBUFFER, sizeof( pcCOMMAND_BUFFER ), "213 19700101000000rn"); } #else { // return the time } #endif ~~~~

Regards.


[ Back to the top ]    [ About FreeRTOS ]    [ Sitemap ]    [ ]




Copyright (C) 2004-2010 Richard Barry. Copyright (C) 2010-2016 Real Time Engineers Ltd.
Any and all data, files, source code, html content and documentation included in the FreeRTOSTM distribution or available on this site are the exclusive property of Real Time Engineers Ltd.. See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Real Time Engineers Ltd.

Latest News:

FreeRTOS V9.0.0 is now available for download.


Free TCP/IP and file system demos for the RTOS


Sponsored Links

⇓ Now With No Code Size Limit! ⇓
⇑ Free Download Without Registering ⇑


FreeRTOS Partners

ARM Connected RTOS partner for all ARM microcontroller cores

Renesas Electronics Gold Alliance RTOS Partner.jpg

Microchip Premier RTOS Partner

RTOS partner of NXP for all NXP ARM microcontrollers

Atmel RTOS partner supporting ARM Cortex-M3 and AVR32 microcontrollers

STMicro RTOS partner supporting ARM7, ARM Cortex-M3, ARM Cortex-M4 and ARM Cortex-M0

Xilinx Microblaze and Zynq partner

Silicon Labs low power RTOS partner

Altera RTOS partner for Nios II and Cortex-A9 SoC

Freescale Alliance RTOS Member supporting ARM and ColdFire microcontrollers

Infineon ARM Cortex-M microcontrollers

Texas Instruments MCU Developer Network RTOS partner for ARM and MSP430 microcontrollers

Cypress RTOS partner supporting ARM Cortex-M3

Fujitsu RTOS partner supporting ARM Cortex-M3 and FM3

Microsemi (previously Actel) RTOS partner supporting ARM Cortex-M3

Atollic Partner

IAR Partner

Keil ARM Partner

Embedded Artists