In mcuconf.h should be replaced
Code: Select all
// #define STM32F103_MCUCONF
#define STM32F107_MCUCONF
How to fix errors with USB ?
c:\ChibiStudio\ChibiOS\testhal\STM32\STM32F1xx\USB_CDC_F107>make
Compiler Options
arm-none-eabi-gcc -c -mcpu=cortex-m3 -O2 -ggdb -fomit-frame-pointer -falign-functions=16 -ffunction-sections -fdata-sections -fno-common -flto -Wall -Wextra -Wundef -Wstrict-prototypes -Wa,-alms=build/lst/ -DCORTEX_USE_FPU=FALSE -DTHUMB_PRESENT -mno-thumb-interwork -DTHUMB_NO_INTERWORKING -MD -MP -MF .dep/build.d -I. -I../../../../os/license -I../../../../os/common/startup/ARMCMx/compilers/GCC -I../../../../os/common/startup/ARMCMx/devices/STM32F1xx -I../../../../os/common/ext/CMSIS/include -I../../../../os/common/ext/CMSIS/ST/STM32F1xx -I../../../../os/rt/include -I../../../../os/common/oslib/include -I../../../../os/common/ports/ARMCMx -I../../../../os/common/ports/ARMCMx/compilers/GCC -I../../../../os/hal/osal/rt -I../../../../os/hal/include -I../../../../os/hal/ports/common/ARMCMx -I../../../../os/hal/ports/STM32/STM32F1xx -I../../../../os/hal/ports/STM32/LLD/CANv1 -I../../../../os/hal/ports/STM32/LLD/DACv1 -I../../../../os/hal/ports/STM32/LLD/DMAv1 -I../../../../os/hal/ports/STM32/LLD/EXTIv1 -I../../../../os/hal/ports/STM32/LLD/GPIOv1 -I../../../../os/hal/ports/STM32/LLD/I2Cv1 -I../../../../os/hal/ports/STM32/LLD/RTCv1 -I../../../../os/hal/ports/STM32/LLD/SDIOv1 -I../../../../
os/hal/ports/STM32/LLD/SPIv1 -I../../../../os/hal/ports/STM32/LLD/TIMv1 -I../../../../os/hal/ports/STM32/LLD/USARTv1 -I../../../../os/hal/ports/STM32/LLD/USBv1
-I../../../../os/hal/ports/STM32/LLD/xWDGv1 -I../../../../os/hal/boards/OLIMEX_STM32_P107 -I../../../../os/hal/lib/streams -I../../../../os/various main.c -o main.o
Compiling crt0_v7m.S
Compiling chcoreasm_v7m.S
Compiling crt1.c
Compiling vectors.c
Compiling chsys.c
Compiling chdebug.c
Compiling chtrace.c
Compiling chvt.c
Compiling chschd.c
Compiling chthreads.c
Compiling chtm.c
Compiling chregistry.c
Compiling chsem.c
Compiling chmtx.c
Compiling chcond.c
Compiling chevents.c
Compiling chmsg.c
Compiling chdynamic.c
Compiling chmboxes.c
Compiling chmemcore.c
Compiling chheap.c
Compiling chmempools.c
Compiling chcore.c
Compiling chcore_v7m.c
Compiling osal.c
Compiling hal.c
In file included from ../../../../os/hal/ports/STM32/STM32F1xx/hal_lld.h:191:0,
from ../../../../os/hal/include/hal.h:110,
from ../../../../os/hal/src/hal.c:25:
../../../../os/hal/ports/STM32/STM32F1xx/hal_lld_f105_f107.h:359:2: error: #error "Using a wrong mcuconf.h file, STM32F107_MCUCONF not defined"
#error "Using a wrong mcuconf.h file, STM32F107_MCUCONF not defined"
^
In file included from ../../../../os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.h:30:
0,
from ../../../../os/hal/include/hal_usb.h:370,
from ../../../../os/hal/include/hal.h:141,
from ../../../../os/hal/src/hal.c:25:
../../../../os/hal/ports/STM32/LLD/USBv1/stm32_usb.h:39:5: warning: "STM32_USB_ACCESS_SCHEME_2x16" is not defined [-Wundef]
#if STM32_USB_ACCESS_SCHEME_2x16
^
../../../../os/hal/ports/STM32/LLD/USBv1/stm32_usb.h:81:5: warning: "STM32_USB_HAS_BCDR" is not defined [-Wundef]
#if STM32_USB_HAS_BCDR
^
In file included from ../../../../os/hal/include/hal_usb.h:370:0,
from ../../../../os/hal/include/hal.h:141,
from ../../../../os/hal/src/hal.c:25:
../../../../os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.h:117:2: error: #error "USB driver activated but no USB peripheral assigned"
#error "USB driver activated but no USB peripheral assigned"
^
../../../../os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.h:131:5: warning: "STM32_USBCLK" is not defined [-Wundef]
#if STM32_USBCLK != 48000000
^
../../../../os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.h:132:2: error: #error "the USB driver requires a 48MHz clock"
#error "the USB driver requires a 48MHz clock"
^
../../../../os/hal/ports/STM32/LLD/USBv1/hal_usb_lld.h:421:5: warning: "STM32_USB_HAS_BCDR" is not defined [-Wundef]
#if STM32_USB_HAS_BCDR || defined(__DOXYGEN__)
^
make: *** [build/obj/hal.o] Error 1
c:\ChibiStudio\ChibiOS\testhal\STM32\STM32F1xx\USB_CDC_F107>