arpruss / USBComposite_stm32f1

USB Composite library for STM32F1 (HID, Serial, MIDI and XBox360 controller)
Other
381 stars 76 forks source link

Incompatibility with other libraries #118

Open SunboX opened 2 years ago

SunboX commented 2 years ago

First, thanks for this great library! :)

Many libraries nowadays are using the STM32Duino core instead of the Maple core. Regarding this thread [1], the Maple core seems also to be outdated and difficult to set up.

Is there any plan to move the Library to STM32Duino core?

[1] https://community.platformio.org/t/stm32-platform-uploads-elf-file-not-bin/29065/14

SunboX commented 2 years ago

ah, just found this issue: https://github.com/stm32duino/Arduino_Core_STM32/issues/668 (followup: https://github.com/stm32duino/Arduino_Core_STM32/issues/687)

arpruss commented 2 years ago

It would be a difficult task and I am not up to it.

I am not sure what you mean by saying the Maple core is difficult to set up. It seems to be pretty straightforward: download it to your Arduino/Hardware directory, fix permissions of scripts if necessary, and it works, at least for me.

Additionally, the Maple core involves less abstraction and hence should produce smaller and faster code (though to be honest, I haven't checked it).

The big advantage of the standard core is that it supports more devices, however.

alex-eri commented 11 months ago
[env:bluepill_f103c8]
platform = ststm32
board = bluepill_f103c8
framework = arduino
board_build.core = maple
upload_flags = -c set CPUTAPID 0x2ba01477
debug_server = /home/eri/.platformio/packages/tool-openocd/bin/openocd
        -s /home/user/.platformio/packages/tool-openocd/scripts
        -f interface/stlink.cfg
        -c "transport select hla_swd"
        -c "set CPUTAPID 0x2ba01477"
        -f target/stm32f1x.cfg
        -c "reset_config none"
lib_deps =
        SPI
        arpruss/USBComposite for STM32F1@^1.0.9
debug_init_break =
board_build.ldscript = jtag_c8.ld

My setup for f103c8 clone in platformio. So to setup start with:

[env:bluepill_f103c8]
platform = ststm32
board = bluepill_f103c8
framework = arduino
board_build.core = maple