Git Product home page Git Product logo

Comments (8)

Kokovec avatar Kokovec commented on August 12, 2024 1

set the optimize option to something other than -Os

👋 can you explain how to do that?

fwiw: i stumbled upon this with similar experience, 0.6.0 doesn't run the callback, 0.5.3 seems to still work as i expect.

In the Arduino IDE it's under "Tools->Optimize"

from pico-pio-usb.

lyusupov avatar lyusupov commented on August 12, 2024 1

set the optimize option to something other than -Os

@sekigon-gonnoc (with CC: to @hathach ) , is it possible to apply a local area "no-optimize" effect by using #pragma GCC optimize feature https://gcc.gnu.org/onlinedocs/gcc/Function-Specific-Option-Pragmas.html with the PIO USB library and/or Adafruit Tiny USB library while keeping the rest of source codes (a sketch, Arduino Core, other libraries) compiled with -Os flag ?

from pico-pio-usb.

Kokovec avatar Kokovec commented on August 12, 2024

I should not that this is happening while using the Adafruit Tiny USB library.

from pico-pio-usb.

sekigon-gonnoc avatar sekigon-gonnoc commented on August 12, 2024

set the optimize option to something other than -Os

from pico-pio-usb.

Kokovec avatar Kokovec commented on August 12, 2024

This works but breaks other libraries (like NeoPixel).

from pico-pio-usb.

edwardsharp avatar edwardsharp commented on August 12, 2024

set the optimize option to something other than -Os

👋 can you explain how to do that?

fwiw: i stumbled upon this with similar experience, 0.6.0 doesn't run the callback, 0.5.3 seems to still work as i expect.

from pico-pio-usb.

sweetlilmre avatar sweetlilmre commented on August 12, 2024

Compiling and running capture_hid_report on v0.6.0 under VSCode in:

  • debug -Og
  • release -O3

results in the same behaviour: no devices enumerated. v0.5.3 works as expected. Am I missing something?

(I am not familiar with cmake so I may well be). Output from compile_commands.json for a debug build:

C:\\PROGRA~1\\RASPBE~1\\PICOSD~1.1\\GCC-AR~1\\bin\\AR19DD~1.EXE -DPICO_BOARD=\\\"pico\\\" -DPICO_BUILD=1 -DPICO_NO_HARDWARE=0 -DPICO_ON_DEVICE=1 -I\"C:/Program Files/Raspberry Pi/Pico SDK v1.5.1/pico-sdk/src/rp2_common/boot_stage2/asminclude\" -I\"C:/Program Files/Raspberry Pi/Pico SDK v1.5.1/pico-sdk/src/rp2040/hardware_regs/include\" -I\"C:/Program Files/Raspberry Pi/Pico SDK v1.5.1/pico-sdk/src/rp2_common/hardware_base/include\" -I\"C:/Program Files/Raspberry Pi/Pico SDK v1.5.1/pico-sdk/src/common/pico_base/include\" -IC:/source/Pico-PIO-USB/examples/build/generated/pico_base -I\"C:/Program Files/Raspberry Pi/Pico SDK v1.5.1/pico-sdk/src/boards/include\" -I\"C:/Program Files/Raspberry Pi/Pico SDK v1.5.1/pico-sdk/src/rp2_common/pico_platform/include\" -I\"C:/Program Files/Raspberry Pi/Pico SDK v1.5.1/pico-sdk/src/rp2_common/boot_stage2/include\" -mcpu=cortex-m0plus -mthumb -Og -g -o pico-sdk\\src\\rp2_common\\boot_stage2\\CMakeFiles\\bs2_default.dir\\compile_time_choice.S.obj -c \"C:\\Program Files\\Raspberry Pi\\Pico SDK v1.5.1\\pico-sdk\\src\\rp2_common\\boot_stage2\\compile_time_choice.S\"

from pico-pio-usb.

sweetlilmre avatar sweetlilmre commented on August 12, 2024

More info.  I tried a fully unoptimized build -O0 and a debug build -Og

I seem to get as far as the device being recognised as connected, but all endpoints are NULL:

        if (!device->connected) {
          continue;
        }

        // Print received packet to EPs
        for (int ep_idx = 0; ep_idx < PIO_USB_DEV_EP_CNT; ep_idx++) {
          endpoint_t *ep = pio_usb_get_endpoint(device, ep_idx);

          if (ep == NULL) {
            break;
          }

i.e. ep is always NULL. This would suggest something else apart from a -Os issue is happening.

The device connected to the pico is a PS3 dual shock 3 controller. Standard pin connections (GP0 and GP1), as before the device enumerates (at least it has valid endpoints) with v0.5.3

from pico-pio-usb.

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.