Closed siuyin closed 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
la a5,GPIO((GPIO_TypeDef*)(((0x40000000)+0x10000)+0x1400))_BASE' ../rv003usb/rv003usb.S:567: Error: illegal operands
Fixed by updating usb_config.h: "USB_PORT GPIOD" -> "USB_PORT D"
Thanks for catching this!
~/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 operands
la a5,GPIO((GPIO_TypeDef*)(((0x40000000)+0x10000)+0x1400))_BASE' make: *** [../ch32v003fun/ch32v003fun/ch32v003fun.mk:27: bootloader.elf] Error 1Fixed by updating usb_config.h: "USB_PORT GPIOD" -> "USB_PORT D"