Comments (5)
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.
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.
thanks Dan, somehow I couldn't install gcc v8 via apt package. I will fix this later on.
from tinyusb.
Maybe, they didn't update some meta data. I will wait a few days, just being lazy to do reconfiguring now ππ
from tinyusb.
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)
- Is it possible to provide an `ncm_open`, `ncm_close` API interface to control the connection and disconnection of USB? HOT 2
- USB Host: No set address recovery interval HOT 3
- Can Add support portable stm32h7 in src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c HOT 1
- tuh_edpt_abort_xfer should call user callback
- Vendor support outdated? HOT 1
- Add hook to allow for external host class drivers HOT 2
- OHCI: MMIO coherency/sync issue
- audio.h: error: ISO C restricts enumerator values to range of 'int' before C23 [-Werror=pedantic] HOT 4
- tud_task() hangs when there are no more messages in the buffer due to the timeout_ms value is set to UINT32_MAX. It should be 0, right? HOT 4
- Renesas RZ/T Support
- Consider adding preprocessor switch to disable automatic rp2040 binary declarations
- tud_umount_cb not called on Raspberry Pi Pico W HOT 1
- It can't work on STM32G0B1CBT6 with FreeRTOS. Please help. HOT 2
- Thoughts about increasing CDC transfer speed.
- Stack overflow with the new NCM driver HOT 12
- USBTMC for the host
- FREERTOS thread create in different order cause memory leak. HOT 1
- USBTMC: EP not busy should not bail from tud_usbtmc_transmit_notification_data
- HID descriptor
- tud_audio_write()/tud_audio_read() from ISR when using RTOS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tinyusb.