Giter Site home page Giter Site logo

Comments (5)

rsta2 avatar rsta2 commented on September 8, 2024

There is a "side effect" when you use m_Logger.Write (..., LogPanic, ...). Because this is a system panic message the message will be displayed in red and the system will halt there. So with the code in your attached screen the system will never come to the file system mount even if the partition was found. You should use LogDebug or LogNotice instead of LogPanic for success messages.

Please try sample/07-storage which displays the partition table of the attached USB drive. The first line after the header should be the FAT32 partition ("Type" probably 0B or 0C) and the "1stSector" and "Sectors" values should be valid. Can you check this?

from circle.

Tyguy160 avatar Tyguy160 commented on September 8, 2024

Thanks for the quick reply! I changed the LogPanic to LogNotice and it is successfully mounting the drive. Now it is hanging in the section where the code is supposed to "show the contents of root directory".

I tried sample/07-storage and am receiving the following from the partition table dump:

00:00:02:40 kernel: # Status Type 1stSector Sectors
00:00:02:40 kernel: 1 00 0B 2 1953790
00:00:02:40 kernel: 2 00 00 0 0
00:00:02:40 kernel: 3 00 00 0 0
00:00:02:40 kernel: 4 00 00 0 0

What's the best way to verify that this information is correct and it read the right USB flash drive?

EDIT: I was able to dump the partition table on my main computer and it did match, so the USB is being identified and mounted correctly. It is still hanging in the area where it should show the contents of the root directory.

from circle.

rsta2 avatar rsta2 commented on September 8, 2024

Thanks for the reply! So it looks like the physical access to the USB drive works OK and the partition table is also all right. Unfortunately it's difficult to solve why it hangs in the directory listing. You could only insert debug messages at several places to find the exact place where it hangs. That's difficult from here. It may be a bug or the FAT32 partition may be corrupted. You could try to run something like CHKDSK (or fsck.vfat on Linux) on it. Not sure if it helps. Currently I have no other idea. :-(

from circle.

Tyguy160 avatar Tyguy160 commented on September 8, 2024

Thanks for all of your help. I didn't find the cause of the hang, but I'm assuming it's my drive is having issues. I don't necessarily need to print the contents of the root directory for this project I am working on, so I removed that section and everything else worked flawlessly. Thanks for everything!

from circle.

rsta2 avatar rsta2 commented on September 8, 2024

I think I have found the bug. The evaluation of the HIDDEN directory attribute (called FS_ATTRIB_SYSTEM in Circle) in sample/15-files/kernel.cpp was wrong. If there was a file with this attribute in the root directory it did hang. I have pushed a fix to GitHub. Thanks for support!

from circle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.