Giter VIP home page Giter VIP logo

Comments (5)

dhalbert avatar dhalbert commented on August 15, 2024 1

The ppa is supposed to have the latest gcc8, but it doesn't. I opened a launchpad question about it, and it hasn't been answered. I tested with gcc8 by downloading the tarball from here and just pointing my PATH to its bin directory.

from tinyusb.

nickzoic avatar nickzoic commented on August 15, 2024 1

G'day! I bumped into this too (see reference above) ... looks like you're doing the right thing in copying exactly 8 bytes but GCC 8 is being a bit more paranoid. Perhaps what we should be doing is memcpy up to 8 bytes from the vendor CFG string and padding any left-overs with ASCII SPACE as per this seagate document:

From https://www.seagate.com/files/staticfiles/support/docs/manual/Interface%20manuals/100293068k.pdf page 99:

T10 VENDOR IDENTIFICATION field
The T10 VENDOR IDENTIFICATION field contains eight bytes of left-aligned ASCII data (see 5.4.2) identifying the vendor of the product. The T10vendor identification shall be one assigned by INCITS. Bytes 8 through 15 contain the ASCII characters that represent β€œSEAGATE” (53h 45h 41h47h 41h 54h 45h 20h (space)).

PRODUCT IDENTIFICATION
The PRODUCT IDENTIFICATION field contains sixteen bytes of left-aligned ASCII data (see 5.4.2) defined by Seagate. Bytes 16 through 31 indicate the drive model with 20h (space) used as a filler. The table below is an example of drive test data returned by the drive. Bytes 16 and 17 will contain 53 54 for all drive models.

from tinyusb.

hathach avatar hathach commented on August 15, 2024

thanks Dan, somehow I couldn't install gcc v8 via apt package. I will fix this later on.

from tinyusb.

hathach avatar hathach commented on August 15, 2024

Maybe, they didn't update some meta data. I will wait a few days, just being lazy to do reconfiguring now 😊😊

from tinyusb.

gpshead avatar gpshead commented on August 15, 2024

For circuitpython's purposes you could just replace the initialization code above these errant strncpy usages with direct assignments to CFG_TUD_MSC_VENDOR and PRODUCT as they're #define'd as string literals and get rid of the strncpy for those two.

that doesn't address the real issue though... It sounds like the code should initialize the struct with space characters in these three fields and use memcpy to copy from the CFG_ macro values.

I made a PR that I believe does the right thing based on @nickzoic 's comment.

from tinyusb.

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.