Skip to content

Commit

Permalink
Merge pull request #387 from ChibiOS/chibios-21.11.x-fix-CI
Browse files Browse the repository at this point in the history
Fixes for CI compilation
  • Loading branch information
fpoussin committed Jan 20, 2024
2 parents 9b3d602 + 1ce1880 commit 552157b
Show file tree
Hide file tree
Showing 125 changed files with 164 additions and 148 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ jobs:
run: |
$CHC_PATH/tools/chbuild.sh $CHC_PATH/testhal/WB32
$CHC_PATH/tools/chbuild.sh $CHC_PATH/demos/WB32
- name: build NUMICRO
run: |
$CHC_PATH/tools/chbuild.sh $CHC_PATH/testhal/NUMICRO
$CHC_PATH/tools/chbuild.sh $CHC_PATH/demos/NUMICRO
- name: build RP
run: |
$CHC_PATH/tools/chbuild.sh $CHC_PATH/testhal/RP
Expand Down
2 changes: 1 addition & 1 deletion demos/GD32VF103/USB_CDC_IAD/cfg/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
2 changes: 1 addition & 1 deletion demos/HT32/HT32F165x_USB_DFU/cfg/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
2 changes: 1 addition & 1 deletion demos/KINETIS/RT-FREEDOM-K20D50M/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
2 changes: 1 addition & 1 deletion demos/KINETIS/RT-FREEDOM-KL25Z-SHELL/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
2 changes: 1 addition & 1 deletion demos/KINETIS/RT-FREEDOM-KL25Z/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
2 changes: 1 addition & 1 deletion demos/KINETIS/RT-MCHCK-K20-GPT/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
2 changes: 1 addition & 1 deletion demos/KINETIS/RT-MCHCK-K20-SPI/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
2 changes: 1 addition & 1 deletion demos/KINETIS/RT-TEENSY3/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
2 changes: 1 addition & 1 deletion demos/KINETIS/RT-TEENSY3_6/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
2 changes: 1 addition & 1 deletion demos/LPC/LPC_11U35_USBDFU/cfg/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
2 changes: 1 addition & 1 deletion demos/MIMXRT1062/RT-TEENSY4_1/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
2 changes: 1 addition & 1 deletion demos/MSP430X/NIL-EXP430FR5969/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
2 changes: 1 addition & 1 deletion demos/MSP430X/NIL-EXP430FR6989/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
2 changes: 1 addition & 1 deletion demos/NRF51/MICROBIT/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
2 changes: 1 addition & 1 deletion demos/NRF51/OSHCHIP_V1.0/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
2 changes: 1 addition & 1 deletion demos/NRF51/RT-WVSHARE_BLE400/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
2 changes: 1 addition & 1 deletion demos/NRF52/Classic/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
2 changes: 1 addition & 1 deletion demos/STM32/RT-STM32F303-DISCOVERY-PID/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
2 changes: 1 addition & 1 deletion demos/STM32/RT-STM32F411-DISCOVERY-blinker/cfg/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
2 changes: 1 addition & 1 deletion demos/STM32/RT-STM32F429-DISCOVERY-DMA2D/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
2 changes: 1 addition & 1 deletion demos/STM32/RT-STM32F429-DISCOVERY-TRIBUF/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
2 changes: 1 addition & 1 deletion demos/TIVA/RT-TM4C123G-LAUNCHPAD/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
//#define _CHIBIOS_HAL_CONF_VER_8_0_
//#define _CHIBIOS_HAL_CONF_VER_8_4_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"
Expand Down
2 changes: 1 addition & 1 deletion demos/TIVA/RT-TM4C1294-LAUNCHPAD-LWIP/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
//#define _CHIBIOS_HAL_CONF_VER_8_0_
//#define _CHIBIOS_HAL_CONF_VER_8_4_
define _CHIBIOS_HAL_CONF_VER_7_1_

#include "mcuconf.h"
Expand Down
2 changes: 1 addition & 1 deletion demos/TIVA/RT-TM4C1294-LAUNCHPAD/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
//#define _CHIBIOS_HAL_CONF_VER_8_0_
//#define _CHIBIOS_HAL_CONF_VER_8_4_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"
Expand Down
2 changes: 1 addition & 1 deletion demos/various/RT-Win32-TriBuf/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
35 changes: 22 additions & 13 deletions os/hal/ports/SAM/LLD/SERCOMv1/hal_sio_lld.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,47 +177,47 @@ static inline void usart_enable_tx_end_irq(SIODriver *siop) {
* @notapi
*/
void sio_lld_serve_interrupt(SIODriver *siop) {
osalDbgAssert(siop->state == SIO_ACTIVE, "invalid state");
osalDbgAssert(siop->state == SIO_READY, "invalid state");
uint8_t intflag = siop->usart->SERCOM_INTFLAG;
uint8_t intenset = siop->usart->SERCOM_INTENSET;
uint8_t evtmask = intflag & (SERCOM_USART_INT_INTFLAG_ERROR_Msk |
SERCOM_USART_INT_INTFLAG_RXBRK_Msk);
if(evtmask != 0) {
siop->usart->SERCOM_INTENCLR = (SERCOM_USART_INT_INTENCLR_ERROR_Msk | SERCOM_USART_INT_INTENCLR_RXBRK_Msk);
__sio_callback_rx_evt(siop);
__sio_callback(siop);

/* Waiting thread woken, if any.*/
__sio_wakeup_rx(siop, SIO_MSG_ERRORS);
__sio_wakeup_rx(siop);
}
if((intflag & SERCOM_USART_INT_INTFLAG_RXC_Msk) &&
(intenset & SERCOM_USART_INT_INTENSET_RXC_Msk)) {
siop->usart->SERCOM_INTENCLR = SERCOM_USART_INT_INTENCLR_RXC_Msk;
/* The callback is invoked if defined.*/
__sio_callback_rx(siop);
__sio_callback(siop);

/* Waiting thread woken, if any.*/
__sio_wakeup_rx(siop, MSG_OK);
__sio_wakeup_rx(siop);
}
/* TX FIFO is non-full.*/
if ((intflag & SERCOM_USART_INT_INTFLAG_DRE_Msk) &&
(intenset & SERCOM_USART_INT_INTENSET_DRE_Msk)) {
siop->usart->SERCOM_INTENCLR = SERCOM_USART_INT_INTENCLR_DRE_Msk;
/* The callback is invoked if defined.*/
__sio_callback_tx(siop);
__sio_callback(siop);

/* Waiting thread woken, if any.*/
__sio_wakeup_tx(siop, MSG_OK);
__sio_wakeup_tx(siop);
}

/* Physical transmission end.*/
if ((intflag & SERCOM_USART_INT_INTFLAG_TXC_Msk) &&
(intenset & SERCOM_USART_INT_INTENSET_TXC_Msk)) {
siop->usart->SERCOM_INTENCLR = SERCOM_USART_INT_INTENCLR_TXC_Msk;
/* The callback is invoked if defined.*/
__sio_callback_tx_end(siop);
__sio_callback(siop);

/* Waiting thread woken, if any.*/
__sio_wakeup_txend(siop, MSG_OK);
__sio_wakeup_txend(siop);
}
}

Expand Down Expand Up @@ -533,16 +533,16 @@ sio_events_mask_t sio_lld_get_and_clear_events(SIODriver *siop) {
status = (uint8_t)(siop->usart->SERCOM_STATUS);
irq_status = (uint8_t)(siop->usart->SERCOM_INTFLAG);
if(status & SERCOM_USART_INT_STATUS_BUFOVF_Msk) {
evtmask |= SIO_OVERRUN_ERROR;
evtmask |= SD_OVERRUN_ERROR;
}
if(status & SERCOM_USART_INT_STATUS_FERR_Msk) {
evtmask |= SIO_FRAMING_ERROR;
evtmask |= SD_FRAMING_ERROR;
}
if(status & SERCOM_USART_INT_STATUS_PERR_Msk) {
evtmask |= SIO_PARITY_ERROR;
evtmask |= SD_PARITY_ERROR;
}
if(irq_status & SERCOM_USART_INT_INTFLAG_RXBRK_Msk) {
evtmask |= SIO_BREAK_DETECTED;
evtmask |= SD_BREAK_DETECTED;
irq_status |= SERCOM_USART_INT_INTFLAG_RXBRK_Msk;
}

Expand Down Expand Up @@ -690,6 +690,15 @@ msg_t sio_lld_control(SIODriver *siop, unsigned int operation, void *arg) {
return MSG_OK;
}

/**
* @brief Enable flags change notification.
*
* @param[in] siop pointer to the @p SIODriver object
*/
void sio_lld_update_enable_flags(SIODriver *siop) {

(void)siop;
}

#endif /* HAL_USE_SIO == TRUE */

Expand Down
14 changes: 14 additions & 0 deletions os/hal/ports/SAM/LLD/SERCOMv1/hal_sio_lld.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,20 @@ typedef uint32_t sio_events_mask_t;
#define sio_lld_is_tx_ongoing(siop) !((siop->usart->SERCOM_INTFLAG & SERCOM_USART_INT_INTFLAG_TXC_Msk) == \
SERCOM_USART_INT_INTFLAG_TXC_Msk)

/**
* @brief Determines if RX has pending error events to be read and cleared.
* @note Only error and protocol errors are handled, data events are not
* considered.
*
* @param[in] siop pointer to the @p SIODriver object
* @return The RX error events.
* @retval false if RX has no pending events
* @retval true if RX has pending events
*
* @notapi
*/
#define sio_lld_has_rx_errors(siop) false

/*===========================================================================*/
/* External declarations. */
/*===========================================================================*/
Expand Down
2 changes: 1 addition & 1 deletion testhal/KINETIS/FRDM-K20D50M/I2C/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
2 changes: 1 addition & 1 deletion testhal/KINETIS/FRDM-K20D50M/USB_SERIAL/halconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define HALCONF_H

#define _CHIBIOS_HAL_CONF_
#define _CHIBIOS_HAL_CONF_VER_8_0_
#define _CHIBIOS_HAL_CONF_VER_8_4_

#include "mcuconf.h"

Expand Down
Loading

0 comments on commit 552157b

Please sign in to comment.