qmk / qmk_firmware

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
GNU General Public License v2.0
17.73k stars 37.94k forks source link

qmk msys can not convert to get file uf2, fatal error #23602

Open thuatdt137 opened 3 months ago

thuatdt137 commented 3 months ago

Issue Description

I tried to compile the oddball keyboard with the convert command: qmk compile -kb oddball/v2_1 -km pmw3360 -e CONVERT_TO=promicro_rp2040. However, I get a fatal error:

Compiling: quantum/split_common/transport.c
               quantum/split_common/transport.c:36:14: fatal error: i2c_slave.h: No such file or directory
   36 | #    include "i2c_slave.h"
      |              ^~~~~~~~~~~~~
compilation terminated.
 [ERRORS]

I checked qmk doctor, and everything is normal, the submodules are complete. I use QMK msys

sigprof commented 3 months ago

The oddball/v2_1 keyboard is somewhat odd and not compatible with converters for several reasons.

First, keyboards/oddball/config.h contains #define USE_I2C, but using I2C for split communications is supported only on AVR (this is why you see the compile error). You may try to override that part of the configuration and specify D0 or D1 as the SOFT_SERIAL_PIN; this might work even without removing the pull-up resistors, but the vendor serial driver for RP2040 normally does not require external pull-ups.

Second, the keyboard uses the B0 pin of Elite-C as the CS pin for the sensor: Oddball v2.1 schematic Unfortunately, all “ProMicro-compatible” RP2040-based boards have the RAW (+5V) power pin at that location, therefore the sensor won't work if you just connect the controller as is, and there is even some chance to damage something because of that connection (VCC is 3.3V on RP2040 controllers). So you would need to avoid connecting that PCB pad directly to the corresponding pad on the controller, and instead add some wire to an otherwise unused controller pin, then redefine ADNS9800_CS_PIN and PMW33XX_CS_PIN to use that pin instead of SPI_SS_PIN (which is defined to B0 when compiling for atmega32u4, but won't be defined when compiling for RP2040).

Also, if you have the “ProMicro RP2040” board from AliExpress (which has a pinout similar to the Helios controller), the proper converter option for it is CONVERT_TO=rp2040_ce. The promicro_rp2040 name refers to the SparkFun ProMicro-RP2040 controller, which does not have the Elite-C bottom row of pins (although the ProMicro-compatible part of the pinout is the same for those boards, by using rp2040_ce you will get the proper USB_VBUS_PIN definition).

github-actions[bot] commented 1 day ago

This issue has been automatically marked as stale because it has not had activity in the last 90 days. It will be closed in the next 30 days unless it is tagged properly or other activity occurs. For maintainers: Please label with bug, in progress, on hold, discussion or to do to prevent the issue from being re-flagged.