Re: STM32F105 clock configuration
Posted: Thu Jan 19, 2017 3:05 pm
I have taken to new project all files from:
Only one modification is in Makefile for workspace161
Makefile looks like
There are a lot of errors
What I'm doing wrong ?
c:\ChibiStudio\chibios161\testhal\STM32\STM32F1xx\USB_CDC_F107>
Only one modification is in Makefile for workspace161
CHIBIOS = ../../chibios161
Makefile looks like
PROJECT = ch
# Imported source files and paths
CHIBIOS = ../../chibios161
# Startup files.
include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/mk/startup_stm32f1xx.mk
# HAL-OSAL files (optional).
include $(CHIBIOS)/os/hal/hal.mk
include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_P107/board.mk
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_v7m.mk
# Other files (optional).
#include $(CHIBIOS)/test/rt/test.mk
# Define linker script file here
LDSCRIPT= $(STARTUPLD)/STM32F103xB.ld
There are a lot of errors
#if STM32_USBCLK != 48000000
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:132:2: error: #error "the USB driver requires a 48MHz clock"
#error "the USB driver requires a 48MHz clock"
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:421:5: warning: "STM32_USB_HAS_BCDR" is not defined [-Wundef]
#if STM32_USB_HAS_BCDR || defined(__DOXYGEN__)
^
In file included from ../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:30:0,
from ../../chibios161/os/hal/include/usb.h:370,
from ../../chibios161/os/hal/include/hal.h:63,
from ../../chibios161/os/hal/src/serial_usb.c:25:
../../chibios161/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
^
../../chibios161/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 ../../chibios161/os/hal/include/usb.h:370:0,
from ../../chibios161/os/hal/include/hal.h:63,
from ../../chibios161/os/hal/src/serial_usb.c:25:
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:117:2: error: #error "USB driver activated but no USB peripheral assigned"
#error "USB driver activated but no USB peripheral assigned"
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:131:5: warning: "STM32_USBCLK" is not defined [-Wundef]
#if STM32_USBCLK != 48000000
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:132:2: error: #error "the USB driver requires a 48MHz clock"
#error "the USB driver requires a 48MHz clock"
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:421:5: warning: "STM32_USB_HAS_BCDR" is not defined [-Wundef]
#if STM32_USB_HAS_BCDR || defined(__DOXYGEN__)
^
In file included from ../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:30:0,
from ../../chibios161/os/hal/include/usb.h:370,
from ../../chibios161/os/hal/include/hal.h:63,
from ../../chibios161/os/hal/ports/STM32/STM32F1xx/hal_lld.c:25:
../../chibios161/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
^
../../chibios161/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 ../../chibios161/os/hal/include/usb.h:370:0,
from ../../chibios161/os/hal/include/hal.h:63,
from ../../chibios161/os/hal/ports/STM32/STM32F1xx/hal_lld.c:25:
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:117:2: error: #error "USB driver activated but no USB peripheral assigned"
#error "USB driver activated but no USB peripheral assigned"
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:131:5: warning: "STM32_USBCLK" is not defined [-Wundef]
#if STM32_USBCLK != 48000000
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:132:2: error: #error "the USB driver requires a 48MHz clock"
#error "the USB driver requires a 48MHz clock"
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:421:5: warning: "STM32_USB_HAS_BCDR" is not defined [-Wundef]
#if STM32_USB_HAS_BCDR || defined(__DOXYGEN__)
^
In file included from ../../chibios161/os/hal/ports/STM32/STM32F1xx/hal_lld.h:190:0,
from ../../chibios161/os/hal/include/hal.h:32,
from ../../chibios161/os/hal/ports/STM32/LLD/TIMv1/st_lld.c:25:
../../chibios161/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"
^
make: *** [build/obj/hal.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [build/obj/st.o] Error 1
make: *** [build/obj/hal_buffers.o] Error 1
make: *** [build/obj/hal_queues.o] Error 1
make: *** [build/obj/hal_mmcsd.o] Error 1
make: *** [build/obj/pal.o] Error 1
make: *** [build/obj/serial_usb.o] Error 1
make: *** [build/obj/usb.o] Error 1
make: *** [build/obj/nvic.o] Error 1
make: *** [build/obj/hal_lld.o] Error 1
make: *** [build/obj/stm32_dma.o] Error 1
In file included from ../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:30:0,
from ../../chibios161/os/hal/include/usb.h:370,
from ../../chibios161/os/hal/include/hal.h:63,
from ../../chibios161/os/hal/ports/STM32/LLD/TIMv1/st_lld.c:25:
../../chibios161/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
^
../../chibios161/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 ../../chibios161/os/hal/include/usb.h:370:0,
from ../../chibios161/os/hal/include/hal.h:63,
from ../../chibios161/os/hal/ports/STM32/LLD/TIMv1/st_lld.c:25:
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:117:2: error: #error "USB driver activated but no USB peripheral assigned"
#error "USB driver activated but no USB peripheral assigned"
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:131:5: warning: "STM32_USBCLK" is not defined [-Wundef]
#if STM32_USBCLK != 48000000
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:132:2: error: #error "the USB driver requires a 48MHz clock"
#error "the USB driver requires a 48MHz clock"
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:421:5: warning: "STM32_USB_HAS_BCDR" is not defined [-Wundef]
#if STM32_USB_HAS_BCDR || defined(__DOXYGEN__)
^
make: *** [build/obj/st_lld.o] Error 1
In file included from ../../chibios161/os/hal/ports/STM32/STM32F1xx/hal_lld.h:190:0,
from ../../chibios161/os/hal/include/hal.h:32,
from ../../chibios161/os/hal/ports/STM32/LLD/GPIOv1/pal_lld.c:25:
../../chibios161/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 ../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:30:0,
from ../../chibios161/os/hal/include/usb.h:370,
from ../../chibios161/os/hal/include/hal.h:63,
from ../../chibios161/os/hal/ports/STM32/LLD/GPIOv1/pal_lld.c:25:
../../chibios161/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
^
../../chibios161/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 ../../chibios161/os/hal/include/usb.h:370:0,
from ../../chibios161/os/hal/include/hal.h:63,
from ../../chibios161/os/hal/ports/STM32/LLD/GPIOv1/pal_lld.c:25:
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:117:2: error: #error "USB driver activated but no USB peripheral assigned"
#error "USB driver activated but no USB peripheral assigned"
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:131:5: warning: "STM32_USBCLK" is not defined [-Wundef]
#if STM32_USBCLK != 48000000
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:132:2: error: #error "the USB driver requires a 48MHz clock"
#error "the USB driver requires a 48MHz clock"
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:421:5: warning: "STM32_USB_HAS_BCDR" is not defined [-Wundef]
#if STM32_USB_HAS_BCDR || defined(__DOXYGEN__)
^
make: *** [build/obj/pal_lld.o] Error 1
In file included from ../../chibios161/os/hal/ports/STM32/STM32F1xx/hal_lld.h:190:0,
from ../../chibios161/os/hal/include/hal.h:32,
from ../../chibios161/os/hal/boards/OLIMEX_STM32_P107/board.c:17:
../../chibios161/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 ../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:30:0,
from ../../chibios161/os/hal/include/usb.h:370,
from ../../chibios161/os/hal/include/hal.h:63,
from ../../chibios161/os/hal/boards/OLIMEX_STM32_P107/board.c:17:
../../chibios161/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
^
../../chibios161/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 ../../chibios161/os/hal/include/usb.h:370:0,
from ../../chibios161/os/hal/include/hal.h:63,
from ../../chibios161/os/hal/boards/OLIMEX_STM32_P107/board.c:17:
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:117:2: error: #error "USB driver activated but no USB peripheral assigned"
#error "USB driver activated but no USB peripheral assigned"
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:131:5: warning: "STM32_USBCLK" is not defined [-Wundef]
#if STM32_USBCLK != 48000000
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:132:2: error: #error "the USB driver requires a 48MHz clock"
#error "the USB driver requires a 48MHz clock"
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:421:5: warning: "STM32_USB_HAS_BCDR" is not defined [-Wundef]
#if STM32_USB_HAS_BCDR || defined(__DOXYGEN__)
^
make: *** [build/obj/board.o] Error 1
In file included from ../../chibios161/os/hal/ports/STM32/STM32F1xx/hal_lld.h:190:0,
from ../../chibios161/os/hal/include/hal.h:32,
from ../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.c:27:
../../chibios161/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 ../../chibios161/os/hal/ports/STM32/STM32F1xx/hal_lld.h:190:0,
from ../../chibios161/os/hal/include/hal.h:32,
from ../../chibios161/os/hal/lib/streams/chprintf.c:30:
../../chibios161/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 ../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:30:0,
from ../../chibios161/os/hal/include/usb.h:370,
from ../../chibios161/os/hal/include/hal.h:63,
from ../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.c:27:
../../chibios161/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
^
../../chibios161/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 ../../chibios161/os/hal/include/usb.h:370:0,
from ../../chibios161/os/hal/include/hal.h:63,
from ../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.c:27:
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:117:2: error: #error "USB driver activated but no USB peripheral assigned"
#error "USB driver activated but no USB peripheral assigned"
^
In file included from ../../chibios161/os/hal/ports/STM32/STM32F1xx/hal_lld.h:190:0,
from ../../chibios161/os/hal/include/hal.h:32,
from ../../chibios161/os/hal/lib/streams/memstreams.c:27:
../../chibios161/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"
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:131:5: warning: "STM32_USBCLK" is not defined [-Wundef]
#if STM32_USBCLK != 48000000
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:132:2: error: #error "the USB driver requires a 48MHz clock"
#error "the USB driver requires a 48MHz clock"
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:421:5: warning: "STM32_USB_HAS_BCDR" is not defined [-Wundef]
#if STM32_USB_HAS_BCDR || defined(__DOXYGEN__)
^
In file included from ../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:30:0,
from ../../chibios161/os/hal/include/usb.h:370,
from ../../chibios161/os/hal/include/hal.h:63,
from ../../chibios161/os/hal/lib/streams/chprintf.c:30:
../../chibios161/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
^
../../chibios161/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 ../../chibios161/os/rt/include/ch.h:75:0,
from ../../chibios161/os/hal/osal/rt/osal.h:32,
from ../../chibios161/os/hal/include/hal.h:28,
from ../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.c:27:
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.c: In function 'usb_pm_alloc':
In file included from ../../chibios161/os/hal/ports/STM32/STM32F1xx/hal_lld.h:190:0,
from ../../chibios161/os/hal/include/hal.h:32,
from ../../chibios161/os/various/shell.c:28:
../../chibios161/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 ../../chibios161/os/hal/include/usb.h:370:0,
from ../../chibios161/os/hal/include/hal.h:63,
from ../../chibios161/os/hal/lib/streams/chprintf.c:30:
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:117:2: error: #error "USB driver activated but no USB peripheral assigned"
#error "USB driver activated but no USB peripheral assigned"
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:131:5: warning: "STM32_USBCLK" is not defined [-Wundef]
#if STM32_USBCLK != 48000000
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:132:2: error: #error "the USB driver requires a 48MHz clock"
#error "the USB driver requires a 48MHz clock"
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.c:116:33: error: 'STM32_USB_PMA_SIZE' undeclared (first use in this function)
osalDbgAssert(usbp->pmnext <= STM32_USB_PMA_SIZE, "PMA overflow");
^
../../chibios161/os/rt/include/chdebug.h:196:11: note: in definition of macro 'chDbgAssert'
if (!(c)) { \
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.c:116:3: note: in expansion of macro 'osalDbgAssert'
osalDbgAssert(usbp->pmnext <= STM32_USB_PMA_SIZE, "PMA overflow");
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.c:116:33: note: each undeclared identifier is reported only once for each function it appears in
osalDbgAssert(usbp->pmnext <= STM32_USB_PMA_SIZE, "PMA overflow");
^
../../chibios161/os/rt/include/chdebug.h:196:11: note: in definition of macro 'chDbgAssert'
if (!(c)) { \
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.c:116:3: note: in expansion of macro 'osalDbgAssert'
osalDbgAssert(usbp->pmnext <= STM32_USB_PMA_SIZE, "PMA overflow");
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:421:5: warning: "STM32_USB_HAS_BCDR" is not defined [-Wundef]
#if STM32_USB_HAS_BCDR || defined(__DOXYGEN__)
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.c: In function 'usb_lld_init':
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.c:463:18: error: 'USBD1' undeclared (first use in this function)
usbObjectInit(&USBD1);
^
In file included from ../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:30:0,
from ../../chibios161/os/hal/include/usb.h:370,
from ../../chibios161/os/hal/include/hal.h:63,
from ../../chibios161/os/hal/lib/streams/memstreams.c:27:
../../chibios161/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
^
../../chibios161/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
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.c: At top level:
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.c:289:13: warning: 'usb_serve_endpoints' defined but not used [-Wunused-function]
static void usb_serve_endpoints(USBDriver *usbp, uint32_t ep) {
^
In file included from ../../chibios161/os/hal/ports/STM32/STM32F1xx/hal_lld.h:190:0,
from ../../chibios161/os/hal/include/hal.h:32,
from main.c:21:
../../chibios161/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 ../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:30:0,
from ../../chibios161/os/hal/include/usb.h:370,
from ../../chibios161/os/hal/include/hal.h:63,
from ../../chibios161/os/various/shell.c:28:
../../chibios161/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
^
In file included from ../../chibios161/os/hal/include/usb.h:370:0,
from ../../chibios161/os/hal/include/hal.h:63,
from ../../chibios161/os/hal/lib/streams/memstreams.c:27:
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:117:2: error: #error "USB driver activated but no USB peripheral assigned"
#error "USB driver activated but no USB peripheral assigned"
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:131:5: warning: "STM32_USBCLK" is not defined [-Wundef]
#if STM32_USBCLK != 48000000
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:132:2: error: #error "the USB driver requires a 48MHz clock"
#error "the USB driver requires a 48MHz clock"
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:421:5: warning: "STM32_USB_HAS_BCDR" is not defined [-Wundef]
#if STM32_USB_HAS_BCDR || defined(__DOXYGEN__)
^
../../chibios161/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
^
make: *** [build/obj/chprintf.o] Error 1
make: *** [build/obj/usb_lld.o] Error 1
In file included from ../../chibios161/os/hal/include/usb.h:370:0,
from ../../chibios161/os/hal/include/hal.h:63,
from ../../chibios161/os/various/shell.c:28:
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:117:2: error: #error "USB driver activated but no USB peripheral assigned"
#error "USB driver activated but no USB peripheral assigned"
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:131:5: warning: "STM32_USBCLK" is not defined [-Wundef]
#if STM32_USBCLK != 48000000
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:132:2: error: #error "the USB driver requires a 48MHz clock"
#error "the USB driver requires a 48MHz clock"
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:421:5: warning: "STM32_USB_HAS_BCDR" is not defined [-Wundef]
#if STM32_USB_HAS_BCDR || defined(__DOXYGEN__)
^
make: *** [build/obj/memstreams.o] Error 1
In file included from ../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:30:0,
from ../../chibios161/os/hal/include/usb.h:370,
from ../../chibios161/os/hal/include/hal.h:63,
from main.c:21:
../../chibios161/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
^
../../chibios161/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 ../../chibios161/os/hal/include/usb.h:370:0,
from ../../chibios161/os/hal/include/hal.h:63,
from main.c:21:
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:117:2: error: #error "USB driver activated but no USB peripheral assigned"
#error "USB driver activated but no USB peripheral assigned"
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:131:5: warning: "STM32_USBCLK" is not defined [-Wundef]
#if STM32_USBCLK != 48000000
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:132:2: error: #error "the USB driver requires a 48MHz clock"
#error "the USB driver requires a 48MHz clock"
^
../../chibios161/os/hal/ports/STM32/LLD/USBv1/usb_lld.h:421:5: warning: "STM32_USB_HAS_BCDR" is not defined [-Wundef]
#if STM32_USB_HAS_BCDR || defined(__DOXYGEN__)
^
make: *** [build/obj/shell.o] Error 1
main.c: In function 'usb_event':
main.c:288:5: warning: implicit declaration of function 'chSysLockFromIsr' [-Wimplicit-function-declaration]
chSysLockFromIsr();
^
main.c:299:5: warning: implicit declaration of function 'chSysUnlockFromIsr' [-Wimplicit-function-declaration]
chSysUnlockFromIsr();
^
main.c:282:3: warning: enumeration value 'USB_EVENT_UNCONFIGURED' not handled in switch [-Wswitch]
switch (event) {
^
main.c: At top level:
main.c:325:4: error: 'USBD1' undeclared here (not in a function)
&USBD1,
^
main.c: In function 'cmd_threads':
main.c:353:34: error: 'THD_STATE_NAMES' undeclared (first use in this function)
static const char *states[] = {THD_STATE_NAMES};
^
main.c:353:34: note: each undeclared identifier is reported only once for each function it appears in
main.c:354:3: error: unknown type name 'Thread'
Thread *tp;
^
main.c:362:6: warning: assignment from incompatible pointer type
tp = chRegFirstThread();
^
main.c:365:39: error: request for member 'p_ctx' in something not a structure or union
(uint32_t)tp, (uint32_t)tp->p_ctx.r13,
^
main.c:365:46: error: request for member 'r13' in something not a structure or union
(uint32_t)tp, (uint32_t)tp->p_ctx.r13,
^
main.c:366:25: error: request for member 'p_prio' in something not a structure or union
(uint32_t)tp->p_prio, (uint32_t)(tp->p_refs - 1),
^
main.c:366:48: error: request for member 'p_refs' in something not a structure or union
(uint32_t)tp->p_prio, (uint32_t)(tp->p_refs - 1),
^
main.c:367:22: error: request for member 'p_state' in something not a structure or union
states[tp->p_state], (uint32_t)tp->p_time);
^
main.c:367:19: error: array subscript is not an integer
states[tp->p_state], (uint32_t)tp->p_time);
^
main.c:367:46: error: request for member 'p_time' in something not a structure or union
states[tp->p_state], (uint32_t)tp->p_time);
^
main.c:368:26: warning: passing argument 1 of 'chRegNextThread' from incompatible pointer type
tp = chRegNextThread(tp);
^
In file included from ../../chibios161/os/rt/include/ch.h:84:0,
from main.c:20:
../../chibios161/os/rt/include/chregistry.h:112:13: note: expected 'struct thread_t *' but argument is of type 'int *'
thread_t *chRegNextThread(thread_t *tp);
^
main.c:368:8: warning: assignment from incompatible pointer type
tp = chRegNextThread(tp);
^
main.c:353:22: warning: variable 'states' set but not used [-Wunused-but-set-variable]
static const char *states[] = {THD_STATE_NAMES};
^
main.c: In function 'cmd_test':
main.c:373:3: error: unknown type name 'Thread'
Thread *tp;
^
main.c:380:3: warning: implicit declaration of function 'THD_WA_SIZE' [-Wimplicit-function-declaration]
tp = chThdCreateFromHeap(NULL, TEST_WA_SIZE, chThdGetPriority(),
^
main.c:380:3: warning: implicit declaration of function 'chThdGetPriority' [-Wimplicit-function-declaration]
main.c:381:28: error: 'TestThread' undeclared (first use in this function)
TestThread, chp);
^
main.c:381:28: warning: passing argument 4 of 'chThdCreateFromHeap' from incompatible pointer type
In file included from ../../chibios161/os/rt/include/ch.h:95:0,
from main.c:20:
../../chibios161/os/rt/include/chdynamic.h:77:13: note: expected 'tfunc_t' but argument is of type 'const char **'
thread_t *chThdCreateFromHeap(memory_heap_t *heapp, size_t size,
^
main.c:380:6: warning: assignment from incompatible pointer type
tp = chThdCreateFromHeap(NULL, TEST_WA_SIZE, chThdGetPriority(),
^
main.c:386:13: warning: passing argument 1 of 'chThdWait' from incompatible pointer type
chThdWait(tp);
^
In file included from ../../chibios161/os/rt/include/ch.h:81:0,
from main.c:20:
../../chibios161/os/rt/include/chthreads.h:157:9: note: expected 'struct thread_t *' but argument is of type 'int *'
msg_t chThdWait(thread_t *tp);
^
main.c: At top level:
main.c:440:32: error: expected ')' before numeric constant
static WORKING_AREA(waThread1, 128);
^
main.c: In function 'Thread1':
main.c:452:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^
main.c: In function 'main':
main.c:458:3: error: unknown type name 'Thread'
Thread *shelltp = NULL;
^
main.c:481:3: warning: implicit declaration of function 'usb_lld_disconnect_bus' [-Wimplicit-function-declaration]
usbDisconnectBus(serusbcfg.usbp);
^
main.c:484:3: warning: implicit declaration of function 'usb_lld_connect_bus' [-Wimplicit-function-declaration]
usbConnectBus(serusbcfg.usbp);
^
main.c:494:21: error: 'waThread1' undeclared (first use in this function)
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
^
main.c:494:32: warning: passing argument 2 of 'chThdCreateStatic' makes integer from pointer without a cast
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
^
In file included from ../../chibios161/os/rt/include/ch.h:81:0,
from main.c:20:
../../chibios161/os/rt/include/chthreads.h:137:13: note: expected 'size_t' but argument is of type 'const char **'
thread_t *chThdCreateStatic(void *wsp, size_t size,
^
main.c:494:63: warning: passing argument 4 of 'chThdCreateStatic' from incompatible pointer type
chThdCreateStatic(waThread1, sizeof(waThread1), NORMALPRIO, Thread1, NULL);
^
In file included from ../../chibios161/os/rt/include/ch.h:81:0,
from main.c:20:
../../chibios161/os/rt/include/chthreads.h:137:13: note: expected 'tfunc_t' but argument is of type 'msg_t (*)(void *)'
thread_t *chThdCreateStatic(void *wsp, size_t size,
^
main.c:502:15: warning: assignment from incompatible pointer type
shelltp = shellCreate(&shell_cfg1, SHELL_WA_SIZE, NORMALPRIO);
^
main.c:503:5: warning: implicit declaration of function 'chThdTerminated' [-Wimplicit-function-declaration]
else if (chThdTerminated(shelltp)) {
^
main.c:504:20: warning: passing argument 1 of 'chThdRelease' from incompatible pointer type
chThdRelease(shelltp); /* Recovers memory of the previous shell. */
^
In file included from ../../chibios161/os/rt/include/ch.h:95:0,
from main.c:20:
../../chibios161/os/rt/include/chdynamic.h:75:8: note: expected 'struct thread_t *' but argument is of type 'int *'
void chThdRelease(thread_t *tp);
^
make: *** [build/obj/main.o] Error 1
14:52:17 Build Finished (took 6s.941ms)
What I'm doing wrong ?


