From 867c7c95aa67ea1f19286c3593500214101bacd9 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 5 Sep 2013 09:01:21 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6262 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/include/serial_usb.h | 2 +- os/hal/include/usb.h | 10 +- os/hal/ports/STM32/SPIv2/spi_lld.c | 6 +- os/hal/ports/STM32/USARTv2/uart_lld.c | 6 +- os/hal/ports/STM32/can_lld.c | 4 +- os/hal/ports/STM32/can_lld.h | 6 +- os/hal/ports/STM32F0xx/adc_lld.c | 2 +- os/hal/ports/STM32F0xx/adc_lld.h | 2 +- os/hal/ports/STM32F0xx/stm32_dma.c | 8 +- os/hal/ports/STM32F30x/adc_lld.c | 4 +- os/hal/ports/STM32F30x/adc_lld.h | 2 +- os/hal/ports/STM32F30x/stm32_dma.c | 8 +- os/hal/ports/STM32F4xx/adc_lld.h | 2 +- os/hal/ports/STM32F4xx/stm32_dma.c | 8 +- os/hal/src/serial_usb.c | 2 +- os/hal/src/usb.c | 10 +- os/rt/include/chvt.h | 10 +- os/rt/ports/ARMCMx/chcore_v7m.c | 2 +- os/rt/src/chsys.c | 8 +- os/rt/src/chthreads.c | 2 +- os/various/chprintf.c | 2 +- os/various/shell.c | 6 +- testhal/STM32F0xx/ADC/.cproject | 1 + testhal/STM32F0xx/ADC/Makefile | 8 +- testhal/STM32F0xx/ADC/chconf.h | 2 +- testhal/STM32F0xx/ADC/main.c | 2 +- testhal/STM32F0xx/EXT/.cproject | 1 + testhal/STM32F0xx/EXT/Makefile | 8 +- testhal/STM32F0xx/EXT/chconf.h | 2 +- testhal/STM32F0xx/IRQ_STORM/.cproject | 1 + testhal/STM32F0xx/IRQ_STORM/Makefile | 8 +- testhal/STM32F0xx/IRQ_STORM/main.c | 18 +- testhal/STM32F0xx/PWM-ICU/.cproject | 1 + testhal/STM32F0xx/PWM-ICU/Makefile | 8 +- testhal/STM32F0xx/SPI/.cproject | 1 + testhal/STM32F0xx/SPI/Makefile | 8 +- testhal/STM32F0xx/SPI/main.c | 6 +- testhal/STM32F0xx/UART/.cproject | 1 + testhal/STM32F0xx/UART/Makefile | 8 +- testhal/STM32F30x/ADC/.cproject | 4 +- testhal/STM32F30x/ADC/Makefile | 8 +- testhal/STM32F30x/ADC/main.c | 2 +- testhal/STM32F30x/ADC_DUAL/.cproject | 4 +- testhal/STM32F30x/ADC_DUAL/Makefile | 8 +- testhal/STM32F30x/ADC_DUAL/main.c | 2 +- testhal/STM32F30x/CAN/.cproject | 1 + testhal/STM32F30x/CAN/Makefile | 8 +- testhal/STM32F30x/CAN/main.c | 4 +- testhal/STM32F30x/EXT/.cproject | 4 +- testhal/STM32F30x/EXT/Makefile | 8 +- testhal/STM32F30x/IRQ_STORM/.cproject | 1 + testhal/STM32F30x/IRQ_STORM/Makefile | 8 +- testhal/STM32F30x/IRQ_STORM/main.c | 16 +- testhal/STM32F30x/PWM-ICU/.cproject | 1 + testhal/STM32F30x/PWM-ICU/Makefile | 8 +- testhal/STM32F30x/SPI/.cproject | 1 + testhal/STM32F30x/SPI/Makefile | 8 +- testhal/STM32F30x/SPI/main.c | 6 +- testhal/STM32F30x/UART/.cproject | 4 +- testhal/STM32F30x/UART/Makefile | 8 +- testhal/STM32F30x/USB_CDC/.cproject | 1 + testhal/STM32F30x/USB_CDC/Makefile | 8 +- testhal/STM32F30x/USB_CDC/main.c | 6 +- testhal/STM32F4xx/ADC/.cproject | 1 + testhal/STM32F4xx/ADC/Makefile | 8 +- testhal/STM32F4xx/ADC/main.c | 2 +- testhal/STM32F4xx/CAN/.cproject | 1 + testhal/STM32F4xx/CAN/Makefile | 8 +- testhal/STM32F4xx/CAN/main.c | 6 +- testhal/STM32F4xx/DMA_STORM/.project | 2 +- testhal/STM32F4xx/DMA_STORM/Makefile | 13 +- testhal/STM32F4xx/DMA_STORM/chconf.h | 273 ++++++++++++---------- testhal/STM32F4xx/DMA_STORM/halconf.h | 7 - testhal/STM32F4xx/DMA_STORM/main.c | 50 ++-- testhal/STM32F4xx/DMA_STORM/mcuconf.h | 4 +- testhal/STM32F4xx/EXT/.cproject | 1 + testhal/STM32F4xx/EXT/Makefile | 8 +- testhal/STM32F4xx/GPT/.cproject | 1 + testhal/STM32F4xx/GPT/Makefile | 8 +- testhal/STM32F4xx/I2C/.cproject | 1 + testhal/STM32F4xx/I2C/Makefile | 8 +- testhal/STM32F4xx/IRQ_STORM/.cproject | 1 + testhal/STM32F4xx/IRQ_STORM/Makefile | 8 +- testhal/STM32F4xx/IRQ_STORM/main.c | 16 +- testhal/STM32F4xx/IRQ_STORM_FPU/.cproject | 1 + testhal/STM32F4xx/IRQ_STORM_FPU/Makefile | 8 +- testhal/STM32F4xx/IRQ_STORM_FPU/main.c | 18 +- testhal/STM32F4xx/PWM-ICU/.cproject | 1 + testhal/STM32F4xx/PWM-ICU/Makefile | 8 +- testhal/STM32F4xx/RTC/.cproject | 1 + testhal/STM32F4xx/RTC/Makefile | 2 +- testhal/STM32F4xx/SDC/Makefile | 2 +- testhal/STM32F4xx/SPI/.cproject | 1 + testhal/STM32F4xx/SPI/Makefile | 8 +- testhal/STM32F4xx/SPI/main.c | 4 +- testhal/STM32F4xx/UART/Makefile | 8 +- testhal/STM32F4xx/USB_CDC/Makefile | 2 +- 97 files changed, 436 insertions(+), 380 deletions(-) diff --git a/os/hal/include/serial_usb.h b/os/hal/include/serial_usb.h index 5d1a14127..fb4ab25d5 100644 --- a/os/hal/include/serial_usb.h +++ b/os/hal/include/serial_usb.h @@ -218,7 +218,7 @@ extern "C" { void sduStart(SerialUSBDriver *sdup, const SerialUSBConfig *config); void sduStop(SerialUSBDriver *sdup); void sduConfigureHookI(SerialUSBDriver *sdup); - bool_t sduRequestsHook(USBDriver *usbp); + bool sduRequestsHook(USBDriver *usbp); void sduDataTransmitted(USBDriver *usbp, usbep_t ep); void sduDataReceived(USBDriver *usbp, usbep_t ep); void sduInterruptTransmitted(USBDriver *usbp, usbep_t ep); diff --git a/os/hal/include/usb.h b/os/hal/include/usb.h index e474a470f..ef470bf23 100644 --- a/os/hal/include/usb.h +++ b/os/hal/include/usb.h @@ -319,7 +319,7 @@ typedef void (*usbeventcb_t)(USBDriver *usbp, usbevent_t event); * @retval FALSE Request not recognized by the handler. * @retval TRUE Request handled. */ -typedef bool_t (*usbreqhandler_t)(USBDriver *usbp); +typedef bool (*usbreqhandler_t)(USBDriver *usbp); /** * @brief Type of an USB descriptor-retrieving callback. @@ -553,10 +553,10 @@ extern "C" { input_queue_t *iqp, size_t n); void usbPrepareQueuedTransmit(USBDriver *usbp, usbep_t ep, output_queue_t *oqp, size_t n); - bool_t usbStartReceiveI(USBDriver *usbp, usbep_t ep); - bool_t usbStartTransmitI(USBDriver *usbp, usbep_t ep); - bool_t usbStallReceiveI(USBDriver *usbp, usbep_t ep); - bool_t usbStallTransmitI(USBDriver *usbp, usbep_t ep); + bool usbStartReceiveI(USBDriver *usbp, usbep_t ep); + bool usbStartTransmitI(USBDriver *usbp, usbep_t ep); + bool usbStallReceiveI(USBDriver *usbp, usbep_t ep); + bool usbStallTransmitI(USBDriver *usbp, usbep_t ep); void _usb_reset(USBDriver *usbp); void _usb_ep0setup(USBDriver *usbp, usbep_t ep); void _usb_ep0in(USBDriver *usbp, usbep_t ep); diff --git a/os/hal/ports/STM32/SPIv2/spi_lld.c b/os/hal/ports/STM32/SPIv2/spi_lld.c index 3cbcc0fc0..e21f80074 100644 --- a/os/hal/ports/STM32/SPIv2/spi_lld.c +++ b/os/hal/ports/STM32/SPIv2/spi_lld.c @@ -216,7 +216,7 @@ void spi_lld_start(SPIDriver *spip) { if (spip->state == SPI_STOP) { #if STM32_SPI_USE_SPI1 if (&SPID1 == spip) { - bool_t b; + bool b; b = dmaStreamAllocate(spip->dmarx, STM32_SPI_SPI1_IRQ_PRIORITY, (stm32_dmaisr_t)spi_lld_serve_rx_interrupt, @@ -232,7 +232,7 @@ void spi_lld_start(SPIDriver *spip) { #endif #if STM32_SPI_USE_SPI2 if (&SPID2 == spip) { - bool_t b; + bool b; b = dmaStreamAllocate(spip->dmarx, STM32_SPI_SPI2_IRQ_PRIORITY, (stm32_dmaisr_t)spi_lld_serve_rx_interrupt, @@ -248,7 +248,7 @@ void spi_lld_start(SPIDriver *spip) { #endif #if STM32_SPI_USE_SPI3 if (&SPID3 == spip) { - bool_t b; + bool b; b = dmaStreamAllocate(spip->dmarx, STM32_SPI_SPI3_IRQ_PRIORITY, (stm32_dmaisr_t)spi_lld_serve_rx_interrupt, diff --git a/os/hal/ports/STM32/USARTv2/uart_lld.c b/os/hal/ports/STM32/USARTv2/uart_lld.c index 0b85a294c..54a187a39 100644 --- a/os/hal/ports/STM32/USARTv2/uart_lld.c +++ b/os/hal/ports/STM32/USARTv2/uart_lld.c @@ -391,7 +391,7 @@ void uart_lld_start(UARTDriver *uartp) { if (uartp->state == UART_STOP) { #if STM32_UART_USE_USART1 if (&UARTD1 == uartp) { - bool_t b; + bool b; b = dmaStreamAllocate(uartp->dmarx, STM32_UART_USART1_IRQ_PRIORITY, (stm32_dmaisr_t)uart_lld_serve_rx_end_irq, @@ -411,7 +411,7 @@ void uart_lld_start(UARTDriver *uartp) { #if STM32_UART_USE_USART2 if (&UARTD2 == uartp) { - bool_t b; + bool b; b = dmaStreamAllocate(uartp->dmarx, STM32_UART_USART2_IRQ_PRIORITY, (stm32_dmaisr_t)uart_lld_serve_rx_end_irq, @@ -431,7 +431,7 @@ void uart_lld_start(UARTDriver *uartp) { #if STM32_UART_USE_USART3 if (&UARTD3 == uartp) { - bool_t b; + bool b; b = dmaStreamAllocate(uartp->dmarx, STM32_UART_USART3_IRQ_PRIORITY, (stm32_dmaisr_t)uart_lld_serve_rx_end_irq, diff --git a/os/hal/ports/STM32/can_lld.c b/os/hal/ports/STM32/can_lld.c index a53a8fe27..266f87504 100644 --- a/os/hal/ports/STM32/can_lld.c +++ b/os/hal/ports/STM32/can_lld.c @@ -484,7 +484,7 @@ void can_lld_stop(CANDriver *canp) { * * @notapi */ -bool_t can_lld_is_tx_empty(CANDriver *canp, canmbx_t mailbox) { +bool can_lld_is_tx_empty(CANDriver *canp, canmbx_t mailbox) { switch (mailbox) { case CAN_ANY_MAILBOX: @@ -557,7 +557,7 @@ void can_lld_transmit(CANDriver *canp, * * @notapi */ -bool_t can_lld_is_rx_nonempty(CANDriver *canp, canmbx_t mailbox) { +bool can_lld_is_rx_nonempty(CANDriver *canp, canmbx_t mailbox) { switch (mailbox) { case CAN_ANY_MAILBOX: diff --git a/os/hal/ports/STM32/can_lld.h b/os/hal/ports/STM32/can_lld.h index 9f3797029..27da0b3b6 100644 --- a/os/hal/ports/STM32/can_lld.h +++ b/os/hal/ports/STM32/can_lld.h @@ -341,13 +341,11 @@ extern "C" { void can_lld_init(void); void can_lld_start(CANDriver *canp); void can_lld_stop(CANDriver *canp); - bool_t can_lld_is_tx_empty(CANDriver *canp, - canmbx_t mailbox); + bool can_lld_is_tx_empty(CANDriver *canp, canmbx_t mailbox); void can_lld_transmit(CANDriver *canp, canmbx_t mailbox, const CANTxFrame *crfp); - bool_t can_lld_is_rx_nonempty(CANDriver *canp, - canmbx_t mailbox); + bool can_lld_is_rx_nonempty(CANDriver *canp, canmbx_t mailbox); void can_lld_receive(CANDriver *canp, canmbx_t mailbox, CANRxFrame *ctfp); diff --git a/os/hal/ports/STM32F0xx/adc_lld.c b/os/hal/ports/STM32F0xx/adc_lld.c index 1c4ffce7f..b2aae96f1 100644 --- a/os/hal/ports/STM32F0xx/adc_lld.c +++ b/os/hal/ports/STM32F0xx/adc_lld.c @@ -179,7 +179,7 @@ void adc_lld_start(ADCDriver *adcp) { if (adcp->state == ADC_STOP) { #if STM32_ADC_USE_ADC1 if (&ADCD1 == adcp) { - bool_t b; + bool b; b = dmaStreamAllocate(adcp->dmastp, STM32_ADC_ADC1_DMA_IRQ_PRIORITY, (stm32_dmaisr_t)adc_lld_serve_rx_interrupt, diff --git a/os/hal/ports/STM32F0xx/adc_lld.h b/os/hal/ports/STM32F0xx/adc_lld.h index 635dcefaa..bddb6453a 100644 --- a/os/hal/ports/STM32F0xx/adc_lld.h +++ b/os/hal/ports/STM32F0xx/adc_lld.h @@ -194,7 +194,7 @@ typedef struct { /** * @brief Enables the circular buffer mode for the group. */ - bool_t circular; + bool circular; /** * @brief Number of the analog channels belonging to the conversion group. */ diff --git a/os/hal/ports/STM32F0xx/stm32_dma.c b/os/hal/ports/STM32F0xx/stm32_dma.c index 623c9d11b..f803f0506 100644 --- a/os/hal/ports/STM32F0xx/stm32_dma.c +++ b/os/hal/ports/STM32F0xx/stm32_dma.c @@ -223,10 +223,10 @@ void dmaInit(void) { * * @special */ -bool_t dmaStreamAllocate(const stm32_dma_stream_t *dmastp, - uint32_t priority, - stm32_dmaisr_t func, - void *param) { +bool dmaStreamAllocate(const stm32_dma_stream_t *dmastp, + uint32_t priority, + stm32_dmaisr_t func, + void *param) { osalDbgCheck(dmastp != NULL); diff --git a/os/hal/ports/STM32F30x/adc_lld.c b/os/hal/ports/STM32F30x/adc_lld.c index d516cf21b..ff8eb0fec 100644 --- a/os/hal/ports/STM32F30x/adc_lld.c +++ b/os/hal/ports/STM32F30x/adc_lld.c @@ -370,7 +370,7 @@ void adc_lld_start(ADCDriver *adcp) { if (adcp->state == ADC_STOP) { #if STM32_ADC_USE_ADC1 if (&ADCD1 == adcp) { - bool_t b; + bool b; b = dmaStreamAllocate(adcp->dmastp, STM32_ADC_ADC12_DMA_IRQ_PRIORITY, (stm32_dmaisr_t)adc_lld_serve_dma_interrupt, @@ -382,7 +382,7 @@ void adc_lld_start(ADCDriver *adcp) { #if STM32_ADC_USE_ADC3 if (&ADCD3 == adcp) { - bool_t b; + bool b; b = dmaStreamAllocate(adcp->dmastp, STM32_ADC_ADC34_DMA_IRQ_PRIORITY, (stm32_dmaisr_t)adc_lld_serve_dma_interrupt, diff --git a/os/hal/ports/STM32F30x/adc_lld.h b/os/hal/ports/STM32F30x/adc_lld.h index 66c725cdd..1c9ac03e4 100644 --- a/os/hal/ports/STM32F30x/adc_lld.h +++ b/os/hal/ports/STM32F30x/adc_lld.h @@ -389,7 +389,7 @@ typedef struct { /** * @brief Enables the circular buffer mode for the group. */ - bool_t circular; + bool circular; /** * @brief Number of the analog channels belonging to the conversion group. */ diff --git a/os/hal/ports/STM32F30x/stm32_dma.c b/os/hal/ports/STM32F30x/stm32_dma.c index eb73f1b37..9b912e8fb 100644 --- a/os/hal/ports/STM32F30x/stm32_dma.c +++ b/os/hal/ports/STM32F30x/stm32_dma.c @@ -373,10 +373,10 @@ void dmaInit(void) { * * @special */ -bool_t dmaStreamAllocate(const stm32_dma_stream_t *dmastp, - uint32_t priority, - stm32_dmaisr_t func, - void *param) { +bool dmaStreamAllocate(const stm32_dma_stream_t *dmastp, + uint32_t priority, + stm32_dmaisr_t func, + void *param) { osalDbgCheck(dmastp != NULL); diff --git a/os/hal/ports/STM32F4xx/adc_lld.h b/os/hal/ports/STM32F4xx/adc_lld.h index c8f0570eb..6b6530a61 100644 --- a/os/hal/ports/STM32F4xx/adc_lld.h +++ b/os/hal/ports/STM32F4xx/adc_lld.h @@ -345,7 +345,7 @@ typedef struct { /** * @brief Enables the circular buffer mode for the group. */ - bool_t circular; + bool circular; /** * @brief Number of the analog channels belonging to the conversion group. */ diff --git a/os/hal/ports/STM32F4xx/stm32_dma.c b/os/hal/ports/STM32F4xx/stm32_dma.c index a3bb26b0d..af3513954 100644 --- a/os/hal/ports/STM32F4xx/stm32_dma.c +++ b/os/hal/ports/STM32F4xx/stm32_dma.c @@ -454,10 +454,10 @@ void dmaInit(void) { * * @special */ -bool_t dmaStreamAllocate(const stm32_dma_stream_t *dmastp, - uint32_t priority, - stm32_dmaisr_t func, - void *param) { +bool dmaStreamAllocate(const stm32_dma_stream_t *dmastp, + uint32_t priority, + stm32_dmaisr_t func, + void *param) { osalDbgCheck(dmastp != NULL); diff --git a/os/hal/src/serial_usb.c b/os/hal/src/serial_usb.c index b8764a51a..7a9476250 100644 --- a/os/hal/src/serial_usb.c +++ b/os/hal/src/serial_usb.c @@ -289,7 +289,7 @@ void sduConfigureHookI(SerialUSBDriver *sdup) { * @retval TRUE Message handled internally. * @retval FALSE Message not handled. */ -bool_t sduRequestsHook(USBDriver *usbp) { +bool sduRequestsHook(USBDriver *usbp) { if ((usbp->setup[0] & USB_RTYPE_TYPE_MASK) == USB_RTYPE_TYPE_CLASS) { switch (usbp->setup[1]) { diff --git a/os/hal/src/usb.c b/os/hal/src/usb.c index 906981db2..a84702b5b 100644 --- a/os/hal/src/usb.c +++ b/os/hal/src/usb.c @@ -77,7 +77,7 @@ static void set_address(USBDriver *usbp) { * @retval FALSE Request not recognized by the handler or error. * @retval TRUE Request handled. */ -static bool_t default_handler(USBDriver *usbp) { +static bool default_handler(USBDriver *usbp) { const USBDescriptor *dp; /* Decoding the request.*/ @@ -471,7 +471,7 @@ void usbPrepareQueuedTransmit(USBDriver *usbp, usbep_t ep, * * @iclass */ -bool_t usbStartReceiveI(USBDriver *usbp, usbep_t ep) { +bool usbStartReceiveI(USBDriver *usbp, usbep_t ep) { osalDbgCheckClassI(); osalDbgCheck(usbp != NULL); @@ -498,7 +498,7 @@ bool_t usbStartReceiveI(USBDriver *usbp, usbep_t ep) { * * @iclass */ -bool_t usbStartTransmitI(USBDriver *usbp, usbep_t ep) { +bool usbStartTransmitI(USBDriver *usbp, usbep_t ep) { osalDbgCheckClassI(); osalDbgCheck(usbp != NULL); @@ -523,7 +523,7 @@ bool_t usbStartTransmitI(USBDriver *usbp, usbep_t ep) { * * @iclass */ -bool_t usbStallReceiveI(USBDriver *usbp, usbep_t ep) { +bool usbStallReceiveI(USBDriver *usbp, usbep_t ep) { osalDbgCheckClassI(); osalDbgCheck(usbp != NULL); @@ -547,7 +547,7 @@ bool_t usbStallReceiveI(USBDriver *usbp, usbep_t ep) { * * @iclass */ -bool_t usbStallTransmitI(USBDriver *usbp, usbep_t ep) { +bool usbStallTransmitI(USBDriver *usbp, usbep_t ep) { osalDbgCheckClassI(); osalDbgCheck(usbp != NULL); diff --git a/os/rt/include/chvt.h b/os/rt/include/chvt.h index d4948f1d6..447c4deee 100644 --- a/os/rt/include/chvt.h +++ b/os/rt/include/chvt.h @@ -257,7 +257,7 @@ static inline bool chVTIsSystemTimeWithin(systime_t start, systime_t end) { /** * @brief Returns @p true if the specified timer is armed. * @pre The timer must have been initialized using @p chVTObjectInit() - * or @p chVTSetI() (or @p chVTSetI() variants). + * or @p chVTDoSetI(). * * @param[in] vtp the @p virtual_timer_t structure pointer * @return true if the timer is armed. @@ -274,6 +274,8 @@ static inline bool chVTIsArmedI(virtual_timer_t *vtp) { /** * @brief Disables a Virtual Timer. * @note The timer is first checked and disabled only if armed. + * @pre The timer must have been initialized using @p chVTObjectInit() + * or @p chVTDoSetI(). * * @param[in] vtp the @p virtual_timer_t structure pointer * @@ -288,6 +290,8 @@ static inline void chVTResetI(virtual_timer_t *vtp) { /** * @brief Disables a Virtual Timer. * @note The timer is first checked and disabled only if armed. + * @pre The timer must have been initialized using @p chVTObjectInit() + * or @p chVTDoSetI(). * * @param[in] vtp the @p virtual_timer_t structure pointer * @@ -304,6 +308,8 @@ static inline void chVTReset(virtual_timer_t *vtp) { * @brief Enables a virtual timer. * @details If the virtual timer was already enabled then it is re-enabled * using the new parameters. + * @pre The timer must have been initialized using @p chVTObjectInit() + * or @p chVTDoSetI(). * * @param[in] vtp the @p virtual_timer_t structure pointer * @param[in] delay the number of ticks before the operation timeouts. @@ -326,6 +332,8 @@ static inline void chVTSetI(virtual_timer_t *vtp, systime_t delay, * @brief Enables a virtual timer. * @details If the virtual timer was already enabled then it is re-enabled * using the new parameters. + * @pre The timer must have been initialized using @p chVTObjectInit() + * or @p chVTDoSetI(). * * @param[in] vtp the @p virtual_timer_t structure pointer * @param[in] delay the number of ticks before the operation timeouts. diff --git a/os/rt/ports/ARMCMx/chcore_v7m.c b/os/rt/ports/ARMCMx/chcore_v7m.c index 49826c48c..ff9219ac6 100644 --- a/os/rt/ports/ARMCMx/chcore_v7m.c +++ b/os/rt/ports/ARMCMx/chcore_v7m.c @@ -71,7 +71,7 @@ void SVC_Handler(void) { #if CORTEX_USE_FPU /* Restoring the special register FPCCR.*/ FPU->FPCCR = (uint32_t)ctxp->fpccr; - FPU->FPCAR = FPU->FPCAR + sizeof (struct extctx); + FPU->FPCAR = FPU->FPCAR + sizeof (struct port_extctx); #endif /* Writing back the modified PSP value.*/ diff --git a/os/rt/src/chsys.c b/os/rt/src/chsys.c index c0be6422b..94f1afd51 100644 --- a/os/rt/src/chsys.c +++ b/os/rt/src/chsys.c @@ -261,7 +261,7 @@ void chSysRestoreStatusX(syssts_t sts) { } } -#if CH_PORT_SUPPORTS_RT || defined(__DOXYGEN__) +#if PORT_SUPPORTS_RT || defined(__DOXYGEN__) /** * @brief Realtime window test. * @details This function verifies if the current realtime counter value @@ -270,7 +270,7 @@ void chSysRestoreStatusX(syssts_t sts) { * @note When start==end then the function returns always true because the * whole time range is specified. * @note This function is only available if the port layer supports the - * option @p CH_PORT_SUPPORTS_RT. + * option @p PORT_SUPPORTS_RT. * * @param[in] cnt the counter value to be tested * @param[in] start the start of the time window (inclusive) @@ -291,7 +291,7 @@ bool chSysIsCounterWithinX(rtcnt_t cnt, rtcnt_t start, rtcnt_t end) { * @note The real delay is always few cycles in excess of the specified * value. * @note This function is only available if the port layer supports the - * option @p CH_PORT_SUPPORTS_RT. + * option @p PORT_SUPPORTS_RT. * * @param[in] cycles number of cycles * @@ -303,6 +303,6 @@ void chSysPolledDelayX(rtcnt_t cycles) { while (chSysIsCounterWithinX(chSysGetRealtimeCounterX(), start, end)) ; } -#endif /* CH_PORT_SUPPORTS_RT */ +#endif /* PORT_SUPPORTS_RT */ /** @} */ diff --git a/os/rt/src/chthreads.c b/os/rt/src/chthreads.c index 35f53a072..042d90c5e 100644 --- a/os/rt/src/chthreads.c +++ b/os/rt/src/chthreads.c @@ -181,7 +181,7 @@ thread_t *chThdCreateI(void *wsp, size_t size, thread_t *tp = wsp; chDbgCheckClassI(); - chDbgCheck((wsp != NULL) && (size >= THD_WA_SIZE(0)) && + chDbgCheck((wsp != NULL) && (size >= THD_WORKING_AREA_SIZE(0)) && (prio <= HIGHPRIO) && (pf != NULL)); PORT_SETUP_CONTEXT(tp, wsp, size, pf, arg); diff --git a/os/various/chprintf.c b/os/various/chprintf.c index d712b98ab..787b6c7ab 100644 --- a/os/various/chprintf.c +++ b/os/various/chprintf.c @@ -109,7 +109,7 @@ void chprintf(BaseSequentialStream *chp, const char *fmt, ...) { va_list ap; char *p, *s, c, filler; int i, precision, width; - bool_t is_long, left_align; + bool is_long, left_align; long l; #if CHPRINTF_USE_FLOAT float f; diff --git a/os/various/shell.c b/os/various/shell.c index 907d6c187..62ffc5ce1 100644 --- a/os/various/shell.c +++ b/os/various/shell.c @@ -76,7 +76,7 @@ static void cmd_info(BaseSequentialStream *chp, int argc, char *argv[]) { #ifdef PORT_COMPILER_NAME chprintf(chp, "Compiler: %s\r\n", PORT_COMPILER_NAME); #endif - chprintf(chp, "Architecture: %s\r\n", CH_ARCHITECTURE_NAME); + chprintf(chp, "Architecture: %s\r\n", PORT_ARCHITECTURE_NAME); #ifdef PORT_CORE_VARIANT_NAME chprintf(chp, "Core Variant: %s\r\n", PORT_CORE_VARIANT_NAME); #endif @@ -115,7 +115,7 @@ static ShellCommand local_commands[] = { {NULL, NULL} }; -static bool_t cmdexec(const ShellCommand *scp, BaseSequentialStream *chp, +static bool cmdexec(const ShellCommand *scp, BaseSequentialStream *chp, char *name, int argc, char *argv[]) { while (scp->sc_name != NULL) { @@ -248,7 +248,7 @@ thread_t *shellCreateStatic(const ShellConfig *scp, void *wsp, * @retval TRUE the channel was reset or CTRL-D pressed. * @retval FALSE operation successful. */ -bool_t shellGetLine(BaseSequentialStream *chp, char *line, unsigned size) { +bool shellGetLine(BaseSequentialStream *chp, char *line, unsigned size) { char *p = line; while (TRUE) { diff --git a/testhal/STM32F0xx/ADC/.cproject b/testhal/STM32F0xx/ADC/.cproject index a3fb831a8..6398488ab 100644 --- a/testhal/STM32F0xx/ADC/.cproject +++ b/testhal/STM32F0xx/ADC/.cproject @@ -48,4 +48,5 @@ + diff --git a/testhal/STM32F0xx/ADC/Makefile b/testhal/STM32F0xx/ADC/Makefile index 75945bbad..58a78882f 100644 --- a/testhal/STM32F0xx/ADC/Makefile +++ b/testhal/STM32F0xx/ADC/Makefile @@ -60,11 +60,11 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/osal/chibios/osal.mk include $(CHIBIOS)/os/hal/boards/ST_STM32F0_DISCOVERY/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F0xx/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F0xx/platform.mk include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/devices/STM32F0xx/port.mk +include $(CHIBIOS)/os/rt/osal/osal.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk #include $(CHIBIOS)/test/test.mk # Define linker script file here @@ -206,4 +206,4 @@ ifeq ($(USE_FWLIB),yes) USE_OPT += -DUSE_STDPERIPH_DRIVER endif -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/rules.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/rules.mk diff --git a/testhal/STM32F0xx/ADC/chconf.h b/testhal/STM32F0xx/ADC/chconf.h index 7275caff4..045129dac 100644 --- a/testhal/STM32F0xx/ADC/chconf.h +++ b/testhal/STM32F0xx/ADC/chconf.h @@ -441,7 +441,7 @@ * tickless mode. */ #if !defined(CH_DBG_THREADS_PROFILING) || defined(__DOXYGEN__) -#define CH_DBG_THREADS_PROFILING TRUE +#define CH_DBG_THREADS_PROFILING FALSE #endif /** @} */ diff --git a/testhal/STM32F0xx/ADC/main.c b/testhal/STM32F0xx/ADC/main.c index 90b05df1a..86eb71780 100644 --- a/testhal/STM32F0xx/ADC/main.c +++ b/testhal/STM32F0xx/ADC/main.c @@ -83,7 +83,7 @@ static const ADCConversionGroup adcgrpcfg2 = { /* * Red LEDs blinker thread, times are in milliseconds. */ -static WORKING_AREA(waThread1, 128); +static THD_WORKING_AREA(waThread1, 128); static msg_t Thread1(void *arg) { (void)arg; diff --git a/testhal/STM32F0xx/EXT/.cproject b/testhal/STM32F0xx/EXT/.cproject index 818c355d4..ad1273b16 100644 --- a/testhal/STM32F0xx/EXT/.cproject +++ b/testhal/STM32F0xx/EXT/.cproject @@ -48,4 +48,5 @@ + diff --git a/testhal/STM32F0xx/EXT/Makefile b/testhal/STM32F0xx/EXT/Makefile index 75945bbad..58a78882f 100644 --- a/testhal/STM32F0xx/EXT/Makefile +++ b/testhal/STM32F0xx/EXT/Makefile @@ -60,11 +60,11 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/osal/chibios/osal.mk include $(CHIBIOS)/os/hal/boards/ST_STM32F0_DISCOVERY/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F0xx/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F0xx/platform.mk include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/devices/STM32F0xx/port.mk +include $(CHIBIOS)/os/rt/osal/osal.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk #include $(CHIBIOS)/test/test.mk # Define linker script file here @@ -206,4 +206,4 @@ ifeq ($(USE_FWLIB),yes) USE_OPT += -DUSE_STDPERIPH_DRIVER endif -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/rules.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/rules.mk diff --git a/testhal/STM32F0xx/EXT/chconf.h b/testhal/STM32F0xx/EXT/chconf.h index 7275caff4..045129dac 100644 --- a/testhal/STM32F0xx/EXT/chconf.h +++ b/testhal/STM32F0xx/EXT/chconf.h @@ -441,7 +441,7 @@ * tickless mode. */ #if !defined(CH_DBG_THREADS_PROFILING) || defined(__DOXYGEN__) -#define CH_DBG_THREADS_PROFILING TRUE +#define CH_DBG_THREADS_PROFILING FALSE #endif /** @} */ diff --git a/testhal/STM32F0xx/IRQ_STORM/.cproject b/testhal/STM32F0xx/IRQ_STORM/.cproject index aea7bcbae..8c3040aad 100644 --- a/testhal/STM32F0xx/IRQ_STORM/.cproject +++ b/testhal/STM32F0xx/IRQ_STORM/.cproject @@ -48,4 +48,5 @@ + diff --git a/testhal/STM32F0xx/IRQ_STORM/Makefile b/testhal/STM32F0xx/IRQ_STORM/Makefile index 75945bbad..58a78882f 100644 --- a/testhal/STM32F0xx/IRQ_STORM/Makefile +++ b/testhal/STM32F0xx/IRQ_STORM/Makefile @@ -60,11 +60,11 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/osal/chibios/osal.mk include $(CHIBIOS)/os/hal/boards/ST_STM32F0_DISCOVERY/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F0xx/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F0xx/platform.mk include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/devices/STM32F0xx/port.mk +include $(CHIBIOS)/os/rt/osal/osal.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk #include $(CHIBIOS)/test/test.mk # Define linker script file here @@ -206,4 +206,4 @@ ifeq ($(USE_FWLIB),yes) USE_OPT += -DUSE_STDPERIPH_DRIVER endif -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/rules.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/rules.mk diff --git a/testhal/STM32F0xx/IRQ_STORM/main.c b/testhal/STM32F0xx/IRQ_STORM/main.c index a6fd57121..5c520ca6b 100644 --- a/testhal/STM32F0xx/IRQ_STORM/main.c +++ b/testhal/STM32F0xx/IRQ_STORM/main.c @@ -46,7 +46,7 @@ #define MSG_SEND_LEFT 0 #define MSG_SEND_RIGHT 1 -static bool_t saturated; +static bool saturated; /* * Mailboxes and buffers. @@ -57,7 +57,7 @@ static msg_t b[NUM_THREADS][MAILBOX_SIZE]; /* * Test worker threads. */ -static WORKING_AREA(waWorkerThread[NUM_THREADS], 128); +static THD_WORKING_AREA(waWorkerThread[NUM_THREADS], 128); static msg_t WorkerThread(void *arg) { static volatile unsigned x = 0; static unsigned cnt = 0; @@ -239,19 +239,19 @@ int main(void) { println(CH_KERNEL_VERSION); print("*** Compiled: "); println(__DATE__ " - " __TIME__); -#ifdef CH_COMPILER_NAME +#ifdef PORT_COMPILER_NAME print("*** Compiler: "); - println(CH_COMPILER_NAME); + println(PORT_COMPILER_NAME); #endif print("*** Architecture: "); - println(CH_ARCHITECTURE_NAME); -#ifdef CH_CORE_VARIANT_NAME + println(PORT_ARCHITECTURE_NAME); +#ifdef PORT_CORE_VARIANT_NAME print("*** Core Variant: "); - println(CH_CORE_VARIANT_NAME); + println(PORT_CORE_VARIANT_NAME); #endif -#ifdef CH_PORT_INFO +#ifdef PORT_INFO print("*** Port Info: "); - println(CH_PORT_INFO); + println(PORT_INFO); #endif #ifdef PLATFORM_NAME print("*** Platform: "); diff --git a/testhal/STM32F0xx/PWM-ICU/.cproject b/testhal/STM32F0xx/PWM-ICU/.cproject index b8b1e0f2b..e2fc31de7 100644 --- a/testhal/STM32F0xx/PWM-ICU/.cproject +++ b/testhal/STM32F0xx/PWM-ICU/.cproject @@ -48,4 +48,5 @@ + diff --git a/testhal/STM32F0xx/PWM-ICU/Makefile b/testhal/STM32F0xx/PWM-ICU/Makefile index 75945bbad..58a78882f 100644 --- a/testhal/STM32F0xx/PWM-ICU/Makefile +++ b/testhal/STM32F0xx/PWM-ICU/Makefile @@ -60,11 +60,11 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/osal/chibios/osal.mk include $(CHIBIOS)/os/hal/boards/ST_STM32F0_DISCOVERY/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F0xx/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F0xx/platform.mk include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/devices/STM32F0xx/port.mk +include $(CHIBIOS)/os/rt/osal/osal.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk #include $(CHIBIOS)/test/test.mk # Define linker script file here @@ -206,4 +206,4 @@ ifeq ($(USE_FWLIB),yes) USE_OPT += -DUSE_STDPERIPH_DRIVER endif -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/rules.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/rules.mk diff --git a/testhal/STM32F0xx/SPI/.cproject b/testhal/STM32F0xx/SPI/.cproject index d5cace391..dd317e872 100644 --- a/testhal/STM32F0xx/SPI/.cproject +++ b/testhal/STM32F0xx/SPI/.cproject @@ -48,4 +48,5 @@ + diff --git a/testhal/STM32F0xx/SPI/Makefile b/testhal/STM32F0xx/SPI/Makefile index 75945bbad..58a78882f 100644 --- a/testhal/STM32F0xx/SPI/Makefile +++ b/testhal/STM32F0xx/SPI/Makefile @@ -60,11 +60,11 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/osal/chibios/osal.mk include $(CHIBIOS)/os/hal/boards/ST_STM32F0_DISCOVERY/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F0xx/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F0xx/platform.mk include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/devices/STM32F0xx/port.mk +include $(CHIBIOS)/os/rt/osal/osal.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk #include $(CHIBIOS)/test/test.mk # Define linker script file here @@ -206,4 +206,4 @@ ifeq ($(USE_FWLIB),yes) USE_OPT += -DUSE_STDPERIPH_DRIVER endif -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/rules.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/rules.mk diff --git a/testhal/STM32F0xx/SPI/main.c b/testhal/STM32F0xx/SPI/main.c index 0f6313022..5c0226b94 100644 --- a/testhal/STM32F0xx/SPI/main.c +++ b/testhal/STM32F0xx/SPI/main.c @@ -48,7 +48,7 @@ static uint8_t rxbuf[512]; /* * SPI bus contender 1. */ -static WORKING_AREA(spi_thread_1_wa, 256); +static THD_WORKING_AREA(spi_thread_1_wa, 256); static msg_t spi_thread_1(void *p) { (void)p; @@ -69,7 +69,7 @@ static msg_t spi_thread_1(void *p) { /* * SPI bus contender 2. */ -static WORKING_AREA(spi_thread_2_wa, 256); +static THD_WORKING_AREA(spi_thread_2_wa, 256); static msg_t spi_thread_2(void *p) { (void)p; @@ -90,7 +90,7 @@ static msg_t spi_thread_2(void *p) { * This is a periodic thread that does absolutely nothing except flashing * a LED. */ -static WORKING_AREA(blinker_wa, 128); +static THD_WORKING_AREA(blinker_wa, 128); static msg_t blinker(void *arg) { (void)arg; diff --git a/testhal/STM32F0xx/UART/.cproject b/testhal/STM32F0xx/UART/.cproject index 9dc8b7121..46c45aefc 100644 --- a/testhal/STM32F0xx/UART/.cproject +++ b/testhal/STM32F0xx/UART/.cproject @@ -48,4 +48,5 @@ + diff --git a/testhal/STM32F0xx/UART/Makefile b/testhal/STM32F0xx/UART/Makefile index 75945bbad..58a78882f 100644 --- a/testhal/STM32F0xx/UART/Makefile +++ b/testhal/STM32F0xx/UART/Makefile @@ -60,11 +60,11 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/osal/chibios/osal.mk include $(CHIBIOS)/os/hal/boards/ST_STM32F0_DISCOVERY/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F0xx/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F0xx/platform.mk include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/devices/STM32F0xx/port.mk +include $(CHIBIOS)/os/rt/osal/osal.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f0xx.mk #include $(CHIBIOS)/test/test.mk # Define linker script file here @@ -206,4 +206,4 @@ ifeq ($(USE_FWLIB),yes) USE_OPT += -DUSE_STDPERIPH_DRIVER endif -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/rules.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/rules.mk diff --git a/testhal/STM32F30x/ADC/.cproject b/testhal/STM32F30x/ADC/.cproject index 18ecf6a9c..7a8791dfc 100644 --- a/testhal/STM32F30x/ADC/.cproject +++ b/testhal/STM32F30x/ADC/.cproject @@ -20,7 +20,7 @@ - + @@ -47,4 +47,6 @@ + + diff --git a/testhal/STM32F30x/ADC/Makefile b/testhal/STM32F30x/ADC/Makefile index 41c3e23a8..e5f7de13b 100644 --- a/testhal/STM32F30x/ADC/Makefile +++ b/testhal/STM32F30x/ADC/Makefile @@ -66,11 +66,11 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/osal/chibios/osal.mk include $(CHIBIOS)/os/hal/boards/ST_STM32F3_DISCOVERY/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F30x/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F30x/platform.mk include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/devices/STM32F30x/port.mk +include $(CHIBIOS)/os/rt/osal/osal.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f30x.mk #include $(CHIBIOS)/test/test.mk # Define linker script file here @@ -222,4 +222,4 @@ ifeq ($(USE_FWLIB),yes) USE_OPT += -DUSE_STDPERIPH_DRIVER endif -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/rules.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/rules.mk diff --git a/testhal/STM32F30x/ADC/main.c b/testhal/STM32F30x/ADC/main.c index 8489f1bef..9306b14d1 100644 --- a/testhal/STM32F30x/ADC/main.c +++ b/testhal/STM32F30x/ADC/main.c @@ -104,7 +104,7 @@ static const ADCConversionGroup adcgrpcfg2 = { /* * Red LEDs blinker thread, times are in milliseconds. */ -static WORKING_AREA(waThread1, 128); +static THD_WORKING_AREA(waThread1, 128); static msg_t Thread1(void *arg) { (void)arg; diff --git a/testhal/STM32F30x/ADC_DUAL/.cproject b/testhal/STM32F30x/ADC_DUAL/.cproject index 151e30397..980f2e991 100644 --- a/testhal/STM32F30x/ADC_DUAL/.cproject +++ b/testhal/STM32F30x/ADC_DUAL/.cproject @@ -20,7 +20,7 @@ - + @@ -47,4 +47,6 @@ + + diff --git a/testhal/STM32F30x/ADC_DUAL/Makefile b/testhal/STM32F30x/ADC_DUAL/Makefile index 41c3e23a8..e5f7de13b 100644 --- a/testhal/STM32F30x/ADC_DUAL/Makefile +++ b/testhal/STM32F30x/ADC_DUAL/Makefile @@ -66,11 +66,11 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/osal/chibios/osal.mk include $(CHIBIOS)/os/hal/boards/ST_STM32F3_DISCOVERY/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F30x/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F30x/platform.mk include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/devices/STM32F30x/port.mk +include $(CHIBIOS)/os/rt/osal/osal.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f30x.mk #include $(CHIBIOS)/test/test.mk # Define linker script file here @@ -222,4 +222,4 @@ ifeq ($(USE_FWLIB),yes) USE_OPT += -DUSE_STDPERIPH_DRIVER endif -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/rules.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/rules.mk diff --git a/testhal/STM32F30x/ADC_DUAL/main.c b/testhal/STM32F30x/ADC_DUAL/main.c index c4fa35c5c..849207de0 100644 --- a/testhal/STM32F30x/ADC_DUAL/main.c +++ b/testhal/STM32F30x/ADC_DUAL/main.c @@ -128,7 +128,7 @@ static const ADCConversionGroup adcgrpcfg2 = { /* * Red LEDs blinker thread, times are in milliseconds. */ -static WORKING_AREA(waThread1, 128); +static THD_WORKING_AREA(waThread1, 128); static msg_t Thread1(void *arg) { (void)arg; diff --git a/testhal/STM32F30x/CAN/.cproject b/testhal/STM32F30x/CAN/.cproject index 7cdad62bb..e18f952ce 100644 --- a/testhal/STM32F30x/CAN/.cproject +++ b/testhal/STM32F30x/CAN/.cproject @@ -48,4 +48,5 @@ + diff --git a/testhal/STM32F30x/CAN/Makefile b/testhal/STM32F30x/CAN/Makefile index 41c3e23a8..e5f7de13b 100644 --- a/testhal/STM32F30x/CAN/Makefile +++ b/testhal/STM32F30x/CAN/Makefile @@ -66,11 +66,11 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/osal/chibios/osal.mk include $(CHIBIOS)/os/hal/boards/ST_STM32F3_DISCOVERY/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F30x/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F30x/platform.mk include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/devices/STM32F30x/port.mk +include $(CHIBIOS)/os/rt/osal/osal.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f30x.mk #include $(CHIBIOS)/test/test.mk # Define linker script file here @@ -222,4 +222,4 @@ ifeq ($(USE_FWLIB),yes) USE_OPT += -DUSE_STDPERIPH_DRIVER endif -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/rules.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/rules.mk diff --git a/testhal/STM32F30x/CAN/main.c b/testhal/STM32F30x/CAN/main.c index 52e3ad1b6..27ba16bf7 100644 --- a/testhal/STM32F30x/CAN/main.c +++ b/testhal/STM32F30x/CAN/main.c @@ -30,7 +30,7 @@ static const CANConfig cancfg = { /* * Receiver thread. */ -static WORKING_AREA(can_rx_wa, 256); +static THD_WORKING_AREA(can_rx_wa, 256); static msg_t can_rx(void *p) { event_listener_t el; CANRxFrame rxmsg; @@ -53,7 +53,7 @@ static msg_t can_rx(void *p) { /* * Transmitter thread. */ -static WORKING_AREA(can_tx_wa, 256); +static THD_WORKING_AREA(can_tx_wa, 256); static msg_t can_tx(void * p) { CANTxFrame txmsg; diff --git a/testhal/STM32F30x/EXT/.cproject b/testhal/STM32F30x/EXT/.cproject index 81789e942..c9c383d84 100644 --- a/testhal/STM32F30x/EXT/.cproject +++ b/testhal/STM32F30x/EXT/.cproject @@ -20,7 +20,7 @@ - + @@ -47,4 +47,6 @@ + + diff --git a/testhal/STM32F30x/EXT/Makefile b/testhal/STM32F30x/EXT/Makefile index 41c3e23a8..e5f7de13b 100644 --- a/testhal/STM32F30x/EXT/Makefile +++ b/testhal/STM32F30x/EXT/Makefile @@ -66,11 +66,11 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/osal/chibios/osal.mk include $(CHIBIOS)/os/hal/boards/ST_STM32F3_DISCOVERY/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F30x/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F30x/platform.mk include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/devices/STM32F30x/port.mk +include $(CHIBIOS)/os/rt/osal/osal.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f30x.mk #include $(CHIBIOS)/test/test.mk # Define linker script file here @@ -222,4 +222,4 @@ ifeq ($(USE_FWLIB),yes) USE_OPT += -DUSE_STDPERIPH_DRIVER endif -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/rules.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/rules.mk diff --git a/testhal/STM32F30x/IRQ_STORM/.cproject b/testhal/STM32F30x/IRQ_STORM/.cproject index ed2858c43..e59cf38b3 100644 --- a/testhal/STM32F30x/IRQ_STORM/.cproject +++ b/testhal/STM32F30x/IRQ_STORM/.cproject @@ -48,4 +48,5 @@ + diff --git a/testhal/STM32F30x/IRQ_STORM/Makefile b/testhal/STM32F30x/IRQ_STORM/Makefile index 41c3e23a8..e5f7de13b 100644 --- a/testhal/STM32F30x/IRQ_STORM/Makefile +++ b/testhal/STM32F30x/IRQ_STORM/Makefile @@ -66,11 +66,11 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/osal/chibios/osal.mk include $(CHIBIOS)/os/hal/boards/ST_STM32F3_DISCOVERY/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F30x/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F30x/platform.mk include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/devices/STM32F30x/port.mk +include $(CHIBIOS)/os/rt/osal/osal.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f30x.mk #include $(CHIBIOS)/test/test.mk # Define linker script file here @@ -222,4 +222,4 @@ ifeq ($(USE_FWLIB),yes) USE_OPT += -DUSE_STDPERIPH_DRIVER endif -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/rules.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/rules.mk diff --git a/testhal/STM32F30x/IRQ_STORM/main.c b/testhal/STM32F30x/IRQ_STORM/main.c index 21684a868..539ea7c06 100644 --- a/testhal/STM32F30x/IRQ_STORM/main.c +++ b/testhal/STM32F30x/IRQ_STORM/main.c @@ -57,7 +57,7 @@ static msg_t b[NUM_THREADS][MAILBOX_SIZE]; /* * Test worker threads. */ -static WORKING_AREA(waWorkerThread[NUM_THREADS], 128); +static THD_WORKING_AREA(waWorkerThread[NUM_THREADS], 128); static msg_t WorkerThread(void *arg) { static volatile unsigned x = 0; static unsigned cnt = 0; @@ -243,19 +243,19 @@ int main(void) { println(CH_KERNEL_VERSION); print("*** Compiled: "); println(__DATE__ " - " __TIME__); -#ifdef CH_COMPILER_NAME +#ifdef PORT_COMPILER_NAME print("*** Compiler: "); - println(CH_COMPILER_NAME); + println(PORT_COMPILER_NAME); #endif print("*** Architecture: "); - println(CH_ARCHITECTURE_NAME); -#ifdef CH_CORE_VARIANT_NAME + println(PORT_ARCHITECTURE_NAME); +#ifdef PORT_CORE_VARIANT_NAME print("*** Core Variant: "); - println(CH_CORE_VARIANT_NAME); + println(PORT_CORE_VARIANT_NAME); #endif -#ifdef CH_PORT_INFO +#ifdef PORT_INFO print("*** Port Info: "); - println(CH_PORT_INFO); + println(PORT_INFO); #endif #ifdef PLATFORM_NAME print("*** Platform: "); diff --git a/testhal/STM32F30x/PWM-ICU/.cproject b/testhal/STM32F30x/PWM-ICU/.cproject index 0bb5b2f00..94e436ca4 100644 --- a/testhal/STM32F30x/PWM-ICU/.cproject +++ b/testhal/STM32F30x/PWM-ICU/.cproject @@ -48,4 +48,5 @@ + diff --git a/testhal/STM32F30x/PWM-ICU/Makefile b/testhal/STM32F30x/PWM-ICU/Makefile index 41c3e23a8..e5f7de13b 100644 --- a/testhal/STM32F30x/PWM-ICU/Makefile +++ b/testhal/STM32F30x/PWM-ICU/Makefile @@ -66,11 +66,11 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/osal/chibios/osal.mk include $(CHIBIOS)/os/hal/boards/ST_STM32F3_DISCOVERY/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F30x/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F30x/platform.mk include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/devices/STM32F30x/port.mk +include $(CHIBIOS)/os/rt/osal/osal.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f30x.mk #include $(CHIBIOS)/test/test.mk # Define linker script file here @@ -222,4 +222,4 @@ ifeq ($(USE_FWLIB),yes) USE_OPT += -DUSE_STDPERIPH_DRIVER endif -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/rules.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/rules.mk diff --git a/testhal/STM32F30x/SPI/.cproject b/testhal/STM32F30x/SPI/.cproject index 104d73e64..697309c7f 100644 --- a/testhal/STM32F30x/SPI/.cproject +++ b/testhal/STM32F30x/SPI/.cproject @@ -48,4 +48,5 @@ + diff --git a/testhal/STM32F30x/SPI/Makefile b/testhal/STM32F30x/SPI/Makefile index 41c3e23a8..e5f7de13b 100644 --- a/testhal/STM32F30x/SPI/Makefile +++ b/testhal/STM32F30x/SPI/Makefile @@ -66,11 +66,11 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/osal/chibios/osal.mk include $(CHIBIOS)/os/hal/boards/ST_STM32F3_DISCOVERY/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F30x/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F30x/platform.mk include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/devices/STM32F30x/port.mk +include $(CHIBIOS)/os/rt/osal/osal.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f30x.mk #include $(CHIBIOS)/test/test.mk # Define linker script file here @@ -222,4 +222,4 @@ ifeq ($(USE_FWLIB),yes) USE_OPT += -DUSE_STDPERIPH_DRIVER endif -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/rules.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/rules.mk diff --git a/testhal/STM32F30x/SPI/main.c b/testhal/STM32F30x/SPI/main.c index aedae794a..84c870354 100644 --- a/testhal/STM32F30x/SPI/main.c +++ b/testhal/STM32F30x/SPI/main.c @@ -48,7 +48,7 @@ static uint8_t rxbuf[512]; /* * SPI bus contender 1. */ -static WORKING_AREA(spi_thread_1_wa, 256); +static THD_WORKING_AREA(spi_thread_1_wa, 256); static msg_t spi_thread_1(void *p) { (void)p; @@ -69,7 +69,7 @@ static msg_t spi_thread_1(void *p) { /* * SPI bus contender 2. */ -static WORKING_AREA(spi_thread_2_wa, 256); +static THD_WORKING_AREA(spi_thread_2_wa, 256); static msg_t spi_thread_2(void *p) { (void)p; @@ -90,7 +90,7 @@ static msg_t spi_thread_2(void *p) { * This is a periodic thread that does absolutely nothing except flashing * a LED. */ -static WORKING_AREA(blinker_wa, 128); +static THD_WORKING_AREA(blinker_wa, 128); static msg_t blinker(void *arg) { (void)arg; diff --git a/testhal/STM32F30x/UART/.cproject b/testhal/STM32F30x/UART/.cproject index 661d548d0..813ef9678 100644 --- a/testhal/STM32F30x/UART/.cproject +++ b/testhal/STM32F30x/UART/.cproject @@ -20,7 +20,7 @@ - + @@ -47,4 +47,6 @@ + + diff --git a/testhal/STM32F30x/UART/Makefile b/testhal/STM32F30x/UART/Makefile index 41c3e23a8..e5f7de13b 100644 --- a/testhal/STM32F30x/UART/Makefile +++ b/testhal/STM32F30x/UART/Makefile @@ -66,11 +66,11 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/osal/chibios/osal.mk include $(CHIBIOS)/os/hal/boards/ST_STM32F3_DISCOVERY/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F30x/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F30x/platform.mk include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/devices/STM32F30x/port.mk +include $(CHIBIOS)/os/rt/osal/osal.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f30x.mk #include $(CHIBIOS)/test/test.mk # Define linker script file here @@ -222,4 +222,4 @@ ifeq ($(USE_FWLIB),yes) USE_OPT += -DUSE_STDPERIPH_DRIVER endif -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/rules.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/rules.mk diff --git a/testhal/STM32F30x/USB_CDC/.cproject b/testhal/STM32F30x/USB_CDC/.cproject index 839c40d30..49ee0dcf1 100644 --- a/testhal/STM32F30x/USB_CDC/.cproject +++ b/testhal/STM32F30x/USB_CDC/.cproject @@ -48,4 +48,5 @@ + diff --git a/testhal/STM32F30x/USB_CDC/Makefile b/testhal/STM32F30x/USB_CDC/Makefile index f4d7da196..ba4f533d5 100644 --- a/testhal/STM32F30x/USB_CDC/Makefile +++ b/testhal/STM32F30x/USB_CDC/Makefile @@ -66,11 +66,11 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/osal/chibios/osal.mk include $(CHIBIOS)/os/hal/boards/ST_STM32F3_DISCOVERY/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F30x/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F30x/platform.mk include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/devices/STM32F30x/port.mk +include $(CHIBIOS)/os/rt/osal/osal.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f30x.mk include $(CHIBIOS)/test/test.mk # Define linker script file here @@ -224,4 +224,4 @@ ifeq ($(USE_FWLIB),yes) USE_OPT += -DUSE_STDPERIPH_DRIVER endif -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/rules.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/rules.mk diff --git a/testhal/STM32F30x/USB_CDC/main.c b/testhal/STM32F30x/USB_CDC/main.c index 7ace5c306..31122bcbd 100644 --- a/testhal/STM32F30x/USB_CDC/main.c +++ b/testhal/STM32F30x/USB_CDC/main.c @@ -339,8 +339,8 @@ static const SerialUSBConfig serusbcfg = { /* Command line related. */ /*===========================================================================*/ -#define SHELL_WA_SIZE THD_WA_SIZE(2048) -#define TEST_WA_SIZE THD_WA_SIZE(256) +#define SHELL_WA_SIZE THD_WORKING_AREA_SIZE(2048) +#define TEST_WA_SIZE THD_WORKING_AREA_SIZE(256) static void cmd_mem(BaseSequentialStream *chp, int argc, char *argv[]) { size_t n, size; @@ -444,7 +444,7 @@ static const ShellConfig shell_cfg1 = { /* * Red LED blinker thread, times are in milliseconds. */ -static WORKING_AREA(waThread1, 128); +static THD_WORKING_AREA(waThread1, 128); static msg_t Thread1(void *arg) { (void)arg; diff --git a/testhal/STM32F4xx/ADC/.cproject b/testhal/STM32F4xx/ADC/.cproject index b279459f3..fe8f3f8c5 100644 --- a/testhal/STM32F4xx/ADC/.cproject +++ b/testhal/STM32F4xx/ADC/.cproject @@ -48,4 +48,5 @@ + diff --git a/testhal/STM32F4xx/ADC/Makefile b/testhal/STM32F4xx/ADC/Makefile index 814be9864..29f0682fa 100644 --- a/testhal/STM32F4xx/ADC/Makefile +++ b/testhal/STM32F4xx/ADC/Makefile @@ -66,11 +66,11 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/osal/chibios/osal.mk include $(CHIBIOS)/os/hal/boards/ST_STM32F4_DISCOVERY/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F4xx/platform.mk include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/devices/STM32F4xx/port.mk +include $(CHIBIOS)/os/rt/osal/osal.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f4xx.mk #include $(CHIBIOS)/test/test.mk # Define linker script file here @@ -222,4 +222,4 @@ ifeq ($(USE_FWLIB),yes) USE_OPT += -DUSE_STDPERIPH_DRIVER endif -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/rules.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/rules.mk diff --git a/testhal/STM32F4xx/ADC/main.c b/testhal/STM32F4xx/ADC/main.c index 650347f76..f4b65170f 100644 --- a/testhal/STM32F4xx/ADC/main.c +++ b/testhal/STM32F4xx/ADC/main.c @@ -91,7 +91,7 @@ static const ADCConversionGroup adcgrpcfg2 = { /* * Red LEDs blinker thread, times are in milliseconds. */ -static WORKING_AREA(waThread1, 128); +static THD_WORKING_AREA(waThread1, 128); static msg_t Thread1(void *arg) { (void)arg; diff --git a/testhal/STM32F4xx/CAN/.cproject b/testhal/STM32F4xx/CAN/.cproject index 41abe3d02..fb00be23a 100644 --- a/testhal/STM32F4xx/CAN/.cproject +++ b/testhal/STM32F4xx/CAN/.cproject @@ -48,4 +48,5 @@ + diff --git a/testhal/STM32F4xx/CAN/Makefile b/testhal/STM32F4xx/CAN/Makefile index 814be9864..29f0682fa 100644 --- a/testhal/STM32F4xx/CAN/Makefile +++ b/testhal/STM32F4xx/CAN/Makefile @@ -66,11 +66,11 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/osal/chibios/osal.mk include $(CHIBIOS)/os/hal/boards/ST_STM32F4_DISCOVERY/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F4xx/platform.mk include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/devices/STM32F4xx/port.mk +include $(CHIBIOS)/os/rt/osal/osal.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f4xx.mk #include $(CHIBIOS)/test/test.mk # Define linker script file here @@ -222,4 +222,4 @@ ifeq ($(USE_FWLIB),yes) USE_OPT += -DUSE_STDPERIPH_DRIVER endif -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/rules.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/rules.mk diff --git a/testhal/STM32F4xx/CAN/main.c b/testhal/STM32F4xx/CAN/main.c index 373fca4fc..f06bad79f 100644 --- a/testhal/STM32F4xx/CAN/main.c +++ b/testhal/STM32F4xx/CAN/main.c @@ -39,8 +39,8 @@ static const CANConfig cancfg = { /* * Receiver thread. */ -static WORKING_AREA(can_rx1_wa, 256); -static WORKING_AREA(can_rx2_wa, 256); +static THD_WORKING_AREA(can_rx1_wa, 256); +static THD_WORKING_AREA(can_rx2_wa, 256); static msg_t can_rx(void *p) { struct can_instance *cip = p; event_listener_t el; @@ -65,7 +65,7 @@ static msg_t can_rx(void *p) { /* * Transmitter thread. */ -static WORKING_AREA(can_tx_wa, 256); +static THD_WORKING_AREA(can_tx_wa, 256); static msg_t can_tx(void * p) { CANTxFrame txmsg; diff --git a/testhal/STM32F4xx/DMA_STORM/.project b/testhal/STM32F4xx/DMA_STORM/.project index fdacc2794..9841eee9f 100644 --- a/testhal/STM32F4xx/DMA_STORM/.project +++ b/testhal/STM32F4xx/DMA_STORM/.project @@ -27,7 +27,7 @@ board 2 - CHIBIOS/boards/ST_STM32F4_DISCOVERY + CHIBIOS/os/hal/boards/ST_STM32F4_DISCOVERY os diff --git a/testhal/STM32F4xx/DMA_STORM/Makefile b/testhal/STM32F4xx/DMA_STORM/Makefile index 86de6d81c..366447c94 100644 --- a/testhal/STM32F4xx/DMA_STORM/Makefile +++ b/testhal/STM32F4xx/DMA_STORM/Makefile @@ -65,11 +65,12 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. -include $(CHIBIOS)/boards/ST_STM32F4_DISCOVERY/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk -include $(CHIBIOS)/os/kernel/kernel.mk +include $(CHIBIOS)/os/hal/boards/ST_STM32F4_DISCOVERY/board.mk +include $(CHIBIOS)/os/hal/ports/STM32F4xx/platform.mk +include $(CHIBIOS)/os/rt/rt.mk +include $(CHIBIOS)/os/rt/osal/osal.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f4xx.mk include $(CHIBIOS)/test/test.mk # Define linker script file here @@ -115,7 +116,7 @@ TCPPSRC = ASMSRC = $(PORTASM) INCDIR = $(PORTINC) $(KERNINC) $(TESTINC) \ - $(HALINC) $(PLATFORMINC) $(BOARDINC) \ + $(HALINC) $(OSALINC) $(PLATFORMINC) $(BOARDINC) \ $(CHIBIOS)/os/various # @@ -219,4 +220,4 @@ ifeq ($(USE_FWLIB),yes) USE_OPT += -DUSE_STDPERIPH_DRIVER endif -include $(CHIBIOS)/os/ports/GCC/ARMCMx/rules.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/rules.mk diff --git a/testhal/STM32F4xx/DMA_STORM/chconf.h b/testhal/STM32F4xx/DMA_STORM/chconf.h index 2e6fcc6ee..1262f2fc5 100644 --- a/testhal/STM32F4xx/DMA_STORM/chconf.h +++ b/testhal/STM32F4xx/DMA_STORM/chconf.h @@ -40,8 +40,29 @@ * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ -#if !defined(CH_FREQUENCY) || defined(__DOXYGEN__) -#define CH_FREQUENCY 1000 +#if !defined(CH_CFG_ST_FREQUENCY) || defined(__DOXYGEN__) +#define CH_CFG_ST_FREQUENCY 10000 +#endif + +/** + * @brief Realtime Counter frequency. + * @details Frequency of the system counter used for realtime delays and + * measurements. + */ +#if !defined(CH_CFG_RTC_FREQUENCY) || defined(__DOXYGEN__) +#define CH_CFG_RTC_FREQUENCY 168000000 +#endif + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#if !defined(CH_CFG_TIMEDELTA) || defined(__DOXYGEN__) +#define CH_CFG_TIMEDELTA 2 #endif /** @@ -51,12 +72,13 @@ * disables the preemption for threads with equal priority and the * round robin becomes cooperative. Note that higher priority * threads can still preempt, the kernel is always preemptive. - * * @note Disabling the round robin preemption makes the kernel more compact * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. */ -#if !defined(CH_TIME_QUANTUM) || defined(__DOXYGEN__) -#define CH_TIME_QUANTUM 20 +#if !defined(CH_CFG_TIME_QUANTUM) || defined(__DOXYGEN__) +#define CH_CFG_TIME_QUANTUM 0 #endif /** @@ -68,27 +90,20 @@ * * @note In order to let the OS manage the whole RAM the linker script must * provide the @p __heap_base__ and @p __heap_end__ symbols. - * @note Requires @p CH_USE_MEMCORE. + * @note Requires @p CH_CFG_USE_MEMCORE. */ -#if !defined(CH_MEMCORE_SIZE) || defined(__DOXYGEN__) -#define CH_MEMCORE_SIZE 0 +#if !defined(CH_CFG_MEMCORE_SIZE) || defined(__DOXYGEN__) +#define CH_CFG_MEMCORE_SIZE 0 #endif /** * @brief Idle thread automatic spawn suppression. * @details When this option is activated the function @p chSysInit() - * does not spawn the idle thread automatically. The application has - * then the responsibility to do one of the following: - * - Spawn a custom idle thread at priority @p IDLEPRIO. - * - Change the main() thread priority to @p IDLEPRIO then enter - * an endless loop. In this scenario the @p main() thread acts as - * the idle thread. - * . - * @note Unless an idle thread is spawned the @p main() thread must not - * enter a sleep state. - */ -#if !defined(CH_NO_IDLE_THREAD) || defined(__DOXYGEN__) -#define CH_NO_IDLE_THREAD FALSE + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. */ +#if !defined(CH_CFG_NO_IDLE_THREAD) || defined(__DOXYGEN__) +#define CH_CFG_NO_IDLE_THREAD FALSE #endif /** @} */ @@ -108,8 +123,8 @@ * @note This is not related to the compiler optimization options. * @note The default is @p TRUE. */ -#if !defined(CH_OPTIMIZE_SPEED) || defined(__DOXYGEN__) -#define CH_OPTIMIZE_SPEED TRUE +#if !defined(CH_CFG_OPTIMIZE_SPEED) || defined(__DOXYGEN__) +#define CH_CFG_OPTIMIZE_SPEED TRUE #endif /** @} */ @@ -121,14 +136,25 @@ */ /*===========================================================================*/ +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#if !defined(CH_CFG_USE_TM) || defined(__DOXYGEN__) +#define CH_CFG_USE_TM TRUE +#endif + /** * @brief Threads registry APIs. * @details If enabled then the registry APIs are included in the kernel. * * @note The default is @p TRUE. */ -#if !defined(CH_USE_REGISTRY) || defined(__DOXYGEN__) -#define CH_USE_REGISTRY TRUE +#if !defined(CH_CFG_USE_REGISTRY) || defined(__DOXYGEN__) +#define CH_CFG_USE_REGISTRY TRUE #endif /** @@ -138,8 +164,8 @@ * * @note The default is @p TRUE. */ -#if !defined(CH_USE_WAITEXIT) || defined(__DOXYGEN__) -#define CH_USE_WAITEXIT TRUE +#if !defined(CH_CFG_USE_WAITEXIT) || defined(__DOXYGEN__) +#define CH_CFG_USE_WAITEXIT TRUE #endif /** @@ -148,8 +174,8 @@ * * @note The default is @p TRUE. */ -#if !defined(CH_USE_SEMAPHORES) || defined(__DOXYGEN__) -#define CH_USE_SEMAPHORES TRUE +#if !defined(CH_CFG_USE_SEMAPHORES) || defined(__DOXYGEN__) +#define CH_CFG_USE_SEMAPHORES TRUE #endif /** @@ -157,23 +183,12 @@ * @details If enabled then the threads are enqueued on semaphores by * priority rather than in FIFO order. * - * @note The default is @p FALSE. Enable this if you have special requirements. - * @note Requires @p CH_USE_SEMAPHORES. + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. */ -#if !defined(CH_USE_SEMAPHORES_PRIORITY) || defined(__DOXYGEN__) -#define CH_USE_SEMAPHORES_PRIORITY FALSE -#endif - -/** - * @brief Atomic semaphore API. - * @details If enabled then the semaphores the @p chSemSignalWait() API - * is included in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_USE_SEMAPHORES. - */ -#if !defined(CH_USE_SEMSW) || defined(__DOXYGEN__) -#define CH_USE_SEMSW TRUE +#if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY) || defined(__DOXYGEN__) +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE #endif /** @@ -182,8 +197,8 @@ * * @note The default is @p TRUE. */ -#if !defined(CH_USE_MUTEXES) || defined(__DOXYGEN__) -#define CH_USE_MUTEXES TRUE +#if !defined(CH_CFG_USE_MUTEXES) || defined(__DOXYGEN__) +#define CH_CFG_USE_MUTEXES TRUE #endif /** @@ -192,10 +207,10 @@ * in the kernel. * * @note The default is @p TRUE. - * @note Requires @p CH_USE_MUTEXES. + * @note Requires @p CH_CFG_USE_MUTEXES. */ -#if !defined(CH_USE_CONDVARS) || defined(__DOXYGEN__) -#define CH_USE_CONDVARS TRUE +#if !defined(CH_CFG_USE_CONDVARS) || defined(__DOXYGEN__) +#define CH_CFG_USE_CONDVARS TRUE #endif /** @@ -204,10 +219,10 @@ * specification are included in the kernel. * * @note The default is @p TRUE. - * @note Requires @p CH_USE_CONDVARS. + * @note Requires @p CH_CFG_USE_CONDVARS. */ -#if !defined(CH_USE_CONDVARS_TIMEOUT) || defined(__DOXYGEN__) -#define CH_USE_CONDVARS_TIMEOUT TRUE +#if !defined(CH_CFG_USE_CONDVARS_TIMEOUT) || defined(__DOXYGEN__) +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE #endif /** @@ -216,8 +231,8 @@ * * @note The default is @p TRUE. */ -#if !defined(CH_USE_EVENTS) || defined(__DOXYGEN__) -#define CH_USE_EVENTS TRUE +#if !defined(CH_CFG_USE_EVENTS) || defined(__DOXYGEN__) +#define CH_CFG_USE_EVENTS TRUE #endif /** @@ -226,10 +241,10 @@ * are included in the kernel. * * @note The default is @p TRUE. - * @note Requires @p CH_USE_EVENTS. + * @note Requires @p CH_CFG_USE_EVENTS. */ -#if !defined(CH_USE_EVENTS_TIMEOUT) || defined(__DOXYGEN__) -#define CH_USE_EVENTS_TIMEOUT TRUE +#if !defined(CH_CFG_USE_EVENTS_TIMEOUT) || defined(__DOXYGEN__) +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE #endif /** @@ -239,8 +254,8 @@ * * @note The default is @p TRUE. */ -#if !defined(CH_USE_MESSAGES) || defined(__DOXYGEN__) -#define CH_USE_MESSAGES TRUE +#if !defined(CH_CFG_USE_MESSAGES) || defined(__DOXYGEN__) +#define CH_CFG_USE_MESSAGES TRUE #endif /** @@ -248,11 +263,12 @@ * @details If enabled then messages are served by priority rather than in * FIFO order. * - * @note The default is @p FALSE. Enable this if you have special requirements. - * @note Requires @p CH_USE_MESSAGES. + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. */ -#if !defined(CH_USE_MESSAGES_PRIORITY) || defined(__DOXYGEN__) -#define CH_USE_MESSAGES_PRIORITY FALSE +#if !defined(CH_CFG_USE_MESSAGES_PRIORITY) || defined(__DOXYGEN__) +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE #endif /** @@ -261,10 +277,10 @@ * included in the kernel. * * @note The default is @p TRUE. - * @note Requires @p CH_USE_SEMAPHORES. + * @note Requires @p CH_CFG_USE_SEMAPHORES. */ -#if !defined(CH_USE_MAILBOXES) || defined(__DOXYGEN__) -#define CH_USE_MAILBOXES TRUE +#if !defined(CH_CFG_USE_MAILBOXES) || defined(__DOXYGEN__) +#define CH_CFG_USE_MAILBOXES TRUE #endif /** @@ -273,8 +289,8 @@ * * @note The default is @p TRUE. */ -#if !defined(CH_USE_QUEUES) || defined(__DOXYGEN__) -#define CH_USE_QUEUES TRUE +#if !defined(CH_CFG_USE_QUEUES) || defined(__DOXYGEN__) +#define CH_CFG_USE_QUEUES TRUE #endif /** @@ -284,8 +300,8 @@ * * @note The default is @p TRUE. */ -#if !defined(CH_USE_MEMCORE) || defined(__DOXYGEN__) -#define CH_USE_MEMCORE TRUE +#if !defined(CH_CFG_USE_MEMCORE) || defined(__DOXYGEN__) +#define CH_CFG_USE_MEMCORE TRUE #endif /** @@ -294,26 +310,12 @@ * in the kernel. * * @note The default is @p TRUE. - * @note Requires @p CH_USE_MEMCORE and either @p CH_USE_MUTEXES or - * @p CH_USE_SEMAPHORES. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. * @note Mutexes are recommended. */ -#if !defined(CH_USE_HEAP) || defined(__DOXYGEN__) -#define CH_USE_HEAP TRUE -#endif - -/** - * @brief C-runtime allocator. - * @details If enabled the the heap allocator APIs just wrap the C-runtime - * @p malloc() and @p free() functions. - * - * @note The default is @p FALSE. - * @note Requires @p CH_USE_HEAP. - * @note The C-runtime may or may not require @p CH_USE_MEMCORE, see the - * appropriate documentation. - */ -#if !defined(CH_USE_MALLOC_HEAP) || defined(__DOXYGEN__) -#define CH_USE_MALLOC_HEAP FALSE +#if !defined(CH_CFG_USE_HEAP) || defined(__DOXYGEN__) +#define CH_CFG_USE_HEAP TRUE #endif /** @@ -323,8 +325,8 @@ * * @note The default is @p TRUE. */ -#if !defined(CH_USE_MEMPOOLS) || defined(__DOXYGEN__) -#define CH_USE_MEMPOOLS TRUE +#if !defined(CH_CFG_USE_MEMPOOLS) || defined(__DOXYGEN__) +#define CH_CFG_USE_MEMPOOLS TRUE #endif /** @@ -333,11 +335,11 @@ * in the kernel. * * @note The default is @p TRUE. - * @note Requires @p CH_USE_WAITEXIT. - * @note Requires @p CH_USE_HEAP and/or @p CH_USE_MEMPOOLS. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. */ -#if !defined(CH_USE_DYNAMIC) || defined(__DOXYGEN__) -#define CH_USE_DYNAMIC TRUE +#if !defined(CH_CFG_USE_DYNAMIC) || defined(__DOXYGEN__) +#define CH_CFG_USE_DYNAMIC TRUE #endif /** @} */ @@ -349,6 +351,15 @@ */ /*===========================================================================*/ +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#if !defined(CH_DBG_STATISTICS) || defined(__DOXYGEN__) +#define CH_DBG_STATISTICS TRUE +#endif + /** * @brief Debug option, system state check. * @details If enabled the correct call protocol for system APIs is checked @@ -357,7 +368,7 @@ * @note The default is @p FALSE. */ #if !defined(CH_DBG_SYSTEM_STATE_CHECK) || defined(__DOXYGEN__) -#define CH_DBG_SYSTEM_STATE_CHECK TRUE +#define CH_DBG_SYSTEM_STATE_CHECK TRUE #endif /** @@ -368,7 +379,7 @@ * @note The default is @p FALSE. */ #if !defined(CH_DBG_ENABLE_CHECKS) || defined(__DOXYGEN__) -#define CH_DBG_ENABLE_CHECKS TRUE +#define CH_DBG_ENABLE_CHECKS TRUE #endif /** @@ -380,7 +391,7 @@ * @note The default is @p FALSE. */ #if !defined(CH_DBG_ENABLE_ASSERTS) || defined(__DOXYGEN__) -#define CH_DBG_ENABLE_ASSERTS TRUE +#define CH_DBG_ENABLE_ASSERTS TRUE #endif /** @@ -391,7 +402,7 @@ * @note The default is @p FALSE. */ #if !defined(CH_DBG_ENABLE_TRACE) || defined(__DOXYGEN__) -#define CH_DBG_ENABLE_TRACE TRUE +#define CH_DBG_ENABLE_TRACE TRUE #endif /** @@ -405,7 +416,7 @@ * @p panic_msg variable set to @p NULL. */ #if !defined(CH_DBG_ENABLE_STACK_CHECK) || defined(__DOXYGEN__) -#define CH_DBG_ENABLE_STACK_CHECK TRUE +#define CH_DBG_ENABLE_STACK_CHECK TRUE #endif /** @@ -417,20 +428,20 @@ * @note The default is @p FALSE. */ #if !defined(CH_DBG_FILL_THREADS) || defined(__DOXYGEN__) -#define CH_DBG_FILL_THREADS TRUE +#define CH_DBG_FILL_THREADS TRUE #endif /** * @brief Debug option, threads profiling. - * @details If enabled then a field is added to the @p Thread structure that + * @details If enabled then a field is added to the @p thread_t structure that * counts the system ticks occurred while executing the thread. * - * @note The default is @p TRUE. - * @note This debug option is defaulted to TRUE because it is required by - * some test cases into the test suite. + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. */ #if !defined(CH_DBG_THREADS_PROFILING) || defined(__DOXYGEN__) -#define CH_DBG_THREADS_PROFILING TRUE +#define CH_DBG_THREADS_PROFILING FALSE #endif /** @} */ @@ -444,10 +455,10 @@ /** * @brief Threads descriptor structure extension. - * @details User fields added to the end of the @p Thread structure. + * @details User fields added to the end of the @p thread_t structure. */ -#if !defined(THREAD_EXT_FIELDS) || defined(__DOXYGEN__) -#define THREAD_EXT_FIELDS \ +#if !defined(CH_CFG_THREAD_EXTRA_FIELDS) || defined(__DOXYGEN__) +#define CH_CFG_THREAD_EXTRA_FIELDS \ /* Add threads custom fields here.*/ #endif @@ -458,8 +469,8 @@ * @note It is invoked from within @p chThdInit() and implicitly from all * the threads creation APIs. */ -#if !defined(THREAD_EXT_INIT_HOOK) || defined(__DOXYGEN__) -#define THREAD_EXT_INIT_HOOK(tp) { \ +#if !defined(CH_CFG_THREAD_INIT_HOOK) || defined(__DOXYGEN__) +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ /* Add threads initialization code here.*/ \ } #endif @@ -472,8 +483,8 @@ * @note It is also invoked when the threads simply return in order to * terminate. */ -#if !defined(THREAD_EXT_EXIT_HOOK) || defined(__DOXYGEN__) -#define THREAD_EXT_EXIT_HOOK(tp) { \ +#if !defined(CH_CFG_THREAD_EXIT_HOOK) || defined(__DOXYGEN__) +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ /* Add threads finalization code here.*/ \ } #endif @@ -482,18 +493,40 @@ * @brief Context switch hook. * @details This hook is invoked just before switching between threads. */ -#if !defined(THREAD_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) -#define THREAD_CONTEXT_SWITCH_HOOK(ntp, otp) { \ +#if !defined(CH_CFG_CONTEXT_SWITCH_HOOK) || defined(__DOXYGEN__) +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ /* System halt code here.*/ \ } #endif +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#if !defined(CH_CFG_IDLE_ENTER_HOOK) || defined(__DOXYGEN__) +#define CH_CFG_IDLE_ENTER_HOOK() { \ +} +#endif + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#if !defined(CH_CFG_IDLE_LEAVE_HOOK) || defined(__DOXYGEN__) +#define CH_CFG_IDLE_LEAVE_HOOK() { \ +} +#endif + /** * @brief Idle Loop hook. * @details This hook is continuously invoked by the idle thread loop. */ -#if !defined(IDLE_LOOP_HOOK) || defined(__DOXYGEN__) -#define IDLE_LOOP_HOOK() { \ +#if !defined(CH_CFG_IDLE_LOOP_HOOK) || defined(__DOXYGEN__) +#define CH_CFG_IDLE_LOOP_HOOK() { \ /* Idle loop code here.*/ \ } #endif @@ -503,8 +536,8 @@ * @details This hook is invoked in the system tick handler immediately * after processing the virtual timers queue. */ -#if !defined(SYSTEM_TICK_EVENT_HOOK) || defined(__DOXYGEN__) -#define SYSTEM_TICK_EVENT_HOOK() { \ +#if !defined(CH_CFG_SYSTEM_TICK_HOOK) || defined(__DOXYGEN__) +#define CH_CFG_SYSTEM_TICK_HOOK() { \ /* System tick event code here.*/ \ } #endif @@ -514,8 +547,8 @@ * @details This hook is invoked in case to a system halting error before * the system is halted. */ -#if !defined(SYSTEM_HALT_HOOK) || defined(__DOXYGEN__) -#define SYSTEM_HALT_HOOK() { \ +#if !defined(CH_CFG_SYSTEM_HALT_HOOK) || defined(__DOXYGEN__) +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ /* System halt code here.*/ \ } #endif diff --git a/testhal/STM32F4xx/DMA_STORM/halconf.h b/testhal/STM32F4xx/DMA_STORM/halconf.h index e2b440694..ade09ac71 100644 --- a/testhal/STM32F4xx/DMA_STORM/halconf.h +++ b/testhal/STM32F4xx/DMA_STORM/halconf.h @@ -30,13 +30,6 @@ #include "mcuconf.h" -/** - * @brief Enables the TM subsystem. - */ -#if !defined(HAL_USE_TM) || defined(__DOXYGEN__) -#define HAL_USE_TM TRUE -#endif - /** * @brief Enables the PAL subsystem. */ diff --git a/testhal/STM32F4xx/DMA_STORM/main.c b/testhal/STM32F4xx/DMA_STORM/main.c index a3193fcc1..e334e6a67 100644 --- a/testhal/STM32F4xx/DMA_STORM/main.c +++ b/testhal/STM32F4xx/DMA_STORM/main.c @@ -35,7 +35,7 @@ static void adcerrorcallback(ADCDriver *adcp, adcerror_t err) { (void)adcp; (void)err; - chSysHalt(); + chSysHalt("ADC error"); } /* @@ -73,22 +73,24 @@ static const SPIConfig hs_spicfg = { static void tmo(void *p) { (void)p; - chSysHalt(); + chSysHalt("timeout"); } /* * SPI thread. */ -static WORKING_AREA(waSPI1, 1024); -static WORKING_AREA(waSPI2, 1024); -static WORKING_AREA(waSPI3, 1024); +static THD_WORKING_AREA(waSPI1, 1024); +static THD_WORKING_AREA(waSPI2, 1024); +static THD_WORKING_AREA(waSPI3, 1024); static msg_t spi_thread(void *p) { unsigned i; SPIDriver *spip = (SPIDriver *)p; - VirtualTimer vt; + virtual_timer_t vt; uint8_t txbuf[256]; uint8_t rxbuf[256]; + chVTObjectInit(&vt); + /* Prepare transmit pattern.*/ for (i = 0; i < sizeof(txbuf); i++) txbuf[i] = (uint8_t)i; @@ -97,17 +99,12 @@ static msg_t spi_thread(void *p) { while (TRUE) { /* Starts a VT working as watchdog to catch a malfunction in the SPI driver.*/ - chSysLock(); - chVTSetI(&vt, MS2ST(10), tmo, NULL); - chSysUnlock(); + chVTSet(&vt, MS2ST(10), tmo, NULL); spiExchange(spip, sizeof(txbuf), txbuf, rxbuf); /* Stops the watchdog.*/ - chSysLock(); - if (chVTIsArmedI(&vt)) - chVTResetI(&vt); - chSysUnlock(); + chVTReset(&vt); } } @@ -115,7 +112,7 @@ static msg_t spi_thread(void *p) { * This is a periodic thread that does absolutely nothing except flashing * a LED. */ -static WORKING_AREA(waThread1, 128); +static THD_WORKING_AREA(waThread1, 128); static msg_t Thread1(void *arg) { (void)arg; @@ -166,9 +163,9 @@ int main(void) { /* Allocating two DMA2 streams for memory copy operations.*/ if (dmaStreamAllocate(STM32_DMA2_STREAM6, 0, NULL, NULL)) - chSysHalt(); + chSysHalt("DMA already in use"); if (dmaStreamAllocate(STM32_DMA2_STREAM7, 0, NULL, NULL)) - chSysHalt(); + chSysHalt("DMA already in use"); for (i = 0; i < sizeof (patterns1); i++) patterns1[i] = (uint8_t)i; for (i = 0; i < sizeof (patterns2); i++) @@ -177,13 +174,13 @@ int main(void) { /* Normal main() thread activity, it does continues memory copy operations using 2 DMA streams at the lowest priority.*/ while (TRUE) { - VirtualTimer vt; + virtual_timer_t vt; + + chVTObjectInit(&vt); /* Starts a VT working as watchdog to catch a malfunction in the DMA driver.*/ - chSysLock(); - chVTSetI(&vt, MS2ST(10), tmo, NULL); - chSysUnlock(); + chVTSet(&vt, MS2ST(10), tmo, NULL); /* Copy pattern 1.*/ dmaStartMemCopy(STM32_DMA2_STREAM6, @@ -197,9 +194,9 @@ int main(void) { dmaWaitCompletion(STM32_DMA2_STREAM6); dmaWaitCompletion(STM32_DMA2_STREAM7); if (memcmp(patterns1, buf1, sizeof (patterns1))) - chSysHalt(); + chSysHalt("pattern error"); if (memcmp(patterns1, buf2, sizeof (patterns1))) - chSysHalt(); + chSysHalt("pattern error"); /* Copy pattern 2.*/ dmaStartMemCopy(STM32_DMA2_STREAM6, @@ -213,15 +210,12 @@ int main(void) { dmaWaitCompletion(STM32_DMA2_STREAM6); dmaWaitCompletion(STM32_DMA2_STREAM7); if (memcmp(patterns2, buf1, sizeof (patterns2))) - chSysHalt(); + chSysHalt("pattern error"); if (memcmp(patterns2, buf2, sizeof (patterns2))) - chSysHalt(); + chSysHalt("pattern error"); /* Stops the watchdog.*/ - chSysLock(); - if (chVTIsArmedI(&vt)) - chVTResetI(&vt); - chSysUnlock(); + chVTReset(&vt); chThdSleepMilliseconds(2); } diff --git a/testhal/STM32F4xx/DMA_STORM/mcuconf.h b/testhal/STM32F4xx/DMA_STORM/mcuconf.h index e89e1abd0..ca926eff4 100644 --- a/testhal/STM32F4xx/DMA_STORM/mcuconf.h +++ b/testhal/STM32F4xx/DMA_STORM/mcuconf.h @@ -82,8 +82,8 @@ /* * CAN driver system settings. */ -#define STM32_CAN_USE_CAN1 FALSE -#define STM32_CAN_USE_CAN2 FALSE +#define STM32_CAN_USE_CAN1 TRUE +#define STM32_CAN_USE_CAN2 TRUE #define STM32_CAN_CAN1_IRQ_PRIORITY 11 #define STM32_CAN_CAN2_IRQ_PRIORITY 11 diff --git a/testhal/STM32F4xx/EXT/.cproject b/testhal/STM32F4xx/EXT/.cproject index 59e262be9..b7cb49ea0 100644 --- a/testhal/STM32F4xx/EXT/.cproject +++ b/testhal/STM32F4xx/EXT/.cproject @@ -48,4 +48,5 @@ + diff --git a/testhal/STM32F4xx/EXT/Makefile b/testhal/STM32F4xx/EXT/Makefile index 814be9864..29f0682fa 100644 --- a/testhal/STM32F4xx/EXT/Makefile +++ b/testhal/STM32F4xx/EXT/Makefile @@ -66,11 +66,11 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/osal/chibios/osal.mk include $(CHIBIOS)/os/hal/boards/ST_STM32F4_DISCOVERY/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F4xx/platform.mk include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/devices/STM32F4xx/port.mk +include $(CHIBIOS)/os/rt/osal/osal.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f4xx.mk #include $(CHIBIOS)/test/test.mk # Define linker script file here @@ -222,4 +222,4 @@ ifeq ($(USE_FWLIB),yes) USE_OPT += -DUSE_STDPERIPH_DRIVER endif -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/rules.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/rules.mk diff --git a/testhal/STM32F4xx/GPT/.cproject b/testhal/STM32F4xx/GPT/.cproject index 4933adfbb..11c951acb 100644 --- a/testhal/STM32F4xx/GPT/.cproject +++ b/testhal/STM32F4xx/GPT/.cproject @@ -48,4 +48,5 @@ + diff --git a/testhal/STM32F4xx/GPT/Makefile b/testhal/STM32F4xx/GPT/Makefile index 814be9864..29f0682fa 100644 --- a/testhal/STM32F4xx/GPT/Makefile +++ b/testhal/STM32F4xx/GPT/Makefile @@ -66,11 +66,11 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/osal/chibios/osal.mk include $(CHIBIOS)/os/hal/boards/ST_STM32F4_DISCOVERY/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F4xx/platform.mk include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/devices/STM32F4xx/port.mk +include $(CHIBIOS)/os/rt/osal/osal.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f4xx.mk #include $(CHIBIOS)/test/test.mk # Define linker script file here @@ -222,4 +222,4 @@ ifeq ($(USE_FWLIB),yes) USE_OPT += -DUSE_STDPERIPH_DRIVER endif -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/rules.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/rules.mk diff --git a/testhal/STM32F4xx/I2C/.cproject b/testhal/STM32F4xx/I2C/.cproject index 5effe9a53..8ceae86ea 100644 --- a/testhal/STM32F4xx/I2C/.cproject +++ b/testhal/STM32F4xx/I2C/.cproject @@ -48,4 +48,5 @@ + diff --git a/testhal/STM32F4xx/I2C/Makefile b/testhal/STM32F4xx/I2C/Makefile index b9c898e6b..8d7193808 100644 --- a/testhal/STM32F4xx/I2C/Makefile +++ b/testhal/STM32F4xx/I2C/Makefile @@ -66,11 +66,11 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/osal/chibios/osal.mk include $(CHIBIOS)/os/hal/boards/NONSTANDARD_STM32F4_BARTHESS1/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F4xx/platform.mk include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/devices/STM32F4xx/port.mk +include $(CHIBIOS)/os/rt/osal/osal.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f4xx.mk #include $(CHIBIOS)/test/test.mk # Define linker script file here @@ -222,4 +222,4 @@ ifeq ($(USE_FWLIB),yes) USE_OPT += -DUSE_STDPERIPH_DRIVER endif -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/rules.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/rules.mk diff --git a/testhal/STM32F4xx/IRQ_STORM/.cproject b/testhal/STM32F4xx/IRQ_STORM/.cproject index 1e9c4518b..bf4708179 100644 --- a/testhal/STM32F4xx/IRQ_STORM/.cproject +++ b/testhal/STM32F4xx/IRQ_STORM/.cproject @@ -48,4 +48,5 @@ + diff --git a/testhal/STM32F4xx/IRQ_STORM/Makefile b/testhal/STM32F4xx/IRQ_STORM/Makefile index 814be9864..29f0682fa 100644 --- a/testhal/STM32F4xx/IRQ_STORM/Makefile +++ b/testhal/STM32F4xx/IRQ_STORM/Makefile @@ -66,11 +66,11 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/osal/chibios/osal.mk include $(CHIBIOS)/os/hal/boards/ST_STM32F4_DISCOVERY/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F4xx/platform.mk include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/devices/STM32F4xx/port.mk +include $(CHIBIOS)/os/rt/osal/osal.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f4xx.mk #include $(CHIBIOS)/test/test.mk # Define linker script file here @@ -222,4 +222,4 @@ ifeq ($(USE_FWLIB),yes) USE_OPT += -DUSE_STDPERIPH_DRIVER endif -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/rules.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/rules.mk diff --git a/testhal/STM32F4xx/IRQ_STORM/main.c b/testhal/STM32F4xx/IRQ_STORM/main.c index c3475a911..bc34ba149 100644 --- a/testhal/STM32F4xx/IRQ_STORM/main.c +++ b/testhal/STM32F4xx/IRQ_STORM/main.c @@ -57,7 +57,7 @@ static msg_t b[NUM_THREADS][MAILBOX_SIZE]; /* * Test worker threads. */ -static WORKING_AREA(waWorkerThread[NUM_THREADS], 128); +static THD_WORKING_AREA(waWorkerThread[NUM_THREADS], 128); static msg_t WorkerThread(void *arg) { static volatile unsigned x = 0; static unsigned cnt = 0; @@ -239,19 +239,19 @@ int main(void) { println(CH_KERNEL_VERSION); print("*** Compiled: "); println(__DATE__ " - " __TIME__); -#ifdef CH_COMPILER_NAME +#ifdef PORT_COMPILER_NAME print("*** Compiler: "); - println(CH_COMPILER_NAME); + println(PORT_COMPILER_NAME); #endif print("*** Architecture: "); - println(CH_ARCHITECTURE_NAME); -#ifdef CH_CORE_VARIANT_NAME + println(PORT_ARCHITECTURE_NAME); +#ifdef PORT_CORE_VARIANT_NAME print("*** Core Variant: "); - println(CH_CORE_VARIANT_NAME); + println(PORT_CORE_VARIANT_NAME); #endif -#ifdef CH_PORT_INFO +#ifdef PORT_INFO print("*** Port Info: "); - println(CH_PORT_INFO); + println(PORT_INFO); #endif #ifdef PLATFORM_NAME print("*** Platform: "); diff --git a/testhal/STM32F4xx/IRQ_STORM_FPU/.cproject b/testhal/STM32F4xx/IRQ_STORM_FPU/.cproject index 22b5f4d43..304afdf99 100644 --- a/testhal/STM32F4xx/IRQ_STORM_FPU/.cproject +++ b/testhal/STM32F4xx/IRQ_STORM_FPU/.cproject @@ -48,4 +48,5 @@ + diff --git a/testhal/STM32F4xx/IRQ_STORM_FPU/Makefile b/testhal/STM32F4xx/IRQ_STORM_FPU/Makefile index f4d323f56..7d5bebb59 100644 --- a/testhal/STM32F4xx/IRQ_STORM_FPU/Makefile +++ b/testhal/STM32F4xx/IRQ_STORM_FPU/Makefile @@ -66,11 +66,11 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/osal/chibios/osal.mk include $(CHIBIOS)/os/hal/boards/ST_STM32F4_DISCOVERY/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F4xx/platform.mk include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/devices/STM32F4xx/port.mk +include $(CHIBIOS)/os/rt/osal/osal.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f4xx.mk #include $(CHIBIOS)/test/test.mk # Define linker script file here @@ -222,4 +222,4 @@ ifeq ($(USE_FWLIB),yes) USE_OPT += -DUSE_STDPERIPH_DRIVER endif -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/rules.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/rules.mk diff --git a/testhal/STM32F4xx/IRQ_STORM_FPU/main.c b/testhal/STM32F4xx/IRQ_STORM_FPU/main.c index 0f67bc3af..4b925d600 100644 --- a/testhal/STM32F4xx/IRQ_STORM_FPU/main.c +++ b/testhal/STM32F4xx/IRQ_STORM_FPU/main.c @@ -44,7 +44,7 @@ static bool saturated; /* * Test worker thread. */ -static WORKING_AREA(waWorkerThread, 128); +static THD_WORKING_AREA(waWorkerThread, 128); static msg_t WorkerThread(void *arg) { (void)arg; @@ -66,7 +66,7 @@ static msg_t WorkerThread(void *arg) { /* * Test periodic thread. */ -static WORKING_AREA(waPeriodicThread, 128); +static THD_WORKING_AREA(waPeriodicThread, 128); static msg_t PeriodicThread(void *arg) { (void)arg; @@ -218,19 +218,19 @@ int main(void) { println(CH_KERNEL_VERSION); print("*** Compiled: "); println(__DATE__ " - " __TIME__); -#ifdef CH_COMPILER_NAME +#ifdef PORT_COMPILER_NAME print("*** Compiler: "); - println(CH_COMPILER_NAME); + println(PORT_COMPILER_NAME); #endif print("*** Architecture: "); - println(CH_ARCHITECTURE_NAME); -#ifdef CH_CORE_VARIANT_NAME + println(PORT_ARCHITECTURE_NAME); +#ifdef PORT_CORE_VARIANT_NAME print("*** Core Variant: "); - println(CH_CORE_VARIANT_NAME); + println(PORT_CORE_VARIANT_NAME); #endif -#ifdef CH_PORT_INFO +#ifdef PORT_INFO print("*** Port Info: "); - println(CH_PORT_INFO); + println(PORT_INFO); #endif #ifdef PLATFORM_NAME print("*** Platform: "); diff --git a/testhal/STM32F4xx/PWM-ICU/.cproject b/testhal/STM32F4xx/PWM-ICU/.cproject index 940a1c9d5..681cedec5 100644 --- a/testhal/STM32F4xx/PWM-ICU/.cproject +++ b/testhal/STM32F4xx/PWM-ICU/.cproject @@ -48,4 +48,5 @@ + diff --git a/testhal/STM32F4xx/PWM-ICU/Makefile b/testhal/STM32F4xx/PWM-ICU/Makefile index 814be9864..29f0682fa 100644 --- a/testhal/STM32F4xx/PWM-ICU/Makefile +++ b/testhal/STM32F4xx/PWM-ICU/Makefile @@ -66,11 +66,11 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/osal/chibios/osal.mk include $(CHIBIOS)/os/hal/boards/ST_STM32F4_DISCOVERY/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F4xx/platform.mk include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/devices/STM32F4xx/port.mk +include $(CHIBIOS)/os/rt/osal/osal.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f4xx.mk #include $(CHIBIOS)/test/test.mk # Define linker script file here @@ -222,4 +222,4 @@ ifeq ($(USE_FWLIB),yes) USE_OPT += -DUSE_STDPERIPH_DRIVER endif -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/rules.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/rules.mk diff --git a/testhal/STM32F4xx/RTC/.cproject b/testhal/STM32F4xx/RTC/.cproject index 685ffe5f1..698b866bf 100644 --- a/testhal/STM32F4xx/RTC/.cproject +++ b/testhal/STM32F4xx/RTC/.cproject @@ -48,4 +48,5 @@ + diff --git a/testhal/STM32F4xx/RTC/Makefile b/testhal/STM32F4xx/RTC/Makefile index e383fef85..b9d5cc989 100644 --- a/testhal/STM32F4xx/RTC/Makefile +++ b/testhal/STM32F4xx/RTC/Makefile @@ -66,7 +66,7 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/boards/NONSTANDARD_STM32F4_BARTHESS1/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F4xx/platform.mk include $(CHIBIOS)/os/hal/hal.mk include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk include $(CHIBIOS)/os/kernel/kernel.mk diff --git a/testhal/STM32F4xx/SDC/Makefile b/testhal/STM32F4xx/SDC/Makefile index b22e616e5..ceb1bd074 100644 --- a/testhal/STM32F4xx/SDC/Makefile +++ b/testhal/STM32F4xx/SDC/Makefile @@ -69,7 +69,7 @@ LDSCRIPT= ch.ld # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/boards/NONSTANDARD_STM32F4_BARTHESS1/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F4xx/platform.mk include $(CHIBIOS)/os/hal/hal.mk include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk include $(CHIBIOS)/os/kernel/kernel.mk diff --git a/testhal/STM32F4xx/SPI/.cproject b/testhal/STM32F4xx/SPI/.cproject index 6b2c42453..e05dca097 100644 --- a/testhal/STM32F4xx/SPI/.cproject +++ b/testhal/STM32F4xx/SPI/.cproject @@ -48,4 +48,5 @@ + diff --git a/testhal/STM32F4xx/SPI/Makefile b/testhal/STM32F4xx/SPI/Makefile index 814be9864..29f0682fa 100644 --- a/testhal/STM32F4xx/SPI/Makefile +++ b/testhal/STM32F4xx/SPI/Makefile @@ -66,11 +66,11 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/osal/chibios/osal.mk include $(CHIBIOS)/os/hal/boards/ST_STM32F4_DISCOVERY/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F4xx/platform.mk include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/devices/STM32F4xx/port.mk +include $(CHIBIOS)/os/rt/osal/osal.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f4xx.mk #include $(CHIBIOS)/test/test.mk # Define linker script file here @@ -222,4 +222,4 @@ ifeq ($(USE_FWLIB),yes) USE_OPT += -DUSE_STDPERIPH_DRIVER endif -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/rules.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/rules.mk diff --git a/testhal/STM32F4xx/SPI/main.c b/testhal/STM32F4xx/SPI/main.c index 04999434b..3028c2113 100644 --- a/testhal/STM32F4xx/SPI/main.c +++ b/testhal/STM32F4xx/SPI/main.c @@ -46,7 +46,7 @@ static uint8_t rxbuf[512]; /* * SPI bus contender 1. */ -static WORKING_AREA(spi_thread_1_wa, 256); +static THD_WORKING_AREA(spi_thread_1_wa, 256); static msg_t spi_thread_1(void *p) { (void)p; @@ -67,7 +67,7 @@ static msg_t spi_thread_1(void *p) { /* * SPI bus contender 2. */ -static WORKING_AREA(spi_thread_2_wa, 256); +static THD_WORKING_AREA(spi_thread_2_wa, 256); static msg_t spi_thread_2(void *p) { (void)p; diff --git a/testhal/STM32F4xx/UART/Makefile b/testhal/STM32F4xx/UART/Makefile index 814be9864..29f0682fa 100644 --- a/testhal/STM32F4xx/UART/Makefile +++ b/testhal/STM32F4xx/UART/Makefile @@ -66,11 +66,11 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/os/hal/hal.mk -include $(CHIBIOS)/os/hal/osal/chibios/osal.mk include $(CHIBIOS)/os/hal/boards/ST_STM32F4_DISCOVERY/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F4xx/platform.mk include $(CHIBIOS)/os/rt/rt.mk -include $(CHIBIOS)/os/rt/ports/ARMCMx/devices/STM32F4xx/port.mk +include $(CHIBIOS)/os/rt/osal/osal.mk +include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/mk/port_stm32f4xx.mk #include $(CHIBIOS)/test/test.mk # Define linker script file here @@ -222,4 +222,4 @@ ifeq ($(USE_FWLIB),yes) USE_OPT += -DUSE_STDPERIPH_DRIVER endif -include $(CHIBIOS)/os/rt/ports/ARMCMx/compilers/GCC/rules.mk +include $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC/rules.mk diff --git a/testhal/STM32F4xx/USB_CDC/Makefile b/testhal/STM32F4xx/USB_CDC/Makefile index 8c329e2d7..8c66a2a3d 100644 --- a/testhal/STM32F4xx/USB_CDC/Makefile +++ b/testhal/STM32F4xx/USB_CDC/Makefile @@ -66,7 +66,7 @@ PROJECT = ch # Imported source files and paths CHIBIOS = ../../.. include $(CHIBIOS)/boards/OLIMEX_STM32_E407/board.mk -include $(CHIBIOS)/os/hal/platforms/STM32F4xx/platform.mk +include $(CHIBIOS)/os/hal/ports/STM32F4xx/platform.mk include $(CHIBIOS)/os/hal/hal.mk include $(CHIBIOS)/os/ports/GCC/ARMCMx/STM32F4xx/port.mk include $(CHIBIOS)/os/kernel/kernel.mk