Author Topic: hitting at 'unsupported storage area error' in M5223X.c  (Read 3773 times)

Offline kbluesky

  • Newbie
  • *
  • Posts: 5
    • View Profile
hitting at 'unsupported storage area error' in M5223X.c
« on: April 05, 2013, 01:11:39 AM »
Hello

Right now I am using simulator for developing my webserver.  I am using STORAGE_REV_1 definition for default FLASH, NVRAM, and SPI_FLASH.  The memory address is set from 0x00000000 for default FLASH to NVRAM to SPI_FLASH continuously.  uFile system starts on SPI_FLASH memory only this time with FILE_GRANULARITY of (8*SPI_FLASH_BLOCK_SIZE), which is 16*4*264 bytes for data flash type of AT45DB081D.  The parameter blocks are set at the end of the internal FLASH with FLASH_GRANULARITY size (2*4K).  Of course, the swap parameter block is set.  After proper modifications, the program is complied successfully, run successfully, copied web files successfully, called web pages initially without any problem.  Meaning, the code seems fine.

For my purpose, I should modify and remove some default webpages and add my own webpage and some picture files, js files, and data files.  Basically these modifications work initially.  When I tried to save some changes in the webpages, however, it stopped at the line of "_EXCEPTION("Attemped access to unsupported storge area!!!!") in M5223X.c.  This is the part of fnGetStorageType.  For example, in order to set the authentication of websever, at the admin page I checked the proper section and marked "Modify and save...".  Then click the 'Perform desired action' button.  Then it stopped at the place.  Other saving buttons behave the same.  I have debugged step by step, changed storage.  It didn't help at all.  And it is not clear, when it hits.

What possibly can be wrong?  Something in my webpages?

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3182
    • View Profile
    • uTasker
Re: hitting at 'unsupported storage area error' in M5223X.c
« Reply #1 on: April 05, 2013, 02:44:49 AM »
Hi

Have you checked for bug fixes in the version that you are using? See http://www.utasker.com/forum/index.php?topic=1310.0 - I note that there is a correction in fnEraseFlashSector() when using managed files.

The exception means that the address that is to be read/written or deleted is outside of the registered storage area(s).
It may happen when the file system has been declared to be slightly larger than the storage area (for example) and then an attempted access by the uFileSystem, which thinks that it is accessing a valid address location, would result in the low level driver exceptioning since it is outside of memory.

Of couse it may be due to other bugs or memory being overwritten (the standard nasty things that can happen in software) but I would first make a drawing of the memory map that you have (or expect) and see which address was being acessed that caused the exception (before or after valid area, and which area?) and then use the call stack view to see what was originally calling the read/write/erase that led to it.

Good luck

Regards

Mark



Offline kbluesky

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: hitting at 'unsupported storage area error' in M5223X.c
« Reply #2 on: April 05, 2013, 11:24:48 PM »
Hi, Mark;

Thank you for the quick reply.  and sorry I didn't read the whole things before.  It works beautifully.  :D