cnlohr / rv003usb

CH32V003 RISC-V Pure Software USB Controller
MIT License
436 stars 43 forks source link

fix: bootloader fails to build #27

Closed siuyin closed 11 months ago

siuyin commented 11 months ago

~/rv003usb$ cd bootloader/ ~/rv003usb/bootloader$ make clean build rm -rf bootloader.elf bootloader.bin bootloader.hex bootloader.lst bootloader.map bootloader.hex || true riscv64-unknown-elf-gcc -o bootloader.elf bootloader.c ../rv003usb/rv003usb.S -g -Os -flto -ffunction-sections -static-libgcc -march=rv32ec -mabi=ilp32e -I/usr/include/newlib -I../ch32v003fun/ch32v003fun/../extralibs -I../ch32v003fun/ch32v003fun -nostdlib -I. -Wall -I. -I../lib -DUSE_TINY_BOOT -I../rv003usb -T ch32v003fun-usb-bootloader.ld -Wl,--gc-sections -L../ch32v003fun/ch32v003fun/../misc -lgcc ../rv003usb/rv003usb.S: Assembler messages: ../rv003usb/rv003usb.S:54: Error: illegal operands la a5,GPIO((GPIO_TypeDef*)(((0x40000000)+0x10000)+0x1400))_BASE' ../rv003usb/rv003usb.S:567: Error: illegal operandsla a5,GPIO((GPIO_TypeDef*)(((0x40000000)+0x10000)+0x1400))_BASE' make: *** [../ch32v003fun/ch32v003fun/ch32v003fun.mk:27: bootloader.elf] Error 1

Fixed by updating usb_config.h: "USB_PORT GPIOD" -> "USB_PORT D"

cnlohr commented 11 months ago

Thanks for catching this!