Comments (8)
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.
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.
I should not that this is happening while using the Adafruit Tiny USB library.
from pico-pio-usb.
set the optimize option to something other than -Os
from pico-pio-usb.
This works but breaks other libraries (like NeoPixel).
from pico-pio-usb.
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.
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.
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)
- Resistors For USB Host HOT 1
- 💡[FEATURE] Please make an new arduino release HOT 1
- [QUESTION] Is it possible to use Pico-PIO-USB but mux the pins to the USB Phy microUSB connector? HOT 2
- [Pico W] Multi hubs and multi devices through wifi
- Vendor host
- Two device ports possible? HOT 1
- 🪲[BUG] SerialPIO and USB Host conflicting HOT 3
- 💡[QUESTION] Pico-PIO-USB as a built-in USB Hub ?
- 🪲[BUG] Pico W CYW43 and Pico-PIO-USB host code conflict HOT 3
- Pin Confusion
- usb 2.0 device mode
- [bug?] usb 1.0 Low-Speed device detection in host mode / lsusb.ino HOT 4
- 💡[FEATURE] Can someone provide a detailed description of the PIO instructions?
- 🪲[BUG] control in[error] Enumeration failed(-1) HOT 3
- 💡[FEATURE] USB Power Delivery
- GPIO device hid
- 💡[FEATURE] Sample code for writing to HID device without tinyusb
- 🪲[BUG] First RX fails with bits shifted by one. HOT 1
- 🪲[BUG] USB Device not being recognised by host
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 pico-pio-usb.