diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eb91a231..e7deb9e0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -219,8 +219,8 @@ jobs: run: sudo apt -y update; sudo apt -y install gcc-arm-none-eabi - if: ${{ env.GO == 1 }} run: make -C examples/stm32/nucleo-h723zg-make-baremetal-builtin test VCON_API_KEY=${{secrets.VCON_API_KEY}} -# - if: ${{ env.GO == 1 }} -# WIP run: make -C examples/stm32/nucleo-h723zg-make-freertos-builtin test VCON_API_KEY=${{secrets.VCON_API_KEY}} + - if: ${{ env.GO == 1 }} + run: make -C examples/stm32/nucleo-h723zg-make-freertos-builtin test VCON_API_KEY=${{secrets.VCON_API_KEY}} test_h5: runs-on: ubuntu-latest diff --git a/examples/stm32/nucleo-h723zg-make-freertos-builtin/FreeRTOSConfig.h b/examples/stm32/nucleo-h723zg-make-freertos-builtin/FreeRTOSConfig.h index 60e40d43..7d616492 100644 --- a/examples/stm32/nucleo-h723zg-make-freertos-builtin/FreeRTOSConfig.h +++ b/examples/stm32/nucleo-h723zg-make-freertos-builtin/FreeRTOSConfig.h @@ -35,4 +35,4 @@ #define vPortSVCHandler SVC_Handler #define xPortPendSVHandler PendSV_Handler -#define xPortSysTickHandler SysTick_Handler +//#define xPortSysTickHandler SysTick_Handler diff --git a/examples/stm32/nucleo-h723zg-make-freertos-builtin/main.c b/examples/stm32/nucleo-h723zg-make-freertos-builtin/main.c index 272030a9..7c261536 100644 --- a/examples/stm32/nucleo-h723zg-make-freertos-builtin/main.c +++ b/examples/stm32/nucleo-h723zg-make-freertos-builtin/main.c @@ -7,6 +7,14 @@ #define BLINK_PERIOD_MS 1000 // LED blinking period in millis +// workaround optimizer somehow causing SysTick to fire before FreeRTOS has +// fully initialized +extern void xPortSysTickHandler(void); +void SysTick_Handler(void) { + if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED) + xPortSysTickHandler(); +} + void mg_random(void *buf, size_t len) { // Use on-board RNG for (size_t n = 0; n < len; n += sizeof(uint32_t)) { uint32_t r = rng_read(); @@ -67,7 +75,7 @@ int main(void) { uart_init(UART_DEBUG, 115200); // Initialise UART // Start tasks. NOTE: stack sizes are in 32-bit words - xTaskCreate(blinker, "blinker", 128, ":)", configMAX_PRIORITIES - 1, NULL); + xTaskCreate(blinker, "blinker", 128, ":)", configMAX_PRIORITIES - 2, NULL); xTaskCreate(server, "server", 2048, 0, configMAX_PRIORITIES - 1, NULL); vTaskStartScheduler(); // This blocks