/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / CircleOS3.7 Filesystem error

Username:     
Password:     
             

Forum

# 1   2009-04-03 04:43:02 CircleOS3.7 Filesystem error

FR4
Member
Registered: 2008-11-09
Posts: 26

CircleOS3.7 Filesystem error

i´ve encountered a problem regarding the filesystem.

I´ve opened a file (size 128kB). Reading the file is no problem. Now i want to read part of the file at different positions. Positioning the filepointer with FS_SEEK is working unless i keep the offset below 16k.  A offset higher than 16k leads to a system crash. If i want to step through the code in debugmode reaching the point where DFS_Seek is called, debugger refuses working telling me the size limitation error, although codesize is below 10k.

At first i assumed a typemismatch but all variables seem ok.

Does anybody have an idea?

It is not a issue of CircleOS3.7 , 3.6 doesn´t work as well.

Offline

 

# 2   2009-04-03 06:55:45 CircleOS3.7 Filesystem error

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: CircleOS3.7 Filesystem error

While working on the dictaphone, we also encountered a few problems when stopping the debug session while recording data (but I consider it is acceptable): the current file could be seen as corrupted (even from USB-MS). The only solution consists in reformatting the SD card.
The filesystem has been placed in the upper memory (non-debuggable) because the debuggable range was full. If you wish to debug this issue and you accept to fix it in CircleOS for the community, we can send you a complete license (pro). Let me know by email the serial number of your Primer.
For the FS_SEEK issue, Sjoerd (member of the community) has worked on the integration of the filesystem. Perhaps he could help.

Offline

 

# 3   2009-04-04 07:16:30 CircleOS3.7 Filesystem error

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: CircleOS3.7 Filesystem error

Thanks for sending the fix.
It seems that there is still another issue with the filesystem (someone reports that  Playwav can still loops for ever). We will investigate this other issue before updating CircleOS.

For those who need the fix in FS_Seek, here it is:

Original code (dosfs.c, line 1303):

Code:

while (DFS_div(fileinfo->pointer, fileinfo->volinfo->secperclus * SECTOR_SIZE).quot !=
          DFS_div(fileinfo->pointer + offset, fileinfo->volinfo->secperclus * SECTOR_SIZE).quot) {

Fixed code:

Code:

while (DFS_div(fileinfo->pointer, fileinfo->volinfo->secperclus * SECTOR_SIZE).quot !=
        DFS_div(offset, fileinfo->volinfo->secperclus * SECTOR_SIZE).quot) {   //correct calculation of actual cluster
// DFS_div(fileinfo->pointer + offset, fileinfo->volinfo->secperclus * SECTOR_SIZE).quot) {
// if you want to set the filepointer  beyond a cluster limit this line crashes the whole system
// adding the offset to the filepointer causes the while to loop infinitely

Thanks again for the fix.

Offline

 

# 4   2009-04-08 11:34:24 CircleOS3.7 Filesystem error

kavusuresh
New member
Registered: 2009-03-24
Posts: 7

Re: CircleOS3.7 Filesystem error

i downloaded snake  game .when i 'start' is given debugger it gives device address is wrong.but program gives build success. please reply me .

Offline

 

# 5   2009-04-08 11:41:16 CircleOS3.7 Filesystem error

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: CircleOS3.7 Filesystem error

I don't know what you mean by "device address ", but I guess you are dealing with a Primer1 project for a Primer2 device (or with a Primer2 project for a Primer1 device).

Offline

 

Board footer