You can chat about native SDK questions and issues here.

User avatar
By frebbles
#65629 I have spent a while debugging and attempting to get spiffs working within the RTOS_SDK, but with the added use of creating an image with spiffsimg and uploading.

If anyone is having difficulties, it seems to be with the include/spiffs/spiffs_nucleus.h file and I have had to apply a patch that fixes/removes the _align part of the struct spiffs_page_object_ix_header as follows from line 417.

Code: Select all// object index header page header
typedef struct __attribute(( packed ))
#if SPIFFS_ALIGNED_OBJECT_INDEX_TABLES
                __attribute(( aligned(sizeof(spiffs_page_ix)) ))
#endif
{
  // common page header
  spiffs_page_header p_hdr;
#if SPIFFS_ALIGNED_OBJECT_INDEX_TABLES
  // alignment
  u8_t _align[4 - (sizeof(spiffs_page_header)&3)==0 ? 4 : (sizeof(spiffs_page_header)&3)];
#endif
  // size of object
  u32_t size;
  // type of object
  spiffs_obj_type type;
  // name of object
  u8_t name[SPIFFS_OBJ_NAME_LEN];
} spiffs_page_object_ix_header;

// object index page header
typedef struct __attribute(( packed )) {
 spiffs_page_header p_hdr;
 u8_t _align[4 - (sizeof(spiffs_page_header)&3)==0 ? 4 : (sizeof(spiffs_page_header)&3)];
} spiffs_page_object_ix;


Noting the added "#if SPIFFS_ALIGNED_OBJECT_INDEX_TABLES" around the align.

My question to someone who knows about this implementation... I have yet to run into a problem without it, but does the spiffs_page_object_ix require the same alignment directive... my thoughts are yes.

Thanks.
fRebbles