NaFWDl_t has no member named 'allocated size'

I just used package manager to update my installation to:
03132009 NET+OS 7.4.2
(which I am loath to usually do as build errors crop up).

Now when I do a build of my project I get the error:
error: ‘NaFWDl_t’ has no member named ‘allocated_size’

Which when I look at the file:
netos74\src\bsp\fsintf\fsintflocal.h
Does indeed not contain such a member.
However in the error file:
netos74\src\bsp\fsintf\fwdl.c
There is a few references to such a member (lines 163, 165, 654, 657).

So I need to fix that, how??

I also am now getting the following linker errors:
*** [objs/32b/gnu/connectcore9p9215_a_esp/fwdl.o]
*** [bsp/7_4/connectcore9p9215_a/lib/libbsp.a]

Will both these be fixed when the compilation errors are fixed?
I assume at least the first linker errror will get fixed.

Thanks in advance for any help.

Regards,

Adam

it sounds like your netos tree got updated but not your project (which is by design) Try creating a new project and see if it compiles fine. If it does not, someting wrong with your netos install after upgrade, if it builds then the problem is in your project.try cleaning it up from all object files and libraries. I’d also empty the BSP directory.

Leonid,

I copied the old “fwdl.c” file from the back up directory:
c:
etos74\package_manager\backups\FTP_Updates_742;04-13-10+11.22.03\src\bsp\fsintf\

All the projects, including my application, now build and appears to be running properly. So I do believe that this file was updated via the package manager without the corresponding “fsintflocal.h” file.

This file looks like it is involved with image downloads and RAM FTP server. I don’t know if I broke that by having the old fwdl.c file in place.

In the meantime I can at least continue with my application work while we look into the original issue.

Regards,

Adam

Leonid,

I just did the following tests:

I tried to build the Sample Project:
“Command Line Interface API Sample” that was previously working and got the same error.

I then deleted the sample project and created it again from scratch.
I got the exact same error messages so I think it is a problem with the 7.4.2 updates.

I then started a completely new project (blank not a sample) with only the Digi generated files as part of it. Once again I received the exact same error messages.

It is strange that all the other files in the BSP and project compile correctly except for the fwdl.c file. I think it is a “bug” with the latest release and that the correct “fsintflocal.h” was never included in the package manager update.

Leonid, could you check on this?

Regards,

Adam

I’m not sure I can do attachemnts here - here is my fsintflocal.h file:
/*

  • Copyright (c) 1996-2007 Digi International Inc., All Rights Reserved
  • This software contains proprietary and confidential information of Digi
  • International Inc. By accepting transfer of this copy, Recipient agrees
  • to retain this software in confidence, to prevent disclosure to others,
  • and to make no use of this software other than that for which it was
  • delivered. This is an unpublished copyrighted work of Digi International
  • Inc. Except as permitted by federal law, 17 USC 117, copying is strictly
  • prohibited.
  • Restricted Rights Legend
  • Use, duplication, or disclosure by the Government is subject to
  • restrictions set forth in sub-paragraph (c)(1)(ii) of The Rights in
  • Technical Data and Computer Software clause at DFARS 252.227-7031 or
  • subparagraphs (c)(1) and (2) of the Commercial Computer Software -
  • Restricted Rights at 48 CFR 52.227-19, as applicable.
  • Digi International Inc. 11001 Bren Road East, Minnetonka, MN 55343
  • Edit History
  • Date Initials Change description
    */

#ifndef FS_INTF_LOCAL_H
#define FS_INTF_LOCAL_H

#include

#ifdef __cplusplus
extern “C”
{
#endif

#define _DEBUG_PRINTF 0

#define _READ_PERMISSION_BIT 2
#define _WRITE_PERMISSION_BIT 16 /* bit number for write permisstion */

extern int getErrno (void);

extern int yaffs_FindNetOSPartition(unsigned int *fsStart, unsigned int *fsSize);
extern int yaffs_FindUBootPartition(unsigned int *fsStart, unsigned int *fsSize);

/ad

  • When defined to 1, it allows users to list all files and directories which
  • the user has access permission to. It’s defined to 0 by default which will
  • displays all files and directories.
  • @external
  • @category Networking:FTP_Server:File_System_Interface
  • @since 6.2

ad/
#define _RETRICTED_USER_LISTING 0

/ad

  • When defined, _FTPS_RESTRICTED_FILE_CREATION allows users to create a file
  • only if it does not already exist. If this definition is 0, data will overwrite
  • an existing file.
  • @external
  • @category Networking:FTP_Server:File_System_Interface
  • @since 6.0

ad/
#define _FTPS_RESTRICTED_FILE_CREATION 0

/ad

  • Parsing directory or file return status
  • @external
  • @category Networking:FTP_Server:File_System_Interface
  • @since 6.0
  • @name fs_parsing_status “Parsing File Return Status”
  • @param FILE_OK Directory or file was successfully parsed
  • @param INVALID_FILE_LEN Unable to parse the file
  • @param INVALID_DIRECTORY_LEN Unable to parse the directory
    ad/
    #define FILE_OK 0
    #define INVALID_FILE_LEN -1
    #define INVALID_DIRECTORY_LEN -2

#define LIST_FILE_ONLY 0
#define LIST_FILE_INFO 1

/*

  • This is used for listing files. If the date of a file exceeds this max
  • time (in seconds), year will be returned.

/
#define FS_MAX_SECONDS (180 * 24 * 60 * 60) /
~6 months */

/*

  • FTP Server Response Buffer Size
  • category Networking:FTP_Server:File_System_Interface
  • since 6.0

*/
#define FS_BUFFER_SIZE 2048

#define FS_IO_REQ_EVENT_BIT 0x01

/*

  • FTP server to file system interface control block.
  • category Networking:FTP_Server:File_System_Interface
  • since 6.0
  • param fs_handle The FTP server login user’s handle.
  • param directory_path The array to store the directory path.
  • param buffer A general purpose buffer used as needed.
  • param io_request The I/O request control block.
  • param io_event Threadx event flag, used to wakeup the sys call
  • param dir_info_list The pointer to a directory information array.
  • param dir_info_list_items The number of entries in the directory information array.
  • param file_handler The handle to a file.
  • param file_offset The offset in bytes from the start of a file.
  • param file_size The size of a file in bytes.
  • param permissions The users read and write permissions mask.
  • param error_status The error status after a file I/O request is completed or terminated.

/
typedef struct {
unsigned long fs_handle;
char directory_path[NAFS_DIRECTORY_PATH_SIZE
2+1];
char buffer[FS_BUFFER_SIZE];

NAFS_IO_REQUEST_CB  io_request;
TX_EVENT_FLAGS_GROUP io_event;
NAFS_DIR_ENTRY_INFO *dir_info_list;
unsigned int        dir_info_list_items;
unsigned int        file_handler;
unsigned int        file_offset;
unsigned int        file_size;
unsigned int        permissions;
int                 error_status;    

} FS_FILESYSTEM_T;

/******************************************************************************
*

  •  Definitions and Declarations for Flash Image Downloads. 
    
  •  BUFFERSIZE of the block of memory malloced to store FTP fragments 
    
  •  DELAY_BEFORE_RESET is the number of seconds to wait prior to
    
  •  wait prior to reseting after an image was downloaded  
    

*/
#define BUFFERSIZE (128 * 1024)
#define DELAY_BEFORE_RESET (2 * NABspTicksPerSecond)
#define NOT_USED 0
#define FS_BLOCK_SIZE (32 * 1024)

#define FWDL_STACK_SIZE 4096
#define FWDL_THREAD_PRIORITY 16

typedef struct NaFWDlNode_t
{
unsigned long len;
char *data;
struct NaFWDlNode_t *next;
}NaFWDlNode_t;

/*

  • Link list to hold data packets in smaller chunk of data and later used to
  • do CRC validation of entire image before downloading to flash.
    /
    typedef struct NaFWDl_t
    {
    int handle; /
    handle to avoid data corruption /
    unsigned long total_len; /
    total data length received so far /
    unsigned long exp_len; /
    expected data length of the entire image /
    unsigned long allocated_size; /
    allocated size for the image (excluding rom.bin from this) */
    unsigned long romsize;
    unsigned long accumulator;
    NaFWDlNode_t node; / link list used to store the data */
    NaFWDlNode_t last_node; / for faster access */
    unsigned char uboot;
    }NaFWDl_t;

#define NA_FWDL_INIT 0x0000
#define NA_FWDL_DIRECT 0x0001
#define NA_FWDL_CRC_CHECK 0x0002
#define NA_FWDL_UPDATE_FLASH 0x0004
#define NA_FWDL_HEAP_FULL 0x0008
#define NA_FWDL_DATA_CLOSED 0x0010
#define NA_FWDL_COMPLETED 0x0020
#define NA_FWDL_INVALID_FILENAME 0x0040
#define NA_FWDL_FAILED 0x1000

extern int FSGetNumberOfUser(void);
extern unsigned int FSGetAccessCode(unsigned long handle);

#ifdef __cplusplus
}
#endif

#endif /* FTP_INTF_LOCAL_H */

Leo,

Great, I copied that over the old file and it looks to be working.

If you find out anything about why the file didn’t get updated I would appreciate hearing.

Thanks again,

Adam