Skip to content

Changes to timers since 1.0.4 break USB_PD. #172

Open
@ralphrmartin

Description

@ralphrmartin

The changes made to include HardwareTimer.c since 1.0.4 break the USB_PD example for CH32x035. Specifically, both
HardwareTimer.c and usbpd_sink.c define
void TIM3_IRQHandler(void) __attribute__((interrupt("WCH-Interrupt-fast"))); and
void TIM3_IRQHandler(void)

When trying to build the example, the result is

/Users/ralph/Library/Arduino15/packages/WCH/tools/riscv-none-embed-gcc/8.2.0/bin/../lib/gcc/riscv-none-embed/8.2.0/../../../../riscv-none-embed/bin/ld: /Users/ralph/Library/Caches/arduino/cores/4bc2b5ff1fea33627510baec3699fa75/core.a(HardwareTimer.cpp.o): in function `TIM3_IRQHandler':
HardwareTimer.cpp:(.text.TIM3_IRQHandler+0x0): multiple definition of `TIM3_IRQHandler'; /Users/ralph/Library/Caches/arduino/sketches/F458F1554934B9A4D499223271D0F159/libraries/USBPD_SINK/usbpd_sink.c.o:usbpd_sink.c:(.text.TIM3_IRQHandler+0x0): first defined here
collect2: error: ld returned 1 exit status

exit status 1

Compilation error: exit status 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions