From b5bdbeaea952e4c90c9d79a2c6cd73fdf012e2ea Mon Sep 17 00:00:00 2001 From: MMS Date: Tue, 24 Jan 2023 09:50:17 -0500 Subject: [PATCH] 2.0.1 2.0.1 2.0.1 changed STM32 GPIO code in BSPs --- README.md | 4 +- img/blinky_button.pvs | 26 +++--- .../blinky_button/bsp_nucleo-h743zi.c | 76 +++------------- .../blinky_button/bsp_nucleo-l053r8.c | 84 +++--------------- .../blinky_button/bsp_nucleo-h743zi.cpp | 88 ++++--------------- .../blinky_button/bsp_nucleo-l053r8.cpp | 84 +++--------------- .../armclang/nucleo-h743zi.uvoptx | 19 +++- .../blinky_button/bsp_nucleo-h743zi.c | 76 +++------------- .../blinky_button/bsp_nucleo-l053r8.c | 84 +++--------------- .../armclang/nucleo-l053r8.uvoptx | 19 +--- .../blinky_button/bsp_nucleo-h743zi.cpp | 88 ++++--------------- .../blinky_button/bsp_nucleo-l053r8.cpp | 84 +++--------------- 12 files changed, 142 insertions(+), 590 deletions(-) diff --git a/README.md b/README.md index 70d1df2..683685e 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ [![Quantum Leaps](https://www.state-machine.com/attachments/logo_ql_400.png)](https://www.state-machine.com)
-[![GitHub release (latest by date)](https://img.shields.io/github/v/release/QuantumLeaps/Super-Simple-Tasker)](https://github.com/QuantumLeaps/ET/releases/latest) -[![GitHub](https://img.shields.io/github/license/QuantumLeaps/Super-Simple-Tasker)](https://github.com/QuantumLeaps/Super-Simple-Tasker/blob/master/LICENSE.md) +[![GitHub release (latest by date)](https://img.shields.io/github/v/release/QuantumLeaps/Super-Simple-Tasker)](https://github.com/QuantumLeaps/Super-Simple-Tasker/releases/latest) +[![GitHub](https://img.shields.io/github/license/QuantumLeaps/Super-Simple-Tasker)](https://github.com/QuantumLeaps/Super-Simple-Tasker/blob/master/LICENSE) # Super-Simple Tasker (SST) Super-Simple Tasker (SST) is an event-driven, preemptive, priority-based diff --git a/img/blinky_button.pvs b/img/blinky_button.pvs index 4dd630a..4fe24a9 100644 --- a/img/blinky_button.pvs +++ b/img/blinky_button.pvs @@ -1,3 +1,9 @@ +[General] +decode_signals=0 +generated_signals=0 +views=1 +meta_objs=1 + [D0] name=PB1 enabled=true @@ -6,7 +12,7 @@ conversion_type=0 conv_options=0 [D1] -name=ISR +name=SysTick enabled=true color=4287582722 conversion_type=0 @@ -54,18 +60,12 @@ color=4285878395 conversion_type=0 conv_options=0 -[General] -decode_signals=0 -generated_signals=0 -views=1 -meta_objs=1 - [view0] -scale=2.5453064548971696e-5 -v_offset=-10 -splitter_state=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\0^\0\0\x6W\x1\0\0\0\x1\x1\0\0\0\x1\0) +scale=3.183091418385535e-5 +v_offset=0 +splitter_state=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\0^\0\0\x5.\x1\0\0\0\x1\x1\0\0\0\x1\0) segment_display_mode=3 -offset=22 serialization::archive 14 0 0 0 0 0 0 0 0 0 0 0 0 0 6 +offset=22 serialization::archive 14 0 0 0 0 416495 94118729 95485619 43701371 90132099 12637656 -8 0 0 6 zero_offset=22 serialization::archive 14 0 0 0 0 0 0 0 0 0 0 0 0 0 6 D0\trace_height=80 D1\trace_height=80 @@ -79,5 +79,5 @@ D7\trace_height=80 [meta_obj0] type=selection assoc_view=0 -start_time=22 serialization::archive 14 0 0 0 0 1666404 16666666 67279583 79112806 14207498 32936046 -8 0 0 6 -end_time=22 serialization::archive 14 0 0 0 0 1667245 83333333 34268289 14980433 18279087 18666778 -8 0 0 6 +start_time=22 serialization::archive 14 0 0 0 0 1146079 16666666 66002716 29050666 88836086 13335114 -8 0 0 6 +end_time=22 serialization::archive 14 0 0 0 0 1146558 33333333 32835546 33652556 73124920 20470248 -8 0 0 6 diff --git a/sst0_c/examples/blinky_button/bsp_nucleo-h743zi.c b/sst0_c/examples/blinky_button/bsp_nucleo-h743zi.c index cee85d6..2ea95b6 100644 --- a/sst0_c/examples/blinky_button/bsp_nucleo-h743zi.c +++ b/sst0_c/examples/blinky_button/bsp_nucleo-h743zi.c @@ -146,103 +146,51 @@ static void exerciseFPU(double x) { /*..........................................................................*/ void BSP_d1on(void) { /* LED1-Green */ - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << TST1_PIN); - SST_PORT_CRIT_EXIT(); + GPIOB->BSRR = (1U << TST1_PIN); /* don't use the FPU in the ISR */ } void BSP_d1off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << (TST1_PIN + 16U)); - SST_PORT_CRIT_EXIT(); - /* don't use the FPU in the ISR */ + GPIOB->BSRR = (1U << (TST1_PIN + 16U)); } /*..........................................................................*/ void BSP_d2on(void) { /* LED3-Red */ - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << TST2_PIN); - SST_PORT_CRIT_EXIT(); - + GPIOB->BSRR = (1U << TST2_PIN); exerciseFPU(-1.2345); } void BSP_d2off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << (TST2_PIN + 16U)); - SST_PORT_CRIT_EXIT(); - - exerciseFPU(1.2345); + GPIOB->BSRR = (1U << (TST2_PIN + 16U)); } /*..........................................................................*/ void BSP_d3on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << TST3_PIN); - SST_PORT_CRIT_EXIT(); - + GPIOB->BSRR = (1U << TST3_PIN); exerciseFPU(-12.345); } void BSP_d3off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << (TST3_PIN + 16U)); - SST_PORT_CRIT_EXIT(); - - exerciseFPU(12.345); + GPIOB->BSRR = (1U << (TST3_PIN + 16U)); } /*..........................................................................*/ void BSP_d4on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << TST4_PIN); - SST_PORT_CRIT_EXIT(); - + GPIOB->BSRR = (1U << TST4_PIN); exerciseFPU(3.456); } void BSP_d4off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << (TST4_PIN + 16U)); - SST_PORT_CRIT_EXIT(); - - exerciseFPU(-3.456); + GPIOB->BSRR = (1U << (TST4_PIN + 16U)); } /*..........................................................................*/ void BSP_d5on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << TST5_PIN); - SST_PORT_CRIT_EXIT(); - + GPIOB->BSRR = (1U << TST5_PIN); exerciseFPU(4.567); } void BSP_d5off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << (TST5_PIN + 16U)); - SST_PORT_CRIT_EXIT(); - - exerciseFPU(-4.567); + GPIOB->BSRR = (1U << (TST5_PIN + 16U)); } /*..........................................................................*/ void BSP_d6on(void) { /* LED2-Blue */ - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << TST6_PIN); - SST_PORT_CRIT_EXIT(); - + GPIOB->BSRR = (1U << TST6_PIN); exerciseFPU(1.2345); } void BSP_d6off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << (TST6_PIN + 16U)); - SST_PORT_CRIT_EXIT(); - - exerciseFPU(-1.2345); + GPIOB->BSRR = (1U << (TST6_PIN + 16U)); } /*..........................................................................*/ diff --git a/sst0_c/examples/blinky_button/bsp_nucleo-l053r8.c b/sst0_c/examples/blinky_button/bsp_nucleo-l053r8.c index 6bfdf0e..9bb146f 100644 --- a/sst0_c/examples/blinky_button/bsp_nucleo-l053r8.c +++ b/sst0_c/examples/blinky_button/bsp_nucleo-l053r8.c @@ -134,83 +134,23 @@ void BSP_init(void) { } /*..........................................................................*/ -void BSP_d1on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << TST1_PIN); - SST_PORT_CRIT_EXIT(); -} -void BSP_d1off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << (TST1_PIN + 16U)); - SST_PORT_CRIT_EXIT(); -} +void BSP_d1on(void) { GPIOA->BSRR = (1U << TST1_PIN); } +void BSP_d1off(void) { GPIOA->BSRR = (1U << (TST1_PIN + 16U)); } /*..........................................................................*/ -void BSP_d2on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << TST2_PIN); - SST_PORT_CRIT_EXIT(); -} -void BSP_d2off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << (TST2_PIN + 16U)); - SST_PORT_CRIT_EXIT(); -} +void BSP_d2on(void) { GPIOA->BSRR = (1U << TST2_PIN); } +void BSP_d2off(void) { GPIOA->BSRR = (1U << (TST2_PIN + 16U)); } /*..........................................................................*/ -void BSP_d3on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << TST3_PIN); - SST_PORT_CRIT_EXIT(); -} -void BSP_d3off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << (TST3_PIN + 16U)); - SST_PORT_CRIT_EXIT(); -} +void BSP_d3on(void) { GPIOA->BSRR = (1U << TST3_PIN); } +void BSP_d3off(void) { GPIOA->BSRR = (1U << (TST3_PIN + 16U)); } /*..........................................................................*/ -void BSP_d4on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << TST4_PIN); - SST_PORT_CRIT_EXIT(); -} -void BSP_d4off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << (TST4_PIN + 16U)); - SST_PORT_CRIT_EXIT(); -} +void BSP_d4on(void) { GPIOA->BSRR = (1U << TST4_PIN); } +void BSP_d4off(void) { GPIOA->BSRR = (1U << (TST4_PIN + 16U)); } /*..........................................................................*/ -void BSP_d5on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << TST5_PIN); - SST_PORT_CRIT_EXIT(); -} -void BSP_d5off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << (TST5_PIN + 16U)); - SST_PORT_CRIT_EXIT(); -} +void BSP_d5on(void) { GPIOA->BSRR = (1U << TST5_PIN); } +void BSP_d5off(void) { GPIOA->BSRR = (1U << (TST5_PIN + 16U)); } /*..........................................................................*/ -void BSP_d6on(void) { /* LED2 */ - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << TST6_PIN); - SST_PORT_CRIT_EXIT(); -} -void BSP_d6off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << (TST6_PIN + 16U)); - SST_PORT_CRIT_EXIT(); -} +void BSP_d6on(void) { GPIOA->BSRR = (1U << TST6_PIN); } /* LED2 */ +void BSP_d6off(void) { GPIOA->BSRR = (1U << (TST6_PIN + 16U)); } /*..........................................................................*/ SST_Evt const *BSP_getWorkEvtBlinky1(uint8_t num) { diff --git a/sst0_cpp/examples/blinky_button/bsp_nucleo-h743zi.cpp b/sst0_cpp/examples/blinky_button/bsp_nucleo-h743zi.cpp index ca7db23..dcd587d 100644 --- a/sst0_cpp/examples/blinky_button/bsp_nucleo-h743zi.cpp +++ b/sst0_cpp/examples/blinky_button/bsp_nucleo-h743zi.cpp @@ -142,7 +142,7 @@ void init(void) { // enable GPIOB port clock for LEds and test pins RCC->AHB4ENR |= RCC_AHB4ENR_GPIOBEN; - /* set all used GPIOB pins as push-pull output, no pull-up, pull-down */ + // set all used GPIOB pins as push-pull output, no pull-up, pull-down GPIOB->MODER &= ~((3U << 2U*TST1_PIN) | (3U << 2U*TST2_PIN) | (3U << 2U*TST3_PIN) | (3U << 2U*TST4_PIN) | (3U << 2U*TST5_PIN) | (3U << 2U*TST6_PIN)); @@ -173,104 +173,52 @@ static void exerciseFPU(double x) { } //............................................................................ -void d1on(void) { // LED1-Green */ - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << TST1_PIN); - SST_PORT_CRIT_EXIT(); - /* don't use the FPU in the ISR */ +void d1on(void) { // LED1-Green + GPIOB->BSRR = (1U << TST1_PIN); + // don't use the FPU in the ISR } void d1off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << (TST1_PIN + 16U)); - SST_PORT_CRIT_EXIT(); - /* don't use the FPU in the ISR */ + GPIOB->BSRR = (1U << (TST1_PIN + 16U)); } //............................................................................ -void d2on(void) { /* LED3-Red */ - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << TST2_PIN); - SST_PORT_CRIT_EXIT(); - +void d2on(void) { // LED3-Red + GPIOB->BSRR = (1U << TST2_PIN); exerciseFPU(-1.2345); } void d2off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << (TST2_PIN + 16U)); - SST_PORT_CRIT_EXIT(); - - exerciseFPU(1.2345); + GPIOB->BSRR = (1U << (TST2_PIN + 16U)); } //............................................................................ void d3on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << TST3_PIN); - SST_PORT_CRIT_EXIT(); - + GPIOB->BSRR = (1U << TST3_PIN); exerciseFPU(-12.345); } void d3off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << (TST3_PIN + 16U)); - SST_PORT_CRIT_EXIT(); - - exerciseFPU(12.345); + GPIOB->BSRR = (1U << (TST3_PIN + 16U)); } //............................................................................ void d4on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << TST4_PIN); - SST_PORT_CRIT_EXIT(); - + GPIOB->BSRR = (1U << TST4_PIN); exerciseFPU(3.456); } void d4off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << (TST4_PIN + 16U)); - SST_PORT_CRIT_EXIT(); - - exerciseFPU(-3.456); + GPIOB->BSRR = (1U << (TST4_PIN + 16U)); } //............................................................................ void d5on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << TST5_PIN); - SST_PORT_CRIT_EXIT(); - + GPIOB->BSRR = (1U << TST5_PIN); exerciseFPU(4.567); } void d5off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << (TST5_PIN + 16U)); - SST_PORT_CRIT_EXIT(); - - exerciseFPU(-4.567); + GPIOB->BSRR = (1U << (TST5_PIN + 16U)); } //............................................................................ -void d6on(void) { /* LED2-Blue */ - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << TST6_PIN); - SST_PORT_CRIT_EXIT(); - +void d6on(void) { // LED2-Blue + GPIOB->BSRR = (1U << TST6_PIN); exerciseFPU(1.2345); } void d6off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << (TST6_PIN + 16U)); - SST_PORT_CRIT_EXIT(); - - exerciseFPU(-1.2345); + GPIOB->BSRR = (1U << (TST6_PIN + 16U)); } //............................................................................ @@ -285,7 +233,7 @@ SST::Evt const *getWorkEvtBlinky1(uint8_t num) { } //............................................................................ SST::Evt const *getWorkEvtBlinky3(uint8_t num) { - /* immutable work events for Blinky3 */ + // immutable work events for Blinky3 static App::BlinkyWorkEvt const workBlinky3[] = { { { App::BLINKY_WORK_SIG }, 20U, 5U }, { { App::BLINKY_WORK_SIG }, 10U, 3U } diff --git a/sst0_cpp/examples/blinky_button/bsp_nucleo-l053r8.cpp b/sst0_cpp/examples/blinky_button/bsp_nucleo-l053r8.cpp index d8cd331..b560335 100644 --- a/sst0_cpp/examples/blinky_button/bsp_nucleo-l053r8.cpp +++ b/sst0_cpp/examples/blinky_button/bsp_nucleo-l053r8.cpp @@ -157,83 +157,23 @@ void init(void) { GPIOC->PUPDR &= ~(3U << 2U*B1_PIN); } //............................................................................ -void d1on(void) { // LED1-Green */ - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << TST1_PIN); - SST_PORT_CRIT_EXIT(); -} -void d1off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << (TST1_PIN + 16U)); - SST_PORT_CRIT_EXIT(); -} +void d1on(void) { GPIOA->BSRR = (1U << TST1_PIN); } +void d1off(void) { GPIOA->BSRR = (1U << (TST1_PIN + 16U)); } //............................................................................ -void d2on(void) { /* LED3-Red */ - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << TST2_PIN); - SST_PORT_CRIT_EXIT(); -} -void d2off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << (TST2_PIN + 16U)); - SST_PORT_CRIT_EXIT(); -} +void d2on(void) { GPIOA->BSRR = (1U << TST2_PIN); } +void d2off(void) { GPIOA->BSRR = (1U << (TST2_PIN + 16U)); } //............................................................................ -void d3on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << TST3_PIN); - SST_PORT_CRIT_EXIT(); -} -void d3off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << (TST3_PIN + 16U)); - SST_PORT_CRIT_EXIT(); -} +void d3on(void) { GPIOA->BSRR = (1U << TST3_PIN); } +void d3off(void) { GPIOA->BSRR = (1U << (TST3_PIN + 16U)); } //............................................................................ -void d4on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << TST4_PIN); - SST_PORT_CRIT_EXIT(); -} -void d4off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << (TST4_PIN + 16U)); - SST_PORT_CRIT_EXIT(); -} +void d4on(void) { GPIOA->BSRR = (1U << TST4_PIN); } +void d4off(void) { GPIOA->BSRR = (1U << (TST4_PIN + 16U)); } //............................................................................ -void d5on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << TST5_PIN); - SST_PORT_CRIT_EXIT(); -} -void d5off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << (TST5_PIN + 16U)); - SST_PORT_CRIT_EXIT(); -} +void d5on(void) { GPIOA->BSRR = (1U << TST5_PIN); } +void d5off(void) { GPIOA->BSRR = (1U << (TST5_PIN + 16U)); } //............................................................................ -void d6on(void) { /* LED2-Blue */ - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << TST6_PIN); - SST_PORT_CRIT_EXIT(); -} -void d6off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << (TST6_PIN + 16U)); - SST_PORT_CRIT_EXIT(); -} +void d6on(void) { GPIOA->BSRR = (1U << TST6_PIN); } // LED2 +void d6off(void) { GPIOA->BSRR = (1U << (TST6_PIN + 16U)); } //............................................................................ SST::Evt const *getWorkEvtBlinky1(uint8_t num) { diff --git a/sst_c/examples/blinky_button/armclang/nucleo-h743zi.uvoptx b/sst_c/examples/blinky_button/armclang/nucleo-h743zi.uvoptx index 203a72d..b3ee36e 100644 --- a/sst_c/examples/blinky_button/armclang/nucleo-h743zi.uvoptx +++ b/sst_c/examples/blinky_button/armclang/nucleo-h743zi.uvoptx @@ -148,7 +148,24 @@ - + + + 0 + 0 + 283 + 1 +
134221674
+ 0 + 0 + 0 + 0 + 0 + 1 + ..\bsp_nucleo-h743zi.c + + \\blinky_button\../bsp_nucleo-h743zi.c\283 +
+
0 diff --git a/sst_c/examples/blinky_button/bsp_nucleo-h743zi.c b/sst_c/examples/blinky_button/bsp_nucleo-h743zi.c index a33623c..313a798 100644 --- a/sst_c/examples/blinky_button/bsp_nucleo-h743zi.c +++ b/sst_c/examples/blinky_button/bsp_nucleo-h743zi.c @@ -193,103 +193,51 @@ static void exerciseFPU(double x) { /*..........................................................................*/ void BSP_d1on(void) { /* LED1-Green */ - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << TST1_PIN); - SST_PORT_CRIT_EXIT(); + GPIOB->BSRR = (1U << TST1_PIN); /* don't use the FPU in the ISR */ } void BSP_d1off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << (TST1_PIN + 16U)); - SST_PORT_CRIT_EXIT(); - /* don't use the FPU in the ISR */ + GPIOB->BSRR = (1U << (TST1_PIN + 16U)); } /*..........................................................................*/ void BSP_d2on(void) { /* LED3-Red */ - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << TST2_PIN); - SST_PORT_CRIT_EXIT(); - + GPIOB->BSRR = (1U << TST2_PIN); exerciseFPU(-1.2345); } void BSP_d2off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << (TST2_PIN + 16U)); - SST_PORT_CRIT_EXIT(); - - exerciseFPU(1.2345); + GPIOB->BSRR = (1U << (TST2_PIN + 16U)); } /*..........................................................................*/ void BSP_d3on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << TST3_PIN); - SST_PORT_CRIT_EXIT(); - + GPIOB->BSRR = (1U << TST3_PIN); exerciseFPU(-12.345); } void BSP_d3off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << (TST3_PIN + 16U)); - SST_PORT_CRIT_EXIT(); - - exerciseFPU(12.345); + GPIOB->BSRR = (1U << (TST3_PIN + 16U)); } /*..........................................................................*/ void BSP_d4on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << TST4_PIN); - SST_PORT_CRIT_EXIT(); - + GPIOB->BSRR = (1U << TST4_PIN); exerciseFPU(3.456); } void BSP_d4off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << (TST4_PIN + 16U)); - SST_PORT_CRIT_EXIT(); - - exerciseFPU(-3.456); + GPIOB->BSRR = (1U << (TST4_PIN + 16U)); } /*..........................................................................*/ void BSP_d5on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << TST5_PIN); - SST_PORT_CRIT_EXIT(); - + GPIOB->BSRR = (1U << TST5_PIN); exerciseFPU(4.567); } void BSP_d5off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << (TST5_PIN + 16U)); - SST_PORT_CRIT_EXIT(); - - exerciseFPU(-4.567); + GPIOB->BSRR = (1U << (TST5_PIN + 16U)); } /*..........................................................................*/ void BSP_d6on(void) { /* LED2-Blue */ - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << TST6_PIN); - SST_PORT_CRIT_EXIT(); - + GPIOB->BSRR = (1U << TST6_PIN); exerciseFPU(1.2345); } void BSP_d6off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << (TST6_PIN + 16U)); - SST_PORT_CRIT_EXIT(); - - exerciseFPU(-1.2345); + GPIOB->BSRR = (1U << (TST6_PIN + 16U)); } /*..........................................................................*/ diff --git a/sst_c/examples/blinky_button/bsp_nucleo-l053r8.c b/sst_c/examples/blinky_button/bsp_nucleo-l053r8.c index 1b5fe45..ff081d6 100644 --- a/sst_c/examples/blinky_button/bsp_nucleo-l053r8.c +++ b/sst_c/examples/blinky_button/bsp_nucleo-l053r8.c @@ -172,83 +172,23 @@ void BSP_init(void) { } /*..........................................................................*/ -void BSP_d1on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << TST1_PIN); - SST_PORT_CRIT_EXIT(); -} -void BSP_d1off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << (TST1_PIN + 16U)); - SST_PORT_CRIT_EXIT(); -} +void BSP_d1on(void) { GPIOA->BSRR = (1U << TST1_PIN); } +void BSP_d1off(void) { GPIOA->BSRR = (1U << (TST1_PIN + 16U)); } /*..........................................................................*/ -void BSP_d2on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << TST2_PIN); - SST_PORT_CRIT_EXIT(); -} -void BSP_d2off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << (TST2_PIN + 16U)); - SST_PORT_CRIT_EXIT(); -} +void BSP_d2on(void) { GPIOA->BSRR = (1U << TST2_PIN); } +void BSP_d2off(void) { GPIOA->BSRR = (1U << (TST2_PIN + 16U)); } /*..........................................................................*/ -void BSP_d3on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << TST3_PIN); - SST_PORT_CRIT_EXIT(); -} -void BSP_d3off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << (TST3_PIN + 16U)); - SST_PORT_CRIT_EXIT(); -} +void BSP_d3on(void) { GPIOA->BSRR = (1U << TST3_PIN); } +void BSP_d3off(void) { GPIOA->BSRR = (1U << (TST3_PIN + 16U)); } /*..........................................................................*/ -void BSP_d4on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << TST4_PIN); - SST_PORT_CRIT_EXIT(); -} -void BSP_d4off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << (TST4_PIN + 16U)); - SST_PORT_CRIT_EXIT(); -} +void BSP_d4on(void) { GPIOA->BSRR = (1U << TST4_PIN); } +void BSP_d4off(void) { GPIOA->BSRR = (1U << (TST4_PIN + 16U)); } /*..........................................................................*/ -void BSP_d5on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << TST5_PIN); - SST_PORT_CRIT_EXIT(); -} -void BSP_d5off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << (TST5_PIN + 16U)); - SST_PORT_CRIT_EXIT(); -} +void BSP_d5on(void) { GPIOA->BSRR = (1U << TST5_PIN); } +void BSP_d5off(void) { GPIOA->BSRR = (1U << (TST5_PIN + 16U)); } /*..........................................................................*/ -void BSP_d6on(void) { /* LED2 */ - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << TST6_PIN); - SST_PORT_CRIT_EXIT(); -} -void BSP_d6off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << (TST6_PIN + 16U)); - SST_PORT_CRIT_EXIT(); -} +void BSP_d6on(void) { GPIOA->BSRR = (1U << TST6_PIN); } /* LED2 */ +void BSP_d6off(void) { GPIOA->BSRR = (1U << (TST6_PIN + 16U)); } /*..........................................................................*/ SST_Evt const *BSP_getWorkEvtBlinky1(uint8_t num) { diff --git a/sst_cpp/examples/blinky_button/armclang/nucleo-l053r8.uvoptx b/sst_cpp/examples/blinky_button/armclang/nucleo-l053r8.uvoptx index 207c0f9..45ebdd2 100644 --- a/sst_cpp/examples/blinky_button/armclang/nucleo-l053r8.uvoptx +++ b/sst_cpp/examples/blinky_button/armclang/nucleo-l053r8.uvoptx @@ -148,24 +148,7 @@ - - - 0 - 0 - 112 - 1 -
134218868
- 0 - 0 - 0 - 0 - 0 - 1 - ..\bsp_nucleo-l053r8.cpp - - \\blinky_button\../bsp_nucleo-l053r8.cpp\112 -
-
+ 1 diff --git a/sst_cpp/examples/blinky_button/bsp_nucleo-h743zi.cpp b/sst_cpp/examples/blinky_button/bsp_nucleo-h743zi.cpp index 87fa229..9a832a9 100644 --- a/sst_cpp/examples/blinky_button/bsp_nucleo-h743zi.cpp +++ b/sst_cpp/examples/blinky_button/bsp_nucleo-h743zi.cpp @@ -189,7 +189,7 @@ void init(void) { // enable GPIOB port clock for LEds and test pins RCC->AHB4ENR |= RCC_AHB4ENR_GPIOBEN; - /* set all used GPIOB pins as push-pull output, no pull-up, pull-down */ + // set all used GPIOB pins as push-pull output, no pull-up, pull-down GPIOB->MODER &= ~((3U << 2U*TST1_PIN) | (3U << 2U*TST2_PIN) | (3U << 2U*TST3_PIN) | (3U << 2U*TST4_PIN) | (3U << 2U*TST5_PIN) | (3U << 2U*TST6_PIN)); @@ -220,104 +220,52 @@ static void exerciseFPU(double x) { } //............................................................................ -void d1on(void) { // LED1-Green */ - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << TST1_PIN); - SST_PORT_CRIT_EXIT(); - /* don't use the FPU in the ISR */ +void d1on(void) { // LED1-Green + GPIOB->BSRR = (1U << TST1_PIN); + // don't use the FPU in the ISR } void d1off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << (TST1_PIN + 16U)); - SST_PORT_CRIT_EXIT(); - /* don't use the FPU in the ISR */ + GPIOB->BSRR = (1U << (TST1_PIN + 16U)); } //............................................................................ -void d2on(void) { /* LED3-Red */ - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << TST2_PIN); - SST_PORT_CRIT_EXIT(); - +void d2on(void) { // LED3-Red + GPIOB->BSRR = (1U << TST2_PIN); exerciseFPU(-1.2345); } void d2off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << (TST2_PIN + 16U)); - SST_PORT_CRIT_EXIT(); - - exerciseFPU(1.2345); + GPIOB->BSRR = (1U << (TST2_PIN + 16U)); } //............................................................................ void d3on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << TST3_PIN); - SST_PORT_CRIT_EXIT(); - + GPIOB->BSRR = (1U << TST3_PIN); exerciseFPU(-12.345); } void d3off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << (TST3_PIN + 16U)); - SST_PORT_CRIT_EXIT(); - - exerciseFPU(12.345); + GPIOB->BSRR = (1U << (TST3_PIN + 16U)); } //............................................................................ void d4on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << TST4_PIN); - SST_PORT_CRIT_EXIT(); - + GPIOB->BSRR = (1U << TST4_PIN); exerciseFPU(3.456); } void d4off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << (TST4_PIN + 16U)); - SST_PORT_CRIT_EXIT(); - - exerciseFPU(-3.456); + GPIOB->BSRR = (1U << (TST4_PIN + 16U)); } //............................................................................ void d5on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << TST5_PIN); - SST_PORT_CRIT_EXIT(); - + GPIOB->BSRR = (1U << TST5_PIN); exerciseFPU(4.567); } void d5off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << (TST5_PIN + 16U)); - SST_PORT_CRIT_EXIT(); - - exerciseFPU(-4.567); + GPIOB->BSRR = (1U << (TST5_PIN + 16U)); } //............................................................................ -void d6on(void) { /* LED2-Blue */ - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << TST6_PIN); - SST_PORT_CRIT_EXIT(); - +void d6on(void) { // LED2-Blue + GPIOB->BSRR = (1U << TST6_PIN); exerciseFPU(1.2345); } void d6off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOB->BSRR |= (1U << (TST6_PIN + 16U)); - SST_PORT_CRIT_EXIT(); - - exerciseFPU(-1.2345); + GPIOB->BSRR = (1U << (TST6_PIN + 16U)); } //............................................................................ @@ -332,7 +280,7 @@ SST::Evt const *getWorkEvtBlinky1(uint8_t num) { } //............................................................................ SST::Evt const *getWorkEvtBlinky3(uint8_t num) { - /* immutable work events for Blinky3 */ + // immutable work events for Blinky3 static App::BlinkyWorkEvt const workBlinky3[] = { { { App::BLINKY_WORK_SIG }, 20U, 5U }, { { App::BLINKY_WORK_SIG }, 10U, 3U } diff --git a/sst_cpp/examples/blinky_button/bsp_nucleo-l053r8.cpp b/sst_cpp/examples/blinky_button/bsp_nucleo-l053r8.cpp index 9cc4e84..28eb69b 100644 --- a/sst_cpp/examples/blinky_button/bsp_nucleo-l053r8.cpp +++ b/sst_cpp/examples/blinky_button/bsp_nucleo-l053r8.cpp @@ -195,83 +195,23 @@ void init(void) { GPIOC->PUPDR &= ~(3U << 2U*B1_PIN); } //............................................................................ -void d1on(void) { // LED1-Green */ - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << TST1_PIN); - SST_PORT_CRIT_EXIT(); -} -void d1off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << (TST1_PIN + 16U)); - SST_PORT_CRIT_EXIT(); -} +void d1on(void) { GPIOA->BSRR = (1U << TST1_PIN); } +void d1off(void) { GPIOA->BSRR = (1U << (TST1_PIN + 16U)); } //............................................................................ -void d2on(void) { /* LED3-Red */ - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << TST2_PIN); - SST_PORT_CRIT_EXIT(); -} -void d2off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << (TST2_PIN + 16U)); - SST_PORT_CRIT_EXIT(); -} +void d2on(void) { GPIOA->BSRR = (1U << TST2_PIN); } +void d2off(void) { GPIOA->BSRR = (1U << (TST2_PIN + 16U)); } //............................................................................ -void d3on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << TST3_PIN); - SST_PORT_CRIT_EXIT(); -} -void d3off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << (TST3_PIN + 16U)); - SST_PORT_CRIT_EXIT(); -} +void d3on(void) { GPIOA->BSRR = (1U << TST3_PIN); } +void d3off(void) { GPIOA->BSRR = (1U << (TST3_PIN + 16U)); } //............................................................................ -void d4on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << TST4_PIN); - SST_PORT_CRIT_EXIT(); -} -void d4off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << (TST4_PIN + 16U)); - SST_PORT_CRIT_EXIT(); -} +void d4on(void) { GPIOA->BSRR = (1U << TST4_PIN); } +void d4off(void) { GPIOA->BSRR = (1U << (TST4_PIN + 16U)); } //............................................................................ -void d5on(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << TST5_PIN); - SST_PORT_CRIT_EXIT(); -} -void d5off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << (TST5_PIN + 16U)); - SST_PORT_CRIT_EXIT(); -} +void d5on(void) { GPIOA->BSRR = (1U << TST5_PIN); } +void d5off(void) { GPIOA->BSRR = (1U << (TST5_PIN + 16U)); } //............................................................................ -void d6on(void) { /* LED2-Blue */ - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << TST6_PIN); - SST_PORT_CRIT_EXIT(); -} -void d6off(void) { - SST_PORT_CRIT_STAT - SST_PORT_CRIT_ENTRY(); - GPIOA->BSRR |= (1U << (TST6_PIN + 16U)); - SST_PORT_CRIT_EXIT(); -} +void d6on(void) { GPIOA->BSRR = (1U << TST6_PIN); } // LED2 +void d6off(void) { GPIOA->BSRR = (1U << (TST6_PIN + 16U)); } //............................................................................ SST::Evt const *getWorkEvtBlinky1(uint8_t num) {