Skip to content

-DCDC_DISABLED not working #534

Open
@Phoen11xx

Description

@Phoen11xx

Hello. I am trying to create a usb device and I need to disable the CDC so that only the hid device works.
To install the code, I use usbasp. After enabling the -DC DC_DISABLED parameter or adding define, the CRC still works and I get a hid device plus a non-working device.
Does anyone know the solution to this problem?

Activity

per1234

per1234 commented on May 15, 2023

@per1234
Contributor

Hi @Phoen11xx. Thanks for your report. I know there has been a recent discussion about the use of this macro on Arduino Forum:

https://forum.arduino.cc/t/remove-serial-port/1123859

Is that you? I ask because that discussion contains valuable information about how the users are setting the macro (via the boards definition instead of trying to do it via the sketch code).

Phoen11xx

Phoen11xx commented on May 15, 2023

@Phoen11xx
Author

These not my forum thread. but i have exactly the same problem.

facchinm

facchinm commented on May 15, 2023

@facchinm
Member

The issue is very likely due to how Windows caches the USB descriptors; you can try changing the productVersion field here , replacing 0x100 with any other number, to check if it forgets the previous association.

Phoen11xx

Phoen11xx commented on May 15, 2023

@Phoen11xx
Author

I recorded a video showing this problem:
https://www.youtube.com/watch?v=9o1CELyCOsc
It doesn't look like the problem is in the cache. digitalWrite still working but mouse.move not working with CDC_DISABLED define

Phoen11xx

Phoen11xx commented on May 15, 2023

@Phoen11xx
Author

@facchinm I was wrong about the cache. I change 0x100 to 0x101 and it worked

Phoen11xx

Phoen11xx commented on May 15, 2023

@Phoen11xx
Author

Maybe replace this number with a timestamp or compilation number? there is no information about possible caching in the comments to this option

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      -DCDC_DISABLED not working · Issue #534 · arduino/ArduinoCore-avr