diff --git a/.cproject b/.cproject index 3cbdd13..2907e7c 100644 --- a/.cproject +++ b/.cproject @@ -29,6 +29,10 @@ @@ -45,12 +49,15 @@ @@ -110,7 +117,7 @@ - + @@ -185,7 +192,7 @@ - + diff --git a/Debug/FreeRTOS/Source/croutine.d b/Debug/FreeRTOS/Source/croutine.d deleted file mode 100644 index ef241f8..0000000 --- a/Debug/FreeRTOS/Source/croutine.d +++ /dev/null @@ -1,31 +0,0 @@ -FreeRTOS/Source/croutine.o: ../FreeRTOS/Source/croutine.c \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/FreeRTOS.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/projdefs.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/portable.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/deprecated_definitions.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/mpu_wrappers.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/task.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/list.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/croutine.h - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/FreeRTOS.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/projdefs.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/portable.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/deprecated_definitions.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/mpu_wrappers.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/task.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/list.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/croutine.h: diff --git a/Debug/FreeRTOS/Source/croutine.o b/Debug/FreeRTOS/Source/croutine.o deleted file mode 100644 index 7988ca0..0000000 Binary files a/Debug/FreeRTOS/Source/croutine.o and /dev/null differ diff --git a/Debug/FreeRTOS/Source/event_groups.d b/Debug/FreeRTOS/Source/event_groups.d deleted file mode 100644 index 614b0c9..0000000 --- a/Debug/FreeRTOS/Source/event_groups.d +++ /dev/null @@ -1,40 +0,0 @@ -FreeRTOS/Source/event_groups.o: ../FreeRTOS/Source/event_groups.c \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/FreeRTOS.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/projdefs.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/portable.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/deprecated_definitions.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/mpu_wrappers.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/task.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/list.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/timers.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/task.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/event_groups.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/timers.h - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/FreeRTOS.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/projdefs.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/portable.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/deprecated_definitions.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/mpu_wrappers.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/task.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/list.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/timers.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/task.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/event_groups.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/timers.h: diff --git a/Debug/FreeRTOS/Source/event_groups.o b/Debug/FreeRTOS/Source/event_groups.o deleted file mode 100644 index 5201779..0000000 Binary files a/Debug/FreeRTOS/Source/event_groups.o and /dev/null differ diff --git a/Debug/FreeRTOS/Source/list.d b/Debug/FreeRTOS/Source/list.d deleted file mode 100644 index 222e066..0000000 --- a/Debug/FreeRTOS/Source/list.d +++ /dev/null @@ -1,25 +0,0 @@ -FreeRTOS/Source/list.o: ../FreeRTOS/Source/list.c \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/FreeRTOS.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/projdefs.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/portable.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/deprecated_definitions.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/mpu_wrappers.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/list.h - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/FreeRTOS.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/projdefs.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/portable.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/deprecated_definitions.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/mpu_wrappers.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/list.h: diff --git a/Debug/FreeRTOS/Source/list.o b/Debug/FreeRTOS/Source/list.o deleted file mode 100644 index d90bbb7..0000000 Binary files a/Debug/FreeRTOS/Source/list.o and /dev/null differ diff --git a/Debug/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.d b/Debug/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.d deleted file mode 100644 index 36f8e30..0000000 --- a/Debug/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.d +++ /dev/null @@ -1,29 +0,0 @@ -FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o: \ - ../FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/FreeRTOS.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/projdefs.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/portable.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/deprecated_definitions.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/mpu_wrappers.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/task.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/list.h - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/FreeRTOS.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/projdefs.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/portable.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/deprecated_definitions.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/mpu_wrappers.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/task.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/list.h: diff --git a/Debug/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o b/Debug/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o deleted file mode 100644 index 2e9a9d7..0000000 Binary files a/Debug/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o and /dev/null differ diff --git a/Debug/FreeRTOS/Source/portable/GCC/ARM_CM4F/subdir.mk b/Debug/FreeRTOS/Source/portable/GCC/ARM_CM4F/subdir.mk deleted file mode 100644 index c086a34..0000000 --- a/Debug/FreeRTOS/Source/portable/GCC/ARM_CM4F/subdir.mk +++ /dev/null @@ -1,19 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -C_SRCS += \ -../FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c - -OBJS += \ -./FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - -C_DEPS += \ -./FreeRTOS/Source/portable/GCC/ARM_CM4F/port.d - - -# Each subdirectory must supply rules for building sources it contributes -FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o: ../FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"FreeRTOS/Source/portable/GCC/ARM_CM4F/port.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" - diff --git a/Debug/FreeRTOS/Source/portable/MemMang/heap_4.d b/Debug/FreeRTOS/Source/portable/MemMang/heap_4.d deleted file mode 100644 index 6984ce7..0000000 --- a/Debug/FreeRTOS/Source/portable/MemMang/heap_4.d +++ /dev/null @@ -1,29 +0,0 @@ -FreeRTOS/Source/portable/MemMang/heap_4.o: \ - ../FreeRTOS/Source/portable/MemMang/heap_4.c \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/FreeRTOS.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/projdefs.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/portable.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/deprecated_definitions.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/mpu_wrappers.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/task.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/list.h - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/FreeRTOS.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/projdefs.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/portable.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/deprecated_definitions.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/mpu_wrappers.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/task.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/list.h: diff --git a/Debug/FreeRTOS/Source/portable/MemMang/heap_4.o b/Debug/FreeRTOS/Source/portable/MemMang/heap_4.o deleted file mode 100644 index 17c9928..0000000 Binary files a/Debug/FreeRTOS/Source/portable/MemMang/heap_4.o and /dev/null differ diff --git a/Debug/FreeRTOS/Source/portable/MemMang/subdir.mk b/Debug/FreeRTOS/Source/portable/MemMang/subdir.mk deleted file mode 100644 index 2675fd8..0000000 --- a/Debug/FreeRTOS/Source/portable/MemMang/subdir.mk +++ /dev/null @@ -1,19 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -C_SRCS += \ -../FreeRTOS/Source/portable/MemMang/heap_4.c - -OBJS += \ -./FreeRTOS/Source/portable/MemMang/heap_4.o - -C_DEPS += \ -./FreeRTOS/Source/portable/MemMang/heap_4.d - - -# Each subdirectory must supply rules for building sources it contributes -FreeRTOS/Source/portable/MemMang/heap_4.o: ../FreeRTOS/Source/portable/MemMang/heap_4.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"FreeRTOS/Source/portable/MemMang/heap_4.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" - diff --git a/Debug/FreeRTOS/Source/queue.d b/Debug/FreeRTOS/Source/queue.d deleted file mode 100644 index 7fef20d..0000000 --- a/Debug/FreeRTOS/Source/queue.d +++ /dev/null @@ -1,34 +0,0 @@ -FreeRTOS/Source/queue.o: ../FreeRTOS/Source/queue.c \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/FreeRTOS.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/projdefs.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/portable.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/deprecated_definitions.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/mpu_wrappers.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/task.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/list.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/queue.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/task.h - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/FreeRTOS.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/projdefs.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/portable.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/deprecated_definitions.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/mpu_wrappers.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/task.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/list.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/queue.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/task.h: diff --git a/Debug/FreeRTOS/Source/queue.o b/Debug/FreeRTOS/Source/queue.o deleted file mode 100644 index dd094e6..0000000 Binary files a/Debug/FreeRTOS/Source/queue.o and /dev/null differ diff --git a/Debug/FreeRTOS/Source/stream_buffer.d b/Debug/FreeRTOS/Source/stream_buffer.d deleted file mode 100644 index 31800b6..0000000 --- a/Debug/FreeRTOS/Source/stream_buffer.d +++ /dev/null @@ -1,31 +0,0 @@ -FreeRTOS/Source/stream_buffer.o: ../FreeRTOS/Source/stream_buffer.c \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/FreeRTOS.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/projdefs.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/portable.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/deprecated_definitions.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/mpu_wrappers.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/task.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/list.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/stream_buffer.h - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/FreeRTOS.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/projdefs.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/portable.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/deprecated_definitions.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/mpu_wrappers.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/task.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/list.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/stream_buffer.h: diff --git a/Debug/FreeRTOS/Source/stream_buffer.o b/Debug/FreeRTOS/Source/stream_buffer.o deleted file mode 100644 index 0b2f3fc..0000000 Binary files a/Debug/FreeRTOS/Source/stream_buffer.o and /dev/null differ diff --git a/Debug/FreeRTOS/Source/subdir.mk b/Debug/FreeRTOS/Source/subdir.mk deleted file mode 100644 index 3a3a5ad..0000000 --- a/Debug/FreeRTOS/Source/subdir.mk +++ /dev/null @@ -1,49 +0,0 @@ -################################################################################ -# Automatically-generated file. Do not edit! -################################################################################ - -# Add inputs and outputs from these tool invocations to the build variables -C_SRCS += \ -../FreeRTOS/Source/croutine.c \ -../FreeRTOS/Source/event_groups.c \ -../FreeRTOS/Source/list.c \ -../FreeRTOS/Source/queue.c \ -../FreeRTOS/Source/stream_buffer.c \ -../FreeRTOS/Source/tasks.c \ -../FreeRTOS/Source/timers.c - -OBJS += \ -./FreeRTOS/Source/croutine.o \ -./FreeRTOS/Source/event_groups.o \ -./FreeRTOS/Source/list.o \ -./FreeRTOS/Source/queue.o \ -./FreeRTOS/Source/stream_buffer.o \ -./FreeRTOS/Source/tasks.o \ -./FreeRTOS/Source/timers.o - -C_DEPS += \ -./FreeRTOS/Source/croutine.d \ -./FreeRTOS/Source/event_groups.d \ -./FreeRTOS/Source/list.d \ -./FreeRTOS/Source/queue.d \ -./FreeRTOS/Source/stream_buffer.d \ -./FreeRTOS/Source/tasks.d \ -./FreeRTOS/Source/timers.d - - -# Each subdirectory must supply rules for building sources it contributes -FreeRTOS/Source/croutine.o: ../FreeRTOS/Source/croutine.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"FreeRTOS/Source/croutine.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" -FreeRTOS/Source/event_groups.o: ../FreeRTOS/Source/event_groups.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"FreeRTOS/Source/event_groups.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" -FreeRTOS/Source/list.o: ../FreeRTOS/Source/list.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"FreeRTOS/Source/list.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" -FreeRTOS/Source/queue.o: ../FreeRTOS/Source/queue.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"FreeRTOS/Source/queue.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" -FreeRTOS/Source/stream_buffer.o: ../FreeRTOS/Source/stream_buffer.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"FreeRTOS/Source/stream_buffer.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" -FreeRTOS/Source/tasks.o: ../FreeRTOS/Source/tasks.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"FreeRTOS/Source/tasks.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" -FreeRTOS/Source/timers.o: ../FreeRTOS/Source/timers.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"FreeRTOS/Source/timers.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" - diff --git a/Debug/FreeRTOS/Source/tasks.d b/Debug/FreeRTOS/Source/tasks.d deleted file mode 100644 index 5bbfce6..0000000 --- a/Debug/FreeRTOS/Source/tasks.d +++ /dev/null @@ -1,37 +0,0 @@ -FreeRTOS/Source/tasks.o: ../FreeRTOS/Source/tasks.c \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/FreeRTOS.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/projdefs.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/portable.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/deprecated_definitions.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/mpu_wrappers.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/task.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/list.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/timers.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/task.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/stack_macros.h - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/FreeRTOS.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/projdefs.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/portable.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/deprecated_definitions.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/mpu_wrappers.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/task.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/list.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/timers.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/task.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/stack_macros.h: diff --git a/Debug/FreeRTOS/Source/tasks.o b/Debug/FreeRTOS/Source/tasks.o deleted file mode 100644 index 3b6770b..0000000 Binary files a/Debug/FreeRTOS/Source/tasks.o and /dev/null differ diff --git a/Debug/FreeRTOS/Source/tasks.su b/Debug/FreeRTOS/Source/tasks.su deleted file mode 100644 index 3391a58..0000000 --- a/Debug/FreeRTOS/Source/tasks.su +++ /dev/null @@ -1,60 +0,0 @@ -tasks.c:726:16:xTaskCreate 56 static -tasks.c:817:13:prvInitialiseNewTask 40 static,ignoring_inline_asm -tasks.c:1068:13:prvAddNewTaskToReadyList 16 static,ignoring_inline_asm -tasks.c:1154:10:vTaskDelete 24 static,ignoring_inline_asm -tasks.c:1249:16:xTaskDelayUntil 48 static,ignoring_inline_asm -tasks.c:1336:10:vTaskDelay 24 static,ignoring_inline_asm -tasks.c:1381:16:eTaskGetState 48 static,ignoring_inline_asm -tasks.c:1478:17:uxTaskPriorityGet 24 static -tasks.c:1500:17:uxTaskPriorityGetFromISR 40 static,ignoring_inline_asm -tasks.c:1540:10:vTaskPrioritySet 40 static,ignoring_inline_asm -tasks.c:1706:10:vTaskSuspend 32 static,ignoring_inline_asm -tasks.c:1812:23:prvTaskIsTaskSuspended 32 static,ignoring_inline_asm -tasks.c:1858:10:vTaskResume 24 static,ignoring_inline_asm -tasks.c:1912:16:xTaskResumeFromISR 48 static,ignoring_inline_asm -tasks.c:1987:6:vTaskStartScheduler 32 static,ignoring_inline_asm -tasks.c:2115:6:vTaskEndScheduler 16 static,ignoring_inline_asm -tasks.c:2126:6:vTaskSuspendAll 4 static,ignoring_inline_asm -tasks.c:2210:12:xTaskResumeAll 24 static,ignoring_inline_asm -tasks.c:2321:12:xTaskGetTickCount 16 static -tasks.c:2336:12:xTaskGetTickCountFromISR 16 static -tasks.c:2367:13:uxTaskGetNumberOfTasks 4 static -tasks.c:2375:8:pcTaskGetName 24 static,ignoring_inline_asm -tasks.c:2522:17:uxTaskGetSystemState 32 static -tasks.c:2627:12:xTaskCatchUpTicks 24 static,ignoring_inline_asm -tasks.c:2725:12:xTaskIncrementTick 32 static,ignoring_inline_asm -tasks.c:3010:6:vTaskSwitchContext 32 static,ignoring_inline_asm -tasks.c:3086:6:vTaskPlaceOnEventList 24 static,ignoring_inline_asm -tasks.c:3104:6:vTaskPlaceOnUnorderedEventList 32 static,ignoring_inline_asm -tasks.c:3132:10:vTaskPlaceOnEventListRestricted 32 static,ignoring_inline_asm -tasks.c:3165:12:xTaskRemoveFromEventList 32 static,ignoring_inline_asm -tasks.c:3233:6:vTaskRemoveFromUnorderedEventList 32 static,ignoring_inline_asm -tasks.c:3282:6:vTaskSetTimeOutState 24 static,ignoring_inline_asm -tasks.c:3294:6:vTaskInternalSetTimeOutState 16 static -tasks.c:3302:12:xTaskCheckForTimeOut 40 static,ignoring_inline_asm -tasks.c:3367:6:vTaskMissedYield 4 static -tasks.c:3375:17:uxTaskGetTaskNumber 24 static -tasks.c:3398:10:vTaskSetTaskNumber 24 static -tasks.c:3423:8:prvIdleTask 16 static,ignoring_inline_asm -tasks.c:3648:13:prvInitialiseTaskLists 16 static -tasks.c:3680:13:prvCheckTasksWaitingTermination 16 static -tasks.c:3710:10:vTaskGetInfo 32 static -tasks.c:3809:24:prvListTasksWithinSingleList 48 static -tasks.c:3844:35:prvTaskCheckFreeStackSpace 24 static -tasks.c:3932:17:prvDeleteTCB 16 static -tasks.c:3988:13:prvResetNextTaskUnblockTime 4 static -tasks.c:4011:18:xTaskGetCurrentTaskHandle 16 static -tasks.c:4028:16:xTaskGetSchedulerState 16 static -tasks.c:4056:16:xTaskPriorityInherit 24 static -tasks.c:4146:16:xTaskPriorityDisinherit 32 static,ignoring_inline_asm -tasks.c:4226:10:vTaskPriorityDisinheritAfterTimeout 40 static,ignoring_inline_asm -tasks.c:4651:12:uxTaskResetEventItemValue 16 static -tasks.c:4667:18:pvTaskIncrementMutexHeldCount 4 static -tasks.c:4684:14:ulTaskGenericNotifyTake 32 static,ignoring_inline_asm -tasks.c:4756:16:xTaskGenericNotifyWait 32 static,ignoring_inline_asm -tasks.c:4842:16:xTaskGenericNotify 56 static,ignoring_inline_asm -tasks.c:4965:16:xTaskGenericNotifyFromISR 72 static,ignoring_inline_asm -tasks.c:5104:10:vTaskGenericNotifyGiveFromISR 64 static,ignoring_inline_asm -tasks.c:5193:16:xTaskGenericNotifyStateClear 32 static,ignoring_inline_asm -tasks.c:5227:14:ulTaskGenericNotifyValueClear 32 static -tasks.c:5263:13:prvAddCurrentTaskToDelayedList 24 static diff --git a/Debug/FreeRTOS/Source/timers.d b/Debug/FreeRTOS/Source/timers.d deleted file mode 100644 index e3900ce..0000000 --- a/Debug/FreeRTOS/Source/timers.d +++ /dev/null @@ -1,37 +0,0 @@ -FreeRTOS/Source/timers.o: ../FreeRTOS/Source/timers.c \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/FreeRTOS.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/projdefs.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/portable.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/deprecated_definitions.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/mpu_wrappers.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/task.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/list.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/queue.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/task.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/timers.h - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/FreeRTOS.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/projdefs.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/portable.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/deprecated_definitions.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/mpu_wrappers.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/task.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/list.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/queue.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/task.h: - -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/timers.h: diff --git a/Debug/FreeRTOS/Source/timers.o b/Debug/FreeRTOS/Source/timers.o deleted file mode 100644 index dc2967b..0000000 Binary files a/Debug/FreeRTOS/Source/timers.o and /dev/null differ diff --git a/Debug/FreeRTOS/org/Source/croutine.d b/Debug/FreeRTOS/org/Source/croutine.d new file mode 100644 index 0000000..ce130ff --- /dev/null +++ b/Debug/FreeRTOS/org/Source/croutine.d @@ -0,0 +1,52 @@ +FreeRTOS/org/Source/croutine.o: ../FreeRTOS/org/Source/croutine.c \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/FreeRTOS.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/Global.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_SYSVIEW_Conf.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/projdefs.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/portable.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/deprecated_definitions.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/mpu_wrappers.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/list.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/croutine.h + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/FreeRTOS.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/Global.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_SYSVIEW_Conf.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/projdefs.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/portable.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/deprecated_definitions.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/mpu_wrappers.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/list.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/croutine.h: diff --git a/Debug/FreeRTOS/org/Source/croutine.o b/Debug/FreeRTOS/org/Source/croutine.o new file mode 100644 index 0000000..2cf7a7f Binary files /dev/null and b/Debug/FreeRTOS/org/Source/croutine.o differ diff --git a/Debug/FreeRTOS/Source/croutine.su b/Debug/FreeRTOS/org/Source/croutine.su similarity index 100% rename from Debug/FreeRTOS/Source/croutine.su rename to Debug/FreeRTOS/org/Source/croutine.su diff --git a/Debug/FreeRTOS/org/Source/event_groups.d b/Debug/FreeRTOS/org/Source/event_groups.d new file mode 100644 index 0000000..8e2c91f --- /dev/null +++ b/Debug/FreeRTOS/org/Source/event_groups.d @@ -0,0 +1,61 @@ +FreeRTOS/org/Source/event_groups.o: ../FreeRTOS/org/Source/event_groups.c \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/FreeRTOS.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/Global.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_SYSVIEW_Conf.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/projdefs.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/portable.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/deprecated_definitions.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/mpu_wrappers.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/list.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/timers.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/event_groups.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/timers.h + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/FreeRTOS.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/Global.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_SYSVIEW_Conf.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/projdefs.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/portable.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/deprecated_definitions.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/mpu_wrappers.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/list.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/timers.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/event_groups.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/timers.h: diff --git a/Debug/FreeRTOS/org/Source/event_groups.o b/Debug/FreeRTOS/org/Source/event_groups.o new file mode 100644 index 0000000..bf9418f Binary files /dev/null and b/Debug/FreeRTOS/org/Source/event_groups.o differ diff --git a/Debug/FreeRTOS/Source/event_groups.su b/Debug/FreeRTOS/org/Source/event_groups.su similarity index 100% rename from Debug/FreeRTOS/Source/event_groups.su rename to Debug/FreeRTOS/org/Source/event_groups.su diff --git a/Debug/FreeRTOS/org/Source/list.d b/Debug/FreeRTOS/org/Source/list.d new file mode 100644 index 0000000..e1816c9 --- /dev/null +++ b/Debug/FreeRTOS/org/Source/list.d @@ -0,0 +1,46 @@ +FreeRTOS/org/Source/list.o: ../FreeRTOS/org/Source/list.c \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/FreeRTOS.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/Global.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_SYSVIEW_Conf.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/projdefs.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/portable.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/deprecated_definitions.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/mpu_wrappers.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/list.h + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/FreeRTOS.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/Global.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_SYSVIEW_Conf.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/projdefs.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/portable.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/deprecated_definitions.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/mpu_wrappers.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/list.h: diff --git a/Debug/FreeRTOS/org/Source/list.o b/Debug/FreeRTOS/org/Source/list.o new file mode 100644 index 0000000..097e659 Binary files /dev/null and b/Debug/FreeRTOS/org/Source/list.o differ diff --git a/Debug/FreeRTOS/Source/list.su b/Debug/FreeRTOS/org/Source/list.su similarity index 100% rename from Debug/FreeRTOS/Source/list.su rename to Debug/FreeRTOS/org/Source/list.su diff --git a/Debug/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.d b/Debug/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.d new file mode 100644 index 0000000..d4c76b0 --- /dev/null +++ b/Debug/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.d @@ -0,0 +1,50 @@ +FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o: \ + ../FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.c \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/FreeRTOS.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/Global.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_SYSVIEW_Conf.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/projdefs.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/portable.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/deprecated_definitions.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/mpu_wrappers.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/list.h + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/FreeRTOS.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/Global.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_SYSVIEW_Conf.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/projdefs.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/portable.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/deprecated_definitions.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/mpu_wrappers.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/list.h: diff --git a/Debug/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o b/Debug/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o new file mode 100644 index 0000000..3d24442 Binary files /dev/null and b/Debug/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o differ diff --git a/Debug/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.su b/Debug/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.su similarity index 77% rename from Debug/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.su rename to Debug/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.su index 60b4302..bc00196 100644 --- a/Debug/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.su +++ b/Debug/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.su @@ -8,6 +8,6 @@ port.c:408:6:vPortEnterCritical 16 static,ignoring_inline_asm port.c:425:6:vPortExitCritical 16 static,ignoring_inline_asm port.c:437:6:PendSV_Handler 0 static,ignoring_inline_asm port.c:494:6:SysTick_Handler 16 static,ignoring_inline_asm -port.c:688:32:vPortSetupTimerInterrupt 4 static -port.c:710:13:vPortEnableVFP 0 static,ignoring_inline_asm -port.c:727:10:vPortValidateInterruptPriority 24 static,ignoring_inline_asm +port.c:693:32:vPortSetupTimerInterrupt 4 static +port.c:715:13:vPortEnableVFP 0 static,ignoring_inline_asm +port.c:732:10:vPortValidateInterruptPriority 24 static,ignoring_inline_asm diff --git a/Debug/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/subdir.mk b/Debug/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/subdir.mk new file mode 100644 index 0000000..52b7591 --- /dev/null +++ b/Debug/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/subdir.mk @@ -0,0 +1,19 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.c + +OBJS += \ +./FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + +C_DEPS += \ +./FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.d + + +# Each subdirectory must supply rules for building sources it contributes +FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o: ../FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.c + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + diff --git a/Debug/FreeRTOS/org/Source/portable/MemMang/heap_4.d b/Debug/FreeRTOS/org/Source/portable/MemMang/heap_4.d new file mode 100644 index 0000000..344b375 --- /dev/null +++ b/Debug/FreeRTOS/org/Source/portable/MemMang/heap_4.d @@ -0,0 +1,50 @@ +FreeRTOS/org/Source/portable/MemMang/heap_4.o: \ + ../FreeRTOS/org/Source/portable/MemMang/heap_4.c \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/FreeRTOS.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/Global.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_SYSVIEW_Conf.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/projdefs.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/portable.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/deprecated_definitions.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/mpu_wrappers.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/list.h + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/FreeRTOS.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/Global.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_SYSVIEW_Conf.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/projdefs.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/portable.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/deprecated_definitions.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/mpu_wrappers.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/list.h: diff --git a/Debug/FreeRTOS/org/Source/portable/MemMang/heap_4.o b/Debug/FreeRTOS/org/Source/portable/MemMang/heap_4.o new file mode 100644 index 0000000..f67598e Binary files /dev/null and b/Debug/FreeRTOS/org/Source/portable/MemMang/heap_4.o differ diff --git a/Debug/FreeRTOS/Source/portable/MemMang/heap_4.su b/Debug/FreeRTOS/org/Source/portable/MemMang/heap_4.su similarity index 100% rename from Debug/FreeRTOS/Source/portable/MemMang/heap_4.su rename to Debug/FreeRTOS/org/Source/portable/MemMang/heap_4.su diff --git a/Debug/FreeRTOS/org/Source/portable/MemMang/subdir.mk b/Debug/FreeRTOS/org/Source/portable/MemMang/subdir.mk new file mode 100644 index 0000000..803227b --- /dev/null +++ b/Debug/FreeRTOS/org/Source/portable/MemMang/subdir.mk @@ -0,0 +1,19 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../FreeRTOS/org/Source/portable/MemMang/heap_4.c + +OBJS += \ +./FreeRTOS/org/Source/portable/MemMang/heap_4.o + +C_DEPS += \ +./FreeRTOS/org/Source/portable/MemMang/heap_4.d + + +# Each subdirectory must supply rules for building sources it contributes +FreeRTOS/org/Source/portable/MemMang/heap_4.o: ../FreeRTOS/org/Source/portable/MemMang/heap_4.c + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"FreeRTOS/org/Source/portable/MemMang/heap_4.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + diff --git a/Debug/FreeRTOS/org/Source/queue.d b/Debug/FreeRTOS/org/Source/queue.d new file mode 100644 index 0000000..1b3cfa2 --- /dev/null +++ b/Debug/FreeRTOS/org/Source/queue.d @@ -0,0 +1,55 @@ +FreeRTOS/org/Source/queue.o: ../FreeRTOS/org/Source/queue.c \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/FreeRTOS.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/Global.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_SYSVIEW_Conf.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/projdefs.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/portable.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/deprecated_definitions.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/mpu_wrappers.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/list.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/queue.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/FreeRTOS.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/Global.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_SYSVIEW_Conf.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/projdefs.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/portable.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/deprecated_definitions.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/mpu_wrappers.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/list.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/queue.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h: diff --git a/Debug/FreeRTOS/org/Source/queue.o b/Debug/FreeRTOS/org/Source/queue.o new file mode 100644 index 0000000..16a6ecb Binary files /dev/null and b/Debug/FreeRTOS/org/Source/queue.o differ diff --git a/Debug/FreeRTOS/Source/queue.su b/Debug/FreeRTOS/org/Source/queue.su similarity index 81% rename from Debug/FreeRTOS/Source/queue.su rename to Debug/FreeRTOS/org/Source/queue.su index 6d838bc..741bccb 100644 --- a/Debug/FreeRTOS/Source/queue.su +++ b/Debug/FreeRTOS/org/Source/queue.su @@ -6,14 +6,14 @@ queue.c:522:19:xQueueCreateMutex 32 static queue.c:616:16:xQueueGiveMutexRecursive 40 static,ignoring_inline_asm queue.c:671:16:xQueueTakeMutexRecursive 40 static,ignoring_inline_asm queue.c:744:19:xQueueCreateCountingSemaphore 32 static,ignoring_inline_asm -queue.c:771:12:xQueueGenericSend 64 static,ignoring_inline_asm +queue.c:771:12:xQueueGenericSend 72 static,ignoring_inline_asm queue.c:983:12:xQueueGenericSendFromISR 72 static,ignoring_inline_asm queue.c:1150:12:xQueueGiveFromISR 64 static,ignoring_inline_asm -queue.c:1318:12:xQueueReceive 56 static,ignoring_inline_asm -queue.c:1461:12:xQueueSemaphoreTake 64 static,ignoring_inline_asm -queue.c:1680:12:xQueuePeek 64 static,ignoring_inline_asm -queue.c:1831:12:xQueueReceiveFromISR 72 static,ignoring_inline_asm -queue.c:1926:12:xQueuePeekFromISR 56 static,ignoring_inline_asm +queue.c:1318:12:xQueueReceive 72 static,ignoring_inline_asm +queue.c:1461:12:xQueueSemaphoreTake 80 static,ignoring_inline_asm +queue.c:1680:12:xQueuePeek 80 static,ignoring_inline_asm +queue.c:1831:12:xQueueReceiveFromISR 80 static,ignoring_inline_asm +queue.c:1926:12:xQueuePeekFromISR 64 static,ignoring_inline_asm queue.c:1981:13:uxQueueMessagesWaiting 24 static,ignoring_inline_asm queue.c:1997:13:uxQueueSpacesAvailable 32 static,ignoring_inline_asm queue.c:2014:13:uxQueueMessagesWaitingFromISR 32 static,ignoring_inline_asm diff --git a/Debug/FreeRTOS/org/Source/stream_buffer.d b/Debug/FreeRTOS/org/Source/stream_buffer.d new file mode 100644 index 0000000..bc31f25 --- /dev/null +++ b/Debug/FreeRTOS/org/Source/stream_buffer.d @@ -0,0 +1,53 @@ +FreeRTOS/org/Source/stream_buffer.o: \ + ../FreeRTOS/org/Source/stream_buffer.c \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/FreeRTOS.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/Global.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_SYSVIEW_Conf.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/projdefs.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/portable.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/deprecated_definitions.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/mpu_wrappers.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/list.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/stream_buffer.h + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/FreeRTOS.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/Global.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_SYSVIEW_Conf.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/projdefs.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/portable.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/deprecated_definitions.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/mpu_wrappers.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/list.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/stream_buffer.h: diff --git a/Debug/FreeRTOS/org/Source/stream_buffer.o b/Debug/FreeRTOS/org/Source/stream_buffer.o new file mode 100644 index 0000000..d05118d Binary files /dev/null and b/Debug/FreeRTOS/org/Source/stream_buffer.o differ diff --git a/Debug/FreeRTOS/Source/stream_buffer.su b/Debug/FreeRTOS/org/Source/stream_buffer.su similarity index 100% rename from Debug/FreeRTOS/Source/stream_buffer.su rename to Debug/FreeRTOS/org/Source/stream_buffer.su diff --git a/Debug/FreeRTOS/org/Source/subdir.mk b/Debug/FreeRTOS/org/Source/subdir.mk new file mode 100644 index 0000000..0064d37 --- /dev/null +++ b/Debug/FreeRTOS/org/Source/subdir.mk @@ -0,0 +1,49 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../FreeRTOS/org/Source/croutine.c \ +../FreeRTOS/org/Source/event_groups.c \ +../FreeRTOS/org/Source/list.c \ +../FreeRTOS/org/Source/queue.c \ +../FreeRTOS/org/Source/stream_buffer.c \ +../FreeRTOS/org/Source/tasks.c \ +../FreeRTOS/org/Source/timers.c + +OBJS += \ +./FreeRTOS/org/Source/croutine.o \ +./FreeRTOS/org/Source/event_groups.o \ +./FreeRTOS/org/Source/list.o \ +./FreeRTOS/org/Source/queue.o \ +./FreeRTOS/org/Source/stream_buffer.o \ +./FreeRTOS/org/Source/tasks.o \ +./FreeRTOS/org/Source/timers.o + +C_DEPS += \ +./FreeRTOS/org/Source/croutine.d \ +./FreeRTOS/org/Source/event_groups.d \ +./FreeRTOS/org/Source/list.d \ +./FreeRTOS/org/Source/queue.d \ +./FreeRTOS/org/Source/stream_buffer.d \ +./FreeRTOS/org/Source/tasks.d \ +./FreeRTOS/org/Source/timers.d + + +# Each subdirectory must supply rules for building sources it contributes +FreeRTOS/org/Source/croutine.o: ../FreeRTOS/org/Source/croutine.c + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"FreeRTOS/org/Source/croutine.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" +FreeRTOS/org/Source/event_groups.o: ../FreeRTOS/org/Source/event_groups.c + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"FreeRTOS/org/Source/event_groups.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" +FreeRTOS/org/Source/list.o: ../FreeRTOS/org/Source/list.c + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"FreeRTOS/org/Source/list.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" +FreeRTOS/org/Source/queue.o: ../FreeRTOS/org/Source/queue.c + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"FreeRTOS/org/Source/queue.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" +FreeRTOS/org/Source/stream_buffer.o: ../FreeRTOS/org/Source/stream_buffer.c + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"FreeRTOS/org/Source/stream_buffer.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" +FreeRTOS/org/Source/tasks.o: ../FreeRTOS/org/Source/tasks.c + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"FreeRTOS/org/Source/tasks.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" +FreeRTOS/org/Source/timers.o: ../FreeRTOS/org/Source/timers.c + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"FreeRTOS/org/Source/timers.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + diff --git a/Debug/FreeRTOS/org/Source/tasks.d b/Debug/FreeRTOS/org/Source/tasks.d new file mode 100644 index 0000000..5b7f880 --- /dev/null +++ b/Debug/FreeRTOS/org/Source/tasks.d @@ -0,0 +1,58 @@ +FreeRTOS/org/Source/tasks.o: ../FreeRTOS/org/Source/tasks.c \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/FreeRTOS.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/Global.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_SYSVIEW_Conf.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/projdefs.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/portable.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/deprecated_definitions.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/mpu_wrappers.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/list.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/timers.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/stack_macros.h + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/FreeRTOS.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/Global.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_SYSVIEW_Conf.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/projdefs.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/portable.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/deprecated_definitions.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/mpu_wrappers.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/list.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/timers.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/stack_macros.h: diff --git a/Debug/FreeRTOS/org/Source/tasks.o b/Debug/FreeRTOS/org/Source/tasks.o new file mode 100644 index 0000000..368eb64 Binary files /dev/null and b/Debug/FreeRTOS/org/Source/tasks.o differ diff --git a/Debug/FreeRTOS/org/Source/tasks.su b/Debug/FreeRTOS/org/Source/tasks.su new file mode 100644 index 0000000..02faa90 --- /dev/null +++ b/Debug/FreeRTOS/org/Source/tasks.su @@ -0,0 +1,62 @@ +tasks.c:737:16:xTaskCreate 56 static +tasks.c:828:13:prvInitialiseNewTask 40 static,ignoring_inline_asm +tasks.c:1079:13:prvAddNewTaskToReadyList 32 static,ignoring_inline_asm +tasks.c:1165:10:vTaskDelete 24 static,ignoring_inline_asm +tasks.c:1260:16:xTaskDelayUntil 48 static,ignoring_inline_asm +tasks.c:1347:10:vTaskDelay 24 static,ignoring_inline_asm +tasks.c:1392:16:eTaskGetState 48 static,ignoring_inline_asm +tasks.c:1489:17:uxTaskPriorityGet 24 static +tasks.c:1511:17:uxTaskPriorityGetFromISR 40 static,ignoring_inline_asm +tasks.c:1551:10:vTaskPrioritySet 48 static,ignoring_inline_asm +tasks.c:1718:10:vTaskSuspend 32 static,ignoring_inline_asm +tasks.c:1824:23:prvTaskIsTaskSuspended 32 static,ignoring_inline_asm +tasks.c:1870:10:vTaskResume 24 static,ignoring_inline_asm +tasks.c:1924:16:xTaskResumeFromISR 48 static,ignoring_inline_asm +tasks.c:1999:6:vTaskStartScheduler 32 static,ignoring_inline_asm +tasks.c:2127:6:vTaskEndScheduler 16 static,ignoring_inline_asm +tasks.c:2138:6:vTaskSuspendAll 4 static,ignoring_inline_asm +tasks.c:2222:12:xTaskResumeAll 24 static,ignoring_inline_asm +tasks.c:2333:12:xTaskGetTickCount 16 static +tasks.c:2348:12:xTaskGetTickCountFromISR 16 static +tasks.c:2379:13:uxTaskGetNumberOfTasks 4 static +tasks.c:2387:8:pcTaskGetName 24 static,ignoring_inline_asm +tasks.c:2534:17:uxTaskGetSystemState 32 static +tasks.c:2609:18:xTaskGetIdleTaskHandle 16 static,ignoring_inline_asm +tasks.c:2639:12:xTaskCatchUpTicks 24 static,ignoring_inline_asm +tasks.c:2737:12:xTaskIncrementTick 32 static,ignoring_inline_asm +tasks.c:3022:6:vTaskSwitchContext 32 static,ignoring_inline_asm +tasks.c:3098:6:vTaskPlaceOnEventList 24 static,ignoring_inline_asm +tasks.c:3116:6:vTaskPlaceOnUnorderedEventList 32 static,ignoring_inline_asm +tasks.c:3144:10:vTaskPlaceOnEventListRestricted 32 static,ignoring_inline_asm +tasks.c:3177:12:xTaskRemoveFromEventList 32 static,ignoring_inline_asm +tasks.c:3245:6:vTaskRemoveFromUnorderedEventList 32 static,ignoring_inline_asm +tasks.c:3294:6:vTaskSetTimeOutState 24 static,ignoring_inline_asm +tasks.c:3306:6:vTaskInternalSetTimeOutState 16 static +tasks.c:3314:12:xTaskCheckForTimeOut 40 static,ignoring_inline_asm +tasks.c:3379:6:vTaskMissedYield 4 static +tasks.c:3387:17:uxTaskGetTaskNumber 24 static +tasks.c:3410:10:vTaskSetTaskNumber 24 static +tasks.c:3435:8:prvIdleTask 16 static,ignoring_inline_asm +tasks.c:3660:13:prvInitialiseTaskLists 16 static +tasks.c:3692:13:prvCheckTasksWaitingTermination 16 static +tasks.c:3722:10:vTaskGetInfo 32 static +tasks.c:3821:24:prvListTasksWithinSingleList 48 static +tasks.c:3856:35:prvTaskCheckFreeStackSpace 24 static +tasks.c:3943:11:pxTaskGetStackStart 24 static +tasks.c:3958:17:prvDeleteTCB 16 static +tasks.c:4014:13:prvResetNextTaskUnblockTime 4 static +tasks.c:4037:18:xTaskGetCurrentTaskHandle 16 static +tasks.c:4054:16:xTaskGetSchedulerState 16 static +tasks.c:4082:16:xTaskPriorityInherit 24 static +tasks.c:4173:16:xTaskPriorityDisinherit 32 static,ignoring_inline_asm +tasks.c:4253:10:vTaskPriorityDisinheritAfterTimeout 40 static,ignoring_inline_asm +tasks.c:4678:12:uxTaskResetEventItemValue 16 static +tasks.c:4694:18:pvTaskIncrementMutexHeldCount 4 static +tasks.c:4711:14:ulTaskGenericNotifyTake 32 static,ignoring_inline_asm +tasks.c:4783:16:xTaskGenericNotifyWait 40 static,ignoring_inline_asm +tasks.c:4869:16:xTaskGenericNotify 64 static,ignoring_inline_asm +tasks.c:4992:16:xTaskGenericNotifyFromISR 80 static,ignoring_inline_asm +tasks.c:5131:10:vTaskGenericNotifyGiveFromISR 64 static,ignoring_inline_asm +tasks.c:5220:16:xTaskGenericNotifyStateClear 32 static,ignoring_inline_asm +tasks.c:5254:14:ulTaskGenericNotifyValueClear 32 static +tasks.c:5290:13:prvAddCurrentTaskToDelayedList 24 static diff --git a/Debug/FreeRTOS/org/Source/timers.d b/Debug/FreeRTOS/org/Source/timers.d new file mode 100644 index 0000000..e2a9cb8 --- /dev/null +++ b/Debug/FreeRTOS/org/Source/timers.d @@ -0,0 +1,58 @@ +FreeRTOS/org/Source/timers.o: ../FreeRTOS/org/Source/timers.c \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/FreeRTOS.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/Global.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_SYSVIEW_Conf.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/projdefs.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/portable.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/deprecated_definitions.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/mpu_wrappers.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/list.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/queue.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/timers.h + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/FreeRTOS.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/Global.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_SYSVIEW_Conf.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/projdefs.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/portable.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/deprecated_definitions.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/mpu_wrappers.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/list.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/queue.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/timers.h: diff --git a/Debug/FreeRTOS/org/Source/timers.o b/Debug/FreeRTOS/org/Source/timers.o new file mode 100644 index 0000000..6379744 Binary files /dev/null and b/Debug/FreeRTOS/org/Source/timers.o differ diff --git a/Debug/FreeRTOS/Source/timers.su b/Debug/FreeRTOS/org/Source/timers.su similarity index 100% rename from Debug/FreeRTOS/Source/timers.su rename to Debug/FreeRTOS/org/Source/timers.su diff --git a/Debug/FreeRTOS_STM32_Porting.bin b/Debug/FreeRTOS_STM32_Porting.bin index 18ea123..ce246d2 100755 Binary files a/Debug/FreeRTOS_STM32_Porting.bin and b/Debug/FreeRTOS_STM32_Porting.bin differ diff --git a/Debug/FreeRTOS_STM32_Porting.elf b/Debug/FreeRTOS_STM32_Porting.elf index 25ad84c..3ad30ed 100755 Binary files a/Debug/FreeRTOS_STM32_Porting.elf and b/Debug/FreeRTOS_STM32_Porting.elf differ diff --git a/Debug/FreeRTOS_STM32_Porting.list b/Debug/FreeRTOS_STM32_Porting.list index b5dfc7e..37795d0 100644 --- a/Debug/FreeRTOS_STM32_Porting.list +++ b/Debug/FreeRTOS_STM32_Porting.list @@ -5,45 +5,45 @@ Sections: Idx Name Size VMA LMA File off Algn 0 .isr_vector 000001c4 08000000 08000000 00010000 2**0 CONTENTS, ALLOC, LOAD, READONLY, DATA - 1 .text 000033b4 080001d0 080001d0 000101d0 2**4 + 1 .text 000069ec 080001d0 080001d0 000101d0 2**4 CONTENTS, ALLOC, LOAD, READONLY, CODE - 2 .rodata 00000088 08003584 08003584 00013584 2**2 + 2 .rodata 000001ec 08006bbc 08006bbc 00016bbc 2**2 CONTENTS, ALLOC, LOAD, READONLY, DATA - 3 .ARM.extab 00000000 0800360c 0800360c 00020030 2**0 + 3 .ARM.extab 00000000 08006da8 08006da8 00020184 2**0 CONTENTS - 4 .ARM 00000000 0800360c 0800360c 00020030 2**0 + 4 .ARM 00000000 08006da8 08006da8 00020184 2**0 CONTENTS - 5 .preinit_array 00000000 0800360c 0800360c 00020030 2**0 + 5 .preinit_array 00000000 08006da8 08006da8 00020184 2**0 CONTENTS, ALLOC, LOAD, DATA - 6 .init_array 00000004 0800360c 0800360c 0001360c 2**2 + 6 .init_array 00000004 08006da8 08006da8 00016da8 2**2 CONTENTS, ALLOC, LOAD, DATA - 7 .fini_array 00000004 08003610 08003610 00013610 2**2 + 7 .fini_array 00000004 08006dac 08006dac 00016dac 2**2 CONTENTS, ALLOC, LOAD, DATA - 8 .data 00000030 20000000 08003614 00020000 2**2 + 8 .data 00000184 20000000 08006db0 00020000 2**2 CONTENTS, ALLOC, LOAD, DATA - 9 .bss 00012dd4 20000030 08003644 00020030 2**2 + 9 .bss 00015c80 20000184 08006f34 00020184 2**2 ALLOC - 10 ._user_heap_stack 00000604 20012e04 08003644 00022e04 2**0 + 10 ._user_heap_stack 00000604 20015e04 08006f34 00025e04 2**0 ALLOC - 11 .ARM.attributes 00000030 00000000 00000000 00020030 2**0 + 11 .ARM.attributes 00000030 00000000 00000000 00020184 2**0 CONTENTS, READONLY - 12 .debug_info 0000ad57 00000000 00000000 00020060 2**0 + 12 .debug_info 00013ec1 00000000 00000000 000201b4 2**0 CONTENTS, READONLY, DEBUGGING - 13 .debug_abbrev 0000183d 00000000 00000000 0002adb7 2**0 + 13 .debug_abbrev 00002661 00000000 00000000 00034075 2**0 CONTENTS, READONLY, DEBUGGING - 14 .debug_aranges 00000910 00000000 00000000 0002c5f8 2**3 + 14 .debug_aranges 00001080 00000000 00000000 000366d8 2**3 CONTENTS, READONLY, DEBUGGING - 15 .debug_ranges 00000858 00000000 00000000 0002cf08 2**3 + 15 .debug_ranges 00000f48 00000000 00000000 00037758 2**3 CONTENTS, READONLY, DEBUGGING - 16 .debug_macro 00001d92 00000000 00000000 0002d760 2**0 + 16 .debug_macro 000040b7 00000000 00000000 000386a0 2**0 CONTENTS, READONLY, DEBUGGING - 17 .debug_line 000076a7 00000000 00000000 0002f4f2 2**0 + 17 .debug_line 0000ceff 00000000 00000000 0003c757 2**0 CONTENTS, READONLY, DEBUGGING - 18 .debug_str 0006bba9 00000000 00000000 00036b99 2**0 + 18 .debug_str 000752ea 00000000 00000000 00049656 2**0 CONTENTS, READONLY, DEBUGGING - 19 .comment 0000007b 00000000 00000000 000a2742 2**0 + 19 .comment 0000007b 00000000 00000000 000be940 2**0 CONTENTS, READONLY - 20 .debug_frame 00002614 00000000 00000000 000a27c0 2**2 + 20 .debug_frame 00004a04 00000000 00000000 000be9bc 2**2 CONTENTS, READONLY, DEBUGGING Disassembly of section .text: @@ -60,9 +60,9 @@ Disassembly of section .text: 80001e2: 2301 movs r3, #1 80001e4: 7023 strb r3, [r4, #0] 80001e6: bd10 pop {r4, pc} - 80001e8: 20000030 .word 0x20000030 + 80001e8: 20000184 .word 0x20000184 80001ec: 00000000 .word 0x00000000 - 80001f0: 0800356c .word 0x0800356c + 80001f0: 08006ba4 .word 0x08006ba4 080001f4 : 80001f4: b508 push {r3, lr} @@ -73,9476 +73,17676 @@ Disassembly of section .text: 80001fe: f3af 8000 nop.w 8000202: bd08 pop {r3, pc} 8000204: 00000000 .word 0x00000000 - 8000208: 20000034 .word 0x20000034 - 800020c: 0800356c .word 0x0800356c - -08000210 : - 8000210: 4603 mov r3, r0 - 8000212: f813 2b01 ldrb.w r2, [r3], #1 - 8000216: 2a00 cmp r2, #0 - 8000218: d1fb bne.n 8000212 - 800021a: 1a18 subs r0, r3, r0 - 800021c: 3801 subs r0, #1 - 800021e: 4770 bx lr - -08000220 : + 8000208: 20000188 .word 0x20000188 + 800020c: 08006ba4 .word 0x08006ba4 + +08000210 : + // R4 + // R5 pRing->pBuffer + // R6 pRing (Points to active struct SEGGER_RTT_BUFFER_DOWN) + // R7 WrOff + // + PUSH {R4-R7} + 8000210: b4f0 push {r4, r5, r6, r7} + ADD R3,R0,R0, LSL #+1 + 8000212: eb00 0340 add.w r3, r0, r0, lsl #1 + LDR.W R0,=_SEGGER_RTT // pRing = &_SEGGER_RTT.aUp[BufferIndex]; + 8000216: f8df 0088 ldr.w r0, [pc, #136] ; 80002a0 <_Case3+0x6> + ADD R0,R0,R3, LSL #+3 + 800021a: eb00 00c3 add.w r0, r0, r3, lsl #3 + ADD R6,R0,#+24 + 800021e: f100 0618 add.w r6, r0, #24 + LDR R0,[R6, #+16] // RdOff = pRing->RdOff; + 8000222: 6930 ldr r0, [r6, #16] + LDR R7,[R6, #+12] // WrOff = pRing->WrOff; + 8000224: 68f7 ldr r7, [r6, #12] + LDR R5,[R6, #+4] // pRing->pBuffer + 8000226: 6875 ldr r5, [r6, #4] + CMP R7,R0 + 8000228: 4287 cmp r7, r0 + BCC.N _CheckCase4 // if (RdOff <= WrOff) { => Case 1), 2) or 3) + 800022a: d332 bcc.n 8000292 <_CheckCase4> + // + // Handling for case 1, later on identical to case 4 + // + LDR R3,[R6, #+8] // Avail = pRing->SizeOfBuffer - WrOff - 1u; => Space until wrap-around (assume 1 byte not usable for case that RdOff == 0) + 800022c: 68b3 ldr r3, [r6, #8] + SUBS R4,R3,R7 // (Used in case we jump into case 2 afterwards) + 800022e: 1bdc subs r4, r3, r7 + SUBS R3,R4,#+1 // + 8000230: 1e63 subs r3, r4, #1 + CMP R3,R2 + 8000232: 4293 cmp r3, r2 + BCC.N _CheckCase2 // if (Avail >= NumBytes) { => Case 1)? + 8000234: d314 bcc.n 8000260 <_CheckCase2> + +08000236 <_Case4>: +_Case4: + ADDS R5,R7,R5 // pBuffer += WrOff + 8000236: 197d adds r5, r7, r5 + ADDS R0,R2,R7 // v = WrOff + NumBytes + 8000238: 19d0 adds r0, r2, r7 + 800023a: bf00 nop + +0800023c <_LoopCopyStraight>: + // 2x unrolling for the copy loop that is used most of the time + // This is a special optimization for small SystemView packets and makes them even faster + // + _ALIGN(2) +_LoopCopyStraight: // memcpy(pRing->pBuffer + WrOff, pData, NumBytes); + LDRB R3,[R1], #+1 + 800023c: f811 3b01 ldrb.w r3, [r1], #1 + STRB R3,[R5], #+1 // *pDest++ = *pSrc++ + 8000240: f805 3b01 strb.w r3, [r5], #1 + SUBS R2,R2,#+1 + 8000244: 3a01 subs r2, #1 + BEQ _CSDone + 8000246: d005 beq.n 8000254 <_CSDone> + LDRB R3,[R1], #+1 + 8000248: f811 3b01 ldrb.w r3, [r1], #1 + STRB R3,[R5], #+1 // *pDest++ = *pSrc++ + 800024c: f805 3b01 strb.w r3, [r5], #1 + SUBS R2,R2,#+1 + 8000250: 3a01 subs r2, #1 + BNE _LoopCopyStraight + 8000252: d1f3 bne.n 800023c <_LoopCopyStraight> + +08000254 <_CSDone>: +_CSDone: +#if _CORE_NEEDS_DMB // Do not slow down cores that do not need a DMB instruction here + DMB // Cortex-M7 may delay memory writes and also change the order in which the writes happen. Therefore, make sure that all buffer writes are finished, before updating the in the struct + 8000254: f3bf 8f5f dmb sy +#endif + STR R0,[R6, #+12] // pRing->WrOff = WrOff + NumBytes; + 8000258: 60f0 str r0, [r6, #12] + MOVS R0,#+1 + 800025a: 2001 movs r0, #1 + POP {R4-R7} + 800025c: bcf0 pop {r4, r5, r6, r7} + BX LR // Return 1 + 800025e: 4770 bx lr + +08000260 <_CheckCase2>: +_CheckCase2: + ADDS R0,R0,R3 // Avail += RdOff; => Space incl. wrap-around + 8000260: 18c0 adds r0, r0, r3 + CMP R0,R2 + 8000262: 4290 cmp r0, r2 + BCC.N _Case3 // if (Avail >= NumBytes) { => Case 2? => If not, we have case 3) (does not fit) + 8000264: d319 bcc.n 800029a <_Case3> + // + // Handling for case 2 + // + ADDS R0,R7,R5 // v = pRing->pBuffer + WrOff => Do not change pRing->pBuffer here because 2nd chunk needs org. value + 8000266: 1978 adds r0, r7, r5 + SUBS R2,R2,R4 // NumBytes -= Rem; (Rem = pRing->SizeOfBuffer - WrOff; => Space until end of buffer) + 8000268: 1b12 subs r2, r2, r4 + +0800026a <_LoopCopyBeforeWrapAround>: +_LoopCopyBeforeWrapAround: // memcpy(pRing->pBuffer + WrOff, pData, Rem); => Copy 1st chunk + LDRB R3,[R1], #+1 + 800026a: f811 3b01 ldrb.w r3, [r1], #1 + STRB R3,[R0], #+1 // *pDest++ = *pSrc++ + 800026e: f800 3b01 strb.w r3, [r0], #1 + SUBS R4,R4,#+1 + 8000272: 3c01 subs r4, #1 + BNE _LoopCopyBeforeWrapAround + 8000274: d1f9 bne.n 800026a <_LoopCopyBeforeWrapAround> + // Special case: First check that assumed RdOff == 0 calculated that last element before wrap-around could not be used + // But 2nd check (considering space until wrap-around and until RdOff) revealed that RdOff is not 0, so we can use the last element + // In this case, we may use a copy straight until buffer end anyway without needing to copy 2 chunks + // Therefore, check if 2nd memcpy is necessary at all + // + ADDS R4,R2,#+0 // Save (needed as counter in loop but must be written to after the loop). Also use this inst to update the flags to skip 2nd loop if possible + 8000276: 1c14 adds r4, r2, #0 + BEQ.N _No2ChunkNeeded // if (NumBytes) { + 8000278: d005 beq.n 8000286 <_No2ChunkNeeded> + +0800027a <_LoopCopyAfterWrapAround>: +_LoopCopyAfterWrapAround: // memcpy(pRing->pBuffer, pData + Rem, NumBytes); + LDRB R3,[R1], #+1 // pData already points to the next src byte due to copy loop increment before this loop + 800027a: f811 3b01 ldrb.w r3, [r1], #1 + STRB R3,[R5], #+1 // *pDest++ = *pSrc++ + 800027e: f805 3b01 strb.w r3, [r5], #1 + SUBS R2,R2,#+1 + 8000282: 3a01 subs r2, #1 + BNE _LoopCopyAfterWrapAround + 8000284: d1f9 bne.n 800027a <_LoopCopyAfterWrapAround> + +08000286 <_No2ChunkNeeded>: +_No2ChunkNeeded: +#if _CORE_NEEDS_DMB // Do not slow down cores that do not need a DMB instruction here + DMB // Cortex-M7 may delay memory writes and also change the order in which the writes happen. Therefore, make sure that all buffer writes are finished, before updating the in the struct + 8000286: f3bf 8f5f dmb sy +#endif + STR R4,[R6, #+12] // pRing->WrOff = NumBytes; => Must be written after copying data because J-Link may read control block asynchronously while writing into buffer + 800028a: 60f4 str r4, [r6, #12] + MOVS R0,#+1 + 800028c: 2001 movs r0, #1 + POP {R4-R7} + 800028e: bcf0 pop {r4, r5, r6, r7} + BX LR // Return 1 + 8000290: 4770 bx lr + +08000292 <_CheckCase4>: +_CheckCase4: + SUBS R0,R0,R7 + 8000292: 1bc0 subs r0, r0, r7 + SUBS R0,R0,#+1 // Avail = RdOff - WrOff - 1u; + 8000294: 3801 subs r0, #1 + CMP R0,R2 + 8000296: 4290 cmp r0, r2 + BCS.N _Case4 // if (Avail >= NumBytes) { => Case 4) == 1) ? => If not, we have case 5) == 3) (does not fit) + 8000298: d2cd bcs.n 8000236 <_Case4> + +0800029a <_Case3>: +_Case3: + MOVS R0,#+0 + 800029a: 2000 movs r0, #0 + POP {R4-R7} + 800029c: bcf0 pop {r4, r5, r6, r7} + BX LR // Return 0 + 800029e: 4770 bx lr + LDR.W R0,=_SEGGER_RTT // pRing = &_SEGGER_RTT.aUp[BufferIndex]; + 80002a0: 20015d44 .word 0x20015d44 + +080002a4 : + 80002a4: 4603 mov r3, r0 + 80002a6: f813 2b01 ldrb.w r2, [r3], #1 + 80002aa: 2a00 cmp r2, #0 + 80002ac: d1fb bne.n 80002a6 + 80002ae: 1a18 subs r0, r3, r0 + 80002b0: 3801 subs r0, #1 + 80002b2: 4770 bx lr + ... + +080002c0 : + 80002c0: f001 01ff and.w r1, r1, #255 ; 0xff + 80002c4: 2a10 cmp r2, #16 + 80002c6: db2b blt.n 8000320 + 80002c8: f010 0f07 tst.w r0, #7 + 80002cc: d008 beq.n 80002e0 + 80002ce: f810 3b01 ldrb.w r3, [r0], #1 + 80002d2: 3a01 subs r2, #1 + 80002d4: 428b cmp r3, r1 + 80002d6: d02d beq.n 8000334 + 80002d8: f010 0f07 tst.w r0, #7 + 80002dc: b342 cbz r2, 8000330 + 80002de: d1f6 bne.n 80002ce + 80002e0: b4f0 push {r4, r5, r6, r7} + 80002e2: ea41 2101 orr.w r1, r1, r1, lsl #8 + 80002e6: ea41 4101 orr.w r1, r1, r1, lsl #16 + 80002ea: f022 0407 bic.w r4, r2, #7 + 80002ee: f07f 0700 mvns.w r7, #0 + 80002f2: 2300 movs r3, #0 + 80002f4: e8f0 5602 ldrd r5, r6, [r0], #8 + 80002f8: 3c08 subs r4, #8 + 80002fa: ea85 0501 eor.w r5, r5, r1 + 80002fe: ea86 0601 eor.w r6, r6, r1 + 8000302: fa85 f547 uadd8 r5, r5, r7 + 8000306: faa3 f587 sel r5, r3, r7 + 800030a: fa86 f647 uadd8 r6, r6, r7 + 800030e: faa5 f687 sel r6, r5, r7 + 8000312: b98e cbnz r6, 8000338 + 8000314: d1ee bne.n 80002f4 + 8000316: bcf0 pop {r4, r5, r6, r7} + 8000318: f001 01ff and.w r1, r1, #255 ; 0xff + 800031c: f002 0207 and.w r2, r2, #7 + 8000320: b132 cbz r2, 8000330 + 8000322: f810 3b01 ldrb.w r3, [r0], #1 + 8000326: 3a01 subs r2, #1 + 8000328: ea83 0301 eor.w r3, r3, r1 + 800032c: b113 cbz r3, 8000334 + 800032e: d1f8 bne.n 8000322 + 8000330: 2000 movs r0, #0 + 8000332: 4770 bx lr + 8000334: 3801 subs r0, #1 + 8000336: 4770 bx lr + 8000338: 2d00 cmp r5, #0 + 800033a: bf06 itte eq + 800033c: 4635 moveq r5, r6 + 800033e: 3803 subeq r0, #3 + 8000340: 3807 subne r0, #7 + 8000342: f015 0f01 tst.w r5, #1 + 8000346: d107 bne.n 8000358 + 8000348: 3001 adds r0, #1 + 800034a: f415 7f80 tst.w r5, #256 ; 0x100 + 800034e: bf02 ittt eq + 8000350: 3001 addeq r0, #1 + 8000352: f415 3fc0 tsteq.w r5, #98304 ; 0x18000 + 8000356: 3001 addeq r0, #1 + 8000358: bcf0 pop {r4, r5, r6, r7} + 800035a: 3801 subs r0, #1 + 800035c: 4770 bx lr + 800035e: bf00 nop + +08000360 : /*----------------------------------------------------------- * PUBLIC LIST API documented in list.h *----------------------------------------------------------*/ void vListInitialise( List_t * const pxList ) { - 8000220: b480 push {r7} - 8000222: b083 sub sp, #12 - 8000224: af00 add r7, sp, #0 - 8000226: 6078 str r0, [r7, #4] + 8000360: b480 push {r7} + 8000362: b083 sub sp, #12 + 8000364: af00 add r7, sp, #0 + 8000366: 6078 str r0, [r7, #4] /* The list structure contains a list item which is used to mark the * end of the list. To initialise the list the list end is inserted * as the only list entry. */ pxList->pxIndex = ( ListItem_t * ) &( pxList->xListEnd ); /*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. */ - 8000228: 687b ldr r3, [r7, #4] - 800022a: f103 0208 add.w r2, r3, #8 - 800022e: 687b ldr r3, [r7, #4] - 8000230: 605a str r2, [r3, #4] + 8000368: 687b ldr r3, [r7, #4] + 800036a: f103 0208 add.w r2, r3, #8 + 800036e: 687b ldr r3, [r7, #4] + 8000370: 605a str r2, [r3, #4] /* The list end value is the highest possible value in the list to * ensure it remains at the end of the list. */ pxList->xListEnd.xItemValue = portMAX_DELAY; - 8000232: 687b ldr r3, [r7, #4] - 8000234: f04f 32ff mov.w r2, #4294967295 ; 0xffffffff - 8000238: 609a str r2, [r3, #8] + 8000372: 687b ldr r3, [r7, #4] + 8000374: f04f 32ff mov.w r2, #4294967295 ; 0xffffffff + 8000378: 609a str r2, [r3, #8] /* The list end next and previous pointers point to itself so we know * when the list is empty. */ pxList->xListEnd.pxNext = ( ListItem_t * ) &( pxList->xListEnd ); /*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. */ - 800023a: 687b ldr r3, [r7, #4] - 800023c: f103 0208 add.w r2, r3, #8 - 8000240: 687b ldr r3, [r7, #4] - 8000242: 60da str r2, [r3, #12] + 800037a: 687b ldr r3, [r7, #4] + 800037c: f103 0208 add.w r2, r3, #8 + 8000380: 687b ldr r3, [r7, #4] + 8000382: 60da str r2, [r3, #12] pxList->xListEnd.pxPrevious = ( ListItem_t * ) &( pxList->xListEnd ); /*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. */ - 8000244: 687b ldr r3, [r7, #4] - 8000246: f103 0208 add.w r2, r3, #8 - 800024a: 687b ldr r3, [r7, #4] - 800024c: 611a str r2, [r3, #16] + 8000384: 687b ldr r3, [r7, #4] + 8000386: f103 0208 add.w r2, r3, #8 + 800038a: 687b ldr r3, [r7, #4] + 800038c: 611a str r2, [r3, #16] pxList->uxNumberOfItems = ( UBaseType_t ) 0U; - 800024e: 687b ldr r3, [r7, #4] - 8000250: 2200 movs r2, #0 - 8000252: 601a str r2, [r3, #0] + 800038e: 687b ldr r3, [r7, #4] + 8000390: 2200 movs r2, #0 + 8000392: 601a str r2, [r3, #0] /* Write known values into the list if * configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */ listSET_LIST_INTEGRITY_CHECK_1_VALUE( pxList ); listSET_LIST_INTEGRITY_CHECK_2_VALUE( pxList ); } - 8000254: bf00 nop - 8000256: 370c adds r7, #12 - 8000258: 46bd mov sp, r7 - 800025a: f85d 7b04 ldr.w r7, [sp], #4 - 800025e: 4770 bx lr + 8000394: bf00 nop + 8000396: 370c adds r7, #12 + 8000398: 46bd mov sp, r7 + 800039a: f85d 7b04 ldr.w r7, [sp], #4 + 800039e: 4770 bx lr -08000260 : +080003a0 : /*-----------------------------------------------------------*/ void vListInitialiseItem( ListItem_t * const pxItem ) { - 8000260: b480 push {r7} - 8000262: b083 sub sp, #12 - 8000264: af00 add r7, sp, #0 - 8000266: 6078 str r0, [r7, #4] + 80003a0: b480 push {r7} + 80003a2: b083 sub sp, #12 + 80003a4: af00 add r7, sp, #0 + 80003a6: 6078 str r0, [r7, #4] /* Make sure the list item is not recorded as being on a list. */ pxItem->pxContainer = NULL; - 8000268: 687b ldr r3, [r7, #4] - 800026a: 2200 movs r2, #0 - 800026c: 611a str r2, [r3, #16] + 80003a8: 687b ldr r3, [r7, #4] + 80003aa: 2200 movs r2, #0 + 80003ac: 611a str r2, [r3, #16] /* Write known values into the list item if * configUSE_LIST_DATA_INTEGRITY_CHECK_BYTES is set to 1. */ listSET_FIRST_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem ); listSET_SECOND_LIST_ITEM_INTEGRITY_CHECK_VALUE( pxItem ); } - 800026e: bf00 nop - 8000270: 370c adds r7, #12 - 8000272: 46bd mov sp, r7 - 8000274: f85d 7b04 ldr.w r7, [sp], #4 - 8000278: 4770 bx lr + 80003ae: bf00 nop + 80003b0: 370c adds r7, #12 + 80003b2: 46bd mov sp, r7 + 80003b4: f85d 7b04 ldr.w r7, [sp], #4 + 80003b8: 4770 bx lr -0800027a : +080003ba : /*-----------------------------------------------------------*/ void vListInsertEnd( List_t * const pxList, ListItem_t * const pxNewListItem ) { - 800027a: b480 push {r7} - 800027c: b085 sub sp, #20 - 800027e: af00 add r7, sp, #0 - 8000280: 6078 str r0, [r7, #4] - 8000282: 6039 str r1, [r7, #0] + 80003ba: b480 push {r7} + 80003bc: b085 sub sp, #20 + 80003be: af00 add r7, sp, #0 + 80003c0: 6078 str r0, [r7, #4] + 80003c2: 6039 str r1, [r7, #0] ListItem_t * const pxIndex = pxList->pxIndex; - 8000284: 687b ldr r3, [r7, #4] - 8000286: 685b ldr r3, [r3, #4] - 8000288: 60fb str r3, [r7, #12] + 80003c4: 687b ldr r3, [r7, #4] + 80003c6: 685b ldr r3, [r3, #4] + 80003c8: 60fb str r3, [r7, #12] listTEST_LIST_ITEM_INTEGRITY( pxNewListItem ); /* Insert a new list item into pxList, but rather than sort the list, * makes the new list item the last item to be removed by a call to * listGET_OWNER_OF_NEXT_ENTRY(). */ pxNewListItem->pxNext = pxIndex; - 800028a: 683b ldr r3, [r7, #0] - 800028c: 68fa ldr r2, [r7, #12] - 800028e: 605a str r2, [r3, #4] + 80003ca: 683b ldr r3, [r7, #0] + 80003cc: 68fa ldr r2, [r7, #12] + 80003ce: 605a str r2, [r3, #4] pxNewListItem->pxPrevious = pxIndex->pxPrevious; - 8000290: 68fb ldr r3, [r7, #12] - 8000292: 689a ldr r2, [r3, #8] - 8000294: 683b ldr r3, [r7, #0] - 8000296: 609a str r2, [r3, #8] + 80003d0: 68fb ldr r3, [r7, #12] + 80003d2: 689a ldr r2, [r3, #8] + 80003d4: 683b ldr r3, [r7, #0] + 80003d6: 609a str r2, [r3, #8] /* Only used during decision coverage testing. */ mtCOVERAGE_TEST_DELAY(); pxIndex->pxPrevious->pxNext = pxNewListItem; - 8000298: 68fb ldr r3, [r7, #12] - 800029a: 689b ldr r3, [r3, #8] - 800029c: 683a ldr r2, [r7, #0] - 800029e: 605a str r2, [r3, #4] + 80003d8: 68fb ldr r3, [r7, #12] + 80003da: 689b ldr r3, [r3, #8] + 80003dc: 683a ldr r2, [r7, #0] + 80003de: 605a str r2, [r3, #4] pxIndex->pxPrevious = pxNewListItem; - 80002a0: 68fb ldr r3, [r7, #12] - 80002a2: 683a ldr r2, [r7, #0] - 80002a4: 609a str r2, [r3, #8] + 80003e0: 68fb ldr r3, [r7, #12] + 80003e2: 683a ldr r2, [r7, #0] + 80003e4: 609a str r2, [r3, #8] /* Remember which list the item is in. */ pxNewListItem->pxContainer = pxList; - 80002a6: 683b ldr r3, [r7, #0] - 80002a8: 687a ldr r2, [r7, #4] - 80002aa: 611a str r2, [r3, #16] + 80003e6: 683b ldr r3, [r7, #0] + 80003e8: 687a ldr r2, [r7, #4] + 80003ea: 611a str r2, [r3, #16] ( pxList->uxNumberOfItems )++; - 80002ac: 687b ldr r3, [r7, #4] - 80002ae: 681b ldr r3, [r3, #0] - 80002b0: 1c5a adds r2, r3, #1 - 80002b2: 687b ldr r3, [r7, #4] - 80002b4: 601a str r2, [r3, #0] -} - 80002b6: bf00 nop - 80002b8: 3714 adds r7, #20 - 80002ba: 46bd mov sp, r7 - 80002bc: f85d 7b04 ldr.w r7, [sp], #4 - 80002c0: 4770 bx lr - -080002c2 : + 80003ec: 687b ldr r3, [r7, #4] + 80003ee: 681b ldr r3, [r3, #0] + 80003f0: 1c5a adds r2, r3, #1 + 80003f2: 687b ldr r3, [r7, #4] + 80003f4: 601a str r2, [r3, #0] +} + 80003f6: bf00 nop + 80003f8: 3714 adds r7, #20 + 80003fa: 46bd mov sp, r7 + 80003fc: f85d 7b04 ldr.w r7, [sp], #4 + 8000400: 4770 bx lr + +08000402 : /*-----------------------------------------------------------*/ void vListInsert( List_t * const pxList, ListItem_t * const pxNewListItem ) { - 80002c2: b480 push {r7} - 80002c4: b085 sub sp, #20 - 80002c6: af00 add r7, sp, #0 - 80002c8: 6078 str r0, [r7, #4] - 80002ca: 6039 str r1, [r7, #0] + 8000402: b480 push {r7} + 8000404: b085 sub sp, #20 + 8000406: af00 add r7, sp, #0 + 8000408: 6078 str r0, [r7, #4] + 800040a: 6039 str r1, [r7, #0] ListItem_t * pxIterator; const TickType_t xValueOfInsertion = pxNewListItem->xItemValue; - 80002cc: 683b ldr r3, [r7, #0] - 80002ce: 681b ldr r3, [r3, #0] - 80002d0: 60bb str r3, [r7, #8] + 800040c: 683b ldr r3, [r7, #0] + 800040e: 681b ldr r3, [r3, #0] + 8000410: 60bb str r3, [r7, #8] * new list item should be placed after it. This ensures that TCBs which are * stored in ready lists (all of which have the same xItemValue value) get a * share of the CPU. However, if the xItemValue is the same as the back marker * the iteration loop below will not end. Therefore the value is checked * first, and the algorithm slightly modified if necessary. */ if( xValueOfInsertion == portMAX_DELAY ) - 80002d2: 68bb ldr r3, [r7, #8] - 80002d4: f1b3 3fff cmp.w r3, #4294967295 ; 0xffffffff - 80002d8: d103 bne.n 80002e2 + 8000412: 68bb ldr r3, [r7, #8] + 8000414: f1b3 3fff cmp.w r3, #4294967295 ; 0xffffffff + 8000418: d103 bne.n 8000422 { pxIterator = pxList->xListEnd.pxPrevious; - 80002da: 687b ldr r3, [r7, #4] - 80002dc: 691b ldr r3, [r3, #16] - 80002de: 60fb str r3, [r7, #12] - 80002e0: e00c b.n 80002fc + 800041a: 687b ldr r3, [r7, #4] + 800041c: 691b ldr r3, [r3, #16] + 800041e: 60fb str r3, [r7, #12] + 8000420: e00c b.n 800043c * 4) Using a queue or semaphore before it has been initialised or * before the scheduler has been started (are interrupts firing * before vTaskStartScheduler() has been called?). **********************************************************************/ for( pxIterator = ( ListItem_t * ) &( pxList->xListEnd ); pxIterator->pxNext->xItemValue <= xValueOfInsertion; pxIterator = pxIterator->pxNext ) /*lint !e826 !e740 !e9087 The mini list structure is used as the list end to save RAM. This is checked and valid. *//*lint !e440 The iterator moves to a different value, not xValueOfInsertion. */ - 80002e2: 687b ldr r3, [r7, #4] - 80002e4: 3308 adds r3, #8 - 80002e6: 60fb str r3, [r7, #12] - 80002e8: e002 b.n 80002f0 - 80002ea: 68fb ldr r3, [r7, #12] - 80002ec: 685b ldr r3, [r3, #4] - 80002ee: 60fb str r3, [r7, #12] - 80002f0: 68fb ldr r3, [r7, #12] - 80002f2: 685b ldr r3, [r3, #4] - 80002f4: 681b ldr r3, [r3, #0] - 80002f6: 68ba ldr r2, [r7, #8] - 80002f8: 429a cmp r2, r3 - 80002fa: d2f6 bcs.n 80002ea + 8000422: 687b ldr r3, [r7, #4] + 8000424: 3308 adds r3, #8 + 8000426: 60fb str r3, [r7, #12] + 8000428: e002 b.n 8000430 + 800042a: 68fb ldr r3, [r7, #12] + 800042c: 685b ldr r3, [r3, #4] + 800042e: 60fb str r3, [r7, #12] + 8000430: 68fb ldr r3, [r7, #12] + 8000432: 685b ldr r3, [r3, #4] + 8000434: 681b ldr r3, [r3, #0] + 8000436: 68ba ldr r2, [r7, #8] + 8000438: 429a cmp r2, r3 + 800043a: d2f6 bcs.n 800042a /* There is nothing to do here, just iterating to the wanted * insertion position. */ } } pxNewListItem->pxNext = pxIterator->pxNext; - 80002fc: 68fb ldr r3, [r7, #12] - 80002fe: 685a ldr r2, [r3, #4] - 8000300: 683b ldr r3, [r7, #0] - 8000302: 605a str r2, [r3, #4] + 800043c: 68fb ldr r3, [r7, #12] + 800043e: 685a ldr r2, [r3, #4] + 8000440: 683b ldr r3, [r7, #0] + 8000442: 605a str r2, [r3, #4] pxNewListItem->pxNext->pxPrevious = pxNewListItem; - 8000304: 683b ldr r3, [r7, #0] - 8000306: 685b ldr r3, [r3, #4] - 8000308: 683a ldr r2, [r7, #0] - 800030a: 609a str r2, [r3, #8] + 8000444: 683b ldr r3, [r7, #0] + 8000446: 685b ldr r3, [r3, #4] + 8000448: 683a ldr r2, [r7, #0] + 800044a: 609a str r2, [r3, #8] pxNewListItem->pxPrevious = pxIterator; - 800030c: 683b ldr r3, [r7, #0] - 800030e: 68fa ldr r2, [r7, #12] - 8000310: 609a str r2, [r3, #8] + 800044c: 683b ldr r3, [r7, #0] + 800044e: 68fa ldr r2, [r7, #12] + 8000450: 609a str r2, [r3, #8] pxIterator->pxNext = pxNewListItem; - 8000312: 68fb ldr r3, [r7, #12] - 8000314: 683a ldr r2, [r7, #0] - 8000316: 605a str r2, [r3, #4] + 8000452: 68fb ldr r3, [r7, #12] + 8000454: 683a ldr r2, [r7, #0] + 8000456: 605a str r2, [r3, #4] /* Remember which list the item is in. This allows fast removal of the * item later. */ pxNewListItem->pxContainer = pxList; - 8000318: 683b ldr r3, [r7, #0] - 800031a: 687a ldr r2, [r7, #4] - 800031c: 611a str r2, [r3, #16] + 8000458: 683b ldr r3, [r7, #0] + 800045a: 687a ldr r2, [r7, #4] + 800045c: 611a str r2, [r3, #16] ( pxList->uxNumberOfItems )++; - 800031e: 687b ldr r3, [r7, #4] - 8000320: 681b ldr r3, [r3, #0] - 8000322: 1c5a adds r2, r3, #1 - 8000324: 687b ldr r3, [r7, #4] - 8000326: 601a str r2, [r3, #0] -} - 8000328: bf00 nop - 800032a: 3714 adds r7, #20 - 800032c: 46bd mov sp, r7 - 800032e: f85d 7b04 ldr.w r7, [sp], #4 - 8000332: 4770 bx lr + 800045e: 687b ldr r3, [r7, #4] + 8000460: 681b ldr r3, [r3, #0] + 8000462: 1c5a adds r2, r3, #1 + 8000464: 687b ldr r3, [r7, #4] + 8000466: 601a str r2, [r3, #0] +} + 8000468: bf00 nop + 800046a: 3714 adds r7, #20 + 800046c: 46bd mov sp, r7 + 800046e: f85d 7b04 ldr.w r7, [sp], #4 + 8000472: 4770 bx lr -08000334 : +08000474 : /*-----------------------------------------------------------*/ UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove ) { - 8000334: b480 push {r7} - 8000336: b085 sub sp, #20 - 8000338: af00 add r7, sp, #0 - 800033a: 6078 str r0, [r7, #4] + 8000474: b480 push {r7} + 8000476: b085 sub sp, #20 + 8000478: af00 add r7, sp, #0 + 800047a: 6078 str r0, [r7, #4] /* The list item knows which list it is in. Obtain the list from the list * item. */ List_t * const pxList = pxItemToRemove->pxContainer; - 800033c: 687b ldr r3, [r7, #4] - 800033e: 691b ldr r3, [r3, #16] - 8000340: 60fb str r3, [r7, #12] + 800047c: 687b ldr r3, [r7, #4] + 800047e: 691b ldr r3, [r3, #16] + 8000480: 60fb str r3, [r7, #12] pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious; - 8000342: 687b ldr r3, [r7, #4] - 8000344: 685b ldr r3, [r3, #4] - 8000346: 687a ldr r2, [r7, #4] - 8000348: 6892 ldr r2, [r2, #8] - 800034a: 609a str r2, [r3, #8] + 8000482: 687b ldr r3, [r7, #4] + 8000484: 685b ldr r3, [r3, #4] + 8000486: 687a ldr r2, [r7, #4] + 8000488: 6892 ldr r2, [r2, #8] + 800048a: 609a str r2, [r3, #8] pxItemToRemove->pxPrevious->pxNext = pxItemToRemove->pxNext; - 800034c: 687b ldr r3, [r7, #4] - 800034e: 689b ldr r3, [r3, #8] - 8000350: 687a ldr r2, [r7, #4] - 8000352: 6852 ldr r2, [r2, #4] - 8000354: 605a str r2, [r3, #4] + 800048c: 687b ldr r3, [r7, #4] + 800048e: 689b ldr r3, [r3, #8] + 8000490: 687a ldr r2, [r7, #4] + 8000492: 6852 ldr r2, [r2, #4] + 8000494: 605a str r2, [r3, #4] /* Only used during decision coverage testing. */ mtCOVERAGE_TEST_DELAY(); /* Make sure the index is left pointing to a valid item. */ if( pxList->pxIndex == pxItemToRemove ) - 8000356: 68fb ldr r3, [r7, #12] - 8000358: 685b ldr r3, [r3, #4] - 800035a: 687a ldr r2, [r7, #4] - 800035c: 429a cmp r2, r3 - 800035e: d103 bne.n 8000368 + 8000496: 68fb ldr r3, [r7, #12] + 8000498: 685b ldr r3, [r3, #4] + 800049a: 687a ldr r2, [r7, #4] + 800049c: 429a cmp r2, r3 + 800049e: d103 bne.n 80004a8 { pxList->pxIndex = pxItemToRemove->pxPrevious; - 8000360: 687b ldr r3, [r7, #4] - 8000362: 689a ldr r2, [r3, #8] - 8000364: 68fb ldr r3, [r7, #12] - 8000366: 605a str r2, [r3, #4] + 80004a0: 687b ldr r3, [r7, #4] + 80004a2: 689a ldr r2, [r3, #8] + 80004a4: 68fb ldr r3, [r7, #12] + 80004a6: 605a str r2, [r3, #4] else { mtCOVERAGE_TEST_MARKER(); } pxItemToRemove->pxContainer = NULL; - 8000368: 687b ldr r3, [r7, #4] - 800036a: 2200 movs r2, #0 - 800036c: 611a str r2, [r3, #16] + 80004a8: 687b ldr r3, [r7, #4] + 80004aa: 2200 movs r2, #0 + 80004ac: 611a str r2, [r3, #16] ( pxList->uxNumberOfItems )--; - 800036e: 68fb ldr r3, [r7, #12] - 8000370: 681b ldr r3, [r3, #0] - 8000372: 1e5a subs r2, r3, #1 - 8000374: 68fb ldr r3, [r7, #12] - 8000376: 601a str r2, [r3, #0] + 80004ae: 68fb ldr r3, [r7, #12] + 80004b0: 681b ldr r3, [r3, #0] + 80004b2: 1e5a subs r2, r3, #1 + 80004b4: 68fb ldr r3, [r7, #12] + 80004b6: 601a str r2, [r3, #0] return pxList->uxNumberOfItems; - 8000378: 68fb ldr r3, [r7, #12] - 800037a: 681b ldr r3, [r3, #0] + 80004b8: 68fb ldr r3, [r7, #12] + 80004ba: 681b ldr r3, [r3, #0] } - 800037c: 4618 mov r0, r3 - 800037e: 3714 adds r7, #20 - 8000380: 46bd mov sp, r7 - 8000382: f85d 7b04 ldr.w r7, [sp], #4 - 8000386: 4770 bx lr + 80004bc: 4618 mov r0, r3 + 80004be: 3714 adds r7, #20 + 80004c0: 46bd mov sp, r7 + 80004c2: f85d 7b04 ldr.w r7, [sp], #4 + 80004c6: 4770 bx lr -08000388 : +080004c8 : taskEXIT_CRITICAL() /*-----------------------------------------------------------*/ BaseType_t xQueueGenericReset( QueueHandle_t xQueue, BaseType_t xNewQueue ) { - 8000388: b580 push {r7, lr} - 800038a: b084 sub sp, #16 - 800038c: af00 add r7, sp, #0 - 800038e: 6078 str r0, [r7, #4] - 8000390: 6039 str r1, [r7, #0] + 80004c8: b580 push {r7, lr} + 80004ca: b084 sub sp, #16 + 80004cc: af00 add r7, sp, #0 + 80004ce: 6078 str r0, [r7, #4] + 80004d0: 6039 str r1, [r7, #0] Queue_t * const pxQueue = xQueue; - 8000392: 687b ldr r3, [r7, #4] - 8000394: 60fb str r3, [r7, #12] + 80004d2: 687b ldr r3, [r7, #4] + 80004d4: 60fb str r3, [r7, #12] configASSERT( pxQueue ); - 8000396: 68fb ldr r3, [r7, #12] - 8000398: 2b00 cmp r3, #0 - 800039a: d109 bne.n 80003b0 + 80004d6: 68fb ldr r3, [r7, #12] + 80004d8: 2b00 cmp r3, #0 + 80004da: d109 bne.n 80004f0 portFORCE_INLINE static void vPortRaiseBASEPRI( void ) { uint32_t ulNewBASEPRI; __asm volatile - 800039c: f04f 0350 mov.w r3, #80 ; 0x50 - 80003a0: f383 8811 msr BASEPRI, r3 - 80003a4: f3bf 8f6f isb sy - 80003a8: f3bf 8f4f dsb sy - 80003ac: 60bb str r3, [r7, #8] - 80003ae: e7fe b.n 80003ae + 80004dc: f04f 0350 mov.w r3, #80 ; 0x50 + 80004e0: f383 8811 msr BASEPRI, r3 + 80004e4: f3bf 8f6f isb sy + 80004e8: f3bf 8f4f dsb sy + 80004ec: 60bb str r3, [r7, #8] + 80004ee: e7fe b.n 80004ee taskENTER_CRITICAL(); - 80003b0: f001 ff66 bl 8002280 + 80004f0: f002 fbb6 bl 8002c60 { pxQueue->u.xQueue.pcTail = pxQueue->pcHead + ( pxQueue->uxLength * pxQueue->uxItemSize ); /*lint !e9016 Pointer arithmetic allowed on char types, especially when it assists conveying intent. */ - 80003b4: 68fb ldr r3, [r7, #12] - 80003b6: 681a ldr r2, [r3, #0] - 80003b8: 68fb ldr r3, [r7, #12] - 80003ba: 6bdb ldr r3, [r3, #60] ; 0x3c - 80003bc: 68f9 ldr r1, [r7, #12] - 80003be: 6c09 ldr r1, [r1, #64] ; 0x40 - 80003c0: fb01 f303 mul.w r3, r1, r3 - 80003c4: 441a add r2, r3 - 80003c6: 68fb ldr r3, [r7, #12] - 80003c8: 609a str r2, [r3, #8] + 80004f4: 68fb ldr r3, [r7, #12] + 80004f6: 681a ldr r2, [r3, #0] + 80004f8: 68fb ldr r3, [r7, #12] + 80004fa: 6bdb ldr r3, [r3, #60] ; 0x3c + 80004fc: 68f9 ldr r1, [r7, #12] + 80004fe: 6c09 ldr r1, [r1, #64] ; 0x40 + 8000500: fb01 f303 mul.w r3, r1, r3 + 8000504: 441a add r2, r3 + 8000506: 68fb ldr r3, [r7, #12] + 8000508: 609a str r2, [r3, #8] pxQueue->uxMessagesWaiting = ( UBaseType_t ) 0U; - 80003ca: 68fb ldr r3, [r7, #12] - 80003cc: 2200 movs r2, #0 - 80003ce: 639a str r2, [r3, #56] ; 0x38 + 800050a: 68fb ldr r3, [r7, #12] + 800050c: 2200 movs r2, #0 + 800050e: 639a str r2, [r3, #56] ; 0x38 pxQueue->pcWriteTo = pxQueue->pcHead; - 80003d0: 68fb ldr r3, [r7, #12] - 80003d2: 681a ldr r2, [r3, #0] - 80003d4: 68fb ldr r3, [r7, #12] - 80003d6: 605a str r2, [r3, #4] + 8000510: 68fb ldr r3, [r7, #12] + 8000512: 681a ldr r2, [r3, #0] + 8000514: 68fb ldr r3, [r7, #12] + 8000516: 605a str r2, [r3, #4] pxQueue->u.xQueue.pcReadFrom = pxQueue->pcHead + ( ( pxQueue->uxLength - 1U ) * pxQueue->uxItemSize ); /*lint !e9016 Pointer arithmetic allowed on char types, especially when it assists conveying intent. */ - 80003d8: 68fb ldr r3, [r7, #12] - 80003da: 681a ldr r2, [r3, #0] - 80003dc: 68fb ldr r3, [r7, #12] - 80003de: 6bdb ldr r3, [r3, #60] ; 0x3c - 80003e0: 3b01 subs r3, #1 - 80003e2: 68f9 ldr r1, [r7, #12] - 80003e4: 6c09 ldr r1, [r1, #64] ; 0x40 - 80003e6: fb01 f303 mul.w r3, r1, r3 - 80003ea: 441a add r2, r3 - 80003ec: 68fb ldr r3, [r7, #12] - 80003ee: 60da str r2, [r3, #12] + 8000518: 68fb ldr r3, [r7, #12] + 800051a: 681a ldr r2, [r3, #0] + 800051c: 68fb ldr r3, [r7, #12] + 800051e: 6bdb ldr r3, [r3, #60] ; 0x3c + 8000520: 3b01 subs r3, #1 + 8000522: 68f9 ldr r1, [r7, #12] + 8000524: 6c09 ldr r1, [r1, #64] ; 0x40 + 8000526: fb01 f303 mul.w r3, r1, r3 + 800052a: 441a add r2, r3 + 800052c: 68fb ldr r3, [r7, #12] + 800052e: 60da str r2, [r3, #12] pxQueue->cRxLock = queueUNLOCKED; - 80003f0: 68fb ldr r3, [r7, #12] - 80003f2: 22ff movs r2, #255 ; 0xff - 80003f4: f883 2044 strb.w r2, [r3, #68] ; 0x44 + 8000530: 68fb ldr r3, [r7, #12] + 8000532: 22ff movs r2, #255 ; 0xff + 8000534: f883 2044 strb.w r2, [r3, #68] ; 0x44 pxQueue->cTxLock = queueUNLOCKED; - 80003f8: 68fb ldr r3, [r7, #12] - 80003fa: 22ff movs r2, #255 ; 0xff - 80003fc: f883 2045 strb.w r2, [r3, #69] ; 0x45 + 8000538: 68fb ldr r3, [r7, #12] + 800053a: 22ff movs r2, #255 ; 0xff + 800053c: f883 2045 strb.w r2, [r3, #69] ; 0x45 if( xNewQueue == pdFALSE ) - 8000400: 683b ldr r3, [r7, #0] - 8000402: 2b00 cmp r3, #0 - 8000404: d114 bne.n 8000430 + 8000540: 683b ldr r3, [r7, #0] + 8000542: 2b00 cmp r3, #0 + 8000544: d114 bne.n 8000570 /* If there are tasks blocked waiting to read from the queue, then * the tasks will remain blocked as after this function exits the queue * will still be empty. If there are tasks blocked waiting to write to * the queue, then one should be unblocked as after this function exits * it will be possible to write to it. */ if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) - 8000406: 68fb ldr r3, [r7, #12] - 8000408: 691b ldr r3, [r3, #16] - 800040a: 2b00 cmp r3, #0 - 800040c: d01a beq.n 8000444 + 8000546: 68fb ldr r3, [r7, #12] + 8000548: 691b ldr r3, [r3, #16] + 800054a: 2b00 cmp r3, #0 + 800054c: d01a beq.n 8000584 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) - 800040e: 68fb ldr r3, [r7, #12] - 8000410: 3310 adds r3, #16 - 8000412: 4618 mov r0, r3 - 8000414: f001 f86a bl 80014ec - 8000418: 4603 mov r3, r0 - 800041a: 2b00 cmp r3, #0 - 800041c: d012 beq.n 8000444 + 800054e: 68fb ldr r3, [r7, #12] + 8000550: 3310 adds r3, #16 + 8000552: 4618 mov r0, r3 + 8000554: f001 f9ba bl 80018cc + 8000558: 4603 mov r3, r0 + 800055a: 2b00 cmp r3, #0 + 800055c: d012 beq.n 8000584 { queueYIELD_IF_USING_PREEMPTION(); - 800041e: 4b0d ldr r3, [pc, #52] ; (8000454 ) - 8000420: f04f 5280 mov.w r2, #268435456 ; 0x10000000 - 8000424: 601a str r2, [r3, #0] - 8000426: f3bf 8f4f dsb sy - 800042a: f3bf 8f6f isb sy - 800042e: e009 b.n 8000444 + 800055e: 4b0d ldr r3, [pc, #52] ; (8000594 ) + 8000560: f04f 5280 mov.w r2, #268435456 ; 0x10000000 + 8000564: 601a str r2, [r3, #0] + 8000566: f3bf 8f4f dsb sy + 800056a: f3bf 8f6f isb sy + 800056e: e009 b.n 8000584 } } else { /* Ensure the event queues start in the correct state. */ vListInitialise( &( pxQueue->xTasksWaitingToSend ) ); - 8000430: 68fb ldr r3, [r7, #12] - 8000432: 3310 adds r3, #16 - 8000434: 4618 mov r0, r3 - 8000436: f7ff fef3 bl 8000220 + 8000570: 68fb ldr r3, [r7, #12] + 8000572: 3310 adds r3, #16 + 8000574: 4618 mov r0, r3 + 8000576: f7ff fef3 bl 8000360 vListInitialise( &( pxQueue->xTasksWaitingToReceive ) ); - 800043a: 68fb ldr r3, [r7, #12] - 800043c: 3324 adds r3, #36 ; 0x24 - 800043e: 4618 mov r0, r3 - 8000440: f7ff feee bl 8000220 + 800057a: 68fb ldr r3, [r7, #12] + 800057c: 3324 adds r3, #36 ; 0x24 + 800057e: 4618 mov r0, r3 + 8000580: f7ff feee bl 8000360 } } taskEXIT_CRITICAL(); - 8000444: f001 ff4a bl 80022dc + 8000584: f002 fb9a bl 8002cbc /* A value is returned for calling semantic consistency with previous * versions. */ return pdPASS; - 8000448: 2301 movs r3, #1 + 8000588: 2301 movs r3, #1 } - 800044a: 4618 mov r0, r3 - 800044c: 3710 adds r7, #16 - 800044e: 46bd mov sp, r7 - 8000450: bd80 pop {r7, pc} - 8000452: bf00 nop - 8000454: e000ed04 .word 0xe000ed04 - -08000458 : + 800058a: 4618 mov r0, r3 + 800058c: 3710 adds r7, #16 + 800058e: 46bd mov sp, r7 + 8000590: bd80 pop {r7, pc} + 8000592: bf00 nop + 8000594: e000ed04 .word 0xe000ed04 + +08000598 : #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) QueueHandle_t xQueueGenericCreate( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, const uint8_t ucQueueType ) { - 8000458: b580 push {r7, lr} - 800045a: b08c sub sp, #48 ; 0x30 - 800045c: af02 add r7, sp, #8 - 800045e: 60f8 str r0, [r7, #12] - 8000460: 60b9 str r1, [r7, #8] - 8000462: 4613 mov r3, r2 - 8000464: 71fb strb r3, [r7, #7] + 8000598: b580 push {r7, lr} + 800059a: b08c sub sp, #48 ; 0x30 + 800059c: af02 add r7, sp, #8 + 800059e: 60f8 str r0, [r7, #12] + 80005a0: 60b9 str r1, [r7, #8] + 80005a2: 4613 mov r3, r2 + 80005a4: 71fb strb r3, [r7, #7] Queue_t * pxNewQueue; size_t xQueueSizeInBytes; uint8_t * pucQueueStorage; configASSERT( uxQueueLength > ( UBaseType_t ) 0 ); - 8000466: 68fb ldr r3, [r7, #12] - 8000468: 2b00 cmp r3, #0 - 800046a: d109 bne.n 8000480 - 800046c: f04f 0350 mov.w r3, #80 ; 0x50 - 8000470: f383 8811 msr BASEPRI, r3 - 8000474: f3bf 8f6f isb sy - 8000478: f3bf 8f4f dsb sy - 800047c: 61bb str r3, [r7, #24] - 800047e: e7fe b.n 800047e + 80005a6: 68fb ldr r3, [r7, #12] + 80005a8: 2b00 cmp r3, #0 + 80005aa: d109 bne.n 80005c0 + 80005ac: f04f 0350 mov.w r3, #80 ; 0x50 + 80005b0: f383 8811 msr BASEPRI, r3 + 80005b4: f3bf 8f6f isb sy + 80005b8: f3bf 8f4f dsb sy + 80005bc: 61bb str r3, [r7, #24] + 80005be: e7fe b.n 80005be /* Allocate enough space to hold the maximum number of items that * can be in the queue at any time. It is valid for uxItemSize to be * zero in the case the queue is used as a semaphore. */ xQueueSizeInBytes = ( size_t ) ( uxQueueLength * uxItemSize ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ - 8000480: 68fb ldr r3, [r7, #12] - 8000482: 68ba ldr r2, [r7, #8] - 8000484: fb02 f303 mul.w r3, r2, r3 - 8000488: 627b str r3, [r7, #36] ; 0x24 + 80005c0: 68fb ldr r3, [r7, #12] + 80005c2: 68ba ldr r2, [r7, #8] + 80005c4: fb02 f303 mul.w r3, r2, r3 + 80005c8: 627b str r3, [r7, #36] ; 0x24 /* Check for multiplication overflow. */ configASSERT( ( uxItemSize == 0 ) || ( uxQueueLength == ( xQueueSizeInBytes / uxItemSize ) ) ); - 800048a: 68bb ldr r3, [r7, #8] - 800048c: 2b00 cmp r3, #0 - 800048e: d006 beq.n 800049e - 8000490: 6a7a ldr r2, [r7, #36] ; 0x24 - 8000492: 68bb ldr r3, [r7, #8] - 8000494: fbb2 f3f3 udiv r3, r2, r3 - 8000498: 68fa ldr r2, [r7, #12] - 800049a: 429a cmp r2, r3 - 800049c: d101 bne.n 80004a2 - 800049e: 2301 movs r3, #1 - 80004a0: e000 b.n 80004a4 - 80004a2: 2300 movs r3, #0 - 80004a4: 2b00 cmp r3, #0 - 80004a6: d109 bne.n 80004bc - 80004a8: f04f 0350 mov.w r3, #80 ; 0x50 - 80004ac: f383 8811 msr BASEPRI, r3 - 80004b0: f3bf 8f6f isb sy - 80004b4: f3bf 8f4f dsb sy - 80004b8: 617b str r3, [r7, #20] - 80004ba: e7fe b.n 80004ba + 80005ca: 68bb ldr r3, [r7, #8] + 80005cc: 2b00 cmp r3, #0 + 80005ce: d006 beq.n 80005de + 80005d0: 6a7a ldr r2, [r7, #36] ; 0x24 + 80005d2: 68bb ldr r3, [r7, #8] + 80005d4: fbb2 f3f3 udiv r3, r2, r3 + 80005d8: 68fa ldr r2, [r7, #12] + 80005da: 429a cmp r2, r3 + 80005dc: d101 bne.n 80005e2 + 80005de: 2301 movs r3, #1 + 80005e0: e000 b.n 80005e4 + 80005e2: 2300 movs r3, #0 + 80005e4: 2b00 cmp r3, #0 + 80005e6: d109 bne.n 80005fc + 80005e8: f04f 0350 mov.w r3, #80 ; 0x50 + 80005ec: f383 8811 msr BASEPRI, r3 + 80005f0: f3bf 8f6f isb sy + 80005f4: f3bf 8f4f dsb sy + 80005f8: 617b str r3, [r7, #20] + 80005fa: e7fe b.n 80005fa /* Check for addition overflow. */ configASSERT( ( sizeof( Queue_t ) + xQueueSizeInBytes ) > xQueueSizeInBytes ); - 80004bc: 6a7b ldr r3, [r7, #36] ; 0x24 - 80004be: f113 0f51 cmn.w r3, #81 ; 0x51 - 80004c2: d909 bls.n 80004d8 - 80004c4: f04f 0350 mov.w r3, #80 ; 0x50 - 80004c8: f383 8811 msr BASEPRI, r3 - 80004cc: f3bf 8f6f isb sy - 80004d0: f3bf 8f4f dsb sy - 80004d4: 613b str r3, [r7, #16] - 80004d6: e7fe b.n 80004d6 + 80005fc: 6a7b ldr r3, [r7, #36] ; 0x24 + 80005fe: f113 0f51 cmn.w r3, #81 ; 0x51 + 8000602: d909 bls.n 8000618 + 8000604: f04f 0350 mov.w r3, #80 ; 0x50 + 8000608: f383 8811 msr BASEPRI, r3 + 800060c: f3bf 8f6f isb sy + 8000610: f3bf 8f4f dsb sy + 8000614: 613b str r3, [r7, #16] + 8000616: e7fe b.n 8000616 * alignment requirements of the Queue_t structure - which in this case * is an int8_t *. Therefore, whenever the stack alignment requirements * are greater than or equal to the pointer to char requirements the cast * is safe. In other cases alignment requirements are not strict (one or * two bytes). */ pxNewQueue = ( Queue_t * ) pvPortMalloc( sizeof( Queue_t ) + xQueueSizeInBytes ); /*lint !e9087 !e9079 see comment above. */ - 80004d8: 6a7b ldr r3, [r7, #36] ; 0x24 - 80004da: 3350 adds r3, #80 ; 0x50 - 80004dc: 4618 mov r0, r3 - 80004de: f001 ffe9 bl 80024b4 - 80004e2: 6238 str r0, [r7, #32] + 8000618: 6a7b ldr r3, [r7, #36] ; 0x24 + 800061a: 3350 adds r3, #80 ; 0x50 + 800061c: 4618 mov r0, r3 + 800061e: f002 fc41 bl 8002ea4 + 8000622: 6238 str r0, [r7, #32] if( pxNewQueue != NULL ) - 80004e4: 6a3b ldr r3, [r7, #32] - 80004e6: 2b00 cmp r3, #0 - 80004e8: d00d beq.n 8000506 + 8000624: 6a3b ldr r3, [r7, #32] + 8000626: 2b00 cmp r3, #0 + 8000628: d00d beq.n 8000646 { /* Jump past the queue structure to find the location of the queue * storage area. */ pucQueueStorage = ( uint8_t * ) pxNewQueue; - 80004ea: 6a3b ldr r3, [r7, #32] - 80004ec: 61fb str r3, [r7, #28] + 800062a: 6a3b ldr r3, [r7, #32] + 800062c: 61fb str r3, [r7, #28] pucQueueStorage += sizeof( Queue_t ); /*lint !e9016 Pointer arithmetic allowed on char types, especially when it assists conveying intent. */ - 80004ee: 69fb ldr r3, [r7, #28] - 80004f0: 3350 adds r3, #80 ; 0x50 - 80004f2: 61fb str r3, [r7, #28] + 800062e: 69fb ldr r3, [r7, #28] + 8000630: 3350 adds r3, #80 ; 0x50 + 8000632: 61fb str r3, [r7, #28] * deleted. */ pxNewQueue->ucStaticallyAllocated = pdFALSE; } #endif /* configSUPPORT_STATIC_ALLOCATION */ prvInitialiseNewQueue( uxQueueLength, uxItemSize, pucQueueStorage, ucQueueType, pxNewQueue ); - 80004f4: 79fa ldrb r2, [r7, #7] - 80004f6: 6a3b ldr r3, [r7, #32] - 80004f8: 9300 str r3, [sp, #0] - 80004fa: 4613 mov r3, r2 - 80004fc: 69fa ldr r2, [r7, #28] - 80004fe: 68b9 ldr r1, [r7, #8] - 8000500: 68f8 ldr r0, [r7, #12] - 8000502: f000 f805 bl 8000510 + 8000634: 79fa ldrb r2, [r7, #7] + 8000636: 6a3b ldr r3, [r7, #32] + 8000638: 9300 str r3, [sp, #0] + 800063a: 4613 mov r3, r2 + 800063c: 69fa ldr r2, [r7, #28] + 800063e: 68b9 ldr r1, [r7, #8] + 8000640: 68f8 ldr r0, [r7, #12] + 8000642: f000 f805 bl 8000650 { traceQUEUE_CREATE_FAILED( ucQueueType ); mtCOVERAGE_TEST_MARKER(); } return pxNewQueue; - 8000506: 6a3b ldr r3, [r7, #32] + 8000646: 6a3b ldr r3, [r7, #32] } - 8000508: 4618 mov r0, r3 - 800050a: 3728 adds r7, #40 ; 0x28 - 800050c: 46bd mov sp, r7 - 800050e: bd80 pop {r7, pc} + 8000648: 4618 mov r0, r3 + 800064a: 3728 adds r7, #40 ; 0x28 + 800064c: 46bd mov sp, r7 + 800064e: bd80 pop {r7, pc} -08000510 : +08000650 : static void prvInitialiseNewQueue( const UBaseType_t uxQueueLength, const UBaseType_t uxItemSize, uint8_t * pucQueueStorage, const uint8_t ucQueueType, Queue_t * pxNewQueue ) { - 8000510: b580 push {r7, lr} - 8000512: b084 sub sp, #16 - 8000514: af00 add r7, sp, #0 - 8000516: 60f8 str r0, [r7, #12] - 8000518: 60b9 str r1, [r7, #8] - 800051a: 607a str r2, [r7, #4] - 800051c: 70fb strb r3, [r7, #3] + 8000650: b580 push {r7, lr} + 8000652: b084 sub sp, #16 + 8000654: af00 add r7, sp, #0 + 8000656: 60f8 str r0, [r7, #12] + 8000658: 60b9 str r1, [r7, #8] + 800065a: 607a str r2, [r7, #4] + 800065c: 70fb strb r3, [r7, #3] /* Remove compiler warnings about unused parameters should * configUSE_TRACE_FACILITY not be set to 1. */ ( void ) ucQueueType; if( uxItemSize == ( UBaseType_t ) 0 ) - 800051e: 68bb ldr r3, [r7, #8] - 8000520: 2b00 cmp r3, #0 - 8000522: d103 bne.n 800052c + 800065e: 68bb ldr r3, [r7, #8] + 8000660: 2b00 cmp r3, #0 + 8000662: d103 bne.n 800066c { /* No RAM was allocated for the queue storage area, but PC head cannot * be set to NULL because NULL is used as a key to say the queue is used as * a mutex. Therefore just set pcHead to point to the queue as a benign * value that is known to be within the memory map. */ pxNewQueue->pcHead = ( int8_t * ) pxNewQueue; - 8000524: 69bb ldr r3, [r7, #24] - 8000526: 69ba ldr r2, [r7, #24] - 8000528: 601a str r2, [r3, #0] - 800052a: e002 b.n 8000532 + 8000664: 69bb ldr r3, [r7, #24] + 8000666: 69ba ldr r2, [r7, #24] + 8000668: 601a str r2, [r3, #0] + 800066a: e002 b.n 8000672 } else { /* Set the head to the start of the queue storage area. */ pxNewQueue->pcHead = ( int8_t * ) pucQueueStorage; - 800052c: 69bb ldr r3, [r7, #24] - 800052e: 687a ldr r2, [r7, #4] - 8000530: 601a str r2, [r3, #0] + 800066c: 69bb ldr r3, [r7, #24] + 800066e: 687a ldr r2, [r7, #4] + 8000670: 601a str r2, [r3, #0] } /* Initialise the queue members as described where the queue type is * defined. */ pxNewQueue->uxLength = uxQueueLength; - 8000532: 69bb ldr r3, [r7, #24] - 8000534: 68fa ldr r2, [r7, #12] - 8000536: 63da str r2, [r3, #60] ; 0x3c + 8000672: 69bb ldr r3, [r7, #24] + 8000674: 68fa ldr r2, [r7, #12] + 8000676: 63da str r2, [r3, #60] ; 0x3c pxNewQueue->uxItemSize = uxItemSize; - 8000538: 69bb ldr r3, [r7, #24] - 800053a: 68ba ldr r2, [r7, #8] - 800053c: 641a str r2, [r3, #64] ; 0x40 + 8000678: 69bb ldr r3, [r7, #24] + 800067a: 68ba ldr r2, [r7, #8] + 800067c: 641a str r2, [r3, #64] ; 0x40 ( void ) xQueueGenericReset( pxNewQueue, pdTRUE ); - 800053e: 2101 movs r1, #1 - 8000540: 69b8 ldr r0, [r7, #24] - 8000542: f7ff ff21 bl 8000388 + 800067e: 2101 movs r1, #1 + 8000680: 69b8 ldr r0, [r7, #24] + 8000682: f7ff ff21 bl 80004c8 #if ( configUSE_TRACE_FACILITY == 1 ) { pxNewQueue->ucQueueType = ucQueueType; - 8000546: 69bb ldr r3, [r7, #24] - 8000548: 78fa ldrb r2, [r7, #3] - 800054a: f883 204c strb.w r2, [r3, #76] ; 0x4c + 8000686: 69bb ldr r3, [r7, #24] + 8000688: 78fa ldrb r2, [r7, #3] + 800068a: f883 204c strb.w r2, [r3, #76] ; 0x4c + { pxNewQueue->pxQueueSetContainer = NULL; } #endif /* configUSE_QUEUE_SETS */ traceQUEUE_CREATE( pxNewQueue ); + 800068e: 78fb ldrb r3, [r7, #3] + 8000690: 68ba ldr r2, [r7, #8] + 8000692: 68f9 ldr r1, [r7, #12] + 8000694: 2073 movs r0, #115 ; 0x73 + 8000696: f003 fce3 bl 8004060 } - 800054e: bf00 nop - 8000550: 3710 adds r7, #16 - 8000552: 46bd mov sp, r7 - 8000554: bd80 pop {r7, pc} + 800069a: bf00 nop + 800069c: 3710 adds r7, #16 + 800069e: 46bd mov sp, r7 + 80006a0: bd80 pop {r7, pc} ... -08000558 : +080006a4 : BaseType_t xQueueGenericSend( QueueHandle_t xQueue, const void * const pvItemToQueue, TickType_t xTicksToWait, const BaseType_t xCopyPosition ) { - 8000558: b580 push {r7, lr} - 800055a: b08e sub sp, #56 ; 0x38 - 800055c: af00 add r7, sp, #0 - 800055e: 60f8 str r0, [r7, #12] - 8000560: 60b9 str r1, [r7, #8] - 8000562: 607a str r2, [r7, #4] - 8000564: 603b str r3, [r7, #0] + 80006a4: b580 push {r7, lr} + 80006a6: b090 sub sp, #64 ; 0x40 + 80006a8: af02 add r7, sp, #8 + 80006aa: 60f8 str r0, [r7, #12] + 80006ac: 60b9 str r1, [r7, #8] + 80006ae: 607a str r2, [r7, #4] + 80006b0: 603b str r3, [r7, #0] BaseType_t xEntryTimeSet = pdFALSE, xYieldRequired; - 8000566: 2300 movs r3, #0 - 8000568: 637b str r3, [r7, #52] ; 0x34 + 80006b2: 2300 movs r3, #0 + 80006b4: 637b str r3, [r7, #52] ; 0x34 TimeOut_t xTimeOut; Queue_t * const pxQueue = xQueue; - 800056a: 68fb ldr r3, [r7, #12] - 800056c: 633b str r3, [r7, #48] ; 0x30 + 80006b6: 68fb ldr r3, [r7, #12] + 80006b8: 633b str r3, [r7, #48] ; 0x30 configASSERT( pxQueue ); - 800056e: 6b3b ldr r3, [r7, #48] ; 0x30 - 8000570: 2b00 cmp r3, #0 - 8000572: d109 bne.n 8000588 - 8000574: f04f 0350 mov.w r3, #80 ; 0x50 - 8000578: f383 8811 msr BASEPRI, r3 - 800057c: f3bf 8f6f isb sy - 8000580: f3bf 8f4f dsb sy - 8000584: 62bb str r3, [r7, #40] ; 0x28 - 8000586: e7fe b.n 8000586 + 80006ba: 6b3b ldr r3, [r7, #48] ; 0x30 + 80006bc: 2b00 cmp r3, #0 + 80006be: d109 bne.n 80006d4 + 80006c0: f04f 0350 mov.w r3, #80 ; 0x50 + 80006c4: f383 8811 msr BASEPRI, r3 + 80006c8: f3bf 8f6f isb sy + 80006cc: f3bf 8f4f dsb sy + 80006d0: 62bb str r3, [r7, #40] ; 0x28 + 80006d2: e7fe b.n 80006d2 configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); - 8000588: 68bb ldr r3, [r7, #8] - 800058a: 2b00 cmp r3, #0 - 800058c: d103 bne.n 8000596 - 800058e: 6b3b ldr r3, [r7, #48] ; 0x30 - 8000590: 6c1b ldr r3, [r3, #64] ; 0x40 - 8000592: 2b00 cmp r3, #0 - 8000594: d101 bne.n 800059a - 8000596: 2301 movs r3, #1 - 8000598: e000 b.n 800059c - 800059a: 2300 movs r3, #0 - 800059c: 2b00 cmp r3, #0 - 800059e: d109 bne.n 80005b4 - 80005a0: f04f 0350 mov.w r3, #80 ; 0x50 - 80005a4: f383 8811 msr BASEPRI, r3 - 80005a8: f3bf 8f6f isb sy - 80005ac: f3bf 8f4f dsb sy - 80005b0: 627b str r3, [r7, #36] ; 0x24 - 80005b2: e7fe b.n 80005b2 + 80006d4: 68bb ldr r3, [r7, #8] + 80006d6: 2b00 cmp r3, #0 + 80006d8: d103 bne.n 80006e2 + 80006da: 6b3b ldr r3, [r7, #48] ; 0x30 + 80006dc: 6c1b ldr r3, [r3, #64] ; 0x40 + 80006de: 2b00 cmp r3, #0 + 80006e0: d101 bne.n 80006e6 + 80006e2: 2301 movs r3, #1 + 80006e4: e000 b.n 80006e8 + 80006e6: 2300 movs r3, #0 + 80006e8: 2b00 cmp r3, #0 + 80006ea: d109 bne.n 8000700 + 80006ec: f04f 0350 mov.w r3, #80 ; 0x50 + 80006f0: f383 8811 msr BASEPRI, r3 + 80006f4: f3bf 8f6f isb sy + 80006f8: f3bf 8f4f dsb sy + 80006fc: 627b str r3, [r7, #36] ; 0x24 + 80006fe: e7fe b.n 80006fe configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); - 80005b4: 683b ldr r3, [r7, #0] - 80005b6: 2b02 cmp r3, #2 - 80005b8: d103 bne.n 80005c2 - 80005ba: 6b3b ldr r3, [r7, #48] ; 0x30 - 80005bc: 6bdb ldr r3, [r3, #60] ; 0x3c - 80005be: 2b01 cmp r3, #1 - 80005c0: d101 bne.n 80005c6 - 80005c2: 2301 movs r3, #1 - 80005c4: e000 b.n 80005c8 - 80005c6: 2300 movs r3, #0 - 80005c8: 2b00 cmp r3, #0 - 80005ca: d109 bne.n 80005e0 - 80005cc: f04f 0350 mov.w r3, #80 ; 0x50 - 80005d0: f383 8811 msr BASEPRI, r3 - 80005d4: f3bf 8f6f isb sy - 80005d8: f3bf 8f4f dsb sy - 80005dc: 623b str r3, [r7, #32] - 80005de: e7fe b.n 80005de + 8000700: 683b ldr r3, [r7, #0] + 8000702: 2b02 cmp r3, #2 + 8000704: d103 bne.n 800070e + 8000706: 6b3b ldr r3, [r7, #48] ; 0x30 + 8000708: 6bdb ldr r3, [r3, #60] ; 0x3c + 800070a: 2b01 cmp r3, #1 + 800070c: d101 bne.n 8000712 + 800070e: 2301 movs r3, #1 + 8000710: e000 b.n 8000714 + 8000712: 2300 movs r3, #0 + 8000714: 2b00 cmp r3, #0 + 8000716: d109 bne.n 800072c + 8000718: f04f 0350 mov.w r3, #80 ; 0x50 + 800071c: f383 8811 msr BASEPRI, r3 + 8000720: f3bf 8f6f isb sy + 8000724: f3bf 8f4f dsb sy + 8000728: 623b str r3, [r7, #32] + 800072a: e7fe b.n 800072a #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); - 80005e0: f001 f91c bl 800181c - 80005e4: 4603 mov r3, r0 - 80005e6: 2b00 cmp r3, #0 - 80005e8: d102 bne.n 80005f0 - 80005ea: 687b ldr r3, [r7, #4] - 80005ec: 2b00 cmp r3, #0 - 80005ee: d101 bne.n 80005f4 - 80005f0: 2301 movs r3, #1 - 80005f2: e000 b.n 80005f6 - 80005f4: 2300 movs r3, #0 - 80005f6: 2b00 cmp r3, #0 - 80005f8: d109 bne.n 800060e - 80005fa: f04f 0350 mov.w r3, #80 ; 0x50 - 80005fe: f383 8811 msr BASEPRI, r3 - 8000602: f3bf 8f6f isb sy - 8000606: f3bf 8f4f dsb sy - 800060a: 61fb str r3, [r7, #28] - 800060c: e7fe b.n 800060c + 800072c: f001 fa6c bl 8001c08 + 8000730: 4603 mov r3, r0 + 8000732: 2b00 cmp r3, #0 + 8000734: d102 bne.n 800073c + 8000736: 687b ldr r3, [r7, #4] + 8000738: 2b00 cmp r3, #0 + 800073a: d101 bne.n 8000740 + 800073c: 2301 movs r3, #1 + 800073e: e000 b.n 8000742 + 8000740: 2300 movs r3, #0 + 8000742: 2b00 cmp r3, #0 + 8000744: d109 bne.n 800075a + 8000746: f04f 0350 mov.w r3, #80 ; 0x50 + 800074a: f383 8811 msr BASEPRI, r3 + 800074e: f3bf 8f6f isb sy + 8000752: f3bf 8f4f dsb sy + 8000756: 61fb str r3, [r7, #28] + 8000758: e7fe b.n 8000758 /*lint -save -e904 This function relaxes the coding standard somewhat to * allow return statements within the function itself. This is done in the * interest of execution time efficiency. */ for( ; ; ) { taskENTER_CRITICAL(); - 800060e: f001 fe37 bl 8002280 + 800075a: f002 fa81 bl 8002c60 { /* Is there room on the queue now? The running task must be the * highest priority task wanting to access the queue. If the head item * in the queue is to be overwritten then it does not matter if the * queue is full. */ if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) ) - 8000612: 6b3b ldr r3, [r7, #48] ; 0x30 - 8000614: 6b9a ldr r2, [r3, #56] ; 0x38 - 8000616: 6b3b ldr r3, [r7, #48] ; 0x30 - 8000618: 6bdb ldr r3, [r3, #60] ; 0x3c - 800061a: 429a cmp r2, r3 - 800061c: d302 bcc.n 8000624 - 800061e: 683b ldr r3, [r7, #0] - 8000620: 2b02 cmp r3, #2 - 8000622: d129 bne.n 8000678 + 800075e: 6b3b ldr r3, [r7, #48] ; 0x30 + 8000760: 6b9a ldr r2, [r3, #56] ; 0x38 + 8000762: 6b3b ldr r3, [r7, #48] ; 0x30 + 8000764: 6bdb ldr r3, [r3, #60] ; 0x3c + 8000766: 429a cmp r2, r3 + 8000768: d302 bcc.n 8000770 + 800076a: 683b ldr r3, [r7, #0] + 800076c: 2b02 cmp r3, #2 + 800076e: d136 bne.n 80007de + { + traceQUEUE_SEND( pxQueue ); + 8000770: 6b3b ldr r3, [r7, #48] ; 0x30 + 8000772: 4618 mov r0, r3 + 8000774: f004 faac bl 8004cd0 + 8000778: 68ba ldr r2, [r7, #8] + 800077a: 6879 ldr r1, [r7, #4] + 800077c: 683b ldr r3, [r7, #0] + 800077e: 9300 str r3, [sp, #0] + 8000780: 460b mov r3, r1 + 8000782: 4601 mov r1, r0 + 8000784: 205a movs r0, #90 ; 0x5a + 8000786: f003 fce1 bl 800414c } } } #else /* configUSE_QUEUE_SETS */ { xYieldRequired = prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition ); - 8000624: 683a ldr r2, [r7, #0] - 8000626: 68b9 ldr r1, [r7, #8] - 8000628: 6b38 ldr r0, [r7, #48] ; 0x30 - 800062a: f000 fa11 bl 8000a50 - 800062e: 62f8 str r0, [r7, #44] ; 0x2c + 800078a: 683a ldr r2, [r7, #0] + 800078c: 68b9 ldr r1, [r7, #8] + 800078e: 6b38 ldr r0, [r7, #48] ; 0x30 + 8000790: f000 fa78 bl 8000c84 + 8000794: 62f8 str r0, [r7, #44] ; 0x2c /* If there was a task waiting for data to arrive on the * queue then unblock it now. */ if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) - 8000630: 6b3b ldr r3, [r7, #48] ; 0x30 - 8000632: 6a5b ldr r3, [r3, #36] ; 0x24 - 8000634: 2b00 cmp r3, #0 - 8000636: d010 beq.n 800065a + 8000796: 6b3b ldr r3, [r7, #48] ; 0x30 + 8000798: 6a5b ldr r3, [r3, #36] ; 0x24 + 800079a: 2b00 cmp r3, #0 + 800079c: d010 beq.n 80007c0 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) - 8000638: 6b3b ldr r3, [r7, #48] ; 0x30 - 800063a: 3324 adds r3, #36 ; 0x24 - 800063c: 4618 mov r0, r3 - 800063e: f000 ff55 bl 80014ec - 8000642: 4603 mov r3, r0 - 8000644: 2b00 cmp r3, #0 - 8000646: d013 beq.n 8000670 + 800079e: 6b3b ldr r3, [r7, #48] ; 0x30 + 80007a0: 3324 adds r3, #36 ; 0x24 + 80007a2: 4618 mov r0, r3 + 80007a4: f001 f892 bl 80018cc + 80007a8: 4603 mov r3, r0 + 80007aa: 2b00 cmp r3, #0 + 80007ac: d013 beq.n 80007d6 { /* The unblocked task has a priority higher than * our own so yield immediately. Yes it is ok to do * this from within the critical section - the kernel * takes care of that. */ queueYIELD_IF_USING_PREEMPTION(); - 8000648: 4b3f ldr r3, [pc, #252] ; (8000748 ) - 800064a: f04f 5280 mov.w r2, #268435456 ; 0x10000000 - 800064e: 601a str r2, [r3, #0] - 8000650: f3bf 8f4f dsb sy - 8000654: f3bf 8f6f isb sy - 8000658: e00a b.n 8000670 + 80007ae: 4b4d ldr r3, [pc, #308] ; (80008e4 ) + 80007b0: f04f 5280 mov.w r2, #268435456 ; 0x10000000 + 80007b4: 601a str r2, [r3, #0] + 80007b6: f3bf 8f4f dsb sy + 80007ba: f3bf 8f6f isb sy + 80007be: e00a b.n 80007d6 else { mtCOVERAGE_TEST_MARKER(); } } else if( xYieldRequired != pdFALSE ) - 800065a: 6afb ldr r3, [r7, #44] ; 0x2c - 800065c: 2b00 cmp r3, #0 - 800065e: d007 beq.n 8000670 + 80007c0: 6afb ldr r3, [r7, #44] ; 0x2c + 80007c2: 2b00 cmp r3, #0 + 80007c4: d007 beq.n 80007d6 { /* This path is a special case that will only get * executed if the task was holding multiple mutexes and * the mutexes were given back in an order that is * different to that in which they were taken. */ queueYIELD_IF_USING_PREEMPTION(); - 8000660: 4b39 ldr r3, [pc, #228] ; (8000748 ) - 8000662: f04f 5280 mov.w r2, #268435456 ; 0x10000000 - 8000666: 601a str r2, [r3, #0] - 8000668: f3bf 8f4f dsb sy - 800066c: f3bf 8f6f isb sy + 80007c6: 4b47 ldr r3, [pc, #284] ; (80008e4 ) + 80007c8: f04f 5280 mov.w r2, #268435456 ; 0x10000000 + 80007cc: 601a str r2, [r3, #0] + 80007ce: f3bf 8f4f dsb sy + 80007d2: f3bf 8f6f isb sy mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_QUEUE_SETS */ taskEXIT_CRITICAL(); - 8000670: f001 fe34 bl 80022dc + 80007d6: f002 fa71 bl 8002cbc return pdPASS; - 8000674: 2301 movs r3, #1 - 8000676: e063 b.n 8000740 + 80007da: 2301 movs r3, #1 + 80007dc: e07d b.n 80008da } else { if( xTicksToWait == ( TickType_t ) 0 ) - 8000678: 687b ldr r3, [r7, #4] - 800067a: 2b00 cmp r3, #0 - 800067c: d103 bne.n 8000686 + 80007de: 687b ldr r3, [r7, #4] + 80007e0: 2b00 cmp r3, #0 + 80007e2: d110 bne.n 8000806 { /* The queue was full and no block time is specified (or * the block time has expired) so leave now. */ taskEXIT_CRITICAL(); - 800067e: f001 fe2d bl 80022dc + 80007e4: f002 fa6a bl 8002cbc /* Return to the original privilege level before exiting * the function. */ traceQUEUE_SEND_FAILED( pxQueue ); + 80007e8: 6b3b ldr r3, [r7, #48] ; 0x30 + 80007ea: 4618 mov r0, r3 + 80007ec: f004 fa70 bl 8004cd0 + 80007f0: 68ba ldr r2, [r7, #8] + 80007f2: 6879 ldr r1, [r7, #4] + 80007f4: 683b ldr r3, [r7, #0] + 80007f6: 9300 str r3, [sp, #0] + 80007f8: 460b mov r3, r1 + 80007fa: 4601 mov r1, r0 + 80007fc: 205a movs r0, #90 ; 0x5a + 80007fe: f003 fca5 bl 800414c return errQUEUE_FULL; - 8000682: 2300 movs r3, #0 - 8000684: e05c b.n 8000740 + 8000802: 2300 movs r3, #0 + 8000804: e069 b.n 80008da } else if( xEntryTimeSet == pdFALSE ) - 8000686: 6b7b ldr r3, [r7, #52] ; 0x34 - 8000688: 2b00 cmp r3, #0 - 800068a: d106 bne.n 800069a + 8000806: 6b7b ldr r3, [r7, #52] ; 0x34 + 8000808: 2b00 cmp r3, #0 + 800080a: d106 bne.n 800081a { /* The queue was full and a block time was specified so * configure the timeout structure. */ vTaskInternalSetTimeOutState( &xTimeOut ); - 800068c: f107 0314 add.w r3, r7, #20 - 8000690: 4618 mov r0, r3 - 8000692: f000 ff8d bl 80015b0 + 800080c: f107 0314 add.w r3, r7, #20 + 8000810: 4618 mov r0, r3 + 8000812: f001 f8c1 bl 8001998 xEntryTimeSet = pdTRUE; - 8000696: 2301 movs r3, #1 - 8000698: 637b str r3, [r7, #52] ; 0x34 + 8000816: 2301 movs r3, #1 + 8000818: 637b str r3, [r7, #52] ; 0x34 /* Entry time was already set. */ mtCOVERAGE_TEST_MARKER(); } } } taskEXIT_CRITICAL(); - 800069a: f001 fe1f bl 80022dc + 800081a: f002 fa4f bl 8002cbc /* Interrupts and other tasks can send to and receive from the queue * now the critical section has been exited. */ vTaskSuspendAll(); - 800069e: f000 fd0b bl 80010b8 + 800081e: f000 fe0f bl 8001440 prvLockQueue( pxQueue ); - 80006a2: f001 fded bl 8002280 - 80006a6: 6b3b ldr r3, [r7, #48] ; 0x30 - 80006a8: f893 3044 ldrb.w r3, [r3, #68] ; 0x44 - 80006ac: b25b sxtb r3, r3 - 80006ae: f1b3 3fff cmp.w r3, #4294967295 ; 0xffffffff - 80006b2: d103 bne.n 80006bc - 80006b4: 6b3b ldr r3, [r7, #48] ; 0x30 - 80006b6: 2200 movs r2, #0 - 80006b8: f883 2044 strb.w r2, [r3, #68] ; 0x44 - 80006bc: 6b3b ldr r3, [r7, #48] ; 0x30 - 80006be: f893 3045 ldrb.w r3, [r3, #69] ; 0x45 - 80006c2: b25b sxtb r3, r3 - 80006c4: f1b3 3fff cmp.w r3, #4294967295 ; 0xffffffff - 80006c8: d103 bne.n 80006d2 - 80006ca: 6b3b ldr r3, [r7, #48] ; 0x30 - 80006cc: 2200 movs r2, #0 - 80006ce: f883 2045 strb.w r2, [r3, #69] ; 0x45 - 80006d2: f001 fe03 bl 80022dc + 8000822: f002 fa1d bl 8002c60 + 8000826: 6b3b ldr r3, [r7, #48] ; 0x30 + 8000828: f893 3044 ldrb.w r3, [r3, #68] ; 0x44 + 800082c: b25b sxtb r3, r3 + 800082e: f1b3 3fff cmp.w r3, #4294967295 ; 0xffffffff + 8000832: d103 bne.n 800083c + 8000834: 6b3b ldr r3, [r7, #48] ; 0x30 + 8000836: 2200 movs r2, #0 + 8000838: f883 2044 strb.w r2, [r3, #68] ; 0x44 + 800083c: 6b3b ldr r3, [r7, #48] ; 0x30 + 800083e: f893 3045 ldrb.w r3, [r3, #69] ; 0x45 + 8000842: b25b sxtb r3, r3 + 8000844: f1b3 3fff cmp.w r3, #4294967295 ; 0xffffffff + 8000848: d103 bne.n 8000852 + 800084a: 6b3b ldr r3, [r7, #48] ; 0x30 + 800084c: 2200 movs r2, #0 + 800084e: f883 2045 strb.w r2, [r3, #69] ; 0x45 + 8000852: f002 fa33 bl 8002cbc /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) - 80006d6: 1d3a adds r2, r7, #4 - 80006d8: f107 0314 add.w r3, r7, #20 - 80006dc: 4611 mov r1, r2 - 80006de: 4618 mov r0, r3 - 80006e0: f000 ff7c bl 80015dc - 80006e4: 4603 mov r3, r0 - 80006e6: 2b00 cmp r3, #0 - 80006e8: d124 bne.n 8000734 + 8000856: 1d3a adds r2, r7, #4 + 8000858: f107 0314 add.w r3, r7, #20 + 800085c: 4611 mov r1, r2 + 800085e: 4618 mov r0, r3 + 8000860: f001 f8b0 bl 80019c4 + 8000864: 4603 mov r3, r0 + 8000866: 2b00 cmp r3, #0 + 8000868: d124 bne.n 80008b4 { if( prvIsQueueFull( pxQueue ) != pdFALSE ) - 80006ea: 6b38 ldr r0, [r7, #48] ; 0x30 - 80006ec: f000 faa8 bl 8000c40 - 80006f0: 4603 mov r3, r0 - 80006f2: 2b00 cmp r3, #0 - 80006f4: d018 beq.n 8000728 + 800086a: 6b38 ldr r0, [r7, #48] ; 0x30 + 800086c: f000 fb02 bl 8000e74 + 8000870: 4603 mov r3, r0 + 8000872: 2b00 cmp r3, #0 + 8000874: d018 beq.n 80008a8 { traceBLOCKING_ON_QUEUE_SEND( pxQueue ); vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToSend ), xTicksToWait ); - 80006f6: 6b3b ldr r3, [r7, #48] ; 0x30 - 80006f8: 3310 adds r3, #16 - 80006fa: 687a ldr r2, [r7, #4] - 80006fc: 4611 mov r1, r2 - 80006fe: 4618 mov r0, r3 - 8000700: f000 fea6 bl 8001450 + 8000876: 6b3b ldr r3, [r7, #48] ; 0x30 + 8000878: 3310 adds r3, #16 + 800087a: 687a ldr r2, [r7, #4] + 800087c: 4611 mov r1, r2 + 800087e: 4618 mov r0, r3 + 8000880: f000 ffd2 bl 8001828 /* Unlocking the queue means queue events can effect the * event list. It is possible that interrupts occurring now * remove this task from the event list again - but as the * scheduler is suspended the task will go onto the pending * ready last instead of the actual ready list. */ prvUnlockQueue( pxQueue ); - 8000704: 6b38 ldr r0, [r7, #48] ; 0x30 - 8000706: f000 fa33 bl 8000b70 + 8000884: 6b38 ldr r0, [r7, #48] ; 0x30 + 8000886: f000 fa8d bl 8000da4 /* Resuming the scheduler will move tasks from the pending * ready list into the ready list - so it is feasible that this * task is already in a ready list before it yields - in which * case the yield will not cause a context switch unless there * is also a higher priority task in the pending ready list. */ if( xTaskResumeAll() == pdFALSE ) - 800070a: f000 fce3 bl 80010d4 - 800070e: 4603 mov r3, r0 - 8000710: 2b00 cmp r3, #0 - 8000712: f47f af7c bne.w 800060e + 800088a: f000 fde7 bl 800145c + 800088e: 4603 mov r3, r0 + 8000890: 2b00 cmp r3, #0 + 8000892: f47f af62 bne.w 800075a { portYIELD_WITHIN_API(); - 8000716: 4b0c ldr r3, [pc, #48] ; (8000748 ) - 8000718: f04f 5280 mov.w r2, #268435456 ; 0x10000000 - 800071c: 601a str r2, [r3, #0] - 800071e: f3bf 8f4f dsb sy - 8000722: f3bf 8f6f isb sy - 8000726: e772 b.n 800060e + 8000896: 4b13 ldr r3, [pc, #76] ; (80008e4 ) + 8000898: f04f 5280 mov.w r2, #268435456 ; 0x10000000 + 800089c: 601a str r2, [r3, #0] + 800089e: f3bf 8f4f dsb sy + 80008a2: f3bf 8f6f isb sy + 80008a6: e758 b.n 800075a } } else { /* Try again. */ prvUnlockQueue( pxQueue ); - 8000728: 6b38 ldr r0, [r7, #48] ; 0x30 - 800072a: f000 fa21 bl 8000b70 + 80008a8: 6b38 ldr r0, [r7, #48] ; 0x30 + 80008aa: f000 fa7b bl 8000da4 ( void ) xTaskResumeAll(); - 800072e: f000 fcd1 bl 80010d4 - 8000732: e76c b.n 800060e + 80008ae: f000 fdd5 bl 800145c + 80008b2: e752 b.n 800075a } } else { /* The timeout has expired. */ prvUnlockQueue( pxQueue ); - 8000734: 6b38 ldr r0, [r7, #48] ; 0x30 - 8000736: f000 fa1b bl 8000b70 + 80008b4: 6b38 ldr r0, [r7, #48] ; 0x30 + 80008b6: f000 fa75 bl 8000da4 ( void ) xTaskResumeAll(); - 800073a: f000 fccb bl 80010d4 + 80008ba: f000 fdcf bl 800145c traceQUEUE_SEND_FAILED( pxQueue ); + 80008be: 6b3b ldr r3, [r7, #48] ; 0x30 + 80008c0: 4618 mov r0, r3 + 80008c2: f004 fa05 bl 8004cd0 + 80008c6: 68ba ldr r2, [r7, #8] + 80008c8: 6879 ldr r1, [r7, #4] + 80008ca: 683b ldr r3, [r7, #0] + 80008cc: 9300 str r3, [sp, #0] + 80008ce: 460b mov r3, r1 + 80008d0: 4601 mov r1, r0 + 80008d2: 205a movs r0, #90 ; 0x5a + 80008d4: f003 fc3a bl 800414c return errQUEUE_FULL; - 800073e: 2300 movs r3, #0 + 80008d8: 2300 movs r3, #0 } } /*lint -restore */ } - 8000740: 4618 mov r0, r3 - 8000742: 3738 adds r7, #56 ; 0x38 - 8000744: 46bd mov sp, r7 - 8000746: bd80 pop {r7, pc} - 8000748: e000ed04 .word 0xe000ed04 + 80008da: 4618 mov r0, r3 + 80008dc: 3738 adds r7, #56 ; 0x38 + 80008de: 46bd mov sp, r7 + 80008e0: bd80 pop {r7, pc} + 80008e2: bf00 nop + 80008e4: e000ed04 .word 0xe000ed04 -0800074c : +080008e8 : BaseType_t xQueueGenericSendFromISR( QueueHandle_t xQueue, const void * const pvItemToQueue, BaseType_t * const pxHigherPriorityTaskWoken, const BaseType_t xCopyPosition ) { - 800074c: b580 push {r7, lr} - 800074e: b090 sub sp, #64 ; 0x40 - 8000750: af00 add r7, sp, #0 - 8000752: 60f8 str r0, [r7, #12] - 8000754: 60b9 str r1, [r7, #8] - 8000756: 607a str r2, [r7, #4] - 8000758: 603b str r3, [r7, #0] + 80008e8: b580 push {r7, lr} + 80008ea: b090 sub sp, #64 ; 0x40 + 80008ec: af00 add r7, sp, #0 + 80008ee: 60f8 str r0, [r7, #12] + 80008f0: 60b9 str r1, [r7, #8] + 80008f2: 607a str r2, [r7, #4] + 80008f4: 603b str r3, [r7, #0] BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = xQueue; - 800075a: 68fb ldr r3, [r7, #12] - 800075c: 63bb str r3, [r7, #56] ; 0x38 + 80008f6: 68fb ldr r3, [r7, #12] + 80008f8: 63bb str r3, [r7, #56] ; 0x38 configASSERT( pxQueue ); - 800075e: 6bbb ldr r3, [r7, #56] ; 0x38 - 8000760: 2b00 cmp r3, #0 - 8000762: d109 bne.n 8000778 - 8000764: f04f 0350 mov.w r3, #80 ; 0x50 - 8000768: f383 8811 msr BASEPRI, r3 - 800076c: f3bf 8f6f isb sy - 8000770: f3bf 8f4f dsb sy - 8000774: 62bb str r3, [r7, #40] ; 0x28 - 8000776: e7fe b.n 8000776 + 80008fa: 6bbb ldr r3, [r7, #56] ; 0x38 + 80008fc: 2b00 cmp r3, #0 + 80008fe: d109 bne.n 8000914 + 8000900: f04f 0350 mov.w r3, #80 ; 0x50 + 8000904: f383 8811 msr BASEPRI, r3 + 8000908: f3bf 8f6f isb sy + 800090c: f3bf 8f4f dsb sy + 8000910: 62bb str r3, [r7, #40] ; 0x28 + 8000912: e7fe b.n 8000912 configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) ); - 8000778: 68bb ldr r3, [r7, #8] - 800077a: 2b00 cmp r3, #0 - 800077c: d103 bne.n 8000786 - 800077e: 6bbb ldr r3, [r7, #56] ; 0x38 - 8000780: 6c1b ldr r3, [r3, #64] ; 0x40 - 8000782: 2b00 cmp r3, #0 - 8000784: d101 bne.n 800078a - 8000786: 2301 movs r3, #1 - 8000788: e000 b.n 800078c - 800078a: 2300 movs r3, #0 - 800078c: 2b00 cmp r3, #0 - 800078e: d109 bne.n 80007a4 - 8000790: f04f 0350 mov.w r3, #80 ; 0x50 - 8000794: f383 8811 msr BASEPRI, r3 - 8000798: f3bf 8f6f isb sy - 800079c: f3bf 8f4f dsb sy - 80007a0: 627b str r3, [r7, #36] ; 0x24 - 80007a2: e7fe b.n 80007a2 + 8000914: 68bb ldr r3, [r7, #8] + 8000916: 2b00 cmp r3, #0 + 8000918: d103 bne.n 8000922 + 800091a: 6bbb ldr r3, [r7, #56] ; 0x38 + 800091c: 6c1b ldr r3, [r3, #64] ; 0x40 + 800091e: 2b00 cmp r3, #0 + 8000920: d101 bne.n 8000926 + 8000922: 2301 movs r3, #1 + 8000924: e000 b.n 8000928 + 8000926: 2300 movs r3, #0 + 8000928: 2b00 cmp r3, #0 + 800092a: d109 bne.n 8000940 + 800092c: f04f 0350 mov.w r3, #80 ; 0x50 + 8000930: f383 8811 msr BASEPRI, r3 + 8000934: f3bf 8f6f isb sy + 8000938: f3bf 8f4f dsb sy + 800093c: 627b str r3, [r7, #36] ; 0x24 + 800093e: e7fe b.n 800093e configASSERT( !( ( xCopyPosition == queueOVERWRITE ) && ( pxQueue->uxLength != 1 ) ) ); - 80007a4: 683b ldr r3, [r7, #0] - 80007a6: 2b02 cmp r3, #2 - 80007a8: d103 bne.n 80007b2 - 80007aa: 6bbb ldr r3, [r7, #56] ; 0x38 - 80007ac: 6bdb ldr r3, [r3, #60] ; 0x3c - 80007ae: 2b01 cmp r3, #1 - 80007b0: d101 bne.n 80007b6 - 80007b2: 2301 movs r3, #1 - 80007b4: e000 b.n 80007b8 - 80007b6: 2300 movs r3, #0 - 80007b8: 2b00 cmp r3, #0 - 80007ba: d109 bne.n 80007d0 - 80007bc: f04f 0350 mov.w r3, #80 ; 0x50 - 80007c0: f383 8811 msr BASEPRI, r3 - 80007c4: f3bf 8f6f isb sy - 80007c8: f3bf 8f4f dsb sy - 80007cc: 623b str r3, [r7, #32] - 80007ce: e7fe b.n 80007ce + 8000940: 683b ldr r3, [r7, #0] + 8000942: 2b02 cmp r3, #2 + 8000944: d103 bne.n 800094e + 8000946: 6bbb ldr r3, [r7, #56] ; 0x38 + 8000948: 6bdb ldr r3, [r3, #60] ; 0x3c + 800094a: 2b01 cmp r3, #1 + 800094c: d101 bne.n 8000952 + 800094e: 2301 movs r3, #1 + 8000950: e000 b.n 8000954 + 8000952: 2300 movs r3, #0 + 8000954: 2b00 cmp r3, #0 + 8000956: d109 bne.n 800096c + 8000958: f04f 0350 mov.w r3, #80 ; 0x50 + 800095c: f383 8811 msr BASEPRI, r3 + 8000960: f3bf 8f6f isb sy + 8000964: f3bf 8f4f dsb sy + 8000968: 623b str r3, [r7, #32] + 800096a: e7fe b.n 800096a * that have been assigned a priority at or (logically) below the maximum * system call interrupt priority. FreeRTOS maintains a separate interrupt * safe API to ensure interrupt entry is as fast and as simple as possible. * More information (albeit Cortex-M specific) is provided on the following * link: https://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html */ portASSERT_IF_INTERRUPT_PRIORITY_INVALID(); - 80007d0: f001 fe32 bl 8002438 + 800096c: f002 fa5c bl 8002e28 portFORCE_INLINE static uint32_t ulPortRaiseBASEPRI( void ) { uint32_t ulOriginalBASEPRI, ulNewBASEPRI; __asm volatile - 80007d4: f3ef 8211 mrs r2, BASEPRI - 80007d8: f04f 0350 mov.w r3, #80 ; 0x50 - 80007dc: f383 8811 msr BASEPRI, r3 - 80007e0: f3bf 8f6f isb sy - 80007e4: f3bf 8f4f dsb sy - 80007e8: 61fa str r2, [r7, #28] - 80007ea: 61bb str r3, [r7, #24] + 8000970: f3ef 8211 mrs r2, BASEPRI + 8000974: f04f 0350 mov.w r3, #80 ; 0x50 + 8000978: f383 8811 msr BASEPRI, r3 + 800097c: f3bf 8f6f isb sy + 8000980: f3bf 8f4f dsb sy + 8000984: 61fa str r2, [r7, #28] + 8000986: 61bb str r3, [r7, #24] : "=r" ( ulOriginalBASEPRI ), "=r" ( ulNewBASEPRI ) : "i" ( configMAX_SYSCALL_INTERRUPT_PRIORITY ) : "memory" ); /* This return will not be reached but is necessary to prevent compiler * warnings. */ return ulOriginalBASEPRI; - 80007ec: 69fb ldr r3, [r7, #28] + 8000988: 69fb ldr r3, [r7, #28] /* Similar to xQueueGenericSend, except without blocking if there is no room * in the queue. Also don't directly wake a task that was blocked on a queue * read, instead return a flag to say whether a context switch is required or * not (i.e. has a task with a higher priority than us been woken by this * post). */ uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); - 80007ee: 637b str r3, [r7, #52] ; 0x34 + 800098a: 637b str r3, [r7, #52] ; 0x34 { if( ( pxQueue->uxMessagesWaiting < pxQueue->uxLength ) || ( xCopyPosition == queueOVERWRITE ) ) - 80007f0: 6bbb ldr r3, [r7, #56] ; 0x38 - 80007f2: 6b9a ldr r2, [r3, #56] ; 0x38 - 80007f4: 6bbb ldr r3, [r7, #56] ; 0x38 - 80007f6: 6bdb ldr r3, [r3, #60] ; 0x3c - 80007f8: 429a cmp r2, r3 - 80007fa: d302 bcc.n 8000802 - 80007fc: 683b ldr r3, [r7, #0] - 80007fe: 2b02 cmp r3, #2 - 8000800: d13d bne.n 800087e + 800098c: 6bbb ldr r3, [r7, #56] ; 0x38 + 800098e: 6b9a ldr r2, [r3, #56] ; 0x38 + 8000990: 6bbb ldr r3, [r7, #56] ; 0x38 + 8000992: 6bdb ldr r3, [r3, #60] ; 0x3c + 8000994: 429a cmp r2, r3 + 8000996: d302 bcc.n 800099e + 8000998: 683b ldr r3, [r7, #0] + 800099a: 2b02 cmp r3, #2 + 800099c: d147 bne.n 8000a2e { const int8_t cTxLock = pxQueue->cTxLock; - 8000802: 6bbb ldr r3, [r7, #56] ; 0x38 - 8000804: f893 3045 ldrb.w r3, [r3, #69] ; 0x45 - 8000808: f887 3033 strb.w r3, [r7, #51] ; 0x33 + 800099e: 6bbb ldr r3, [r7, #56] ; 0x38 + 80009a0: f893 3045 ldrb.w r3, [r3, #69] ; 0x45 + 80009a4: f887 3033 strb.w r3, [r7, #51] ; 0x33 const UBaseType_t uxPreviousMessagesWaiting = pxQueue->uxMessagesWaiting; - 800080c: 6bbb ldr r3, [r7, #56] ; 0x38 - 800080e: 6b9b ldr r3, [r3, #56] ; 0x38 - 8000810: 62fb str r3, [r7, #44] ; 0x2c + 80009a8: 6bbb ldr r3, [r7, #56] ; 0x38 + 80009aa: 6b9b ldr r3, [r3, #56] ; 0x38 + 80009ac: 62fb str r3, [r7, #44] ; 0x2c + + traceQUEUE_SEND_FROM_ISR( pxQueue ); + 80009ae: 6bbb ldr r3, [r7, #56] ; 0x38 + 80009b0: 4618 mov r0, r3 + 80009b2: f004 f98d bl 8004cd0 + 80009b6: 4601 mov r1, r0 + 80009b8: 687b ldr r3, [r7, #4] + 80009ba: 461a mov r2, r3 + 80009bc: 2060 movs r0, #96 ; 0x60 + 80009be: f003 faf5 bl 8003fac /* Semaphores use xQueueGiveFromISR(), so pxQueue will not be a * semaphore or mutex. That means prvCopyDataToQueue() cannot result * in a task disinheriting a priority and prvCopyDataToQueue() can be * called here even though the disinherit function does not check if * the scheduler is suspended before accessing the ready lists. */ ( void ) prvCopyDataToQueue( pxQueue, pvItemToQueue, xCopyPosition ); - 8000812: 683a ldr r2, [r7, #0] - 8000814: 68b9 ldr r1, [r7, #8] - 8000816: 6bb8 ldr r0, [r7, #56] ; 0x38 - 8000818: f000 f91a bl 8000a50 + 80009c2: 683a ldr r2, [r7, #0] + 80009c4: 68b9 ldr r1, [r7, #8] + 80009c6: 6bb8 ldr r0, [r7, #56] ; 0x38 + 80009c8: f000 f95c bl 8000c84 /* The event list is not altered if the queue is locked. This will * be done when the queue is unlocked later. */ if( cTxLock == queueUNLOCKED ) - 800081c: f997 3033 ldrsb.w r3, [r7, #51] ; 0x33 - 8000820: f1b3 3fff cmp.w r3, #4294967295 ; 0xffffffff - 8000824: d112 bne.n 800084c + 80009cc: f997 3033 ldrsb.w r3, [r7, #51] ; 0x33 + 80009d0: f1b3 3fff cmp.w r3, #4294967295 ; 0xffffffff + 80009d4: d112 bne.n 80009fc } } } #else /* configUSE_QUEUE_SETS */ { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) - 8000826: 6bbb ldr r3, [r7, #56] ; 0x38 - 8000828: 6a5b ldr r3, [r3, #36] ; 0x24 - 800082a: 2b00 cmp r3, #0 - 800082c: d024 beq.n 8000878 + 80009d6: 6bbb ldr r3, [r7, #56] ; 0x38 + 80009d8: 6a5b ldr r3, [r3, #36] ; 0x24 + 80009da: 2b00 cmp r3, #0 + 80009dc: d024 beq.n 8000a28 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) - 800082e: 6bbb ldr r3, [r7, #56] ; 0x38 - 8000830: 3324 adds r3, #36 ; 0x24 - 8000832: 4618 mov r0, r3 - 8000834: f000 fe5a bl 80014ec - 8000838: 4603 mov r3, r0 - 800083a: 2b00 cmp r3, #0 - 800083c: d01c beq.n 8000878 + 80009de: 6bbb ldr r3, [r7, #56] ; 0x38 + 80009e0: 3324 adds r3, #36 ; 0x24 + 80009e2: 4618 mov r0, r3 + 80009e4: f000 ff72 bl 80018cc + 80009e8: 4603 mov r3, r0 + 80009ea: 2b00 cmp r3, #0 + 80009ec: d01c beq.n 8000a28 { /* The task waiting has a higher priority so record that a * context switch is required. */ if( pxHigherPriorityTaskWoken != NULL ) - 800083e: 687b ldr r3, [r7, #4] - 8000840: 2b00 cmp r3, #0 - 8000842: d019 beq.n 8000878 + 80009ee: 687b ldr r3, [r7, #4] + 80009f0: 2b00 cmp r3, #0 + 80009f2: d019 beq.n 8000a28 { *pxHigherPriorityTaskWoken = pdTRUE; - 8000844: 687b ldr r3, [r7, #4] - 8000846: 2201 movs r2, #1 - 8000848: 601a str r2, [r3, #0] - 800084a: e015 b.n 8000878 + 80009f4: 687b ldr r3, [r7, #4] + 80009f6: 2201 movs r2, #1 + 80009f8: 601a str r2, [r3, #0] + 80009fa: e015 b.n 8000a28 } else { /* Increment the lock count so the task that unlocks the queue * knows that data was posted while it was locked. */ configASSERT( cTxLock != queueINT8_MAX ); - 800084c: f997 3033 ldrsb.w r3, [r7, #51] ; 0x33 - 8000850: 2b7f cmp r3, #127 ; 0x7f - 8000852: d109 bne.n 8000868 + 80009fc: f997 3033 ldrsb.w r3, [r7, #51] ; 0x33 + 8000a00: 2b7f cmp r3, #127 ; 0x7f + 8000a02: d109 bne.n 8000a18 __asm volatile - 8000854: f04f 0350 mov.w r3, #80 ; 0x50 - 8000858: f383 8811 msr BASEPRI, r3 - 800085c: f3bf 8f6f isb sy - 8000860: f3bf 8f4f dsb sy - 8000864: 617b str r3, [r7, #20] - 8000866: e7fe b.n 8000866 + 8000a04: f04f 0350 mov.w r3, #80 ; 0x50 + 8000a08: f383 8811 msr BASEPRI, r3 + 8000a0c: f3bf 8f6f isb sy + 8000a10: f3bf 8f4f dsb sy + 8000a14: 617b str r3, [r7, #20] + 8000a16: e7fe b.n 8000a16 pxQueue->cTxLock = ( int8_t ) ( cTxLock + 1 ); - 8000868: f897 3033 ldrb.w r3, [r7, #51] ; 0x33 - 800086c: 3301 adds r3, #1 - 800086e: b2db uxtb r3, r3 - 8000870: b25a sxtb r2, r3 - 8000872: 6bbb ldr r3, [r7, #56] ; 0x38 - 8000874: f883 2045 strb.w r2, [r3, #69] ; 0x45 + 8000a18: f897 3033 ldrb.w r3, [r7, #51] ; 0x33 + 8000a1c: 3301 adds r3, #1 + 8000a1e: b2db uxtb r3, r3 + 8000a20: b25a sxtb r2, r3 + 8000a22: 6bbb ldr r3, [r7, #56] ; 0x38 + 8000a24: f883 2045 strb.w r2, [r3, #69] ; 0x45 } xReturn = pdPASS; - 8000878: 2301 movs r3, #1 - 800087a: 63fb str r3, [r7, #60] ; 0x3c + 8000a28: 2301 movs r3, #1 + 8000a2a: 63fb str r3, [r7, #60] ; 0x3c { - 800087c: e001 b.n 8000882 + 8000a2c: e00b b.n 8000a46 } else { traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ); + 8000a2e: 6bbb ldr r3, [r7, #56] ; 0x38 + 8000a30: 4618 mov r0, r3 + 8000a32: f004 f94d bl 8004cd0 + 8000a36: 4601 mov r1, r0 + 8000a38: 687b ldr r3, [r7, #4] + 8000a3a: 461a mov r2, r3 + 8000a3c: 2060 movs r0, #96 ; 0x60 + 8000a3e: f003 fab5 bl 8003fac xReturn = errQUEUE_FULL; - 800087e: 2300 movs r3, #0 - 8000880: 63fb str r3, [r7, #60] ; 0x3c - 8000882: 6b7b ldr r3, [r7, #52] ; 0x34 - 8000884: 613b str r3, [r7, #16] + 8000a42: 2300 movs r3, #0 + 8000a44: 63fb str r3, [r7, #60] ; 0x3c + 8000a46: 6b7b ldr r3, [r7, #52] ; 0x34 + 8000a48: 613b str r3, [r7, #16] } /*-----------------------------------------------------------*/ portFORCE_INLINE static void vPortSetBASEPRI( uint32_t ulNewMaskValue ) { __asm volatile - 8000886: 693b ldr r3, [r7, #16] - 8000888: f383 8811 msr BASEPRI, r3 + 8000a4a: 693b ldr r3, [r7, #16] + 8000a4c: f383 8811 msr BASEPRI, r3 } } portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); return xReturn; - 800088c: 6bfb ldr r3, [r7, #60] ; 0x3c + 8000a50: 6bfb ldr r3, [r7, #60] ; 0x3c } - 800088e: 4618 mov r0, r3 - 8000890: 3740 adds r7, #64 ; 0x40 - 8000892: 46bd mov sp, r7 - 8000894: bd80 pop {r7, pc} + 8000a52: 4618 mov r0, r3 + 8000a54: 3740 adds r7, #64 ; 0x40 + 8000a56: 46bd mov sp, r7 + 8000a58: bd80 pop {r7, pc} ... -08000898 : +08000a5c : /*-----------------------------------------------------------*/ BaseType_t xQueueReceive( QueueHandle_t xQueue, void * const pvBuffer, TickType_t xTicksToWait ) { - 8000898: b580 push {r7, lr} - 800089a: b08c sub sp, #48 ; 0x30 - 800089c: af00 add r7, sp, #0 - 800089e: 60f8 str r0, [r7, #12] - 80008a0: 60b9 str r1, [r7, #8] - 80008a2: 607a str r2, [r7, #4] + 8000a5c: b590 push {r4, r7, lr} + 8000a5e: b08f sub sp, #60 ; 0x3c + 8000a60: af02 add r7, sp, #8 + 8000a62: 60f8 str r0, [r7, #12] + 8000a64: 60b9 str r1, [r7, #8] + 8000a66: 607a str r2, [r7, #4] BaseType_t xEntryTimeSet = pdFALSE; - 80008a4: 2300 movs r3, #0 - 80008a6: 62fb str r3, [r7, #44] ; 0x2c + 8000a68: 2300 movs r3, #0 + 8000a6a: 62fb str r3, [r7, #44] ; 0x2c TimeOut_t xTimeOut; Queue_t * const pxQueue = xQueue; - 80008a8: 68fb ldr r3, [r7, #12] - 80008aa: 62bb str r3, [r7, #40] ; 0x28 + 8000a6c: 68fb ldr r3, [r7, #12] + 8000a6e: 62bb str r3, [r7, #40] ; 0x28 /* Check the pointer is not NULL. */ configASSERT( ( pxQueue ) ); - 80008ac: 6abb ldr r3, [r7, #40] ; 0x28 - 80008ae: 2b00 cmp r3, #0 - 80008b0: d109 bne.n 80008c6 + 8000a70: 6abb ldr r3, [r7, #40] ; 0x28 + 8000a72: 2b00 cmp r3, #0 + 8000a74: d109 bne.n 8000a8a __asm volatile - 80008b2: f04f 0350 mov.w r3, #80 ; 0x50 - 80008b6: f383 8811 msr BASEPRI, r3 - 80008ba: f3bf 8f6f isb sy - 80008be: f3bf 8f4f dsb sy - 80008c2: 623b str r3, [r7, #32] - 80008c4: e7fe b.n 80008c4 + 8000a76: f04f 0350 mov.w r3, #80 ; 0x50 + 8000a7a: f383 8811 msr BASEPRI, r3 + 8000a7e: f3bf 8f6f isb sy + 8000a82: f3bf 8f4f dsb sy + 8000a86: 623b str r3, [r7, #32] + 8000a88: e7fe b.n 8000a88 /* The buffer into which data is received can only be NULL if the data size * is zero (so no data is copied into the buffer). */ configASSERT( !( ( ( pvBuffer ) == NULL ) && ( ( pxQueue )->uxItemSize != ( UBaseType_t ) 0U ) ) ); - 80008c6: 68bb ldr r3, [r7, #8] - 80008c8: 2b00 cmp r3, #0 - 80008ca: d103 bne.n 80008d4 - 80008cc: 6abb ldr r3, [r7, #40] ; 0x28 - 80008ce: 6c1b ldr r3, [r3, #64] ; 0x40 - 80008d0: 2b00 cmp r3, #0 - 80008d2: d101 bne.n 80008d8 - 80008d4: 2301 movs r3, #1 - 80008d6: e000 b.n 80008da - 80008d8: 2300 movs r3, #0 - 80008da: 2b00 cmp r3, #0 - 80008dc: d109 bne.n 80008f2 - 80008de: f04f 0350 mov.w r3, #80 ; 0x50 - 80008e2: f383 8811 msr BASEPRI, r3 - 80008e6: f3bf 8f6f isb sy - 80008ea: f3bf 8f4f dsb sy - 80008ee: 61fb str r3, [r7, #28] - 80008f0: e7fe b.n 80008f0 + 8000a8a: 68bb ldr r3, [r7, #8] + 8000a8c: 2b00 cmp r3, #0 + 8000a8e: d103 bne.n 8000a98 + 8000a90: 6abb ldr r3, [r7, #40] ; 0x28 + 8000a92: 6c1b ldr r3, [r3, #64] ; 0x40 + 8000a94: 2b00 cmp r3, #0 + 8000a96: d101 bne.n 8000a9c + 8000a98: 2301 movs r3, #1 + 8000a9a: e000 b.n 8000a9e + 8000a9c: 2300 movs r3, #0 + 8000a9e: 2b00 cmp r3, #0 + 8000aa0: d109 bne.n 8000ab6 + 8000aa2: f04f 0350 mov.w r3, #80 ; 0x50 + 8000aa6: f383 8811 msr BASEPRI, r3 + 8000aaa: f3bf 8f6f isb sy + 8000aae: f3bf 8f4f dsb sy + 8000ab2: 61fb str r3, [r7, #28] + 8000ab4: e7fe b.n 8000ab4 /* Cannot block if the scheduler is suspended. */ #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) { configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) ); - 80008f2: f000 ff93 bl 800181c - 80008f6: 4603 mov r3, r0 - 80008f8: 2b00 cmp r3, #0 - 80008fa: d102 bne.n 8000902 - 80008fc: 687b ldr r3, [r7, #4] - 80008fe: 2b00 cmp r3, #0 - 8000900: d101 bne.n 8000906 - 8000902: 2301 movs r3, #1 - 8000904: e000 b.n 8000908 - 8000906: 2300 movs r3, #0 - 8000908: 2b00 cmp r3, #0 - 800090a: d109 bne.n 8000920 - 800090c: f04f 0350 mov.w r3, #80 ; 0x50 - 8000910: f383 8811 msr BASEPRI, r3 - 8000914: f3bf 8f6f isb sy - 8000918: f3bf 8f4f dsb sy - 800091c: 61bb str r3, [r7, #24] - 800091e: e7fe b.n 800091e + 8000ab6: f001 f8a7 bl 8001c08 + 8000aba: 4603 mov r3, r0 + 8000abc: 2b00 cmp r3, #0 + 8000abe: d102 bne.n 8000ac6 + 8000ac0: 687b ldr r3, [r7, #4] + 8000ac2: 2b00 cmp r3, #0 + 8000ac4: d101 bne.n 8000aca + 8000ac6: 2301 movs r3, #1 + 8000ac8: e000 b.n 8000acc + 8000aca: 2300 movs r3, #0 + 8000acc: 2b00 cmp r3, #0 + 8000ace: d109 bne.n 8000ae4 + 8000ad0: f04f 0350 mov.w r3, #80 ; 0x50 + 8000ad4: f383 8811 msr BASEPRI, r3 + 8000ad8: f3bf 8f6f isb sy + 8000adc: f3bf 8f4f dsb sy + 8000ae0: 61bb str r3, [r7, #24] + 8000ae2: e7fe b.n 8000ae2 /*lint -save -e904 This function relaxes the coding standard somewhat to * allow return statements within the function itself. This is done in the * interest of execution time efficiency. */ for( ; ; ) { taskENTER_CRITICAL(); - 8000920: f001 fcae bl 8002280 + 8000ae4: f002 f8bc bl 8002c60 { const UBaseType_t uxMessagesWaiting = pxQueue->uxMessagesWaiting; - 8000924: 6abb ldr r3, [r7, #40] ; 0x28 - 8000926: 6b9b ldr r3, [r3, #56] ; 0x38 - 8000928: 627b str r3, [r7, #36] ; 0x24 + 8000ae8: 6abb ldr r3, [r7, #40] ; 0x28 + 8000aea: 6b9b ldr r3, [r3, #56] ; 0x38 + 8000aec: 627b str r3, [r7, #36] ; 0x24 /* Is there data in the queue now? To be running the calling task * must be the highest priority task wanting to access the queue. */ if( uxMessagesWaiting > ( UBaseType_t ) 0 ) - 800092a: 6a7b ldr r3, [r7, #36] ; 0x24 - 800092c: 2b00 cmp r3, #0 - 800092e: d01f beq.n 8000970 + 8000aee: 6a7b ldr r3, [r7, #36] ; 0x24 + 8000af0: 2b00 cmp r3, #0 + 8000af2: d031 beq.n 8000b58 { /* Data available, remove one item. */ prvCopyDataFromQueue( pxQueue, pvBuffer ); - 8000930: 68b9 ldr r1, [r7, #8] - 8000932: 6ab8 ldr r0, [r7, #40] ; 0x28 - 8000934: f000 f8f6 bl 8000b24 + 8000af4: 68b9 ldr r1, [r7, #8] + 8000af6: 6ab8 ldr r0, [r7, #40] ; 0x28 + 8000af8: f000 f92e bl 8000d58 traceQUEUE_RECEIVE( pxQueue ); + 8000afc: 6abb ldr r3, [r7, #40] ; 0x28 + 8000afe: 4618 mov r0, r3 + 8000b00: f004 f8e6 bl 8004cd0 + 8000b04: 4604 mov r4, r0 + 8000b06: 2000 movs r0, #0 + 8000b08: f004 f8e2 bl 8004cd0 + 8000b0c: 4601 mov r1, r0 + 8000b0e: 687a ldr r2, [r7, #4] + 8000b10: 2301 movs r3, #1 + 8000b12: 9300 str r3, [sp, #0] + 8000b14: 4613 mov r3, r2 + 8000b16: 460a mov r2, r1 + 8000b18: 4621 mov r1, r4 + 8000b1a: 205c movs r0, #92 ; 0x5c + 8000b1c: f003 fb16 bl 800414c pxQueue->uxMessagesWaiting = uxMessagesWaiting - ( UBaseType_t ) 1; - 8000938: 6a7b ldr r3, [r7, #36] ; 0x24 - 800093a: 1e5a subs r2, r3, #1 - 800093c: 6abb ldr r3, [r7, #40] ; 0x28 - 800093e: 639a str r2, [r3, #56] ; 0x38 + 8000b20: 6a7b ldr r3, [r7, #36] ; 0x24 + 8000b22: 1e5a subs r2, r3, #1 + 8000b24: 6abb ldr r3, [r7, #40] ; 0x28 + 8000b26: 639a str r2, [r3, #56] ; 0x38 /* There is now space in the queue, were any tasks waiting to * post to the queue? If so, unblock the highest priority waiting * task. */ if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) - 8000940: 6abb ldr r3, [r7, #40] ; 0x28 - 8000942: 691b ldr r3, [r3, #16] - 8000944: 2b00 cmp r3, #0 - 8000946: d00f beq.n 8000968 + 8000b28: 6abb ldr r3, [r7, #40] ; 0x28 + 8000b2a: 691b ldr r3, [r3, #16] + 8000b2c: 2b00 cmp r3, #0 + 8000b2e: d00f beq.n 8000b50 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) - 8000948: 6abb ldr r3, [r7, #40] ; 0x28 - 800094a: 3310 adds r3, #16 - 800094c: 4618 mov r0, r3 - 800094e: f000 fdcd bl 80014ec - 8000952: 4603 mov r3, r0 - 8000954: 2b00 cmp r3, #0 - 8000956: d007 beq.n 8000968 + 8000b30: 6abb ldr r3, [r7, #40] ; 0x28 + 8000b32: 3310 adds r3, #16 + 8000b34: 4618 mov r0, r3 + 8000b36: f000 fec9 bl 80018cc + 8000b3a: 4603 mov r3, r0 + 8000b3c: 2b00 cmp r3, #0 + 8000b3e: d007 beq.n 8000b50 { queueYIELD_IF_USING_PREEMPTION(); - 8000958: 4b3c ldr r3, [pc, #240] ; (8000a4c ) - 800095a: f04f 5280 mov.w r2, #268435456 ; 0x10000000 - 800095e: 601a str r2, [r3, #0] - 8000960: f3bf 8f4f dsb sy - 8000964: f3bf 8f6f isb sy + 8000b40: 4b4f ldr r3, [pc, #316] ; (8000c80 ) + 8000b42: f04f 5280 mov.w r2, #268435456 ; 0x10000000 + 8000b46: 601a str r2, [r3, #0] + 8000b48: f3bf 8f4f dsb sy + 8000b4c: f3bf 8f6f isb sy else { mtCOVERAGE_TEST_MARKER(); } taskEXIT_CRITICAL(); - 8000968: f001 fcb8 bl 80022dc + 8000b50: f002 f8b4 bl 8002cbc return pdPASS; - 800096c: 2301 movs r3, #1 - 800096e: e069 b.n 8000a44 + 8000b54: 2301 movs r3, #1 + 8000b56: e08e b.n 8000c76 } else { if( xTicksToWait == ( TickType_t ) 0 ) - 8000970: 687b ldr r3, [r7, #4] - 8000972: 2b00 cmp r3, #0 - 8000974: d103 bne.n 800097e + 8000b58: 687b ldr r3, [r7, #4] + 8000b5a: 2b00 cmp r3, #0 + 8000b5c: d115 bne.n 8000b8a { /* The queue was empty and no block time is specified (or * the block time has expired) so leave now. */ taskEXIT_CRITICAL(); - 8000976: f001 fcb1 bl 80022dc + 8000b5e: f002 f8ad bl 8002cbc traceQUEUE_RECEIVE_FAILED( pxQueue ); + 8000b62: 6abb ldr r3, [r7, #40] ; 0x28 + 8000b64: 4618 mov r0, r3 + 8000b66: f004 f8b3 bl 8004cd0 + 8000b6a: 4604 mov r4, r0 + 8000b6c: 2000 movs r0, #0 + 8000b6e: f004 f8af bl 8004cd0 + 8000b72: 4601 mov r1, r0 + 8000b74: 687a ldr r2, [r7, #4] + 8000b76: 2301 movs r3, #1 + 8000b78: 9300 str r3, [sp, #0] + 8000b7a: 4613 mov r3, r2 + 8000b7c: 460a mov r2, r1 + 8000b7e: 4621 mov r1, r4 + 8000b80: 205c movs r0, #92 ; 0x5c + 8000b82: f003 fae3 bl 800414c return errQUEUE_EMPTY; - 800097a: 2300 movs r3, #0 - 800097c: e062 b.n 8000a44 + 8000b86: 2300 movs r3, #0 + 8000b88: e075 b.n 8000c76 } else if( xEntryTimeSet == pdFALSE ) - 800097e: 6afb ldr r3, [r7, #44] ; 0x2c - 8000980: 2b00 cmp r3, #0 - 8000982: d106 bne.n 8000992 + 8000b8a: 6afb ldr r3, [r7, #44] ; 0x2c + 8000b8c: 2b00 cmp r3, #0 + 8000b8e: d106 bne.n 8000b9e { /* The queue was empty and a block time was specified so * configure the timeout structure. */ vTaskInternalSetTimeOutState( &xTimeOut ); - 8000984: f107 0310 add.w r3, r7, #16 - 8000988: 4618 mov r0, r3 - 800098a: f000 fe11 bl 80015b0 + 8000b90: f107 0310 add.w r3, r7, #16 + 8000b94: 4618 mov r0, r3 + 8000b96: f000 feff bl 8001998 xEntryTimeSet = pdTRUE; - 800098e: 2301 movs r3, #1 - 8000990: 62fb str r3, [r7, #44] ; 0x2c + 8000b9a: 2301 movs r3, #1 + 8000b9c: 62fb str r3, [r7, #44] ; 0x2c /* Entry time was already set. */ mtCOVERAGE_TEST_MARKER(); } } } taskEXIT_CRITICAL(); - 8000992: f001 fca3 bl 80022dc + 8000b9e: f002 f88d bl 8002cbc /* Interrupts and other tasks can send to and receive from the queue * now the critical section has been exited. */ vTaskSuspendAll(); - 8000996: f000 fb8f bl 80010b8 + 8000ba2: f000 fc4d bl 8001440 prvLockQueue( pxQueue ); - 800099a: f001 fc71 bl 8002280 - 800099e: 6abb ldr r3, [r7, #40] ; 0x28 - 80009a0: f893 3044 ldrb.w r3, [r3, #68] ; 0x44 - 80009a4: b25b sxtb r3, r3 - 80009a6: f1b3 3fff cmp.w r3, #4294967295 ; 0xffffffff - 80009aa: d103 bne.n 80009b4 - 80009ac: 6abb ldr r3, [r7, #40] ; 0x28 - 80009ae: 2200 movs r2, #0 - 80009b0: f883 2044 strb.w r2, [r3, #68] ; 0x44 - 80009b4: 6abb ldr r3, [r7, #40] ; 0x28 - 80009b6: f893 3045 ldrb.w r3, [r3, #69] ; 0x45 - 80009ba: b25b sxtb r3, r3 - 80009bc: f1b3 3fff cmp.w r3, #4294967295 ; 0xffffffff - 80009c0: d103 bne.n 80009ca - 80009c2: 6abb ldr r3, [r7, #40] ; 0x28 - 80009c4: 2200 movs r2, #0 - 80009c6: f883 2045 strb.w r2, [r3, #69] ; 0x45 - 80009ca: f001 fc87 bl 80022dc + 8000ba6: f002 f85b bl 8002c60 + 8000baa: 6abb ldr r3, [r7, #40] ; 0x28 + 8000bac: f893 3044 ldrb.w r3, [r3, #68] ; 0x44 + 8000bb0: b25b sxtb r3, r3 + 8000bb2: f1b3 3fff cmp.w r3, #4294967295 ; 0xffffffff + 8000bb6: d103 bne.n 8000bc0 + 8000bb8: 6abb ldr r3, [r7, #40] ; 0x28 + 8000bba: 2200 movs r2, #0 + 8000bbc: f883 2044 strb.w r2, [r3, #68] ; 0x44 + 8000bc0: 6abb ldr r3, [r7, #40] ; 0x28 + 8000bc2: f893 3045 ldrb.w r3, [r3, #69] ; 0x45 + 8000bc6: b25b sxtb r3, r3 + 8000bc8: f1b3 3fff cmp.w r3, #4294967295 ; 0xffffffff + 8000bcc: d103 bne.n 8000bd6 + 8000bce: 6abb ldr r3, [r7, #40] ; 0x28 + 8000bd0: 2200 movs r2, #0 + 8000bd2: f883 2045 strb.w r2, [r3, #69] ; 0x45 + 8000bd6: f002 f871 bl 8002cbc /* Update the timeout state to see if it has expired yet. */ if( xTaskCheckForTimeOut( &xTimeOut, &xTicksToWait ) == pdFALSE ) - 80009ce: 1d3a adds r2, r7, #4 - 80009d0: f107 0310 add.w r3, r7, #16 - 80009d4: 4611 mov r1, r2 - 80009d6: 4618 mov r0, r3 - 80009d8: f000 fe00 bl 80015dc - 80009dc: 4603 mov r3, r0 - 80009de: 2b00 cmp r3, #0 - 80009e0: d123 bne.n 8000a2a + 8000bda: 1d3a adds r2, r7, #4 + 8000bdc: f107 0310 add.w r3, r7, #16 + 8000be0: 4611 mov r1, r2 + 8000be2: 4618 mov r0, r3 + 8000be4: f000 feee bl 80019c4 + 8000be8: 4603 mov r3, r0 + 8000bea: 2b00 cmp r3, #0 + 8000bec: d124 bne.n 8000c38 { /* The timeout has not expired. If the queue is still empty place * the task on the list of tasks waiting to receive from the queue. */ if( prvIsQueueEmpty( pxQueue ) != pdFALSE ) - 80009e2: 6ab8 ldr r0, [r7, #40] ; 0x28 - 80009e4: f000 f916 bl 8000c14 - 80009e8: 4603 mov r3, r0 - 80009ea: 2b00 cmp r3, #0 - 80009ec: d017 beq.n 8000a1e + 8000bee: 6ab8 ldr r0, [r7, #40] ; 0x28 + 8000bf0: f000 f92a bl 8000e48 + 8000bf4: 4603 mov r3, r0 + 8000bf6: 2b00 cmp r3, #0 + 8000bf8: d018 beq.n 8000c2c { traceBLOCKING_ON_QUEUE_RECEIVE( pxQueue ); vTaskPlaceOnEventList( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait ); - 80009ee: 6abb ldr r3, [r7, #40] ; 0x28 - 80009f0: 3324 adds r3, #36 ; 0x24 - 80009f2: 687a ldr r2, [r7, #4] - 80009f4: 4611 mov r1, r2 - 80009f6: 4618 mov r0, r3 - 80009f8: f000 fd2a bl 8001450 + 8000bfa: 6abb ldr r3, [r7, #40] ; 0x28 + 8000bfc: 3324 adds r3, #36 ; 0x24 + 8000bfe: 687a ldr r2, [r7, #4] + 8000c00: 4611 mov r1, r2 + 8000c02: 4618 mov r0, r3 + 8000c04: f000 fe10 bl 8001828 prvUnlockQueue( pxQueue ); - 80009fc: 6ab8 ldr r0, [r7, #40] ; 0x28 - 80009fe: f000 f8b7 bl 8000b70 + 8000c08: 6ab8 ldr r0, [r7, #40] ; 0x28 + 8000c0a: f000 f8cb bl 8000da4 if( xTaskResumeAll() == pdFALSE ) - 8000a02: f000 fb67 bl 80010d4 - 8000a06: 4603 mov r3, r0 - 8000a08: 2b00 cmp r3, #0 - 8000a0a: d189 bne.n 8000920 + 8000c0e: f000 fc25 bl 800145c + 8000c12: 4603 mov r3, r0 + 8000c14: 2b00 cmp r3, #0 + 8000c16: f47f af65 bne.w 8000ae4 { portYIELD_WITHIN_API(); - 8000a0c: 4b0f ldr r3, [pc, #60] ; (8000a4c ) - 8000a0e: f04f 5280 mov.w r2, #268435456 ; 0x10000000 - 8000a12: 601a str r2, [r3, #0] - 8000a14: f3bf 8f4f dsb sy - 8000a18: f3bf 8f6f isb sy - 8000a1c: e780 b.n 8000920 + 8000c1a: 4b19 ldr r3, [pc, #100] ; (8000c80 ) + 8000c1c: f04f 5280 mov.w r2, #268435456 ; 0x10000000 + 8000c20: 601a str r2, [r3, #0] + 8000c22: f3bf 8f4f dsb sy + 8000c26: f3bf 8f6f isb sy + 8000c2a: e75b b.n 8000ae4 } else { /* The queue contains data again. Loop back to try and read the * data. */ prvUnlockQueue( pxQueue ); - 8000a1e: 6ab8 ldr r0, [r7, #40] ; 0x28 - 8000a20: f000 f8a6 bl 8000b70 + 8000c2c: 6ab8 ldr r0, [r7, #40] ; 0x28 + 8000c2e: f000 f8b9 bl 8000da4 ( void ) xTaskResumeAll(); - 8000a24: f000 fb56 bl 80010d4 - 8000a28: e77a b.n 8000920 + 8000c32: f000 fc13 bl 800145c + 8000c36: e755 b.n 8000ae4 } else { /* Timed out. If there is no data in the queue exit, otherwise loop * back and attempt to read the data. */ prvUnlockQueue( pxQueue ); - 8000a2a: 6ab8 ldr r0, [r7, #40] ; 0x28 - 8000a2c: f000 f8a0 bl 8000b70 + 8000c38: 6ab8 ldr r0, [r7, #40] ; 0x28 + 8000c3a: f000 f8b3 bl 8000da4 ( void ) xTaskResumeAll(); - 8000a30: f000 fb50 bl 80010d4 + 8000c3e: f000 fc0d bl 800145c if( prvIsQueueEmpty( pxQueue ) != pdFALSE ) - 8000a34: 6ab8 ldr r0, [r7, #40] ; 0x28 - 8000a36: f000 f8ed bl 8000c14 - 8000a3a: 4603 mov r3, r0 - 8000a3c: 2b00 cmp r3, #0 - 8000a3e: f43f af6f beq.w 8000920 + 8000c42: 6ab8 ldr r0, [r7, #40] ; 0x28 + 8000c44: f000 f900 bl 8000e48 + 8000c48: 4603 mov r3, r0 + 8000c4a: 2b00 cmp r3, #0 + 8000c4c: f43f af4a beq.w 8000ae4 { traceQUEUE_RECEIVE_FAILED( pxQueue ); + 8000c50: 6abb ldr r3, [r7, #40] ; 0x28 + 8000c52: 4618 mov r0, r3 + 8000c54: f004 f83c bl 8004cd0 + 8000c58: 4604 mov r4, r0 + 8000c5a: 2000 movs r0, #0 + 8000c5c: f004 f838 bl 8004cd0 + 8000c60: 4601 mov r1, r0 + 8000c62: 687a ldr r2, [r7, #4] + 8000c64: 2301 movs r3, #1 + 8000c66: 9300 str r3, [sp, #0] + 8000c68: 4613 mov r3, r2 + 8000c6a: 460a mov r2, r1 + 8000c6c: 4621 mov r1, r4 + 8000c6e: 205c movs r0, #92 ; 0x5c + 8000c70: f003 fa6c bl 800414c return errQUEUE_EMPTY; - 8000a42: 2300 movs r3, #0 + 8000c74: 2300 movs r3, #0 { mtCOVERAGE_TEST_MARKER(); } } } /*lint -restore */ } - 8000a44: 4618 mov r0, r3 - 8000a46: 3730 adds r7, #48 ; 0x30 - 8000a48: 46bd mov sp, r7 - 8000a4a: bd80 pop {r7, pc} - 8000a4c: e000ed04 .word 0xe000ed04 - -08000a50 : + 8000c76: 4618 mov r0, r3 + 8000c78: 3734 adds r7, #52 ; 0x34 + 8000c7a: 46bd mov sp, r7 + 8000c7c: bd90 pop {r4, r7, pc} + 8000c7e: bf00 nop + 8000c80: e000ed04 .word 0xe000ed04 + +08000c84 : /*-----------------------------------------------------------*/ static BaseType_t prvCopyDataToQueue( Queue_t * const pxQueue, const void * pvItemToQueue, const BaseType_t xPosition ) { - 8000a50: b580 push {r7, lr} - 8000a52: b086 sub sp, #24 - 8000a54: af00 add r7, sp, #0 - 8000a56: 60f8 str r0, [r7, #12] - 8000a58: 60b9 str r1, [r7, #8] - 8000a5a: 607a str r2, [r7, #4] + 8000c84: b580 push {r7, lr} + 8000c86: b086 sub sp, #24 + 8000c88: af00 add r7, sp, #0 + 8000c8a: 60f8 str r0, [r7, #12] + 8000c8c: 60b9 str r1, [r7, #8] + 8000c8e: 607a str r2, [r7, #4] BaseType_t xReturn = pdFALSE; - 8000a5c: 2300 movs r3, #0 - 8000a5e: 617b str r3, [r7, #20] + 8000c90: 2300 movs r3, #0 + 8000c92: 617b str r3, [r7, #20] UBaseType_t uxMessagesWaiting; /* This function is called from a critical section. */ uxMessagesWaiting = pxQueue->uxMessagesWaiting; - 8000a60: 68fb ldr r3, [r7, #12] - 8000a62: 6b9b ldr r3, [r3, #56] ; 0x38 - 8000a64: 613b str r3, [r7, #16] + 8000c94: 68fb ldr r3, [r7, #12] + 8000c96: 6b9b ldr r3, [r3, #56] ; 0x38 + 8000c98: 613b str r3, [r7, #16] if( pxQueue->uxItemSize == ( UBaseType_t ) 0 ) - 8000a66: 68fb ldr r3, [r7, #12] - 8000a68: 6c1b ldr r3, [r3, #64] ; 0x40 - 8000a6a: 2b00 cmp r3, #0 - 8000a6c: d10d bne.n 8000a8a + 8000c9a: 68fb ldr r3, [r7, #12] + 8000c9c: 6c1b ldr r3, [r3, #64] ; 0x40 + 8000c9e: 2b00 cmp r3, #0 + 8000ca0: d10d bne.n 8000cbe { #if ( configUSE_MUTEXES == 1 ) { if( pxQueue->uxQueueType == queueQUEUE_IS_MUTEX ) - 8000a6e: 68fb ldr r3, [r7, #12] - 8000a70: 681b ldr r3, [r3, #0] - 8000a72: 2b00 cmp r3, #0 - 8000a74: d14d bne.n 8000b12 + 8000ca2: 68fb ldr r3, [r7, #12] + 8000ca4: 681b ldr r3, [r3, #0] + 8000ca6: 2b00 cmp r3, #0 + 8000ca8: d14d bne.n 8000d46 { /* The mutex is no longer being held. */ xReturn = xTaskPriorityDisinherit( pxQueue->u.xSemaphore.xMutexHolder ); - 8000a76: 68fb ldr r3, [r7, #12] - 8000a78: 689b ldr r3, [r3, #8] - 8000a7a: 4618 mov r0, r3 - 8000a7c: f000 feec bl 8001858 - 8000a80: 6178 str r0, [r7, #20] + 8000caa: 68fb ldr r3, [r7, #12] + 8000cac: 689b ldr r3, [r3, #8] + 8000cae: 4618 mov r0, r3 + 8000cb0: f000 ffc8 bl 8001c44 + 8000cb4: 6178 str r0, [r7, #20] pxQueue->u.xSemaphore.xMutexHolder = NULL; - 8000a82: 68fb ldr r3, [r7, #12] - 8000a84: 2200 movs r2, #0 - 8000a86: 609a str r2, [r3, #8] - 8000a88: e043 b.n 8000b12 + 8000cb6: 68fb ldr r3, [r7, #12] + 8000cb8: 2200 movs r2, #0 + 8000cba: 609a str r2, [r3, #8] + 8000cbc: e043 b.n 8000d46 mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_MUTEXES */ } else if( xPosition == queueSEND_TO_BACK ) - 8000a8a: 687b ldr r3, [r7, #4] - 8000a8c: 2b00 cmp r3, #0 - 8000a8e: d119 bne.n 8000ac4 + 8000cbe: 687b ldr r3, [r7, #4] + 8000cc0: 2b00 cmp r3, #0 + 8000cc2: d119 bne.n 8000cf8 { ( void ) memcpy( ( void * ) pxQueue->pcWriteTo, pvItemToQueue, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e418 !e9087 MISRA exception as the casts are only redundant for some ports, plus previous logic ensures a null pointer can only be passed to memcpy() if the copy size is 0. Cast to void required by function signature and safe as no alignment requirement and copy length specified in bytes. */ - 8000a90: 68fb ldr r3, [r7, #12] - 8000a92: 6858 ldr r0, [r3, #4] - 8000a94: 68fb ldr r3, [r7, #12] - 8000a96: 6c1b ldr r3, [r3, #64] ; 0x40 - 8000a98: 461a mov r2, r3 - 8000a9a: 68b9 ldr r1, [r7, #8] - 8000a9c: f002 fd52 bl 8003544 + 8000cc4: 68fb ldr r3, [r7, #12] + 8000cc6: 6858 ldr r0, [r3, #4] + 8000cc8: 68fb ldr r3, [r7, #12] + 8000cca: 6c1b ldr r3, [r3, #64] ; 0x40 + 8000ccc: 461a mov r2, r3 + 8000cce: 68b9 ldr r1, [r7, #8] + 8000cd0: f005 fb59 bl 8006386 pxQueue->pcWriteTo += pxQueue->uxItemSize; /*lint !e9016 Pointer arithmetic on char types ok, especially in this use case where it is the clearest way of conveying intent. */ - 8000aa0: 68fb ldr r3, [r7, #12] - 8000aa2: 685a ldr r2, [r3, #4] - 8000aa4: 68fb ldr r3, [r7, #12] - 8000aa6: 6c1b ldr r3, [r3, #64] ; 0x40 - 8000aa8: 441a add r2, r3 - 8000aaa: 68fb ldr r3, [r7, #12] - 8000aac: 605a str r2, [r3, #4] + 8000cd4: 68fb ldr r3, [r7, #12] + 8000cd6: 685a ldr r2, [r3, #4] + 8000cd8: 68fb ldr r3, [r7, #12] + 8000cda: 6c1b ldr r3, [r3, #64] ; 0x40 + 8000cdc: 441a add r2, r3 + 8000cde: 68fb ldr r3, [r7, #12] + 8000ce0: 605a str r2, [r3, #4] if( pxQueue->pcWriteTo >= pxQueue->u.xQueue.pcTail ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ - 8000aae: 68fb ldr r3, [r7, #12] - 8000ab0: 685a ldr r2, [r3, #4] - 8000ab2: 68fb ldr r3, [r7, #12] - 8000ab4: 689b ldr r3, [r3, #8] - 8000ab6: 429a cmp r2, r3 - 8000ab8: d32b bcc.n 8000b12 + 8000ce2: 68fb ldr r3, [r7, #12] + 8000ce4: 685a ldr r2, [r3, #4] + 8000ce6: 68fb ldr r3, [r7, #12] + 8000ce8: 689b ldr r3, [r3, #8] + 8000cea: 429a cmp r2, r3 + 8000cec: d32b bcc.n 8000d46 { pxQueue->pcWriteTo = pxQueue->pcHead; - 8000aba: 68fb ldr r3, [r7, #12] - 8000abc: 681a ldr r2, [r3, #0] - 8000abe: 68fb ldr r3, [r7, #12] - 8000ac0: 605a str r2, [r3, #4] - 8000ac2: e026 b.n 8000b12 + 8000cee: 68fb ldr r3, [r7, #12] + 8000cf0: 681a ldr r2, [r3, #0] + 8000cf2: 68fb ldr r3, [r7, #12] + 8000cf4: 605a str r2, [r3, #4] + 8000cf6: e026 b.n 8000d46 mtCOVERAGE_TEST_MARKER(); } } else { ( void ) memcpy( ( void * ) pxQueue->u.xQueue.pcReadFrom, pvItemToQueue, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e9087 !e418 MISRA exception as the casts are only redundant for some ports. Cast to void required by function signature and safe as no alignment requirement and copy length specified in bytes. Assert checks null pointer only used when length is 0. */ - 8000ac4: 68fb ldr r3, [r7, #12] - 8000ac6: 68d8 ldr r0, [r3, #12] - 8000ac8: 68fb ldr r3, [r7, #12] - 8000aca: 6c1b ldr r3, [r3, #64] ; 0x40 - 8000acc: 461a mov r2, r3 - 8000ace: 68b9 ldr r1, [r7, #8] - 8000ad0: f002 fd38 bl 8003544 + 8000cf8: 68fb ldr r3, [r7, #12] + 8000cfa: 68d8 ldr r0, [r3, #12] + 8000cfc: 68fb ldr r3, [r7, #12] + 8000cfe: 6c1b ldr r3, [r3, #64] ; 0x40 + 8000d00: 461a mov r2, r3 + 8000d02: 68b9 ldr r1, [r7, #8] + 8000d04: f005 fb3f bl 8006386 pxQueue->u.xQueue.pcReadFrom -= pxQueue->uxItemSize; - 8000ad4: 68fb ldr r3, [r7, #12] - 8000ad6: 68da ldr r2, [r3, #12] - 8000ad8: 68fb ldr r3, [r7, #12] - 8000ada: 6c1b ldr r3, [r3, #64] ; 0x40 - 8000adc: 425b negs r3, r3 - 8000ade: 441a add r2, r3 - 8000ae0: 68fb ldr r3, [r7, #12] - 8000ae2: 60da str r2, [r3, #12] + 8000d08: 68fb ldr r3, [r7, #12] + 8000d0a: 68da ldr r2, [r3, #12] + 8000d0c: 68fb ldr r3, [r7, #12] + 8000d0e: 6c1b ldr r3, [r3, #64] ; 0x40 + 8000d10: 425b negs r3, r3 + 8000d12: 441a add r2, r3 + 8000d14: 68fb ldr r3, [r7, #12] + 8000d16: 60da str r2, [r3, #12] if( pxQueue->u.xQueue.pcReadFrom < pxQueue->pcHead ) /*lint !e946 MISRA exception justified as comparison of pointers is the cleanest solution. */ - 8000ae4: 68fb ldr r3, [r7, #12] - 8000ae6: 68da ldr r2, [r3, #12] - 8000ae8: 68fb ldr r3, [r7, #12] - 8000aea: 681b ldr r3, [r3, #0] - 8000aec: 429a cmp r2, r3 - 8000aee: d207 bcs.n 8000b00 + 8000d18: 68fb ldr r3, [r7, #12] + 8000d1a: 68da ldr r2, [r3, #12] + 8000d1c: 68fb ldr r3, [r7, #12] + 8000d1e: 681b ldr r3, [r3, #0] + 8000d20: 429a cmp r2, r3 + 8000d22: d207 bcs.n 8000d34 { pxQueue->u.xQueue.pcReadFrom = ( pxQueue->u.xQueue.pcTail - pxQueue->uxItemSize ); - 8000af0: 68fb ldr r3, [r7, #12] - 8000af2: 689a ldr r2, [r3, #8] - 8000af4: 68fb ldr r3, [r7, #12] - 8000af6: 6c1b ldr r3, [r3, #64] ; 0x40 - 8000af8: 425b negs r3, r3 - 8000afa: 441a add r2, r3 - 8000afc: 68fb ldr r3, [r7, #12] - 8000afe: 60da str r2, [r3, #12] + 8000d24: 68fb ldr r3, [r7, #12] + 8000d26: 689a ldr r2, [r3, #8] + 8000d28: 68fb ldr r3, [r7, #12] + 8000d2a: 6c1b ldr r3, [r3, #64] ; 0x40 + 8000d2c: 425b negs r3, r3 + 8000d2e: 441a add r2, r3 + 8000d30: 68fb ldr r3, [r7, #12] + 8000d32: 60da str r2, [r3, #12] else { mtCOVERAGE_TEST_MARKER(); } if( xPosition == queueOVERWRITE ) - 8000b00: 687b ldr r3, [r7, #4] - 8000b02: 2b02 cmp r3, #2 - 8000b04: d105 bne.n 8000b12 + 8000d34: 687b ldr r3, [r7, #4] + 8000d36: 2b02 cmp r3, #2 + 8000d38: d105 bne.n 8000d46 { if( uxMessagesWaiting > ( UBaseType_t ) 0 ) - 8000b06: 693b ldr r3, [r7, #16] - 8000b08: 2b00 cmp r3, #0 - 8000b0a: d002 beq.n 8000b12 + 8000d3a: 693b ldr r3, [r7, #16] + 8000d3c: 2b00 cmp r3, #0 + 8000d3e: d002 beq.n 8000d46 { /* An item is not being added but overwritten, so subtract * one from the recorded number of items in the queue so when * one is added again below the number of recorded items remains * correct. */ --uxMessagesWaiting; - 8000b0c: 693b ldr r3, [r7, #16] - 8000b0e: 3b01 subs r3, #1 - 8000b10: 613b str r3, [r7, #16] + 8000d40: 693b ldr r3, [r7, #16] + 8000d42: 3b01 subs r3, #1 + 8000d44: 613b str r3, [r7, #16] { mtCOVERAGE_TEST_MARKER(); } } pxQueue->uxMessagesWaiting = uxMessagesWaiting + ( UBaseType_t ) 1; - 8000b12: 693b ldr r3, [r7, #16] - 8000b14: 1c5a adds r2, r3, #1 - 8000b16: 68fb ldr r3, [r7, #12] - 8000b18: 639a str r2, [r3, #56] ; 0x38 + 8000d46: 693b ldr r3, [r7, #16] + 8000d48: 1c5a adds r2, r3, #1 + 8000d4a: 68fb ldr r3, [r7, #12] + 8000d4c: 639a str r2, [r3, #56] ; 0x38 return xReturn; - 8000b1a: 697b ldr r3, [r7, #20] + 8000d4e: 697b ldr r3, [r7, #20] } - 8000b1c: 4618 mov r0, r3 - 8000b1e: 3718 adds r7, #24 - 8000b20: 46bd mov sp, r7 - 8000b22: bd80 pop {r7, pc} + 8000d50: 4618 mov r0, r3 + 8000d52: 3718 adds r7, #24 + 8000d54: 46bd mov sp, r7 + 8000d56: bd80 pop {r7, pc} -08000b24 : +08000d58 : /*-----------------------------------------------------------*/ static void prvCopyDataFromQueue( Queue_t * const pxQueue, void * const pvBuffer ) { - 8000b24: b580 push {r7, lr} - 8000b26: b082 sub sp, #8 - 8000b28: af00 add r7, sp, #0 - 8000b2a: 6078 str r0, [r7, #4] - 8000b2c: 6039 str r1, [r7, #0] + 8000d58: b580 push {r7, lr} + 8000d5a: b082 sub sp, #8 + 8000d5c: af00 add r7, sp, #0 + 8000d5e: 6078 str r0, [r7, #4] + 8000d60: 6039 str r1, [r7, #0] if( pxQueue->uxItemSize != ( UBaseType_t ) 0 ) - 8000b2e: 687b ldr r3, [r7, #4] - 8000b30: 6c1b ldr r3, [r3, #64] ; 0x40 - 8000b32: 2b00 cmp r3, #0 - 8000b34: d018 beq.n 8000b68 + 8000d62: 687b ldr r3, [r7, #4] + 8000d64: 6c1b ldr r3, [r3, #64] ; 0x40 + 8000d66: 2b00 cmp r3, #0 + 8000d68: d018 beq.n 8000d9c { pxQueue->u.xQueue.pcReadFrom += pxQueue->uxItemSize; /*lint !e9016 Pointer arithmetic on char types ok, especially in this use case where it is the clearest way of conveying intent. */ - 8000b36: 687b ldr r3, [r7, #4] - 8000b38: 68da ldr r2, [r3, #12] - 8000b3a: 687b ldr r3, [r7, #4] - 8000b3c: 6c1b ldr r3, [r3, #64] ; 0x40 - 8000b3e: 441a add r2, r3 - 8000b40: 687b ldr r3, [r7, #4] - 8000b42: 60da str r2, [r3, #12] + 8000d6a: 687b ldr r3, [r7, #4] + 8000d6c: 68da ldr r2, [r3, #12] + 8000d6e: 687b ldr r3, [r7, #4] + 8000d70: 6c1b ldr r3, [r3, #64] ; 0x40 + 8000d72: 441a add r2, r3 + 8000d74: 687b ldr r3, [r7, #4] + 8000d76: 60da str r2, [r3, #12] if( pxQueue->u.xQueue.pcReadFrom >= pxQueue->u.xQueue.pcTail ) /*lint !e946 MISRA exception justified as use of the relational operator is the cleanest solutions. */ - 8000b44: 687b ldr r3, [r7, #4] - 8000b46: 68da ldr r2, [r3, #12] - 8000b48: 687b ldr r3, [r7, #4] - 8000b4a: 689b ldr r3, [r3, #8] - 8000b4c: 429a cmp r2, r3 - 8000b4e: d303 bcc.n 8000b58 + 8000d78: 687b ldr r3, [r7, #4] + 8000d7a: 68da ldr r2, [r3, #12] + 8000d7c: 687b ldr r3, [r7, #4] + 8000d7e: 689b ldr r3, [r3, #8] + 8000d80: 429a cmp r2, r3 + 8000d82: d303 bcc.n 8000d8c { pxQueue->u.xQueue.pcReadFrom = pxQueue->pcHead; - 8000b50: 687b ldr r3, [r7, #4] - 8000b52: 681a ldr r2, [r3, #0] - 8000b54: 687b ldr r3, [r7, #4] - 8000b56: 60da str r2, [r3, #12] + 8000d84: 687b ldr r3, [r7, #4] + 8000d86: 681a ldr r2, [r3, #0] + 8000d88: 687b ldr r3, [r7, #4] + 8000d8a: 60da str r2, [r3, #12] else { mtCOVERAGE_TEST_MARKER(); } ( void ) memcpy( ( void * ) pvBuffer, ( void * ) pxQueue->u.xQueue.pcReadFrom, ( size_t ) pxQueue->uxItemSize ); /*lint !e961 !e418 !e9087 MISRA exception as the casts are only redundant for some ports. Also previous logic ensures a null pointer can only be passed to memcpy() when the count is 0. Cast to void required by function signature and safe as no alignment requirement and copy length specified in bytes. */ - 8000b58: 687b ldr r3, [r7, #4] - 8000b5a: 68d9 ldr r1, [r3, #12] - 8000b5c: 687b ldr r3, [r7, #4] - 8000b5e: 6c1b ldr r3, [r3, #64] ; 0x40 - 8000b60: 461a mov r2, r3 - 8000b62: 6838 ldr r0, [r7, #0] - 8000b64: f002 fcee bl 8003544 + 8000d8c: 687b ldr r3, [r7, #4] + 8000d8e: 68d9 ldr r1, [r3, #12] + 8000d90: 687b ldr r3, [r7, #4] + 8000d92: 6c1b ldr r3, [r3, #64] ; 0x40 + 8000d94: 461a mov r2, r3 + 8000d96: 6838 ldr r0, [r7, #0] + 8000d98: f005 faf5 bl 8006386 } } - 8000b68: bf00 nop - 8000b6a: 3708 adds r7, #8 - 8000b6c: 46bd mov sp, r7 - 8000b6e: bd80 pop {r7, pc} + 8000d9c: bf00 nop + 8000d9e: 3708 adds r7, #8 + 8000da0: 46bd mov sp, r7 + 8000da2: bd80 pop {r7, pc} -08000b70 : +08000da4 : /*-----------------------------------------------------------*/ static void prvUnlockQueue( Queue_t * const pxQueue ) { - 8000b70: b580 push {r7, lr} - 8000b72: b084 sub sp, #16 - 8000b74: af00 add r7, sp, #0 - 8000b76: 6078 str r0, [r7, #4] + 8000da4: b580 push {r7, lr} + 8000da6: b084 sub sp, #16 + 8000da8: af00 add r7, sp, #0 + 8000daa: 6078 str r0, [r7, #4] /* The lock counts contains the number of extra data items placed or * removed from the queue while the queue was locked. When a queue is * locked items can be added or removed, but the event lists cannot be * updated. */ taskENTER_CRITICAL(); - 8000b78: f001 fb82 bl 8002280 + 8000dac: f001 ff58 bl 8002c60 { int8_t cTxLock = pxQueue->cTxLock; - 8000b7c: 687b ldr r3, [r7, #4] - 8000b7e: f893 3045 ldrb.w r3, [r3, #69] ; 0x45 - 8000b82: 73fb strb r3, [r7, #15] + 8000db0: 687b ldr r3, [r7, #4] + 8000db2: f893 3045 ldrb.w r3, [r3, #69] ; 0x45 + 8000db6: 73fb strb r3, [r7, #15] /* See if data was added to the queue while it was locked. */ while( cTxLock > queueLOCKED_UNMODIFIED ) - 8000b84: e011 b.n 8000baa + 8000db8: e011 b.n 8000dde } #else /* configUSE_QUEUE_SETS */ { /* Tasks that are removed from the event list will get added to * the pending ready list as the scheduler is still suspended. */ if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToReceive ) ) == pdFALSE ) - 8000b86: 687b ldr r3, [r7, #4] - 8000b88: 6a5b ldr r3, [r3, #36] ; 0x24 - 8000b8a: 2b00 cmp r3, #0 - 8000b8c: d012 beq.n 8000bb4 + 8000dba: 687b ldr r3, [r7, #4] + 8000dbc: 6a5b ldr r3, [r3, #36] ; 0x24 + 8000dbe: 2b00 cmp r3, #0 + 8000dc0: d012 beq.n 8000de8 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToReceive ) ) != pdFALSE ) - 8000b8e: 687b ldr r3, [r7, #4] - 8000b90: 3324 adds r3, #36 ; 0x24 - 8000b92: 4618 mov r0, r3 - 8000b94: f000 fcaa bl 80014ec - 8000b98: 4603 mov r3, r0 - 8000b9a: 2b00 cmp r3, #0 - 8000b9c: d001 beq.n 8000ba2 + 8000dc2: 687b ldr r3, [r7, #4] + 8000dc4: 3324 adds r3, #36 ; 0x24 + 8000dc6: 4618 mov r0, r3 + 8000dc8: f000 fd80 bl 80018cc + 8000dcc: 4603 mov r3, r0 + 8000dce: 2b00 cmp r3, #0 + 8000dd0: d001 beq.n 8000dd6 { /* The task waiting has a higher priority so record that * a context switch is required. */ vTaskMissedYield(); - 8000b9e: f000 fd81 bl 80016a4 + 8000dd2: f000 fe5b bl 8001a8c break; } } #endif /* configUSE_QUEUE_SETS */ --cTxLock; - 8000ba2: 7bfb ldrb r3, [r7, #15] - 8000ba4: 3b01 subs r3, #1 - 8000ba6: b2db uxtb r3, r3 - 8000ba8: 73fb strb r3, [r7, #15] + 8000dd6: 7bfb ldrb r3, [r7, #15] + 8000dd8: 3b01 subs r3, #1 + 8000dda: b2db uxtb r3, r3 + 8000ddc: 73fb strb r3, [r7, #15] while( cTxLock > queueLOCKED_UNMODIFIED ) - 8000baa: f997 300f ldrsb.w r3, [r7, #15] - 8000bae: 2b00 cmp r3, #0 - 8000bb0: dce9 bgt.n 8000b86 - 8000bb2: e000 b.n 8000bb6 + 8000dde: f997 300f ldrsb.w r3, [r7, #15] + 8000de2: 2b00 cmp r3, #0 + 8000de4: dce9 bgt.n 8000dba + 8000de6: e000 b.n 8000dea break; - 8000bb4: bf00 nop + 8000de8: bf00 nop } pxQueue->cTxLock = queueUNLOCKED; - 8000bb6: 687b ldr r3, [r7, #4] - 8000bb8: 22ff movs r2, #255 ; 0xff - 8000bba: f883 2045 strb.w r2, [r3, #69] ; 0x45 + 8000dea: 687b ldr r3, [r7, #4] + 8000dec: 22ff movs r2, #255 ; 0xff + 8000dee: f883 2045 strb.w r2, [r3, #69] ; 0x45 } taskEXIT_CRITICAL(); - 8000bbe: f001 fb8d bl 80022dc + 8000df2: f001 ff63 bl 8002cbc /* Do the same for the Rx lock. */ taskENTER_CRITICAL(); - 8000bc2: f001 fb5d bl 8002280 + 8000df6: f001 ff33 bl 8002c60 { int8_t cRxLock = pxQueue->cRxLock; - 8000bc6: 687b ldr r3, [r7, #4] - 8000bc8: f893 3044 ldrb.w r3, [r3, #68] ; 0x44 - 8000bcc: 73bb strb r3, [r7, #14] + 8000dfa: 687b ldr r3, [r7, #4] + 8000dfc: f893 3044 ldrb.w r3, [r3, #68] ; 0x44 + 8000e00: 73bb strb r3, [r7, #14] while( cRxLock > queueLOCKED_UNMODIFIED ) - 8000bce: e011 b.n 8000bf4 + 8000e02: e011 b.n 8000e28 { if( listLIST_IS_EMPTY( &( pxQueue->xTasksWaitingToSend ) ) == pdFALSE ) - 8000bd0: 687b ldr r3, [r7, #4] - 8000bd2: 691b ldr r3, [r3, #16] - 8000bd4: 2b00 cmp r3, #0 - 8000bd6: d012 beq.n 8000bfe + 8000e04: 687b ldr r3, [r7, #4] + 8000e06: 691b ldr r3, [r3, #16] + 8000e08: 2b00 cmp r3, #0 + 8000e0a: d012 beq.n 8000e32 { if( xTaskRemoveFromEventList( &( pxQueue->xTasksWaitingToSend ) ) != pdFALSE ) - 8000bd8: 687b ldr r3, [r7, #4] - 8000bda: 3310 adds r3, #16 - 8000bdc: 4618 mov r0, r3 - 8000bde: f000 fc85 bl 80014ec - 8000be2: 4603 mov r3, r0 - 8000be4: 2b00 cmp r3, #0 - 8000be6: d001 beq.n 8000bec + 8000e0c: 687b ldr r3, [r7, #4] + 8000e0e: 3310 adds r3, #16 + 8000e10: 4618 mov r0, r3 + 8000e12: f000 fd5b bl 80018cc + 8000e16: 4603 mov r3, r0 + 8000e18: 2b00 cmp r3, #0 + 8000e1a: d001 beq.n 8000e20 { vTaskMissedYield(); - 8000be8: f000 fd5c bl 80016a4 + 8000e1c: f000 fe36 bl 8001a8c else { mtCOVERAGE_TEST_MARKER(); } --cRxLock; - 8000bec: 7bbb ldrb r3, [r7, #14] - 8000bee: 3b01 subs r3, #1 - 8000bf0: b2db uxtb r3, r3 - 8000bf2: 73bb strb r3, [r7, #14] + 8000e20: 7bbb ldrb r3, [r7, #14] + 8000e22: 3b01 subs r3, #1 + 8000e24: b2db uxtb r3, r3 + 8000e26: 73bb strb r3, [r7, #14] while( cRxLock > queueLOCKED_UNMODIFIED ) - 8000bf4: f997 300e ldrsb.w r3, [r7, #14] - 8000bf8: 2b00 cmp r3, #0 - 8000bfa: dce9 bgt.n 8000bd0 - 8000bfc: e000 b.n 8000c00 + 8000e28: f997 300e ldrsb.w r3, [r7, #14] + 8000e2c: 2b00 cmp r3, #0 + 8000e2e: dce9 bgt.n 8000e04 + 8000e30: e000 b.n 8000e34 } else { break; - 8000bfe: bf00 nop + 8000e32: bf00 nop } } pxQueue->cRxLock = queueUNLOCKED; - 8000c00: 687b ldr r3, [r7, #4] - 8000c02: 22ff movs r2, #255 ; 0xff - 8000c04: f883 2044 strb.w r2, [r3, #68] ; 0x44 + 8000e34: 687b ldr r3, [r7, #4] + 8000e36: 22ff movs r2, #255 ; 0xff + 8000e38: f883 2044 strb.w r2, [r3, #68] ; 0x44 } taskEXIT_CRITICAL(); - 8000c08: f001 fb68 bl 80022dc + 8000e3c: f001 ff3e bl 8002cbc } - 8000c0c: bf00 nop - 8000c0e: 3710 adds r7, #16 - 8000c10: 46bd mov sp, r7 - 8000c12: bd80 pop {r7, pc} + 8000e40: bf00 nop + 8000e42: 3710 adds r7, #16 + 8000e44: 46bd mov sp, r7 + 8000e46: bd80 pop {r7, pc} -08000c14 : +08000e48 : /*-----------------------------------------------------------*/ static BaseType_t prvIsQueueEmpty( const Queue_t * pxQueue ) { - 8000c14: b580 push {r7, lr} - 8000c16: b084 sub sp, #16 - 8000c18: af00 add r7, sp, #0 - 8000c1a: 6078 str r0, [r7, #4] + 8000e48: b580 push {r7, lr} + 8000e4a: b084 sub sp, #16 + 8000e4c: af00 add r7, sp, #0 + 8000e4e: 6078 str r0, [r7, #4] BaseType_t xReturn; taskENTER_CRITICAL(); - 8000c1c: f001 fb30 bl 8002280 + 8000e50: f001 ff06 bl 8002c60 { if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0 ) - 8000c20: 687b ldr r3, [r7, #4] - 8000c22: 6b9b ldr r3, [r3, #56] ; 0x38 - 8000c24: 2b00 cmp r3, #0 - 8000c26: d102 bne.n 8000c2e + 8000e54: 687b ldr r3, [r7, #4] + 8000e56: 6b9b ldr r3, [r3, #56] ; 0x38 + 8000e58: 2b00 cmp r3, #0 + 8000e5a: d102 bne.n 8000e62 { xReturn = pdTRUE; - 8000c28: 2301 movs r3, #1 - 8000c2a: 60fb str r3, [r7, #12] - 8000c2c: e001 b.n 8000c32 + 8000e5c: 2301 movs r3, #1 + 8000e5e: 60fb str r3, [r7, #12] + 8000e60: e001 b.n 8000e66 } else { xReturn = pdFALSE; - 8000c2e: 2300 movs r3, #0 - 8000c30: 60fb str r3, [r7, #12] + 8000e62: 2300 movs r3, #0 + 8000e64: 60fb str r3, [r7, #12] } } taskEXIT_CRITICAL(); - 8000c32: f001 fb53 bl 80022dc + 8000e66: f001 ff29 bl 8002cbc return xReturn; - 8000c36: 68fb ldr r3, [r7, #12] + 8000e6a: 68fb ldr r3, [r7, #12] } - 8000c38: 4618 mov r0, r3 - 8000c3a: 3710 adds r7, #16 - 8000c3c: 46bd mov sp, r7 - 8000c3e: bd80 pop {r7, pc} + 8000e6c: 4618 mov r0, r3 + 8000e6e: 3710 adds r7, #16 + 8000e70: 46bd mov sp, r7 + 8000e72: bd80 pop {r7, pc} -08000c40 : +08000e74 : return xReturn; } /*lint !e818 xQueue could not be pointer to const because it is a typedef. */ /*-----------------------------------------------------------*/ static BaseType_t prvIsQueueFull( const Queue_t * pxQueue ) { - 8000c40: b580 push {r7, lr} - 8000c42: b084 sub sp, #16 - 8000c44: af00 add r7, sp, #0 - 8000c46: 6078 str r0, [r7, #4] + 8000e74: b580 push {r7, lr} + 8000e76: b084 sub sp, #16 + 8000e78: af00 add r7, sp, #0 + 8000e7a: 6078 str r0, [r7, #4] BaseType_t xReturn; taskENTER_CRITICAL(); - 8000c48: f001 fb1a bl 8002280 + 8000e7c: f001 fef0 bl 8002c60 { if( pxQueue->uxMessagesWaiting == pxQueue->uxLength ) - 8000c4c: 687b ldr r3, [r7, #4] - 8000c4e: 6b9a ldr r2, [r3, #56] ; 0x38 - 8000c50: 687b ldr r3, [r7, #4] - 8000c52: 6bdb ldr r3, [r3, #60] ; 0x3c - 8000c54: 429a cmp r2, r3 - 8000c56: d102 bne.n 8000c5e + 8000e80: 687b ldr r3, [r7, #4] + 8000e82: 6b9a ldr r2, [r3, #56] ; 0x38 + 8000e84: 687b ldr r3, [r7, #4] + 8000e86: 6bdb ldr r3, [r3, #60] ; 0x3c + 8000e88: 429a cmp r2, r3 + 8000e8a: d102 bne.n 8000e92 { xReturn = pdTRUE; - 8000c58: 2301 movs r3, #1 - 8000c5a: 60fb str r3, [r7, #12] - 8000c5c: e001 b.n 8000c62 + 8000e8c: 2301 movs r3, #1 + 8000e8e: 60fb str r3, [r7, #12] + 8000e90: e001 b.n 8000e96 } else { xReturn = pdFALSE; - 8000c5e: 2300 movs r3, #0 - 8000c60: 60fb str r3, [r7, #12] + 8000e92: 2300 movs r3, #0 + 8000e94: 60fb str r3, [r7, #12] } } taskEXIT_CRITICAL(); - 8000c62: f001 fb3b bl 80022dc + 8000e96: f001 ff11 bl 8002cbc return xReturn; - 8000c66: 68fb ldr r3, [r7, #12] + 8000e9a: 68fb ldr r3, [r7, #12] } - 8000c68: 4618 mov r0, r3 - 8000c6a: 3710 adds r7, #16 - 8000c6c: 46bd mov sp, r7 - 8000c6e: bd80 pop {r7, pc} + 8000e9c: 4618 mov r0, r3 + 8000e9e: 3710 adds r7, #16 + 8000ea0: 46bd mov sp, r7 + 8000ea2: bd80 pop {r7, pc} -08000c70 : +08000ea4 : #if ( configQUEUE_REGISTRY_SIZE > 0 ) void vQueueAddToRegistry( QueueHandle_t xQueue, const char * pcQueueName ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ { - 8000c70: b480 push {r7} - 8000c72: b085 sub sp, #20 - 8000c74: af00 add r7, sp, #0 - 8000c76: 6078 str r0, [r7, #4] - 8000c78: 6039 str r1, [r7, #0] + 8000ea4: b580 push {r7, lr} + 8000ea6: b084 sub sp, #16 + 8000ea8: af00 add r7, sp, #0 + 8000eaa: 6078 str r0, [r7, #4] + 8000eac: 6039 str r1, [r7, #0] UBaseType_t ux; /* See if there is an empty space in the registry. A NULL name denotes * a free slot. */ for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ ) - 8000c7a: 2300 movs r3, #0 - 8000c7c: 60fb str r3, [r7, #12] - 8000c7e: e014 b.n 8000caa + 8000eae: 2300 movs r3, #0 + 8000eb0: 60fb str r3, [r7, #12] + 8000eb2: e01e b.n 8000ef2 { if( xQueueRegistry[ ux ].pcQueueName == NULL ) - 8000c80: 4a0e ldr r2, [pc, #56] ; (8000cbc ) - 8000c82: 68fb ldr r3, [r7, #12] - 8000c84: f852 3033 ldr.w r3, [r2, r3, lsl #3] - 8000c88: 2b00 cmp r3, #0 - 8000c8a: d10b bne.n 8000ca4 + 8000eb4: 4a12 ldr r2, [pc, #72] ; (8000f00 ) + 8000eb6: 68fb ldr r3, [r7, #12] + 8000eb8: f852 3033 ldr.w r3, [r2, r3, lsl #3] + 8000ebc: 2b00 cmp r3, #0 + 8000ebe: d115 bne.n 8000eec { /* Store the information on this queue. */ xQueueRegistry[ ux ].pcQueueName = pcQueueName; - 8000c8c: 490b ldr r1, [pc, #44] ; (8000cbc ) - 8000c8e: 68fb ldr r3, [r7, #12] - 8000c90: 683a ldr r2, [r7, #0] - 8000c92: f841 2033 str.w r2, [r1, r3, lsl #3] + 8000ec0: 490f ldr r1, [pc, #60] ; (8000f00 ) + 8000ec2: 68fb ldr r3, [r7, #12] + 8000ec4: 683a ldr r2, [r7, #0] + 8000ec6: f841 2033 str.w r2, [r1, r3, lsl #3] xQueueRegistry[ ux ].xHandle = xQueue; - 8000c96: 4a09 ldr r2, [pc, #36] ; (8000cbc ) - 8000c98: 68fb ldr r3, [r7, #12] - 8000c9a: 00db lsls r3, r3, #3 - 8000c9c: 4413 add r3, r2 - 8000c9e: 687a ldr r2, [r7, #4] - 8000ca0: 605a str r2, [r3, #4] + 8000eca: 4a0d ldr r2, [pc, #52] ; (8000f00 ) + 8000ecc: 68fb ldr r3, [r7, #12] + 8000ece: 00db lsls r3, r3, #3 + 8000ed0: 4413 add r3, r2 + 8000ed2: 687a ldr r2, [r7, #4] + 8000ed4: 605a str r2, [r3, #4] traceQUEUE_REGISTRY_ADD( xQueue, pcQueueName ); + 8000ed6: 687b ldr r3, [r7, #4] + 8000ed8: 4618 mov r0, r3 + 8000eda: f003 fef9 bl 8004cd0 + 8000ede: 4601 mov r1, r0 + 8000ee0: 683b ldr r3, [r7, #0] + 8000ee2: 461a mov r2, r3 + 8000ee4: 2071 movs r0, #113 ; 0x71 + 8000ee6: f003 f861 bl 8003fac break; - 8000ca2: e005 b.n 8000cb0 + 8000eea: e005 b.n 8000ef8 for( ux = ( UBaseType_t ) 0U; ux < ( UBaseType_t ) configQUEUE_REGISTRY_SIZE; ux++ ) - 8000ca4: 68fb ldr r3, [r7, #12] - 8000ca6: 3301 adds r3, #1 - 8000ca8: 60fb str r3, [r7, #12] - 8000caa: 68fb ldr r3, [r7, #12] - 8000cac: 2b07 cmp r3, #7 - 8000cae: d9e7 bls.n 8000c80 + 8000eec: 68fb ldr r3, [r7, #12] + 8000eee: 3301 adds r3, #1 + 8000ef0: 60fb str r3, [r7, #12] + 8000ef2: 68fb ldr r3, [r7, #12] + 8000ef4: 2b07 cmp r3, #7 + 8000ef6: d9dd bls.n 8000eb4 else { mtCOVERAGE_TEST_MARKER(); } } } - 8000cb0: bf00 nop - 8000cb2: 3714 adds r7, #20 - 8000cb4: 46bd mov sp, r7 - 8000cb6: f85d 7b04 ldr.w r7, [sp], #4 - 8000cba: 4770 bx lr - 8000cbc: 20012dc4 .word 0x20012dc4 - -08000cc0 : + 8000ef8: bf00 nop + 8000efa: 3710 adds r7, #16 + 8000efc: 46bd mov sp, r7 + 8000efe: bd80 pop {r7, pc} + 8000f00: 20015d04 .word 0x20015d04 + +08000f04 : #if ( configUSE_TIMERS == 1 ) void vQueueWaitForMessageRestricted( QueueHandle_t xQueue, TickType_t xTicksToWait, const BaseType_t xWaitIndefinitely ) { - 8000cc0: b580 push {r7, lr} - 8000cc2: b086 sub sp, #24 - 8000cc4: af00 add r7, sp, #0 - 8000cc6: 60f8 str r0, [r7, #12] - 8000cc8: 60b9 str r1, [r7, #8] - 8000cca: 607a str r2, [r7, #4] + 8000f04: b580 push {r7, lr} + 8000f06: b086 sub sp, #24 + 8000f08: af00 add r7, sp, #0 + 8000f0a: 60f8 str r0, [r7, #12] + 8000f0c: 60b9 str r1, [r7, #8] + 8000f0e: 607a str r2, [r7, #4] Queue_t * const pxQueue = xQueue; - 8000ccc: 68fb ldr r3, [r7, #12] - 8000cce: 617b str r3, [r7, #20] + 8000f10: 68fb ldr r3, [r7, #12] + 8000f12: 617b str r3, [r7, #20] * will not actually cause the task to block, just place it on a blocked * list. It will not block until the scheduler is unlocked - at which * time a yield will be performed. If an item is added to the queue while * the queue is locked, and the calling task blocks on the queue, then the * calling task will be immediately unblocked when the queue is unlocked. */ prvLockQueue( pxQueue ); - 8000cd0: f001 fad6 bl 8002280 - 8000cd4: 697b ldr r3, [r7, #20] - 8000cd6: f893 3044 ldrb.w r3, [r3, #68] ; 0x44 - 8000cda: b25b sxtb r3, r3 - 8000cdc: f1b3 3fff cmp.w r3, #4294967295 ; 0xffffffff - 8000ce0: d103 bne.n 8000cea - 8000ce2: 697b ldr r3, [r7, #20] - 8000ce4: 2200 movs r2, #0 - 8000ce6: f883 2044 strb.w r2, [r3, #68] ; 0x44 - 8000cea: 697b ldr r3, [r7, #20] - 8000cec: f893 3045 ldrb.w r3, [r3, #69] ; 0x45 - 8000cf0: b25b sxtb r3, r3 - 8000cf2: f1b3 3fff cmp.w r3, #4294967295 ; 0xffffffff - 8000cf6: d103 bne.n 8000d00 - 8000cf8: 697b ldr r3, [r7, #20] - 8000cfa: 2200 movs r2, #0 - 8000cfc: f883 2045 strb.w r2, [r3, #69] ; 0x45 - 8000d00: f001 faec bl 80022dc + 8000f14: f001 fea4 bl 8002c60 + 8000f18: 697b ldr r3, [r7, #20] + 8000f1a: f893 3044 ldrb.w r3, [r3, #68] ; 0x44 + 8000f1e: b25b sxtb r3, r3 + 8000f20: f1b3 3fff cmp.w r3, #4294967295 ; 0xffffffff + 8000f24: d103 bne.n 8000f2e + 8000f26: 697b ldr r3, [r7, #20] + 8000f28: 2200 movs r2, #0 + 8000f2a: f883 2044 strb.w r2, [r3, #68] ; 0x44 + 8000f2e: 697b ldr r3, [r7, #20] + 8000f30: f893 3045 ldrb.w r3, [r3, #69] ; 0x45 + 8000f34: b25b sxtb r3, r3 + 8000f36: f1b3 3fff cmp.w r3, #4294967295 ; 0xffffffff + 8000f3a: d103 bne.n 8000f44 + 8000f3c: 697b ldr r3, [r7, #20] + 8000f3e: 2200 movs r2, #0 + 8000f40: f883 2045 strb.w r2, [r3, #69] ; 0x45 + 8000f44: f001 feba bl 8002cbc if( pxQueue->uxMessagesWaiting == ( UBaseType_t ) 0U ) - 8000d04: 697b ldr r3, [r7, #20] - 8000d06: 6b9b ldr r3, [r3, #56] ; 0x38 - 8000d08: 2b00 cmp r3, #0 - 8000d0a: d106 bne.n 8000d1a + 8000f48: 697b ldr r3, [r7, #20] + 8000f4a: 6b9b ldr r3, [r3, #56] ; 0x38 + 8000f4c: 2b00 cmp r3, #0 + 8000f4e: d106 bne.n 8000f5e { /* There is nothing in the queue, block for the specified period. */ vTaskPlaceOnEventListRestricted( &( pxQueue->xTasksWaitingToReceive ), xTicksToWait, xWaitIndefinitely ); - 8000d0c: 697b ldr r3, [r7, #20] - 8000d0e: 3324 adds r3, #36 ; 0x24 - 8000d10: 687a ldr r2, [r7, #4] - 8000d12: 68b9 ldr r1, [r7, #8] - 8000d14: 4618 mov r0, r3 - 8000d16: f000 fbbf bl 8001498 + 8000f50: 697b ldr r3, [r7, #20] + 8000f52: 3324 adds r3, #36 ; 0x24 + 8000f54: 687a ldr r2, [r7, #4] + 8000f56: 68b9 ldr r1, [r7, #8] + 8000f58: 4618 mov r0, r3 + 8000f5a: f000 fc89 bl 8001870 else { mtCOVERAGE_TEST_MARKER(); } prvUnlockQueue( pxQueue ); - 8000d1a: 6978 ldr r0, [r7, #20] - 8000d1c: f7ff ff28 bl 8000b70 + 8000f5e: 6978 ldr r0, [r7, #20] + 8000f60: f7ff ff20 bl 8000da4 } - 8000d20: bf00 nop - 8000d22: 3718 adds r7, #24 - 8000d24: 46bd mov sp, r7 - 8000d26: bd80 pop {r7, pc} + 8000f64: bf00 nop + 8000f66: 3718 adds r7, #24 + 8000f68: 46bd mov sp, r7 + 8000f6a: bd80 pop {r7, pc} -08000d28 : +08000f6c : const char * const pcName, /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ const configSTACK_DEPTH_TYPE usStackDepth, void * const pvParameters, UBaseType_t uxPriority, TaskHandle_t * const pxCreatedTask ) { - 8000d28: b580 push {r7, lr} - 8000d2a: b08c sub sp, #48 ; 0x30 - 8000d2c: af04 add r7, sp, #16 - 8000d2e: 60f8 str r0, [r7, #12] - 8000d30: 60b9 str r1, [r7, #8] - 8000d32: 603b str r3, [r7, #0] - 8000d34: 4613 mov r3, r2 - 8000d36: 80fb strh r3, [r7, #6] + 8000f6c: b580 push {r7, lr} + 8000f6e: b08c sub sp, #48 ; 0x30 + 8000f70: af04 add r7, sp, #16 + 8000f72: 60f8 str r0, [r7, #12] + 8000f74: 60b9 str r1, [r7, #8] + 8000f76: 603b str r3, [r7, #0] + 8000f78: 4613 mov r3, r2 + 8000f7a: 80fb strh r3, [r7, #6] #else /* portSTACK_GROWTH */ { StackType_t * pxStack; /* Allocate space for the stack used by the task being created. */ pxStack = pvPortMalloc( ( ( ( size_t ) usStackDepth ) * sizeof( StackType_t ) ) ); /*lint !e9079 All values returned by pvPortMalloc() have at least the alignment required by the MCU's stack and this allocation is the stack. */ - 8000d38: 88fb ldrh r3, [r7, #6] - 8000d3a: 009b lsls r3, r3, #2 - 8000d3c: 4618 mov r0, r3 - 8000d3e: f001 fbb9 bl 80024b4 - 8000d42: 6178 str r0, [r7, #20] + 8000f7c: 88fb ldrh r3, [r7, #6] + 8000f7e: 009b lsls r3, r3, #2 + 8000f80: 4618 mov r0, r3 + 8000f82: f001 ff8f bl 8002ea4 + 8000f86: 6178 str r0, [r7, #20] if( pxStack != NULL ) - 8000d44: 697b ldr r3, [r7, #20] - 8000d46: 2b00 cmp r3, #0 - 8000d48: d00e beq.n 8000d68 + 8000f88: 697b ldr r3, [r7, #20] + 8000f8a: 2b00 cmp r3, #0 + 8000f8c: d00e beq.n 8000fac { /* Allocate space for the TCB. */ pxNewTCB = ( TCB_t * ) pvPortMalloc( sizeof( TCB_t ) ); /*lint !e9087 !e9079 All values returned by pvPortMalloc() have at least the alignment required by the MCU's stack, and the first member of TCB_t is always a pointer to the task's stack. */ - 8000d4a: 2058 movs r0, #88 ; 0x58 - 8000d4c: f001 fbb2 bl 80024b4 - 8000d50: 61f8 str r0, [r7, #28] + 8000f8e: 2058 movs r0, #88 ; 0x58 + 8000f90: f001 ff88 bl 8002ea4 + 8000f94: 61f8 str r0, [r7, #28] if( pxNewTCB != NULL ) - 8000d52: 69fb ldr r3, [r7, #28] - 8000d54: 2b00 cmp r3, #0 - 8000d56: d003 beq.n 8000d60 + 8000f96: 69fb ldr r3, [r7, #28] + 8000f98: 2b00 cmp r3, #0 + 8000f9a: d003 beq.n 8000fa4 { /* Store the stack location in the TCB. */ pxNewTCB->pxStack = pxStack; - 8000d58: 69fb ldr r3, [r7, #28] - 8000d5a: 697a ldr r2, [r7, #20] - 8000d5c: 631a str r2, [r3, #48] ; 0x30 - 8000d5e: e005 b.n 8000d6c + 8000f9c: 69fb ldr r3, [r7, #28] + 8000f9e: 697a ldr r2, [r7, #20] + 8000fa0: 631a str r2, [r3, #48] ; 0x30 + 8000fa2: e005 b.n 8000fb0 } else { /* The stack cannot be used as the TCB was not created. Free * it again. */ vPortFree( pxStack ); - 8000d60: 6978 ldr r0, [r7, #20] - 8000d62: f001 fc83 bl 800266c - 8000d66: e001 b.n 8000d6c + 8000fa4: 6978 ldr r0, [r7, #20] + 8000fa6: f002 f859 bl 800305c + 8000faa: e001 b.n 8000fb0 } } else { pxNewTCB = NULL; - 8000d68: 2300 movs r3, #0 - 8000d6a: 61fb str r3, [r7, #28] + 8000fac: 2300 movs r3, #0 + 8000fae: 61fb str r3, [r7, #28] } } #endif /* portSTACK_GROWTH */ if( pxNewTCB != NULL ) - 8000d6c: 69fb ldr r3, [r7, #28] - 8000d6e: 2b00 cmp r3, #0 - 8000d70: d013 beq.n 8000d9a + 8000fb0: 69fb ldr r3, [r7, #28] + 8000fb2: 2b00 cmp r3, #0 + 8000fb4: d013 beq.n 8000fde * task was created dynamically in case it is later deleted. */ pxNewTCB->ucStaticallyAllocated = tskDYNAMICALLY_ALLOCATED_STACK_AND_TCB; } #endif /* tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE */ prvInitialiseNewTask( pxTaskCode, pcName, ( uint32_t ) usStackDepth, pvParameters, uxPriority, pxCreatedTask, pxNewTCB, NULL ); - 8000d72: 88fa ldrh r2, [r7, #6] - 8000d74: 2300 movs r3, #0 - 8000d76: 9303 str r3, [sp, #12] - 8000d78: 69fb ldr r3, [r7, #28] - 8000d7a: 9302 str r3, [sp, #8] - 8000d7c: 6afb ldr r3, [r7, #44] ; 0x2c - 8000d7e: 9301 str r3, [sp, #4] - 8000d80: 6abb ldr r3, [r7, #40] ; 0x28 - 8000d82: 9300 str r3, [sp, #0] - 8000d84: 683b ldr r3, [r7, #0] - 8000d86: 68b9 ldr r1, [r7, #8] - 8000d88: 68f8 ldr r0, [r7, #12] - 8000d8a: f000 f80e bl 8000daa + 8000fb6: 88fa ldrh r2, [r7, #6] + 8000fb8: 2300 movs r3, #0 + 8000fba: 9303 str r3, [sp, #12] + 8000fbc: 69fb ldr r3, [r7, #28] + 8000fbe: 9302 str r3, [sp, #8] + 8000fc0: 6afb ldr r3, [r7, #44] ; 0x2c + 8000fc2: 9301 str r3, [sp, #4] + 8000fc4: 6abb ldr r3, [r7, #40] ; 0x28 + 8000fc6: 9300 str r3, [sp, #0] + 8000fc8: 683b ldr r3, [r7, #0] + 8000fca: 68b9 ldr r1, [r7, #8] + 8000fcc: 68f8 ldr r0, [r7, #12] + 8000fce: f000 f80e bl 8000fee prvAddNewTaskToReadyList( pxNewTCB ); - 8000d8e: 69f8 ldr r0, [r7, #28] - 8000d90: f000 f8a0 bl 8000ed4 + 8000fd2: 69f8 ldr r0, [r7, #28] + 8000fd4: f000 f8a0 bl 8001118 xReturn = pdPASS; - 8000d94: 2301 movs r3, #1 - 8000d96: 61bb str r3, [r7, #24] - 8000d98: e002 b.n 8000da0 + 8000fd8: 2301 movs r3, #1 + 8000fda: 61bb str r3, [r7, #24] + 8000fdc: e002 b.n 8000fe4 } else { xReturn = errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY; - 8000d9a: f04f 33ff mov.w r3, #4294967295 ; 0xffffffff - 8000d9e: 61bb str r3, [r7, #24] + 8000fde: f04f 33ff mov.w r3, #4294967295 ; 0xffffffff + 8000fe2: 61bb str r3, [r7, #24] } return xReturn; - 8000da0: 69bb ldr r3, [r7, #24] + 8000fe4: 69bb ldr r3, [r7, #24] } - 8000da2: 4618 mov r0, r3 - 8000da4: 3720 adds r7, #32 - 8000da6: 46bd mov sp, r7 - 8000da8: bd80 pop {r7, pc} + 8000fe6: 4618 mov r0, r3 + 8000fe8: 3720 adds r7, #32 + 8000fea: 46bd mov sp, r7 + 8000fec: bd80 pop {r7, pc} -08000daa : +08000fee : void * const pvParameters, UBaseType_t uxPriority, TaskHandle_t * const pxCreatedTask, TCB_t * pxNewTCB, const MemoryRegion_t * const xRegions ) { - 8000daa: b580 push {r7, lr} - 8000dac: b088 sub sp, #32 - 8000dae: af00 add r7, sp, #0 - 8000db0: 60f8 str r0, [r7, #12] - 8000db2: 60b9 str r1, [r7, #8] - 8000db4: 607a str r2, [r7, #4] - 8000db6: 603b str r3, [r7, #0] + 8000fee: b580 push {r7, lr} + 8000ff0: b088 sub sp, #32 + 8000ff2: af00 add r7, sp, #0 + 8000ff4: 60f8 str r0, [r7, #12] + 8000ff6: 60b9 str r1, [r7, #8] + 8000ff8: 607a str r2, [r7, #4] + 8000ffa: 603b str r3, [r7, #0] /* Avoid dependency on memset() if it is not required. */ #if ( tskSET_NEW_STACKS_TO_KNOWN_VALUE == 1 ) { /* Fill the stack with a known value to assist debugging. */ ( void ) memset( pxNewTCB->pxStack, ( int ) tskSTACK_FILL_BYTE, ( size_t ) ulStackDepth * sizeof( StackType_t ) ); - 8000db8: 6b3b ldr r3, [r7, #48] ; 0x30 - 8000dba: 6b18 ldr r0, [r3, #48] ; 0x30 - 8000dbc: 687b ldr r3, [r7, #4] - 8000dbe: 009b lsls r3, r3, #2 - 8000dc0: 461a mov r2, r3 - 8000dc2: 21a5 movs r1, #165 ; 0xa5 - 8000dc4: f002 fbc9 bl 800355a + 8000ffc: 6b3b ldr r3, [r7, #48] ; 0x30 + 8000ffe: 6b18 ldr r0, [r3, #48] ; 0x30 + 8001000: 687b ldr r3, [r7, #4] + 8001002: 009b lsls r3, r3, #2 + 8001004: 461a mov r2, r3 + 8001006: 21a5 movs r1, #165 ; 0xa5 + 8001008: f005 f9c8 bl 800639c * grows from high memory to low (as per the 80x86) or vice versa. * portSTACK_GROWTH is used to make the result positive or negative as required * by the port. */ #if ( portSTACK_GROWTH < 0 ) { pxTopOfStack = &( pxNewTCB->pxStack[ ulStackDepth - ( uint32_t ) 1 ] ); - 8000dc8: 6b3b ldr r3, [r7, #48] ; 0x30 - 8000dca: 6b1a ldr r2, [r3, #48] ; 0x30 - 8000dcc: 687b ldr r3, [r7, #4] - 8000dce: f103 4380 add.w r3, r3, #1073741824 ; 0x40000000 - 8000dd2: 3b01 subs r3, #1 - 8000dd4: 009b lsls r3, r3, #2 - 8000dd6: 4413 add r3, r2 - 8000dd8: 61bb str r3, [r7, #24] + 800100c: 6b3b ldr r3, [r7, #48] ; 0x30 + 800100e: 6b1a ldr r2, [r3, #48] ; 0x30 + 8001010: 687b ldr r3, [r7, #4] + 8001012: f103 4380 add.w r3, r3, #1073741824 ; 0x40000000 + 8001016: 3b01 subs r3, #1 + 8001018: 009b lsls r3, r3, #2 + 800101a: 4413 add r3, r2 + 800101c: 61bb str r3, [r7, #24] pxTopOfStack = ( StackType_t * ) ( ( ( portPOINTER_SIZE_TYPE ) pxTopOfStack ) & ( ~( ( portPOINTER_SIZE_TYPE ) portBYTE_ALIGNMENT_MASK ) ) ); /*lint !e923 !e9033 !e9078 MISRA exception. Avoiding casts between pointers and integers is not practical. Size differences accounted for using portPOINTER_SIZE_TYPE type. Checked by assert(). */ - 8000dda: 69bb ldr r3, [r7, #24] - 8000ddc: f023 0307 bic.w r3, r3, #7 - 8000de0: 61bb str r3, [r7, #24] + 800101e: 69bb ldr r3, [r7, #24] + 8001020: f023 0307 bic.w r3, r3, #7 + 8001024: 61bb str r3, [r7, #24] /* Check the alignment of the calculated top of stack is correct. */ configASSERT( ( ( ( portPOINTER_SIZE_TYPE ) pxTopOfStack & ( portPOINTER_SIZE_TYPE ) portBYTE_ALIGNMENT_MASK ) == 0UL ) ); - 8000de2: 69bb ldr r3, [r7, #24] - 8000de4: f003 0307 and.w r3, r3, #7 - 8000de8: 2b00 cmp r3, #0 - 8000dea: d009 beq.n 8000e00 - 8000dec: f04f 0350 mov.w r3, #80 ; 0x50 - 8000df0: f383 8811 msr BASEPRI, r3 - 8000df4: f3bf 8f6f isb sy - 8000df8: f3bf 8f4f dsb sy - 8000dfc: 617b str r3, [r7, #20] - 8000dfe: e7fe b.n 8000dfe + 8001026: 69bb ldr r3, [r7, #24] + 8001028: f003 0307 and.w r3, r3, #7 + 800102c: 2b00 cmp r3, #0 + 800102e: d009 beq.n 8001044 + 8001030: f04f 0350 mov.w r3, #80 ; 0x50 + 8001034: f383 8811 msr BASEPRI, r3 + 8001038: f3bf 8f6f isb sy + 800103c: f3bf 8f4f dsb sy + 8001040: 617b str r3, [r7, #20] + 8001042: e7fe b.n 8001042 pxNewTCB->pxEndOfStack = pxNewTCB->pxStack + ( ulStackDepth - ( uint32_t ) 1 ); } #endif /* portSTACK_GROWTH */ /* Store the task name in the TCB. */ if( pcName != NULL ) - 8000e00: 68bb ldr r3, [r7, #8] - 8000e02: 2b00 cmp r3, #0 - 8000e04: d01f beq.n 8000e46 + 8001044: 68bb ldr r3, [r7, #8] + 8001046: 2b00 cmp r3, #0 + 8001048: d01f beq.n 800108a { for( x = ( UBaseType_t ) 0; x < ( UBaseType_t ) configMAX_TASK_NAME_LEN; x++ ) - 8000e06: 2300 movs r3, #0 - 8000e08: 61fb str r3, [r7, #28] - 8000e0a: e012 b.n 8000e32 + 800104a: 2300 movs r3, #0 + 800104c: 61fb str r3, [r7, #28] + 800104e: e012 b.n 8001076 { pxNewTCB->pcTaskName[ x ] = pcName[ x ]; - 8000e0c: 68ba ldr r2, [r7, #8] - 8000e0e: 69fb ldr r3, [r7, #28] - 8000e10: 4413 add r3, r2 - 8000e12: 7819 ldrb r1, [r3, #0] - 8000e14: 6b3a ldr r2, [r7, #48] ; 0x30 - 8000e16: 69fb ldr r3, [r7, #28] - 8000e18: 4413 add r3, r2 - 8000e1a: 3334 adds r3, #52 ; 0x34 - 8000e1c: 460a mov r2, r1 - 8000e1e: 701a strb r2, [r3, #0] + 8001050: 68ba ldr r2, [r7, #8] + 8001052: 69fb ldr r3, [r7, #28] + 8001054: 4413 add r3, r2 + 8001056: 7819 ldrb r1, [r3, #0] + 8001058: 6b3a ldr r2, [r7, #48] ; 0x30 + 800105a: 69fb ldr r3, [r7, #28] + 800105c: 4413 add r3, r2 + 800105e: 3334 adds r3, #52 ; 0x34 + 8001060: 460a mov r2, r1 + 8001062: 701a strb r2, [r3, #0] /* Don't copy all configMAX_TASK_NAME_LEN if the string is shorter than * configMAX_TASK_NAME_LEN characters just in case the memory after the * string is not accessible (extremely unlikely). */ if( pcName[ x ] == ( char ) 0x00 ) - 8000e20: 68ba ldr r2, [r7, #8] - 8000e22: 69fb ldr r3, [r7, #28] - 8000e24: 4413 add r3, r2 - 8000e26: 781b ldrb r3, [r3, #0] - 8000e28: 2b00 cmp r3, #0 - 8000e2a: d006 beq.n 8000e3a + 8001064: 68ba ldr r2, [r7, #8] + 8001066: 69fb ldr r3, [r7, #28] + 8001068: 4413 add r3, r2 + 800106a: 781b ldrb r3, [r3, #0] + 800106c: 2b00 cmp r3, #0 + 800106e: d006 beq.n 800107e for( x = ( UBaseType_t ) 0; x < ( UBaseType_t ) configMAX_TASK_NAME_LEN; x++ ) - 8000e2c: 69fb ldr r3, [r7, #28] - 8000e2e: 3301 adds r3, #1 - 8000e30: 61fb str r3, [r7, #28] - 8000e32: 69fb ldr r3, [r7, #28] - 8000e34: 2b09 cmp r3, #9 - 8000e36: d9e9 bls.n 8000e0c - 8000e38: e000 b.n 8000e3c + 8001070: 69fb ldr r3, [r7, #28] + 8001072: 3301 adds r3, #1 + 8001074: 61fb str r3, [r7, #28] + 8001076: 69fb ldr r3, [r7, #28] + 8001078: 2b09 cmp r3, #9 + 800107a: d9e9 bls.n 8001050 + 800107c: e000 b.n 8001080 { break; - 8000e3a: bf00 nop + 800107e: bf00 nop } } /* Ensure the name string is terminated in the case that the string length * was greater or equal to configMAX_TASK_NAME_LEN. */ pxNewTCB->pcTaskName[ configMAX_TASK_NAME_LEN - 1 ] = '\0'; - 8000e3c: 6b3b ldr r3, [r7, #48] ; 0x30 - 8000e3e: 2200 movs r2, #0 - 8000e40: f883 203d strb.w r2, [r3, #61] ; 0x3d - 8000e44: e003 b.n 8000e4e + 8001080: 6b3b ldr r3, [r7, #48] ; 0x30 + 8001082: 2200 movs r2, #0 + 8001084: f883 203d strb.w r2, [r3, #61] ; 0x3d + 8001088: e003 b.n 8001092 } else { /* The task has not been given a name, so just ensure there is a NULL * terminator when it is read out. */ pxNewTCB->pcTaskName[ 0 ] = 0x00; - 8000e46: 6b3b ldr r3, [r7, #48] ; 0x30 - 8000e48: 2200 movs r2, #0 - 8000e4a: f883 2034 strb.w r2, [r3, #52] ; 0x34 + 800108a: 6b3b ldr r3, [r7, #48] ; 0x30 + 800108c: 2200 movs r2, #0 + 800108e: f883 2034 strb.w r2, [r3, #52] ; 0x34 } /* This is used as an array index so must ensure it's not too large. First * remove the privilege bit if one is present. */ if( uxPriority >= ( UBaseType_t ) configMAX_PRIORITIES ) - 8000e4e: 6abb ldr r3, [r7, #40] ; 0x28 - 8000e50: 2b04 cmp r3, #4 - 8000e52: d901 bls.n 8000e58 + 8001092: 6abb ldr r3, [r7, #40] ; 0x28 + 8001094: 2b04 cmp r3, #4 + 8001096: d901 bls.n 800109c { uxPriority = ( UBaseType_t ) configMAX_PRIORITIES - ( UBaseType_t ) 1U; - 8000e54: 2304 movs r3, #4 - 8000e56: 62bb str r3, [r7, #40] ; 0x28 + 8001098: 2304 movs r3, #4 + 800109a: 62bb str r3, [r7, #40] ; 0x28 else { mtCOVERAGE_TEST_MARKER(); } pxNewTCB->uxPriority = uxPriority; - 8000e58: 6b3b ldr r3, [r7, #48] ; 0x30 - 8000e5a: 6aba ldr r2, [r7, #40] ; 0x28 - 8000e5c: 62da str r2, [r3, #44] ; 0x2c + 800109c: 6b3b ldr r3, [r7, #48] ; 0x30 + 800109e: 6aba ldr r2, [r7, #40] ; 0x28 + 80010a0: 62da str r2, [r3, #44] ; 0x2c #if ( configUSE_MUTEXES == 1 ) { pxNewTCB->uxBasePriority = uxPriority; - 8000e5e: 6b3b ldr r3, [r7, #48] ; 0x30 - 8000e60: 6aba ldr r2, [r7, #40] ; 0x28 - 8000e62: 649a str r2, [r3, #72] ; 0x48 + 80010a2: 6b3b ldr r3, [r7, #48] ; 0x30 + 80010a4: 6aba ldr r2, [r7, #40] ; 0x28 + 80010a6: 649a str r2, [r3, #72] ; 0x48 pxNewTCB->uxMutexesHeld = 0; - 8000e64: 6b3b ldr r3, [r7, #48] ; 0x30 - 8000e66: 2200 movs r2, #0 - 8000e68: 64da str r2, [r3, #76] ; 0x4c + 80010a8: 6b3b ldr r3, [r7, #48] ; 0x30 + 80010aa: 2200 movs r2, #0 + 80010ac: 64da str r2, [r3, #76] ; 0x4c } #endif /* configUSE_MUTEXES */ vListInitialiseItem( &( pxNewTCB->xStateListItem ) ); - 8000e6a: 6b3b ldr r3, [r7, #48] ; 0x30 - 8000e6c: 3304 adds r3, #4 - 8000e6e: 4618 mov r0, r3 - 8000e70: f7ff f9f6 bl 8000260 + 80010ae: 6b3b ldr r3, [r7, #48] ; 0x30 + 80010b0: 3304 adds r3, #4 + 80010b2: 4618 mov r0, r3 + 80010b4: f7ff f974 bl 80003a0 vListInitialiseItem( &( pxNewTCB->xEventListItem ) ); - 8000e74: 6b3b ldr r3, [r7, #48] ; 0x30 - 8000e76: 3318 adds r3, #24 - 8000e78: 4618 mov r0, r3 - 8000e7a: f7ff f9f1 bl 8000260 + 80010b8: 6b3b ldr r3, [r7, #48] ; 0x30 + 80010ba: 3318 adds r3, #24 + 80010bc: 4618 mov r0, r3 + 80010be: f7ff f96f bl 80003a0 /* Set the pxNewTCB as a link back from the ListItem_t. This is so we can get * back to the containing TCB from a generic item in a list. */ listSET_LIST_ITEM_OWNER( &( pxNewTCB->xStateListItem ), pxNewTCB ); - 8000e7e: 6b3b ldr r3, [r7, #48] ; 0x30 - 8000e80: 6b3a ldr r2, [r7, #48] ; 0x30 - 8000e82: 611a str r2, [r3, #16] + 80010c2: 6b3b ldr r3, [r7, #48] ; 0x30 + 80010c4: 6b3a ldr r2, [r7, #48] ; 0x30 + 80010c6: 611a str r2, [r3, #16] /* Event lists are always in priority order. */ listSET_LIST_ITEM_VALUE( &( pxNewTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ - 8000e84: 6abb ldr r3, [r7, #40] ; 0x28 - 8000e86: f1c3 0205 rsb r2, r3, #5 - 8000e8a: 6b3b ldr r3, [r7, #48] ; 0x30 - 8000e8c: 619a str r2, [r3, #24] + 80010c8: 6abb ldr r3, [r7, #40] ; 0x28 + 80010ca: f1c3 0205 rsb r2, r3, #5 + 80010ce: 6b3b ldr r3, [r7, #48] ; 0x30 + 80010d0: 619a str r2, [r3, #24] listSET_LIST_ITEM_OWNER( &( pxNewTCB->xEventListItem ), pxNewTCB ); - 8000e8e: 6b3b ldr r3, [r7, #48] ; 0x30 - 8000e90: 6b3a ldr r2, [r7, #48] ; 0x30 - 8000e92: 625a str r2, [r3, #36] ; 0x24 + 80010d2: 6b3b ldr r3, [r7, #48] ; 0x30 + 80010d4: 6b3a ldr r2, [r7, #48] ; 0x30 + 80010d6: 625a str r2, [r3, #36] ; 0x24 } #endif #if ( configUSE_TASK_NOTIFICATIONS == 1 ) { memset( ( void * ) &( pxNewTCB->ulNotifiedValue[ 0 ] ), 0x00, sizeof( pxNewTCB->ulNotifiedValue ) ); - 8000e94: 6b3b ldr r3, [r7, #48] ; 0x30 - 8000e96: 3350 adds r3, #80 ; 0x50 - 8000e98: 2204 movs r2, #4 - 8000e9a: 2100 movs r1, #0 - 8000e9c: 4618 mov r0, r3 - 8000e9e: f002 fb5c bl 800355a + 80010d8: 6b3b ldr r3, [r7, #48] ; 0x30 + 80010da: 3350 adds r3, #80 ; 0x50 + 80010dc: 2204 movs r2, #4 + 80010de: 2100 movs r1, #0 + 80010e0: 4618 mov r0, r3 + 80010e2: f005 f95b bl 800639c memset( ( void * ) &( pxNewTCB->ucNotifyState[ 0 ] ), 0x00, sizeof( pxNewTCB->ucNotifyState ) ); - 8000ea2: 6b3b ldr r3, [r7, #48] ; 0x30 - 8000ea4: 3354 adds r3, #84 ; 0x54 - 8000ea6: 2201 movs r2, #1 - 8000ea8: 2100 movs r1, #0 - 8000eaa: 4618 mov r0, r3 - 8000eac: f002 fb55 bl 800355a + 80010e6: 6b3b ldr r3, [r7, #48] ; 0x30 + 80010e8: 3354 adds r3, #84 ; 0x54 + 80010ea: 2201 movs r2, #1 + 80010ec: 2100 movs r1, #0 + 80010ee: 4618 mov r0, r3 + 80010f0: f005 f954 bl 800639c } #endif /* portSTACK_GROWTH */ } #else /* portHAS_STACK_OVERFLOW_CHECKING */ { pxNewTCB->pxTopOfStack = pxPortInitialiseStack( pxTopOfStack, pxTaskCode, pvParameters ); - 8000eb0: 683a ldr r2, [r7, #0] - 8000eb2: 68f9 ldr r1, [r7, #12] - 8000eb4: 69b8 ldr r0, [r7, #24] - 8000eb6: f001 f8bb bl 8002030 - 8000eba: 4602 mov r2, r0 - 8000ebc: 6b3b ldr r3, [r7, #48] ; 0x30 - 8000ebe: 601a str r2, [r3, #0] + 80010f4: 683a ldr r2, [r7, #0] + 80010f6: 68f9 ldr r1, [r7, #12] + 80010f8: 69b8 ldr r0, [r7, #24] + 80010fa: f001 fc89 bl 8002a10 + 80010fe: 4602 mov r2, r0 + 8001100: 6b3b ldr r3, [r7, #48] ; 0x30 + 8001102: 601a str r2, [r3, #0] } #endif /* portHAS_STACK_OVERFLOW_CHECKING */ } #endif /* portUSING_MPU_WRAPPERS */ if( pxCreatedTask != NULL ) - 8000ec0: 6afb ldr r3, [r7, #44] ; 0x2c - 8000ec2: 2b00 cmp r3, #0 - 8000ec4: d002 beq.n 8000ecc + 8001104: 6afb ldr r3, [r7, #44] ; 0x2c + 8001106: 2b00 cmp r3, #0 + 8001108: d002 beq.n 8001110 { /* Pass the handle out in an anonymous way. The handle can be used to * change the created task's priority, delete the created task, etc.*/ *pxCreatedTask = ( TaskHandle_t ) pxNewTCB; - 8000ec6: 6afb ldr r3, [r7, #44] ; 0x2c - 8000ec8: 6b3a ldr r2, [r7, #48] ; 0x30 - 8000eca: 601a str r2, [r3, #0] + 800110a: 6afb ldr r3, [r7, #44] ; 0x2c + 800110c: 6b3a ldr r2, [r7, #48] ; 0x30 + 800110e: 601a str r2, [r3, #0] } else { mtCOVERAGE_TEST_MARKER(); } } - 8000ecc: bf00 nop - 8000ece: 3720 adds r7, #32 - 8000ed0: 46bd mov sp, r7 - 8000ed2: bd80 pop {r7, pc} + 8001110: bf00 nop + 8001112: 3720 adds r7, #32 + 8001114: 46bd mov sp, r7 + 8001116: bd80 pop {r7, pc} -08000ed4 : +08001118 : /*-----------------------------------------------------------*/ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB ) { - 8000ed4: b580 push {r7, lr} - 8000ed6: b082 sub sp, #8 - 8000ed8: af00 add r7, sp, #0 - 8000eda: 6078 str r0, [r7, #4] + 8001118: b5b0 push {r4, r5, r7, lr} + 800111a: b084 sub sp, #16 + 800111c: af02 add r7, sp, #8 + 800111e: 6078 str r0, [r7, #4] /* Ensure interrupts don't access the task lists while the lists are being * updated. */ taskENTER_CRITICAL(); - 8000edc: f001 f9d0 bl 8002280 + 8001120: f001 fd9e bl 8002c60 { uxCurrentNumberOfTasks++; - 8000ee0: 4b2c ldr r3, [pc, #176] ; (8000f94 ) - 8000ee2: 681b ldr r3, [r3, #0] - 8000ee4: 3301 adds r3, #1 - 8000ee6: 4a2b ldr r2, [pc, #172] ; (8000f94 ) - 8000ee8: 6013 str r3, [r2, #0] + 8001124: 4b3b ldr r3, [pc, #236] ; (8001214 ) + 8001126: 681b ldr r3, [r3, #0] + 8001128: 3301 adds r3, #1 + 800112a: 4a3a ldr r2, [pc, #232] ; (8001214 ) + 800112c: 6013 str r3, [r2, #0] if( pxCurrentTCB == NULL ) - 8000eea: 4b2b ldr r3, [pc, #172] ; (8000f98 ) - 8000eec: 681b ldr r3, [r3, #0] - 8000eee: 2b00 cmp r3, #0 - 8000ef0: d109 bne.n 8000f06 + 800112e: 4b3a ldr r3, [pc, #232] ; (8001218 ) + 8001130: 681b ldr r3, [r3, #0] + 8001132: 2b00 cmp r3, #0 + 8001134: d109 bne.n 800114a { /* There are no other tasks, or all the other tasks are in * the suspended state - make this the current task. */ pxCurrentTCB = pxNewTCB; - 8000ef2: 4a29 ldr r2, [pc, #164] ; (8000f98 ) - 8000ef4: 687b ldr r3, [r7, #4] - 8000ef6: 6013 str r3, [r2, #0] + 8001136: 4a38 ldr r2, [pc, #224] ; (8001218 ) + 8001138: 687b ldr r3, [r7, #4] + 800113a: 6013 str r3, [r2, #0] if( uxCurrentNumberOfTasks == ( UBaseType_t ) 1 ) - 8000ef8: 4b26 ldr r3, [pc, #152] ; (8000f94 ) - 8000efa: 681b ldr r3, [r3, #0] - 8000efc: 2b01 cmp r3, #1 - 8000efe: d110 bne.n 8000f22 + 800113c: 4b35 ldr r3, [pc, #212] ; (8001214 ) + 800113e: 681b ldr r3, [r3, #0] + 8001140: 2b01 cmp r3, #1 + 8001142: d110 bne.n 8001166 { /* This is the first task to be created so do the preliminary * initialisation required. We will not recover if this call * fails, but we will report the failure. */ prvInitialiseTaskLists(); - 8000f00: f000 fbf4 bl 80016ec - 8000f04: e00d b.n 8000f22 + 8001144: f000 fcc8 bl 8001ad8 + 8001148: e00d b.n 8001166 else { /* If the scheduler is not already running, make this task the * current task if it is the highest priority task to be created * so far. */ if( xSchedulerRunning == pdFALSE ) - 8000f06: 4b25 ldr r3, [pc, #148] ; (8000f9c ) - 8000f08: 681b ldr r3, [r3, #0] - 8000f0a: 2b00 cmp r3, #0 - 8000f0c: d109 bne.n 8000f22 + 800114a: 4b34 ldr r3, [pc, #208] ; (800121c ) + 800114c: 681b ldr r3, [r3, #0] + 800114e: 2b00 cmp r3, #0 + 8001150: d109 bne.n 8001166 { if( pxCurrentTCB->uxPriority <= pxNewTCB->uxPriority ) - 8000f0e: 4b22 ldr r3, [pc, #136] ; (8000f98 ) - 8000f10: 681b ldr r3, [r3, #0] - 8000f12: 6ada ldr r2, [r3, #44] ; 0x2c - 8000f14: 687b ldr r3, [r7, #4] - 8000f16: 6adb ldr r3, [r3, #44] ; 0x2c - 8000f18: 429a cmp r2, r3 - 8000f1a: d802 bhi.n 8000f22 + 8001152: 4b31 ldr r3, [pc, #196] ; (8001218 ) + 8001154: 681b ldr r3, [r3, #0] + 8001156: 6ada ldr r2, [r3, #44] ; 0x2c + 8001158: 687b ldr r3, [r7, #4] + 800115a: 6adb ldr r3, [r3, #44] ; 0x2c + 800115c: 429a cmp r2, r3 + 800115e: d802 bhi.n 8001166 { pxCurrentTCB = pxNewTCB; - 8000f1c: 4a1e ldr r2, [pc, #120] ; (8000f98 ) - 8000f1e: 687b ldr r3, [r7, #4] - 8000f20: 6013 str r3, [r2, #0] + 8001160: 4a2d ldr r2, [pc, #180] ; (8001218 ) + 8001162: 687b ldr r3, [r7, #4] + 8001164: 6013 str r3, [r2, #0] { mtCOVERAGE_TEST_MARKER(); } } uxTaskNumber++; - 8000f22: 4b1f ldr r3, [pc, #124] ; (8000fa0 ) - 8000f24: 681b ldr r3, [r3, #0] - 8000f26: 3301 adds r3, #1 - 8000f28: 4a1d ldr r2, [pc, #116] ; (8000fa0 ) - 8000f2a: 6013 str r3, [r2, #0] + 8001166: 4b2e ldr r3, [pc, #184] ; (8001220 ) + 8001168: 681b ldr r3, [r3, #0] + 800116a: 3301 adds r3, #1 + 800116c: 4a2c ldr r2, [pc, #176] ; (8001220 ) + 800116e: 6013 str r3, [r2, #0] #if ( configUSE_TRACE_FACILITY == 1 ) { /* Add a counter into the TCB for tracing only. */ pxNewTCB->uxTCBNumber = uxTaskNumber; - 8000f2c: 4b1c ldr r3, [pc, #112] ; (8000fa0 ) - 8000f2e: 681a ldr r2, [r3, #0] - 8000f30: 687b ldr r3, [r7, #4] - 8000f32: 641a str r2, [r3, #64] ; 0x40 + 8001170: 4b2b ldr r3, [pc, #172] ; (8001220 ) + 8001172: 681a ldr r2, [r3, #0] + 8001174: 687b ldr r3, [r7, #4] + 8001176: 641a str r2, [r3, #64] ; 0x40 } #endif /* configUSE_TRACE_FACILITY */ traceTASK_CREATE( pxNewTCB ); + 8001178: 687b ldr r3, [r7, #4] + 800117a: 2b00 cmp r3, #0 + 800117c: d016 beq.n 80011ac + 800117e: 687b ldr r3, [r7, #4] + 8001180: 4618 mov r0, r3 + 8001182: f003 fc7f bl 8004a84 + 8001186: 6878 ldr r0, [r7, #4] + 8001188: 687b ldr r3, [r7, #4] + 800118a: f103 0134 add.w r1, r3, #52 ; 0x34 + 800118e: 687b ldr r3, [r7, #4] + 8001190: 6ada ldr r2, [r3, #44] ; 0x2c + 8001192: 687b ldr r3, [r7, #4] + 8001194: 6b1b ldr r3, [r3, #48] ; 0x30 + 8001196: 461d mov r5, r3 + 8001198: 687b ldr r3, [r7, #4] + 800119a: 681b ldr r3, [r3, #0] + 800119c: 461c mov r4, r3 + 800119e: 687b ldr r3, [r7, #4] + 80011a0: 6b1b ldr r3, [r3, #48] ; 0x30 + 80011a2: 1ae3 subs r3, r4, r3 + 80011a4: 9300 str r3, [sp, #0] + 80011a6: 462b mov r3, r5 + 80011a8: f002 f91c bl 80033e4 prvAddTaskToReadyList( pxNewTCB ); - 8000f34: 687b ldr r3, [r7, #4] - 8000f36: 6adb ldr r3, [r3, #44] ; 0x2c - 8000f38: 2201 movs r2, #1 - 8000f3a: 409a lsls r2, r3 - 8000f3c: 4b19 ldr r3, [pc, #100] ; (8000fa4 ) - 8000f3e: 681b ldr r3, [r3, #0] - 8000f40: 4313 orrs r3, r2 - 8000f42: 4a18 ldr r2, [pc, #96] ; (8000fa4 ) - 8000f44: 6013 str r3, [r2, #0] - 8000f46: 687b ldr r3, [r7, #4] - 8000f48: 6ada ldr r2, [r3, #44] ; 0x2c - 8000f4a: 4613 mov r3, r2 - 8000f4c: 009b lsls r3, r3, #2 - 8000f4e: 4413 add r3, r2 - 8000f50: 009b lsls r3, r3, #2 - 8000f52: 4a15 ldr r2, [pc, #84] ; (8000fa8 ) - 8000f54: 441a add r2, r3 - 8000f56: 687b ldr r3, [r7, #4] - 8000f58: 3304 adds r3, #4 - 8000f5a: 4619 mov r1, r3 - 8000f5c: 4610 mov r0, r2 - 8000f5e: f7ff f98c bl 800027a + 80011ac: 687b ldr r3, [r7, #4] + 80011ae: 4618 mov r0, r3 + 80011b0: f003 fcec bl 8004b8c + 80011b4: 687b ldr r3, [r7, #4] + 80011b6: 6adb ldr r3, [r3, #44] ; 0x2c + 80011b8: 2201 movs r2, #1 + 80011ba: 409a lsls r2, r3 + 80011bc: 4b19 ldr r3, [pc, #100] ; (8001224 ) + 80011be: 681b ldr r3, [r3, #0] + 80011c0: 4313 orrs r3, r2 + 80011c2: 4a18 ldr r2, [pc, #96] ; (8001224 ) + 80011c4: 6013 str r3, [r2, #0] + 80011c6: 687b ldr r3, [r7, #4] + 80011c8: 6ada ldr r2, [r3, #44] ; 0x2c + 80011ca: 4613 mov r3, r2 + 80011cc: 009b lsls r3, r3, #2 + 80011ce: 4413 add r3, r2 + 80011d0: 009b lsls r3, r3, #2 + 80011d2: 4a15 ldr r2, [pc, #84] ; (8001228 ) + 80011d4: 441a add r2, r3 + 80011d6: 687b ldr r3, [r7, #4] + 80011d8: 3304 adds r3, #4 + 80011da: 4619 mov r1, r3 + 80011dc: 4610 mov r0, r2 + 80011de: f7ff f8ec bl 80003ba portSETUP_TCB( pxNewTCB ); } taskEXIT_CRITICAL(); - 8000f62: f001 f9bb bl 80022dc + 80011e2: f001 fd6b bl 8002cbc if( xSchedulerRunning != pdFALSE ) - 8000f66: 4b0d ldr r3, [pc, #52] ; (8000f9c ) - 8000f68: 681b ldr r3, [r3, #0] - 8000f6a: 2b00 cmp r3, #0 - 8000f6c: d00e beq.n 8000f8c + 80011e6: 4b0d ldr r3, [pc, #52] ; (800121c ) + 80011e8: 681b ldr r3, [r3, #0] + 80011ea: 2b00 cmp r3, #0 + 80011ec: d00e beq.n 800120c { /* If the created task is of a higher priority than the current task * then it should run now. */ if( pxCurrentTCB->uxPriority < pxNewTCB->uxPriority ) - 8000f6e: 4b0a ldr r3, [pc, #40] ; (8000f98 ) - 8000f70: 681b ldr r3, [r3, #0] - 8000f72: 6ada ldr r2, [r3, #44] ; 0x2c - 8000f74: 687b ldr r3, [r7, #4] - 8000f76: 6adb ldr r3, [r3, #44] ; 0x2c - 8000f78: 429a cmp r2, r3 - 8000f7a: d207 bcs.n 8000f8c + 80011ee: 4b0a ldr r3, [pc, #40] ; (8001218 ) + 80011f0: 681b ldr r3, [r3, #0] + 80011f2: 6ada ldr r2, [r3, #44] ; 0x2c + 80011f4: 687b ldr r3, [r7, #4] + 80011f6: 6adb ldr r3, [r3, #44] ; 0x2c + 80011f8: 429a cmp r2, r3 + 80011fa: d207 bcs.n 800120c { taskYIELD_IF_USING_PREEMPTION(); - 8000f7c: 4b0b ldr r3, [pc, #44] ; (8000fac ) - 8000f7e: f04f 5280 mov.w r2, #268435456 ; 0x10000000 - 8000f82: 601a str r2, [r3, #0] - 8000f84: f3bf 8f4f dsb sy - 8000f88: f3bf 8f6f isb sy + 80011fc: 4b0b ldr r3, [pc, #44] ; (800122c ) + 80011fe: f04f 5280 mov.w r2, #268435456 ; 0x10000000 + 8001202: 601a str r2, [r3, #0] + 8001204: f3bf 8f4f dsb sy + 8001208: f3bf 8f6f isb sy } else { mtCOVERAGE_TEST_MARKER(); } } - 8000f8c: bf00 nop - 8000f8e: 3708 adds r7, #8 - 8000f90: 46bd mov sp, r7 - 8000f92: bd80 pop {r7, pc} - 8000f94: 20000124 .word 0x20000124 - 8000f98: 2000004c .word 0x2000004c - 8000f9c: 20000130 .word 0x20000130 - 8000fa0: 20000140 .word 0x20000140 - 8000fa4: 2000012c .word 0x2000012c - 8000fa8: 20000050 .word 0x20000050 - 8000fac: e000ed04 .word 0xe000ed04 - -08000fb0 : + 800120c: bf00 nop + 800120e: 3708 adds r7, #8 + 8001210: 46bd mov sp, r7 + 8001212: bdb0 pop {r4, r5, r7, pc} + 8001214: 20000278 .word 0x20000278 + 8001218: 200001a0 .word 0x200001a0 + 800121c: 20000284 .word 0x20000284 + 8001220: 20000294 .word 0x20000294 + 8001224: 20000280 .word 0x20000280 + 8001228: 200001a4 .word 0x200001a4 + 800122c: e000ed04 .word 0xe000ed04 + +08001230 : /*-----------------------------------------------------------*/ -#if ( INCLUDE_vTaskDelay == 1 ) +#if ( INCLUDE_vTaskDelete == 1 ) - void vTaskDelay( const TickType_t xTicksToDelay ) + void vTaskDelete( TaskHandle_t xTaskToDelete ) { - 8000fb0: b580 push {r7, lr} - 8000fb2: b084 sub sp, #16 - 8000fb4: af00 add r7, sp, #0 - 8000fb6: 6078 str r0, [r7, #4] - BaseType_t xAlreadyYielded = pdFALSE; - 8000fb8: 2300 movs r3, #0 - 8000fba: 60fb str r3, [r7, #12] + 8001230: b580 push {r7, lr} + 8001232: b084 sub sp, #16 + 8001234: af00 add r7, sp, #0 + 8001236: 6078 str r0, [r7, #4] + TCB_t * pxTCB; - /* A delay time of zero just forces a reschedule. */ - if( xTicksToDelay > ( TickType_t ) 0U ) - 8000fbc: 687b ldr r3, [r7, #4] - 8000fbe: 2b00 cmp r3, #0 - 8000fc0: d016 beq.n 8000ff0 + taskENTER_CRITICAL(); + 8001238: f001 fd12 bl 8002c60 { - configASSERT( uxSchedulerSuspended == 0 ); - 8000fc2: 4b13 ldr r3, [pc, #76] ; (8001010 ) - 8000fc4: 681b ldr r3, [r3, #0] - 8000fc6: 2b00 cmp r3, #0 - 8000fc8: d009 beq.n 8000fde - 8000fca: f04f 0350 mov.w r3, #80 ; 0x50 - 8000fce: f383 8811 msr BASEPRI, r3 - 8000fd2: f3bf 8f6f isb sy - 8000fd6: f3bf 8f4f dsb sy - 8000fda: 60bb str r3, [r7, #8] - 8000fdc: e7fe b.n 8000fdc - vTaskSuspendAll(); - 8000fde: f000 f86b bl 80010b8 - * list or removed from the blocked list until the scheduler - * is resumed. - * - * This task cannot be in an event list as it is the currently - * executing task. */ - prvAddCurrentTaskToDelayedList( xTicksToDelay, pdFALSE ); - 8000fe2: 2100 movs r1, #0 - 8000fe4: 6878 ldr r0, [r7, #4] - 8000fe6: f000 fcaf bl 8001948 + /* If null is passed in here then it is the calling task that is + * being deleted. */ + pxTCB = prvGetTCBFromHandle( xTaskToDelete ); + 800123c: 687b ldr r3, [r7, #4] + 800123e: 2b00 cmp r3, #0 + 8001240: d102 bne.n 8001248 + 8001242: 4b45 ldr r3, [pc, #276] ; (8001358 ) + 8001244: 681b ldr r3, [r3, #0] + 8001246: e000 b.n 800124a + 8001248: 687b ldr r3, [r7, #4] + 800124a: 60fb str r3, [r7, #12] + + /* Remove task from the ready/delayed list. */ + if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 ) + 800124c: 68fb ldr r3, [r7, #12] + 800124e: 3304 adds r3, #4 + 8001250: 4618 mov r0, r3 + 8001252: f7ff f90f bl 8000474 + 8001256: 4603 mov r3, r0 + 8001258: 2b00 cmp r3, #0 + 800125a: d115 bne.n 8001288 + { + taskRESET_READY_PRIORITY( pxTCB->uxPriority ); + 800125c: 68fb ldr r3, [r7, #12] + 800125e: 6ada ldr r2, [r3, #44] ; 0x2c + 8001260: 493e ldr r1, [pc, #248] ; (800135c ) + 8001262: 4613 mov r3, r2 + 8001264: 009b lsls r3, r3, #2 + 8001266: 4413 add r3, r2 + 8001268: 009b lsls r3, r3, #2 + 800126a: 440b add r3, r1 + 800126c: 681b ldr r3, [r3, #0] + 800126e: 2b00 cmp r3, #0 + 8001270: d10a bne.n 8001288 + 8001272: 68fb ldr r3, [r7, #12] + 8001274: 6adb ldr r3, [r3, #44] ; 0x2c + 8001276: 2201 movs r2, #1 + 8001278: fa02 f303 lsl.w r3, r2, r3 + 800127c: 43da mvns r2, r3 + 800127e: 4b38 ldr r3, [pc, #224] ; (8001360 ) + 8001280: 681b ldr r3, [r3, #0] + 8001282: 4013 ands r3, r2 + 8001284: 4a36 ldr r2, [pc, #216] ; (8001360 ) + 8001286: 6013 str r3, [r2, #0] + { + mtCOVERAGE_TEST_MARKER(); } - xAlreadyYielded = xTaskResumeAll(); - 8000fea: f000 f873 bl 80010d4 - 8000fee: 60f8 str r0, [r7, #12] - mtCOVERAGE_TEST_MARKER(); - } - /* Force a reschedule if xTaskResumeAll has not already done so, we may - * have put ourselves to sleep. */ - if( xAlreadyYielded == pdFALSE ) - 8000ff0: 68fb ldr r3, [r7, #12] - 8000ff2: 2b00 cmp r3, #0 - 8000ff4: d107 bne.n 8001006 - { - portYIELD_WITHIN_API(); - 8000ff6: 4b07 ldr r3, [pc, #28] ; (8001014 ) - 8000ff8: f04f 5280 mov.w r2, #268435456 ; 0x10000000 - 8000ffc: 601a str r2, [r3, #0] - 8000ffe: f3bf 8f4f dsb sy - 8001002: f3bf 8f6f isb sy + /* Is the task waiting on an event also? */ + if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL ) + 8001288: 68fb ldr r3, [r7, #12] + 800128a: 6a9b ldr r3, [r3, #40] ; 0x28 + 800128c: 2b00 cmp r3, #0 + 800128e: d004 beq.n 800129a + { + ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); + 8001290: 68fb ldr r3, [r7, #12] + 8001292: 3318 adds r3, #24 + 8001294: 4618 mov r0, r3 + 8001296: f7ff f8ed bl 8000474 + + /* Increment the uxTaskNumber also so kernel aware debuggers can + * detect that the task lists need re-generating. This is done before + * portPRE_TASK_DELETE_HOOK() as in the Windows port that macro will + * not return. */ + uxTaskNumber++; + 800129a: 4b32 ldr r3, [pc, #200] ; (8001364 ) + 800129c: 681b ldr r3, [r3, #0] + 800129e: 3301 adds r3, #1 + 80012a0: 4a30 ldr r2, [pc, #192] ; (8001364 ) + 80012a2: 6013 str r3, [r2, #0] + + if( pxTCB == pxCurrentTCB ) + 80012a4: 4b2c ldr r3, [pc, #176] ; (8001358 ) + 80012a6: 681b ldr r3, [r3, #0] + 80012a8: 68fa ldr r2, [r7, #12] + 80012aa: 429a cmp r2, r3 + 80012ac: d118 bne.n 80012e0 + /* A task is deleting itself. This cannot complete within the + * task itself, as a context switch to another task is required. + * Place the task in the termination list. The idle task will + * check the termination list and free up any memory allocated by + * the scheduler for the TCB and stack of the deleted task. */ + vListInsertEnd( &xTasksWaitingTermination, &( pxTCB->xStateListItem ) ); + 80012ae: 68fb ldr r3, [r7, #12] + 80012b0: 3304 adds r3, #4 + 80012b2: 4619 mov r1, r3 + 80012b4: 482c ldr r0, [pc, #176] ; (8001368 ) + 80012b6: f7ff f880 bl 80003ba + + /* Increment the ucTasksDeleted variable so the idle task knows + * there is a task that has been deleted and that it should therefore + * check the xTasksWaitingTermination list. */ + ++uxDeletedTasksWaitingCleanUp; + 80012ba: 4b2c ldr r3, [pc, #176] ; (800136c ) + 80012bc: 681b ldr r3, [r3, #0] + 80012be: 3301 adds r3, #1 + 80012c0: 4a2a ldr r2, [pc, #168] ; (800136c ) + 80012c2: 6013 str r3, [r2, #0] + + /* Call the delete hook before portPRE_TASK_DELETE_HOOK() as + * portPRE_TASK_DELETE_HOOK() does not return in the Win32 port. */ + traceTASK_DELETE( pxTCB ); + 80012c4: 68fb ldr r3, [r7, #12] + 80012c6: 4618 mov r0, r3 + 80012c8: f003 fd02 bl 8004cd0 + 80012cc: 4603 mov r3, r0 + 80012ce: 4619 mov r1, r3 + 80012d0: 2022 movs r0, #34 ; 0x22 + 80012d2: f002 fe2f bl 8003f34 + 80012d6: 68fb ldr r3, [r7, #12] + 80012d8: 4618 mov r0, r3 + 80012da: f002 f8eb bl 80034b4 + 80012de: e016 b.n 800130e + * required. */ + portPRE_TASK_DELETE_HOOK( pxTCB, &xYieldPending ); + } + else + { + --uxCurrentNumberOfTasks; + 80012e0: 4b23 ldr r3, [pc, #140] ; (8001370 ) + 80012e2: 681b ldr r3, [r3, #0] + 80012e4: 3b01 subs r3, #1 + 80012e6: 4a22 ldr r2, [pc, #136] ; (8001370 ) + 80012e8: 6013 str r3, [r2, #0] + traceTASK_DELETE( pxTCB ); + 80012ea: 68fb ldr r3, [r7, #12] + 80012ec: 4618 mov r0, r3 + 80012ee: f003 fcef bl 8004cd0 + 80012f2: 4603 mov r3, r0 + 80012f4: 4619 mov r1, r3 + 80012f6: 2022 movs r0, #34 ; 0x22 + 80012f8: f002 fe1c bl 8003f34 + 80012fc: 68fb ldr r3, [r7, #12] + 80012fe: 4618 mov r0, r3 + 8001300: f002 f8d8 bl 80034b4 + prvDeleteTCB( pxTCB ); + 8001304: 68f8 ldr r0, [r7, #12] + 8001306: f000 fc53 bl 8001bb0 + + /* Reset the next expected unblock time in case it referred to + * the task that has just been deleted. */ + prvResetNextTaskUnblockTime(); + 800130a: f000 fc61 bl 8001bd0 + } } - else + taskEXIT_CRITICAL(); + 800130e: f001 fcd5 bl 8002cbc + + /* Force a reschedule if it is the currently running task that has just + * been deleted. */ + if( xSchedulerRunning != pdFALSE ) + 8001312: 4b18 ldr r3, [pc, #96] ; (8001374 ) + 8001314: 681b ldr r3, [r3, #0] + 8001316: 2b00 cmp r3, #0 + 8001318: d01a beq.n 8001350 { - mtCOVERAGE_TEST_MARKER(); + if( pxTCB == pxCurrentTCB ) + 800131a: 4b0f ldr r3, [pc, #60] ; (8001358 ) + 800131c: 681b ldr r3, [r3, #0] + 800131e: 68fa ldr r2, [r7, #12] + 8001320: 429a cmp r2, r3 + 8001322: d115 bne.n 8001350 + { + configASSERT( uxSchedulerSuspended == 0 ); + 8001324: 4b14 ldr r3, [pc, #80] ; (8001378 ) + 8001326: 681b ldr r3, [r3, #0] + 8001328: 2b00 cmp r3, #0 + 800132a: d009 beq.n 8001340 + 800132c: f04f 0350 mov.w r3, #80 ; 0x50 + 8001330: f383 8811 msr BASEPRI, r3 + 8001334: f3bf 8f6f isb sy + 8001338: f3bf 8f4f dsb sy + 800133c: 60bb str r3, [r7, #8] + 800133e: e7fe b.n 800133e + portYIELD_WITHIN_API(); + 8001340: 4b0e ldr r3, [pc, #56] ; (800137c ) + 8001342: f04f 5280 mov.w r2, #268435456 ; 0x10000000 + 8001346: 601a str r2, [r3, #0] + 8001348: f3bf 8f4f dsb sy + 800134c: f3bf 8f6f isb sy + else + { + mtCOVERAGE_TEST_MARKER(); + } } } - 8001006: bf00 nop - 8001008: 3710 adds r7, #16 - 800100a: 46bd mov sp, r7 - 800100c: bd80 pop {r7, pc} - 800100e: bf00 nop - 8001010: 2000014c .word 0x2000014c - 8001014: e000ed04 .word 0xe000ed04 - -08001018 : + 8001350: bf00 nop + 8001352: 3710 adds r7, #16 + 8001354: 46bd mov sp, r7 + 8001356: bd80 pop {r7, pc} + 8001358: 200001a0 .word 0x200001a0 + 800135c: 200001a4 .word 0x200001a4 + 8001360: 20000280 .word 0x20000280 + 8001364: 20000294 .word 0x20000294 + 8001368: 2000024c .word 0x2000024c + 800136c: 20000260 .word 0x20000260 + 8001370: 20000278 .word 0x20000278 + 8001374: 20000284 .word 0x20000284 + 8001378: 200002a0 .word 0x200002a0 + 800137c: e000ed04 .word 0xe000ed04 + +08001380 : #endif /* ( ( INCLUDE_xTaskResumeFromISR == 1 ) && ( INCLUDE_vTaskSuspend == 1 ) ) */ /*-----------------------------------------------------------*/ void vTaskStartScheduler( void ) { - 8001018: b580 push {r7, lr} - 800101a: b086 sub sp, #24 - 800101c: af02 add r7, sp, #8 + 8001380: b580 push {r7, lr} + 8001382: b086 sub sp, #24 + 8001384: af02 add r7, sp, #8 } } #else /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */ { /* The Idle task is being created using dynamically allocated RAM. */ xReturn = xTaskCreate( prvIdleTask, - 800101e: 4b1f ldr r3, [pc, #124] ; (800109c ) - 8001020: 9301 str r3, [sp, #4] - 8001022: 2300 movs r3, #0 - 8001024: 9300 str r3, [sp, #0] - 8001026: 2300 movs r3, #0 - 8001028: 2282 movs r2, #130 ; 0x82 - 800102a: 491d ldr r1, [pc, #116] ; (80010a0 ) - 800102c: 481d ldr r0, [pc, #116] ; (80010a4 ) - 800102e: f7ff fe7b bl 8000d28 - 8001032: 60f8 str r0, [r7, #12] + 8001386: 4b26 ldr r3, [pc, #152] ; (8001420 ) + 8001388: 9301 str r3, [sp, #4] + 800138a: 2300 movs r3, #0 + 800138c: 9300 str r3, [sp, #0] + 800138e: 2300 movs r3, #0 + 8001390: 2282 movs r2, #130 ; 0x82 + 8001392: 4924 ldr r1, [pc, #144] ; (8001424 ) + 8001394: 4824 ldr r0, [pc, #144] ; (8001428 ) + 8001396: f7ff fde9 bl 8000f6c + 800139a: 60f8 str r0, [r7, #12] } #endif /* configSUPPORT_STATIC_ALLOCATION */ #if ( configUSE_TIMERS == 1 ) { if( xReturn == pdPASS ) - 8001034: 68fb ldr r3, [r7, #12] - 8001036: 2b01 cmp r3, #1 - 8001038: d102 bne.n 8001040 + 800139c: 68fb ldr r3, [r7, #12] + 800139e: 2b01 cmp r3, #1 + 80013a0: d102 bne.n 80013a8 { xReturn = xTimerCreateTimerTask(); - 800103a: f000 fceb bl 8001a14 - 800103e: 60f8 str r0, [r7, #12] + 80013a2: f000 ffcb bl 800233c + 80013a6: 60f8 str r0, [r7, #12] mtCOVERAGE_TEST_MARKER(); } } #endif /* configUSE_TIMERS */ if( xReturn == pdPASS ) - 8001040: 68fb ldr r3, [r7, #12] - 8001042: 2b01 cmp r3, #1 - 8001044: d115 bne.n 8001072 - 8001046: f04f 0350 mov.w r3, #80 ; 0x50 - 800104a: f383 8811 msr BASEPRI, r3 - 800104e: f3bf 8f6f isb sy - 8001052: f3bf 8f4f dsb sy - 8001056: 60bb str r3, [r7, #8] + 80013a8: 68fb ldr r3, [r7, #12] + 80013aa: 2b01 cmp r3, #1 + 80013ac: d123 bne.n 80013f6 + 80013ae: f04f 0350 mov.w r3, #80 ; 0x50 + 80013b2: f383 8811 msr BASEPRI, r3 + 80013b6: f3bf 8f6f isb sy + 80013ba: f3bf 8f4f dsb sy + 80013be: 60bb str r3, [r7, #8] * for additional information. */ _impure_ptr = &( pxCurrentTCB->xNewLib_reent ); } #endif /* configUSE_NEWLIB_REENTRANT */ xNextTaskUnblockTime = portMAX_DELAY; - 8001058: 4b13 ldr r3, [pc, #76] ; (80010a8 ) - 800105a: f04f 32ff mov.w r2, #4294967295 ; 0xffffffff - 800105e: 601a str r2, [r3, #0] + 80013c0: 4b1a ldr r3, [pc, #104] ; (800142c ) + 80013c2: f04f 32ff mov.w r2, #4294967295 ; 0xffffffff + 80013c6: 601a str r2, [r3, #0] xSchedulerRunning = pdTRUE; - 8001060: 4b12 ldr r3, [pc, #72] ; (80010ac ) - 8001062: 2201 movs r2, #1 - 8001064: 601a str r2, [r3, #0] + 80013c8: 4b19 ldr r3, [pc, #100] ; (8001430 ) + 80013ca: 2201 movs r2, #1 + 80013cc: 601a str r2, [r3, #0] xTickCount = ( TickType_t ) configINITIAL_TICK_COUNT; - 8001066: 4b12 ldr r3, [pc, #72] ; (80010b0 ) - 8001068: 2200 movs r2, #0 - 800106a: 601a str r2, [r3, #0] + 80013ce: 4b19 ldr r3, [pc, #100] ; (8001434 ) + 80013d0: 2200 movs r2, #0 + 80013d2: 601a str r2, [r3, #0] + * is set to 0 and the following line fails to build then ensure you do not + * have portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() defined in your + * FreeRTOSConfig.h file. */ + portCONFIGURE_TIMER_FOR_RUN_TIME_STATS(); traceTASK_SWITCHED_IN(); + 80013d4: 4b18 ldr r3, [pc, #96] ; (8001438 ) + 80013d6: 681a ldr r2, [r3, #0] + 80013d8: 4b11 ldr r3, [pc, #68] ; (8001420 ) + 80013da: 681b ldr r3, [r3, #0] + 80013dc: 429a cmp r2, r3 + 80013de: d102 bne.n 80013e6 + 80013e0: f003 fb34 bl 8004a4c + 80013e4: e004 b.n 80013f0 + 80013e6: 4b14 ldr r3, [pc, #80] ; (8001438 ) + 80013e8: 681b ldr r3, [r3, #0] + 80013ea: 4618 mov r0, r3 + 80013ec: f003 fb8c bl 8004b08 /* Setting up the timer tick is hardware specific and thus in the * portable interface. */ if( xPortStartScheduler() != pdFALSE ) - 800106c: f001 f86a bl 8002144 - 8001070: e00d b.n 800108e + 80013f0: f001 fb98 bl 8002b24 + 80013f4: e00d b.n 8001412 else { /* This line will only be reached if the kernel could not be started, * because there was not enough FreeRTOS heap to create the idle task * or the timer task. */ configASSERT( xReturn != errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY ); - 8001072: 68fb ldr r3, [r7, #12] - 8001074: f1b3 3fff cmp.w r3, #4294967295 ; 0xffffffff - 8001078: d109 bne.n 800108e - 800107a: f04f 0350 mov.w r3, #80 ; 0x50 - 800107e: f383 8811 msr BASEPRI, r3 - 8001082: f3bf 8f6f isb sy - 8001086: f3bf 8f4f dsb sy - 800108a: 607b str r3, [r7, #4] - 800108c: e7fe b.n 800108c + 80013f6: 68fb ldr r3, [r7, #12] + 80013f8: f1b3 3fff cmp.w r3, #4294967295 ; 0xffffffff + 80013fc: d109 bne.n 8001412 + 80013fe: f04f 0350 mov.w r3, #80 ; 0x50 + 8001402: f383 8811 msr BASEPRI, r3 + 8001406: f3bf 8f6f isb sy + 800140a: f3bf 8f4f dsb sy + 800140e: 607b str r3, [r7, #4] + 8001410: e7fe b.n 8001410 * meaning xIdleTaskHandle is not used anywhere else. */ ( void ) xIdleTaskHandle; /* OpenOCD makes use of uxTopUsedPriority for thread debugging. Prevent uxTopUsedPriority * from getting optimized out as it is no longer used by the kernel. */ ( void ) uxTopUsedPriority; - 800108e: 4b09 ldr r3, [pc, #36] ; (80010b4 ) - 8001090: 681b ldr r3, [r3, #0] -} - 8001092: bf00 nop - 8001094: 3710 adds r7, #16 - 8001096: 46bd mov sp, r7 - 8001098: bd80 pop {r7, pc} - 800109a: bf00 nop - 800109c: 20000148 .word 0x20000148 - 80010a0: 08003584 .word 0x08003584 - 80010a4: 080016bd .word 0x080016bd - 80010a8: 20000144 .word 0x20000144 - 80010ac: 20000130 .word 0x20000130 - 80010b0: 20000128 .word 0x20000128 - 80010b4: 20000000 .word 0x20000000 - -080010b8 : + 8001412: 4b0a ldr r3, [pc, #40] ; (800143c ) + 8001414: 681b ldr r3, [r3, #0] +} + 8001416: bf00 nop + 8001418: 3710 adds r7, #16 + 800141a: 46bd mov sp, r7 + 800141c: bd80 pop {r7, pc} + 800141e: bf00 nop + 8001420: 2000029c .word 0x2000029c + 8001424: 08006bbc .word 0x08006bbc + 8001428: 08001aa5 .word 0x08001aa5 + 800142c: 20000298 .word 0x20000298 + 8001430: 20000284 .word 0x20000284 + 8001434: 2000027c .word 0x2000027c + 8001438: 200001a0 .word 0x200001a0 + 800143c: 20000000 .word 0x20000000 + +08001440 : vPortEndScheduler(); } /*----------------------------------------------------------*/ void vTaskSuspendAll( void ) { - 80010b8: b480 push {r7} - 80010ba: af00 add r7, sp, #0 + 8001440: b480 push {r7} + 8001442: af00 add r7, sp, #0 * do not otherwise exhibit real time behaviour. */ portSOFTWARE_BARRIER(); /* The scheduler is suspended if uxSchedulerSuspended is non-zero. An increment * is used to allow calls to vTaskSuspendAll() to nest. */ ++uxSchedulerSuspended; - 80010bc: 4b04 ldr r3, [pc, #16] ; (80010d0 ) - 80010be: 681b ldr r3, [r3, #0] - 80010c0: 3301 adds r3, #1 - 80010c2: 4a03 ldr r2, [pc, #12] ; (80010d0 ) - 80010c4: 6013 str r3, [r2, #0] + 8001444: 4b04 ldr r3, [pc, #16] ; (8001458 ) + 8001446: 681b ldr r3, [r3, #0] + 8001448: 3301 adds r3, #1 + 800144a: 4a03 ldr r2, [pc, #12] ; (8001458 ) + 800144c: 6013 str r3, [r2, #0] /* Enforces ordering for ports and optimised compilers that may otherwise place * the above increment elsewhere. */ portMEMORY_BARRIER(); } - 80010c6: bf00 nop - 80010c8: 46bd mov sp, r7 - 80010ca: f85d 7b04 ldr.w r7, [sp], #4 - 80010ce: 4770 bx lr - 80010d0: 2000014c .word 0x2000014c + 800144e: bf00 nop + 8001450: 46bd mov sp, r7 + 8001452: f85d 7b04 ldr.w r7, [sp], #4 + 8001456: 4770 bx lr + 8001458: 200002a0 .word 0x200002a0 -080010d4 : +0800145c : #endif /* configUSE_TICKLESS_IDLE */ /*----------------------------------------------------------*/ BaseType_t xTaskResumeAll( void ) { - 80010d4: b580 push {r7, lr} - 80010d6: b084 sub sp, #16 - 80010d8: af00 add r7, sp, #0 + 800145c: b580 push {r7, lr} + 800145e: b084 sub sp, #16 + 8001460: af00 add r7, sp, #0 TCB_t * pxTCB = NULL; - 80010da: 2300 movs r3, #0 - 80010dc: 60fb str r3, [r7, #12] + 8001462: 2300 movs r3, #0 + 8001464: 60fb str r3, [r7, #12] BaseType_t xAlreadyYielded = pdFALSE; - 80010de: 2300 movs r3, #0 - 80010e0: 60bb str r3, [r7, #8] + 8001466: 2300 movs r3, #0 + 8001468: 60bb str r3, [r7, #8] /* If uxSchedulerSuspended is zero then this function does not match a * previous call to vTaskSuspendAll(). */ configASSERT( uxSchedulerSuspended ); - 80010e2: 4b41 ldr r3, [pc, #260] ; (80011e8 ) - 80010e4: 681b ldr r3, [r3, #0] - 80010e6: 2b00 cmp r3, #0 - 80010e8: d109 bne.n 80010fe - 80010ea: f04f 0350 mov.w r3, #80 ; 0x50 - 80010ee: f383 8811 msr BASEPRI, r3 - 80010f2: f3bf 8f6f isb sy - 80010f6: f3bf 8f4f dsb sy - 80010fa: 603b str r3, [r7, #0] - 80010fc: e7fe b.n 80010fc + 800146a: 4b43 ldr r3, [pc, #268] ; (8001578 ) + 800146c: 681b ldr r3, [r3, #0] + 800146e: 2b00 cmp r3, #0 + 8001470: d109 bne.n 8001486 + 8001472: f04f 0350 mov.w r3, #80 ; 0x50 + 8001476: f383 8811 msr BASEPRI, r3 + 800147a: f3bf 8f6f isb sy + 800147e: f3bf 8f4f dsb sy + 8001482: 603b str r3, [r7, #0] + 8001484: e7fe b.n 8001484 /* It is possible that an ISR caused a task to be removed from an event * list while the scheduler was suspended. If this was the case then the * removed task will have been added to the xPendingReadyList. Once the * scheduler has been resumed it is safe to move all the pending ready * tasks from this list into their appropriate ready list. */ taskENTER_CRITICAL(); - 80010fe: f001 f8bf bl 8002280 + 8001486: f001 fbeb bl 8002c60 { --uxSchedulerSuspended; - 8001102: 4b39 ldr r3, [pc, #228] ; (80011e8 ) - 8001104: 681b ldr r3, [r3, #0] - 8001106: 3b01 subs r3, #1 - 8001108: 4a37 ldr r2, [pc, #220] ; (80011e8 ) - 800110a: 6013 str r3, [r2, #0] + 800148a: 4b3b ldr r3, [pc, #236] ; (8001578 ) + 800148c: 681b ldr r3, [r3, #0] + 800148e: 3b01 subs r3, #1 + 8001490: 4a39 ldr r2, [pc, #228] ; (8001578 ) + 8001492: 6013 str r3, [r2, #0] if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) - 800110c: 4b36 ldr r3, [pc, #216] ; (80011e8 ) - 800110e: 681b ldr r3, [r3, #0] - 8001110: 2b00 cmp r3, #0 - 8001112: d161 bne.n 80011d8 + 8001494: 4b38 ldr r3, [pc, #224] ; (8001578 ) + 8001496: 681b ldr r3, [r3, #0] + 8001498: 2b00 cmp r3, #0 + 800149a: d165 bne.n 8001568 { if( uxCurrentNumberOfTasks > ( UBaseType_t ) 0U ) - 8001114: 4b35 ldr r3, [pc, #212] ; (80011ec ) - 8001116: 681b ldr r3, [r3, #0] - 8001118: 2b00 cmp r3, #0 - 800111a: d05d beq.n 80011d8 + 800149c: 4b37 ldr r3, [pc, #220] ; (800157c ) + 800149e: 681b ldr r3, [r3, #0] + 80014a0: 2b00 cmp r3, #0 + 80014a2: d061 beq.n 8001568 { /* Move any readied tasks from the pending list into the * appropriate ready list. */ while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE ) - 800111c: e02e b.n 800117c + 80014a4: e032 b.n 800150c { pxTCB = listGET_OWNER_OF_HEAD_ENTRY( ( &xPendingReadyList ) ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */ - 800111e: 4b34 ldr r3, [pc, #208] ; (80011f0 ) - 8001120: 68db ldr r3, [r3, #12] - 8001122: 68db ldr r3, [r3, #12] - 8001124: 60fb str r3, [r7, #12] + 80014a6: 4b36 ldr r3, [pc, #216] ; (8001580 ) + 80014a8: 68db ldr r3, [r3, #12] + 80014aa: 68db ldr r3, [r3, #12] + 80014ac: 60fb str r3, [r7, #12] ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); - 8001126: 68fb ldr r3, [r7, #12] - 8001128: 3318 adds r3, #24 - 800112a: 4618 mov r0, r3 - 800112c: f7ff f902 bl 8000334 + 80014ae: 68fb ldr r3, [r7, #12] + 80014b0: 3318 adds r3, #24 + 80014b2: 4618 mov r0, r3 + 80014b4: f7fe ffde bl 8000474 ( void ) uxListRemove( &( pxTCB->xStateListItem ) ); - 8001130: 68fb ldr r3, [r7, #12] - 8001132: 3304 adds r3, #4 - 8001134: 4618 mov r0, r3 - 8001136: f7ff f8fd bl 8000334 + 80014b8: 68fb ldr r3, [r7, #12] + 80014ba: 3304 adds r3, #4 + 80014bc: 4618 mov r0, r3 + 80014be: f7fe ffd9 bl 8000474 prvAddTaskToReadyList( pxTCB ); - 800113a: 68fb ldr r3, [r7, #12] - 800113c: 6adb ldr r3, [r3, #44] ; 0x2c - 800113e: 2201 movs r2, #1 - 8001140: 409a lsls r2, r3 - 8001142: 4b2c ldr r3, [pc, #176] ; (80011f4 ) - 8001144: 681b ldr r3, [r3, #0] - 8001146: 4313 orrs r3, r2 - 8001148: 4a2a ldr r2, [pc, #168] ; (80011f4 ) - 800114a: 6013 str r3, [r2, #0] - 800114c: 68fb ldr r3, [r7, #12] - 800114e: 6ada ldr r2, [r3, #44] ; 0x2c - 8001150: 4613 mov r3, r2 - 8001152: 009b lsls r3, r3, #2 - 8001154: 4413 add r3, r2 - 8001156: 009b lsls r3, r3, #2 - 8001158: 4a27 ldr r2, [pc, #156] ; (80011f8 ) - 800115a: 441a add r2, r3 - 800115c: 68fb ldr r3, [r7, #12] - 800115e: 3304 adds r3, #4 - 8001160: 4619 mov r1, r3 - 8001162: 4610 mov r0, r2 - 8001164: f7ff f889 bl 800027a + 80014c2: 68fb ldr r3, [r7, #12] + 80014c4: 4618 mov r0, r3 + 80014c6: f003 fb61 bl 8004b8c + 80014ca: 68fb ldr r3, [r7, #12] + 80014cc: 6adb ldr r3, [r3, #44] ; 0x2c + 80014ce: 2201 movs r2, #1 + 80014d0: 409a lsls r2, r3 + 80014d2: 4b2c ldr r3, [pc, #176] ; (8001584 ) + 80014d4: 681b ldr r3, [r3, #0] + 80014d6: 4313 orrs r3, r2 + 80014d8: 4a2a ldr r2, [pc, #168] ; (8001584 ) + 80014da: 6013 str r3, [r2, #0] + 80014dc: 68fb ldr r3, [r7, #12] + 80014de: 6ada ldr r2, [r3, #44] ; 0x2c + 80014e0: 4613 mov r3, r2 + 80014e2: 009b lsls r3, r3, #2 + 80014e4: 4413 add r3, r2 + 80014e6: 009b lsls r3, r3, #2 + 80014e8: 4a27 ldr r2, [pc, #156] ; (8001588 ) + 80014ea: 441a add r2, r3 + 80014ec: 68fb ldr r3, [r7, #12] + 80014ee: 3304 adds r3, #4 + 80014f0: 4619 mov r1, r3 + 80014f2: 4610 mov r0, r2 + 80014f4: f7fe ff61 bl 80003ba /* If the moved task has a priority higher than the current * task then a yield must be performed. */ if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority ) - 8001168: 68fb ldr r3, [r7, #12] - 800116a: 6ada ldr r2, [r3, #44] ; 0x2c - 800116c: 4b23 ldr r3, [pc, #140] ; (80011fc ) - 800116e: 681b ldr r3, [r3, #0] - 8001170: 6adb ldr r3, [r3, #44] ; 0x2c - 8001172: 429a cmp r2, r3 - 8001174: d302 bcc.n 800117c + 80014f8: 68fb ldr r3, [r7, #12] + 80014fa: 6ada ldr r2, [r3, #44] ; 0x2c + 80014fc: 4b23 ldr r3, [pc, #140] ; (800158c ) + 80014fe: 681b ldr r3, [r3, #0] + 8001500: 6adb ldr r3, [r3, #44] ; 0x2c + 8001502: 429a cmp r2, r3 + 8001504: d302 bcc.n 800150c { xYieldPending = pdTRUE; - 8001176: 4b22 ldr r3, [pc, #136] ; (8001200 ) - 8001178: 2201 movs r2, #1 - 800117a: 601a str r2, [r3, #0] + 8001506: 4b22 ldr r3, [pc, #136] ; (8001590 ) + 8001508: 2201 movs r2, #1 + 800150a: 601a str r2, [r3, #0] while( listLIST_IS_EMPTY( &xPendingReadyList ) == pdFALSE ) - 800117c: 4b1c ldr r3, [pc, #112] ; (80011f0 ) - 800117e: 681b ldr r3, [r3, #0] - 8001180: 2b00 cmp r3, #0 - 8001182: d1cc bne.n 800111e + 800150c: 4b1c ldr r3, [pc, #112] ; (8001580 ) + 800150e: 681b ldr r3, [r3, #0] + 8001510: 2b00 cmp r3, #0 + 8001512: d1c8 bne.n 80014a6 { mtCOVERAGE_TEST_MARKER(); } } if( pxTCB != NULL ) - 8001184: 68fb ldr r3, [r7, #12] - 8001186: 2b00 cmp r3, #0 - 8001188: d001 beq.n 800118e + 8001514: 68fb ldr r3, [r7, #12] + 8001516: 2b00 cmp r3, #0 + 8001518: d001 beq.n 800151e * which may have prevented the next unblock time from being * re-calculated, in which case re-calculate it now. Mainly * important for low power tickless implementations, where * this can prevent an unnecessary exit from low power * state. */ prvResetNextTaskUnblockTime(); - 800118a: f000 fb2b bl 80017e4 + 800151a: f000 fb59 bl 8001bd0 /* If any ticks occurred while the scheduler was suspended then * they should be processed now. This ensures the tick count does * not slip, and that any delayed tasks are resumed at the correct * time. */ { TickType_t xPendedCounts = xPendedTicks; /* Non-volatile copy. */ - 800118e: 4b1d ldr r3, [pc, #116] ; (8001204 ) - 8001190: 681b ldr r3, [r3, #0] - 8001192: 607b str r3, [r7, #4] + 800151e: 4b1d ldr r3, [pc, #116] ; (8001594 ) + 8001520: 681b ldr r3, [r3, #0] + 8001522: 607b str r3, [r7, #4] if( xPendedCounts > ( TickType_t ) 0U ) - 8001194: 687b ldr r3, [r7, #4] - 8001196: 2b00 cmp r3, #0 - 8001198: d010 beq.n 80011bc + 8001524: 687b ldr r3, [r7, #4] + 8001526: 2b00 cmp r3, #0 + 8001528: d010 beq.n 800154c { do { if( xTaskIncrementTick() != pdFALSE ) - 800119a: f000 f847 bl 800122c - 800119e: 4603 mov r3, r0 - 80011a0: 2b00 cmp r3, #0 - 80011a2: d002 beq.n 80011aa + 800152a: f000 f859 bl 80015e0 + 800152e: 4603 mov r3, r0 + 8001530: 2b00 cmp r3, #0 + 8001532: d002 beq.n 800153a { xYieldPending = pdTRUE; - 80011a4: 4b16 ldr r3, [pc, #88] ; (8001200 ) - 80011a6: 2201 movs r2, #1 - 80011a8: 601a str r2, [r3, #0] + 8001534: 4b16 ldr r3, [pc, #88] ; (8001590 ) + 8001536: 2201 movs r2, #1 + 8001538: 601a str r2, [r3, #0] else { mtCOVERAGE_TEST_MARKER(); } --xPendedCounts; - 80011aa: 687b ldr r3, [r7, #4] - 80011ac: 3b01 subs r3, #1 - 80011ae: 607b str r3, [r7, #4] + 800153a: 687b ldr r3, [r7, #4] + 800153c: 3b01 subs r3, #1 + 800153e: 607b str r3, [r7, #4] } while( xPendedCounts > ( TickType_t ) 0U ); - 80011b0: 687b ldr r3, [r7, #4] - 80011b2: 2b00 cmp r3, #0 - 80011b4: d1f1 bne.n 800119a + 8001540: 687b ldr r3, [r7, #4] + 8001542: 2b00 cmp r3, #0 + 8001544: d1f1 bne.n 800152a xPendedTicks = 0; - 80011b6: 4b13 ldr r3, [pc, #76] ; (8001204 ) - 80011b8: 2200 movs r2, #0 - 80011ba: 601a str r2, [r3, #0] + 8001546: 4b13 ldr r3, [pc, #76] ; (8001594 ) + 8001548: 2200 movs r2, #0 + 800154a: 601a str r2, [r3, #0] { mtCOVERAGE_TEST_MARKER(); } } if( xYieldPending != pdFALSE ) - 80011bc: 4b10 ldr r3, [pc, #64] ; (8001200 ) - 80011be: 681b ldr r3, [r3, #0] - 80011c0: 2b00 cmp r3, #0 - 80011c2: d009 beq.n 80011d8 + 800154c: 4b10 ldr r3, [pc, #64] ; (8001590 ) + 800154e: 681b ldr r3, [r3, #0] + 8001550: 2b00 cmp r3, #0 + 8001552: d009 beq.n 8001568 { #if ( configUSE_PREEMPTION != 0 ) { xAlreadyYielded = pdTRUE; - 80011c4: 2301 movs r3, #1 - 80011c6: 60bb str r3, [r7, #8] + 8001554: 2301 movs r3, #1 + 8001556: 60bb str r3, [r7, #8] } #endif taskYIELD_IF_USING_PREEMPTION(); - 80011c8: 4b0f ldr r3, [pc, #60] ; (8001208 ) - 80011ca: f04f 5280 mov.w r2, #268435456 ; 0x10000000 - 80011ce: 601a str r2, [r3, #0] - 80011d0: f3bf 8f4f dsb sy - 80011d4: f3bf 8f6f isb sy + 8001558: 4b0f ldr r3, [pc, #60] ; (8001598 ) + 800155a: f04f 5280 mov.w r2, #268435456 ; 0x10000000 + 800155e: 601a str r2, [r3, #0] + 8001560: f3bf 8f4f dsb sy + 8001564: f3bf 8f6f isb sy else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); - 80011d8: f001 f880 bl 80022dc + 8001568: f001 fba8 bl 8002cbc return xAlreadyYielded; - 80011dc: 68bb ldr r3, [r7, #8] -} - 80011de: 4618 mov r0, r3 - 80011e0: 3710 adds r7, #16 - 80011e2: 46bd mov sp, r7 - 80011e4: bd80 pop {r7, pc} - 80011e6: bf00 nop - 80011e8: 2000014c .word 0x2000014c - 80011ec: 20000124 .word 0x20000124 - 80011f0: 200000e4 .word 0x200000e4 - 80011f4: 2000012c .word 0x2000012c - 80011f8: 20000050 .word 0x20000050 - 80011fc: 2000004c .word 0x2000004c - 8001200: 20000138 .word 0x20000138 - 8001204: 20000134 .word 0x20000134 - 8001208: e000ed04 .word 0xe000ed04 - -0800120c : + 800156c: 68bb ldr r3, [r7, #8] +} + 800156e: 4618 mov r0, r3 + 8001570: 3710 adds r7, #16 + 8001572: 46bd mov sp, r7 + 8001574: bd80 pop {r7, pc} + 8001576: bf00 nop + 8001578: 200002a0 .word 0x200002a0 + 800157c: 20000278 .word 0x20000278 + 8001580: 20000238 .word 0x20000238 + 8001584: 20000280 .word 0x20000280 + 8001588: 200001a4 .word 0x200001a4 + 800158c: 200001a0 .word 0x200001a0 + 8001590: 2000028c .word 0x2000028c + 8001594: 20000288 .word 0x20000288 + 8001598: e000ed04 .word 0xe000ed04 + +0800159c : /*-----------------------------------------------------------*/ TickType_t xTaskGetTickCount( void ) { - 800120c: b480 push {r7} - 800120e: b083 sub sp, #12 - 8001210: af00 add r7, sp, #0 + 800159c: b480 push {r7} + 800159e: b083 sub sp, #12 + 80015a0: af00 add r7, sp, #0 TickType_t xTicks; /* Critical section required if running on a 16 bit processor. */ portTICK_TYPE_ENTER_CRITICAL(); { xTicks = xTickCount; - 8001212: 4b05 ldr r3, [pc, #20] ; (8001228 ) - 8001214: 681b ldr r3, [r3, #0] - 8001216: 607b str r3, [r7, #4] + 80015a2: 4b05 ldr r3, [pc, #20] ; (80015b8 ) + 80015a4: 681b ldr r3, [r3, #0] + 80015a6: 607b str r3, [r7, #4] } portTICK_TYPE_EXIT_CRITICAL(); return xTicks; - 8001218: 687b ldr r3, [r7, #4] + 80015a8: 687b ldr r3, [r7, #4] +} + 80015aa: 4618 mov r0, r3 + 80015ac: 370c adds r7, #12 + 80015ae: 46bd mov sp, r7 + 80015b0: f85d 7b04 ldr.w r7, [sp], #4 + 80015b4: 4770 bx lr + 80015b6: bf00 nop + 80015b8: 2000027c .word 0x2000027c + +080015bc : +/*-----------------------------------------------------------*/ + +TickType_t xTaskGetTickCountFromISR( void ) +{ + 80015bc: b580 push {r7, lr} + 80015be: b082 sub sp, #8 + 80015c0: af00 add r7, sp, #0 + * that have been assigned a priority at or (logically) below the maximum + * system call interrupt priority. FreeRTOS maintains a separate interrupt + * safe API to ensure interrupt entry is as fast and as simple as possible. + * More information (albeit Cortex-M specific) is provided on the following + * link: https://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html */ + portASSERT_IF_INTERRUPT_PRIORITY_INVALID(); + 80015c2: f001 fc31 bl 8002e28 + + uxSavedInterruptStatus = portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR(); + 80015c6: 2300 movs r3, #0 + 80015c8: 607b str r3, [r7, #4] + { + xReturn = xTickCount; + 80015ca: 4b04 ldr r3, [pc, #16] ; (80015dc ) + 80015cc: 681b ldr r3, [r3, #0] + 80015ce: 603b str r3, [r7, #0] + } + portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); + + return xReturn; + 80015d0: 683b ldr r3, [r7, #0] } - 800121a: 4618 mov r0, r3 - 800121c: 370c adds r7, #12 - 800121e: 46bd mov sp, r7 - 8001220: f85d 7b04 ldr.w r7, [sp], #4 - 8001224: 4770 bx lr - 8001226: bf00 nop - 8001228: 20000128 .word 0x20000128 + 80015d2: 4618 mov r0, r3 + 80015d4: 3708 adds r7, #8 + 80015d6: 46bd mov sp, r7 + 80015d8: bd80 pop {r7, pc} + 80015da: bf00 nop + 80015dc: 2000027c .word 0x2000027c -0800122c : +080015e0 : #endif /* INCLUDE_xTaskAbortDelay */ /*----------------------------------------------------------*/ BaseType_t xTaskIncrementTick( void ) { - 800122c: b580 push {r7, lr} - 800122e: b086 sub sp, #24 - 8001230: af00 add r7, sp, #0 + 80015e0: b580 push {r7, lr} + 80015e2: b086 sub sp, #24 + 80015e4: af00 add r7, sp, #0 TCB_t * pxTCB; TickType_t xItemValue; BaseType_t xSwitchRequired = pdFALSE; - 8001232: 2300 movs r3, #0 - 8001234: 617b str r3, [r7, #20] + 80015e6: 2300 movs r3, #0 + 80015e8: 617b str r3, [r7, #20] /* Called by the portable layer each time a tick interrupt occurs. * Increments the tick then checks to see if the new tick value will cause any * tasks to be unblocked. */ traceTASK_INCREMENT_TICK( xTickCount ); if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) - 8001236: 4b4e ldr r3, [pc, #312] ; (8001370 ) - 8001238: 681b ldr r3, [r3, #0] - 800123a: 2b00 cmp r3, #0 - 800123c: f040 808d bne.w 800135a + 80015ea: 4b50 ldr r3, [pc, #320] ; (800172c ) + 80015ec: 681b ldr r3, [r3, #0] + 80015ee: 2b00 cmp r3, #0 + 80015f0: f040 8091 bne.w 8001716 { /* Minor optimisation. The tick count cannot change in this * block. */ const TickType_t xConstTickCount = xTickCount + ( TickType_t ) 1; - 8001240: 4b4c ldr r3, [pc, #304] ; (8001374 ) - 8001242: 681b ldr r3, [r3, #0] - 8001244: 3301 adds r3, #1 - 8001246: 613b str r3, [r7, #16] + 80015f4: 4b4e ldr r3, [pc, #312] ; (8001730 ) + 80015f6: 681b ldr r3, [r3, #0] + 80015f8: 3301 adds r3, #1 + 80015fa: 613b str r3, [r7, #16] /* Increment the RTOS tick, switching the delayed and overflowed * delayed lists if it wraps to 0. */ xTickCount = xConstTickCount; - 8001248: 4a4a ldr r2, [pc, #296] ; (8001374 ) - 800124a: 693b ldr r3, [r7, #16] - 800124c: 6013 str r3, [r2, #0] + 80015fc: 4a4c ldr r2, [pc, #304] ; (8001730 ) + 80015fe: 693b ldr r3, [r7, #16] + 8001600: 6013 str r3, [r2, #0] if( xConstTickCount == ( TickType_t ) 0U ) /*lint !e774 'if' does not always evaluate to false as it is looking for an overflow. */ - 800124e: 693b ldr r3, [r7, #16] - 8001250: 2b00 cmp r3, #0 - 8001252: d11f bne.n 8001294 + 8001602: 693b ldr r3, [r7, #16] + 8001604: 2b00 cmp r3, #0 + 8001606: d11f bne.n 8001648 { taskSWITCH_DELAYED_LISTS(); - 8001254: 4b48 ldr r3, [pc, #288] ; (8001378 ) - 8001256: 681b ldr r3, [r3, #0] - 8001258: 681b ldr r3, [r3, #0] - 800125a: 2b00 cmp r3, #0 - 800125c: d009 beq.n 8001272 - 800125e: f04f 0350 mov.w r3, #80 ; 0x50 - 8001262: f383 8811 msr BASEPRI, r3 - 8001266: f3bf 8f6f isb sy - 800126a: f3bf 8f4f dsb sy - 800126e: 603b str r3, [r7, #0] - 8001270: e7fe b.n 8001270 - 8001272: 4b41 ldr r3, [pc, #260] ; (8001378 ) - 8001274: 681b ldr r3, [r3, #0] - 8001276: 60fb str r3, [r7, #12] - 8001278: 4b40 ldr r3, [pc, #256] ; (800137c ) - 800127a: 681b ldr r3, [r3, #0] - 800127c: 4a3e ldr r2, [pc, #248] ; (8001378 ) - 800127e: 6013 str r3, [r2, #0] - 8001280: 4a3e ldr r2, [pc, #248] ; (800137c ) - 8001282: 68fb ldr r3, [r7, #12] - 8001284: 6013 str r3, [r2, #0] - 8001286: 4b3e ldr r3, [pc, #248] ; (8001380 ) - 8001288: 681b ldr r3, [r3, #0] - 800128a: 3301 adds r3, #1 - 800128c: 4a3c ldr r2, [pc, #240] ; (8001380 ) - 800128e: 6013 str r3, [r2, #0] - 8001290: f000 faa8 bl 80017e4 + 8001608: 4b4a ldr r3, [pc, #296] ; (8001734 ) + 800160a: 681b ldr r3, [r3, #0] + 800160c: 681b ldr r3, [r3, #0] + 800160e: 2b00 cmp r3, #0 + 8001610: d009 beq.n 8001626 + 8001612: f04f 0350 mov.w r3, #80 ; 0x50 + 8001616: f383 8811 msr BASEPRI, r3 + 800161a: f3bf 8f6f isb sy + 800161e: f3bf 8f4f dsb sy + 8001622: 603b str r3, [r7, #0] + 8001624: e7fe b.n 8001624 + 8001626: 4b43 ldr r3, [pc, #268] ; (8001734 ) + 8001628: 681b ldr r3, [r3, #0] + 800162a: 60fb str r3, [r7, #12] + 800162c: 4b42 ldr r3, [pc, #264] ; (8001738 ) + 800162e: 681b ldr r3, [r3, #0] + 8001630: 4a40 ldr r2, [pc, #256] ; (8001734 ) + 8001632: 6013 str r3, [r2, #0] + 8001634: 4a40 ldr r2, [pc, #256] ; (8001738 ) + 8001636: 68fb ldr r3, [r7, #12] + 8001638: 6013 str r3, [r2, #0] + 800163a: 4b40 ldr r3, [pc, #256] ; (800173c ) + 800163c: 681b ldr r3, [r3, #0] + 800163e: 3301 adds r3, #1 + 8001640: 4a3e ldr r2, [pc, #248] ; (800173c ) + 8001642: 6013 str r3, [r2, #0] + 8001644: f000 fac4 bl 8001bd0 /* See if this tick has made a timeout expire. Tasks are stored in * the queue in the order of their wake time - meaning once one task * has been found whose block time has not expired there is no need to * look any further down the list. */ if( xConstTickCount >= xNextTaskUnblockTime ) - 8001294: 4b3b ldr r3, [pc, #236] ; (8001384 ) - 8001296: 681b ldr r3, [r3, #0] - 8001298: 693a ldr r2, [r7, #16] - 800129a: 429a cmp r2, r3 - 800129c: d348 bcc.n 8001330 + 8001648: 4b3d ldr r3, [pc, #244] ; (8001740 ) + 800164a: 681b ldr r3, [r3, #0] + 800164c: 693a ldr r2, [r7, #16] + 800164e: 429a cmp r2, r3 + 8001650: d34c bcc.n 80016ec { for( ; ; ) { if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) - 800129e: 4b36 ldr r3, [pc, #216] ; (8001378 ) - 80012a0: 681b ldr r3, [r3, #0] - 80012a2: 681b ldr r3, [r3, #0] - 80012a4: 2b00 cmp r3, #0 - 80012a6: d104 bne.n 80012b2 + 8001652: 4b38 ldr r3, [pc, #224] ; (8001734 ) + 8001654: 681b ldr r3, [r3, #0] + 8001656: 681b ldr r3, [r3, #0] + 8001658: 2b00 cmp r3, #0 + 800165a: d104 bne.n 8001666 /* The delayed list is empty. Set xNextTaskUnblockTime * to the maximum possible value so it is extremely * unlikely that the * if( xTickCount >= xNextTaskUnblockTime ) test will pass * next time through. */ xNextTaskUnblockTime = portMAX_DELAY; /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ - 80012a8: 4b36 ldr r3, [pc, #216] ; (8001384 ) - 80012aa: f04f 32ff mov.w r2, #4294967295 ; 0xffffffff - 80012ae: 601a str r2, [r3, #0] + 800165c: 4b38 ldr r3, [pc, #224] ; (8001740 ) + 800165e: f04f 32ff mov.w r2, #4294967295 ; 0xffffffff + 8001662: 601a str r2, [r3, #0] break; - 80012b0: e03e b.n 8001330 + 8001664: e042 b.n 80016ec { /* The delayed list is not empty, get the value of the * item at the head of the delayed list. This is the time * at which the task at the head of the delayed list must * be removed from the Blocked state. */ pxTCB = listGET_OWNER_OF_HEAD_ENTRY( pxDelayedTaskList ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */ - 80012b2: 4b31 ldr r3, [pc, #196] ; (8001378 ) - 80012b4: 681b ldr r3, [r3, #0] - 80012b6: 68db ldr r3, [r3, #12] - 80012b8: 68db ldr r3, [r3, #12] - 80012ba: 60bb str r3, [r7, #8] + 8001666: 4b33 ldr r3, [pc, #204] ; (8001734 ) + 8001668: 681b ldr r3, [r3, #0] + 800166a: 68db ldr r3, [r3, #12] + 800166c: 68db ldr r3, [r3, #12] + 800166e: 60bb str r3, [r7, #8] xItemValue = listGET_LIST_ITEM_VALUE( &( pxTCB->xStateListItem ) ); - 80012bc: 68bb ldr r3, [r7, #8] - 80012be: 685b ldr r3, [r3, #4] - 80012c0: 607b str r3, [r7, #4] + 8001670: 68bb ldr r3, [r7, #8] + 8001672: 685b ldr r3, [r3, #4] + 8001674: 607b str r3, [r7, #4] if( xConstTickCount < xItemValue ) - 80012c2: 693a ldr r2, [r7, #16] - 80012c4: 687b ldr r3, [r7, #4] - 80012c6: 429a cmp r2, r3 - 80012c8: d203 bcs.n 80012d2 + 8001676: 693a ldr r2, [r7, #16] + 8001678: 687b ldr r3, [r7, #4] + 800167a: 429a cmp r2, r3 + 800167c: d203 bcs.n 8001686 /* It is not time to unblock this item yet, but the * item value is the time at which the task at the head * of the blocked list must be removed from the Blocked * state - so record the item value in * xNextTaskUnblockTime. */ xNextTaskUnblockTime = xItemValue; - 80012ca: 4a2e ldr r2, [pc, #184] ; (8001384 ) - 80012cc: 687b ldr r3, [r7, #4] - 80012ce: 6013 str r3, [r2, #0] + 800167e: 4a30 ldr r2, [pc, #192] ; (8001740 ) + 8001680: 687b ldr r3, [r7, #4] + 8001682: 6013 str r3, [r2, #0] break; /*lint !e9011 Code structure here is deedmed easier to understand with multiple breaks. */ - 80012d0: e02e b.n 8001330 + 8001684: e032 b.n 80016ec { mtCOVERAGE_TEST_MARKER(); } /* It is time to remove the item from the Blocked state. */ ( void ) uxListRemove( &( pxTCB->xStateListItem ) ); - 80012d2: 68bb ldr r3, [r7, #8] - 80012d4: 3304 adds r3, #4 - 80012d6: 4618 mov r0, r3 - 80012d8: f7ff f82c bl 8000334 + 8001686: 68bb ldr r3, [r7, #8] + 8001688: 3304 adds r3, #4 + 800168a: 4618 mov r0, r3 + 800168c: f7fe fef2 bl 8000474 /* Is the task waiting on an event also? If so remove * it from the event list. */ if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) != NULL ) - 80012dc: 68bb ldr r3, [r7, #8] - 80012de: 6a9b ldr r3, [r3, #40] ; 0x28 - 80012e0: 2b00 cmp r3, #0 - 80012e2: d004 beq.n 80012ee + 8001690: 68bb ldr r3, [r7, #8] + 8001692: 6a9b ldr r3, [r3, #40] ; 0x28 + 8001694: 2b00 cmp r3, #0 + 8001696: d004 beq.n 80016a2 { ( void ) uxListRemove( &( pxTCB->xEventListItem ) ); - 80012e4: 68bb ldr r3, [r7, #8] - 80012e6: 3318 adds r3, #24 - 80012e8: 4618 mov r0, r3 - 80012ea: f7ff f823 bl 8000334 + 8001698: 68bb ldr r3, [r7, #8] + 800169a: 3318 adds r3, #24 + 800169c: 4618 mov r0, r3 + 800169e: f7fe fee9 bl 8000474 mtCOVERAGE_TEST_MARKER(); } /* Place the unblocked task into the appropriate ready * list. */ prvAddTaskToReadyList( pxTCB ); - 80012ee: 68bb ldr r3, [r7, #8] - 80012f0: 6adb ldr r3, [r3, #44] ; 0x2c - 80012f2: 2201 movs r2, #1 - 80012f4: 409a lsls r2, r3 - 80012f6: 4b24 ldr r3, [pc, #144] ; (8001388 ) - 80012f8: 681b ldr r3, [r3, #0] - 80012fa: 4313 orrs r3, r2 - 80012fc: 4a22 ldr r2, [pc, #136] ; (8001388 ) - 80012fe: 6013 str r3, [r2, #0] - 8001300: 68bb ldr r3, [r7, #8] - 8001302: 6ada ldr r2, [r3, #44] ; 0x2c - 8001304: 4613 mov r3, r2 - 8001306: 009b lsls r3, r3, #2 - 8001308: 4413 add r3, r2 - 800130a: 009b lsls r3, r3, #2 - 800130c: 4a1f ldr r2, [pc, #124] ; (800138c ) - 800130e: 441a add r2, r3 - 8001310: 68bb ldr r3, [r7, #8] - 8001312: 3304 adds r3, #4 - 8001314: 4619 mov r1, r3 - 8001316: 4610 mov r0, r2 - 8001318: f7fe ffaf bl 800027a + 80016a2: 68bb ldr r3, [r7, #8] + 80016a4: 4618 mov r0, r3 + 80016a6: f003 fa71 bl 8004b8c + 80016aa: 68bb ldr r3, [r7, #8] + 80016ac: 6adb ldr r3, [r3, #44] ; 0x2c + 80016ae: 2201 movs r2, #1 + 80016b0: 409a lsls r2, r3 + 80016b2: 4b24 ldr r3, [pc, #144] ; (8001744 ) + 80016b4: 681b ldr r3, [r3, #0] + 80016b6: 4313 orrs r3, r2 + 80016b8: 4a22 ldr r2, [pc, #136] ; (8001744 ) + 80016ba: 6013 str r3, [r2, #0] + 80016bc: 68bb ldr r3, [r7, #8] + 80016be: 6ada ldr r2, [r3, #44] ; 0x2c + 80016c0: 4613 mov r3, r2 + 80016c2: 009b lsls r3, r3, #2 + 80016c4: 4413 add r3, r2 + 80016c6: 009b lsls r3, r3, #2 + 80016c8: 4a1f ldr r2, [pc, #124] ; (8001748 ) + 80016ca: 441a add r2, r3 + 80016cc: 68bb ldr r3, [r7, #8] + 80016ce: 3304 adds r3, #4 + 80016d0: 4619 mov r1, r3 + 80016d2: 4610 mov r0, r2 + 80016d4: f7fe fe71 bl 80003ba { /* Preemption is on, but a context switch should * only be performed if the unblocked task has a * priority that is equal to or higher than the * currently executing task. */ if( pxTCB->uxPriority >= pxCurrentTCB->uxPriority ) - 800131c: 68bb ldr r3, [r7, #8] - 800131e: 6ada ldr r2, [r3, #44] ; 0x2c - 8001320: 4b1b ldr r3, [pc, #108] ; (8001390 ) - 8001322: 681b ldr r3, [r3, #0] - 8001324: 6adb ldr r3, [r3, #44] ; 0x2c - 8001326: 429a cmp r2, r3 - 8001328: d3b9 bcc.n 800129e + 80016d8: 68bb ldr r3, [r7, #8] + 80016da: 6ada ldr r2, [r3, #44] ; 0x2c + 80016dc: 4b1b ldr r3, [pc, #108] ; (800174c ) + 80016de: 681b ldr r3, [r3, #0] + 80016e0: 6adb ldr r3, [r3, #44] ; 0x2c + 80016e2: 429a cmp r2, r3 + 80016e4: d3b5 bcc.n 8001652 { xSwitchRequired = pdTRUE; - 800132a: 2301 movs r3, #1 - 800132c: 617b str r3, [r7, #20] + 80016e6: 2301 movs r3, #1 + 80016e8: 617b str r3, [r7, #20] if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) - 800132e: e7b6 b.n 800129e + 80016ea: e7b2 b.n 8001652 /* Tasks of equal priority to the currently running task will share * processing time (time slice) if preemption is on, and the application * writer has not explicitly turned time slicing off. */ #if ( ( configUSE_PREEMPTION == 1 ) && ( configUSE_TIME_SLICING == 1 ) ) { if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ pxCurrentTCB->uxPriority ] ) ) > ( UBaseType_t ) 1 ) - 8001330: 4b17 ldr r3, [pc, #92] ; (8001390 ) - 8001332: 681b ldr r3, [r3, #0] - 8001334: 6ada ldr r2, [r3, #44] ; 0x2c - 8001336: 4915 ldr r1, [pc, #84] ; (800138c ) - 8001338: 4613 mov r3, r2 - 800133a: 009b lsls r3, r3, #2 - 800133c: 4413 add r3, r2 - 800133e: 009b lsls r3, r3, #2 - 8001340: 440b add r3, r1 - 8001342: 681b ldr r3, [r3, #0] - 8001344: 2b01 cmp r3, #1 - 8001346: d901 bls.n 800134c + 80016ec: 4b17 ldr r3, [pc, #92] ; (800174c ) + 80016ee: 681b ldr r3, [r3, #0] + 80016f0: 6ada ldr r2, [r3, #44] ; 0x2c + 80016f2: 4915 ldr r1, [pc, #84] ; (8001748 ) + 80016f4: 4613 mov r3, r2 + 80016f6: 009b lsls r3, r3, #2 + 80016f8: 4413 add r3, r2 + 80016fa: 009b lsls r3, r3, #2 + 80016fc: 440b add r3, r1 + 80016fe: 681b ldr r3, [r3, #0] + 8001700: 2b01 cmp r3, #1 + 8001702: d901 bls.n 8001708 { xSwitchRequired = pdTRUE; - 8001348: 2301 movs r3, #1 - 800134a: 617b str r3, [r7, #20] + 8001704: 2301 movs r3, #1 + 8001706: 617b str r3, [r7, #20] } #endif /* configUSE_TICK_HOOK */ #if ( configUSE_PREEMPTION == 1 ) { if( xYieldPending != pdFALSE ) - 800134c: 4b11 ldr r3, [pc, #68] ; (8001394 ) - 800134e: 681b ldr r3, [r3, #0] - 8001350: 2b00 cmp r3, #0 - 8001352: d007 beq.n 8001364 + 8001708: 4b11 ldr r3, [pc, #68] ; (8001750 ) + 800170a: 681b ldr r3, [r3, #0] + 800170c: 2b00 cmp r3, #0 + 800170e: d007 beq.n 8001720 { xSwitchRequired = pdTRUE; - 8001354: 2301 movs r3, #1 - 8001356: 617b str r3, [r7, #20] - 8001358: e004 b.n 8001364 + 8001710: 2301 movs r3, #1 + 8001712: 617b str r3, [r7, #20] + 8001714: e004 b.n 8001720 } #endif /* configUSE_PREEMPTION */ } else { ++xPendedTicks; - 800135a: 4b0f ldr r3, [pc, #60] ; (8001398 ) - 800135c: 681b ldr r3, [r3, #0] - 800135e: 3301 adds r3, #1 - 8001360: 4a0d ldr r2, [pc, #52] ; (8001398 ) - 8001362: 6013 str r3, [r2, #0] + 8001716: 4b0f ldr r3, [pc, #60] ; (8001754 ) + 8001718: 681b ldr r3, [r3, #0] + 800171a: 3301 adds r3, #1 + 800171c: 4a0d ldr r2, [pc, #52] ; (8001754 ) + 800171e: 6013 str r3, [r2, #0] vApplicationTickHook(); } #endif } return xSwitchRequired; - 8001364: 697b ldr r3, [r7, #20] -} - 8001366: 4618 mov r0, r3 - 8001368: 3718 adds r7, #24 - 800136a: 46bd mov sp, r7 - 800136c: bd80 pop {r7, pc} - 800136e: bf00 nop - 8001370: 2000014c .word 0x2000014c - 8001374: 20000128 .word 0x20000128 - 8001378: 200000dc .word 0x200000dc - 800137c: 200000e0 .word 0x200000e0 - 8001380: 2000013c .word 0x2000013c - 8001384: 20000144 .word 0x20000144 - 8001388: 2000012c .word 0x2000012c - 800138c: 20000050 .word 0x20000050 - 8001390: 2000004c .word 0x2000004c - 8001394: 20000138 .word 0x20000138 - 8001398: 20000134 .word 0x20000134 - -0800139c : + 8001720: 697b ldr r3, [r7, #20] +} + 8001722: 4618 mov r0, r3 + 8001724: 3718 adds r7, #24 + 8001726: 46bd mov sp, r7 + 8001728: bd80 pop {r7, pc} + 800172a: bf00 nop + 800172c: 200002a0 .word 0x200002a0 + 8001730: 2000027c .word 0x2000027c + 8001734: 20000230 .word 0x20000230 + 8001738: 20000234 .word 0x20000234 + 800173c: 20000290 .word 0x20000290 + 8001740: 20000298 .word 0x20000298 + 8001744: 20000280 .word 0x20000280 + 8001748: 200001a4 .word 0x200001a4 + 800174c: 200001a0 .word 0x200001a0 + 8001750: 2000028c .word 0x2000028c + 8001754: 20000288 .word 0x20000288 + +08001758 : #endif /* configUSE_APPLICATION_TASK_TAG */ /*-----------------------------------------------------------*/ void vTaskSwitchContext( void ) { - 800139c: b480 push {r7} - 800139e: b087 sub sp, #28 - 80013a0: af00 add r7, sp, #0 + 8001758: b580 push {r7, lr} + 800175a: b086 sub sp, #24 + 800175c: af00 add r7, sp, #0 if( uxSchedulerSuspended != ( UBaseType_t ) pdFALSE ) - 80013a2: 4b26 ldr r3, [pc, #152] ; (800143c ) - 80013a4: 681b ldr r3, [r3, #0] - 80013a6: 2b00 cmp r3, #0 - 80013a8: d003 beq.n 80013b2 + 800175e: 4b2c ldr r3, [pc, #176] ; (8001810 ) + 8001760: 681b ldr r3, [r3, #0] + 8001762: 2b00 cmp r3, #0 + 8001764: d003 beq.n 800176e { /* The scheduler is currently suspended - do not allow a context * switch. */ xYieldPending = pdTRUE; - 80013aa: 4b25 ldr r3, [pc, #148] ; (8001440 ) - 80013ac: 2201 movs r2, #1 - 80013ae: 601a str r2, [r3, #0] + 8001766: 4b2b ldr r3, [pc, #172] ; (8001814 ) + 8001768: 2201 movs r2, #1 + 800176a: 601a str r2, [r3, #0] * for additional information. */ _impure_ptr = &( pxCurrentTCB->xNewLib_reent ); } #endif /* configUSE_NEWLIB_REENTRANT */ } } - 80013b0: e03e b.n 8001430 + 800176c: e04c b.n 8001808 xYieldPending = pdFALSE; - 80013b2: 4b23 ldr r3, [pc, #140] ; (8001440 ) - 80013b4: 2200 movs r2, #0 - 80013b6: 601a str r2, [r3, #0] + 800176e: 4b29 ldr r3, [pc, #164] ; (8001814 ) + 8001770: 2200 movs r2, #0 + 8001772: 601a str r2, [r3, #0] taskSELECT_HIGHEST_PRIORITY_TASK(); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */ - 80013b8: 4b22 ldr r3, [pc, #136] ; (8001444 ) - 80013ba: 681b ldr r3, [r3, #0] - 80013bc: 60fb str r3, [r7, #12] + 8001774: 4b28 ldr r3, [pc, #160] ; (8001818 ) + 8001776: 681b ldr r3, [r3, #0] + 8001778: 60fb str r3, [r7, #12] __asm volatile ( "clz %0, %1" : "=r" ( ucReturn ) : "r" ( ulBitmap ) : "memory" ); - 80013be: 68fb ldr r3, [r7, #12] - 80013c0: fab3 f383 clz r3, r3 - 80013c4: 72fb strb r3, [r7, #11] + 800177a: 68fb ldr r3, [r7, #12] + 800177c: fab3 f383 clz r3, r3 + 8001780: 72fb strb r3, [r7, #11] return ucReturn; - 80013c6: 7afb ldrb r3, [r7, #11] - 80013c8: f1c3 031f rsb r3, r3, #31 - 80013cc: 617b str r3, [r7, #20] - 80013ce: 491e ldr r1, [pc, #120] ; (8001448 ) - 80013d0: 697a ldr r2, [r7, #20] - 80013d2: 4613 mov r3, r2 - 80013d4: 009b lsls r3, r3, #2 - 80013d6: 4413 add r3, r2 - 80013d8: 009b lsls r3, r3, #2 - 80013da: 440b add r3, r1 - 80013dc: 681b ldr r3, [r3, #0] - 80013de: 2b00 cmp r3, #0 - 80013e0: d109 bne.n 80013f6 + 8001782: 7afb ldrb r3, [r7, #11] + 8001784: f1c3 031f rsb r3, r3, #31 + 8001788: 617b str r3, [r7, #20] + 800178a: 4924 ldr r1, [pc, #144] ; (800181c ) + 800178c: 697a ldr r2, [r7, #20] + 800178e: 4613 mov r3, r2 + 8001790: 009b lsls r3, r3, #2 + 8001792: 4413 add r3, r2 + 8001794: 009b lsls r3, r3, #2 + 8001796: 440b add r3, r1 + 8001798: 681b ldr r3, [r3, #0] + 800179a: 2b00 cmp r3, #0 + 800179c: d109 bne.n 80017b2 __asm volatile - 80013e2: f04f 0350 mov.w r3, #80 ; 0x50 - 80013e6: f383 8811 msr BASEPRI, r3 - 80013ea: f3bf 8f6f isb sy - 80013ee: f3bf 8f4f dsb sy - 80013f2: 607b str r3, [r7, #4] - 80013f4: e7fe b.n 80013f4 - 80013f6: 697a ldr r2, [r7, #20] - 80013f8: 4613 mov r3, r2 - 80013fa: 009b lsls r3, r3, #2 - 80013fc: 4413 add r3, r2 - 80013fe: 009b lsls r3, r3, #2 - 8001400: 4a11 ldr r2, [pc, #68] ; (8001448 ) - 8001402: 4413 add r3, r2 - 8001404: 613b str r3, [r7, #16] - 8001406: 693b ldr r3, [r7, #16] - 8001408: 685b ldr r3, [r3, #4] - 800140a: 685a ldr r2, [r3, #4] - 800140c: 693b ldr r3, [r7, #16] - 800140e: 605a str r2, [r3, #4] - 8001410: 693b ldr r3, [r7, #16] - 8001412: 685a ldr r2, [r3, #4] - 8001414: 693b ldr r3, [r7, #16] - 8001416: 3308 adds r3, #8 - 8001418: 429a cmp r2, r3 - 800141a: d104 bne.n 8001426 - 800141c: 693b ldr r3, [r7, #16] - 800141e: 685b ldr r3, [r3, #4] - 8001420: 685a ldr r2, [r3, #4] - 8001422: 693b ldr r3, [r7, #16] - 8001424: 605a str r2, [r3, #4] - 8001426: 693b ldr r3, [r7, #16] - 8001428: 685b ldr r3, [r3, #4] - 800142a: 68db ldr r3, [r3, #12] - 800142c: 4a07 ldr r2, [pc, #28] ; (800144c ) - 800142e: 6013 str r3, [r2, #0] -} - 8001430: bf00 nop - 8001432: 371c adds r7, #28 - 8001434: 46bd mov sp, r7 - 8001436: f85d 7b04 ldr.w r7, [sp], #4 - 800143a: 4770 bx lr - 800143c: 2000014c .word 0x2000014c - 8001440: 20000138 .word 0x20000138 - 8001444: 2000012c .word 0x2000012c - 8001448: 20000050 .word 0x20000050 - 800144c: 2000004c .word 0x2000004c - -08001450 : + 800179e: f04f 0350 mov.w r3, #80 ; 0x50 + 80017a2: f383 8811 msr BASEPRI, r3 + 80017a6: f3bf 8f6f isb sy + 80017aa: f3bf 8f4f dsb sy + 80017ae: 607b str r3, [r7, #4] + 80017b0: e7fe b.n 80017b0 + 80017b2: 697a ldr r2, [r7, #20] + 80017b4: 4613 mov r3, r2 + 80017b6: 009b lsls r3, r3, #2 + 80017b8: 4413 add r3, r2 + 80017ba: 009b lsls r3, r3, #2 + 80017bc: 4a17 ldr r2, [pc, #92] ; (800181c ) + 80017be: 4413 add r3, r2 + 80017c0: 613b str r3, [r7, #16] + 80017c2: 693b ldr r3, [r7, #16] + 80017c4: 685b ldr r3, [r3, #4] + 80017c6: 685a ldr r2, [r3, #4] + 80017c8: 693b ldr r3, [r7, #16] + 80017ca: 605a str r2, [r3, #4] + 80017cc: 693b ldr r3, [r7, #16] + 80017ce: 685a ldr r2, [r3, #4] + 80017d0: 693b ldr r3, [r7, #16] + 80017d2: 3308 adds r3, #8 + 80017d4: 429a cmp r2, r3 + 80017d6: d104 bne.n 80017e2 + 80017d8: 693b ldr r3, [r7, #16] + 80017da: 685b ldr r3, [r3, #4] + 80017dc: 685a ldr r2, [r3, #4] + 80017de: 693b ldr r3, [r7, #16] + 80017e0: 605a str r2, [r3, #4] + 80017e2: 693b ldr r3, [r7, #16] + 80017e4: 685b ldr r3, [r3, #4] + 80017e6: 68db ldr r3, [r3, #12] + 80017e8: 4a0d ldr r2, [pc, #52] ; (8001820 ) + 80017ea: 6013 str r3, [r2, #0] + traceTASK_SWITCHED_IN(); + 80017ec: 4b0c ldr r3, [pc, #48] ; (8001820 ) + 80017ee: 681a ldr r2, [r3, #0] + 80017f0: 4b0c ldr r3, [pc, #48] ; (8001824 ) + 80017f2: 681b ldr r3, [r3, #0] + 80017f4: 429a cmp r2, r3 + 80017f6: d102 bne.n 80017fe + 80017f8: f003 f928 bl 8004a4c +} + 80017fc: e004 b.n 8001808 + traceTASK_SWITCHED_IN(); + 80017fe: 4b08 ldr r3, [pc, #32] ; (8001820 ) + 8001800: 681b ldr r3, [r3, #0] + 8001802: 4618 mov r0, r3 + 8001804: f003 f980 bl 8004b08 +} + 8001808: bf00 nop + 800180a: 3718 adds r7, #24 + 800180c: 46bd mov sp, r7 + 800180e: bd80 pop {r7, pc} + 8001810: 200002a0 .word 0x200002a0 + 8001814: 2000028c .word 0x2000028c + 8001818: 20000280 .word 0x20000280 + 800181c: 200001a4 .word 0x200001a4 + 8001820: 200001a0 .word 0x200001a0 + 8001824: 2000029c .word 0x2000029c + +08001828 : /*-----------------------------------------------------------*/ void vTaskPlaceOnEventList( List_t * const pxEventList, const TickType_t xTicksToWait ) { - 8001450: b580 push {r7, lr} - 8001452: b084 sub sp, #16 - 8001454: af00 add r7, sp, #0 - 8001456: 6078 str r0, [r7, #4] - 8001458: 6039 str r1, [r7, #0] + 8001828: b580 push {r7, lr} + 800182a: b084 sub sp, #16 + 800182c: af00 add r7, sp, #0 + 800182e: 6078 str r0, [r7, #4] + 8001830: 6039 str r1, [r7, #0] configASSERT( pxEventList ); - 800145a: 687b ldr r3, [r7, #4] - 800145c: 2b00 cmp r3, #0 - 800145e: d109 bne.n 8001474 - 8001460: f04f 0350 mov.w r3, #80 ; 0x50 - 8001464: f383 8811 msr BASEPRI, r3 - 8001468: f3bf 8f6f isb sy - 800146c: f3bf 8f4f dsb sy - 8001470: 60fb str r3, [r7, #12] - 8001472: e7fe b.n 8001472 + 8001832: 687b ldr r3, [r7, #4] + 8001834: 2b00 cmp r3, #0 + 8001836: d109 bne.n 800184c + 8001838: f04f 0350 mov.w r3, #80 ; 0x50 + 800183c: f383 8811 msr BASEPRI, r3 + 8001840: f3bf 8f6f isb sy + 8001844: f3bf 8f4f dsb sy + 8001848: 60fb str r3, [r7, #12] + 800184a: e7fe b.n 800184a /* Place the event list item of the TCB in the appropriate event list. * This is placed in the list in priority order so the highest priority task * is the first to be woken by the event. The queue that contains the event * list is locked, preventing simultaneous access from interrupts. */ vListInsert( pxEventList, &( pxCurrentTCB->xEventListItem ) ); - 8001474: 4b07 ldr r3, [pc, #28] ; (8001494 ) - 8001476: 681b ldr r3, [r3, #0] - 8001478: 3318 adds r3, #24 - 800147a: 4619 mov r1, r3 - 800147c: 6878 ldr r0, [r7, #4] - 800147e: f7fe ff20 bl 80002c2 + 800184c: 4b07 ldr r3, [pc, #28] ; (800186c ) + 800184e: 681b ldr r3, [r3, #0] + 8001850: 3318 adds r3, #24 + 8001852: 4619 mov r1, r3 + 8001854: 6878 ldr r0, [r7, #4] + 8001856: f7fe fdd4 bl 8000402 prvAddCurrentTaskToDelayedList( xTicksToWait, pdTRUE ); - 8001482: 2101 movs r1, #1 - 8001484: 6838 ldr r0, [r7, #0] - 8001486: f000 fa5f bl 8001948 -} - 800148a: bf00 nop - 800148c: 3710 adds r7, #16 - 800148e: 46bd mov sp, r7 - 8001490: bd80 pop {r7, pc} - 8001492: bf00 nop - 8001494: 2000004c .word 0x2000004c - -08001498 : + 800185a: 2101 movs r1, #1 + 800185c: 6838 ldr r0, [r7, #0] + 800185e: f000 fcf5 bl 800224c +} + 8001862: bf00 nop + 8001864: 3710 adds r7, #16 + 8001866: 46bd mov sp, r7 + 8001868: bd80 pop {r7, pc} + 800186a: bf00 nop + 800186c: 200001a0 .word 0x200001a0 + +08001870 : #if ( configUSE_TIMERS == 1 ) void vTaskPlaceOnEventListRestricted( List_t * const pxEventList, TickType_t xTicksToWait, const BaseType_t xWaitIndefinitely ) { - 8001498: b580 push {r7, lr} - 800149a: b086 sub sp, #24 - 800149c: af00 add r7, sp, #0 - 800149e: 60f8 str r0, [r7, #12] - 80014a0: 60b9 str r1, [r7, #8] - 80014a2: 607a str r2, [r7, #4] + 8001870: b580 push {r7, lr} + 8001872: b086 sub sp, #24 + 8001874: af00 add r7, sp, #0 + 8001876: 60f8 str r0, [r7, #12] + 8001878: 60b9 str r1, [r7, #8] + 800187a: 607a str r2, [r7, #4] configASSERT( pxEventList ); - 80014a4: 68fb ldr r3, [r7, #12] - 80014a6: 2b00 cmp r3, #0 - 80014a8: d109 bne.n 80014be - 80014aa: f04f 0350 mov.w r3, #80 ; 0x50 - 80014ae: f383 8811 msr BASEPRI, r3 - 80014b2: f3bf 8f6f isb sy - 80014b6: f3bf 8f4f dsb sy - 80014ba: 617b str r3, [r7, #20] - 80014bc: e7fe b.n 80014bc + 800187c: 68fb ldr r3, [r7, #12] + 800187e: 2b00 cmp r3, #0 + 8001880: d109 bne.n 8001896 + 8001882: f04f 0350 mov.w r3, #80 ; 0x50 + 8001886: f383 8811 msr BASEPRI, r3 + 800188a: f3bf 8f6f isb sy + 800188e: f3bf 8f4f dsb sy + 8001892: 617b str r3, [r7, #20] + 8001894: e7fe b.n 8001894 /* Place the event list item of the TCB in the appropriate event list. * In this case it is assume that this is the only task that is going to * be waiting on this event list, so the faster vListInsertEnd() function * can be used in place of vListInsert. */ vListInsertEnd( pxEventList, &( pxCurrentTCB->xEventListItem ) ); - 80014be: 4b0a ldr r3, [pc, #40] ; (80014e8 ) - 80014c0: 681b ldr r3, [r3, #0] - 80014c2: 3318 adds r3, #24 - 80014c4: 4619 mov r1, r3 - 80014c6: 68f8 ldr r0, [r7, #12] - 80014c8: f7fe fed7 bl 800027a + 8001896: 4b0c ldr r3, [pc, #48] ; (80018c8 ) + 8001898: 681b ldr r3, [r3, #0] + 800189a: 3318 adds r3, #24 + 800189c: 4619 mov r1, r3 + 800189e: 68f8 ldr r0, [r7, #12] + 80018a0: f7fe fd8b bl 80003ba /* If the task should block indefinitely then set the block time to a * value that will be recognised as an indefinite delay inside the * prvAddCurrentTaskToDelayedList() function. */ if( xWaitIndefinitely != pdFALSE ) - 80014cc: 687b ldr r3, [r7, #4] - 80014ce: 2b00 cmp r3, #0 - 80014d0: d002 beq.n 80014d8 + 80018a4: 687b ldr r3, [r7, #4] + 80018a6: 2b00 cmp r3, #0 + 80018a8: d002 beq.n 80018b0 { xTicksToWait = portMAX_DELAY; - 80014d2: f04f 33ff mov.w r3, #4294967295 ; 0xffffffff - 80014d6: 60bb str r3, [r7, #8] + 80018aa: f04f 33ff mov.w r3, #4294967295 ; 0xffffffff + 80018ae: 60bb str r3, [r7, #8] } traceTASK_DELAY_UNTIL( ( xTickCount + xTicksToWait ) ); + 80018b0: 2024 movs r0, #36 ; 0x24 + 80018b2: f002 fb21 bl 8003ef8 prvAddCurrentTaskToDelayedList( xTicksToWait, xWaitIndefinitely ); - 80014d8: 6879 ldr r1, [r7, #4] - 80014da: 68b8 ldr r0, [r7, #8] - 80014dc: f000 fa34 bl 8001948 + 80018b6: 6879 ldr r1, [r7, #4] + 80018b8: 68b8 ldr r0, [r7, #8] + 80018ba: f000 fcc7 bl 800224c } - 80014e0: bf00 nop - 80014e2: 3718 adds r7, #24 - 80014e4: 46bd mov sp, r7 - 80014e6: bd80 pop {r7, pc} - 80014e8: 2000004c .word 0x2000004c + 80018be: bf00 nop + 80018c0: 3718 adds r7, #24 + 80018c2: 46bd mov sp, r7 + 80018c4: bd80 pop {r7, pc} + 80018c6: bf00 nop + 80018c8: 200001a0 .word 0x200001a0 -080014ec : +080018cc : #endif /* configUSE_TIMERS */ /*-----------------------------------------------------------*/ BaseType_t xTaskRemoveFromEventList( const List_t * const pxEventList ) { - 80014ec: b580 push {r7, lr} - 80014ee: b086 sub sp, #24 - 80014f0: af00 add r7, sp, #0 - 80014f2: 6078 str r0, [r7, #4] + 80018cc: b580 push {r7, lr} + 80018ce: b086 sub sp, #24 + 80018d0: af00 add r7, sp, #0 + 80018d2: 6078 str r0, [r7, #4] * get called - the lock count on the queue will get modified instead. This * means exclusive access to the event list is guaranteed here. * * This function assumes that a check has already been made to ensure that * pxEventList is not empty. */ pxUnblockedTCB = listGET_OWNER_OF_HEAD_ENTRY( pxEventList ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */ - 80014f4: 687b ldr r3, [r7, #4] - 80014f6: 68db ldr r3, [r3, #12] - 80014f8: 68db ldr r3, [r3, #12] - 80014fa: 613b str r3, [r7, #16] + 80018d4: 687b ldr r3, [r7, #4] + 80018d6: 68db ldr r3, [r3, #12] + 80018d8: 68db ldr r3, [r3, #12] + 80018da: 613b str r3, [r7, #16] configASSERT( pxUnblockedTCB ); - 80014fc: 693b ldr r3, [r7, #16] - 80014fe: 2b00 cmp r3, #0 - 8001500: d109 bne.n 8001516 - 8001502: f04f 0350 mov.w r3, #80 ; 0x50 - 8001506: f383 8811 msr BASEPRI, r3 - 800150a: f3bf 8f6f isb sy - 800150e: f3bf 8f4f dsb sy - 8001512: 60fb str r3, [r7, #12] - 8001514: e7fe b.n 8001514 + 80018dc: 693b ldr r3, [r7, #16] + 80018de: 2b00 cmp r3, #0 + 80018e0: d109 bne.n 80018f6 + 80018e2: f04f 0350 mov.w r3, #80 ; 0x50 + 80018e6: f383 8811 msr BASEPRI, r3 + 80018ea: f3bf 8f6f isb sy + 80018ee: f3bf 8f4f dsb sy + 80018f2: 60fb str r3, [r7, #12] + 80018f4: e7fe b.n 80018f4 ( void ) uxListRemove( &( pxUnblockedTCB->xEventListItem ) ); - 8001516: 693b ldr r3, [r7, #16] - 8001518: 3318 adds r3, #24 - 800151a: 4618 mov r0, r3 - 800151c: f7fe ff0a bl 8000334 + 80018f6: 693b ldr r3, [r7, #16] + 80018f8: 3318 adds r3, #24 + 80018fa: 4618 mov r0, r3 + 80018fc: f7fe fdba bl 8000474 if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) - 8001520: 4b1d ldr r3, [pc, #116] ; (8001598 ) - 8001522: 681b ldr r3, [r3, #0] - 8001524: 2b00 cmp r3, #0 - 8001526: d11c bne.n 8001562 + 8001900: 4b1f ldr r3, [pc, #124] ; (8001980 ) + 8001902: 681b ldr r3, [r3, #0] + 8001904: 2b00 cmp r3, #0 + 8001906: d120 bne.n 800194a { ( void ) uxListRemove( &( pxUnblockedTCB->xStateListItem ) ); - 8001528: 693b ldr r3, [r7, #16] - 800152a: 3304 adds r3, #4 - 800152c: 4618 mov r0, r3 - 800152e: f7fe ff01 bl 8000334 + 8001908: 693b ldr r3, [r7, #16] + 800190a: 3304 adds r3, #4 + 800190c: 4618 mov r0, r3 + 800190e: f7fe fdb1 bl 8000474 prvAddTaskToReadyList( pxUnblockedTCB ); - 8001532: 693b ldr r3, [r7, #16] - 8001534: 6adb ldr r3, [r3, #44] ; 0x2c - 8001536: 2201 movs r2, #1 - 8001538: 409a lsls r2, r3 - 800153a: 4b18 ldr r3, [pc, #96] ; (800159c ) - 800153c: 681b ldr r3, [r3, #0] - 800153e: 4313 orrs r3, r2 - 8001540: 4a16 ldr r2, [pc, #88] ; (800159c ) - 8001542: 6013 str r3, [r2, #0] - 8001544: 693b ldr r3, [r7, #16] - 8001546: 6ada ldr r2, [r3, #44] ; 0x2c - 8001548: 4613 mov r3, r2 - 800154a: 009b lsls r3, r3, #2 - 800154c: 4413 add r3, r2 - 800154e: 009b lsls r3, r3, #2 - 8001550: 4a13 ldr r2, [pc, #76] ; (80015a0 ) - 8001552: 441a add r2, r3 - 8001554: 693b ldr r3, [r7, #16] - 8001556: 3304 adds r3, #4 - 8001558: 4619 mov r1, r3 - 800155a: 4610 mov r0, r2 - 800155c: f7fe fe8d bl 800027a - 8001560: e005 b.n 800156e + 8001912: 693b ldr r3, [r7, #16] + 8001914: 4618 mov r0, r3 + 8001916: f003 f939 bl 8004b8c + 800191a: 693b ldr r3, [r7, #16] + 800191c: 6adb ldr r3, [r3, #44] ; 0x2c + 800191e: 2201 movs r2, #1 + 8001920: 409a lsls r2, r3 + 8001922: 4b18 ldr r3, [pc, #96] ; (8001984 ) + 8001924: 681b ldr r3, [r3, #0] + 8001926: 4313 orrs r3, r2 + 8001928: 4a16 ldr r2, [pc, #88] ; (8001984 ) + 800192a: 6013 str r3, [r2, #0] + 800192c: 693b ldr r3, [r7, #16] + 800192e: 6ada ldr r2, [r3, #44] ; 0x2c + 8001930: 4613 mov r3, r2 + 8001932: 009b lsls r3, r3, #2 + 8001934: 4413 add r3, r2 + 8001936: 009b lsls r3, r3, #2 + 8001938: 4a13 ldr r2, [pc, #76] ; (8001988 ) + 800193a: 441a add r2, r3 + 800193c: 693b ldr r3, [r7, #16] + 800193e: 3304 adds r3, #4 + 8001940: 4619 mov r1, r3 + 8001942: 4610 mov r0, r2 + 8001944: f7fe fd39 bl 80003ba + 8001948: e005 b.n 8001956 } else { /* The delayed and ready lists cannot be accessed, so hold this task * pending until the scheduler is resumed. */ vListInsertEnd( &( xPendingReadyList ), &( pxUnblockedTCB->xEventListItem ) ); - 8001562: 693b ldr r3, [r7, #16] - 8001564: 3318 adds r3, #24 - 8001566: 4619 mov r1, r3 - 8001568: 480e ldr r0, [pc, #56] ; (80015a4 ) - 800156a: f7fe fe86 bl 800027a + 800194a: 693b ldr r3, [r7, #16] + 800194c: 3318 adds r3, #24 + 800194e: 4619 mov r1, r3 + 8001950: 480e ldr r0, [pc, #56] ; (800198c ) + 8001952: f7fe fd32 bl 80003ba } if( pxUnblockedTCB->uxPriority > pxCurrentTCB->uxPriority ) - 800156e: 693b ldr r3, [r7, #16] - 8001570: 6ada ldr r2, [r3, #44] ; 0x2c - 8001572: 4b0d ldr r3, [pc, #52] ; (80015a8 ) - 8001574: 681b ldr r3, [r3, #0] - 8001576: 6adb ldr r3, [r3, #44] ; 0x2c - 8001578: 429a cmp r2, r3 - 800157a: d905 bls.n 8001588 + 8001956: 693b ldr r3, [r7, #16] + 8001958: 6ada ldr r2, [r3, #44] ; 0x2c + 800195a: 4b0d ldr r3, [pc, #52] ; (8001990 ) + 800195c: 681b ldr r3, [r3, #0] + 800195e: 6adb ldr r3, [r3, #44] ; 0x2c + 8001960: 429a cmp r2, r3 + 8001962: d905 bls.n 8001970 { /* Return true if the task removed from the event list has a higher * priority than the calling task. This allows the calling task to know if * it should force a context switch now. */ xReturn = pdTRUE; - 800157c: 2301 movs r3, #1 - 800157e: 617b str r3, [r7, #20] + 8001964: 2301 movs r3, #1 + 8001966: 617b str r3, [r7, #20] /* Mark that a yield is pending in case the user is not using the * "xHigherPriorityTaskWoken" parameter to an ISR safe FreeRTOS function. */ xYieldPending = pdTRUE; - 8001580: 4b0a ldr r3, [pc, #40] ; (80015ac ) - 8001582: 2201 movs r2, #1 - 8001584: 601a str r2, [r3, #0] - 8001586: e001 b.n 800158c + 8001968: 4b0a ldr r3, [pc, #40] ; (8001994 ) + 800196a: 2201 movs r2, #1 + 800196c: 601a str r2, [r3, #0] + 800196e: e001 b.n 8001974 } else { xReturn = pdFALSE; - 8001588: 2300 movs r3, #0 - 800158a: 617b str r3, [r7, #20] + 8001970: 2300 movs r3, #0 + 8001972: 617b str r3, [r7, #20] } return xReturn; - 800158c: 697b ldr r3, [r7, #20] -} - 800158e: 4618 mov r0, r3 - 8001590: 3718 adds r7, #24 - 8001592: 46bd mov sp, r7 - 8001594: bd80 pop {r7, pc} - 8001596: bf00 nop - 8001598: 2000014c .word 0x2000014c - 800159c: 2000012c .word 0x2000012c - 80015a0: 20000050 .word 0x20000050 - 80015a4: 200000e4 .word 0x200000e4 - 80015a8: 2000004c .word 0x2000004c - 80015ac: 20000138 .word 0x20000138 - -080015b0 : + 8001974: 697b ldr r3, [r7, #20] +} + 8001976: 4618 mov r0, r3 + 8001978: 3718 adds r7, #24 + 800197a: 46bd mov sp, r7 + 800197c: bd80 pop {r7, pc} + 800197e: bf00 nop + 8001980: 200002a0 .word 0x200002a0 + 8001984: 20000280 .word 0x20000280 + 8001988: 200001a4 .word 0x200001a4 + 800198c: 20000238 .word 0x20000238 + 8001990: 200001a0 .word 0x200001a0 + 8001994: 2000028c .word 0x2000028c + +08001998 : taskEXIT_CRITICAL(); } /*-----------------------------------------------------------*/ void vTaskInternalSetTimeOutState( TimeOut_t * const pxTimeOut ) { - 80015b0: b480 push {r7} - 80015b2: b083 sub sp, #12 - 80015b4: af00 add r7, sp, #0 - 80015b6: 6078 str r0, [r7, #4] + 8001998: b480 push {r7} + 800199a: b083 sub sp, #12 + 800199c: af00 add r7, sp, #0 + 800199e: 6078 str r0, [r7, #4] /* For internal use only as it does not use a critical section. */ pxTimeOut->xOverflowCount = xNumOfOverflows; - 80015b8: 4b06 ldr r3, [pc, #24] ; (80015d4 ) - 80015ba: 681a ldr r2, [r3, #0] - 80015bc: 687b ldr r3, [r7, #4] - 80015be: 601a str r2, [r3, #0] + 80019a0: 4b06 ldr r3, [pc, #24] ; (80019bc ) + 80019a2: 681a ldr r2, [r3, #0] + 80019a4: 687b ldr r3, [r7, #4] + 80019a6: 601a str r2, [r3, #0] pxTimeOut->xTimeOnEntering = xTickCount; - 80015c0: 4b05 ldr r3, [pc, #20] ; (80015d8 ) - 80015c2: 681a ldr r2, [r3, #0] - 80015c4: 687b ldr r3, [r7, #4] - 80015c6: 605a str r2, [r3, #4] -} - 80015c8: bf00 nop - 80015ca: 370c adds r7, #12 - 80015cc: 46bd mov sp, r7 - 80015ce: f85d 7b04 ldr.w r7, [sp], #4 - 80015d2: 4770 bx lr - 80015d4: 2000013c .word 0x2000013c - 80015d8: 20000128 .word 0x20000128 - -080015dc : + 80019a8: 4b05 ldr r3, [pc, #20] ; (80019c0 ) + 80019aa: 681a ldr r2, [r3, #0] + 80019ac: 687b ldr r3, [r7, #4] + 80019ae: 605a str r2, [r3, #4] +} + 80019b0: bf00 nop + 80019b2: 370c adds r7, #12 + 80019b4: 46bd mov sp, r7 + 80019b6: f85d 7b04 ldr.w r7, [sp], #4 + 80019ba: 4770 bx lr + 80019bc: 20000290 .word 0x20000290 + 80019c0: 2000027c .word 0x2000027c + +080019c4 : /*-----------------------------------------------------------*/ BaseType_t xTaskCheckForTimeOut( TimeOut_t * const pxTimeOut, TickType_t * const pxTicksToWait ) { - 80015dc: b580 push {r7, lr} - 80015de: b088 sub sp, #32 - 80015e0: af00 add r7, sp, #0 - 80015e2: 6078 str r0, [r7, #4] - 80015e4: 6039 str r1, [r7, #0] + 80019c4: b580 push {r7, lr} + 80019c6: b088 sub sp, #32 + 80019c8: af00 add r7, sp, #0 + 80019ca: 6078 str r0, [r7, #4] + 80019cc: 6039 str r1, [r7, #0] BaseType_t xReturn; configASSERT( pxTimeOut ); - 80015e6: 687b ldr r3, [r7, #4] - 80015e8: 2b00 cmp r3, #0 - 80015ea: d109 bne.n 8001600 - 80015ec: f04f 0350 mov.w r3, #80 ; 0x50 - 80015f0: f383 8811 msr BASEPRI, r3 - 80015f4: f3bf 8f6f isb sy - 80015f8: f3bf 8f4f dsb sy - 80015fc: 613b str r3, [r7, #16] - 80015fe: e7fe b.n 80015fe + 80019ce: 687b ldr r3, [r7, #4] + 80019d0: 2b00 cmp r3, #0 + 80019d2: d109 bne.n 80019e8 + 80019d4: f04f 0350 mov.w r3, #80 ; 0x50 + 80019d8: f383 8811 msr BASEPRI, r3 + 80019dc: f3bf 8f6f isb sy + 80019e0: f3bf 8f4f dsb sy + 80019e4: 613b str r3, [r7, #16] + 80019e6: e7fe b.n 80019e6 configASSERT( pxTicksToWait ); - 8001600: 683b ldr r3, [r7, #0] - 8001602: 2b00 cmp r3, #0 - 8001604: d109 bne.n 800161a - 8001606: f04f 0350 mov.w r3, #80 ; 0x50 - 800160a: f383 8811 msr BASEPRI, r3 - 800160e: f3bf 8f6f isb sy - 8001612: f3bf 8f4f dsb sy - 8001616: 60fb str r3, [r7, #12] - 8001618: e7fe b.n 8001618 + 80019e8: 683b ldr r3, [r7, #0] + 80019ea: 2b00 cmp r3, #0 + 80019ec: d109 bne.n 8001a02 + 80019ee: f04f 0350 mov.w r3, #80 ; 0x50 + 80019f2: f383 8811 msr BASEPRI, r3 + 80019f6: f3bf 8f6f isb sy + 80019fa: f3bf 8f4f dsb sy + 80019fe: 60fb str r3, [r7, #12] + 8001a00: e7fe b.n 8001a00 taskENTER_CRITICAL(); - 800161a: f000 fe31 bl 8002280 + 8001a02: f001 f92d bl 8002c60 { /* Minor optimisation. The tick count cannot change in this block. */ const TickType_t xConstTickCount = xTickCount; - 800161e: 4b1f ldr r3, [pc, #124] ; (800169c ) - 8001620: 681b ldr r3, [r3, #0] - 8001622: 61bb str r3, [r7, #24] + 8001a06: 4b1f ldr r3, [pc, #124] ; (8001a84 ) + 8001a08: 681b ldr r3, [r3, #0] + 8001a0a: 61bb str r3, [r7, #24] const TickType_t xElapsedTime = xConstTickCount - pxTimeOut->xTimeOnEntering; - 8001624: 687b ldr r3, [r7, #4] - 8001626: 685b ldr r3, [r3, #4] - 8001628: 69ba ldr r2, [r7, #24] - 800162a: 1ad3 subs r3, r2, r3 - 800162c: 617b str r3, [r7, #20] + 8001a0c: 687b ldr r3, [r7, #4] + 8001a0e: 685b ldr r3, [r3, #4] + 8001a10: 69ba ldr r2, [r7, #24] + 8001a12: 1ad3 subs r3, r2, r3 + 8001a14: 617b str r3, [r7, #20] } else #endif #if ( INCLUDE_vTaskSuspend == 1 ) if( *pxTicksToWait == portMAX_DELAY ) - 800162e: 683b ldr r3, [r7, #0] - 8001630: 681b ldr r3, [r3, #0] - 8001632: f1b3 3fff cmp.w r3, #4294967295 ; 0xffffffff - 8001636: d102 bne.n 800163e + 8001a16: 683b ldr r3, [r7, #0] + 8001a18: 681b ldr r3, [r3, #0] + 8001a1a: f1b3 3fff cmp.w r3, #4294967295 ; 0xffffffff + 8001a1e: d102 bne.n 8001a26 { /* If INCLUDE_vTaskSuspend is set to 1 and the block time * specified is the maximum block time then the task should block * indefinitely, and therefore never time out. */ xReturn = pdFALSE; - 8001638: 2300 movs r3, #0 - 800163a: 61fb str r3, [r7, #28] - 800163c: e026 b.n 800168c + 8001a20: 2300 movs r3, #0 + 8001a22: 61fb str r3, [r7, #28] + 8001a24: e026 b.n 8001a74 } else #endif if( ( xNumOfOverflows != pxTimeOut->xOverflowCount ) && ( xConstTickCount >= pxTimeOut->xTimeOnEntering ) ) /*lint !e525 Indentation preferred as is to make code within pre-processor directives clearer. */ - 800163e: 687b ldr r3, [r7, #4] - 8001640: 681a ldr r2, [r3, #0] - 8001642: 4b17 ldr r3, [pc, #92] ; (80016a0 ) - 8001644: 681b ldr r3, [r3, #0] - 8001646: 429a cmp r2, r3 - 8001648: d00a beq.n 8001660 - 800164a: 687b ldr r3, [r7, #4] - 800164c: 685b ldr r3, [r3, #4] - 800164e: 69ba ldr r2, [r7, #24] - 8001650: 429a cmp r2, r3 - 8001652: d305 bcc.n 8001660 + 8001a26: 687b ldr r3, [r7, #4] + 8001a28: 681a ldr r2, [r3, #0] + 8001a2a: 4b17 ldr r3, [pc, #92] ; (8001a88 ) + 8001a2c: 681b ldr r3, [r3, #0] + 8001a2e: 429a cmp r2, r3 + 8001a30: d00a beq.n 8001a48 + 8001a32: 687b ldr r3, [r7, #4] + 8001a34: 685b ldr r3, [r3, #4] + 8001a36: 69ba ldr r2, [r7, #24] + 8001a38: 429a cmp r2, r3 + 8001a3a: d305 bcc.n 8001a48 /* The tick count is greater than the time at which * vTaskSetTimeout() was called, but has also overflowed since * vTaskSetTimeOut() was called. It must have wrapped all the way * around and gone past again. This passed since vTaskSetTimeout() * was called. */ xReturn = pdTRUE; - 8001654: 2301 movs r3, #1 - 8001656: 61fb str r3, [r7, #28] + 8001a3c: 2301 movs r3, #1 + 8001a3e: 61fb str r3, [r7, #28] *pxTicksToWait = ( TickType_t ) 0; - 8001658: 683b ldr r3, [r7, #0] - 800165a: 2200 movs r2, #0 - 800165c: 601a str r2, [r3, #0] - 800165e: e015 b.n 800168c + 8001a40: 683b ldr r3, [r7, #0] + 8001a42: 2200 movs r2, #0 + 8001a44: 601a str r2, [r3, #0] + 8001a46: e015 b.n 8001a74 } else if( xElapsedTime < *pxTicksToWait ) /*lint !e961 Explicit casting is only redundant with some compilers, whereas others require it to prevent integer conversion errors. */ - 8001660: 683b ldr r3, [r7, #0] - 8001662: 681b ldr r3, [r3, #0] - 8001664: 697a ldr r2, [r7, #20] - 8001666: 429a cmp r2, r3 - 8001668: d20b bcs.n 8001682 + 8001a48: 683b ldr r3, [r7, #0] + 8001a4a: 681b ldr r3, [r3, #0] + 8001a4c: 697a ldr r2, [r7, #20] + 8001a4e: 429a cmp r2, r3 + 8001a50: d20b bcs.n 8001a6a { /* Not a genuine timeout. Adjust parameters for time remaining. */ *pxTicksToWait -= xElapsedTime; - 800166a: 683b ldr r3, [r7, #0] - 800166c: 681a ldr r2, [r3, #0] - 800166e: 697b ldr r3, [r7, #20] - 8001670: 1ad2 subs r2, r2, r3 - 8001672: 683b ldr r3, [r7, #0] - 8001674: 601a str r2, [r3, #0] + 8001a52: 683b ldr r3, [r7, #0] + 8001a54: 681a ldr r2, [r3, #0] + 8001a56: 697b ldr r3, [r7, #20] + 8001a58: 1ad2 subs r2, r2, r3 + 8001a5a: 683b ldr r3, [r7, #0] + 8001a5c: 601a str r2, [r3, #0] vTaskInternalSetTimeOutState( pxTimeOut ); - 8001676: 6878 ldr r0, [r7, #4] - 8001678: f7ff ff9a bl 80015b0 + 8001a5e: 6878 ldr r0, [r7, #4] + 8001a60: f7ff ff9a bl 8001998 xReturn = pdFALSE; - 800167c: 2300 movs r3, #0 - 800167e: 61fb str r3, [r7, #28] - 8001680: e004 b.n 800168c + 8001a64: 2300 movs r3, #0 + 8001a66: 61fb str r3, [r7, #28] + 8001a68: e004 b.n 8001a74 } else { *pxTicksToWait = ( TickType_t ) 0; - 8001682: 683b ldr r3, [r7, #0] - 8001684: 2200 movs r2, #0 - 8001686: 601a str r2, [r3, #0] + 8001a6a: 683b ldr r3, [r7, #0] + 8001a6c: 2200 movs r2, #0 + 8001a6e: 601a str r2, [r3, #0] xReturn = pdTRUE; - 8001688: 2301 movs r3, #1 - 800168a: 61fb str r3, [r7, #28] + 8001a70: 2301 movs r3, #1 + 8001a72: 61fb str r3, [r7, #28] } } taskEXIT_CRITICAL(); - 800168c: f000 fe26 bl 80022dc + 8001a74: f001 f922 bl 8002cbc return xReturn; - 8001690: 69fb ldr r3, [r7, #28] + 8001a78: 69fb ldr r3, [r7, #28] } - 8001692: 4618 mov r0, r3 - 8001694: 3720 adds r7, #32 - 8001696: 46bd mov sp, r7 - 8001698: bd80 pop {r7, pc} - 800169a: bf00 nop - 800169c: 20000128 .word 0x20000128 - 80016a0: 2000013c .word 0x2000013c - -080016a4 : + 8001a7a: 4618 mov r0, r3 + 8001a7c: 3720 adds r7, #32 + 8001a7e: 46bd mov sp, r7 + 8001a80: bd80 pop {r7, pc} + 8001a82: bf00 nop + 8001a84: 2000027c .word 0x2000027c + 8001a88: 20000290 .word 0x20000290 + +08001a8c : /*-----------------------------------------------------------*/ void vTaskMissedYield( void ) { - 80016a4: b480 push {r7} - 80016a6: af00 add r7, sp, #0 + 8001a8c: b480 push {r7} + 8001a8e: af00 add r7, sp, #0 xYieldPending = pdTRUE; - 80016a8: 4b03 ldr r3, [pc, #12] ; (80016b8 ) - 80016aa: 2201 movs r2, #1 - 80016ac: 601a str r2, [r3, #0] + 8001a90: 4b03 ldr r3, [pc, #12] ; (8001aa0 ) + 8001a92: 2201 movs r2, #1 + 8001a94: 601a str r2, [r3, #0] } - 80016ae: bf00 nop - 80016b0: 46bd mov sp, r7 - 80016b2: f85d 7b04 ldr.w r7, [sp], #4 - 80016b6: 4770 bx lr - 80016b8: 20000138 .word 0x20000138 + 8001a96: bf00 nop + 8001a98: 46bd mov sp, r7 + 8001a9a: f85d 7b04 ldr.w r7, [sp], #4 + 8001a9e: 4770 bx lr + 8001aa0: 2000028c .word 0x2000028c -080016bc : +08001aa4 : * * void prvIdleTask( void *pvParameters ); * */ static portTASK_FUNCTION( prvIdleTask, pvParameters ) { - 80016bc: b580 push {r7, lr} - 80016be: b082 sub sp, #8 - 80016c0: af00 add r7, sp, #0 - 80016c2: 6078 str r0, [r7, #4] + 8001aa4: b580 push {r7, lr} + 8001aa6: b082 sub sp, #8 + 8001aa8: af00 add r7, sp, #0 + 8001aaa: 6078 str r0, [r7, #4] for( ; ; ) { /* See if any tasks have deleted themselves - if so then the idle task * is responsible for freeing the deleted task's TCB and stack. */ prvCheckTasksWaitingTermination(); - 80016c4: f000 f852 bl 800176c + 8001aac: f000 f854 bl 8001b58 * * A critical region is not required here as we are just reading from * the list, and an occasional incorrect value will not matter. If * the ready list at the idle priority contains more than one task * then a task other than the idle task is ready to execute. */ if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ tskIDLE_PRIORITY ] ) ) > ( UBaseType_t ) 1 ) - 80016c8: 4b06 ldr r3, [pc, #24] ; (80016e4 ) - 80016ca: 681b ldr r3, [r3, #0] - 80016cc: 2b01 cmp r3, #1 - 80016ce: d9f9 bls.n 80016c4 + 8001ab0: 4b07 ldr r3, [pc, #28] ; (8001ad0 ) + 8001ab2: 681b ldr r3, [r3, #0] + 8001ab4: 2b01 cmp r3, #1 + 8001ab6: d907 bls.n 8001ac8 { taskYIELD(); - 80016d0: 4b05 ldr r3, [pc, #20] ; (80016e8 ) - 80016d2: f04f 5280 mov.w r2, #268435456 ; 0x10000000 - 80016d6: 601a str r2, [r3, #0] - 80016d8: f3bf 8f4f dsb sy - 80016dc: f3bf 8f6f isb sy + 8001ab8: 4b06 ldr r3, [pc, #24] ; (8001ad4 ) + 8001aba: f04f 5280 mov.w r2, #268435456 ; 0x10000000 + 8001abe: 601a str r2, [r3, #0] + 8001ac0: f3bf 8f4f dsb sy + 8001ac4: f3bf 8f6f isb sy + /* Call the user defined function from within the idle task. This + * allows the application designer to add background functionality + * without the overhead of a separate task. + * NOTE: vApplicationIdleHook() MUST NOT, UNDER ANY CIRCUMSTANCES, + * CALL A FUNCTION THAT MIGHT BLOCK. */ + vApplicationIdleHook(); + 8001ac8: f004 fa98 bl 8005ffc prvCheckTasksWaitingTermination(); - 80016e0: e7f0 b.n 80016c4 - 80016e2: bf00 nop - 80016e4: 20000050 .word 0x20000050 - 80016e8: e000ed04 .word 0xe000ed04 + 8001acc: e7ee b.n 8001aac + 8001ace: bf00 nop + 8001ad0: 200001a4 .word 0x200001a4 + 8001ad4: e000ed04 .word 0xe000ed04 -080016ec : +08001ad8 : #endif /* portUSING_MPU_WRAPPERS */ /*-----------------------------------------------------------*/ static void prvInitialiseTaskLists( void ) { - 80016ec: b580 push {r7, lr} - 80016ee: b082 sub sp, #8 - 80016f0: af00 add r7, sp, #0 + 8001ad8: b580 push {r7, lr} + 8001ada: b082 sub sp, #8 + 8001adc: af00 add r7, sp, #0 UBaseType_t uxPriority; for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) - 80016f2: 2300 movs r3, #0 - 80016f4: 607b str r3, [r7, #4] - 80016f6: e00c b.n 8001712 + 8001ade: 2300 movs r3, #0 + 8001ae0: 607b str r3, [r7, #4] + 8001ae2: e00c b.n 8001afe { vListInitialise( &( pxReadyTasksLists[ uxPriority ] ) ); - 80016f8: 687a ldr r2, [r7, #4] - 80016fa: 4613 mov r3, r2 - 80016fc: 009b lsls r3, r3, #2 - 80016fe: 4413 add r3, r2 - 8001700: 009b lsls r3, r3, #2 - 8001702: 4a12 ldr r2, [pc, #72] ; (800174c ) - 8001704: 4413 add r3, r2 - 8001706: 4618 mov r0, r3 - 8001708: f7fe fd8a bl 8000220 + 8001ae4: 687a ldr r2, [r7, #4] + 8001ae6: 4613 mov r3, r2 + 8001ae8: 009b lsls r3, r3, #2 + 8001aea: 4413 add r3, r2 + 8001aec: 009b lsls r3, r3, #2 + 8001aee: 4a12 ldr r2, [pc, #72] ; (8001b38 ) + 8001af0: 4413 add r3, r2 + 8001af2: 4618 mov r0, r3 + 8001af4: f7fe fc34 bl 8000360 for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) - 800170c: 687b ldr r3, [r7, #4] - 800170e: 3301 adds r3, #1 - 8001710: 607b str r3, [r7, #4] - 8001712: 687b ldr r3, [r7, #4] - 8001714: 2b04 cmp r3, #4 - 8001716: d9ef bls.n 80016f8 + 8001af8: 687b ldr r3, [r7, #4] + 8001afa: 3301 adds r3, #1 + 8001afc: 607b str r3, [r7, #4] + 8001afe: 687b ldr r3, [r7, #4] + 8001b00: 2b04 cmp r3, #4 + 8001b02: d9ef bls.n 8001ae4 } vListInitialise( &xDelayedTaskList1 ); - 8001718: 480d ldr r0, [pc, #52] ; (8001750 ) - 800171a: f7fe fd81 bl 8000220 + 8001b04: 480d ldr r0, [pc, #52] ; (8001b3c ) + 8001b06: f7fe fc2b bl 8000360 vListInitialise( &xDelayedTaskList2 ); - 800171e: 480d ldr r0, [pc, #52] ; (8001754 ) - 8001720: f7fe fd7e bl 8000220 + 8001b0a: 480d ldr r0, [pc, #52] ; (8001b40 ) + 8001b0c: f7fe fc28 bl 8000360 vListInitialise( &xPendingReadyList ); - 8001724: 480c ldr r0, [pc, #48] ; (8001758 ) - 8001726: f7fe fd7b bl 8000220 + 8001b10: 480c ldr r0, [pc, #48] ; (8001b44 ) + 8001b12: f7fe fc25 bl 8000360 #if ( INCLUDE_vTaskDelete == 1 ) { vListInitialise( &xTasksWaitingTermination ); - 800172a: 480c ldr r0, [pc, #48] ; (800175c ) - 800172c: f7fe fd78 bl 8000220 + 8001b16: 480c ldr r0, [pc, #48] ; (8001b48 ) + 8001b18: f7fe fc22 bl 8000360 } #endif /* INCLUDE_vTaskDelete */ #if ( INCLUDE_vTaskSuspend == 1 ) { vListInitialise( &xSuspendedTaskList ); - 8001730: 480b ldr r0, [pc, #44] ; (8001760 ) - 8001732: f7fe fd75 bl 8000220 + 8001b1c: 480b ldr r0, [pc, #44] ; (8001b4c ) + 8001b1e: f7fe fc1f bl 8000360 } #endif /* INCLUDE_vTaskSuspend */ /* Start with pxDelayedTaskList using list1 and the pxOverflowDelayedTaskList * using list2. */ pxDelayedTaskList = &xDelayedTaskList1; - 8001736: 4b0b ldr r3, [pc, #44] ; (8001764 ) - 8001738: 4a05 ldr r2, [pc, #20] ; (8001750 ) - 800173a: 601a str r2, [r3, #0] + 8001b22: 4b0b ldr r3, [pc, #44] ; (8001b50 ) + 8001b24: 4a05 ldr r2, [pc, #20] ; (8001b3c ) + 8001b26: 601a str r2, [r3, #0] pxOverflowDelayedTaskList = &xDelayedTaskList2; - 800173c: 4b0a ldr r3, [pc, #40] ; (8001768 ) - 800173e: 4a05 ldr r2, [pc, #20] ; (8001754 ) - 8001740: 601a str r2, [r3, #0] -} - 8001742: bf00 nop - 8001744: 3708 adds r7, #8 - 8001746: 46bd mov sp, r7 - 8001748: bd80 pop {r7, pc} - 800174a: bf00 nop - 800174c: 20000050 .word 0x20000050 - 8001750: 200000b4 .word 0x200000b4 - 8001754: 200000c8 .word 0x200000c8 - 8001758: 200000e4 .word 0x200000e4 - 800175c: 200000f8 .word 0x200000f8 - 8001760: 20000110 .word 0x20000110 - 8001764: 200000dc .word 0x200000dc - 8001768: 200000e0 .word 0x200000e0 - -0800176c : + 8001b28: 4b0a ldr r3, [pc, #40] ; (8001b54 ) + 8001b2a: 4a05 ldr r2, [pc, #20] ; (8001b40 ) + 8001b2c: 601a str r2, [r3, #0] +} + 8001b2e: bf00 nop + 8001b30: 3708 adds r7, #8 + 8001b32: 46bd mov sp, r7 + 8001b34: bd80 pop {r7, pc} + 8001b36: bf00 nop + 8001b38: 200001a4 .word 0x200001a4 + 8001b3c: 20000208 .word 0x20000208 + 8001b40: 2000021c .word 0x2000021c + 8001b44: 20000238 .word 0x20000238 + 8001b48: 2000024c .word 0x2000024c + 8001b4c: 20000264 .word 0x20000264 + 8001b50: 20000230 .word 0x20000230 + 8001b54: 20000234 .word 0x20000234 + +08001b58 : /*-----------------------------------------------------------*/ static void prvCheckTasksWaitingTermination( void ) { - 800176c: b580 push {r7, lr} - 800176e: b082 sub sp, #8 - 8001770: af00 add r7, sp, #0 + 8001b58: b580 push {r7, lr} + 8001b5a: b082 sub sp, #8 + 8001b5c: af00 add r7, sp, #0 { TCB_t * pxTCB; /* uxDeletedTasksWaitingCleanUp is used to prevent taskENTER_CRITICAL() * being called too often in the idle task. */ while( uxDeletedTasksWaitingCleanUp > ( UBaseType_t ) 0U ) - 8001772: e019 b.n 80017a8 + 8001b5e: e019 b.n 8001b94 { taskENTER_CRITICAL(); - 8001774: f000 fd84 bl 8002280 + 8001b60: f001 f87e bl 8002c60 { pxTCB = listGET_OWNER_OF_HEAD_ENTRY( ( &xTasksWaitingTermination ) ); /*lint !e9079 void * is used as this macro is used with timers and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */ - 8001778: 4b0f ldr r3, [pc, #60] ; (80017b8 ) - 800177a: 68db ldr r3, [r3, #12] - 800177c: 68db ldr r3, [r3, #12] - 800177e: 607b str r3, [r7, #4] + 8001b64: 4b0f ldr r3, [pc, #60] ; (8001ba4 ) + 8001b66: 68db ldr r3, [r3, #12] + 8001b68: 68db ldr r3, [r3, #12] + 8001b6a: 607b str r3, [r7, #4] ( void ) uxListRemove( &( pxTCB->xStateListItem ) ); - 8001780: 687b ldr r3, [r7, #4] - 8001782: 3304 adds r3, #4 - 8001784: 4618 mov r0, r3 - 8001786: f7fe fdd5 bl 8000334 + 8001b6c: 687b ldr r3, [r7, #4] + 8001b6e: 3304 adds r3, #4 + 8001b70: 4618 mov r0, r3 + 8001b72: f7fe fc7f bl 8000474 --uxCurrentNumberOfTasks; - 800178a: 4b0c ldr r3, [pc, #48] ; (80017bc ) - 800178c: 681b ldr r3, [r3, #0] - 800178e: 3b01 subs r3, #1 - 8001790: 4a0a ldr r2, [pc, #40] ; (80017bc ) - 8001792: 6013 str r3, [r2, #0] + 8001b76: 4b0c ldr r3, [pc, #48] ; (8001ba8 ) + 8001b78: 681b ldr r3, [r3, #0] + 8001b7a: 3b01 subs r3, #1 + 8001b7c: 4a0a ldr r2, [pc, #40] ; (8001ba8 ) + 8001b7e: 6013 str r3, [r2, #0] --uxDeletedTasksWaitingCleanUp; - 8001794: 4b0a ldr r3, [pc, #40] ; (80017c0 ) - 8001796: 681b ldr r3, [r3, #0] - 8001798: 3b01 subs r3, #1 - 800179a: 4a09 ldr r2, [pc, #36] ; (80017c0 ) - 800179c: 6013 str r3, [r2, #0] + 8001b80: 4b0a ldr r3, [pc, #40] ; (8001bac ) + 8001b82: 681b ldr r3, [r3, #0] + 8001b84: 3b01 subs r3, #1 + 8001b86: 4a09 ldr r2, [pc, #36] ; (8001bac ) + 8001b88: 6013 str r3, [r2, #0] } taskEXIT_CRITICAL(); - 800179e: f000 fd9d bl 80022dc + 8001b8a: f001 f897 bl 8002cbc prvDeleteTCB( pxTCB ); - 80017a2: 6878 ldr r0, [r7, #4] - 80017a4: f000 f80e bl 80017c4 + 8001b8e: 6878 ldr r0, [r7, #4] + 8001b90: f000 f80e bl 8001bb0 while( uxDeletedTasksWaitingCleanUp > ( UBaseType_t ) 0U ) - 80017a8: 4b05 ldr r3, [pc, #20] ; (80017c0 ) - 80017aa: 681b ldr r3, [r3, #0] - 80017ac: 2b00 cmp r3, #0 - 80017ae: d1e1 bne.n 8001774 + 8001b94: 4b05 ldr r3, [pc, #20] ; (8001bac ) + 8001b96: 681b ldr r3, [r3, #0] + 8001b98: 2b00 cmp r3, #0 + 8001b9a: d1e1 bne.n 8001b60 } } #endif /* INCLUDE_vTaskDelete */ } - 80017b0: bf00 nop - 80017b2: 3708 adds r7, #8 - 80017b4: 46bd mov sp, r7 - 80017b6: bd80 pop {r7, pc} - 80017b8: 200000f8 .word 0x200000f8 - 80017bc: 20000124 .word 0x20000124 - 80017c0: 2000010c .word 0x2000010c - -080017c4 : + 8001b9c: bf00 nop + 8001b9e: 3708 adds r7, #8 + 8001ba0: 46bd mov sp, r7 + 8001ba2: bd80 pop {r7, pc} + 8001ba4: 2000024c .word 0x2000024c + 8001ba8: 20000278 .word 0x20000278 + 8001bac: 20000260 .word 0x20000260 + +08001bb0 : /*-----------------------------------------------------------*/ #if ( INCLUDE_vTaskDelete == 1 ) static void prvDeleteTCB( TCB_t * pxTCB ) { - 80017c4: b580 push {r7, lr} - 80017c6: b082 sub sp, #8 - 80017c8: af00 add r7, sp, #0 - 80017ca: 6078 str r0, [r7, #4] + 8001bb0: b580 push {r7, lr} + 8001bb2: b082 sub sp, #8 + 8001bb4: af00 add r7, sp, #0 + 8001bb6: 6078 str r0, [r7, #4] #if ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 0 ) && ( portUSING_MPU_WRAPPERS == 0 ) ) { /* The task can only have been allocated dynamically - free both * the stack and TCB. */ vPortFree( pxTCB->pxStack ); - 80017cc: 687b ldr r3, [r7, #4] - 80017ce: 6b1b ldr r3, [r3, #48] ; 0x30 - 80017d0: 4618 mov r0, r3 - 80017d2: f000 ff4b bl 800266c + 8001bb8: 687b ldr r3, [r7, #4] + 8001bba: 6b1b ldr r3, [r3, #48] ; 0x30 + 8001bbc: 4618 mov r0, r3 + 8001bbe: f001 fa4d bl 800305c vPortFree( pxTCB ); - 80017d6: 6878 ldr r0, [r7, #4] - 80017d8: f000 ff48 bl 800266c + 8001bc2: 6878 ldr r0, [r7, #4] + 8001bc4: f001 fa4a bl 800305c configASSERT( pxTCB->ucStaticallyAllocated == tskSTATICALLY_ALLOCATED_STACK_AND_TCB ); mtCOVERAGE_TEST_MARKER(); } } #endif /* configSUPPORT_DYNAMIC_ALLOCATION */ } - 80017dc: bf00 nop - 80017de: 3708 adds r7, #8 - 80017e0: 46bd mov sp, r7 - 80017e2: bd80 pop {r7, pc} + 8001bc8: bf00 nop + 8001bca: 3708 adds r7, #8 + 8001bcc: 46bd mov sp, r7 + 8001bce: bd80 pop {r7, pc} -080017e4 : +08001bd0 : #endif /* INCLUDE_vTaskDelete */ /*-----------------------------------------------------------*/ static void prvResetNextTaskUnblockTime( void ) { - 80017e4: b480 push {r7} - 80017e6: af00 add r7, sp, #0 + 8001bd0: b480 push {r7} + 8001bd2: af00 add r7, sp, #0 if( listLIST_IS_EMPTY( pxDelayedTaskList ) != pdFALSE ) - 80017e8: 4b0a ldr r3, [pc, #40] ; (8001814 ) - 80017ea: 681b ldr r3, [r3, #0] - 80017ec: 681b ldr r3, [r3, #0] - 80017ee: 2b00 cmp r3, #0 - 80017f0: d104 bne.n 80017fc + 8001bd4: 4b0a ldr r3, [pc, #40] ; (8001c00 ) + 8001bd6: 681b ldr r3, [r3, #0] + 8001bd8: 681b ldr r3, [r3, #0] + 8001bda: 2b00 cmp r3, #0 + 8001bdc: d104 bne.n 8001be8 { /* The new current delayed list is empty. Set xNextTaskUnblockTime to * the maximum possible value so it is extremely unlikely that the * if( xTickCount >= xNextTaskUnblockTime ) test will pass until * there is an item in the delayed list. */ xNextTaskUnblockTime = portMAX_DELAY; - 80017f2: 4b09 ldr r3, [pc, #36] ; (8001818 ) - 80017f4: f04f 32ff mov.w r2, #4294967295 ; 0xffffffff - 80017f8: 601a str r2, [r3, #0] + 8001bde: 4b09 ldr r3, [pc, #36] ; (8001c04 ) + 8001be0: f04f 32ff mov.w r2, #4294967295 ; 0xffffffff + 8001be4: 601a str r2, [r3, #0] * the item at the head of the delayed list. This is the time at * which the task at the head of the delayed list should be removed * from the Blocked state. */ xNextTaskUnblockTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxDelayedTaskList ); } } - 80017fa: e005 b.n 8001808 + 8001be6: e005 b.n 8001bf4 xNextTaskUnblockTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxDelayedTaskList ); - 80017fc: 4b05 ldr r3, [pc, #20] ; (8001814 ) - 80017fe: 681b ldr r3, [r3, #0] - 8001800: 68db ldr r3, [r3, #12] - 8001802: 681b ldr r3, [r3, #0] - 8001804: 4a04 ldr r2, [pc, #16] ; (8001818 ) - 8001806: 6013 str r3, [r2, #0] + 8001be8: 4b05 ldr r3, [pc, #20] ; (8001c00 ) + 8001bea: 681b ldr r3, [r3, #0] + 8001bec: 68db ldr r3, [r3, #12] + 8001bee: 681b ldr r3, [r3, #0] + 8001bf0: 4a04 ldr r2, [pc, #16] ; (8001c04 ) + 8001bf2: 6013 str r3, [r2, #0] } - 8001808: bf00 nop - 800180a: 46bd mov sp, r7 - 800180c: f85d 7b04 ldr.w r7, [sp], #4 - 8001810: 4770 bx lr - 8001812: bf00 nop - 8001814: 200000dc .word 0x200000dc - 8001818: 20000144 .word 0x20000144 - -0800181c : + 8001bf4: bf00 nop + 8001bf6: 46bd mov sp, r7 + 8001bf8: f85d 7b04 ldr.w r7, [sp], #4 + 8001bfc: 4770 bx lr + 8001bfe: bf00 nop + 8001c00: 20000230 .word 0x20000230 + 8001c04: 20000298 .word 0x20000298 + +08001c08 : /*-----------------------------------------------------------*/ #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) ) BaseType_t xTaskGetSchedulerState( void ) { - 800181c: b480 push {r7} - 800181e: b083 sub sp, #12 - 8001820: af00 add r7, sp, #0 + 8001c08: b480 push {r7} + 8001c0a: b083 sub sp, #12 + 8001c0c: af00 add r7, sp, #0 BaseType_t xReturn; if( xSchedulerRunning == pdFALSE ) - 8001822: 4b0b ldr r3, [pc, #44] ; (8001850 ) - 8001824: 681b ldr r3, [r3, #0] - 8001826: 2b00 cmp r3, #0 - 8001828: d102 bne.n 8001830 + 8001c0e: 4b0b ldr r3, [pc, #44] ; (8001c3c ) + 8001c10: 681b ldr r3, [r3, #0] + 8001c12: 2b00 cmp r3, #0 + 8001c14: d102 bne.n 8001c1c { xReturn = taskSCHEDULER_NOT_STARTED; - 800182a: 2301 movs r3, #1 - 800182c: 607b str r3, [r7, #4] - 800182e: e008 b.n 8001842 + 8001c16: 2301 movs r3, #1 + 8001c18: 607b str r3, [r7, #4] + 8001c1a: e008 b.n 8001c2e } else { if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) - 8001830: 4b08 ldr r3, [pc, #32] ; (8001854 ) - 8001832: 681b ldr r3, [r3, #0] - 8001834: 2b00 cmp r3, #0 - 8001836: d102 bne.n 800183e + 8001c1c: 4b08 ldr r3, [pc, #32] ; (8001c40 ) + 8001c1e: 681b ldr r3, [r3, #0] + 8001c20: 2b00 cmp r3, #0 + 8001c22: d102 bne.n 8001c2a { xReturn = taskSCHEDULER_RUNNING; - 8001838: 2302 movs r3, #2 - 800183a: 607b str r3, [r7, #4] - 800183c: e001 b.n 8001842 + 8001c24: 2302 movs r3, #2 + 8001c26: 607b str r3, [r7, #4] + 8001c28: e001 b.n 8001c2e } else { xReturn = taskSCHEDULER_SUSPENDED; - 800183e: 2300 movs r3, #0 - 8001840: 607b str r3, [r7, #4] + 8001c2a: 2300 movs r3, #0 + 8001c2c: 607b str r3, [r7, #4] } } return xReturn; - 8001842: 687b ldr r3, [r7, #4] + 8001c2e: 687b ldr r3, [r7, #4] } - 8001844: 4618 mov r0, r3 - 8001846: 370c adds r7, #12 - 8001848: 46bd mov sp, r7 - 800184a: f85d 7b04 ldr.w r7, [sp], #4 - 800184e: 4770 bx lr - 8001850: 20000130 .word 0x20000130 - 8001854: 2000014c .word 0x2000014c - -08001858 : + 8001c30: 4618 mov r0, r3 + 8001c32: 370c adds r7, #12 + 8001c34: 46bd mov sp, r7 + 8001c36: f85d 7b04 ldr.w r7, [sp], #4 + 8001c3a: 4770 bx lr + 8001c3c: 20000284 .word 0x20000284 + 8001c40: 200002a0 .word 0x200002a0 + +08001c44 : /*-----------------------------------------------------------*/ #if ( configUSE_MUTEXES == 1 ) BaseType_t xTaskPriorityDisinherit( TaskHandle_t const pxMutexHolder ) { - 8001858: b580 push {r7, lr} - 800185a: b086 sub sp, #24 - 800185c: af00 add r7, sp, #0 - 800185e: 6078 str r0, [r7, #4] + 8001c44: b580 push {r7, lr} + 8001c46: b086 sub sp, #24 + 8001c48: af00 add r7, sp, #0 + 8001c4a: 6078 str r0, [r7, #4] TCB_t * const pxTCB = pxMutexHolder; - 8001860: 687b ldr r3, [r7, #4] - 8001862: 613b str r3, [r7, #16] + 8001c4c: 687b ldr r3, [r7, #4] + 8001c4e: 613b str r3, [r7, #16] BaseType_t xReturn = pdFALSE; - 8001864: 2300 movs r3, #0 - 8001866: 617b str r3, [r7, #20] + 8001c50: 2300 movs r3, #0 + 8001c52: 617b str r3, [r7, #20] if( pxMutexHolder != NULL ) - 8001868: 687b ldr r3, [r7, #4] - 800186a: 2b00 cmp r3, #0 - 800186c: d061 beq.n 8001932 + 8001c54: 687b ldr r3, [r7, #4] + 8001c56: 2b00 cmp r3, #0 + 8001c58: d066 beq.n 8001d28 { /* A task can only have an inherited priority if it holds the mutex. * If the mutex is held by a task then it cannot be given from an * interrupt, and if a mutex is given by the holding task then it must * be the running state task. */ configASSERT( pxTCB == pxCurrentTCB ); - 800186e: 4b33 ldr r3, [pc, #204] ; (800193c ) - 8001870: 681b ldr r3, [r3, #0] - 8001872: 693a ldr r2, [r7, #16] - 8001874: 429a cmp r2, r3 - 8001876: d009 beq.n 800188c - 8001878: f04f 0350 mov.w r3, #80 ; 0x50 - 800187c: f383 8811 msr BASEPRI, r3 - 8001880: f3bf 8f6f isb sy - 8001884: f3bf 8f4f dsb sy - 8001888: 60fb str r3, [r7, #12] - 800188a: e7fe b.n 800188a + 8001c5a: 4b36 ldr r3, [pc, #216] ; (8001d34 ) + 8001c5c: 681b ldr r3, [r3, #0] + 8001c5e: 693a ldr r2, [r7, #16] + 8001c60: 429a cmp r2, r3 + 8001c62: d009 beq.n 8001c78 + 8001c64: f04f 0350 mov.w r3, #80 ; 0x50 + 8001c68: f383 8811 msr BASEPRI, r3 + 8001c6c: f3bf 8f6f isb sy + 8001c70: f3bf 8f4f dsb sy + 8001c74: 60fb str r3, [r7, #12] + 8001c76: e7fe b.n 8001c76 configASSERT( pxTCB->uxMutexesHeld ); - 800188c: 693b ldr r3, [r7, #16] - 800188e: 6cdb ldr r3, [r3, #76] ; 0x4c - 8001890: 2b00 cmp r3, #0 - 8001892: d109 bne.n 80018a8 - 8001894: f04f 0350 mov.w r3, #80 ; 0x50 - 8001898: f383 8811 msr BASEPRI, r3 - 800189c: f3bf 8f6f isb sy - 80018a0: f3bf 8f4f dsb sy - 80018a4: 60bb str r3, [r7, #8] - 80018a6: e7fe b.n 80018a6 + 8001c78: 693b ldr r3, [r7, #16] + 8001c7a: 6cdb ldr r3, [r3, #76] ; 0x4c + 8001c7c: 2b00 cmp r3, #0 + 8001c7e: d109 bne.n 8001c94 + 8001c80: f04f 0350 mov.w r3, #80 ; 0x50 + 8001c84: f383 8811 msr BASEPRI, r3 + 8001c88: f3bf 8f6f isb sy + 8001c8c: f3bf 8f4f dsb sy + 8001c90: 60bb str r3, [r7, #8] + 8001c92: e7fe b.n 8001c92 ( pxTCB->uxMutexesHeld )--; - 80018a8: 693b ldr r3, [r7, #16] - 80018aa: 6cdb ldr r3, [r3, #76] ; 0x4c - 80018ac: 1e5a subs r2, r3, #1 - 80018ae: 693b ldr r3, [r7, #16] - 80018b0: 64da str r2, [r3, #76] ; 0x4c + 8001c94: 693b ldr r3, [r7, #16] + 8001c96: 6cdb ldr r3, [r3, #76] ; 0x4c + 8001c98: 1e5a subs r2, r3, #1 + 8001c9a: 693b ldr r3, [r7, #16] + 8001c9c: 64da str r2, [r3, #76] ; 0x4c /* Has the holder of the mutex inherited the priority of another * task? */ if( pxTCB->uxPriority != pxTCB->uxBasePriority ) - 80018b2: 693b ldr r3, [r7, #16] - 80018b4: 6ada ldr r2, [r3, #44] ; 0x2c - 80018b6: 693b ldr r3, [r7, #16] - 80018b8: 6c9b ldr r3, [r3, #72] ; 0x48 - 80018ba: 429a cmp r2, r3 - 80018bc: d039 beq.n 8001932 + 8001c9e: 693b ldr r3, [r7, #16] + 8001ca0: 6ada ldr r2, [r3, #44] ; 0x2c + 8001ca2: 693b ldr r3, [r7, #16] + 8001ca4: 6c9b ldr r3, [r3, #72] ; 0x48 + 8001ca6: 429a cmp r2, r3 + 8001ca8: d03e beq.n 8001d28 { /* Only disinherit if no other mutexes are held. */ if( pxTCB->uxMutexesHeld == ( UBaseType_t ) 0 ) - 80018be: 693b ldr r3, [r7, #16] - 80018c0: 6cdb ldr r3, [r3, #76] ; 0x4c - 80018c2: 2b00 cmp r3, #0 - 80018c4: d135 bne.n 8001932 + 8001caa: 693b ldr r3, [r7, #16] + 8001cac: 6cdb ldr r3, [r3, #76] ; 0x4c + 8001cae: 2b00 cmp r3, #0 + 8001cb0: d13a bne.n 8001d28 /* A task can only have an inherited priority if it holds * the mutex. If the mutex is held by a task then it cannot be * given from an interrupt, and if a mutex is given by the * holding task then it must be the running state task. Remove * the holding task from the ready list. */ if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 ) - 80018c6: 693b ldr r3, [r7, #16] - 80018c8: 3304 adds r3, #4 - 80018ca: 4618 mov r0, r3 - 80018cc: f7fe fd32 bl 8000334 - 80018d0: 4603 mov r3, r0 - 80018d2: 2b00 cmp r3, #0 - 80018d4: d10a bne.n 80018ec + 8001cb2: 693b ldr r3, [r7, #16] + 8001cb4: 3304 adds r3, #4 + 8001cb6: 4618 mov r0, r3 + 8001cb8: f7fe fbdc bl 8000474 + 8001cbc: 4603 mov r3, r0 + 8001cbe: 2b00 cmp r3, #0 + 8001cc0: d10a bne.n 8001cd8 { portRESET_READY_PRIORITY( pxTCB->uxPriority, uxTopReadyPriority ); - 80018d6: 693b ldr r3, [r7, #16] - 80018d8: 6adb ldr r3, [r3, #44] ; 0x2c - 80018da: 2201 movs r2, #1 - 80018dc: fa02 f303 lsl.w r3, r2, r3 - 80018e0: 43da mvns r2, r3 - 80018e2: 4b17 ldr r3, [pc, #92] ; (8001940 ) - 80018e4: 681b ldr r3, [r3, #0] - 80018e6: 4013 ands r3, r2 - 80018e8: 4a15 ldr r2, [pc, #84] ; (8001940 ) - 80018ea: 6013 str r3, [r2, #0] + 8001cc2: 693b ldr r3, [r7, #16] + 8001cc4: 6adb ldr r3, [r3, #44] ; 0x2c + 8001cc6: 2201 movs r2, #1 + 8001cc8: fa02 f303 lsl.w r3, r2, r3 + 8001ccc: 43da mvns r2, r3 + 8001cce: 4b1a ldr r3, [pc, #104] ; (8001d38 ) + 8001cd0: 681b ldr r3, [r3, #0] + 8001cd2: 4013 ands r3, r2 + 8001cd4: 4a18 ldr r2, [pc, #96] ; (8001d38 ) + 8001cd6: 6013 str r3, [r2, #0] + mtCOVERAGE_TEST_MARKER(); } /* Disinherit the priority before adding the task into the * new ready list. */ traceTASK_PRIORITY_DISINHERIT( pxTCB, pxTCB->uxBasePriority ); + 8001cd8: 687b ldr r3, [r7, #4] + 8001cda: 4619 mov r1, r3 + 8001cdc: 204a movs r0, #74 ; 0x4a + 8001cde: f002 f929 bl 8003f34 pxTCB->uxPriority = pxTCB->uxBasePriority; - 80018ec: 693b ldr r3, [r7, #16] - 80018ee: 6c9a ldr r2, [r3, #72] ; 0x48 - 80018f0: 693b ldr r3, [r7, #16] - 80018f2: 62da str r2, [r3, #44] ; 0x2c + 8001ce2: 693b ldr r3, [r7, #16] + 8001ce4: 6c9a ldr r2, [r3, #72] ; 0x48 + 8001ce6: 693b ldr r3, [r7, #16] + 8001ce8: 62da str r2, [r3, #44] ; 0x2c /* Reset the event list item value. It cannot be in use for * any other purpose if this task is running, and it must be * running to give back the mutex. */ listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) pxTCB->uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ - 80018f4: 693b ldr r3, [r7, #16] - 80018f6: 6adb ldr r3, [r3, #44] ; 0x2c - 80018f8: f1c3 0205 rsb r2, r3, #5 - 80018fc: 693b ldr r3, [r7, #16] - 80018fe: 619a str r2, [r3, #24] - prvAddTaskToReadyList( pxTCB ); - 8001900: 693b ldr r3, [r7, #16] - 8001902: 6adb ldr r3, [r3, #44] ; 0x2c - 8001904: 2201 movs r2, #1 - 8001906: 409a lsls r2, r3 - 8001908: 4b0d ldr r3, [pc, #52] ; (8001940 ) - 800190a: 681b ldr r3, [r3, #0] - 800190c: 4313 orrs r3, r2 - 800190e: 4a0c ldr r2, [pc, #48] ; (8001940 ) - 8001910: 6013 str r3, [r2, #0] - 8001912: 693b ldr r3, [r7, #16] - 8001914: 6ada ldr r2, [r3, #44] ; 0x2c - 8001916: 4613 mov r3, r2 - 8001918: 009b lsls r3, r3, #2 - 800191a: 4413 add r3, r2 - 800191c: 009b lsls r3, r3, #2 - 800191e: 4a09 ldr r2, [pc, #36] ; (8001944 ) - 8001920: 441a add r2, r3 - 8001922: 693b ldr r3, [r7, #16] - 8001924: 3304 adds r3, #4 - 8001926: 4619 mov r1, r3 - 8001928: 4610 mov r0, r2 - 800192a: f7fe fca6 bl 800027a + 8001cea: 693b ldr r3, [r7, #16] + 8001cec: 6adb ldr r3, [r3, #44] ; 0x2c + 8001cee: f1c3 0205 rsb r2, r3, #5 + 8001cf2: 693b ldr r3, [r7, #16] + 8001cf4: 619a str r2, [r3, #24] +// prvAddTaskToReadyList( pxTCB ); + prvReaddTaskToReadyList( pxTCB ); + 8001cf6: 693b ldr r3, [r7, #16] + 8001cf8: 6adb ldr r3, [r3, #44] ; 0x2c + 8001cfa: 2201 movs r2, #1 + 8001cfc: 409a lsls r2, r3 + 8001cfe: 4b0e ldr r3, [pc, #56] ; (8001d38 ) + 8001d00: 681b ldr r3, [r3, #0] + 8001d02: 4313 orrs r3, r2 + 8001d04: 4a0c ldr r2, [pc, #48] ; (8001d38 ) + 8001d06: 6013 str r3, [r2, #0] + 8001d08: 693b ldr r3, [r7, #16] + 8001d0a: 6ada ldr r2, [r3, #44] ; 0x2c + 8001d0c: 4613 mov r3, r2 + 8001d0e: 009b lsls r3, r3, #2 + 8001d10: 4413 add r3, r2 + 8001d12: 009b lsls r3, r3, #2 + 8001d14: 4a09 ldr r2, [pc, #36] ; (8001d3c ) + 8001d16: 441a add r2, r3 + 8001d18: 693b ldr r3, [r7, #16] + 8001d1a: 3304 adds r3, #4 + 8001d1c: 4619 mov r1, r3 + 8001d1e: 4610 mov r0, r2 + 8001d20: f7fe fb4b bl 80003ba * in an order different to that in which they were taken. * If a context switch did not occur when the first mutex was * returned, even if a task was waiting on it, then a context * switch should occur when the last mutex is returned whether * a task is waiting on it or not. */ xReturn = pdTRUE; - 800192e: 2301 movs r3, #1 - 8001930: 617b str r3, [r7, #20] + 8001d24: 2301 movs r3, #1 + 8001d26: 617b str r3, [r7, #20] else { mtCOVERAGE_TEST_MARKER(); } return xReturn; - 8001932: 697b ldr r3, [r7, #20] + 8001d28: 697b ldr r3, [r7, #20] + } + 8001d2a: 4618 mov r0, r3 + 8001d2c: 3718 adds r7, #24 + 8001d2e: 46bd mov sp, r7 + 8001d30: bd80 pop {r7, pc} + 8001d32: bf00 nop + 8001d34: 200001a0 .word 0x200001a0 + 8001d38: 20000280 .word 0x20000280 + 8001d3c: 200001a4 .word 0x200001a4 + +08001d40 : + BaseType_t xTaskGenericNotifyWait( UBaseType_t uxIndexToWait, + uint32_t ulBitsToClearOnEntry, + uint32_t ulBitsToClearOnExit, + uint32_t * pulNotificationValue, + TickType_t xTicksToWait ) + { + 8001d40: b580 push {r7, lr} + 8001d42: b088 sub sp, #32 + 8001d44: af02 add r7, sp, #8 + 8001d46: 60f8 str r0, [r7, #12] + 8001d48: 60b9 str r1, [r7, #8] + 8001d4a: 607a str r2, [r7, #4] + 8001d4c: 603b str r3, [r7, #0] + BaseType_t xReturn; + + configASSERT( uxIndexToWait < configTASK_NOTIFICATION_ARRAY_ENTRIES ); + 8001d4e: 68fb ldr r3, [r7, #12] + 8001d50: 2b00 cmp r3, #0 + 8001d52: d009 beq.n 8001d68 + 8001d54: f04f 0350 mov.w r3, #80 ; 0x50 + 8001d58: f383 8811 msr BASEPRI, r3 + 8001d5c: f3bf 8f6f isb sy + 8001d60: f3bf 8f4f dsb sy + 8001d64: 613b str r3, [r7, #16] + 8001d66: e7fe b.n 8001d66 + + taskENTER_CRITICAL(); + 8001d68: f000 ff7a bl 8002c60 + { + /* Only block if a notification is not already pending. */ + if( pxCurrentTCB->ucNotifyState[ uxIndexToWait ] != taskNOTIFICATION_RECEIVED ) + 8001d6c: 4b36 ldr r3, [pc, #216] ; (8001e48 ) + 8001d6e: 681a ldr r2, [r3, #0] + 8001d70: 68fb ldr r3, [r7, #12] + 8001d72: 4413 add r3, r2 + 8001d74: 3354 adds r3, #84 ; 0x54 + 8001d76: 781b ldrb r3, [r3, #0] + 8001d78: b2db uxtb r3, r3 + 8001d7a: 2b02 cmp r3, #2 + 8001d7c: d022 beq.n 8001dc4 + { + /* Clear bits in the task's notification value as bits may get + * set by the notifying task or interrupt. This can be used to + * clear the value to zero. */ + pxCurrentTCB->ulNotifiedValue[ uxIndexToWait ] &= ~ulBitsToClearOnEntry; + 8001d7e: 4b32 ldr r3, [pc, #200] ; (8001e48 ) + 8001d80: 681b ldr r3, [r3, #0] + 8001d82: 68fa ldr r2, [r7, #12] + 8001d84: 3214 adds r2, #20 + 8001d86: f853 1022 ldr.w r1, [r3, r2, lsl #2] + 8001d8a: 68ba ldr r2, [r7, #8] + 8001d8c: 43d2 mvns r2, r2 + 8001d8e: 4011 ands r1, r2 + 8001d90: 68fa ldr r2, [r7, #12] + 8001d92: 3214 adds r2, #20 + 8001d94: f843 1022 str.w r1, [r3, r2, lsl #2] + + /* Mark this task as waiting for a notification. */ + pxCurrentTCB->ucNotifyState[ uxIndexToWait ] = taskWAITING_NOTIFICATION; + 8001d98: 4b2b ldr r3, [pc, #172] ; (8001e48 ) + 8001d9a: 681a ldr r2, [r3, #0] + 8001d9c: 68fb ldr r3, [r7, #12] + 8001d9e: 4413 add r3, r2 + 8001da0: 3354 adds r3, #84 ; 0x54 + 8001da2: 2201 movs r2, #1 + 8001da4: 701a strb r2, [r3, #0] + + if( xTicksToWait > ( TickType_t ) 0 ) + 8001da6: 6a3b ldr r3, [r7, #32] + 8001da8: 2b00 cmp r3, #0 + 8001daa: d00b beq.n 8001dc4 + { + prvAddCurrentTaskToDelayedList( xTicksToWait, pdTRUE ); + 8001dac: 2101 movs r1, #1 + 8001dae: 6a38 ldr r0, [r7, #32] + 8001db0: f000 fa4c bl 800224c + + /* All ports are written to allow a yield in a critical + * section (some will yield immediately, others wait until the + * critical section exits) - but it is not something that + * application code should ever do. */ + portYIELD_WITHIN_API(); + 8001db4: 4b25 ldr r3, [pc, #148] ; (8001e4c ) + 8001db6: f04f 5280 mov.w r2, #268435456 ; 0x10000000 + 8001dba: 601a str r2, [r3, #0] + 8001dbc: f3bf 8f4f dsb sy + 8001dc0: f3bf 8f6f isb sy + else + { + mtCOVERAGE_TEST_MARKER(); + } + } + taskEXIT_CRITICAL(); + 8001dc4: f000 ff7a bl 8002cbc + + taskENTER_CRITICAL(); + 8001dc8: f000 ff4a bl 8002c60 + { + traceTASK_NOTIFY_WAIT( uxIndexToWait ); + 8001dcc: 683a ldr r2, [r7, #0] + 8001dce: 6a3b ldr r3, [r7, #32] + 8001dd0: 9300 str r3, [sp, #0] + 8001dd2: 4613 mov r3, r2 + 8001dd4: 687a ldr r2, [r7, #4] + 8001dd6: 68b9 ldr r1, [r7, #8] + 8001dd8: 2040 movs r0, #64 ; 0x40 + 8001dda: f002 f9b7 bl 800414c + + if( pulNotificationValue != NULL ) + 8001dde: 683b ldr r3, [r7, #0] + 8001de0: 2b00 cmp r3, #0 + 8001de2: d007 beq.n 8001df4 + { + /* Output the current notification value, which may or may not + * have changed. */ + *pulNotificationValue = pxCurrentTCB->ulNotifiedValue[ uxIndexToWait ]; + 8001de4: 4b18 ldr r3, [pc, #96] ; (8001e48 ) + 8001de6: 681b ldr r3, [r3, #0] + 8001de8: 68fa ldr r2, [r7, #12] + 8001dea: 3214 adds r2, #20 + 8001dec: f853 2022 ldr.w r2, [r3, r2, lsl #2] + 8001df0: 683b ldr r3, [r7, #0] + 8001df2: 601a str r2, [r3, #0] + + /* If ucNotifyValue is set then either the task never entered the + * blocked state (because a notification was already pending) or the + * task unblocked because of a notification. Otherwise the task + * unblocked because of a timeout. */ + if( pxCurrentTCB->ucNotifyState[ uxIndexToWait ] != taskNOTIFICATION_RECEIVED ) + 8001df4: 4b14 ldr r3, [pc, #80] ; (8001e48 ) + 8001df6: 681a ldr r2, [r3, #0] + 8001df8: 68fb ldr r3, [r7, #12] + 8001dfa: 4413 add r3, r2 + 8001dfc: 3354 adds r3, #84 ; 0x54 + 8001dfe: 781b ldrb r3, [r3, #0] + 8001e00: b2db uxtb r3, r3 + 8001e02: 2b02 cmp r3, #2 + 8001e04: d002 beq.n 8001e0c + { + /* A notification was not received. */ + xReturn = pdFALSE; + 8001e06: 2300 movs r3, #0 + 8001e08: 617b str r3, [r7, #20] + 8001e0a: e00e b.n 8001e2a + } + else + { + /* A notification was already pending or a notification was + * received while the task was waiting. */ + pxCurrentTCB->ulNotifiedValue[ uxIndexToWait ] &= ~ulBitsToClearOnExit; + 8001e0c: 4b0e ldr r3, [pc, #56] ; (8001e48 ) + 8001e0e: 681b ldr r3, [r3, #0] + 8001e10: 68fa ldr r2, [r7, #12] + 8001e12: 3214 adds r2, #20 + 8001e14: f853 1022 ldr.w r1, [r3, r2, lsl #2] + 8001e18: 687a ldr r2, [r7, #4] + 8001e1a: 43d2 mvns r2, r2 + 8001e1c: 4011 ands r1, r2 + 8001e1e: 68fa ldr r2, [r7, #12] + 8001e20: 3214 adds r2, #20 + 8001e22: f843 1022 str.w r1, [r3, r2, lsl #2] + xReturn = pdTRUE; + 8001e26: 2301 movs r3, #1 + 8001e28: 617b str r3, [r7, #20] + } + + pxCurrentTCB->ucNotifyState[ uxIndexToWait ] = taskNOT_WAITING_NOTIFICATION; + 8001e2a: 4b07 ldr r3, [pc, #28] ; (8001e48 ) + 8001e2c: 681a ldr r2, [r3, #0] + 8001e2e: 68fb ldr r3, [r7, #12] + 8001e30: 4413 add r3, r2 + 8001e32: 3354 adds r3, #84 ; 0x54 + 8001e34: 2200 movs r2, #0 + 8001e36: 701a strb r2, [r3, #0] + } + taskEXIT_CRITICAL(); + 8001e38: f000 ff40 bl 8002cbc + + return xReturn; + 8001e3c: 697b ldr r3, [r7, #20] + } + 8001e3e: 4618 mov r0, r3 + 8001e40: 3718 adds r7, #24 + 8001e42: 46bd mov sp, r7 + 8001e44: bd80 pop {r7, pc} + 8001e46: bf00 nop + 8001e48: 200001a0 .word 0x200001a0 + 8001e4c: e000ed04 .word 0xe000ed04 + +08001e50 : + BaseType_t xTaskGenericNotify( TaskHandle_t xTaskToNotify, + UBaseType_t uxIndexToNotify, + uint32_t ulValue, + eNotifyAction eAction, + uint32_t * pulPreviousNotificationValue ) + { + 8001e50: b580 push {r7, lr} + 8001e52: b08e sub sp, #56 ; 0x38 + 8001e54: af02 add r7, sp, #8 + 8001e56: 60f8 str r0, [r7, #12] + 8001e58: 60b9 str r1, [r7, #8] + 8001e5a: 607a str r2, [r7, #4] + 8001e5c: 70fb strb r3, [r7, #3] + TCB_t * pxTCB; + BaseType_t xReturn = pdPASS; + 8001e5e: 2301 movs r3, #1 + 8001e60: 62fb str r3, [r7, #44] ; 0x2c + uint8_t ucOriginalNotifyState; + + configASSERT( uxIndexToNotify < configTASK_NOTIFICATION_ARRAY_ENTRIES ); + 8001e62: 68bb ldr r3, [r7, #8] + 8001e64: 2b00 cmp r3, #0 + 8001e66: d009 beq.n 8001e7c + 8001e68: f04f 0350 mov.w r3, #80 ; 0x50 + 8001e6c: f383 8811 msr BASEPRI, r3 + 8001e70: f3bf 8f6f isb sy + 8001e74: f3bf 8f4f dsb sy + 8001e78: 623b str r3, [r7, #32] + 8001e7a: e7fe b.n 8001e7a + configASSERT( xTaskToNotify ); + 8001e7c: 68fb ldr r3, [r7, #12] + 8001e7e: 2b00 cmp r3, #0 + 8001e80: d109 bne.n 8001e96 + 8001e82: f04f 0350 mov.w r3, #80 ; 0x50 + 8001e86: f383 8811 msr BASEPRI, r3 + 8001e8a: f3bf 8f6f isb sy + 8001e8e: f3bf 8f4f dsb sy + 8001e92: 61fb str r3, [r7, #28] + 8001e94: e7fe b.n 8001e94 + pxTCB = xTaskToNotify; + 8001e96: 68fb ldr r3, [r7, #12] + 8001e98: 62bb str r3, [r7, #40] ; 0x28 + + taskENTER_CRITICAL(); + 8001e9a: f000 fee1 bl 8002c60 + { + if( pulPreviousNotificationValue != NULL ) + 8001e9e: 6bbb ldr r3, [r7, #56] ; 0x38 + 8001ea0: 2b00 cmp r3, #0 + 8001ea2: d006 beq.n 8001eb2 + { + *pulPreviousNotificationValue = pxTCB->ulNotifiedValue[ uxIndexToNotify ]; + 8001ea4: 6abb ldr r3, [r7, #40] ; 0x28 + 8001ea6: 68ba ldr r2, [r7, #8] + 8001ea8: 3214 adds r2, #20 + 8001eaa: f853 2022 ldr.w r2, [r3, r2, lsl #2] + 8001eae: 6bbb ldr r3, [r7, #56] ; 0x38 + 8001eb0: 601a str r2, [r3, #0] + } + + ucOriginalNotifyState = pxTCB->ucNotifyState[ uxIndexToNotify ]; + 8001eb2: 6aba ldr r2, [r7, #40] ; 0x28 + 8001eb4: 68bb ldr r3, [r7, #8] + 8001eb6: 4413 add r3, r2 + 8001eb8: 3354 adds r3, #84 ; 0x54 + 8001eba: 781b ldrb r3, [r3, #0] + 8001ebc: f887 3027 strb.w r3, [r7, #39] ; 0x27 + + pxTCB->ucNotifyState[ uxIndexToNotify ] = taskNOTIFICATION_RECEIVED; + 8001ec0: 6aba ldr r2, [r7, #40] ; 0x28 + 8001ec2: 68bb ldr r3, [r7, #8] + 8001ec4: 4413 add r3, r2 + 8001ec6: 3354 adds r3, #84 ; 0x54 + 8001ec8: 2202 movs r2, #2 + 8001eca: 701a strb r2, [r3, #0] + + switch( eAction ) + 8001ecc: 78fb ldrb r3, [r7, #3] + 8001ece: 2b04 cmp r3, #4 + 8001ed0: d83b bhi.n 8001f4a + 8001ed2: a201 add r2, pc, #4 ; (adr r2, 8001ed8 ) + 8001ed4: f852 f023 ldr.w pc, [r2, r3, lsl #2] + 8001ed8: 08001f67 .word 0x08001f67 + 8001edc: 08001eed .word 0x08001eed + 8001ee0: 08001f09 .word 0x08001f09 + 8001ee4: 08001f21 .word 0x08001f21 + 8001ee8: 08001f2f .word 0x08001f2f + { + case eSetBits: + pxTCB->ulNotifiedValue[ uxIndexToNotify ] |= ulValue; + 8001eec: 6abb ldr r3, [r7, #40] ; 0x28 + 8001eee: 68ba ldr r2, [r7, #8] + 8001ef0: 3214 adds r2, #20 + 8001ef2: f853 2022 ldr.w r2, [r3, r2, lsl #2] + 8001ef6: 687b ldr r3, [r7, #4] + 8001ef8: ea42 0103 orr.w r1, r2, r3 + 8001efc: 6abb ldr r3, [r7, #40] ; 0x28 + 8001efe: 68ba ldr r2, [r7, #8] + 8001f00: 3214 adds r2, #20 + 8001f02: f843 1022 str.w r1, [r3, r2, lsl #2] + break; + 8001f06: e031 b.n 8001f6c + + case eIncrement: + ( pxTCB->ulNotifiedValue[ uxIndexToNotify ] )++; + 8001f08: 6abb ldr r3, [r7, #40] ; 0x28 + 8001f0a: 68ba ldr r2, [r7, #8] + 8001f0c: 3214 adds r2, #20 + 8001f0e: f853 3022 ldr.w r3, [r3, r2, lsl #2] + 8001f12: 1c59 adds r1, r3, #1 + 8001f14: 6abb ldr r3, [r7, #40] ; 0x28 + 8001f16: 68ba ldr r2, [r7, #8] + 8001f18: 3214 adds r2, #20 + 8001f1a: f843 1022 str.w r1, [r3, r2, lsl #2] + break; + 8001f1e: e025 b.n 8001f6c + + case eSetValueWithOverwrite: + pxTCB->ulNotifiedValue[ uxIndexToNotify ] = ulValue; + 8001f20: 6abb ldr r3, [r7, #40] ; 0x28 + 8001f22: 68ba ldr r2, [r7, #8] + 8001f24: 3214 adds r2, #20 + 8001f26: 6879 ldr r1, [r7, #4] + 8001f28: f843 1022 str.w r1, [r3, r2, lsl #2] + break; + 8001f2c: e01e b.n 8001f6c + + case eSetValueWithoutOverwrite: + + if( ucOriginalNotifyState != taskNOTIFICATION_RECEIVED ) + 8001f2e: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 + 8001f32: 2b02 cmp r3, #2 + 8001f34: d006 beq.n 8001f44 + { + pxTCB->ulNotifiedValue[ uxIndexToNotify ] = ulValue; + 8001f36: 6abb ldr r3, [r7, #40] ; 0x28 + 8001f38: 68ba ldr r2, [r7, #8] + 8001f3a: 3214 adds r2, #20 + 8001f3c: 6879 ldr r1, [r7, #4] + 8001f3e: f843 1022 str.w r1, [r3, r2, lsl #2] + { + /* The value could not be written to the task. */ + xReturn = pdFAIL; + } + + break; + 8001f42: e013 b.n 8001f6c + xReturn = pdFAIL; + 8001f44: 2300 movs r3, #0 + 8001f46: 62fb str r3, [r7, #44] ; 0x2c + break; + 8001f48: e010 b.n 8001f6c + default: + + /* Should not get here if all enums are handled. + * Artificially force an assert by testing a value the + * compiler can't assume is const. */ + configASSERT( xTickCount == ( TickType_t ) 0 ); + 8001f4a: 4b33 ldr r3, [pc, #204] ; (8002018 ) + 8001f4c: 681b ldr r3, [r3, #0] + 8001f4e: 2b00 cmp r3, #0 + 8001f50: d00b beq.n 8001f6a + 8001f52: f04f 0350 mov.w r3, #80 ; 0x50 + 8001f56: f383 8811 msr BASEPRI, r3 + 8001f5a: f3bf 8f6f isb sy + 8001f5e: f3bf 8f4f dsb sy + 8001f62: 61bb str r3, [r7, #24] + 8001f64: e7fe b.n 8001f64 + break; + 8001f66: bf00 nop + 8001f68: e000 b.n 8001f6c + + break; + 8001f6a: bf00 nop + } + + traceTASK_NOTIFY( uxIndexToNotify ); + 8001f6c: 6abb ldr r3, [r7, #40] ; 0x28 + 8001f6e: 4618 mov r0, r3 + 8001f70: f002 feae bl 8004cd0 + 8001f74: 4601 mov r1, r0 + 8001f76: 78fa ldrb r2, [r7, #3] + 8001f78: 6bbb ldr r3, [r7, #56] ; 0x38 + 8001f7a: 9300 str r3, [sp, #0] + 8001f7c: 4613 mov r3, r2 + 8001f7e: 687a ldr r2, [r7, #4] + 8001f80: 203e movs r0, #62 ; 0x3e + 8001f82: f002 f8e3 bl 800414c + + /* If the task is in the blocked state specifically to wait for a + * notification then unblock it now. */ + if( ucOriginalNotifyState == taskWAITING_NOTIFICATION ) + 8001f86: f897 3027 ldrb.w r3, [r7, #39] ; 0x27 + 8001f8a: 2b01 cmp r3, #1 + 8001f8c: d13c bne.n 8002008 + { + ( void ) uxListRemove( &( pxTCB->xStateListItem ) ); + 8001f8e: 6abb ldr r3, [r7, #40] ; 0x28 + 8001f90: 3304 adds r3, #4 + 8001f92: 4618 mov r0, r3 + 8001f94: f7fe fa6e bl 8000474 + prvAddTaskToReadyList( pxTCB ); + 8001f98: 6abb ldr r3, [r7, #40] ; 0x28 + 8001f9a: 4618 mov r0, r3 + 8001f9c: f002 fdf6 bl 8004b8c + 8001fa0: 6abb ldr r3, [r7, #40] ; 0x28 + 8001fa2: 6adb ldr r3, [r3, #44] ; 0x2c + 8001fa4: 2201 movs r2, #1 + 8001fa6: 409a lsls r2, r3 + 8001fa8: 4b1c ldr r3, [pc, #112] ; (800201c ) + 8001faa: 681b ldr r3, [r3, #0] + 8001fac: 4313 orrs r3, r2 + 8001fae: 4a1b ldr r2, [pc, #108] ; (800201c ) + 8001fb0: 6013 str r3, [r2, #0] + 8001fb2: 6abb ldr r3, [r7, #40] ; 0x28 + 8001fb4: 6ada ldr r2, [r3, #44] ; 0x2c + 8001fb6: 4613 mov r3, r2 + 8001fb8: 009b lsls r3, r3, #2 + 8001fba: 4413 add r3, r2 + 8001fbc: 009b lsls r3, r3, #2 + 8001fbe: 4a18 ldr r2, [pc, #96] ; (8002020 ) + 8001fc0: 441a add r2, r3 + 8001fc2: 6abb ldr r3, [r7, #40] ; 0x28 + 8001fc4: 3304 adds r3, #4 + 8001fc6: 4619 mov r1, r3 + 8001fc8: 4610 mov r0, r2 + 8001fca: f7fe f9f6 bl 80003ba + + /* The task should not have been on an event list. */ + configASSERT( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) == NULL ); + 8001fce: 6abb ldr r3, [r7, #40] ; 0x28 + 8001fd0: 6a9b ldr r3, [r3, #40] ; 0x28 + 8001fd2: 2b00 cmp r3, #0 + 8001fd4: d009 beq.n 8001fea + 8001fd6: f04f 0350 mov.w r3, #80 ; 0x50 + 8001fda: f383 8811 msr BASEPRI, r3 + 8001fde: f3bf 8f6f isb sy + 8001fe2: f3bf 8f4f dsb sy + 8001fe6: 617b str r3, [r7, #20] + 8001fe8: e7fe b.n 8001fe8 + * earliest possible time. */ + prvResetNextTaskUnblockTime(); + } + #endif + + if( pxTCB->uxPriority > pxCurrentTCB->uxPriority ) + 8001fea: 6abb ldr r3, [r7, #40] ; 0x28 + 8001fec: 6ada ldr r2, [r3, #44] ; 0x2c + 8001fee: 4b0d ldr r3, [pc, #52] ; (8002024 ) + 8001ff0: 681b ldr r3, [r3, #0] + 8001ff2: 6adb ldr r3, [r3, #44] ; 0x2c + 8001ff4: 429a cmp r2, r3 + 8001ff6: d907 bls.n 8002008 + { + /* The notified task has a priority above the currently + * executing task so a yield is required. */ + taskYIELD_IF_USING_PREEMPTION(); + 8001ff8: 4b0b ldr r3, [pc, #44] ; (8002028 ) + 8001ffa: f04f 5280 mov.w r2, #268435456 ; 0x10000000 + 8001ffe: 601a str r2, [r3, #0] + 8002000: f3bf 8f4f dsb sy + 8002004: f3bf 8f6f isb sy + else + { + mtCOVERAGE_TEST_MARKER(); + } + } + taskEXIT_CRITICAL(); + 8002008: f000 fe58 bl 8002cbc + + return xReturn; + 800200c: 6afb ldr r3, [r7, #44] ; 0x2c + } + 800200e: 4618 mov r0, r3 + 8002010: 3730 adds r7, #48 ; 0x30 + 8002012: 46bd mov sp, r7 + 8002014: bd80 pop {r7, pc} + 8002016: bf00 nop + 8002018: 2000027c .word 0x2000027c + 800201c: 20000280 .word 0x20000280 + 8002020: 200001a4 .word 0x200001a4 + 8002024: 200001a0 .word 0x200001a0 + 8002028: e000ed04 .word 0xe000ed04 + +0800202c : + UBaseType_t uxIndexToNotify, + uint32_t ulValue, + eNotifyAction eAction, + uint32_t * pulPreviousNotificationValue, + BaseType_t * pxHigherPriorityTaskWoken ) + { + 800202c: b580 push {r7, lr} + 800202e: b092 sub sp, #72 ; 0x48 + 8002030: af02 add r7, sp, #8 + 8002032: 60f8 str r0, [r7, #12] + 8002034: 60b9 str r1, [r7, #8] + 8002036: 607a str r2, [r7, #4] + 8002038: 70fb strb r3, [r7, #3] + TCB_t * pxTCB; + uint8_t ucOriginalNotifyState; + BaseType_t xReturn = pdPASS; + 800203a: 2301 movs r3, #1 + 800203c: 63fb str r3, [r7, #60] ; 0x3c + UBaseType_t uxSavedInterruptStatus; + + configASSERT( xTaskToNotify ); + 800203e: 68fb ldr r3, [r7, #12] + 8002040: 2b00 cmp r3, #0 + 8002042: d109 bne.n 8002058 + 8002044: f04f 0350 mov.w r3, #80 ; 0x50 + 8002048: f383 8811 msr BASEPRI, r3 + 800204c: f3bf 8f6f isb sy + 8002050: f3bf 8f4f dsb sy + 8002054: 62fb str r3, [r7, #44] ; 0x2c + 8002056: e7fe b.n 8002056 + configASSERT( uxIndexToNotify < configTASK_NOTIFICATION_ARRAY_ENTRIES ); + 8002058: 68bb ldr r3, [r7, #8] + 800205a: 2b00 cmp r3, #0 + 800205c: d009 beq.n 8002072 + 800205e: f04f 0350 mov.w r3, #80 ; 0x50 + 8002062: f383 8811 msr BASEPRI, r3 + 8002066: f3bf 8f6f isb sy + 800206a: f3bf 8f4f dsb sy + 800206e: 62bb str r3, [r7, #40] ; 0x28 + 8002070: e7fe b.n 8002070 + * below the maximum system call interrupt priority. FreeRTOS maintains a + * separate interrupt safe API to ensure interrupt entry is as fast and as + * simple as possible. More information (albeit Cortex-M specific) is + * provided on the following link: + * https://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html */ + portASSERT_IF_INTERRUPT_PRIORITY_INVALID(); + 8002072: f000 fed9 bl 8002e28 + + pxTCB = xTaskToNotify; + 8002076: 68fb ldr r3, [r7, #12] + 8002078: 63bb str r3, [r7, #56] ; 0x38 + __asm volatile + 800207a: f3ef 8211 mrs r2, BASEPRI + 800207e: f04f 0350 mov.w r3, #80 ; 0x50 + 8002082: f383 8811 msr BASEPRI, r3 + 8002086: f3bf 8f6f isb sy + 800208a: f3bf 8f4f dsb sy + 800208e: 627a str r2, [r7, #36] ; 0x24 + 8002090: 623b str r3, [r7, #32] + return ulOriginalBASEPRI; + 8002092: 6a7b ldr r3, [r7, #36] ; 0x24 + + uxSavedInterruptStatus = portSET_INTERRUPT_MASK_FROM_ISR(); + 8002094: 637b str r3, [r7, #52] ; 0x34 + { + if( pulPreviousNotificationValue != NULL ) + 8002096: 6cbb ldr r3, [r7, #72] ; 0x48 + 8002098: 2b00 cmp r3, #0 + 800209a: d006 beq.n 80020aa + { + *pulPreviousNotificationValue = pxTCB->ulNotifiedValue[ uxIndexToNotify ]; + 800209c: 6bbb ldr r3, [r7, #56] ; 0x38 + 800209e: 68ba ldr r2, [r7, #8] + 80020a0: 3214 adds r2, #20 + 80020a2: f853 2022 ldr.w r2, [r3, r2, lsl #2] + 80020a6: 6cbb ldr r3, [r7, #72] ; 0x48 + 80020a8: 601a str r2, [r3, #0] + } + + ucOriginalNotifyState = pxTCB->ucNotifyState[ uxIndexToNotify ]; + 80020aa: 6bba ldr r2, [r7, #56] ; 0x38 + 80020ac: 68bb ldr r3, [r7, #8] + 80020ae: 4413 add r3, r2 + 80020b0: 3354 adds r3, #84 ; 0x54 + 80020b2: 781b ldrb r3, [r3, #0] + 80020b4: f887 3033 strb.w r3, [r7, #51] ; 0x33 + pxTCB->ucNotifyState[ uxIndexToNotify ] = taskNOTIFICATION_RECEIVED; + 80020b8: 6bba ldr r2, [r7, #56] ; 0x38 + 80020ba: 68bb ldr r3, [r7, #8] + 80020bc: 4413 add r3, r2 + 80020be: 3354 adds r3, #84 ; 0x54 + 80020c0: 2202 movs r2, #2 + 80020c2: 701a strb r2, [r3, #0] + + switch( eAction ) + 80020c4: 78fb ldrb r3, [r7, #3] + 80020c6: 2b04 cmp r3, #4 + 80020c8: d83b bhi.n 8002142 + 80020ca: a201 add r2, pc, #4 ; (adr r2, 80020d0 ) + 80020cc: f852 f023 ldr.w pc, [r2, r3, lsl #2] + 80020d0: 0800215f .word 0x0800215f + 80020d4: 080020e5 .word 0x080020e5 + 80020d8: 08002101 .word 0x08002101 + 80020dc: 08002119 .word 0x08002119 + 80020e0: 08002127 .word 0x08002127 + { + case eSetBits: + pxTCB->ulNotifiedValue[ uxIndexToNotify ] |= ulValue; + 80020e4: 6bbb ldr r3, [r7, #56] ; 0x38 + 80020e6: 68ba ldr r2, [r7, #8] + 80020e8: 3214 adds r2, #20 + 80020ea: f853 2022 ldr.w r2, [r3, r2, lsl #2] + 80020ee: 687b ldr r3, [r7, #4] + 80020f0: ea42 0103 orr.w r1, r2, r3 + 80020f4: 6bbb ldr r3, [r7, #56] ; 0x38 + 80020f6: 68ba ldr r2, [r7, #8] + 80020f8: 3214 adds r2, #20 + 80020fa: f843 1022 str.w r1, [r3, r2, lsl #2] + break; + 80020fe: e031 b.n 8002164 + + case eIncrement: + ( pxTCB->ulNotifiedValue[ uxIndexToNotify ] )++; + 8002100: 6bbb ldr r3, [r7, #56] ; 0x38 + 8002102: 68ba ldr r2, [r7, #8] + 8002104: 3214 adds r2, #20 + 8002106: f853 3022 ldr.w r3, [r3, r2, lsl #2] + 800210a: 1c59 adds r1, r3, #1 + 800210c: 6bbb ldr r3, [r7, #56] ; 0x38 + 800210e: 68ba ldr r2, [r7, #8] + 8002110: 3214 adds r2, #20 + 8002112: f843 1022 str.w r1, [r3, r2, lsl #2] + break; + 8002116: e025 b.n 8002164 + + case eSetValueWithOverwrite: + pxTCB->ulNotifiedValue[ uxIndexToNotify ] = ulValue; + 8002118: 6bbb ldr r3, [r7, #56] ; 0x38 + 800211a: 68ba ldr r2, [r7, #8] + 800211c: 3214 adds r2, #20 + 800211e: 6879 ldr r1, [r7, #4] + 8002120: f843 1022 str.w r1, [r3, r2, lsl #2] + break; + 8002124: e01e b.n 8002164 + + case eSetValueWithoutOverwrite: + + if( ucOriginalNotifyState != taskNOTIFICATION_RECEIVED ) + 8002126: f897 3033 ldrb.w r3, [r7, #51] ; 0x33 + 800212a: 2b02 cmp r3, #2 + 800212c: d006 beq.n 800213c + { + pxTCB->ulNotifiedValue[ uxIndexToNotify ] = ulValue; + 800212e: 6bbb ldr r3, [r7, #56] ; 0x38 + 8002130: 68ba ldr r2, [r7, #8] + 8002132: 3214 adds r2, #20 + 8002134: 6879 ldr r1, [r7, #4] + 8002136: f843 1022 str.w r1, [r3, r2, lsl #2] + { + /* The value could not be written to the task. */ + xReturn = pdFAIL; + } + + break; + 800213a: e013 b.n 8002164 + xReturn = pdFAIL; + 800213c: 2300 movs r3, #0 + 800213e: 63fb str r3, [r7, #60] ; 0x3c + break; + 8002140: e010 b.n 8002164 + default: + + /* Should not get here if all enums are handled. + * Artificially force an assert by testing a value the + * compiler can't assume is const. */ + configASSERT( xTickCount == ( TickType_t ) 0 ); + 8002142: 4b3b ldr r3, [pc, #236] ; (8002230 ) + 8002144: 681b ldr r3, [r3, #0] + 8002146: 2b00 cmp r3, #0 + 8002148: d00b beq.n 8002162 + __asm volatile + 800214a: f04f 0350 mov.w r3, #80 ; 0x50 + 800214e: f383 8811 msr BASEPRI, r3 + 8002152: f3bf 8f6f isb sy + 8002156: f3bf 8f4f dsb sy + 800215a: 61fb str r3, [r7, #28] + 800215c: e7fe b.n 800215c + break; + 800215e: bf00 nop + 8002160: e000 b.n 8002164 + break; + 8002162: bf00 nop + } + + traceTASK_NOTIFY_FROM_ISR( uxIndexToNotify ); + 8002164: 6bbb ldr r3, [r7, #56] ; 0x38 + 8002166: 4618 mov r0, r3 + 8002168: f002 fdb2 bl 8004cd0 + 800216c: 78f9 ldrb r1, [r7, #3] + 800216e: 6cbb ldr r3, [r7, #72] ; 0x48 + 8002170: 6cfa ldr r2, [r7, #76] ; 0x4c + 8002172: 9201 str r2, [sp, #4] + 8002174: 9300 str r3, [sp, #0] + 8002176: 460b mov r3, r1 + 8002178: 687a ldr r2, [r7, #4] + 800217a: 4601 mov r1, r0 + 800217c: 203f movs r0, #63 ; 0x3f + 800217e: f002 f877 bl 8004270 + + /* If the task is in the blocked state specifically to wait for a + * notification then unblock it now. */ + if( ucOriginalNotifyState == taskWAITING_NOTIFICATION ) + 8002182: f897 3033 ldrb.w r3, [r7, #51] ; 0x33 + 8002186: 2b01 cmp r3, #1 + 8002188: d148 bne.n 800221c + { + /* The task should not have been on an event list. */ + configASSERT( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) == NULL ); + 800218a: 6bbb ldr r3, [r7, #56] ; 0x38 + 800218c: 6a9b ldr r3, [r3, #40] ; 0x28 + 800218e: 2b00 cmp r3, #0 + 8002190: d009 beq.n 80021a6 + 8002192: f04f 0350 mov.w r3, #80 ; 0x50 + 8002196: f383 8811 msr BASEPRI, r3 + 800219a: f3bf 8f6f isb sy + 800219e: f3bf 8f4f dsb sy + 80021a2: 61bb str r3, [r7, #24] + 80021a4: e7fe b.n 80021a4 + + if( uxSchedulerSuspended == ( UBaseType_t ) pdFALSE ) + 80021a6: 4b23 ldr r3, [pc, #140] ; (8002234 ) + 80021a8: 681b ldr r3, [r3, #0] + 80021aa: 2b00 cmp r3, #0 + 80021ac: d120 bne.n 80021f0 + { + ( void ) uxListRemove( &( pxTCB->xStateListItem ) ); + 80021ae: 6bbb ldr r3, [r7, #56] ; 0x38 + 80021b0: 3304 adds r3, #4 + 80021b2: 4618 mov r0, r3 + 80021b4: f7fe f95e bl 8000474 + prvAddTaskToReadyList( pxTCB ); + 80021b8: 6bbb ldr r3, [r7, #56] ; 0x38 + 80021ba: 4618 mov r0, r3 + 80021bc: f002 fce6 bl 8004b8c + 80021c0: 6bbb ldr r3, [r7, #56] ; 0x38 + 80021c2: 6adb ldr r3, [r3, #44] ; 0x2c + 80021c4: 2201 movs r2, #1 + 80021c6: 409a lsls r2, r3 + 80021c8: 4b1b ldr r3, [pc, #108] ; (8002238 ) + 80021ca: 681b ldr r3, [r3, #0] + 80021cc: 4313 orrs r3, r2 + 80021ce: 4a1a ldr r2, [pc, #104] ; (8002238 ) + 80021d0: 6013 str r3, [r2, #0] + 80021d2: 6bbb ldr r3, [r7, #56] ; 0x38 + 80021d4: 6ada ldr r2, [r3, #44] ; 0x2c + 80021d6: 4613 mov r3, r2 + 80021d8: 009b lsls r3, r3, #2 + 80021da: 4413 add r3, r2 + 80021dc: 009b lsls r3, r3, #2 + 80021de: 4a17 ldr r2, [pc, #92] ; (800223c ) + 80021e0: 441a add r2, r3 + 80021e2: 6bbb ldr r3, [r7, #56] ; 0x38 + 80021e4: 3304 adds r3, #4 + 80021e6: 4619 mov r1, r3 + 80021e8: 4610 mov r0, r2 + 80021ea: f7fe f8e6 bl 80003ba + 80021ee: e005 b.n 80021fc + } + else + { + /* The delayed and ready lists cannot be accessed, so hold + * this task pending until the scheduler is resumed. */ + vListInsertEnd( &( xPendingReadyList ), &( pxTCB->xEventListItem ) ); + 80021f0: 6bbb ldr r3, [r7, #56] ; 0x38 + 80021f2: 3318 adds r3, #24 + 80021f4: 4619 mov r1, r3 + 80021f6: 4812 ldr r0, [pc, #72] ; (8002240 ) + 80021f8: f7fe f8df bl 80003ba + } + + if( pxTCB->uxPriority > pxCurrentTCB->uxPriority ) + 80021fc: 6bbb ldr r3, [r7, #56] ; 0x38 + 80021fe: 6ada ldr r2, [r3, #44] ; 0x2c + 8002200: 4b10 ldr r3, [pc, #64] ; (8002244 ) + 8002202: 681b ldr r3, [r3, #0] + 8002204: 6adb ldr r3, [r3, #44] ; 0x2c + 8002206: 429a cmp r2, r3 + 8002208: d908 bls.n 800221c + { + /* The notified task has a priority above the currently + * executing task so a yield is required. */ + if( pxHigherPriorityTaskWoken != NULL ) + 800220a: 6cfb ldr r3, [r7, #76] ; 0x4c + 800220c: 2b00 cmp r3, #0 + 800220e: d002 beq.n 8002216 + { + *pxHigherPriorityTaskWoken = pdTRUE; + 8002210: 6cfb ldr r3, [r7, #76] ; 0x4c + 8002212: 2201 movs r2, #1 + 8002214: 601a str r2, [r3, #0] + } + + /* Mark that a yield is pending in case the user is not + * using the "xHigherPriorityTaskWoken" parameter to an ISR + * safe FreeRTOS function. */ + xYieldPending = pdTRUE; + 8002216: 4b0c ldr r3, [pc, #48] ; (8002248 ) + 8002218: 2201 movs r2, #1 + 800221a: 601a str r2, [r3, #0] + 800221c: 6b7b ldr r3, [r7, #52] ; 0x34 + 800221e: 617b str r3, [r7, #20] + __asm volatile + 8002220: 697b ldr r3, [r7, #20] + 8002222: f383 8811 msr BASEPRI, r3 + } + } + } + portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ); + + return xReturn; + 8002226: 6bfb ldr r3, [r7, #60] ; 0x3c } - 8001934: 4618 mov r0, r3 - 8001936: 3718 adds r7, #24 - 8001938: 46bd mov sp, r7 - 800193a: bd80 pop {r7, pc} - 800193c: 2000004c .word 0x2000004c - 8001940: 2000012c .word 0x2000012c - 8001944: 20000050 .word 0x20000050 - -08001948 : + 8002228: 4618 mov r0, r3 + 800222a: 3740 adds r7, #64 ; 0x40 + 800222c: 46bd mov sp, r7 + 800222e: bd80 pop {r7, pc} + 8002230: 2000027c .word 0x2000027c + 8002234: 200002a0 .word 0x200002a0 + 8002238: 20000280 .word 0x20000280 + 800223c: 200001a4 .word 0x200001a4 + 8002240: 20000238 .word 0x20000238 + 8002244: 200001a0 .word 0x200001a0 + 8002248: 2000028c .word 0x2000028c + +0800224c : #endif /*-----------------------------------------------------------*/ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, const BaseType_t xCanBlockIndefinitely ) { - 8001948: b580 push {r7, lr} - 800194a: b084 sub sp, #16 - 800194c: af00 add r7, sp, #0 - 800194e: 6078 str r0, [r7, #4] - 8001950: 6039 str r1, [r7, #0] + 800224c: b580 push {r7, lr} + 800224e: b084 sub sp, #16 + 8002250: af00 add r7, sp, #0 + 8002252: 6078 str r0, [r7, #4] + 8002254: 6039 str r1, [r7, #0] TickType_t xTimeToWake; const TickType_t xConstTickCount = xTickCount; - 8001952: 4b29 ldr r3, [pc, #164] ; (80019f8 ) - 8001954: 681b ldr r3, [r3, #0] - 8001956: 60fb str r3, [r7, #12] + 8002256: 4b32 ldr r3, [pc, #200] ; (8002320 ) + 8002258: 681b ldr r3, [r3, #0] + 800225a: 60fb str r3, [r7, #12] } #endif /* Remove the task from the ready list before adding it to the blocked list * as the same list item is used for both lists. */ if( uxListRemove( &( pxCurrentTCB->xStateListItem ) ) == ( UBaseType_t ) 0 ) - 8001958: 4b28 ldr r3, [pc, #160] ; (80019fc ) - 800195a: 681b ldr r3, [r3, #0] - 800195c: 3304 adds r3, #4 - 800195e: 4618 mov r0, r3 - 8001960: f7fe fce8 bl 8000334 - 8001964: 4603 mov r3, r0 - 8001966: 2b00 cmp r3, #0 - 8001968: d10b bne.n 8001982 + 800225c: 4b31 ldr r3, [pc, #196] ; (8002324 ) + 800225e: 681b ldr r3, [r3, #0] + 8002260: 3304 adds r3, #4 + 8002262: 4618 mov r0, r3 + 8002264: f7fe f906 bl 8000474 + 8002268: 4603 mov r3, r0 + 800226a: 2b00 cmp r3, #0 + 800226c: d10b bne.n 8002286 { /* The current task must be in a ready list, so there is no need to * check, and the port reset macro can be called directly. */ portRESET_READY_PRIORITY( pxCurrentTCB->uxPriority, uxTopReadyPriority ); /*lint !e931 pxCurrentTCB cannot change as it is the calling task. pxCurrentTCB->uxPriority and uxTopReadyPriority cannot change as called with scheduler suspended or in a critical section. */ - 800196a: 4b24 ldr r3, [pc, #144] ; (80019fc ) - 800196c: 681b ldr r3, [r3, #0] - 800196e: 6adb ldr r3, [r3, #44] ; 0x2c - 8001970: 2201 movs r2, #1 - 8001972: fa02 f303 lsl.w r3, r2, r3 - 8001976: 43da mvns r2, r3 - 8001978: 4b21 ldr r3, [pc, #132] ; (8001a00 ) - 800197a: 681b ldr r3, [r3, #0] - 800197c: 4013 ands r3, r2 - 800197e: 4a20 ldr r2, [pc, #128] ; (8001a00 ) - 8001980: 6013 str r3, [r2, #0] + 800226e: 4b2d ldr r3, [pc, #180] ; (8002324 ) + 8002270: 681b ldr r3, [r3, #0] + 8002272: 6adb ldr r3, [r3, #44] ; 0x2c + 8002274: 2201 movs r2, #1 + 8002276: fa02 f303 lsl.w r3, r2, r3 + 800227a: 43da mvns r2, r3 + 800227c: 4b2a ldr r3, [pc, #168] ; (8002328 ) + 800227e: 681b ldr r3, [r3, #0] + 8002280: 4013 ands r3, r2 + 8002282: 4a29 ldr r2, [pc, #164] ; (8002328 ) + 8002284: 6013 str r3, [r2, #0] mtCOVERAGE_TEST_MARKER(); } #if ( INCLUDE_vTaskSuspend == 1 ) { if( ( xTicksToWait == portMAX_DELAY ) && ( xCanBlockIndefinitely != pdFALSE ) ) - 8001982: 687b ldr r3, [r7, #4] - 8001984: f1b3 3fff cmp.w r3, #4294967295 ; 0xffffffff - 8001988: d10a bne.n 80019a0 - 800198a: 683b ldr r3, [r7, #0] - 800198c: 2b00 cmp r3, #0 - 800198e: d007 beq.n 80019a0 + 8002286: 687b ldr r3, [r7, #4] + 8002288: f1b3 3fff cmp.w r3, #4294967295 ; 0xffffffff + 800228c: d110 bne.n 80022b0 + 800228e: 683b ldr r3, [r7, #0] + 8002290: 2b00 cmp r3, #0 + 8002292: d00d beq.n 80022b0 { /* Add the task to the suspended task list instead of a delayed task * list to ensure it is not woken by a timing event. It will block * indefinitely. */ - vListInsertEnd( &xSuspendedTaskList, &( pxCurrentTCB->xStateListItem ) ); - 8001990: 4b1a ldr r3, [pc, #104] ; (80019fc ) - 8001992: 681b ldr r3, [r3, #0] - 8001994: 3304 adds r3, #4 - 8001996: 4619 mov r1, r3 - 8001998: 481a ldr r0, [pc, #104] ; (8001a04 ) - 800199a: f7fe fc6e bl 800027a + traceMOVED_TASK_TO_SUSPENDED_LIST(pxCurrentTCB); + 8002294: 4b23 ldr r3, [pc, #140] ; (8002324 ) + 8002296: 681b ldr r3, [r3, #0] + 8002298: 211b movs r1, #27 + 800229a: 4618 mov r0, r3 + 800229c: f002 fcb8 bl 8004c10 + vListInsertEnd( &xSuspendedTaskList, &( pxCurrentTCB->xStateListItem ) ); + 80022a0: 4b20 ldr r3, [pc, #128] ; (8002324 ) + 80022a2: 681b ldr r3, [r3, #0] + 80022a4: 3304 adds r3, #4 + 80022a6: 4619 mov r1, r3 + 80022a8: 4820 ldr r0, [pc, #128] ; (800232c ) + 80022aa: f7fe f886 bl 80003ba /* Avoid compiler warning when INCLUDE_vTaskSuspend is not 1. */ ( void ) xCanBlockIndefinitely; } #endif /* INCLUDE_vTaskSuspend */ } - 800199e: e026 b.n 80019ee + 80022ae: e032 b.n 8002316 xTimeToWake = xConstTickCount + xTicksToWait; - 80019a0: 68fa ldr r2, [r7, #12] - 80019a2: 687b ldr r3, [r7, #4] - 80019a4: 4413 add r3, r2 - 80019a6: 60bb str r3, [r7, #8] + 80022b0: 68fa ldr r2, [r7, #12] + 80022b2: 687b ldr r3, [r7, #4] + 80022b4: 4413 add r3, r2 + 80022b6: 60bb str r3, [r7, #8] listSET_LIST_ITEM_VALUE( &( pxCurrentTCB->xStateListItem ), xTimeToWake ); - 80019a8: 4b14 ldr r3, [pc, #80] ; (80019fc ) - 80019aa: 681b ldr r3, [r3, #0] - 80019ac: 68ba ldr r2, [r7, #8] - 80019ae: 605a str r2, [r3, #4] + 80022b8: 4b1a ldr r3, [pc, #104] ; (8002324 ) + 80022ba: 681b ldr r3, [r3, #0] + 80022bc: 68ba ldr r2, [r7, #8] + 80022be: 605a str r2, [r3, #4] if( xTimeToWake < xConstTickCount ) - 80019b0: 68ba ldr r2, [r7, #8] - 80019b2: 68fb ldr r3, [r7, #12] - 80019b4: 429a cmp r2, r3 - 80019b6: d209 bcs.n 80019cc - vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); - 80019b8: 4b13 ldr r3, [pc, #76] ; (8001a08 ) - 80019ba: 681a ldr r2, [r3, #0] - 80019bc: 4b0f ldr r3, [pc, #60] ; (80019fc ) - 80019be: 681b ldr r3, [r3, #0] - 80019c0: 3304 adds r3, #4 - 80019c2: 4619 mov r1, r3 - 80019c4: 4610 mov r0, r2 - 80019c6: f7fe fc7c bl 80002c2 -} - 80019ca: e010 b.n 80019ee + 80022c0: 68ba ldr r2, [r7, #8] + 80022c2: 68fb ldr r3, [r7, #12] + 80022c4: 429a cmp r2, r3 + 80022c6: d20f bcs.n 80022e8 + traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST(); + 80022c8: 4b16 ldr r3, [pc, #88] ; (8002324 ) + 80022ca: 681b ldr r3, [r3, #0] + 80022cc: 2104 movs r1, #4 + 80022ce: 4618 mov r0, r3 + 80022d0: f002 fc9e bl 8004c10 + vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); + 80022d4: 4b16 ldr r3, [pc, #88] ; (8002330 ) + 80022d6: 681a ldr r2, [r3, #0] + 80022d8: 4b12 ldr r3, [pc, #72] ; (8002324 ) + 80022da: 681b ldr r3, [r3, #0] + 80022dc: 3304 adds r3, #4 + 80022de: 4619 mov r1, r3 + 80022e0: 4610 mov r0, r2 + 80022e2: f7fe f88e bl 8000402 +} + 80022e6: e016 b.n 8002316 + traceMOVED_TASK_TO_DELAYED_LIST(); + 80022e8: 4b0e ldr r3, [pc, #56] ; (8002324 ) + 80022ea: 681b ldr r3, [r3, #0] + 80022ec: 2104 movs r1, #4 + 80022ee: 4618 mov r0, r3 + 80022f0: f002 fc8e bl 8004c10 vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); - 80019cc: 4b0f ldr r3, [pc, #60] ; (8001a0c ) - 80019ce: 681a ldr r2, [r3, #0] - 80019d0: 4b0a ldr r3, [pc, #40] ; (80019fc ) - 80019d2: 681b ldr r3, [r3, #0] - 80019d4: 3304 adds r3, #4 - 80019d6: 4619 mov r1, r3 - 80019d8: 4610 mov r0, r2 - 80019da: f7fe fc72 bl 80002c2 + 80022f4: 4b0f ldr r3, [pc, #60] ; (8002334 ) + 80022f6: 681a ldr r2, [r3, #0] + 80022f8: 4b0a ldr r3, [pc, #40] ; (8002324 ) + 80022fa: 681b ldr r3, [r3, #0] + 80022fc: 3304 adds r3, #4 + 80022fe: 4619 mov r1, r3 + 8002300: 4610 mov r0, r2 + 8002302: f7fe f87e bl 8000402 if( xTimeToWake < xNextTaskUnblockTime ) - 80019de: 4b0c ldr r3, [pc, #48] ; (8001a10 ) - 80019e0: 681b ldr r3, [r3, #0] - 80019e2: 68ba ldr r2, [r7, #8] - 80019e4: 429a cmp r2, r3 - 80019e6: d202 bcs.n 80019ee + 8002306: 4b0c ldr r3, [pc, #48] ; (8002338 ) + 8002308: 681b ldr r3, [r3, #0] + 800230a: 68ba ldr r2, [r7, #8] + 800230c: 429a cmp r2, r3 + 800230e: d202 bcs.n 8002316 xNextTaskUnblockTime = xTimeToWake; - 80019e8: 4a09 ldr r2, [pc, #36] ; (8001a10 ) - 80019ea: 68bb ldr r3, [r7, #8] - 80019ec: 6013 str r3, [r2, #0] -} - 80019ee: bf00 nop - 80019f0: 3710 adds r7, #16 - 80019f2: 46bd mov sp, r7 - 80019f4: bd80 pop {r7, pc} - 80019f6: bf00 nop - 80019f8: 20000128 .word 0x20000128 - 80019fc: 2000004c .word 0x2000004c - 8001a00: 2000012c .word 0x2000012c - 8001a04: 20000110 .word 0x20000110 - 8001a08: 200000e0 .word 0x200000e0 - 8001a0c: 200000dc .word 0x200000dc - 8001a10: 20000144 .word 0x20000144 - -08001a14 : + 8002310: 4a09 ldr r2, [pc, #36] ; (8002338 ) + 8002312: 68bb ldr r3, [r7, #8] + 8002314: 6013 str r3, [r2, #0] +} + 8002316: bf00 nop + 8002318: 3710 adds r7, #16 + 800231a: 46bd mov sp, r7 + 800231c: bd80 pop {r7, pc} + 800231e: bf00 nop + 8002320: 2000027c .word 0x2000027c + 8002324: 200001a0 .word 0x200001a0 + 8002328: 20000280 .word 0x20000280 + 800232c: 20000264 .word 0x20000264 + 8002330: 20000234 .word 0x20000234 + 8002334: 20000230 .word 0x20000230 + 8002338: 20000298 .word 0x20000298 + +0800233c : TimerCallbackFunction_t pxCallbackFunction, Timer_t * pxNewTimer ) PRIVILEGED_FUNCTION; /*-----------------------------------------------------------*/ BaseType_t xTimerCreateTimerTask( void ) { - 8001a14: b580 push {r7, lr} - 8001a16: b084 sub sp, #16 - 8001a18: af02 add r7, sp, #8 + 800233c: b580 push {r7, lr} + 800233e: b084 sub sp, #16 + 8002340: af02 add r7, sp, #8 BaseType_t xReturn = pdFAIL; - 8001a1a: 2300 movs r3, #0 - 8001a1c: 607b str r3, [r7, #4] + 8002342: 2300 movs r3, #0 + 8002344: 607b str r3, [r7, #4] /* This function is called when the scheduler is started if * configUSE_TIMERS is set to 1. Check that the infrastructure used by the * timer service task has been created/initialised. If timers have already * been created then the initialisation will already have been performed. */ prvCheckForValidListAndQueue(); - 8001a1e: f000 fad1 bl 8001fc4 + 8002346: f000 fb2d bl 80029a4 if( xTimerQueue != NULL ) - 8001a22: 4b11 ldr r3, [pc, #68] ; (8001a68 ) - 8001a24: 681b ldr r3, [r3, #0] - 8001a26: 2b00 cmp r3, #0 - 8001a28: d00b beq.n 8001a42 + 800234a: 4b11 ldr r3, [pc, #68] ; (8002390 ) + 800234c: 681b ldr r3, [r3, #0] + 800234e: 2b00 cmp r3, #0 + 8002350: d00b beq.n 800236a xReturn = pdPASS; } } #else /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */ { xReturn = xTaskCreate( prvTimerTask, - 8001a2a: 4b10 ldr r3, [pc, #64] ; (8001a6c ) - 8001a2c: 9301 str r3, [sp, #4] - 8001a2e: 2302 movs r3, #2 - 8001a30: 9300 str r3, [sp, #0] - 8001a32: 2300 movs r3, #0 - 8001a34: f44f 7282 mov.w r2, #260 ; 0x104 - 8001a38: 490d ldr r1, [pc, #52] ; (8001a70 ) - 8001a3a: 480e ldr r0, [pc, #56] ; (8001a74 ) - 8001a3c: f7ff f974 bl 8000d28 - 8001a40: 6078 str r0, [r7, #4] + 8002352: 4b10 ldr r3, [pc, #64] ; (8002394 ) + 8002354: 9301 str r3, [sp, #4] + 8002356: 2302 movs r3, #2 + 8002358: 9300 str r3, [sp, #0] + 800235a: 2300 movs r3, #0 + 800235c: f44f 7282 mov.w r2, #260 ; 0x104 + 8002360: 490d ldr r1, [pc, #52] ; (8002398 ) + 8002362: 480e ldr r0, [pc, #56] ; (800239c ) + 8002364: f7fe fe02 bl 8000f6c + 8002368: 6078 str r0, [r7, #4] else { mtCOVERAGE_TEST_MARKER(); } configASSERT( xReturn ); - 8001a42: 687b ldr r3, [r7, #4] - 8001a44: 2b00 cmp r3, #0 - 8001a46: d109 bne.n 8001a5c - 8001a48: f04f 0350 mov.w r3, #80 ; 0x50 - 8001a4c: f383 8811 msr BASEPRI, r3 - 8001a50: f3bf 8f6f isb sy - 8001a54: f3bf 8f4f dsb sy - 8001a58: 603b str r3, [r7, #0] - 8001a5a: e7fe b.n 8001a5a + 800236a: 687b ldr r3, [r7, #4] + 800236c: 2b00 cmp r3, #0 + 800236e: d109 bne.n 8002384 + __asm volatile + 8002370: f04f 0350 mov.w r3, #80 ; 0x50 + 8002374: f383 8811 msr BASEPRI, r3 + 8002378: f3bf 8f6f isb sy + 800237c: f3bf 8f4f dsb sy + 8002380: 603b str r3, [r7, #0] + 8002382: e7fe b.n 8002382 return xReturn; - 8001a5c: 687b ldr r3, [r7, #4] + 8002384: 687b ldr r3, [r7, #4] + } + 8002386: 4618 mov r0, r3 + 8002388: 3708 adds r7, #8 + 800238a: 46bd mov sp, r7 + 800238c: bd80 pop {r7, pc} + 800238e: bf00 nop + 8002390: 200002d4 .word 0x200002d4 + 8002394: 200002d8 .word 0x200002d8 + 8002398: 08006bc4 .word 0x08006bc4 + 800239c: 08002589 .word 0x08002589 + +080023a0 : + TimerHandle_t xTimerCreate( const char * const pcTimerName, /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ + const TickType_t xTimerPeriodInTicks, + const UBaseType_t uxAutoReload, + void * const pvTimerID, + TimerCallbackFunction_t pxCallbackFunction ) + { + 80023a0: b580 push {r7, lr} + 80023a2: b088 sub sp, #32 + 80023a4: af02 add r7, sp, #8 + 80023a6: 60f8 str r0, [r7, #12] + 80023a8: 60b9 str r1, [r7, #8] + 80023aa: 607a str r2, [r7, #4] + 80023ac: 603b str r3, [r7, #0] + Timer_t * pxNewTimer; + + pxNewTimer = ( Timer_t * ) pvPortMalloc( sizeof( Timer_t ) ); /*lint !e9087 !e9079 All values returned by pvPortMalloc() have at least the alignment required by the MCU's stack, and the first member of Timer_t is always a pointer to the timer's mame. */ + 80023ae: 202c movs r0, #44 ; 0x2c + 80023b0: f000 fd78 bl 8002ea4 + 80023b4: 6178 str r0, [r7, #20] + + if( pxNewTimer != NULL ) + 80023b6: 697b ldr r3, [r7, #20] + 80023b8: 2b00 cmp r3, #0 + 80023ba: d00d beq.n 80023d8 + { + /* Status is thus far zero as the timer is not created statically + * and has not been started. The auto-reload bit may get set in + * prvInitialiseNewTimer. */ + pxNewTimer->ucStatus = 0x00; + 80023bc: 697b ldr r3, [r7, #20] + 80023be: 2200 movs r2, #0 + 80023c0: f883 2028 strb.w r2, [r3, #40] ; 0x28 + prvInitialiseNewTimer( pcTimerName, xTimerPeriodInTicks, uxAutoReload, pvTimerID, pxCallbackFunction, pxNewTimer ); + 80023c4: 697b ldr r3, [r7, #20] + 80023c6: 9301 str r3, [sp, #4] + 80023c8: 6a3b ldr r3, [r7, #32] + 80023ca: 9300 str r3, [sp, #0] + 80023cc: 683b ldr r3, [r7, #0] + 80023ce: 687a ldr r2, [r7, #4] + 80023d0: 68b9 ldr r1, [r7, #8] + 80023d2: 68f8 ldr r0, [r7, #12] + 80023d4: f000 f805 bl 80023e2 + } + + return pxNewTimer; + 80023d8: 697b ldr r3, [r7, #20] + } + 80023da: 4618 mov r0, r3 + 80023dc: 3718 adds r7, #24 + 80023de: 46bd mov sp, r7 + 80023e0: bd80 pop {r7, pc} + +080023e2 : + const TickType_t xTimerPeriodInTicks, + const UBaseType_t uxAutoReload, + void * const pvTimerID, + TimerCallbackFunction_t pxCallbackFunction, + Timer_t * pxNewTimer ) + { + 80023e2: b580 push {r7, lr} + 80023e4: b086 sub sp, #24 + 80023e6: af00 add r7, sp, #0 + 80023e8: 60f8 str r0, [r7, #12] + 80023ea: 60b9 str r1, [r7, #8] + 80023ec: 607a str r2, [r7, #4] + 80023ee: 603b str r3, [r7, #0] + /* 0 is not a valid value for xTimerPeriodInTicks. */ + configASSERT( ( xTimerPeriodInTicks > 0 ) ); + 80023f0: 68bb ldr r3, [r7, #8] + 80023f2: 2b00 cmp r3, #0 + 80023f4: d109 bne.n 800240a + 80023f6: f04f 0350 mov.w r3, #80 ; 0x50 + 80023fa: f383 8811 msr BASEPRI, r3 + 80023fe: f3bf 8f6f isb sy + 8002402: f3bf 8f4f dsb sy + 8002406: 617b str r3, [r7, #20] + 8002408: e7fe b.n 8002408 + + if( pxNewTimer != NULL ) + 800240a: 6a7b ldr r3, [r7, #36] ; 0x24 + 800240c: 2b00 cmp r3, #0 + 800240e: d01e beq.n 800244e + { + /* Ensure the infrastructure used by the timer service task has been + * created/initialised. */ + prvCheckForValidListAndQueue(); + 8002410: f000 fac8 bl 80029a4 + + /* Initialise the timer structure members using the function + * parameters. */ + pxNewTimer->pcTimerName = pcTimerName; + 8002414: 6a7b ldr r3, [r7, #36] ; 0x24 + 8002416: 68fa ldr r2, [r7, #12] + 8002418: 601a str r2, [r3, #0] + pxNewTimer->xTimerPeriodInTicks = xTimerPeriodInTicks; + 800241a: 6a7b ldr r3, [r7, #36] ; 0x24 + 800241c: 68ba ldr r2, [r7, #8] + 800241e: 619a str r2, [r3, #24] + pxNewTimer->pvTimerID = pvTimerID; + 8002420: 6a7b ldr r3, [r7, #36] ; 0x24 + 8002422: 683a ldr r2, [r7, #0] + 8002424: 61da str r2, [r3, #28] + pxNewTimer->pxCallbackFunction = pxCallbackFunction; + 8002426: 6a7b ldr r3, [r7, #36] ; 0x24 + 8002428: 6a3a ldr r2, [r7, #32] + 800242a: 621a str r2, [r3, #32] + vListInitialiseItem( &( pxNewTimer->xTimerListItem ) ); + 800242c: 6a7b ldr r3, [r7, #36] ; 0x24 + 800242e: 3304 adds r3, #4 + 8002430: 4618 mov r0, r3 + 8002432: f7fd ffb5 bl 80003a0 + + if( uxAutoReload != pdFALSE ) + 8002436: 687b ldr r3, [r7, #4] + 8002438: 2b00 cmp r3, #0 + 800243a: d008 beq.n 800244e + { + pxNewTimer->ucStatus |= tmrSTATUS_IS_AUTORELOAD; + 800243c: 6a7b ldr r3, [r7, #36] ; 0x24 + 800243e: f893 3028 ldrb.w r3, [r3, #40] ; 0x28 + 8002442: f043 0304 orr.w r3, r3, #4 + 8002446: b2da uxtb r2, r3 + 8002448: 6a7b ldr r3, [r7, #36] ; 0x24 + 800244a: f883 2028 strb.w r2, [r3, #40] ; 0x28 + } + + traceTIMER_CREATE( pxNewTimer ); + } } - 8001a5e: 4618 mov r0, r3 - 8001a60: 3708 adds r7, #8 - 8001a62: 46bd mov sp, r7 - 8001a64: bd80 pop {r7, pc} - 8001a66: bf00 nop - 8001a68: 20000180 .word 0x20000180 - 8001a6c: 20000184 .word 0x20000184 - 8001a70: 0800358c .word 0x0800358c - 8001a74: 08001ba9 .word 0x08001ba9 - -08001a78 : + 800244e: bf00 nop + 8002450: 3718 adds r7, #24 + 8002452: 46bd mov sp, r7 + 8002454: bd80 pop {r7, pc} + ... + +08002458 : BaseType_t xTimerGenericCommand( TimerHandle_t xTimer, const BaseType_t xCommandID, const TickType_t xOptionalValue, BaseType_t * const pxHigherPriorityTaskWoken, const TickType_t xTicksToWait ) { - 8001a78: b580 push {r7, lr} - 8001a7a: b08a sub sp, #40 ; 0x28 - 8001a7c: af00 add r7, sp, #0 - 8001a7e: 60f8 str r0, [r7, #12] - 8001a80: 60b9 str r1, [r7, #8] - 8001a82: 607a str r2, [r7, #4] - 8001a84: 603b str r3, [r7, #0] + 8002458: b580 push {r7, lr} + 800245a: b08a sub sp, #40 ; 0x28 + 800245c: af00 add r7, sp, #0 + 800245e: 60f8 str r0, [r7, #12] + 8002460: 60b9 str r1, [r7, #8] + 8002462: 607a str r2, [r7, #4] + 8002464: 603b str r3, [r7, #0] BaseType_t xReturn = pdFAIL; - 8001a86: 2300 movs r3, #0 - 8001a88: 627b str r3, [r7, #36] ; 0x24 + 8002466: 2300 movs r3, #0 + 8002468: 627b str r3, [r7, #36] ; 0x24 DaemonTaskMessage_t xMessage; configASSERT( xTimer ); - 8001a8a: 68fb ldr r3, [r7, #12] - 8001a8c: 2b00 cmp r3, #0 - 8001a8e: d109 bne.n 8001aa4 - 8001a90: f04f 0350 mov.w r3, #80 ; 0x50 - 8001a94: f383 8811 msr BASEPRI, r3 - 8001a98: f3bf 8f6f isb sy - 8001a9c: f3bf 8f4f dsb sy - 8001aa0: 623b str r3, [r7, #32] - 8001aa2: e7fe b.n 8001aa2 + 800246a: 68fb ldr r3, [r7, #12] + 800246c: 2b00 cmp r3, #0 + 800246e: d109 bne.n 8002484 + 8002470: f04f 0350 mov.w r3, #80 ; 0x50 + 8002474: f383 8811 msr BASEPRI, r3 + 8002478: f3bf 8f6f isb sy + 800247c: f3bf 8f4f dsb sy + 8002480: 623b str r3, [r7, #32] + 8002482: e7fe b.n 8002482 /* Send a message to the timer service task to perform a particular action * on a particular timer definition. */ if( xTimerQueue != NULL ) - 8001aa4: 4b19 ldr r3, [pc, #100] ; (8001b0c ) - 8001aa6: 681b ldr r3, [r3, #0] - 8001aa8: 2b00 cmp r3, #0 - 8001aaa: d02a beq.n 8001b02 + 8002484: 4b19 ldr r3, [pc, #100] ; (80024ec ) + 8002486: 681b ldr r3, [r3, #0] + 8002488: 2b00 cmp r3, #0 + 800248a: d02a beq.n 80024e2 { /* Send a command to the timer service task to start the xTimer timer. */ xMessage.xMessageID = xCommandID; - 8001aac: 68bb ldr r3, [r7, #8] - 8001aae: 617b str r3, [r7, #20] + 800248c: 68bb ldr r3, [r7, #8] + 800248e: 617b str r3, [r7, #20] xMessage.u.xTimerParameters.xMessageValue = xOptionalValue; - 8001ab0: 687b ldr r3, [r7, #4] - 8001ab2: 61bb str r3, [r7, #24] + 8002490: 687b ldr r3, [r7, #4] + 8002492: 61bb str r3, [r7, #24] xMessage.u.xTimerParameters.pxTimer = xTimer; - 8001ab4: 68fb ldr r3, [r7, #12] - 8001ab6: 61fb str r3, [r7, #28] + 8002494: 68fb ldr r3, [r7, #12] + 8002496: 61fb str r3, [r7, #28] if( xCommandID < tmrFIRST_FROM_ISR_COMMAND ) - 8001ab8: 68bb ldr r3, [r7, #8] - 8001aba: 2b05 cmp r3, #5 - 8001abc: dc18 bgt.n 8001af0 + 8002498: 68bb ldr r3, [r7, #8] + 800249a: 2b05 cmp r3, #5 + 800249c: dc18 bgt.n 80024d0 { if( xTaskGetSchedulerState() == taskSCHEDULER_RUNNING ) - 8001abe: f7ff fead bl 800181c - 8001ac2: 4603 mov r3, r0 - 8001ac4: 2b02 cmp r3, #2 - 8001ac6: d109 bne.n 8001adc + 800249e: f7ff fbb3 bl 8001c08 + 80024a2: 4603 mov r3, r0 + 80024a4: 2b02 cmp r3, #2 + 80024a6: d109 bne.n 80024bc { xReturn = xQueueSendToBack( xTimerQueue, &xMessage, xTicksToWait ); - 8001ac8: 4b10 ldr r3, [pc, #64] ; (8001b0c ) - 8001aca: 6818 ldr r0, [r3, #0] - 8001acc: f107 0114 add.w r1, r7, #20 - 8001ad0: 2300 movs r3, #0 - 8001ad2: 6b3a ldr r2, [r7, #48] ; 0x30 - 8001ad4: f7fe fd40 bl 8000558 - 8001ad8: 6278 str r0, [r7, #36] ; 0x24 - 8001ada: e012 b.n 8001b02 + 80024a8: 4b10 ldr r3, [pc, #64] ; (80024ec ) + 80024aa: 6818 ldr r0, [r3, #0] + 80024ac: f107 0114 add.w r1, r7, #20 + 80024b0: 2300 movs r3, #0 + 80024b2: 6b3a ldr r2, [r7, #48] ; 0x30 + 80024b4: f7fe f8f6 bl 80006a4 + 80024b8: 6278 str r0, [r7, #36] ; 0x24 + 80024ba: e012 b.n 80024e2 } else { xReturn = xQueueSendToBack( xTimerQueue, &xMessage, tmrNO_DELAY ); - 8001adc: 4b0b ldr r3, [pc, #44] ; (8001b0c ) - 8001ade: 6818 ldr r0, [r3, #0] - 8001ae0: f107 0114 add.w r1, r7, #20 - 8001ae4: 2300 movs r3, #0 - 8001ae6: 2200 movs r2, #0 - 8001ae8: f7fe fd36 bl 8000558 - 8001aec: 6278 str r0, [r7, #36] ; 0x24 - 8001aee: e008 b.n 8001b02 + 80024bc: 4b0b ldr r3, [pc, #44] ; (80024ec ) + 80024be: 6818 ldr r0, [r3, #0] + 80024c0: f107 0114 add.w r1, r7, #20 + 80024c4: 2300 movs r3, #0 + 80024c6: 2200 movs r2, #0 + 80024c8: f7fe f8ec bl 80006a4 + 80024cc: 6278 str r0, [r7, #36] ; 0x24 + 80024ce: e008 b.n 80024e2 } } else { xReturn = xQueueSendToBackFromISR( xTimerQueue, &xMessage, pxHigherPriorityTaskWoken ); - 8001af0: 4b06 ldr r3, [pc, #24] ; (8001b0c ) - 8001af2: 6818 ldr r0, [r3, #0] - 8001af4: f107 0114 add.w r1, r7, #20 - 8001af8: 2300 movs r3, #0 - 8001afa: 683a ldr r2, [r7, #0] - 8001afc: f7fe fe26 bl 800074c - 8001b00: 6278 str r0, [r7, #36] ; 0x24 + 80024d0: 4b06 ldr r3, [pc, #24] ; (80024ec ) + 80024d2: 6818 ldr r0, [r3, #0] + 80024d4: f107 0114 add.w r1, r7, #20 + 80024d8: 2300 movs r3, #0 + 80024da: 683a ldr r2, [r7, #0] + 80024dc: f7fe fa04 bl 80008e8 + 80024e0: 6278 str r0, [r7, #36] ; 0x24 else { mtCOVERAGE_TEST_MARKER(); } return xReturn; - 8001b02: 6a7b ldr r3, [r7, #36] ; 0x24 + 80024e2: 6a7b ldr r3, [r7, #36] ; 0x24 } - 8001b04: 4618 mov r0, r3 - 8001b06: 3728 adds r7, #40 ; 0x28 - 8001b08: 46bd mov sp, r7 - 8001b0a: bd80 pop {r7, pc} - 8001b0c: 20000180 .word 0x20000180 + 80024e4: 4618 mov r0, r3 + 80024e6: 3728 adds r7, #40 ; 0x28 + 80024e8: 46bd mov sp, r7 + 80024ea: bd80 pop {r7, pc} + 80024ec: 200002d4 .word 0x200002d4 -08001b10 : +080024f0 : } /*-----------------------------------------------------------*/ static void prvProcessExpiredTimer( const TickType_t xNextExpireTime, const TickType_t xTimeNow ) { - 8001b10: b580 push {r7, lr} - 8001b12: b088 sub sp, #32 - 8001b14: af02 add r7, sp, #8 - 8001b16: 6078 str r0, [r7, #4] - 8001b18: 6039 str r1, [r7, #0] + 80024f0: b580 push {r7, lr} + 80024f2: b088 sub sp, #32 + 80024f4: af02 add r7, sp, #8 + 80024f6: 6078 str r0, [r7, #4] + 80024f8: 6039 str r1, [r7, #0] BaseType_t xResult; Timer_t * const pxTimer = ( Timer_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxCurrentTimerList ); /*lint !e9087 !e9079 void * is used as this macro is used with tasks and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */ - 8001b1a: 4b22 ldr r3, [pc, #136] ; (8001ba4 ) - 8001b1c: 681b ldr r3, [r3, #0] - 8001b1e: 68db ldr r3, [r3, #12] - 8001b20: 68db ldr r3, [r3, #12] - 8001b22: 617b str r3, [r7, #20] + 80024fa: 4b22 ldr r3, [pc, #136] ; (8002584 ) + 80024fc: 681b ldr r3, [r3, #0] + 80024fe: 68db ldr r3, [r3, #12] + 8002500: 68db ldr r3, [r3, #12] + 8002502: 617b str r3, [r7, #20] /* Remove the timer from the list of active timers. A check has already * been performed to ensure the list is not empty. */ ( void ) uxListRemove( &( pxTimer->xTimerListItem ) ); - 8001b24: 697b ldr r3, [r7, #20] - 8001b26: 3304 adds r3, #4 - 8001b28: 4618 mov r0, r3 - 8001b2a: f7fe fc03 bl 8000334 + 8002504: 697b ldr r3, [r7, #20] + 8002506: 3304 adds r3, #4 + 8002508: 4618 mov r0, r3 + 800250a: f7fd ffb3 bl 8000474 traceTIMER_EXPIRED( pxTimer ); /* If the timer is an auto-reload timer then calculate the next * expiry time and re-insert the timer in the list of active timers. */ if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 ) - 8001b2e: 697b ldr r3, [r7, #20] - 8001b30: f893 3028 ldrb.w r3, [r3, #40] ; 0x28 - 8001b34: f003 0304 and.w r3, r3, #4 - 8001b38: 2b00 cmp r3, #0 - 8001b3a: d021 beq.n 8001b80 + 800250e: 697b ldr r3, [r7, #20] + 8002510: f893 3028 ldrb.w r3, [r3, #40] ; 0x28 + 8002514: f003 0304 and.w r3, r3, #4 + 8002518: 2b00 cmp r3, #0 + 800251a: d021 beq.n 8002560 { /* The timer is inserted into a list using a time relative to anything * other than the current time. It will therefore be inserted into the * correct list relative to the time this task thinks it is now. */ if( prvInsertTimerInActiveList( pxTimer, ( xNextExpireTime + pxTimer->xTimerPeriodInTicks ), xTimeNow, xNextExpireTime ) != pdFALSE ) - 8001b3c: 697b ldr r3, [r7, #20] - 8001b3e: 699a ldr r2, [r3, #24] - 8001b40: 687b ldr r3, [r7, #4] - 8001b42: 18d1 adds r1, r2, r3 - 8001b44: 687b ldr r3, [r7, #4] - 8001b46: 683a ldr r2, [r7, #0] - 8001b48: 6978 ldr r0, [r7, #20] - 8001b4a: f000 f8d1 bl 8001cf0 - 8001b4e: 4603 mov r3, r0 - 8001b50: 2b00 cmp r3, #0 - 8001b52: d01e beq.n 8001b92 + 800251c: 697b ldr r3, [r7, #20] + 800251e: 699a ldr r2, [r3, #24] + 8002520: 687b ldr r3, [r7, #4] + 8002522: 18d1 adds r1, r2, r3 + 8002524: 687b ldr r3, [r7, #4] + 8002526: 683a ldr r2, [r7, #0] + 8002528: 6978 ldr r0, [r7, #20] + 800252a: f000 f8d1 bl 80026d0 + 800252e: 4603 mov r3, r0 + 8002530: 2b00 cmp r3, #0 + 8002532: d01e beq.n 8002572 { /* The timer expired before it was added to the active timer * list. Reload it now. */ xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xNextExpireTime, NULL, tmrNO_DELAY ); - 8001b54: 2300 movs r3, #0 - 8001b56: 9300 str r3, [sp, #0] - 8001b58: 2300 movs r3, #0 - 8001b5a: 687a ldr r2, [r7, #4] - 8001b5c: 2100 movs r1, #0 - 8001b5e: 6978 ldr r0, [r7, #20] - 8001b60: f7ff ff8a bl 8001a78 - 8001b64: 6138 str r0, [r7, #16] + 8002534: 2300 movs r3, #0 + 8002536: 9300 str r3, [sp, #0] + 8002538: 2300 movs r3, #0 + 800253a: 687a ldr r2, [r7, #4] + 800253c: 2100 movs r1, #0 + 800253e: 6978 ldr r0, [r7, #20] + 8002540: f7ff ff8a bl 8002458 + 8002544: 6138 str r0, [r7, #16] configASSERT( xResult ); - 8001b66: 693b ldr r3, [r7, #16] - 8001b68: 2b00 cmp r3, #0 - 8001b6a: d112 bne.n 8001b92 - 8001b6c: f04f 0350 mov.w r3, #80 ; 0x50 - 8001b70: f383 8811 msr BASEPRI, r3 - 8001b74: f3bf 8f6f isb sy - 8001b78: f3bf 8f4f dsb sy - 8001b7c: 60fb str r3, [r7, #12] - 8001b7e: e7fe b.n 8001b7e + 8002546: 693b ldr r3, [r7, #16] + 8002548: 2b00 cmp r3, #0 + 800254a: d112 bne.n 8002572 + 800254c: f04f 0350 mov.w r3, #80 ; 0x50 + 8002550: f383 8811 msr BASEPRI, r3 + 8002554: f3bf 8f6f isb sy + 8002558: f3bf 8f4f dsb sy + 800255c: 60fb str r3, [r7, #12] + 800255e: e7fe b.n 800255e mtCOVERAGE_TEST_MARKER(); } } else { pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE; - 8001b80: 697b ldr r3, [r7, #20] - 8001b82: f893 3028 ldrb.w r3, [r3, #40] ; 0x28 - 8001b86: f023 0301 bic.w r3, r3, #1 - 8001b8a: b2da uxtb r2, r3 - 8001b8c: 697b ldr r3, [r7, #20] - 8001b8e: f883 2028 strb.w r2, [r3, #40] ; 0x28 + 8002560: 697b ldr r3, [r7, #20] + 8002562: f893 3028 ldrb.w r3, [r3, #40] ; 0x28 + 8002566: f023 0301 bic.w r3, r3, #1 + 800256a: b2da uxtb r2, r3 + 800256c: 697b ldr r3, [r7, #20] + 800256e: f883 2028 strb.w r2, [r3, #40] ; 0x28 mtCOVERAGE_TEST_MARKER(); } /* Call the timer callback. */ pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); - 8001b92: 697b ldr r3, [r7, #20] - 8001b94: 6a1b ldr r3, [r3, #32] - 8001b96: 6978 ldr r0, [r7, #20] - 8001b98: 4798 blx r3 + 8002572: 697b ldr r3, [r7, #20] + 8002574: 6a1b ldr r3, [r3, #32] + 8002576: 6978 ldr r0, [r7, #20] + 8002578: 4798 blx r3 } - 8001b9a: bf00 nop - 8001b9c: 3718 adds r7, #24 - 8001b9e: 46bd mov sp, r7 - 8001ba0: bd80 pop {r7, pc} - 8001ba2: bf00 nop - 8001ba4: 20000178 .word 0x20000178 - -08001ba8 : + 800257a: bf00 nop + 800257c: 3718 adds r7, #24 + 800257e: 46bd mov sp, r7 + 8002580: bd80 pop {r7, pc} + 8002582: bf00 nop + 8002584: 200002cc .word 0x200002cc + +08002588 : /*-----------------------------------------------------------*/ static portTASK_FUNCTION( prvTimerTask, pvParameters ) { - 8001ba8: b580 push {r7, lr} - 8001baa: b084 sub sp, #16 - 8001bac: af00 add r7, sp, #0 - 8001bae: 6078 str r0, [r7, #4] + 8002588: b580 push {r7, lr} + 800258a: b084 sub sp, #16 + 800258c: af00 add r7, sp, #0 + 800258e: 6078 str r0, [r7, #4] for( ; ; ) { /* Query the timers list to see if it contains any timers, and if so, * obtain the time at which the next timer will expire. */ xNextExpireTime = prvGetNextExpireTime( &xListWasEmpty ); - 8001bb0: f107 0308 add.w r3, r7, #8 - 8001bb4: 4618 mov r0, r3 - 8001bb6: f000 f857 bl 8001c68 - 8001bba: 60f8 str r0, [r7, #12] + 8002590: f107 0308 add.w r3, r7, #8 + 8002594: 4618 mov r0, r3 + 8002596: f000 f857 bl 8002648 + 800259a: 60f8 str r0, [r7, #12] /* If a timer has expired, process it. Otherwise, block this task * until either a timer does expire, or a command is received. */ prvProcessTimerOrBlockTask( xNextExpireTime, xListWasEmpty ); - 8001bbc: 68bb ldr r3, [r7, #8] - 8001bbe: 4619 mov r1, r3 - 8001bc0: 68f8 ldr r0, [r7, #12] - 8001bc2: f000 f803 bl 8001bcc + 800259c: 68bb ldr r3, [r7, #8] + 800259e: 4619 mov r1, r3 + 80025a0: 68f8 ldr r0, [r7, #12] + 80025a2: f000 f803 bl 80025ac /* Empty the command queue. */ prvProcessReceivedCommands(); - 8001bc6: f000 f8d5 bl 8001d74 + 80025a6: f000 f8d5 bl 8002754 xNextExpireTime = prvGetNextExpireTime( &xListWasEmpty ); - 8001bca: e7f1 b.n 8001bb0 + 80025aa: e7f1 b.n 8002590 -08001bcc : +080025ac : } /*-----------------------------------------------------------*/ static void prvProcessTimerOrBlockTask( const TickType_t xNextExpireTime, BaseType_t xListWasEmpty ) { - 8001bcc: b580 push {r7, lr} - 8001bce: b084 sub sp, #16 - 8001bd0: af00 add r7, sp, #0 - 8001bd2: 6078 str r0, [r7, #4] - 8001bd4: 6039 str r1, [r7, #0] + 80025ac: b580 push {r7, lr} + 80025ae: b084 sub sp, #16 + 80025b0: af00 add r7, sp, #0 + 80025b2: 6078 str r0, [r7, #4] + 80025b4: 6039 str r1, [r7, #0] TickType_t xTimeNow; BaseType_t xTimerListsWereSwitched; vTaskSuspendAll(); - 8001bd6: f7ff fa6f bl 80010b8 + 80025b6: f7fe ff43 bl 8001440 /* Obtain the time now to make an assessment as to whether the timer * has expired or not. If obtaining the time causes the lists to switch * then don't process this timer as any timers that remained in the list * when the lists were switched will have been processed within the * prvSampleTimeNow() function. */ xTimeNow = prvSampleTimeNow( &xTimerListsWereSwitched ); - 8001bda: f107 0308 add.w r3, r7, #8 - 8001bde: 4618 mov r0, r3 - 8001be0: f000 f866 bl 8001cb0 - 8001be4: 60f8 str r0, [r7, #12] + 80025ba: f107 0308 add.w r3, r7, #8 + 80025be: 4618 mov r0, r3 + 80025c0: f000 f866 bl 8002690 + 80025c4: 60f8 str r0, [r7, #12] if( xTimerListsWereSwitched == pdFALSE ) - 8001be6: 68bb ldr r3, [r7, #8] - 8001be8: 2b00 cmp r3, #0 - 8001bea: d130 bne.n 8001c4e + 80025c6: 68bb ldr r3, [r7, #8] + 80025c8: 2b00 cmp r3, #0 + 80025ca: d130 bne.n 800262e { /* The tick count has not overflowed, has the timer expired? */ if( ( xListWasEmpty == pdFALSE ) && ( xNextExpireTime <= xTimeNow ) ) - 8001bec: 683b ldr r3, [r7, #0] - 8001bee: 2b00 cmp r3, #0 - 8001bf0: d10a bne.n 8001c08 - 8001bf2: 687a ldr r2, [r7, #4] - 8001bf4: 68fb ldr r3, [r7, #12] - 8001bf6: 429a cmp r2, r3 - 8001bf8: d806 bhi.n 8001c08 + 80025cc: 683b ldr r3, [r7, #0] + 80025ce: 2b00 cmp r3, #0 + 80025d0: d10a bne.n 80025e8 + 80025d2: 687a ldr r2, [r7, #4] + 80025d4: 68fb ldr r3, [r7, #12] + 80025d6: 429a cmp r2, r3 + 80025d8: d806 bhi.n 80025e8 { ( void ) xTaskResumeAll(); - 8001bfa: f7ff fa6b bl 80010d4 + 80025da: f7fe ff3f bl 800145c prvProcessExpiredTimer( xNextExpireTime, xTimeNow ); - 8001bfe: 68f9 ldr r1, [r7, #12] - 8001c00: 6878 ldr r0, [r7, #4] - 8001c02: f7ff ff85 bl 8001b10 + 80025de: 68f9 ldr r1, [r7, #12] + 80025e0: 6878 ldr r0, [r7, #4] + 80025e2: f7ff ff85 bl 80024f0 else { ( void ) xTaskResumeAll(); } } } - 8001c06: e024 b.n 8001c52 + 80025e6: e024 b.n 8002632 if( xListWasEmpty != pdFALSE ) - 8001c08: 683b ldr r3, [r7, #0] - 8001c0a: 2b00 cmp r3, #0 - 8001c0c: d008 beq.n 8001c20 + 80025e8: 683b ldr r3, [r7, #0] + 80025ea: 2b00 cmp r3, #0 + 80025ec: d008 beq.n 8002600 xListWasEmpty = listLIST_IS_EMPTY( pxOverflowTimerList ); - 8001c0e: 4b13 ldr r3, [pc, #76] ; (8001c5c ) - 8001c10: 681b ldr r3, [r3, #0] - 8001c12: 681b ldr r3, [r3, #0] - 8001c14: 2b00 cmp r3, #0 - 8001c16: d101 bne.n 8001c1c - 8001c18: 2301 movs r3, #1 - 8001c1a: e000 b.n 8001c1e - 8001c1c: 2300 movs r3, #0 - 8001c1e: 603b str r3, [r7, #0] + 80025ee: 4b13 ldr r3, [pc, #76] ; (800263c ) + 80025f0: 681b ldr r3, [r3, #0] + 80025f2: 681b ldr r3, [r3, #0] + 80025f4: 2b00 cmp r3, #0 + 80025f6: d101 bne.n 80025fc + 80025f8: 2301 movs r3, #1 + 80025fa: e000 b.n 80025fe + 80025fc: 2300 movs r3, #0 + 80025fe: 603b str r3, [r7, #0] vQueueWaitForMessageRestricted( xTimerQueue, ( xNextExpireTime - xTimeNow ), xListWasEmpty ); - 8001c20: 4b0f ldr r3, [pc, #60] ; (8001c60 ) - 8001c22: 6818 ldr r0, [r3, #0] - 8001c24: 687a ldr r2, [r7, #4] - 8001c26: 68fb ldr r3, [r7, #12] - 8001c28: 1ad3 subs r3, r2, r3 - 8001c2a: 683a ldr r2, [r7, #0] - 8001c2c: 4619 mov r1, r3 - 8001c2e: f7ff f847 bl 8000cc0 + 8002600: 4b0f ldr r3, [pc, #60] ; (8002640 ) + 8002602: 6818 ldr r0, [r3, #0] + 8002604: 687a ldr r2, [r7, #4] + 8002606: 68fb ldr r3, [r7, #12] + 8002608: 1ad3 subs r3, r2, r3 + 800260a: 683a ldr r2, [r7, #0] + 800260c: 4619 mov r1, r3 + 800260e: f7fe fc79 bl 8000f04 if( xTaskResumeAll() == pdFALSE ) - 8001c32: f7ff fa4f bl 80010d4 - 8001c36: 4603 mov r3, r0 - 8001c38: 2b00 cmp r3, #0 - 8001c3a: d10a bne.n 8001c52 + 8002612: f7fe ff23 bl 800145c + 8002616: 4603 mov r3, r0 + 8002618: 2b00 cmp r3, #0 + 800261a: d10a bne.n 8002632 portYIELD_WITHIN_API(); - 8001c3c: 4b09 ldr r3, [pc, #36] ; (8001c64 ) - 8001c3e: f04f 5280 mov.w r2, #268435456 ; 0x10000000 - 8001c42: 601a str r2, [r3, #0] - 8001c44: f3bf 8f4f dsb sy - 8001c48: f3bf 8f6f isb sy + 800261c: 4b09 ldr r3, [pc, #36] ; (8002644 ) + 800261e: f04f 5280 mov.w r2, #268435456 ; 0x10000000 + 8002622: 601a str r2, [r3, #0] + 8002624: f3bf 8f4f dsb sy + 8002628: f3bf 8f6f isb sy } - 8001c4c: e001 b.n 8001c52 + 800262c: e001 b.n 8002632 ( void ) xTaskResumeAll(); - 8001c4e: f7ff fa41 bl 80010d4 + 800262e: f7fe ff15 bl 800145c } - 8001c52: bf00 nop - 8001c54: 3710 adds r7, #16 - 8001c56: 46bd mov sp, r7 - 8001c58: bd80 pop {r7, pc} - 8001c5a: bf00 nop - 8001c5c: 2000017c .word 0x2000017c - 8001c60: 20000180 .word 0x20000180 - 8001c64: e000ed04 .word 0xe000ed04 - -08001c68 : + 8002632: bf00 nop + 8002634: 3710 adds r7, #16 + 8002636: 46bd mov sp, r7 + 8002638: bd80 pop {r7, pc} + 800263a: bf00 nop + 800263c: 200002d0 .word 0x200002d0 + 8002640: 200002d4 .word 0x200002d4 + 8002644: e000ed04 .word 0xe000ed04 + +08002648 : /*-----------------------------------------------------------*/ static TickType_t prvGetNextExpireTime( BaseType_t * const pxListWasEmpty ) { - 8001c68: b480 push {r7} - 8001c6a: b085 sub sp, #20 - 8001c6c: af00 add r7, sp, #0 - 8001c6e: 6078 str r0, [r7, #4] + 8002648: b480 push {r7} + 800264a: b085 sub sp, #20 + 800264c: af00 add r7, sp, #0 + 800264e: 6078 str r0, [r7, #4] * the timer with the nearest expiry time will expire. If there are no * active timers then just set the next expire time to 0. That will cause * this task to unblock when the tick count overflows, at which point the * timer lists will be switched and the next expiry time can be * re-assessed. */ *pxListWasEmpty = listLIST_IS_EMPTY( pxCurrentTimerList ); - 8001c70: 4b0e ldr r3, [pc, #56] ; (8001cac ) - 8001c72: 681b ldr r3, [r3, #0] - 8001c74: 681b ldr r3, [r3, #0] - 8001c76: 2b00 cmp r3, #0 - 8001c78: d101 bne.n 8001c7e - 8001c7a: 2201 movs r2, #1 - 8001c7c: e000 b.n 8001c80 - 8001c7e: 2200 movs r2, #0 - 8001c80: 687b ldr r3, [r7, #4] - 8001c82: 601a str r2, [r3, #0] + 8002650: 4b0e ldr r3, [pc, #56] ; (800268c ) + 8002652: 681b ldr r3, [r3, #0] + 8002654: 681b ldr r3, [r3, #0] + 8002656: 2b00 cmp r3, #0 + 8002658: d101 bne.n 800265e + 800265a: 2201 movs r2, #1 + 800265c: e000 b.n 8002660 + 800265e: 2200 movs r2, #0 + 8002660: 687b ldr r3, [r7, #4] + 8002662: 601a str r2, [r3, #0] if( *pxListWasEmpty == pdFALSE ) - 8001c84: 687b ldr r3, [r7, #4] - 8001c86: 681b ldr r3, [r3, #0] - 8001c88: 2b00 cmp r3, #0 - 8001c8a: d105 bne.n 8001c98 + 8002664: 687b ldr r3, [r7, #4] + 8002666: 681b ldr r3, [r3, #0] + 8002668: 2b00 cmp r3, #0 + 800266a: d105 bne.n 8002678 { xNextExpireTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxCurrentTimerList ); - 8001c8c: 4b07 ldr r3, [pc, #28] ; (8001cac ) - 8001c8e: 681b ldr r3, [r3, #0] - 8001c90: 68db ldr r3, [r3, #12] - 8001c92: 681b ldr r3, [r3, #0] - 8001c94: 60fb str r3, [r7, #12] - 8001c96: e001 b.n 8001c9c + 800266c: 4b07 ldr r3, [pc, #28] ; (800268c ) + 800266e: 681b ldr r3, [r3, #0] + 8002670: 68db ldr r3, [r3, #12] + 8002672: 681b ldr r3, [r3, #0] + 8002674: 60fb str r3, [r7, #12] + 8002676: e001 b.n 800267c } else { /* Ensure the task unblocks when the tick count rolls over. */ xNextExpireTime = ( TickType_t ) 0U; - 8001c98: 2300 movs r3, #0 - 8001c9a: 60fb str r3, [r7, #12] + 8002678: 2300 movs r3, #0 + 800267a: 60fb str r3, [r7, #12] } return xNextExpireTime; - 8001c9c: 68fb ldr r3, [r7, #12] + 800267c: 68fb ldr r3, [r7, #12] } - 8001c9e: 4618 mov r0, r3 - 8001ca0: 3714 adds r7, #20 - 8001ca2: 46bd mov sp, r7 - 8001ca4: f85d 7b04 ldr.w r7, [sp], #4 - 8001ca8: 4770 bx lr - 8001caa: bf00 nop - 8001cac: 20000178 .word 0x20000178 - -08001cb0 : + 800267e: 4618 mov r0, r3 + 8002680: 3714 adds r7, #20 + 8002682: 46bd mov sp, r7 + 8002684: f85d 7b04 ldr.w r7, [sp], #4 + 8002688: 4770 bx lr + 800268a: bf00 nop + 800268c: 200002cc .word 0x200002cc + +08002690 : /*-----------------------------------------------------------*/ static TickType_t prvSampleTimeNow( BaseType_t * const pxTimerListsWereSwitched ) { - 8001cb0: b580 push {r7, lr} - 8001cb2: b084 sub sp, #16 - 8001cb4: af00 add r7, sp, #0 - 8001cb6: 6078 str r0, [r7, #4] + 8002690: b580 push {r7, lr} + 8002692: b084 sub sp, #16 + 8002694: af00 add r7, sp, #0 + 8002696: 6078 str r0, [r7, #4] TickType_t xTimeNow; PRIVILEGED_DATA static TickType_t xLastTime = ( TickType_t ) 0U; /*lint !e956 Variable is only accessible to one task. */ xTimeNow = xTaskGetTickCount(); - 8001cb8: f7ff faa8 bl 800120c - 8001cbc: 60f8 str r0, [r7, #12] + 8002698: f7fe ff80 bl 800159c + 800269c: 60f8 str r0, [r7, #12] if( xTimeNow < xLastTime ) - 8001cbe: 4b0b ldr r3, [pc, #44] ; (8001cec ) - 8001cc0: 681b ldr r3, [r3, #0] - 8001cc2: 68fa ldr r2, [r7, #12] - 8001cc4: 429a cmp r2, r3 - 8001cc6: d205 bcs.n 8001cd4 + 800269e: 4b0b ldr r3, [pc, #44] ; (80026cc ) + 80026a0: 681b ldr r3, [r3, #0] + 80026a2: 68fa ldr r2, [r7, #12] + 80026a4: 429a cmp r2, r3 + 80026a6: d205 bcs.n 80026b4 { prvSwitchTimerLists(); - 8001cc8: f000 f918 bl 8001efc + 80026a8: f000 f918 bl 80028dc *pxTimerListsWereSwitched = pdTRUE; - 8001ccc: 687b ldr r3, [r7, #4] - 8001cce: 2201 movs r2, #1 - 8001cd0: 601a str r2, [r3, #0] - 8001cd2: e002 b.n 8001cda + 80026ac: 687b ldr r3, [r7, #4] + 80026ae: 2201 movs r2, #1 + 80026b0: 601a str r2, [r3, #0] + 80026b2: e002 b.n 80026ba } else { *pxTimerListsWereSwitched = pdFALSE; - 8001cd4: 687b ldr r3, [r7, #4] - 8001cd6: 2200 movs r2, #0 - 8001cd8: 601a str r2, [r3, #0] + 80026b4: 687b ldr r3, [r7, #4] + 80026b6: 2200 movs r2, #0 + 80026b8: 601a str r2, [r3, #0] } xLastTime = xTimeNow; - 8001cda: 4a04 ldr r2, [pc, #16] ; (8001cec ) - 8001cdc: 68fb ldr r3, [r7, #12] - 8001cde: 6013 str r3, [r2, #0] + 80026ba: 4a04 ldr r2, [pc, #16] ; (80026cc ) + 80026bc: 68fb ldr r3, [r7, #12] + 80026be: 6013 str r3, [r2, #0] return xTimeNow; - 8001ce0: 68fb ldr r3, [r7, #12] + 80026c0: 68fb ldr r3, [r7, #12] } - 8001ce2: 4618 mov r0, r3 - 8001ce4: 3710 adds r7, #16 - 8001ce6: 46bd mov sp, r7 - 8001ce8: bd80 pop {r7, pc} - 8001cea: bf00 nop - 8001cec: 20000188 .word 0x20000188 + 80026c2: 4618 mov r0, r3 + 80026c4: 3710 adds r7, #16 + 80026c6: 46bd mov sp, r7 + 80026c8: bd80 pop {r7, pc} + 80026ca: bf00 nop + 80026cc: 200002dc .word 0x200002dc -08001cf0 : +080026d0 : static BaseType_t prvInsertTimerInActiveList( Timer_t * const pxTimer, const TickType_t xNextExpiryTime, const TickType_t xTimeNow, const TickType_t xCommandTime ) { - 8001cf0: b580 push {r7, lr} - 8001cf2: b086 sub sp, #24 - 8001cf4: af00 add r7, sp, #0 - 8001cf6: 60f8 str r0, [r7, #12] - 8001cf8: 60b9 str r1, [r7, #8] - 8001cfa: 607a str r2, [r7, #4] - 8001cfc: 603b str r3, [r7, #0] + 80026d0: b580 push {r7, lr} + 80026d2: b086 sub sp, #24 + 80026d4: af00 add r7, sp, #0 + 80026d6: 60f8 str r0, [r7, #12] + 80026d8: 60b9 str r1, [r7, #8] + 80026da: 607a str r2, [r7, #4] + 80026dc: 603b str r3, [r7, #0] BaseType_t xProcessTimerNow = pdFALSE; - 8001cfe: 2300 movs r3, #0 - 8001d00: 617b str r3, [r7, #20] + 80026de: 2300 movs r3, #0 + 80026e0: 617b str r3, [r7, #20] listSET_LIST_ITEM_VALUE( &( pxTimer->xTimerListItem ), xNextExpiryTime ); - 8001d02: 68fb ldr r3, [r7, #12] - 8001d04: 68ba ldr r2, [r7, #8] - 8001d06: 605a str r2, [r3, #4] + 80026e2: 68fb ldr r3, [r7, #12] + 80026e4: 68ba ldr r2, [r7, #8] + 80026e6: 605a str r2, [r3, #4] listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer ); - 8001d08: 68fb ldr r3, [r7, #12] - 8001d0a: 68fa ldr r2, [r7, #12] - 8001d0c: 611a str r2, [r3, #16] + 80026e8: 68fb ldr r3, [r7, #12] + 80026ea: 68fa ldr r2, [r7, #12] + 80026ec: 611a str r2, [r3, #16] if( xNextExpiryTime <= xTimeNow ) - 8001d0e: 68ba ldr r2, [r7, #8] - 8001d10: 687b ldr r3, [r7, #4] - 8001d12: 429a cmp r2, r3 - 8001d14: d812 bhi.n 8001d3c + 80026ee: 68ba ldr r2, [r7, #8] + 80026f0: 687b ldr r3, [r7, #4] + 80026f2: 429a cmp r2, r3 + 80026f4: d812 bhi.n 800271c { /* Has the expiry time elapsed between the command to start/reset a * timer was issued, and the time the command was processed? */ if( ( ( TickType_t ) ( xTimeNow - xCommandTime ) ) >= pxTimer->xTimerPeriodInTicks ) /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ - 8001d16: 687a ldr r2, [r7, #4] - 8001d18: 683b ldr r3, [r7, #0] - 8001d1a: 1ad2 subs r2, r2, r3 - 8001d1c: 68fb ldr r3, [r7, #12] - 8001d1e: 699b ldr r3, [r3, #24] - 8001d20: 429a cmp r2, r3 - 8001d22: d302 bcc.n 8001d2a + 80026f6: 687a ldr r2, [r7, #4] + 80026f8: 683b ldr r3, [r7, #0] + 80026fa: 1ad2 subs r2, r2, r3 + 80026fc: 68fb ldr r3, [r7, #12] + 80026fe: 699b ldr r3, [r3, #24] + 8002700: 429a cmp r2, r3 + 8002702: d302 bcc.n 800270a { /* The time between a command being issued and the command being * processed actually exceeds the timers period. */ xProcessTimerNow = pdTRUE; - 8001d24: 2301 movs r3, #1 - 8001d26: 617b str r3, [r7, #20] - 8001d28: e01b b.n 8001d62 + 8002704: 2301 movs r3, #1 + 8002706: 617b str r3, [r7, #20] + 8002708: e01b b.n 8002742 } else { vListInsert( pxOverflowTimerList, &( pxTimer->xTimerListItem ) ); - 8001d2a: 4b10 ldr r3, [pc, #64] ; (8001d6c ) - 8001d2c: 681a ldr r2, [r3, #0] - 8001d2e: 68fb ldr r3, [r7, #12] - 8001d30: 3304 adds r3, #4 - 8001d32: 4619 mov r1, r3 - 8001d34: 4610 mov r0, r2 - 8001d36: f7fe fac4 bl 80002c2 - 8001d3a: e012 b.n 8001d62 + 800270a: 4b10 ldr r3, [pc, #64] ; (800274c ) + 800270c: 681a ldr r2, [r3, #0] + 800270e: 68fb ldr r3, [r7, #12] + 8002710: 3304 adds r3, #4 + 8002712: 4619 mov r1, r3 + 8002714: 4610 mov r0, r2 + 8002716: f7fd fe74 bl 8000402 + 800271a: e012 b.n 8002742 } } else { if( ( xTimeNow < xCommandTime ) && ( xNextExpiryTime >= xCommandTime ) ) - 8001d3c: 687a ldr r2, [r7, #4] - 8001d3e: 683b ldr r3, [r7, #0] - 8001d40: 429a cmp r2, r3 - 8001d42: d206 bcs.n 8001d52 - 8001d44: 68ba ldr r2, [r7, #8] - 8001d46: 683b ldr r3, [r7, #0] - 8001d48: 429a cmp r2, r3 - 8001d4a: d302 bcc.n 8001d52 + 800271c: 687a ldr r2, [r7, #4] + 800271e: 683b ldr r3, [r7, #0] + 8002720: 429a cmp r2, r3 + 8002722: d206 bcs.n 8002732 + 8002724: 68ba ldr r2, [r7, #8] + 8002726: 683b ldr r3, [r7, #0] + 8002728: 429a cmp r2, r3 + 800272a: d302 bcc.n 8002732 { /* If, since the command was issued, the tick count has overflowed * but the expiry time has not, then the timer must have already passed * its expiry time and should be processed immediately. */ xProcessTimerNow = pdTRUE; - 8001d4c: 2301 movs r3, #1 - 8001d4e: 617b str r3, [r7, #20] - 8001d50: e007 b.n 8001d62 + 800272c: 2301 movs r3, #1 + 800272e: 617b str r3, [r7, #20] + 8002730: e007 b.n 8002742 } else { vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); - 8001d52: 4b07 ldr r3, [pc, #28] ; (8001d70 ) - 8001d54: 681a ldr r2, [r3, #0] - 8001d56: 68fb ldr r3, [r7, #12] - 8001d58: 3304 adds r3, #4 - 8001d5a: 4619 mov r1, r3 - 8001d5c: 4610 mov r0, r2 - 8001d5e: f7fe fab0 bl 80002c2 + 8002732: 4b07 ldr r3, [pc, #28] ; (8002750 ) + 8002734: 681a ldr r2, [r3, #0] + 8002736: 68fb ldr r3, [r7, #12] + 8002738: 3304 adds r3, #4 + 800273a: 4619 mov r1, r3 + 800273c: 4610 mov r0, r2 + 800273e: f7fd fe60 bl 8000402 } } return xProcessTimerNow; - 8001d62: 697b ldr r3, [r7, #20] + 8002742: 697b ldr r3, [r7, #20] } - 8001d64: 4618 mov r0, r3 - 8001d66: 3718 adds r7, #24 - 8001d68: 46bd mov sp, r7 - 8001d6a: bd80 pop {r7, pc} - 8001d6c: 2000017c .word 0x2000017c - 8001d70: 20000178 .word 0x20000178 - -08001d74 : + 8002744: 4618 mov r0, r3 + 8002746: 3718 adds r7, #24 + 8002748: 46bd mov sp, r7 + 800274a: bd80 pop {r7, pc} + 800274c: 200002d0 .word 0x200002d0 + 8002750: 200002cc .word 0x200002cc + +08002754 : /*-----------------------------------------------------------*/ static void prvProcessReceivedCommands( void ) { - 8001d74: b580 push {r7, lr} - 8001d76: b08c sub sp, #48 ; 0x30 - 8001d78: af02 add r7, sp, #8 + 8002754: b580 push {r7, lr} + 8002756: b08c sub sp, #48 ; 0x30 + 8002758: af02 add r7, sp, #8 DaemonTaskMessage_t xMessage; Timer_t * pxTimer; BaseType_t xTimerListsWereSwitched, xResult; TickType_t xTimeNow; while( xQueueReceive( xTimerQueue, &xMessage, tmrNO_DELAY ) != pdFAIL ) /*lint !e603 xMessage does not have to be initialised as it is passed out, not in, and it is not used unless xQueueReceive() returns pdTRUE. */ - 8001d7a: e0ac b.n 8001ed6 + 800275a: e0ac b.n 80028b6 } #endif /* INCLUDE_xTimerPendFunctionCall */ /* Commands that are positive are timer commands rather than pended * function calls. */ if( xMessage.xMessageID >= ( BaseType_t ) 0 ) - 8001d7c: 68bb ldr r3, [r7, #8] - 8001d7e: 2b00 cmp r3, #0 - 8001d80: f2c0 80a8 blt.w 8001ed4 + 800275c: 68bb ldr r3, [r7, #8] + 800275e: 2b00 cmp r3, #0 + 8002760: f2c0 80a8 blt.w 80028b4 { /* The messages uses the xTimerParameters member to work on a * software timer. */ pxTimer = xMessage.u.xTimerParameters.pxTimer; - 8001d84: 693b ldr r3, [r7, #16] - 8001d86: 627b str r3, [r7, #36] ; 0x24 + 8002764: 693b ldr r3, [r7, #16] + 8002766: 627b str r3, [r7, #36] ; 0x24 if( listIS_CONTAINED_WITHIN( NULL, &( pxTimer->xTimerListItem ) ) == pdFALSE ) /*lint !e961. The cast is only redundant when NULL is passed into the macro. */ - 8001d88: 6a7b ldr r3, [r7, #36] ; 0x24 - 8001d8a: 695b ldr r3, [r3, #20] - 8001d8c: 2b00 cmp r3, #0 - 8001d8e: d004 beq.n 8001d9a + 8002768: 6a7b ldr r3, [r7, #36] ; 0x24 + 800276a: 695b ldr r3, [r3, #20] + 800276c: 2b00 cmp r3, #0 + 800276e: d004 beq.n 800277a { /* The timer is in a list, remove it. */ ( void ) uxListRemove( &( pxTimer->xTimerListItem ) ); - 8001d90: 6a7b ldr r3, [r7, #36] ; 0x24 - 8001d92: 3304 adds r3, #4 - 8001d94: 4618 mov r0, r3 - 8001d96: f7fe facd bl 8000334 + 8002770: 6a7b ldr r3, [r7, #36] ; 0x24 + 8002772: 3304 adds r3, #4 + 8002774: 4618 mov r0, r3 + 8002776: f7fd fe7d bl 8000474 * it must be present in the function call. prvSampleTimeNow() must be * called after the message is received from xTimerQueue so there is no * possibility of a higher priority task adding a message to the message * queue with a time that is ahead of the timer daemon task (because it * pre-empted the timer daemon task after the xTimeNow value was set). */ xTimeNow = prvSampleTimeNow( &xTimerListsWereSwitched ); - 8001d9a: 1d3b adds r3, r7, #4 - 8001d9c: 4618 mov r0, r3 - 8001d9e: f7ff ff87 bl 8001cb0 - 8001da2: 6238 str r0, [r7, #32] + 800277a: 1d3b adds r3, r7, #4 + 800277c: 4618 mov r0, r3 + 800277e: f7ff ff87 bl 8002690 + 8002782: 6238 str r0, [r7, #32] switch( xMessage.xMessageID ) - 8001da4: 68bb ldr r3, [r7, #8] - 8001da6: 2b09 cmp r3, #9 - 8001da8: f200 8095 bhi.w 8001ed6 - 8001dac: a201 add r2, pc, #4 ; (adr r2, 8001db4 ) - 8001dae: f852 f023 ldr.w pc, [r2, r3, lsl #2] - 8001db2: bf00 nop - 8001db4: 08001ddd .word 0x08001ddd - 8001db8: 08001ddd .word 0x08001ddd - 8001dbc: 08001ddd .word 0x08001ddd - 8001dc0: 08001e4f .word 0x08001e4f - 8001dc4: 08001e63 .word 0x08001e63 - 8001dc8: 08001eab .word 0x08001eab - 8001dcc: 08001ddd .word 0x08001ddd - 8001dd0: 08001ddd .word 0x08001ddd - 8001dd4: 08001e4f .word 0x08001e4f - 8001dd8: 08001e63 .word 0x08001e63 + 8002784: 68bb ldr r3, [r7, #8] + 8002786: 2b09 cmp r3, #9 + 8002788: f200 8095 bhi.w 80028b6 + 800278c: a201 add r2, pc, #4 ; (adr r2, 8002794 ) + 800278e: f852 f023 ldr.w pc, [r2, r3, lsl #2] + 8002792: bf00 nop + 8002794: 080027bd .word 0x080027bd + 8002798: 080027bd .word 0x080027bd + 800279c: 080027bd .word 0x080027bd + 80027a0: 0800282f .word 0x0800282f + 80027a4: 08002843 .word 0x08002843 + 80027a8: 0800288b .word 0x0800288b + 80027ac: 080027bd .word 0x080027bd + 80027b0: 080027bd .word 0x080027bd + 80027b4: 0800282f .word 0x0800282f + 80027b8: 08002843 .word 0x08002843 case tmrCOMMAND_START_FROM_ISR: case tmrCOMMAND_RESET: case tmrCOMMAND_RESET_FROM_ISR: case tmrCOMMAND_START_DONT_TRACE: /* Start or restart a timer. */ pxTimer->ucStatus |= tmrSTATUS_IS_ACTIVE; - 8001ddc: 6a7b ldr r3, [r7, #36] ; 0x24 - 8001dde: f893 3028 ldrb.w r3, [r3, #40] ; 0x28 - 8001de2: f043 0301 orr.w r3, r3, #1 - 8001de6: b2da uxtb r2, r3 - 8001de8: 6a7b ldr r3, [r7, #36] ; 0x24 - 8001dea: f883 2028 strb.w r2, [r3, #40] ; 0x28 + 80027bc: 6a7b ldr r3, [r7, #36] ; 0x24 + 80027be: f893 3028 ldrb.w r3, [r3, #40] ; 0x28 + 80027c2: f043 0301 orr.w r3, r3, #1 + 80027c6: b2da uxtb r2, r3 + 80027c8: 6a7b ldr r3, [r7, #36] ; 0x24 + 80027ca: f883 2028 strb.w r2, [r3, #40] ; 0x28 if( prvInsertTimerInActiveList( pxTimer, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, xTimeNow, xMessage.u.xTimerParameters.xMessageValue ) != pdFALSE ) - 8001dee: 68fa ldr r2, [r7, #12] - 8001df0: 6a7b ldr r3, [r7, #36] ; 0x24 - 8001df2: 699b ldr r3, [r3, #24] - 8001df4: 18d1 adds r1, r2, r3 - 8001df6: 68fb ldr r3, [r7, #12] - 8001df8: 6a3a ldr r2, [r7, #32] - 8001dfa: 6a78 ldr r0, [r7, #36] ; 0x24 - 8001dfc: f7ff ff78 bl 8001cf0 - 8001e00: 4603 mov r3, r0 - 8001e02: 2b00 cmp r3, #0 - 8001e04: d067 beq.n 8001ed6 + 80027ce: 68fa ldr r2, [r7, #12] + 80027d0: 6a7b ldr r3, [r7, #36] ; 0x24 + 80027d2: 699b ldr r3, [r3, #24] + 80027d4: 18d1 adds r1, r2, r3 + 80027d6: 68fb ldr r3, [r7, #12] + 80027d8: 6a3a ldr r2, [r7, #32] + 80027da: 6a78 ldr r0, [r7, #36] ; 0x24 + 80027dc: f7ff ff78 bl 80026d0 + 80027e0: 4603 mov r3, r0 + 80027e2: 2b00 cmp r3, #0 + 80027e4: d067 beq.n 80028b6 { /* The timer expired before it was added to the active * timer list. Process it now. */ pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); - 8001e06: 6a7b ldr r3, [r7, #36] ; 0x24 - 8001e08: 6a1b ldr r3, [r3, #32] - 8001e0a: 6a78 ldr r0, [r7, #36] ; 0x24 - 8001e0c: 4798 blx r3 + 80027e6: 6a7b ldr r3, [r7, #36] ; 0x24 + 80027e8: 6a1b ldr r3, [r3, #32] + 80027ea: 6a78 ldr r0, [r7, #36] ; 0x24 + 80027ec: 4798 blx r3 traceTIMER_EXPIRED( pxTimer ); if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 ) - 8001e0e: 6a7b ldr r3, [r7, #36] ; 0x24 - 8001e10: f893 3028 ldrb.w r3, [r3, #40] ; 0x28 - 8001e14: f003 0304 and.w r3, r3, #4 - 8001e18: 2b00 cmp r3, #0 - 8001e1a: d05c beq.n 8001ed6 + 80027ee: 6a7b ldr r3, [r7, #36] ; 0x24 + 80027f0: f893 3028 ldrb.w r3, [r3, #40] ; 0x28 + 80027f4: f003 0304 and.w r3, r3, #4 + 80027f8: 2b00 cmp r3, #0 + 80027fa: d05c beq.n 80028b6 { xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xMessage.u.xTimerParameters.xMessageValue + pxTimer->xTimerPeriodInTicks, NULL, tmrNO_DELAY ); - 8001e1c: 68fa ldr r2, [r7, #12] - 8001e1e: 6a7b ldr r3, [r7, #36] ; 0x24 - 8001e20: 699b ldr r3, [r3, #24] - 8001e22: 441a add r2, r3 - 8001e24: 2300 movs r3, #0 - 8001e26: 9300 str r3, [sp, #0] - 8001e28: 2300 movs r3, #0 - 8001e2a: 2100 movs r1, #0 - 8001e2c: 6a78 ldr r0, [r7, #36] ; 0x24 - 8001e2e: f7ff fe23 bl 8001a78 - 8001e32: 61f8 str r0, [r7, #28] + 80027fc: 68fa ldr r2, [r7, #12] + 80027fe: 6a7b ldr r3, [r7, #36] ; 0x24 + 8002800: 699b ldr r3, [r3, #24] + 8002802: 441a add r2, r3 + 8002804: 2300 movs r3, #0 + 8002806: 9300 str r3, [sp, #0] + 8002808: 2300 movs r3, #0 + 800280a: 2100 movs r1, #0 + 800280c: 6a78 ldr r0, [r7, #36] ; 0x24 + 800280e: f7ff fe23 bl 8002458 + 8002812: 61f8 str r0, [r7, #28] configASSERT( xResult ); - 8001e34: 69fb ldr r3, [r7, #28] - 8001e36: 2b00 cmp r3, #0 - 8001e38: d14d bne.n 8001ed6 - 8001e3a: f04f 0350 mov.w r3, #80 ; 0x50 - 8001e3e: f383 8811 msr BASEPRI, r3 - 8001e42: f3bf 8f6f isb sy - 8001e46: f3bf 8f4f dsb sy - 8001e4a: 61bb str r3, [r7, #24] - 8001e4c: e7fe b.n 8001e4c + 8002814: 69fb ldr r3, [r7, #28] + 8002816: 2b00 cmp r3, #0 + 8002818: d14d bne.n 80028b6 + 800281a: f04f 0350 mov.w r3, #80 ; 0x50 + 800281e: f383 8811 msr BASEPRI, r3 + 8002822: f3bf 8f6f isb sy + 8002826: f3bf 8f4f dsb sy + 800282a: 61bb str r3, [r7, #24] + 800282c: e7fe b.n 800282c break; case tmrCOMMAND_STOP: case tmrCOMMAND_STOP_FROM_ISR: /* The timer has already been removed from the active list. */ pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE; - 8001e4e: 6a7b ldr r3, [r7, #36] ; 0x24 - 8001e50: f893 3028 ldrb.w r3, [r3, #40] ; 0x28 - 8001e54: f023 0301 bic.w r3, r3, #1 - 8001e58: b2da uxtb r2, r3 - 8001e5a: 6a7b ldr r3, [r7, #36] ; 0x24 - 8001e5c: f883 2028 strb.w r2, [r3, #40] ; 0x28 + 800282e: 6a7b ldr r3, [r7, #36] ; 0x24 + 8002830: f893 3028 ldrb.w r3, [r3, #40] ; 0x28 + 8002834: f023 0301 bic.w r3, r3, #1 + 8002838: b2da uxtb r2, r3 + 800283a: 6a7b ldr r3, [r7, #36] ; 0x24 + 800283c: f883 2028 strb.w r2, [r3, #40] ; 0x28 break; - 8001e60: e039 b.n 8001ed6 + 8002840: e039 b.n 80028b6 case tmrCOMMAND_CHANGE_PERIOD: case tmrCOMMAND_CHANGE_PERIOD_FROM_ISR: pxTimer->ucStatus |= tmrSTATUS_IS_ACTIVE; - 8001e62: 6a7b ldr r3, [r7, #36] ; 0x24 - 8001e64: f893 3028 ldrb.w r3, [r3, #40] ; 0x28 - 8001e68: f043 0301 orr.w r3, r3, #1 - 8001e6c: b2da uxtb r2, r3 - 8001e6e: 6a7b ldr r3, [r7, #36] ; 0x24 - 8001e70: f883 2028 strb.w r2, [r3, #40] ; 0x28 + 8002842: 6a7b ldr r3, [r7, #36] ; 0x24 + 8002844: f893 3028 ldrb.w r3, [r3, #40] ; 0x28 + 8002848: f043 0301 orr.w r3, r3, #1 + 800284c: b2da uxtb r2, r3 + 800284e: 6a7b ldr r3, [r7, #36] ; 0x24 + 8002850: f883 2028 strb.w r2, [r3, #40] ; 0x28 pxTimer->xTimerPeriodInTicks = xMessage.u.xTimerParameters.xMessageValue; - 8001e74: 68fa ldr r2, [r7, #12] - 8001e76: 6a7b ldr r3, [r7, #36] ; 0x24 - 8001e78: 619a str r2, [r3, #24] + 8002854: 68fa ldr r2, [r7, #12] + 8002856: 6a7b ldr r3, [r7, #36] ; 0x24 + 8002858: 619a str r2, [r3, #24] configASSERT( ( pxTimer->xTimerPeriodInTicks > 0 ) ); - 8001e7a: 6a7b ldr r3, [r7, #36] ; 0x24 - 8001e7c: 699b ldr r3, [r3, #24] - 8001e7e: 2b00 cmp r3, #0 - 8001e80: d109 bne.n 8001e96 - 8001e82: f04f 0350 mov.w r3, #80 ; 0x50 - 8001e86: f383 8811 msr BASEPRI, r3 - 8001e8a: f3bf 8f6f isb sy - 8001e8e: f3bf 8f4f dsb sy - 8001e92: 617b str r3, [r7, #20] - 8001e94: e7fe b.n 8001e94 + 800285a: 6a7b ldr r3, [r7, #36] ; 0x24 + 800285c: 699b ldr r3, [r3, #24] + 800285e: 2b00 cmp r3, #0 + 8002860: d109 bne.n 8002876 + 8002862: f04f 0350 mov.w r3, #80 ; 0x50 + 8002866: f383 8811 msr BASEPRI, r3 + 800286a: f3bf 8f6f isb sy + 800286e: f3bf 8f4f dsb sy + 8002872: 617b str r3, [r7, #20] + 8002874: e7fe b.n 8002874 * be longer or shorter than the old one. The command time is * therefore set to the current time, and as the period cannot * be zero the next expiry time can only be in the future, * meaning (unlike for the xTimerStart() case above) there is * no fail case that needs to be handled here. */ ( void ) prvInsertTimerInActiveList( pxTimer, ( xTimeNow + pxTimer->xTimerPeriodInTicks ), xTimeNow, xTimeNow ); - 8001e96: 6a7b ldr r3, [r7, #36] ; 0x24 - 8001e98: 699a ldr r2, [r3, #24] - 8001e9a: 6a3b ldr r3, [r7, #32] - 8001e9c: 18d1 adds r1, r2, r3 - 8001e9e: 6a3b ldr r3, [r7, #32] - 8001ea0: 6a3a ldr r2, [r7, #32] - 8001ea2: 6a78 ldr r0, [r7, #36] ; 0x24 - 8001ea4: f7ff ff24 bl 8001cf0 + 8002876: 6a7b ldr r3, [r7, #36] ; 0x24 + 8002878: 699a ldr r2, [r3, #24] + 800287a: 6a3b ldr r3, [r7, #32] + 800287c: 18d1 adds r1, r2, r3 + 800287e: 6a3b ldr r3, [r7, #32] + 8002880: 6a3a ldr r2, [r7, #32] + 8002882: 6a78 ldr r0, [r7, #36] ; 0x24 + 8002884: f7ff ff24 bl 80026d0 break; - 8001ea8: e015 b.n 8001ed6 + 8002888: e015 b.n 80028b6 #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) { /* The timer has already been removed from the active list, * just free up the memory if the memory was dynamically * allocated. */ if( ( pxTimer->ucStatus & tmrSTATUS_IS_STATICALLY_ALLOCATED ) == ( uint8_t ) 0 ) - 8001eaa: 6a7b ldr r3, [r7, #36] ; 0x24 - 8001eac: f893 3028 ldrb.w r3, [r3, #40] ; 0x28 - 8001eb0: f003 0302 and.w r3, r3, #2 - 8001eb4: 2b00 cmp r3, #0 - 8001eb6: d103 bne.n 8001ec0 + 800288a: 6a7b ldr r3, [r7, #36] ; 0x24 + 800288c: f893 3028 ldrb.w r3, [r3, #40] ; 0x28 + 8002890: f003 0302 and.w r3, r3, #2 + 8002894: 2b00 cmp r3, #0 + 8002896: d103 bne.n 80028a0 { vPortFree( pxTimer ); - 8001eb8: 6a78 ldr r0, [r7, #36] ; 0x24 - 8001eba: f000 fbd7 bl 800266c - 8001ebe: e00a b.n 8001ed6 + 8002898: 6a78 ldr r0, [r7, #36] ; 0x24 + 800289a: f000 fbdf bl 800305c + 800289e: e00a b.n 80028b6 } else { pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE; - 8001ec0: 6a7b ldr r3, [r7, #36] ; 0x24 - 8001ec2: f893 3028 ldrb.w r3, [r3, #40] ; 0x28 - 8001ec6: f023 0301 bic.w r3, r3, #1 - 8001eca: b2da uxtb r2, r3 - 8001ecc: 6a7b ldr r3, [r7, #36] ; 0x24 - 8001ece: f883 2028 strb.w r2, [r3, #40] ; 0x28 + 80028a0: 6a7b ldr r3, [r7, #36] ; 0x24 + 80028a2: f893 3028 ldrb.w r3, [r3, #40] ; 0x28 + 80028a6: f023 0301 bic.w r3, r3, #1 + 80028aa: b2da uxtb r2, r3 + 80028ac: 6a7b ldr r3, [r7, #36] ; 0x24 + 80028ae: f883 2028 strb.w r2, [r3, #40] ; 0x28 * no need to free the memory - just mark the timer as * "not active". */ pxTimer->ucStatus &= ~tmrSTATUS_IS_ACTIVE; } #endif /* configSUPPORT_DYNAMIC_ALLOCATION */ break; - 8001ed2: e000 b.n 8001ed6 + 80028b2: e000 b.n 80028b6 default: /* Don't expect to get here. */ break; } } - 8001ed4: bf00 nop + 80028b4: bf00 nop while( xQueueReceive( xTimerQueue, &xMessage, tmrNO_DELAY ) != pdFAIL ) /*lint !e603 xMessage does not have to be initialised as it is passed out, not in, and it is not used unless xQueueReceive() returns pdTRUE. */ - 8001ed6: 4b08 ldr r3, [pc, #32] ; (8001ef8 ) - 8001ed8: 681b ldr r3, [r3, #0] - 8001eda: f107 0108 add.w r1, r7, #8 - 8001ede: 2200 movs r2, #0 - 8001ee0: 4618 mov r0, r3 - 8001ee2: f7fe fcd9 bl 8000898 - 8001ee6: 4603 mov r3, r0 - 8001ee8: 2b00 cmp r3, #0 - 8001eea: f47f af47 bne.w 8001d7c + 80028b6: 4b08 ldr r3, [pc, #32] ; (80028d8 ) + 80028b8: 681b ldr r3, [r3, #0] + 80028ba: f107 0108 add.w r1, r7, #8 + 80028be: 2200 movs r2, #0 + 80028c0: 4618 mov r0, r3 + 80028c2: f7fe f8cb bl 8000a5c + 80028c6: 4603 mov r3, r0 + 80028c8: 2b00 cmp r3, #0 + 80028ca: f47f af47 bne.w 800275c } } - 8001eee: bf00 nop - 8001ef0: 3728 adds r7, #40 ; 0x28 - 8001ef2: 46bd mov sp, r7 - 8001ef4: bd80 pop {r7, pc} - 8001ef6: bf00 nop - 8001ef8: 20000180 .word 0x20000180 - -08001efc : + 80028ce: bf00 nop + 80028d0: 3728 adds r7, #40 ; 0x28 + 80028d2: 46bd mov sp, r7 + 80028d4: bd80 pop {r7, pc} + 80028d6: bf00 nop + 80028d8: 200002d4 .word 0x200002d4 + +080028dc : /*-----------------------------------------------------------*/ static void prvSwitchTimerLists( void ) { - 8001efc: b580 push {r7, lr} - 8001efe: b088 sub sp, #32 - 8001f00: af02 add r7, sp, #8 + 80028dc: b580 push {r7, lr} + 80028de: b088 sub sp, #32 + 80028e0: af02 add r7, sp, #8 /* The tick count has overflowed. The timer lists must be switched. * If there are any timers still referenced from the current timer list * then they must have expired and should be processed before the lists * are switched. */ while( listLIST_IS_EMPTY( pxCurrentTimerList ) == pdFALSE ) - 8001f02: e047 b.n 8001f94 + 80028e2: e047 b.n 8002974 { xNextExpireTime = listGET_ITEM_VALUE_OF_HEAD_ENTRY( pxCurrentTimerList ); - 8001f04: 4b2d ldr r3, [pc, #180] ; (8001fbc ) - 8001f06: 681b ldr r3, [r3, #0] - 8001f08: 68db ldr r3, [r3, #12] - 8001f0a: 681b ldr r3, [r3, #0] - 8001f0c: 613b str r3, [r7, #16] + 80028e4: 4b2d ldr r3, [pc, #180] ; (800299c ) + 80028e6: 681b ldr r3, [r3, #0] + 80028e8: 68db ldr r3, [r3, #12] + 80028ea: 681b ldr r3, [r3, #0] + 80028ec: 613b str r3, [r7, #16] /* Remove the timer from the list. */ pxTimer = ( Timer_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxCurrentTimerList ); /*lint !e9087 !e9079 void * is used as this macro is used with tasks and co-routines too. Alignment is known to be fine as the type of the pointer stored and retrieved is the same. */ - 8001f0e: 4b2b ldr r3, [pc, #172] ; (8001fbc ) - 8001f10: 681b ldr r3, [r3, #0] - 8001f12: 68db ldr r3, [r3, #12] - 8001f14: 68db ldr r3, [r3, #12] - 8001f16: 60fb str r3, [r7, #12] + 80028ee: 4b2b ldr r3, [pc, #172] ; (800299c ) + 80028f0: 681b ldr r3, [r3, #0] + 80028f2: 68db ldr r3, [r3, #12] + 80028f4: 68db ldr r3, [r3, #12] + 80028f6: 60fb str r3, [r7, #12] ( void ) uxListRemove( &( pxTimer->xTimerListItem ) ); - 8001f18: 68fb ldr r3, [r7, #12] - 8001f1a: 3304 adds r3, #4 - 8001f1c: 4618 mov r0, r3 - 8001f1e: f7fe fa09 bl 8000334 + 80028f8: 68fb ldr r3, [r7, #12] + 80028fa: 3304 adds r3, #4 + 80028fc: 4618 mov r0, r3 + 80028fe: f7fd fdb9 bl 8000474 traceTIMER_EXPIRED( pxTimer ); /* Execute its callback, then send a command to restart the timer if * it is an auto-reload timer. It cannot be restarted here as the lists * have not yet been switched. */ pxTimer->pxCallbackFunction( ( TimerHandle_t ) pxTimer ); - 8001f22: 68fb ldr r3, [r7, #12] - 8001f24: 6a1b ldr r3, [r3, #32] - 8001f26: 68f8 ldr r0, [r7, #12] - 8001f28: 4798 blx r3 + 8002902: 68fb ldr r3, [r7, #12] + 8002904: 6a1b ldr r3, [r3, #32] + 8002906: 68f8 ldr r0, [r7, #12] + 8002908: 4798 blx r3 if( ( pxTimer->ucStatus & tmrSTATUS_IS_AUTORELOAD ) != 0 ) - 8001f2a: 68fb ldr r3, [r7, #12] - 8001f2c: f893 3028 ldrb.w r3, [r3, #40] ; 0x28 - 8001f30: f003 0304 and.w r3, r3, #4 - 8001f34: 2b00 cmp r3, #0 - 8001f36: d02d beq.n 8001f94 + 800290a: 68fb ldr r3, [r7, #12] + 800290c: f893 3028 ldrb.w r3, [r3, #40] ; 0x28 + 8002910: f003 0304 and.w r3, r3, #4 + 8002914: 2b00 cmp r3, #0 + 8002916: d02d beq.n 8002974 * the timer going into the same timer list then it has already expired * and the timer should be re-inserted into the current list so it is * processed again within this loop. Otherwise a command should be sent * to restart the timer to ensure it is only inserted into a list after * the lists have been swapped. */ xReloadTime = ( xNextExpireTime + pxTimer->xTimerPeriodInTicks ); - 8001f38: 68fb ldr r3, [r7, #12] - 8001f3a: 699b ldr r3, [r3, #24] - 8001f3c: 693a ldr r2, [r7, #16] - 8001f3e: 4413 add r3, r2 - 8001f40: 60bb str r3, [r7, #8] + 8002918: 68fb ldr r3, [r7, #12] + 800291a: 699b ldr r3, [r3, #24] + 800291c: 693a ldr r2, [r7, #16] + 800291e: 4413 add r3, r2 + 8002920: 60bb str r3, [r7, #8] if( xReloadTime > xNextExpireTime ) - 8001f42: 68ba ldr r2, [r7, #8] - 8001f44: 693b ldr r3, [r7, #16] - 8001f46: 429a cmp r2, r3 - 8001f48: d90e bls.n 8001f68 + 8002922: 68ba ldr r2, [r7, #8] + 8002924: 693b ldr r3, [r7, #16] + 8002926: 429a cmp r2, r3 + 8002928: d90e bls.n 8002948 { listSET_LIST_ITEM_VALUE( &( pxTimer->xTimerListItem ), xReloadTime ); - 8001f4a: 68fb ldr r3, [r7, #12] - 8001f4c: 68ba ldr r2, [r7, #8] - 8001f4e: 605a str r2, [r3, #4] + 800292a: 68fb ldr r3, [r7, #12] + 800292c: 68ba ldr r2, [r7, #8] + 800292e: 605a str r2, [r3, #4] listSET_LIST_ITEM_OWNER( &( pxTimer->xTimerListItem ), pxTimer ); - 8001f50: 68fb ldr r3, [r7, #12] - 8001f52: 68fa ldr r2, [r7, #12] - 8001f54: 611a str r2, [r3, #16] + 8002930: 68fb ldr r3, [r7, #12] + 8002932: 68fa ldr r2, [r7, #12] + 8002934: 611a str r2, [r3, #16] vListInsert( pxCurrentTimerList, &( pxTimer->xTimerListItem ) ); - 8001f56: 4b19 ldr r3, [pc, #100] ; (8001fbc ) - 8001f58: 681a ldr r2, [r3, #0] - 8001f5a: 68fb ldr r3, [r7, #12] - 8001f5c: 3304 adds r3, #4 - 8001f5e: 4619 mov r1, r3 - 8001f60: 4610 mov r0, r2 - 8001f62: f7fe f9ae bl 80002c2 - 8001f66: e015 b.n 8001f94 + 8002936: 4b19 ldr r3, [pc, #100] ; (800299c ) + 8002938: 681a ldr r2, [r3, #0] + 800293a: 68fb ldr r3, [r7, #12] + 800293c: 3304 adds r3, #4 + 800293e: 4619 mov r1, r3 + 8002940: 4610 mov r0, r2 + 8002942: f7fd fd5e bl 8000402 + 8002946: e015 b.n 8002974 } else { xResult = xTimerGenericCommand( pxTimer, tmrCOMMAND_START_DONT_TRACE, xNextExpireTime, NULL, tmrNO_DELAY ); - 8001f68: 2300 movs r3, #0 - 8001f6a: 9300 str r3, [sp, #0] - 8001f6c: 2300 movs r3, #0 - 8001f6e: 693a ldr r2, [r7, #16] - 8001f70: 2100 movs r1, #0 - 8001f72: 68f8 ldr r0, [r7, #12] - 8001f74: f7ff fd80 bl 8001a78 - 8001f78: 6078 str r0, [r7, #4] + 8002948: 2300 movs r3, #0 + 800294a: 9300 str r3, [sp, #0] + 800294c: 2300 movs r3, #0 + 800294e: 693a ldr r2, [r7, #16] + 8002950: 2100 movs r1, #0 + 8002952: 68f8 ldr r0, [r7, #12] + 8002954: f7ff fd80 bl 8002458 + 8002958: 6078 str r0, [r7, #4] configASSERT( xResult ); - 8001f7a: 687b ldr r3, [r7, #4] - 8001f7c: 2b00 cmp r3, #0 - 8001f7e: d109 bne.n 8001f94 - 8001f80: f04f 0350 mov.w r3, #80 ; 0x50 - 8001f84: f383 8811 msr BASEPRI, r3 - 8001f88: f3bf 8f6f isb sy - 8001f8c: f3bf 8f4f dsb sy - 8001f90: 603b str r3, [r7, #0] - 8001f92: e7fe b.n 8001f92 + 800295a: 687b ldr r3, [r7, #4] + 800295c: 2b00 cmp r3, #0 + 800295e: d109 bne.n 8002974 + 8002960: f04f 0350 mov.w r3, #80 ; 0x50 + 8002964: f383 8811 msr BASEPRI, r3 + 8002968: f3bf 8f6f isb sy + 800296c: f3bf 8f4f dsb sy + 8002970: 603b str r3, [r7, #0] + 8002972: e7fe b.n 8002972 while( listLIST_IS_EMPTY( pxCurrentTimerList ) == pdFALSE ) - 8001f94: 4b09 ldr r3, [pc, #36] ; (8001fbc ) - 8001f96: 681b ldr r3, [r3, #0] - 8001f98: 681b ldr r3, [r3, #0] - 8001f9a: 2b00 cmp r3, #0 - 8001f9c: d1b2 bne.n 8001f04 + 8002974: 4b09 ldr r3, [pc, #36] ; (800299c ) + 8002976: 681b ldr r3, [r3, #0] + 8002978: 681b ldr r3, [r3, #0] + 800297a: 2b00 cmp r3, #0 + 800297c: d1b2 bne.n 80028e4 { mtCOVERAGE_TEST_MARKER(); } } pxTemp = pxCurrentTimerList; - 8001f9e: 4b07 ldr r3, [pc, #28] ; (8001fbc ) - 8001fa0: 681b ldr r3, [r3, #0] - 8001fa2: 617b str r3, [r7, #20] + 800297e: 4b07 ldr r3, [pc, #28] ; (800299c ) + 8002980: 681b ldr r3, [r3, #0] + 8002982: 617b str r3, [r7, #20] pxCurrentTimerList = pxOverflowTimerList; - 8001fa4: 4b06 ldr r3, [pc, #24] ; (8001fc0 ) - 8001fa6: 681b ldr r3, [r3, #0] - 8001fa8: 4a04 ldr r2, [pc, #16] ; (8001fbc ) - 8001faa: 6013 str r3, [r2, #0] + 8002984: 4b06 ldr r3, [pc, #24] ; (80029a0 ) + 8002986: 681b ldr r3, [r3, #0] + 8002988: 4a04 ldr r2, [pc, #16] ; (800299c ) + 800298a: 6013 str r3, [r2, #0] pxOverflowTimerList = pxTemp; - 8001fac: 4a04 ldr r2, [pc, #16] ; (8001fc0 ) - 8001fae: 697b ldr r3, [r7, #20] - 8001fb0: 6013 str r3, [r2, #0] + 800298c: 4a04 ldr r2, [pc, #16] ; (80029a0 ) + 800298e: 697b ldr r3, [r7, #20] + 8002990: 6013 str r3, [r2, #0] } - 8001fb2: bf00 nop - 8001fb4: 3718 adds r7, #24 - 8001fb6: 46bd mov sp, r7 - 8001fb8: bd80 pop {r7, pc} - 8001fba: bf00 nop - 8001fbc: 20000178 .word 0x20000178 - 8001fc0: 2000017c .word 0x2000017c - -08001fc4 : + 8002992: bf00 nop + 8002994: 3718 adds r7, #24 + 8002996: 46bd mov sp, r7 + 8002998: bd80 pop {r7, pc} + 800299a: bf00 nop + 800299c: 200002cc .word 0x200002cc + 80029a0: 200002d0 .word 0x200002d0 + +080029a4 : /*-----------------------------------------------------------*/ static void prvCheckForValidListAndQueue( void ) { - 8001fc4: b580 push {r7, lr} - 8001fc6: af00 add r7, sp, #0 + 80029a4: b580 push {r7, lr} + 80029a6: af00 add r7, sp, #0 /* Check that the list from which active timers are referenced, and the * queue used to communicate with the timer service, have been * initialised. */ taskENTER_CRITICAL(); - 8001fc8: f000 f95a bl 8002280 + 80029a8: f000 f95a bl 8002c60 { if( xTimerQueue == NULL ) - 8001fcc: 4b12 ldr r3, [pc, #72] ; (8002018 ) - 8001fce: 681b ldr r3, [r3, #0] - 8001fd0: 2b00 cmp r3, #0 - 8001fd2: d11d bne.n 8002010 + 80029ac: 4b12 ldr r3, [pc, #72] ; (80029f8 ) + 80029ae: 681b ldr r3, [r3, #0] + 80029b0: 2b00 cmp r3, #0 + 80029b2: d11d bne.n 80029f0 { vListInitialise( &xActiveTimerList1 ); - 8001fd4: 4811 ldr r0, [pc, #68] ; (800201c ) - 8001fd6: f7fe f923 bl 8000220 + 80029b4: 4811 ldr r0, [pc, #68] ; (80029fc ) + 80029b6: f7fd fcd3 bl 8000360 vListInitialise( &xActiveTimerList2 ); - 8001fda: 4811 ldr r0, [pc, #68] ; (8002020 ) - 8001fdc: f7fe f920 bl 8000220 + 80029ba: 4811 ldr r0, [pc, #68] ; (8002a00 ) + 80029bc: f7fd fcd0 bl 8000360 pxCurrentTimerList = &xActiveTimerList1; - 8001fe0: 4b10 ldr r3, [pc, #64] ; (8002024 ) - 8001fe2: 4a0e ldr r2, [pc, #56] ; (800201c ) - 8001fe4: 601a str r2, [r3, #0] + 80029c0: 4b10 ldr r3, [pc, #64] ; (8002a04 ) + 80029c2: 4a0e ldr r2, [pc, #56] ; (80029fc ) + 80029c4: 601a str r2, [r3, #0] pxOverflowTimerList = &xActiveTimerList2; - 8001fe6: 4b10 ldr r3, [pc, #64] ; (8002028 ) - 8001fe8: 4a0d ldr r2, [pc, #52] ; (8002020 ) - 8001fea: 601a str r2, [r3, #0] + 80029c6: 4b10 ldr r3, [pc, #64] ; (8002a08 ) + 80029c8: 4a0d ldr r2, [pc, #52] ; (8002a00 ) + 80029ca: 601a str r2, [r3, #0] xTimerQueue = xQueueCreateStatic( ( UBaseType_t ) configTIMER_QUEUE_LENGTH, ( UBaseType_t ) sizeof( DaemonTaskMessage_t ), &( ucStaticTimerQueueStorage[ 0 ] ), &xStaticTimerQueue ); } #else { xTimerQueue = xQueueCreate( ( UBaseType_t ) configTIMER_QUEUE_LENGTH, sizeof( DaemonTaskMessage_t ) ); - 8001fec: 2200 movs r2, #0 - 8001fee: 210c movs r1, #12 - 8001ff0: 200a movs r0, #10 - 8001ff2: f7fe fa31 bl 8000458 - 8001ff6: 4602 mov r2, r0 - 8001ff8: 4b07 ldr r3, [pc, #28] ; (8002018 ) - 8001ffa: 601a str r2, [r3, #0] + 80029cc: 2200 movs r2, #0 + 80029ce: 210c movs r1, #12 + 80029d0: 200a movs r0, #10 + 80029d2: f7fd fde1 bl 8000598 + 80029d6: 4602 mov r2, r0 + 80029d8: 4b07 ldr r3, [pc, #28] ; (80029f8 ) + 80029da: 601a str r2, [r3, #0] } #endif /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */ #if ( configQUEUE_REGISTRY_SIZE > 0 ) { if( xTimerQueue != NULL ) - 8001ffc: 4b06 ldr r3, [pc, #24] ; (8002018 ) - 8001ffe: 681b ldr r3, [r3, #0] - 8002000: 2b00 cmp r3, #0 - 8002002: d005 beq.n 8002010 + 80029dc: 4b06 ldr r3, [pc, #24] ; (80029f8 ) + 80029de: 681b ldr r3, [r3, #0] + 80029e0: 2b00 cmp r3, #0 + 80029e2: d005 beq.n 80029f0 { vQueueAddToRegistry( xTimerQueue, "TmrQ" ); - 8002004: 4b04 ldr r3, [pc, #16] ; (8002018 ) - 8002006: 681b ldr r3, [r3, #0] - 8002008: 4908 ldr r1, [pc, #32] ; (800202c ) - 800200a: 4618 mov r0, r3 - 800200c: f7fe fe30 bl 8000c70 + 80029e4: 4b04 ldr r3, [pc, #16] ; (80029f8 ) + 80029e6: 681b ldr r3, [r3, #0] + 80029e8: 4908 ldr r1, [pc, #32] ; (8002a0c ) + 80029ea: 4618 mov r0, r3 + 80029ec: f7fe fa5a bl 8000ea4 else { mtCOVERAGE_TEST_MARKER(); } } taskEXIT_CRITICAL(); - 8002010: f000 f964 bl 80022dc + 80029f0: f000 f964 bl 8002cbc } - 8002014: bf00 nop - 8002016: bd80 pop {r7, pc} - 8002018: 20000180 .word 0x20000180 - 800201c: 20000150 .word 0x20000150 - 8002020: 20000164 .word 0x20000164 - 8002024: 20000178 .word 0x20000178 - 8002028: 2000017c .word 0x2000017c - 800202c: 08003594 .word 0x08003594 - -08002030 : + 80029f4: bf00 nop + 80029f6: bd80 pop {r7, pc} + 80029f8: 200002d4 .word 0x200002d4 + 80029fc: 200002a4 .word 0x200002a4 + 8002a00: 200002b8 .word 0x200002b8 + 8002a04: 200002cc .word 0x200002cc + 8002a08: 200002d0 .word 0x200002d0 + 8002a0c: 08006bcc .word 0x08006bcc + +08002a10 : * See header file for description. */ StackType_t * pxPortInitialiseStack( StackType_t * pxTopOfStack, TaskFunction_t pxCode, void * pvParameters ) { - 8002030: b480 push {r7} - 8002032: b085 sub sp, #20 - 8002034: af00 add r7, sp, #0 - 8002036: 60f8 str r0, [r7, #12] - 8002038: 60b9 str r1, [r7, #8] - 800203a: 607a str r2, [r7, #4] + 8002a10: b480 push {r7} + 8002a12: b085 sub sp, #20 + 8002a14: af00 add r7, sp, #0 + 8002a16: 60f8 str r0, [r7, #12] + 8002a18: 60b9 str r1, [r7, #8] + 8002a1a: 607a str r2, [r7, #4] /* Simulate the stack frame as it would be created by a context switch * interrupt. */ /* Offset added to account for the way the MCU uses the stack on entry/exit * of interrupts, and to ensure alignment. */ pxTopOfStack--; - 800203c: 68fb ldr r3, [r7, #12] - 800203e: 3b04 subs r3, #4 - 8002040: 60fb str r3, [r7, #12] + 8002a1c: 68fb ldr r3, [r7, #12] + 8002a1e: 3b04 subs r3, #4 + 8002a20: 60fb str r3, [r7, #12] *pxTopOfStack = portINITIAL_XPSR; /* xPSR */ - 8002042: 68fb ldr r3, [r7, #12] - 8002044: f04f 7280 mov.w r2, #16777216 ; 0x1000000 - 8002048: 601a str r2, [r3, #0] + 8002a22: 68fb ldr r3, [r7, #12] + 8002a24: f04f 7280 mov.w r2, #16777216 ; 0x1000000 + 8002a28: 601a str r2, [r3, #0] pxTopOfStack--; - 800204a: 68fb ldr r3, [r7, #12] - 800204c: 3b04 subs r3, #4 - 800204e: 60fb str r3, [r7, #12] + 8002a2a: 68fb ldr r3, [r7, #12] + 8002a2c: 3b04 subs r3, #4 + 8002a2e: 60fb str r3, [r7, #12] *pxTopOfStack = ( ( StackType_t ) pxCode ) & portSTART_ADDRESS_MASK; /* PC */ - 8002050: 68bb ldr r3, [r7, #8] - 8002052: f023 0201 bic.w r2, r3, #1 - 8002056: 68fb ldr r3, [r7, #12] - 8002058: 601a str r2, [r3, #0] + 8002a30: 68bb ldr r3, [r7, #8] + 8002a32: f023 0201 bic.w r2, r3, #1 + 8002a36: 68fb ldr r3, [r7, #12] + 8002a38: 601a str r2, [r3, #0] pxTopOfStack--; - 800205a: 68fb ldr r3, [r7, #12] - 800205c: 3b04 subs r3, #4 - 800205e: 60fb str r3, [r7, #12] + 8002a3a: 68fb ldr r3, [r7, #12] + 8002a3c: 3b04 subs r3, #4 + 8002a3e: 60fb str r3, [r7, #12] *pxTopOfStack = ( StackType_t ) portTASK_RETURN_ADDRESS; /* LR */ - 8002060: 4a0c ldr r2, [pc, #48] ; (8002094 ) - 8002062: 68fb ldr r3, [r7, #12] - 8002064: 601a str r2, [r3, #0] + 8002a40: 4a0c ldr r2, [pc, #48] ; (8002a74 ) + 8002a42: 68fb ldr r3, [r7, #12] + 8002a44: 601a str r2, [r3, #0] /* Save code space by skipping register initialisation. */ pxTopOfStack -= 5; /* R12, R3, R2 and R1. */ - 8002066: 68fb ldr r3, [r7, #12] - 8002068: 3b14 subs r3, #20 - 800206a: 60fb str r3, [r7, #12] + 8002a46: 68fb ldr r3, [r7, #12] + 8002a48: 3b14 subs r3, #20 + 8002a4a: 60fb str r3, [r7, #12] *pxTopOfStack = ( StackType_t ) pvParameters; /* R0 */ - 800206c: 687a ldr r2, [r7, #4] - 800206e: 68fb ldr r3, [r7, #12] - 8002070: 601a str r2, [r3, #0] + 8002a4c: 687a ldr r2, [r7, #4] + 8002a4e: 68fb ldr r3, [r7, #12] + 8002a50: 601a str r2, [r3, #0] /* A save method is being used that requires each task to maintain its * own exec return value. */ pxTopOfStack--; - 8002072: 68fb ldr r3, [r7, #12] - 8002074: 3b04 subs r3, #4 - 8002076: 60fb str r3, [r7, #12] + 8002a52: 68fb ldr r3, [r7, #12] + 8002a54: 3b04 subs r3, #4 + 8002a56: 60fb str r3, [r7, #12] *pxTopOfStack = portINITIAL_EXC_RETURN; - 8002078: 68fb ldr r3, [r7, #12] - 800207a: f06f 0202 mvn.w r2, #2 - 800207e: 601a str r2, [r3, #0] + 8002a58: 68fb ldr r3, [r7, #12] + 8002a5a: f06f 0202 mvn.w r2, #2 + 8002a5e: 601a str r2, [r3, #0] pxTopOfStack -= 8; /* R11, R10, R9, R8, R7, R6, R5 and R4. */ - 8002080: 68fb ldr r3, [r7, #12] - 8002082: 3b20 subs r3, #32 - 8002084: 60fb str r3, [r7, #12] + 8002a60: 68fb ldr r3, [r7, #12] + 8002a62: 3b20 subs r3, #32 + 8002a64: 60fb str r3, [r7, #12] return pxTopOfStack; - 8002086: 68fb ldr r3, [r7, #12] + 8002a66: 68fb ldr r3, [r7, #12] } - 8002088: 4618 mov r0, r3 - 800208a: 3714 adds r7, #20 - 800208c: 46bd mov sp, r7 - 800208e: f85d 7b04 ldr.w r7, [sp], #4 - 8002092: 4770 bx lr - 8002094: 08002099 .word 0x08002099 - -08002098 : + 8002a68: 4618 mov r0, r3 + 8002a6a: 3714 adds r7, #20 + 8002a6c: 46bd mov sp, r7 + 8002a6e: f85d 7b04 ldr.w r7, [sp], #4 + 8002a72: 4770 bx lr + 8002a74: 08002a79 .word 0x08002a79 + +08002a78 : /*-----------------------------------------------------------*/ static void prvTaskExitError( void ) { - 8002098: b480 push {r7} - 800209a: b085 sub sp, #20 - 800209c: af00 add r7, sp, #0 + 8002a78: b480 push {r7} + 8002a7a: b085 sub sp, #20 + 8002a7c: af00 add r7, sp, #0 volatile uint32_t ulDummy = 0; - 800209e: 2300 movs r3, #0 - 80020a0: 607b str r3, [r7, #4] + 8002a7e: 2300 movs r3, #0 + 8002a80: 607b str r3, [r7, #4] * its caller as there is nothing to return to. If a task wants to exit it * should instead call vTaskDelete( NULL ). * * Artificially force an assert() to be triggered if configASSERT() is * defined, then stop here so application writers can catch the error. */ configASSERT( uxCriticalNesting == ~0UL ); - 80020a2: 4b11 ldr r3, [pc, #68] ; (80020e8 ) - 80020a4: 681b ldr r3, [r3, #0] - 80020a6: f1b3 3fff cmp.w r3, #4294967295 ; 0xffffffff - 80020aa: d009 beq.n 80020c0 - 80020ac: f04f 0350 mov.w r3, #80 ; 0x50 - 80020b0: f383 8811 msr BASEPRI, r3 - 80020b4: f3bf 8f6f isb sy - 80020b8: f3bf 8f4f dsb sy - 80020bc: 60fb str r3, [r7, #12] - 80020be: e7fe b.n 80020be - 80020c0: f04f 0350 mov.w r3, #80 ; 0x50 - 80020c4: f383 8811 msr BASEPRI, r3 - 80020c8: f3bf 8f6f isb sy - 80020cc: f3bf 8f4f dsb sy - 80020d0: 60bb str r3, [r7, #8] + 8002a82: 4b11 ldr r3, [pc, #68] ; (8002ac8 ) + 8002a84: 681b ldr r3, [r3, #0] + 8002a86: f1b3 3fff cmp.w r3, #4294967295 ; 0xffffffff + 8002a8a: d009 beq.n 8002aa0 + 8002a8c: f04f 0350 mov.w r3, #80 ; 0x50 + 8002a90: f383 8811 msr BASEPRI, r3 + 8002a94: f3bf 8f6f isb sy + 8002a98: f3bf 8f4f dsb sy + 8002a9c: 60fb str r3, [r7, #12] + 8002a9e: e7fe b.n 8002a9e + 8002aa0: f04f 0350 mov.w r3, #80 ; 0x50 + 8002aa4: f383 8811 msr BASEPRI, r3 + 8002aa8: f3bf 8f6f isb sy + 8002aac: f3bf 8f4f dsb sy + 8002ab0: 60bb str r3, [r7, #8] portDISABLE_INTERRUPTS(); while( ulDummy == 0 ) - 80020d2: bf00 nop - 80020d4: 687b ldr r3, [r7, #4] - 80020d6: 2b00 cmp r3, #0 - 80020d8: d0fc beq.n 80020d4 + 8002ab2: bf00 nop + 8002ab4: 687b ldr r3, [r7, #4] + 8002ab6: 2b00 cmp r3, #0 + 8002ab8: d0fc beq.n 8002ab4 * about code appearing after this function is called - making ulDummy * volatile makes the compiler think the function could return and * therefore not output an 'unreachable code' warning for code that appears * after it. */ } } - 80020da: bf00 nop - 80020dc: 3714 adds r7, #20 - 80020de: 46bd mov sp, r7 - 80020e0: f85d 7b04 ldr.w r7, [sp], #4 - 80020e4: 4770 bx lr - 80020e6: bf00 nop - 80020e8: 20000004 .word 0x20000004 - 80020ec: 00000000 .word 0x00000000 - -080020f0 : + 8002aba: bf00 nop + 8002abc: 3714 adds r7, #20 + 8002abe: 46bd mov sp, r7 + 8002ac0: f85d 7b04 ldr.w r7, [sp], #4 + 8002ac4: 4770 bx lr + 8002ac6: bf00 nop + 8002ac8: 20000004 .word 0x20000004 + 8002acc: 00000000 .word 0x00000000 + +08002ad0 : /*-----------------------------------------------------------*/ void vPortSVCHandler( void ) { __asm volatile ( - 80020f0: 4b07 ldr r3, [pc, #28] ; (8002110 ) - 80020f2: 6819 ldr r1, [r3, #0] - 80020f4: 6808 ldr r0, [r1, #0] - 80020f6: e8b0 4ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} - 80020fa: f380 8809 msr PSP, r0 - 80020fe: f3bf 8f6f isb sy - 8002102: f04f 0000 mov.w r0, #0 - 8002106: f380 8811 msr BASEPRI, r0 - 800210a: 4770 bx lr - 800210c: f3af 8000 nop.w - -08002110 : - 8002110: 2000004c .word 0x2000004c + 8002ad0: 4b07 ldr r3, [pc, #28] ; (8002af0 ) + 8002ad2: 6819 ldr r1, [r3, #0] + 8002ad4: 6808 ldr r0, [r1, #0] + 8002ad6: e8b0 4ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} + 8002ada: f380 8809 msr PSP, r0 + 8002ade: f3bf 8f6f isb sy + 8002ae2: f04f 0000 mov.w r0, #0 + 8002ae6: f380 8811 msr BASEPRI, r0 + 8002aea: 4770 bx lr + 8002aec: f3af 8000 nop.w + +08002af0 : + 8002af0: 200001a0 .word 0x200001a0 " bx r14 \n" " \n" " .align 4 \n" "pxCurrentTCBConst2: .word pxCurrentTCB \n" ); } - 8002114: bf00 nop - 8002116: bf00 nop + 8002af4: bf00 nop + 8002af6: bf00 nop -08002118 : +08002af8 : { /* Start the first task. This also clears the bit that indicates the FPU is * in use in case the FPU was used before the scheduler was started - which * would otherwise result in the unnecessary leaving of space in the SVC stack * for lazy saving of FPU registers. */ __asm volatile ( - 8002118: 4808 ldr r0, [pc, #32] ; (800213c ) - 800211a: 6800 ldr r0, [r0, #0] - 800211c: 6800 ldr r0, [r0, #0] - 800211e: f380 8808 msr MSP, r0 - 8002122: f04f 0000 mov.w r0, #0 - 8002126: f380 8814 msr CONTROL, r0 - 800212a: b662 cpsie i - 800212c: b661 cpsie f - 800212e: f3bf 8f4f dsb sy - 8002132: f3bf 8f6f isb sy - 8002136: df00 svc 0 - 8002138: bf00 nop - 800213a: 0000 .short 0x0000 - 800213c: e000ed08 .word 0xe000ed08 + 8002af8: 4808 ldr r0, [pc, #32] ; (8002b1c ) + 8002afa: 6800 ldr r0, [r0, #0] + 8002afc: 6800 ldr r0, [r0, #0] + 8002afe: f380 8808 msr MSP, r0 + 8002b02: f04f 0000 mov.w r0, #0 + 8002b06: f380 8814 msr CONTROL, r0 + 8002b0a: b662 cpsie i + 8002b0c: b661 cpsie f + 8002b0e: f3bf 8f4f dsb sy + 8002b12: f3bf 8f6f isb sy + 8002b16: df00 svc 0 + 8002b18: bf00 nop + 8002b1a: 0000 .short 0x0000 + 8002b1c: e000ed08 .word 0xe000ed08 " isb \n" " svc 0 \n"/* System call to start first task. */ " nop \n" " .ltorg \n" ); } - 8002140: bf00 nop - 8002142: bf00 nop + 8002b20: bf00 nop + 8002b22: bf00 nop -08002144 : +08002b24 : /* * See header file for description. */ BaseType_t xPortStartScheduler( void ) { - 8002144: b580 push {r7, lr} - 8002146: b086 sub sp, #24 - 8002148: af00 add r7, sp, #0 + 8002b24: b580 push {r7, lr} + 8002b26: b086 sub sp, #24 + 8002b28: af00 add r7, sp, #0 configASSERT( configMAX_SYSCALL_INTERRUPT_PRIORITY ); /* This port can be used on all revisions of the Cortex-M7 core other than * the r0p1 parts. r0p1 parts should use the port from the * /source/portable/GCC/ARM_CM7/r0p1 directory. */ configASSERT( portCPUID != portCORTEX_M7_r0p1_ID ); - 800214a: 4b44 ldr r3, [pc, #272] ; (800225c ) - 800214c: 681b ldr r3, [r3, #0] - 800214e: 4a44 ldr r2, [pc, #272] ; (8002260 ) - 8002150: 4293 cmp r3, r2 - 8002152: d109 bne.n 8002168 - 8002154: f04f 0350 mov.w r3, #80 ; 0x50 - 8002158: f383 8811 msr BASEPRI, r3 - 800215c: f3bf 8f6f isb sy - 8002160: f3bf 8f4f dsb sy - 8002164: 613b str r3, [r7, #16] - 8002166: e7fe b.n 8002166 + 8002b2a: 4b44 ldr r3, [pc, #272] ; (8002c3c ) + 8002b2c: 681b ldr r3, [r3, #0] + 8002b2e: 4a44 ldr r2, [pc, #272] ; (8002c40 ) + 8002b30: 4293 cmp r3, r2 + 8002b32: d109 bne.n 8002b48 + 8002b34: f04f 0350 mov.w r3, #80 ; 0x50 + 8002b38: f383 8811 msr BASEPRI, r3 + 8002b3c: f3bf 8f6f isb sy + 8002b40: f3bf 8f4f dsb sy + 8002b44: 613b str r3, [r7, #16] + 8002b46: e7fe b.n 8002b46 configASSERT( portCPUID != portCORTEX_M7_r0p0_ID ); - 8002168: 4b3c ldr r3, [pc, #240] ; (800225c ) - 800216a: 681b ldr r3, [r3, #0] - 800216c: 4a3d ldr r2, [pc, #244] ; (8002264 ) - 800216e: 4293 cmp r3, r2 - 8002170: d109 bne.n 8002186 - 8002172: f04f 0350 mov.w r3, #80 ; 0x50 - 8002176: f383 8811 msr BASEPRI, r3 - 800217a: f3bf 8f6f isb sy - 800217e: f3bf 8f4f dsb sy - 8002182: 60fb str r3, [r7, #12] - 8002184: e7fe b.n 8002184 + 8002b48: 4b3c ldr r3, [pc, #240] ; (8002c3c ) + 8002b4a: 681b ldr r3, [r3, #0] + 8002b4c: 4a3d ldr r2, [pc, #244] ; (8002c44 ) + 8002b4e: 4293 cmp r3, r2 + 8002b50: d109 bne.n 8002b66 + 8002b52: f04f 0350 mov.w r3, #80 ; 0x50 + 8002b56: f383 8811 msr BASEPRI, r3 + 8002b5a: f3bf 8f6f isb sy + 8002b5e: f3bf 8f4f dsb sy + 8002b62: 60fb str r3, [r7, #12] + 8002b64: e7fe b.n 8002b64 #if ( configASSERT_DEFINED == 1 ) { volatile uint32_t ulOriginalPriority; volatile uint8_t * const pucFirstUserPriorityRegister = ( volatile uint8_t * const ) ( portNVIC_IP_REGISTERS_OFFSET_16 + portFIRST_USER_INTERRUPT_NUMBER ); - 8002186: 4b38 ldr r3, [pc, #224] ; (8002268 ) - 8002188: 617b str r3, [r7, #20] + 8002b66: 4b38 ldr r3, [pc, #224] ; (8002c48 ) + 8002b68: 617b str r3, [r7, #20] * functions can be called. ISR safe functions are those that end in * "FromISR". FreeRTOS maintains separate thread and ISR API functions to * ensure interrupt entry is as fast and simple as possible. * * Save the interrupt priority value that is about to be clobbered. */ ulOriginalPriority = *pucFirstUserPriorityRegister; - 800218a: 697b ldr r3, [r7, #20] - 800218c: 781b ldrb r3, [r3, #0] - 800218e: b2db uxtb r3, r3 - 8002190: 607b str r3, [r7, #4] + 8002b6a: 697b ldr r3, [r7, #20] + 8002b6c: 781b ldrb r3, [r3, #0] + 8002b6e: b2db uxtb r3, r3 + 8002b70: 607b str r3, [r7, #4] /* Determine the number of priority bits available. First write to all * possible bits. */ *pucFirstUserPriorityRegister = portMAX_8_BIT_VALUE; - 8002192: 697b ldr r3, [r7, #20] - 8002194: 22ff movs r2, #255 ; 0xff - 8002196: 701a strb r2, [r3, #0] + 8002b72: 697b ldr r3, [r7, #20] + 8002b74: 22ff movs r2, #255 ; 0xff + 8002b76: 701a strb r2, [r3, #0] /* Read the value back to see how many bits stuck. */ ucMaxPriorityValue = *pucFirstUserPriorityRegister; - 8002198: 697b ldr r3, [r7, #20] - 800219a: 781b ldrb r3, [r3, #0] - 800219c: b2db uxtb r3, r3 - 800219e: 70fb strb r3, [r7, #3] + 8002b78: 697b ldr r3, [r7, #20] + 8002b7a: 781b ldrb r3, [r3, #0] + 8002b7c: b2db uxtb r3, r3 + 8002b7e: 70fb strb r3, [r7, #3] /* Use the same mask on the maximum system call priority. */ ucMaxSysCallPriority = configMAX_SYSCALL_INTERRUPT_PRIORITY & ucMaxPriorityValue; - 80021a0: 78fb ldrb r3, [r7, #3] - 80021a2: b2db uxtb r3, r3 - 80021a4: f003 0350 and.w r3, r3, #80 ; 0x50 - 80021a8: b2da uxtb r2, r3 - 80021aa: 4b30 ldr r3, [pc, #192] ; (800226c ) - 80021ac: 701a strb r2, [r3, #0] + 8002b80: 78fb ldrb r3, [r7, #3] + 8002b82: b2db uxtb r3, r3 + 8002b84: f003 0350 and.w r3, r3, #80 ; 0x50 + 8002b88: b2da uxtb r2, r3 + 8002b8a: 4b30 ldr r3, [pc, #192] ; (8002c4c ) + 8002b8c: 701a strb r2, [r3, #0] /* Calculate the maximum acceptable priority group value for the number * of bits read back. */ ulMaxPRIGROUPValue = portMAX_PRIGROUP_BITS; - 80021ae: 4b30 ldr r3, [pc, #192] ; (8002270 ) - 80021b0: 2207 movs r2, #7 - 80021b2: 601a str r2, [r3, #0] + 8002b8e: 4b30 ldr r3, [pc, #192] ; (8002c50 ) + 8002b90: 2207 movs r2, #7 + 8002b92: 601a str r2, [r3, #0] while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE ) - 80021b4: e009 b.n 80021ca + 8002b94: e009 b.n 8002baa { ulMaxPRIGROUPValue--; - 80021b6: 4b2e ldr r3, [pc, #184] ; (8002270 ) - 80021b8: 681b ldr r3, [r3, #0] - 80021ba: 3b01 subs r3, #1 - 80021bc: 4a2c ldr r2, [pc, #176] ; (8002270 ) - 80021be: 6013 str r3, [r2, #0] + 8002b96: 4b2e ldr r3, [pc, #184] ; (8002c50 ) + 8002b98: 681b ldr r3, [r3, #0] + 8002b9a: 3b01 subs r3, #1 + 8002b9c: 4a2c ldr r2, [pc, #176] ; (8002c50 ) + 8002b9e: 6013 str r3, [r2, #0] ucMaxPriorityValue <<= ( uint8_t ) 0x01; - 80021c0: 78fb ldrb r3, [r7, #3] - 80021c2: b2db uxtb r3, r3 - 80021c4: 005b lsls r3, r3, #1 - 80021c6: b2db uxtb r3, r3 - 80021c8: 70fb strb r3, [r7, #3] + 8002ba0: 78fb ldrb r3, [r7, #3] + 8002ba2: b2db uxtb r3, r3 + 8002ba4: 005b lsls r3, r3, #1 + 8002ba6: b2db uxtb r3, r3 + 8002ba8: 70fb strb r3, [r7, #3] while( ( ucMaxPriorityValue & portTOP_BIT_OF_BYTE ) == portTOP_BIT_OF_BYTE ) - 80021ca: 78fb ldrb r3, [r7, #3] - 80021cc: b2db uxtb r3, r3 - 80021ce: f003 0380 and.w r3, r3, #128 ; 0x80 - 80021d2: 2b80 cmp r3, #128 ; 0x80 - 80021d4: d0ef beq.n 80021b6 + 8002baa: 78fb ldrb r3, [r7, #3] + 8002bac: b2db uxtb r3, r3 + 8002bae: f003 0380 and.w r3, r3, #128 ; 0x80 + 8002bb2: 2b80 cmp r3, #128 ; 0x80 + 8002bb4: d0ef beq.n 8002b96 #ifdef configPRIO_BITS { /* Check the FreeRTOS configuration that defines the number of * priority bits matches the number of priority bits actually queried * from the hardware. */ configASSERT( ( portMAX_PRIGROUP_BITS - ulMaxPRIGROUPValue ) == configPRIO_BITS ); - 80021d6: 4b26 ldr r3, [pc, #152] ; (8002270 ) - 80021d8: 681b ldr r3, [r3, #0] - 80021da: f1c3 0307 rsb r3, r3, #7 - 80021de: 2b04 cmp r3, #4 - 80021e0: d009 beq.n 80021f6 - 80021e2: f04f 0350 mov.w r3, #80 ; 0x50 - 80021e6: f383 8811 msr BASEPRI, r3 - 80021ea: f3bf 8f6f isb sy - 80021ee: f3bf 8f4f dsb sy - 80021f2: 60bb str r3, [r7, #8] - 80021f4: e7fe b.n 80021f4 + 8002bb6: 4b26 ldr r3, [pc, #152] ; (8002c50 ) + 8002bb8: 681b ldr r3, [r3, #0] + 8002bba: f1c3 0307 rsb r3, r3, #7 + 8002bbe: 2b04 cmp r3, #4 + 8002bc0: d009 beq.n 8002bd6 + 8002bc2: f04f 0350 mov.w r3, #80 ; 0x50 + 8002bc6: f383 8811 msr BASEPRI, r3 + 8002bca: f3bf 8f6f isb sy + 8002bce: f3bf 8f4f dsb sy + 8002bd2: 60bb str r3, [r7, #8] + 8002bd4: e7fe b.n 8002bd4 } #endif /* Shift the priority group value back to its position within the AIRCR * register. */ ulMaxPRIGROUPValue <<= portPRIGROUP_SHIFT; - 80021f6: 4b1e ldr r3, [pc, #120] ; (8002270 ) - 80021f8: 681b ldr r3, [r3, #0] - 80021fa: 021b lsls r3, r3, #8 - 80021fc: 4a1c ldr r2, [pc, #112] ; (8002270 ) - 80021fe: 6013 str r3, [r2, #0] + 8002bd6: 4b1e ldr r3, [pc, #120] ; (8002c50 ) + 8002bd8: 681b ldr r3, [r3, #0] + 8002bda: 021b lsls r3, r3, #8 + 8002bdc: 4a1c ldr r2, [pc, #112] ; (8002c50 ) + 8002bde: 6013 str r3, [r2, #0] ulMaxPRIGROUPValue &= portPRIORITY_GROUP_MASK; - 8002200: 4b1b ldr r3, [pc, #108] ; (8002270 ) - 8002202: 681b ldr r3, [r3, #0] - 8002204: f403 63e0 and.w r3, r3, #1792 ; 0x700 - 8002208: 4a19 ldr r2, [pc, #100] ; (8002270 ) - 800220a: 6013 str r3, [r2, #0] + 8002be0: 4b1b ldr r3, [pc, #108] ; (8002c50 ) + 8002be2: 681b ldr r3, [r3, #0] + 8002be4: f403 63e0 and.w r3, r3, #1792 ; 0x700 + 8002be8: 4a19 ldr r2, [pc, #100] ; (8002c50 ) + 8002bea: 6013 str r3, [r2, #0] /* Restore the clobbered interrupt priority register to its original * value. */ *pucFirstUserPriorityRegister = ulOriginalPriority; - 800220c: 687b ldr r3, [r7, #4] - 800220e: b2da uxtb r2, r3 - 8002210: 697b ldr r3, [r7, #20] - 8002212: 701a strb r2, [r3, #0] + 8002bec: 687b ldr r3, [r7, #4] + 8002bee: b2da uxtb r2, r3 + 8002bf0: 697b ldr r3, [r7, #20] + 8002bf2: 701a strb r2, [r3, #0] } #endif /* conifgASSERT_DEFINED */ /* Make PendSV and SysTick the lowest priority interrupts. */ portNVIC_SHPR3_REG |= portNVIC_PENDSV_PRI; - 8002214: 4b17 ldr r3, [pc, #92] ; (8002274 ) - 8002216: 681b ldr r3, [r3, #0] - 8002218: 4a16 ldr r2, [pc, #88] ; (8002274 ) - 800221a: f443 0370 orr.w r3, r3, #15728640 ; 0xf00000 - 800221e: 6013 str r3, [r2, #0] + 8002bf4: 4b17 ldr r3, [pc, #92] ; (8002c54 ) + 8002bf6: 681b ldr r3, [r3, #0] + 8002bf8: 4a16 ldr r2, [pc, #88] ; (8002c54 ) + 8002bfa: f443 0370 orr.w r3, r3, #15728640 ; 0xf00000 + 8002bfe: 6013 str r3, [r2, #0] portNVIC_SHPR3_REG |= portNVIC_SYSTICK_PRI; - 8002220: 4b14 ldr r3, [pc, #80] ; (8002274 ) - 8002222: 681b ldr r3, [r3, #0] - 8002224: 4a13 ldr r2, [pc, #76] ; (8002274 ) - 8002226: f043 4370 orr.w r3, r3, #4026531840 ; 0xf0000000 - 800222a: 6013 str r3, [r2, #0] + 8002c00: 4b14 ldr r3, [pc, #80] ; (8002c54 ) + 8002c02: 681b ldr r3, [r3, #0] + 8002c04: 4a13 ldr r2, [pc, #76] ; (8002c54 ) + 8002c06: f043 4370 orr.w r3, r3, #4026531840 ; 0xf0000000 + 8002c0a: 6013 str r3, [r2, #0] /* Start the timer that generates the tick ISR. Interrupts are disabled * here already. */ vPortSetupTimerInterrupt(); - 800222c: f000 f8d4 bl 80023d8 + 8002c0c: f000 f8dc bl 8002dc8 /* Initialise the critical nesting count ready for the first task. */ uxCriticalNesting = 0; - 8002230: 4b11 ldr r3, [pc, #68] ; (8002278 ) - 8002232: 2200 movs r2, #0 - 8002234: 601a str r2, [r3, #0] + 8002c10: 4b11 ldr r3, [pc, #68] ; (8002c58 ) + 8002c12: 2200 movs r2, #0 + 8002c14: 601a str r2, [r3, #0] /* Ensure the VFP is enabled - it should be anyway. */ vPortEnableVFP(); - 8002236: f000 f8f3 bl 8002420 + 8002c16: f000 f8fb bl 8002e10 /* Lazy save always. */ *( portFPCCR ) |= portASPEN_AND_LSPEN_BITS; - 800223a: 4b10 ldr r3, [pc, #64] ; (800227c ) - 800223c: 681b ldr r3, [r3, #0] - 800223e: 4a0f ldr r2, [pc, #60] ; (800227c ) - 8002240: f043 4340 orr.w r3, r3, #3221225472 ; 0xc0000000 - 8002244: 6013 str r3, [r2, #0] + 8002c1a: 4b10 ldr r3, [pc, #64] ; (8002c5c ) + 8002c1c: 681b ldr r3, [r3, #0] + 8002c1e: 4a0f ldr r2, [pc, #60] ; (8002c5c ) + 8002c20: f043 4340 orr.w r3, r3, #3221225472 ; 0xc0000000 + 8002c24: 6013 str r3, [r2, #0] /* Start the first task. */ prvPortStartFirstTask(); - 8002246: f7ff ff67 bl 8002118 + 8002c26: f7ff ff67 bl 8002af8 * exit error function to prevent compiler warnings about a static function * not being called in the case that the application writer overrides this * functionality by defining configTASK_RETURN_ADDRESS. Call * vTaskSwitchContext() so link time optimisation does not remove the * symbol. */ vTaskSwitchContext(); - 800224a: f7ff f8a7 bl 800139c + 8002c2a: f7fe fd95 bl 8001758 prvTaskExitError(); - 800224e: f7ff ff23 bl 8002098 + 8002c2e: f7ff ff23 bl 8002a78 /* Should not get here! */ return 0; - 8002252: 2300 movs r3, #0 -} - 8002254: 4618 mov r0, r3 - 8002256: 3718 adds r7, #24 - 8002258: 46bd mov sp, r7 - 800225a: bd80 pop {r7, pc} - 800225c: e000ed00 .word 0xe000ed00 - 8002260: 410fc271 .word 0x410fc271 - 8002264: 410fc270 .word 0x410fc270 - 8002268: e000e400 .word 0xe000e400 - 800226c: 2000018c .word 0x2000018c - 8002270: 20000190 .word 0x20000190 - 8002274: e000ed20 .word 0xe000ed20 - 8002278: 20000004 .word 0x20000004 - 800227c: e000ef34 .word 0xe000ef34 - -08002280 : + 8002c32: 2300 movs r3, #0 +} + 8002c34: 4618 mov r0, r3 + 8002c36: 3718 adds r7, #24 + 8002c38: 46bd mov sp, r7 + 8002c3a: bd80 pop {r7, pc} + 8002c3c: e000ed00 .word 0xe000ed00 + 8002c40: 410fc271 .word 0x410fc271 + 8002c44: 410fc270 .word 0x410fc270 + 8002c48: e000e400 .word 0xe000e400 + 8002c4c: 200002e0 .word 0x200002e0 + 8002c50: 200002e4 .word 0x200002e4 + 8002c54: e000ed20 .word 0xe000ed20 + 8002c58: 20000004 .word 0x20000004 + 8002c5c: e000ef34 .word 0xe000ef34 + +08002c60 : configASSERT( uxCriticalNesting == 1000UL ); } /*-----------------------------------------------------------*/ void vPortEnterCritical( void ) { - 8002280: b480 push {r7} - 8002282: b083 sub sp, #12 - 8002284: af00 add r7, sp, #0 - 8002286: f04f 0350 mov.w r3, #80 ; 0x50 - 800228a: f383 8811 msr BASEPRI, r3 - 800228e: f3bf 8f6f isb sy - 8002292: f3bf 8f4f dsb sy - 8002296: 607b str r3, [r7, #4] + 8002c60: b480 push {r7} + 8002c62: b083 sub sp, #12 + 8002c64: af00 add r7, sp, #0 + 8002c66: f04f 0350 mov.w r3, #80 ; 0x50 + 8002c6a: f383 8811 msr BASEPRI, r3 + 8002c6e: f3bf 8f6f isb sy + 8002c72: f3bf 8f4f dsb sy + 8002c76: 607b str r3, [r7, #4] portDISABLE_INTERRUPTS(); uxCriticalNesting++; - 8002298: 4b0e ldr r3, [pc, #56] ; (80022d4 ) - 800229a: 681b ldr r3, [r3, #0] - 800229c: 3301 adds r3, #1 - 800229e: 4a0d ldr r2, [pc, #52] ; (80022d4 ) - 80022a0: 6013 str r3, [r2, #0] + 8002c78: 4b0e ldr r3, [pc, #56] ; (8002cb4 ) + 8002c7a: 681b ldr r3, [r3, #0] + 8002c7c: 3301 adds r3, #1 + 8002c7e: 4a0d ldr r2, [pc, #52] ; (8002cb4 ) + 8002c80: 6013 str r3, [r2, #0] /* This is not the interrupt safe version of the enter critical function so * assert() if it is being called from an interrupt context. Only API * functions that end in "FromISR" can be used in an interrupt. Only assert if * the critical nesting count is 1 to protect against recursive calls if the * assert function also uses a critical section. */ if( uxCriticalNesting == 1 ) - 80022a2: 4b0c ldr r3, [pc, #48] ; (80022d4 ) - 80022a4: 681b ldr r3, [r3, #0] - 80022a6: 2b01 cmp r3, #1 - 80022a8: d10e bne.n 80022c8 + 8002c82: 4b0c ldr r3, [pc, #48] ; (8002cb4 ) + 8002c84: 681b ldr r3, [r3, #0] + 8002c86: 2b01 cmp r3, #1 + 8002c88: d10e bne.n 8002ca8 { configASSERT( ( portNVIC_INT_CTRL_REG & portVECTACTIVE_MASK ) == 0 ); - 80022aa: 4b0b ldr r3, [pc, #44] ; (80022d8 ) - 80022ac: 681b ldr r3, [r3, #0] - 80022ae: b2db uxtb r3, r3 - 80022b0: 2b00 cmp r3, #0 - 80022b2: d009 beq.n 80022c8 - 80022b4: f04f 0350 mov.w r3, #80 ; 0x50 - 80022b8: f383 8811 msr BASEPRI, r3 - 80022bc: f3bf 8f6f isb sy - 80022c0: f3bf 8f4f dsb sy - 80022c4: 603b str r3, [r7, #0] - 80022c6: e7fe b.n 80022c6 + 8002c8a: 4b0b ldr r3, [pc, #44] ; (8002cb8 ) + 8002c8c: 681b ldr r3, [r3, #0] + 8002c8e: b2db uxtb r3, r3 + 8002c90: 2b00 cmp r3, #0 + 8002c92: d009 beq.n 8002ca8 + 8002c94: f04f 0350 mov.w r3, #80 ; 0x50 + 8002c98: f383 8811 msr BASEPRI, r3 + 8002c9c: f3bf 8f6f isb sy + 8002ca0: f3bf 8f4f dsb sy + 8002ca4: 603b str r3, [r7, #0] + 8002ca6: e7fe b.n 8002ca6 } } - 80022c8: bf00 nop - 80022ca: 370c adds r7, #12 - 80022cc: 46bd mov sp, r7 - 80022ce: f85d 7b04 ldr.w r7, [sp], #4 - 80022d2: 4770 bx lr - 80022d4: 20000004 .word 0x20000004 - 80022d8: e000ed04 .word 0xe000ed04 - -080022dc : + 8002ca8: bf00 nop + 8002caa: 370c adds r7, #12 + 8002cac: 46bd mov sp, r7 + 8002cae: f85d 7b04 ldr.w r7, [sp], #4 + 8002cb2: 4770 bx lr + 8002cb4: 20000004 .word 0x20000004 + 8002cb8: e000ed04 .word 0xe000ed04 + +08002cbc : /*-----------------------------------------------------------*/ void vPortExitCritical( void ) { - 80022dc: b480 push {r7} - 80022de: b083 sub sp, #12 - 80022e0: af00 add r7, sp, #0 + 8002cbc: b480 push {r7} + 8002cbe: b083 sub sp, #12 + 8002cc0: af00 add r7, sp, #0 configASSERT( uxCriticalNesting ); - 80022e2: 4b11 ldr r3, [pc, #68] ; (8002328 ) - 80022e4: 681b ldr r3, [r3, #0] - 80022e6: 2b00 cmp r3, #0 - 80022e8: d109 bne.n 80022fe - 80022ea: f04f 0350 mov.w r3, #80 ; 0x50 - 80022ee: f383 8811 msr BASEPRI, r3 - 80022f2: f3bf 8f6f isb sy - 80022f6: f3bf 8f4f dsb sy - 80022fa: 607b str r3, [r7, #4] - 80022fc: e7fe b.n 80022fc + 8002cc2: 4b11 ldr r3, [pc, #68] ; (8002d08 ) + 8002cc4: 681b ldr r3, [r3, #0] + 8002cc6: 2b00 cmp r3, #0 + 8002cc8: d109 bne.n 8002cde + 8002cca: f04f 0350 mov.w r3, #80 ; 0x50 + 8002cce: f383 8811 msr BASEPRI, r3 + 8002cd2: f3bf 8f6f isb sy + 8002cd6: f3bf 8f4f dsb sy + 8002cda: 607b str r3, [r7, #4] + 8002cdc: e7fe b.n 8002cdc uxCriticalNesting--; - 80022fe: 4b0a ldr r3, [pc, #40] ; (8002328 ) - 8002300: 681b ldr r3, [r3, #0] - 8002302: 3b01 subs r3, #1 - 8002304: 4a08 ldr r2, [pc, #32] ; (8002328 ) - 8002306: 6013 str r3, [r2, #0] + 8002cde: 4b0a ldr r3, [pc, #40] ; (8002d08 ) + 8002ce0: 681b ldr r3, [r3, #0] + 8002ce2: 3b01 subs r3, #1 + 8002ce4: 4a08 ldr r2, [pc, #32] ; (8002d08 ) + 8002ce6: 6013 str r3, [r2, #0] if( uxCriticalNesting == 0 ) - 8002308: 4b07 ldr r3, [pc, #28] ; (8002328 ) - 800230a: 681b ldr r3, [r3, #0] - 800230c: 2b00 cmp r3, #0 - 800230e: d104 bne.n 800231a - 8002310: 2300 movs r3, #0 - 8002312: 603b str r3, [r7, #0] + 8002ce8: 4b07 ldr r3, [pc, #28] ; (8002d08 ) + 8002cea: 681b ldr r3, [r3, #0] + 8002cec: 2b00 cmp r3, #0 + 8002cee: d104 bne.n 8002cfa + 8002cf0: 2300 movs r3, #0 + 8002cf2: 603b str r3, [r7, #0] __asm volatile - 8002314: 683b ldr r3, [r7, #0] - 8002316: f383 8811 msr BASEPRI, r3 + 8002cf4: 683b ldr r3, [r7, #0] + 8002cf6: f383 8811 msr BASEPRI, r3 { portENABLE_INTERRUPTS(); } } - 800231a: bf00 nop - 800231c: 370c adds r7, #12 - 800231e: 46bd mov sp, r7 - 8002320: f85d 7b04 ldr.w r7, [sp], #4 - 8002324: 4770 bx lr - 8002326: bf00 nop - 8002328: 20000004 .word 0x20000004 - 800232c: 00000000 .word 0x00000000 + 8002cfa: bf00 nop + 8002cfc: 370c adds r7, #12 + 8002cfe: 46bd mov sp, r7 + 8002d00: f85d 7b04 ldr.w r7, [sp], #4 + 8002d04: 4770 bx lr + 8002d06: bf00 nop + 8002d08: 20000004 .word 0x20000004 + 8002d0c: 00000000 .word 0x00000000 -08002330 : +08002d10 : void xPortPendSVHandler( void ) { /* This is a naked function. */ __asm volatile - 8002330: f3ef 8009 mrs r0, PSP - 8002334: f3bf 8f6f isb sy - 8002338: 4b15 ldr r3, [pc, #84] ; (8002390 ) - 800233a: 681a ldr r2, [r3, #0] - 800233c: f01e 0f10 tst.w lr, #16 - 8002340: bf08 it eq - 8002342: ed20 8a10 vstmdbeq r0!, {s16-s31} - 8002346: e920 4ff0 stmdb r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} - 800234a: 6010 str r0, [r2, #0] - 800234c: e92d 0009 stmdb sp!, {r0, r3} - 8002350: f04f 0050 mov.w r0, #80 ; 0x50 - 8002354: f380 8811 msr BASEPRI, r0 - 8002358: f3bf 8f4f dsb sy - 800235c: f3bf 8f6f isb sy - 8002360: f7ff f81c bl 800139c - 8002364: f04f 0000 mov.w r0, #0 - 8002368: f380 8811 msr BASEPRI, r0 - 800236c: bc09 pop {r0, r3} - 800236e: 6819 ldr r1, [r3, #0] - 8002370: 6808 ldr r0, [r1, #0] - 8002372: e8b0 4ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} - 8002376: f01e 0f10 tst.w lr, #16 - 800237a: bf08 it eq - 800237c: ecb0 8a10 vldmiaeq r0!, {s16-s31} - 8002380: f380 8809 msr PSP, r0 - 8002384: f3bf 8f6f isb sy - 8002388: 4770 bx lr - 800238a: bf00 nop - 800238c: f3af 8000 nop.w - -08002390 : - 8002390: 2000004c .word 0x2000004c + 8002d10: f3ef 8009 mrs r0, PSP + 8002d14: f3bf 8f6f isb sy + 8002d18: 4b15 ldr r3, [pc, #84] ; (8002d70 ) + 8002d1a: 681a ldr r2, [r3, #0] + 8002d1c: f01e 0f10 tst.w lr, #16 + 8002d20: bf08 it eq + 8002d22: ed20 8a10 vstmdbeq r0!, {s16-s31} + 8002d26: e920 4ff0 stmdb r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} + 8002d2a: 6010 str r0, [r2, #0] + 8002d2c: e92d 0009 stmdb sp!, {r0, r3} + 8002d30: f04f 0050 mov.w r0, #80 ; 0x50 + 8002d34: f380 8811 msr BASEPRI, r0 + 8002d38: f3bf 8f4f dsb sy + 8002d3c: f3bf 8f6f isb sy + 8002d40: f7fe fd0a bl 8001758 + 8002d44: f04f 0000 mov.w r0, #0 + 8002d48: f380 8811 msr BASEPRI, r0 + 8002d4c: bc09 pop {r0, r3} + 8002d4e: 6819 ldr r1, [r3, #0] + 8002d50: 6808 ldr r0, [r1, #0] + 8002d52: e8b0 4ff0 ldmia.w r0!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} + 8002d56: f01e 0f10 tst.w lr, #16 + 8002d5a: bf08 it eq + 8002d5c: ecb0 8a10 vldmiaeq r0!, {s16-s31} + 8002d60: f380 8809 msr PSP, r0 + 8002d64: f3bf 8f6f isb sy + 8002d68: 4770 bx lr + 8002d6a: bf00 nop + 8002d6c: f3af 8000 nop.w + +08002d70 : + 8002d70: 200001a0 .word 0x200001a0 " \n" " .align 4 \n" "pxCurrentTCBConst: .word pxCurrentTCB \n" ::"i" ( configMAX_SYSCALL_INTERRUPT_PRIORITY ) ); } - 8002394: bf00 nop - 8002396: bf00 nop + 8002d74: bf00 nop + 8002d76: bf00 nop -08002398 : +08002d78 : /*-----------------------------------------------------------*/ void xPortSysTickHandler( void ) { - 8002398: b580 push {r7, lr} - 800239a: b082 sub sp, #8 - 800239c: af00 add r7, sp, #0 + 8002d78: b580 push {r7, lr} + 8002d7a: b082 sub sp, #8 + 8002d7c: af00 add r7, sp, #0 __asm volatile - 800239e: f04f 0350 mov.w r3, #80 ; 0x50 - 80023a2: f383 8811 msr BASEPRI, r3 - 80023a6: f3bf 8f6f isb sy - 80023aa: f3bf 8f4f dsb sy - 80023ae: 607b str r3, [r7, #4] + 8002d7e: f04f 0350 mov.w r3, #80 ; 0x50 + 8002d82: f383 8811 msr BASEPRI, r3 + 8002d86: f3bf 8f6f isb sy + 8002d8a: f3bf 8f4f dsb sy + 8002d8e: 607b str r3, [r7, #4] + /* The SysTick runs at the lowest interrupt priority, so when this interrupt + * executes all interrupts must be unmasked. There is therefore no need to * save and then restore the interrupt mask value as its value is already * known. */ portDISABLE_INTERRUPTS(); + traceISR_ENTER(); + 8002d90: f001 fde2 bl 8004958 { /* Increment the RTOS tick. */ if( xTaskIncrementTick() != pdFALSE ) - 80023b0: f7fe ff3c bl 800122c - 80023b4: 4603 mov r3, r0 - 80023b6: 2b00 cmp r3, #0 - 80023b8: d003 beq.n 80023c2 + 8002d94: f7fe fc24 bl 80015e0 + 8002d98: 4603 mov r3, r0 + 8002d9a: 2b00 cmp r3, #0 + 8002d9c: d006 beq.n 8002dac { - /* A context switch is required. Context switching is performed in + traceISR_EXIT_TO_SCHEDULER(); + 8002d9e: f001 fe39 bl 8004a14 + /* A context switch is required. Context switching is performed in * the PendSV interrupt. Pend the PendSV interrupt. */ portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; - 80023ba: 4b06 ldr r3, [pc, #24] ; (80023d4 ) - 80023bc: f04f 5280 mov.w r2, #268435456 ; 0x10000000 - 80023c0: 601a str r2, [r3, #0] - 80023c2: 2300 movs r3, #0 - 80023c4: 603b str r3, [r7, #0] + 8002da2: 4b08 ldr r3, [pc, #32] ; (8002dc4 ) + 8002da4: f04f 5280 mov.w r2, #268435456 ; 0x10000000 + 8002da8: 601a str r2, [r3, #0] + 8002daa: e001 b.n 8002db0 + } + else{ + traceISR_EXIT(); + 8002dac: f001 fe16 bl 80049dc + 8002db0: 2300 movs r3, #0 + 8002db2: 603b str r3, [r7, #0] __asm volatile - 80023c6: 683b ldr r3, [r7, #0] - 80023c8: f383 8811 msr BASEPRI, r3 + 8002db4: 683b ldr r3, [r7, #0] + 8002db6: f383 8811 msr BASEPRI, r3 } } portENABLE_INTERRUPTS(); } - 80023cc: bf00 nop - 80023ce: 3708 adds r7, #8 - 80023d0: 46bd mov sp, r7 - 80023d2: bd80 pop {r7, pc} - 80023d4: e000ed04 .word 0xe000ed04 - -080023d8 : + 8002dba: bf00 nop + 8002dbc: 3708 adds r7, #8 + 8002dbe: 46bd mov sp, r7 + 8002dc0: bd80 pop {r7, pc} + 8002dc2: bf00 nop + 8002dc4: e000ed04 .word 0xe000ed04 + +08002dc8 : /* * Setup the systick timer to generate the tick interrupts at the required * frequency. */ __attribute__( ( weak ) ) void vPortSetupTimerInterrupt( void ) { - 80023d8: b480 push {r7} - 80023da: af00 add r7, sp, #0 + 8002dc8: b480 push {r7} + 8002dca: af00 add r7, sp, #0 ulStoppedTimerCompensation = portMISSED_COUNTS_FACTOR / ( configCPU_CLOCK_HZ / configSYSTICK_CLOCK_HZ ); } #endif /* configUSE_TICKLESS_IDLE */ /* Stop and clear the SysTick. */ portNVIC_SYSTICK_CTRL_REG = 0UL; - 80023dc: 4b0b ldr r3, [pc, #44] ; (800240c ) - 80023de: 2200 movs r2, #0 - 80023e0: 601a str r2, [r3, #0] + 8002dcc: 4b0b ldr r3, [pc, #44] ; (8002dfc ) + 8002dce: 2200 movs r2, #0 + 8002dd0: 601a str r2, [r3, #0] portNVIC_SYSTICK_CURRENT_VALUE_REG = 0UL; - 80023e2: 4b0b ldr r3, [pc, #44] ; (8002410 ) - 80023e4: 2200 movs r2, #0 - 80023e6: 601a str r2, [r3, #0] + 8002dd2: 4b0b ldr r3, [pc, #44] ; (8002e00 ) + 8002dd4: 2200 movs r2, #0 + 8002dd6: 601a str r2, [r3, #0] /* Configure SysTick to interrupt at the requested rate. */ portNVIC_SYSTICK_LOAD_REG = ( configSYSTICK_CLOCK_HZ / configTICK_RATE_HZ ) - 1UL; - 80023e8: 4b0a ldr r3, [pc, #40] ; (8002414 ) - 80023ea: 681b ldr r3, [r3, #0] - 80023ec: 4a0a ldr r2, [pc, #40] ; (8002418 ) - 80023ee: fba2 2303 umull r2, r3, r2, r3 - 80023f2: 099b lsrs r3, r3, #6 - 80023f4: 4a09 ldr r2, [pc, #36] ; (800241c ) - 80023f6: 3b01 subs r3, #1 - 80023f8: 6013 str r3, [r2, #0] + 8002dd8: 4b0a ldr r3, [pc, #40] ; (8002e04 ) + 8002dda: 681b ldr r3, [r3, #0] + 8002ddc: 4a0a ldr r2, [pc, #40] ; (8002e08 ) + 8002dde: fba2 2303 umull r2, r3, r2, r3 + 8002de2: 099b lsrs r3, r3, #6 + 8002de4: 4a09 ldr r2, [pc, #36] ; (8002e0c ) + 8002de6: 3b01 subs r3, #1 + 8002de8: 6013 str r3, [r2, #0] portNVIC_SYSTICK_CTRL_REG = ( portNVIC_SYSTICK_CLK_BIT | portNVIC_SYSTICK_INT_BIT | portNVIC_SYSTICK_ENABLE_BIT ); - 80023fa: 4b04 ldr r3, [pc, #16] ; (800240c ) - 80023fc: 2207 movs r2, #7 - 80023fe: 601a str r2, [r3, #0] -} - 8002400: bf00 nop - 8002402: 46bd mov sp, r7 - 8002404: f85d 7b04 ldr.w r7, [sp], #4 - 8002408: 4770 bx lr - 800240a: bf00 nop - 800240c: e000e010 .word 0xe000e010 - 8002410: e000e018 .word 0xe000e018 - 8002414: 2000001c .word 0x2000001c - 8002418: 10624dd3 .word 0x10624dd3 - 800241c: e000e014 .word 0xe000e014 - -08002420 : + 8002dea: 4b04 ldr r3, [pc, #16] ; (8002dfc ) + 8002dec: 2207 movs r2, #7 + 8002dee: 601a str r2, [r3, #0] +} + 8002df0: bf00 nop + 8002df2: 46bd mov sp, r7 + 8002df4: f85d 7b04 ldr.w r7, [sp], #4 + 8002df8: 4770 bx lr + 8002dfa: bf00 nop + 8002dfc: e000e010 .word 0xe000e010 + 8002e00: e000e018 .word 0xe000e018 + 8002e04: 2000010c .word 0x2000010c + 8002e08: 10624dd3 .word 0x10624dd3 + 8002e0c: e000e014 .word 0xe000e014 + +08002e10 : /*-----------------------------------------------------------*/ /* This is a naked function. */ static void vPortEnableVFP( void ) { __asm volatile - 8002420: f8df 000c ldr.w r0, [pc, #12] ; 8002430 - 8002424: 6801 ldr r1, [r0, #0] - 8002426: f441 0170 orr.w r1, r1, #15728640 ; 0xf00000 - 800242a: 6001 str r1, [r0, #0] - 800242c: 4770 bx lr - 800242e: 0000 .short 0x0000 - 8002430: e000ed88 .word 0xe000ed88 + 8002e10: f8df 000c ldr.w r0, [pc, #12] ; 8002e20 + 8002e14: 6801 ldr r1, [r0, #0] + 8002e16: f441 0170 orr.w r1, r1, #15728640 ; 0xf00000 + 8002e1a: 6001 str r1, [r0, #0] + 8002e1c: 4770 bx lr + 8002e1e: 0000 .short 0x0000 + 8002e20: e000ed88 .word 0xe000ed88 " orr r1, r1, #( 0xf << 20 ) \n"/* Enable CP10 and CP11 coprocessors, then save back. */ " str r1, [r0] \n" " bx r14 \n" " .ltorg \n" ); } - 8002434: bf00 nop - 8002436: bf00 nop + 8002e24: bf00 nop + 8002e26: bf00 nop -08002438 : +08002e28 : /*-----------------------------------------------------------*/ #if ( configASSERT_DEFINED == 1 ) void vPortValidateInterruptPriority( void ) { - 8002438: b480 push {r7} - 800243a: b085 sub sp, #20 - 800243c: af00 add r7, sp, #0 + 8002e28: b480 push {r7} + 8002e2a: b085 sub sp, #20 + 8002e2c: af00 add r7, sp, #0 uint32_t ulCurrentInterrupt; uint8_t ucCurrentPriority; /* Obtain the number of the currently executing interrupt. */ __asm volatile ( "mrs %0, ipsr" : "=r" ( ulCurrentInterrupt )::"memory" ); - 800243e: f3ef 8305 mrs r3, IPSR - 8002442: 60fb str r3, [r7, #12] + 8002e2e: f3ef 8305 mrs r3, IPSR + 8002e32: 60fb str r3, [r7, #12] /* Is the interrupt number a user defined interrupt? */ if( ulCurrentInterrupt >= portFIRST_USER_INTERRUPT_NUMBER ) - 8002444: 68fb ldr r3, [r7, #12] - 8002446: 2b0f cmp r3, #15 - 8002448: d913 bls.n 8002472 + 8002e34: 68fb ldr r3, [r7, #12] + 8002e36: 2b0f cmp r3, #15 + 8002e38: d913 bls.n 8002e62 { /* Look up the interrupt's priority. */ ucCurrentPriority = pcInterruptPriorityRegisters[ ulCurrentInterrupt ]; - 800244a: 4a16 ldr r2, [pc, #88] ; (80024a4 ) - 800244c: 68fb ldr r3, [r7, #12] - 800244e: 4413 add r3, r2 - 8002450: 781b ldrb r3, [r3, #0] - 8002452: 72fb strb r3, [r7, #11] + 8002e3a: 4a16 ldr r2, [pc, #88] ; (8002e94 ) + 8002e3c: 68fb ldr r3, [r7, #12] + 8002e3e: 4413 add r3, r2 + 8002e40: 781b ldrb r3, [r3, #0] + 8002e42: 72fb strb r3, [r7, #11] * interrupt entry is as fast and simple as possible. * * The following links provide detailed information: * https://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html * https://www.FreeRTOS.org/FAQHelp.html */ configASSERT( ucCurrentPriority >= ucMaxSysCallPriority ); - 8002454: 4b14 ldr r3, [pc, #80] ; (80024a8 ) - 8002456: 781b ldrb r3, [r3, #0] - 8002458: 7afa ldrb r2, [r7, #11] - 800245a: 429a cmp r2, r3 - 800245c: d209 bcs.n 8002472 + 8002e44: 4b14 ldr r3, [pc, #80] ; (8002e98 ) + 8002e46: 781b ldrb r3, [r3, #0] + 8002e48: 7afa ldrb r2, [r7, #11] + 8002e4a: 429a cmp r2, r3 + 8002e4c: d209 bcs.n 8002e62 __asm volatile - 800245e: f04f 0350 mov.w r3, #80 ; 0x50 - 8002462: f383 8811 msr BASEPRI, r3 - 8002466: f3bf 8f6f isb sy - 800246a: f3bf 8f4f dsb sy - 800246e: 607b str r3, [r7, #4] - 8002470: e7fe b.n 8002470 + 8002e4e: f04f 0350 mov.w r3, #80 ; 0x50 + 8002e52: f383 8811 msr BASEPRI, r3 + 8002e56: f3bf 8f6f isb sy + 8002e5a: f3bf 8f4f dsb sy + 8002e5e: 607b str r3, [r7, #4] + 8002e60: e7fe b.n 8002e60 * configuration then the correct setting can be achieved on all Cortex-M * devices by calling NVIC_SetPriorityGrouping( 0 ); before starting the * scheduler. Note however that some vendor specific peripheral libraries * assume a non-zero priority group setting, in which cases using a value * of zero will result in unpredictable behaviour. */ configASSERT( ( portAIRCR_REG & portPRIORITY_GROUP_MASK ) <= ulMaxPRIGROUPValue ); - 8002472: 4b0e ldr r3, [pc, #56] ; (80024ac ) - 8002474: 681b ldr r3, [r3, #0] - 8002476: f403 62e0 and.w r2, r3, #1792 ; 0x700 - 800247a: 4b0d ldr r3, [pc, #52] ; (80024b0 ) - 800247c: 681b ldr r3, [r3, #0] - 800247e: 429a cmp r2, r3 - 8002480: d909 bls.n 8002496 - 8002482: f04f 0350 mov.w r3, #80 ; 0x50 - 8002486: f383 8811 msr BASEPRI, r3 - 800248a: f3bf 8f6f isb sy - 800248e: f3bf 8f4f dsb sy - 8002492: 603b str r3, [r7, #0] - 8002494: e7fe b.n 8002494 + 8002e62: 4b0e ldr r3, [pc, #56] ; (8002e9c ) + 8002e64: 681b ldr r3, [r3, #0] + 8002e66: f403 62e0 and.w r2, r3, #1792 ; 0x700 + 8002e6a: 4b0d ldr r3, [pc, #52] ; (8002ea0 ) + 8002e6c: 681b ldr r3, [r3, #0] + 8002e6e: 429a cmp r2, r3 + 8002e70: d909 bls.n 8002e86 + 8002e72: f04f 0350 mov.w r3, #80 ; 0x50 + 8002e76: f383 8811 msr BASEPRI, r3 + 8002e7a: f3bf 8f6f isb sy + 8002e7e: f3bf 8f4f dsb sy + 8002e82: 603b str r3, [r7, #0] + 8002e84: e7fe b.n 8002e84 } - 8002496: bf00 nop - 8002498: 3714 adds r7, #20 - 800249a: 46bd mov sp, r7 - 800249c: f85d 7b04 ldr.w r7, [sp], #4 - 80024a0: 4770 bx lr - 80024a2: bf00 nop - 80024a4: e000e3f0 .word 0xe000e3f0 - 80024a8: 2000018c .word 0x2000018c - 80024ac: e000ed0c .word 0xe000ed0c - 80024b0: 20000190 .word 0x20000190 - -080024b4 : + 8002e86: bf00 nop + 8002e88: 3714 adds r7, #20 + 8002e8a: 46bd mov sp, r7 + 8002e8c: f85d 7b04 ldr.w r7, [sp], #4 + 8002e90: 4770 bx lr + 8002e92: bf00 nop + 8002e94: e000e3f0 .word 0xe000e3f0 + 8002e98: 200002e0 .word 0x200002e0 + 8002e9c: e000ed0c .word 0xe000ed0c + 8002ea0: 200002e4 .word 0x200002e4 + +08002ea4 : PRIVILEGED_DATA static size_t xBlockAllocatedBit = 0; /*-----------------------------------------------------------*/ void * pvPortMalloc( size_t xWantedSize ) { - 80024b4: b580 push {r7, lr} - 80024b6: b08a sub sp, #40 ; 0x28 - 80024b8: af00 add r7, sp, #0 - 80024ba: 6078 str r0, [r7, #4] + 8002ea4: b580 push {r7, lr} + 8002ea6: b08a sub sp, #40 ; 0x28 + 8002ea8: af00 add r7, sp, #0 + 8002eaa: 6078 str r0, [r7, #4] BlockLink_t * pxBlock, * pxPreviousBlock, * pxNewBlockLink; void * pvReturn = NULL; - 80024bc: 2300 movs r3, #0 - 80024be: 61fb str r3, [r7, #28] + 8002eac: 2300 movs r3, #0 + 8002eae: 61fb str r3, [r7, #28] vTaskSuspendAll(); - 80024c0: f7fe fdfa bl 80010b8 + 8002eb0: f7fe fac6 bl 8001440 { /* If this is the first call to malloc then the heap will require * initialisation to setup the list of free blocks. */ if( pxEnd == NULL ) - 80024c4: 4b63 ldr r3, [pc, #396] ; (8002654 ) - 80024c6: 681b ldr r3, [r3, #0] - 80024c8: 2b00 cmp r3, #0 - 80024ca: d101 bne.n 80024d0 + 8002eb4: 4b63 ldr r3, [pc, #396] ; (8003044 ) + 8002eb6: 681b ldr r3, [r3, #0] + 8002eb8: 2b00 cmp r3, #0 + 8002eba: d101 bne.n 8002ec0 { prvHeapInit(); - 80024cc: f000 f92e bl 800272c + 8002ebc: f000 f92e bl 800311c /* Check the requested block size is not so large that the top bit is * set. The top bit of the block size member of the BlockLink_t structure * is used to determine who owns the block - the application or the * kernel, so it must be free. */ if( ( xWantedSize & xBlockAllocatedBit ) == 0 ) - 80024d0: 4b61 ldr r3, [pc, #388] ; (8002658 ) - 80024d2: 681a ldr r2, [r3, #0] - 80024d4: 687b ldr r3, [r7, #4] - 80024d6: 4013 ands r3, r2 - 80024d8: 2b00 cmp r3, #0 - 80024da: f040 80a5 bne.w 8002628 + 8002ec0: 4b61 ldr r3, [pc, #388] ; (8003048 ) + 8002ec2: 681a ldr r2, [r3, #0] + 8002ec4: 687b ldr r3, [r7, #4] + 8002ec6: 4013 ands r3, r2 + 8002ec8: 2b00 cmp r3, #0 + 8002eca: f040 80a5 bne.w 8003018 { /* The wanted size must be increased so it can contain a BlockLink_t * structure in addition to the requested amount of bytes. */ if( ( xWantedSize > 0 ) && - 80024de: 687b ldr r3, [r7, #4] - 80024e0: 2b00 cmp r3, #0 - 80024e2: d02c beq.n 800253e + 8002ece: 687b ldr r3, [r7, #4] + 8002ed0: 2b00 cmp r3, #0 + 8002ed2: d02c beq.n 8002f2e ( ( xWantedSize + xHeapStructSize ) > xWantedSize ) ) /* Overflow check */ - 80024e4: 2208 movs r2, #8 - 80024e6: 687b ldr r3, [r7, #4] - 80024e8: 4413 add r3, r2 + 8002ed4: 2208 movs r2, #8 + 8002ed6: 687b ldr r3, [r7, #4] + 8002ed8: 4413 add r3, r2 if( ( xWantedSize > 0 ) && - 80024ea: 687a ldr r2, [r7, #4] - 80024ec: 429a cmp r2, r3 - 80024ee: d226 bcs.n 800253e + 8002eda: 687a ldr r2, [r7, #4] + 8002edc: 429a cmp r2, r3 + 8002ede: d226 bcs.n 8002f2e { xWantedSize += xHeapStructSize; - 80024f0: 2208 movs r2, #8 - 80024f2: 687b ldr r3, [r7, #4] - 80024f4: 4413 add r3, r2 - 80024f6: 607b str r3, [r7, #4] + 8002ee0: 2208 movs r2, #8 + 8002ee2: 687b ldr r3, [r7, #4] + 8002ee4: 4413 add r3, r2 + 8002ee6: 607b str r3, [r7, #4] /* Ensure that blocks are always aligned. */ if( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) != 0x00 ) - 80024f8: 687b ldr r3, [r7, #4] - 80024fa: f003 0307 and.w r3, r3, #7 - 80024fe: 2b00 cmp r3, #0 - 8002500: d020 beq.n 8002544 + 8002ee8: 687b ldr r3, [r7, #4] + 8002eea: f003 0307 and.w r3, r3, #7 + 8002eee: 2b00 cmp r3, #0 + 8002ef0: d020 beq.n 8002f34 { /* Byte alignment required. Check for overflow. */ if( ( xWantedSize + ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) ) ) - 8002502: 687b ldr r3, [r7, #4] - 8002504: f023 0307 bic.w r3, r3, #7 - 8002508: 3308 adds r3, #8 - 800250a: 687a ldr r2, [r7, #4] - 800250c: 429a cmp r2, r3 - 800250e: d213 bcs.n 8002538 + 8002ef2: 687b ldr r3, [r7, #4] + 8002ef4: f023 0307 bic.w r3, r3, #7 + 8002ef8: 3308 adds r3, #8 + 8002efa: 687a ldr r2, [r7, #4] + 8002efc: 429a cmp r2, r3 + 8002efe: d213 bcs.n 8002f28 > xWantedSize ) { xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) ); - 8002510: 687b ldr r3, [r7, #4] - 8002512: f023 0307 bic.w r3, r3, #7 - 8002516: 3308 adds r3, #8 - 8002518: 607b str r3, [r7, #4] + 8002f00: 687b ldr r3, [r7, #4] + 8002f02: f023 0307 bic.w r3, r3, #7 + 8002f06: 3308 adds r3, #8 + 8002f08: 607b str r3, [r7, #4] configASSERT( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) == 0 ); - 800251a: 687b ldr r3, [r7, #4] - 800251c: f003 0307 and.w r3, r3, #7 - 8002520: 2b00 cmp r3, #0 - 8002522: d00f beq.n 8002544 - 8002524: f04f 0350 mov.w r3, #80 ; 0x50 - 8002528: f383 8811 msr BASEPRI, r3 - 800252c: f3bf 8f6f isb sy - 8002530: f3bf 8f4f dsb sy - 8002534: 617b str r3, [r7, #20] - 8002536: e7fe b.n 8002536 + 8002f0a: 687b ldr r3, [r7, #4] + 8002f0c: f003 0307 and.w r3, r3, #7 + 8002f10: 2b00 cmp r3, #0 + 8002f12: d00f beq.n 8002f34 + 8002f14: f04f 0350 mov.w r3, #80 ; 0x50 + 8002f18: f383 8811 msr BASEPRI, r3 + 8002f1c: f3bf 8f6f isb sy + 8002f20: f3bf 8f4f dsb sy + 8002f24: 617b str r3, [r7, #20] + 8002f26: e7fe b.n 8002f26 } else { xWantedSize = 0; - 8002538: 2300 movs r3, #0 - 800253a: 607b str r3, [r7, #4] + 8002f28: 2300 movs r3, #0 + 8002f2a: 607b str r3, [r7, #4] if( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) != 0x00 ) - 800253c: e002 b.n 8002544 + 8002f2c: e002 b.n 8002f34 mtCOVERAGE_TEST_MARKER(); } } else { xWantedSize = 0; - 800253e: 2300 movs r3, #0 - 8002540: 607b str r3, [r7, #4] - 8002542: e000 b.n 8002546 + 8002f2e: 2300 movs r3, #0 + 8002f30: 607b str r3, [r7, #4] + 8002f32: e000 b.n 8002f36 if( ( xWantedSize & portBYTE_ALIGNMENT_MASK ) != 0x00 ) - 8002544: bf00 nop + 8002f34: bf00 nop } if( ( xWantedSize > 0 ) && ( xWantedSize <= xFreeBytesRemaining ) ) - 8002546: 687b ldr r3, [r7, #4] - 8002548: 2b00 cmp r3, #0 - 800254a: d06d beq.n 8002628 - 800254c: 4b43 ldr r3, [pc, #268] ; (800265c ) - 800254e: 681b ldr r3, [r3, #0] - 8002550: 687a ldr r2, [r7, #4] - 8002552: 429a cmp r2, r3 - 8002554: d868 bhi.n 8002628 + 8002f36: 687b ldr r3, [r7, #4] + 8002f38: 2b00 cmp r3, #0 + 8002f3a: d06d beq.n 8003018 + 8002f3c: 4b43 ldr r3, [pc, #268] ; (800304c ) + 8002f3e: 681b ldr r3, [r3, #0] + 8002f40: 687a ldr r2, [r7, #4] + 8002f42: 429a cmp r2, r3 + 8002f44: d868 bhi.n 8003018 { /* Traverse the list from the start (lowest address) block until * one of adequate size is found. */ pxPreviousBlock = &xStart; - 8002556: 4b42 ldr r3, [pc, #264] ; (8002660 ) - 8002558: 623b str r3, [r7, #32] + 8002f46: 4b42 ldr r3, [pc, #264] ; (8003050 ) + 8002f48: 623b str r3, [r7, #32] pxBlock = xStart.pxNextFreeBlock; - 800255a: 4b41 ldr r3, [pc, #260] ; (8002660 ) - 800255c: 681b ldr r3, [r3, #0] - 800255e: 627b str r3, [r7, #36] ; 0x24 + 8002f4a: 4b41 ldr r3, [pc, #260] ; (8003050 ) + 8002f4c: 681b ldr r3, [r3, #0] + 8002f4e: 627b str r3, [r7, #36] ; 0x24 while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) ) - 8002560: e004 b.n 800256c + 8002f50: e004 b.n 8002f5c { pxPreviousBlock = pxBlock; - 8002562: 6a7b ldr r3, [r7, #36] ; 0x24 - 8002564: 623b str r3, [r7, #32] + 8002f52: 6a7b ldr r3, [r7, #36] ; 0x24 + 8002f54: 623b str r3, [r7, #32] pxBlock = pxBlock->pxNextFreeBlock; - 8002566: 6a7b ldr r3, [r7, #36] ; 0x24 - 8002568: 681b ldr r3, [r3, #0] - 800256a: 627b str r3, [r7, #36] ; 0x24 + 8002f56: 6a7b ldr r3, [r7, #36] ; 0x24 + 8002f58: 681b ldr r3, [r3, #0] + 8002f5a: 627b str r3, [r7, #36] ; 0x24 while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) ) - 800256c: 6a7b ldr r3, [r7, #36] ; 0x24 - 800256e: 685b ldr r3, [r3, #4] - 8002570: 687a ldr r2, [r7, #4] - 8002572: 429a cmp r2, r3 - 8002574: d903 bls.n 800257e - 8002576: 6a7b ldr r3, [r7, #36] ; 0x24 - 8002578: 681b ldr r3, [r3, #0] - 800257a: 2b00 cmp r3, #0 - 800257c: d1f1 bne.n 8002562 + 8002f5c: 6a7b ldr r3, [r7, #36] ; 0x24 + 8002f5e: 685b ldr r3, [r3, #4] + 8002f60: 687a ldr r2, [r7, #4] + 8002f62: 429a cmp r2, r3 + 8002f64: d903 bls.n 8002f6e + 8002f66: 6a7b ldr r3, [r7, #36] ; 0x24 + 8002f68: 681b ldr r3, [r3, #0] + 8002f6a: 2b00 cmp r3, #0 + 8002f6c: d1f1 bne.n 8002f52 } /* If the end marker was reached then a block of adequate size * was not found. */ if( pxBlock != pxEnd ) - 800257e: 4b35 ldr r3, [pc, #212] ; (8002654 ) - 8002580: 681b ldr r3, [r3, #0] - 8002582: 6a7a ldr r2, [r7, #36] ; 0x24 - 8002584: 429a cmp r2, r3 - 8002586: d04f beq.n 8002628 + 8002f6e: 4b35 ldr r3, [pc, #212] ; (8003044 ) + 8002f70: 681b ldr r3, [r3, #0] + 8002f72: 6a7a ldr r2, [r7, #36] ; 0x24 + 8002f74: 429a cmp r2, r3 + 8002f76: d04f beq.n 8003018 { /* Return the memory space pointed to - jumping over the * BlockLink_t structure at its start. */ pvReturn = ( void * ) ( ( ( uint8_t * ) pxPreviousBlock->pxNextFreeBlock ) + xHeapStructSize ); - 8002588: 6a3b ldr r3, [r7, #32] - 800258a: 681b ldr r3, [r3, #0] - 800258c: 2208 movs r2, #8 - 800258e: 4413 add r3, r2 - 8002590: 61fb str r3, [r7, #28] + 8002f78: 6a3b ldr r3, [r7, #32] + 8002f7a: 681b ldr r3, [r3, #0] + 8002f7c: 2208 movs r2, #8 + 8002f7e: 4413 add r3, r2 + 8002f80: 61fb str r3, [r7, #28] /* This block is being returned for use so must be taken out * of the list of free blocks. */ pxPreviousBlock->pxNextFreeBlock = pxBlock->pxNextFreeBlock; - 8002592: 6a7b ldr r3, [r7, #36] ; 0x24 - 8002594: 681a ldr r2, [r3, #0] - 8002596: 6a3b ldr r3, [r7, #32] - 8002598: 601a str r2, [r3, #0] + 8002f82: 6a7b ldr r3, [r7, #36] ; 0x24 + 8002f84: 681a ldr r2, [r3, #0] + 8002f86: 6a3b ldr r3, [r7, #32] + 8002f88: 601a str r2, [r3, #0] /* If the block is larger than required it can be split into * two. */ if( ( pxBlock->xBlockSize - xWantedSize ) > heapMINIMUM_BLOCK_SIZE ) - 800259a: 6a7b ldr r3, [r7, #36] ; 0x24 - 800259c: 685a ldr r2, [r3, #4] - 800259e: 687b ldr r3, [r7, #4] - 80025a0: 1ad2 subs r2, r2, r3 - 80025a2: 2308 movs r3, #8 - 80025a4: 005b lsls r3, r3, #1 - 80025a6: 429a cmp r2, r3 - 80025a8: d91e bls.n 80025e8 + 8002f8a: 6a7b ldr r3, [r7, #36] ; 0x24 + 8002f8c: 685a ldr r2, [r3, #4] + 8002f8e: 687b ldr r3, [r7, #4] + 8002f90: 1ad2 subs r2, r2, r3 + 8002f92: 2308 movs r3, #8 + 8002f94: 005b lsls r3, r3, #1 + 8002f96: 429a cmp r2, r3 + 8002f98: d91e bls.n 8002fd8 { /* This block is to be split into two. Create a new * block following the number of bytes requested. The void * cast is used to prevent byte alignment warnings from the * compiler. */ pxNewBlockLink = ( void * ) ( ( ( uint8_t * ) pxBlock ) + xWantedSize ); - 80025aa: 6a7a ldr r2, [r7, #36] ; 0x24 - 80025ac: 687b ldr r3, [r7, #4] - 80025ae: 4413 add r3, r2 - 80025b0: 61bb str r3, [r7, #24] + 8002f9a: 6a7a ldr r2, [r7, #36] ; 0x24 + 8002f9c: 687b ldr r3, [r7, #4] + 8002f9e: 4413 add r3, r2 + 8002fa0: 61bb str r3, [r7, #24] configASSERT( ( ( ( size_t ) pxNewBlockLink ) & portBYTE_ALIGNMENT_MASK ) == 0 ); - 80025b2: 69bb ldr r3, [r7, #24] - 80025b4: f003 0307 and.w r3, r3, #7 - 80025b8: 2b00 cmp r3, #0 - 80025ba: d009 beq.n 80025d0 - 80025bc: f04f 0350 mov.w r3, #80 ; 0x50 - 80025c0: f383 8811 msr BASEPRI, r3 - 80025c4: f3bf 8f6f isb sy - 80025c8: f3bf 8f4f dsb sy - 80025cc: 613b str r3, [r7, #16] - 80025ce: e7fe b.n 80025ce + 8002fa2: 69bb ldr r3, [r7, #24] + 8002fa4: f003 0307 and.w r3, r3, #7 + 8002fa8: 2b00 cmp r3, #0 + 8002faa: d009 beq.n 8002fc0 + 8002fac: f04f 0350 mov.w r3, #80 ; 0x50 + 8002fb0: f383 8811 msr BASEPRI, r3 + 8002fb4: f3bf 8f6f isb sy + 8002fb8: f3bf 8f4f dsb sy + 8002fbc: 613b str r3, [r7, #16] + 8002fbe: e7fe b.n 8002fbe /* Calculate the sizes of two blocks split from the * single block. */ pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize; - 80025d0: 6a7b ldr r3, [r7, #36] ; 0x24 - 80025d2: 685a ldr r2, [r3, #4] - 80025d4: 687b ldr r3, [r7, #4] - 80025d6: 1ad2 subs r2, r2, r3 - 80025d8: 69bb ldr r3, [r7, #24] - 80025da: 605a str r2, [r3, #4] + 8002fc0: 6a7b ldr r3, [r7, #36] ; 0x24 + 8002fc2: 685a ldr r2, [r3, #4] + 8002fc4: 687b ldr r3, [r7, #4] + 8002fc6: 1ad2 subs r2, r2, r3 + 8002fc8: 69bb ldr r3, [r7, #24] + 8002fca: 605a str r2, [r3, #4] pxBlock->xBlockSize = xWantedSize; - 80025dc: 6a7b ldr r3, [r7, #36] ; 0x24 - 80025de: 687a ldr r2, [r7, #4] - 80025e0: 605a str r2, [r3, #4] + 8002fcc: 6a7b ldr r3, [r7, #36] ; 0x24 + 8002fce: 687a ldr r2, [r7, #4] + 8002fd0: 605a str r2, [r3, #4] /* Insert the new block into the list of free blocks. */ prvInsertBlockIntoFreeList( pxNewBlockLink ); - 80025e2: 69b8 ldr r0, [r7, #24] - 80025e4: f000 f904 bl 80027f0 + 8002fd2: 69b8 ldr r0, [r7, #24] + 8002fd4: f000 f904 bl 80031e0 else { mtCOVERAGE_TEST_MARKER(); } xFreeBytesRemaining -= pxBlock->xBlockSize; - 80025e8: 4b1c ldr r3, [pc, #112] ; (800265c ) - 80025ea: 681a ldr r2, [r3, #0] - 80025ec: 6a7b ldr r3, [r7, #36] ; 0x24 - 80025ee: 685b ldr r3, [r3, #4] - 80025f0: 1ad3 subs r3, r2, r3 - 80025f2: 4a1a ldr r2, [pc, #104] ; (800265c ) - 80025f4: 6013 str r3, [r2, #0] + 8002fd8: 4b1c ldr r3, [pc, #112] ; (800304c ) + 8002fda: 681a ldr r2, [r3, #0] + 8002fdc: 6a7b ldr r3, [r7, #36] ; 0x24 + 8002fde: 685b ldr r3, [r3, #4] + 8002fe0: 1ad3 subs r3, r2, r3 + 8002fe2: 4a1a ldr r2, [pc, #104] ; (800304c ) + 8002fe4: 6013 str r3, [r2, #0] if( xFreeBytesRemaining < xMinimumEverFreeBytesRemaining ) - 80025f6: 4b19 ldr r3, [pc, #100] ; (800265c ) - 80025f8: 681a ldr r2, [r3, #0] - 80025fa: 4b1a ldr r3, [pc, #104] ; (8002664 ) - 80025fc: 681b ldr r3, [r3, #0] - 80025fe: 429a cmp r2, r3 - 8002600: d203 bcs.n 800260a + 8002fe6: 4b19 ldr r3, [pc, #100] ; (800304c ) + 8002fe8: 681a ldr r2, [r3, #0] + 8002fea: 4b1a ldr r3, [pc, #104] ; (8003054 ) + 8002fec: 681b ldr r3, [r3, #0] + 8002fee: 429a cmp r2, r3 + 8002ff0: d203 bcs.n 8002ffa { xMinimumEverFreeBytesRemaining = xFreeBytesRemaining; - 8002602: 4b16 ldr r3, [pc, #88] ; (800265c ) - 8002604: 681b ldr r3, [r3, #0] - 8002606: 4a17 ldr r2, [pc, #92] ; (8002664 ) - 8002608: 6013 str r3, [r2, #0] + 8002ff2: 4b16 ldr r3, [pc, #88] ; (800304c ) + 8002ff4: 681b ldr r3, [r3, #0] + 8002ff6: 4a17 ldr r2, [pc, #92] ; (8003054 ) + 8002ff8: 6013 str r3, [r2, #0] mtCOVERAGE_TEST_MARKER(); } /* The block is being returned - it is allocated and owned * by the application and has no "next" block. */ pxBlock->xBlockSize |= xBlockAllocatedBit; - 800260a: 6a7b ldr r3, [r7, #36] ; 0x24 - 800260c: 685a ldr r2, [r3, #4] - 800260e: 4b12 ldr r3, [pc, #72] ; (8002658 ) - 8002610: 681b ldr r3, [r3, #0] - 8002612: 431a orrs r2, r3 - 8002614: 6a7b ldr r3, [r7, #36] ; 0x24 - 8002616: 605a str r2, [r3, #4] + 8002ffa: 6a7b ldr r3, [r7, #36] ; 0x24 + 8002ffc: 685a ldr r2, [r3, #4] + 8002ffe: 4b12 ldr r3, [pc, #72] ; (8003048 ) + 8003000: 681b ldr r3, [r3, #0] + 8003002: 431a orrs r2, r3 + 8003004: 6a7b ldr r3, [r7, #36] ; 0x24 + 8003006: 605a str r2, [r3, #4] pxBlock->pxNextFreeBlock = NULL; - 8002618: 6a7b ldr r3, [r7, #36] ; 0x24 - 800261a: 2200 movs r2, #0 - 800261c: 601a str r2, [r3, #0] + 8003008: 6a7b ldr r3, [r7, #36] ; 0x24 + 800300a: 2200 movs r2, #0 + 800300c: 601a str r2, [r3, #0] xNumberOfSuccessfulAllocations++; - 800261e: 4b12 ldr r3, [pc, #72] ; (8002668 ) - 8002620: 681b ldr r3, [r3, #0] - 8002622: 3301 adds r3, #1 - 8002624: 4a10 ldr r2, [pc, #64] ; (8002668 ) - 8002626: 6013 str r3, [r2, #0] + 800300e: 4b12 ldr r3, [pc, #72] ; (8003058 ) + 8003010: 681b ldr r3, [r3, #0] + 8003012: 3301 adds r3, #1 + 8003014: 4a10 ldr r2, [pc, #64] ; (8003058 ) + 8003016: 6013 str r3, [r2, #0] mtCOVERAGE_TEST_MARKER(); } traceMALLOC( pvReturn, xWantedSize ); } ( void ) xTaskResumeAll(); - 8002628: f7fe fd54 bl 80010d4 + 8003018: f7fe fa20 bl 800145c mtCOVERAGE_TEST_MARKER(); } } #endif /* if ( configUSE_MALLOC_FAILED_HOOK == 1 ) */ configASSERT( ( ( ( size_t ) pvReturn ) & ( size_t ) portBYTE_ALIGNMENT_MASK ) == 0 ); - 800262c: 69fb ldr r3, [r7, #28] - 800262e: f003 0307 and.w r3, r3, #7 - 8002632: 2b00 cmp r3, #0 - 8002634: d009 beq.n 800264a - 8002636: f04f 0350 mov.w r3, #80 ; 0x50 - 800263a: f383 8811 msr BASEPRI, r3 - 800263e: f3bf 8f6f isb sy - 8002642: f3bf 8f4f dsb sy - 8002646: 60fb str r3, [r7, #12] - 8002648: e7fe b.n 8002648 + 800301c: 69fb ldr r3, [r7, #28] + 800301e: f003 0307 and.w r3, r3, #7 + 8003022: 2b00 cmp r3, #0 + 8003024: d009 beq.n 800303a + 8003026: f04f 0350 mov.w r3, #80 ; 0x50 + 800302a: f383 8811 msr BASEPRI, r3 + 800302e: f3bf 8f6f isb sy + 8003032: f3bf 8f4f dsb sy + 8003036: 60fb str r3, [r7, #12] + 8003038: e7fe b.n 8003038 return pvReturn; - 800264a: 69fb ldr r3, [r7, #28] -} - 800264c: 4618 mov r0, r3 - 800264e: 3728 adds r7, #40 ; 0x28 - 8002650: 46bd mov sp, r7 - 8002652: bd80 pop {r7, pc} - 8002654: 20012d9c .word 0x20012d9c - 8002658: 20012db0 .word 0x20012db0 - 800265c: 20012da0 .word 0x20012da0 - 8002660: 20012d94 .word 0x20012d94 - 8002664: 20012da4 .word 0x20012da4 - 8002668: 20012da8 .word 0x20012da8 - -0800266c : + 800303a: 69fb ldr r3, [r7, #28] +} + 800303c: 4618 mov r0, r3 + 800303e: 3728 adds r7, #40 ; 0x28 + 8003040: 46bd mov sp, r7 + 8003042: bd80 pop {r7, pc} + 8003044: 20012ef0 .word 0x20012ef0 + 8003048: 20012f04 .word 0x20012f04 + 800304c: 20012ef4 .word 0x20012ef4 + 8003050: 20012ee8 .word 0x20012ee8 + 8003054: 20012ef8 .word 0x20012ef8 + 8003058: 20012efc .word 0x20012efc + +0800305c : /*-----------------------------------------------------------*/ void vPortFree( void * pv ) { - 800266c: b580 push {r7, lr} - 800266e: b086 sub sp, #24 - 8002670: af00 add r7, sp, #0 - 8002672: 6078 str r0, [r7, #4] + 800305c: b580 push {r7, lr} + 800305e: b086 sub sp, #24 + 8003060: af00 add r7, sp, #0 + 8003062: 6078 str r0, [r7, #4] uint8_t * puc = ( uint8_t * ) pv; - 8002674: 687b ldr r3, [r7, #4] - 8002676: 617b str r3, [r7, #20] + 8003064: 687b ldr r3, [r7, #4] + 8003066: 617b str r3, [r7, #20] BlockLink_t * pxLink; if( pv != NULL ) - 8002678: 687b ldr r3, [r7, #4] - 800267a: 2b00 cmp r3, #0 - 800267c: d04b beq.n 8002716 + 8003068: 687b ldr r3, [r7, #4] + 800306a: 2b00 cmp r3, #0 + 800306c: d04b beq.n 8003106 { /* The memory being freed will have an BlockLink_t structure immediately * before it. */ puc -= xHeapStructSize; - 800267e: 2308 movs r3, #8 - 8002680: 425b negs r3, r3 - 8002682: 697a ldr r2, [r7, #20] - 8002684: 4413 add r3, r2 - 8002686: 617b str r3, [r7, #20] + 800306e: 2308 movs r3, #8 + 8003070: 425b negs r3, r3 + 8003072: 697a ldr r2, [r7, #20] + 8003074: 4413 add r3, r2 + 8003076: 617b str r3, [r7, #20] /* This casting is to keep the compiler from issuing warnings. */ pxLink = ( void * ) puc; - 8002688: 697b ldr r3, [r7, #20] - 800268a: 613b str r3, [r7, #16] + 8003078: 697b ldr r3, [r7, #20] + 800307a: 613b str r3, [r7, #16] /* Check the block is actually allocated. */ configASSERT( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 ); - 800268c: 693b ldr r3, [r7, #16] - 800268e: 685a ldr r2, [r3, #4] - 8002690: 4b23 ldr r3, [pc, #140] ; (8002720 ) - 8002692: 681b ldr r3, [r3, #0] - 8002694: 4013 ands r3, r2 - 8002696: 2b00 cmp r3, #0 - 8002698: d109 bne.n 80026ae - 800269a: f04f 0350 mov.w r3, #80 ; 0x50 - 800269e: f383 8811 msr BASEPRI, r3 - 80026a2: f3bf 8f6f isb sy - 80026a6: f3bf 8f4f dsb sy - 80026aa: 60fb str r3, [r7, #12] - 80026ac: e7fe b.n 80026ac + 800307c: 693b ldr r3, [r7, #16] + 800307e: 685a ldr r2, [r3, #4] + 8003080: 4b23 ldr r3, [pc, #140] ; (8003110 ) + 8003082: 681b ldr r3, [r3, #0] + 8003084: 4013 ands r3, r2 + 8003086: 2b00 cmp r3, #0 + 8003088: d109 bne.n 800309e + 800308a: f04f 0350 mov.w r3, #80 ; 0x50 + 800308e: f383 8811 msr BASEPRI, r3 + 8003092: f3bf 8f6f isb sy + 8003096: f3bf 8f4f dsb sy + 800309a: 60fb str r3, [r7, #12] + 800309c: e7fe b.n 800309c configASSERT( pxLink->pxNextFreeBlock == NULL ); - 80026ae: 693b ldr r3, [r7, #16] - 80026b0: 681b ldr r3, [r3, #0] - 80026b2: 2b00 cmp r3, #0 - 80026b4: d009 beq.n 80026ca - 80026b6: f04f 0350 mov.w r3, #80 ; 0x50 - 80026ba: f383 8811 msr BASEPRI, r3 - 80026be: f3bf 8f6f isb sy - 80026c2: f3bf 8f4f dsb sy - 80026c6: 60bb str r3, [r7, #8] - 80026c8: e7fe b.n 80026c8 + 800309e: 693b ldr r3, [r7, #16] + 80030a0: 681b ldr r3, [r3, #0] + 80030a2: 2b00 cmp r3, #0 + 80030a4: d009 beq.n 80030ba + 80030a6: f04f 0350 mov.w r3, #80 ; 0x50 + 80030aa: f383 8811 msr BASEPRI, r3 + 80030ae: f3bf 8f6f isb sy + 80030b2: f3bf 8f4f dsb sy + 80030b6: 60bb str r3, [r7, #8] + 80030b8: e7fe b.n 80030b8 if( ( pxLink->xBlockSize & xBlockAllocatedBit ) != 0 ) - 80026ca: 693b ldr r3, [r7, #16] - 80026cc: 685a ldr r2, [r3, #4] - 80026ce: 4b14 ldr r3, [pc, #80] ; (8002720 ) - 80026d0: 681b ldr r3, [r3, #0] - 80026d2: 4013 ands r3, r2 - 80026d4: 2b00 cmp r3, #0 - 80026d6: d01e beq.n 8002716 + 80030ba: 693b ldr r3, [r7, #16] + 80030bc: 685a ldr r2, [r3, #4] + 80030be: 4b14 ldr r3, [pc, #80] ; (8003110 ) + 80030c0: 681b ldr r3, [r3, #0] + 80030c2: 4013 ands r3, r2 + 80030c4: 2b00 cmp r3, #0 + 80030c6: d01e beq.n 8003106 { if( pxLink->pxNextFreeBlock == NULL ) - 80026d8: 693b ldr r3, [r7, #16] - 80026da: 681b ldr r3, [r3, #0] - 80026dc: 2b00 cmp r3, #0 - 80026de: d11a bne.n 8002716 + 80030c8: 693b ldr r3, [r7, #16] + 80030ca: 681b ldr r3, [r3, #0] + 80030cc: 2b00 cmp r3, #0 + 80030ce: d11a bne.n 8003106 { /* The block is being returned to the heap - it is no longer * allocated. */ pxLink->xBlockSize &= ~xBlockAllocatedBit; - 80026e0: 693b ldr r3, [r7, #16] - 80026e2: 685a ldr r2, [r3, #4] - 80026e4: 4b0e ldr r3, [pc, #56] ; (8002720 ) - 80026e6: 681b ldr r3, [r3, #0] - 80026e8: 43db mvns r3, r3 - 80026ea: 401a ands r2, r3 - 80026ec: 693b ldr r3, [r7, #16] - 80026ee: 605a str r2, [r3, #4] + 80030d0: 693b ldr r3, [r7, #16] + 80030d2: 685a ldr r2, [r3, #4] + 80030d4: 4b0e ldr r3, [pc, #56] ; (8003110 ) + 80030d6: 681b ldr r3, [r3, #0] + 80030d8: 43db mvns r3, r3 + 80030da: 401a ands r2, r3 + 80030dc: 693b ldr r3, [r7, #16] + 80030de: 605a str r2, [r3, #4] vTaskSuspendAll(); - 80026f0: f7fe fce2 bl 80010b8 + 80030e0: f7fe f9ae bl 8001440 { /* Add this block to the list of free blocks. */ xFreeBytesRemaining += pxLink->xBlockSize; - 80026f4: 693b ldr r3, [r7, #16] - 80026f6: 685a ldr r2, [r3, #4] - 80026f8: 4b0a ldr r3, [pc, #40] ; (8002724 ) - 80026fa: 681b ldr r3, [r3, #0] - 80026fc: 4413 add r3, r2 - 80026fe: 4a09 ldr r2, [pc, #36] ; (8002724 ) - 8002700: 6013 str r3, [r2, #0] + 80030e4: 693b ldr r3, [r7, #16] + 80030e6: 685a ldr r2, [r3, #4] + 80030e8: 4b0a ldr r3, [pc, #40] ; (8003114 ) + 80030ea: 681b ldr r3, [r3, #0] + 80030ec: 4413 add r3, r2 + 80030ee: 4a09 ldr r2, [pc, #36] ; (8003114 ) + 80030f0: 6013 str r3, [r2, #0] traceFREE( pv, pxLink->xBlockSize ); prvInsertBlockIntoFreeList( ( ( BlockLink_t * ) pxLink ) ); - 8002702: 6938 ldr r0, [r7, #16] - 8002704: f000 f874 bl 80027f0 + 80030f2: 6938 ldr r0, [r7, #16] + 80030f4: f000 f874 bl 80031e0 xNumberOfSuccessfulFrees++; - 8002708: 4b07 ldr r3, [pc, #28] ; (8002728 ) - 800270a: 681b ldr r3, [r3, #0] - 800270c: 3301 adds r3, #1 - 800270e: 4a06 ldr r2, [pc, #24] ; (8002728 ) - 8002710: 6013 str r3, [r2, #0] + 80030f8: 4b07 ldr r3, [pc, #28] ; (8003118 ) + 80030fa: 681b ldr r3, [r3, #0] + 80030fc: 3301 adds r3, #1 + 80030fe: 4a06 ldr r2, [pc, #24] ; (8003118 ) + 8003100: 6013 str r3, [r2, #0] } ( void ) xTaskResumeAll(); - 8002712: f7fe fcdf bl 80010d4 + 8003102: f7fe f9ab bl 800145c else { mtCOVERAGE_TEST_MARKER(); } } } - 8002716: bf00 nop - 8002718: 3718 adds r7, #24 - 800271a: 46bd mov sp, r7 - 800271c: bd80 pop {r7, pc} - 800271e: bf00 nop - 8002720: 20012db0 .word 0x20012db0 - 8002724: 20012da0 .word 0x20012da0 - 8002728: 20012dac .word 0x20012dac - -0800272c : + 8003106: bf00 nop + 8003108: 3718 adds r7, #24 + 800310a: 46bd mov sp, r7 + 800310c: bd80 pop {r7, pc} + 800310e: bf00 nop + 8003110: 20012f04 .word 0x20012f04 + 8003114: 20012ef4 .word 0x20012ef4 + 8003118: 20012f00 .word 0x20012f00 + +0800311c : /* This just exists to keep the linker quiet. */ } /*-----------------------------------------------------------*/ static void prvHeapInit( void ) /* PRIVILEGED_FUNCTION */ { - 800272c: b480 push {r7} - 800272e: b085 sub sp, #20 - 8002730: af00 add r7, sp, #0 + 800311c: b480 push {r7} + 800311e: b085 sub sp, #20 + 8003120: af00 add r7, sp, #0 BlockLink_t * pxFirstFreeBlock; uint8_t * pucAlignedHeap; size_t uxAddress; size_t xTotalHeapSize = configTOTAL_HEAP_SIZE; - 8002732: f44f 3396 mov.w r3, #76800 ; 0x12c00 - 8002736: 60bb str r3, [r7, #8] + 8003122: f44f 3396 mov.w r3, #76800 ; 0x12c00 + 8003126: 60bb str r3, [r7, #8] /* Ensure the heap starts on a correctly aligned boundary. */ uxAddress = ( size_t ) ucHeap; - 8002738: 4b27 ldr r3, [pc, #156] ; (80027d8 ) - 800273a: 60fb str r3, [r7, #12] + 8003128: 4b27 ldr r3, [pc, #156] ; (80031c8 ) + 800312a: 60fb str r3, [r7, #12] if( ( uxAddress & portBYTE_ALIGNMENT_MASK ) != 0 ) - 800273c: 68fb ldr r3, [r7, #12] - 800273e: f003 0307 and.w r3, r3, #7 - 8002742: 2b00 cmp r3, #0 - 8002744: d00c beq.n 8002760 + 800312c: 68fb ldr r3, [r7, #12] + 800312e: f003 0307 and.w r3, r3, #7 + 8003132: 2b00 cmp r3, #0 + 8003134: d00c beq.n 8003150 { uxAddress += ( portBYTE_ALIGNMENT - 1 ); - 8002746: 68fb ldr r3, [r7, #12] - 8002748: 3307 adds r3, #7 - 800274a: 60fb str r3, [r7, #12] + 8003136: 68fb ldr r3, [r7, #12] + 8003138: 3307 adds r3, #7 + 800313a: 60fb str r3, [r7, #12] uxAddress &= ~( ( size_t ) portBYTE_ALIGNMENT_MASK ); - 800274c: 68fb ldr r3, [r7, #12] - 800274e: f023 0307 bic.w r3, r3, #7 - 8002752: 60fb str r3, [r7, #12] + 800313c: 68fb ldr r3, [r7, #12] + 800313e: f023 0307 bic.w r3, r3, #7 + 8003142: 60fb str r3, [r7, #12] xTotalHeapSize -= uxAddress - ( size_t ) ucHeap; - 8002754: 68ba ldr r2, [r7, #8] - 8002756: 68fb ldr r3, [r7, #12] - 8002758: 1ad3 subs r3, r2, r3 - 800275a: 4a1f ldr r2, [pc, #124] ; (80027d8 ) - 800275c: 4413 add r3, r2 - 800275e: 60bb str r3, [r7, #8] + 8003144: 68ba ldr r2, [r7, #8] + 8003146: 68fb ldr r3, [r7, #12] + 8003148: 1ad3 subs r3, r2, r3 + 800314a: 4a1f ldr r2, [pc, #124] ; (80031c8 ) + 800314c: 4413 add r3, r2 + 800314e: 60bb str r3, [r7, #8] } pucAlignedHeap = ( uint8_t * ) uxAddress; - 8002760: 68fb ldr r3, [r7, #12] - 8002762: 607b str r3, [r7, #4] + 8003150: 68fb ldr r3, [r7, #12] + 8003152: 607b str r3, [r7, #4] /* xStart is used to hold a pointer to the first item in the list of free * blocks. The void cast is used to prevent compiler warnings. */ xStart.pxNextFreeBlock = ( void * ) pucAlignedHeap; - 8002764: 4a1d ldr r2, [pc, #116] ; (80027dc ) - 8002766: 687b ldr r3, [r7, #4] - 8002768: 6013 str r3, [r2, #0] + 8003154: 4a1d ldr r2, [pc, #116] ; (80031cc ) + 8003156: 687b ldr r3, [r7, #4] + 8003158: 6013 str r3, [r2, #0] xStart.xBlockSize = ( size_t ) 0; - 800276a: 4b1c ldr r3, [pc, #112] ; (80027dc ) - 800276c: 2200 movs r2, #0 - 800276e: 605a str r2, [r3, #4] + 800315a: 4b1c ldr r3, [pc, #112] ; (80031cc ) + 800315c: 2200 movs r2, #0 + 800315e: 605a str r2, [r3, #4] /* pxEnd is used to mark the end of the list of free blocks and is inserted * at the end of the heap space. */ uxAddress = ( ( size_t ) pucAlignedHeap ) + xTotalHeapSize; - 8002770: 687b ldr r3, [r7, #4] - 8002772: 68ba ldr r2, [r7, #8] - 8002774: 4413 add r3, r2 - 8002776: 60fb str r3, [r7, #12] + 8003160: 687b ldr r3, [r7, #4] + 8003162: 68ba ldr r2, [r7, #8] + 8003164: 4413 add r3, r2 + 8003166: 60fb str r3, [r7, #12] uxAddress -= xHeapStructSize; - 8002778: 2208 movs r2, #8 - 800277a: 68fb ldr r3, [r7, #12] - 800277c: 1a9b subs r3, r3, r2 - 800277e: 60fb str r3, [r7, #12] + 8003168: 2208 movs r2, #8 + 800316a: 68fb ldr r3, [r7, #12] + 800316c: 1a9b subs r3, r3, r2 + 800316e: 60fb str r3, [r7, #12] uxAddress &= ~( ( size_t ) portBYTE_ALIGNMENT_MASK ); - 8002780: 68fb ldr r3, [r7, #12] - 8002782: f023 0307 bic.w r3, r3, #7 - 8002786: 60fb str r3, [r7, #12] + 8003170: 68fb ldr r3, [r7, #12] + 8003172: f023 0307 bic.w r3, r3, #7 + 8003176: 60fb str r3, [r7, #12] pxEnd = ( void * ) uxAddress; - 8002788: 68fb ldr r3, [r7, #12] - 800278a: 4a15 ldr r2, [pc, #84] ; (80027e0 ) - 800278c: 6013 str r3, [r2, #0] + 8003178: 68fb ldr r3, [r7, #12] + 800317a: 4a15 ldr r2, [pc, #84] ; (80031d0 ) + 800317c: 6013 str r3, [r2, #0] pxEnd->xBlockSize = 0; - 800278e: 4b14 ldr r3, [pc, #80] ; (80027e0 ) - 8002790: 681b ldr r3, [r3, #0] - 8002792: 2200 movs r2, #0 - 8002794: 605a str r2, [r3, #4] + 800317e: 4b14 ldr r3, [pc, #80] ; (80031d0 ) + 8003180: 681b ldr r3, [r3, #0] + 8003182: 2200 movs r2, #0 + 8003184: 605a str r2, [r3, #4] pxEnd->pxNextFreeBlock = NULL; - 8002796: 4b12 ldr r3, [pc, #72] ; (80027e0 ) - 8002798: 681b ldr r3, [r3, #0] - 800279a: 2200 movs r2, #0 - 800279c: 601a str r2, [r3, #0] + 8003186: 4b12 ldr r3, [pc, #72] ; (80031d0 ) + 8003188: 681b ldr r3, [r3, #0] + 800318a: 2200 movs r2, #0 + 800318c: 601a str r2, [r3, #0] /* To start with there is a single free block that is sized to take up the * entire heap space, minus the space taken by pxEnd. */ pxFirstFreeBlock = ( void * ) pucAlignedHeap; - 800279e: 687b ldr r3, [r7, #4] - 80027a0: 603b str r3, [r7, #0] + 800318e: 687b ldr r3, [r7, #4] + 8003190: 603b str r3, [r7, #0] pxFirstFreeBlock->xBlockSize = uxAddress - ( size_t ) pxFirstFreeBlock; - 80027a2: 683b ldr r3, [r7, #0] - 80027a4: 68fa ldr r2, [r7, #12] - 80027a6: 1ad2 subs r2, r2, r3 - 80027a8: 683b ldr r3, [r7, #0] - 80027aa: 605a str r2, [r3, #4] + 8003192: 683b ldr r3, [r7, #0] + 8003194: 68fa ldr r2, [r7, #12] + 8003196: 1ad2 subs r2, r2, r3 + 8003198: 683b ldr r3, [r7, #0] + 800319a: 605a str r2, [r3, #4] pxFirstFreeBlock->pxNextFreeBlock = pxEnd; - 80027ac: 4b0c ldr r3, [pc, #48] ; (80027e0 ) - 80027ae: 681a ldr r2, [r3, #0] - 80027b0: 683b ldr r3, [r7, #0] - 80027b2: 601a str r2, [r3, #0] + 800319c: 4b0c ldr r3, [pc, #48] ; (80031d0 ) + 800319e: 681a ldr r2, [r3, #0] + 80031a0: 683b ldr r3, [r7, #0] + 80031a2: 601a str r2, [r3, #0] /* Only one block exists - and it covers the entire usable heap space. */ xMinimumEverFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; - 80027b4: 683b ldr r3, [r7, #0] - 80027b6: 685b ldr r3, [r3, #4] - 80027b8: 4a0a ldr r2, [pc, #40] ; (80027e4 ) - 80027ba: 6013 str r3, [r2, #0] + 80031a4: 683b ldr r3, [r7, #0] + 80031a6: 685b ldr r3, [r3, #4] + 80031a8: 4a0a ldr r2, [pc, #40] ; (80031d4 ) + 80031aa: 6013 str r3, [r2, #0] xFreeBytesRemaining = pxFirstFreeBlock->xBlockSize; - 80027bc: 683b ldr r3, [r7, #0] - 80027be: 685b ldr r3, [r3, #4] - 80027c0: 4a09 ldr r2, [pc, #36] ; (80027e8 ) - 80027c2: 6013 str r3, [r2, #0] + 80031ac: 683b ldr r3, [r7, #0] + 80031ae: 685b ldr r3, [r3, #4] + 80031b0: 4a09 ldr r2, [pc, #36] ; (80031d8 ) + 80031b2: 6013 str r3, [r2, #0] /* Work out the position of the top bit in a size_t variable. */ xBlockAllocatedBit = ( ( size_t ) 1 ) << ( ( sizeof( size_t ) * heapBITS_PER_BYTE ) - 1 ); - 80027c4: 4b09 ldr r3, [pc, #36] ; (80027ec ) - 80027c6: f04f 4200 mov.w r2, #2147483648 ; 0x80000000 - 80027ca: 601a str r2, [r3, #0] -} - 80027cc: bf00 nop - 80027ce: 3714 adds r7, #20 - 80027d0: 46bd mov sp, r7 - 80027d2: f85d 7b04 ldr.w r7, [sp], #4 - 80027d6: 4770 bx lr - 80027d8: 20000194 .word 0x20000194 - 80027dc: 20012d94 .word 0x20012d94 - 80027e0: 20012d9c .word 0x20012d9c - 80027e4: 20012da4 .word 0x20012da4 - 80027e8: 20012da0 .word 0x20012da0 - 80027ec: 20012db0 .word 0x20012db0 - -080027f0 : + 80031b4: 4b09 ldr r3, [pc, #36] ; (80031dc ) + 80031b6: f04f 4200 mov.w r2, #2147483648 ; 0x80000000 + 80031ba: 601a str r2, [r3, #0] +} + 80031bc: bf00 nop + 80031be: 3714 adds r7, #20 + 80031c0: 46bd mov sp, r7 + 80031c2: f85d 7b04 ldr.w r7, [sp], #4 + 80031c6: 4770 bx lr + 80031c8: 200002e8 .word 0x200002e8 + 80031cc: 20012ee8 .word 0x20012ee8 + 80031d0: 20012ef0 .word 0x20012ef0 + 80031d4: 20012ef8 .word 0x20012ef8 + 80031d8: 20012ef4 .word 0x20012ef4 + 80031dc: 20012f04 .word 0x20012f04 + +080031e0 : /*-----------------------------------------------------------*/ static void prvInsertBlockIntoFreeList( BlockLink_t * pxBlockToInsert ) /* PRIVILEGED_FUNCTION */ { - 80027f0: b480 push {r7} - 80027f2: b085 sub sp, #20 - 80027f4: af00 add r7, sp, #0 - 80027f6: 6078 str r0, [r7, #4] + 80031e0: b480 push {r7} + 80031e2: b085 sub sp, #20 + 80031e4: af00 add r7, sp, #0 + 80031e6: 6078 str r0, [r7, #4] BlockLink_t * pxIterator; uint8_t * puc; /* Iterate through the list until a block is found that has a higher address * than the block being inserted. */ for( pxIterator = &xStart; pxIterator->pxNextFreeBlock < pxBlockToInsert; pxIterator = pxIterator->pxNextFreeBlock ) - 80027f8: 4b28 ldr r3, [pc, #160] ; (800289c ) - 80027fa: 60fb str r3, [r7, #12] - 80027fc: e002 b.n 8002804 - 80027fe: 68fb ldr r3, [r7, #12] - 8002800: 681b ldr r3, [r3, #0] - 8002802: 60fb str r3, [r7, #12] - 8002804: 68fb ldr r3, [r7, #12] - 8002806: 681b ldr r3, [r3, #0] - 8002808: 687a ldr r2, [r7, #4] - 800280a: 429a cmp r2, r3 - 800280c: d8f7 bhi.n 80027fe + 80031e8: 4b28 ldr r3, [pc, #160] ; (800328c ) + 80031ea: 60fb str r3, [r7, #12] + 80031ec: e002 b.n 80031f4 + 80031ee: 68fb ldr r3, [r7, #12] + 80031f0: 681b ldr r3, [r3, #0] + 80031f2: 60fb str r3, [r7, #12] + 80031f4: 68fb ldr r3, [r7, #12] + 80031f6: 681b ldr r3, [r3, #0] + 80031f8: 687a ldr r2, [r7, #4] + 80031fa: 429a cmp r2, r3 + 80031fc: d8f7 bhi.n 80031ee /* Nothing to do here, just iterate to the right position. */ } /* Do the block being inserted, and the block it is being inserted after * make a contiguous block of memory? */ puc = ( uint8_t * ) pxIterator; - 800280e: 68fb ldr r3, [r7, #12] - 8002810: 60bb str r3, [r7, #8] + 80031fe: 68fb ldr r3, [r7, #12] + 8003200: 60bb str r3, [r7, #8] if( ( puc + pxIterator->xBlockSize ) == ( uint8_t * ) pxBlockToInsert ) - 8002812: 68fb ldr r3, [r7, #12] - 8002814: 685b ldr r3, [r3, #4] - 8002816: 68ba ldr r2, [r7, #8] - 8002818: 4413 add r3, r2 - 800281a: 687a ldr r2, [r7, #4] - 800281c: 429a cmp r2, r3 - 800281e: d108 bne.n 8002832 + 8003202: 68fb ldr r3, [r7, #12] + 8003204: 685b ldr r3, [r3, #4] + 8003206: 68ba ldr r2, [r7, #8] + 8003208: 4413 add r3, r2 + 800320a: 687a ldr r2, [r7, #4] + 800320c: 429a cmp r2, r3 + 800320e: d108 bne.n 8003222 { pxIterator->xBlockSize += pxBlockToInsert->xBlockSize; - 8002820: 68fb ldr r3, [r7, #12] - 8002822: 685a ldr r2, [r3, #4] - 8002824: 687b ldr r3, [r7, #4] - 8002826: 685b ldr r3, [r3, #4] - 8002828: 441a add r2, r3 - 800282a: 68fb ldr r3, [r7, #12] - 800282c: 605a str r2, [r3, #4] + 8003210: 68fb ldr r3, [r7, #12] + 8003212: 685a ldr r2, [r3, #4] + 8003214: 687b ldr r3, [r7, #4] + 8003216: 685b ldr r3, [r3, #4] + 8003218: 441a add r2, r3 + 800321a: 68fb ldr r3, [r7, #12] + 800321c: 605a str r2, [r3, #4] pxBlockToInsert = pxIterator; - 800282e: 68fb ldr r3, [r7, #12] - 8002830: 607b str r3, [r7, #4] + 800321e: 68fb ldr r3, [r7, #12] + 8003220: 607b str r3, [r7, #4] mtCOVERAGE_TEST_MARKER(); } /* Do the block being inserted, and the block it is being inserted before * make a contiguous block of memory? */ puc = ( uint8_t * ) pxBlockToInsert; - 8002832: 687b ldr r3, [r7, #4] - 8002834: 60bb str r3, [r7, #8] + 8003222: 687b ldr r3, [r7, #4] + 8003224: 60bb str r3, [r7, #8] if( ( puc + pxBlockToInsert->xBlockSize ) == ( uint8_t * ) pxIterator->pxNextFreeBlock ) - 8002836: 687b ldr r3, [r7, #4] - 8002838: 685b ldr r3, [r3, #4] - 800283a: 68ba ldr r2, [r7, #8] - 800283c: 441a add r2, r3 - 800283e: 68fb ldr r3, [r7, #12] - 8002840: 681b ldr r3, [r3, #0] - 8002842: 429a cmp r2, r3 - 8002844: d118 bne.n 8002878 + 8003226: 687b ldr r3, [r7, #4] + 8003228: 685b ldr r3, [r3, #4] + 800322a: 68ba ldr r2, [r7, #8] + 800322c: 441a add r2, r3 + 800322e: 68fb ldr r3, [r7, #12] + 8003230: 681b ldr r3, [r3, #0] + 8003232: 429a cmp r2, r3 + 8003234: d118 bne.n 8003268 { if( pxIterator->pxNextFreeBlock != pxEnd ) - 8002846: 68fb ldr r3, [r7, #12] - 8002848: 681a ldr r2, [r3, #0] - 800284a: 4b15 ldr r3, [pc, #84] ; (80028a0 ) - 800284c: 681b ldr r3, [r3, #0] - 800284e: 429a cmp r2, r3 - 8002850: d00d beq.n 800286e + 8003236: 68fb ldr r3, [r7, #12] + 8003238: 681a ldr r2, [r3, #0] + 800323a: 4b15 ldr r3, [pc, #84] ; (8003290 ) + 800323c: 681b ldr r3, [r3, #0] + 800323e: 429a cmp r2, r3 + 8003240: d00d beq.n 800325e { /* Form one big block from the two blocks. */ pxBlockToInsert->xBlockSize += pxIterator->pxNextFreeBlock->xBlockSize; - 8002852: 687b ldr r3, [r7, #4] - 8002854: 685a ldr r2, [r3, #4] - 8002856: 68fb ldr r3, [r7, #12] - 8002858: 681b ldr r3, [r3, #0] - 800285a: 685b ldr r3, [r3, #4] - 800285c: 441a add r2, r3 - 800285e: 687b ldr r3, [r7, #4] - 8002860: 605a str r2, [r3, #4] + 8003242: 687b ldr r3, [r7, #4] + 8003244: 685a ldr r2, [r3, #4] + 8003246: 68fb ldr r3, [r7, #12] + 8003248: 681b ldr r3, [r3, #0] + 800324a: 685b ldr r3, [r3, #4] + 800324c: 441a add r2, r3 + 800324e: 687b ldr r3, [r7, #4] + 8003250: 605a str r2, [r3, #4] pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock->pxNextFreeBlock; - 8002862: 68fb ldr r3, [r7, #12] - 8002864: 681b ldr r3, [r3, #0] - 8002866: 681a ldr r2, [r3, #0] - 8002868: 687b ldr r3, [r7, #4] - 800286a: 601a str r2, [r3, #0] - 800286c: e008 b.n 8002880 + 8003252: 68fb ldr r3, [r7, #12] + 8003254: 681b ldr r3, [r3, #0] + 8003256: 681a ldr r2, [r3, #0] + 8003258: 687b ldr r3, [r7, #4] + 800325a: 601a str r2, [r3, #0] + 800325c: e008 b.n 8003270 } else { pxBlockToInsert->pxNextFreeBlock = pxEnd; - 800286e: 4b0c ldr r3, [pc, #48] ; (80028a0 ) - 8002870: 681a ldr r2, [r3, #0] - 8002872: 687b ldr r3, [r7, #4] - 8002874: 601a str r2, [r3, #0] - 8002876: e003 b.n 8002880 + 800325e: 4b0c ldr r3, [pc, #48] ; (8003290 ) + 8003260: 681a ldr r2, [r3, #0] + 8003262: 687b ldr r3, [r7, #4] + 8003264: 601a str r2, [r3, #0] + 8003266: e003 b.n 8003270 } } else { pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock; - 8002878: 68fb ldr r3, [r7, #12] - 800287a: 681a ldr r2, [r3, #0] - 800287c: 687b ldr r3, [r7, #4] - 800287e: 601a str r2, [r3, #0] + 8003268: 68fb ldr r3, [r7, #12] + 800326a: 681a ldr r2, [r3, #0] + 800326c: 687b ldr r3, [r7, #4] + 800326e: 601a str r2, [r3, #0] /* If the block being inserted plugged a gab, so was merged with the block * before and the block after, then it's pxNextFreeBlock pointer will have * already been set, and should not be set here as that would make it point * to itself. */ if( pxIterator != pxBlockToInsert ) - 8002880: 68fa ldr r2, [r7, #12] - 8002882: 687b ldr r3, [r7, #4] - 8002884: 429a cmp r2, r3 - 8002886: d002 beq.n 800288e + 8003270: 68fa ldr r2, [r7, #12] + 8003272: 687b ldr r3, [r7, #4] + 8003274: 429a cmp r2, r3 + 8003276: d002 beq.n 800327e { pxIterator->pxNextFreeBlock = pxBlockToInsert; - 8002888: 68fb ldr r3, [r7, #12] - 800288a: 687a ldr r2, [r7, #4] - 800288c: 601a str r2, [r3, #0] + 8003278: 68fb ldr r3, [r7, #12] + 800327a: 687a ldr r2, [r7, #4] + 800327c: 601a str r2, [r3, #0] } else { mtCOVERAGE_TEST_MARKER(); } } - 800288e: bf00 nop - 8002890: 3714 adds r7, #20 - 8002892: 46bd mov sp, r7 - 8002894: f85d 7b04 ldr.w r7, [sp], #4 - 8002898: 4770 bx lr - 800289a: bf00 nop - 800289c: 20012d94 .word 0x20012d94 - 80028a0: 20012d9c .word 0x20012d9c + 800327e: bf00 nop + 8003280: 3714 adds r7, #20 + 8003282: 46bd mov sp, r7 + 8003284: f85d 7b04 ldr.w r7, [sp], #4 + 8003288: 4770 bx lr + 800328a: bf00 nop + 800328c: 20012ee8 .word 0x20012ee8 + 8003290: 20012ef0 .word 0x20012ef0 + +08003294 <_cbSendSystemDesc>: +* _cbSendSystemDesc() +* +* Function description +* Sends SystemView description strings. +*/ +static void _cbSendSystemDesc(void) { + 8003294: b580 push {r7, lr} + 8003296: af00 add r7, sp, #0 + SEGGER_SYSVIEW_SendSysDesc("N="SYSVIEW_APP_NAME",D="SYSVIEW_DEVICE_NAME",O=FreeRTOS"); + 8003298: 4803 ldr r0, [pc, #12] ; (80032a8 <_cbSendSystemDesc+0x14>) + 800329a: f001 fb09 bl 80048b0 + SEGGER_SYSVIEW_SendSysDesc("I#15=SysTick"); + 800329e: 4803 ldr r0, [pc, #12] ; (80032ac <_cbSendSystemDesc+0x18>) + 80032a0: f001 fb06 bl 80048b0 +} + 80032a4: bf00 nop + 80032a6: bd80 pop {r7, pc} + 80032a8: 08006bd4 .word 0x08006bd4 + 80032ac: 08006c10 .word 0x08006c10 + +080032b0 : +* +* Global functions +* +********************************************************************** +*/ +void SEGGER_SYSVIEW_Conf(void) { + 80032b0: b580 push {r7, lr} + 80032b2: af00 add r7, sp, #0 + SEGGER_SYSVIEW_Init(SYSVIEW_TIMESTAMP_FREQ, SYSVIEW_CPU_FREQ, + 80032b4: 4b06 ldr r3, [pc, #24] ; (80032d0 ) + 80032b6: 6818 ldr r0, [r3, #0] + 80032b8: 4b05 ldr r3, [pc, #20] ; (80032d0 ) + 80032ba: 6819 ldr r1, [r3, #0] + 80032bc: 4b05 ldr r3, [pc, #20] ; (80032d4 ) + 80032be: 4a06 ldr r2, [pc, #24] ; (80032d8 ) + 80032c0: f000 fdc6 bl 8003e50 + &SYSVIEW_X_OS_TraceAPI, _cbSendSystemDesc); + SEGGER_SYSVIEW_SetRAMBase(SYSVIEW_RAM_BASE); + 80032c4: f04f 5080 mov.w r0, #268435456 ; 0x10000000 + 80032c8: f000 fe06 bl 8003ed8 +} + 80032cc: bf00 nop + 80032ce: bd80 pop {r7, pc} + 80032d0: 2000010c .word 0x2000010c + 80032d4: 08003295 .word 0x08003295 + 80032d8: 08006d60 .word 0x08006d60 + +080032dc <_cbSendTaskList>: +* Function description +* This function is part of the link between FreeRTOS and SYSVIEW. +* Called from SystemView when asked by the host, it uses SYSVIEW +* functions to send the entire task list to the host. +*/ +static void _cbSendTaskList(void) { + 80032dc: b5f0 push {r4, r5, r6, r7, lr} + 80032de: b085 sub sp, #20 + 80032e0: af02 add r7, sp, #8 + unsigned n; + + for (n = 0; n < _NumTasks; n++) { + 80032e2: 2300 movs r3, #0 + 80032e4: 607b str r3, [r7, #4] + 80032e6: e034 b.n 8003352 <_cbSendTaskList+0x76> +#if INCLUDE_uxTaskGetStackHighWaterMark // Report Task Stack High Watermark + _aTasks[n].uStackHighWaterMark = uxTaskGetStackHighWaterMark((TaskHandle_t)_aTasks[n].xHandle); +#endif + SYSVIEW_SendTaskInfo((U32)_aTasks[n].xHandle, _aTasks[n].pcTaskName, (unsigned)_aTasks[n].uxCurrentPriority, (U32)_aTasks[n].pxStack, (unsigned)_aTasks[n].uStackHighWaterMark); + 80032e8: 491e ldr r1, [pc, #120] ; (8003364 <_cbSendTaskList+0x88>) + 80032ea: 687a ldr r2, [r7, #4] + 80032ec: 4613 mov r3, r2 + 80032ee: 009b lsls r3, r3, #2 + 80032f0: 4413 add r3, r2 + 80032f2: 009b lsls r3, r3, #2 + 80032f4: 440b add r3, r1 + 80032f6: 6818 ldr r0, [r3, #0] + 80032f8: 491a ldr r1, [pc, #104] ; (8003364 <_cbSendTaskList+0x88>) + 80032fa: 687a ldr r2, [r7, #4] + 80032fc: 4613 mov r3, r2 + 80032fe: 009b lsls r3, r3, #2 + 8003300: 4413 add r3, r2 + 8003302: 009b lsls r3, r3, #2 + 8003304: 440b add r3, r1 + 8003306: 3304 adds r3, #4 + 8003308: 681c ldr r4, [r3, #0] + 800330a: 4916 ldr r1, [pc, #88] ; (8003364 <_cbSendTaskList+0x88>) + 800330c: 687a ldr r2, [r7, #4] + 800330e: 4613 mov r3, r2 + 8003310: 009b lsls r3, r3, #2 + 8003312: 4413 add r3, r2 + 8003314: 009b lsls r3, r3, #2 + 8003316: 440b add r3, r1 + 8003318: 3308 adds r3, #8 + 800331a: 681d ldr r5, [r3, #0] + 800331c: 4911 ldr r1, [pc, #68] ; (8003364 <_cbSendTaskList+0x88>) + 800331e: 687a ldr r2, [r7, #4] + 8003320: 4613 mov r3, r2 + 8003322: 009b lsls r3, r3, #2 + 8003324: 4413 add r3, r2 + 8003326: 009b lsls r3, r3, #2 + 8003328: 440b add r3, r1 + 800332a: 330c adds r3, #12 + 800332c: 681e ldr r6, [r3, #0] + 800332e: 490d ldr r1, [pc, #52] ; (8003364 <_cbSendTaskList+0x88>) + 8003330: 687a ldr r2, [r7, #4] + 8003332: 4613 mov r3, r2 + 8003334: 009b lsls r3, r3, #2 + 8003336: 4413 add r3, r2 + 8003338: 009b lsls r3, r3, #2 + 800333a: 440b add r3, r1 + 800333c: 3310 adds r3, #16 + 800333e: 681b ldr r3, [r3, #0] + 8003340: 9300 str r3, [sp, #0] + 8003342: 4633 mov r3, r6 + 8003344: 462a mov r2, r5 + 8003346: 4621 mov r1, r4 + 8003348: f000 f970 bl 800362c + for (n = 0; n < _NumTasks; n++) { + 800334c: 687b ldr r3, [r7, #4] + 800334e: 3301 adds r3, #1 + 8003350: 607b str r3, [r7, #4] + 8003352: 4b05 ldr r3, [pc, #20] ; (8003368 <_cbSendTaskList+0x8c>) + 8003354: 681b ldr r3, [r3, #0] + 8003356: 687a ldr r2, [r7, #4] + 8003358: 429a cmp r2, r3 + 800335a: d3c5 bcc.n 80032e8 <_cbSendTaskList+0xc> + } +} + 800335c: bf00 nop + 800335e: 370c adds r7, #12 + 8003360: 46bd mov sp, r7 + 8003362: bdf0 pop {r4, r5, r6, r7, pc} + 8003364: 20012f08 .word 0x20012f08 + 8003368: 20012fa8 .word 0x20012fa8 + +0800336c <_cbGetTime>: +* Function description +* This function is part of the link between FreeRTOS and SYSVIEW. +* Called from SystemView when asked by the host, returns the +* current system time in micro seconds. +*/ +static U64 _cbGetTime(void) { + 800336c: b5f0 push {r4, r5, r6, r7, lr} + 800336e: b083 sub sp, #12 + 8003370: af00 add r7, sp, #0 + U64 Time; + + Time = xTaskGetTickCountFromISR(); + 8003372: f7fe f923 bl 80015bc + 8003376: 4603 mov r3, r0 + 8003378: f04f 0400 mov.w r4, #0 + 800337c: e9c7 3400 strd r3, r4, [r7] + Time *= portTICK_PERIOD_MS; + Time *= 1000; + 8003380: e9d7 5600 ldrd r5, r6, [r7] + 8003384: 462b mov r3, r5 + 8003386: 4634 mov r4, r6 + 8003388: f04f 0100 mov.w r1, #0 + 800338c: f04f 0200 mov.w r2, #0 + 8003390: 0162 lsls r2, r4, #5 + 8003392: ea42 62d3 orr.w r2, r2, r3, lsr #27 + 8003396: 0159 lsls r1, r3, #5 + 8003398: 460b mov r3, r1 + 800339a: 4614 mov r4, r2 + 800339c: 1b5b subs r3, r3, r5 + 800339e: eb64 0406 sbc.w r4, r4, r6 + 80033a2: f04f 0100 mov.w r1, #0 + 80033a6: f04f 0200 mov.w r2, #0 + 80033aa: 00a2 lsls r2, r4, #2 + 80033ac: ea42 7293 orr.w r2, r2, r3, lsr #30 + 80033b0: 0099 lsls r1, r3, #2 + 80033b2: 460b mov r3, r1 + 80033b4: 4614 mov r4, r2 + 80033b6: 195b adds r3, r3, r5 + 80033b8: eb44 0406 adc.w r4, r4, r6 + 80033bc: f04f 0100 mov.w r1, #0 + 80033c0: f04f 0200 mov.w r2, #0 + 80033c4: 00e2 lsls r2, r4, #3 + 80033c6: ea42 7253 orr.w r2, r2, r3, lsr #29 + 80033ca: 00d9 lsls r1, r3, #3 + 80033cc: 460b mov r3, r1 + 80033ce: 4614 mov r4, r2 + 80033d0: e9c7 3400 strd r3, r4, [r7] + return Time; + 80033d4: e9d7 3400 ldrd r3, r4, [r7] +} + 80033d8: 4618 mov r0, r3 + 80033da: 4621 mov r1, r4 + 80033dc: 370c adds r7, #12 + 80033de: 46bd mov sp, r7 + 80033e0: bdf0 pop {r4, r5, r6, r7, pc} + ... + +080033e4 : +* SYSVIEW_AddTask() +* +* Function description +* Add a task to the internal list and record its information. +*/ +void SYSVIEW_AddTask(U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark) { + 80033e4: b580 push {r7, lr} + 80033e6: b086 sub sp, #24 + 80033e8: af02 add r7, sp, #8 + 80033ea: 60f8 str r0, [r7, #12] + 80033ec: 60b9 str r1, [r7, #8] + 80033ee: 607a str r2, [r7, #4] + 80033f0: 603b str r3, [r7, #0] + + if (memcmp(pcTaskName, "IDLE", 5) == 0) { + 80033f2: 2205 movs r2, #5 + 80033f4: 492b ldr r1, [pc, #172] ; (80034a4 ) + 80033f6: 68b8 ldr r0, [r7, #8] + 80033f8: f002 ffb6 bl 8006368 + 80033fc: 4603 mov r3, r0 + 80033fe: 2b00 cmp r3, #0 + 8003400: d04b beq.n 800349a + return; + } + + if (_NumTasks >= SYSVIEW_FREERTOS_MAX_NOF_TASKS) { + 8003402: 4b29 ldr r3, [pc, #164] ; (80034a8 ) + 8003404: 681b ldr r3, [r3, #0] + 8003406: 2b07 cmp r3, #7 + 8003408: d903 bls.n 8003412 + SEGGER_SYSVIEW_Warn("SYSTEMVIEW: Could not record task information. Maximum number of tasks reached."); + 800340a: 4828 ldr r0, [pc, #160] ; (80034ac ) + 800340c: f001 fd4c bl 8004ea8 + return; + 8003410: e044 b.n 800349c + } + + _aTasks[_NumTasks].xHandle = xHandle; + 8003412: 4b25 ldr r3, [pc, #148] ; (80034a8 ) + 8003414: 681a ldr r2, [r3, #0] + 8003416: 4926 ldr r1, [pc, #152] ; (80034b0 ) + 8003418: 4613 mov r3, r2 + 800341a: 009b lsls r3, r3, #2 + 800341c: 4413 add r3, r2 + 800341e: 009b lsls r3, r3, #2 + 8003420: 440b add r3, r1 + 8003422: 68fa ldr r2, [r7, #12] + 8003424: 601a str r2, [r3, #0] + _aTasks[_NumTasks].pcTaskName = pcTaskName; + 8003426: 4b20 ldr r3, [pc, #128] ; (80034a8 ) + 8003428: 681a ldr r2, [r3, #0] + 800342a: 4921 ldr r1, [pc, #132] ; (80034b0 ) + 800342c: 4613 mov r3, r2 + 800342e: 009b lsls r3, r3, #2 + 8003430: 4413 add r3, r2 + 8003432: 009b lsls r3, r3, #2 + 8003434: 440b add r3, r1 + 8003436: 3304 adds r3, #4 + 8003438: 68ba ldr r2, [r7, #8] + 800343a: 601a str r2, [r3, #0] + _aTasks[_NumTasks].uxCurrentPriority = uxCurrentPriority; + 800343c: 4b1a ldr r3, [pc, #104] ; (80034a8 ) + 800343e: 681a ldr r2, [r3, #0] + 8003440: 491b ldr r1, [pc, #108] ; (80034b0 ) + 8003442: 4613 mov r3, r2 + 8003444: 009b lsls r3, r3, #2 + 8003446: 4413 add r3, r2 + 8003448: 009b lsls r3, r3, #2 + 800344a: 440b add r3, r1 + 800344c: 3308 adds r3, #8 + 800344e: 687a ldr r2, [r7, #4] + 8003450: 601a str r2, [r3, #0] + _aTasks[_NumTasks].pxStack = pxStack; + 8003452: 4b15 ldr r3, [pc, #84] ; (80034a8 ) + 8003454: 681a ldr r2, [r3, #0] + 8003456: 4916 ldr r1, [pc, #88] ; (80034b0 ) + 8003458: 4613 mov r3, r2 + 800345a: 009b lsls r3, r3, #2 + 800345c: 4413 add r3, r2 + 800345e: 009b lsls r3, r3, #2 + 8003460: 440b add r3, r1 + 8003462: 330c adds r3, #12 + 8003464: 683a ldr r2, [r7, #0] + 8003466: 601a str r2, [r3, #0] + _aTasks[_NumTasks].uStackHighWaterMark = uStackHighWaterMark; + 8003468: 4b0f ldr r3, [pc, #60] ; (80034a8 ) + 800346a: 681a ldr r2, [r3, #0] + 800346c: 4910 ldr r1, [pc, #64] ; (80034b0 ) + 800346e: 4613 mov r3, r2 + 8003470: 009b lsls r3, r3, #2 + 8003472: 4413 add r3, r2 + 8003474: 009b lsls r3, r3, #2 + 8003476: 440b add r3, r1 + 8003478: 3310 adds r3, #16 + 800347a: 69ba ldr r2, [r7, #24] + 800347c: 601a str r2, [r3, #0] + + _NumTasks++; + 800347e: 4b0a ldr r3, [pc, #40] ; (80034a8 ) + 8003480: 681b ldr r3, [r3, #0] + 8003482: 3301 adds r3, #1 + 8003484: 4a08 ldr r2, [pc, #32] ; (80034a8 ) + 8003486: 6013 str r3, [r2, #0] + + SYSVIEW_SendTaskInfo(xHandle, pcTaskName,uxCurrentPriority, pxStack, uStackHighWaterMark); + 8003488: 69bb ldr r3, [r7, #24] + 800348a: 9300 str r3, [sp, #0] + 800348c: 683b ldr r3, [r7, #0] + 800348e: 687a ldr r2, [r7, #4] + 8003490: 68b9 ldr r1, [r7, #8] + 8003492: 68f8 ldr r0, [r7, #12] + 8003494: f000 f8ca bl 800362c + 8003498: e000 b.n 800349c + return; + 800349a: bf00 nop -080028a4 : +} + 800349c: 3710 adds r7, #16 + 800349e: 46bd mov sp, r7 + 80034a0: bd80 pop {r7, pc} + 80034a2: bf00 nop + 80034a4: 08006c20 .word 0x08006c20 + 80034a8: 20012fa8 .word 0x20012fa8 + 80034ac: 08006c28 .word 0x08006c28 + 80034b0: 20012f08 .word 0x20012f08 + +080034b4 : +* SYSVIEW_DeleteTask() +* +* Function description +* Delete a task from the internal list. +*/ +void SYSVIEW_DeleteTask(U32 xHandle) { + 80034b4: b580 push {r7, lr} + 80034b6: b084 sub sp, #16 + 80034b8: af00 add r7, sp, #0 + 80034ba: 6078 str r0, [r7, #4] + unsigned n; + + if (_NumTasks == 0) { + 80034bc: 4b59 ldr r3, [pc, #356] ; (8003624 ) + 80034be: 681b ldr r3, [r3, #0] + 80034c0: 2b00 cmp r3, #0 + 80034c2: f000 80ab beq.w 800361c + return; // Early out + } + for (n = 0; n < _NumTasks; n++) { + 80034c6: 2300 movs r3, #0 + 80034c8: 60fb str r3, [r7, #12] + 80034ca: e00d b.n 80034e8 + if (_aTasks[n].xHandle == xHandle) { + 80034cc: 4956 ldr r1, [pc, #344] ; (8003628 ) + 80034ce: 68fa ldr r2, [r7, #12] + 80034d0: 4613 mov r3, r2 + 80034d2: 009b lsls r3, r3, #2 + 80034d4: 4413 add r3, r2 + 80034d6: 009b lsls r3, r3, #2 + 80034d8: 440b add r3, r1 + 80034da: 681b ldr r3, [r3, #0] + 80034dc: 687a ldr r2, [r7, #4] + 80034de: 429a cmp r2, r3 + 80034e0: d008 beq.n 80034f4 + for (n = 0; n < _NumTasks; n++) { + 80034e2: 68fb ldr r3, [r7, #12] + 80034e4: 3301 adds r3, #1 + 80034e6: 60fb str r3, [r7, #12] + 80034e8: 4b4e ldr r3, [pc, #312] ; (8003624 ) + 80034ea: 681b ldr r3, [r3, #0] + 80034ec: 68fa ldr r2, [r7, #12] + 80034ee: 429a cmp r2, r3 + 80034f0: d3ec bcc.n 80034cc + 80034f2: e000 b.n 80034f6 + break; + 80034f4: bf00 nop + } + } + if (n == (_NumTasks - 1)) { + 80034f6: 4b4b ldr r3, [pc, #300] ; (8003624 ) + 80034f8: 681b ldr r3, [r3, #0] + 80034fa: 3b01 subs r3, #1 + 80034fc: 68fa ldr r2, [r7, #12] + 80034fe: 429a cmp r2, r3 + 8003500: d111 bne.n 8003526 + // + // Task is last item in list. + // Simply zero the item and decrement number of tasks. + // + memset(&_aTasks[n], 0, sizeof(_aTasks[n])); + 8003502: 68fa ldr r2, [r7, #12] + 8003504: 4613 mov r3, r2 + 8003506: 009b lsls r3, r3, #2 + 8003508: 4413 add r3, r2 + 800350a: 009b lsls r3, r3, #2 + 800350c: 4a46 ldr r2, [pc, #280] ; (8003628 ) + 800350e: 4413 add r3, r2 + 8003510: 2214 movs r2, #20 + 8003512: 2100 movs r1, #0 + 8003514: 4618 mov r0, r3 + 8003516: f002 ff41 bl 800639c + _NumTasks--; + 800351a: 4b42 ldr r3, [pc, #264] ; (8003624 ) + 800351c: 681b ldr r3, [r3, #0] + 800351e: 3b01 subs r3, #1 + 8003520: 4a40 ldr r2, [pc, #256] ; (8003624 ) + 8003522: 6013 str r3, [r2, #0] + 8003524: e07b b.n 800361e + } else if (n < _NumTasks) { + 8003526: 4b3f ldr r3, [pc, #252] ; (8003624 ) + 8003528: 681b ldr r3, [r3, #0] + 800352a: 68fa ldr r2, [r7, #12] + 800352c: 429a cmp r2, r3 + 800352e: d276 bcs.n 800361e + // + // Task is in the middle of the list. + // Move last item to current position and decrement number of tasks. + // Order of tasks does not really matter, so no need to move all following items. + // + _aTasks[n].xHandle = _aTasks[_NumTasks - 1].xHandle; + 8003530: 4b3c ldr r3, [pc, #240] ; (8003624 ) + 8003532: 681b ldr r3, [r3, #0] + 8003534: 1e5a subs r2, r3, #1 + 8003536: 493c ldr r1, [pc, #240] ; (8003628 ) + 8003538: 4613 mov r3, r2 + 800353a: 009b lsls r3, r3, #2 + 800353c: 4413 add r3, r2 + 800353e: 009b lsls r3, r3, #2 + 8003540: 440b add r3, r1 + 8003542: 6819 ldr r1, [r3, #0] + 8003544: 4838 ldr r0, [pc, #224] ; (8003628 ) + 8003546: 68fa ldr r2, [r7, #12] + 8003548: 4613 mov r3, r2 + 800354a: 009b lsls r3, r3, #2 + 800354c: 4413 add r3, r2 + 800354e: 009b lsls r3, r3, #2 + 8003550: 4403 add r3, r0 + 8003552: 6019 str r1, [r3, #0] + _aTasks[n].pcTaskName = _aTasks[_NumTasks - 1].pcTaskName; + 8003554: 4b33 ldr r3, [pc, #204] ; (8003624 ) + 8003556: 681b ldr r3, [r3, #0] + 8003558: 1e5a subs r2, r3, #1 + 800355a: 4933 ldr r1, [pc, #204] ; (8003628 ) + 800355c: 4613 mov r3, r2 + 800355e: 009b lsls r3, r3, #2 + 8003560: 4413 add r3, r2 + 8003562: 009b lsls r3, r3, #2 + 8003564: 440b add r3, r1 + 8003566: 3304 adds r3, #4 + 8003568: 6819 ldr r1, [r3, #0] + 800356a: 482f ldr r0, [pc, #188] ; (8003628 ) + 800356c: 68fa ldr r2, [r7, #12] + 800356e: 4613 mov r3, r2 + 8003570: 009b lsls r3, r3, #2 + 8003572: 4413 add r3, r2 + 8003574: 009b lsls r3, r3, #2 + 8003576: 4403 add r3, r0 + 8003578: 3304 adds r3, #4 + 800357a: 6019 str r1, [r3, #0] + _aTasks[n].uxCurrentPriority = _aTasks[_NumTasks - 1].uxCurrentPriority; + 800357c: 4b29 ldr r3, [pc, #164] ; (8003624 ) + 800357e: 681b ldr r3, [r3, #0] + 8003580: 1e5a subs r2, r3, #1 + 8003582: 4929 ldr r1, [pc, #164] ; (8003628 ) + 8003584: 4613 mov r3, r2 + 8003586: 009b lsls r3, r3, #2 + 8003588: 4413 add r3, r2 + 800358a: 009b lsls r3, r3, #2 + 800358c: 440b add r3, r1 + 800358e: 3308 adds r3, #8 + 8003590: 6819 ldr r1, [r3, #0] + 8003592: 4825 ldr r0, [pc, #148] ; (8003628 ) + 8003594: 68fa ldr r2, [r7, #12] + 8003596: 4613 mov r3, r2 + 8003598: 009b lsls r3, r3, #2 + 800359a: 4413 add r3, r2 + 800359c: 009b lsls r3, r3, #2 + 800359e: 4403 add r3, r0 + 80035a0: 3308 adds r3, #8 + 80035a2: 6019 str r1, [r3, #0] + _aTasks[n].pxStack = _aTasks[_NumTasks - 1].pxStack; + 80035a4: 4b1f ldr r3, [pc, #124] ; (8003624 ) + 80035a6: 681b ldr r3, [r3, #0] + 80035a8: 1e5a subs r2, r3, #1 + 80035aa: 491f ldr r1, [pc, #124] ; (8003628 ) + 80035ac: 4613 mov r3, r2 + 80035ae: 009b lsls r3, r3, #2 + 80035b0: 4413 add r3, r2 + 80035b2: 009b lsls r3, r3, #2 + 80035b4: 440b add r3, r1 + 80035b6: 330c adds r3, #12 + 80035b8: 6819 ldr r1, [r3, #0] + 80035ba: 481b ldr r0, [pc, #108] ; (8003628 ) + 80035bc: 68fa ldr r2, [r7, #12] + 80035be: 4613 mov r3, r2 + 80035c0: 009b lsls r3, r3, #2 + 80035c2: 4413 add r3, r2 + 80035c4: 009b lsls r3, r3, #2 + 80035c6: 4403 add r3, r0 + 80035c8: 330c adds r3, #12 + 80035ca: 6019 str r1, [r3, #0] + _aTasks[n].uStackHighWaterMark = _aTasks[_NumTasks - 1].uStackHighWaterMark; + 80035cc: 4b15 ldr r3, [pc, #84] ; (8003624 ) + 80035ce: 681b ldr r3, [r3, #0] + 80035d0: 1e5a subs r2, r3, #1 + 80035d2: 4915 ldr r1, [pc, #84] ; (8003628 ) + 80035d4: 4613 mov r3, r2 + 80035d6: 009b lsls r3, r3, #2 + 80035d8: 4413 add r3, r2 + 80035da: 009b lsls r3, r3, #2 + 80035dc: 440b add r3, r1 + 80035de: 3310 adds r3, #16 + 80035e0: 6819 ldr r1, [r3, #0] + 80035e2: 4811 ldr r0, [pc, #68] ; (8003628 ) + 80035e4: 68fa ldr r2, [r7, #12] + 80035e6: 4613 mov r3, r2 + 80035e8: 009b lsls r3, r3, #2 + 80035ea: 4413 add r3, r2 + 80035ec: 009b lsls r3, r3, #2 + 80035ee: 4403 add r3, r0 + 80035f0: 3310 adds r3, #16 + 80035f2: 6019 str r1, [r3, #0] + memset(&_aTasks[_NumTasks - 1], 0, sizeof(_aTasks[_NumTasks - 1])); + 80035f4: 4b0b ldr r3, [pc, #44] ; (8003624 ) + 80035f6: 681b ldr r3, [r3, #0] + 80035f8: 1e5a subs r2, r3, #1 + 80035fa: 4613 mov r3, r2 + 80035fc: 009b lsls r3, r3, #2 + 80035fe: 4413 add r3, r2 + 8003600: 009b lsls r3, r3, #2 + 8003602: 4a09 ldr r2, [pc, #36] ; (8003628 ) + 8003604: 4413 add r3, r2 + 8003606: 2214 movs r2, #20 + 8003608: 2100 movs r1, #0 + 800360a: 4618 mov r0, r3 + 800360c: f002 fec6 bl 800639c + _NumTasks--; + 8003610: 4b04 ldr r3, [pc, #16] ; (8003624 ) + 8003612: 681b ldr r3, [r3, #0] + 8003614: 3b01 subs r3, #1 + 8003616: 4a03 ldr r2, [pc, #12] ; (8003624 ) + 8003618: 6013 str r3, [r2, #0] + 800361a: e000 b.n 800361e + return; // Early out + 800361c: bf00 nop + } +} + 800361e: 3710 adds r7, #16 + 8003620: 46bd mov sp, r7 + 8003622: bd80 pop {r7, pc} + 8003624: 20012fa8 .word 0x20012fa8 + 8003628: 20012f08 .word 0x20012f08 + +0800362c : +* SYSVIEW_SendTaskInfo() +* +* Function description +* Record task information. +*/ +void SYSVIEW_SendTaskInfo(U32 TaskID, const char* sName, unsigned Prio, U32 StackBase, unsigned StackSize) { + 800362c: b580 push {r7, lr} + 800362e: b08a sub sp, #40 ; 0x28 + 8003630: af00 add r7, sp, #0 + 8003632: 60f8 str r0, [r7, #12] + 8003634: 60b9 str r1, [r7, #8] + 8003636: 607a str r2, [r7, #4] + 8003638: 603b str r3, [r7, #0] + SEGGER_SYSVIEW_TASKINFO TaskInfo; + + memset(&TaskInfo, 0, sizeof(TaskInfo)); // Fill all elements with 0 to allow extending the structure in future version without breaking the code + 800363a: f107 0314 add.w r3, r7, #20 + 800363e: 2214 movs r2, #20 + 8003640: 2100 movs r1, #0 + 8003642: 4618 mov r0, r3 + 8003644: f002 feaa bl 800639c + TaskInfo.TaskID = TaskID; + 8003648: 68fb ldr r3, [r7, #12] + 800364a: 617b str r3, [r7, #20] + TaskInfo.sName = sName; + 800364c: 68bb ldr r3, [r7, #8] + 800364e: 61bb str r3, [r7, #24] + TaskInfo.Prio = Prio; + 8003650: 687b ldr r3, [r7, #4] + 8003652: 61fb str r3, [r7, #28] + TaskInfo.StackBase = StackBase; + 8003654: 683b ldr r3, [r7, #0] + 8003656: 623b str r3, [r7, #32] + TaskInfo.StackSize = StackSize; + 8003658: 6b3b ldr r3, [r7, #48] ; 0x30 + 800365a: 627b str r3, [r7, #36] ; 0x24 + SEGGER_SYSVIEW_SendTaskInfo(&TaskInfo); + 800365c: f107 0314 add.w r3, r7, #20 + 8003660: 4618 mov r0, r3 + 8003662: f001 f82d bl 80046c0 +} + 8003666: bf00 nop + 8003668: 3728 adds r7, #40 ; 0x28 + 800366a: 46bd mov sp, r7 + 800366c: bd80 pop {r7, pc} + ... + +08003670 <_DoInit>: + _DoInit(); \ + } \ + } while (0); \ + } + +static void _DoInit(void) { + 8003670: b480 push {r7} + 8003672: b083 sub sp, #12 + 8003674: af00 add r7, sp, #0 + volatile SEGGER_RTT_CB* p; // Volatile to make sure that compiler cannot change the order of accesses to the control block + // + // Initialize control block + // + p = (volatile SEGGER_RTT_CB*)((char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access control block uncached so that nothing in the cache ever becomes dirty and all changes are visible in HW directly + 8003676: 4b24 ldr r3, [pc, #144] ; (8003708 <_DoInit+0x98>) + 8003678: 607b str r3, [r7, #4] + p->MaxNumUpBuffers = SEGGER_RTT_MAX_NUM_UP_BUFFERS; + 800367a: 687b ldr r3, [r7, #4] + 800367c: 2203 movs r2, #3 + 800367e: 611a str r2, [r3, #16] + p->MaxNumDownBuffers = SEGGER_RTT_MAX_NUM_DOWN_BUFFERS; + 8003680: 687b ldr r3, [r7, #4] + 8003682: 2203 movs r2, #3 + 8003684: 615a str r2, [r3, #20] + // + // Initialize up buffer 0 + // + p->aUp[0].sName = "Terminal"; + 8003686: 687b ldr r3, [r7, #4] + 8003688: 4a20 ldr r2, [pc, #128] ; (800370c <_DoInit+0x9c>) + 800368a: 619a str r2, [r3, #24] + p->aUp[0].pBuffer = _acUpBuffer; + 800368c: 687b ldr r3, [r7, #4] + 800368e: 4a20 ldr r2, [pc, #128] ; (8003710 <_DoInit+0xa0>) + 8003690: 61da str r2, [r3, #28] + p->aUp[0].SizeOfBuffer = BUFFER_SIZE_UP; + 8003692: 687b ldr r3, [r7, #4] + 8003694: f44f 6280 mov.w r2, #1024 ; 0x400 + 8003698: 621a str r2, [r3, #32] + p->aUp[0].RdOff = 0u; + 800369a: 687b ldr r3, [r7, #4] + 800369c: 2200 movs r2, #0 + 800369e: 629a str r2, [r3, #40] ; 0x28 + p->aUp[0].WrOff = 0u; + 80036a0: 687b ldr r3, [r7, #4] + 80036a2: 2200 movs r2, #0 + 80036a4: 625a str r2, [r3, #36] ; 0x24 + p->aUp[0].Flags = SEGGER_RTT_MODE_DEFAULT; + 80036a6: 687b ldr r3, [r7, #4] + 80036a8: 2200 movs r2, #0 + 80036aa: 62da str r2, [r3, #44] ; 0x2c + // + // Initialize down buffer 0 + // + p->aDown[0].sName = "Terminal"; + 80036ac: 687b ldr r3, [r7, #4] + 80036ae: 4a17 ldr r2, [pc, #92] ; (800370c <_DoInit+0x9c>) + 80036b0: 661a str r2, [r3, #96] ; 0x60 + p->aDown[0].pBuffer = _acDownBuffer; + 80036b2: 687b ldr r3, [r7, #4] + 80036b4: 4a17 ldr r2, [pc, #92] ; (8003714 <_DoInit+0xa4>) + 80036b6: 665a str r2, [r3, #100] ; 0x64 + p->aDown[0].SizeOfBuffer = BUFFER_SIZE_DOWN; + 80036b8: 687b ldr r3, [r7, #4] + 80036ba: 2210 movs r2, #16 + 80036bc: 669a str r2, [r3, #104] ; 0x68 + p->aDown[0].RdOff = 0u; + 80036be: 687b ldr r3, [r7, #4] + 80036c0: 2200 movs r2, #0 + 80036c2: 671a str r2, [r3, #112] ; 0x70 + p->aDown[0].WrOff = 0u; + 80036c4: 687b ldr r3, [r7, #4] + 80036c6: 2200 movs r2, #0 + 80036c8: 66da str r2, [r3, #108] ; 0x6c + p->aDown[0].Flags = SEGGER_RTT_MODE_DEFAULT; + 80036ca: 687b ldr r3, [r7, #4] + 80036cc: 2200 movs r2, #0 + 80036ce: 675a str r2, [r3, #116] ; 0x74 + // + // Finish initialization of the control block. + // Copy Id string in three steps to make sure "SEGGER RTT" is not found + // in initializer memory (usually flash) by J-Link + // + STRCPY((char*)&p->acID[7], "RTT"); + 80036d0: 687b ldr r3, [r7, #4] + 80036d2: 3307 adds r3, #7 + 80036d4: 4a10 ldr r2, [pc, #64] ; (8003718 <_DoInit+0xa8>) + 80036d6: 6810 ldr r0, [r2, #0] + 80036d8: 6018 str r0, [r3, #0] + RTT__DMB(); // Force order of memory accessed inside core for cores that allow to change the order + 80036da: f3bf 8f5f dmb sy + STRCPY((char*)&p->acID[0], "SEGGER"); + 80036de: 687b ldr r3, [r7, #4] + 80036e0: 4a0e ldr r2, [pc, #56] ; (800371c <_DoInit+0xac>) + 80036e2: 6810 ldr r0, [r2, #0] + 80036e4: 6018 str r0, [r3, #0] + 80036e6: 8891 ldrh r1, [r2, #4] + 80036e8: 7992 ldrb r2, [r2, #6] + 80036ea: 8099 strh r1, [r3, #4] + 80036ec: 719a strb r2, [r3, #6] + RTT__DMB(); // Force order of memory accessed inside core for cores that allow to change the order + 80036ee: f3bf 8f5f dmb sy + p->acID[6] = ' '; + 80036f2: 687b ldr r3, [r7, #4] + 80036f4: 2220 movs r2, #32 + 80036f6: 719a strb r2, [r3, #6] + RTT__DMB(); // Force order of memory accessed inside core for cores that allow to change the order + 80036f8: f3bf 8f5f dmb sy +} + 80036fc: bf00 nop + 80036fe: 370c adds r7, #12 + 8003700: 46bd mov sp, r7 + 8003702: f85d 7b04 ldr.w r7, [sp], #4 + 8003706: 4770 bx lr + 8003708: 20015d44 .word 0x20015d44 + 800370c: 08006c78 .word 0x08006c78 + 8003710: 20012fac .word 0x20012fac + 8003714: 200133ac .word 0x200133ac + 8003718: 08006c84 .word 0x08006c84 + 800371c: 08006c88 .word 0x08006c88 + +08003720 : +* BufferSize Size of the target application buffer. +* +* Return value +* Number of bytes that have been read. +*/ +unsigned SEGGER_RTT_ReadNoLock(unsigned BufferIndex, void* pData, unsigned BufferSize) { + 8003720: b580 push {r7, lr} + 8003722: b08c sub sp, #48 ; 0x30 + 8003724: af00 add r7, sp, #0 + 8003726: 60f8 str r0, [r7, #12] + 8003728: 60b9 str r1, [r7, #8] + 800372a: 607a str r2, [r7, #4] + unsigned WrOff; + unsigned char* pBuffer; + SEGGER_RTT_BUFFER_DOWN* pRing; + volatile char* pSrc; + // + INIT(); + 800372c: 4b3e ldr r3, [pc, #248] ; (8003828 ) + 800372e: 623b str r3, [r7, #32] + 8003730: 6a3b ldr r3, [r7, #32] + 8003732: 781b ldrb r3, [r3, #0] + 8003734: b2db uxtb r3, r3 + 8003736: 2b00 cmp r3, #0 + 8003738: d101 bne.n 800373e + 800373a: f7ff ff99 bl 8003670 <_DoInit> + pRing = (SEGGER_RTT_BUFFER_DOWN*)((char*)&_SEGGER_RTT.aDown[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + 800373e: 68fa ldr r2, [r7, #12] + 8003740: 4613 mov r3, r2 + 8003742: 005b lsls r3, r3, #1 + 8003744: 4413 add r3, r2 + 8003746: 00db lsls r3, r3, #3 + 8003748: 3360 adds r3, #96 ; 0x60 + 800374a: 4a37 ldr r2, [pc, #220] ; (8003828 ) + 800374c: 4413 add r3, r2 + 800374e: 61fb str r3, [r7, #28] + pBuffer = (unsigned char*)pData; + 8003750: 68bb ldr r3, [r7, #8] + 8003752: 627b str r3, [r7, #36] ; 0x24 + RdOff = pRing->RdOff; + 8003754: 69fb ldr r3, [r7, #28] + 8003756: 691b ldr r3, [r3, #16] + 8003758: 62bb str r3, [r7, #40] ; 0x28 + WrOff = pRing->WrOff; + 800375a: 69fb ldr r3, [r7, #28] + 800375c: 68db ldr r3, [r3, #12] + 800375e: 61bb str r3, [r7, #24] + NumBytesRead = 0u; + 8003760: 2300 movs r3, #0 + 8003762: 62fb str r3, [r7, #44] ; 0x2c + // + // Read from current read position to wrap-around of buffer, first + // + if (RdOff > WrOff) { + 8003764: 6aba ldr r2, [r7, #40] ; 0x28 + 8003766: 69bb ldr r3, [r7, #24] + 8003768: 429a cmp r2, r3 + 800376a: d92b bls.n 80037c4 + NumBytesRem = pRing->SizeOfBuffer - RdOff; + 800376c: 69fb ldr r3, [r7, #28] + 800376e: 689a ldr r2, [r3, #8] + 8003770: 6abb ldr r3, [r7, #40] ; 0x28 + 8003772: 1ad3 subs r3, r2, r3 + 8003774: 617b str r3, [r7, #20] + NumBytesRem = MIN(NumBytesRem, BufferSize); + 8003776: 697a ldr r2, [r7, #20] + 8003778: 687b ldr r3, [r7, #4] + 800377a: 4293 cmp r3, r2 + 800377c: bf28 it cs + 800377e: 4613 movcs r3, r2 + 8003780: 617b str r3, [r7, #20] + pSrc = (pRing->pBuffer + RdOff) + SEGGER_RTT_UNCACHED_OFF; + 8003782: 69fb ldr r3, [r7, #28] + 8003784: 685a ldr r2, [r3, #4] + 8003786: 6abb ldr r3, [r7, #40] ; 0x28 + 8003788: 4413 add r3, r2 + 800378a: 613b str r3, [r7, #16] + RdOff += NumBytesRem; + while (NumBytesRem--) { + *pBuffer++ = *pSrc++; + }; +#else + SEGGER_RTT_MEMCPY(pBuffer, (void*)pSrc, NumBytesRem); + 800378c: 697a ldr r2, [r7, #20] + 800378e: 6939 ldr r1, [r7, #16] + 8003790: 6a78 ldr r0, [r7, #36] ; 0x24 + 8003792: f002 fdf8 bl 8006386 + NumBytesRead += NumBytesRem; + 8003796: 6afa ldr r2, [r7, #44] ; 0x2c + 8003798: 697b ldr r3, [r7, #20] + 800379a: 4413 add r3, r2 + 800379c: 62fb str r3, [r7, #44] ; 0x2c + pBuffer += NumBytesRem; + 800379e: 6a7a ldr r2, [r7, #36] ; 0x24 + 80037a0: 697b ldr r3, [r7, #20] + 80037a2: 4413 add r3, r2 + 80037a4: 627b str r3, [r7, #36] ; 0x24 + BufferSize -= NumBytesRem; + 80037a6: 687a ldr r2, [r7, #4] + 80037a8: 697b ldr r3, [r7, #20] + 80037aa: 1ad3 subs r3, r2, r3 + 80037ac: 607b str r3, [r7, #4] + RdOff += NumBytesRem; + 80037ae: 6aba ldr r2, [r7, #40] ; 0x28 + 80037b0: 697b ldr r3, [r7, #20] + 80037b2: 4413 add r3, r2 + 80037b4: 62bb str r3, [r7, #40] ; 0x28 +#endif + // + // Handle wrap-around of buffer + // + if (RdOff == pRing->SizeOfBuffer) { + 80037b6: 69fb ldr r3, [r7, #28] + 80037b8: 689b ldr r3, [r3, #8] + 80037ba: 6aba ldr r2, [r7, #40] ; 0x28 + 80037bc: 429a cmp r2, r3 + 80037be: d101 bne.n 80037c4 + RdOff = 0u; + 80037c0: 2300 movs r3, #0 + 80037c2: 62bb str r3, [r7, #40] ; 0x28 + } + } + // + // Read remaining items of buffer + // + NumBytesRem = WrOff - RdOff; + 80037c4: 69ba ldr r2, [r7, #24] + 80037c6: 6abb ldr r3, [r7, #40] ; 0x28 + 80037c8: 1ad3 subs r3, r2, r3 + 80037ca: 617b str r3, [r7, #20] + NumBytesRem = MIN(NumBytesRem, BufferSize); + 80037cc: 697a ldr r2, [r7, #20] + 80037ce: 687b ldr r3, [r7, #4] + 80037d0: 4293 cmp r3, r2 + 80037d2: bf28 it cs + 80037d4: 4613 movcs r3, r2 + 80037d6: 617b str r3, [r7, #20] + if (NumBytesRem > 0u) { + 80037d8: 697b ldr r3, [r7, #20] + 80037da: 2b00 cmp r3, #0 + 80037dc: d019 beq.n 8003812 + pSrc = (pRing->pBuffer + RdOff) + SEGGER_RTT_UNCACHED_OFF; + 80037de: 69fb ldr r3, [r7, #28] + 80037e0: 685a ldr r2, [r3, #4] + 80037e2: 6abb ldr r3, [r7, #40] ; 0x28 + 80037e4: 4413 add r3, r2 + 80037e6: 613b str r3, [r7, #16] + RdOff += NumBytesRem; + while (NumBytesRem--) { + *pBuffer++ = *pSrc++; + }; +#else + SEGGER_RTT_MEMCPY(pBuffer, (void*)pSrc, NumBytesRem); + 80037e8: 697a ldr r2, [r7, #20] + 80037ea: 6939 ldr r1, [r7, #16] + 80037ec: 6a78 ldr r0, [r7, #36] ; 0x24 + 80037ee: f002 fdca bl 8006386 + NumBytesRead += NumBytesRem; + 80037f2: 6afa ldr r2, [r7, #44] ; 0x2c + 80037f4: 697b ldr r3, [r7, #20] + 80037f6: 4413 add r3, r2 + 80037f8: 62fb str r3, [r7, #44] ; 0x2c + pBuffer += NumBytesRem; + 80037fa: 6a7a ldr r2, [r7, #36] ; 0x24 + 80037fc: 697b ldr r3, [r7, #20] + 80037fe: 4413 add r3, r2 + 8003800: 627b str r3, [r7, #36] ; 0x24 + BufferSize -= NumBytesRem; + 8003802: 687a ldr r2, [r7, #4] + 8003804: 697b ldr r3, [r7, #20] + 8003806: 1ad3 subs r3, r2, r3 + 8003808: 607b str r3, [r7, #4] + RdOff += NumBytesRem; + 800380a: 6aba ldr r2, [r7, #40] ; 0x28 + 800380c: 697b ldr r3, [r7, #20] + 800380e: 4413 add r3, r2 + 8003810: 62bb str r3, [r7, #40] ; 0x28 +#endif + } + if (NumBytesRead) { + 8003812: 6afb ldr r3, [r7, #44] ; 0x2c + 8003814: 2b00 cmp r3, #0 + 8003816: d002 beq.n 800381e + pRing->RdOff = RdOff; + 8003818: 69fb ldr r3, [r7, #28] + 800381a: 6aba ldr r2, [r7, #40] ; 0x28 + 800381c: 611a str r2, [r3, #16] + } + // + return NumBytesRead; + 800381e: 6afb ldr r3, [r7, #44] ; 0x2c +} + 8003820: 4618 mov r0, r3 + 8003822: 3730 adds r7, #48 ; 0x30 + 8003824: 46bd mov sp, r7 + 8003826: bd80 pop {r7, pc} + 8003828: 20015d44 .word 0x20015d44 + +0800382c : +* +* Return value +* >= 0 - O.K. Buffer Index +* < 0 - Error +*/ +int SEGGER_RTT_AllocUpBuffer(const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags) { + 800382c: b580 push {r7, lr} + 800382e: b088 sub sp, #32 + 8003830: af00 add r7, sp, #0 + 8003832: 60f8 str r0, [r7, #12] + 8003834: 60b9 str r1, [r7, #8] + 8003836: 607a str r2, [r7, #4] + 8003838: 603b str r3, [r7, #0] + int BufferIndex; + volatile SEGGER_RTT_CB* pRTTCB; + + INIT(); + 800383a: 4b3d ldr r3, [pc, #244] ; (8003930 ) + 800383c: 61bb str r3, [r7, #24] + 800383e: 69bb ldr r3, [r7, #24] + 8003840: 781b ldrb r3, [r3, #0] + 8003842: b2db uxtb r3, r3 + 8003844: 2b00 cmp r3, #0 + 8003846: d101 bne.n 800384c + 8003848: f7ff ff12 bl 8003670 <_DoInit> + SEGGER_RTT_LOCK(); + 800384c: f3ef 8311 mrs r3, BASEPRI + 8003850: f04f 0120 mov.w r1, #32 + 8003854: f381 8811 msr BASEPRI, r1 + 8003858: 617b str r3, [r7, #20] + pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + 800385a: 4b35 ldr r3, [pc, #212] ; (8003930 ) + 800385c: 613b str r3, [r7, #16] + BufferIndex = 0; + 800385e: 2300 movs r3, #0 + 8003860: 61fb str r3, [r7, #28] + do { + if (pRTTCB->aUp[BufferIndex].pBuffer == NULL) { + 8003862: 6939 ldr r1, [r7, #16] + 8003864: 69fb ldr r3, [r7, #28] + 8003866: 1c5a adds r2, r3, #1 + 8003868: 4613 mov r3, r2 + 800386a: 005b lsls r3, r3, #1 + 800386c: 4413 add r3, r2 + 800386e: 00db lsls r3, r3, #3 + 8003870: 440b add r3, r1 + 8003872: 3304 adds r3, #4 + 8003874: 681b ldr r3, [r3, #0] + 8003876: 2b00 cmp r3, #0 + 8003878: d008 beq.n 800388c + break; + } + BufferIndex++; + 800387a: 69fb ldr r3, [r7, #28] + 800387c: 3301 adds r3, #1 + 800387e: 61fb str r3, [r7, #28] + } while (BufferIndex < pRTTCB->MaxNumUpBuffers); + 8003880: 693b ldr r3, [r7, #16] + 8003882: 691b ldr r3, [r3, #16] + 8003884: 69fa ldr r2, [r7, #28] + 8003886: 429a cmp r2, r3 + 8003888: dbeb blt.n 8003862 + 800388a: e000 b.n 800388e + break; + 800388c: bf00 nop + if (BufferIndex < pRTTCB->MaxNumUpBuffers) { + 800388e: 693b ldr r3, [r7, #16] + 8003890: 691b ldr r3, [r3, #16] + 8003892: 69fa ldr r2, [r7, #28] + 8003894: 429a cmp r2, r3 + 8003896: da3f bge.n 8003918 + pRTTCB->aUp[BufferIndex].sName = sName; + 8003898: 6939 ldr r1, [r7, #16] + 800389a: 69fb ldr r3, [r7, #28] + 800389c: 1c5a adds r2, r3, #1 + 800389e: 4613 mov r3, r2 + 80038a0: 005b lsls r3, r3, #1 + 80038a2: 4413 add r3, r2 + 80038a4: 00db lsls r3, r3, #3 + 80038a6: 440b add r3, r1 + 80038a8: 68fa ldr r2, [r7, #12] + 80038aa: 601a str r2, [r3, #0] + pRTTCB->aUp[BufferIndex].pBuffer = (char*)pBuffer; + 80038ac: 6939 ldr r1, [r7, #16] + 80038ae: 69fb ldr r3, [r7, #28] + 80038b0: 1c5a adds r2, r3, #1 + 80038b2: 4613 mov r3, r2 + 80038b4: 005b lsls r3, r3, #1 + 80038b6: 4413 add r3, r2 + 80038b8: 00db lsls r3, r3, #3 + 80038ba: 440b add r3, r1 + 80038bc: 3304 adds r3, #4 + 80038be: 68ba ldr r2, [r7, #8] + 80038c0: 601a str r2, [r3, #0] + pRTTCB->aUp[BufferIndex].SizeOfBuffer = BufferSize; + 80038c2: 6939 ldr r1, [r7, #16] + 80038c4: 69fa ldr r2, [r7, #28] + 80038c6: 4613 mov r3, r2 + 80038c8: 005b lsls r3, r3, #1 + 80038ca: 4413 add r3, r2 + 80038cc: 00db lsls r3, r3, #3 + 80038ce: 440b add r3, r1 + 80038d0: 3320 adds r3, #32 + 80038d2: 687a ldr r2, [r7, #4] + 80038d4: 601a str r2, [r3, #0] + pRTTCB->aUp[BufferIndex].RdOff = 0u; + 80038d6: 6939 ldr r1, [r7, #16] + 80038d8: 69fa ldr r2, [r7, #28] + 80038da: 4613 mov r3, r2 + 80038dc: 005b lsls r3, r3, #1 + 80038de: 4413 add r3, r2 + 80038e0: 00db lsls r3, r3, #3 + 80038e2: 440b add r3, r1 + 80038e4: 3328 adds r3, #40 ; 0x28 + 80038e6: 2200 movs r2, #0 + 80038e8: 601a str r2, [r3, #0] + pRTTCB->aUp[BufferIndex].WrOff = 0u; + 80038ea: 6939 ldr r1, [r7, #16] + 80038ec: 69fa ldr r2, [r7, #28] + 80038ee: 4613 mov r3, r2 + 80038f0: 005b lsls r3, r3, #1 + 80038f2: 4413 add r3, r2 + 80038f4: 00db lsls r3, r3, #3 + 80038f6: 440b add r3, r1 + 80038f8: 3324 adds r3, #36 ; 0x24 + 80038fa: 2200 movs r2, #0 + 80038fc: 601a str r2, [r3, #0] + pRTTCB->aUp[BufferIndex].Flags = Flags; + 80038fe: 6939 ldr r1, [r7, #16] + 8003900: 69fa ldr r2, [r7, #28] + 8003902: 4613 mov r3, r2 + 8003904: 005b lsls r3, r3, #1 + 8003906: 4413 add r3, r2 + 8003908: 00db lsls r3, r3, #3 + 800390a: 440b add r3, r1 + 800390c: 332c adds r3, #44 ; 0x2c + 800390e: 683a ldr r2, [r7, #0] + 8003910: 601a str r2, [r3, #0] + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + 8003912: f3bf 8f5f dmb sy + 8003916: e002 b.n 800391e + } else { + BufferIndex = -1; + 8003918: f04f 33ff mov.w r3, #4294967295 ; 0xffffffff + 800391c: 61fb str r3, [r7, #28] + } + SEGGER_RTT_UNLOCK(); + 800391e: 697b ldr r3, [r7, #20] + 8003920: f383 8811 msr BASEPRI, r3 + return BufferIndex; + 8003924: 69fb ldr r3, [r7, #28] +} + 8003926: 4618 mov r0, r3 + 8003928: 3720 adds r7, #32 + 800392a: 46bd mov sp, r7 + 800392c: bd80 pop {r7, pc} + 800392e: bf00 nop + 8003930: 20015d44 .word 0x20015d44 + +08003934 : +* Additional information +* Buffer 0 is configured on compile-time. +* May only be called once per buffer. +* Buffer name and flags can be reconfigured using the appropriate functions. +*/ +int SEGGER_RTT_ConfigDownBuffer(unsigned BufferIndex, const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags) { + 8003934: b580 push {r7, lr} + 8003936: b088 sub sp, #32 + 8003938: af00 add r7, sp, #0 + 800393a: 60f8 str r0, [r7, #12] + 800393c: 60b9 str r1, [r7, #8] + 800393e: 607a str r2, [r7, #4] + 8003940: 603b str r3, [r7, #0] + int r; + volatile SEGGER_RTT_CB* pRTTCB; + + INIT(); + 8003942: 4b33 ldr r3, [pc, #204] ; (8003a10 ) + 8003944: 61bb str r3, [r7, #24] + 8003946: 69bb ldr r3, [r7, #24] + 8003948: 781b ldrb r3, [r3, #0] + 800394a: b2db uxtb r3, r3 + 800394c: 2b00 cmp r3, #0 + 800394e: d101 bne.n 8003954 + 8003950: f7ff fe8e bl 8003670 <_DoInit> + pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + 8003954: 4b2e ldr r3, [pc, #184] ; (8003a10 ) + 8003956: 617b str r3, [r7, #20] + if (BufferIndex < (unsigned)pRTTCB->MaxNumDownBuffers) { + 8003958: 697b ldr r3, [r7, #20] + 800395a: 695b ldr r3, [r3, #20] + 800395c: 461a mov r2, r3 + 800395e: 68fb ldr r3, [r7, #12] + 8003960: 4293 cmp r3, r2 + 8003962: d24d bcs.n 8003a00 + SEGGER_RTT_LOCK(); + 8003964: f3ef 8311 mrs r3, BASEPRI + 8003968: f04f 0120 mov.w r1, #32 + 800396c: f381 8811 msr BASEPRI, r1 + 8003970: 613b str r3, [r7, #16] + if (BufferIndex > 0u) { + 8003972: 68fb ldr r3, [r7, #12] + 8003974: 2b00 cmp r3, #0 + 8003976: d031 beq.n 80039dc + pRTTCB->aDown[BufferIndex].sName = sName; + 8003978: 6979 ldr r1, [r7, #20] + 800397a: 68fa ldr r2, [r7, #12] + 800397c: 4613 mov r3, r2 + 800397e: 005b lsls r3, r3, #1 + 8003980: 4413 add r3, r2 + 8003982: 00db lsls r3, r3, #3 + 8003984: 440b add r3, r1 + 8003986: 3360 adds r3, #96 ; 0x60 + 8003988: 68ba ldr r2, [r7, #8] + 800398a: 601a str r2, [r3, #0] + pRTTCB->aDown[BufferIndex].pBuffer = (char*)pBuffer; + 800398c: 6979 ldr r1, [r7, #20] + 800398e: 68fa ldr r2, [r7, #12] + 8003990: 4613 mov r3, r2 + 8003992: 005b lsls r3, r3, #1 + 8003994: 4413 add r3, r2 + 8003996: 00db lsls r3, r3, #3 + 8003998: 440b add r3, r1 + 800399a: 3364 adds r3, #100 ; 0x64 + 800399c: 687a ldr r2, [r7, #4] + 800399e: 601a str r2, [r3, #0] + pRTTCB->aDown[BufferIndex].SizeOfBuffer = BufferSize; + 80039a0: 6979 ldr r1, [r7, #20] + 80039a2: 68fa ldr r2, [r7, #12] + 80039a4: 4613 mov r3, r2 + 80039a6: 005b lsls r3, r3, #1 + 80039a8: 4413 add r3, r2 + 80039aa: 00db lsls r3, r3, #3 + 80039ac: 440b add r3, r1 + 80039ae: 3368 adds r3, #104 ; 0x68 + 80039b0: 683a ldr r2, [r7, #0] + 80039b2: 601a str r2, [r3, #0] + pRTTCB->aDown[BufferIndex].RdOff = 0u; + 80039b4: 6979 ldr r1, [r7, #20] + 80039b6: 68fa ldr r2, [r7, #12] + 80039b8: 4613 mov r3, r2 + 80039ba: 005b lsls r3, r3, #1 + 80039bc: 4413 add r3, r2 + 80039be: 00db lsls r3, r3, #3 + 80039c0: 440b add r3, r1 + 80039c2: 3370 adds r3, #112 ; 0x70 + 80039c4: 2200 movs r2, #0 + 80039c6: 601a str r2, [r3, #0] + pRTTCB->aDown[BufferIndex].WrOff = 0u; + 80039c8: 6979 ldr r1, [r7, #20] + 80039ca: 68fa ldr r2, [r7, #12] + 80039cc: 4613 mov r3, r2 + 80039ce: 005b lsls r3, r3, #1 + 80039d0: 4413 add r3, r2 + 80039d2: 00db lsls r3, r3, #3 + 80039d4: 440b add r3, r1 + 80039d6: 336c adds r3, #108 ; 0x6c + 80039d8: 2200 movs r2, #0 + 80039da: 601a str r2, [r3, #0] + } + pRTTCB->aDown[BufferIndex].Flags = Flags; + 80039dc: 6979 ldr r1, [r7, #20] + 80039de: 68fa ldr r2, [r7, #12] + 80039e0: 4613 mov r3, r2 + 80039e2: 005b lsls r3, r3, #1 + 80039e4: 4413 add r3, r2 + 80039e6: 00db lsls r3, r3, #3 + 80039e8: 440b add r3, r1 + 80039ea: 3374 adds r3, #116 ; 0x74 + 80039ec: 6aba ldr r2, [r7, #40] ; 0x28 + 80039ee: 601a str r2, [r3, #0] + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + 80039f0: f3bf 8f5f dmb sy + SEGGER_RTT_UNLOCK(); + 80039f4: 693b ldr r3, [r7, #16] + 80039f6: f383 8811 msr BASEPRI, r3 + r = 0; + 80039fa: 2300 movs r3, #0 + 80039fc: 61fb str r3, [r7, #28] + 80039fe: e002 b.n 8003a06 + } else { + r = -1; + 8003a00: f04f 33ff mov.w r3, #4294967295 ; 0xffffffff + 8003a04: 61fb str r3, [r7, #28] + } + return r; + 8003a06: 69fb ldr r3, [r7, #28] +} + 8003a08: 4618 mov r0, r3 + 8003a0a: 3720 adds r7, #32 + 8003a0c: 46bd mov sp, r7 + 8003a0e: bd80 pop {r7, pc} + 8003a10: 20015d44 .word 0x20015d44 + +08003a14 <_EncodeStr>: +* Additional information +* The string is encoded as a count byte followed by the contents +* of the string. +* No more than 1 + Limit bytes will be encoded to the payload. +*/ +static U8 *_EncodeStr(U8 *pPayload, const char *pText, unsigned int Limit) { + 8003a14: b480 push {r7} + 8003a16: b087 sub sp, #28 + 8003a18: af00 add r7, sp, #0 + 8003a1a: 60f8 str r0, [r7, #12] + 8003a1c: 60b9 str r1, [r7, #8] + 8003a1e: 607a str r2, [r7, #4] + unsigned int n; + unsigned int Len; + // + // Compute string len + // + Len = 0; + 8003a20: 2300 movs r3, #0 + 8003a22: 613b str r3, [r7, #16] + while(*(pText + Len) != 0) { + 8003a24: e002 b.n 8003a2c <_EncodeStr+0x18> + Len++; + 8003a26: 693b ldr r3, [r7, #16] + 8003a28: 3301 adds r3, #1 + 8003a2a: 613b str r3, [r7, #16] + while(*(pText + Len) != 0) { + 8003a2c: 68ba ldr r2, [r7, #8] + 8003a2e: 693b ldr r3, [r7, #16] + 8003a30: 4413 add r3, r2 + 8003a32: 781b ldrb r3, [r3, #0] + 8003a34: 2b00 cmp r3, #0 + 8003a36: d1f6 bne.n 8003a26 <_EncodeStr+0x12> + } + if (Len > Limit) { + 8003a38: 693a ldr r2, [r7, #16] + 8003a3a: 687b ldr r3, [r7, #4] + 8003a3c: 429a cmp r2, r3 + 8003a3e: d901 bls.n 8003a44 <_EncodeStr+0x30> + Len = Limit; + 8003a40: 687b ldr r3, [r7, #4] + 8003a42: 613b str r3, [r7, #16] + } + // + // Write Len + // + if (Len < 255) { + 8003a44: 693b ldr r3, [r7, #16] + 8003a46: 2bfe cmp r3, #254 ; 0xfe + 8003a48: d806 bhi.n 8003a58 <_EncodeStr+0x44> + *pPayload++ = Len; + 8003a4a: 68fb ldr r3, [r7, #12] + 8003a4c: 1c5a adds r2, r3, #1 + 8003a4e: 60fa str r2, [r7, #12] + 8003a50: 693a ldr r2, [r7, #16] + 8003a52: b2d2 uxtb r2, r2 + 8003a54: 701a strb r2, [r3, #0] + 8003a56: e011 b.n 8003a7c <_EncodeStr+0x68> + } else { + *pPayload++ = 255; + 8003a58: 68fb ldr r3, [r7, #12] + 8003a5a: 1c5a adds r2, r3, #1 + 8003a5c: 60fa str r2, [r7, #12] + 8003a5e: 22ff movs r2, #255 ; 0xff + 8003a60: 701a strb r2, [r3, #0] + *pPayload++ = (Len & 255); + 8003a62: 68fb ldr r3, [r7, #12] + 8003a64: 1c5a adds r2, r3, #1 + 8003a66: 60fa str r2, [r7, #12] + 8003a68: 693a ldr r2, [r7, #16] + 8003a6a: b2d2 uxtb r2, r2 + 8003a6c: 701a strb r2, [r3, #0] + *pPayload++ = ((Len >> 8) & 255); + 8003a6e: 693b ldr r3, [r7, #16] + 8003a70: 0a19 lsrs r1, r3, #8 + 8003a72: 68fb ldr r3, [r7, #12] + 8003a74: 1c5a adds r2, r3, #1 + 8003a76: 60fa str r2, [r7, #12] + 8003a78: b2ca uxtb r2, r1 + 8003a7a: 701a strb r2, [r3, #0] + } + // + // copy string + // + n = 0; + 8003a7c: 2300 movs r3, #0 + 8003a7e: 617b str r3, [r7, #20] + while (n < Len) { + 8003a80: e00a b.n 8003a98 <_EncodeStr+0x84> + *pPayload++ = *pText++; + 8003a82: 68ba ldr r2, [r7, #8] + 8003a84: 1c53 adds r3, r2, #1 + 8003a86: 60bb str r3, [r7, #8] + 8003a88: 68fb ldr r3, [r7, #12] + 8003a8a: 1c59 adds r1, r3, #1 + 8003a8c: 60f9 str r1, [r7, #12] + 8003a8e: 7812 ldrb r2, [r2, #0] + 8003a90: 701a strb r2, [r3, #0] + n++; + 8003a92: 697b ldr r3, [r7, #20] + 8003a94: 3301 adds r3, #1 + 8003a96: 617b str r3, [r7, #20] + while (n < Len) { + 8003a98: 697a ldr r2, [r7, #20] + 8003a9a: 693b ldr r3, [r7, #16] + 8003a9c: 429a cmp r2, r3 + 8003a9e: d3f0 bcc.n 8003a82 <_EncodeStr+0x6e> + } + return pPayload; + 8003aa0: 68fb ldr r3, [r7, #12] +} + 8003aa2: 4618 mov r0, r3 + 8003aa4: 371c adds r7, #28 + 8003aa6: 46bd mov sp, r7 + 8003aa8: f85d 7b04 ldr.w r7, [sp], #4 + 8003aac: 4770 bx lr + +08003aae <_PreparePacket>: +* Additional information +* The payload length and evnetId are not initialized. +* PreparePacket only reserves space for them and they are +* computed and filled in by the sending function. +*/ +static U8* _PreparePacket(U8* pPacket) { + 8003aae: b480 push {r7} + 8003ab0: b083 sub sp, #12 + 8003ab2: af00 add r7, sp, #0 + 8003ab4: 6078 str r0, [r7, #4] + return pPacket + 4; + 8003ab6: 687b ldr r3, [r7, #4] + 8003ab8: 3304 adds r3, #4 +} + 8003aba: 4618 mov r0, r3 + 8003abc: 370c adds r7, #12 + 8003abe: 46bd mov sp, r7 + 8003ac0: f85d 7b04 ldr.w r7, [sp], #4 + 8003ac4: 4770 bx lr + ... + +08003ac8 <_HandleIncomingPacket>: +* This function is called each time after sending a packet. +* Processing incoming packets is done asynchronous. SystemView might +* already have sent event packets after the host has sent a command. +*/ +#if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) +static void _HandleIncomingPacket(void) { + 8003ac8: b580 push {r7, lr} + 8003aca: b082 sub sp, #8 + 8003acc: af00 add r7, sp, #0 + U8 Cmd; + int Status; + // + Status = SEGGER_RTT_ReadNoLock(CHANNEL_ID_DOWN, &Cmd, 1); + 8003ace: 4b33 ldr r3, [pc, #204] ; (8003b9c <_HandleIncomingPacket+0xd4>) + 8003ad0: 7e1b ldrb r3, [r3, #24] + 8003ad2: 4618 mov r0, r3 + 8003ad4: 1cfb adds r3, r7, #3 + 8003ad6: 2201 movs r2, #1 + 8003ad8: 4619 mov r1, r3 + 8003ada: f7ff fe21 bl 8003720 + 8003ade: 4603 mov r3, r0 + 8003ae0: 607b str r3, [r7, #4] + if (Status > 0) { + 8003ae2: 687b ldr r3, [r7, #4] + 8003ae4: 2b00 cmp r3, #0 + 8003ae6: dd4d ble.n 8003b84 <_HandleIncomingPacket+0xbc> + switch (Cmd) { + 8003ae8: 78fb ldrb r3, [r7, #3] + 8003aea: 2b05 cmp r3, #5 + 8003aec: d022 beq.n 8003b34 <_HandleIncomingPacket+0x6c> + 8003aee: 2b05 cmp r3, #5 + 8003af0: dc0b bgt.n 8003b0a <_HandleIncomingPacket+0x42> + 8003af2: 2b02 cmp r3, #2 + 8003af4: d015 beq.n 8003b22 <_HandleIncomingPacket+0x5a> + 8003af6: 2b02 cmp r3, #2 + 8003af8: dc02 bgt.n 8003b00 <_HandleIncomingPacket+0x38> + 8003afa: 2b01 cmp r3, #1 + 8003afc: d00e beq.n 8003b1c <_HandleIncomingPacket+0x54> + 8003afe: e034 b.n 8003b6a <_HandleIncomingPacket+0xa2> + 8003b00: 2b03 cmp r3, #3 + 8003b02: d011 beq.n 8003b28 <_HandleIncomingPacket+0x60> + 8003b04: 2b04 cmp r3, #4 + 8003b06: d012 beq.n 8003b2e <_HandleIncomingPacket+0x66> + 8003b08: e02f b.n 8003b6a <_HandleIncomingPacket+0xa2> + 8003b0a: 2b07 cmp r3, #7 + 8003b0c: d018 beq.n 8003b40 <_HandleIncomingPacket+0x78> + 8003b0e: 2b07 cmp r3, #7 + 8003b10: db13 blt.n 8003b3a <_HandleIncomingPacket+0x72> + 8003b12: 2b7f cmp r3, #127 ; 0x7f + 8003b14: d038 beq.n 8003b88 <_HandleIncomingPacket+0xc0> + 8003b16: 2b80 cmp r3, #128 ; 0x80 + 8003b18: d015 beq.n 8003b46 <_HandleIncomingPacket+0x7e> + 8003b1a: e026 b.n 8003b6a <_HandleIncomingPacket+0xa2> + case SEGGER_SYSVIEW_COMMAND_ID_START: + SEGGER_SYSVIEW_Start(); + 8003b1c: f000 fc56 bl 80043cc + break; + 8003b20: e037 b.n 8003b92 <_HandleIncomingPacket+0xca> + case SEGGER_SYSVIEW_COMMAND_ID_STOP: + SEGGER_SYSVIEW_Stop(); + 8003b22: f000 fd0d bl 8004540 + break; + 8003b26: e034 b.n 8003b92 <_HandleIncomingPacket+0xca> + case SEGGER_SYSVIEW_COMMAND_ID_GET_SYSTIME: + SEGGER_SYSVIEW_RecordSystime(); + 8003b28: f000 fee6 bl 80048f8 + break; + 8003b2c: e031 b.n 8003b92 <_HandleIncomingPacket+0xca> + case SEGGER_SYSVIEW_COMMAND_ID_GET_TASKLIST: + SEGGER_SYSVIEW_SendTaskList(); + 8003b2e: f000 feab bl 8004888 + break; + 8003b32: e02e b.n 8003b92 <_HandleIncomingPacket+0xca> + case SEGGER_SYSVIEW_COMMAND_ID_GET_SYSDESC: + SEGGER_SYSVIEW_GetSysDesc(); + 8003b34: f000 fd2a bl 800458c + break; + 8003b38: e02b b.n 8003b92 <_HandleIncomingPacket+0xca> + case SEGGER_SYSVIEW_COMMAND_ID_GET_NUMMODULES: + SEGGER_SYSVIEW_SendNumModules(); + 8003b3a: f001 f977 bl 8004e2c + break; + 8003b3e: e028 b.n 8003b92 <_HandleIncomingPacket+0xca> + case SEGGER_SYSVIEW_COMMAND_ID_GET_MODULEDESC: + SEGGER_SYSVIEW_SendModuleDescription(); + 8003b40: f001 f956 bl 8004df0 + break; + 8003b44: e025 b.n 8003b92 <_HandleIncomingPacket+0xca> + case SEGGER_SYSVIEW_COMMAND_ID_GET_MODULE: + Status = SEGGER_RTT_ReadNoLock(CHANNEL_ID_DOWN, &Cmd, 1); + 8003b46: 4b15 ldr r3, [pc, #84] ; (8003b9c <_HandleIncomingPacket+0xd4>) + 8003b48: 7e1b ldrb r3, [r3, #24] + 8003b4a: 4618 mov r0, r3 + 8003b4c: 1cfb adds r3, r7, #3 + 8003b4e: 2201 movs r2, #1 + 8003b50: 4619 mov r1, r3 + 8003b52: f7ff fde5 bl 8003720 + 8003b56: 4603 mov r3, r0 + 8003b58: 607b str r3, [r7, #4] + if (Status > 0) { + 8003b5a: 687b ldr r3, [r7, #4] + 8003b5c: 2b00 cmp r3, #0 + 8003b5e: dd15 ble.n 8003b8c <_HandleIncomingPacket+0xc4> + SEGGER_SYSVIEW_SendModule(Cmd); + 8003b60: 78fb ldrb r3, [r7, #3] + 8003b62: 4618 mov r0, r3 + 8003b64: f001 f8c4 bl 8004cf0 + } + break; + 8003b68: e010 b.n 8003b8c <_HandleIncomingPacket+0xc4> + case SEGGER_SYSVIEW_COMMAND_ID_HEARTBEAT: + break; + default: + if (Cmd >= 128) { // Unknown extended command. Dummy read its parameter. + 8003b6a: 78fb ldrb r3, [r7, #3] + 8003b6c: b25b sxtb r3, r3 + 8003b6e: 2b00 cmp r3, #0 + 8003b70: da0e bge.n 8003b90 <_HandleIncomingPacket+0xc8> + SEGGER_RTT_ReadNoLock(CHANNEL_ID_DOWN, &Cmd, 1); + 8003b72: 4b0a ldr r3, [pc, #40] ; (8003b9c <_HandleIncomingPacket+0xd4>) + 8003b74: 7e1b ldrb r3, [r3, #24] + 8003b76: 4618 mov r0, r3 + 8003b78: 1cfb adds r3, r7, #3 + 8003b7a: 2201 movs r2, #1 + 8003b7c: 4619 mov r1, r3 + 8003b7e: f7ff fdcf bl 8003720 + } + break; + 8003b82: e005 b.n 8003b90 <_HandleIncomingPacket+0xc8> + } + } + 8003b84: bf00 nop + 8003b86: e004 b.n 8003b92 <_HandleIncomingPacket+0xca> + break; + 8003b88: bf00 nop + 8003b8a: e002 b.n 8003b92 <_HandleIncomingPacket+0xca> + break; + 8003b8c: bf00 nop + 8003b8e: e000 b.n 8003b92 <_HandleIncomingPacket+0xca> + break; + 8003b90: bf00 nop +} + 8003b92: bf00 nop + 8003b94: 3708 adds r7, #8 + 8003b96: 46bd mov sp, r7 + 8003b98: bd80 pop {r7, pc} + 8003b9a: bf00 nop + 8003b9c: 20015bc4 .word 0x20015bc4 + +08003ba0 <_TrySendOverflowPacket>: +* !=0: Success, Message sent (stored in RTT-Buffer) +* ==0: Buffer full, Message *NOT* stored +* +*/ +#if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) +static int _TrySendOverflowPacket(void) { + 8003ba0: b580 push {r7, lr} + 8003ba2: b08c sub sp, #48 ; 0x30 + 8003ba4: af00 add r7, sp, #0 + I32 Delta; + int Status; + U8 aPacket[11]; + U8* pPayload; + + aPacket[0] = SYSVIEW_EVTID_OVERFLOW; // 1 + 8003ba6: 2301 movs r3, #1 + 8003ba8: 713b strb r3, [r7, #4] + pPayload = &aPacket[1]; + 8003baa: 1d3b adds r3, r7, #4 + 8003bac: 3301 adds r3, #1 + 8003bae: 61fb str r3, [r7, #28] + ENCODE_U32(pPayload, _SYSVIEW_Globals.DropCount); + 8003bb0: 69fb ldr r3, [r7, #28] + 8003bb2: 62fb str r3, [r7, #44] ; 0x2c + 8003bb4: 4b31 ldr r3, [pc, #196] ; (8003c7c <_TrySendOverflowPacket+0xdc>) + 8003bb6: 695b ldr r3, [r3, #20] + 8003bb8: 62bb str r3, [r7, #40] ; 0x28 + 8003bba: e00b b.n 8003bd4 <_TrySendOverflowPacket+0x34> + 8003bbc: 6abb ldr r3, [r7, #40] ; 0x28 + 8003bbe: b2da uxtb r2, r3 + 8003bc0: 6afb ldr r3, [r7, #44] ; 0x2c + 8003bc2: 1c59 adds r1, r3, #1 + 8003bc4: 62f9 str r1, [r7, #44] ; 0x2c + 8003bc6: f062 027f orn r2, r2, #127 ; 0x7f + 8003bca: b2d2 uxtb r2, r2 + 8003bcc: 701a strb r2, [r3, #0] + 8003bce: 6abb ldr r3, [r7, #40] ; 0x28 + 8003bd0: 09db lsrs r3, r3, #7 + 8003bd2: 62bb str r3, [r7, #40] ; 0x28 + 8003bd4: 6abb ldr r3, [r7, #40] ; 0x28 + 8003bd6: 2b7f cmp r3, #127 ; 0x7f + 8003bd8: d8f0 bhi.n 8003bbc <_TrySendOverflowPacket+0x1c> + 8003bda: 6afb ldr r3, [r7, #44] ; 0x2c + 8003bdc: 1c5a adds r2, r3, #1 + 8003bde: 62fa str r2, [r7, #44] ; 0x2c + 8003be0: 6aba ldr r2, [r7, #40] ; 0x28 + 8003be2: b2d2 uxtb r2, r2 + 8003be4: 701a strb r2, [r3, #0] + 8003be6: 6afb ldr r3, [r7, #44] ; 0x2c + 8003be8: 61fb str r3, [r7, #28] + // + // Compute time stamp delta and append it to packet. + // + TimeStamp = SEGGER_SYSVIEW_GET_TIMESTAMP(); + 8003bea: 4b25 ldr r3, [pc, #148] ; (8003c80 <_TrySendOverflowPacket+0xe0>) + 8003bec: 681b ldr r3, [r3, #0] + 8003bee: 61bb str r3, [r7, #24] + Delta = TimeStamp - _SYSVIEW_Globals.LastTxTimeStamp; + 8003bf0: 4b22 ldr r3, [pc, #136] ; (8003c7c <_TrySendOverflowPacket+0xdc>) + 8003bf2: 68db ldr r3, [r3, #12] + 8003bf4: 69ba ldr r2, [r7, #24] + 8003bf6: 1ad3 subs r3, r2, r3 + 8003bf8: 617b str r3, [r7, #20] + MAKE_DELTA_32BIT(Delta); + ENCODE_U32(pPayload, Delta); + 8003bfa: 69fb ldr r3, [r7, #28] + 8003bfc: 627b str r3, [r7, #36] ; 0x24 + 8003bfe: 697b ldr r3, [r7, #20] + 8003c00: 623b str r3, [r7, #32] + 8003c02: e00b b.n 8003c1c <_TrySendOverflowPacket+0x7c> + 8003c04: 6a3b ldr r3, [r7, #32] + 8003c06: b2da uxtb r2, r3 + 8003c08: 6a7b ldr r3, [r7, #36] ; 0x24 + 8003c0a: 1c59 adds r1, r3, #1 + 8003c0c: 6279 str r1, [r7, #36] ; 0x24 + 8003c0e: f062 027f orn r2, r2, #127 ; 0x7f + 8003c12: b2d2 uxtb r2, r2 + 8003c14: 701a strb r2, [r3, #0] + 8003c16: 6a3b ldr r3, [r7, #32] + 8003c18: 09db lsrs r3, r3, #7 + 8003c1a: 623b str r3, [r7, #32] + 8003c1c: 6a3b ldr r3, [r7, #32] + 8003c1e: 2b7f cmp r3, #127 ; 0x7f + 8003c20: d8f0 bhi.n 8003c04 <_TrySendOverflowPacket+0x64> + 8003c22: 6a7b ldr r3, [r7, #36] ; 0x24 + 8003c24: 1c5a adds r2, r3, #1 + 8003c26: 627a str r2, [r7, #36] ; 0x24 + 8003c28: 6a3a ldr r2, [r7, #32] + 8003c2a: b2d2 uxtb r2, r2 + 8003c2c: 701a strb r2, [r3, #0] + 8003c2e: 6a7b ldr r3, [r7, #36] ; 0x24 + 8003c30: 61fb str r3, [r7, #28] + // + // Try to store packet in RTT buffer and update time stamp when this was successful + // + Status = SEGGER_RTT_WriteSkipNoLock(CHANNEL_ID_UP, aPacket, pPayload - aPacket); + 8003c32: 4b12 ldr r3, [pc, #72] ; (8003c7c <_TrySendOverflowPacket+0xdc>) + 8003c34: 785b ldrb r3, [r3, #1] + 8003c36: 4618 mov r0, r3 + 8003c38: 69fa ldr r2, [r7, #28] + 8003c3a: 1d3b adds r3, r7, #4 + 8003c3c: 1ad3 subs r3, r2, r3 + 8003c3e: 461a mov r2, r3 + 8003c40: 1d3b adds r3, r7, #4 + 8003c42: 4619 mov r1, r3 + 8003c44: f7fc fae4 bl 8000210 + 8003c48: 4603 mov r3, r0 + 8003c4a: 613b str r3, [r7, #16] + SEGGER_SYSVIEW_ON_EVENT_RECORDED(pPayload - aPacket); + if (Status) { + 8003c4c: 693b ldr r3, [r7, #16] + 8003c4e: 2b00 cmp r3, #0 + 8003c50: d009 beq.n 8003c66 <_TrySendOverflowPacket+0xc6> + _SYSVIEW_Globals.LastTxTimeStamp = TimeStamp; + 8003c52: 4a0a ldr r2, [pc, #40] ; (8003c7c <_TrySendOverflowPacket+0xdc>) + 8003c54: 69bb ldr r3, [r7, #24] + 8003c56: 60d3 str r3, [r2, #12] + _SYSVIEW_Globals.EnableState--; // EnableState has been 2, will be 1. Always. + 8003c58: 4b08 ldr r3, [pc, #32] ; (8003c7c <_TrySendOverflowPacket+0xdc>) + 8003c5a: 781b ldrb r3, [r3, #0] + 8003c5c: 3b01 subs r3, #1 + 8003c5e: b2da uxtb r2, r3 + 8003c60: 4b06 ldr r3, [pc, #24] ; (8003c7c <_TrySendOverflowPacket+0xdc>) + 8003c62: 701a strb r2, [r3, #0] + 8003c64: e004 b.n 8003c70 <_TrySendOverflowPacket+0xd0> + } else { + _SYSVIEW_Globals.DropCount++; + 8003c66: 4b05 ldr r3, [pc, #20] ; (8003c7c <_TrySendOverflowPacket+0xdc>) + 8003c68: 695b ldr r3, [r3, #20] + 8003c6a: 3301 adds r3, #1 + 8003c6c: 4a03 ldr r2, [pc, #12] ; (8003c7c <_TrySendOverflowPacket+0xdc>) + 8003c6e: 6153 str r3, [r2, #20] + } + // + return Status; + 8003c70: 693b ldr r3, [r7, #16] +} + 8003c72: 4618 mov r0, r3 + 8003c74: 3730 adds r7, #48 ; 0x30 + 8003c76: 46bd mov sp, r7 + 8003c78: bd80 pop {r7, pc} + 8003c7a: bf00 nop + 8003c7c: 20015bc4 .word 0x20015bc4 + 8003c80: e0001004 .word 0xe0001004 + +08003c84 <_SendPacket>: +* There must be at least 4 bytes free to prepend Id and Length. +* pEndPacket - Pointer to end of packet payload. +* EventId - Id of the event to send. +* +*/ +static void _SendPacket(U8* pStartPacket, U8* pEndPacket, unsigned int EventId) { + 8003c84: b580 push {r7, lr} + 8003c86: b08a sub sp, #40 ; 0x28 + 8003c88: af00 add r7, sp, #0 + 8003c8a: 60f8 str r0, [r7, #12] + 8003c8c: 60b9 str r1, [r7, #8] + 8003c8e: 607a str r2, [r7, #4] +#if (SEGGER_SYSVIEW_POST_MORTEM_MODE == 1) + if (_SYSVIEW_Globals.EnableState == 0) { + goto SendDone; + } +#else + if (_SYSVIEW_Globals.EnableState == 1) { // Enabled, no dropped packets remaining + 8003c90: 4b6c ldr r3, [pc, #432] ; (8003e44 <_SendPacket+0x1c0>) + 8003c92: 781b ldrb r3, [r3, #0] + 8003c94: 2b01 cmp r3, #1 + 8003c96: d010 beq.n 8003cba <_SendPacket+0x36> + goto Send; + } + if (_SYSVIEW_Globals.EnableState == 0) { + 8003c98: 4b6a ldr r3, [pc, #424] ; (8003e44 <_SendPacket+0x1c0>) + 8003c9a: 781b ldrb r3, [r3, #0] + 8003c9c: 2b00 cmp r3, #0 + 8003c9e: f000 80a3 beq.w 8003de8 <_SendPacket+0x164> + // + // Handle buffer full situations: + // Have packets been dropped before because buffer was full? + // In this case try to send and overflow packet. + // + if (_SYSVIEW_Globals.EnableState == 2) { + 8003ca2: 4b68 ldr r3, [pc, #416] ; (8003e44 <_SendPacket+0x1c0>) + 8003ca4: 781b ldrb r3, [r3, #0] + 8003ca6: 2b02 cmp r3, #2 + 8003ca8: d109 bne.n 8003cbe <_SendPacket+0x3a> + _TrySendOverflowPacket(); + 8003caa: f7ff ff79 bl 8003ba0 <_TrySendOverflowPacket> + if (_SYSVIEW_Globals.EnableState != 1) { + 8003cae: 4b65 ldr r3, [pc, #404] ; (8003e44 <_SendPacket+0x1c0>) + 8003cb0: 781b ldrb r3, [r3, #0] + 8003cb2: 2b01 cmp r3, #1 + 8003cb4: f040 809a bne.w 8003dec <_SendPacket+0x168> + goto SendDone; + } + } +Send: + 8003cb8: e001 b.n 8003cbe <_SendPacket+0x3a> + goto Send; + 8003cba: bf00 nop + 8003cbc: e000 b.n 8003cc0 <_SendPacket+0x3c> +Send: + 8003cbe: bf00 nop +#endif + // + // Check if event is disabled from being recorded. + // + if (EventId < 32) { + 8003cc0: 687b ldr r3, [r7, #4] + 8003cc2: 2b1f cmp r3, #31 + 8003cc4: d809 bhi.n 8003cda <_SendPacket+0x56> + if (_SYSVIEW_Globals.DisabledEvents & ((U32)1u << EventId)) { + 8003cc6: 4b5f ldr r3, [pc, #380] ; (8003e44 <_SendPacket+0x1c0>) + 8003cc8: 69da ldr r2, [r3, #28] + 8003cca: 687b ldr r3, [r7, #4] + 8003ccc: fa22 f303 lsr.w r3, r2, r3 + 8003cd0: f003 0301 and.w r3, r3, #1 + 8003cd4: 2b00 cmp r3, #0 + 8003cd6: f040 808b bne.w 8003df0 <_SendPacket+0x16c> + // + // Prepare actual packet. + // If it is a known packet, prepend eventId only, + // otherwise prepend packet length and eventId. + // + if (EventId < 24) { + 8003cda: 687b ldr r3, [r7, #4] + 8003cdc: 2b17 cmp r3, #23 + 8003cde: d807 bhi.n 8003cf0 <_SendPacket+0x6c> + *--pStartPacket = EventId; + 8003ce0: 68fb ldr r3, [r7, #12] + 8003ce2: 3b01 subs r3, #1 + 8003ce4: 60fb str r3, [r7, #12] + 8003ce6: 687b ldr r3, [r7, #4] + 8003ce8: b2da uxtb r2, r3 + 8003cea: 68fb ldr r3, [r7, #12] + 8003cec: 701a strb r2, [r3, #0] + 8003cee: e03d b.n 8003d6c <_SendPacket+0xe8> + } else { + NumBytes = pEndPacket - pStartPacket; + 8003cf0: 68ba ldr r2, [r7, #8] + 8003cf2: 68fb ldr r3, [r7, #12] + 8003cf4: 1ad3 subs r3, r2, r3 + 8003cf6: 61fb str r3, [r7, #28] + if (NumBytes > 127) { + 8003cf8: 69fb ldr r3, [r7, #28] + 8003cfa: 2b7f cmp r3, #127 ; 0x7f + 8003cfc: d912 bls.n 8003d24 <_SendPacket+0xa0> + *--pStartPacket = (NumBytes >> 7); + 8003cfe: 69fb ldr r3, [r7, #28] + 8003d00: 09da lsrs r2, r3, #7 + 8003d02: 68fb ldr r3, [r7, #12] + 8003d04: 3b01 subs r3, #1 + 8003d06: 60fb str r3, [r7, #12] + 8003d08: b2d2 uxtb r2, r2 + 8003d0a: 68fb ldr r3, [r7, #12] + 8003d0c: 701a strb r2, [r3, #0] + *--pStartPacket = NumBytes | 0x80; + 8003d0e: 69fb ldr r3, [r7, #28] + 8003d10: b2db uxtb r3, r3 + 8003d12: 68fa ldr r2, [r7, #12] + 8003d14: 3a01 subs r2, #1 + 8003d16: 60fa str r2, [r7, #12] + 8003d18: f063 037f orn r3, r3, #127 ; 0x7f + 8003d1c: b2da uxtb r2, r3 + 8003d1e: 68fb ldr r3, [r7, #12] + 8003d20: 701a strb r2, [r3, #0] + 8003d22: e006 b.n 8003d32 <_SendPacket+0xae> + } else { + *--pStartPacket = NumBytes; + 8003d24: 68fb ldr r3, [r7, #12] + 8003d26: 3b01 subs r3, #1 + 8003d28: 60fb str r3, [r7, #12] + 8003d2a: 69fb ldr r3, [r7, #28] + 8003d2c: b2da uxtb r2, r3 + 8003d2e: 68fb ldr r3, [r7, #12] + 8003d30: 701a strb r2, [r3, #0] + } + if (EventId > 127) { + 8003d32: 687b ldr r3, [r7, #4] + 8003d34: 2b7f cmp r3, #127 ; 0x7f + 8003d36: d912 bls.n 8003d5e <_SendPacket+0xda> + *--pStartPacket = (EventId >> 7); + 8003d38: 687b ldr r3, [r7, #4] + 8003d3a: 09da lsrs r2, r3, #7 + 8003d3c: 68fb ldr r3, [r7, #12] + 8003d3e: 3b01 subs r3, #1 + 8003d40: 60fb str r3, [r7, #12] + 8003d42: b2d2 uxtb r2, r2 + 8003d44: 68fb ldr r3, [r7, #12] + 8003d46: 701a strb r2, [r3, #0] + *--pStartPacket = EventId | 0x80; + 8003d48: 687b ldr r3, [r7, #4] + 8003d4a: b2db uxtb r3, r3 + 8003d4c: 68fa ldr r2, [r7, #12] + 8003d4e: 3a01 subs r2, #1 + 8003d50: 60fa str r2, [r7, #12] + 8003d52: f063 037f orn r3, r3, #127 ; 0x7f + 8003d56: b2da uxtb r2, r3 + 8003d58: 68fb ldr r3, [r7, #12] + 8003d5a: 701a strb r2, [r3, #0] + 8003d5c: e006 b.n 8003d6c <_SendPacket+0xe8> + } else { + *--pStartPacket = EventId; + 8003d5e: 68fb ldr r3, [r7, #12] + 8003d60: 3b01 subs r3, #1 + 8003d62: 60fb str r3, [r7, #12] + 8003d64: 687b ldr r3, [r7, #4] + 8003d66: b2da uxtb r2, r3 + 8003d68: 68fb ldr r3, [r7, #12] + 8003d6a: 701a strb r2, [r3, #0] + } + } + // + // Compute time stamp delta and append it to packet. + // + TimeStamp = SEGGER_SYSVIEW_GET_TIMESTAMP(); + 8003d6c: 4b36 ldr r3, [pc, #216] ; (8003e48 <_SendPacket+0x1c4>) + 8003d6e: 681b ldr r3, [r3, #0] + 8003d70: 61bb str r3, [r7, #24] + Delta = TimeStamp - _SYSVIEW_Globals.LastTxTimeStamp; + 8003d72: 4b34 ldr r3, [pc, #208] ; (8003e44 <_SendPacket+0x1c0>) + 8003d74: 68db ldr r3, [r3, #12] + 8003d76: 69ba ldr r2, [r7, #24] + 8003d78: 1ad3 subs r3, r2, r3 + 8003d7a: 617b str r3, [r7, #20] + MAKE_DELTA_32BIT(Delta); + ENCODE_U32(pEndPacket, Delta); + 8003d7c: 68bb ldr r3, [r7, #8] + 8003d7e: 627b str r3, [r7, #36] ; 0x24 + 8003d80: 697b ldr r3, [r7, #20] + 8003d82: 623b str r3, [r7, #32] + 8003d84: e00b b.n 8003d9e <_SendPacket+0x11a> + 8003d86: 6a3b ldr r3, [r7, #32] + 8003d88: b2da uxtb r2, r3 + 8003d8a: 6a7b ldr r3, [r7, #36] ; 0x24 + 8003d8c: 1c59 adds r1, r3, #1 + 8003d8e: 6279 str r1, [r7, #36] ; 0x24 + 8003d90: f062 027f orn r2, r2, #127 ; 0x7f + 8003d94: b2d2 uxtb r2, r2 + 8003d96: 701a strb r2, [r3, #0] + 8003d98: 6a3b ldr r3, [r7, #32] + 8003d9a: 09db lsrs r3, r3, #7 + 8003d9c: 623b str r3, [r7, #32] + 8003d9e: 6a3b ldr r3, [r7, #32] + 8003da0: 2b7f cmp r3, #127 ; 0x7f + 8003da2: d8f0 bhi.n 8003d86 <_SendPacket+0x102> + 8003da4: 6a7b ldr r3, [r7, #36] ; 0x24 + 8003da6: 1c5a adds r2, r3, #1 + 8003da8: 627a str r2, [r7, #36] ; 0x24 + 8003daa: 6a3a ldr r2, [r7, #32] + 8003dac: b2d2 uxtb r2, r2 + 8003dae: 701a strb r2, [r3, #0] + 8003db0: 6a7b ldr r3, [r7, #36] ; 0x24 + 8003db2: 60bb str r3, [r7, #8] + _SYSVIEW_Globals.LastTxTimeStamp = TimeStamp; +#else + // + // Try to store packet in RTT buffer and update time stamp when this was successful + // + Status = SEGGER_RTT_WriteSkipNoLock(CHANNEL_ID_UP, pStartPacket, pEndPacket - pStartPacket); + 8003db4: 4b23 ldr r3, [pc, #140] ; (8003e44 <_SendPacket+0x1c0>) + 8003db6: 785b ldrb r3, [r3, #1] + 8003db8: 4618 mov r0, r3 + 8003dba: 68ba ldr r2, [r7, #8] + 8003dbc: 68fb ldr r3, [r7, #12] + 8003dbe: 1ad3 subs r3, r2, r3 + 8003dc0: 461a mov r2, r3 + 8003dc2: 68f9 ldr r1, [r7, #12] + 8003dc4: f7fc fa24 bl 8000210 + 8003dc8: 4603 mov r3, r0 + 8003dca: 613b str r3, [r7, #16] + SEGGER_SYSVIEW_ON_EVENT_RECORDED(pEndPacket - pStartPacket); + if (Status) { + 8003dcc: 693b ldr r3, [r7, #16] + 8003dce: 2b00 cmp r3, #0 + 8003dd0: d003 beq.n 8003dda <_SendPacket+0x156> + _SYSVIEW_Globals.LastTxTimeStamp = TimeStamp; + 8003dd2: 4a1c ldr r2, [pc, #112] ; (8003e44 <_SendPacket+0x1c0>) + 8003dd4: 69bb ldr r3, [r7, #24] + 8003dd6: 60d3 str r3, [r2, #12] + 8003dd8: e00b b.n 8003df2 <_SendPacket+0x16e> + } else { + _SYSVIEW_Globals.EnableState++; // EnableState has been 1, will be 2. Always. + 8003dda: 4b1a ldr r3, [pc, #104] ; (8003e44 <_SendPacket+0x1c0>) + 8003ddc: 781b ldrb r3, [r3, #0] + 8003dde: 3301 adds r3, #1 + 8003de0: b2da uxtb r2, r3 + 8003de2: 4b18 ldr r3, [pc, #96] ; (8003e44 <_SendPacket+0x1c0>) + 8003de4: 701a strb r2, [r3, #0] + 8003de6: e004 b.n 8003df2 <_SendPacket+0x16e> + goto SendDone; + 8003de8: bf00 nop + 8003dea: e002 b.n 8003df2 <_SendPacket+0x16e> + goto SendDone; + 8003dec: bf00 nop + 8003dee: e000 b.n 8003df2 <_SendPacket+0x16e> + goto SendDone; + 8003df0: bf00 nop + // + // Check if host is sending data which needs to be processed. + // Note that since this code is called for every packet, it is very time critical, so we do + // only what is really needed here, which is checking if there is any data + // + if (SEGGER_RTT_HASDATA(CHANNEL_ID_DOWN)) { + 8003df2: 4b14 ldr r3, [pc, #80] ; (8003e44 <_SendPacket+0x1c0>) + 8003df4: 7e1b ldrb r3, [r3, #24] + 8003df6: 4619 mov r1, r3 + 8003df8: 4a14 ldr r2, [pc, #80] ; (8003e4c <_SendPacket+0x1c8>) + 8003dfa: 460b mov r3, r1 + 8003dfc: 005b lsls r3, r3, #1 + 8003dfe: 440b add r3, r1 + 8003e00: 00db lsls r3, r3, #3 + 8003e02: 4413 add r3, r2 + 8003e04: 336c adds r3, #108 ; 0x6c + 8003e06: 681a ldr r2, [r3, #0] + 8003e08: 4b0e ldr r3, [pc, #56] ; (8003e44 <_SendPacket+0x1c0>) + 8003e0a: 7e1b ldrb r3, [r3, #24] + 8003e0c: 4618 mov r0, r3 + 8003e0e: 490f ldr r1, [pc, #60] ; (8003e4c <_SendPacket+0x1c8>) + 8003e10: 4603 mov r3, r0 + 8003e12: 005b lsls r3, r3, #1 + 8003e14: 4403 add r3, r0 + 8003e16: 00db lsls r3, r3, #3 + 8003e18: 440b add r3, r1 + 8003e1a: 3370 adds r3, #112 ; 0x70 + 8003e1c: 681b ldr r3, [r3, #0] + 8003e1e: 429a cmp r2, r3 + 8003e20: d00b beq.n 8003e3a <_SendPacket+0x1b6> + if (_SYSVIEW_Globals.RecursionCnt == 0) { // Avoid uncontrolled nesting. This way, this routine can call itself once, but no more often than that. + 8003e22: 4b08 ldr r3, [pc, #32] ; (8003e44 <_SendPacket+0x1c0>) + 8003e24: 789b ldrb r3, [r3, #2] + 8003e26: 2b00 cmp r3, #0 + 8003e28: d107 bne.n 8003e3a <_SendPacket+0x1b6> + _SYSVIEW_Globals.RecursionCnt = 1; + 8003e2a: 4b06 ldr r3, [pc, #24] ; (8003e44 <_SendPacket+0x1c0>) + 8003e2c: 2201 movs r2, #1 + 8003e2e: 709a strb r2, [r3, #2] + _HandleIncomingPacket(); + 8003e30: f7ff fe4a bl 8003ac8 <_HandleIncomingPacket> + _SYSVIEW_Globals.RecursionCnt = 0; + 8003e34: 4b03 ldr r3, [pc, #12] ; (8003e44 <_SendPacket+0x1c0>) + 8003e36: 2200 movs r2, #0 + 8003e38: 709a strb r2, [r3, #2] +#endif + // +#if (SEGGER_SYSVIEW_USE_STATIC_BUFFER == 0) + SEGGER_SYSVIEW_UNLOCK(); // We are done. Unlock and return +#endif +} + 8003e3a: bf00 nop + 8003e3c: 3728 adds r7, #40 ; 0x28 + 8003e3e: 46bd mov sp, r7 + 8003e40: bd80 pop {r7, pc} + 8003e42: bf00 nop + 8003e44: 20015bc4 .word 0x20015bc4 + 8003e48: e0001004 .word 0xe0001004 + 8003e4c: 20015d44 .word 0x20015d44 + +08003e50 : +* The channel is assigned the label "SysView" for client software +* to identify the SystemView channel. +* +* The channel is configured with the macro SEGGER_SYSVIEW_RTT_CHANNEL. +*/ +void SEGGER_SYSVIEW_Init(U32 SysFreq, U32 CPUFreq, const SEGGER_SYSVIEW_OS_API *pOSAPI, SEGGER_SYSVIEW_SEND_SYS_DESC_FUNC pfSendSysDesc) { + 8003e50: b580 push {r7, lr} + 8003e52: b086 sub sp, #24 + 8003e54: af02 add r7, sp, #8 + 8003e56: 60f8 str r0, [r7, #12] + 8003e58: 60b9 str r1, [r7, #8] + 8003e5a: 607a str r2, [r7, #4] + 8003e5c: 603b str r3, [r7, #0] +#else // (SEGGER_SYSVIEW_POST_MORTEM_MODE == 1) +#if SEGGER_SYSVIEW_RTT_CHANNEL > 0 + SEGGER_RTT_ConfigUpBuffer (SEGGER_SYSVIEW_RTT_CHANNEL, "SysView", &_UpBuffer[0], sizeof(_UpBuffer), SEGGER_RTT_MODE_NO_BLOCK_SKIP); + SEGGER_RTT_ConfigDownBuffer (SEGGER_SYSVIEW_RTT_CHANNEL, "SysView", &_DownBuffer[0], sizeof(_DownBuffer), SEGGER_RTT_MODE_NO_BLOCK_SKIP); +#else + _SYSVIEW_Globals.UpChannel = SEGGER_RTT_AllocUpBuffer ("SysView", &_UpBuffer[0], sizeof(_UpBuffer), SEGGER_RTT_MODE_NO_BLOCK_SKIP); + 8003e5e: 2300 movs r3, #0 + 8003e60: f44f 5220 mov.w r2, #10240 ; 0x2800 + 8003e64: 4917 ldr r1, [pc, #92] ; (8003ec4 ) + 8003e66: 4818 ldr r0, [pc, #96] ; (8003ec8 ) + 8003e68: f7ff fce0 bl 800382c + 8003e6c: 4603 mov r3, r0 + 8003e6e: b2da uxtb r2, r3 + 8003e70: 4b16 ldr r3, [pc, #88] ; (8003ecc ) + 8003e72: 705a strb r2, [r3, #1] + _SYSVIEW_Globals.DownChannel = _SYSVIEW_Globals.UpChannel; + 8003e74: 4b15 ldr r3, [pc, #84] ; (8003ecc ) + 8003e76: 785a ldrb r2, [r3, #1] + 8003e78: 4b14 ldr r3, [pc, #80] ; (8003ecc ) + 8003e7a: 761a strb r2, [r3, #24] + SEGGER_RTT_ConfigDownBuffer (_SYSVIEW_Globals.DownChannel, "SysView", &_DownBuffer[0], sizeof(_DownBuffer), SEGGER_RTT_MODE_NO_BLOCK_SKIP); + 8003e7c: 4b13 ldr r3, [pc, #76] ; (8003ecc ) + 8003e7e: 7e1b ldrb r3, [r3, #24] + 8003e80: 4618 mov r0, r3 + 8003e82: 2300 movs r3, #0 + 8003e84: 9300 str r3, [sp, #0] + 8003e86: 2308 movs r3, #8 + 8003e88: 4a11 ldr r2, [pc, #68] ; (8003ed0 ) + 8003e8a: 490f ldr r1, [pc, #60] ; (8003ec8 ) + 8003e8c: f7ff fd52 bl 8003934 +#endif + _SYSVIEW_Globals.RAMBaseAddress = SEGGER_SYSVIEW_ID_BASE; + 8003e90: 4b0e ldr r3, [pc, #56] ; (8003ecc ) + 8003e92: 2200 movs r2, #0 + 8003e94: 611a str r2, [r3, #16] + _SYSVIEW_Globals.LastTxTimeStamp = SEGGER_SYSVIEW_GET_TIMESTAMP(); + 8003e96: 4b0f ldr r3, [pc, #60] ; (8003ed4 ) + 8003e98: 681b ldr r3, [r3, #0] + 8003e9a: 4a0c ldr r2, [pc, #48] ; (8003ecc ) + 8003e9c: 60d3 str r3, [r2, #12] + _SYSVIEW_Globals.pOSAPI = pOSAPI; + 8003e9e: 4a0b ldr r2, [pc, #44] ; (8003ecc ) + 8003ea0: 687b ldr r3, [r7, #4] + 8003ea2: 6213 str r3, [r2, #32] + _SYSVIEW_Globals.SysFreq = SysFreq; + 8003ea4: 4a09 ldr r2, [pc, #36] ; (8003ecc ) + 8003ea6: 68fb ldr r3, [r7, #12] + 8003ea8: 6053 str r3, [r2, #4] + _SYSVIEW_Globals.CPUFreq = CPUFreq; + 8003eaa: 4a08 ldr r2, [pc, #32] ; (8003ecc ) + 8003eac: 68bb ldr r3, [r7, #8] + 8003eae: 6093 str r3, [r2, #8] + _SYSVIEW_Globals.pfSendSysDesc = pfSendSysDesc; + 8003eb0: 4a06 ldr r2, [pc, #24] ; (8003ecc ) + 8003eb2: 683b ldr r3, [r7, #0] + 8003eb4: 6253 str r3, [r2, #36] ; 0x24 + _SYSVIEW_Globals.EnableState = 0; + 8003eb6: 4b05 ldr r3, [pc, #20] ; (8003ecc ) + 8003eb8: 2200 movs r2, #0 + 8003eba: 701a strb r2, [r3, #0] +#endif // (SEGGER_SYSVIEW_POST_MORTEM_MODE == 1) +} + 8003ebc: bf00 nop + 8003ebe: 3710 adds r7, #16 + 8003ec0: 46bd mov sp, r7 + 8003ec2: bd80 pop {r7, pc} + 8003ec4: 200133bc .word 0x200133bc + 8003ec8: 08006c90 .word 0x08006c90 + 8003ecc: 20015bc4 .word 0x20015bc4 + 8003ed0: 20015bbc .word 0x20015bbc + 8003ed4: e0001004 .word 0xe0001004 + +08003ed8 : +* to save bandwidth. +* +* Parameters +* RAMBaseAddress - Lowest RAM Address. (i.e. 0x20000000 on most Cortex-M) +*/ +void SEGGER_SYSVIEW_SetRAMBase(U32 RAMBaseAddress) { + 8003ed8: b480 push {r7} + 8003eda: b083 sub sp, #12 + 8003edc: af00 add r7, sp, #0 + 8003ede: 6078 str r0, [r7, #4] + _SYSVIEW_Globals.RAMBaseAddress = RAMBaseAddress; + 8003ee0: 4a04 ldr r2, [pc, #16] ; (8003ef4 ) + 8003ee2: 687b ldr r3, [r7, #4] + 8003ee4: 6113 str r3, [r2, #16] +} + 8003ee6: bf00 nop + 8003ee8: 370c adds r7, #12 + 8003eea: 46bd mov sp, r7 + 8003eec: f85d 7b04 ldr.w r7, [sp], #4 + 8003ef0: 4770 bx lr + 8003ef2: bf00 nop + 8003ef4: 20015bc4 .word 0x20015bc4 + +08003ef8 : +* Formats and sends a SystemView packet with an empty payload. +* +* Parameters +* EventID - SystemView event ID. +*/ +void SEGGER_SYSVIEW_RecordVoid(unsigned int EventID) { + 8003ef8: b580 push {r7, lr} + 8003efa: b084 sub sp, #16 + 8003efc: af00 add r7, sp, #0 + 8003efe: 6078 str r0, [r7, #4] + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE); + 8003f00: f3ef 8311 mrs r3, BASEPRI + 8003f04: f04f 0120 mov.w r1, #32 + 8003f08: f381 8811 msr BASEPRI, r1 + 8003f0c: 60fb str r3, [r7, #12] + 8003f0e: 4808 ldr r0, [pc, #32] ; (8003f30 ) + 8003f10: f7ff fdcd bl 8003aae <_PreparePacket> + 8003f14: 60b8 str r0, [r7, #8] + // + _SendPacket(pPayloadStart, pPayloadStart, EventID); + 8003f16: 687a ldr r2, [r7, #4] + 8003f18: 68b9 ldr r1, [r7, #8] + 8003f1a: 68b8 ldr r0, [r7, #8] + 8003f1c: f7ff feb2 bl 8003c84 <_SendPacket> + RECORD_END(); + 8003f20: 68fb ldr r3, [r7, #12] + 8003f22: f383 8811 msr BASEPRI, r3 +} + 8003f26: bf00 nop + 8003f28: 3710 adds r7, #16 + 8003f2a: 46bd mov sp, r7 + 8003f2c: bd80 pop {r7, pc} + 8003f2e: bf00 nop + 8003f30: 20015bf4 .word 0x20015bf4 + +08003f34 : +* +* Parameters +* EventID - SystemView event ID. +* Value - The 32-bit parameter encoded to SystemView packet payload. +*/ +void SEGGER_SYSVIEW_RecordU32(unsigned int EventID, U32 Value) { + 8003f34: b580 push {r7, lr} + 8003f36: b088 sub sp, #32 + 8003f38: af00 add r7, sp, #0 + 8003f3a: 6078 str r0, [r7, #4] + 8003f3c: 6039 str r1, [r7, #0] + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32); + 8003f3e: f3ef 8311 mrs r3, BASEPRI + 8003f42: f04f 0120 mov.w r1, #32 + 8003f46: f381 8811 msr BASEPRI, r1 + 8003f4a: 617b str r3, [r7, #20] + 8003f4c: 4816 ldr r0, [pc, #88] ; (8003fa8 ) + 8003f4e: f7ff fdae bl 8003aae <_PreparePacket> + 8003f52: 6138 str r0, [r7, #16] + // + pPayload = pPayloadStart; + 8003f54: 693b ldr r3, [r7, #16] + 8003f56: 60fb str r3, [r7, #12] + ENCODE_U32(pPayload, Value); + 8003f58: 68fb ldr r3, [r7, #12] + 8003f5a: 61fb str r3, [r7, #28] + 8003f5c: 683b ldr r3, [r7, #0] + 8003f5e: 61bb str r3, [r7, #24] + 8003f60: e00b b.n 8003f7a + 8003f62: 69bb ldr r3, [r7, #24] + 8003f64: b2da uxtb r2, r3 + 8003f66: 69fb ldr r3, [r7, #28] + 8003f68: 1c59 adds r1, r3, #1 + 8003f6a: 61f9 str r1, [r7, #28] + 8003f6c: f062 027f orn r2, r2, #127 ; 0x7f + 8003f70: b2d2 uxtb r2, r2 + 8003f72: 701a strb r2, [r3, #0] + 8003f74: 69bb ldr r3, [r7, #24] + 8003f76: 09db lsrs r3, r3, #7 + 8003f78: 61bb str r3, [r7, #24] + 8003f7a: 69bb ldr r3, [r7, #24] + 8003f7c: 2b7f cmp r3, #127 ; 0x7f + 8003f7e: d8f0 bhi.n 8003f62 + 8003f80: 69fb ldr r3, [r7, #28] + 8003f82: 1c5a adds r2, r3, #1 + 8003f84: 61fa str r2, [r7, #28] + 8003f86: 69ba ldr r2, [r7, #24] + 8003f88: b2d2 uxtb r2, r2 + 8003f8a: 701a strb r2, [r3, #0] + 8003f8c: 69fb ldr r3, [r7, #28] + 8003f8e: 60fb str r3, [r7, #12] + _SendPacket(pPayloadStart, pPayload, EventID); + 8003f90: 687a ldr r2, [r7, #4] + 8003f92: 68f9 ldr r1, [r7, #12] + 8003f94: 6938 ldr r0, [r7, #16] + 8003f96: f7ff fe75 bl 8003c84 <_SendPacket> + RECORD_END(); + 8003f9a: 697b ldr r3, [r7, #20] + 8003f9c: f383 8811 msr BASEPRI, r3 +} + 8003fa0: bf00 nop + 8003fa2: 3720 adds r7, #32 + 8003fa4: 46bd mov sp, r7 + 8003fa6: bd80 pop {r7, pc} + 8003fa8: 20015bf4 .word 0x20015bf4 + +08003fac : +* Parameters +* EventID - SystemView event ID. +* Para0 - The 32-bit parameter encoded to SystemView packet payload. +* Para1 - The 32-bit parameter encoded to SystemView packet payload. +*/ +void SEGGER_SYSVIEW_RecordU32x2(unsigned int EventID, U32 Para0, U32 Para1) { + 8003fac: b580 push {r7, lr} + 8003fae: b08c sub sp, #48 ; 0x30 + 8003fb0: af00 add r7, sp, #0 + 8003fb2: 60f8 str r0, [r7, #12] + 8003fb4: 60b9 str r1, [r7, #8] + 8003fb6: 607a str r2, [r7, #4] + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2 * SEGGER_SYSVIEW_QUANTA_U32); + 8003fb8: f3ef 8311 mrs r3, BASEPRI + 8003fbc: f04f 0120 mov.w r1, #32 + 8003fc0: f381 8811 msr BASEPRI, r1 + 8003fc4: 61fb str r3, [r7, #28] + 8003fc6: 4825 ldr r0, [pc, #148] ; (800405c ) + 8003fc8: f7ff fd71 bl 8003aae <_PreparePacket> + 8003fcc: 61b8 str r0, [r7, #24] + // + pPayload = pPayloadStart; + 8003fce: 69bb ldr r3, [r7, #24] + 8003fd0: 617b str r3, [r7, #20] + ENCODE_U32(pPayload, Para0); + 8003fd2: 697b ldr r3, [r7, #20] + 8003fd4: 62fb str r3, [r7, #44] ; 0x2c + 8003fd6: 68bb ldr r3, [r7, #8] + 8003fd8: 62bb str r3, [r7, #40] ; 0x28 + 8003fda: e00b b.n 8003ff4 + 8003fdc: 6abb ldr r3, [r7, #40] ; 0x28 + 8003fde: b2da uxtb r2, r3 + 8003fe0: 6afb ldr r3, [r7, #44] ; 0x2c + 8003fe2: 1c59 adds r1, r3, #1 + 8003fe4: 62f9 str r1, [r7, #44] ; 0x2c + 8003fe6: f062 027f orn r2, r2, #127 ; 0x7f + 8003fea: b2d2 uxtb r2, r2 + 8003fec: 701a strb r2, [r3, #0] + 8003fee: 6abb ldr r3, [r7, #40] ; 0x28 + 8003ff0: 09db lsrs r3, r3, #7 + 8003ff2: 62bb str r3, [r7, #40] ; 0x28 + 8003ff4: 6abb ldr r3, [r7, #40] ; 0x28 + 8003ff6: 2b7f cmp r3, #127 ; 0x7f + 8003ff8: d8f0 bhi.n 8003fdc + 8003ffa: 6afb ldr r3, [r7, #44] ; 0x2c + 8003ffc: 1c5a adds r2, r3, #1 + 8003ffe: 62fa str r2, [r7, #44] ; 0x2c + 8004000: 6aba ldr r2, [r7, #40] ; 0x28 + 8004002: b2d2 uxtb r2, r2 + 8004004: 701a strb r2, [r3, #0] + 8004006: 6afb ldr r3, [r7, #44] ; 0x2c + 8004008: 617b str r3, [r7, #20] + ENCODE_U32(pPayload, Para1); + 800400a: 697b ldr r3, [r7, #20] + 800400c: 627b str r3, [r7, #36] ; 0x24 + 800400e: 687b ldr r3, [r7, #4] + 8004010: 623b str r3, [r7, #32] + 8004012: e00b b.n 800402c + 8004014: 6a3b ldr r3, [r7, #32] + 8004016: b2da uxtb r2, r3 + 8004018: 6a7b ldr r3, [r7, #36] ; 0x24 + 800401a: 1c59 adds r1, r3, #1 + 800401c: 6279 str r1, [r7, #36] ; 0x24 + 800401e: f062 027f orn r2, r2, #127 ; 0x7f + 8004022: b2d2 uxtb r2, r2 + 8004024: 701a strb r2, [r3, #0] + 8004026: 6a3b ldr r3, [r7, #32] + 8004028: 09db lsrs r3, r3, #7 + 800402a: 623b str r3, [r7, #32] + 800402c: 6a3b ldr r3, [r7, #32] + 800402e: 2b7f cmp r3, #127 ; 0x7f + 8004030: d8f0 bhi.n 8004014 + 8004032: 6a7b ldr r3, [r7, #36] ; 0x24 + 8004034: 1c5a adds r2, r3, #1 + 8004036: 627a str r2, [r7, #36] ; 0x24 + 8004038: 6a3a ldr r2, [r7, #32] + 800403a: b2d2 uxtb r2, r2 + 800403c: 701a strb r2, [r3, #0] + 800403e: 6a7b ldr r3, [r7, #36] ; 0x24 + 8004040: 617b str r3, [r7, #20] + _SendPacket(pPayloadStart, pPayload, EventID); + 8004042: 68fa ldr r2, [r7, #12] + 8004044: 6979 ldr r1, [r7, #20] + 8004046: 69b8 ldr r0, [r7, #24] + 8004048: f7ff fe1c bl 8003c84 <_SendPacket> + RECORD_END(); + 800404c: 69fb ldr r3, [r7, #28] + 800404e: f383 8811 msr BASEPRI, r3 +} + 8004052: bf00 nop + 8004054: 3730 adds r7, #48 ; 0x30 + 8004056: 46bd mov sp, r7 + 8004058: bd80 pop {r7, pc} + 800405a: bf00 nop + 800405c: 20015bf4 .word 0x20015bf4 + +08004060 : +* EventID - SystemView event ID. +* Para0 - The 32-bit parameter encoded to SystemView packet payload. +* Para1 - The 32-bit parameter encoded to SystemView packet payload. +* Para2 - The 32-bit parameter encoded to SystemView packet payload. +*/ +void SEGGER_SYSVIEW_RecordU32x3(unsigned int EventID, U32 Para0, U32 Para1, U32 Para2) { + 8004060: b580 push {r7, lr} + 8004062: b08e sub sp, #56 ; 0x38 + 8004064: af00 add r7, sp, #0 + 8004066: 60f8 str r0, [r7, #12] + 8004068: 60b9 str r1, [r7, #8] + 800406a: 607a str r2, [r7, #4] + 800406c: 603b str r3, [r7, #0] + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 3 * SEGGER_SYSVIEW_QUANTA_U32); + 800406e: f3ef 8311 mrs r3, BASEPRI + 8004072: f04f 0120 mov.w r1, #32 + 8004076: f381 8811 msr BASEPRI, r1 + 800407a: 61fb str r3, [r7, #28] + 800407c: 4832 ldr r0, [pc, #200] ; (8004148 ) + 800407e: f7ff fd16 bl 8003aae <_PreparePacket> + 8004082: 61b8 str r0, [r7, #24] + // + pPayload = pPayloadStart; + 8004084: 69bb ldr r3, [r7, #24] + 8004086: 617b str r3, [r7, #20] + ENCODE_U32(pPayload, Para0); + 8004088: 697b ldr r3, [r7, #20] + 800408a: 637b str r3, [r7, #52] ; 0x34 + 800408c: 68bb ldr r3, [r7, #8] + 800408e: 633b str r3, [r7, #48] ; 0x30 + 8004090: e00b b.n 80040aa + 8004092: 6b3b ldr r3, [r7, #48] ; 0x30 + 8004094: b2da uxtb r2, r3 + 8004096: 6b7b ldr r3, [r7, #52] ; 0x34 + 8004098: 1c59 adds r1, r3, #1 + 800409a: 6379 str r1, [r7, #52] ; 0x34 + 800409c: f062 027f orn r2, r2, #127 ; 0x7f + 80040a0: b2d2 uxtb r2, r2 + 80040a2: 701a strb r2, [r3, #0] + 80040a4: 6b3b ldr r3, [r7, #48] ; 0x30 + 80040a6: 09db lsrs r3, r3, #7 + 80040a8: 633b str r3, [r7, #48] ; 0x30 + 80040aa: 6b3b ldr r3, [r7, #48] ; 0x30 + 80040ac: 2b7f cmp r3, #127 ; 0x7f + 80040ae: d8f0 bhi.n 8004092 + 80040b0: 6b7b ldr r3, [r7, #52] ; 0x34 + 80040b2: 1c5a adds r2, r3, #1 + 80040b4: 637a str r2, [r7, #52] ; 0x34 + 80040b6: 6b3a ldr r2, [r7, #48] ; 0x30 + 80040b8: b2d2 uxtb r2, r2 + 80040ba: 701a strb r2, [r3, #0] + 80040bc: 6b7b ldr r3, [r7, #52] ; 0x34 + 80040be: 617b str r3, [r7, #20] + ENCODE_U32(pPayload, Para1); + 80040c0: 697b ldr r3, [r7, #20] + 80040c2: 62fb str r3, [r7, #44] ; 0x2c + 80040c4: 687b ldr r3, [r7, #4] + 80040c6: 62bb str r3, [r7, #40] ; 0x28 + 80040c8: e00b b.n 80040e2 + 80040ca: 6abb ldr r3, [r7, #40] ; 0x28 + 80040cc: b2da uxtb r2, r3 + 80040ce: 6afb ldr r3, [r7, #44] ; 0x2c + 80040d0: 1c59 adds r1, r3, #1 + 80040d2: 62f9 str r1, [r7, #44] ; 0x2c + 80040d4: f062 027f orn r2, r2, #127 ; 0x7f + 80040d8: b2d2 uxtb r2, r2 + 80040da: 701a strb r2, [r3, #0] + 80040dc: 6abb ldr r3, [r7, #40] ; 0x28 + 80040de: 09db lsrs r3, r3, #7 + 80040e0: 62bb str r3, [r7, #40] ; 0x28 + 80040e2: 6abb ldr r3, [r7, #40] ; 0x28 + 80040e4: 2b7f cmp r3, #127 ; 0x7f + 80040e6: d8f0 bhi.n 80040ca + 80040e8: 6afb ldr r3, [r7, #44] ; 0x2c + 80040ea: 1c5a adds r2, r3, #1 + 80040ec: 62fa str r2, [r7, #44] ; 0x2c + 80040ee: 6aba ldr r2, [r7, #40] ; 0x28 + 80040f0: b2d2 uxtb r2, r2 + 80040f2: 701a strb r2, [r3, #0] + 80040f4: 6afb ldr r3, [r7, #44] ; 0x2c + 80040f6: 617b str r3, [r7, #20] + ENCODE_U32(pPayload, Para2); + 80040f8: 697b ldr r3, [r7, #20] + 80040fa: 627b str r3, [r7, #36] ; 0x24 + 80040fc: 683b ldr r3, [r7, #0] + 80040fe: 623b str r3, [r7, #32] + 8004100: e00b b.n 800411a + 8004102: 6a3b ldr r3, [r7, #32] + 8004104: b2da uxtb r2, r3 + 8004106: 6a7b ldr r3, [r7, #36] ; 0x24 + 8004108: 1c59 adds r1, r3, #1 + 800410a: 6279 str r1, [r7, #36] ; 0x24 + 800410c: f062 027f orn r2, r2, #127 ; 0x7f + 8004110: b2d2 uxtb r2, r2 + 8004112: 701a strb r2, [r3, #0] + 8004114: 6a3b ldr r3, [r7, #32] + 8004116: 09db lsrs r3, r3, #7 + 8004118: 623b str r3, [r7, #32] + 800411a: 6a3b ldr r3, [r7, #32] + 800411c: 2b7f cmp r3, #127 ; 0x7f + 800411e: d8f0 bhi.n 8004102 + 8004120: 6a7b ldr r3, [r7, #36] ; 0x24 + 8004122: 1c5a adds r2, r3, #1 + 8004124: 627a str r2, [r7, #36] ; 0x24 + 8004126: 6a3a ldr r2, [r7, #32] + 8004128: b2d2 uxtb r2, r2 + 800412a: 701a strb r2, [r3, #0] + 800412c: 6a7b ldr r3, [r7, #36] ; 0x24 + 800412e: 617b str r3, [r7, #20] + _SendPacket(pPayloadStart, pPayload, EventID); + 8004130: 68fa ldr r2, [r7, #12] + 8004132: 6979 ldr r1, [r7, #20] + 8004134: 69b8 ldr r0, [r7, #24] + 8004136: f7ff fda5 bl 8003c84 <_SendPacket> + RECORD_END(); + 800413a: 69fb ldr r3, [r7, #28] + 800413c: f383 8811 msr BASEPRI, r3 +} + 8004140: bf00 nop + 8004142: 3738 adds r7, #56 ; 0x38 + 8004144: 46bd mov sp, r7 + 8004146: bd80 pop {r7, pc} + 8004148: 20015bf4 .word 0x20015bf4 + +0800414c : +* Para0 - The 32-bit parameter encoded to SystemView packet payload. +* Para1 - The 32-bit parameter encoded to SystemView packet payload. +* Para2 - The 32-bit parameter encoded to SystemView packet payload. +* Para3 - The 32-bit parameter encoded to SystemView packet payload. +*/ +void SEGGER_SYSVIEW_RecordU32x4(unsigned int EventID, U32 Para0, U32 Para1, U32 Para2, U32 Para3) { + 800414c: b580 push {r7, lr} + 800414e: b090 sub sp, #64 ; 0x40 + 8004150: af00 add r7, sp, #0 + 8004152: 60f8 str r0, [r7, #12] + 8004154: 60b9 str r1, [r7, #8] + 8004156: 607a str r2, [r7, #4] + 8004158: 603b str r3, [r7, #0] + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 4 * SEGGER_SYSVIEW_QUANTA_U32); + 800415a: f3ef 8311 mrs r3, BASEPRI + 800415e: f04f 0120 mov.w r1, #32 + 8004162: f381 8811 msr BASEPRI, r1 + 8004166: 61fb str r3, [r7, #28] + 8004168: 4840 ldr r0, [pc, #256] ; (800426c ) + 800416a: f7ff fca0 bl 8003aae <_PreparePacket> + 800416e: 61b8 str r0, [r7, #24] + // + pPayload = pPayloadStart; + 8004170: 69bb ldr r3, [r7, #24] + 8004172: 617b str r3, [r7, #20] + ENCODE_U32(pPayload, Para0); + 8004174: 697b ldr r3, [r7, #20] + 8004176: 63fb str r3, [r7, #60] ; 0x3c + 8004178: 68bb ldr r3, [r7, #8] + 800417a: 63bb str r3, [r7, #56] ; 0x38 + 800417c: e00b b.n 8004196 + 800417e: 6bbb ldr r3, [r7, #56] ; 0x38 + 8004180: b2da uxtb r2, r3 + 8004182: 6bfb ldr r3, [r7, #60] ; 0x3c + 8004184: 1c59 adds r1, r3, #1 + 8004186: 63f9 str r1, [r7, #60] ; 0x3c + 8004188: f062 027f orn r2, r2, #127 ; 0x7f + 800418c: b2d2 uxtb r2, r2 + 800418e: 701a strb r2, [r3, #0] + 8004190: 6bbb ldr r3, [r7, #56] ; 0x38 + 8004192: 09db lsrs r3, r3, #7 + 8004194: 63bb str r3, [r7, #56] ; 0x38 + 8004196: 6bbb ldr r3, [r7, #56] ; 0x38 + 8004198: 2b7f cmp r3, #127 ; 0x7f + 800419a: d8f0 bhi.n 800417e + 800419c: 6bfb ldr r3, [r7, #60] ; 0x3c + 800419e: 1c5a adds r2, r3, #1 + 80041a0: 63fa str r2, [r7, #60] ; 0x3c + 80041a2: 6bba ldr r2, [r7, #56] ; 0x38 + 80041a4: b2d2 uxtb r2, r2 + 80041a6: 701a strb r2, [r3, #0] + 80041a8: 6bfb ldr r3, [r7, #60] ; 0x3c + 80041aa: 617b str r3, [r7, #20] + ENCODE_U32(pPayload, Para1); + 80041ac: 697b ldr r3, [r7, #20] + 80041ae: 637b str r3, [r7, #52] ; 0x34 + 80041b0: 687b ldr r3, [r7, #4] + 80041b2: 633b str r3, [r7, #48] ; 0x30 + 80041b4: e00b b.n 80041ce + 80041b6: 6b3b ldr r3, [r7, #48] ; 0x30 + 80041b8: b2da uxtb r2, r3 + 80041ba: 6b7b ldr r3, [r7, #52] ; 0x34 + 80041bc: 1c59 adds r1, r3, #1 + 80041be: 6379 str r1, [r7, #52] ; 0x34 + 80041c0: f062 027f orn r2, r2, #127 ; 0x7f + 80041c4: b2d2 uxtb r2, r2 + 80041c6: 701a strb r2, [r3, #0] + 80041c8: 6b3b ldr r3, [r7, #48] ; 0x30 + 80041ca: 09db lsrs r3, r3, #7 + 80041cc: 633b str r3, [r7, #48] ; 0x30 + 80041ce: 6b3b ldr r3, [r7, #48] ; 0x30 + 80041d0: 2b7f cmp r3, #127 ; 0x7f + 80041d2: d8f0 bhi.n 80041b6 + 80041d4: 6b7b ldr r3, [r7, #52] ; 0x34 + 80041d6: 1c5a adds r2, r3, #1 + 80041d8: 637a str r2, [r7, #52] ; 0x34 + 80041da: 6b3a ldr r2, [r7, #48] ; 0x30 + 80041dc: b2d2 uxtb r2, r2 + 80041de: 701a strb r2, [r3, #0] + 80041e0: 6b7b ldr r3, [r7, #52] ; 0x34 + 80041e2: 617b str r3, [r7, #20] + ENCODE_U32(pPayload, Para2); + 80041e4: 697b ldr r3, [r7, #20] + 80041e6: 62fb str r3, [r7, #44] ; 0x2c + 80041e8: 683b ldr r3, [r7, #0] + 80041ea: 62bb str r3, [r7, #40] ; 0x28 + 80041ec: e00b b.n 8004206 + 80041ee: 6abb ldr r3, [r7, #40] ; 0x28 + 80041f0: b2da uxtb r2, r3 + 80041f2: 6afb ldr r3, [r7, #44] ; 0x2c + 80041f4: 1c59 adds r1, r3, #1 + 80041f6: 62f9 str r1, [r7, #44] ; 0x2c + 80041f8: f062 027f orn r2, r2, #127 ; 0x7f + 80041fc: b2d2 uxtb r2, r2 + 80041fe: 701a strb r2, [r3, #0] + 8004200: 6abb ldr r3, [r7, #40] ; 0x28 + 8004202: 09db lsrs r3, r3, #7 + 8004204: 62bb str r3, [r7, #40] ; 0x28 + 8004206: 6abb ldr r3, [r7, #40] ; 0x28 + 8004208: 2b7f cmp r3, #127 ; 0x7f + 800420a: d8f0 bhi.n 80041ee + 800420c: 6afb ldr r3, [r7, #44] ; 0x2c + 800420e: 1c5a adds r2, r3, #1 + 8004210: 62fa str r2, [r7, #44] ; 0x2c + 8004212: 6aba ldr r2, [r7, #40] ; 0x28 + 8004214: b2d2 uxtb r2, r2 + 8004216: 701a strb r2, [r3, #0] + 8004218: 6afb ldr r3, [r7, #44] ; 0x2c + 800421a: 617b str r3, [r7, #20] + ENCODE_U32(pPayload, Para3); + 800421c: 697b ldr r3, [r7, #20] + 800421e: 627b str r3, [r7, #36] ; 0x24 + 8004220: 6cbb ldr r3, [r7, #72] ; 0x48 + 8004222: 623b str r3, [r7, #32] + 8004224: e00b b.n 800423e + 8004226: 6a3b ldr r3, [r7, #32] + 8004228: b2da uxtb r2, r3 + 800422a: 6a7b ldr r3, [r7, #36] ; 0x24 + 800422c: 1c59 adds r1, r3, #1 + 800422e: 6279 str r1, [r7, #36] ; 0x24 + 8004230: f062 027f orn r2, r2, #127 ; 0x7f + 8004234: b2d2 uxtb r2, r2 + 8004236: 701a strb r2, [r3, #0] + 8004238: 6a3b ldr r3, [r7, #32] + 800423a: 09db lsrs r3, r3, #7 + 800423c: 623b str r3, [r7, #32] + 800423e: 6a3b ldr r3, [r7, #32] + 8004240: 2b7f cmp r3, #127 ; 0x7f + 8004242: d8f0 bhi.n 8004226 + 8004244: 6a7b ldr r3, [r7, #36] ; 0x24 + 8004246: 1c5a adds r2, r3, #1 + 8004248: 627a str r2, [r7, #36] ; 0x24 + 800424a: 6a3a ldr r2, [r7, #32] + 800424c: b2d2 uxtb r2, r2 + 800424e: 701a strb r2, [r3, #0] + 8004250: 6a7b ldr r3, [r7, #36] ; 0x24 + 8004252: 617b str r3, [r7, #20] + _SendPacket(pPayloadStart, pPayload, EventID); + 8004254: 68fa ldr r2, [r7, #12] + 8004256: 6979 ldr r1, [r7, #20] + 8004258: 69b8 ldr r0, [r7, #24] + 800425a: f7ff fd13 bl 8003c84 <_SendPacket> + RECORD_END(); + 800425e: 69fb ldr r3, [r7, #28] + 8004260: f383 8811 msr BASEPRI, r3 +} + 8004264: bf00 nop + 8004266: 3740 adds r7, #64 ; 0x40 + 8004268: 46bd mov sp, r7 + 800426a: bd80 pop {r7, pc} + 800426c: 20015bf4 .word 0x20015bf4 + +08004270 : +* Para1 - The 32-bit parameter encoded to SystemView packet payload. +* Para2 - The 32-bit parameter encoded to SystemView packet payload. +* Para3 - The 32-bit parameter encoded to SystemView packet payload. +* Para4 - The 32-bit parameter encoded to SystemView packet payload. +*/ +void SEGGER_SYSVIEW_RecordU32x5(unsigned int EventID, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4) { + 8004270: b580 push {r7, lr} + 8004272: b092 sub sp, #72 ; 0x48 + 8004274: af00 add r7, sp, #0 + 8004276: 60f8 str r0, [r7, #12] + 8004278: 60b9 str r1, [r7, #8] + 800427a: 607a str r2, [r7, #4] + 800427c: 603b str r3, [r7, #0] + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 5 * SEGGER_SYSVIEW_QUANTA_U32); + 800427e: f3ef 8311 mrs r3, BASEPRI + 8004282: f04f 0120 mov.w r1, #32 + 8004286: f381 8811 msr BASEPRI, r1 + 800428a: 61fb str r3, [r7, #28] + 800428c: 484e ldr r0, [pc, #312] ; (80043c8 ) + 800428e: f7ff fc0e bl 8003aae <_PreparePacket> + 8004292: 61b8 str r0, [r7, #24] + // + pPayload = pPayloadStart; + 8004294: 69bb ldr r3, [r7, #24] + 8004296: 617b str r3, [r7, #20] + ENCODE_U32(pPayload, Para0); + 8004298: 697b ldr r3, [r7, #20] + 800429a: 647b str r3, [r7, #68] ; 0x44 + 800429c: 68bb ldr r3, [r7, #8] + 800429e: 643b str r3, [r7, #64] ; 0x40 + 80042a0: e00b b.n 80042ba + 80042a2: 6c3b ldr r3, [r7, #64] ; 0x40 + 80042a4: b2da uxtb r2, r3 + 80042a6: 6c7b ldr r3, [r7, #68] ; 0x44 + 80042a8: 1c59 adds r1, r3, #1 + 80042aa: 6479 str r1, [r7, #68] ; 0x44 + 80042ac: f062 027f orn r2, r2, #127 ; 0x7f + 80042b0: b2d2 uxtb r2, r2 + 80042b2: 701a strb r2, [r3, #0] + 80042b4: 6c3b ldr r3, [r7, #64] ; 0x40 + 80042b6: 09db lsrs r3, r3, #7 + 80042b8: 643b str r3, [r7, #64] ; 0x40 + 80042ba: 6c3b ldr r3, [r7, #64] ; 0x40 + 80042bc: 2b7f cmp r3, #127 ; 0x7f + 80042be: d8f0 bhi.n 80042a2 + 80042c0: 6c7b ldr r3, [r7, #68] ; 0x44 + 80042c2: 1c5a adds r2, r3, #1 + 80042c4: 647a str r2, [r7, #68] ; 0x44 + 80042c6: 6c3a ldr r2, [r7, #64] ; 0x40 + 80042c8: b2d2 uxtb r2, r2 + 80042ca: 701a strb r2, [r3, #0] + 80042cc: 6c7b ldr r3, [r7, #68] ; 0x44 + 80042ce: 617b str r3, [r7, #20] + ENCODE_U32(pPayload, Para1); + 80042d0: 697b ldr r3, [r7, #20] + 80042d2: 63fb str r3, [r7, #60] ; 0x3c + 80042d4: 687b ldr r3, [r7, #4] + 80042d6: 63bb str r3, [r7, #56] ; 0x38 + 80042d8: e00b b.n 80042f2 + 80042da: 6bbb ldr r3, [r7, #56] ; 0x38 + 80042dc: b2da uxtb r2, r3 + 80042de: 6bfb ldr r3, [r7, #60] ; 0x3c + 80042e0: 1c59 adds r1, r3, #1 + 80042e2: 63f9 str r1, [r7, #60] ; 0x3c + 80042e4: f062 027f orn r2, r2, #127 ; 0x7f + 80042e8: b2d2 uxtb r2, r2 + 80042ea: 701a strb r2, [r3, #0] + 80042ec: 6bbb ldr r3, [r7, #56] ; 0x38 + 80042ee: 09db lsrs r3, r3, #7 + 80042f0: 63bb str r3, [r7, #56] ; 0x38 + 80042f2: 6bbb ldr r3, [r7, #56] ; 0x38 + 80042f4: 2b7f cmp r3, #127 ; 0x7f + 80042f6: d8f0 bhi.n 80042da + 80042f8: 6bfb ldr r3, [r7, #60] ; 0x3c + 80042fa: 1c5a adds r2, r3, #1 + 80042fc: 63fa str r2, [r7, #60] ; 0x3c + 80042fe: 6bba ldr r2, [r7, #56] ; 0x38 + 8004300: b2d2 uxtb r2, r2 + 8004302: 701a strb r2, [r3, #0] + 8004304: 6bfb ldr r3, [r7, #60] ; 0x3c + 8004306: 617b str r3, [r7, #20] + ENCODE_U32(pPayload, Para2); + 8004308: 697b ldr r3, [r7, #20] + 800430a: 637b str r3, [r7, #52] ; 0x34 + 800430c: 683b ldr r3, [r7, #0] + 800430e: 633b str r3, [r7, #48] ; 0x30 + 8004310: e00b b.n 800432a + 8004312: 6b3b ldr r3, [r7, #48] ; 0x30 + 8004314: b2da uxtb r2, r3 + 8004316: 6b7b ldr r3, [r7, #52] ; 0x34 + 8004318: 1c59 adds r1, r3, #1 + 800431a: 6379 str r1, [r7, #52] ; 0x34 + 800431c: f062 027f orn r2, r2, #127 ; 0x7f + 8004320: b2d2 uxtb r2, r2 + 8004322: 701a strb r2, [r3, #0] + 8004324: 6b3b ldr r3, [r7, #48] ; 0x30 + 8004326: 09db lsrs r3, r3, #7 + 8004328: 633b str r3, [r7, #48] ; 0x30 + 800432a: 6b3b ldr r3, [r7, #48] ; 0x30 + 800432c: 2b7f cmp r3, #127 ; 0x7f + 800432e: d8f0 bhi.n 8004312 + 8004330: 6b7b ldr r3, [r7, #52] ; 0x34 + 8004332: 1c5a adds r2, r3, #1 + 8004334: 637a str r2, [r7, #52] ; 0x34 + 8004336: 6b3a ldr r2, [r7, #48] ; 0x30 + 8004338: b2d2 uxtb r2, r2 + 800433a: 701a strb r2, [r3, #0] + 800433c: 6b7b ldr r3, [r7, #52] ; 0x34 + 800433e: 617b str r3, [r7, #20] + ENCODE_U32(pPayload, Para3); + 8004340: 697b ldr r3, [r7, #20] + 8004342: 62fb str r3, [r7, #44] ; 0x2c + 8004344: 6d3b ldr r3, [r7, #80] ; 0x50 + 8004346: 62bb str r3, [r7, #40] ; 0x28 + 8004348: e00b b.n 8004362 + 800434a: 6abb ldr r3, [r7, #40] ; 0x28 + 800434c: b2da uxtb r2, r3 + 800434e: 6afb ldr r3, [r7, #44] ; 0x2c + 8004350: 1c59 adds r1, r3, #1 + 8004352: 62f9 str r1, [r7, #44] ; 0x2c + 8004354: f062 027f orn r2, r2, #127 ; 0x7f + 8004358: b2d2 uxtb r2, r2 + 800435a: 701a strb r2, [r3, #0] + 800435c: 6abb ldr r3, [r7, #40] ; 0x28 + 800435e: 09db lsrs r3, r3, #7 + 8004360: 62bb str r3, [r7, #40] ; 0x28 + 8004362: 6abb ldr r3, [r7, #40] ; 0x28 + 8004364: 2b7f cmp r3, #127 ; 0x7f + 8004366: d8f0 bhi.n 800434a + 8004368: 6afb ldr r3, [r7, #44] ; 0x2c + 800436a: 1c5a adds r2, r3, #1 + 800436c: 62fa str r2, [r7, #44] ; 0x2c + 800436e: 6aba ldr r2, [r7, #40] ; 0x28 + 8004370: b2d2 uxtb r2, r2 + 8004372: 701a strb r2, [r3, #0] + 8004374: 6afb ldr r3, [r7, #44] ; 0x2c + 8004376: 617b str r3, [r7, #20] + ENCODE_U32(pPayload, Para4); + 8004378: 697b ldr r3, [r7, #20] + 800437a: 627b str r3, [r7, #36] ; 0x24 + 800437c: 6d7b ldr r3, [r7, #84] ; 0x54 + 800437e: 623b str r3, [r7, #32] + 8004380: e00b b.n 800439a + 8004382: 6a3b ldr r3, [r7, #32] + 8004384: b2da uxtb r2, r3 + 8004386: 6a7b ldr r3, [r7, #36] ; 0x24 + 8004388: 1c59 adds r1, r3, #1 + 800438a: 6279 str r1, [r7, #36] ; 0x24 + 800438c: f062 027f orn r2, r2, #127 ; 0x7f + 8004390: b2d2 uxtb r2, r2 + 8004392: 701a strb r2, [r3, #0] + 8004394: 6a3b ldr r3, [r7, #32] + 8004396: 09db lsrs r3, r3, #7 + 8004398: 623b str r3, [r7, #32] + 800439a: 6a3b ldr r3, [r7, #32] + 800439c: 2b7f cmp r3, #127 ; 0x7f + 800439e: d8f0 bhi.n 8004382 + 80043a0: 6a7b ldr r3, [r7, #36] ; 0x24 + 80043a2: 1c5a adds r2, r3, #1 + 80043a4: 627a str r2, [r7, #36] ; 0x24 + 80043a6: 6a3a ldr r2, [r7, #32] + 80043a8: b2d2 uxtb r2, r2 + 80043aa: 701a strb r2, [r3, #0] + 80043ac: 6a7b ldr r3, [r7, #36] ; 0x24 + 80043ae: 617b str r3, [r7, #20] + _SendPacket(pPayloadStart, pPayload, EventID); + 80043b0: 68fa ldr r2, [r7, #12] + 80043b2: 6979 ldr r1, [r7, #20] + 80043b4: 69b8 ldr r0, [r7, #24] + 80043b6: f7ff fc65 bl 8003c84 <_SendPacket> + RECORD_END(); + 80043ba: 69fb ldr r3, [r7, #28] + 80043bc: f383 8811 msr BASEPRI, r3 +} + 80043c0: bf00 nop + 80043c2: 3748 adds r7, #72 ; 0x48 + 80043c4: 46bd mov sp, r7 + 80043c6: bd80 pop {r7, pc} + 80043c8: 20015bf4 .word 0x20015bf4 + +080043cc : +* When SEGGER_SYSVIEW_CAN_RESTART is 1, each received start command +* records the system information. This is required to enable restart +* of recordings when SystemView unexpectedly disconnects without sending +* a stop command before. +*/ +void SEGGER_SYSVIEW_Start(void) { + 80043cc: b580 push {r7, lr} + 80043ce: b08c sub sp, #48 ; 0x30 + 80043d0: af00 add r7, sp, #0 +#if (SEGGER_SYSVIEW_CAN_RESTART == 0) + if (_SYSVIEW_Globals.EnableState == 0) { +#endif + _SYSVIEW_Globals.EnableState = 1; + 80043d2: 4b58 ldr r3, [pc, #352] ; (8004534 ) + 80043d4: 2201 movs r2, #1 + 80043d6: 701a strb r2, [r3, #0] +#if (SEGGER_SYSVIEW_POST_MORTEM_MODE == 1) + _SendSyncInfo(); +#else + SEGGER_SYSVIEW_LOCK(); + 80043d8: f3ef 8311 mrs r3, BASEPRI + 80043dc: f04f 0120 mov.w r1, #32 + 80043e0: f381 8811 msr BASEPRI, r1 + 80043e4: 60fb str r3, [r7, #12] + SEGGER_RTT_WriteSkipNoLock(CHANNEL_ID_UP, _abSync, 10); + 80043e6: 4b53 ldr r3, [pc, #332] ; (8004534 ) + 80043e8: 785b ldrb r3, [r3, #1] + 80043ea: 220a movs r2, #10 + 80043ec: 4952 ldr r1, [pc, #328] ; (8004538 ) + 80043ee: 4618 mov r0, r3 + 80043f0: f7fb ff0e bl 8000210 + SEGGER_SYSVIEW_UNLOCK(); + 80043f4: 68fb ldr r3, [r7, #12] + 80043f6: f383 8811 msr BASEPRI, r3 + SEGGER_SYSVIEW_ON_EVENT_RECORDED(10); + SEGGER_SYSVIEW_RecordVoid(SYSVIEW_EVTID_TRACE_START); + 80043fa: 200a movs r0, #10 + 80043fc: f7ff fd7c bl 8003ef8 + { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 4 * SEGGER_SYSVIEW_QUANTA_U32); + 8004400: f3ef 8311 mrs r3, BASEPRI + 8004404: f04f 0120 mov.w r1, #32 + 8004408: f381 8811 msr BASEPRI, r1 + 800440c: 60bb str r3, [r7, #8] + 800440e: 484b ldr r0, [pc, #300] ; (800453c ) + 8004410: f7ff fb4d bl 8003aae <_PreparePacket> + 8004414: 6078 str r0, [r7, #4] + // + pPayload = pPayloadStart; + 8004416: 687b ldr r3, [r7, #4] + 8004418: 603b str r3, [r7, #0] + ENCODE_U32(pPayload, _SYSVIEW_Globals.SysFreq); + 800441a: 683b ldr r3, [r7, #0] + 800441c: 62fb str r3, [r7, #44] ; 0x2c + 800441e: 4b45 ldr r3, [pc, #276] ; (8004534 ) + 8004420: 685b ldr r3, [r3, #4] + 8004422: 62bb str r3, [r7, #40] ; 0x28 + 8004424: e00b b.n 800443e + 8004426: 6abb ldr r3, [r7, #40] ; 0x28 + 8004428: b2da uxtb r2, r3 + 800442a: 6afb ldr r3, [r7, #44] ; 0x2c + 800442c: 1c59 adds r1, r3, #1 + 800442e: 62f9 str r1, [r7, #44] ; 0x2c + 8004430: f062 027f orn r2, r2, #127 ; 0x7f + 8004434: b2d2 uxtb r2, r2 + 8004436: 701a strb r2, [r3, #0] + 8004438: 6abb ldr r3, [r7, #40] ; 0x28 + 800443a: 09db lsrs r3, r3, #7 + 800443c: 62bb str r3, [r7, #40] ; 0x28 + 800443e: 6abb ldr r3, [r7, #40] ; 0x28 + 8004440: 2b7f cmp r3, #127 ; 0x7f + 8004442: d8f0 bhi.n 8004426 + 8004444: 6afb ldr r3, [r7, #44] ; 0x2c + 8004446: 1c5a adds r2, r3, #1 + 8004448: 62fa str r2, [r7, #44] ; 0x2c + 800444a: 6aba ldr r2, [r7, #40] ; 0x28 + 800444c: b2d2 uxtb r2, r2 + 800444e: 701a strb r2, [r3, #0] + 8004450: 6afb ldr r3, [r7, #44] ; 0x2c + 8004452: 603b str r3, [r7, #0] + ENCODE_U32(pPayload, _SYSVIEW_Globals.CPUFreq); + 8004454: 683b ldr r3, [r7, #0] + 8004456: 627b str r3, [r7, #36] ; 0x24 + 8004458: 4b36 ldr r3, [pc, #216] ; (8004534 ) + 800445a: 689b ldr r3, [r3, #8] + 800445c: 623b str r3, [r7, #32] + 800445e: e00b b.n 8004478 + 8004460: 6a3b ldr r3, [r7, #32] + 8004462: b2da uxtb r2, r3 + 8004464: 6a7b ldr r3, [r7, #36] ; 0x24 + 8004466: 1c59 adds r1, r3, #1 + 8004468: 6279 str r1, [r7, #36] ; 0x24 + 800446a: f062 027f orn r2, r2, #127 ; 0x7f + 800446e: b2d2 uxtb r2, r2 + 8004470: 701a strb r2, [r3, #0] + 8004472: 6a3b ldr r3, [r7, #32] + 8004474: 09db lsrs r3, r3, #7 + 8004476: 623b str r3, [r7, #32] + 8004478: 6a3b ldr r3, [r7, #32] + 800447a: 2b7f cmp r3, #127 ; 0x7f + 800447c: d8f0 bhi.n 8004460 + 800447e: 6a7b ldr r3, [r7, #36] ; 0x24 + 8004480: 1c5a adds r2, r3, #1 + 8004482: 627a str r2, [r7, #36] ; 0x24 + 8004484: 6a3a ldr r2, [r7, #32] + 8004486: b2d2 uxtb r2, r2 + 8004488: 701a strb r2, [r3, #0] + 800448a: 6a7b ldr r3, [r7, #36] ; 0x24 + 800448c: 603b str r3, [r7, #0] + ENCODE_U32(pPayload, _SYSVIEW_Globals.RAMBaseAddress); + 800448e: 683b ldr r3, [r7, #0] + 8004490: 61fb str r3, [r7, #28] + 8004492: 4b28 ldr r3, [pc, #160] ; (8004534 ) + 8004494: 691b ldr r3, [r3, #16] + 8004496: 61bb str r3, [r7, #24] + 8004498: e00b b.n 80044b2 + 800449a: 69bb ldr r3, [r7, #24] + 800449c: b2da uxtb r2, r3 + 800449e: 69fb ldr r3, [r7, #28] + 80044a0: 1c59 adds r1, r3, #1 + 80044a2: 61f9 str r1, [r7, #28] + 80044a4: f062 027f orn r2, r2, #127 ; 0x7f + 80044a8: b2d2 uxtb r2, r2 + 80044aa: 701a strb r2, [r3, #0] + 80044ac: 69bb ldr r3, [r7, #24] + 80044ae: 09db lsrs r3, r3, #7 + 80044b0: 61bb str r3, [r7, #24] + 80044b2: 69bb ldr r3, [r7, #24] + 80044b4: 2b7f cmp r3, #127 ; 0x7f + 80044b6: d8f0 bhi.n 800449a + 80044b8: 69fb ldr r3, [r7, #28] + 80044ba: 1c5a adds r2, r3, #1 + 80044bc: 61fa str r2, [r7, #28] + 80044be: 69ba ldr r2, [r7, #24] + 80044c0: b2d2 uxtb r2, r2 + 80044c2: 701a strb r2, [r3, #0] + 80044c4: 69fb ldr r3, [r7, #28] + 80044c6: 603b str r3, [r7, #0] + ENCODE_U32(pPayload, SEGGER_SYSVIEW_ID_SHIFT); + 80044c8: 683b ldr r3, [r7, #0] + 80044ca: 617b str r3, [r7, #20] + 80044cc: 2300 movs r3, #0 + 80044ce: 613b str r3, [r7, #16] + 80044d0: e00b b.n 80044ea + 80044d2: 693b ldr r3, [r7, #16] + 80044d4: b2da uxtb r2, r3 + 80044d6: 697b ldr r3, [r7, #20] + 80044d8: 1c59 adds r1, r3, #1 + 80044da: 6179 str r1, [r7, #20] + 80044dc: f062 027f orn r2, r2, #127 ; 0x7f + 80044e0: b2d2 uxtb r2, r2 + 80044e2: 701a strb r2, [r3, #0] + 80044e4: 693b ldr r3, [r7, #16] + 80044e6: 09db lsrs r3, r3, #7 + 80044e8: 613b str r3, [r7, #16] + 80044ea: 693b ldr r3, [r7, #16] + 80044ec: 2b7f cmp r3, #127 ; 0x7f + 80044ee: d8f0 bhi.n 80044d2 + 80044f0: 697b ldr r3, [r7, #20] + 80044f2: 1c5a adds r2, r3, #1 + 80044f4: 617a str r2, [r7, #20] + 80044f6: 693a ldr r2, [r7, #16] + 80044f8: b2d2 uxtb r2, r2 + 80044fa: 701a strb r2, [r3, #0] + 80044fc: 697b ldr r3, [r7, #20] + 80044fe: 603b str r3, [r7, #0] + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_INIT); + 8004500: 2218 movs r2, #24 + 8004502: 6839 ldr r1, [r7, #0] + 8004504: 6878 ldr r0, [r7, #4] + 8004506: f7ff fbbd bl 8003c84 <_SendPacket> + RECORD_END(); + 800450a: 68bb ldr r3, [r7, #8] + 800450c: f383 8811 msr BASEPRI, r3 + } + if (_SYSVIEW_Globals.pfSendSysDesc) { + 8004510: 4b08 ldr r3, [pc, #32] ; (8004534 ) + 8004512: 6a5b ldr r3, [r3, #36] ; 0x24 + 8004514: 2b00 cmp r3, #0 + 8004516: d002 beq.n 800451e + _SYSVIEW_Globals.pfSendSysDesc(); + 8004518: 4b06 ldr r3, [pc, #24] ; (8004534 ) + 800451a: 6a5b ldr r3, [r3, #36] ; 0x24 + 800451c: 4798 blx r3 + } + SEGGER_SYSVIEW_RecordSystime(); + 800451e: f000 f9eb bl 80048f8 + SEGGER_SYSVIEW_SendTaskList(); + 8004522: f000 f9b1 bl 8004888 + SEGGER_SYSVIEW_SendNumModules(); + 8004526: f000 fc81 bl 8004e2c +#endif +#if (SEGGER_SYSVIEW_CAN_RESTART == 0) + } +#endif +} + 800452a: bf00 nop + 800452c: 3730 adds r7, #48 ; 0x30 + 800452e: 46bd mov sp, r7 + 8004530: bd80 pop {r7, pc} + 8004532: bf00 nop + 8004534: 20015bc4 .word 0x20015bc4 + 8004538: 08006d68 .word 0x08006d68 + 800453c: 20015bf4 .word 0x20015bf4 + +08004540 : +* This function disables transmission of SystemView packets recorded +* by subsequent trace calls. If transmission is enabled when +* this function is called, a single SystemView Stop event is recorded +* to the trace, send, and then trace transmission is halted. +*/ +void SEGGER_SYSVIEW_Stop(void) { + 8004540: b580 push {r7, lr} + 8004542: b082 sub sp, #8 + 8004544: af00 add r7, sp, #0 + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE); + 8004546: f3ef 8311 mrs r3, BASEPRI + 800454a: f04f 0120 mov.w r1, #32 + 800454e: f381 8811 msr BASEPRI, r1 + 8004552: 607b str r3, [r7, #4] + 8004554: 480b ldr r0, [pc, #44] ; (8004584 ) + 8004556: f7ff faaa bl 8003aae <_PreparePacket> + 800455a: 6038 str r0, [r7, #0] + // + if (_SYSVIEW_Globals.EnableState) { + 800455c: 4b0a ldr r3, [pc, #40] ; (8004588 ) + 800455e: 781b ldrb r3, [r3, #0] + 8004560: 2b00 cmp r3, #0 + 8004562: d007 beq.n 8004574 + _SendPacket(pPayloadStart, pPayloadStart, SYSVIEW_EVTID_TRACE_STOP); + 8004564: 220b movs r2, #11 + 8004566: 6839 ldr r1, [r7, #0] + 8004568: 6838 ldr r0, [r7, #0] + 800456a: f7ff fb8b bl 8003c84 <_SendPacket> + _SYSVIEW_Globals.EnableState = 0; + 800456e: 4b06 ldr r3, [pc, #24] ; (8004588 ) + 8004570: 2200 movs r2, #0 + 8004572: 701a strb r2, [r3, #0] + } + RECORD_END(); + 8004574: 687b ldr r3, [r7, #4] + 8004576: f383 8811 msr BASEPRI, r3 +} + 800457a: bf00 nop + 800457c: 3708 adds r7, #8 + 800457e: 46bd mov sp, r7 + 8004580: bd80 pop {r7, pc} + 8004582: bf00 nop + 8004584: 20015bf4 .word 0x20015bf4 + 8004588: 20015bc4 .word 0x20015bc4 + +0800458c : +* +* Function description +* Triggers a send of the system information and description. +* +*/ +void SEGGER_SYSVIEW_GetSysDesc(void) { + 800458c: b580 push {r7, lr} + 800458e: b08c sub sp, #48 ; 0x30 + 8004590: af00 add r7, sp, #0 + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 4 * SEGGER_SYSVIEW_QUANTA_U32); + 8004592: f3ef 8311 mrs r3, BASEPRI + 8004596: f04f 0120 mov.w r1, #32 + 800459a: f381 8811 msr BASEPRI, r1 + 800459e: 60fb str r3, [r7, #12] + 80045a0: 4845 ldr r0, [pc, #276] ; (80046b8 ) + 80045a2: f7ff fa84 bl 8003aae <_PreparePacket> + 80045a6: 60b8 str r0, [r7, #8] + // + pPayload = pPayloadStart; + 80045a8: 68bb ldr r3, [r7, #8] + 80045aa: 607b str r3, [r7, #4] + ENCODE_U32(pPayload, _SYSVIEW_Globals.SysFreq); + 80045ac: 687b ldr r3, [r7, #4] + 80045ae: 62fb str r3, [r7, #44] ; 0x2c + 80045b0: 4b42 ldr r3, [pc, #264] ; (80046bc ) + 80045b2: 685b ldr r3, [r3, #4] + 80045b4: 62bb str r3, [r7, #40] ; 0x28 + 80045b6: e00b b.n 80045d0 + 80045b8: 6abb ldr r3, [r7, #40] ; 0x28 + 80045ba: b2da uxtb r2, r3 + 80045bc: 6afb ldr r3, [r7, #44] ; 0x2c + 80045be: 1c59 adds r1, r3, #1 + 80045c0: 62f9 str r1, [r7, #44] ; 0x2c + 80045c2: f062 027f orn r2, r2, #127 ; 0x7f + 80045c6: b2d2 uxtb r2, r2 + 80045c8: 701a strb r2, [r3, #0] + 80045ca: 6abb ldr r3, [r7, #40] ; 0x28 + 80045cc: 09db lsrs r3, r3, #7 + 80045ce: 62bb str r3, [r7, #40] ; 0x28 + 80045d0: 6abb ldr r3, [r7, #40] ; 0x28 + 80045d2: 2b7f cmp r3, #127 ; 0x7f + 80045d4: d8f0 bhi.n 80045b8 + 80045d6: 6afb ldr r3, [r7, #44] ; 0x2c + 80045d8: 1c5a adds r2, r3, #1 + 80045da: 62fa str r2, [r7, #44] ; 0x2c + 80045dc: 6aba ldr r2, [r7, #40] ; 0x28 + 80045de: b2d2 uxtb r2, r2 + 80045e0: 701a strb r2, [r3, #0] + 80045e2: 6afb ldr r3, [r7, #44] ; 0x2c + 80045e4: 607b str r3, [r7, #4] + ENCODE_U32(pPayload, _SYSVIEW_Globals.CPUFreq); + 80045e6: 687b ldr r3, [r7, #4] + 80045e8: 627b str r3, [r7, #36] ; 0x24 + 80045ea: 4b34 ldr r3, [pc, #208] ; (80046bc ) + 80045ec: 689b ldr r3, [r3, #8] + 80045ee: 623b str r3, [r7, #32] + 80045f0: e00b b.n 800460a + 80045f2: 6a3b ldr r3, [r7, #32] + 80045f4: b2da uxtb r2, r3 + 80045f6: 6a7b ldr r3, [r7, #36] ; 0x24 + 80045f8: 1c59 adds r1, r3, #1 + 80045fa: 6279 str r1, [r7, #36] ; 0x24 + 80045fc: f062 027f orn r2, r2, #127 ; 0x7f + 8004600: b2d2 uxtb r2, r2 + 8004602: 701a strb r2, [r3, #0] + 8004604: 6a3b ldr r3, [r7, #32] + 8004606: 09db lsrs r3, r3, #7 + 8004608: 623b str r3, [r7, #32] + 800460a: 6a3b ldr r3, [r7, #32] + 800460c: 2b7f cmp r3, #127 ; 0x7f + 800460e: d8f0 bhi.n 80045f2 + 8004610: 6a7b ldr r3, [r7, #36] ; 0x24 + 8004612: 1c5a adds r2, r3, #1 + 8004614: 627a str r2, [r7, #36] ; 0x24 + 8004616: 6a3a ldr r2, [r7, #32] + 8004618: b2d2 uxtb r2, r2 + 800461a: 701a strb r2, [r3, #0] + 800461c: 6a7b ldr r3, [r7, #36] ; 0x24 + 800461e: 607b str r3, [r7, #4] + ENCODE_U32(pPayload, _SYSVIEW_Globals.RAMBaseAddress); + 8004620: 687b ldr r3, [r7, #4] + 8004622: 61fb str r3, [r7, #28] + 8004624: 4b25 ldr r3, [pc, #148] ; (80046bc ) + 8004626: 691b ldr r3, [r3, #16] + 8004628: 61bb str r3, [r7, #24] + 800462a: e00b b.n 8004644 + 800462c: 69bb ldr r3, [r7, #24] + 800462e: b2da uxtb r2, r3 + 8004630: 69fb ldr r3, [r7, #28] + 8004632: 1c59 adds r1, r3, #1 + 8004634: 61f9 str r1, [r7, #28] + 8004636: f062 027f orn r2, r2, #127 ; 0x7f + 800463a: b2d2 uxtb r2, r2 + 800463c: 701a strb r2, [r3, #0] + 800463e: 69bb ldr r3, [r7, #24] + 8004640: 09db lsrs r3, r3, #7 + 8004642: 61bb str r3, [r7, #24] + 8004644: 69bb ldr r3, [r7, #24] + 8004646: 2b7f cmp r3, #127 ; 0x7f + 8004648: d8f0 bhi.n 800462c + 800464a: 69fb ldr r3, [r7, #28] + 800464c: 1c5a adds r2, r3, #1 + 800464e: 61fa str r2, [r7, #28] + 8004650: 69ba ldr r2, [r7, #24] + 8004652: b2d2 uxtb r2, r2 + 8004654: 701a strb r2, [r3, #0] + 8004656: 69fb ldr r3, [r7, #28] + 8004658: 607b str r3, [r7, #4] + ENCODE_U32(pPayload, SEGGER_SYSVIEW_ID_SHIFT); + 800465a: 687b ldr r3, [r7, #4] + 800465c: 617b str r3, [r7, #20] + 800465e: 2300 movs r3, #0 + 8004660: 613b str r3, [r7, #16] + 8004662: e00b b.n 800467c + 8004664: 693b ldr r3, [r7, #16] + 8004666: b2da uxtb r2, r3 + 8004668: 697b ldr r3, [r7, #20] + 800466a: 1c59 adds r1, r3, #1 + 800466c: 6179 str r1, [r7, #20] + 800466e: f062 027f orn r2, r2, #127 ; 0x7f + 8004672: b2d2 uxtb r2, r2 + 8004674: 701a strb r2, [r3, #0] + 8004676: 693b ldr r3, [r7, #16] + 8004678: 09db lsrs r3, r3, #7 + 800467a: 613b str r3, [r7, #16] + 800467c: 693b ldr r3, [r7, #16] + 800467e: 2b7f cmp r3, #127 ; 0x7f + 8004680: d8f0 bhi.n 8004664 + 8004682: 697b ldr r3, [r7, #20] + 8004684: 1c5a adds r2, r3, #1 + 8004686: 617a str r2, [r7, #20] + 8004688: 693a ldr r2, [r7, #16] + 800468a: b2d2 uxtb r2, r2 + 800468c: 701a strb r2, [r3, #0] + 800468e: 697b ldr r3, [r7, #20] + 8004690: 607b str r3, [r7, #4] + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_INIT); + 8004692: 2218 movs r2, #24 + 8004694: 6879 ldr r1, [r7, #4] + 8004696: 68b8 ldr r0, [r7, #8] + 8004698: f7ff faf4 bl 8003c84 <_SendPacket> + RECORD_END(); + 800469c: 68fb ldr r3, [r7, #12] + 800469e: f383 8811 msr BASEPRI, r3 + if (_SYSVIEW_Globals.pfSendSysDesc) { + 80046a2: 4b06 ldr r3, [pc, #24] ; (80046bc ) + 80046a4: 6a5b ldr r3, [r3, #36] ; 0x24 + 80046a6: 2b00 cmp r3, #0 + 80046a8: d002 beq.n 80046b0 + _SYSVIEW_Globals.pfSendSysDesc(); + 80046aa: 4b04 ldr r3, [pc, #16] ; (80046bc ) + 80046ac: 6a5b ldr r3, [r3, #36] ; 0x24 + 80046ae: 4798 blx r3 + } +} + 80046b0: bf00 nop + 80046b2: 3730 adds r7, #48 ; 0x30 + 80046b4: 46bd mov sp, r7 + 80046b6: bd80 pop {r7, pc} + 80046b8: 20015bf4 .word 0x20015bf4 + 80046bc: 20015bc4 .word 0x20015bc4 + +080046c0 : +* task priority and task name. +* +* Parameters +* pInfo - Pointer to task information to send. +*/ +void SEGGER_SYSVIEW_SendTaskInfo(const SEGGER_SYSVIEW_TASKINFO *pInfo) { + 80046c0: b580 push {r7, lr} + 80046c2: b092 sub sp, #72 ; 0x48 + 80046c4: af00 add r7, sp, #0 + 80046c6: 6078 str r0, [r7, #4] + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32 + 1 + 32); + 80046c8: f3ef 8311 mrs r3, BASEPRI + 80046cc: f04f 0120 mov.w r1, #32 + 80046d0: f381 8811 msr BASEPRI, r1 + 80046d4: 617b str r3, [r7, #20] + 80046d6: 486a ldr r0, [pc, #424] ; (8004880 ) + 80046d8: f7ff f9e9 bl 8003aae <_PreparePacket> + 80046dc: 6138 str r0, [r7, #16] + // + pPayload = pPayloadStart; + 80046de: 693b ldr r3, [r7, #16] + 80046e0: 60fb str r3, [r7, #12] + ENCODE_U32(pPayload, SHRINK_ID(pInfo->TaskID)); + 80046e2: 68fb ldr r3, [r7, #12] + 80046e4: 647b str r3, [r7, #68] ; 0x44 + 80046e6: 687b ldr r3, [r7, #4] + 80046e8: 681a ldr r2, [r3, #0] + 80046ea: 4b66 ldr r3, [pc, #408] ; (8004884 ) + 80046ec: 691b ldr r3, [r3, #16] + 80046ee: 1ad3 subs r3, r2, r3 + 80046f0: 643b str r3, [r7, #64] ; 0x40 + 80046f2: e00b b.n 800470c + 80046f4: 6c3b ldr r3, [r7, #64] ; 0x40 + 80046f6: b2da uxtb r2, r3 + 80046f8: 6c7b ldr r3, [r7, #68] ; 0x44 + 80046fa: 1c59 adds r1, r3, #1 + 80046fc: 6479 str r1, [r7, #68] ; 0x44 + 80046fe: f062 027f orn r2, r2, #127 ; 0x7f + 8004702: b2d2 uxtb r2, r2 + 8004704: 701a strb r2, [r3, #0] + 8004706: 6c3b ldr r3, [r7, #64] ; 0x40 + 8004708: 09db lsrs r3, r3, #7 + 800470a: 643b str r3, [r7, #64] ; 0x40 + 800470c: 6c3b ldr r3, [r7, #64] ; 0x40 + 800470e: 2b7f cmp r3, #127 ; 0x7f + 8004710: d8f0 bhi.n 80046f4 + 8004712: 6c7b ldr r3, [r7, #68] ; 0x44 + 8004714: 1c5a adds r2, r3, #1 + 8004716: 647a str r2, [r7, #68] ; 0x44 + 8004718: 6c3a ldr r2, [r7, #64] ; 0x40 + 800471a: b2d2 uxtb r2, r2 + 800471c: 701a strb r2, [r3, #0] + 800471e: 6c7b ldr r3, [r7, #68] ; 0x44 + 8004720: 60fb str r3, [r7, #12] + ENCODE_U32(pPayload, pInfo->Prio); + 8004722: 68fb ldr r3, [r7, #12] + 8004724: 63fb str r3, [r7, #60] ; 0x3c + 8004726: 687b ldr r3, [r7, #4] + 8004728: 689b ldr r3, [r3, #8] + 800472a: 63bb str r3, [r7, #56] ; 0x38 + 800472c: e00b b.n 8004746 + 800472e: 6bbb ldr r3, [r7, #56] ; 0x38 + 8004730: b2da uxtb r2, r3 + 8004732: 6bfb ldr r3, [r7, #60] ; 0x3c + 8004734: 1c59 adds r1, r3, #1 + 8004736: 63f9 str r1, [r7, #60] ; 0x3c + 8004738: f062 027f orn r2, r2, #127 ; 0x7f + 800473c: b2d2 uxtb r2, r2 + 800473e: 701a strb r2, [r3, #0] + 8004740: 6bbb ldr r3, [r7, #56] ; 0x38 + 8004742: 09db lsrs r3, r3, #7 + 8004744: 63bb str r3, [r7, #56] ; 0x38 + 8004746: 6bbb ldr r3, [r7, #56] ; 0x38 + 8004748: 2b7f cmp r3, #127 ; 0x7f + 800474a: d8f0 bhi.n 800472e + 800474c: 6bfb ldr r3, [r7, #60] ; 0x3c + 800474e: 1c5a adds r2, r3, #1 + 8004750: 63fa str r2, [r7, #60] ; 0x3c + 8004752: 6bba ldr r2, [r7, #56] ; 0x38 + 8004754: b2d2 uxtb r2, r2 + 8004756: 701a strb r2, [r3, #0] + 8004758: 6bfb ldr r3, [r7, #60] ; 0x3c + 800475a: 60fb str r3, [r7, #12] + pPayload = _EncodeStr(pPayload, pInfo->sName, 32); + 800475c: 687b ldr r3, [r7, #4] + 800475e: 685b ldr r3, [r3, #4] + 8004760: 2220 movs r2, #32 + 8004762: 4619 mov r1, r3 + 8004764: 68f8 ldr r0, [r7, #12] + 8004766: f7ff f955 bl 8003a14 <_EncodeStr> + 800476a: 60f8 str r0, [r7, #12] + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_TASK_INFO); + 800476c: 2209 movs r2, #9 + 800476e: 68f9 ldr r1, [r7, #12] + 8004770: 6938 ldr r0, [r7, #16] + 8004772: f7ff fa87 bl 8003c84 <_SendPacket> + // + pPayload = pPayloadStart; + 8004776: 693b ldr r3, [r7, #16] + 8004778: 60fb str r3, [r7, #12] + ENCODE_U32(pPayload, SHRINK_ID(pInfo->TaskID)); + 800477a: 68fb ldr r3, [r7, #12] + 800477c: 637b str r3, [r7, #52] ; 0x34 + 800477e: 687b ldr r3, [r7, #4] + 8004780: 681a ldr r2, [r3, #0] + 8004782: 4b40 ldr r3, [pc, #256] ; (8004884 ) + 8004784: 691b ldr r3, [r3, #16] + 8004786: 1ad3 subs r3, r2, r3 + 8004788: 633b str r3, [r7, #48] ; 0x30 + 800478a: e00b b.n 80047a4 + 800478c: 6b3b ldr r3, [r7, #48] ; 0x30 + 800478e: b2da uxtb r2, r3 + 8004790: 6b7b ldr r3, [r7, #52] ; 0x34 + 8004792: 1c59 adds r1, r3, #1 + 8004794: 6379 str r1, [r7, #52] ; 0x34 + 8004796: f062 027f orn r2, r2, #127 ; 0x7f + 800479a: b2d2 uxtb r2, r2 + 800479c: 701a strb r2, [r3, #0] + 800479e: 6b3b ldr r3, [r7, #48] ; 0x30 + 80047a0: 09db lsrs r3, r3, #7 + 80047a2: 633b str r3, [r7, #48] ; 0x30 + 80047a4: 6b3b ldr r3, [r7, #48] ; 0x30 + 80047a6: 2b7f cmp r3, #127 ; 0x7f + 80047a8: d8f0 bhi.n 800478c + 80047aa: 6b7b ldr r3, [r7, #52] ; 0x34 + 80047ac: 1c5a adds r2, r3, #1 + 80047ae: 637a str r2, [r7, #52] ; 0x34 + 80047b0: 6b3a ldr r2, [r7, #48] ; 0x30 + 80047b2: b2d2 uxtb r2, r2 + 80047b4: 701a strb r2, [r3, #0] + 80047b6: 6b7b ldr r3, [r7, #52] ; 0x34 + 80047b8: 60fb str r3, [r7, #12] + ENCODE_U32(pPayload, pInfo->StackBase); + 80047ba: 68fb ldr r3, [r7, #12] + 80047bc: 62fb str r3, [r7, #44] ; 0x2c + 80047be: 687b ldr r3, [r7, #4] + 80047c0: 68db ldr r3, [r3, #12] + 80047c2: 62bb str r3, [r7, #40] ; 0x28 + 80047c4: e00b b.n 80047de + 80047c6: 6abb ldr r3, [r7, #40] ; 0x28 + 80047c8: b2da uxtb r2, r3 + 80047ca: 6afb ldr r3, [r7, #44] ; 0x2c + 80047cc: 1c59 adds r1, r3, #1 + 80047ce: 62f9 str r1, [r7, #44] ; 0x2c + 80047d0: f062 027f orn r2, r2, #127 ; 0x7f + 80047d4: b2d2 uxtb r2, r2 + 80047d6: 701a strb r2, [r3, #0] + 80047d8: 6abb ldr r3, [r7, #40] ; 0x28 + 80047da: 09db lsrs r3, r3, #7 + 80047dc: 62bb str r3, [r7, #40] ; 0x28 + 80047de: 6abb ldr r3, [r7, #40] ; 0x28 + 80047e0: 2b7f cmp r3, #127 ; 0x7f + 80047e2: d8f0 bhi.n 80047c6 + 80047e4: 6afb ldr r3, [r7, #44] ; 0x2c + 80047e6: 1c5a adds r2, r3, #1 + 80047e8: 62fa str r2, [r7, #44] ; 0x2c + 80047ea: 6aba ldr r2, [r7, #40] ; 0x28 + 80047ec: b2d2 uxtb r2, r2 + 80047ee: 701a strb r2, [r3, #0] + 80047f0: 6afb ldr r3, [r7, #44] ; 0x2c + 80047f2: 60fb str r3, [r7, #12] + ENCODE_U32(pPayload, pInfo->StackSize); + 80047f4: 68fb ldr r3, [r7, #12] + 80047f6: 627b str r3, [r7, #36] ; 0x24 + 80047f8: 687b ldr r3, [r7, #4] + 80047fa: 691b ldr r3, [r3, #16] + 80047fc: 623b str r3, [r7, #32] + 80047fe: e00b b.n 8004818 + 8004800: 6a3b ldr r3, [r7, #32] + 8004802: b2da uxtb r2, r3 + 8004804: 6a7b ldr r3, [r7, #36] ; 0x24 + 8004806: 1c59 adds r1, r3, #1 + 8004808: 6279 str r1, [r7, #36] ; 0x24 + 800480a: f062 027f orn r2, r2, #127 ; 0x7f + 800480e: b2d2 uxtb r2, r2 + 8004810: 701a strb r2, [r3, #0] + 8004812: 6a3b ldr r3, [r7, #32] + 8004814: 09db lsrs r3, r3, #7 + 8004816: 623b str r3, [r7, #32] + 8004818: 6a3b ldr r3, [r7, #32] + 800481a: 2b7f cmp r3, #127 ; 0x7f + 800481c: d8f0 bhi.n 8004800 + 800481e: 6a7b ldr r3, [r7, #36] ; 0x24 + 8004820: 1c5a adds r2, r3, #1 + 8004822: 627a str r2, [r7, #36] ; 0x24 + 8004824: 6a3a ldr r2, [r7, #32] + 8004826: b2d2 uxtb r2, r2 + 8004828: 701a strb r2, [r3, #0] + 800482a: 6a7b ldr r3, [r7, #36] ; 0x24 + 800482c: 60fb str r3, [r7, #12] + ENCODE_U32(pPayload, 0); // Stack End, future use + 800482e: 68fb ldr r3, [r7, #12] + 8004830: 61fb str r3, [r7, #28] + 8004832: 2300 movs r3, #0 + 8004834: 61bb str r3, [r7, #24] + 8004836: e00b b.n 8004850 + 8004838: 69bb ldr r3, [r7, #24] + 800483a: b2da uxtb r2, r3 + 800483c: 69fb ldr r3, [r7, #28] + 800483e: 1c59 adds r1, r3, #1 + 8004840: 61f9 str r1, [r7, #28] + 8004842: f062 027f orn r2, r2, #127 ; 0x7f + 8004846: b2d2 uxtb r2, r2 + 8004848: 701a strb r2, [r3, #0] + 800484a: 69bb ldr r3, [r7, #24] + 800484c: 09db lsrs r3, r3, #7 + 800484e: 61bb str r3, [r7, #24] + 8004850: 69bb ldr r3, [r7, #24] + 8004852: 2b7f cmp r3, #127 ; 0x7f + 8004854: d8f0 bhi.n 8004838 + 8004856: 69fb ldr r3, [r7, #28] + 8004858: 1c5a adds r2, r3, #1 + 800485a: 61fa str r2, [r7, #28] + 800485c: 69ba ldr r2, [r7, #24] + 800485e: b2d2 uxtb r2, r2 + 8004860: 701a strb r2, [r3, #0] + 8004862: 69fb ldr r3, [r7, #28] + 8004864: 60fb str r3, [r7, #12] + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_STACK_INFO); + 8004866: 2215 movs r2, #21 + 8004868: 68f9 ldr r1, [r7, #12] + 800486a: 6938 ldr r0, [r7, #16] + 800486c: f7ff fa0a bl 8003c84 <_SendPacket> + RECORD_END(); + 8004870: 697b ldr r3, [r7, #20] + 8004872: f383 8811 msr BASEPRI, r3 +} + 8004876: bf00 nop + 8004878: 3748 adds r7, #72 ; 0x48 + 800487a: 46bd mov sp, r7 + 800487c: bd80 pop {r7, pc} + 800487e: bf00 nop + 8004880: 20015bf4 .word 0x20015bf4 + 8004884: 20015bc4 .word 0x20015bc4 + +08004888 : +* SEGGER_SYSVIEW_SendTaskList() +* +* Function description +* Send all tasks descriptors to the host. +*/ +void SEGGER_SYSVIEW_SendTaskList(void) { + 8004888: b580 push {r7, lr} + 800488a: af00 add r7, sp, #0 + if (_SYSVIEW_Globals.pOSAPI && _SYSVIEW_Globals.pOSAPI->pfSendTaskList) { + 800488c: 4b07 ldr r3, [pc, #28] ; (80048ac ) + 800488e: 6a1b ldr r3, [r3, #32] + 8004890: 2b00 cmp r3, #0 + 8004892: d008 beq.n 80048a6 + 8004894: 4b05 ldr r3, [pc, #20] ; (80048ac ) + 8004896: 6a1b ldr r3, [r3, #32] + 8004898: 685b ldr r3, [r3, #4] + 800489a: 2b00 cmp r3, #0 + 800489c: d003 beq.n 80048a6 + _SYSVIEW_Globals.pOSAPI->pfSendTaskList(); + 800489e: 4b03 ldr r3, [pc, #12] ; (80048ac ) + 80048a0: 6a1b ldr r3, [r3, #32] + 80048a2: 685b ldr r3, [r3, #4] + 80048a4: 4798 blx r3 + } +} + 80048a6: bf00 nop + 80048a8: bd80 pop {r7, pc} + 80048aa: bf00 nop + 80048ac: 20015bc4 .word 0x20015bc4 + +080048b0 : +* +* The Following items can be described in a system description string. +* Each item is identified by its identifier, followed by '=' and the value. +* Items are separated by ','. +*/ +void SEGGER_SYSVIEW_SendSysDesc(const char *sSysDesc) { + 80048b0: b580 push {r7, lr} + 80048b2: b086 sub sp, #24 + 80048b4: af00 add r7, sp, #0 + 80048b6: 6078 str r0, [r7, #4] + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 1 + SEGGER_SYSVIEW_MAX_STRING_LEN); + 80048b8: f3ef 8311 mrs r3, BASEPRI + 80048bc: f04f 0120 mov.w r1, #32 + 80048c0: f381 8811 msr BASEPRI, r1 + 80048c4: 617b str r3, [r7, #20] + 80048c6: 480b ldr r0, [pc, #44] ; (80048f4 ) + 80048c8: f7ff f8f1 bl 8003aae <_PreparePacket> + 80048cc: 6138 str r0, [r7, #16] + // + pPayload = _EncodeStr(pPayloadStart, sSysDesc, SEGGER_SYSVIEW_MAX_STRING_LEN); + 80048ce: 2280 movs r2, #128 ; 0x80 + 80048d0: 6879 ldr r1, [r7, #4] + 80048d2: 6938 ldr r0, [r7, #16] + 80048d4: f7ff f89e bl 8003a14 <_EncodeStr> + 80048d8: 60f8 str r0, [r7, #12] + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_SYSDESC); + 80048da: 220e movs r2, #14 + 80048dc: 68f9 ldr r1, [r7, #12] + 80048de: 6938 ldr r0, [r7, #16] + 80048e0: f7ff f9d0 bl 8003c84 <_SendPacket> + RECORD_END(); + 80048e4: 697b ldr r3, [r7, #20] + 80048e6: f383 8811 msr BASEPRI, r3 +} + 80048ea: bf00 nop + 80048ec: 3718 adds r7, #24 + 80048ee: 46bd mov sp, r7 + 80048f0: bd80 pop {r7, pc} + 80048f2: bf00 nop + 80048f4: 20015bf4 .word 0x20015bf4 + +080048f8 : +* +* Function description +* Formats and sends a SystemView Systime containing a single U64 or U32 +* parameter payload. +*/ +void SEGGER_SYSVIEW_RecordSystime(void) { + 80048f8: b590 push {r4, r7, lr} + 80048fa: b083 sub sp, #12 + 80048fc: af00 add r7, sp, #0 + U64 Systime; + + if (_SYSVIEW_Globals.pOSAPI && _SYSVIEW_Globals.pOSAPI->pfGetTime) { + 80048fe: 4b14 ldr r3, [pc, #80] ; (8004950 ) + 8004900: 6a1b ldr r3, [r3, #32] + 8004902: 2b00 cmp r3, #0 + 8004904: d019 beq.n 800493a + 8004906: 4b12 ldr r3, [pc, #72] ; (8004950 ) + 8004908: 6a1b ldr r3, [r3, #32] + 800490a: 681b ldr r3, [r3, #0] + 800490c: 2b00 cmp r3, #0 + 800490e: d014 beq.n 800493a + Systime = _SYSVIEW_Globals.pOSAPI->pfGetTime(); + 8004910: 4b0f ldr r3, [pc, #60] ; (8004950 ) + 8004912: 6a1b ldr r3, [r3, #32] + 8004914: 681b ldr r3, [r3, #0] + 8004916: 4798 blx r3 + 8004918: e9c7 0100 strd r0, r1, [r7] + SEGGER_SYSVIEW_RecordU32x2(SYSVIEW_EVTID_SYSTIME_US, + 800491c: 6838 ldr r0, [r7, #0] + (U32)(Systime), + (U32)(Systime >> 32)); + 800491e: e9d7 1200 ldrd r1, r2, [r7] + 8004922: f04f 0300 mov.w r3, #0 + 8004926: f04f 0400 mov.w r4, #0 + 800492a: 0013 movs r3, r2 + 800492c: 2400 movs r4, #0 + SEGGER_SYSVIEW_RecordU32x2(SYSVIEW_EVTID_SYSTIME_US, + 800492e: 461a mov r2, r3 + 8004930: 4601 mov r1, r0 + 8004932: 200d movs r0, #13 + 8004934: f7ff fb3a bl 8003fac + 8004938: e005 b.n 8004946 + } else { + SEGGER_SYSVIEW_RecordU32(SYSVIEW_EVTID_SYSTIME_CYCLES, SEGGER_SYSVIEW_GET_TIMESTAMP()); + 800493a: 4b06 ldr r3, [pc, #24] ; (8004954 ) + 800493c: 681b ldr r3, [r3, #0] + 800493e: 4619 mov r1, r3 + 8004940: 200c movs r0, #12 + 8004942: f7ff faf7 bl 8003f34 + } +} + 8004946: bf00 nop + 8004948: 370c adds r7, #12 + 800494a: 46bd mov sp, r7 + 800494c: bd90 pop {r4, r7, pc} + 800494e: bf00 nop + 8004950: 20015bc4 .word 0x20015bc4 + 8004954: e0001004 .word 0xe0001004 + +08004958 : +* +* Additional information +* Example packets sent +* 02 0F 50 // ISR(15) Enter. Timestamp is 80 (0x50) +*/ +void SEGGER_SYSVIEW_RecordEnterISR(void) { + 8004958: b580 push {r7, lr} + 800495a: b086 sub sp, #24 + 800495c: af00 add r7, sp, #0 + unsigned v; + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32); + 800495e: f3ef 8311 mrs r3, BASEPRI + 8004962: f04f 0120 mov.w r1, #32 + 8004966: f381 8811 msr BASEPRI, r1 + 800496a: 60fb str r3, [r7, #12] + 800496c: 4819 ldr r0, [pc, #100] ; (80049d4 ) + 800496e: f7ff f89e bl 8003aae <_PreparePacket> + 8004972: 60b8 str r0, [r7, #8] + // + pPayload = pPayloadStart; + 8004974: 68bb ldr r3, [r7, #8] + 8004976: 607b str r3, [r7, #4] + v = SEGGER_SYSVIEW_GET_INTERRUPT_ID(); + 8004978: 4b17 ldr r3, [pc, #92] ; (80049d8 ) + 800497a: 681b ldr r3, [r3, #0] + 800497c: f3c3 0308 ubfx r3, r3, #0, #9 + 8004980: 603b str r3, [r7, #0] + ENCODE_U32(pPayload, v); + 8004982: 687b ldr r3, [r7, #4] + 8004984: 617b str r3, [r7, #20] + 8004986: 683b ldr r3, [r7, #0] + 8004988: 613b str r3, [r7, #16] + 800498a: e00b b.n 80049a4 + 800498c: 693b ldr r3, [r7, #16] + 800498e: b2da uxtb r2, r3 + 8004990: 697b ldr r3, [r7, #20] + 8004992: 1c59 adds r1, r3, #1 + 8004994: 6179 str r1, [r7, #20] + 8004996: f062 027f orn r2, r2, #127 ; 0x7f + 800499a: b2d2 uxtb r2, r2 + 800499c: 701a strb r2, [r3, #0] + 800499e: 693b ldr r3, [r7, #16] + 80049a0: 09db lsrs r3, r3, #7 + 80049a2: 613b str r3, [r7, #16] + 80049a4: 693b ldr r3, [r7, #16] + 80049a6: 2b7f cmp r3, #127 ; 0x7f + 80049a8: d8f0 bhi.n 800498c + 80049aa: 697b ldr r3, [r7, #20] + 80049ac: 1c5a adds r2, r3, #1 + 80049ae: 617a str r2, [r7, #20] + 80049b0: 693a ldr r2, [r7, #16] + 80049b2: b2d2 uxtb r2, r2 + 80049b4: 701a strb r2, [r3, #0] + 80049b6: 697b ldr r3, [r7, #20] + 80049b8: 607b str r3, [r7, #4] + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_ISR_ENTER); + 80049ba: 2202 movs r2, #2 + 80049bc: 6879 ldr r1, [r7, #4] + 80049be: 68b8 ldr r0, [r7, #8] + 80049c0: f7ff f960 bl 8003c84 <_SendPacket> + RECORD_END(); + 80049c4: 68fb ldr r3, [r7, #12] + 80049c6: f383 8811 msr BASEPRI, r3 +} + 80049ca: bf00 nop + 80049cc: 3718 adds r7, #24 + 80049ce: 46bd mov sp, r7 + 80049d0: bd80 pop {r7, pc} + 80049d2: bf00 nop + 80049d4: 20015bf4 .word 0x20015bf4 + 80049d8: e000ed04 .word 0xe000ed04 + +080049dc : +* 03 // Max. packet len is 6 +* +* Example packets sent +* 03 20 // ISR Exit. Timestamp is 32 (0x20) +*/ +void SEGGER_SYSVIEW_RecordExitISR(void) { + 80049dc: b580 push {r7, lr} + 80049de: b082 sub sp, #8 + 80049e0: af00 add r7, sp, #0 + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE); + 80049e2: f3ef 8311 mrs r3, BASEPRI + 80049e6: f04f 0120 mov.w r1, #32 + 80049ea: f381 8811 msr BASEPRI, r1 + 80049ee: 607b str r3, [r7, #4] + 80049f0: 4807 ldr r0, [pc, #28] ; (8004a10 ) + 80049f2: f7ff f85c bl 8003aae <_PreparePacket> + 80049f6: 6038 str r0, [r7, #0] + // + _SendPacket(pPayloadStart, pPayloadStart, SYSVIEW_EVTID_ISR_EXIT); + 80049f8: 2203 movs r2, #3 + 80049fa: 6839 ldr r1, [r7, #0] + 80049fc: 6838 ldr r0, [r7, #0] + 80049fe: f7ff f941 bl 8003c84 <_SendPacket> + RECORD_END(); + 8004a02: 687b ldr r3, [r7, #4] + 8004a04: f383 8811 msr BASEPRI, r3 +} + 8004a08: bf00 nop + 8004a0a: 3708 adds r7, #8 + 8004a0c: 46bd mov sp, r7 + 8004a0e: bd80 pop {r7, pc} + 8004a10: 20015bf4 .word 0x20015bf4 + +08004a14 : +* 18 // Max. packet len is 6 +* +* Example packets sent +* 18 20 // ISR Exit to Scheduler. Timestamp is 32 (0x20) +*/ +void SEGGER_SYSVIEW_RecordExitISRToScheduler(void) { + 8004a14: b580 push {r7, lr} + 8004a16: b082 sub sp, #8 + 8004a18: af00 add r7, sp, #0 + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE); + 8004a1a: f3ef 8311 mrs r3, BASEPRI + 8004a1e: f04f 0120 mov.w r1, #32 + 8004a22: f381 8811 msr BASEPRI, r1 + 8004a26: 607b str r3, [r7, #4] + 8004a28: 4807 ldr r0, [pc, #28] ; (8004a48 ) + 8004a2a: f7ff f840 bl 8003aae <_PreparePacket> + 8004a2e: 6038 str r0, [r7, #0] + // + _SendPacket(pPayloadStart, pPayloadStart, SYSVIEW_EVTID_ISR_TO_SCHEDULER); + 8004a30: 2212 movs r2, #18 + 8004a32: 6839 ldr r1, [r7, #0] + 8004a34: 6838 ldr r0, [r7, #0] + 8004a36: f7ff f925 bl 8003c84 <_SendPacket> + RECORD_END(); + 8004a3a: 687b ldr r3, [r7, #4] + 8004a3c: f383 8811 msr BASEPRI, r3 +} + 8004a40: bf00 nop + 8004a42: 3708 adds r7, #8 + 8004a44: 46bd mov sp, r7 + 8004a46: bd80 pop {r7, pc} + 8004a48: 20015bf4 .word 0x20015bf4 + +08004a4c : +* SEGGER_SYSVIEW_OnIdle() +* +* Function description +* Record an Idle event. +*/ +void SEGGER_SYSVIEW_OnIdle(void) { + 8004a4c: b580 push {r7, lr} + 8004a4e: b082 sub sp, #8 + 8004a50: af00 add r7, sp, #0 + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE); + 8004a52: f3ef 8311 mrs r3, BASEPRI + 8004a56: f04f 0120 mov.w r1, #32 + 8004a5a: f381 8811 msr BASEPRI, r1 + 8004a5e: 607b str r3, [r7, #4] + 8004a60: 4807 ldr r0, [pc, #28] ; (8004a80 ) + 8004a62: f7ff f824 bl 8003aae <_PreparePacket> + 8004a66: 6038 str r0, [r7, #0] + // + _SendPacket(pPayloadStart, pPayloadStart, SYSVIEW_EVTID_IDLE); + 8004a68: 2211 movs r2, #17 + 8004a6a: 6839 ldr r1, [r7, #0] + 8004a6c: 6838 ldr r0, [r7, #0] + 8004a6e: f7ff f909 bl 8003c84 <_SendPacket> + RECORD_END(); + 8004a72: 687b ldr r3, [r7, #4] + 8004a74: f383 8811 msr BASEPRI, r3 +} + 8004a78: bf00 nop + 8004a7a: 3708 adds r7, #8 + 8004a7c: 46bd mov sp, r7 + 8004a7e: bd80 pop {r7, pc} + 8004a80: 20015bf4 .word 0x20015bf4 + +08004a84 : +* to creating a task in the OS. +* +* Parameters +* TaskId - Task ID of created task. +*/ +void SEGGER_SYSVIEW_OnTaskCreate(U32 TaskId) { + 8004a84: b580 push {r7, lr} + 8004a86: b088 sub sp, #32 + 8004a88: af00 add r7, sp, #0 + 8004a8a: 6078 str r0, [r7, #4] + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32); + 8004a8c: f3ef 8311 mrs r3, BASEPRI + 8004a90: f04f 0120 mov.w r1, #32 + 8004a94: f381 8811 msr BASEPRI, r1 + 8004a98: 617b str r3, [r7, #20] + 8004a9a: 4819 ldr r0, [pc, #100] ; (8004b00 ) + 8004a9c: f7ff f807 bl 8003aae <_PreparePacket> + 8004aa0: 6138 str r0, [r7, #16] + // + pPayload = pPayloadStart; + 8004aa2: 693b ldr r3, [r7, #16] + 8004aa4: 60fb str r3, [r7, #12] + TaskId = SHRINK_ID(TaskId); + 8004aa6: 4b17 ldr r3, [pc, #92] ; (8004b04 ) + 8004aa8: 691b ldr r3, [r3, #16] + 8004aaa: 687a ldr r2, [r7, #4] + 8004aac: 1ad3 subs r3, r2, r3 + 8004aae: 607b str r3, [r7, #4] + ENCODE_U32(pPayload, TaskId); + 8004ab0: 68fb ldr r3, [r7, #12] + 8004ab2: 61fb str r3, [r7, #28] + 8004ab4: 687b ldr r3, [r7, #4] + 8004ab6: 61bb str r3, [r7, #24] + 8004ab8: e00b b.n 8004ad2 + 8004aba: 69bb ldr r3, [r7, #24] + 8004abc: b2da uxtb r2, r3 + 8004abe: 69fb ldr r3, [r7, #28] + 8004ac0: 1c59 adds r1, r3, #1 + 8004ac2: 61f9 str r1, [r7, #28] + 8004ac4: f062 027f orn r2, r2, #127 ; 0x7f + 8004ac8: b2d2 uxtb r2, r2 + 8004aca: 701a strb r2, [r3, #0] + 8004acc: 69bb ldr r3, [r7, #24] + 8004ace: 09db lsrs r3, r3, #7 + 8004ad0: 61bb str r3, [r7, #24] + 8004ad2: 69bb ldr r3, [r7, #24] + 8004ad4: 2b7f cmp r3, #127 ; 0x7f + 8004ad6: d8f0 bhi.n 8004aba + 8004ad8: 69fb ldr r3, [r7, #28] + 8004ada: 1c5a adds r2, r3, #1 + 8004adc: 61fa str r2, [r7, #28] + 8004ade: 69ba ldr r2, [r7, #24] + 8004ae0: b2d2 uxtb r2, r2 + 8004ae2: 701a strb r2, [r3, #0] + 8004ae4: 69fb ldr r3, [r7, #28] + 8004ae6: 60fb str r3, [r7, #12] + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_TASK_CREATE); + 8004ae8: 2208 movs r2, #8 + 8004aea: 68f9 ldr r1, [r7, #12] + 8004aec: 6938 ldr r0, [r7, #16] + 8004aee: f7ff f8c9 bl 8003c84 <_SendPacket> + RECORD_END(); + 8004af2: 697b ldr r3, [r7, #20] + 8004af4: f383 8811 msr BASEPRI, r3 +} + 8004af8: bf00 nop + 8004afa: 3720 adds r7, #32 + 8004afc: 46bd mov sp, r7 + 8004afe: bd80 pop {r7, pc} + 8004b00: 20015bf4 .word 0x20015bf4 + 8004b04: 20015bc4 .word 0x20015bc4 + +08004b08 : +* when it is ready to execute. +* +* Parameters +* TaskId - Task ID of task that started to execute. +*/ +void SEGGER_SYSVIEW_OnTaskStartExec(U32 TaskId) { + 8004b08: b580 push {r7, lr} + 8004b0a: b088 sub sp, #32 + 8004b0c: af00 add r7, sp, #0 + 8004b0e: 6078 str r0, [r7, #4] + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32); + 8004b10: f3ef 8311 mrs r3, BASEPRI + 8004b14: f04f 0120 mov.w r1, #32 + 8004b18: f381 8811 msr BASEPRI, r1 + 8004b1c: 617b str r3, [r7, #20] + 8004b1e: 4819 ldr r0, [pc, #100] ; (8004b84 ) + 8004b20: f7fe ffc5 bl 8003aae <_PreparePacket> + 8004b24: 6138 str r0, [r7, #16] + // + pPayload = pPayloadStart; + 8004b26: 693b ldr r3, [r7, #16] + 8004b28: 60fb str r3, [r7, #12] + TaskId = SHRINK_ID(TaskId); + 8004b2a: 4b17 ldr r3, [pc, #92] ; (8004b88 ) + 8004b2c: 691b ldr r3, [r3, #16] + 8004b2e: 687a ldr r2, [r7, #4] + 8004b30: 1ad3 subs r3, r2, r3 + 8004b32: 607b str r3, [r7, #4] + ENCODE_U32(pPayload, TaskId); + 8004b34: 68fb ldr r3, [r7, #12] + 8004b36: 61fb str r3, [r7, #28] + 8004b38: 687b ldr r3, [r7, #4] + 8004b3a: 61bb str r3, [r7, #24] + 8004b3c: e00b b.n 8004b56 + 8004b3e: 69bb ldr r3, [r7, #24] + 8004b40: b2da uxtb r2, r3 + 8004b42: 69fb ldr r3, [r7, #28] + 8004b44: 1c59 adds r1, r3, #1 + 8004b46: 61f9 str r1, [r7, #28] + 8004b48: f062 027f orn r2, r2, #127 ; 0x7f + 8004b4c: b2d2 uxtb r2, r2 + 8004b4e: 701a strb r2, [r3, #0] + 8004b50: 69bb ldr r3, [r7, #24] + 8004b52: 09db lsrs r3, r3, #7 + 8004b54: 61bb str r3, [r7, #24] + 8004b56: 69bb ldr r3, [r7, #24] + 8004b58: 2b7f cmp r3, #127 ; 0x7f + 8004b5a: d8f0 bhi.n 8004b3e + 8004b5c: 69fb ldr r3, [r7, #28] + 8004b5e: 1c5a adds r2, r3, #1 + 8004b60: 61fa str r2, [r7, #28] + 8004b62: 69ba ldr r2, [r7, #24] + 8004b64: b2d2 uxtb r2, r2 + 8004b66: 701a strb r2, [r3, #0] + 8004b68: 69fb ldr r3, [r7, #28] + 8004b6a: 60fb str r3, [r7, #12] + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_TASK_START_EXEC); + 8004b6c: 2204 movs r2, #4 + 8004b6e: 68f9 ldr r1, [r7, #12] + 8004b70: 6938 ldr r0, [r7, #16] + 8004b72: f7ff f887 bl 8003c84 <_SendPacket> + RECORD_END(); + 8004b76: 697b ldr r3, [r7, #20] + 8004b78: f383 8811 msr BASEPRI, r3 +} + 8004b7c: bf00 nop + 8004b7e: 3720 adds r7, #32 + 8004b80: 46bd mov sp, r7 + 8004b82: bd80 pop {r7, pc} + 8004b84: 20015bf4 .word 0x20015bf4 + 8004b88: 20015bc4 .word 0x20015bc4 + +08004b8c : +* Record a Task Start Ready event. +* +* Parameters +* TaskId - Task ID of task that started to execute. +*/ +void SEGGER_SYSVIEW_OnTaskStartReady(U32 TaskId) { + 8004b8c: b580 push {r7, lr} + 8004b8e: b088 sub sp, #32 + 8004b90: af00 add r7, sp, #0 + 8004b92: 6078 str r0, [r7, #4] + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32); + 8004b94: f3ef 8311 mrs r3, BASEPRI + 8004b98: f04f 0120 mov.w r1, #32 + 8004b9c: f381 8811 msr BASEPRI, r1 + 8004ba0: 617b str r3, [r7, #20] + 8004ba2: 4819 ldr r0, [pc, #100] ; (8004c08 ) + 8004ba4: f7fe ff83 bl 8003aae <_PreparePacket> + 8004ba8: 6138 str r0, [r7, #16] + // + pPayload = pPayloadStart; + 8004baa: 693b ldr r3, [r7, #16] + 8004bac: 60fb str r3, [r7, #12] + TaskId = SHRINK_ID(TaskId); + 8004bae: 4b17 ldr r3, [pc, #92] ; (8004c0c ) + 8004bb0: 691b ldr r3, [r3, #16] + 8004bb2: 687a ldr r2, [r7, #4] + 8004bb4: 1ad3 subs r3, r2, r3 + 8004bb6: 607b str r3, [r7, #4] + ENCODE_U32(pPayload, TaskId); + 8004bb8: 68fb ldr r3, [r7, #12] + 8004bba: 61fb str r3, [r7, #28] + 8004bbc: 687b ldr r3, [r7, #4] + 8004bbe: 61bb str r3, [r7, #24] + 8004bc0: e00b b.n 8004bda + 8004bc2: 69bb ldr r3, [r7, #24] + 8004bc4: b2da uxtb r2, r3 + 8004bc6: 69fb ldr r3, [r7, #28] + 8004bc8: 1c59 adds r1, r3, #1 + 8004bca: 61f9 str r1, [r7, #28] + 8004bcc: f062 027f orn r2, r2, #127 ; 0x7f + 8004bd0: b2d2 uxtb r2, r2 + 8004bd2: 701a strb r2, [r3, #0] + 8004bd4: 69bb ldr r3, [r7, #24] + 8004bd6: 09db lsrs r3, r3, #7 + 8004bd8: 61bb str r3, [r7, #24] + 8004bda: 69bb ldr r3, [r7, #24] + 8004bdc: 2b7f cmp r3, #127 ; 0x7f + 8004bde: d8f0 bhi.n 8004bc2 + 8004be0: 69fb ldr r3, [r7, #28] + 8004be2: 1c5a adds r2, r3, #1 + 8004be4: 61fa str r2, [r7, #28] + 8004be6: 69ba ldr r2, [r7, #24] + 8004be8: b2d2 uxtb r2, r2 + 8004bea: 701a strb r2, [r3, #0] + 8004bec: 69fb ldr r3, [r7, #28] + 8004bee: 60fb str r3, [r7, #12] + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_TASK_START_READY); + 8004bf0: 2206 movs r2, #6 + 8004bf2: 68f9 ldr r1, [r7, #12] + 8004bf4: 6938 ldr r0, [r7, #16] + 8004bf6: f7ff f845 bl 8003c84 <_SendPacket> + RECORD_END(); + 8004bfa: 697b ldr r3, [r7, #20] + 8004bfc: f383 8811 msr BASEPRI, r3 +} + 8004c00: bf00 nop + 8004c02: 3720 adds r7, #32 + 8004c04: 46bd mov sp, r7 + 8004c06: bd80 pop {r7, pc} + 8004c08: 20015bf4 .word 0x20015bf4 + 8004c0c: 20015bc4 .word 0x20015bc4 + +08004c10 : +* +* Parameters +* TaskId - Task ID of task that completed execution. +* Cause - Reason for task to stop (i.e. Idle/Sleep) +*/ +void SEGGER_SYSVIEW_OnTaskStopReady(U32 TaskId, unsigned int Cause) { + 8004c10: b580 push {r7, lr} + 8004c12: b08a sub sp, #40 ; 0x28 + 8004c14: af00 add r7, sp, #0 + 8004c16: 6078 str r0, [r7, #4] + 8004c18: 6039 str r1, [r7, #0] + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2 * SEGGER_SYSVIEW_QUANTA_U32); + 8004c1a: f3ef 8311 mrs r3, BASEPRI + 8004c1e: f04f 0120 mov.w r1, #32 + 8004c22: f381 8811 msr BASEPRI, r1 + 8004c26: 617b str r3, [r7, #20] + 8004c28: 4827 ldr r0, [pc, #156] ; (8004cc8 ) + 8004c2a: f7fe ff40 bl 8003aae <_PreparePacket> + 8004c2e: 6138 str r0, [r7, #16] + // + pPayload = pPayloadStart; + 8004c30: 693b ldr r3, [r7, #16] + 8004c32: 60fb str r3, [r7, #12] + TaskId = SHRINK_ID(TaskId); + 8004c34: 4b25 ldr r3, [pc, #148] ; (8004ccc ) + 8004c36: 691b ldr r3, [r3, #16] + 8004c38: 687a ldr r2, [r7, #4] + 8004c3a: 1ad3 subs r3, r2, r3 + 8004c3c: 607b str r3, [r7, #4] + ENCODE_U32(pPayload, TaskId); + 8004c3e: 68fb ldr r3, [r7, #12] + 8004c40: 627b str r3, [r7, #36] ; 0x24 + 8004c42: 687b ldr r3, [r7, #4] + 8004c44: 623b str r3, [r7, #32] + 8004c46: e00b b.n 8004c60 + 8004c48: 6a3b ldr r3, [r7, #32] + 8004c4a: b2da uxtb r2, r3 + 8004c4c: 6a7b ldr r3, [r7, #36] ; 0x24 + 8004c4e: 1c59 adds r1, r3, #1 + 8004c50: 6279 str r1, [r7, #36] ; 0x24 + 8004c52: f062 027f orn r2, r2, #127 ; 0x7f + 8004c56: b2d2 uxtb r2, r2 + 8004c58: 701a strb r2, [r3, #0] + 8004c5a: 6a3b ldr r3, [r7, #32] + 8004c5c: 09db lsrs r3, r3, #7 + 8004c5e: 623b str r3, [r7, #32] + 8004c60: 6a3b ldr r3, [r7, #32] + 8004c62: 2b7f cmp r3, #127 ; 0x7f + 8004c64: d8f0 bhi.n 8004c48 + 8004c66: 6a7b ldr r3, [r7, #36] ; 0x24 + 8004c68: 1c5a adds r2, r3, #1 + 8004c6a: 627a str r2, [r7, #36] ; 0x24 + 8004c6c: 6a3a ldr r2, [r7, #32] + 8004c6e: b2d2 uxtb r2, r2 + 8004c70: 701a strb r2, [r3, #0] + 8004c72: 6a7b ldr r3, [r7, #36] ; 0x24 + 8004c74: 60fb str r3, [r7, #12] + ENCODE_U32(pPayload, Cause); + 8004c76: 68fb ldr r3, [r7, #12] + 8004c78: 61fb str r3, [r7, #28] + 8004c7a: 683b ldr r3, [r7, #0] + 8004c7c: 61bb str r3, [r7, #24] + 8004c7e: e00b b.n 8004c98 + 8004c80: 69bb ldr r3, [r7, #24] + 8004c82: b2da uxtb r2, r3 + 8004c84: 69fb ldr r3, [r7, #28] + 8004c86: 1c59 adds r1, r3, #1 + 8004c88: 61f9 str r1, [r7, #28] + 8004c8a: f062 027f orn r2, r2, #127 ; 0x7f + 8004c8e: b2d2 uxtb r2, r2 + 8004c90: 701a strb r2, [r3, #0] + 8004c92: 69bb ldr r3, [r7, #24] + 8004c94: 09db lsrs r3, r3, #7 + 8004c96: 61bb str r3, [r7, #24] + 8004c98: 69bb ldr r3, [r7, #24] + 8004c9a: 2b7f cmp r3, #127 ; 0x7f + 8004c9c: d8f0 bhi.n 8004c80 + 8004c9e: 69fb ldr r3, [r7, #28] + 8004ca0: 1c5a adds r2, r3, #1 + 8004ca2: 61fa str r2, [r7, #28] + 8004ca4: 69ba ldr r2, [r7, #24] + 8004ca6: b2d2 uxtb r2, r2 + 8004ca8: 701a strb r2, [r3, #0] + 8004caa: 69fb ldr r3, [r7, #28] + 8004cac: 60fb str r3, [r7, #12] + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_TASK_STOP_READY); + 8004cae: 2207 movs r2, #7 + 8004cb0: 68f9 ldr r1, [r7, #12] + 8004cb2: 6938 ldr r0, [r7, #16] + 8004cb4: f7fe ffe6 bl 8003c84 <_SendPacket> + RECORD_END(); + 8004cb8: 697b ldr r3, [r7, #20] + 8004cba: f383 8811 msr BASEPRI, r3 +} + 8004cbe: bf00 nop + 8004cc0: 3728 adds r7, #40 ; 0x28 + 8004cc2: 46bd mov sp, r7 + 8004cc4: bd80 pop {r7, pc} + 8004cc6: bf00 nop + 8004cc8: 20015bf4 .word 0x20015bf4 + 8004ccc: 20015bc4 .word 0x20015bc4 + +08004cd0 : +* SEGGER_SYSVIEW_ID_BASE: Lowest Id reported by the application. +* (i.e. 0x20000000 when all Ids are an address in this RAM) +* SEGGER_SYSVIEW_ID_SHIFT: Number of bits to shift the Id to +* save bandwidth. (i.e. 2 when Ids are 4 byte aligned) +*/ +U32 SEGGER_SYSVIEW_ShrinkId(U32 Id) { + 8004cd0: b480 push {r7} + 8004cd2: b083 sub sp, #12 + 8004cd4: af00 add r7, sp, #0 + 8004cd6: 6078 str r0, [r7, #4] + return SHRINK_ID(Id); + 8004cd8: 4b04 ldr r3, [pc, #16] ; (8004cec ) + 8004cda: 691b ldr r3, [r3, #16] + 8004cdc: 687a ldr r2, [r7, #4] + 8004cde: 1ad3 subs r3, r2, r3 +} + 8004ce0: 4618 mov r0, r3 + 8004ce2: 370c adds r7, #12 + 8004ce4: 46bd mov sp, r7 + 8004ce6: f85d 7b04 ldr.w r7, [sp], #4 + 8004cea: 4770 bx lr + 8004cec: 20015bc4 .word 0x20015bc4 + +08004cf0 : +* Sends the information of a registered module to the host. +* +* Parameters +* ModuleId - Id of the requested module. +*/ +void SEGGER_SYSVIEW_SendModule(U8 ModuleId) { + 8004cf0: b580 push {r7, lr} + 8004cf2: b08c sub sp, #48 ; 0x30 + 8004cf4: af00 add r7, sp, #0 + 8004cf6: 4603 mov r3, r0 + 8004cf8: 71fb strb r3, [r7, #7] + SEGGER_SYSVIEW_MODULE* pModule; + U32 n; + + if (_pFirstModule != 0) { + 8004cfa: 4b3b ldr r3, [pc, #236] ; (8004de8 ) + 8004cfc: 681b ldr r3, [r3, #0] + 8004cfe: 2b00 cmp r3, #0 + 8004d00: d06d beq.n 8004dde + pModule = _pFirstModule; + 8004d02: 4b39 ldr r3, [pc, #228] ; (8004de8 ) + 8004d04: 681b ldr r3, [r3, #0] + 8004d06: 62fb str r3, [r7, #44] ; 0x2c + for (n = 0; n < ModuleId; n++) { + 8004d08: 2300 movs r3, #0 + 8004d0a: 62bb str r3, [r7, #40] ; 0x28 + 8004d0c: e008 b.n 8004d20 + pModule = pModule->pNext; + 8004d0e: 6afb ldr r3, [r7, #44] ; 0x2c + 8004d10: 691b ldr r3, [r3, #16] + 8004d12: 62fb str r3, [r7, #44] ; 0x2c + if (pModule == 0) { + 8004d14: 6afb ldr r3, [r7, #44] ; 0x2c + 8004d16: 2b00 cmp r3, #0 + 8004d18: d007 beq.n 8004d2a + for (n = 0; n < ModuleId; n++) { + 8004d1a: 6abb ldr r3, [r7, #40] ; 0x28 + 8004d1c: 3301 adds r3, #1 + 8004d1e: 62bb str r3, [r7, #40] ; 0x28 + 8004d20: 79fb ldrb r3, [r7, #7] + 8004d22: 6aba ldr r2, [r7, #40] ; 0x28 + 8004d24: 429a cmp r2, r3 + 8004d26: d3f2 bcc.n 8004d0e + 8004d28: e000 b.n 8004d2c + break; + 8004d2a: bf00 nop + } + } + if (pModule != 0) { + 8004d2c: 6afb ldr r3, [r7, #44] ; 0x2c + 8004d2e: 2b00 cmp r3, #0 + 8004d30: d055 beq.n 8004dde + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2 * SEGGER_SYSVIEW_QUANTA_U32 + 1 + SEGGER_SYSVIEW_MAX_STRING_LEN); + 8004d32: f3ef 8311 mrs r3, BASEPRI + 8004d36: f04f 0120 mov.w r1, #32 + 8004d3a: f381 8811 msr BASEPRI, r1 + 8004d3e: 617b str r3, [r7, #20] + 8004d40: 482a ldr r0, [pc, #168] ; (8004dec ) + 8004d42: f7fe feb4 bl 8003aae <_PreparePacket> + 8004d46: 6138 str r0, [r7, #16] + // + pPayload = pPayloadStart; + 8004d48: 693b ldr r3, [r7, #16] + 8004d4a: 60fb str r3, [r7, #12] + // + // Send module description + // Send event offset and number of events + // + ENCODE_U32(pPayload, ModuleId); + 8004d4c: 68fb ldr r3, [r7, #12] + 8004d4e: 627b str r3, [r7, #36] ; 0x24 + 8004d50: 79fb ldrb r3, [r7, #7] + 8004d52: 623b str r3, [r7, #32] + 8004d54: e00b b.n 8004d6e + 8004d56: 6a3b ldr r3, [r7, #32] + 8004d58: b2da uxtb r2, r3 + 8004d5a: 6a7b ldr r3, [r7, #36] ; 0x24 + 8004d5c: 1c59 adds r1, r3, #1 + 8004d5e: 6279 str r1, [r7, #36] ; 0x24 + 8004d60: f062 027f orn r2, r2, #127 ; 0x7f + 8004d64: b2d2 uxtb r2, r2 + 8004d66: 701a strb r2, [r3, #0] + 8004d68: 6a3b ldr r3, [r7, #32] + 8004d6a: 09db lsrs r3, r3, #7 + 8004d6c: 623b str r3, [r7, #32] + 8004d6e: 6a3b ldr r3, [r7, #32] + 8004d70: 2b7f cmp r3, #127 ; 0x7f + 8004d72: d8f0 bhi.n 8004d56 + 8004d74: 6a7b ldr r3, [r7, #36] ; 0x24 + 8004d76: 1c5a adds r2, r3, #1 + 8004d78: 627a str r2, [r7, #36] ; 0x24 + 8004d7a: 6a3a ldr r2, [r7, #32] + 8004d7c: b2d2 uxtb r2, r2 + 8004d7e: 701a strb r2, [r3, #0] + 8004d80: 6a7b ldr r3, [r7, #36] ; 0x24 + 8004d82: 60fb str r3, [r7, #12] + ENCODE_U32(pPayload, (pModule->EventOffset)); + 8004d84: 68fb ldr r3, [r7, #12] + 8004d86: 61fb str r3, [r7, #28] + 8004d88: 6afb ldr r3, [r7, #44] ; 0x2c + 8004d8a: 689b ldr r3, [r3, #8] + 8004d8c: 61bb str r3, [r7, #24] + 8004d8e: e00b b.n 8004da8 + 8004d90: 69bb ldr r3, [r7, #24] + 8004d92: b2da uxtb r2, r3 + 8004d94: 69fb ldr r3, [r7, #28] + 8004d96: 1c59 adds r1, r3, #1 + 8004d98: 61f9 str r1, [r7, #28] + 8004d9a: f062 027f orn r2, r2, #127 ; 0x7f + 8004d9e: b2d2 uxtb r2, r2 + 8004da0: 701a strb r2, [r3, #0] + 8004da2: 69bb ldr r3, [r7, #24] + 8004da4: 09db lsrs r3, r3, #7 + 8004da6: 61bb str r3, [r7, #24] + 8004da8: 69bb ldr r3, [r7, #24] + 8004daa: 2b7f cmp r3, #127 ; 0x7f + 8004dac: d8f0 bhi.n 8004d90 + 8004dae: 69fb ldr r3, [r7, #28] + 8004db0: 1c5a adds r2, r3, #1 + 8004db2: 61fa str r2, [r7, #28] + 8004db4: 69ba ldr r2, [r7, #24] + 8004db6: b2d2 uxtb r2, r2 + 8004db8: 701a strb r2, [r3, #0] + 8004dba: 69fb ldr r3, [r7, #28] + 8004dbc: 60fb str r3, [r7, #12] + pPayload = _EncodeStr(pPayload, pModule->sModule, SEGGER_SYSVIEW_MAX_STRING_LEN); + 8004dbe: 6afb ldr r3, [r7, #44] ; 0x2c + 8004dc0: 681b ldr r3, [r3, #0] + 8004dc2: 2280 movs r2, #128 ; 0x80 + 8004dc4: 4619 mov r1, r3 + 8004dc6: 68f8 ldr r0, [r7, #12] + 8004dc8: f7fe fe24 bl 8003a14 <_EncodeStr> + 8004dcc: 60f8 str r0, [r7, #12] + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_MODULEDESC); + 8004dce: 2216 movs r2, #22 + 8004dd0: 68f9 ldr r1, [r7, #12] + 8004dd2: 6938 ldr r0, [r7, #16] + 8004dd4: f7fe ff56 bl 8003c84 <_SendPacket> + RECORD_END(); + 8004dd8: 697b ldr r3, [r7, #20] + 8004dda: f383 8811 msr BASEPRI, r3 + } + } +} + 8004dde: bf00 nop + 8004de0: 3730 adds r7, #48 ; 0x30 + 8004de2: 46bd mov sp, r7 + 8004de4: bd80 pop {r7, pc} + 8004de6: bf00 nop + 8004de8: 20015bec .word 0x20015bec + 8004dec: 20015bf4 .word 0x20015bf4 + +08004df0 : +* +* Function description +* Triggers a send of the registered module descriptions. +* +*/ +void SEGGER_SYSVIEW_SendModuleDescription(void) { + 8004df0: b580 push {r7, lr} + 8004df2: b082 sub sp, #8 + 8004df4: af00 add r7, sp, #0 + SEGGER_SYSVIEW_MODULE* pModule; + + if (_pFirstModule != 0) { + 8004df6: 4b0c ldr r3, [pc, #48] ; (8004e28 ) + 8004df8: 681b ldr r3, [r3, #0] + 8004dfa: 2b00 cmp r3, #0 + 8004dfc: d00f beq.n 8004e1e + pModule = _pFirstModule; + 8004dfe: 4b0a ldr r3, [pc, #40] ; (8004e28 ) + 8004e00: 681b ldr r3, [r3, #0] + 8004e02: 607b str r3, [r7, #4] + do { + if (pModule->pfSendModuleDesc) { + 8004e04: 687b ldr r3, [r7, #4] + 8004e06: 68db ldr r3, [r3, #12] + 8004e08: 2b00 cmp r3, #0 + 8004e0a: d002 beq.n 8004e12 + pModule->pfSendModuleDesc(); + 8004e0c: 687b ldr r3, [r7, #4] + 8004e0e: 68db ldr r3, [r3, #12] + 8004e10: 4798 blx r3 + } + pModule = pModule->pNext; + 8004e12: 687b ldr r3, [r7, #4] + 8004e14: 691b ldr r3, [r3, #16] + 8004e16: 607b str r3, [r7, #4] + } while (pModule); + 8004e18: 687b ldr r3, [r7, #4] + 8004e1a: 2b00 cmp r3, #0 + 8004e1c: d1f2 bne.n 8004e04 + } +} + 8004e1e: bf00 nop + 8004e20: 3708 adds r7, #8 + 8004e22: 46bd mov sp, r7 + 8004e24: bd80 pop {r7, pc} + 8004e26: bf00 nop + 8004e28: 20015bec .word 0x20015bec + +08004e2c : +* SEGGER_SYSVIEW_SendNumModules() +* +* Function description +* Send the number of registered modules to the host. +*/ +void SEGGER_SYSVIEW_SendNumModules(void) { + 8004e2c: b580 push {r7, lr} + 8004e2e: b086 sub sp, #24 + 8004e30: af00 add r7, sp, #0 + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2*SEGGER_SYSVIEW_QUANTA_U32); + 8004e32: f3ef 8311 mrs r3, BASEPRI + 8004e36: f04f 0120 mov.w r1, #32 + 8004e3a: f381 8811 msr BASEPRI, r1 + 8004e3e: 60fb str r3, [r7, #12] + 8004e40: 4817 ldr r0, [pc, #92] ; (8004ea0 ) + 8004e42: f7fe fe34 bl 8003aae <_PreparePacket> + 8004e46: 60b8 str r0, [r7, #8] + pPayload = pPayloadStart; + 8004e48: 68bb ldr r3, [r7, #8] + 8004e4a: 607b str r3, [r7, #4] + ENCODE_U32(pPayload, _NumModules); + 8004e4c: 687b ldr r3, [r7, #4] + 8004e4e: 617b str r3, [r7, #20] + 8004e50: 4b14 ldr r3, [pc, #80] ; (8004ea4 ) + 8004e52: 781b ldrb r3, [r3, #0] + 8004e54: 613b str r3, [r7, #16] + 8004e56: e00b b.n 8004e70 + 8004e58: 693b ldr r3, [r7, #16] + 8004e5a: b2da uxtb r2, r3 + 8004e5c: 697b ldr r3, [r7, #20] + 8004e5e: 1c59 adds r1, r3, #1 + 8004e60: 6179 str r1, [r7, #20] + 8004e62: f062 027f orn r2, r2, #127 ; 0x7f + 8004e66: b2d2 uxtb r2, r2 + 8004e68: 701a strb r2, [r3, #0] + 8004e6a: 693b ldr r3, [r7, #16] + 8004e6c: 09db lsrs r3, r3, #7 + 8004e6e: 613b str r3, [r7, #16] + 8004e70: 693b ldr r3, [r7, #16] + 8004e72: 2b7f cmp r3, #127 ; 0x7f + 8004e74: d8f0 bhi.n 8004e58 + 8004e76: 697b ldr r3, [r7, #20] + 8004e78: 1c5a adds r2, r3, #1 + 8004e7a: 617a str r2, [r7, #20] + 8004e7c: 693a ldr r2, [r7, #16] + 8004e7e: b2d2 uxtb r2, r2 + 8004e80: 701a strb r2, [r3, #0] + 8004e82: 697b ldr r3, [r7, #20] + 8004e84: 607b str r3, [r7, #4] + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_NUMMODULES); + 8004e86: 221b movs r2, #27 + 8004e88: 6879 ldr r1, [r7, #4] + 8004e8a: 68b8 ldr r0, [r7, #8] + 8004e8c: f7fe fefa bl 8003c84 <_SendPacket> + RECORD_END(); + 8004e90: 68fb ldr r3, [r7, #12] + 8004e92: f383 8811 msr BASEPRI, r3 +} + 8004e96: bf00 nop + 8004e98: 3718 adds r7, #24 + 8004e9a: 46bd mov sp, r7 + 8004e9c: bd80 pop {r7, pc} + 8004e9e: bf00 nop + 8004ea0: 20015bf4 .word 0x20015bf4 + 8004ea4: 20015bf0 .word 0x20015bf0 + +08004ea8 : +* Print a warning string to the host. +* +* Parameters +* s - String to sent. +*/ +void SEGGER_SYSVIEW_Warn(const char* s) { + 8004ea8: b580 push {r7, lr} + 8004eaa: b08a sub sp, #40 ; 0x28 + 8004eac: af00 add r7, sp, #0 + 8004eae: 6078 str r0, [r7, #4] + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2 * SEGGER_SYSVIEW_QUANTA_U32 + SEGGER_SYSVIEW_MAX_STRING_LEN); + 8004eb0: f3ef 8311 mrs r3, BASEPRI + 8004eb4: f04f 0120 mov.w r1, #32 + 8004eb8: f381 8811 msr BASEPRI, r1 + 8004ebc: 617b str r3, [r7, #20] + 8004ebe: 4827 ldr r0, [pc, #156] ; (8004f5c ) + 8004ec0: f7fe fdf5 bl 8003aae <_PreparePacket> + 8004ec4: 6138 str r0, [r7, #16] + // + pPayload = _EncodeStr(pPayloadStart, s, SEGGER_SYSVIEW_MAX_STRING_LEN); + 8004ec6: 2280 movs r2, #128 ; 0x80 + 8004ec8: 6879 ldr r1, [r7, #4] + 8004eca: 6938 ldr r0, [r7, #16] + 8004ecc: f7fe fda2 bl 8003a14 <_EncodeStr> + 8004ed0: 60f8 str r0, [r7, #12] + ENCODE_U32(pPayload, SEGGER_SYSVIEW_WARNING); + 8004ed2: 68fb ldr r3, [r7, #12] + 8004ed4: 627b str r3, [r7, #36] ; 0x24 + 8004ed6: 2301 movs r3, #1 + 8004ed8: 623b str r3, [r7, #32] + 8004eda: e00b b.n 8004ef4 + 8004edc: 6a3b ldr r3, [r7, #32] + 8004ede: b2da uxtb r2, r3 + 8004ee0: 6a7b ldr r3, [r7, #36] ; 0x24 + 8004ee2: 1c59 adds r1, r3, #1 + 8004ee4: 6279 str r1, [r7, #36] ; 0x24 + 8004ee6: f062 027f orn r2, r2, #127 ; 0x7f + 8004eea: b2d2 uxtb r2, r2 + 8004eec: 701a strb r2, [r3, #0] + 8004eee: 6a3b ldr r3, [r7, #32] + 8004ef0: 09db lsrs r3, r3, #7 + 8004ef2: 623b str r3, [r7, #32] + 8004ef4: 6a3b ldr r3, [r7, #32] + 8004ef6: 2b7f cmp r3, #127 ; 0x7f + 8004ef8: d8f0 bhi.n 8004edc + 8004efa: 6a7b ldr r3, [r7, #36] ; 0x24 + 8004efc: 1c5a adds r2, r3, #1 + 8004efe: 627a str r2, [r7, #36] ; 0x24 + 8004f00: 6a3a ldr r2, [r7, #32] + 8004f02: b2d2 uxtb r2, r2 + 8004f04: 701a strb r2, [r3, #0] + 8004f06: 6a7b ldr r3, [r7, #36] ; 0x24 + 8004f08: 60fb str r3, [r7, #12] + ENCODE_U32(pPayload, 0); + 8004f0a: 68fb ldr r3, [r7, #12] + 8004f0c: 61fb str r3, [r7, #28] + 8004f0e: 2300 movs r3, #0 + 8004f10: 61bb str r3, [r7, #24] + 8004f12: e00b b.n 8004f2c + 8004f14: 69bb ldr r3, [r7, #24] + 8004f16: b2da uxtb r2, r3 + 8004f18: 69fb ldr r3, [r7, #28] + 8004f1a: 1c59 adds r1, r3, #1 + 8004f1c: 61f9 str r1, [r7, #28] + 8004f1e: f062 027f orn r2, r2, #127 ; 0x7f + 8004f22: b2d2 uxtb r2, r2 + 8004f24: 701a strb r2, [r3, #0] + 8004f26: 69bb ldr r3, [r7, #24] + 8004f28: 09db lsrs r3, r3, #7 + 8004f2a: 61bb str r3, [r7, #24] + 8004f2c: 69bb ldr r3, [r7, #24] + 8004f2e: 2b7f cmp r3, #127 ; 0x7f + 8004f30: d8f0 bhi.n 8004f14 + 8004f32: 69fb ldr r3, [r7, #28] + 8004f34: 1c5a adds r2, r3, #1 + 8004f36: 61fa str r2, [r7, #28] + 8004f38: 69ba ldr r2, [r7, #24] + 8004f3a: b2d2 uxtb r2, r2 + 8004f3c: 701a strb r2, [r3, #0] + 8004f3e: 69fb ldr r3, [r7, #28] + 8004f40: 60fb str r3, [r7, #12] + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_PRINT_FORMATTED); + 8004f42: 221a movs r2, #26 + 8004f44: 68f9 ldr r1, [r7, #12] + 8004f46: 6938 ldr r0, [r7, #16] + 8004f48: f7fe fe9c bl 8003c84 <_SendPacket> + RECORD_END(); + 8004f4c: 697b ldr r3, [r7, #20] + 8004f4e: f383 8811 msr BASEPRI, r3 +} + 8004f52: bf00 nop + 8004f54: 3728 adds r7, #40 ; 0x28 + 8004f56: 46bd mov sp, r7 + 8004f58: bd80 pop {r7, pc} + 8004f5a: bf00 nop + 8004f5c: 20015bf4 .word 0x20015bf4 + +08004f60 : * @param GPIO_InitStruct: pointer to a GPIO_InitTypeDef structure that contains * the configuration information for the specified GPIO peripheral. * @retval None */ void GPIO_Init(GPIO_TypeDef* GPIOx, GPIO_InitTypeDef* GPIO_InitStruct) { - 80028a4: b480 push {r7} - 80028a6: b087 sub sp, #28 - 80028a8: af00 add r7, sp, #0 - 80028aa: 6078 str r0, [r7, #4] - 80028ac: 6039 str r1, [r7, #0] + 8004f60: b480 push {r7} + 8004f62: b087 sub sp, #28 + 8004f64: af00 add r7, sp, #0 + 8004f66: 6078 str r0, [r7, #4] + 8004f68: 6039 str r1, [r7, #0] uint32_t pinpos = 0x00, pos = 0x00 , currentpin = 0x00; - 80028ae: 2300 movs r3, #0 - 80028b0: 617b str r3, [r7, #20] - 80028b2: 2300 movs r3, #0 - 80028b4: 613b str r3, [r7, #16] - 80028b6: 2300 movs r3, #0 - 80028b8: 60fb str r3, [r7, #12] + 8004f6a: 2300 movs r3, #0 + 8004f6c: 617b str r3, [r7, #20] + 8004f6e: 2300 movs r3, #0 + 8004f70: 613b str r3, [r7, #16] + 8004f72: 2300 movs r3, #0 + 8004f74: 60fb str r3, [r7, #12] assert_param(IS_GPIO_MODE(GPIO_InitStruct->GPIO_Mode)); assert_param(IS_GPIO_PUPD(GPIO_InitStruct->GPIO_PuPd)); /* ------------------------- Configure the port pins ---------------- */ /*-- GPIO Mode Configuration --*/ for (pinpos = 0x00; pinpos < 0x10; pinpos++) - 80028ba: 2300 movs r3, #0 - 80028bc: 617b str r3, [r7, #20] - 80028be: e076 b.n 80029ae + 8004f76: 2300 movs r3, #0 + 8004f78: 617b str r3, [r7, #20] + 8004f7a: e076 b.n 800506a { pos = ((uint32_t)0x01) << pinpos; - 80028c0: 2201 movs r2, #1 - 80028c2: 697b ldr r3, [r7, #20] - 80028c4: fa02 f303 lsl.w r3, r2, r3 - 80028c8: 613b str r3, [r7, #16] + 8004f7c: 2201 movs r2, #1 + 8004f7e: 697b ldr r3, [r7, #20] + 8004f80: fa02 f303 lsl.w r3, r2, r3 + 8004f84: 613b str r3, [r7, #16] /* Get the port pins position */ currentpin = (GPIO_InitStruct->GPIO_Pin) & pos; - 80028ca: 683b ldr r3, [r7, #0] - 80028cc: 681b ldr r3, [r3, #0] - 80028ce: 693a ldr r2, [r7, #16] - 80028d0: 4013 ands r3, r2 - 80028d2: 60fb str r3, [r7, #12] + 8004f86: 683b ldr r3, [r7, #0] + 8004f88: 681b ldr r3, [r3, #0] + 8004f8a: 693a ldr r2, [r7, #16] + 8004f8c: 4013 ands r3, r2 + 8004f8e: 60fb str r3, [r7, #12] if (currentpin == pos) - 80028d4: 68fa ldr r2, [r7, #12] - 80028d6: 693b ldr r3, [r7, #16] - 80028d8: 429a cmp r2, r3 - 80028da: d165 bne.n 80029a8 + 8004f90: 68fa ldr r2, [r7, #12] + 8004f92: 693b ldr r3, [r7, #16] + 8004f94: 429a cmp r2, r3 + 8004f96: d165 bne.n 8005064 { GPIOx->MODER &= ~(GPIO_MODER_MODER0 << (pinpos * 2)); - 80028dc: 687b ldr r3, [r7, #4] - 80028de: 681a ldr r2, [r3, #0] - 80028e0: 697b ldr r3, [r7, #20] - 80028e2: 005b lsls r3, r3, #1 - 80028e4: 2103 movs r1, #3 - 80028e6: fa01 f303 lsl.w r3, r1, r3 - 80028ea: 43db mvns r3, r3 - 80028ec: 401a ands r2, r3 - 80028ee: 687b ldr r3, [r7, #4] - 80028f0: 601a str r2, [r3, #0] + 8004f98: 687b ldr r3, [r7, #4] + 8004f9a: 681a ldr r2, [r3, #0] + 8004f9c: 697b ldr r3, [r7, #20] + 8004f9e: 005b lsls r3, r3, #1 + 8004fa0: 2103 movs r1, #3 + 8004fa2: fa01 f303 lsl.w r3, r1, r3 + 8004fa6: 43db mvns r3, r3 + 8004fa8: 401a ands r2, r3 + 8004faa: 687b ldr r3, [r7, #4] + 8004fac: 601a str r2, [r3, #0] GPIOx->MODER |= (((uint32_t)GPIO_InitStruct->GPIO_Mode) << (pinpos * 2)); - 80028f2: 687b ldr r3, [r7, #4] - 80028f4: 681a ldr r2, [r3, #0] - 80028f6: 683b ldr r3, [r7, #0] - 80028f8: 791b ldrb r3, [r3, #4] - 80028fa: 4619 mov r1, r3 - 80028fc: 697b ldr r3, [r7, #20] - 80028fe: 005b lsls r3, r3, #1 - 8002900: fa01 f303 lsl.w r3, r1, r3 - 8002904: 431a orrs r2, r3 - 8002906: 687b ldr r3, [r7, #4] - 8002908: 601a str r2, [r3, #0] + 8004fae: 687b ldr r3, [r7, #4] + 8004fb0: 681a ldr r2, [r3, #0] + 8004fb2: 683b ldr r3, [r7, #0] + 8004fb4: 791b ldrb r3, [r3, #4] + 8004fb6: 4619 mov r1, r3 + 8004fb8: 697b ldr r3, [r7, #20] + 8004fba: 005b lsls r3, r3, #1 + 8004fbc: fa01 f303 lsl.w r3, r1, r3 + 8004fc0: 431a orrs r2, r3 + 8004fc2: 687b ldr r3, [r7, #4] + 8004fc4: 601a str r2, [r3, #0] if ((GPIO_InitStruct->GPIO_Mode == GPIO_Mode_OUT) || (GPIO_InitStruct->GPIO_Mode == GPIO_Mode_AF)) - 800290a: 683b ldr r3, [r7, #0] - 800290c: 791b ldrb r3, [r3, #4] - 800290e: 2b01 cmp r3, #1 - 8002910: d003 beq.n 800291a - 8002912: 683b ldr r3, [r7, #0] - 8002914: 791b ldrb r3, [r3, #4] - 8002916: 2b02 cmp r3, #2 - 8002918: d12e bne.n 8002978 + 8004fc6: 683b ldr r3, [r7, #0] + 8004fc8: 791b ldrb r3, [r3, #4] + 8004fca: 2b01 cmp r3, #1 + 8004fcc: d003 beq.n 8004fd6 + 8004fce: 683b ldr r3, [r7, #0] + 8004fd0: 791b ldrb r3, [r3, #4] + 8004fd2: 2b02 cmp r3, #2 + 8004fd4: d12e bne.n 8005034 { /* Check Speed mode parameters */ assert_param(IS_GPIO_SPEED(GPIO_InitStruct->GPIO_Speed)); /* Speed mode configuration */ GPIOx->OSPEEDR &= ~(GPIO_OSPEEDER_OSPEEDR0 << (pinpos * 2)); - 800291a: 687b ldr r3, [r7, #4] - 800291c: 689a ldr r2, [r3, #8] - 800291e: 697b ldr r3, [r7, #20] - 8002920: 005b lsls r3, r3, #1 - 8002922: 2103 movs r1, #3 - 8002924: fa01 f303 lsl.w r3, r1, r3 - 8002928: 43db mvns r3, r3 - 800292a: 401a ands r2, r3 - 800292c: 687b ldr r3, [r7, #4] - 800292e: 609a str r2, [r3, #8] + 8004fd6: 687b ldr r3, [r7, #4] + 8004fd8: 689a ldr r2, [r3, #8] + 8004fda: 697b ldr r3, [r7, #20] + 8004fdc: 005b lsls r3, r3, #1 + 8004fde: 2103 movs r1, #3 + 8004fe0: fa01 f303 lsl.w r3, r1, r3 + 8004fe4: 43db mvns r3, r3 + 8004fe6: 401a ands r2, r3 + 8004fe8: 687b ldr r3, [r7, #4] + 8004fea: 609a str r2, [r3, #8] GPIOx->OSPEEDR |= ((uint32_t)(GPIO_InitStruct->GPIO_Speed) << (pinpos * 2)); - 8002930: 687b ldr r3, [r7, #4] - 8002932: 689a ldr r2, [r3, #8] - 8002934: 683b ldr r3, [r7, #0] - 8002936: 795b ldrb r3, [r3, #5] - 8002938: 4619 mov r1, r3 - 800293a: 697b ldr r3, [r7, #20] - 800293c: 005b lsls r3, r3, #1 - 800293e: fa01 f303 lsl.w r3, r1, r3 - 8002942: 431a orrs r2, r3 - 8002944: 687b ldr r3, [r7, #4] - 8002946: 609a str r2, [r3, #8] + 8004fec: 687b ldr r3, [r7, #4] + 8004fee: 689a ldr r2, [r3, #8] + 8004ff0: 683b ldr r3, [r7, #0] + 8004ff2: 795b ldrb r3, [r3, #5] + 8004ff4: 4619 mov r1, r3 + 8004ff6: 697b ldr r3, [r7, #20] + 8004ff8: 005b lsls r3, r3, #1 + 8004ffa: fa01 f303 lsl.w r3, r1, r3 + 8004ffe: 431a orrs r2, r3 + 8005000: 687b ldr r3, [r7, #4] + 8005002: 609a str r2, [r3, #8] /* Check Output mode parameters */ assert_param(IS_GPIO_OTYPE(GPIO_InitStruct->GPIO_OType)); /* Output mode configuration*/ GPIOx->OTYPER &= ~((GPIO_OTYPER_OT_0) << ((uint16_t)pinpos)) ; - 8002948: 687b ldr r3, [r7, #4] - 800294a: 685a ldr r2, [r3, #4] - 800294c: 697b ldr r3, [r7, #20] - 800294e: b29b uxth r3, r3 - 8002950: 4619 mov r1, r3 - 8002952: 2301 movs r3, #1 - 8002954: 408b lsls r3, r1 - 8002956: 43db mvns r3, r3 - 8002958: 401a ands r2, r3 - 800295a: 687b ldr r3, [r7, #4] - 800295c: 605a str r2, [r3, #4] + 8005004: 687b ldr r3, [r7, #4] + 8005006: 685a ldr r2, [r3, #4] + 8005008: 697b ldr r3, [r7, #20] + 800500a: b29b uxth r3, r3 + 800500c: 4619 mov r1, r3 + 800500e: 2301 movs r3, #1 + 8005010: 408b lsls r3, r1 + 8005012: 43db mvns r3, r3 + 8005014: 401a ands r2, r3 + 8005016: 687b ldr r3, [r7, #4] + 8005018: 605a str r2, [r3, #4] GPIOx->OTYPER |= (uint16_t)(((uint16_t)GPIO_InitStruct->GPIO_OType) << ((uint16_t)pinpos)); - 800295e: 687b ldr r3, [r7, #4] - 8002960: 685b ldr r3, [r3, #4] - 8002962: 683a ldr r2, [r7, #0] - 8002964: 7992 ldrb r2, [r2, #6] - 8002966: 4611 mov r1, r2 - 8002968: 697a ldr r2, [r7, #20] - 800296a: b292 uxth r2, r2 - 800296c: fa01 f202 lsl.w r2, r1, r2 - 8002970: b292 uxth r2, r2 - 8002972: 431a orrs r2, r3 - 8002974: 687b ldr r3, [r7, #4] - 8002976: 605a str r2, [r3, #4] + 800501a: 687b ldr r3, [r7, #4] + 800501c: 685b ldr r3, [r3, #4] + 800501e: 683a ldr r2, [r7, #0] + 8005020: 7992 ldrb r2, [r2, #6] + 8005022: 4611 mov r1, r2 + 8005024: 697a ldr r2, [r7, #20] + 8005026: b292 uxth r2, r2 + 8005028: fa01 f202 lsl.w r2, r1, r2 + 800502c: b292 uxth r2, r2 + 800502e: 431a orrs r2, r3 + 8005030: 687b ldr r3, [r7, #4] + 8005032: 605a str r2, [r3, #4] } /* Pull-up Pull down resistor configuration*/ GPIOx->PUPDR &= ~(GPIO_PUPDR_PUPDR0 << ((uint16_t)pinpos * 2)); - 8002978: 687b ldr r3, [r7, #4] - 800297a: 68da ldr r2, [r3, #12] - 800297c: 697b ldr r3, [r7, #20] - 800297e: b29b uxth r3, r3 - 8002980: 005b lsls r3, r3, #1 - 8002982: 2103 movs r1, #3 - 8002984: fa01 f303 lsl.w r3, r1, r3 - 8002988: 43db mvns r3, r3 - 800298a: 401a ands r2, r3 - 800298c: 687b ldr r3, [r7, #4] - 800298e: 60da str r2, [r3, #12] + 8005034: 687b ldr r3, [r7, #4] + 8005036: 68da ldr r2, [r3, #12] + 8005038: 697b ldr r3, [r7, #20] + 800503a: b29b uxth r3, r3 + 800503c: 005b lsls r3, r3, #1 + 800503e: 2103 movs r1, #3 + 8005040: fa01 f303 lsl.w r3, r1, r3 + 8005044: 43db mvns r3, r3 + 8005046: 401a ands r2, r3 + 8005048: 687b ldr r3, [r7, #4] + 800504a: 60da str r2, [r3, #12] GPIOx->PUPDR |= (((uint32_t)GPIO_InitStruct->GPIO_PuPd) << (pinpos * 2)); - 8002990: 687b ldr r3, [r7, #4] - 8002992: 68da ldr r2, [r3, #12] - 8002994: 683b ldr r3, [r7, #0] - 8002996: 79db ldrb r3, [r3, #7] - 8002998: 4619 mov r1, r3 - 800299a: 697b ldr r3, [r7, #20] - 800299c: 005b lsls r3, r3, #1 - 800299e: fa01 f303 lsl.w r3, r1, r3 - 80029a2: 431a orrs r2, r3 - 80029a4: 687b ldr r3, [r7, #4] - 80029a6: 60da str r2, [r3, #12] + 800504c: 687b ldr r3, [r7, #4] + 800504e: 68da ldr r2, [r3, #12] + 8005050: 683b ldr r3, [r7, #0] + 8005052: 79db ldrb r3, [r3, #7] + 8005054: 4619 mov r1, r3 + 8005056: 697b ldr r3, [r7, #20] + 8005058: 005b lsls r3, r3, #1 + 800505a: fa01 f303 lsl.w r3, r1, r3 + 800505e: 431a orrs r2, r3 + 8005060: 687b ldr r3, [r7, #4] + 8005062: 60da str r2, [r3, #12] for (pinpos = 0x00; pinpos < 0x10; pinpos++) - 80029a8: 697b ldr r3, [r7, #20] - 80029aa: 3301 adds r3, #1 - 80029ac: 617b str r3, [r7, #20] - 80029ae: 697b ldr r3, [r7, #20] - 80029b0: 2b0f cmp r3, #15 - 80029b2: d985 bls.n 80028c0 + 8005064: 697b ldr r3, [r7, #20] + 8005066: 3301 adds r3, #1 + 8005068: 617b str r3, [r7, #20] + 800506a: 697b ldr r3, [r7, #20] + 800506c: 2b0f cmp r3, #15 + 800506e: d985 bls.n 8004f7c } } } - 80029b4: bf00 nop - 80029b6: 371c adds r7, #28 - 80029b8: 46bd mov sp, r7 - 80029ba: f85d 7b04 ldr.w r7, [sp], #4 - 80029be: 4770 bx lr + 8005070: bf00 nop + 8005072: 371c adds r7, #28 + 8005074: 46bd mov sp, r7 + 8005076: f85d 7b04 ldr.w r7, [sp], #4 + 800507a: 4770 bx lr + +0800507c : + * @param GPIO_Pin: specifies the port bit to read. + * This parameter can be GPIO_Pin_x where x can be (0..15). + * @retval The output port pin value. + */ +uint8_t GPIO_ReadOutputDataBit(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin) +{ + 800507c: b480 push {r7} + 800507e: b085 sub sp, #20 + 8005080: af00 add r7, sp, #0 + 8005082: 6078 str r0, [r7, #4] + 8005084: 460b mov r3, r1 + 8005086: 807b strh r3, [r7, #2] + uint8_t bitstatus = 0x00; + 8005088: 2300 movs r3, #0 + 800508a: 73fb strb r3, [r7, #15] -080029c0 : + /* Check the parameters */ + assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); + assert_param(IS_GET_GPIO_PIN(GPIO_Pin)); + + if (((GPIOx->ODR) & GPIO_Pin) != (uint32_t)Bit_RESET) + 800508c: 687b ldr r3, [r7, #4] + 800508e: 695a ldr r2, [r3, #20] + 8005090: 887b ldrh r3, [r7, #2] + 8005092: 4013 ands r3, r2 + 8005094: 2b00 cmp r3, #0 + 8005096: d002 beq.n 800509e + { + bitstatus = (uint8_t)Bit_SET; + 8005098: 2301 movs r3, #1 + 800509a: 73fb strb r3, [r7, #15] + 800509c: e001 b.n 80050a2 + } + else + { + bitstatus = (uint8_t)Bit_RESET; + 800509e: 2300 movs r3, #0 + 80050a0: 73fb strb r3, [r7, #15] + } + return bitstatus; + 80050a2: 7bfb ldrb r3, [r7, #15] +} + 80050a4: 4618 mov r0, r3 + 80050a6: 3714 adds r7, #20 + 80050a8: 46bd mov sp, r7 + 80050aa: f85d 7b04 ldr.w r7, [sp], #4 + 80050ae: 4770 bx lr + +080050b0 : + * @param GPIO_Pin: specifies the port bits to be written. + * This parameter can be any combination of GPIO_Pin_x where x can be (0..15). + * @retval None + */ +void GPIO_SetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin) +{ + 80050b0: b480 push {r7} + 80050b2: b083 sub sp, #12 + 80050b4: af00 add r7, sp, #0 + 80050b6: 6078 str r0, [r7, #4] + 80050b8: 460b mov r3, r1 + 80050ba: 807b strh r3, [r7, #2] + /* Check the parameters */ + assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); + assert_param(IS_GPIO_PIN(GPIO_Pin)); + + GPIOx->BSRRL = GPIO_Pin; + 80050bc: 687b ldr r3, [r7, #4] + 80050be: 887a ldrh r2, [r7, #2] + 80050c0: 831a strh r2, [r3, #24] +} + 80050c2: bf00 nop + 80050c4: 370c adds r7, #12 + 80050c6: 46bd mov sp, r7 + 80050c8: f85d 7b04 ldr.w r7, [sp], #4 + 80050cc: 4770 bx lr + +080050ce : + * @param GPIO_Pin: specifies the port bits to be written. + * This parameter can be any combination of GPIO_Pin_x where x can be (0..15). + * @retval None + */ +void GPIO_ResetBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin) +{ + 80050ce: b480 push {r7} + 80050d0: b083 sub sp, #12 + 80050d2: af00 add r7, sp, #0 + 80050d4: 6078 str r0, [r7, #4] + 80050d6: 460b mov r3, r1 + 80050d8: 807b strh r3, [r7, #2] + /* Check the parameters */ + assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); + assert_param(IS_GPIO_PIN(GPIO_Pin)); + + GPIOx->BSRRH = GPIO_Pin; + 80050da: 687b ldr r3, [r7, #4] + 80050dc: 887a ldrh r2, [r7, #2] + 80050de: 835a strh r2, [r3, #26] +} + 80050e0: bf00 nop + 80050e2: 370c adds r7, #12 + 80050e4: 46bd mov sp, r7 + 80050e6: f85d 7b04 ldr.w r7, [sp], #4 + 80050ea: 4770 bx lr + +080050ec : * x can be (A, B, C, D and H) to select the GPIO peripheral for STM32F401xx devices. * @param GPIO_Pin: Specifies the pins to be toggled. * @retval None */ void GPIO_ToggleBits(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin) { - 80029c0: b480 push {r7} - 80029c2: b083 sub sp, #12 - 80029c4: af00 add r7, sp, #0 - 80029c6: 6078 str r0, [r7, #4] - 80029c8: 460b mov r3, r1 - 80029ca: 807b strh r3, [r7, #2] + 80050ec: b480 push {r7} + 80050ee: b083 sub sp, #12 + 80050f0: af00 add r7, sp, #0 + 80050f2: 6078 str r0, [r7, #4] + 80050f4: 460b mov r3, r1 + 80050f6: 807b strh r3, [r7, #2] /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); GPIOx->ODR ^= GPIO_Pin; - 80029cc: 687b ldr r3, [r7, #4] - 80029ce: 695a ldr r2, [r3, #20] - 80029d0: 887b ldrh r3, [r7, #2] - 80029d2: 405a eors r2, r3 - 80029d4: 687b ldr r3, [r7, #4] - 80029d6: 615a str r2, [r3, #20] -} - 80029d8: bf00 nop - 80029da: 370c adds r7, #12 - 80029dc: 46bd mov sp, r7 - 80029de: f85d 7b04 ldr.w r7, [sp], #4 - 80029e2: 4770 bx lr - -080029e4 : + 80050f8: 687b ldr r3, [r7, #4] + 80050fa: 695a ldr r2, [r3, #20] + 80050fc: 887b ldrh r3, [r7, #2] + 80050fe: 405a eors r2, r3 + 8005100: 687b ldr r3, [r7, #4] + 8005102: 615a str r2, [r3, #20] +} + 8005104: bf00 nop + 8005106: 370c adds r7, #12 + 8005108: 46bd mov sp, r7 + 800510a: f85d 7b04 ldr.w r7, [sp], #4 + 800510e: 4770 bx lr + +08005110 : * @arg GPIO_AF_LTDC: Connect LTDC pins to AF14 for STM32F429xx/439xx devices. * @arg GPIO_AF_EVENTOUT: Connect EVENTOUT pins to AF15 * @retval None */ void GPIO_PinAFConfig(GPIO_TypeDef* GPIOx, uint16_t GPIO_PinSource, uint8_t GPIO_AF) { - 80029e4: b480 push {r7} - 80029e6: b085 sub sp, #20 - 80029e8: af00 add r7, sp, #0 - 80029ea: 6078 str r0, [r7, #4] - 80029ec: 460b mov r3, r1 - 80029ee: 807b strh r3, [r7, #2] - 80029f0: 4613 mov r3, r2 - 80029f2: 707b strb r3, [r7, #1] + 8005110: b480 push {r7} + 8005112: b085 sub sp, #20 + 8005114: af00 add r7, sp, #0 + 8005116: 6078 str r0, [r7, #4] + 8005118: 460b mov r3, r1 + 800511a: 807b strh r3, [r7, #2] + 800511c: 4613 mov r3, r2 + 800511e: 707b strb r3, [r7, #1] uint32_t temp = 0x00; - 80029f4: 2300 movs r3, #0 - 80029f6: 60fb str r3, [r7, #12] + 8005120: 2300 movs r3, #0 + 8005122: 60fb str r3, [r7, #12] uint32_t temp_2 = 0x00; - 80029f8: 2300 movs r3, #0 - 80029fa: 60bb str r3, [r7, #8] + 8005124: 2300 movs r3, #0 + 8005126: 60bb str r3, [r7, #8] /* Check the parameters */ assert_param(IS_GPIO_ALL_PERIPH(GPIOx)); assert_param(IS_GPIO_PIN_SOURCE(GPIO_PinSource)); assert_param(IS_GPIO_AF(GPIO_AF)); temp = ((uint32_t)(GPIO_AF) << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; - 80029fc: 787a ldrb r2, [r7, #1] - 80029fe: 887b ldrh r3, [r7, #2] - 8002a00: f003 0307 and.w r3, r3, #7 - 8002a04: 009b lsls r3, r3, #2 - 8002a06: fa02 f303 lsl.w r3, r2, r3 - 8002a0a: 60fb str r3, [r7, #12] + 8005128: 787a ldrb r2, [r7, #1] + 800512a: 887b ldrh r3, [r7, #2] + 800512c: f003 0307 and.w r3, r3, #7 + 8005130: 009b lsls r3, r3, #2 + 8005132: fa02 f303 lsl.w r3, r2, r3 + 8005136: 60fb str r3, [r7, #12] GPIOx->AFR[GPIO_PinSource >> 0x03] &= ~((uint32_t)0xF << ((uint32_t)((uint32_t)GPIO_PinSource & (uint32_t)0x07) * 4)) ; - 8002a0c: 887b ldrh r3, [r7, #2] - 8002a0e: 08db lsrs r3, r3, #3 - 8002a10: b29b uxth r3, r3 - 8002a12: 461a mov r2, r3 - 8002a14: 687b ldr r3, [r7, #4] - 8002a16: 3208 adds r2, #8 - 8002a18: f853 2022 ldr.w r2, [r3, r2, lsl #2] - 8002a1c: 887b ldrh r3, [r7, #2] - 8002a1e: f003 0307 and.w r3, r3, #7 - 8002a22: 009b lsls r3, r3, #2 - 8002a24: 210f movs r1, #15 - 8002a26: fa01 f303 lsl.w r3, r1, r3 - 8002a2a: 43db mvns r3, r3 - 8002a2c: 8879 ldrh r1, [r7, #2] - 8002a2e: 08c9 lsrs r1, r1, #3 - 8002a30: b289 uxth r1, r1 - 8002a32: 4608 mov r0, r1 - 8002a34: ea02 0103 and.w r1, r2, r3 - 8002a38: 687b ldr r3, [r7, #4] - 8002a3a: f100 0208 add.w r2, r0, #8 - 8002a3e: f843 1022 str.w r1, [r3, r2, lsl #2] + 8005138: 887b ldrh r3, [r7, #2] + 800513a: 08db lsrs r3, r3, #3 + 800513c: b29b uxth r3, r3 + 800513e: 461a mov r2, r3 + 8005140: 687b ldr r3, [r7, #4] + 8005142: 3208 adds r2, #8 + 8005144: f853 2022 ldr.w r2, [r3, r2, lsl #2] + 8005148: 887b ldrh r3, [r7, #2] + 800514a: f003 0307 and.w r3, r3, #7 + 800514e: 009b lsls r3, r3, #2 + 8005150: 210f movs r1, #15 + 8005152: fa01 f303 lsl.w r3, r1, r3 + 8005156: 43db mvns r3, r3 + 8005158: 8879 ldrh r1, [r7, #2] + 800515a: 08c9 lsrs r1, r1, #3 + 800515c: b289 uxth r1, r1 + 800515e: 4608 mov r0, r1 + 8005160: ea02 0103 and.w r1, r2, r3 + 8005164: 687b ldr r3, [r7, #4] + 8005166: f100 0208 add.w r2, r0, #8 + 800516a: f843 1022 str.w r1, [r3, r2, lsl #2] temp_2 = GPIOx->AFR[GPIO_PinSource >> 0x03] | temp; - 8002a42: 887b ldrh r3, [r7, #2] - 8002a44: 08db lsrs r3, r3, #3 - 8002a46: b29b uxth r3, r3 - 8002a48: 461a mov r2, r3 - 8002a4a: 687b ldr r3, [r7, #4] - 8002a4c: 3208 adds r2, #8 - 8002a4e: f853 3022 ldr.w r3, [r3, r2, lsl #2] - 8002a52: 68fa ldr r2, [r7, #12] - 8002a54: 4313 orrs r3, r2 - 8002a56: 60bb str r3, [r7, #8] + 800516e: 887b ldrh r3, [r7, #2] + 8005170: 08db lsrs r3, r3, #3 + 8005172: b29b uxth r3, r3 + 8005174: 461a mov r2, r3 + 8005176: 687b ldr r3, [r7, #4] + 8005178: 3208 adds r2, #8 + 800517a: f853 3022 ldr.w r3, [r3, r2, lsl #2] + 800517e: 68fa ldr r2, [r7, #12] + 8005180: 4313 orrs r3, r2 + 8005182: 60bb str r3, [r7, #8] GPIOx->AFR[GPIO_PinSource >> 0x03] = temp_2; - 8002a58: 887b ldrh r3, [r7, #2] - 8002a5a: 08db lsrs r3, r3, #3 - 8002a5c: b29b uxth r3, r3 - 8002a5e: 461a mov r2, r3 - 8002a60: 687b ldr r3, [r7, #4] - 8002a62: 3208 adds r2, #8 - 8002a64: 68b9 ldr r1, [r7, #8] - 8002a66: f843 1022 str.w r1, [r3, r2, lsl #2] -} - 8002a6a: bf00 nop - 8002a6c: 3714 adds r7, #20 - 8002a6e: 46bd mov sp, r7 - 8002a70: f85d 7b04 ldr.w r7, [sp], #4 - 8002a74: 4770 bx lr + 8005184: 887b ldrh r3, [r7, #2] + 8005186: 08db lsrs r3, r3, #3 + 8005188: b29b uxth r3, r3 + 800518a: 461a mov r2, r3 + 800518c: 687b ldr r3, [r7, #4] + 800518e: 3208 adds r2, #8 + 8005190: 68b9 ldr r1, [r7, #8] + 8005192: f843 1022 str.w r1, [r3, r2, lsl #2] +} + 8005196: bf00 nop + 8005198: 3714 adds r7, #20 + 800519a: 46bd mov sp, r7 + 800519c: f85d 7b04 ldr.w r7, [sp], #4 + 80051a0: 4770 bx lr ... -08002a78 : +080051a4 : * - LSI, LSE and RTC clocks * @param None * @retval None */ void RCC_DeInit(void) { - 8002a78: b480 push {r7} - 8002a7a: af00 add r7, sp, #0 + 80051a4: b480 push {r7} + 80051a6: af00 add r7, sp, #0 /* Set HSION bit */ RCC->CR |= (uint32_t)0x00000001; - 8002a7c: 4b16 ldr r3, [pc, #88] ; (8002ad8 ) - 8002a7e: 681b ldr r3, [r3, #0] - 8002a80: 4a15 ldr r2, [pc, #84] ; (8002ad8 ) - 8002a82: f043 0301 orr.w r3, r3, #1 - 8002a86: 6013 str r3, [r2, #0] + 80051a8: 4b16 ldr r3, [pc, #88] ; (8005204 ) + 80051aa: 681b ldr r3, [r3, #0] + 80051ac: 4a15 ldr r2, [pc, #84] ; (8005204 ) + 80051ae: f043 0301 orr.w r3, r3, #1 + 80051b2: 6013 str r3, [r2, #0] /* Reset CFGR register */ RCC->CFGR = 0x00000000; - 8002a88: 4b13 ldr r3, [pc, #76] ; (8002ad8 ) - 8002a8a: 2200 movs r2, #0 - 8002a8c: 609a str r2, [r3, #8] + 80051b4: 4b13 ldr r3, [pc, #76] ; (8005204 ) + 80051b6: 2200 movs r2, #0 + 80051b8: 609a str r2, [r3, #8] /* Reset HSEON, CSSON, PLLON, PLLI2S and PLLSAI(STM32F42xxx/43xxx/446xx/469xx/479xx devices) bits */ RCC->CR &= (uint32_t)0xEAF6FFFF; - 8002a8e: 4b12 ldr r3, [pc, #72] ; (8002ad8 ) - 8002a90: 681b ldr r3, [r3, #0] - 8002a92: 4a11 ldr r2, [pc, #68] ; (8002ad8 ) - 8002a94: f023 53a8 bic.w r3, r3, #352321536 ; 0x15000000 - 8002a98: f423 2310 bic.w r3, r3, #589824 ; 0x90000 - 8002a9c: 6013 str r3, [r2, #0] + 80051ba: 4b12 ldr r3, [pc, #72] ; (8005204 ) + 80051bc: 681b ldr r3, [r3, #0] + 80051be: 4a11 ldr r2, [pc, #68] ; (8005204 ) + 80051c0: f023 53a8 bic.w r3, r3, #352321536 ; 0x15000000 + 80051c4: f423 2310 bic.w r3, r3, #589824 ; 0x90000 + 80051c8: 6013 str r3, [r2, #0] /* Reset PLLCFGR register */ RCC->PLLCFGR = 0x24003010; - 8002a9e: 4b0e ldr r3, [pc, #56] ; (8002ad8 ) - 8002aa0: 4a0e ldr r2, [pc, #56] ; (8002adc ) - 8002aa2: 605a str r2, [r3, #4] + 80051ca: 4b0e ldr r3, [pc, #56] ; (8005204 ) + 80051cc: 4a0e ldr r2, [pc, #56] ; (8005208 ) + 80051ce: 605a str r2, [r3, #4] #if defined(STM32F40_41xxx) || defined(STM32F427_437xx) || defined(STM32F429_439xx) || defined(STM32F401xx) || defined(STM32F411xE) || defined(STM32F446xx) || defined(STM32F413_423xx) || defined(STM32F469_479xx) /* Reset PLLI2SCFGR register */ RCC->PLLI2SCFGR = 0x20003000; - 8002aa4: 4b0c ldr r3, [pc, #48] ; (8002ad8 ) - 8002aa6: 4a0e ldr r2, [pc, #56] ; (8002ae0 ) - 8002aa8: f8c3 2084 str.w r2, [r3, #132] ; 0x84 + 80051d0: 4b0c ldr r3, [pc, #48] ; (8005204 ) + 80051d2: 4a0e ldr r2, [pc, #56] ; (800520c ) + 80051d4: f8c3 2084 str.w r2, [r3, #132] ; 0x84 #endif /* STM32F40_41xxx || STM32F427_437xx || STM32F429_439xx || STM32F401xx || STM32F411xE || STM32F446xx || STM32F413_423xx || STM32F469_479xx */ #if defined(STM32F40_41xxx) || defined(STM32F427_437xx) || defined(STM32F429_439xx) || defined(STM32F446xx) || defined(STM32F469_479xx) /* Reset PLLSAICFGR register, only available for STM32F42xxx/43xxx/446xx/469xx/479xx devices */ RCC->PLLSAICFGR = 0x24003000; - 8002aac: 4b0a ldr r3, [pc, #40] ; (8002ad8 ) - 8002aae: 4a0d ldr r2, [pc, #52] ; (8002ae4 ) - 8002ab0: f8c3 2088 str.w r2, [r3, #136] ; 0x88 + 80051d8: 4b0a ldr r3, [pc, #40] ; (8005204 ) + 80051da: 4a0d ldr r2, [pc, #52] ; (8005210 ) + 80051dc: f8c3 2088 str.w r2, [r3, #136] ; 0x88 #endif /* STM32F40_41xxx || STM32F427_437xx || STM32F429_439xx || STM32F446xx || STM32F469_479xx */ /* Reset HSEBYP bit */ RCC->CR &= (uint32_t)0xFFFBFFFF; - 8002ab4: 4b08 ldr r3, [pc, #32] ; (8002ad8 ) - 8002ab6: 681b ldr r3, [r3, #0] - 8002ab8: 4a07 ldr r2, [pc, #28] ; (8002ad8 ) - 8002aba: f423 2380 bic.w r3, r3, #262144 ; 0x40000 - 8002abe: 6013 str r3, [r2, #0] + 80051e0: 4b08 ldr r3, [pc, #32] ; (8005204 ) + 80051e2: 681b ldr r3, [r3, #0] + 80051e4: 4a07 ldr r2, [pc, #28] ; (8005204 ) + 80051e6: f423 2380 bic.w r3, r3, #262144 ; 0x40000 + 80051ea: 6013 str r3, [r2, #0] /* Disable all interrupts */ RCC->CIR = 0x00000000; - 8002ac0: 4b05 ldr r3, [pc, #20] ; (8002ad8 ) - 8002ac2: 2200 movs r2, #0 - 8002ac4: 60da str r2, [r3, #12] + 80051ec: 4b05 ldr r3, [pc, #20] ; (8005204 ) + 80051ee: 2200 movs r2, #0 + 80051f0: 60da str r2, [r3, #12] /* Disable Timers clock prescalers selection, only available for STM32F42/43xxx and STM32F413_423xx devices */ RCC->DCKCFGR = 0x00000000; - 8002ac6: 4b04 ldr r3, [pc, #16] ; (8002ad8 ) - 8002ac8: 2200 movs r2, #0 - 8002aca: f8c3 208c str.w r2, [r3, #140] ; 0x8c + 80051f2: 4b04 ldr r3, [pc, #16] ; (8005204 ) + 80051f4: 2200 movs r2, #0 + 80051f6: f8c3 208c str.w r2, [r3, #140] ; 0x8c #if defined(STM32F410xx) || defined(STM32F413_423xx) /* Disable LPTIM and FMPI2C clock prescalers selection, only available for STM32F410xx and STM32F413_423xx devices */ RCC->DCKCFGR2 = 0x00000000; #endif /* STM32F410xx || STM32F413_423xx */ } - 8002ace: bf00 nop - 8002ad0: 46bd mov sp, r7 - 8002ad2: f85d 7b04 ldr.w r7, [sp], #4 - 8002ad6: 4770 bx lr - 8002ad8: 40023800 .word 0x40023800 - 8002adc: 24003010 .word 0x24003010 - 8002ae0: 20003000 .word 0x20003000 - 8002ae4: 24003000 .word 0x24003000 - -08002ae8 : + 80051fa: bf00 nop + 80051fc: 46bd mov sp, r7 + 80051fe: f85d 7b04 ldr.w r7, [sp], #4 + 8005202: 4770 bx lr + 8005204: 40023800 .word 0x40023800 + 8005208: 24003010 .word 0x24003010 + 800520c: 20003000 .word 0x20003000 + 8005210: 24003000 .word 0x24003000 + +08005214 : * @arg RCC_SYSCLKSource_PLLCLK: PLL selected as system clock source (RCC_SYSCLKSource_PLLPCLK for STM32F446xx devices) * @arg RCC_SYSCLKSource_PLLRCLK: PLL R selected as system clock source only for STM32F412xG, STM32F413_423xx and STM32F446xx devices * @retval None */ void RCC_SYSCLKConfig(uint32_t RCC_SYSCLKSource) { - 8002ae8: b480 push {r7} - 8002aea: b085 sub sp, #20 - 8002aec: af00 add r7, sp, #0 - 8002aee: 6078 str r0, [r7, #4] + 8005214: b480 push {r7} + 8005216: b085 sub sp, #20 + 8005218: af00 add r7, sp, #0 + 800521a: 6078 str r0, [r7, #4] uint32_t tmpreg = 0; - 8002af0: 2300 movs r3, #0 - 8002af2: 60fb str r3, [r7, #12] + 800521c: 2300 movs r3, #0 + 800521e: 60fb str r3, [r7, #12] /* Check the parameters */ assert_param(IS_RCC_SYSCLK_SOURCE(RCC_SYSCLKSource)); tmpreg = RCC->CFGR; - 8002af4: 4b09 ldr r3, [pc, #36] ; (8002b1c ) - 8002af6: 689b ldr r3, [r3, #8] - 8002af8: 60fb str r3, [r7, #12] + 8005220: 4b09 ldr r3, [pc, #36] ; (8005248 ) + 8005222: 689b ldr r3, [r3, #8] + 8005224: 60fb str r3, [r7, #12] /* Clear SW[1:0] bits */ tmpreg &= ~RCC_CFGR_SW; - 8002afa: 68fb ldr r3, [r7, #12] - 8002afc: f023 0303 bic.w r3, r3, #3 - 8002b00: 60fb str r3, [r7, #12] + 8005226: 68fb ldr r3, [r7, #12] + 8005228: f023 0303 bic.w r3, r3, #3 + 800522c: 60fb str r3, [r7, #12] /* Set SW[1:0] bits according to RCC_SYSCLKSource value */ tmpreg |= RCC_SYSCLKSource; - 8002b02: 68fa ldr r2, [r7, #12] - 8002b04: 687b ldr r3, [r7, #4] - 8002b06: 4313 orrs r3, r2 - 8002b08: 60fb str r3, [r7, #12] + 800522e: 68fa ldr r2, [r7, #12] + 8005230: 687b ldr r3, [r7, #4] + 8005232: 4313 orrs r3, r2 + 8005234: 60fb str r3, [r7, #12] /* Store the new value */ RCC->CFGR = tmpreg; - 8002b0a: 4a04 ldr r2, [pc, #16] ; (8002b1c ) - 8002b0c: 68fb ldr r3, [r7, #12] - 8002b0e: 6093 str r3, [r2, #8] -} - 8002b10: bf00 nop - 8002b12: 3714 adds r7, #20 - 8002b14: 46bd mov sp, r7 - 8002b16: f85d 7b04 ldr.w r7, [sp], #4 - 8002b1a: 4770 bx lr - 8002b1c: 40023800 .word 0x40023800 - -08002b20 : + 8005236: 4a04 ldr r2, [pc, #16] ; (8005248 ) + 8005238: 68fb ldr r3, [r7, #12] + 800523a: 6093 str r3, [r2, #8] +} + 800523c: bf00 nop + 800523e: 3714 adds r7, #20 + 8005240: 46bd mov sp, r7 + 8005242: f85d 7b04 ldr.w r7, [sp], #4 + 8005246: 4770 bx lr + 8005248: 40023800 .word 0x40023800 + +0800524c : * configuration based on this function will be incorrect. * * @retval None */ void RCC_GetClocksFreq(RCC_ClocksTypeDef* RCC_Clocks) { - 8002b20: b480 push {r7} - 8002b22: b089 sub sp, #36 ; 0x24 - 8002b24: af00 add r7, sp, #0 - 8002b26: 6078 str r0, [r7, #4] + 800524c: b480 push {r7} + 800524e: b089 sub sp, #36 ; 0x24 + 8005250: af00 add r7, sp, #0 + 8005252: 6078 str r0, [r7, #4] uint32_t tmp = 0, presc = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2; - 8002b28: 2300 movs r3, #0 - 8002b2a: 61bb str r3, [r7, #24] - 8002b2c: 2300 movs r3, #0 - 8002b2e: 617b str r3, [r7, #20] - 8002b30: 2300 movs r3, #0 - 8002b32: 61fb str r3, [r7, #28] - 8002b34: 2302 movs r3, #2 - 8002b36: 613b str r3, [r7, #16] - 8002b38: 2300 movs r3, #0 - 8002b3a: 60fb str r3, [r7, #12] - 8002b3c: 2302 movs r3, #2 - 8002b3e: 60bb str r3, [r7, #8] + 8005254: 2300 movs r3, #0 + 8005256: 61bb str r3, [r7, #24] + 8005258: 2300 movs r3, #0 + 800525a: 617b str r3, [r7, #20] + 800525c: 2300 movs r3, #0 + 800525e: 61fb str r3, [r7, #28] + 8005260: 2302 movs r3, #2 + 8005262: 613b str r3, [r7, #16] + 8005264: 2300 movs r3, #0 + 8005266: 60fb str r3, [r7, #12] + 8005268: 2302 movs r3, #2 + 800526a: 60bb str r3, [r7, #8] #if defined(STM32F412xG) || defined(STM32F413_423xx) || defined(STM32F446xx) uint32_t pllr = 2; #endif /* STM32F412xG || STM32F413_423xx || STM32F446xx */ /* Get SYSCLK source -------------------------------------------------------*/ tmp = RCC->CFGR & RCC_CFGR_SWS; - 8002b40: 4b47 ldr r3, [pc, #284] ; (8002c60 ) - 8002b42: 689b ldr r3, [r3, #8] - 8002b44: f003 030c and.w r3, r3, #12 - 8002b48: 61bb str r3, [r7, #24] + 800526c: 4b47 ldr r3, [pc, #284] ; (800538c ) + 800526e: 689b ldr r3, [r3, #8] + 8005270: f003 030c and.w r3, r3, #12 + 8005274: 61bb str r3, [r7, #24] switch (tmp) - 8002b4a: 69bb ldr r3, [r7, #24] - 8002b4c: 2b04 cmp r3, #4 - 8002b4e: d007 beq.n 8002b60 - 8002b50: 2b08 cmp r3, #8 - 8002b52: d009 beq.n 8002b68 - 8002b54: 2b00 cmp r3, #0 - 8002b56: d13d bne.n 8002bd4 + 8005276: 69bb ldr r3, [r7, #24] + 8005278: 2b04 cmp r3, #4 + 800527a: d007 beq.n 800528c + 800527c: 2b08 cmp r3, #8 + 800527e: d009 beq.n 8005294 + 8005280: 2b00 cmp r3, #0 + 8005282: d13d bne.n 8005300 { case 0x00: /* HSI used as system clock source */ RCC_Clocks->SYSCLK_Frequency = HSI_VALUE; - 8002b58: 687b ldr r3, [r7, #4] - 8002b5a: 4a42 ldr r2, [pc, #264] ; (8002c64 ) - 8002b5c: 601a str r2, [r3, #0] + 8005284: 687b ldr r3, [r7, #4] + 8005286: 4a42 ldr r2, [pc, #264] ; (8005390 ) + 8005288: 601a str r2, [r3, #0] break; - 8002b5e: e03d b.n 8002bdc + 800528a: e03d b.n 8005308 case 0x04: /* HSE used as system clock source */ RCC_Clocks->SYSCLK_Frequency = HSE_VALUE; - 8002b60: 687b ldr r3, [r7, #4] - 8002b62: 4a41 ldr r2, [pc, #260] ; (8002c68 ) - 8002b64: 601a str r2, [r3, #0] + 800528c: 687b ldr r3, [r7, #4] + 800528e: 4a41 ldr r2, [pc, #260] ; (8005394 ) + 8005290: 601a str r2, [r3, #0] break; - 8002b66: e039 b.n 8002bdc + 8005292: e039 b.n 8005308 case 0x08: /* PLL P used as system clock source */ /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLLM) * PLLN SYSCLK = PLL_VCO / PLLP */ pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; - 8002b68: 4b3d ldr r3, [pc, #244] ; (8002c60 ) - 8002b6a: 685b ldr r3, [r3, #4] - 8002b6c: 0d9b lsrs r3, r3, #22 - 8002b6e: f003 0301 and.w r3, r3, #1 - 8002b72: 60fb str r3, [r7, #12] + 8005294: 4b3d ldr r3, [pc, #244] ; (800538c ) + 8005296: 685b ldr r3, [r3, #4] + 8005298: 0d9b lsrs r3, r3, #22 + 800529a: f003 0301 and.w r3, r3, #1 + 800529e: 60fb str r3, [r7, #12] pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; - 8002b74: 4b3a ldr r3, [pc, #232] ; (8002c60 ) - 8002b76: 685b ldr r3, [r3, #4] - 8002b78: f003 033f and.w r3, r3, #63 ; 0x3f - 8002b7c: 60bb str r3, [r7, #8] + 80052a0: 4b3a ldr r3, [pc, #232] ; (800538c ) + 80052a2: 685b ldr r3, [r3, #4] + 80052a4: f003 033f and.w r3, r3, #63 ; 0x3f + 80052a8: 60bb str r3, [r7, #8] if (pllsource != 0) - 8002b7e: 68fb ldr r3, [r7, #12] - 8002b80: 2b00 cmp r3, #0 - 8002b82: d00c beq.n 8002b9e + 80052aa: 68fb ldr r3, [r7, #12] + 80052ac: 2b00 cmp r3, #0 + 80052ae: d00c beq.n 80052ca { /* HSE used as PLL clock source */ pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); - 8002b84: 4a38 ldr r2, [pc, #224] ; (8002c68 ) - 8002b86: 68bb ldr r3, [r7, #8] - 8002b88: fbb2 f3f3 udiv r3, r2, r3 - 8002b8c: 4a34 ldr r2, [pc, #208] ; (8002c60 ) - 8002b8e: 6852 ldr r2, [r2, #4] - 8002b90: 0992 lsrs r2, r2, #6 - 8002b92: f3c2 0208 ubfx r2, r2, #0, #9 - 8002b96: fb02 f303 mul.w r3, r2, r3 - 8002b9a: 61fb str r3, [r7, #28] - 8002b9c: e00b b.n 8002bb6 + 80052b0: 4a38 ldr r2, [pc, #224] ; (8005394 ) + 80052b2: 68bb ldr r3, [r7, #8] + 80052b4: fbb2 f3f3 udiv r3, r2, r3 + 80052b8: 4a34 ldr r2, [pc, #208] ; (800538c ) + 80052ba: 6852 ldr r2, [r2, #4] + 80052bc: 0992 lsrs r2, r2, #6 + 80052be: f3c2 0208 ubfx r2, r2, #0, #9 + 80052c2: fb02 f303 mul.w r3, r2, r3 + 80052c6: 61fb str r3, [r7, #28] + 80052c8: e00b b.n 80052e2 } else { /* HSI used as PLL clock source */ pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); - 8002b9e: 4a31 ldr r2, [pc, #196] ; (8002c64 ) - 8002ba0: 68bb ldr r3, [r7, #8] - 8002ba2: fbb2 f3f3 udiv r3, r2, r3 - 8002ba6: 4a2e ldr r2, [pc, #184] ; (8002c60 ) - 8002ba8: 6852 ldr r2, [r2, #4] - 8002baa: 0992 lsrs r2, r2, #6 - 8002bac: f3c2 0208 ubfx r2, r2, #0, #9 - 8002bb0: fb02 f303 mul.w r3, r2, r3 - 8002bb4: 61fb str r3, [r7, #28] + 80052ca: 4a31 ldr r2, [pc, #196] ; (8005390 ) + 80052cc: 68bb ldr r3, [r7, #8] + 80052ce: fbb2 f3f3 udiv r3, r2, r3 + 80052d2: 4a2e ldr r2, [pc, #184] ; (800538c ) + 80052d4: 6852 ldr r2, [r2, #4] + 80052d6: 0992 lsrs r2, r2, #6 + 80052d8: f3c2 0208 ubfx r2, r2, #0, #9 + 80052dc: fb02 f303 mul.w r3, r2, r3 + 80052e0: 61fb str r3, [r7, #28] } pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; - 8002bb6: 4b2a ldr r3, [pc, #168] ; (8002c60 ) - 8002bb8: 685b ldr r3, [r3, #4] - 8002bba: 0c1b lsrs r3, r3, #16 - 8002bbc: f003 0303 and.w r3, r3, #3 - 8002bc0: 3301 adds r3, #1 - 8002bc2: 005b lsls r3, r3, #1 - 8002bc4: 613b str r3, [r7, #16] + 80052e2: 4b2a ldr r3, [pc, #168] ; (800538c ) + 80052e4: 685b ldr r3, [r3, #4] + 80052e6: 0c1b lsrs r3, r3, #16 + 80052e8: f003 0303 and.w r3, r3, #3 + 80052ec: 3301 adds r3, #1 + 80052ee: 005b lsls r3, r3, #1 + 80052f0: 613b str r3, [r7, #16] RCC_Clocks->SYSCLK_Frequency = pllvco/pllp; - 8002bc6: 69fa ldr r2, [r7, #28] - 8002bc8: 693b ldr r3, [r7, #16] - 8002bca: fbb2 f2f3 udiv r2, r2, r3 - 8002bce: 687b ldr r3, [r7, #4] - 8002bd0: 601a str r2, [r3, #0] + 80052f2: 69fa ldr r2, [r7, #28] + 80052f4: 693b ldr r3, [r7, #16] + 80052f6: fbb2 f2f3 udiv r2, r2, r3 + 80052fa: 687b ldr r3, [r7, #4] + 80052fc: 601a str r2, [r3, #0] break; - 8002bd2: e003 b.n 8002bdc + 80052fe: e003 b.n 8005308 RCC_Clocks->SYSCLK_Frequency = pllvco/pllr; break; #endif /* STM32F412xG || STM32F413_423xx || STM32F446xx */ default: RCC_Clocks->SYSCLK_Frequency = HSI_VALUE; - 8002bd4: 687b ldr r3, [r7, #4] - 8002bd6: 4a23 ldr r2, [pc, #140] ; (8002c64 ) - 8002bd8: 601a str r2, [r3, #0] + 8005300: 687b ldr r3, [r7, #4] + 8005302: 4a23 ldr r2, [pc, #140] ; (8005390 ) + 8005304: 601a str r2, [r3, #0] break; - 8002bda: bf00 nop + 8005306: bf00 nop } /* Compute HCLK, PCLK1 and PCLK2 clocks frequencies ------------------------*/ /* Get HCLK prescaler */ tmp = RCC->CFGR & RCC_CFGR_HPRE; - 8002bdc: 4b20 ldr r3, [pc, #128] ; (8002c60 ) - 8002bde: 689b ldr r3, [r3, #8] - 8002be0: f003 03f0 and.w r3, r3, #240 ; 0xf0 - 8002be4: 61bb str r3, [r7, #24] + 8005308: 4b20 ldr r3, [pc, #128] ; (800538c ) + 800530a: 689b ldr r3, [r3, #8] + 800530c: f003 03f0 and.w r3, r3, #240 ; 0xf0 + 8005310: 61bb str r3, [r7, #24] tmp = tmp >> 4; - 8002be6: 69bb ldr r3, [r7, #24] - 8002be8: 091b lsrs r3, r3, #4 - 8002bea: 61bb str r3, [r7, #24] + 8005312: 69bb ldr r3, [r7, #24] + 8005314: 091b lsrs r3, r3, #4 + 8005316: 61bb str r3, [r7, #24] presc = APBAHBPrescTable[tmp]; - 8002bec: 4a1f ldr r2, [pc, #124] ; (8002c6c ) - 8002bee: 69bb ldr r3, [r7, #24] - 8002bf0: 4413 add r3, r2 - 8002bf2: 781b ldrb r3, [r3, #0] - 8002bf4: b2db uxtb r3, r3 - 8002bf6: 617b str r3, [r7, #20] + 8005318: 4a1f ldr r2, [pc, #124] ; (8005398 ) + 800531a: 69bb ldr r3, [r7, #24] + 800531c: 4413 add r3, r2 + 800531e: 781b ldrb r3, [r3, #0] + 8005320: b2db uxtb r3, r3 + 8005322: 617b str r3, [r7, #20] /* HCLK clock frequency */ RCC_Clocks->HCLK_Frequency = RCC_Clocks->SYSCLK_Frequency >> presc; - 8002bf8: 687b ldr r3, [r7, #4] - 8002bfa: 681a ldr r2, [r3, #0] - 8002bfc: 697b ldr r3, [r7, #20] - 8002bfe: 40da lsrs r2, r3 - 8002c00: 687b ldr r3, [r7, #4] - 8002c02: 605a str r2, [r3, #4] + 8005324: 687b ldr r3, [r7, #4] + 8005326: 681a ldr r2, [r3, #0] + 8005328: 697b ldr r3, [r7, #20] + 800532a: 40da lsrs r2, r3 + 800532c: 687b ldr r3, [r7, #4] + 800532e: 605a str r2, [r3, #4] /* Get PCLK1 prescaler */ tmp = RCC->CFGR & RCC_CFGR_PPRE1; - 8002c04: 4b16 ldr r3, [pc, #88] ; (8002c60 ) - 8002c06: 689b ldr r3, [r3, #8] - 8002c08: f403 53e0 and.w r3, r3, #7168 ; 0x1c00 - 8002c0c: 61bb str r3, [r7, #24] + 8005330: 4b16 ldr r3, [pc, #88] ; (800538c ) + 8005332: 689b ldr r3, [r3, #8] + 8005334: f403 53e0 and.w r3, r3, #7168 ; 0x1c00 + 8005338: 61bb str r3, [r7, #24] tmp = tmp >> 10; - 8002c0e: 69bb ldr r3, [r7, #24] - 8002c10: 0a9b lsrs r3, r3, #10 - 8002c12: 61bb str r3, [r7, #24] + 800533a: 69bb ldr r3, [r7, #24] + 800533c: 0a9b lsrs r3, r3, #10 + 800533e: 61bb str r3, [r7, #24] presc = APBAHBPrescTable[tmp]; - 8002c14: 4a15 ldr r2, [pc, #84] ; (8002c6c ) - 8002c16: 69bb ldr r3, [r7, #24] - 8002c18: 4413 add r3, r2 - 8002c1a: 781b ldrb r3, [r3, #0] - 8002c1c: b2db uxtb r3, r3 - 8002c1e: 617b str r3, [r7, #20] + 8005340: 4a15 ldr r2, [pc, #84] ; (8005398 ) + 8005342: 69bb ldr r3, [r7, #24] + 8005344: 4413 add r3, r2 + 8005346: 781b ldrb r3, [r3, #0] + 8005348: b2db uxtb r3, r3 + 800534a: 617b str r3, [r7, #20] /* PCLK1 clock frequency */ RCC_Clocks->PCLK1_Frequency = RCC_Clocks->HCLK_Frequency >> presc; - 8002c20: 687b ldr r3, [r7, #4] - 8002c22: 685a ldr r2, [r3, #4] - 8002c24: 697b ldr r3, [r7, #20] - 8002c26: 40da lsrs r2, r3 - 8002c28: 687b ldr r3, [r7, #4] - 8002c2a: 609a str r2, [r3, #8] + 800534c: 687b ldr r3, [r7, #4] + 800534e: 685a ldr r2, [r3, #4] + 8005350: 697b ldr r3, [r7, #20] + 8005352: 40da lsrs r2, r3 + 8005354: 687b ldr r3, [r7, #4] + 8005356: 609a str r2, [r3, #8] /* Get PCLK2 prescaler */ tmp = RCC->CFGR & RCC_CFGR_PPRE2; - 8002c2c: 4b0c ldr r3, [pc, #48] ; (8002c60 ) - 8002c2e: 689b ldr r3, [r3, #8] - 8002c30: f403 4360 and.w r3, r3, #57344 ; 0xe000 - 8002c34: 61bb str r3, [r7, #24] + 8005358: 4b0c ldr r3, [pc, #48] ; (800538c ) + 800535a: 689b ldr r3, [r3, #8] + 800535c: f403 4360 and.w r3, r3, #57344 ; 0xe000 + 8005360: 61bb str r3, [r7, #24] tmp = tmp >> 13; - 8002c36: 69bb ldr r3, [r7, #24] - 8002c38: 0b5b lsrs r3, r3, #13 - 8002c3a: 61bb str r3, [r7, #24] + 8005362: 69bb ldr r3, [r7, #24] + 8005364: 0b5b lsrs r3, r3, #13 + 8005366: 61bb str r3, [r7, #24] presc = APBAHBPrescTable[tmp]; - 8002c3c: 4a0b ldr r2, [pc, #44] ; (8002c6c ) - 8002c3e: 69bb ldr r3, [r7, #24] - 8002c40: 4413 add r3, r2 - 8002c42: 781b ldrb r3, [r3, #0] - 8002c44: b2db uxtb r3, r3 - 8002c46: 617b str r3, [r7, #20] + 8005368: 4a0b ldr r2, [pc, #44] ; (8005398 ) + 800536a: 69bb ldr r3, [r7, #24] + 800536c: 4413 add r3, r2 + 800536e: 781b ldrb r3, [r3, #0] + 8005370: b2db uxtb r3, r3 + 8005372: 617b str r3, [r7, #20] /* PCLK2 clock frequency */ RCC_Clocks->PCLK2_Frequency = RCC_Clocks->HCLK_Frequency >> presc; - 8002c48: 687b ldr r3, [r7, #4] - 8002c4a: 685a ldr r2, [r3, #4] - 8002c4c: 697b ldr r3, [r7, #20] - 8002c4e: 40da lsrs r2, r3 - 8002c50: 687b ldr r3, [r7, #4] - 8002c52: 60da str r2, [r3, #12] -} - 8002c54: bf00 nop - 8002c56: 3724 adds r7, #36 ; 0x24 - 8002c58: 46bd mov sp, r7 - 8002c5a: f85d 7b04 ldr.w r7, [sp], #4 - 8002c5e: 4770 bx lr - 8002c60: 40023800 .word 0x40023800 - 8002c64: 00f42400 .word 0x00f42400 - 8002c68: 017d7840 .word 0x017d7840 - 8002c6c: 20000008 .word 0x20000008 - -08002c70 : + 8005374: 687b ldr r3, [r7, #4] + 8005376: 685a ldr r2, [r3, #4] + 8005378: 697b ldr r3, [r7, #20] + 800537a: 40da lsrs r2, r3 + 800537c: 687b ldr r3, [r7, #4] + 800537e: 60da str r2, [r3, #12] +} + 8005380: bf00 nop + 8005382: 3724 adds r7, #36 ; 0x24 + 8005384: 46bd mov sp, r7 + 8005386: f85d 7b04 ldr.w r7, [sp], #4 + 800538a: 4770 bx lr + 800538c: 40023800 .word 0x40023800 + 8005390: 00f42400 .word 0x00f42400 + 8005394: 017d7840 .word 0x017d7840 + 8005398: 20000008 .word 0x20000008 + +0800539c : * @param NewState: new state of the specified peripheral clock. * This parameter can be: ENABLE or DISABLE. * @retval None */ void RCC_AHB1PeriphClockCmd(uint32_t RCC_AHB1Periph, FunctionalState NewState) { - 8002c70: b480 push {r7} - 8002c72: b083 sub sp, #12 - 8002c74: af00 add r7, sp, #0 - 8002c76: 6078 str r0, [r7, #4] - 8002c78: 460b mov r3, r1 - 8002c7a: 70fb strb r3, [r7, #3] + 800539c: b480 push {r7} + 800539e: b083 sub sp, #12 + 80053a0: af00 add r7, sp, #0 + 80053a2: 6078 str r0, [r7, #4] + 80053a4: 460b mov r3, r1 + 80053a6: 70fb strb r3, [r7, #3] /* Check the parameters */ assert_param(IS_RCC_AHB1_CLOCK_PERIPH(RCC_AHB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) - 8002c7c: 78fb ldrb r3, [r7, #3] - 8002c7e: 2b00 cmp r3, #0 - 8002c80: d006 beq.n 8002c90 + 80053a8: 78fb ldrb r3, [r7, #3] + 80053aa: 2b00 cmp r3, #0 + 80053ac: d006 beq.n 80053bc { RCC->AHB1ENR |= RCC_AHB1Periph; - 8002c82: 4b0a ldr r3, [pc, #40] ; (8002cac ) - 8002c84: 6b1a ldr r2, [r3, #48] ; 0x30 - 8002c86: 4909 ldr r1, [pc, #36] ; (8002cac ) - 8002c88: 687b ldr r3, [r7, #4] - 8002c8a: 4313 orrs r3, r2 - 8002c8c: 630b str r3, [r1, #48] ; 0x30 + 80053ae: 4b0a ldr r3, [pc, #40] ; (80053d8 ) + 80053b0: 6b1a ldr r2, [r3, #48] ; 0x30 + 80053b2: 4909 ldr r1, [pc, #36] ; (80053d8 ) + 80053b4: 687b ldr r3, [r7, #4] + 80053b6: 4313 orrs r3, r2 + 80053b8: 630b str r3, [r1, #48] ; 0x30 } else { RCC->AHB1ENR &= ~RCC_AHB1Periph; } } - 8002c8e: e006 b.n 8002c9e + 80053ba: e006 b.n 80053ca RCC->AHB1ENR &= ~RCC_AHB1Periph; - 8002c90: 4b06 ldr r3, [pc, #24] ; (8002cac ) - 8002c92: 6b1a ldr r2, [r3, #48] ; 0x30 - 8002c94: 687b ldr r3, [r7, #4] - 8002c96: 43db mvns r3, r3 - 8002c98: 4904 ldr r1, [pc, #16] ; (8002cac ) - 8002c9a: 4013 ands r3, r2 - 8002c9c: 630b str r3, [r1, #48] ; 0x30 -} - 8002c9e: bf00 nop - 8002ca0: 370c adds r7, #12 - 8002ca2: 46bd mov sp, r7 - 8002ca4: f85d 7b04 ldr.w r7, [sp], #4 - 8002ca8: 4770 bx lr - 8002caa: bf00 nop - 8002cac: 40023800 .word 0x40023800 - -08002cb0 : + 80053bc: 4b06 ldr r3, [pc, #24] ; (80053d8 ) + 80053be: 6b1a ldr r2, [r3, #48] ; 0x30 + 80053c0: 687b ldr r3, [r7, #4] + 80053c2: 43db mvns r3, r3 + 80053c4: 4904 ldr r1, [pc, #16] ; (80053d8 ) + 80053c6: 4013 ands r3, r2 + 80053c8: 630b str r3, [r1, #48] ; 0x30 +} + 80053ca: bf00 nop + 80053cc: 370c adds r7, #12 + 80053ce: 46bd mov sp, r7 + 80053d0: f85d 7b04 ldr.w r7, [sp], #4 + 80053d4: 4770 bx lr + 80053d6: bf00 nop + 80053d8: 40023800 .word 0x40023800 + +080053dc : * @param NewState: new state of the specified peripheral clock. * This parameter can be: ENABLE or DISABLE. * @retval None */ void RCC_APB1PeriphClockCmd(uint32_t RCC_APB1Periph, FunctionalState NewState) { - 8002cb0: b480 push {r7} - 8002cb2: b083 sub sp, #12 - 8002cb4: af00 add r7, sp, #0 - 8002cb6: 6078 str r0, [r7, #4] - 8002cb8: 460b mov r3, r1 - 8002cba: 70fb strb r3, [r7, #3] + 80053dc: b480 push {r7} + 80053de: b083 sub sp, #12 + 80053e0: af00 add r7, sp, #0 + 80053e2: 6078 str r0, [r7, #4] + 80053e4: 460b mov r3, r1 + 80053e6: 70fb strb r3, [r7, #3] /* Check the parameters */ assert_param(IS_RCC_APB1_PERIPH(RCC_APB1Periph)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) - 8002cbc: 78fb ldrb r3, [r7, #3] - 8002cbe: 2b00 cmp r3, #0 - 8002cc0: d006 beq.n 8002cd0 + 80053e8: 78fb ldrb r3, [r7, #3] + 80053ea: 2b00 cmp r3, #0 + 80053ec: d006 beq.n 80053fc { RCC->APB1ENR |= RCC_APB1Periph; - 8002cc2: 4b0a ldr r3, [pc, #40] ; (8002cec ) - 8002cc4: 6c1a ldr r2, [r3, #64] ; 0x40 - 8002cc6: 4909 ldr r1, [pc, #36] ; (8002cec ) - 8002cc8: 687b ldr r3, [r7, #4] - 8002cca: 4313 orrs r3, r2 - 8002ccc: 640b str r3, [r1, #64] ; 0x40 + 80053ee: 4b0a ldr r3, [pc, #40] ; (8005418 ) + 80053f0: 6c1a ldr r2, [r3, #64] ; 0x40 + 80053f2: 4909 ldr r1, [pc, #36] ; (8005418 ) + 80053f4: 687b ldr r3, [r7, #4] + 80053f6: 4313 orrs r3, r2 + 80053f8: 640b str r3, [r1, #64] ; 0x40 } else { RCC->APB1ENR &= ~RCC_APB1Periph; } } - 8002cce: e006 b.n 8002cde + 80053fa: e006 b.n 800540a RCC->APB1ENR &= ~RCC_APB1Periph; - 8002cd0: 4b06 ldr r3, [pc, #24] ; (8002cec ) - 8002cd2: 6c1a ldr r2, [r3, #64] ; 0x40 - 8002cd4: 687b ldr r3, [r7, #4] - 8002cd6: 43db mvns r3, r3 - 8002cd8: 4904 ldr r1, [pc, #16] ; (8002cec ) - 8002cda: 4013 ands r3, r2 - 8002cdc: 640b str r3, [r1, #64] ; 0x40 -} - 8002cde: bf00 nop - 8002ce0: 370c adds r7, #12 - 8002ce2: 46bd mov sp, r7 - 8002ce4: f85d 7b04 ldr.w r7, [sp], #4 - 8002ce8: 4770 bx lr - 8002cea: bf00 nop - 8002cec: 40023800 .word 0x40023800 - -08002cf0 : + 80053fc: 4b06 ldr r3, [pc, #24] ; (8005418 ) + 80053fe: 6c1a ldr r2, [r3, #64] ; 0x40 + 8005400: 687b ldr r3, [r7, #4] + 8005402: 43db mvns r3, r3 + 8005404: 4904 ldr r1, [pc, #16] ; (8005418 ) + 8005406: 4013 ands r3, r2 + 8005408: 640b str r3, [r1, #64] ; 0x40 +} + 800540a: bf00 nop + 800540c: 370c adds r7, #12 + 800540e: 46bd mov sp, r7 + 8005410: f85d 7b04 ldr.w r7, [sp], #4 + 8005414: 4770 bx lr + 8005416: bf00 nop + 8005418: 40023800 .word 0x40023800 + +0800541c : + * @param RTC_TimeStruct: pointer to a RTC_TimeTypeDef structure that will + * contain the returned current time configuration. + * @retval None + */ +void RTC_GetTime(uint32_t RTC_Format, RTC_TimeTypeDef* RTC_TimeStruct) +{ + 800541c: b580 push {r7, lr} + 800541e: b084 sub sp, #16 + 8005420: af00 add r7, sp, #0 + 8005422: 6078 str r0, [r7, #4] + 8005424: 6039 str r1, [r7, #0] + uint32_t tmpreg = 0; + 8005426: 2300 movs r3, #0 + 8005428: 60fb str r3, [r7, #12] + + /* Check the parameters */ + assert_param(IS_RTC_FORMAT(RTC_Format)); + + /* Get the RTC_TR register */ + tmpreg = (uint32_t)(RTC->TR & RTC_TR_RESERVED_MASK); + 800542a: 4b24 ldr r3, [pc, #144] ; (80054bc ) + 800542c: 681b ldr r3, [r3, #0] + 800542e: f003 337f and.w r3, r3, #2139062143 ; 0x7f7f7f7f + 8005432: f023 43fe bic.w r3, r3, #2130706432 ; 0x7f000000 + 8005436: 60fb str r3, [r7, #12] + + /* Fill the structure fields with the read parameters */ + RTC_TimeStruct->RTC_Hours = (uint8_t)((tmpreg & (RTC_TR_HT | RTC_TR_HU)) >> 16); + 8005438: 68fb ldr r3, [r7, #12] + 800543a: 0c1b lsrs r3, r3, #16 + 800543c: b2db uxtb r3, r3 + 800543e: f003 033f and.w r3, r3, #63 ; 0x3f + 8005442: b2da uxtb r2, r3 + 8005444: 683b ldr r3, [r7, #0] + 8005446: 701a strb r2, [r3, #0] + RTC_TimeStruct->RTC_Minutes = (uint8_t)((tmpreg & (RTC_TR_MNT | RTC_TR_MNU)) >>8); + 8005448: 68fb ldr r3, [r7, #12] + 800544a: 0a1b lsrs r3, r3, #8 + 800544c: b2db uxtb r3, r3 + 800544e: f003 037f and.w r3, r3, #127 ; 0x7f + 8005452: b2da uxtb r2, r3 + 8005454: 683b ldr r3, [r7, #0] + 8005456: 705a strb r2, [r3, #1] + RTC_TimeStruct->RTC_Seconds = (uint8_t)(tmpreg & (RTC_TR_ST | RTC_TR_SU)); + 8005458: 68fb ldr r3, [r7, #12] + 800545a: b2db uxtb r3, r3 + 800545c: f003 037f and.w r3, r3, #127 ; 0x7f + 8005460: b2da uxtb r2, r3 + 8005462: 683b ldr r3, [r7, #0] + 8005464: 709a strb r2, [r3, #2] + RTC_TimeStruct->RTC_H12 = (uint8_t)((tmpreg & (RTC_TR_PM)) >> 16); + 8005466: 68fb ldr r3, [r7, #12] + 8005468: 0c1b lsrs r3, r3, #16 + 800546a: b2db uxtb r3, r3 + 800546c: f003 0340 and.w r3, r3, #64 ; 0x40 + 8005470: b2da uxtb r2, r3 + 8005472: 683b ldr r3, [r7, #0] + 8005474: 70da strb r2, [r3, #3] + + /* Check the input parameters format */ + if (RTC_Format == RTC_Format_BIN) + 8005476: 687b ldr r3, [r7, #4] + 8005478: 2b00 cmp r3, #0 + 800547a: d11a bne.n 80054b2 + { + /* Convert the structure parameters to Binary format */ + RTC_TimeStruct->RTC_Hours = (uint8_t)RTC_Bcd2ToByte(RTC_TimeStruct->RTC_Hours); + 800547c: 683b ldr r3, [r7, #0] + 800547e: 781b ldrb r3, [r3, #0] + 8005480: 4618 mov r0, r3 + 8005482: f000 f86b bl 800555c + 8005486: 4603 mov r3, r0 + 8005488: 461a mov r2, r3 + 800548a: 683b ldr r3, [r7, #0] + 800548c: 701a strb r2, [r3, #0] + RTC_TimeStruct->RTC_Minutes = (uint8_t)RTC_Bcd2ToByte(RTC_TimeStruct->RTC_Minutes); + 800548e: 683b ldr r3, [r7, #0] + 8005490: 785b ldrb r3, [r3, #1] + 8005492: 4618 mov r0, r3 + 8005494: f000 f862 bl 800555c + 8005498: 4603 mov r3, r0 + 800549a: 461a mov r2, r3 + 800549c: 683b ldr r3, [r7, #0] + 800549e: 705a strb r2, [r3, #1] + RTC_TimeStruct->RTC_Seconds = (uint8_t)RTC_Bcd2ToByte(RTC_TimeStruct->RTC_Seconds); + 80054a0: 683b ldr r3, [r7, #0] + 80054a2: 789b ldrb r3, [r3, #2] + 80054a4: 4618 mov r0, r3 + 80054a6: f000 f859 bl 800555c + 80054aa: 4603 mov r3, r0 + 80054ac: 461a mov r2, r3 + 80054ae: 683b ldr r3, [r7, #0] + 80054b0: 709a strb r2, [r3, #2] + } +} + 80054b2: bf00 nop + 80054b4: 3710 adds r7, #16 + 80054b6: 46bd mov sp, r7 + 80054b8: bd80 pop {r7, pc} + 80054ba: bf00 nop + 80054bc: 40002800 .word 0x40002800 + +080054c0 : + * @param RTC_DateStruct: pointer to a RTC_DateTypeDef structure that will + * contain the returned current date configuration. + * @retval None + */ +void RTC_GetDate(uint32_t RTC_Format, RTC_DateTypeDef* RTC_DateStruct) +{ + 80054c0: b580 push {r7, lr} + 80054c2: b084 sub sp, #16 + 80054c4: af00 add r7, sp, #0 + 80054c6: 6078 str r0, [r7, #4] + 80054c8: 6039 str r1, [r7, #0] + uint32_t tmpreg = 0; + 80054ca: 2300 movs r3, #0 + 80054cc: 60fb str r3, [r7, #12] + + /* Check the parameters */ + assert_param(IS_RTC_FORMAT(RTC_Format)); + + /* Get the RTC_TR register */ + tmpreg = (uint32_t)(RTC->DR & RTC_DR_RESERVED_MASK); + 80054ce: 4b22 ldr r3, [pc, #136] ; (8005558 ) + 80054d0: 685b ldr r3, [r3, #4] + 80054d2: f023 437f bic.w r3, r3, #4278190080 ; 0xff000000 + 80054d6: f023 03c0 bic.w r3, r3, #192 ; 0xc0 + 80054da: 60fb str r3, [r7, #12] + + /* Fill the structure fields with the read parameters */ + RTC_DateStruct->RTC_Year = (uint8_t)((tmpreg & (RTC_DR_YT | RTC_DR_YU)) >> 16); + 80054dc: 68fb ldr r3, [r7, #12] + 80054de: 0c1b lsrs r3, r3, #16 + 80054e0: b2da uxtb r2, r3 + 80054e2: 683b ldr r3, [r7, #0] + 80054e4: 70da strb r2, [r3, #3] + RTC_DateStruct->RTC_Month = (uint8_t)((tmpreg & (RTC_DR_MT | RTC_DR_MU)) >> 8); + 80054e6: 68fb ldr r3, [r7, #12] + 80054e8: 0a1b lsrs r3, r3, #8 + 80054ea: b2db uxtb r3, r3 + 80054ec: f003 031f and.w r3, r3, #31 + 80054f0: b2da uxtb r2, r3 + 80054f2: 683b ldr r3, [r7, #0] + 80054f4: 705a strb r2, [r3, #1] + RTC_DateStruct->RTC_Date = (uint8_t)(tmpreg & (RTC_DR_DT | RTC_DR_DU)); + 80054f6: 68fb ldr r3, [r7, #12] + 80054f8: b2db uxtb r3, r3 + 80054fa: f003 033f and.w r3, r3, #63 ; 0x3f + 80054fe: b2da uxtb r2, r3 + 8005500: 683b ldr r3, [r7, #0] + 8005502: 709a strb r2, [r3, #2] + RTC_DateStruct->RTC_WeekDay = (uint8_t)((tmpreg & (RTC_DR_WDU)) >> 13); + 8005504: 68fb ldr r3, [r7, #12] + 8005506: 0b5b lsrs r3, r3, #13 + 8005508: b2db uxtb r3, r3 + 800550a: f003 0307 and.w r3, r3, #7 + 800550e: b2da uxtb r2, r3 + 8005510: 683b ldr r3, [r7, #0] + 8005512: 701a strb r2, [r3, #0] + + /* Check the input parameters format */ + if (RTC_Format == RTC_Format_BIN) + 8005514: 687b ldr r3, [r7, #4] + 8005516: 2b00 cmp r3, #0 + 8005518: d11a bne.n 8005550 + { + /* Convert the structure parameters to Binary format */ + RTC_DateStruct->RTC_Year = (uint8_t)RTC_Bcd2ToByte(RTC_DateStruct->RTC_Year); + 800551a: 683b ldr r3, [r7, #0] + 800551c: 78db ldrb r3, [r3, #3] + 800551e: 4618 mov r0, r3 + 8005520: f000 f81c bl 800555c + 8005524: 4603 mov r3, r0 + 8005526: 461a mov r2, r3 + 8005528: 683b ldr r3, [r7, #0] + 800552a: 70da strb r2, [r3, #3] + RTC_DateStruct->RTC_Month = (uint8_t)RTC_Bcd2ToByte(RTC_DateStruct->RTC_Month); + 800552c: 683b ldr r3, [r7, #0] + 800552e: 785b ldrb r3, [r3, #1] + 8005530: 4618 mov r0, r3 + 8005532: f000 f813 bl 800555c + 8005536: 4603 mov r3, r0 + 8005538: 461a mov r2, r3 + 800553a: 683b ldr r3, [r7, #0] + 800553c: 705a strb r2, [r3, #1] + RTC_DateStruct->RTC_Date = (uint8_t)RTC_Bcd2ToByte(RTC_DateStruct->RTC_Date); + 800553e: 683b ldr r3, [r7, #0] + 8005540: 789b ldrb r3, [r3, #2] + 8005542: 4618 mov r0, r3 + 8005544: f000 f80a bl 800555c + 8005548: 4603 mov r3, r0 + 800554a: 461a mov r2, r3 + 800554c: 683b ldr r3, [r7, #0] + 800554e: 709a strb r2, [r3, #2] + } +} + 8005550: bf00 nop + 8005552: 3710 adds r7, #16 + 8005554: 46bd mov sp, r7 + 8005556: bd80 pop {r7, pc} + 8005558: 40002800 .word 0x40002800 + +0800555c : + * @brief Convert from 2 digit BCD to Binary. + * @param Value: BCD value to be converted. + * @retval Converted word + */ +static uint8_t RTC_Bcd2ToByte(uint8_t Value) +{ + 800555c: b480 push {r7} + 800555e: b085 sub sp, #20 + 8005560: af00 add r7, sp, #0 + 8005562: 4603 mov r3, r0 + 8005564: 71fb strb r3, [r7, #7] + uint8_t tmp = 0; + 8005566: 2300 movs r3, #0 + 8005568: 73fb strb r3, [r7, #15] + tmp = ((uint8_t)(Value & (uint8_t)0xF0) >> (uint8_t)0x4) * 10; + 800556a: 79fb ldrb r3, [r7, #7] + 800556c: 091b lsrs r3, r3, #4 + 800556e: b2db uxtb r3, r3 + 8005570: 461a mov r2, r3 + 8005572: 0092 lsls r2, r2, #2 + 8005574: 4413 add r3, r2 + 8005576: 005b lsls r3, r3, #1 + 8005578: 73fb strb r3, [r7, #15] + return (tmp + (Value & (uint8_t)0x0F)); + 800557a: 79fb ldrb r3, [r7, #7] + 800557c: f003 030f and.w r3, r3, #15 + 8005580: b2da uxtb r2, r3 + 8005582: 7bfb ldrb r3, [r7, #15] + 8005584: 4413 add r3, r2 + 8005586: b2db uxtb r3, r3 +} + 8005588: 4618 mov r0, r3 + 800558a: 3714 adds r7, #20 + 800558c: 46bd mov sp, r7 + 800558e: f85d 7b04 ldr.w r7, [sp], #4 + 8005592: 4770 bx lr + +08005594 : * @param USART_InitStruct: pointer to a USART_InitTypeDef structure that contains * the configuration information for the specified USART peripheral. * @retval None */ void USART_Init(USART_TypeDef* USARTx, USART_InitTypeDef* USART_InitStruct) { - 8002cf0: b580 push {r7, lr} - 8002cf2: b08a sub sp, #40 ; 0x28 - 8002cf4: af00 add r7, sp, #0 - 8002cf6: 6078 str r0, [r7, #4] - 8002cf8: 6039 str r1, [r7, #0] + 8005594: b580 push {r7, lr} + 8005596: b08a sub sp, #40 ; 0x28 + 8005598: af00 add r7, sp, #0 + 800559a: 6078 str r0, [r7, #4] + 800559c: 6039 str r1, [r7, #0] uint32_t tmpreg = 0x00, apbclock = 0x00; - 8002cfa: 2300 movs r3, #0 - 8002cfc: 627b str r3, [r7, #36] ; 0x24 - 8002cfe: 2300 movs r3, #0 - 8002d00: 623b str r3, [r7, #32] + 800559e: 2300 movs r3, #0 + 80055a0: 627b str r3, [r7, #36] ; 0x24 + 80055a2: 2300 movs r3, #0 + 80055a4: 623b str r3, [r7, #32] uint32_t integerdivider = 0x00; - 8002d02: 2300 movs r3, #0 - 8002d04: 61fb str r3, [r7, #28] + 80055a6: 2300 movs r3, #0 + 80055a8: 61fb str r3, [r7, #28] uint32_t fractionaldivider = 0x00; - 8002d06: 2300 movs r3, #0 - 8002d08: 61bb str r3, [r7, #24] + 80055aa: 2300 movs r3, #0 + 80055ac: 61bb str r3, [r7, #24] { assert_param(IS_USART_1236_PERIPH(USARTx)); } /*---------------------------- USART CR2 Configuration -----------------------*/ tmpreg = USARTx->CR2; - 8002d0a: 687b ldr r3, [r7, #4] - 8002d0c: 8a1b ldrh r3, [r3, #16] - 8002d0e: b29b uxth r3, r3 - 8002d10: 627b str r3, [r7, #36] ; 0x24 + 80055ae: 687b ldr r3, [r7, #4] + 80055b0: 8a1b ldrh r3, [r3, #16] + 80055b2: b29b uxth r3, r3 + 80055b4: 627b str r3, [r7, #36] ; 0x24 /* Clear STOP[13:12] bits */ tmpreg &= (uint32_t)~((uint32_t)USART_CR2_STOP); - 8002d12: 6a7b ldr r3, [r7, #36] ; 0x24 - 8002d14: f423 5340 bic.w r3, r3, #12288 ; 0x3000 - 8002d18: 627b str r3, [r7, #36] ; 0x24 + 80055b6: 6a7b ldr r3, [r7, #36] ; 0x24 + 80055b8: f423 5340 bic.w r3, r3, #12288 ; 0x3000 + 80055bc: 627b str r3, [r7, #36] ; 0x24 /* Configure the USART Stop Bits, Clock, CPOL, CPHA and LastBit : Set STOP[13:12] bits according to USART_StopBits value */ tmpreg |= (uint32_t)USART_InitStruct->USART_StopBits; - 8002d1a: 683b ldr r3, [r7, #0] - 8002d1c: 88db ldrh r3, [r3, #6] - 8002d1e: 461a mov r2, r3 - 8002d20: 6a7b ldr r3, [r7, #36] ; 0x24 - 8002d22: 4313 orrs r3, r2 - 8002d24: 627b str r3, [r7, #36] ; 0x24 + 80055be: 683b ldr r3, [r7, #0] + 80055c0: 88db ldrh r3, [r3, #6] + 80055c2: 461a mov r2, r3 + 80055c4: 6a7b ldr r3, [r7, #36] ; 0x24 + 80055c6: 4313 orrs r3, r2 + 80055c8: 627b str r3, [r7, #36] ; 0x24 /* Write to USART CR2 */ USARTx->CR2 = (uint16_t)tmpreg; - 8002d26: 6a7b ldr r3, [r7, #36] ; 0x24 - 8002d28: b29a uxth r2, r3 - 8002d2a: 687b ldr r3, [r7, #4] - 8002d2c: 821a strh r2, [r3, #16] + 80055ca: 6a7b ldr r3, [r7, #36] ; 0x24 + 80055cc: b29a uxth r2, r3 + 80055ce: 687b ldr r3, [r7, #4] + 80055d0: 821a strh r2, [r3, #16] /*---------------------------- USART CR1 Configuration -----------------------*/ tmpreg = USARTx->CR1; - 8002d2e: 687b ldr r3, [r7, #4] - 8002d30: 899b ldrh r3, [r3, #12] - 8002d32: b29b uxth r3, r3 - 8002d34: 627b str r3, [r7, #36] ; 0x24 + 80055d2: 687b ldr r3, [r7, #4] + 80055d4: 899b ldrh r3, [r3, #12] + 80055d6: b29b uxth r3, r3 + 80055d8: 627b str r3, [r7, #36] ; 0x24 /* Clear M, PCE, PS, TE and RE bits */ tmpreg &= (uint32_t)~((uint32_t)CR1_CLEAR_MASK); - 8002d36: 6a7b ldr r3, [r7, #36] ; 0x24 - 8002d38: f423 53b0 bic.w r3, r3, #5632 ; 0x1600 - 8002d3c: f023 030c bic.w r3, r3, #12 - 8002d40: 627b str r3, [r7, #36] ; 0x24 + 80055da: 6a7b ldr r3, [r7, #36] ; 0x24 + 80055dc: f423 53b0 bic.w r3, r3, #5632 ; 0x1600 + 80055e0: f023 030c bic.w r3, r3, #12 + 80055e4: 627b str r3, [r7, #36] ; 0x24 /* Configure the USART Word Length, Parity and mode: Set the M bits according to USART_WordLength value Set PCE and PS bits according to USART_Parity value Set TE and RE bits according to USART_Mode value */ tmpreg |= (uint32_t)USART_InitStruct->USART_WordLength | USART_InitStruct->USART_Parity | - 8002d42: 683b ldr r3, [r7, #0] - 8002d44: 889a ldrh r2, [r3, #4] - 8002d46: 683b ldr r3, [r7, #0] - 8002d48: 891b ldrh r3, [r3, #8] - 8002d4a: 4313 orrs r3, r2 - 8002d4c: b29a uxth r2, r3 + 80055e6: 683b ldr r3, [r7, #0] + 80055e8: 889a ldrh r2, [r3, #4] + 80055ea: 683b ldr r3, [r7, #0] + 80055ec: 891b ldrh r3, [r3, #8] + 80055ee: 4313 orrs r3, r2 + 80055f0: b29a uxth r2, r3 USART_InitStruct->USART_Mode; - 8002d4e: 683b ldr r3, [r7, #0] - 8002d50: 895b ldrh r3, [r3, #10] + 80055f2: 683b ldr r3, [r7, #0] + 80055f4: 895b ldrh r3, [r3, #10] tmpreg |= (uint32_t)USART_InitStruct->USART_WordLength | USART_InitStruct->USART_Parity | - 8002d52: 4313 orrs r3, r2 - 8002d54: b29b uxth r3, r3 - 8002d56: 461a mov r2, r3 - 8002d58: 6a7b ldr r3, [r7, #36] ; 0x24 - 8002d5a: 4313 orrs r3, r2 - 8002d5c: 627b str r3, [r7, #36] ; 0x24 + 80055f6: 4313 orrs r3, r2 + 80055f8: b29b uxth r3, r3 + 80055fa: 461a mov r2, r3 + 80055fc: 6a7b ldr r3, [r7, #36] ; 0x24 + 80055fe: 4313 orrs r3, r2 + 8005600: 627b str r3, [r7, #36] ; 0x24 /* Write to USART CR1 */ USARTx->CR1 = (uint16_t)tmpreg; - 8002d5e: 6a7b ldr r3, [r7, #36] ; 0x24 - 8002d60: b29a uxth r2, r3 - 8002d62: 687b ldr r3, [r7, #4] - 8002d64: 819a strh r2, [r3, #12] + 8005602: 6a7b ldr r3, [r7, #36] ; 0x24 + 8005604: b29a uxth r2, r3 + 8005606: 687b ldr r3, [r7, #4] + 8005608: 819a strh r2, [r3, #12] /*---------------------------- USART CR3 Configuration -----------------------*/ tmpreg = USARTx->CR3; - 8002d66: 687b ldr r3, [r7, #4] - 8002d68: 8a9b ldrh r3, [r3, #20] - 8002d6a: b29b uxth r3, r3 - 8002d6c: 627b str r3, [r7, #36] ; 0x24 + 800560a: 687b ldr r3, [r7, #4] + 800560c: 8a9b ldrh r3, [r3, #20] + 800560e: b29b uxth r3, r3 + 8005610: 627b str r3, [r7, #36] ; 0x24 /* Clear CTSE and RTSE bits */ tmpreg &= (uint32_t)~((uint32_t)CR3_CLEAR_MASK); - 8002d6e: 6a7b ldr r3, [r7, #36] ; 0x24 - 8002d70: f423 7340 bic.w r3, r3, #768 ; 0x300 - 8002d74: 627b str r3, [r7, #36] ; 0x24 + 8005612: 6a7b ldr r3, [r7, #36] ; 0x24 + 8005614: f423 7340 bic.w r3, r3, #768 ; 0x300 + 8005618: 627b str r3, [r7, #36] ; 0x24 /* Configure the USART HFC : Set CTSE and RTSE bits according to USART_HardwareFlowControl value */ tmpreg |= USART_InitStruct->USART_HardwareFlowControl; - 8002d76: 683b ldr r3, [r7, #0] - 8002d78: 899b ldrh r3, [r3, #12] - 8002d7a: 461a mov r2, r3 - 8002d7c: 6a7b ldr r3, [r7, #36] ; 0x24 - 8002d7e: 4313 orrs r3, r2 - 8002d80: 627b str r3, [r7, #36] ; 0x24 + 800561a: 683b ldr r3, [r7, #0] + 800561c: 899b ldrh r3, [r3, #12] + 800561e: 461a mov r2, r3 + 8005620: 6a7b ldr r3, [r7, #36] ; 0x24 + 8005622: 4313 orrs r3, r2 + 8005624: 627b str r3, [r7, #36] ; 0x24 /* Write to USART CR3 */ USARTx->CR3 = (uint16_t)tmpreg; - 8002d82: 6a7b ldr r3, [r7, #36] ; 0x24 - 8002d84: b29a uxth r2, r3 - 8002d86: 687b ldr r3, [r7, #4] - 8002d88: 829a strh r2, [r3, #20] + 8005626: 6a7b ldr r3, [r7, #36] ; 0x24 + 8005628: b29a uxth r2, r3 + 800562a: 687b ldr r3, [r7, #4] + 800562c: 829a strh r2, [r3, #20] /*---------------------------- USART BRR Configuration -----------------------*/ /* Configure the USART Baud Rate */ RCC_GetClocksFreq(&RCC_ClocksStatus); - 8002d8a: f107 0308 add.w r3, r7, #8 - 8002d8e: 4618 mov r0, r3 - 8002d90: f7ff fec6 bl 8002b20 + 800562e: f107 0308 add.w r3, r7, #8 + 8005632: 4618 mov r0, r3 + 8005634: f7ff fe0a bl 800524c if ((USARTx == USART1) || (USARTx == USART6)) - 8002d94: 687b ldr r3, [r7, #4] - 8002d96: 4a30 ldr r2, [pc, #192] ; (8002e58 ) - 8002d98: 4293 cmp r3, r2 - 8002d9a: d003 beq.n 8002da4 - 8002d9c: 687b ldr r3, [r7, #4] - 8002d9e: 4a2f ldr r2, [pc, #188] ; (8002e5c ) - 8002da0: 4293 cmp r3, r2 - 8002da2: d102 bne.n 8002daa + 8005638: 687b ldr r3, [r7, #4] + 800563a: 4a30 ldr r2, [pc, #192] ; (80056fc ) + 800563c: 4293 cmp r3, r2 + 800563e: d003 beq.n 8005648 + 8005640: 687b ldr r3, [r7, #4] + 8005642: 4a2f ldr r2, [pc, #188] ; (8005700 ) + 8005644: 4293 cmp r3, r2 + 8005646: d102 bne.n 800564e { apbclock = RCC_ClocksStatus.PCLK2_Frequency; - 8002da4: 697b ldr r3, [r7, #20] - 8002da6: 623b str r3, [r7, #32] - 8002da8: e001 b.n 8002dae + 8005648: 697b ldr r3, [r7, #20] + 800564a: 623b str r3, [r7, #32] + 800564c: e001 b.n 8005652 } else { apbclock = RCC_ClocksStatus.PCLK1_Frequency; - 8002daa: 693b ldr r3, [r7, #16] - 8002dac: 623b str r3, [r7, #32] + 800564e: 693b ldr r3, [r7, #16] + 8005650: 623b str r3, [r7, #32] } /* Determine the integer part */ if ((USARTx->CR1 & USART_CR1_OVER8) != 0) - 8002dae: 687b ldr r3, [r7, #4] - 8002db0: 899b ldrh r3, [r3, #12] - 8002db2: b29b uxth r3, r3 - 8002db4: b21b sxth r3, r3 - 8002db6: 2b00 cmp r3, #0 - 8002db8: da0c bge.n 8002dd4 + 8005652: 687b ldr r3, [r7, #4] + 8005654: 899b ldrh r3, [r3, #12] + 8005656: b29b uxth r3, r3 + 8005658: b21b sxth r3, r3 + 800565a: 2b00 cmp r3, #0 + 800565c: da0c bge.n 8005678 { /* Integer part computing in case Oversampling mode is 8 Samples */ integerdivider = ((25 * apbclock) / (2 * (USART_InitStruct->USART_BaudRate))); - 8002dba: 6a3a ldr r2, [r7, #32] - 8002dbc: 4613 mov r3, r2 - 8002dbe: 009b lsls r3, r3, #2 - 8002dc0: 4413 add r3, r2 - 8002dc2: 009a lsls r2, r3, #2 - 8002dc4: 441a add r2, r3 - 8002dc6: 683b ldr r3, [r7, #0] - 8002dc8: 681b ldr r3, [r3, #0] - 8002dca: 005b lsls r3, r3, #1 - 8002dcc: fbb2 f3f3 udiv r3, r2, r3 - 8002dd0: 61fb str r3, [r7, #28] - 8002dd2: e00b b.n 8002dec + 800565e: 6a3a ldr r2, [r7, #32] + 8005660: 4613 mov r3, r2 + 8005662: 009b lsls r3, r3, #2 + 8005664: 4413 add r3, r2 + 8005666: 009a lsls r2, r3, #2 + 8005668: 441a add r2, r3 + 800566a: 683b ldr r3, [r7, #0] + 800566c: 681b ldr r3, [r3, #0] + 800566e: 005b lsls r3, r3, #1 + 8005670: fbb2 f3f3 udiv r3, r2, r3 + 8005674: 61fb str r3, [r7, #28] + 8005676: e00b b.n 8005690 } else /* if ((USARTx->CR1 & USART_CR1_OVER8) == 0) */ { /* Integer part computing in case Oversampling mode is 16 Samples */ integerdivider = ((25 * apbclock) / (4 * (USART_InitStruct->USART_BaudRate))); - 8002dd4: 6a3a ldr r2, [r7, #32] - 8002dd6: 4613 mov r3, r2 - 8002dd8: 009b lsls r3, r3, #2 - 8002dda: 4413 add r3, r2 - 8002ddc: 009a lsls r2, r3, #2 - 8002dde: 441a add r2, r3 - 8002de0: 683b ldr r3, [r7, #0] - 8002de2: 681b ldr r3, [r3, #0] - 8002de4: 009b lsls r3, r3, #2 - 8002de6: fbb2 f3f3 udiv r3, r2, r3 - 8002dea: 61fb str r3, [r7, #28] + 8005678: 6a3a ldr r2, [r7, #32] + 800567a: 4613 mov r3, r2 + 800567c: 009b lsls r3, r3, #2 + 800567e: 4413 add r3, r2 + 8005680: 009a lsls r2, r3, #2 + 8005682: 441a add r2, r3 + 8005684: 683b ldr r3, [r7, #0] + 8005686: 681b ldr r3, [r3, #0] + 8005688: 009b lsls r3, r3, #2 + 800568a: fbb2 f3f3 udiv r3, r2, r3 + 800568e: 61fb str r3, [r7, #28] } tmpreg = (integerdivider / 100) << 4; - 8002dec: 69fb ldr r3, [r7, #28] - 8002dee: 4a1c ldr r2, [pc, #112] ; (8002e60 ) - 8002df0: fba2 2303 umull r2, r3, r2, r3 - 8002df4: 095b lsrs r3, r3, #5 - 8002df6: 011b lsls r3, r3, #4 - 8002df8: 627b str r3, [r7, #36] ; 0x24 + 8005690: 69fb ldr r3, [r7, #28] + 8005692: 4a1c ldr r2, [pc, #112] ; (8005704 ) + 8005694: fba2 2303 umull r2, r3, r2, r3 + 8005698: 095b lsrs r3, r3, #5 + 800569a: 011b lsls r3, r3, #4 + 800569c: 627b str r3, [r7, #36] ; 0x24 /* Determine the fractional part */ fractionaldivider = integerdivider - (100 * (tmpreg >> 4)); - 8002dfa: 6a7b ldr r3, [r7, #36] ; 0x24 - 8002dfc: 091b lsrs r3, r3, #4 - 8002dfe: 2264 movs r2, #100 ; 0x64 - 8002e00: fb02 f303 mul.w r3, r2, r3 - 8002e04: 69fa ldr r2, [r7, #28] - 8002e06: 1ad3 subs r3, r2, r3 - 8002e08: 61bb str r3, [r7, #24] + 800569e: 6a7b ldr r3, [r7, #36] ; 0x24 + 80056a0: 091b lsrs r3, r3, #4 + 80056a2: 2264 movs r2, #100 ; 0x64 + 80056a4: fb02 f303 mul.w r3, r2, r3 + 80056a8: 69fa ldr r2, [r7, #28] + 80056aa: 1ad3 subs r3, r2, r3 + 80056ac: 61bb str r3, [r7, #24] /* Implement the fractional part in the register */ if ((USARTx->CR1 & USART_CR1_OVER8) != 0) - 8002e0a: 687b ldr r3, [r7, #4] - 8002e0c: 899b ldrh r3, [r3, #12] - 8002e0e: b29b uxth r3, r3 - 8002e10: b21b sxth r3, r3 - 8002e12: 2b00 cmp r3, #0 - 8002e14: da0c bge.n 8002e30 + 80056ae: 687b ldr r3, [r7, #4] + 80056b0: 899b ldrh r3, [r3, #12] + 80056b2: b29b uxth r3, r3 + 80056b4: b21b sxth r3, r3 + 80056b6: 2b00 cmp r3, #0 + 80056b8: da0c bge.n 80056d4 { tmpreg |= ((((fractionaldivider * 8) + 50) / 100)) & ((uint8_t)0x07); - 8002e16: 69bb ldr r3, [r7, #24] - 8002e18: 00db lsls r3, r3, #3 - 8002e1a: 3332 adds r3, #50 ; 0x32 - 8002e1c: 4a10 ldr r2, [pc, #64] ; (8002e60 ) - 8002e1e: fba2 2303 umull r2, r3, r2, r3 - 8002e22: 095b lsrs r3, r3, #5 - 8002e24: f003 0307 and.w r3, r3, #7 - 8002e28: 6a7a ldr r2, [r7, #36] ; 0x24 - 8002e2a: 4313 orrs r3, r2 - 8002e2c: 627b str r3, [r7, #36] ; 0x24 - 8002e2e: e00b b.n 8002e48 + 80056ba: 69bb ldr r3, [r7, #24] + 80056bc: 00db lsls r3, r3, #3 + 80056be: 3332 adds r3, #50 ; 0x32 + 80056c0: 4a10 ldr r2, [pc, #64] ; (8005704 ) + 80056c2: fba2 2303 umull r2, r3, r2, r3 + 80056c6: 095b lsrs r3, r3, #5 + 80056c8: f003 0307 and.w r3, r3, #7 + 80056cc: 6a7a ldr r2, [r7, #36] ; 0x24 + 80056ce: 4313 orrs r3, r2 + 80056d0: 627b str r3, [r7, #36] ; 0x24 + 80056d2: e00b b.n 80056ec } else /* if ((USARTx->CR1 & USART_CR1_OVER8) == 0) */ { tmpreg |= ((((fractionaldivider * 16) + 50) / 100)) & ((uint8_t)0x0F); - 8002e30: 69bb ldr r3, [r7, #24] - 8002e32: 011b lsls r3, r3, #4 - 8002e34: 3332 adds r3, #50 ; 0x32 - 8002e36: 4a0a ldr r2, [pc, #40] ; (8002e60 ) - 8002e38: fba2 2303 umull r2, r3, r2, r3 - 8002e3c: 095b lsrs r3, r3, #5 - 8002e3e: f003 030f and.w r3, r3, #15 - 8002e42: 6a7a ldr r2, [r7, #36] ; 0x24 - 8002e44: 4313 orrs r3, r2 - 8002e46: 627b str r3, [r7, #36] ; 0x24 + 80056d4: 69bb ldr r3, [r7, #24] + 80056d6: 011b lsls r3, r3, #4 + 80056d8: 3332 adds r3, #50 ; 0x32 + 80056da: 4a0a ldr r2, [pc, #40] ; (8005704 ) + 80056dc: fba2 2303 umull r2, r3, r2, r3 + 80056e0: 095b lsrs r3, r3, #5 + 80056e2: f003 030f and.w r3, r3, #15 + 80056e6: 6a7a ldr r2, [r7, #36] ; 0x24 + 80056e8: 4313 orrs r3, r2 + 80056ea: 627b str r3, [r7, #36] ; 0x24 } /* Write to USART BRR register */ USARTx->BRR = (uint16_t)tmpreg; - 8002e48: 6a7b ldr r3, [r7, #36] ; 0x24 - 8002e4a: b29a uxth r2, r3 - 8002e4c: 687b ldr r3, [r7, #4] - 8002e4e: 811a strh r2, [r3, #8] -} - 8002e50: bf00 nop - 8002e52: 3728 adds r7, #40 ; 0x28 - 8002e54: 46bd mov sp, r7 - 8002e56: bd80 pop {r7, pc} - 8002e58: 40011000 .word 0x40011000 - 8002e5c: 40011400 .word 0x40011400 - 8002e60: 51eb851f .word 0x51eb851f - -08002e64 : + 80056ec: 6a7b ldr r3, [r7, #36] ; 0x24 + 80056ee: b29a uxth r2, r3 + 80056f0: 687b ldr r3, [r7, #4] + 80056f2: 811a strh r2, [r3, #8] +} + 80056f4: bf00 nop + 80056f6: 3728 adds r7, #40 ; 0x28 + 80056f8: 46bd mov sp, r7 + 80056fa: bd80 pop {r7, pc} + 80056fc: 40011000 .word 0x40011000 + 8005700: 40011400 .word 0x40011400 + 8005704: 51eb851f .word 0x51eb851f + +08005708 : * @param NewState: new state of the USARTx peripheral. * This parameter can be: ENABLE or DISABLE. * @retval None */ void USART_Cmd(USART_TypeDef* USARTx, FunctionalState NewState) { - 8002e64: b480 push {r7} - 8002e66: b083 sub sp, #12 - 8002e68: af00 add r7, sp, #0 - 8002e6a: 6078 str r0, [r7, #4] - 8002e6c: 460b mov r3, r1 - 8002e6e: 70fb strb r3, [r7, #3] + 8005708: b480 push {r7} + 800570a: b083 sub sp, #12 + 800570c: af00 add r7, sp, #0 + 800570e: 6078 str r0, [r7, #4] + 8005710: 460b mov r3, r1 + 8005712: 70fb strb r3, [r7, #3] /* Check the parameters */ assert_param(IS_USART_ALL_PERIPH(USARTx)); assert_param(IS_FUNCTIONAL_STATE(NewState)); if (NewState != DISABLE) - 8002e70: 78fb ldrb r3, [r7, #3] - 8002e72: 2b00 cmp r3, #0 - 8002e74: d008 beq.n 8002e88 + 8005714: 78fb ldrb r3, [r7, #3] + 8005716: 2b00 cmp r3, #0 + 8005718: d008 beq.n 800572c { /* Enable the selected USART by setting the UE bit in the CR1 register */ USARTx->CR1 |= USART_CR1_UE; - 8002e76: 687b ldr r3, [r7, #4] - 8002e78: 899b ldrh r3, [r3, #12] - 8002e7a: b29b uxth r3, r3 - 8002e7c: f443 5300 orr.w r3, r3, #8192 ; 0x2000 - 8002e80: b29a uxth r2, r3 - 8002e82: 687b ldr r3, [r7, #4] - 8002e84: 819a strh r2, [r3, #12] + 800571a: 687b ldr r3, [r7, #4] + 800571c: 899b ldrh r3, [r3, #12] + 800571e: b29b uxth r3, r3 + 8005720: f443 5300 orr.w r3, r3, #8192 ; 0x2000 + 8005724: b29a uxth r2, r3 + 8005726: 687b ldr r3, [r7, #4] + 8005728: 819a strh r2, [r3, #12] else { /* Disable the selected USART by clearing the UE bit in the CR1 register */ USARTx->CR1 &= (uint16_t)~((uint16_t)USART_CR1_UE); } } - 8002e86: e007 b.n 8002e98 + 800572a: e007 b.n 800573c USARTx->CR1 &= (uint16_t)~((uint16_t)USART_CR1_UE); - 8002e88: 687b ldr r3, [r7, #4] - 8002e8a: 899b ldrh r3, [r3, #12] - 8002e8c: b29b uxth r3, r3 - 8002e8e: f423 5300 bic.w r3, r3, #8192 ; 0x2000 - 8002e92: b29a uxth r2, r3 - 8002e94: 687b ldr r3, [r7, #4] - 8002e96: 819a strh r2, [r3, #12] -} - 8002e98: bf00 nop - 8002e9a: 370c adds r7, #12 - 8002e9c: 46bd mov sp, r7 - 8002e9e: f85d 7b04 ldr.w r7, [sp], #4 - 8002ea2: 4770 bx lr - -08002ea4 : + 800572c: 687b ldr r3, [r7, #4] + 800572e: 899b ldrh r3, [r3, #12] + 8005730: b29b uxth r3, r3 + 8005732: f423 5300 bic.w r3, r3, #8192 ; 0x2000 + 8005736: b29a uxth r2, r3 + 8005738: 687b ldr r3, [r7, #4] + 800573a: 819a strh r2, [r3, #12] +} + 800573c: bf00 nop + 800573e: 370c adds r7, #12 + 8005740: 46bd mov sp, r7 + 8005742: f85d 7b04 ldr.w r7, [sp], #4 + 8005746: 4770 bx lr + +08005748 : * UART peripheral. * @param Data: the data to transmit. * @retval None */ void USART_SendData(USART_TypeDef* USARTx, uint16_t Data) { - 8002ea4: b480 push {r7} - 8002ea6: b083 sub sp, #12 - 8002ea8: af00 add r7, sp, #0 - 8002eaa: 6078 str r0, [r7, #4] - 8002eac: 460b mov r3, r1 - 8002eae: 807b strh r3, [r7, #2] + 8005748: b480 push {r7} + 800574a: b083 sub sp, #12 + 800574c: af00 add r7, sp, #0 + 800574e: 6078 str r0, [r7, #4] + 8005750: 460b mov r3, r1 + 8005752: 807b strh r3, [r7, #2] /* Check the parameters */ assert_param(IS_USART_ALL_PERIPH(USARTx)); assert_param(IS_USART_DATA(Data)); /* Transmit Data */ USARTx->DR = (Data & (uint16_t)0x01FF); - 8002eb0: 887b ldrh r3, [r7, #2] - 8002eb2: f3c3 0308 ubfx r3, r3, #0, #9 - 8002eb6: b29a uxth r2, r3 - 8002eb8: 687b ldr r3, [r7, #4] - 8002eba: 809a strh r2, [r3, #4] -} - 8002ebc: bf00 nop - 8002ebe: 370c adds r7, #12 - 8002ec0: 46bd mov sp, r7 - 8002ec2: f85d 7b04 ldr.w r7, [sp], #4 - 8002ec6: 4770 bx lr - -08002ec8 : + 8005754: 887b ldrh r3, [r7, #2] + 8005756: f3c3 0308 ubfx r3, r3, #0, #9 + 800575a: b29a uxth r2, r3 + 800575c: 687b ldr r3, [r7, #4] + 800575e: 809a strh r2, [r3, #4] +} + 8005760: bf00 nop + 8005762: 370c adds r7, #12 + 8005764: 46bd mov sp, r7 + 8005766: f85d 7b04 ldr.w r7, [sp], #4 + 800576a: 4770 bx lr + +0800576c : + * @param USARTx: where x can be 1, 2, 3, 4, 5, 6, 7 or 8 to select the USART or + * UART peripheral. + * @retval The received data. + */ +uint16_t USART_ReceiveData(USART_TypeDef* USARTx) +{ + 800576c: b480 push {r7} + 800576e: b083 sub sp, #12 + 8005770: af00 add r7, sp, #0 + 8005772: 6078 str r0, [r7, #4] + /* Check the parameters */ + assert_param(IS_USART_ALL_PERIPH(USARTx)); + + /* Receive Data */ + return (uint16_t)(USARTx->DR & (uint16_t)0x01FF); + 8005774: 687b ldr r3, [r7, #4] + 8005776: 889b ldrh r3, [r3, #4] + 8005778: b29b uxth r3, r3 + 800577a: f3c3 0308 ubfx r3, r3, #0, #9 + 800577e: b29b uxth r3, r3 +} + 8005780: 4618 mov r0, r3 + 8005782: 370c adds r7, #12 + 8005784: 46bd mov sp, r7 + 8005786: f85d 7b04 ldr.w r7, [sp], #4 + 800578a: 4770 bx lr + +0800578c : + * @param NewState: new state of the specified USARTx interrupts. + * This parameter can be: ENABLE or DISABLE. + * @retval None + */ +void USART_ITConfig(USART_TypeDef* USARTx, uint16_t USART_IT, FunctionalState NewState) +{ + 800578c: b480 push {r7} + 800578e: b087 sub sp, #28 + 8005790: af00 add r7, sp, #0 + 8005792: 6078 str r0, [r7, #4] + 8005794: 460b mov r3, r1 + 8005796: 807b strh r3, [r7, #2] + 8005798: 4613 mov r3, r2 + 800579a: 707b strb r3, [r7, #1] + uint32_t usartreg = 0x00, itpos = 0x00, itmask = 0x00; + 800579c: 2300 movs r3, #0 + 800579e: 613b str r3, [r7, #16] + 80057a0: 2300 movs r3, #0 + 80057a2: 60fb str r3, [r7, #12] + 80057a4: 2300 movs r3, #0 + 80057a6: 60bb str r3, [r7, #8] + uint32_t usartxbase = 0x00; + 80057a8: 2300 movs r3, #0 + 80057aa: 617b str r3, [r7, #20] + if (USART_IT == USART_IT_CTS) + { + assert_param(IS_USART_1236_PERIPH(USARTx)); + } + + usartxbase = (uint32_t)USARTx; + 80057ac: 687b ldr r3, [r7, #4] + 80057ae: 617b str r3, [r7, #20] + + /* Get the USART register index */ + usartreg = (((uint8_t)USART_IT) >> 0x05); + 80057b0: 887b ldrh r3, [r7, #2] + 80057b2: b2db uxtb r3, r3 + 80057b4: 095b lsrs r3, r3, #5 + 80057b6: b2db uxtb r3, r3 + 80057b8: 613b str r3, [r7, #16] + + /* Get the interrupt position */ + itpos = USART_IT & IT_MASK; + 80057ba: 887b ldrh r3, [r7, #2] + 80057bc: f003 031f and.w r3, r3, #31 + 80057c0: 60fb str r3, [r7, #12] + itmask = (((uint32_t)0x01) << itpos); + 80057c2: 2201 movs r2, #1 + 80057c4: 68fb ldr r3, [r7, #12] + 80057c6: fa02 f303 lsl.w r3, r2, r3 + 80057ca: 60bb str r3, [r7, #8] + + if (usartreg == 0x01) /* The IT is in CR1 register */ + 80057cc: 693b ldr r3, [r7, #16] + 80057ce: 2b01 cmp r3, #1 + 80057d0: d103 bne.n 80057da + { + usartxbase += 0x0C; + 80057d2: 697b ldr r3, [r7, #20] + 80057d4: 330c adds r3, #12 + 80057d6: 617b str r3, [r7, #20] + 80057d8: e009 b.n 80057ee + } + else if (usartreg == 0x02) /* The IT is in CR2 register */ + 80057da: 693b ldr r3, [r7, #16] + 80057dc: 2b02 cmp r3, #2 + 80057de: d103 bne.n 80057e8 + { + usartxbase += 0x10; + 80057e0: 697b ldr r3, [r7, #20] + 80057e2: 3310 adds r3, #16 + 80057e4: 617b str r3, [r7, #20] + 80057e6: e002 b.n 80057ee + } + else /* The IT is in CR3 register */ + { + usartxbase += 0x14; + 80057e8: 697b ldr r3, [r7, #20] + 80057ea: 3314 adds r3, #20 + 80057ec: 617b str r3, [r7, #20] + } + if (NewState != DISABLE) + 80057ee: 787b ldrb r3, [r7, #1] + 80057f0: 2b00 cmp r3, #0 + 80057f2: d006 beq.n 8005802 + { + *(__IO uint32_t*)usartxbase |= itmask; + 80057f4: 697b ldr r3, [r7, #20] + 80057f6: 6819 ldr r1, [r3, #0] + 80057f8: 697b ldr r3, [r7, #20] + 80057fa: 68ba ldr r2, [r7, #8] + 80057fc: 430a orrs r2, r1 + 80057fe: 601a str r2, [r3, #0] + } + else + { + *(__IO uint32_t*)usartxbase &= ~itmask; + } +} + 8005800: e006 b.n 8005810 + *(__IO uint32_t*)usartxbase &= ~itmask; + 8005802: 697b ldr r3, [r7, #20] + 8005804: 6819 ldr r1, [r3, #0] + 8005806: 68bb ldr r3, [r7, #8] + 8005808: 43da mvns r2, r3 + 800580a: 697b ldr r3, [r7, #20] + 800580c: 400a ands r2, r1 + 800580e: 601a str r2, [r3, #0] +} + 8005810: bf00 nop + 8005812: 371c adds r7, #28 + 8005814: 46bd mov sp, r7 + 8005816: f85d 7b04 ldr.w r7, [sp], #4 + 800581a: 4770 bx lr + +0800581c : * @arg USART_FLAG_FE: Framing Error flag * @arg USART_FLAG_PE: Parity Error flag * @retval The new state of USART_FLAG (SET or RESET). */ FlagStatus USART_GetFlagStatus(USART_TypeDef* USARTx, uint16_t USART_FLAG) { - 8002ec8: b480 push {r7} - 8002eca: b085 sub sp, #20 - 8002ecc: af00 add r7, sp, #0 - 8002ece: 6078 str r0, [r7, #4] - 8002ed0: 460b mov r3, r1 - 8002ed2: 807b strh r3, [r7, #2] + 800581c: b480 push {r7} + 800581e: b085 sub sp, #20 + 8005820: af00 add r7, sp, #0 + 8005822: 6078 str r0, [r7, #4] + 8005824: 460b mov r3, r1 + 8005826: 807b strh r3, [r7, #2] FlagStatus bitstatus = RESET; - 8002ed4: 2300 movs r3, #0 - 8002ed6: 73fb strb r3, [r7, #15] + 8005828: 2300 movs r3, #0 + 800582a: 73fb strb r3, [r7, #15] if (USART_FLAG == USART_FLAG_CTS) { assert_param(IS_USART_1236_PERIPH(USARTx)); } if ((USARTx->SR & USART_FLAG) != (uint16_t)RESET) - 8002ed8: 687b ldr r3, [r7, #4] - 8002eda: 881b ldrh r3, [r3, #0] - 8002edc: b29a uxth r2, r3 - 8002ede: 887b ldrh r3, [r7, #2] - 8002ee0: 4013 ands r3, r2 - 8002ee2: b29b uxth r3, r3 - 8002ee4: 2b00 cmp r3, #0 - 8002ee6: d002 beq.n 8002eee + 800582c: 687b ldr r3, [r7, #4] + 800582e: 881b ldrh r3, [r3, #0] + 8005830: b29a uxth r2, r3 + 8005832: 887b ldrh r3, [r7, #2] + 8005834: 4013 ands r3, r2 + 8005836: b29b uxth r3, r3 + 8005838: 2b00 cmp r3, #0 + 800583a: d002 beq.n 8005842 { bitstatus = SET; - 8002ee8: 2301 movs r3, #1 - 8002eea: 73fb strb r3, [r7, #15] - 8002eec: e001 b.n 8002ef2 + 800583c: 2301 movs r3, #1 + 800583e: 73fb strb r3, [r7, #15] + 8005840: e001 b.n 8005846 } else { bitstatus = RESET; - 8002eee: 2300 movs r3, #0 - 8002ef0: 73fb strb r3, [r7, #15] + 8005842: 2300 movs r3, #0 + 8005844: 73fb strb r3, [r7, #15] } return bitstatus; - 8002ef2: 7bfb ldrb r3, [r7, #15] + 8005846: 7bfb ldrb r3, [r7, #15] +} + 8005848: 4618 mov r0, r3 + 800584a: 3714 adds r7, #20 + 800584c: 46bd mov sp, r7 + 800584e: f85d 7b04 ldr.w r7, [sp], #4 + 8005852: 4770 bx lr + +08005854 : + The function enables a device-specific interrupt in the NVIC interrupt controller. + + \param [in] IRQn External interrupt number. Value cannot be negative. + */ +__STATIC_INLINE void NVIC_EnableIRQ(IRQn_Type IRQn) +{ + 8005854: b480 push {r7} + 8005856: b083 sub sp, #12 + 8005858: af00 add r7, sp, #0 + 800585a: 4603 mov r3, r0 + 800585c: 71fb strb r3, [r7, #7] + NVIC->ISER[(((uint32_t)(int32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)(int32_t)IRQn) & 0x1FUL)); + 800585e: 79fb ldrb r3, [r7, #7] + 8005860: f003 021f and.w r2, r3, #31 + 8005864: 4907 ldr r1, [pc, #28] ; (8005884 ) + 8005866: f997 3007 ldrsb.w r3, [r7, #7] + 800586a: 095b lsrs r3, r3, #5 + 800586c: 2001 movs r0, #1 + 800586e: fa00 f202 lsl.w r2, r0, r2 + 8005872: f841 2023 str.w r2, [r1, r3, lsl #2] +} + 8005876: bf00 nop + 8005878: 370c adds r7, #12 + 800587a: 46bd mov sp, r7 + 800587c: f85d 7b04 ldr.w r7, [sp], #4 + 8005880: 4770 bx lr + 8005882: bf00 nop + 8005884: e000e100 .word 0xe000e100 + +08005888 : + The function disables a device-specific interrupt in the NVIC interrupt controller. + + \param [in] IRQn External interrupt number. Value cannot be negative. + */ +__STATIC_INLINE void NVIC_DisableIRQ(IRQn_Type IRQn) +{ + 8005888: b480 push {r7} + 800588a: b083 sub sp, #12 + 800588c: af00 add r7, sp, #0 + 800588e: 4603 mov r3, r0 + 8005890: 71fb strb r3, [r7, #7] + NVIC->ICER[(((uint32_t)(int32_t)IRQn) >> 5UL)] = (uint32_t)(1UL << (((uint32_t)(int32_t)IRQn) & 0x1FUL)); + 8005892: 79fb ldrb r3, [r7, #7] + 8005894: f003 021f and.w r2, r3, #31 + 8005898: 4907 ldr r1, [pc, #28] ; (80058b8 ) + 800589a: f997 3007 ldrsb.w r3, [r7, #7] + 800589e: 095b lsrs r3, r3, #5 + 80058a0: 2001 movs r0, #1 + 80058a2: fa00 f202 lsl.w r2, r0, r2 + 80058a6: 3320 adds r3, #32 + 80058a8: f841 2023 str.w r2, [r1, r3, lsl #2] } - 8002ef4: 4618 mov r0, r3 - 8002ef6: 3714 adds r7, #20 - 8002ef8: 46bd mov sp, r7 - 8002efa: f85d 7b04 ldr.w r7, [sp], #4 - 8002efe: 4770 bx lr + 80058ac: bf00 nop + 80058ae: 370c adds r7, #12 + 80058b0: 46bd mov sp, r7 + 80058b2: f85d 7b04 ldr.w r7, [sp], #4 + 80058b6: 4770 bx lr + 80058b8: e000e100 .word 0xe000e100 -08002f00
: -void printmsg(char* msg); +080058bc : -uint8_t isUartfree = 1; + \param [in] IRQn Interrupt number. + \param [in] priority Priority to set. + */ +__STATIC_INLINE void NVIC_SetPriority(IRQn_Type IRQn, uint32_t priority) +{ + 80058bc: b480 push {r7} + 80058be: b083 sub sp, #12 + 80058c0: af00 add r7, sp, #0 + 80058c2: 4603 mov r3, r0 + 80058c4: 6039 str r1, [r7, #0] + 80058c6: 71fb strb r3, [r7, #7] + if((int32_t)IRQn < 0) { + 80058c8: f997 3007 ldrsb.w r3, [r7, #7] + 80058cc: 2b00 cmp r3, #0 + 80058ce: da0b bge.n 80058e8 + SCB->SHP[(((uint32_t)(int32_t)IRQn) & 0xFUL)-4UL] = (uint8_t)((priority << (8 - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + 80058d0: 683b ldr r3, [r7, #0] + 80058d2: b2da uxtb r2, r3 + 80058d4: 490c ldr r1, [pc, #48] ; (8005908 ) + 80058d6: 79fb ldrb r3, [r7, #7] + 80058d8: f003 030f and.w r3, r3, #15 + 80058dc: 3b04 subs r3, #4 + 80058de: 0112 lsls r2, r2, #4 + 80058e0: b2d2 uxtb r2, r2 + 80058e2: 440b add r3, r1 + 80058e4: 761a strb r2, [r3, #24] + } + else { + NVIC->IP[((uint32_t)(int32_t)IRQn)] = (uint8_t)((priority << (8 - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + } +} + 80058e6: e009 b.n 80058fc + NVIC->IP[((uint32_t)(int32_t)IRQn)] = (uint8_t)((priority << (8 - __NVIC_PRIO_BITS)) & (uint32_t)0xFFUL); + 80058e8: 683b ldr r3, [r7, #0] + 80058ea: b2da uxtb r2, r3 + 80058ec: 4907 ldr r1, [pc, #28] ; (800590c ) + 80058ee: f997 3007 ldrsb.w r3, [r7, #7] + 80058f2: 0112 lsls r2, r2, #4 + 80058f4: b2d2 uxtb r2, r2 + 80058f6: 440b add r3, r1 + 80058f8: f883 2300 strb.w r2, [r3, #768] ; 0x300 +} + 80058fc: bf00 nop + 80058fe: 370c adds r7, #12 + 8005900: 46bd mov sp, r7 + 8005902: f85d 7b04 ldr.w r7, [sp], #4 + 8005906: 4770 bx lr + 8005908: e000ed00 .word 0xe000ed00 + 800590c: e000e100 .word 0xe000e100 + +08005910
: +uint8_t command_len=0; +uint8_t command_buffer[20]; +TimerHandle_t Timer_LedToggle = NULL; int main(void) { - 8002f00: b580 push {r7, lr} - 8002f02: b082 sub sp, #8 - 8002f04: af02 add r7, sp, #8 + 8005910: b580 push {r7, lr} + 8005912: b082 sub sp, #8 + 8005914: af02 add r7, sp, #8 + + DWT->CTRL |= (1 << 0); //required by SEGGER to maintain timestamp information it enable to store cycle count information + 8005916: 4b2e ldr r3, [pc, #184] ; (80059d0 ) + 8005918: 681b ldr r3, [r3, #0] + 800591a: 4a2d ldr r2, [pc, #180] ; (80059d0 ) + 800591c: f043 0301 orr.w r3, r3, #1 + 8005920: 6013 str r3, [r2, #0] //By default the system clk is running at max speed which 168Mhz //this is done by setsysclk function //if it is not required then deinit the clk config and set it to desired value using functions provided in stm32f4xx_rcc.c RCC_DeInit(); - 8002f06: f7ff fdb7 bl 8002a78 + 8005922: f7ff fc3f bl 80051a4 //set HSE as default clk RCC_SYSCLKConfig(RCC_SYSCLKSource_HSE); - 8002f0a: 2001 movs r0, #1 - 8002f0c: f7ff fdec bl 8002ae8 + 8005926: 2001 movs r0, #1 + 8005928: f7ff fc74 bl 8005214 //call the systemcoreclk update function the SystemCoreClock variable to newly set clk frequency SystemCoreClockUpdate(); - 8002f10: f000 f9d2 bl 80032b8 + 800592c: f000 fbd0 bl 80060d0 //setup extra peripherals //init the LED GPIO Init_GPIO_LED(); - 8002f14: f000 f8e6 bl 80030e4 + 8005930: f000 f930 bl 8005b94 Init_UART(); - 8002f18: f000 f918 bl 800314c - - //create task - xTaskCreate(vTask1_Handler, "Led_1", configMINIMAL_STACK_SIZE, NULL, TASK1_PRIORITY, &xTask1_Handle); - 8002f1c: 4b15 ldr r3, [pc, #84] ; (8002f74 ) - 8002f1e: 9301 str r3, [sp, #4] - 8002f20: 2302 movs r3, #2 - 8002f22: 9300 str r3, [sp, #0] - 8002f24: 2300 movs r3, #0 - 8002f26: 2282 movs r2, #130 ; 0x82 - 8002f28: 4913 ldr r1, [pc, #76] ; (8002f78 ) - 8002f2a: 4814 ldr r0, [pc, #80] ; (8002f7c ) - 8002f2c: f7fd fefc bl 8000d28 - xTaskCreate(vTask2_Handler, "Led_2", configMINIMAL_STACK_SIZE, NULL, TASK2_PRIORITY, &xTask2_Handle); - 8002f30: 4b13 ldr r3, [pc, #76] ; (8002f80 ) - 8002f32: 9301 str r3, [sp, #4] - 8002f34: 2302 movs r3, #2 - 8002f36: 9300 str r3, [sp, #0] - 8002f38: 2300 movs r3, #0 - 8002f3a: 2282 movs r2, #130 ; 0x82 - 8002f3c: 4911 ldr r1, [pc, #68] ; (8002f84 ) - 8002f3e: 4812 ldr r0, [pc, #72] ; (8002f88 ) - 8002f40: f7fd fef2 bl 8000d28 - xTaskCreate(vTask3_Handler, "Led_3", configMINIMAL_STACK_SIZE, NULL, TASK3_PRIORITY, &xTask3_Handle); - 8002f44: 4b11 ldr r3, [pc, #68] ; (8002f8c ) - 8002f46: 9301 str r3, [sp, #4] - 8002f48: 2302 movs r3, #2 - 8002f4a: 9300 str r3, [sp, #0] - 8002f4c: 2300 movs r3, #0 - 8002f4e: 2282 movs r2, #130 ; 0x82 - 8002f50: 490f ldr r1, [pc, #60] ; (8002f90 ) - 8002f52: 4810 ldr r0, [pc, #64] ; (8002f94 ) - 8002f54: f7fd fee8 bl 8000d28 - xTaskCreate(vTask4_Handler, "Led_4", configMINIMAL_STACK_SIZE, NULL, TASK4_PRIORITY, &xTask4_Handle); - 8002f58: 4b0f ldr r3, [pc, #60] ; (8002f98 ) - 8002f5a: 9301 str r3, [sp, #4] - 8002f5c: 2302 movs r3, #2 - 8002f5e: 9300 str r3, [sp, #0] - 8002f60: 2300 movs r3, #0 - 8002f62: 2282 movs r2, #130 ; 0x82 - 8002f64: 490d ldr r1, [pc, #52] ; (8002f9c ) - 8002f66: 480e ldr r0, [pc, #56] ; (8002fa0 ) - 8002f68: f7fd fede bl 8000d28 - - //start the FreeRtos Task Scheduler - vTaskStartScheduler(); - 8002f6c: f7fe f854 bl 8001018 + 8005934: f000 f962 bl 8005bfc + + //start SEGGER recording + SEGGER_SYSVIEW_Conf(); + 8005938: f7fd fcba bl 80032b0 + SEGGER_SYSVIEW_Start(); + 800593c: f7fe fd46 bl 80043cc + + //create queues + command_queue = xQueueCreate(10,sizeof(APP_CMD_t*)); + 8005940: 2200 movs r2, #0 + 8005942: 2104 movs r1, #4 + 8005944: 200a movs r0, #10 + 8005946: f7fa fe27 bl 8000598 + 800594a: 4602 mov r2, r0 + 800594c: 4b21 ldr r3, [pc, #132] ; (80059d4 ) + 800594e: 601a str r2, [r3, #0] + uart_queue = xQueueCreate(10,sizeof(char*)); + 8005950: 2200 movs r2, #0 + 8005952: 2104 movs r1, #4 + 8005954: 200a movs r0, #10 + 8005956: f7fa fe1f bl 8000598 + 800595a: 4602 mov r2, r0 + 800595c: 4b1e ldr r3, [pc, #120] ; (80059d8 ) + 800595e: 601a str r2, [r3, #0] + + if((command_queue != NULL && uart_queue != NULL)){ + 8005960: 4b1c ldr r3, [pc, #112] ; (80059d4 ) + 8005962: 681b ldr r3, [r3, #0] + 8005964: 2b00 cmp r3, #0 + 8005966: d02e beq.n 80059c6 + 8005968: 4b1b ldr r3, [pc, #108] ; (80059d8 ) + 800596a: 681b ldr r3, [r3, #0] + 800596c: 2b00 cmp r3, #0 + 800596e: d02a beq.n 80059c6 + //create task + xTaskCreate(menu_display_task, "MENU_DISP", configMINIMAL_STACK_SIZE, NULL, 1, &Handle_menu_display_task); + 8005970: 4b1a ldr r3, [pc, #104] ; (80059dc ) + 8005972: 9301 str r3, [sp, #4] + 8005974: 2301 movs r3, #1 + 8005976: 9300 str r3, [sp, #0] + 8005978: 2300 movs r3, #0 + 800597a: 2282 movs r2, #130 ; 0x82 + 800597c: 4918 ldr r1, [pc, #96] ; (80059e0 ) + 800597e: 4819 ldr r0, [pc, #100] ; (80059e4 ) + 8005980: f7fb faf4 bl 8000f6c + xTaskCreate(cmd_handling_task, "CMD_HANDLE", configMINIMAL_STACK_SIZE, NULL, 2, &Handle_cmd_handling_task); + 8005984: 4b18 ldr r3, [pc, #96] ; (80059e8 ) + 8005986: 9301 str r3, [sp, #4] + 8005988: 2302 movs r3, #2 + 800598a: 9300 str r3, [sp, #0] + 800598c: 2300 movs r3, #0 + 800598e: 2282 movs r2, #130 ; 0x82 + 8005990: 4916 ldr r1, [pc, #88] ; (80059ec ) + 8005992: 4817 ldr r0, [pc, #92] ; (80059f0 ) + 8005994: f7fb faea bl 8000f6c + xTaskCreate(cmd_processing_task, "CMD_PROCESS", configMINIMAL_STACK_SIZE, NULL, 2, &Handle_cmd_processing_task); + 8005998: 4b16 ldr r3, [pc, #88] ; (80059f4 ) + 800599a: 9301 str r3, [sp, #4] + 800599c: 2302 movs r3, #2 + 800599e: 9300 str r3, [sp, #0] + 80059a0: 2300 movs r3, #0 + 80059a2: 2282 movs r2, #130 ; 0x82 + 80059a4: 4914 ldr r1, [pc, #80] ; (80059f8 ) + 80059a6: 4815 ldr r0, [pc, #84] ; (80059fc ) + 80059a8: f7fb fae0 bl 8000f6c + xTaskCreate(uart_write_task, "UART_WRITE", configMINIMAL_STACK_SIZE, NULL, 2, &Handle_uart_write_task); + 80059ac: 4b14 ldr r3, [pc, #80] ; (8005a00 ) + 80059ae: 9301 str r3, [sp, #4] + 80059b0: 2302 movs r3, #2 + 80059b2: 9300 str r3, [sp, #0] + 80059b4: 2300 movs r3, #0 + 80059b6: 2282 movs r2, #130 ; 0x82 + 80059b8: 4912 ldr r1, [pc, #72] ; (8005a04 ) + 80059ba: 4813 ldr r0, [pc, #76] ; (8005a08 ) + 80059bc: f7fb fad6 bl 8000f6c + + //start the FreeRtos Task Scheduler + vTaskStartScheduler(); + 80059c0: f7fb fcde bl 8001380 + 80059c4: e002 b.n 80059cc + + }else{ + printmsg("Failed To create queues\r\n"); + 80059c6: 4811 ldr r0, [pc, #68] ; (8005a0c ) + 80059c8: f000 f97c bl 8005cc4 + } for(;;); - 8002f70: e7fe b.n 8002f70 - 8002f72: bf00 nop - 8002f74: 20012db4 .word 0x20012db4 - 8002f78: 0800359c .word 0x0800359c - 8002f7c: 08002fa5 .word 0x08002fa5 - 8002f80: 20012db8 .word 0x20012db8 - 8002f84: 080035a4 .word 0x080035a4 - 8002f88: 08002ff5 .word 0x08002ff5 - 8002f8c: 20012dbc .word 0x20012dbc - 8002f90: 080035ac .word 0x080035ac - 8002f94: 08003045 .word 0x08003045 - 8002f98: 20012dc0 .word 0x20012dc0 - 8002f9c: 080035b4 .word 0x080035b4 - 8002fa0: 08003095 .word 0x08003095 - -08002fa4 : -} - -void vTask1_Handler(void* params) //this will toggle pin 15 led + 80059cc: e7fe b.n 80059cc + 80059ce: bf00 nop + 80059d0: e0001000 .word 0xe0001000 + 80059d4: 20015ce8 .word 0x20015ce8 + 80059d8: 20015cec .word 0x20015cec + 80059dc: 20015cd8 .word 0x20015cd8 + 80059e0: 08006c98 .word 0x08006c98 + 80059e4: 08005a11 .word 0x08005a11 + 80059e8: 20015cdc .word 0x20015cdc + 80059ec: 08006ca4 .word 0x08006ca4 + 80059f0: 08005a4d .word 0x08005a4d + 80059f4: 20015ce0 .word 0x20015ce0 + 80059f8: 08006cb0 .word 0x08006cb0 + 80059fc: 08005ab5 .word 0x08005ab5 + 8005a00: 20015ce4 .word 0x20015ce4 + 8005a04: 08006cbc .word 0x08006cbc + 8005a08: 08005b69 .word 0x08005b69 + 8005a0c: 08006cc8 .word 0x08006cc8 + +08005a10 : +} + +void menu_display_task(void* params) //this will toggle pin 15 led { - 8002fa4: b580 push {r7, lr} - 8002fa6: b082 sub sp, #8 - 8002fa8: af00 add r7, sp, #0 - 8002faa: 6078 str r0, [r7, #4] + 8005a10: b580 push {r7, lr} + 8005a12: b086 sub sp, #24 + 8005a14: af02 add r7, sp, #8 + 8005a16: 6078 str r0, [r7, #4] + char* pdata = menu; + 8005a18: 4b0a ldr r3, [pc, #40] ; (8005a44 ) + 8005a1a: 60fb str r3, [r7, #12] //task must never return while(1){ - if(isUartfree == 1){ - 8002fac: 4b0d ldr r3, [pc, #52] ; (8002fe4 ) - 8002fae: 781b ldrb r3, [r3, #0] - 8002fb0: 2b01 cmp r3, #1 - 8002fb2: d1fb bne.n 8002fac - GPIO_ToggleBits(GPIOD, GPIO_Pin_15); - 8002fb4: f44f 4100 mov.w r1, #32768 ; 0x8000 - 8002fb8: 480b ldr r0, [pc, #44] ; (8002fe8 ) - 8002fba: f7ff fd01 bl 80029c0 - printmsg("Hello world led1\r\n"); - 8002fbe: 480b ldr r0, [pc, #44] ; (8002fec ) - 8002fc0: f000 f91c bl 80031fc - vTaskDelay(50); - 8002fc4: 2032 movs r0, #50 ; 0x32 - 8002fc6: f7fd fff3 bl 8000fb0 - isUartfree = 2; - 8002fca: 4b06 ldr r3, [pc, #24] ; (8002fe4 ) - 8002fcc: 2202 movs r2, #2 - 8002fce: 701a strb r2, [r3, #0] - taskYIELD(); - 8002fd0: 4b07 ldr r3, [pc, #28] ; (8002ff0 ) - 8002fd2: f04f 5280 mov.w r2, #268435456 ; 0x10000000 - 8002fd6: 601a str r2, [r3, #0] - 8002fd8: f3bf 8f4f dsb sy - 8002fdc: f3bf 8f6f isb sy - if(isUartfree == 1){ - 8002fe0: e7e4 b.n 8002fac - 8002fe2: bf00 nop - 8002fe4: 20000018 .word 0x20000018 - 8002fe8: 40020c00 .word 0x40020c00 - 8002fec: 080035bc .word 0x080035bc - 8002ff0: e000ed04 .word 0xe000ed04 - -08002ff4 : + xQueueSend(uart_queue,&pdata,portMAX_DELAY); + 8005a1c: 4b0a ldr r3, [pc, #40] ; (8005a48 ) + 8005a1e: 6818 ldr r0, [r3, #0] + 8005a20: f107 010c add.w r1, r7, #12 + 8005a24: 2300 movs r3, #0 + 8005a26: f04f 32ff mov.w r2, #4294967295 ; 0xffffffff + 8005a2a: f7fa fe3b bl 80006a4 + + //wait till someone notifies + xTaskNotifyWait(0,0,NULL,portMAX_DELAY); + 8005a2e: f04f 33ff mov.w r3, #4294967295 ; 0xffffffff + 8005a32: 9300 str r3, [sp, #0] + 8005a34: 2300 movs r3, #0 + 8005a36: 2200 movs r2, #0 + 8005a38: 2100 movs r1, #0 + 8005a3a: 2000 movs r0, #0 + 8005a3c: f7fc f980 bl 8001d40 + xQueueSend(uart_queue,&pdata,portMAX_DELAY); + 8005a40: e7ec b.n 8005a1c + 8005a42: bf00 nop + 8005a44: 20000018 .word 0x20000018 + 8005a48: 20015cec .word 0x20015cec + +08005a4c : }; //if it returns anyhow or task work is complete it is not repeating then delete the task vTaskDelete(NULL); //NULL means the task itself or can call the vtask1_handler } -void vTask2_Handler(void* params) //this will toggle pin 14 led +void cmd_handling_task(void* params) //this will toggle pin 14 led { - 8002ff4: b580 push {r7, lr} - 8002ff6: b082 sub sp, #8 - 8002ff8: af00 add r7, sp, #0 - 8002ffa: 6078 str r0, [r7, #4] + 8005a4c: b580 push {r7, lr} + 8005a4e: b086 sub sp, #24 + 8005a50: af02 add r7, sp, #8 + 8005a52: 6078 str r0, [r7, #4] + APP_CMD_t* new_cmd; + uint8_t command_code=0; + 8005a54: 2300 movs r3, #0 + 8005a56: 73fb strb r3, [r7, #15] //task must never return while(1){ - if(isUartfree == 2){ - 8002ffc: 4b0d ldr r3, [pc, #52] ; (8003034 ) - 8002ffe: 781b ldrb r3, [r3, #0] - 8003000: 2b02 cmp r3, #2 - 8003002: d1fb bne.n 8002ffc - GPIO_ToggleBits(GPIOD, GPIO_Pin_14); - 8003004: f44f 4180 mov.w r1, #16384 ; 0x4000 - 8003008: 480b ldr r0, [pc, #44] ; (8003038 ) - 800300a: f7ff fcd9 bl 80029c0 - printmsg("Hello world led2\r\n"); - 800300e: 480b ldr r0, [pc, #44] ; (800303c ) - 8003010: f000 f8f4 bl 80031fc - vTaskDelay(60); - 8003014: 203c movs r0, #60 ; 0x3c - 8003016: f7fd ffcb bl 8000fb0 - isUartfree = 3; - 800301a: 4b06 ldr r3, [pc, #24] ; (8003034 ) - 800301c: 2203 movs r2, #3 - 800301e: 701a strb r2, [r3, #0] - taskYIELD(); //leave the mcpu and get in task ready state in the queue at last in same priority task lists - 8003020: 4b07 ldr r3, [pc, #28] ; (8003040 ) - 8003022: f04f 5280 mov.w r2, #268435456 ; 0x10000000 - 8003026: 601a str r2, [r3, #0] - 8003028: f3bf 8f4f dsb sy - 800302c: f3bf 8f6f isb sy - if(isUartfree == 2){ - 8003030: e7e4 b.n 8002ffc - 8003032: bf00 nop - 8003034: 20000018 .word 0x20000018 - 8003038: 40020c00 .word 0x40020c00 - 800303c: 080035d0 .word 0x080035d0 - 8003040: e000ed04 .word 0xe000ed04 - -08003044 : + + xTaskNotifyWait(0,0,NULL,portMAX_DELAY); + 8005a58: f04f 33ff mov.w r3, #4294967295 ; 0xffffffff + 8005a5c: 9300 str r3, [sp, #0] + 8005a5e: 2300 movs r3, #0 + 8005a60: 2200 movs r2, #0 + 8005a62: 2100 movs r1, #0 + 8005a64: 2000 movs r0, #0 + 8005a66: f7fc f96b bl 8001d40 + //send command to queue + new_cmd = (APP_CMD_t*)pvPortMalloc(sizeof(APP_CMD_t)); + 8005a6a: 200b movs r0, #11 + 8005a6c: f7fd fa1a bl 8002ea4 + 8005a70: 4603 mov r3, r0 + 8005a72: 60bb str r3, [r7, #8] + + taskENTER_CRITICAL(); //it will disable all the interrupts having priority lower than max SYSCALL priority + 8005a74: f7fd f8f4 bl 8002c60 + + command_code = getCommandCode(command_buffer); + 8005a78: 480c ldr r0, [pc, #48] ; (8005aac ) + 8005a7a: f000 f9a5 bl 8005dc8 + 8005a7e: 4603 mov r3, r0 + 8005a80: 73fb strb r3, [r7, #15] + new_cmd->CMD = command_code; + 8005a82: 68bb ldr r3, [r7, #8] + 8005a84: 7bfa ldrb r2, [r7, #15] + 8005a86: 701a strb r2, [r3, #0] + getArguments(new_cmd->CMD_ARGS); + 8005a88: 68bb ldr r3, [r7, #8] + 8005a8a: 3301 adds r3, #1 + 8005a8c: 4618 mov r0, r3 + 8005a8e: f000 f9a9 bl 8005de4 + + taskEXIT_CRITICAL(); + 8005a92: f7fd f913 bl 8002cbc + + //send data to the queue + xQueueSend(command_queue,&new_cmd,portMAX_DELAY); + 8005a96: 4b06 ldr r3, [pc, #24] ; (8005ab0 ) + 8005a98: 6818 ldr r0, [r3, #0] + 8005a9a: f107 0108 add.w r1, r7, #8 + 8005a9e: 2300 movs r3, #0 + 8005aa0: f04f 32ff mov.w r2, #4294967295 ; 0xffffffff + 8005aa4: f7fa fdfe bl 80006a4 + xTaskNotifyWait(0,0,NULL,portMAX_DELAY); + 8005aa8: e7d6 b.n 8005a58 + 8005aaa: bf00 nop + 8005aac: 20015dec .word 0x20015dec + 8005ab0: 20015ce8 .word 0x20015ce8 + +08005ab4 : //if it returns anyhow or task work is complete it is not repeating then delete the task - vTaskDelete(xTask2_Handle); //NULL means the task itself + vTaskDelete(NULL); //NULL means the task itself } -void vTask3_Handler(void* params) //this will toggle pin 13 led +void cmd_processing_task(void* params) //this will toggle pin 13 led { - 8003044: b580 push {r7, lr} - 8003046: b082 sub sp, #8 - 8003048: af00 add r7, sp, #0 - 800304a: 6078 str r0, [r7, #4] + 8005ab4: b580 push {r7, lr} + 8005ab6: b094 sub sp, #80 ; 0x50 + 8005ab8: af02 add r7, sp, #8 + 8005aba: 6078 str r0, [r7, #4] + APP_CMD_t* cmd; + char task_msg[50]; + uint32_t toggle_delay = pdMS_TO_TICKS(600); + 8005abc: f44f 7316 mov.w r3, #600 ; 0x258 + 8005ac0: 647b str r3, [r7, #68] ; 0x44 //task must never return while(1){ - if(isUartfree == 3){ - 800304c: 4b0d ldr r3, [pc, #52] ; (8003084 ) - 800304e: 781b ldrb r3, [r3, #0] - 8003050: 2b03 cmp r3, #3 - 8003052: d1fb bne.n 800304c - GPIO_ToggleBits(GPIOD, GPIO_Pin_13); - 8003054: f44f 5100 mov.w r1, #8192 ; 0x2000 - 8003058: 480b ldr r0, [pc, #44] ; (8003088 ) - 800305a: f7ff fcb1 bl 80029c0 - printmsg("Hello world led3\r\n"); - 800305e: 480b ldr r0, [pc, #44] ; (800308c ) - 8003060: f000 f8cc bl 80031fc - vTaskDelay(70); - 8003064: 2046 movs r0, #70 ; 0x46 - 8003066: f7fd ffa3 bl 8000fb0 - isUartfree = 4; - 800306a: 4b06 ldr r3, [pc, #24] ; (8003084 ) - 800306c: 2204 movs r2, #4 - 800306e: 701a strb r2, [r3, #0] - taskYIELD(); - 8003070: 4b07 ldr r3, [pc, #28] ; (8003090 ) - 8003072: f04f 5280 mov.w r2, #268435456 ; 0x10000000 - 8003076: 601a str r2, [r3, #0] - 8003078: f3bf 8f4f dsb sy - 800307c: f3bf 8f6f isb sy - if(isUartfree == 3){ - 8003080: e7e4 b.n 800304c - 8003082: bf00 nop - 8003084: 20000018 .word 0x20000018 - 8003088: 40020c00 .word 0x40020c00 - 800308c: 080035e4 .word 0x080035e4 - 8003090: e000ed04 .word 0xe000ed04 - -08003094 : + xQueueReceive(command_queue, (void *)&cmd, portMAX_DELAY); + 8005ac2: 4b27 ldr r3, [pc, #156] ; (8005b60 ) + 8005ac4: 681b ldr r3, [r3, #0] + 8005ac6: f107 0140 add.w r1, r7, #64 ; 0x40 + 8005aca: f04f 32ff mov.w r2, #4294967295 ; 0xffffffff + 8005ace: 4618 mov r0, r3 + 8005ad0: f7fa ffc4 bl 8000a5c + switch(cmd->CMD){ + 8005ad4: 6c3b ldr r3, [r7, #64] ; 0x40 + 8005ad6: 781b ldrb r3, [r3, #0] + 8005ad8: 2b06 cmp r3, #6 + 8005ada: d82d bhi.n 8005b38 + 8005adc: a201 add r2, pc, #4 ; (adr r2, 8005ae4 ) + 8005ade: f852 f023 ldr.w pc, [r2, r3, lsl #2] + 8005ae2: bf00 nop + 8005ae4: 08005b33 .word 0x08005b33 + 8005ae8: 08005b01 .word 0x08005b01 + 8005aec: 08005b07 .word 0x08005b07 + 8005af0: 08005b0d .word 0x08005b0d + 8005af4: 08005b15 .word 0x08005b15 + 8005af8: 08005b1b .word 0x08005b1b + 8005afc: 08005b27 .word 0x08005b27 + case LED_ON: + make_led_on(); + 8005b00: f000 f97a bl 8005df8 + break; + 8005b04: e027 b.n 8005b56 + case LED_OFF: + make_led_off(); + 8005b06: f000 f983 bl 8005e10 + break; + 8005b0a: e024 b.n 8005b56 + case LED_TOGGLE_START: + make_led_toggle_start(toggle_delay); + 8005b0c: 6c78 ldr r0, [r7, #68] ; 0x44 + 8005b0e: f000 f99b bl 8005e48 + break; + 8005b12: e020 b.n 8005b56 + case LED_TOGGLE_STOP: + make_led_toggle_stop(); + 8005b14: f000 f9c2 bl 8005e9c + break; + 8005b18: e01d b.n 8005b56 + case LED_STATUS_READ: + make_led_status_read(task_msg); + 8005b1a: f107 030c add.w r3, r7, #12 + 8005b1e: 4618 mov r0, r3 + 8005b20: f000 f9d2 bl 8005ec8 + break; + 8005b24: e017 b.n 8005b56 + case RTC_DATETIME_READ: + make_rtc_datetime_read(task_msg); + 8005b26: f107 030c add.w r3, r7, #12 + 8005b2a: 4618 mov r0, r3 + 8005b2c: f000 f9ee bl 8005f0c + break; + 8005b30: e011 b.n 8005b56 + case EXIT_APP: + make_exit_app(); + 8005b32: f000 fa1d bl 8005f70 + break; + 8005b36: e00e b.n 8005b56 + default: + //cmd not found enable the menu printing + print_errormsg(task_msg); + 8005b38: f107 030c add.w r3, r7, #12 + 8005b3c: 4618 mov r0, r3 + 8005b3e: f000 fa3b bl 8005fb8 + xTaskNotify(Handle_menu_display_task,0,eNoAction); + 8005b42: 4b08 ldr r3, [pc, #32] ; (8005b64 ) + 8005b44: 6818 ldr r0, [r3, #0] + 8005b46: 2300 movs r3, #0 + 8005b48: 9300 str r3, [sp, #0] + 8005b4a: 2300 movs r3, #0 + 8005b4c: 2200 movs r2, #0 + 8005b4e: 2100 movs r1, #0 + 8005b50: f7fc f97e bl 8001e50 + break; + 8005b54: bf00 nop + + } + + //free the malloc memory created for storing cmd + vPortFree(cmd); + 8005b56: 6c3b ldr r3, [r7, #64] ; 0x40 + 8005b58: 4618 mov r0, r3 + 8005b5a: f7fd fa7f bl 800305c + xQueueReceive(command_queue, (void *)&cmd, portMAX_DELAY); + 8005b5e: e7b0 b.n 8005ac2 + 8005b60: 20015ce8 .word 0x20015ce8 + 8005b64: 20015cd8 .word 0x20015cd8 + +08005b68 : //if it returns anyhow or task work is complete it is not repeating then delete the task - vTaskDelete(xTask3_Handle); //NULL means the task itself + vTaskDelete(NULL); //NULL means the task itself } -void vTask4_Handler(void* params) //this will toggle pin 13 led +void uart_write_task(void* params) //this will toggle pin 13 led { - 8003094: b580 push {r7, lr} - 8003096: b082 sub sp, #8 - 8003098: af00 add r7, sp, #0 - 800309a: 6078 str r0, [r7, #4] + 8005b68: b580 push {r7, lr} + 8005b6a: b084 sub sp, #16 + 8005b6c: af00 add r7, sp, #0 + 8005b6e: 6078 str r0, [r7, #4] + char *Data = NULL; + 8005b70: 2300 movs r3, #0 + 8005b72: 60fb str r3, [r7, #12] //task must never return while(1){ - if(isUartfree == 4){ - 800309c: 4b0d ldr r3, [pc, #52] ; (80030d4 ) - 800309e: 781b ldrb r3, [r3, #0] - 80030a0: 2b04 cmp r3, #4 - 80030a2: d1fb bne.n 800309c - GPIO_ToggleBits(GPIOD, GPIO_Pin_12); - 80030a4: f44f 5180 mov.w r1, #4096 ; 0x1000 - 80030a8: 480b ldr r0, [pc, #44] ; (80030d8 ) - 80030aa: f7ff fc89 bl 80029c0 - printmsg("Hello world led4\r\n"); - 80030ae: 480b ldr r0, [pc, #44] ; (80030dc ) - 80030b0: f000 f8a4 bl 80031fc - vTaskDelay(80); - 80030b4: 2050 movs r0, #80 ; 0x50 - 80030b6: f7fd ff7b bl 8000fb0 - isUartfree = 1; - 80030ba: 4b06 ldr r3, [pc, #24] ; (80030d4 ) - 80030bc: 2201 movs r2, #1 - 80030be: 701a strb r2, [r3, #0] - taskYIELD(); - 80030c0: 4b07 ldr r3, [pc, #28] ; (80030e0 ) - 80030c2: f04f 5280 mov.w r2, #268435456 ; 0x10000000 - 80030c6: 601a str r2, [r3, #0] - 80030c8: f3bf 8f4f dsb sy - 80030cc: f3bf 8f6f isb sy - if(isUartfree == 4){ - 80030d0: e7e4 b.n 800309c - 80030d2: bf00 nop - 80030d4: 20000018 .word 0x20000018 - 80030d8: 40020c00 .word 0x40020c00 - 80030dc: 080035f8 .word 0x080035f8 - 80030e0: e000ed04 .word 0xe000ed04 - -080030e4 : - vTaskDelete(xTask4_Handle); //NULL means the task itself + xQueueReceive(uart_queue, &Data, portMAX_DELAY); + 8005b74: 4b06 ldr r3, [pc, #24] ; (8005b90 ) + 8005b76: 681b ldr r3, [r3, #0] + 8005b78: f107 010c add.w r1, r7, #12 + 8005b7c: f04f 32ff mov.w r2, #4294967295 ; 0xffffffff + 8005b80: 4618 mov r0, r3 + 8005b82: f7fa ff6b bl 8000a5c + printmsg(Data); + 8005b86: 68fb ldr r3, [r7, #12] + 8005b88: 4618 mov r0, r3 + 8005b8a: f000 f89b bl 8005cc4 + xQueueReceive(uart_queue, &Data, portMAX_DELAY); + 8005b8e: e7f1 b.n 8005b74 + 8005b90: 20015cec .word 0x20015cec + +08005b94 : + //if it returns anyhow or task work is complete it is not repeating then delete the task + vTaskDelete(NULL); //NULL means the task itself } - void Init_GPIO_LED(void) { - 80030e4: b580 push {r7, lr} - 80030e6: b082 sub sp, #8 - 80030e8: af00 add r7, sp, #0 + 8005b94: b580 push {r7, lr} + 8005b96: b082 sub sp, #8 + 8005b98: af00 add r7, sp, #0 //Init GPIOD Peripheral RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOD, ENABLE); - 80030ea: 2101 movs r1, #1 - 80030ec: 2008 movs r0, #8 - 80030ee: f7ff fdbf bl 8002c70 + 8005b9a: 2101 movs r1, #1 + 8005b9c: 2008 movs r0, #8 + 8005b9e: f7ff fbfd bl 800539c GPIO_InitTypeDef gpio_led; gpio_led.GPIO_Mode = GPIO_Mode_OUT; - 80030f2: 2301 movs r3, #1 - 80030f4: 713b strb r3, [r7, #4] + 8005ba2: 2301 movs r3, #1 + 8005ba4: 713b strb r3, [r7, #4] gpio_led.GPIO_OType = GPIO_OType_PP; - 80030f6: 2300 movs r3, #0 - 80030f8: 71bb strb r3, [r7, #6] + 8005ba6: 2300 movs r3, #0 + 8005ba8: 71bb strb r3, [r7, #6] gpio_led.GPIO_PuPd = GPIO_PuPd_UP; - 80030fa: 2301 movs r3, #1 - 80030fc: 71fb strb r3, [r7, #7] + 8005baa: 2301 movs r3, #1 + 8005bac: 71fb strb r3, [r7, #7] gpio_led.GPIO_Pin = GPIO_Pin_15; //blue led - 80030fe: f44f 4300 mov.w r3, #32768 ; 0x8000 - 8003102: 603b str r3, [r7, #0] + 8005bae: f44f 4300 mov.w r3, #32768 ; 0x8000 + 8005bb2: 603b str r3, [r7, #0] GPIO_Init(GPIOD, &gpio_led); - 8003104: 463b mov r3, r7 - 8003106: 4619 mov r1, r3 - 8003108: 480f ldr r0, [pc, #60] ; (8003148 ) - 800310a: f7ff fbcb bl 80028a4 + 8005bb4: 463b mov r3, r7 + 8005bb6: 4619 mov r1, r3 + 8005bb8: 480f ldr r0, [pc, #60] ; (8005bf8 ) + 8005bba: f7ff f9d1 bl 8004f60 gpio_led.GPIO_Pin = GPIO_Pin_14; //red led - 800310e: f44f 4380 mov.w r3, #16384 ; 0x4000 - 8003112: 603b str r3, [r7, #0] + 8005bbe: f44f 4380 mov.w r3, #16384 ; 0x4000 + 8005bc2: 603b str r3, [r7, #0] GPIO_Init(GPIOD, &gpio_led); - 8003114: 463b mov r3, r7 - 8003116: 4619 mov r1, r3 - 8003118: 480b ldr r0, [pc, #44] ; (8003148 ) - 800311a: f7ff fbc3 bl 80028a4 + 8005bc4: 463b mov r3, r7 + 8005bc6: 4619 mov r1, r3 + 8005bc8: 480b ldr r0, [pc, #44] ; (8005bf8 ) + 8005bca: f7ff f9c9 bl 8004f60 gpio_led.GPIO_Pin = GPIO_Pin_13; //orange led - 800311e: f44f 5300 mov.w r3, #8192 ; 0x2000 - 8003122: 603b str r3, [r7, #0] + 8005bce: f44f 5300 mov.w r3, #8192 ; 0x2000 + 8005bd2: 603b str r3, [r7, #0] GPIO_Init(GPIOD, &gpio_led); - 8003124: 463b mov r3, r7 - 8003126: 4619 mov r1, r3 - 8003128: 4807 ldr r0, [pc, #28] ; (8003148 ) - 800312a: f7ff fbbb bl 80028a4 + 8005bd4: 463b mov r3, r7 + 8005bd6: 4619 mov r1, r3 + 8005bd8: 4807 ldr r0, [pc, #28] ; (8005bf8 ) + 8005bda: f7ff f9c1 bl 8004f60 gpio_led.GPIO_Pin = GPIO_Pin_12; //green led - 800312e: f44f 5380 mov.w r3, #4096 ; 0x1000 - 8003132: 603b str r3, [r7, #0] + 8005bde: f44f 5380 mov.w r3, #4096 ; 0x1000 + 8005be2: 603b str r3, [r7, #0] GPIO_Init(GPIOD, &gpio_led); - 8003134: 463b mov r3, r7 - 8003136: 4619 mov r1, r3 - 8003138: 4803 ldr r0, [pc, #12] ; (8003148 ) - 800313a: f7ff fbb3 bl 80028a4 + 8005be4: 463b mov r3, r7 + 8005be6: 4619 mov r1, r3 + 8005be8: 4803 ldr r0, [pc, #12] ; (8005bf8 ) + 8005bea: f7ff f9b9 bl 8004f60 } - 800313e: bf00 nop - 8003140: 3708 adds r7, #8 - 8003142: 46bd mov sp, r7 - 8003144: bd80 pop {r7, pc} - 8003146: bf00 nop - 8003148: 40020c00 .word 0x40020c00 + 8005bee: bf00 nop + 8005bf0: 3708 adds r7, #8 + 8005bf2: 46bd mov sp, r7 + 8005bf4: bd80 pop {r7, pc} + 8005bf6: bf00 nop + 8005bf8: 40020c00 .word 0x40020c00 -0800314c : +08005bfc : void Init_UART(void) { - 800314c: b580 push {r7, lr} - 800314e: b086 sub sp, #24 - 8003150: af00 add r7, sp, #0 + 8005bfc: b580 push {r7, lr} + 8005bfe: b086 sub sp, #24 + 8005c00: af00 add r7, sp, #0 //Init uart 4 peripheral clk RCC_APB1PeriphClockCmd(RCC_APB1Periph_UART4, ENABLE); - 8003152: 2101 movs r1, #1 - 8003154: f44f 2000 mov.w r0, #524288 ; 0x80000 - 8003158: f7ff fdaa bl 8002cb0 + 8005c02: 2101 movs r1, #1 + 8005c04: f44f 2000 mov.w r0, #524288 ; 0x80000 + 8005c08: f7ff fbe8 bl 80053dc //pc10 tx :: pc11 rx //enable GPIOC peripheral port RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOC, ENABLE); - 800315c: 2101 movs r1, #1 - 800315e: 2004 movs r0, #4 - 8003160: f7ff fd86 bl 8002c70 + 8005c0c: 2101 movs r1, #1 + 8005c0e: 2004 movs r0, #4 + 8005c10: f7ff fbc4 bl 800539c //init the pins to alternate function mode GPIO_InitTypeDef gpio_uart4; memset(&gpio_uart4,0,sizeof(gpio_uart4)); - 8003164: f107 0310 add.w r3, r7, #16 - 8003168: 2208 movs r2, #8 - 800316a: 2100 movs r1, #0 - 800316c: 4618 mov r0, r3 - 800316e: f000 f9f4 bl 800355a + 8005c14: f107 0310 add.w r3, r7, #16 + 8005c18: 2208 movs r2, #8 + 8005c1a: 2100 movs r1, #0 + 8005c1c: 4618 mov r0, r3 + 8005c1e: f000 fbbd bl 800639c gpio_uart4.GPIO_Pin = GPIO_Pin_10; - 8003172: f44f 6380 mov.w r3, #1024 ; 0x400 - 8003176: 613b str r3, [r7, #16] + 8005c22: f44f 6380 mov.w r3, #1024 ; 0x400 + 8005c26: 613b str r3, [r7, #16] gpio_uart4.GPIO_Mode = GPIO_Mode_AF; - 8003178: 2302 movs r3, #2 - 800317a: 753b strb r3, [r7, #20] + 8005c28: 2302 movs r3, #2 + 8005c2a: 753b strb r3, [r7, #20] gpio_uart4.GPIO_PuPd = GPIO_PuPd_UP; - 800317c: 2301 movs r3, #1 - 800317e: 75fb strb r3, [r7, #23] + 8005c2c: 2301 movs r3, #1 + 8005c2e: 75fb strb r3, [r7, #23] GPIO_Init(GPIOC, &gpio_uart4); - 8003180: f107 0310 add.w r3, r7, #16 - 8003184: 4619 mov r1, r3 - 8003186: 481b ldr r0, [pc, #108] ; (80031f4 ) - 8003188: f7ff fb8c bl 80028a4 + 8005c30: f107 0310 add.w r3, r7, #16 + 8005c34: 4619 mov r1, r3 + 8005c36: 4821 ldr r0, [pc, #132] ; (8005cbc ) + 8005c38: f7ff f992 bl 8004f60 GPIO_PinAFConfig(GPIOC, GPIO_PinSource10, GPIO_AF_UART4); - 800318c: 2208 movs r2, #8 - 800318e: 210a movs r1, #10 - 8003190: 4818 ldr r0, [pc, #96] ; (80031f4 ) - 8003192: f7ff fc27 bl 80029e4 + 8005c3c: 2208 movs r2, #8 + 8005c3e: 210a movs r1, #10 + 8005c40: 481e ldr r0, [pc, #120] ; (8005cbc ) + 8005c42: f7ff fa65 bl 8005110 gpio_uart4.GPIO_Pin = GPIO_Pin_11; - 8003196: f44f 6300 mov.w r3, #2048 ; 0x800 - 800319a: 613b str r3, [r7, #16] + 8005c46: f44f 6300 mov.w r3, #2048 ; 0x800 + 8005c4a: 613b str r3, [r7, #16] GPIO_Init(GPIOC, &gpio_uart4); - 800319c: f107 0310 add.w r3, r7, #16 - 80031a0: 4619 mov r1, r3 - 80031a2: 4814 ldr r0, [pc, #80] ; (80031f4 ) - 80031a4: f7ff fb7e bl 80028a4 + 8005c4c: f107 0310 add.w r3, r7, #16 + 8005c50: 4619 mov r1, r3 + 8005c52: 481a ldr r0, [pc, #104] ; (8005cbc ) + 8005c54: f7ff f984 bl 8004f60 GPIO_PinAFConfig(GPIOC, GPIO_PinSource11, GPIO_AF_UART4); - 80031a8: 2208 movs r2, #8 - 80031aa: 210b movs r1, #11 - 80031ac: 4811 ldr r0, [pc, #68] ; (80031f4 ) - 80031ae: f7ff fc19 bl 80029e4 + 8005c58: 2208 movs r2, #8 + 8005c5a: 210b movs r1, #11 + 8005c5c: 4817 ldr r0, [pc, #92] ; (8005cbc ) + 8005c5e: f7ff fa57 bl 8005110 //uart init USART_InitTypeDef uart4_init; memset(&uart4_init,0,sizeof(uart4_init)); - 80031b2: 463b mov r3, r7 - 80031b4: 2210 movs r2, #16 - 80031b6: 2100 movs r1, #0 - 80031b8: 4618 mov r0, r3 - 80031ba: f000 f9ce bl 800355a + 8005c62: 463b mov r3, r7 + 8005c64: 2210 movs r2, #16 + 8005c66: 2100 movs r1, #0 + 8005c68: 4618 mov r0, r3 + 8005c6a: f000 fb97 bl 800639c uart4_init.USART_BaudRate = 115200; - 80031be: f44f 33e1 mov.w r3, #115200 ; 0x1c200 - 80031c2: 603b str r3, [r7, #0] + 8005c6e: f44f 33e1 mov.w r3, #115200 ; 0x1c200 + 8005c72: 603b str r3, [r7, #0] uart4_init.USART_Mode = (USART_Mode_Rx | USART_Mode_Tx); - 80031c4: 230c movs r3, #12 - 80031c6: 817b strh r3, [r7, #10] + 8005c74: 230c movs r3, #12 + 8005c76: 817b strh r3, [r7, #10] uart4_init.USART_Parity = USART_Parity_No; - 80031c8: 2300 movs r3, #0 - 80031ca: 813b strh r3, [r7, #8] + 8005c78: 2300 movs r3, #0 + 8005c7a: 813b strh r3, [r7, #8] uart4_init.USART_StopBits = USART_StopBits_1; - 80031cc: 2300 movs r3, #0 - 80031ce: 80fb strh r3, [r7, #6] + 8005c7c: 2300 movs r3, #0 + 8005c7e: 80fb strh r3, [r7, #6] uart4_init.USART_WordLength = USART_WordLength_8b; - 80031d0: 2300 movs r3, #0 - 80031d2: 80bb strh r3, [r7, #4] + 8005c80: 2300 movs r3, #0 + 8005c82: 80bb strh r3, [r7, #4] uart4_init.USART_HardwareFlowControl = USART_HardwareFlowControl_None; - 80031d4: 2300 movs r3, #0 - 80031d6: 81bb strh r3, [r7, #12] + 8005c84: 2300 movs r3, #0 + 8005c86: 81bb strh r3, [r7, #12] USART_Init(UART4, &uart4_init); - 80031d8: 463b mov r3, r7 - 80031da: 4619 mov r1, r3 - 80031dc: 4806 ldr r0, [pc, #24] ; (80031f8 ) - 80031de: f7ff fd87 bl 8002cf0 + 8005c88: 463b mov r3, r7 + 8005c8a: 4619 mov r1, r3 + 8005c8c: 480c ldr r0, [pc, #48] ; (8005cc0 ) + 8005c8e: f7ff fc81 bl 8005594 + + //enable uart4 RXNE interrupt + USART_ITConfig(UART4, USART_IT_RXNE, ENABLE); + 8005c92: 2201 movs r2, #1 + 8005c94: f240 5125 movw r1, #1317 ; 0x525 + 8005c98: 4809 ldr r0, [pc, #36] ; (8005cc0 ) + 8005c9a: f7ff fd77 bl 800578c + + //NVIC UART4 priority + NVIC_SetPriority(UART4_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY + 1); + 8005c9e: 2106 movs r1, #6 + 8005ca0: 2034 movs r0, #52 ; 0x34 + 8005ca2: f7ff fe0b bl 80058bc + + //ENABLE NVIC INTERRUPT + NVIC_EnableIRQ(UART4_IRQn); + 8005ca6: 2034 movs r0, #52 ; 0x34 + 8005ca8: f7ff fdd4 bl 8005854 //enable uart4 peripheral USART_Cmd(UART4, ENABLE); - 80031e2: 2101 movs r1, #1 - 80031e4: 4804 ldr r0, [pc, #16] ; (80031f8 ) - 80031e6: f7ff fe3d bl 8002e64 + 8005cac: 2101 movs r1, #1 + 8005cae: 4804 ldr r0, [pc, #16] ; (8005cc0 ) + 8005cb0: f7ff fd2a bl 8005708 } - 80031ea: bf00 nop - 80031ec: 3718 adds r7, #24 - 80031ee: 46bd mov sp, r7 - 80031f0: bd80 pop {r7, pc} - 80031f2: bf00 nop - 80031f4: 40020800 .word 0x40020800 - 80031f8: 40004c00 .word 0x40004c00 + 8005cb4: bf00 nop + 8005cb6: 3718 adds r7, #24 + 8005cb8: 46bd mov sp, r7 + 8005cba: bd80 pop {r7, pc} + 8005cbc: 40020800 .word 0x40020800 + 8005cc0: 40004c00 .word 0x40004c00 -080031fc : +08005cc4 : void printmsg(char* msg) { - 80031fc: b580 push {r7, lr} - 80031fe: b084 sub sp, #16 - 8003200: af00 add r7, sp, #0 - 8003202: 6078 str r0, [r7, #4] + 8005cc4: b580 push {r7, lr} + 8005cc6: b084 sub sp, #16 + 8005cc8: af00 add r7, sp, #0 + 8005cca: 6078 str r0, [r7, #4] for(uint32_t i=0; i + 8005ccc: 2300 movs r3, #0 + 8005cce: 60fb str r3, [r7, #12] + 8005cd0: e013 b.n 8005cfa while(USART_GetFlagStatus(UART4, USART_FLAG_TXE) != SET); //wait until TXE is not 0 - 800320a: bf00 nop - 800320c: 2180 movs r1, #128 ; 0x80 - 800320e: 480e ldr r0, [pc, #56] ; (8003248 ) - 8003210: f7ff fe5a bl 8002ec8 - 8003214: 4603 mov r3, r0 - 8003216: 2b01 cmp r3, #1 - 8003218: d1f8 bne.n 800320c + 8005cd2: bf00 nop + 8005cd4: 2180 movs r1, #128 ; 0x80 + 8005cd6: 480e ldr r0, [pc, #56] ; (8005d10 ) + 8005cd8: f7ff fda0 bl 800581c + 8005cdc: 4603 mov r3, r0 + 8005cde: 2b01 cmp r3, #1 + 8005ce0: d1f8 bne.n 8005cd4 USART_SendData(UART4, msg[i]); - 800321a: 687a ldr r2, [r7, #4] - 800321c: 68fb ldr r3, [r7, #12] - 800321e: 4413 add r3, r2 - 8003220: 781b ldrb r3, [r3, #0] - 8003222: b29b uxth r3, r3 - 8003224: 4619 mov r1, r3 - 8003226: 4808 ldr r0, [pc, #32] ; (8003248 ) - 8003228: f7ff fe3c bl 8002ea4 + 8005ce2: 687a ldr r2, [r7, #4] + 8005ce4: 68fb ldr r3, [r7, #12] + 8005ce6: 4413 add r3, r2 + 8005ce8: 781b ldrb r3, [r3, #0] + 8005cea: b29b uxth r3, r3 + 8005cec: 4619 mov r1, r3 + 8005cee: 4808 ldr r0, [pc, #32] ; (8005d10 ) + 8005cf0: f7ff fd2a bl 8005748 for(uint32_t i=0; i - 8003238: 4602 mov r2, r0 - 800323a: 68fb ldr r3, [r7, #12] - 800323c: 4293 cmp r3, r2 - 800323e: d3e4 bcc.n 800320a + 8005cf4: 68fb ldr r3, [r7, #12] + 8005cf6: 3301 adds r3, #1 + 8005cf8: 60fb str r3, [r7, #12] + 8005cfa: 6878 ldr r0, [r7, #4] + 8005cfc: f7fa fad2 bl 80002a4 + 8005d00: 4602 mov r2, r0 + 8005d02: 68fb ldr r3, [r7, #12] + 8005d04: 4293 cmp r3, r2 + 8005d06: d3e4 bcc.n 8005cd2 + } +} + 8005d08: bf00 nop + 8005d0a: 3710 adds r7, #16 + 8005d0c: 46bd mov sp, r7 + 8005d0e: bd80 pop {r7, pc} + 8005d10: 40004c00 .word 0x40004c00 + +08005d14 : +{ + vTaskDelay((delay_ms*configTICK_RATE_HZ)/1000); +} + + +void UART4_IRQHandler(void){ + 8005d14: b580 push {r7, lr} + 8005d16: b084 sub sp, #16 + 8005d18: af02 add r7, sp, #8 + + uint8_t data_byte; + BaseType_t pxHigherPriorityTaskWoken = pdFALSE; + 8005d1a: 2300 movs r3, #0 + 8005d1c: 603b str r3, [r7, #0] + if(USART_GetFlagStatus(UART4, USART_FLAG_RXNE)){ + 8005d1e: 2120 movs r1, #32 + 8005d20: 4823 ldr r0, [pc, #140] ; (8005db0 ) + 8005d22: f7ff fd7b bl 800581c + 8005d26: 4603 mov r3, r0 + 8005d28: 2b00 cmp r3, #0 + 8005d2a: d031 beq.n 8005d90 + //yes we received some data + data_byte = (uint8_t)USART_ReceiveData(UART4); + 8005d2c: 4820 ldr r0, [pc, #128] ; (8005db0 ) + 8005d2e: f7ff fd1d bl 800576c + 8005d32: 4603 mov r3, r0 + 8005d34: 71fb strb r3, [r7, #7] + command_buffer[command_len++] = data_byte; + 8005d36: 4b1f ldr r3, [pc, #124] ; (8005db4 ) + 8005d38: 781b ldrb r3, [r3, #0] + 8005d3a: 1c5a adds r2, r3, #1 + 8005d3c: b2d1 uxtb r1, r2 + 8005d3e: 4a1d ldr r2, [pc, #116] ; (8005db4 ) + 8005d40: 7011 strb r1, [r2, #0] + 8005d42: 4619 mov r1, r3 + 8005d44: 4a1c ldr r2, [pc, #112] ; (8005db8 ) + 8005d46: 79fb ldrb r3, [r7, #7] + 8005d48: 5453 strb r3, [r2, r1] + if(command_len >=(20-1)){ + 8005d4a: 4b1a ldr r3, [pc, #104] ; (8005db4 ) + 8005d4c: 781b ldrb r3, [r3, #0] + 8005d4e: 2b12 cmp r3, #18 + 8005d50: d902 bls.n 8005d58 + command_len=0; //prevent the app from crashing + 8005d52: 4b18 ldr r3, [pc, #96] ; (8005db4 ) + 8005d54: 2200 movs r2, #0 + 8005d56: 701a strb r2, [r3, #0] + } + if(data_byte == '\r'){ + 8005d58: 79fb ldrb r3, [r7, #7] + 8005d5a: 2b0d cmp r3, #13 + 8005d5c: d118 bne.n 8005d90 + //reset the command len + command_len = 0; + 8005d5e: 4b15 ldr r3, [pc, #84] ; (8005db4 ) + 8005d60: 2200 movs r2, #0 + 8005d62: 701a strb r2, [r3, #0] + //user finished entering command + //notify command handle task + xTaskNotifyFromISR(Handle_cmd_handling_task,0,eNoAction,&pxHigherPriorityTaskWoken); + 8005d64: 4b15 ldr r3, [pc, #84] ; (8005dbc ) + 8005d66: 6818 ldr r0, [r3, #0] + 8005d68: 463b mov r3, r7 + 8005d6a: 9301 str r3, [sp, #4] + 8005d6c: 2300 movs r3, #0 + 8005d6e: 9300 str r3, [sp, #0] + 8005d70: 2300 movs r3, #0 + 8005d72: 2200 movs r2, #0 + 8005d74: 2100 movs r1, #0 + 8005d76: f7fc f959 bl 800202c + //notify menu print task as well + xTaskNotifyFromISR(Handle_menu_display_task,0,eNoAction,&pxHigherPriorityTaskWoken); + 8005d7a: 4b11 ldr r3, [pc, #68] ; (8005dc0 ) + 8005d7c: 6818 ldr r0, [r3, #0] + 8005d7e: 463b mov r3, r7 + 8005d80: 9301 str r3, [sp, #4] + 8005d82: 2300 movs r3, #0 + 8005d84: 9300 str r3, [sp, #0] + 8005d86: 2300 movs r3, #0 + 8005d88: 2200 movs r2, #0 + 8005d8a: 2100 movs r1, #0 + 8005d8c: f7fc f94e bl 800202c + } + } + //if higher priority task woken up then task yield + if(pxHigherPriorityTaskWoken){ + 8005d90: 683b ldr r3, [r7, #0] + 8005d92: 2b00 cmp r3, #0 + 8005d94: d007 beq.n 8005da6 + taskYIELD(); + 8005d96: 4b0b ldr r3, [pc, #44] ; (8005dc4 ) + 8005d98: f04f 5280 mov.w r2, #268435456 ; 0x10000000 + 8005d9c: 601a str r2, [r3, #0] + 8005d9e: f3bf 8f4f dsb sy + 8005da2: f3bf 8f6f isb sy + } + +} + 8005da6: bf00 nop + 8005da8: 3708 adds r7, #8 + 8005daa: 46bd mov sp, r7 + 8005dac: bd80 pop {r7, pc} + 8005dae: bf00 nop + 8005db0: 40004c00 .word 0x40004c00 + 8005db4: 20015cf0 .word 0x20015cf0 + 8005db8: 20015dec .word 0x20015dec + 8005dbc: 20015cdc .word 0x20015cdc + 8005dc0: 20015cd8 .word 0x20015cd8 + 8005dc4: e000ed04 .word 0xe000ed04 + +08005dc8 : + +uint8_t getCommandCode(uint8_t* buffer) +{ + 8005dc8: b480 push {r7} + 8005dca: b083 sub sp, #12 + 8005dcc: af00 add r7, sp, #0 + 8005dce: 6078 str r0, [r7, #4] + return (buffer[0] - 48) ; + 8005dd0: 687b ldr r3, [r7, #4] + 8005dd2: 781b ldrb r3, [r3, #0] + 8005dd4: 3b30 subs r3, #48 ; 0x30 + 8005dd6: b2db uxtb r3, r3 +} + 8005dd8: 4618 mov r0, r3 + 8005dda: 370c adds r7, #12 + 8005ddc: 46bd mov sp, r7 + 8005dde: f85d 7b04 ldr.w r7, [sp], #4 + 8005de2: 4770 bx lr + +08005de4 : + +void getArguments(uint8_t* data) +{ + 8005de4: b480 push {r7} + 8005de6: b083 sub sp, #12 + 8005de8: af00 add r7, sp, #0 + 8005dea: 6078 str r0, [r7, #4] + +} + 8005dec: bf00 nop + 8005dee: 370c adds r7, #12 + 8005df0: 46bd mov sp, r7 + 8005df2: f85d 7b04 ldr.w r7, [sp], #4 + 8005df6: 4770 bx lr + +08005df8 : + +void make_led_on(void) +{ + 8005df8: b580 push {r7, lr} + 8005dfa: af00 add r7, sp, #0 + GPIO_SetBits(GPIOD, GPIO_Pin_14); + 8005dfc: f44f 4180 mov.w r1, #16384 ; 0x4000 + 8005e00: 4802 ldr r0, [pc, #8] ; (8005e0c ) + 8005e02: f7ff f955 bl 80050b0 +} + 8005e06: bf00 nop + 8005e08: bd80 pop {r7, pc} + 8005e0a: bf00 nop + 8005e0c: 40020c00 .word 0x40020c00 + +08005e10 : +void make_led_off(void) +{ + 8005e10: b580 push {r7, lr} + 8005e12: af00 add r7, sp, #0 + GPIO_ResetBits(GPIOD, GPIO_Pin_14); + 8005e14: f44f 4180 mov.w r1, #16384 ; 0x4000 + 8005e18: 4802 ldr r0, [pc, #8] ; (8005e24 ) + 8005e1a: f7ff f958 bl 80050ce +} + 8005e1e: bf00 nop + 8005e20: bd80 pop {r7, pc} + 8005e22: bf00 nop + 8005e24: 40020c00 .word 0x40020c00 + +08005e28 : + +void led_toggle(TimerHandle_t xTimer){ + 8005e28: b580 push {r7, lr} + 8005e2a: b082 sub sp, #8 + 8005e2c: af00 add r7, sp, #0 + 8005e2e: 6078 str r0, [r7, #4] + GPIO_ToggleBits(GPIOD, GPIO_Pin_14); + 8005e30: f44f 4180 mov.w r1, #16384 ; 0x4000 + 8005e34: 4803 ldr r0, [pc, #12] ; (8005e44 ) + 8005e36: f7ff f959 bl 80050ec +} + 8005e3a: bf00 nop + 8005e3c: 3708 adds r7, #8 + 8005e3e: 46bd mov sp, r7 + 8005e40: bd80 pop {r7, pc} + 8005e42: bf00 nop + 8005e44: 40020c00 .word 0x40020c00 + +08005e48 : +void make_led_toggle_start(uint32_t toggle_delay) +{ + 8005e48: b590 push {r4, r7, lr} + 8005e4a: b085 sub sp, #20 + 8005e4c: af02 add r7, sp, #8 + 8005e4e: 6078 str r0, [r7, #4] + if(Timer_LedToggle == NULL){ + 8005e50: 4b0f ldr r3, [pc, #60] ; (8005e90 ) + 8005e52: 681b ldr r3, [r3, #0] + 8005e54: 2b00 cmp r3, #0 + 8005e56: d10a bne.n 8005e6e + //create the Software Timer + Timer_LedToggle = xTimerCreate("LED_TOGGLE_TIMER", toggle_delay, pdTRUE, NULL, led_toggle); + 8005e58: 4b0e ldr r3, [pc, #56] ; (8005e94 ) + 8005e5a: 9300 str r3, [sp, #0] + 8005e5c: 2300 movs r3, #0 + 8005e5e: 2201 movs r2, #1 + 8005e60: 6879 ldr r1, [r7, #4] + 8005e62: 480d ldr r0, [pc, #52] ; (8005e98 ) + 8005e64: f7fc fa9c bl 80023a0 + 8005e68: 4602 mov r2, r0 + 8005e6a: 4b09 ldr r3, [pc, #36] ; (8005e90 ) + 8005e6c: 601a str r2, [r3, #0] + } + //start the timer + xTimerStart(Timer_LedToggle,portMAX_DELAY); + 8005e6e: 4b08 ldr r3, [pc, #32] ; (8005e90 ) + 8005e70: 681c ldr r4, [r3, #0] + 8005e72: f7fb fb93 bl 800159c + 8005e76: 4602 mov r2, r0 + 8005e78: f04f 33ff mov.w r3, #4294967295 ; 0xffffffff + 8005e7c: 9300 str r3, [sp, #0] + 8005e7e: 2300 movs r3, #0 + 8005e80: 2101 movs r1, #1 + 8005e82: 4620 mov r0, r4 + 8005e84: f7fc fae8 bl 8002458 + +} + 8005e88: bf00 nop + 8005e8a: 370c adds r7, #12 + 8005e8c: 46bd mov sp, r7 + 8005e8e: bd90 pop {r4, r7, pc} + 8005e90: 20015cf4 .word 0x20015cf4 + 8005e94: 08005e29 .word 0x08005e29 + 8005e98: 08006ce4 .word 0x08006ce4 + +08005e9c : +void make_led_toggle_stop(void) +{ + 8005e9c: b580 push {r7, lr} + 8005e9e: b082 sub sp, #8 + 8005ea0: af02 add r7, sp, #8 + if(Timer_LedToggle != NULL){ + 8005ea2: 4b08 ldr r3, [pc, #32] ; (8005ec4 ) + 8005ea4: 681b ldr r3, [r3, #0] + 8005ea6: 2b00 cmp r3, #0 + 8005ea8: d009 beq.n 8005ebe + //stop the created timer + xTimerStop(Timer_LedToggle,portMAX_DELAY); + 8005eaa: 4b06 ldr r3, [pc, #24] ; (8005ec4 ) + 8005eac: 6818 ldr r0, [r3, #0] + 8005eae: f04f 33ff mov.w r3, #4294967295 ; 0xffffffff + 8005eb2: 9300 str r3, [sp, #0] + 8005eb4: 2300 movs r3, #0 + 8005eb6: 2200 movs r2, #0 + 8005eb8: 2103 movs r1, #3 + 8005eba: f7fc facd bl 8002458 + } +} + 8005ebe: bf00 nop + 8005ec0: 46bd mov sp, r7 + 8005ec2: bd80 pop {r7, pc} + 8005ec4: 20015cf4 .word 0x20015cf4 + +08005ec8 : +void make_led_status_read(char* data) +{ + 8005ec8: b590 push {r4, r7, lr} + 8005eca: b083 sub sp, #12 + 8005ecc: af00 add r7, sp, #0 + 8005ece: 6078 str r0, [r7, #4] + sprintf(data, "\r\n LED STATUS is : %d\r\n", GPIO_ReadOutputDataBit(GPIOD, GPIO_Pin_14)); + 8005ed0: 687c ldr r4, [r7, #4] + 8005ed2: f44f 4180 mov.w r1, #16384 ; 0x4000 + 8005ed6: 480a ldr r0, [pc, #40] ; (8005f00 ) + 8005ed8: f7ff f8d0 bl 800507c + 8005edc: 4603 mov r3, r0 + 8005ede: 461a mov r2, r3 + 8005ee0: 4908 ldr r1, [pc, #32] ; (8005f04 ) + 8005ee2: 4620 mov r0, r4 + 8005ee4: f000 fa62 bl 80063ac + xQueueSend(uart_queue,&data,portMAX_DELAY); + 8005ee8: 4b07 ldr r3, [pc, #28] ; (8005f08 ) + 8005eea: 6818 ldr r0, [r3, #0] + 8005eec: 1d39 adds r1, r7, #4 + 8005eee: 2300 movs r3, #0 + 8005ef0: f04f 32ff mov.w r2, #4294967295 ; 0xffffffff + 8005ef4: f7fa fbd6 bl 80006a4 +} + 8005ef8: bf00 nop + 8005efa: 370c adds r7, #12 + 8005efc: 46bd mov sp, r7 + 8005efe: bd90 pop {r4, r7, pc} + 8005f00: 40020c00 .word 0x40020c00 + 8005f04: 08006cf8 .word 0x08006cf8 + 8005f08: 20015cec .word 0x20015cec + +08005f0c : +void make_rtc_datetime_read(char* data) +{ + 8005f0c: b5f0 push {r4, r5, r6, r7, lr} + 8005f0e: b089 sub sp, #36 ; 0x24 + 8005f10: af04 add r7, sp, #16 + 8005f12: 6078 str r0, [r7, #4] + RTC_DateTypeDef RTC_DateStruct; + RTC_TimeTypeDef RTC_TimeStruct; + + RTC_GetDate(RTC_Format_BIN, &RTC_DateStruct); + 8005f14: f107 030c add.w r3, r7, #12 + 8005f18: 4619 mov r1, r3 + 8005f1a: 2000 movs r0, #0 + 8005f1c: f7ff fad0 bl 80054c0 + RTC_GetTime(RTC_Format_BIN, &RTC_TimeStruct); + 8005f20: f107 0308 add.w r3, r7, #8 + 8005f24: 4619 mov r1, r3 + 8005f26: 2000 movs r0, #0 + 8005f28: f7ff fa78 bl 800541c + + sprintf(data,"\r\nYY:MM:DD = %02d:%02d:%02d\r\nHH:MM:SS = %02d:%02d:%02d",RTC_DateStruct.RTC_Year,RTC_DateStruct.RTC_Month, + 8005f2c: 6878 ldr r0, [r7, #4] + 8005f2e: 7bfb ldrb r3, [r7, #15] + 8005f30: 461d mov r5, r3 + 8005f32: 7b7b ldrb r3, [r7, #13] + 8005f34: 461e mov r6, r3 + RTC_DateStruct.RTC_Date,RTC_TimeStruct.RTC_Hours,RTC_TimeStruct.RTC_Minutes,RTC_TimeStruct.RTC_Seconds); + 8005f36: 7bbb ldrb r3, [r7, #14] + 8005f38: 7a3a ldrb r2, [r7, #8] + 8005f3a: 7a79 ldrb r1, [r7, #9] + 8005f3c: 7abc ldrb r4, [r7, #10] + sprintf(data,"\r\nYY:MM:DD = %02d:%02d:%02d\r\nHH:MM:SS = %02d:%02d:%02d",RTC_DateStruct.RTC_Year,RTC_DateStruct.RTC_Month, + 8005f3e: 9403 str r4, [sp, #12] + 8005f40: 9102 str r1, [sp, #8] + 8005f42: 9201 str r2, [sp, #4] + 8005f44: 9300 str r3, [sp, #0] + 8005f46: 4633 mov r3, r6 + 8005f48: 462a mov r2, r5 + 8005f4a: 4907 ldr r1, [pc, #28] ; (8005f68 ) + 8005f4c: f000 fa2e bl 80063ac + + xQueueSend(uart_queue,&data,portMAX_DELAY); + 8005f50: 4b06 ldr r3, [pc, #24] ; (8005f6c ) + 8005f52: 6818 ldr r0, [r3, #0] + 8005f54: 1d39 adds r1, r7, #4 + 8005f56: 2300 movs r3, #0 + 8005f58: f04f 32ff mov.w r2, #4294967295 ; 0xffffffff + 8005f5c: f7fa fba2 bl 80006a4 +} + 8005f60: bf00 nop + 8005f62: 3714 adds r7, #20 + 8005f64: 46bd mov sp, r7 + 8005f66: bdf0 pop {r4, r5, r6, r7, pc} + 8005f68: 08006d10 .word 0x08006d10 + 8005f6c: 20015cec .word 0x20015cec + +08005f70 : + +void make_exit_app(void) +{ + 8005f70: b580 push {r7, lr} + 8005f72: af00 add r7, sp, #0 + //delete all the tasks + vTaskDelete(Handle_menu_display_task); + 8005f74: 4b0c ldr r3, [pc, #48] ; (8005fa8 ) + 8005f76: 681b ldr r3, [r3, #0] + 8005f78: 4618 mov r0, r3 + 8005f7a: f7fb f959 bl 8001230 + vTaskDelete(Handle_uart_write_task); + 8005f7e: 4b0b ldr r3, [pc, #44] ; (8005fac ) + 8005f80: 681b ldr r3, [r3, #0] + 8005f82: 4618 mov r0, r3 + 8005f84: f7fb f954 bl 8001230 + vTaskDelete(Handle_cmd_processing_task); + 8005f88: 4b09 ldr r3, [pc, #36] ; (8005fb0 ) + 8005f8a: 681b ldr r3, [r3, #0] + 8005f8c: 4618 mov r0, r3 + 8005f8e: f7fb f94f bl 8001230 + vTaskDelete(Handle_cmd_handling_task); + 8005f92: 4b08 ldr r3, [pc, #32] ; (8005fb4 ) + 8005f94: 681b ldr r3, [r3, #0] + 8005f96: 4618 mov r0, r3 + 8005f98: f7fb f94a bl 8001230 + + //disable all the interrupts or disable interrupts which you don't require + NVIC_DisableIRQ(UART4_IRQn); //or use basepri assembly instructions to disable all interrupts portDISABLE_INTERRUPTS(); + 8005f9c: 2034 movs r0, #52 ; 0x34 + 8005f9e: f7ff fc73 bl 8005888 + + //set the cpu in low power mode that will be done by idle hook function + +} + 8005fa2: bf00 nop + 8005fa4: bd80 pop {r7, pc} + 8005fa6: bf00 nop + 8005fa8: 20015cd8 .word 0x20015cd8 + 8005fac: 20015ce4 .word 0x20015ce4 + 8005fb0: 20015ce0 .word 0x20015ce0 + 8005fb4: 20015cdc .word 0x20015cdc + +08005fb8 : + +void print_errormsg(char* data) +{ + 8005fb8: b5b0 push {r4, r5, r7, lr} + 8005fba: b082 sub sp, #8 + 8005fbc: af00 add r7, sp, #0 + 8005fbe: 6078 str r0, [r7, #4] + sprintf(data, "\r\nCommand Not found\r\n"); + 8005fc0: 687b ldr r3, [r7, #4] + 8005fc2: 4a0c ldr r2, [pc, #48] ; (8005ff4 ) + 8005fc4: 461d mov r5, r3 + 8005fc6: 4614 mov r4, r2 + 8005fc8: cc0f ldmia r4!, {r0, r1, r2, r3} + 8005fca: 6028 str r0, [r5, #0] + 8005fcc: 6069 str r1, [r5, #4] + 8005fce: 60aa str r2, [r5, #8] + 8005fd0: 60eb str r3, [r5, #12] + 8005fd2: 6820 ldr r0, [r4, #0] + 8005fd4: 6128 str r0, [r5, #16] + 8005fd6: 88a3 ldrh r3, [r4, #4] + 8005fd8: 82ab strh r3, [r5, #20] + xQueueSend(uart_queue,&data,portMAX_DELAY); + 8005fda: 4b07 ldr r3, [pc, #28] ; (8005ff8 ) + 8005fdc: 6818 ldr r0, [r3, #0] + 8005fde: 1d39 adds r1, r7, #4 + 8005fe0: 2300 movs r3, #0 + 8005fe2: f04f 32ff mov.w r2, #4294967295 ; 0xffffffff + 8005fe6: f7fa fb5d bl 80006a4 +} + 8005fea: bf00 nop + 8005fec: 3708 adds r7, #8 + 8005fee: 46bd mov sp, r7 + 8005ff0: bdb0 pop {r4, r5, r7, pc} + 8005ff2: bf00 nop + 8005ff4: 08006d48 .word 0x08006d48 + 8005ff8: 20015cec .word 0x20015cec + +08005ffc : + +void vApplicationIdleHook(void) +{ + 8005ffc: b480 push {r7} + 8005ffe: af00 add r7, sp, #0 + Wait For Interrupt is a hint instruction that suspends execution + until one of a number of events occurs. + */ +__attribute__((always_inline)) __STATIC_INLINE void __WFI(void) +{ + __ASM volatile ("wfi"); + 8006000: bf30 wfi + //send the system in sleep mode + __WFI(); +} + 8006002: bf00 nop + 8006004: 46bd mov sp, r7 + 8006006: f85d 7b04 ldr.w r7, [sp], #4 + 800600a: 4770 bx lr + +0800600c <_sbrk>: } + return len; } - 8003240: bf00 nop - 8003242: 3710 adds r7, #16 - 8003244: 46bd mov sp, r7 - 8003246: bd80 pop {r7, pc} - 8003248: 40004c00 .word 0x40004c00 -0800324c : +caddr_t _sbrk(int incr) +{ + 800600c: b580 push {r7, lr} + 800600e: b084 sub sp, #16 + 8006010: af00 add r7, sp, #0 + 8006012: 6078 str r0, [r7, #4] + extern char end asm("end"); + static char *heap_end; + char *prev_heap_end; + + if (heap_end == 0) + 8006014: 4b11 ldr r3, [pc, #68] ; (800605c <_sbrk+0x50>) + 8006016: 681b ldr r3, [r3, #0] + 8006018: 2b00 cmp r3, #0 + 800601a: d102 bne.n 8006022 <_sbrk+0x16> + heap_end = &end; + 800601c: 4b0f ldr r3, [pc, #60] ; (800605c <_sbrk+0x50>) + 800601e: 4a10 ldr r2, [pc, #64] ; (8006060 <_sbrk+0x54>) + 8006020: 601a str r2, [r3, #0] + + prev_heap_end = heap_end; + 8006022: 4b0e ldr r3, [pc, #56] ; (800605c <_sbrk+0x50>) + 8006024: 681b ldr r3, [r3, #0] + 8006026: 60fb str r3, [r7, #12] + if (heap_end + incr > stack_ptr) + 8006028: 4b0c ldr r3, [pc, #48] ; (800605c <_sbrk+0x50>) + 800602a: 681a ldr r2, [r3, #0] + 800602c: 687b ldr r3, [r7, #4] + 800602e: 4413 add r3, r2 + 8006030: 466a mov r2, sp + 8006032: 4293 cmp r3, r2 + 8006034: d907 bls.n 8006046 <_sbrk+0x3a> + { +// write(1, "Heap and stack collision\n", 25); +// abort(); + errno = ENOMEM; + 8006036: f000 f96d bl 8006314 <__errno> + 800603a: 4602 mov r2, r0 + 800603c: 230c movs r3, #12 + 800603e: 6013 str r3, [r2, #0] + return (caddr_t) -1; + 8006040: f04f 33ff mov.w r3, #4294967295 ; 0xffffffff + 8006044: e006 b.n 8006054 <_sbrk+0x48> + } + + heap_end += incr; + 8006046: 4b05 ldr r3, [pc, #20] ; (800605c <_sbrk+0x50>) + 8006048: 681a ldr r2, [r3, #0] + 800604a: 687b ldr r3, [r7, #4] + 800604c: 4413 add r3, r2 + 800604e: 4a03 ldr r2, [pc, #12] ; (800605c <_sbrk+0x50>) + 8006050: 6013 str r3, [r2, #0] + + return (caddr_t) prev_heap_end; + 8006052: 68fb ldr r3, [r7, #12] +} + 8006054: 4618 mov r0, r3 + 8006056: 3710 adds r7, #16 + 8006058: 46bd mov sp, r7 + 800605a: bd80 pop {r7, pc} + 800605c: 20015cf8 .word 0x20015cf8 + 8006060: 20015e08 .word 0x20015e08 + +08006064 : * SystemFrequency variable. * @param None * @retval None */ void SystemInit(void) { - 800324c: b580 push {r7, lr} - 800324e: af00 add r7, sp, #0 + 8006064: b580 push {r7, lr} + 8006066: af00 add r7, sp, #0 /* FPU settings ------------------------------------------------------------*/ #if (__FPU_PRESENT == 1) && (__FPU_USED == 1) SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2)); /* set CP10 and CP11 Full Access */ - 8003250: 4b16 ldr r3, [pc, #88] ; (80032ac ) - 8003252: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88 - 8003256: 4a15 ldr r2, [pc, #84] ; (80032ac ) - 8003258: f443 0370 orr.w r3, r3, #15728640 ; 0xf00000 - 800325c: f8c2 3088 str.w r3, [r2, #136] ; 0x88 + 8006068: 4b16 ldr r3, [pc, #88] ; (80060c4 ) + 800606a: f8d3 3088 ldr.w r3, [r3, #136] ; 0x88 + 800606e: 4a15 ldr r2, [pc, #84] ; (80060c4 ) + 8006070: f443 0370 orr.w r3, r3, #15728640 ; 0xf00000 + 8006074: f8c2 3088 str.w r3, [r2, #136] ; 0x88 #endif /* Reset the RCC clock configuration to the default reset state ------------*/ /* Set HSION bit */ RCC->CR |= (uint32_t)0x00000001; - 8003260: 4b13 ldr r3, [pc, #76] ; (80032b0 ) - 8003262: 681b ldr r3, [r3, #0] - 8003264: 4a12 ldr r2, [pc, #72] ; (80032b0 ) - 8003266: f043 0301 orr.w r3, r3, #1 - 800326a: 6013 str r3, [r2, #0] + 8006078: 4b13 ldr r3, [pc, #76] ; (80060c8 ) + 800607a: 681b ldr r3, [r3, #0] + 800607c: 4a12 ldr r2, [pc, #72] ; (80060c8 ) + 800607e: f043 0301 orr.w r3, r3, #1 + 8006082: 6013 str r3, [r2, #0] /* Reset CFGR register */ RCC->CFGR = 0x00000000; - 800326c: 4b10 ldr r3, [pc, #64] ; (80032b0 ) - 800326e: 2200 movs r2, #0 - 8003270: 609a str r2, [r3, #8] + 8006084: 4b10 ldr r3, [pc, #64] ; (80060c8 ) + 8006086: 2200 movs r2, #0 + 8006088: 609a str r2, [r3, #8] /* Reset HSEON, CSSON and PLLON bits */ RCC->CR &= (uint32_t)0xFEF6FFFF; - 8003272: 4b0f ldr r3, [pc, #60] ; (80032b0 ) - 8003274: 681b ldr r3, [r3, #0] - 8003276: 4a0e ldr r2, [pc, #56] ; (80032b0 ) - 8003278: f023 7384 bic.w r3, r3, #17301504 ; 0x1080000 - 800327c: f423 3380 bic.w r3, r3, #65536 ; 0x10000 - 8003280: 6013 str r3, [r2, #0] + 800608a: 4b0f ldr r3, [pc, #60] ; (80060c8 ) + 800608c: 681b ldr r3, [r3, #0] + 800608e: 4a0e ldr r2, [pc, #56] ; (80060c8 ) + 8006090: f023 7384 bic.w r3, r3, #17301504 ; 0x1080000 + 8006094: f423 3380 bic.w r3, r3, #65536 ; 0x10000 + 8006098: 6013 str r3, [r2, #0] /* Reset PLLCFGR register */ RCC->PLLCFGR = 0x24003010; - 8003282: 4b0b ldr r3, [pc, #44] ; (80032b0 ) - 8003284: 4a0b ldr r2, [pc, #44] ; (80032b4 ) - 8003286: 605a str r2, [r3, #4] + 800609a: 4b0b ldr r3, [pc, #44] ; (80060c8 ) + 800609c: 4a0b ldr r2, [pc, #44] ; (80060cc ) + 800609e: 605a str r2, [r3, #4] /* Reset HSEBYP bit */ RCC->CR &= (uint32_t)0xFFFBFFFF; - 8003288: 4b09 ldr r3, [pc, #36] ; (80032b0 ) - 800328a: 681b ldr r3, [r3, #0] - 800328c: 4a08 ldr r2, [pc, #32] ; (80032b0 ) - 800328e: f423 2380 bic.w r3, r3, #262144 ; 0x40000 - 8003292: 6013 str r3, [r2, #0] + 80060a0: 4b09 ldr r3, [pc, #36] ; (80060c8 ) + 80060a2: 681b ldr r3, [r3, #0] + 80060a4: 4a08 ldr r2, [pc, #32] ; (80060c8 ) + 80060a6: f423 2380 bic.w r3, r3, #262144 ; 0x40000 + 80060aa: 6013 str r3, [r2, #0] /* Disable all interrupts */ RCC->CIR = 0x00000000; - 8003294: 4b06 ldr r3, [pc, #24] ; (80032b0 ) - 8003296: 2200 movs r2, #0 - 8003298: 60da str r2, [r3, #12] + 80060ac: 4b06 ldr r3, [pc, #24] ; (80060c8 ) + 80060ae: 2200 movs r2, #0 + 80060b0: 60da str r2, [r3, #12] SystemInit_ExtMemCtl(); #endif /* DATA_IN_ExtSRAM || DATA_IN_ExtSDRAM */ /* Configure the System clock source, PLL Multiplier and Divider factors, AHB/APBx prescalers and Flash settings ----------------------------------*/ SetSysClock(); - 800329a: f000 f889 bl 80033b0 + 80060b2: f000 f889 bl 80061c8 /* Configure the Vector Table location add offset address ------------------*/ #ifdef VECT_TAB_SRAM SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */ #else SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */ - 800329e: 4b03 ldr r3, [pc, #12] ; (80032ac ) - 80032a0: f04f 6200 mov.w r2, #134217728 ; 0x8000000 - 80032a4: 609a str r2, [r3, #8] + 80060b6: 4b03 ldr r3, [pc, #12] ; (80060c4 ) + 80060b8: f04f 6200 mov.w r2, #134217728 ; 0x8000000 + 80060bc: 609a str r2, [r3, #8] #endif } - 80032a6: bf00 nop - 80032a8: bd80 pop {r7, pc} - 80032aa: bf00 nop - 80032ac: e000ed00 .word 0xe000ed00 - 80032b0: 40023800 .word 0x40023800 - 80032b4: 24003010 .word 0x24003010 - -080032b8 : + 80060be: bf00 nop + 80060c0: bd80 pop {r7, pc} + 80060c2: bf00 nop + 80060c4: e000ed00 .word 0xe000ed00 + 80060c8: 40023800 .word 0x40023800 + 80060cc: 24003010 .word 0x24003010 + +080060d0 : * * @param None * @retval None */ void SystemCoreClockUpdate(void) { - 80032b8: b480 push {r7} - 80032ba: b087 sub sp, #28 - 80032bc: af00 add r7, sp, #0 + 80060d0: b480 push {r7} + 80060d2: b087 sub sp, #28 + 80060d4: af00 add r7, sp, #0 uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2; - 80032be: 2300 movs r3, #0 - 80032c0: 613b str r3, [r7, #16] - 80032c2: 2300 movs r3, #0 - 80032c4: 617b str r3, [r7, #20] - 80032c6: 2302 movs r3, #2 - 80032c8: 60fb str r3, [r7, #12] - 80032ca: 2300 movs r3, #0 - 80032cc: 60bb str r3, [r7, #8] - 80032ce: 2302 movs r3, #2 - 80032d0: 607b str r3, [r7, #4] + 80060d6: 2300 movs r3, #0 + 80060d8: 613b str r3, [r7, #16] + 80060da: 2300 movs r3, #0 + 80060dc: 617b str r3, [r7, #20] + 80060de: 2302 movs r3, #2 + 80060e0: 60fb str r3, [r7, #12] + 80060e2: 2300 movs r3, #0 + 80060e4: 60bb str r3, [r7, #8] + 80060e6: 2302 movs r3, #2 + 80060e8: 607b str r3, [r7, #4] #if defined(STM32F412xG) || defined(STM32F413_423xx) || defined(STM32F446xx) uint32_t pllr = 2; #endif /* STM32F412xG || STM32F413_423xx || STM32F446xx */ /* Get SYSCLK source -------------------------------------------------------*/ tmp = RCC->CFGR & RCC_CFGR_SWS; - 80032d2: 4b32 ldr r3, [pc, #200] ; (800339c ) - 80032d4: 689b ldr r3, [r3, #8] - 80032d6: f003 030c and.w r3, r3, #12 - 80032da: 613b str r3, [r7, #16] + 80060ea: 4b32 ldr r3, [pc, #200] ; (80061b4 ) + 80060ec: 689b ldr r3, [r3, #8] + 80060ee: f003 030c and.w r3, r3, #12 + 80060f2: 613b str r3, [r7, #16] switch (tmp) - 80032dc: 693b ldr r3, [r7, #16] - 80032de: 2b04 cmp r3, #4 - 80032e0: d007 beq.n 80032f2 - 80032e2: 2b08 cmp r3, #8 - 80032e4: d009 beq.n 80032fa - 80032e6: 2b00 cmp r3, #0 - 80032e8: d13d bne.n 8003366 + 80060f4: 693b ldr r3, [r7, #16] + 80060f6: 2b04 cmp r3, #4 + 80060f8: d007 beq.n 800610a + 80060fa: 2b08 cmp r3, #8 + 80060fc: d009 beq.n 8006112 + 80060fe: 2b00 cmp r3, #0 + 8006100: d13d bne.n 800617e { case 0x00: /* HSI used as system clock source */ SystemCoreClock = HSI_VALUE; - 80032ea: 4b2d ldr r3, [pc, #180] ; (80033a0 ) - 80032ec: 4a2d ldr r2, [pc, #180] ; (80033a4 ) - 80032ee: 601a str r2, [r3, #0] + 8006102: 4b2d ldr r3, [pc, #180] ; (80061b8 ) + 8006104: 4a2d ldr r2, [pc, #180] ; (80061bc ) + 8006106: 601a str r2, [r3, #0] break; - 80032f0: e03d b.n 800336e + 8006108: e03d b.n 8006186 case 0x04: /* HSE used as system clock source */ SystemCoreClock = HSE_VALUE; - 80032f2: 4b2b ldr r3, [pc, #172] ; (80033a0 ) - 80032f4: 4a2c ldr r2, [pc, #176] ; (80033a8 ) - 80032f6: 601a str r2, [r3, #0] + 800610a: 4b2b ldr r3, [pc, #172] ; (80061b8 ) + 800610c: 4a2c ldr r2, [pc, #176] ; (80061c0 ) + 800610e: 601a str r2, [r3, #0] break; - 80032f8: e039 b.n 800336e + 8006110: e039 b.n 8006186 case 0x08: /* PLL P used as system clock source */ /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N SYSCLK = PLL_VCO / PLL_P */ pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22; - 80032fa: 4b28 ldr r3, [pc, #160] ; (800339c ) - 80032fc: 685b ldr r3, [r3, #4] - 80032fe: 0d9b lsrs r3, r3, #22 - 8003300: f003 0301 and.w r3, r3, #1 - 8003304: 60bb str r3, [r7, #8] + 8006112: 4b28 ldr r3, [pc, #160] ; (80061b4 ) + 8006114: 685b ldr r3, [r3, #4] + 8006116: 0d9b lsrs r3, r3, #22 + 8006118: f003 0301 and.w r3, r3, #1 + 800611c: 60bb str r3, [r7, #8] pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM; - 8003306: 4b25 ldr r3, [pc, #148] ; (800339c ) - 8003308: 685b ldr r3, [r3, #4] - 800330a: f003 033f and.w r3, r3, #63 ; 0x3f - 800330e: 607b str r3, [r7, #4] + 800611e: 4b25 ldr r3, [pc, #148] ; (80061b4 ) + 8006120: 685b ldr r3, [r3, #4] + 8006122: f003 033f and.w r3, r3, #63 ; 0x3f + 8006126: 607b str r3, [r7, #4] #if defined(STM32F40_41xxx) || defined(STM32F427_437xx) || defined(STM32F429_439xx) || defined(STM32F401xx) || defined(STM32F412xG) || defined(STM32F413_423xx) || defined(STM32F446xx) || defined(STM32F469_479xx) if (pllsource != 0) - 8003310: 68bb ldr r3, [r7, #8] - 8003312: 2b00 cmp r3, #0 - 8003314: d00c beq.n 8003330 + 8006128: 68bb ldr r3, [r7, #8] + 800612a: 2b00 cmp r3, #0 + 800612c: d00c beq.n 8006148 { /* HSE used as PLL clock source */ pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); - 8003316: 4a24 ldr r2, [pc, #144] ; (80033a8 ) - 8003318: 687b ldr r3, [r7, #4] - 800331a: fbb2 f3f3 udiv r3, r2, r3 - 800331e: 4a1f ldr r2, [pc, #124] ; (800339c ) - 8003320: 6852 ldr r2, [r2, #4] - 8003322: 0992 lsrs r2, r2, #6 - 8003324: f3c2 0208 ubfx r2, r2, #0, #9 - 8003328: fb02 f303 mul.w r3, r2, r3 - 800332c: 617b str r3, [r7, #20] - 800332e: e00b b.n 8003348 + 800612e: 4a24 ldr r2, [pc, #144] ; (80061c0 ) + 8006130: 687b ldr r3, [r7, #4] + 8006132: fbb2 f3f3 udiv r3, r2, r3 + 8006136: 4a1f ldr r2, [pc, #124] ; (80061b4 ) + 8006138: 6852 ldr r2, [r2, #4] + 800613a: 0992 lsrs r2, r2, #6 + 800613c: f3c2 0208 ubfx r2, r2, #0, #9 + 8006140: fb02 f303 mul.w r3, r2, r3 + 8006144: 617b str r3, [r7, #20] + 8006146: e00b b.n 8006160 } else { /* HSI used as PLL clock source */ pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); - 8003330: 4a1c ldr r2, [pc, #112] ; (80033a4 ) - 8003332: 687b ldr r3, [r7, #4] - 8003334: fbb2 f3f3 udiv r3, r2, r3 - 8003338: 4a18 ldr r2, [pc, #96] ; (800339c ) - 800333a: 6852 ldr r2, [r2, #4] - 800333c: 0992 lsrs r2, r2, #6 - 800333e: f3c2 0208 ubfx r2, r2, #0, #9 - 8003342: fb02 f303 mul.w r3, r2, r3 - 8003346: 617b str r3, [r7, #20] + 8006148: 4a1c ldr r2, [pc, #112] ; (80061bc ) + 800614a: 687b ldr r3, [r7, #4] + 800614c: fbb2 f3f3 udiv r3, r2, r3 + 8006150: 4a18 ldr r2, [pc, #96] ; (80061b4 ) + 8006152: 6852 ldr r2, [r2, #4] + 8006154: 0992 lsrs r2, r2, #6 + 8006156: f3c2 0208 ubfx r2, r2, #0, #9 + 800615a: fb02 f303 mul.w r3, r2, r3 + 800615e: 617b str r3, [r7, #20] /* HSI used as PLL clock source */ pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6); } #endif /* USE_HSE_BYPASS */ #endif /* STM32F40_41xxx || STM32F427_437xx || STM32F429_439xx || STM32F401xx || STM32F412xG || STM32F413_423xx || STM32F446xx || STM32F469_479xx */ pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2; - 8003348: 4b14 ldr r3, [pc, #80] ; (800339c ) - 800334a: 685b ldr r3, [r3, #4] - 800334c: 0c1b lsrs r3, r3, #16 - 800334e: f003 0303 and.w r3, r3, #3 - 8003352: 3301 adds r3, #1 - 8003354: 005b lsls r3, r3, #1 - 8003356: 60fb str r3, [r7, #12] + 8006160: 4b14 ldr r3, [pc, #80] ; (80061b4 ) + 8006162: 685b ldr r3, [r3, #4] + 8006164: 0c1b lsrs r3, r3, #16 + 8006166: f003 0303 and.w r3, r3, #3 + 800616a: 3301 adds r3, #1 + 800616c: 005b lsls r3, r3, #1 + 800616e: 60fb str r3, [r7, #12] SystemCoreClock = pllvco/pllp; - 8003358: 697a ldr r2, [r7, #20] - 800335a: 68fb ldr r3, [r7, #12] - 800335c: fbb2 f3f3 udiv r3, r2, r3 - 8003360: 4a0f ldr r2, [pc, #60] ; (80033a0 ) - 8003362: 6013 str r3, [r2, #0] + 8006170: 697a ldr r2, [r7, #20] + 8006172: 68fb ldr r3, [r7, #12] + 8006174: fbb2 f3f3 udiv r3, r2, r3 + 8006178: 4a0f ldr r2, [pc, #60] ; (80061b8 ) + 800617a: 6013 str r3, [r2, #0] break; - 8003364: e003 b.n 800336e + 800617c: e003 b.n 8006186 pllr = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLR) >>28) + 1 ) *2; SystemCoreClock = pllvco/pllr; break; #endif /* STM32F412xG || STM32F413_423xx || STM32F446xx */ default: SystemCoreClock = HSI_VALUE; - 8003366: 4b0e ldr r3, [pc, #56] ; (80033a0 ) - 8003368: 4a0e ldr r2, [pc, #56] ; (80033a4 ) - 800336a: 601a str r2, [r3, #0] + 800617e: 4b0e ldr r3, [pc, #56] ; (80061b8 ) + 8006180: 4a0e ldr r2, [pc, #56] ; (80061bc ) + 8006182: 601a str r2, [r3, #0] break; - 800336c: bf00 nop + 8006184: bf00 nop } /* Compute HCLK frequency --------------------------------------------------*/ /* Get HCLK prescaler */ tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)]; - 800336e: 4b0b ldr r3, [pc, #44] ; (800339c ) - 8003370: 689b ldr r3, [r3, #8] - 8003372: 091b lsrs r3, r3, #4 - 8003374: f003 030f and.w r3, r3, #15 - 8003378: 4a0c ldr r2, [pc, #48] ; (80033ac ) - 800337a: 5cd3 ldrb r3, [r2, r3] - 800337c: b2db uxtb r3, r3 - 800337e: 613b str r3, [r7, #16] + 8006186: 4b0b ldr r3, [pc, #44] ; (80061b4 ) + 8006188: 689b ldr r3, [r3, #8] + 800618a: 091b lsrs r3, r3, #4 + 800618c: f003 030f and.w r3, r3, #15 + 8006190: 4a0c ldr r2, [pc, #48] ; (80061c4 ) + 8006192: 5cd3 ldrb r3, [r2, r3] + 8006194: b2db uxtb r3, r3 + 8006196: 613b str r3, [r7, #16] /* HCLK frequency */ SystemCoreClock >>= tmp; - 8003380: 4b07 ldr r3, [pc, #28] ; (80033a0 ) - 8003382: 681a ldr r2, [r3, #0] - 8003384: 693b ldr r3, [r7, #16] - 8003386: fa22 f303 lsr.w r3, r2, r3 - 800338a: 4a05 ldr r2, [pc, #20] ; (80033a0 ) - 800338c: 6013 str r3, [r2, #0] -} - 800338e: bf00 nop - 8003390: 371c adds r7, #28 - 8003392: 46bd mov sp, r7 - 8003394: f85d 7b04 ldr.w r7, [sp], #4 - 8003398: 4770 bx lr - 800339a: bf00 nop - 800339c: 40023800 .word 0x40023800 - 80033a0: 2000001c .word 0x2000001c - 80033a4: 00f42400 .word 0x00f42400 - 80033a8: 017d7840 .word 0x017d7840 - 80033ac: 20000020 .word 0x20000020 - -080033b0 : + 8006198: 4b07 ldr r3, [pc, #28] ; (80061b8 ) + 800619a: 681a ldr r2, [r3, #0] + 800619c: 693b ldr r3, [r7, #16] + 800619e: fa22 f303 lsr.w r3, r2, r3 + 80061a2: 4a05 ldr r2, [pc, #20] ; (80061b8 ) + 80061a4: 6013 str r3, [r2, #0] +} + 80061a6: bf00 nop + 80061a8: 371c adds r7, #28 + 80061aa: 46bd mov sp, r7 + 80061ac: f85d 7b04 ldr.w r7, [sp], #4 + 80061b0: 4770 bx lr + 80061b2: bf00 nop + 80061b4: 40023800 .word 0x40023800 + 80061b8: 2000010c .word 0x2000010c + 80061bc: 00f42400 .word 0x00f42400 + 80061c0: 017d7840 .word 0x017d7840 + 80061c4: 20000110 .word 0x20000110 + +080061c8 : * is reset to the default reset state (done in SystemInit() function). * @param None * @retval None */ static void SetSysClock(void) { - 80033b0: b480 push {r7} - 80033b2: b083 sub sp, #12 - 80033b4: af00 add r7, sp, #0 + 80061c8: b480 push {r7} + 80061ca: b083 sub sp, #12 + 80061cc: af00 add r7, sp, #0 #if defined(STM32F40_41xxx) || defined(STM32F427_437xx) || defined(STM32F429_439xx) || defined(STM32F401xx) || defined(STM32F412xG) || defined(STM32F413_423xx) || defined(STM32F446xx)|| defined(STM32F469_479xx) /******************************************************************************/ /* PLL (clocked by HSE) used as System clock source */ /******************************************************************************/ __IO uint32_t StartUpCounter = 0, HSEStatus = 0; - 80033b6: 2300 movs r3, #0 - 80033b8: 607b str r3, [r7, #4] - 80033ba: 2300 movs r3, #0 - 80033bc: 603b str r3, [r7, #0] + 80061ce: 2300 movs r3, #0 + 80061d0: 607b str r3, [r7, #4] + 80061d2: 2300 movs r3, #0 + 80061d4: 603b str r3, [r7, #0] /* Enable HSE */ RCC->CR |= ((uint32_t)RCC_CR_HSEON); - 80033be: 4b36 ldr r3, [pc, #216] ; (8003498 ) - 80033c0: 681b ldr r3, [r3, #0] - 80033c2: 4a35 ldr r2, [pc, #212] ; (8003498 ) - 80033c4: f443 3380 orr.w r3, r3, #65536 ; 0x10000 - 80033c8: 6013 str r3, [r2, #0] + 80061d6: 4b36 ldr r3, [pc, #216] ; (80062b0 ) + 80061d8: 681b ldr r3, [r3, #0] + 80061da: 4a35 ldr r2, [pc, #212] ; (80062b0 ) + 80061dc: f443 3380 orr.w r3, r3, #65536 ; 0x10000 + 80061e0: 6013 str r3, [r2, #0] /* Wait till HSE is ready and if Time out is reached exit */ do { HSEStatus = RCC->CR & RCC_CR_HSERDY; - 80033ca: 4b33 ldr r3, [pc, #204] ; (8003498 ) - 80033cc: 681b ldr r3, [r3, #0] - 80033ce: f403 3300 and.w r3, r3, #131072 ; 0x20000 - 80033d2: 603b str r3, [r7, #0] + 80061e2: 4b33 ldr r3, [pc, #204] ; (80062b0 ) + 80061e4: 681b ldr r3, [r3, #0] + 80061e6: f403 3300 and.w r3, r3, #131072 ; 0x20000 + 80061ea: 603b str r3, [r7, #0] StartUpCounter++; - 80033d4: 687b ldr r3, [r7, #4] - 80033d6: 3301 adds r3, #1 - 80033d8: 607b str r3, [r7, #4] + 80061ec: 687b ldr r3, [r7, #4] + 80061ee: 3301 adds r3, #1 + 80061f0: 607b str r3, [r7, #4] } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT)); - 80033da: 683b ldr r3, [r7, #0] - 80033dc: 2b00 cmp r3, #0 - 80033de: d103 bne.n 80033e8 - 80033e0: 687b ldr r3, [r7, #4] - 80033e2: f5b3 4fa0 cmp.w r3, #20480 ; 0x5000 - 80033e6: d1f0 bne.n 80033ca + 80061f2: 683b ldr r3, [r7, #0] + 80061f4: 2b00 cmp r3, #0 + 80061f6: d103 bne.n 8006200 + 80061f8: 687b ldr r3, [r7, #4] + 80061fa: f5b3 4fa0 cmp.w r3, #20480 ; 0x5000 + 80061fe: d1f0 bne.n 80061e2 if ((RCC->CR & RCC_CR_HSERDY) != RESET) - 80033e8: 4b2b ldr r3, [pc, #172] ; (8003498 ) - 80033ea: 681b ldr r3, [r3, #0] - 80033ec: f403 3300 and.w r3, r3, #131072 ; 0x20000 - 80033f0: 2b00 cmp r3, #0 - 80033f2: d002 beq.n 80033fa + 8006200: 4b2b ldr r3, [pc, #172] ; (80062b0 ) + 8006202: 681b ldr r3, [r3, #0] + 8006204: f403 3300 and.w r3, r3, #131072 ; 0x20000 + 8006208: 2b00 cmp r3, #0 + 800620a: d002 beq.n 8006212 { HSEStatus = (uint32_t)0x01; - 80033f4: 2301 movs r3, #1 - 80033f6: 603b str r3, [r7, #0] - 80033f8: e001 b.n 80033fe + 800620c: 2301 movs r3, #1 + 800620e: 603b str r3, [r7, #0] + 8006210: e001 b.n 8006216 } else { HSEStatus = (uint32_t)0x00; - 80033fa: 2300 movs r3, #0 - 80033fc: 603b str r3, [r7, #0] + 8006212: 2300 movs r3, #0 + 8006214: 603b str r3, [r7, #0] } if (HSEStatus == (uint32_t)0x01) - 80033fe: 683b ldr r3, [r7, #0] - 8003400: 2b01 cmp r3, #1 - 8003402: d142 bne.n 800348a + 8006216: 683b ldr r3, [r7, #0] + 8006218: 2b01 cmp r3, #1 + 800621a: d142 bne.n 80062a2 { /* Select regulator voltage output Scale 1 mode */ RCC->APB1ENR |= RCC_APB1ENR_PWREN; - 8003404: 4b24 ldr r3, [pc, #144] ; (8003498 ) - 8003406: 6c1b ldr r3, [r3, #64] ; 0x40 - 8003408: 4a23 ldr r2, [pc, #140] ; (8003498 ) - 800340a: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000 - 800340e: 6413 str r3, [r2, #64] ; 0x40 + 800621c: 4b24 ldr r3, [pc, #144] ; (80062b0 ) + 800621e: 6c1b ldr r3, [r3, #64] ; 0x40 + 8006220: 4a23 ldr r2, [pc, #140] ; (80062b0 ) + 8006222: f043 5380 orr.w r3, r3, #268435456 ; 0x10000000 + 8006226: 6413 str r3, [r2, #64] ; 0x40 PWR->CR |= PWR_CR_VOS; - 8003410: 4b22 ldr r3, [pc, #136] ; (800349c ) - 8003412: 681b ldr r3, [r3, #0] - 8003414: 4a21 ldr r2, [pc, #132] ; (800349c ) - 8003416: f443 4340 orr.w r3, r3, #49152 ; 0xc000 - 800341a: 6013 str r3, [r2, #0] + 8006228: 4b22 ldr r3, [pc, #136] ; (80062b4 ) + 800622a: 681b ldr r3, [r3, #0] + 800622c: 4a21 ldr r2, [pc, #132] ; (80062b4 ) + 800622e: f443 4340 orr.w r3, r3, #49152 ; 0xc000 + 8006232: 6013 str r3, [r2, #0] /* HCLK = SYSCLK / 1*/ RCC->CFGR |= RCC_CFGR_HPRE_DIV1; - 800341c: 4b1e ldr r3, [pc, #120] ; (8003498 ) - 800341e: 4a1e ldr r2, [pc, #120] ; (8003498 ) - 8003420: 689b ldr r3, [r3, #8] - 8003422: 6093 str r3, [r2, #8] + 8006234: 4b1e ldr r3, [pc, #120] ; (80062b0 ) + 8006236: 4a1e ldr r2, [pc, #120] ; (80062b0 ) + 8006238: 689b ldr r3, [r3, #8] + 800623a: 6093 str r3, [r2, #8] #if defined(STM32F40_41xxx) || defined(STM32F427_437xx) || defined(STM32F429_439xx) || defined(STM32F412xG) || defined(STM32F446xx) || defined(STM32F469_479xx) /* PCLK2 = HCLK / 2*/ RCC->CFGR |= RCC_CFGR_PPRE2_DIV2; - 8003424: 4b1c ldr r3, [pc, #112] ; (8003498 ) - 8003426: 689b ldr r3, [r3, #8] - 8003428: 4a1b ldr r2, [pc, #108] ; (8003498 ) - 800342a: f443 4300 orr.w r3, r3, #32768 ; 0x8000 - 800342e: 6093 str r3, [r2, #8] + 800623c: 4b1c ldr r3, [pc, #112] ; (80062b0 ) + 800623e: 689b ldr r3, [r3, #8] + 8006240: 4a1b ldr r2, [pc, #108] ; (80062b0 ) + 8006242: f443 4300 orr.w r3, r3, #32768 ; 0x8000 + 8006246: 6093 str r3, [r2, #8] /* PCLK1 = HCLK / 4*/ RCC->CFGR |= RCC_CFGR_PPRE1_DIV4; - 8003430: 4b19 ldr r3, [pc, #100] ; (8003498 ) - 8003432: 689b ldr r3, [r3, #8] - 8003434: 4a18 ldr r2, [pc, #96] ; (8003498 ) - 8003436: f443 53a0 orr.w r3, r3, #5120 ; 0x1400 - 800343a: 6093 str r3, [r2, #8] + 8006248: 4b19 ldr r3, [pc, #100] ; (80062b0 ) + 800624a: 689b ldr r3, [r3, #8] + 800624c: 4a18 ldr r2, [pc, #96] ; (80062b0 ) + 800624e: f443 53a0 orr.w r3, r3, #5120 ; 0x1400 + 8006252: 6093 str r3, [r2, #8] RCC->CFGR |= RCC_CFGR_PPRE1_DIV2; #endif /* STM32F401xx || STM32F413_423xx */ #if defined(STM32F40_41xxx) || defined(STM32F427_437xx) || defined(STM32F429_439xx) || defined(STM32F401xx) || defined(STM32F469_479xx) /* Configure the main PLL */ RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) | - 800343c: 4b16 ldr r3, [pc, #88] ; (8003498 ) - 800343e: 4a18 ldr r2, [pc, #96] ; (80034a0 ) - 8003440: 605a str r2, [r3, #4] + 8006254: 4b16 ldr r3, [pc, #88] ; (80062b0 ) + 8006256: 4a18 ldr r2, [pc, #96] ; (80062b8 ) + 8006258: 605a str r2, [r3, #4] RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) | (RCC_PLLCFGR_PLLSRC_HSE) | (PLL_Q << 24) | (PLL_R << 28); #endif /* STM32F412xG || STM32F413_423xx || STM32F446xx */ /* Enable the main PLL */ RCC->CR |= RCC_CR_PLLON; - 8003442: 4b15 ldr r3, [pc, #84] ; (8003498 ) - 8003444: 681b ldr r3, [r3, #0] - 8003446: 4a14 ldr r2, [pc, #80] ; (8003498 ) - 8003448: f043 7380 orr.w r3, r3, #16777216 ; 0x1000000 - 800344c: 6013 str r3, [r2, #0] + 800625a: 4b15 ldr r3, [pc, #84] ; (80062b0 ) + 800625c: 681b ldr r3, [r3, #0] + 800625e: 4a14 ldr r2, [pc, #80] ; (80062b0 ) + 8006260: f043 7380 orr.w r3, r3, #16777216 ; 0x1000000 + 8006264: 6013 str r3, [r2, #0] /* Wait till the main PLL is ready */ while((RCC->CR & RCC_CR_PLLRDY) == 0) - 800344e: bf00 nop - 8003450: 4b11 ldr r3, [pc, #68] ; (8003498 ) - 8003452: 681b ldr r3, [r3, #0] - 8003454: f003 7300 and.w r3, r3, #33554432 ; 0x2000000 - 8003458: 2b00 cmp r3, #0 - 800345a: d0f9 beq.n 8003450 + 8006266: bf00 nop + 8006268: 4b11 ldr r3, [pc, #68] ; (80062b0 ) + 800626a: 681b ldr r3, [r3, #0] + 800626c: f003 7300 and.w r3, r3, #33554432 ; 0x2000000 + 8006270: 2b00 cmp r3, #0 + 8006272: d0f9 beq.n 8006268 FLASH->ACR = FLASH_ACR_PRFTEN | FLASH_ACR_ICEN |FLASH_ACR_DCEN |FLASH_ACR_LATENCY_5WS; #endif /* STM32F427_437x || STM32F429_439xx || STM32F446xx || STM32F469_479xx */ #if defined(STM32F40_41xxx) || defined(STM32F412xG) /* Configure Flash prefetch, Instruction cache, Data cache and wait state */ FLASH->ACR = FLASH_ACR_PRFTEN | FLASH_ACR_ICEN |FLASH_ACR_DCEN |FLASH_ACR_LATENCY_5WS; - 800345c: 4b11 ldr r3, [pc, #68] ; (80034a4 ) - 800345e: f240 7205 movw r2, #1797 ; 0x705 - 8003462: 601a str r2, [r3, #0] + 8006274: 4b11 ldr r3, [pc, #68] ; (80062bc ) + 8006276: f240 7205 movw r2, #1797 ; 0x705 + 800627a: 601a str r2, [r3, #0] /* Configure Flash prefetch, Instruction cache, Data cache and wait state */ FLASH->ACR = FLASH_ACR_PRFTEN | FLASH_ACR_ICEN |FLASH_ACR_DCEN |FLASH_ACR_LATENCY_2WS; #endif /* STM32F401xx */ /* Select the main PLL as system clock source */ RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW)); - 8003464: 4b0c ldr r3, [pc, #48] ; (8003498 ) - 8003466: 689b ldr r3, [r3, #8] - 8003468: 4a0b ldr r2, [pc, #44] ; (8003498 ) - 800346a: f023 0303 bic.w r3, r3, #3 - 800346e: 6093 str r3, [r2, #8] + 800627c: 4b0c ldr r3, [pc, #48] ; (80062b0 ) + 800627e: 689b ldr r3, [r3, #8] + 8006280: 4a0b ldr r2, [pc, #44] ; (80062b0 ) + 8006282: f023 0303 bic.w r3, r3, #3 + 8006286: 6093 str r3, [r2, #8] RCC->CFGR |= RCC_CFGR_SW_PLL; - 8003470: 4b09 ldr r3, [pc, #36] ; (8003498 ) - 8003472: 689b ldr r3, [r3, #8] - 8003474: 4a08 ldr r2, [pc, #32] ; (8003498 ) - 8003476: f043 0302 orr.w r3, r3, #2 - 800347a: 6093 str r3, [r2, #8] + 8006288: 4b09 ldr r3, [pc, #36] ; (80062b0 ) + 800628a: 689b ldr r3, [r3, #8] + 800628c: 4a08 ldr r2, [pc, #32] ; (80062b0 ) + 800628e: f043 0302 orr.w r3, r3, #2 + 8006292: 6093 str r3, [r2, #8] /* Wait till the main PLL is used as system clock source */ while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL) - 800347c: bf00 nop - 800347e: 4b06 ldr r3, [pc, #24] ; (8003498 ) - 8003480: 689b ldr r3, [r3, #8] - 8003482: f003 030c and.w r3, r3, #12 - 8003486: 2b08 cmp r3, #8 - 8003488: d1f9 bne.n 800347e + 8006294: bf00 nop + 8006296: 4b06 ldr r3, [pc, #24] ; (80062b0 ) + 8006298: 689b ldr r3, [r3, #8] + 800629a: f003 030c and.w r3, r3, #12 + 800629e: 2b08 cmp r3, #8 + 80062a0: d1f9 bne.n 8006296 while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL); { } #endif /* USE_HSE_BYPASS */ #endif /* STM32F40_41xxx || STM32F427_437xx || STM32F429_439xx || STM32F401xx || STM32F469_479xx */ } - 800348a: bf00 nop - 800348c: 370c adds r7, #12 - 800348e: 46bd mov sp, r7 - 8003490: f85d 7b04 ldr.w r7, [sp], #4 - 8003494: 4770 bx lr - 8003496: bf00 nop - 8003498: 40023800 .word 0x40023800 - 800349c: 40007000 .word 0x40007000 - 80034a0: 07405419 .word 0x07405419 - 80034a4: 40023c00 .word 0x40023c00 - -080034a8 : + 80062a2: bf00 nop + 80062a4: 370c adds r7, #12 + 80062a6: 46bd mov sp, r7 + 80062a8: f85d 7b04 ldr.w r7, [sp], #4 + 80062ac: 4770 bx lr + 80062ae: bf00 nop + 80062b0: 40023800 .word 0x40023800 + 80062b4: 40007000 .word 0x40007000 + 80062b8: 07405419 .word 0x07405419 + 80062bc: 40023c00 .word 0x40023c00 + +080062c0 : .section .text.Reset_Handler .weak Reset_Handler .type Reset_Handler, %function Reset_Handler: ldr r0, =_estack - 80034a8: 480d ldr r0, [pc, #52] ; (80034e0 ) + 80062c0: 480d ldr r0, [pc, #52] ; (80062f8 ) mov sp, r0 /* set stack pointer */ - 80034aa: 4685 mov sp, r0 + 80062c2: 4685 mov sp, r0 /* Copy the data segment initializers from flash to SRAM */ ldr r0, =_sdata - 80034ac: 480d ldr r0, [pc, #52] ; (80034e4 ) + 80062c4: 480d ldr r0, [pc, #52] ; (80062fc ) ldr r1, =_edata - 80034ae: 490e ldr r1, [pc, #56] ; (80034e8 ) + 80062c6: 490e ldr r1, [pc, #56] ; (8006300 ) ldr r2, =_sidata - 80034b0: 4a0e ldr r2, [pc, #56] ; (80034ec ) + 80062c8: 4a0e ldr r2, [pc, #56] ; (8006304 ) movs r3, #0 - 80034b2: 2300 movs r3, #0 + 80062ca: 2300 movs r3, #0 b LoopCopyDataInit - 80034b4: e002 b.n 80034bc + 80062cc: e002 b.n 80062d4 -080034b6 : +080062ce : CopyDataInit: ldr r4, [r2, r3] - 80034b6: 58d4 ldr r4, [r2, r3] + 80062ce: 58d4 ldr r4, [r2, r3] str r4, [r0, r3] - 80034b8: 50c4 str r4, [r0, r3] + 80062d0: 50c4 str r4, [r0, r3] adds r3, r3, #4 - 80034ba: 3304 adds r3, #4 + 80062d2: 3304 adds r3, #4 -080034bc : +080062d4 : LoopCopyDataInit: adds r4, r0, r3 - 80034bc: 18c4 adds r4, r0, r3 + 80062d4: 18c4 adds r4, r0, r3 cmp r4, r1 - 80034be: 428c cmp r4, r1 + 80062d6: 428c cmp r4, r1 bcc CopyDataInit - 80034c0: d3f9 bcc.n 80034b6 + 80062d8: d3f9 bcc.n 80062ce /* Zero fill the bss segment. */ ldr r2, =_sbss - 80034c2: 4a0b ldr r2, [pc, #44] ; (80034f0 ) + 80062da: 4a0b ldr r2, [pc, #44] ; (8006308 ) ldr r4, =_ebss - 80034c4: 4c0b ldr r4, [pc, #44] ; (80034f4 ) + 80062dc: 4c0b ldr r4, [pc, #44] ; (800630c ) movs r3, #0 - 80034c6: 2300 movs r3, #0 + 80062de: 2300 movs r3, #0 b LoopFillZerobss - 80034c8: e001 b.n 80034ce + 80062e0: e001 b.n 80062e6 -080034ca : +080062e2 : FillZerobss: str r3, [r2] - 80034ca: 6013 str r3, [r2, #0] + 80062e2: 6013 str r3, [r2, #0] adds r2, r2, #4 - 80034cc: 3204 adds r2, #4 + 80062e4: 3204 adds r2, #4 -080034ce : +080062e6 : LoopFillZerobss: cmp r2, r4 - 80034ce: 42a2 cmp r2, r4 + 80062e6: 42a2 cmp r2, r4 bcc FillZerobss - 80034d0: d3fb bcc.n 80034ca + 80062e8: d3fb bcc.n 80062e2 /* Call the clock system intitialization function.*/ bl SystemInit - 80034d2: f7ff febb bl 800324c + 80062ea: f7ff febb bl 8006064 /* Call static constructors */ bl __libc_init_array - 80034d6: f000 f811 bl 80034fc <__libc_init_array> + 80062ee: f000 f817 bl 8006320 <__libc_init_array> /* Call the application's entry point.*/ bl main - 80034da: f7ff fd11 bl 8002f00
+ 80062f2: f7ff fb0d bl 8005910
-080034de : +080062f6 : LoopForever: b LoopForever - 80034de: e7fe b.n 80034de + 80062f6: e7fe b.n 80062f6 ldr r0, =_estack - 80034e0: 20020000 .word 0x20020000 + 80062f8: 20020000 .word 0x20020000 ldr r0, =_sdata - 80034e4: 20000000 .word 0x20000000 + 80062fc: 20000000 .word 0x20000000 ldr r1, =_edata - 80034e8: 20000030 .word 0x20000030 + 8006300: 20000184 .word 0x20000184 ldr r2, =_sidata - 80034ec: 08003614 .word 0x08003614 + 8006304: 08006db0 .word 0x08006db0 ldr r2, =_sbss - 80034f0: 20000030 .word 0x20000030 + 8006308: 20000184 .word 0x20000184 ldr r4, =_ebss - 80034f4: 20012e04 .word 0x20012e04 + 800630c: 20015e04 .word 0x20015e04 -080034f8 : +08006310 : * @retval : None */ .section .text.Default_Handler,"ax",%progbits Default_Handler: Infinite_Loop: b Infinite_Loop - 80034f8: e7fe b.n 80034f8 + 8006310: e7fe b.n 8006310 + ... + +08006314 <__errno>: + 8006314: 4b01 ldr r3, [pc, #4] ; (800631c <__errno+0x8>) + 8006316: 6818 ldr r0, [r3, #0] + 8006318: 4770 bx lr + 800631a: bf00 nop + 800631c: 20000120 .word 0x20000120 + +08006320 <__libc_init_array>: + 8006320: b570 push {r4, r5, r6, lr} + 8006322: 4e0d ldr r6, [pc, #52] ; (8006358 <__libc_init_array+0x38>) + 8006324: 4c0d ldr r4, [pc, #52] ; (800635c <__libc_init_array+0x3c>) + 8006326: 1ba4 subs r4, r4, r6 + 8006328: 10a4 asrs r4, r4, #2 + 800632a: 2500 movs r5, #0 + 800632c: 42a5 cmp r5, r4 + 800632e: d109 bne.n 8006344 <__libc_init_array+0x24> + 8006330: 4e0b ldr r6, [pc, #44] ; (8006360 <__libc_init_array+0x40>) + 8006332: 4c0c ldr r4, [pc, #48] ; (8006364 <__libc_init_array+0x44>) + 8006334: f000 fc36 bl 8006ba4 <_init> + 8006338: 1ba4 subs r4, r4, r6 + 800633a: 10a4 asrs r4, r4, #2 + 800633c: 2500 movs r5, #0 + 800633e: 42a5 cmp r5, r4 + 8006340: d105 bne.n 800634e <__libc_init_array+0x2e> + 8006342: bd70 pop {r4, r5, r6, pc} + 8006344: f856 3025 ldr.w r3, [r6, r5, lsl #2] + 8006348: 4798 blx r3 + 800634a: 3501 adds r5, #1 + 800634c: e7ee b.n 800632c <__libc_init_array+0xc> + 800634e: f856 3025 ldr.w r3, [r6, r5, lsl #2] + 8006352: 4798 blx r3 + 8006354: 3501 adds r5, #1 + 8006356: e7f2 b.n 800633e <__libc_init_array+0x1e> + 8006358: 08006da8 .word 0x08006da8 + 800635c: 08006da8 .word 0x08006da8 + 8006360: 08006da8 .word 0x08006da8 + 8006364: 08006dac .word 0x08006dac + +08006368 : + 8006368: b530 push {r4, r5, lr} + 800636a: 2400 movs r4, #0 + 800636c: 42a2 cmp r2, r4 + 800636e: d101 bne.n 8006374 + 8006370: 2000 movs r0, #0 + 8006372: e007 b.n 8006384 + 8006374: 5d03 ldrb r3, [r0, r4] + 8006376: 3401 adds r4, #1 + 8006378: 190d adds r5, r1, r4 + 800637a: f815 5c01 ldrb.w r5, [r5, #-1] + 800637e: 42ab cmp r3, r5 + 8006380: d0f4 beq.n 800636c + 8006382: 1b58 subs r0, r3, r5 + 8006384: bd30 pop {r4, r5, pc} + +08006386 : + 8006386: b510 push {r4, lr} + 8006388: 1e43 subs r3, r0, #1 + 800638a: 440a add r2, r1 + 800638c: 4291 cmp r1, r2 + 800638e: d100 bne.n 8006392 + 8006390: bd10 pop {r4, pc} + 8006392: f811 4b01 ldrb.w r4, [r1], #1 + 8006396: f803 4f01 strb.w r4, [r3, #1]! + 800639a: e7f7 b.n 800638c + +0800639c : + 800639c: 4402 add r2, r0 + 800639e: 4603 mov r3, r0 + 80063a0: 4293 cmp r3, r2 + 80063a2: d100 bne.n 80063a6 + 80063a4: 4770 bx lr + 80063a6: f803 1b01 strb.w r1, [r3], #1 + 80063aa: e7f9 b.n 80063a0 + +080063ac : + 80063ac: b40e push {r1, r2, r3} + 80063ae: b500 push {lr} + 80063b0: b09c sub sp, #112 ; 0x70 + 80063b2: ab1d add r3, sp, #116 ; 0x74 + 80063b4: 9002 str r0, [sp, #8] + 80063b6: 9006 str r0, [sp, #24] + 80063b8: f06f 4100 mvn.w r1, #2147483648 ; 0x80000000 + 80063bc: 4809 ldr r0, [pc, #36] ; (80063e4 ) + 80063be: 9107 str r1, [sp, #28] + 80063c0: 9104 str r1, [sp, #16] + 80063c2: 4909 ldr r1, [pc, #36] ; (80063e8 ) + 80063c4: f853 2b04 ldr.w r2, [r3], #4 + 80063c8: 9105 str r1, [sp, #20] + 80063ca: 6800 ldr r0, [r0, #0] + 80063cc: 9301 str r3, [sp, #4] + 80063ce: a902 add r1, sp, #8 + 80063d0: f000 f866 bl 80064a0 <_svfiprintf_r> + 80063d4: 9b02 ldr r3, [sp, #8] + 80063d6: 2200 movs r2, #0 + 80063d8: 701a strb r2, [r3, #0] + 80063da: b01c add sp, #112 ; 0x70 + 80063dc: f85d eb04 ldr.w lr, [sp], #4 + 80063e0: b003 add sp, #12 + 80063e2: 4770 bx lr + 80063e4: 20000120 .word 0x20000120 + 80063e8: ffff0208 .word 0xffff0208 + +080063ec <__ssputs_r>: + 80063ec: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} + 80063f0: 688e ldr r6, [r1, #8] + 80063f2: 429e cmp r6, r3 + 80063f4: 4682 mov sl, r0 + 80063f6: 460c mov r4, r1 + 80063f8: 4690 mov r8, r2 + 80063fa: 4699 mov r9, r3 + 80063fc: d837 bhi.n 800646e <__ssputs_r+0x82> + 80063fe: 898a ldrh r2, [r1, #12] + 8006400: f412 6f90 tst.w r2, #1152 ; 0x480 + 8006404: d031 beq.n 800646a <__ssputs_r+0x7e> + 8006406: 6825 ldr r5, [r4, #0] + 8006408: 6909 ldr r1, [r1, #16] + 800640a: 1a6f subs r7, r5, r1 + 800640c: 6965 ldr r5, [r4, #20] + 800640e: 2302 movs r3, #2 + 8006410: eb05 0545 add.w r5, r5, r5, lsl #1 + 8006414: fb95 f5f3 sdiv r5, r5, r3 + 8006418: f109 0301 add.w r3, r9, #1 + 800641c: 443b add r3, r7 + 800641e: 429d cmp r5, r3 + 8006420: bf38 it cc + 8006422: 461d movcc r5, r3 + 8006424: 0553 lsls r3, r2, #21 + 8006426: d530 bpl.n 800648a <__ssputs_r+0x9e> + 8006428: 4629 mov r1, r5 + 800642a: f000 fb21 bl 8006a70 <_malloc_r> + 800642e: 4606 mov r6, r0 + 8006430: b950 cbnz r0, 8006448 <__ssputs_r+0x5c> + 8006432: 230c movs r3, #12 + 8006434: f8ca 3000 str.w r3, [sl] + 8006438: 89a3 ldrh r3, [r4, #12] + 800643a: f043 0340 orr.w r3, r3, #64 ; 0x40 + 800643e: 81a3 strh r3, [r4, #12] + 8006440: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff + 8006444: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} + 8006448: 463a mov r2, r7 + 800644a: 6921 ldr r1, [r4, #16] + 800644c: f7ff ff9b bl 8006386 + 8006450: 89a3 ldrh r3, [r4, #12] + 8006452: f423 6390 bic.w r3, r3, #1152 ; 0x480 + 8006456: f043 0380 orr.w r3, r3, #128 ; 0x80 + 800645a: 81a3 strh r3, [r4, #12] + 800645c: 6126 str r6, [r4, #16] + 800645e: 6165 str r5, [r4, #20] + 8006460: 443e add r6, r7 + 8006462: 1bed subs r5, r5, r7 + 8006464: 6026 str r6, [r4, #0] + 8006466: 60a5 str r5, [r4, #8] + 8006468: 464e mov r6, r9 + 800646a: 454e cmp r6, r9 + 800646c: d900 bls.n 8006470 <__ssputs_r+0x84> + 800646e: 464e mov r6, r9 + 8006470: 4632 mov r2, r6 + 8006472: 4641 mov r1, r8 + 8006474: 6820 ldr r0, [r4, #0] + 8006476: f000 fa93 bl 80069a0 + 800647a: 68a3 ldr r3, [r4, #8] + 800647c: 1b9b subs r3, r3, r6 + 800647e: 60a3 str r3, [r4, #8] + 8006480: 6823 ldr r3, [r4, #0] + 8006482: 441e add r6, r3 + 8006484: 6026 str r6, [r4, #0] + 8006486: 2000 movs r0, #0 + 8006488: e7dc b.n 8006444 <__ssputs_r+0x58> + 800648a: 462a mov r2, r5 + 800648c: f000 fb4a bl 8006b24 <_realloc_r> + 8006490: 4606 mov r6, r0 + 8006492: 2800 cmp r0, #0 + 8006494: d1e2 bne.n 800645c <__ssputs_r+0x70> + 8006496: 6921 ldr r1, [r4, #16] + 8006498: 4650 mov r0, sl + 800649a: f000 fa9b bl 80069d4 <_free_r> + 800649e: e7c8 b.n 8006432 <__ssputs_r+0x46> + +080064a0 <_svfiprintf_r>: + 80064a0: e92d 4ff0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, fp, lr} + 80064a4: 461d mov r5, r3 + 80064a6: 898b ldrh r3, [r1, #12] + 80064a8: 061f lsls r7, r3, #24 + 80064aa: b09d sub sp, #116 ; 0x74 + 80064ac: 4680 mov r8, r0 + 80064ae: 460c mov r4, r1 + 80064b0: 4616 mov r6, r2 + 80064b2: d50f bpl.n 80064d4 <_svfiprintf_r+0x34> + 80064b4: 690b ldr r3, [r1, #16] + 80064b6: b96b cbnz r3, 80064d4 <_svfiprintf_r+0x34> + 80064b8: 2140 movs r1, #64 ; 0x40 + 80064ba: f000 fad9 bl 8006a70 <_malloc_r> + 80064be: 6020 str r0, [r4, #0] + 80064c0: 6120 str r0, [r4, #16] + 80064c2: b928 cbnz r0, 80064d0 <_svfiprintf_r+0x30> + 80064c4: 230c movs r3, #12 + 80064c6: f8c8 3000 str.w r3, [r8] + 80064ca: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff + 80064ce: e0c8 b.n 8006662 <_svfiprintf_r+0x1c2> + 80064d0: 2340 movs r3, #64 ; 0x40 + 80064d2: 6163 str r3, [r4, #20] + 80064d4: 2300 movs r3, #0 + 80064d6: 9309 str r3, [sp, #36] ; 0x24 + 80064d8: 2320 movs r3, #32 + 80064da: f88d 3029 strb.w r3, [sp, #41] ; 0x29 + 80064de: 2330 movs r3, #48 ; 0x30 + 80064e0: f88d 302a strb.w r3, [sp, #42] ; 0x2a + 80064e4: 9503 str r5, [sp, #12] + 80064e6: f04f 0b01 mov.w fp, #1 + 80064ea: 4637 mov r7, r6 + 80064ec: 463d mov r5, r7 + 80064ee: f815 3b01 ldrb.w r3, [r5], #1 + 80064f2: b10b cbz r3, 80064f8 <_svfiprintf_r+0x58> + 80064f4: 2b25 cmp r3, #37 ; 0x25 + 80064f6: d13e bne.n 8006576 <_svfiprintf_r+0xd6> + 80064f8: ebb7 0a06 subs.w sl, r7, r6 + 80064fc: d00b beq.n 8006516 <_svfiprintf_r+0x76> + 80064fe: 4653 mov r3, sl + 8006500: 4632 mov r2, r6 + 8006502: 4621 mov r1, r4 + 8006504: 4640 mov r0, r8 + 8006506: f7ff ff71 bl 80063ec <__ssputs_r> + 800650a: 3001 adds r0, #1 + 800650c: f000 80a4 beq.w 8006658 <_svfiprintf_r+0x1b8> + 8006510: 9b09 ldr r3, [sp, #36] ; 0x24 + 8006512: 4453 add r3, sl + 8006514: 9309 str r3, [sp, #36] ; 0x24 + 8006516: 783b ldrb r3, [r7, #0] + 8006518: 2b00 cmp r3, #0 + 800651a: f000 809d beq.w 8006658 <_svfiprintf_r+0x1b8> + 800651e: 2300 movs r3, #0 + 8006520: f04f 32ff mov.w r2, #4294967295 ; 0xffffffff + 8006524: e9cd 2305 strd r2, r3, [sp, #20] + 8006528: 9304 str r3, [sp, #16] + 800652a: 9307 str r3, [sp, #28] + 800652c: f88d 3053 strb.w r3, [sp, #83] ; 0x53 + 8006530: 931a str r3, [sp, #104] ; 0x68 + 8006532: 462f mov r7, r5 + 8006534: 2205 movs r2, #5 + 8006536: f817 1b01 ldrb.w r1, [r7], #1 + 800653a: 4850 ldr r0, [pc, #320] ; (800667c <_svfiprintf_r+0x1dc>) + 800653c: f7f9 fec0 bl 80002c0 + 8006540: 9b04 ldr r3, [sp, #16] + 8006542: b9d0 cbnz r0, 800657a <_svfiprintf_r+0xda> + 8006544: 06d9 lsls r1, r3, #27 + 8006546: bf44 itt mi + 8006548: 2220 movmi r2, #32 + 800654a: f88d 2053 strbmi.w r2, [sp, #83] ; 0x53 + 800654e: 071a lsls r2, r3, #28 + 8006550: bf44 itt mi + 8006552: 222b movmi r2, #43 ; 0x2b + 8006554: f88d 2053 strbmi.w r2, [sp, #83] ; 0x53 + 8006558: 782a ldrb r2, [r5, #0] + 800655a: 2a2a cmp r2, #42 ; 0x2a + 800655c: d015 beq.n 800658a <_svfiprintf_r+0xea> + 800655e: 9a07 ldr r2, [sp, #28] + 8006560: 462f mov r7, r5 + 8006562: 2000 movs r0, #0 + 8006564: 250a movs r5, #10 + 8006566: 4639 mov r1, r7 + 8006568: f811 3b01 ldrb.w r3, [r1], #1 + 800656c: 3b30 subs r3, #48 ; 0x30 + 800656e: 2b09 cmp r3, #9 + 8006570: d94d bls.n 800660e <_svfiprintf_r+0x16e> + 8006572: b1b8 cbz r0, 80065a4 <_svfiprintf_r+0x104> + 8006574: e00f b.n 8006596 <_svfiprintf_r+0xf6> + 8006576: 462f mov r7, r5 + 8006578: e7b8 b.n 80064ec <_svfiprintf_r+0x4c> + 800657a: 4a40 ldr r2, [pc, #256] ; (800667c <_svfiprintf_r+0x1dc>) + 800657c: 1a80 subs r0, r0, r2 + 800657e: fa0b f000 lsl.w r0, fp, r0 + 8006582: 4318 orrs r0, r3 + 8006584: 9004 str r0, [sp, #16] + 8006586: 463d mov r5, r7 + 8006588: e7d3 b.n 8006532 <_svfiprintf_r+0x92> + 800658a: 9a03 ldr r2, [sp, #12] + 800658c: 1d11 adds r1, r2, #4 + 800658e: 6812 ldr r2, [r2, #0] + 8006590: 9103 str r1, [sp, #12] + 8006592: 2a00 cmp r2, #0 + 8006594: db01 blt.n 800659a <_svfiprintf_r+0xfa> + 8006596: 9207 str r2, [sp, #28] + 8006598: e004 b.n 80065a4 <_svfiprintf_r+0x104> + 800659a: 4252 negs r2, r2 + 800659c: f043 0302 orr.w r3, r3, #2 + 80065a0: 9207 str r2, [sp, #28] + 80065a2: 9304 str r3, [sp, #16] + 80065a4: 783b ldrb r3, [r7, #0] + 80065a6: 2b2e cmp r3, #46 ; 0x2e + 80065a8: d10c bne.n 80065c4 <_svfiprintf_r+0x124> + 80065aa: 787b ldrb r3, [r7, #1] + 80065ac: 2b2a cmp r3, #42 ; 0x2a + 80065ae: d133 bne.n 8006618 <_svfiprintf_r+0x178> + 80065b0: 9b03 ldr r3, [sp, #12] + 80065b2: 1d1a adds r2, r3, #4 + 80065b4: 681b ldr r3, [r3, #0] + 80065b6: 9203 str r2, [sp, #12] + 80065b8: 2b00 cmp r3, #0 + 80065ba: bfb8 it lt + 80065bc: f04f 33ff movlt.w r3, #4294967295 ; 0xffffffff + 80065c0: 3702 adds r7, #2 + 80065c2: 9305 str r3, [sp, #20] + 80065c4: 4d2e ldr r5, [pc, #184] ; (8006680 <_svfiprintf_r+0x1e0>) + 80065c6: 7839 ldrb r1, [r7, #0] + 80065c8: 2203 movs r2, #3 + 80065ca: 4628 mov r0, r5 + 80065cc: f7f9 fe78 bl 80002c0 + 80065d0: b138 cbz r0, 80065e2 <_svfiprintf_r+0x142> + 80065d2: 2340 movs r3, #64 ; 0x40 + 80065d4: 1b40 subs r0, r0, r5 + 80065d6: fa03 f000 lsl.w r0, r3, r0 + 80065da: 9b04 ldr r3, [sp, #16] + 80065dc: 4303 orrs r3, r0 + 80065de: 3701 adds r7, #1 + 80065e0: 9304 str r3, [sp, #16] + 80065e2: 7839 ldrb r1, [r7, #0] + 80065e4: 4827 ldr r0, [pc, #156] ; (8006684 <_svfiprintf_r+0x1e4>) + 80065e6: f88d 1028 strb.w r1, [sp, #40] ; 0x28 + 80065ea: 2206 movs r2, #6 + 80065ec: 1c7e adds r6, r7, #1 + 80065ee: f7f9 fe67 bl 80002c0 + 80065f2: 2800 cmp r0, #0 + 80065f4: d038 beq.n 8006668 <_svfiprintf_r+0x1c8> + 80065f6: 4b24 ldr r3, [pc, #144] ; (8006688 <_svfiprintf_r+0x1e8>) + 80065f8: bb13 cbnz r3, 8006640 <_svfiprintf_r+0x1a0> + 80065fa: 9b03 ldr r3, [sp, #12] + 80065fc: 3307 adds r3, #7 + 80065fe: f023 0307 bic.w r3, r3, #7 + 8006602: 3308 adds r3, #8 + 8006604: 9303 str r3, [sp, #12] + 8006606: 9b09 ldr r3, [sp, #36] ; 0x24 + 8006608: 444b add r3, r9 + 800660a: 9309 str r3, [sp, #36] ; 0x24 + 800660c: e76d b.n 80064ea <_svfiprintf_r+0x4a> + 800660e: fb05 3202 mla r2, r5, r2, r3 + 8006612: 2001 movs r0, #1 + 8006614: 460f mov r7, r1 + 8006616: e7a6 b.n 8006566 <_svfiprintf_r+0xc6> + 8006618: 2300 movs r3, #0 + 800661a: 3701 adds r7, #1 + 800661c: 9305 str r3, [sp, #20] + 800661e: 4619 mov r1, r3 + 8006620: 250a movs r5, #10 + 8006622: 4638 mov r0, r7 + 8006624: f810 2b01 ldrb.w r2, [r0], #1 + 8006628: 3a30 subs r2, #48 ; 0x30 + 800662a: 2a09 cmp r2, #9 + 800662c: d903 bls.n 8006636 <_svfiprintf_r+0x196> + 800662e: 2b00 cmp r3, #0 + 8006630: d0c8 beq.n 80065c4 <_svfiprintf_r+0x124> + 8006632: 9105 str r1, [sp, #20] + 8006634: e7c6 b.n 80065c4 <_svfiprintf_r+0x124> + 8006636: fb05 2101 mla r1, r5, r1, r2 + 800663a: 2301 movs r3, #1 + 800663c: 4607 mov r7, r0 + 800663e: e7f0 b.n 8006622 <_svfiprintf_r+0x182> + 8006640: ab03 add r3, sp, #12 + 8006642: 9300 str r3, [sp, #0] + 8006644: 4622 mov r2, r4 + 8006646: 4b11 ldr r3, [pc, #68] ; (800668c <_svfiprintf_r+0x1ec>) + 8006648: a904 add r1, sp, #16 + 800664a: 4640 mov r0, r8 + 800664c: f3af 8000 nop.w + 8006650: f1b0 3fff cmp.w r0, #4294967295 ; 0xffffffff + 8006654: 4681 mov r9, r0 + 8006656: d1d6 bne.n 8006606 <_svfiprintf_r+0x166> + 8006658: 89a3 ldrh r3, [r4, #12] + 800665a: 065b lsls r3, r3, #25 + 800665c: f53f af35 bmi.w 80064ca <_svfiprintf_r+0x2a> + 8006660: 9809 ldr r0, [sp, #36] ; 0x24 + 8006662: b01d add sp, #116 ; 0x74 + 8006664: e8bd 8ff0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, fp, pc} + 8006668: ab03 add r3, sp, #12 + 800666a: 9300 str r3, [sp, #0] + 800666c: 4622 mov r2, r4 + 800666e: 4b07 ldr r3, [pc, #28] ; (800668c <_svfiprintf_r+0x1ec>) + 8006670: a904 add r1, sp, #16 + 8006672: 4640 mov r0, r8 + 8006674: f000 f882 bl 800677c <_printf_i> + 8006678: e7ea b.n 8006650 <_svfiprintf_r+0x1b0> + 800667a: bf00 nop + 800667c: 08006d72 .word 0x08006d72 + 8006680: 08006d78 .word 0x08006d78 + 8006684: 08006d7c .word 0x08006d7c + 8006688: 00000000 .word 0x00000000 + 800668c: 080063ed .word 0x080063ed + +08006690 <_printf_common>: + 8006690: e92d 47f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, sl, lr} + 8006694: 4691 mov r9, r2 + 8006696: 461f mov r7, r3 + 8006698: 688a ldr r2, [r1, #8] + 800669a: 690b ldr r3, [r1, #16] + 800669c: f8dd 8020 ldr.w r8, [sp, #32] + 80066a0: 4293 cmp r3, r2 + 80066a2: bfb8 it lt + 80066a4: 4613 movlt r3, r2 + 80066a6: f8c9 3000 str.w r3, [r9] + 80066aa: f891 2043 ldrb.w r2, [r1, #67] ; 0x43 + 80066ae: 4606 mov r6, r0 + 80066b0: 460c mov r4, r1 + 80066b2: b112 cbz r2, 80066ba <_printf_common+0x2a> + 80066b4: 3301 adds r3, #1 + 80066b6: f8c9 3000 str.w r3, [r9] + 80066ba: 6823 ldr r3, [r4, #0] + 80066bc: 0699 lsls r1, r3, #26 + 80066be: bf42 ittt mi + 80066c0: f8d9 3000 ldrmi.w r3, [r9] + 80066c4: 3302 addmi r3, #2 + 80066c6: f8c9 3000 strmi.w r3, [r9] + 80066ca: 6825 ldr r5, [r4, #0] + 80066cc: f015 0506 ands.w r5, r5, #6 + 80066d0: d107 bne.n 80066e2 <_printf_common+0x52> + 80066d2: f104 0a19 add.w sl, r4, #25 + 80066d6: 68e3 ldr r3, [r4, #12] + 80066d8: f8d9 2000 ldr.w r2, [r9] + 80066dc: 1a9b subs r3, r3, r2 + 80066de: 42ab cmp r3, r5 + 80066e0: dc28 bgt.n 8006734 <_printf_common+0xa4> + 80066e2: f894 3043 ldrb.w r3, [r4, #67] ; 0x43 + 80066e6: 6822 ldr r2, [r4, #0] + 80066e8: 3300 adds r3, #0 + 80066ea: bf18 it ne + 80066ec: 2301 movne r3, #1 + 80066ee: 0692 lsls r2, r2, #26 + 80066f0: d42d bmi.n 800674e <_printf_common+0xbe> + 80066f2: f104 0243 add.w r2, r4, #67 ; 0x43 + 80066f6: 4639 mov r1, r7 + 80066f8: 4630 mov r0, r6 + 80066fa: 47c0 blx r8 + 80066fc: 3001 adds r0, #1 + 80066fe: d020 beq.n 8006742 <_printf_common+0xb2> + 8006700: 6823 ldr r3, [r4, #0] + 8006702: 68e5 ldr r5, [r4, #12] + 8006704: f8d9 2000 ldr.w r2, [r9] + 8006708: f003 0306 and.w r3, r3, #6 + 800670c: 2b04 cmp r3, #4 + 800670e: bf08 it eq + 8006710: 1aad subeq r5, r5, r2 + 8006712: 68a3 ldr r3, [r4, #8] + 8006714: 6922 ldr r2, [r4, #16] + 8006716: bf0c ite eq + 8006718: ea25 75e5 biceq.w r5, r5, r5, asr #31 + 800671c: 2500 movne r5, #0 + 800671e: 4293 cmp r3, r2 + 8006720: bfc4 itt gt + 8006722: 1a9b subgt r3, r3, r2 + 8006724: 18ed addgt r5, r5, r3 + 8006726: f04f 0900 mov.w r9, #0 + 800672a: 341a adds r4, #26 + 800672c: 454d cmp r5, r9 + 800672e: d11a bne.n 8006766 <_printf_common+0xd6> + 8006730: 2000 movs r0, #0 + 8006732: e008 b.n 8006746 <_printf_common+0xb6> + 8006734: 2301 movs r3, #1 + 8006736: 4652 mov r2, sl + 8006738: 4639 mov r1, r7 + 800673a: 4630 mov r0, r6 + 800673c: 47c0 blx r8 + 800673e: 3001 adds r0, #1 + 8006740: d103 bne.n 800674a <_printf_common+0xba> + 8006742: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff + 8006746: e8bd 87f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, sl, pc} + 800674a: 3501 adds r5, #1 + 800674c: e7c3 b.n 80066d6 <_printf_common+0x46> + 800674e: 18e1 adds r1, r4, r3 + 8006750: 1c5a adds r2, r3, #1 + 8006752: 2030 movs r0, #48 ; 0x30 + 8006754: f881 0043 strb.w r0, [r1, #67] ; 0x43 + 8006758: 4422 add r2, r4 + 800675a: f894 1045 ldrb.w r1, [r4, #69] ; 0x45 + 800675e: f882 1043 strb.w r1, [r2, #67] ; 0x43 + 8006762: 3302 adds r3, #2 + 8006764: e7c5 b.n 80066f2 <_printf_common+0x62> + 8006766: 2301 movs r3, #1 + 8006768: 4622 mov r2, r4 + 800676a: 4639 mov r1, r7 + 800676c: 4630 mov r0, r6 + 800676e: 47c0 blx r8 + 8006770: 3001 adds r0, #1 + 8006772: d0e6 beq.n 8006742 <_printf_common+0xb2> + 8006774: f109 0901 add.w r9, r9, #1 + 8006778: e7d8 b.n 800672c <_printf_common+0x9c> ... -080034fc <__libc_init_array>: - 80034fc: b570 push {r4, r5, r6, lr} - 80034fe: 4e0d ldr r6, [pc, #52] ; (8003534 <__libc_init_array+0x38>) - 8003500: 4c0d ldr r4, [pc, #52] ; (8003538 <__libc_init_array+0x3c>) - 8003502: 1ba4 subs r4, r4, r6 - 8003504: 10a4 asrs r4, r4, #2 - 8003506: 2500 movs r5, #0 - 8003508: 42a5 cmp r5, r4 - 800350a: d109 bne.n 8003520 <__libc_init_array+0x24> - 800350c: 4e0b ldr r6, [pc, #44] ; (800353c <__libc_init_array+0x40>) - 800350e: 4c0c ldr r4, [pc, #48] ; (8003540 <__libc_init_array+0x44>) - 8003510: f000 f82c bl 800356c <_init> - 8003514: 1ba4 subs r4, r4, r6 - 8003516: 10a4 asrs r4, r4, #2 - 8003518: 2500 movs r5, #0 - 800351a: 42a5 cmp r5, r4 - 800351c: d105 bne.n 800352a <__libc_init_array+0x2e> - 800351e: bd70 pop {r4, r5, r6, pc} - 8003520: f856 3025 ldr.w r3, [r6, r5, lsl #2] - 8003524: 4798 blx r3 - 8003526: 3501 adds r5, #1 - 8003528: e7ee b.n 8003508 <__libc_init_array+0xc> - 800352a: f856 3025 ldr.w r3, [r6, r5, lsl #2] - 800352e: 4798 blx r3 - 8003530: 3501 adds r5, #1 - 8003532: e7f2 b.n 800351a <__libc_init_array+0x1e> - 8003534: 0800360c .word 0x0800360c - 8003538: 0800360c .word 0x0800360c - 800353c: 0800360c .word 0x0800360c - 8003540: 08003610 .word 0x08003610 - -08003544 : - 8003544: b510 push {r4, lr} - 8003546: 1e43 subs r3, r0, #1 - 8003548: 440a add r2, r1 - 800354a: 4291 cmp r1, r2 - 800354c: d100 bne.n 8003550 - 800354e: bd10 pop {r4, pc} - 8003550: f811 4b01 ldrb.w r4, [r1], #1 - 8003554: f803 4f01 strb.w r4, [r3, #1]! - 8003558: e7f7 b.n 800354a - -0800355a : - 800355a: 4402 add r2, r0 - 800355c: 4603 mov r3, r0 - 800355e: 4293 cmp r3, r2 - 8003560: d100 bne.n 8003564 - 8003562: 4770 bx lr - 8003564: f803 1b01 strb.w r1, [r3], #1 - 8003568: e7f9 b.n 800355e +0800677c <_printf_i>: + 800677c: e92d 43f0 stmdb sp!, {r4, r5, r6, r7, r8, r9, lr} + 8006780: f101 0c43 add.w ip, r1, #67 ; 0x43 + 8006784: 460c mov r4, r1 + 8006786: 7e09 ldrb r1, [r1, #24] + 8006788: b085 sub sp, #20 + 800678a: 296e cmp r1, #110 ; 0x6e + 800678c: 4617 mov r7, r2 + 800678e: 4606 mov r6, r0 + 8006790: 4698 mov r8, r3 + 8006792: 9a0c ldr r2, [sp, #48] ; 0x30 + 8006794: f000 80b3 beq.w 80068fe <_printf_i+0x182> + 8006798: d822 bhi.n 80067e0 <_printf_i+0x64> + 800679a: 2963 cmp r1, #99 ; 0x63 + 800679c: d036 beq.n 800680c <_printf_i+0x90> + 800679e: d80a bhi.n 80067b6 <_printf_i+0x3a> + 80067a0: 2900 cmp r1, #0 + 80067a2: f000 80b9 beq.w 8006918 <_printf_i+0x19c> + 80067a6: 2958 cmp r1, #88 ; 0x58 + 80067a8: f000 8083 beq.w 80068b2 <_printf_i+0x136> + 80067ac: f104 0542 add.w r5, r4, #66 ; 0x42 + 80067b0: f884 1042 strb.w r1, [r4, #66] ; 0x42 + 80067b4: e032 b.n 800681c <_printf_i+0xa0> + 80067b6: 2964 cmp r1, #100 ; 0x64 + 80067b8: d001 beq.n 80067be <_printf_i+0x42> + 80067ba: 2969 cmp r1, #105 ; 0x69 + 80067bc: d1f6 bne.n 80067ac <_printf_i+0x30> + 80067be: 6820 ldr r0, [r4, #0] + 80067c0: 6813 ldr r3, [r2, #0] + 80067c2: 0605 lsls r5, r0, #24 + 80067c4: f103 0104 add.w r1, r3, #4 + 80067c8: d52a bpl.n 8006820 <_printf_i+0xa4> + 80067ca: 681b ldr r3, [r3, #0] + 80067cc: 6011 str r1, [r2, #0] + 80067ce: 2b00 cmp r3, #0 + 80067d0: da03 bge.n 80067da <_printf_i+0x5e> + 80067d2: 222d movs r2, #45 ; 0x2d + 80067d4: 425b negs r3, r3 + 80067d6: f884 2043 strb.w r2, [r4, #67] ; 0x43 + 80067da: 486f ldr r0, [pc, #444] ; (8006998 <_printf_i+0x21c>) + 80067dc: 220a movs r2, #10 + 80067de: e039 b.n 8006854 <_printf_i+0xd8> + 80067e0: 2973 cmp r1, #115 ; 0x73 + 80067e2: f000 809d beq.w 8006920 <_printf_i+0x1a4> + 80067e6: d808 bhi.n 80067fa <_printf_i+0x7e> + 80067e8: 296f cmp r1, #111 ; 0x6f + 80067ea: d020 beq.n 800682e <_printf_i+0xb2> + 80067ec: 2970 cmp r1, #112 ; 0x70 + 80067ee: d1dd bne.n 80067ac <_printf_i+0x30> + 80067f0: 6823 ldr r3, [r4, #0] + 80067f2: f043 0320 orr.w r3, r3, #32 + 80067f6: 6023 str r3, [r4, #0] + 80067f8: e003 b.n 8006802 <_printf_i+0x86> + 80067fa: 2975 cmp r1, #117 ; 0x75 + 80067fc: d017 beq.n 800682e <_printf_i+0xb2> + 80067fe: 2978 cmp r1, #120 ; 0x78 + 8006800: d1d4 bne.n 80067ac <_printf_i+0x30> + 8006802: 2378 movs r3, #120 ; 0x78 + 8006804: f884 3045 strb.w r3, [r4, #69] ; 0x45 + 8006808: 4864 ldr r0, [pc, #400] ; (800699c <_printf_i+0x220>) + 800680a: e055 b.n 80068b8 <_printf_i+0x13c> + 800680c: 6813 ldr r3, [r2, #0] + 800680e: 1d19 adds r1, r3, #4 + 8006810: 681b ldr r3, [r3, #0] + 8006812: 6011 str r1, [r2, #0] + 8006814: f104 0542 add.w r5, r4, #66 ; 0x42 + 8006818: f884 3042 strb.w r3, [r4, #66] ; 0x42 + 800681c: 2301 movs r3, #1 + 800681e: e08c b.n 800693a <_printf_i+0x1be> + 8006820: 681b ldr r3, [r3, #0] + 8006822: 6011 str r1, [r2, #0] + 8006824: f010 0f40 tst.w r0, #64 ; 0x40 + 8006828: bf18 it ne + 800682a: b21b sxthne r3, r3 + 800682c: e7cf b.n 80067ce <_printf_i+0x52> + 800682e: 6813 ldr r3, [r2, #0] + 8006830: 6825 ldr r5, [r4, #0] + 8006832: 1d18 adds r0, r3, #4 + 8006834: 6010 str r0, [r2, #0] + 8006836: 0628 lsls r0, r5, #24 + 8006838: d501 bpl.n 800683e <_printf_i+0xc2> + 800683a: 681b ldr r3, [r3, #0] + 800683c: e002 b.n 8006844 <_printf_i+0xc8> + 800683e: 0668 lsls r0, r5, #25 + 8006840: d5fb bpl.n 800683a <_printf_i+0xbe> + 8006842: 881b ldrh r3, [r3, #0] + 8006844: 4854 ldr r0, [pc, #336] ; (8006998 <_printf_i+0x21c>) + 8006846: 296f cmp r1, #111 ; 0x6f + 8006848: bf14 ite ne + 800684a: 220a movne r2, #10 + 800684c: 2208 moveq r2, #8 + 800684e: 2100 movs r1, #0 + 8006850: f884 1043 strb.w r1, [r4, #67] ; 0x43 + 8006854: 6865 ldr r5, [r4, #4] + 8006856: 60a5 str r5, [r4, #8] + 8006858: 2d00 cmp r5, #0 + 800685a: f2c0 8095 blt.w 8006988 <_printf_i+0x20c> + 800685e: 6821 ldr r1, [r4, #0] + 8006860: f021 0104 bic.w r1, r1, #4 + 8006864: 6021 str r1, [r4, #0] + 8006866: 2b00 cmp r3, #0 + 8006868: d13d bne.n 80068e6 <_printf_i+0x16a> + 800686a: 2d00 cmp r5, #0 + 800686c: f040 808e bne.w 800698c <_printf_i+0x210> + 8006870: 4665 mov r5, ip + 8006872: 2a08 cmp r2, #8 + 8006874: d10b bne.n 800688e <_printf_i+0x112> + 8006876: 6823 ldr r3, [r4, #0] + 8006878: 07db lsls r3, r3, #31 + 800687a: d508 bpl.n 800688e <_printf_i+0x112> + 800687c: 6923 ldr r3, [r4, #16] + 800687e: 6862 ldr r2, [r4, #4] + 8006880: 429a cmp r2, r3 + 8006882: bfde ittt le + 8006884: 2330 movle r3, #48 ; 0x30 + 8006886: f805 3c01 strble.w r3, [r5, #-1] + 800688a: f105 35ff addle.w r5, r5, #4294967295 ; 0xffffffff + 800688e: ebac 0305 sub.w r3, ip, r5 + 8006892: 6123 str r3, [r4, #16] + 8006894: f8cd 8000 str.w r8, [sp] + 8006898: 463b mov r3, r7 + 800689a: aa03 add r2, sp, #12 + 800689c: 4621 mov r1, r4 + 800689e: 4630 mov r0, r6 + 80068a0: f7ff fef6 bl 8006690 <_printf_common> + 80068a4: 3001 adds r0, #1 + 80068a6: d14d bne.n 8006944 <_printf_i+0x1c8> + 80068a8: f04f 30ff mov.w r0, #4294967295 ; 0xffffffff + 80068ac: b005 add sp, #20 + 80068ae: e8bd 83f0 ldmia.w sp!, {r4, r5, r6, r7, r8, r9, pc} + 80068b2: 4839 ldr r0, [pc, #228] ; (8006998 <_printf_i+0x21c>) + 80068b4: f884 1045 strb.w r1, [r4, #69] ; 0x45 + 80068b8: 6813 ldr r3, [r2, #0] + 80068ba: 6821 ldr r1, [r4, #0] + 80068bc: 1d1d adds r5, r3, #4 + 80068be: 681b ldr r3, [r3, #0] + 80068c0: 6015 str r5, [r2, #0] + 80068c2: 060a lsls r2, r1, #24 + 80068c4: d50b bpl.n 80068de <_printf_i+0x162> + 80068c6: 07ca lsls r2, r1, #31 + 80068c8: bf44 itt mi + 80068ca: f041 0120 orrmi.w r1, r1, #32 + 80068ce: 6021 strmi r1, [r4, #0] + 80068d0: b91b cbnz r3, 80068da <_printf_i+0x15e> + 80068d2: 6822 ldr r2, [r4, #0] + 80068d4: f022 0220 bic.w r2, r2, #32 + 80068d8: 6022 str r2, [r4, #0] + 80068da: 2210 movs r2, #16 + 80068dc: e7b7 b.n 800684e <_printf_i+0xd2> + 80068de: 064d lsls r5, r1, #25 + 80068e0: bf48 it mi + 80068e2: b29b uxthmi r3, r3 + 80068e4: e7ef b.n 80068c6 <_printf_i+0x14a> + 80068e6: 4665 mov r5, ip + 80068e8: fbb3 f1f2 udiv r1, r3, r2 + 80068ec: fb02 3311 mls r3, r2, r1, r3 + 80068f0: 5cc3 ldrb r3, [r0, r3] + 80068f2: f805 3d01 strb.w r3, [r5, #-1]! + 80068f6: 460b mov r3, r1 + 80068f8: 2900 cmp r1, #0 + 80068fa: d1f5 bne.n 80068e8 <_printf_i+0x16c> + 80068fc: e7b9 b.n 8006872 <_printf_i+0xf6> + 80068fe: 6813 ldr r3, [r2, #0] + 8006900: 6825 ldr r5, [r4, #0] + 8006902: 6961 ldr r1, [r4, #20] + 8006904: 1d18 adds r0, r3, #4 + 8006906: 6010 str r0, [r2, #0] + 8006908: 0628 lsls r0, r5, #24 + 800690a: 681b ldr r3, [r3, #0] + 800690c: d501 bpl.n 8006912 <_printf_i+0x196> + 800690e: 6019 str r1, [r3, #0] + 8006910: e002 b.n 8006918 <_printf_i+0x19c> + 8006912: 066a lsls r2, r5, #25 + 8006914: d5fb bpl.n 800690e <_printf_i+0x192> + 8006916: 8019 strh r1, [r3, #0] + 8006918: 2300 movs r3, #0 + 800691a: 6123 str r3, [r4, #16] + 800691c: 4665 mov r5, ip + 800691e: e7b9 b.n 8006894 <_printf_i+0x118> + 8006920: 6813 ldr r3, [r2, #0] + 8006922: 1d19 adds r1, r3, #4 + 8006924: 6011 str r1, [r2, #0] + 8006926: 681d ldr r5, [r3, #0] + 8006928: 6862 ldr r2, [r4, #4] + 800692a: 2100 movs r1, #0 + 800692c: 4628 mov r0, r5 + 800692e: f7f9 fcc7 bl 80002c0 + 8006932: b108 cbz r0, 8006938 <_printf_i+0x1bc> + 8006934: 1b40 subs r0, r0, r5 + 8006936: 6060 str r0, [r4, #4] + 8006938: 6863 ldr r3, [r4, #4] + 800693a: 6123 str r3, [r4, #16] + 800693c: 2300 movs r3, #0 + 800693e: f884 3043 strb.w r3, [r4, #67] ; 0x43 + 8006942: e7a7 b.n 8006894 <_printf_i+0x118> + 8006944: 6923 ldr r3, [r4, #16] + 8006946: 462a mov r2, r5 + 8006948: 4639 mov r1, r7 + 800694a: 4630 mov r0, r6 + 800694c: 47c0 blx r8 + 800694e: 3001 adds r0, #1 + 8006950: d0aa beq.n 80068a8 <_printf_i+0x12c> + 8006952: 6823 ldr r3, [r4, #0] + 8006954: 079b lsls r3, r3, #30 + 8006956: d413 bmi.n 8006980 <_printf_i+0x204> + 8006958: 68e0 ldr r0, [r4, #12] + 800695a: 9b03 ldr r3, [sp, #12] + 800695c: 4298 cmp r0, r3 + 800695e: bfb8 it lt + 8006960: 4618 movlt r0, r3 + 8006962: e7a3 b.n 80068ac <_printf_i+0x130> + 8006964: 2301 movs r3, #1 + 8006966: 464a mov r2, r9 + 8006968: 4639 mov r1, r7 + 800696a: 4630 mov r0, r6 + 800696c: 47c0 blx r8 + 800696e: 3001 adds r0, #1 + 8006970: d09a beq.n 80068a8 <_printf_i+0x12c> + 8006972: 3501 adds r5, #1 + 8006974: 68e3 ldr r3, [r4, #12] + 8006976: 9a03 ldr r2, [sp, #12] + 8006978: 1a9b subs r3, r3, r2 + 800697a: 42ab cmp r3, r5 + 800697c: dcf2 bgt.n 8006964 <_printf_i+0x1e8> + 800697e: e7eb b.n 8006958 <_printf_i+0x1dc> + 8006980: 2500 movs r5, #0 + 8006982: f104 0919 add.w r9, r4, #25 + 8006986: e7f5 b.n 8006974 <_printf_i+0x1f8> + 8006988: 2b00 cmp r3, #0 + 800698a: d1ac bne.n 80068e6 <_printf_i+0x16a> + 800698c: 7803 ldrb r3, [r0, #0] + 800698e: f884 3042 strb.w r3, [r4, #66] ; 0x42 + 8006992: f104 0542 add.w r5, r4, #66 ; 0x42 + 8006996: e76c b.n 8006872 <_printf_i+0xf6> + 8006998: 08006d83 .word 0x08006d83 + 800699c: 08006d94 .word 0x08006d94 + +080069a0 : + 80069a0: 4288 cmp r0, r1 + 80069a2: b510 push {r4, lr} + 80069a4: eb01 0302 add.w r3, r1, r2 + 80069a8: d807 bhi.n 80069ba + 80069aa: 1e42 subs r2, r0, #1 + 80069ac: 4299 cmp r1, r3 + 80069ae: d00a beq.n 80069c6 + 80069b0: f811 4b01 ldrb.w r4, [r1], #1 + 80069b4: f802 4f01 strb.w r4, [r2, #1]! + 80069b8: e7f8 b.n 80069ac + 80069ba: 4283 cmp r3, r0 + 80069bc: d9f5 bls.n 80069aa + 80069be: 1881 adds r1, r0, r2 + 80069c0: 1ad2 subs r2, r2, r3 + 80069c2: 42d3 cmn r3, r2 + 80069c4: d100 bne.n 80069c8 + 80069c6: bd10 pop {r4, pc} + 80069c8: f813 4d01 ldrb.w r4, [r3, #-1]! + 80069cc: f801 4d01 strb.w r4, [r1, #-1]! + 80069d0: e7f7 b.n 80069c2 ... -0800356c <_init>: - 800356c: b5f8 push {r3, r4, r5, r6, r7, lr} - 800356e: bf00 nop - 8003570: bcf8 pop {r3, r4, r5, r6, r7} - 8003572: bc08 pop {r3} - 8003574: 469e mov lr, r3 - 8003576: 4770 bx lr - -08003578 <_fini>: - 8003578: b5f8 push {r3, r4, r5, r6, r7, lr} - 800357a: bf00 nop - 800357c: bcf8 pop {r3, r4, r5, r6, r7} - 800357e: bc08 pop {r3} - 8003580: 469e mov lr, r3 - 8003582: 4770 bx lr +080069d4 <_free_r>: + 80069d4: b538 push {r3, r4, r5, lr} + 80069d6: 4605 mov r5, r0 + 80069d8: 2900 cmp r1, #0 + 80069da: d045 beq.n 8006a68 <_free_r+0x94> + 80069dc: f851 3c04 ldr.w r3, [r1, #-4] + 80069e0: 1f0c subs r4, r1, #4 + 80069e2: 2b00 cmp r3, #0 + 80069e4: bfb8 it lt + 80069e6: 18e4 addlt r4, r4, r3 + 80069e8: f000 f8d2 bl 8006b90 <__malloc_lock> + 80069ec: 4a1f ldr r2, [pc, #124] ; (8006a6c <_free_r+0x98>) + 80069ee: 6813 ldr r3, [r2, #0] + 80069f0: 4610 mov r0, r2 + 80069f2: b933 cbnz r3, 8006a02 <_free_r+0x2e> + 80069f4: 6063 str r3, [r4, #4] + 80069f6: 6014 str r4, [r2, #0] + 80069f8: 4628 mov r0, r5 + 80069fa: e8bd 4038 ldmia.w sp!, {r3, r4, r5, lr} + 80069fe: f000 b8c8 b.w 8006b92 <__malloc_unlock> + 8006a02: 42a3 cmp r3, r4 + 8006a04: d90c bls.n 8006a20 <_free_r+0x4c> + 8006a06: 6821 ldr r1, [r4, #0] + 8006a08: 1862 adds r2, r4, r1 + 8006a0a: 4293 cmp r3, r2 + 8006a0c: bf04 itt eq + 8006a0e: 681a ldreq r2, [r3, #0] + 8006a10: 685b ldreq r3, [r3, #4] + 8006a12: 6063 str r3, [r4, #4] + 8006a14: bf04 itt eq + 8006a16: 1852 addeq r2, r2, r1 + 8006a18: 6022 streq r2, [r4, #0] + 8006a1a: 6004 str r4, [r0, #0] + 8006a1c: e7ec b.n 80069f8 <_free_r+0x24> + 8006a1e: 4613 mov r3, r2 + 8006a20: 685a ldr r2, [r3, #4] + 8006a22: b10a cbz r2, 8006a28 <_free_r+0x54> + 8006a24: 42a2 cmp r2, r4 + 8006a26: d9fa bls.n 8006a1e <_free_r+0x4a> + 8006a28: 6819 ldr r1, [r3, #0] + 8006a2a: 1858 adds r0, r3, r1 + 8006a2c: 42a0 cmp r0, r4 + 8006a2e: d10b bne.n 8006a48 <_free_r+0x74> + 8006a30: 6820 ldr r0, [r4, #0] + 8006a32: 4401 add r1, r0 + 8006a34: 1858 adds r0, r3, r1 + 8006a36: 4282 cmp r2, r0 + 8006a38: 6019 str r1, [r3, #0] + 8006a3a: d1dd bne.n 80069f8 <_free_r+0x24> + 8006a3c: 6810 ldr r0, [r2, #0] + 8006a3e: 6852 ldr r2, [r2, #4] + 8006a40: 605a str r2, [r3, #4] + 8006a42: 4401 add r1, r0 + 8006a44: 6019 str r1, [r3, #0] + 8006a46: e7d7 b.n 80069f8 <_free_r+0x24> + 8006a48: d902 bls.n 8006a50 <_free_r+0x7c> + 8006a4a: 230c movs r3, #12 + 8006a4c: 602b str r3, [r5, #0] + 8006a4e: e7d3 b.n 80069f8 <_free_r+0x24> + 8006a50: 6820 ldr r0, [r4, #0] + 8006a52: 1821 adds r1, r4, r0 + 8006a54: 428a cmp r2, r1 + 8006a56: bf04 itt eq + 8006a58: 6811 ldreq r1, [r2, #0] + 8006a5a: 6852 ldreq r2, [r2, #4] + 8006a5c: 6062 str r2, [r4, #4] + 8006a5e: bf04 itt eq + 8006a60: 1809 addeq r1, r1, r0 + 8006a62: 6021 streq r1, [r4, #0] + 8006a64: 605c str r4, [r3, #4] + 8006a66: e7c7 b.n 80069f8 <_free_r+0x24> + 8006a68: bd38 pop {r3, r4, r5, pc} + 8006a6a: bf00 nop + 8006a6c: 20015cfc .word 0x20015cfc + +08006a70 <_malloc_r>: + 8006a70: b570 push {r4, r5, r6, lr} + 8006a72: 1ccd adds r5, r1, #3 + 8006a74: f025 0503 bic.w r5, r5, #3 + 8006a78: 3508 adds r5, #8 + 8006a7a: 2d0c cmp r5, #12 + 8006a7c: bf38 it cc + 8006a7e: 250c movcc r5, #12 + 8006a80: 2d00 cmp r5, #0 + 8006a82: 4606 mov r6, r0 + 8006a84: db01 blt.n 8006a8a <_malloc_r+0x1a> + 8006a86: 42a9 cmp r1, r5 + 8006a88: d903 bls.n 8006a92 <_malloc_r+0x22> + 8006a8a: 230c movs r3, #12 + 8006a8c: 6033 str r3, [r6, #0] + 8006a8e: 2000 movs r0, #0 + 8006a90: bd70 pop {r4, r5, r6, pc} + 8006a92: f000 f87d bl 8006b90 <__malloc_lock> + 8006a96: 4a21 ldr r2, [pc, #132] ; (8006b1c <_malloc_r+0xac>) + 8006a98: 6814 ldr r4, [r2, #0] + 8006a9a: 4621 mov r1, r4 + 8006a9c: b991 cbnz r1, 8006ac4 <_malloc_r+0x54> + 8006a9e: 4c20 ldr r4, [pc, #128] ; (8006b20 <_malloc_r+0xb0>) + 8006aa0: 6823 ldr r3, [r4, #0] + 8006aa2: b91b cbnz r3, 8006aac <_malloc_r+0x3c> + 8006aa4: 4630 mov r0, r6 + 8006aa6: f000 f863 bl 8006b70 <_sbrk_r> + 8006aaa: 6020 str r0, [r4, #0] + 8006aac: 4629 mov r1, r5 + 8006aae: 4630 mov r0, r6 + 8006ab0: f000 f85e bl 8006b70 <_sbrk_r> + 8006ab4: 1c43 adds r3, r0, #1 + 8006ab6: d124 bne.n 8006b02 <_malloc_r+0x92> + 8006ab8: 230c movs r3, #12 + 8006aba: 6033 str r3, [r6, #0] + 8006abc: 4630 mov r0, r6 + 8006abe: f000 f868 bl 8006b92 <__malloc_unlock> + 8006ac2: e7e4 b.n 8006a8e <_malloc_r+0x1e> + 8006ac4: 680b ldr r3, [r1, #0] + 8006ac6: 1b5b subs r3, r3, r5 + 8006ac8: d418 bmi.n 8006afc <_malloc_r+0x8c> + 8006aca: 2b0b cmp r3, #11 + 8006acc: d90f bls.n 8006aee <_malloc_r+0x7e> + 8006ace: 600b str r3, [r1, #0] + 8006ad0: 50cd str r5, [r1, r3] + 8006ad2: 18cc adds r4, r1, r3 + 8006ad4: 4630 mov r0, r6 + 8006ad6: f000 f85c bl 8006b92 <__malloc_unlock> + 8006ada: f104 000b add.w r0, r4, #11 + 8006ade: 1d23 adds r3, r4, #4 + 8006ae0: f020 0007 bic.w r0, r0, #7 + 8006ae4: 1ac3 subs r3, r0, r3 + 8006ae6: d0d3 beq.n 8006a90 <_malloc_r+0x20> + 8006ae8: 425a negs r2, r3 + 8006aea: 50e2 str r2, [r4, r3] + 8006aec: e7d0 b.n 8006a90 <_malloc_r+0x20> + 8006aee: 428c cmp r4, r1 + 8006af0: 684b ldr r3, [r1, #4] + 8006af2: bf16 itet ne + 8006af4: 6063 strne r3, [r4, #4] + 8006af6: 6013 streq r3, [r2, #0] + 8006af8: 460c movne r4, r1 + 8006afa: e7eb b.n 8006ad4 <_malloc_r+0x64> + 8006afc: 460c mov r4, r1 + 8006afe: 6849 ldr r1, [r1, #4] + 8006b00: e7cc b.n 8006a9c <_malloc_r+0x2c> + 8006b02: 1cc4 adds r4, r0, #3 + 8006b04: f024 0403 bic.w r4, r4, #3 + 8006b08: 42a0 cmp r0, r4 + 8006b0a: d005 beq.n 8006b18 <_malloc_r+0xa8> + 8006b0c: 1a21 subs r1, r4, r0 + 8006b0e: 4630 mov r0, r6 + 8006b10: f000 f82e bl 8006b70 <_sbrk_r> + 8006b14: 3001 adds r0, #1 + 8006b16: d0cf beq.n 8006ab8 <_malloc_r+0x48> + 8006b18: 6025 str r5, [r4, #0] + 8006b1a: e7db b.n 8006ad4 <_malloc_r+0x64> + 8006b1c: 20015cfc .word 0x20015cfc + 8006b20: 20015d00 .word 0x20015d00 + +08006b24 <_realloc_r>: + 8006b24: b5f8 push {r3, r4, r5, r6, r7, lr} + 8006b26: 4607 mov r7, r0 + 8006b28: 4614 mov r4, r2 + 8006b2a: 460e mov r6, r1 + 8006b2c: b921 cbnz r1, 8006b38 <_realloc_r+0x14> + 8006b2e: 4611 mov r1, r2 + 8006b30: e8bd 40f8 ldmia.w sp!, {r3, r4, r5, r6, r7, lr} + 8006b34: f7ff bf9c b.w 8006a70 <_malloc_r> + 8006b38: b922 cbnz r2, 8006b44 <_realloc_r+0x20> + 8006b3a: f7ff ff4b bl 80069d4 <_free_r> + 8006b3e: 4625 mov r5, r4 + 8006b40: 4628 mov r0, r5 + 8006b42: bdf8 pop {r3, r4, r5, r6, r7, pc} + 8006b44: f000 f826 bl 8006b94 <_malloc_usable_size_r> + 8006b48: 42a0 cmp r0, r4 + 8006b4a: d20f bcs.n 8006b6c <_realloc_r+0x48> + 8006b4c: 4621 mov r1, r4 + 8006b4e: 4638 mov r0, r7 + 8006b50: f7ff ff8e bl 8006a70 <_malloc_r> + 8006b54: 4605 mov r5, r0 + 8006b56: 2800 cmp r0, #0 + 8006b58: d0f2 beq.n 8006b40 <_realloc_r+0x1c> + 8006b5a: 4631 mov r1, r6 + 8006b5c: 4622 mov r2, r4 + 8006b5e: f7ff fc12 bl 8006386 + 8006b62: 4631 mov r1, r6 + 8006b64: 4638 mov r0, r7 + 8006b66: f7ff ff35 bl 80069d4 <_free_r> + 8006b6a: e7e9 b.n 8006b40 <_realloc_r+0x1c> + 8006b6c: 4635 mov r5, r6 + 8006b6e: e7e7 b.n 8006b40 <_realloc_r+0x1c> + +08006b70 <_sbrk_r>: + 8006b70: b538 push {r3, r4, r5, lr} + 8006b72: 4c06 ldr r4, [pc, #24] ; (8006b8c <_sbrk_r+0x1c>) + 8006b74: 2300 movs r3, #0 + 8006b76: 4605 mov r5, r0 + 8006b78: 4608 mov r0, r1 + 8006b7a: 6023 str r3, [r4, #0] + 8006b7c: f7ff fa46 bl 800600c <_sbrk> + 8006b80: 1c43 adds r3, r0, #1 + 8006b82: d102 bne.n 8006b8a <_sbrk_r+0x1a> + 8006b84: 6823 ldr r3, [r4, #0] + 8006b86: b103 cbz r3, 8006b8a <_sbrk_r+0x1a> + 8006b88: 602b str r3, [r5, #0] + 8006b8a: bd38 pop {r3, r4, r5, pc} + 8006b8c: 20015e00 .word 0x20015e00 + +08006b90 <__malloc_lock>: + 8006b90: 4770 bx lr + +08006b92 <__malloc_unlock>: + 8006b92: 4770 bx lr + +08006b94 <_malloc_usable_size_r>: + 8006b94: f851 3c04 ldr.w r3, [r1, #-4] + 8006b98: 1f18 subs r0, r3, #4 + 8006b9a: 2b00 cmp r3, #0 + 8006b9c: bfbc itt lt + 8006b9e: 580b ldrlt r3, [r1, r0] + 8006ba0: 18c0 addlt r0, r0, r3 + 8006ba2: 4770 bx lr + +08006ba4 <_init>: + 8006ba4: b5f8 push {r3, r4, r5, r6, r7, lr} + 8006ba6: bf00 nop + 8006ba8: bcf8 pop {r3, r4, r5, r6, r7} + 8006baa: bc08 pop {r3} + 8006bac: 469e mov lr, r3 + 8006bae: 4770 bx lr + +08006bb0 <_fini>: + 8006bb0: b5f8 push {r3, r4, r5, r6, r7, lr} + 8006bb2: bf00 nop + 8006bb4: bcf8 pop {r3, r4, r5, r6, r7} + 8006bb6: bc08 pop {r3} + 8006bb8: 469e mov lr, r3 + 8006bba: 4770 bx lr diff --git a/Debug/FreeRTOS_STM32_Porting.map b/Debug/FreeRTOS_STM32_Porting.map index 4a040d5..1fcbfd8 100644 --- a/Debug/FreeRTOS_STM32_Porting.map +++ b/Debug/FreeRTOS_STM32_Porting.map @@ -8,17 +8,50 @@ Archive member included to satisfy reference by file (symbol) /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-exit.o) (_global_impure_ptr) /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-init.o) /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/crt0.o (__libc_init_array) +/opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memcmp.o) + SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o (memcmp) /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memcpy-stub.o) - FreeRTOS/Source/queue.o (memcpy) + FreeRTOS/org/Source/queue.o (memcpy) /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memset.o) /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/crt0.o (memset) +/opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-sprintf.o) + src/main.o (sprintf) /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-strlen.o) - src/main.o (strlen) + SEGGER/SEGGER/SEGGER_RTT.o (strlen) +/opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-svfprintf.o) + /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-sprintf.o) (_svfprintf_r) +/opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-vfprintf_i.o) + /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-svfprintf.o) (_printf_i) +/opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memchr.o) + /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-svfprintf.o) (memchr) +/opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memmove.o) + /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-svfprintf.o) (memmove) +/opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-freer.o) + /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-svfprintf.o) (_free_r) +/opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-mallocr.o) + /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-svfprintf.o) (_malloc_r) +/opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-reallocr.o) + /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-svfprintf.o) (_realloc_r) +/opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-sbrkr.o) + /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-mallocr.o) (_sbrk_r) +/opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-mlock.o) + /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-freer.o) (__malloc_lock) +/opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-msizer.o) + /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-reallocr.o) (_malloc_usable_size_r) +/opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-reent.o) + /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-sbrkr.o) (errno) Allocating common symbols Common symbol size file -xQueueRegistry 0x40 FreeRTOS/Source/queue.o +SEGGER_SYSVIEW_InterruptId + 0x4 SEGGER/SEGGER/SEGGER_SYSVIEW.o +errno 0x4 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-reent.o) +SEGGER_SYSVIEW_TickCnt + 0x4 SEGGER/SEGGER/SEGGER_SYSVIEW.o +xQueueRegistry 0x40 FreeRTOS/org/Source/queue.o +command_buffer 0x14 src/main.o +_SEGGER_RTT 0xa8 SEGGER/SEGGER/SEGGER_RTT.o Discarded input sections @@ -33,797 +66,1308 @@ Discarded input sections .ARM.exidx 0x0000000000000000 0x8 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/crt0.o .ARM.attributes 0x0000000000000000 0x20 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/crt0.o - .group 0x0000000000000000 0xc FreeRTOS/Source/croutine.o - .group 0x0000000000000000 0xc FreeRTOS/Source/croutine.o - .group 0x0000000000000000 0xc FreeRTOS/Source/croutine.o - .group 0x0000000000000000 0xc FreeRTOS/Source/croutine.o - .group 0x0000000000000000 0xc FreeRTOS/Source/croutine.o - .group 0x0000000000000000 0xc FreeRTOS/Source/croutine.o - .group 0x0000000000000000 0xc FreeRTOS/Source/croutine.o - .group 0x0000000000000000 0xc FreeRTOS/Source/croutine.o - .group 0x0000000000000000 0xc FreeRTOS/Source/croutine.o - .group 0x0000000000000000 0xc FreeRTOS/Source/croutine.o - .group 0x0000000000000000 0xc FreeRTOS/Source/croutine.o - .group 0x0000000000000000 0xc FreeRTOS/Source/croutine.o - .group 0x0000000000000000 0xc FreeRTOS/Source/croutine.o - .group 0x0000000000000000 0xc FreeRTOS/Source/croutine.o - .group 0x0000000000000000 0xc FreeRTOS/Source/croutine.o - .group 0x0000000000000000 0xc FreeRTOS/Source/croutine.o - .group 0x0000000000000000 0xc FreeRTOS/Source/croutine.o - .text 0x0000000000000000 0x0 FreeRTOS/Source/croutine.o - .data 0x0000000000000000 0x0 FreeRTOS/Source/croutine.o - .bss 0x0000000000000000 0x0 FreeRTOS/Source/croutine.o - .debug_info 0x0000000000000000 0x97 FreeRTOS/Source/croutine.o - .debug_abbrev 0x0000000000000000 0x47 FreeRTOS/Source/croutine.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/croutine.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/croutine.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/croutine.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/croutine.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/croutine.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/croutine.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/croutine.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/croutine.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/croutine.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/croutine.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/croutine.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/croutine.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/croutine.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/croutine.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/croutine.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/croutine.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/croutine.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/croutine.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/croutine.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/croutine.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/croutine.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/croutine.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/croutine.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/croutine.o + .text 0x0000000000000000 0x0 FreeRTOS/org/Source/croutine.o + .data 0x0000000000000000 0x0 FreeRTOS/org/Source/croutine.o + .bss 0x0000000000000000 0x0 FreeRTOS/org/Source/croutine.o + .debug_info 0x0000000000000000 0xad FreeRTOS/org/Source/croutine.o + .debug_abbrev 0x0000000000000000 0x47 FreeRTOS/org/Source/croutine.o .debug_aranges - 0x0000000000000000 0x18 FreeRTOS/Source/croutine.o - .debug_macro 0x0000000000000000 0xd9 FreeRTOS/Source/croutine.o - .debug_macro 0x0000000000000000 0xa72 FreeRTOS/Source/croutine.o - .debug_macro 0x0000000000000000 0x174 FreeRTOS/Source/croutine.o - .debug_macro 0x0000000000000000 0x22 FreeRTOS/Source/croutine.o - .debug_macro 0x0000000000000000 0x8e FreeRTOS/Source/croutine.o - .debug_macro 0x0000000000000000 0x51 FreeRTOS/Source/croutine.o - .debug_macro 0x0000000000000000 0xef FreeRTOS/Source/croutine.o - .debug_macro 0x0000000000000000 0x6a FreeRTOS/Source/croutine.o - .debug_macro 0x0000000000000000 0x1df FreeRTOS/Source/croutine.o - .debug_macro 0x0000000000000000 0x106 FreeRTOS/Source/croutine.o - .debug_macro 0x0000000000000000 0x15a FreeRTOS/Source/croutine.o - .debug_macro 0x0000000000000000 0xea FreeRTOS/Source/croutine.o - .debug_macro 0x0000000000000000 0x1c FreeRTOS/Source/croutine.o - .debug_macro 0x0000000000000000 0x26 FreeRTOS/Source/croutine.o - .debug_macro 0x0000000000000000 0x4fd FreeRTOS/Source/croutine.o - .debug_macro 0x0000000000000000 0xb5 FreeRTOS/Source/croutine.o - .debug_macro 0x0000000000000000 0x120 FreeRTOS/Source/croutine.o - .debug_macro 0x0000000000000000 0x49 FreeRTOS/Source/croutine.o - .debug_line 0x0000000000000000 0x54b FreeRTOS/Source/croutine.o - .debug_str 0x0000000000000000 0x90c7 FreeRTOS/Source/croutine.o - .comment 0x0000000000000000 0x7c FreeRTOS/Source/croutine.o + 0x0000000000000000 0x18 FreeRTOS/org/Source/croutine.o + .debug_macro 0x0000000000000000 0x13b FreeRTOS/org/Source/croutine.o + .debug_macro 0x0000000000000000 0xa72 FreeRTOS/org/Source/croutine.o + .debug_macro 0x0000000000000000 0x174 FreeRTOS/org/Source/croutine.o + .debug_macro 0x0000000000000000 0x22 FreeRTOS/org/Source/croutine.o + .debug_macro 0x0000000000000000 0x8e FreeRTOS/org/Source/croutine.o + .debug_macro 0x0000000000000000 0x51 FreeRTOS/org/Source/croutine.o + .debug_macro 0x0000000000000000 0xef FreeRTOS/org/Source/croutine.o + .debug_macro 0x0000000000000000 0x6a FreeRTOS/org/Source/croutine.o + .debug_macro 0x0000000000000000 0x1df FreeRTOS/org/Source/croutine.o + .debug_macro 0x0000000000000000 0x112 FreeRTOS/org/Source/croutine.o + .debug_macro 0x0000000000000000 0x58 FreeRTOS/org/Source/croutine.o + .debug_macro 0x0000000000000000 0x46 FreeRTOS/org/Source/croutine.o + .debug_macro 0x0000000000000000 0x64 FreeRTOS/org/Source/croutine.o + .debug_macro 0x0000000000000000 0x49 FreeRTOS/org/Source/croutine.o + .debug_macro 0x0000000000000000 0xc3 FreeRTOS/org/Source/croutine.o + .debug_macro 0x0000000000000000 0x204 FreeRTOS/org/Source/croutine.o + .debug_macro 0x0000000000000000 0x450 FreeRTOS/org/Source/croutine.o + .debug_macro 0x0000000000000000 0x15a FreeRTOS/org/Source/croutine.o + .debug_macro 0x0000000000000000 0xea FreeRTOS/org/Source/croutine.o + .debug_macro 0x0000000000000000 0x1c FreeRTOS/org/Source/croutine.o + .debug_macro 0x0000000000000000 0x26 FreeRTOS/org/Source/croutine.o + .debug_macro 0x0000000000000000 0x3d0 FreeRTOS/org/Source/croutine.o + .debug_macro 0x0000000000000000 0xb5 FreeRTOS/org/Source/croutine.o + .debug_macro 0x0000000000000000 0x120 FreeRTOS/org/Source/croutine.o + .debug_macro 0x0000000000000000 0x49 FreeRTOS/org/Source/croutine.o + .debug_line 0x0000000000000000 0x720 FreeRTOS/org/Source/croutine.o + .debug_str 0x0000000000000000 0xd0bf FreeRTOS/org/Source/croutine.o + .comment 0x0000000000000000 0x7c FreeRTOS/org/Source/croutine.o .ARM.attributes - 0x0000000000000000 0x39 FreeRTOS/Source/croutine.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/event_groups.o - .text 0x0000000000000000 0x0 FreeRTOS/Source/event_groups.o - .data 0x0000000000000000 0x0 FreeRTOS/Source/event_groups.o - .bss 0x0000000000000000 0x0 FreeRTOS/Source/event_groups.o + 0x0000000000000000 0x39 FreeRTOS/org/Source/croutine.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/event_groups.o + .text 0x0000000000000000 0x0 FreeRTOS/org/Source/event_groups.o + .data 0x0000000000000000 0x0 FreeRTOS/org/Source/event_groups.o + .bss 0x0000000000000000 0x0 FreeRTOS/org/Source/event_groups.o .text.xEventGroupCreate - 0x0000000000000000 0x2e FreeRTOS/Source/event_groups.o + 0x0000000000000000 0x2e FreeRTOS/org/Source/event_groups.o .text.xEventGroupSync - 0x0000000000000000 0x158 FreeRTOS/Source/event_groups.o + 0x0000000000000000 0x158 FreeRTOS/org/Source/event_groups.o .text.xEventGroupWaitBits - 0x0000000000000000 0x194 FreeRTOS/Source/event_groups.o + 0x0000000000000000 0x194 FreeRTOS/org/Source/event_groups.o .text.xEventGroupClearBits - 0x0000000000000000 0x6c FreeRTOS/Source/event_groups.o + 0x0000000000000000 0x6c FreeRTOS/org/Source/event_groups.o .text.xEventGroupGetBitsFromISR - 0x0000000000000000 0x46 FreeRTOS/Source/event_groups.o + 0x0000000000000000 0x46 FreeRTOS/org/Source/event_groups.o .text.xEventGroupSetBits - 0x0000000000000000 0x112 FreeRTOS/Source/event_groups.o + 0x0000000000000000 0x112 FreeRTOS/org/Source/event_groups.o .text.vEventGroupDelete - 0x0000000000000000 0x60 FreeRTOS/Source/event_groups.o + 0x0000000000000000 0x60 FreeRTOS/org/Source/event_groups.o .text.vEventGroupSetBitsCallback - 0x0000000000000000 0x1a FreeRTOS/Source/event_groups.o + 0x0000000000000000 0x1a FreeRTOS/org/Source/event_groups.o .text.vEventGroupClearBitsCallback - 0x0000000000000000 0x1a FreeRTOS/Source/event_groups.o + 0x0000000000000000 0x1a FreeRTOS/org/Source/event_groups.o .text.prvTestWaitCondition - 0x0000000000000000 0x44 FreeRTOS/Source/event_groups.o + 0x0000000000000000 0x44 FreeRTOS/org/Source/event_groups.o .text.uxEventGroupGetNumber - 0x0000000000000000 0x2c FreeRTOS/Source/event_groups.o + 0x0000000000000000 0x2c FreeRTOS/org/Source/event_groups.o .text.vEventGroupSetNumber - 0x0000000000000000 0x1c FreeRTOS/Source/event_groups.o - .debug_info 0x0000000000000000 0x1133 FreeRTOS/Source/event_groups.o - .debug_abbrev 0x0000000000000000 0x2f4 FreeRTOS/Source/event_groups.o + 0x0000000000000000 0x1c FreeRTOS/org/Source/event_groups.o + .debug_info 0x0000000000000000 0x1149 FreeRTOS/org/Source/event_groups.o + .debug_abbrev 0x0000000000000000 0x2f4 FreeRTOS/org/Source/event_groups.o .debug_aranges - 0x0000000000000000 0x78 FreeRTOS/Source/event_groups.o - .debug_ranges 0x0000000000000000 0x68 FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x1d5 FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0xa72 FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x18 FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x22 FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x40 FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x94 FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x3c FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x34 FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x16 FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x10e FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x8d FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x57 FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x52 FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x1f FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x43 FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x20 FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x1a3 FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x330 FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x16 FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x29 FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0xef FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x6a FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x1df FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x106 FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x15a FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0xea FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x1c FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x26 FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x4fd FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0xb5 FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x120 FreeRTOS/Source/event_groups.o - .debug_macro 0x0000000000000000 0x91 FreeRTOS/Source/event_groups.o - .debug_line 0x0000000000000000 0x93a FreeRTOS/Source/event_groups.o - .debug_str 0x0000000000000000 0xc7ea FreeRTOS/Source/event_groups.o - .comment 0x0000000000000000 0x7c FreeRTOS/Source/event_groups.o - .debug_frame 0x0000000000000000 0x1d0 FreeRTOS/Source/event_groups.o + 0x0000000000000000 0x78 FreeRTOS/org/Source/event_groups.o + .debug_ranges 0x0000000000000000 0x68 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x237 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0xa72 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x18 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x22 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x40 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x94 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x3c FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x34 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x16 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x10e FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x8d FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x57 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x52 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x1f FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x43 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x20 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x1a3 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x330 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x16 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x29 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0xef FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x6a FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x1df FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x112 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x58 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x46 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x64 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x49 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0xc3 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x204 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x450 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x15a FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0xea FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x1c FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x26 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x3d0 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0xb5 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x120 FreeRTOS/org/Source/event_groups.o + .debug_macro 0x0000000000000000 0x91 FreeRTOS/org/Source/event_groups.o + .debug_line 0x0000000000000000 0xb0b FreeRTOS/org/Source/event_groups.o + .debug_str 0x0000000000000000 0x107e2 FreeRTOS/org/Source/event_groups.o + .comment 0x0000000000000000 0x7c FreeRTOS/org/Source/event_groups.o + .debug_frame 0x0000000000000000 0x1d0 FreeRTOS/org/Source/event_groups.o .ARM.attributes - 0x0000000000000000 0x39 FreeRTOS/Source/event_groups.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/list.o - .text 0x0000000000000000 0x0 FreeRTOS/Source/list.o - .data 0x0000000000000000 0x0 FreeRTOS/Source/list.o - .bss 0x0000000000000000 0x0 FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0xa72 FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0x18 FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0x22 FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0x40 FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0x94 FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0x3c FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0x34 FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0x16 FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0x10e FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0x8d FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0x57 FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0x52 FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0x1f FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0x43 FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0x20 FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0x1a3 FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0x330 FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0x16 FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0x29 FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0xef FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0x6a FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0x1df FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0x106 FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0x15a FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0xea FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0x1c FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0x26 FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0x4fd FreeRTOS/Source/list.o - .debug_macro 0x0000000000000000 0xb5 FreeRTOS/Source/list.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/queue.o - .text 0x0000000000000000 0x0 FreeRTOS/Source/queue.o - .data 0x0000000000000000 0x0 FreeRTOS/Source/queue.o - .bss 0x0000000000000000 0x0 FreeRTOS/Source/queue.o + 0x0000000000000000 0x39 FreeRTOS/org/Source/event_groups.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/list.o + .text 0x0000000000000000 0x0 FreeRTOS/org/Source/list.o + .data 0x0000000000000000 0x0 FreeRTOS/org/Source/list.o + .bss 0x0000000000000000 0x0 FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0xa72 FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x18 FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x22 FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x40 FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x94 FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x3c FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x34 FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x16 FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x10e FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x8d FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x57 FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x52 FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x1f FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x43 FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x20 FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x1a3 FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x330 FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x16 FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x29 FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0xef FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x6a FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x1df FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x112 FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x58 FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x46 FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x64 FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x49 FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0xc3 FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x204 FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x450 FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x15a FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0xea FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x1c FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x26 FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0x3d0 FreeRTOS/org/Source/list.o + .debug_macro 0x0000000000000000 0xb5 FreeRTOS/org/Source/list.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/queue.o + .text 0x0000000000000000 0x0 FreeRTOS/org/Source/queue.o + .data 0x0000000000000000 0x0 FreeRTOS/org/Source/queue.o + .bss 0x0000000000000000 0x0 FreeRTOS/org/Source/queue.o .text.prvInitialiseMutex - 0x0000000000000000 0x34 FreeRTOS/Source/queue.o + 0x0000000000000000 0x34 FreeRTOS/org/Source/queue.o .text.xQueueCreateMutex - 0x0000000000000000 0x30 FreeRTOS/Source/queue.o + 0x0000000000000000 0x30 FreeRTOS/org/Source/queue.o .text.xQueueGiveMutexRecursive - 0x0000000000000000 0x66 FreeRTOS/Source/queue.o + 0x0000000000000000 0x66 FreeRTOS/org/Source/queue.o .text.xQueueTakeMutexRecursive - 0x0000000000000000 0x6a FreeRTOS/Source/queue.o + 0x0000000000000000 0x6a FreeRTOS/org/Source/queue.o .text.xQueueCreateCountingSemaphore - 0x0000000000000000 0x62 FreeRTOS/Source/queue.o + 0x0000000000000000 0x62 FreeRTOS/org/Source/queue.o .text.xQueueGiveFromISR - 0x0000000000000000 0x12e FreeRTOS/Source/queue.o + 0x0000000000000000 0x156 FreeRTOS/org/Source/queue.o .text.xQueueSemaphoreTake - 0x0000000000000000 0x210 FreeRTOS/Source/queue.o + 0x0000000000000000 0x27c FreeRTOS/org/Source/queue.o .text.xQueuePeek - 0x0000000000000000 0x1bc FreeRTOS/Source/queue.o + 0x0000000000000000 0x1e4 FreeRTOS/org/Source/queue.o .text.xQueueReceiveFromISR - 0x0000000000000000 0x116 FreeRTOS/Source/queue.o + 0x0000000000000000 0x152 FreeRTOS/org/Source/queue.o .text.xQueuePeekFromISR - 0x0000000000000000 0xca FreeRTOS/Source/queue.o + 0x0000000000000000 0x106 FreeRTOS/org/Source/queue.o .text.uxQueueMessagesWaiting - 0x0000000000000000 0x3a FreeRTOS/Source/queue.o + 0x0000000000000000 0x3a FreeRTOS/org/Source/queue.o .text.uxQueueSpacesAvailable - 0x0000000000000000 0x44 FreeRTOS/Source/queue.o + 0x0000000000000000 0x44 FreeRTOS/org/Source/queue.o .text.uxQueueMessagesWaitingFromISR - 0x0000000000000000 0x3a FreeRTOS/Source/queue.o + 0x0000000000000000 0x3a FreeRTOS/org/Source/queue.o .text.vQueueDelete - 0x0000000000000000 0x3a FreeRTOS/Source/queue.o + 0x0000000000000000 0x4c FreeRTOS/org/Source/queue.o .text.uxQueueGetQueueNumber - 0x0000000000000000 0x18 FreeRTOS/Source/queue.o + 0x0000000000000000 0x18 FreeRTOS/org/Source/queue.o .text.vQueueSetQueueNumber - 0x0000000000000000 0x1c FreeRTOS/Source/queue.o + 0x0000000000000000 0x1c FreeRTOS/org/Source/queue.o .text.ucQueueGetQueueType - 0x0000000000000000 0x1a FreeRTOS/Source/queue.o + 0x0000000000000000 0x1a FreeRTOS/org/Source/queue.o .text.prvGetDisinheritPriorityAfterTimeout - 0x0000000000000000 0x30 FreeRTOS/Source/queue.o + 0x0000000000000000 0x30 FreeRTOS/org/Source/queue.o .text.xQueueIsQueueEmptyFromISR - 0x0000000000000000 0x46 FreeRTOS/Source/queue.o + 0x0000000000000000 0x46 FreeRTOS/org/Source/queue.o .text.xQueueIsQueueFullFromISR - 0x0000000000000000 0x4a FreeRTOS/Source/queue.o + 0x0000000000000000 0x4a FreeRTOS/org/Source/queue.o .text.pcQueueGetName - 0x0000000000000000 0x4c FreeRTOS/Source/queue.o + 0x0000000000000000 0x4c FreeRTOS/org/Source/queue.o .text.vQueueUnregisterQueue - 0x0000000000000000 0x54 FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0xa72 FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0x18 FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0x22 FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0x40 FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0x94 FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0x3c FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0x34 FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0x16 FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0x10e FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0x8d FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0x57 FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0x52 FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0x1f FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0x43 FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0x20 FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0x1a3 FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0x330 FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0x16 FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0x29 FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0xef FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0x6a FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0x1df FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0x106 FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0x15a FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0xea FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0x1c FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0x26 FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0x4fd FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0xb5 FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000000 0x120 FreeRTOS/Source/queue.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/stream_buffer.o - .text 0x0000000000000000 0x0 FreeRTOS/Source/stream_buffer.o - .data 0x0000000000000000 0x0 FreeRTOS/Source/stream_buffer.o - .bss 0x0000000000000000 0x0 FreeRTOS/Source/stream_buffer.o + 0x0000000000000000 0x54 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0xa72 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x18 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x22 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x40 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x94 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x3c FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x34 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x16 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x10e FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x8d FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x57 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x52 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x1f FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x43 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x20 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x1a3 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x330 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x16 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x29 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0xef FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x6a FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x1df FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x112 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x58 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x46 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x64 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x49 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0xc3 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x204 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x450 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x15a FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0xea FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x1c FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x26 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x3d0 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0xb5 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000000 0x120 FreeRTOS/org/Source/queue.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/stream_buffer.o + .text 0x0000000000000000 0x0 FreeRTOS/org/Source/stream_buffer.o + .data 0x0000000000000000 0x0 FreeRTOS/org/Source/stream_buffer.o + .bss 0x0000000000000000 0x0 FreeRTOS/org/Source/stream_buffer.o .text.xStreamBufferGenericCreate - 0x0000000000000000 0xbe FreeRTOS/Source/stream_buffer.o + 0x0000000000000000 0xd8 FreeRTOS/org/Source/stream_buffer.o .text.vStreamBufferDelete - 0x0000000000000000 0x4c FreeRTOS/Source/stream_buffer.o + 0x0000000000000000 0x56 FreeRTOS/org/Source/stream_buffer.o .text.xStreamBufferReset - 0x0000000000000000 0x76 FreeRTOS/Source/stream_buffer.o + 0x0000000000000000 0x80 FreeRTOS/org/Source/stream_buffer.o .text.xStreamBufferSetTriggerLevel - 0x0000000000000000 0x5a FreeRTOS/Source/stream_buffer.o + 0x0000000000000000 0x5a FreeRTOS/org/Source/stream_buffer.o .text.xStreamBufferSpacesAvailable - 0x0000000000000000 0x64 FreeRTOS/Source/stream_buffer.o + 0x0000000000000000 0x64 FreeRTOS/org/Source/stream_buffer.o .text.xStreamBufferBytesAvailable - 0x0000000000000000 0x38 FreeRTOS/Source/stream_buffer.o + 0x0000000000000000 0x38 FreeRTOS/org/Source/stream_buffer.o .text.xStreamBufferSend - 0x0000000000000000 0x18e FreeRTOS/Source/stream_buffer.o + 0x0000000000000000 0x1a8 FreeRTOS/org/Source/stream_buffer.o .text.xStreamBufferSendFromISR - 0x0000000000000000 0xe0 FreeRTOS/Source/stream_buffer.o + 0x0000000000000000 0xec FreeRTOS/org/Source/stream_buffer.o .text.prvWriteMessageToBuffer - 0x0000000000000000 0x7a FreeRTOS/Source/stream_buffer.o + 0x0000000000000000 0x7a FreeRTOS/org/Source/stream_buffer.o .text.xStreamBufferReceive - 0x0000000000000000 0x12e FreeRTOS/Source/stream_buffer.o + 0x0000000000000000 0x148 FreeRTOS/org/Source/stream_buffer.o .text.xStreamBufferNextMessageLengthBytes - 0x0000000000000000 0x8e FreeRTOS/Source/stream_buffer.o + 0x0000000000000000 0x8e FreeRTOS/org/Source/stream_buffer.o .text.xStreamBufferReceiveFromISR - 0x0000000000000000 0xdc FreeRTOS/Source/stream_buffer.o + 0x0000000000000000 0xe8 FreeRTOS/org/Source/stream_buffer.o .text.prvReadMessageFromBuffer - 0x0000000000000000 0x64 FreeRTOS/Source/stream_buffer.o + 0x0000000000000000 0x64 FreeRTOS/org/Source/stream_buffer.o .text.xStreamBufferIsEmpty - 0x0000000000000000 0x4e FreeRTOS/Source/stream_buffer.o + 0x0000000000000000 0x4e FreeRTOS/org/Source/stream_buffer.o .text.xStreamBufferIsFull - 0x0000000000000000 0x5e FreeRTOS/Source/stream_buffer.o + 0x0000000000000000 0x5e FreeRTOS/org/Source/stream_buffer.o .text.xStreamBufferSendCompletedFromISR - 0x0000000000000000 0x86 FreeRTOS/Source/stream_buffer.o + 0x0000000000000000 0x86 FreeRTOS/org/Source/stream_buffer.o .text.xStreamBufferReceiveCompletedFromISR - 0x0000000000000000 0x86 FreeRTOS/Source/stream_buffer.o + 0x0000000000000000 0x86 FreeRTOS/org/Source/stream_buffer.o .text.prvWriteBytesToBuffer - 0x0000000000000000 0xde FreeRTOS/Source/stream_buffer.o + 0x0000000000000000 0xde FreeRTOS/org/Source/stream_buffer.o .text.prvReadBytesFromBuffer - 0x0000000000000000 0xee FreeRTOS/Source/stream_buffer.o + 0x0000000000000000 0xee FreeRTOS/org/Source/stream_buffer.o .text.prvBytesInBuffer - 0x0000000000000000 0x40 FreeRTOS/Source/stream_buffer.o + 0x0000000000000000 0x40 FreeRTOS/org/Source/stream_buffer.o .text.prvInitialiseNewStreamBuffer - 0x0000000000000000 0x64 FreeRTOS/Source/stream_buffer.o + 0x0000000000000000 0x64 FreeRTOS/org/Source/stream_buffer.o .text.uxStreamBufferGetStreamBufferNumber - 0x0000000000000000 0x18 FreeRTOS/Source/stream_buffer.o + 0x0000000000000000 0x18 FreeRTOS/org/Source/stream_buffer.o .text.vStreamBufferSetStreamBufferNumber - 0x0000000000000000 0x1c FreeRTOS/Source/stream_buffer.o + 0x0000000000000000 0x1c FreeRTOS/org/Source/stream_buffer.o .text.ucStreamBufferGetStreamBufferType - 0x0000000000000000 0x1e FreeRTOS/Source/stream_buffer.o - .debug_info 0x0000000000000000 0x1a0f FreeRTOS/Source/stream_buffer.o - .debug_abbrev 0x0000000000000000 0x345 FreeRTOS/Source/stream_buffer.o + 0x0000000000000000 0x1e FreeRTOS/org/Source/stream_buffer.o + .debug_info 0x0000000000000000 0x1a25 FreeRTOS/org/Source/stream_buffer.o + .debug_abbrev 0x0000000000000000 0x345 FreeRTOS/org/Source/stream_buffer.o .debug_aranges - 0x0000000000000000 0xd8 FreeRTOS/Source/stream_buffer.o - .debug_ranges 0x0000000000000000 0xc8 FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x1d3 FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0xa72 FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x22 FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x8e FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x51 FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0xef FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x6a FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x1df FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x46 FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x18 FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x3c FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x34 FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x174 FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x52 FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x1f FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x43 FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x20 FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x1a3 FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x330 FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x10 FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x35 FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x20 FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x106 FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x15a FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0xea FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x1c FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x26 FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x4fd FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0xb5 FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x120 FreeRTOS/Source/stream_buffer.o - .debug_macro 0x0000000000000000 0x18 FreeRTOS/Source/stream_buffer.o - .debug_line 0x0000000000000000 0xc56 FreeRTOS/Source/stream_buffer.o - .debug_str 0x0000000000000000 0xc94f FreeRTOS/Source/stream_buffer.o - .comment 0x0000000000000000 0x7c FreeRTOS/Source/stream_buffer.o - .debug_frame 0x0000000000000000 0x3a0 FreeRTOS/Source/stream_buffer.o + 0x0000000000000000 0xd8 FreeRTOS/org/Source/stream_buffer.o + .debug_ranges 0x0000000000000000 0xc8 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x235 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0xa72 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x22 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x8e FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x51 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0xef FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x6a FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x1df FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x46 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x18 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x3c FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x34 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x174 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x52 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x1f FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x43 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x20 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x1a3 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x330 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x10 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x35 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x20 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x112 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x58 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x46 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x64 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x49 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0xc3 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x204 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x450 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x15a FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0xea FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x1c FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x26 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x3d0 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0xb5 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x120 FreeRTOS/org/Source/stream_buffer.o + .debug_macro 0x0000000000000000 0x18 FreeRTOS/org/Source/stream_buffer.o + .debug_line 0x0000000000000000 0xe33 FreeRTOS/org/Source/stream_buffer.o + .debug_str 0x0000000000000000 0x10947 FreeRTOS/org/Source/stream_buffer.o + .comment 0x0000000000000000 0x7c FreeRTOS/org/Source/stream_buffer.o + .debug_frame 0x0000000000000000 0x3a0 FreeRTOS/org/Source/stream_buffer.o .ARM.attributes - 0x0000000000000000 0x39 FreeRTOS/Source/stream_buffer.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/tasks.o - .text 0x0000000000000000 0x0 FreeRTOS/Source/tasks.o - .data 0x0000000000000000 0x0 FreeRTOS/Source/tasks.o - .bss 0x0000000000000000 0x0 FreeRTOS/Source/tasks.o - .text.vTaskDelete - 0x0000000000000000 0x11c FreeRTOS/Source/tasks.o + 0x0000000000000000 0x39 FreeRTOS/org/Source/stream_buffer.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/tasks.o + .text 0x0000000000000000 0x0 FreeRTOS/org/Source/tasks.o + .data 0x0000000000000000 0x0 FreeRTOS/org/Source/tasks.o + .bss 0x0000000000000000 0x0 FreeRTOS/org/Source/tasks.o .text.xTaskDelayUntil - 0x0000000000000000 0xf8 FreeRTOS/Source/tasks.o + 0x0000000000000000 0xfc FreeRTOS/org/Source/tasks.o + .text.vTaskDelay + 0x0000000000000000 0x70 FreeRTOS/org/Source/tasks.o .text.eTaskGetState - 0x0000000000000000 0xf0 FreeRTOS/Source/tasks.o + 0x0000000000000000 0xf0 FreeRTOS/org/Source/tasks.o .text.uxTaskPriorityGet - 0x0000000000000000 0x34 FreeRTOS/Source/tasks.o + 0x0000000000000000 0x34 FreeRTOS/org/Source/tasks.o .text.uxTaskPriorityGetFromISR - 0x0000000000000000 0x58 FreeRTOS/Source/tasks.o + 0x0000000000000000 0x58 FreeRTOS/org/Source/tasks.o .text.vTaskPrioritySet - 0x0000000000000000 0x150 FreeRTOS/Source/tasks.o + 0x0000000000000000 0x180 FreeRTOS/org/Source/tasks.o .text.vTaskSuspend - 0x0000000000000000 0x13c FreeRTOS/Source/tasks.o + 0x0000000000000000 0x158 FreeRTOS/org/Source/tasks.o .text.prvTaskIsTaskSuspended - 0x0000000000000000 0x60 FreeRTOS/Source/tasks.o + 0x0000000000000000 0x60 FreeRTOS/org/Source/tasks.o .text.vTaskResume - 0x0000000000000000 0xb8 FreeRTOS/Source/tasks.o + 0x0000000000000000 0xd4 FreeRTOS/org/Source/tasks.o .text.xTaskResumeFromISR - 0x0000000000000000 0xe8 FreeRTOS/Source/tasks.o + 0x0000000000000000 0x104 FreeRTOS/org/Source/tasks.o .text.vTaskEndScheduler - 0x0000000000000000 0x30 FreeRTOS/Source/tasks.o - .text.xTaskGetTickCountFromISR - 0x0000000000000000 0x24 FreeRTOS/Source/tasks.o + 0x0000000000000000 0x30 FreeRTOS/org/Source/tasks.o .text.uxTaskGetNumberOfTasks - 0x0000000000000000 0x18 FreeRTOS/Source/tasks.o + 0x0000000000000000 0x18 FreeRTOS/org/Source/tasks.o .text.pcTaskGetName - 0x0000000000000000 0x48 FreeRTOS/Source/tasks.o + 0x0000000000000000 0x48 FreeRTOS/org/Source/tasks.o .text.uxTaskGetSystemState - 0x0000000000000000 0x11c FreeRTOS/Source/tasks.o + 0x0000000000000000 0x11c FreeRTOS/org/Source/tasks.o + .text.xTaskGetIdleTaskHandle + 0x0000000000000000 0x38 FreeRTOS/org/Source/tasks.o .text.xTaskCatchUpTicks - 0x0000000000000000 0x4c FreeRTOS/Source/tasks.o + 0x0000000000000000 0x4c FreeRTOS/org/Source/tasks.o .text.vTaskPlaceOnUnorderedEventList - 0x0000000000000000 0x74 FreeRTOS/Source/tasks.o + 0x0000000000000000 0x74 FreeRTOS/org/Source/tasks.o .text.vTaskRemoveFromUnorderedEventList - 0x0000000000000000 0xc0 FreeRTOS/Source/tasks.o + 0x0000000000000000 0xc8 FreeRTOS/org/Source/tasks.o .text.vTaskSetTimeOutState - 0x0000000000000000 0x4c FreeRTOS/Source/tasks.o + 0x0000000000000000 0x4c FreeRTOS/org/Source/tasks.o .text.uxTaskGetTaskNumber - 0x0000000000000000 0x2c FreeRTOS/Source/tasks.o + 0x0000000000000000 0x2c FreeRTOS/org/Source/tasks.o .text.vTaskSetTaskNumber - 0x0000000000000000 0x26 FreeRTOS/Source/tasks.o + 0x0000000000000000 0x26 FreeRTOS/org/Source/tasks.o .text.vTaskGetInfo - 0x0000000000000000 0xcc FreeRTOS/Source/tasks.o + 0x0000000000000000 0xcc FreeRTOS/org/Source/tasks.o .text.prvListTasksWithinSingleList - 0x0000000000000000 0xa4 FreeRTOS/Source/tasks.o + 0x0000000000000000 0xa4 FreeRTOS/org/Source/tasks.o .text.prvTaskCheckFreeStackSpace - 0x0000000000000000 0x38 FreeRTOS/Source/tasks.o + 0x0000000000000000 0x38 FreeRTOS/org/Source/tasks.o + .text.pxTaskGetStackStart + 0x0000000000000000 0x2c FreeRTOS/org/Source/tasks.o .text.xTaskGetCurrentTaskHandle - 0x0000000000000000 0x20 FreeRTOS/Source/tasks.o + 0x0000000000000000 0x20 FreeRTOS/org/Source/tasks.o .text.xTaskPriorityInherit - 0x0000000000000000 0xec FreeRTOS/Source/tasks.o + 0x0000000000000000 0xf4 FreeRTOS/org/Source/tasks.o .text.vTaskPriorityDisinheritAfterTimeout - 0x0000000000000000 0x118 FreeRTOS/Source/tasks.o + 0x0000000000000000 0x12c FreeRTOS/org/Source/tasks.o .text.uxTaskResetEventItemValue - 0x0000000000000000 0x30 FreeRTOS/Source/tasks.o + 0x0000000000000000 0x30 FreeRTOS/org/Source/tasks.o .text.pvTaskIncrementMutexHeldCount - 0x0000000000000000 0x28 FreeRTOS/Source/tasks.o + 0x0000000000000000 0x28 FreeRTOS/org/Source/tasks.o .text.ulTaskGenericNotifyTake - 0x0000000000000000 0xcc FreeRTOS/Source/tasks.o - .text.xTaskGenericNotifyWait - 0x0000000000000000 0xfc FreeRTOS/Source/tasks.o - .text.xTaskGenericNotify - 0x0000000000000000 0x1b8 FreeRTOS/Source/tasks.o - .text.xTaskGenericNotifyFromISR - 0x0000000000000000 0x1fc FreeRTOS/Source/tasks.o + 0x0000000000000000 0xd8 FreeRTOS/org/Source/tasks.o .text.vTaskGenericNotifyGiveFromISR - 0x0000000000000000 0x150 FreeRTOS/Source/tasks.o + 0x0000000000000000 0x16c FreeRTOS/org/Source/tasks.o .text.xTaskGenericNotifyStateClear - 0x0000000000000000 0x70 FreeRTOS/Source/tasks.o + 0x0000000000000000 0x70 FreeRTOS/org/Source/tasks.o .text.ulTaskGenericNotifyValueClear - 0x0000000000000000 0x5c FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0xa72 FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x18 FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x22 FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x40 FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x94 FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x3c FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x34 FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x16 FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x10e FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x8d FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x57 FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x52 FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x1f FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x43 FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x20 FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x1a3 FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x330 FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x16 FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x29 FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x16 FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x35 FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x20 FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0xef FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x6a FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x1df FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x106 FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x15a FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0xea FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x1c FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x26 FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x4fd FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0xb5 FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x120 FreeRTOS/Source/tasks.o - .debug_macro 0x0000000000000000 0x91 FreeRTOS/Source/tasks.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/timers.o - .text 0x0000000000000000 0x0 FreeRTOS/Source/timers.o - .data 0x0000000000000000 0x0 FreeRTOS/Source/timers.o - .bss 0x0000000000000000 0x0 FreeRTOS/Source/timers.o - .text.xTimerCreate - 0x0000000000000000 0x42 FreeRTOS/Source/timers.o - .text.prvInitialiseNewTimer - 0x0000000000000000 0x74 FreeRTOS/Source/timers.o + 0x0000000000000000 0x5c FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0xa72 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x18 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x22 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x40 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x94 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x3c FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x34 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x16 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x10e FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x8d FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x57 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x52 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x1f FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x43 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x20 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x1a3 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x330 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x16 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x29 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x16 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x35 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x20 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0xef FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x6a FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x1df FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x112 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x58 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x46 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x64 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x49 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0xc3 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x204 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x450 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x15a FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0xea FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x1c FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x26 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x3d0 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0xb5 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x120 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000000 0x91 FreeRTOS/org/Source/tasks.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/timers.o + .text 0x0000000000000000 0x0 FreeRTOS/org/Source/timers.o + .data 0x0000000000000000 0x0 FreeRTOS/org/Source/timers.o + .bss 0x0000000000000000 0x0 FreeRTOS/org/Source/timers.o .text.xTimerGetTimerDaemonTaskHandle - 0x0000000000000000 0x38 FreeRTOS/Source/timers.o + 0x0000000000000000 0x38 FreeRTOS/org/Source/timers.o .text.xTimerGetPeriod - 0x0000000000000000 0x36 FreeRTOS/Source/timers.o + 0x0000000000000000 0x36 FreeRTOS/org/Source/timers.o .text.vTimerSetReloadMode - 0x0000000000000000 0x64 FreeRTOS/Source/timers.o + 0x0000000000000000 0x64 FreeRTOS/org/Source/timers.o .text.uxTimerGetReloadMode - 0x0000000000000000 0x50 FreeRTOS/Source/timers.o + 0x0000000000000000 0x50 FreeRTOS/org/Source/timers.o .text.xTimerGetExpiryTime - 0x0000000000000000 0x3a FreeRTOS/Source/timers.o + 0x0000000000000000 0x3a FreeRTOS/org/Source/timers.o .text.pcTimerGetName - 0x0000000000000000 0x36 FreeRTOS/Source/timers.o + 0x0000000000000000 0x36 FreeRTOS/org/Source/timers.o .text.xTimerIsTimerActive - 0x0000000000000000 0x50 FreeRTOS/Source/timers.o + 0x0000000000000000 0x50 FreeRTOS/org/Source/timers.o .text.pvTimerGetTimerID - 0x0000000000000000 0x3e FreeRTOS/Source/timers.o + 0x0000000000000000 0x3e FreeRTOS/org/Source/timers.o .text.vTimerSetTimerID - 0x0000000000000000 0x3e FreeRTOS/Source/timers.o + 0x0000000000000000 0x3e FreeRTOS/org/Source/timers.o .text.uxTimerGetTimerNumber - 0x0000000000000000 0x18 FreeRTOS/Source/timers.o + 0x0000000000000000 0x18 FreeRTOS/org/Source/timers.o .text.vTimerSetTimerNumber - 0x0000000000000000 0x1c FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0xa72 FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x18 FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x22 FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x40 FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x94 FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x3c FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x34 FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x16 FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x10e FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x8d FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x57 FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x52 FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x1f FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x43 FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x20 FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x1a3 FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x330 FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x16 FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x29 FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0xef FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x6a FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x1df FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x106 FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x15a FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0xea FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x1c FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x26 FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x4fd FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0xb5 FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x120 FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000000 0x80 FreeRTOS/Source/timers.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .text 0x0000000000000000 0x0 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .data 0x0000000000000000 0x0 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .bss 0x0000000000000000 0x0 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o + 0x0000000000000000 0x1c FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0xa72 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x18 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x22 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x40 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x94 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x3c FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x34 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x16 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x10e FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x8d FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x57 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x52 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x1f FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x43 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x20 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x1a3 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x330 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x16 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x29 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0xef FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x6a FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x1df FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x112 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x58 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x46 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x64 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x49 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0xc3 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x204 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x450 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x15a FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0xea FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x1c FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x26 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x3d0 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0xb5 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x120 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000000 0x80 FreeRTOS/org/Source/timers.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .text 0x0000000000000000 0x0 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .data 0x0000000000000000 0x0 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .bss 0x0000000000000000 0x0 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o .rodata.pcInterruptPriorityRegisters - 0x0000000000000000 0x4 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o + 0x0000000000000000 0x4 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o .text.vPortEndScheduler - 0x0000000000000000 0x34 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .debug_macro 0x0000000000000000 0xa72 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .debug_macro 0x0000000000000000 0x174 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .debug_macro 0x0000000000000000 0x22 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .debug_macro 0x0000000000000000 0x8e FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .debug_macro 0x0000000000000000 0x51 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .debug_macro 0x0000000000000000 0xef FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .debug_macro 0x0000000000000000 0x6a FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .debug_macro 0x0000000000000000 0x1df FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .debug_macro 0x0000000000000000 0x106 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .debug_macro 0x0000000000000000 0x15a FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .debug_macro 0x0000000000000000 0xea FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .debug_macro 0x0000000000000000 0x1c FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .debug_macro 0x0000000000000000 0x26 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .debug_macro 0x0000000000000000 0x4fd FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .debug_macro 0x0000000000000000 0xb5 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .debug_macro 0x0000000000000000 0x120 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .group 0x0000000000000000 0xc FreeRTOS/Source/portable/MemMang/heap_4.o - .text 0x0000000000000000 0x0 FreeRTOS/Source/portable/MemMang/heap_4.o - .data 0x0000000000000000 0x0 FreeRTOS/Source/portable/MemMang/heap_4.o - .bss 0x0000000000000000 0x0 FreeRTOS/Source/portable/MemMang/heap_4.o + 0x0000000000000000 0x34 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_macro 0x0000000000000000 0xa72 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_macro 0x0000000000000000 0x174 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_macro 0x0000000000000000 0x22 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_macro 0x0000000000000000 0x8e FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_macro 0x0000000000000000 0x51 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_macro 0x0000000000000000 0xef FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_macro 0x0000000000000000 0x6a FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_macro 0x0000000000000000 0x1df FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_macro 0x0000000000000000 0x112 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_macro 0x0000000000000000 0x58 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_macro 0x0000000000000000 0x46 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_macro 0x0000000000000000 0x64 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_macro 0x0000000000000000 0x49 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_macro 0x0000000000000000 0xc3 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_macro 0x0000000000000000 0x204 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_macro 0x0000000000000000 0x450 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_macro 0x0000000000000000 0x15a FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_macro 0x0000000000000000 0xea FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_macro 0x0000000000000000 0x1c FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_macro 0x0000000000000000 0x26 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_macro 0x0000000000000000 0x3d0 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_macro 0x0000000000000000 0xb5 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_macro 0x0000000000000000 0x120 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .text 0x0000000000000000 0x0 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .data 0x0000000000000000 0x0 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .bss 0x0000000000000000 0x0 FreeRTOS/org/Source/portable/MemMang/heap_4.o .rodata.xHeapStructSize - 0x0000000000000000 0x4 FreeRTOS/Source/portable/MemMang/heap_4.o + 0x0000000000000000 0x4 FreeRTOS/org/Source/portable/MemMang/heap_4.o .text.xPortGetFreeHeapSize - 0x0000000000000000 0x18 FreeRTOS/Source/portable/MemMang/heap_4.o + 0x0000000000000000 0x18 FreeRTOS/org/Source/portable/MemMang/heap_4.o .text.xPortGetMinimumEverFreeHeapSize - 0x0000000000000000 0x18 FreeRTOS/Source/portable/MemMang/heap_4.o + 0x0000000000000000 0x18 FreeRTOS/org/Source/portable/MemMang/heap_4.o .text.vPortInitialiseBlocks - 0x0000000000000000 0xe FreeRTOS/Source/portable/MemMang/heap_4.o + 0x0000000000000000 0xe FreeRTOS/org/Source/portable/MemMang/heap_4.o .text.vPortGetHeapStats - 0x0000000000000000 0xbc FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0xa72 FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0x18 FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0x22 FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0x40 FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0x94 FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0x3c FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0x34 FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0x16 FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0x10e FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0x8d FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0x57 FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0x52 FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0x1f FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0x43 FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0x20 FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0x1a3 FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0x330 FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0x16 FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0x29 FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0xef FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0x6a FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0x1df FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0x106 FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0x15a FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0xea FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0x1c FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0x26 FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0x4fd FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0xb5 FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000000 0x120 FreeRTOS/Source/portable/MemMang/heap_4.o + 0x0000000000000000 0xbc FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0xa72 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x18 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x22 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x40 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x94 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x3c FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x34 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x16 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x10e FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x8d FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x57 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x52 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x1f FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x43 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x20 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x1a3 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x330 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x16 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x29 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0xef FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x6a FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x1df FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x112 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x58 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x46 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x64 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x49 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0xc3 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x204 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x450 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x15a FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0xea FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x1c FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x26 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x3d0 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0xb5 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000000 0x120 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .group 0x0000000000000000 0xc SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .text 0x0000000000000000 0x0 SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .data 0x0000000000000000 0x0 SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .bss 0x0000000000000000 0x0 SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_macro 0x0000000000000000 0xa72 SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_macro 0x0000000000000000 0x174 SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_macro 0x0000000000000000 0x22 SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_macro 0x0000000000000000 0x8e SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_macro 0x0000000000000000 0x51 SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_macro 0x0000000000000000 0xef SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_macro 0x0000000000000000 0x6a SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_macro 0x0000000000000000 0x1df SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_macro 0x0000000000000000 0x112 SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_macro 0x0000000000000000 0x58 SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_macro 0x0000000000000000 0x46 SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_macro 0x0000000000000000 0x64 SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_macro 0x0000000000000000 0x49 SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_macro 0x0000000000000000 0xc3 SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_macro 0x0000000000000000 0x204 SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_macro 0x0000000000000000 0x450 SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_macro 0x0000000000000000 0x15a SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_macro 0x0000000000000000 0xea SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_macro 0x0000000000000000 0x1c SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_macro 0x0000000000000000 0x26 SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_macro 0x0000000000000000 0x3d0 SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .text 0x0000000000000000 0x0 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .data 0x0000000000000000 0x0 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .bss 0x0000000000000000 0x0 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .text.SYSVIEW_UpdateTask + 0x0000000000000000 0xe0 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0xa72 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x174 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x22 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x8e SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x51 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0xef SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x6a SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x1df SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x112 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x58 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x46 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x64 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x49 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0xc3 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x204 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x450 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x15a SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0xea SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x1c SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x26 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x3d0 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0xb5 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x120 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x46 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x18 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x3c SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x34 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x52 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x1f SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x43 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x20 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x1a3 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x330 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x10 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x35 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x0000000000000000 0x20 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .text 0x0000000000000000 0x0 SEGGER/SEGGER/SEGGER_RTT.o + .data 0x0000000000000000 0x0 SEGGER/SEGGER/SEGGER_RTT.o + .bss 0x0000000000000000 0x0 SEGGER/SEGGER/SEGGER_RTT.o + .data._aTerminalId + 0x0000000000000000 0x10 SEGGER/SEGGER/SEGGER_RTT.o + .bss._ActiveTerminal + 0x0000000000000000 0x1 SEGGER/SEGGER/SEGGER_RTT.o + .text._WriteBlocking + 0x0000000000000000 0xba SEGGER/SEGGER/SEGGER_RTT.o + .text._WriteNoCheck + 0x0000000000000000 0x90 SEGGER/SEGGER/SEGGER_RTT.o + .text._PostTerminalSwitch + 0x0000000000000000 0x34 SEGGER/SEGGER/SEGGER_RTT.o + .text._GetAvailWriteSpace + 0x0000000000000000 0x46 SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_ReadUpBufferNoLock + 0x0000000000000000 0x10c SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_ReadUpBuffer + 0x0000000000000000 0x36 SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_Read + 0x0000000000000000 0x36 SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_WriteWithOverwriteNoLock + 0x0000000000000000 0x124 SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_WriteDownBufferNoLock + 0x0000000000000000 0x9c SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_WriteNoLock + 0x0000000000000000 0x9c SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_WriteDownBuffer + 0x0000000000000000 0x4c SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_Write + 0x0000000000000000 0x4c SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_WriteString + 0x0000000000000000 0x26 SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_PutCharSkipNoLock + 0x0000000000000000 0x78 SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_PutCharSkip + 0x0000000000000000 0x98 SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_PutChar + 0x0000000000000000 0xac SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_GetKey + 0x0000000000000000 0x32 SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_WaitKey + 0x0000000000000000 0x1c SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_HasKey + 0x0000000000000000 0x48 SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_HasData + 0x0000000000000000 0x38 SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_HasDataUp + 0x0000000000000000 0x38 SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_AllocDownBuffer + 0x0000000000000000 0x104 SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_ConfigUpBuffer + 0x0000000000000000 0xe0 SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_SetNameUpBuffer + 0x0000000000000000 0x70 SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_SetNameDownBuffer + 0x0000000000000000 0x70 SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_SetFlagsUpBuffer + 0x0000000000000000 0x70 SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_SetFlagsDownBuffer + 0x0000000000000000 0x70 SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_Init + 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_SetTerminal + 0x0000000000000000 0xb8 SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_TerminalOut + 0x0000000000000000 0x124 SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_GetAvailWriteSpace + 0x0000000000000000 0x30 SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_GetBytesInBuffer + 0x0000000000000000 0x74 SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x0000000000000000 0xa72 SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x0000000000000000 0x49 SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x0000000000000000 0x18 SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x0000000000000000 0x22 SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x0000000000000000 0x40 SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x0000000000000000 0x94 SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x0000000000000000 0x3c SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x0000000000000000 0x34 SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x0000000000000000 0x16 SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x0000000000000000 0x10e SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x0000000000000000 0x8d SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x0000000000000000 0x57 SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x0000000000000000 0x52 SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x0000000000000000 0x1f SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x0000000000000000 0x43 SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x0000000000000000 0x20 SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x0000000000000000 0x1a3 SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x0000000000000000 0x330 SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x0000000000000000 0x16 SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x0000000000000000 0x29 SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x0000000000000000 0x58 SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x0000000000000000 0x16 SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x0000000000000000 0x35 SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x0000000000000000 0x20 SEGGER/SEGGER/SEGGER_RTT.o + .data 0x0000000000000000 0x0 SEGGER/SEGGER/SEGGER_RTT_ASM_ARMv7M.o + .bss 0x0000000000000000 0x0 SEGGER/SEGGER/SEGGER_RTT_ASM_ARMv7M.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .group 0x0000000000000000 0xc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text 0x0000000000000000 0x0 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .data 0x0000000000000000 0x0 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .bss 0x0000000000000000 0x0 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text._EncodeData + 0x0000000000000000 0x4a SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text._VPrintHost + 0x0000000000000000 0x180 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text._StoreChar + 0x0000000000000000 0xf6 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text._PrintUnsigned + 0x0000000000000000 0x12c SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text._PrintInt + 0x0000000000000000 0x11e SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text._VPrintTarget + 0x0000000000000000 0x36c SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_RecordU32x6 + 0x0000000000000000 0x194 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_RecordU32x7 + 0x0000000000000000 0x1cc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_RecordU32x8 + 0x0000000000000000 0x204 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_RecordU32x9 + 0x0000000000000000 0x240 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_RecordU32x10 + 0x0000000000000000 0x280 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_RecordString + 0x0000000000000000 0x48 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_GetChannelID + 0x0000000000000000 0x18 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_RecordEnterTimer + 0x0000000000000000 0x80 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_RecordExitTimer + 0x0000000000000000 0x38 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_RecordEndCall + 0x0000000000000000 0x78 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_RecordEndCallU32 + 0x0000000000000000 0xb0 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_OnTaskTerminate + 0x0000000000000000 0x84 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_OnTaskStopExec + 0x0000000000000000 0x38 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_MarkStart + 0x0000000000000000 0x78 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_MarkStop + 0x0000000000000000 0x78 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_Mark + 0x0000000000000000 0xb0 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_NameMarker + 0x0000000000000000 0xbc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_NameResource + 0x0000000000000000 0x90 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_SendPacket + 0x0000000000000000 0x38 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_EncodeU32 + 0x0000000000000000 0x50 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_EncodeString + 0x0000000000000000 0x20 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_EncodeData + 0x0000000000000000 0x20 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_EncodeId + 0x0000000000000000 0x60 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_RegisterModule + 0x0000000000000000 0x90 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_RecordModuleDescription + 0x0000000000000000 0xf4 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_PrintfHostEx + 0x0000000000000000 0x2c SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_PrintfHost + 0x0000000000000000 0x28 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_WarnfHost + 0x0000000000000000 0x28 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_ErrorfHost + 0x0000000000000000 0x28 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_PrintfTargetEx + 0x0000000000000000 0x2c SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_PrintfTarget + 0x0000000000000000 0x28 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_WarnfTarget + 0x0000000000000000 0x28 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_ErrorfTarget + 0x0000000000000000 0x28 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_Print + 0x0000000000000000 0xb8 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_Error + 0x0000000000000000 0xb8 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_EnableEvents + 0x0000000000000000 0x28 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_DisableEvents + 0x0000000000000000 0x24 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_IsStarted + 0x0000000000000000 0x5c SEGGER/SEGGER/SEGGER_SYSVIEW.o + .rodata._aV2C.6912 + 0x0000000000000000 0x10 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000000000 0xa72 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000000000 0x22 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000000000 0x40 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000000000 0x18 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000000000 0x94 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000000000 0x3c SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000000000 0x34 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000000000 0x174 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000000000 0x57 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000000000 0x52 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000000000 0x1f SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000000000 0x43 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000000000 0x20 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000000000 0x1a3 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000000000 0x330 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000000000 0x10 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000000000 0x35 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000000000 0x20 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000000000 0x16 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000000000 0x16 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000000000 0x29 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000000000 0x58 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000000000 0x46 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000000000 0x64 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000000000 0x49 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000000000 0xc3 SEGGER/SEGGER/SEGGER_SYSVIEW.o + COMMON 0x0000000000000000 0x8 SEGGER/SEGGER/SEGGER_SYSVIEW.o .group 0x0000000000000000 0xc StdPeriph_Driver/src/misc.o .group 0x0000000000000000 0xc StdPeriph_Driver/src/misc.o .group 0x0000000000000000 0xc StdPeriph_Driver/src/misc.o @@ -3359,14 +3903,8 @@ Discarded input sections 0x0000000000000000 0x34 StdPeriph_Driver/src/stm32f4xx_gpio.o .text.GPIO_ReadInputData 0x0000000000000000 0x1a StdPeriph_Driver/src/stm32f4xx_gpio.o - .text.GPIO_ReadOutputDataBit - 0x0000000000000000 0x34 StdPeriph_Driver/src/stm32f4xx_gpio.o .text.GPIO_ReadOutputData 0x0000000000000000 0x1a StdPeriph_Driver/src/stm32f4xx_gpio.o - .text.GPIO_SetBits - 0x0000000000000000 0x1e StdPeriph_Driver/src/stm32f4xx_gpio.o - .text.GPIO_ResetBits - 0x0000000000000000 0x1e StdPeriph_Driver/src/stm32f4xx_gpio.o .text.GPIO_WriteBit 0x0000000000000000 0x30 StdPeriph_Driver/src/stm32f4xx_gpio.o .text.GPIO_Write @@ -4786,16 +5324,12 @@ Discarded input sections 0x0000000000000000 0x114 StdPeriph_Driver/src/stm32f4xx_rtc.o .text.RTC_TimeStructInit 0x0000000000000000 0x2c StdPeriph_Driver/src/stm32f4xx_rtc.o - .text.RTC_GetTime - 0x0000000000000000 0xa4 StdPeriph_Driver/src/stm32f4xx_rtc.o .text.RTC_GetSubSecond 0x0000000000000000 0x28 StdPeriph_Driver/src/stm32f4xx_rtc.o .text.RTC_SetDate 0x0000000000000000 0x120 StdPeriph_Driver/src/stm32f4xx_rtc.o .text.RTC_DateStructInit 0x0000000000000000 0x2c StdPeriph_Driver/src/stm32f4xx_rtc.o - .text.RTC_GetDate - 0x0000000000000000 0x9c StdPeriph_Driver/src/stm32f4xx_rtc.o .text.RTC_SetAlarm 0x0000000000000000 0x138 StdPeriph_Driver/src/stm32f4xx_rtc.o .text.RTC_AlarmStructInit @@ -4876,14 +5410,6 @@ Discarded input sections 0x0000000000000000 0x3c StdPeriph_Driver/src/stm32f4xx_rtc.o .text.RTC_ByteToBcd2 0x0000000000000000 0x3a StdPeriph_Driver/src/stm32f4xx_rtc.o - .text.RTC_Bcd2ToByte - 0x0000000000000000 0x38 StdPeriph_Driver/src/stm32f4xx_rtc.o - .debug_info 0x0000000000000000 0x10f6 StdPeriph_Driver/src/stm32f4xx_rtc.o - .debug_abbrev 0x0000000000000000 0x1e2 StdPeriph_Driver/src/stm32f4xx_rtc.o - .debug_aranges - 0x0000000000000000 0x1e0 StdPeriph_Driver/src/stm32f4xx_rtc.o - .debug_ranges 0x0000000000000000 0x1d0 StdPeriph_Driver/src/stm32f4xx_rtc.o - .debug_macro 0x0000000000000000 0x1f8 StdPeriph_Driver/src/stm32f4xx_rtc.o .debug_macro 0x0000000000000000 0xa72 StdPeriph_Driver/src/stm32f4xx_rtc.o .debug_macro 0x0000000000000000 0x65 StdPeriph_Driver/src/stm32f4xx_rtc.o .debug_macro 0x0000000000000000 0x3b StdPeriph_Driver/src/stm32f4xx_rtc.o @@ -4921,13 +5447,6 @@ Discarded input sections .debug_macro 0x0000000000000000 0x188 StdPeriph_Driver/src/stm32f4xx_rtc.o .debug_macro 0x0000000000000000 0x149 StdPeriph_Driver/src/stm32f4xx_rtc.o .debug_macro 0x0000000000000000 0x35 StdPeriph_Driver/src/stm32f4xx_rtc.o - .debug_macro 0x0000000000000000 0x598 StdPeriph_Driver/src/stm32f4xx_rtc.o - .debug_line 0x0000000000000000 0xd3c StdPeriph_Driver/src/stm32f4xx_rtc.o - .debug_str 0x0000000000000000 0x5f5c4 StdPeriph_Driver/src/stm32f4xx_rtc.o - .comment 0x0000000000000000 0x7c StdPeriph_Driver/src/stm32f4xx_rtc.o - .debug_frame 0x0000000000000000 0x8b0 StdPeriph_Driver/src/stm32f4xx_rtc.o - .ARM.attributes - 0x0000000000000000 0x39 StdPeriph_Driver/src/stm32f4xx_rtc.o .group 0x0000000000000000 0xc StdPeriph_Driver/src/stm32f4xx_sai.o .group 0x0000000000000000 0xc StdPeriph_Driver/src/stm32f4xx_sai.o .group 0x0000000000000000 0xc StdPeriph_Driver/src/stm32f4xx_sai.o @@ -5883,8 +6402,6 @@ Discarded input sections 0x0000000000000000 0x44 StdPeriph_Driver/src/stm32f4xx_usart.o .text.USART_OneBitMethodCmd 0x0000000000000000 0x40 StdPeriph_Driver/src/stm32f4xx_usart.o - .text.USART_ReceiveData - 0x0000000000000000 0x20 StdPeriph_Driver/src/stm32f4xx_usart.o .text.USART_SetAddress 0x0000000000000000 0x3a StdPeriph_Driver/src/stm32f4xx_usart.o .text.USART_ReceiverWakeUpCmd @@ -5911,8 +6428,6 @@ Discarded input sections 0x0000000000000000 0x40 StdPeriph_Driver/src/stm32f4xx_usart.o .text.USART_DMACmd 0x0000000000000000 0x48 StdPeriph_Driver/src/stm32f4xx_usart.o - .text.USART_ITConfig - 0x0000000000000000 0x90 StdPeriph_Driver/src/stm32f4xx_usart.o .text.USART_ClearFlag 0x0000000000000000 0x22 StdPeriph_Driver/src/stm32f4xx_usart.o .text.USART_GetITStatus @@ -6123,9 +6638,32 @@ Discarded input sections .group 0x0000000000000000 0xc src/main.o .group 0x0000000000000000 0xc src/main.o .group 0x0000000000000000 0xc src/main.o + .group 0x0000000000000000 0xc src/main.o + .group 0x0000000000000000 0xc src/main.o + .group 0x0000000000000000 0xc src/main.o + .group 0x0000000000000000 0xc src/main.o + .group 0x0000000000000000 0xc src/main.o + .group 0x0000000000000000 0xc src/main.o + .group 0x0000000000000000 0xc src/main.o + .group 0x0000000000000000 0xc src/main.o + .group 0x0000000000000000 0xc src/main.o + .group 0x0000000000000000 0xc src/main.o + .group 0x0000000000000000 0xc src/main.o + .group 0x0000000000000000 0xc src/main.o + .group 0x0000000000000000 0xc src/main.o + .group 0x0000000000000000 0xc src/main.o + .group 0x0000000000000000 0xc src/main.o + .group 0x0000000000000000 0xc src/main.o + .group 0x0000000000000000 0xc src/main.o + .group 0x0000000000000000 0xc src/main.o + .group 0x0000000000000000 0xc src/main.o + .group 0x0000000000000000 0xc src/main.o + .group 0x0000000000000000 0xc src/main.o .text 0x0000000000000000 0x0 src/main.o .data 0x0000000000000000 0x0 src/main.o .bss 0x0000000000000000 0x0 src/main.o + .text.rtos_delayms + 0x0000000000000000 0x2c src/main.o .debug_macro 0x0000000000000000 0xa72 src/main.o .debug_macro 0x0000000000000000 0x65 src/main.o .debug_macro 0x0000000000000000 0x3b src/main.o @@ -6165,25 +6703,34 @@ Discarded input sections .debug_macro 0x0000000000000000 0x149 src/main.o .debug_macro 0x0000000000000000 0x35 src/main.o .debug_macro 0x0000000000000000 0x174 src/main.o + .debug_macro 0x0000000000000000 0x58 src/main.o + .debug_macro 0x0000000000000000 0x46 src/main.o + .debug_macro 0x0000000000000000 0x64 src/main.o + .debug_macro 0x0000000000000000 0x49 src/main.o + .debug_macro 0x0000000000000000 0xc3 src/main.o + .debug_macro 0x0000000000000000 0x204 src/main.o + .debug_macro 0x0000000000000000 0x450 src/main.o .debug_macro 0x0000000000000000 0x15a src/main.o .debug_macro 0x0000000000000000 0xea src/main.o .debug_macro 0x0000000000000000 0x1c src/main.o .debug_macro 0x0000000000000000 0x26 src/main.o - .debug_macro 0x0000000000000000 0x4fd src/main.o + .debug_macro 0x0000000000000000 0x3d0 src/main.o .debug_macro 0x0000000000000000 0xb5 src/main.o .debug_macro 0x0000000000000000 0x120 src/main.o + .debug_macro 0x0000000000000000 0x80 src/main.o + .debug_macro 0x0000000000000000 0x97 src/main.o .debug_macro 0x0000000000000000 0x46 src/main.o .debug_macro 0x0000000000000000 0x18 src/main.o .debug_macro 0x0000000000000000 0x3c src/main.o .debug_macro 0x0000000000000000 0x34 src/main.o + .debug_macro 0x0000000000000000 0x35 src/main.o + .debug_macro 0x0000000000000000 0x330 src/main.o .debug_macro 0x0000000000000000 0x52 src/main.o .debug_macro 0x0000000000000000 0x1f src/main.o .debug_macro 0x0000000000000000 0x43 src/main.o .debug_macro 0x0000000000000000 0x20 src/main.o .debug_macro 0x0000000000000000 0x1a3 src/main.o - .debug_macro 0x0000000000000000 0x330 src/main.o - .debug_macro 0x0000000000000000 0x10 src/main.o - .debug_macro 0x0000000000000000 0x35 src/main.o + .debug_macro 0x0000000000000000 0x16 src/main.o .debug_macro 0x0000000000000000 0x20 src/main.o .group 0x0000000000000000 0xc src/syscalls.o .group 0x0000000000000000 0xc src/syscalls.o @@ -6241,9 +6788,6 @@ Discarded input sections .text._exit 0x0000000000000000 0x14 src/syscalls.o .text._read 0x0000000000000000 0x3a src/syscalls.o .text._write 0x0000000000000000 0x38 src/syscalls.o - .bss.heap_end.7221 - 0x0000000000000000 0x4 src/syscalls.o - .text._sbrk 0x0000000000000000 0x58 src/syscalls.o .text._close 0x0000000000000000 0x18 src/syscalls.o .text._fstat 0x0000000000000000 0x20 src/syscalls.o .text._isatty 0x0000000000000000 0x16 src/syscalls.o @@ -6256,12 +6800,6 @@ Discarded input sections .text._link 0x0000000000000000 0x20 src/syscalls.o .text._fork 0x0000000000000000 0x16 src/syscalls.o .text._execve 0x0000000000000000 0x22 src/syscalls.o - .debug_info 0x0000000000000000 0xf1e src/syscalls.o - .debug_abbrev 0x0000000000000000 0x274 src/syscalls.o - .debug_aranges - 0x0000000000000000 0xb0 src/syscalls.o - .debug_ranges 0x0000000000000000 0xa0 src/syscalls.o - .debug_macro 0x0000000000000000 0x243 src/syscalls.o .debug_macro 0x0000000000000000 0xa72 src/syscalls.o .debug_macro 0x0000000000000000 0x22 src/syscalls.o .debug_macro 0x0000000000000000 0x40 src/syscalls.o @@ -6277,11 +6815,8 @@ Discarded input sections .debug_macro 0x0000000000000000 0x43 src/syscalls.o .debug_macro 0x0000000000000000 0x20 src/syscalls.o .debug_macro 0x0000000000000000 0x1a3 src/syscalls.o - .debug_macro 0x0000000000000000 0x10 src/syscalls.o .debug_macro 0x0000000000000000 0x35 src/syscalls.o .debug_macro 0x0000000000000000 0x10 src/syscalls.o - .debug_macro 0x0000000000000000 0x10 src/syscalls.o - .debug_macro 0x0000000000000000 0x10 src/syscalls.o .debug_macro 0x0000000000000000 0x6a src/syscalls.o .debug_macro 0x0000000000000000 0x1c src/syscalls.o .debug_macro 0x0000000000000000 0x52 src/syscalls.o @@ -6291,27 +6826,11 @@ Discarded input sections .debug_macro 0x0000000000000000 0xd7 src/syscalls.o .debug_macro 0x0000000000000000 0x1c src/syscalls.o .debug_macro 0x0000000000000000 0x3d src/syscalls.o - .debug_macro 0x0000000000000000 0x35 src/syscalls.o - .debug_macro 0x0000000000000000 0x122 src/syscalls.o .debug_macro 0x0000000000000000 0x16 src/syscalls.o .debug_macro 0x0000000000000000 0x16 src/syscalls.o .debug_macro 0x0000000000000000 0x29 src/syscalls.o - .debug_macro 0x0000000000000000 0x10 src/syscalls.o - .debug_macro 0x0000000000000000 0x241 src/syscalls.o - .debug_macro 0x0000000000000000 0x1c src/syscalls.o - .debug_macro 0x0000000000000000 0x10 src/syscalls.o - .debug_macro 0x0000000000000000 0x10 src/syscalls.o .debug_macro 0x0000000000000000 0x16 src/syscalls.o .debug_macro 0x0000000000000000 0x145 src/syscalls.o - .debug_macro 0x0000000000000000 0x189 src/syscalls.o - .debug_macro 0x0000000000000000 0x16 src/syscalls.o - .debug_macro 0x0000000000000000 0x88 src/syscalls.o - .debug_line 0x0000000000000000 0x733 src/syscalls.o - .debug_str 0x0000000000000000 0x8919 src/syscalls.o - .comment 0x0000000000000000 0x7c src/syscalls.o - .debug_frame 0x0000000000000000 0x2d0 src/syscalls.o - .ARM.attributes - 0x0000000000000000 0x39 src/syscalls.o .group 0x0000000000000000 0xc src/system_stm32f4xx.o .group 0x0000000000000000 0xc src/system_stm32f4xx.o .group 0x0000000000000000 0xc src/system_stm32f4xx.o @@ -6397,10 +6916,6 @@ Discarded input sections .text 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-errno.o) .data 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-errno.o) .bss 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-errno.o) - .text.__errno 0x0000000000000000 0xc /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-errno.o) - .debug_frame 0x0000000000000000 0x20 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-errno.o) - .ARM.attributes - 0x0000000000000000 0x34 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-errno.o) .text 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-exit.o) .data 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-exit.o) .bss 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-exit.o) @@ -6411,25 +6926,65 @@ Discarded input sections .text 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-impure.o) .data 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-impure.o) .bss 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-impure.o) - .data._impure_ptr - 0x0000000000000000 0x4 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-impure.o) - .data.impure_data - 0x0000000000000000 0x60 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-impure.o) .rodata._global_impure_ptr 0x0000000000000000 0x4 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-impure.o) - .ARM.attributes - 0x0000000000000000 0x34 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-impure.o) .text 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-init.o) .data 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-init.o) .bss 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-init.o) + .text 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memcmp.o) + .data 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memcmp.o) + .bss 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memcmp.o) .text 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memcpy-stub.o) .data 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memcpy-stub.o) .bss 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memcpy-stub.o) .text 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memset.o) .data 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memset.o) .bss 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memset.o) + .text 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-sprintf.o) + .data 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-sprintf.o) + .bss 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-sprintf.o) + .text._sprintf_r + 0x0000000000000000 0x38 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-sprintf.o) .data 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-strlen.o) .bss 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-strlen.o) + .text 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-svfprintf.o) + .data 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-svfprintf.o) + .bss 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-svfprintf.o) + .text.__ssprint_r + 0x0000000000000000 0xf0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-svfprintf.o) + .text 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-vfprintf_i.o) + .data 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-vfprintf_i.o) + .bss 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-vfprintf_i.o) + .data 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memchr.o) + .bss 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memchr.o) + .text 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memmove.o) + .data 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memmove.o) + .bss 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memmove.o) + .text 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-freer.o) + .data 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-freer.o) + .bss 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-freer.o) + .text 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-mallocr.o) + .data 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-mallocr.o) + .bss 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-mallocr.o) + .text 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-reallocr.o) + .data 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-reallocr.o) + .bss 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-reallocr.o) + .text 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-sbrkr.o) + .data 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-sbrkr.o) + .bss 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-sbrkr.o) + .text 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-mlock.o) + .data 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-mlock.o) + .bss 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-mlock.o) + .text 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-msizer.o) + .data 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-msizer.o) + .bss 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-msizer.o) + .text 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-reent.o) + .data 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-reent.o) + .bss 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-reent.o) + .text.cleanup_glue + 0x0000000000000000 0x1a /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-reent.o) + .text._reclaim_reent + 0x0000000000000000 0xb8 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-reent.o) .text 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtend.o .data 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtend.o .bss 0x0000000000000000 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtend.o @@ -6452,15 +7007,20 @@ Linker script and memory map LOAD /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crti.o LOAD /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o LOAD /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/crt0.o -LOAD FreeRTOS/Source/croutine.o -LOAD FreeRTOS/Source/event_groups.o -LOAD FreeRTOS/Source/list.o -LOAD FreeRTOS/Source/queue.o -LOAD FreeRTOS/Source/stream_buffer.o -LOAD FreeRTOS/Source/tasks.o -LOAD FreeRTOS/Source/timers.o -LOAD FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o -LOAD FreeRTOS/Source/portable/MemMang/heap_4.o +LOAD FreeRTOS/org/Source/croutine.o +LOAD FreeRTOS/org/Source/event_groups.o +LOAD FreeRTOS/org/Source/list.o +LOAD FreeRTOS/org/Source/queue.o +LOAD FreeRTOS/org/Source/stream_buffer.o +LOAD FreeRTOS/org/Source/tasks.o +LOAD FreeRTOS/org/Source/timers.o +LOAD FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o +LOAD FreeRTOS/org/Source/portable/MemMang/heap_4.o +LOAD SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o +LOAD SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o +LOAD SEGGER/SEGGER/SEGGER_RTT.o +LOAD SEGGER/SEGGER/SEGGER_RTT_ASM_ARMv7M.o +LOAD SEGGER/SEGGER/SEGGER_SYSVIEW.o LOAD StdPeriph_Driver/src/misc.o LOAD StdPeriph_Driver/src/stm32f4xx_adc.o LOAD StdPeriph_Driver/src/stm32f4xx_can.o @@ -6539,590 +7099,916 @@ LOAD /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools 0x0000000008000000 g_pfnVectors 0x00000000080001c4 . = ALIGN (0x4) -.text 0x00000000080001d0 0x33b4 +.text 0x00000000080001d0 0x69ec 0x00000000080001d0 . = ALIGN (0x4) *(.text) .text 0x00000000080001d0 0x40 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o - .text 0x0000000008000210 0x10 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-strlen.o) - 0x0000000008000210 strlen + .text 0x0000000008000210 0x94 SEGGER/SEGGER/SEGGER_RTT_ASM_ARMv7M.o + 0x0000000008000210 SEGGER_RTT_ASM_WriteSkipNoLock + .text 0x00000000080002a4 0x10 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-strlen.o) + 0x00000000080002a4 strlen + *fill* 0x00000000080002b4 0xc + .text 0x00000000080002c0 0xa0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memchr.o) + 0x00000000080002c0 memchr *(.text*) .text.vListInitialise - 0x0000000008000220 0x40 FreeRTOS/Source/list.o - 0x0000000008000220 vListInitialise + 0x0000000008000360 0x40 FreeRTOS/org/Source/list.o + 0x0000000008000360 vListInitialise .text.vListInitialiseItem - 0x0000000008000260 0x1a FreeRTOS/Source/list.o - 0x0000000008000260 vListInitialiseItem + 0x00000000080003a0 0x1a FreeRTOS/org/Source/list.o + 0x00000000080003a0 vListInitialiseItem .text.vListInsertEnd - 0x000000000800027a 0x48 FreeRTOS/Source/list.o - 0x000000000800027a vListInsertEnd + 0x00000000080003ba 0x48 FreeRTOS/org/Source/list.o + 0x00000000080003ba vListInsertEnd .text.vListInsert - 0x00000000080002c2 0x72 FreeRTOS/Source/list.o - 0x00000000080002c2 vListInsert + 0x0000000008000402 0x72 FreeRTOS/org/Source/list.o + 0x0000000008000402 vListInsert .text.uxListRemove - 0x0000000008000334 0x54 FreeRTOS/Source/list.o - 0x0000000008000334 uxListRemove + 0x0000000008000474 0x54 FreeRTOS/org/Source/list.o + 0x0000000008000474 uxListRemove .text.xQueueGenericReset - 0x0000000008000388 0xd0 FreeRTOS/Source/queue.o - 0x0000000008000388 xQueueGenericReset + 0x00000000080004c8 0xd0 FreeRTOS/org/Source/queue.o + 0x00000000080004c8 xQueueGenericReset .text.xQueueGenericCreate - 0x0000000008000458 0xb8 FreeRTOS/Source/queue.o - 0x0000000008000458 xQueueGenericCreate + 0x0000000008000598 0xb8 FreeRTOS/org/Source/queue.o + 0x0000000008000598 xQueueGenericCreate .text.prvInitialiseNewQueue - 0x0000000008000510 0x46 FreeRTOS/Source/queue.o - *fill* 0x0000000008000556 0x2 + 0x0000000008000650 0x52 FreeRTOS/org/Source/queue.o + *fill* 0x00000000080006a2 0x2 .text.xQueueGenericSend - 0x0000000008000558 0x1f4 FreeRTOS/Source/queue.o - 0x0000000008000558 xQueueGenericSend + 0x00000000080006a4 0x244 FreeRTOS/org/Source/queue.o + 0x00000000080006a4 xQueueGenericSend .text.xQueueGenericSendFromISR - 0x000000000800074c 0x14a FreeRTOS/Source/queue.o - 0x000000000800074c xQueueGenericSendFromISR - *fill* 0x0000000008000896 0x2 + 0x00000000080008e8 0x172 FreeRTOS/org/Source/queue.o + 0x00000000080008e8 xQueueGenericSendFromISR + *fill* 0x0000000008000a5a 0x2 .text.xQueueReceive - 0x0000000008000898 0x1b8 FreeRTOS/Source/queue.o - 0x0000000008000898 xQueueReceive + 0x0000000008000a5c 0x228 FreeRTOS/org/Source/queue.o + 0x0000000008000a5c xQueueReceive .text.prvCopyDataToQueue - 0x0000000008000a50 0xd4 FreeRTOS/Source/queue.o + 0x0000000008000c84 0xd4 FreeRTOS/org/Source/queue.o .text.prvCopyDataFromQueue - 0x0000000008000b24 0x4c FreeRTOS/Source/queue.o + 0x0000000008000d58 0x4c FreeRTOS/org/Source/queue.o .text.prvUnlockQueue - 0x0000000008000b70 0xa4 FreeRTOS/Source/queue.o + 0x0000000008000da4 0xa4 FreeRTOS/org/Source/queue.o .text.prvIsQueueEmpty - 0x0000000008000c14 0x2c FreeRTOS/Source/queue.o + 0x0000000008000e48 0x2c FreeRTOS/org/Source/queue.o .text.prvIsQueueFull - 0x0000000008000c40 0x30 FreeRTOS/Source/queue.o + 0x0000000008000e74 0x30 FreeRTOS/org/Source/queue.o .text.vQueueAddToRegistry - 0x0000000008000c70 0x50 FreeRTOS/Source/queue.o - 0x0000000008000c70 vQueueAddToRegistry + 0x0000000008000ea4 0x60 FreeRTOS/org/Source/queue.o + 0x0000000008000ea4 vQueueAddToRegistry .text.vQueueWaitForMessageRestricted - 0x0000000008000cc0 0x68 FreeRTOS/Source/queue.o - 0x0000000008000cc0 vQueueWaitForMessageRestricted + 0x0000000008000f04 0x68 FreeRTOS/org/Source/queue.o + 0x0000000008000f04 vQueueWaitForMessageRestricted .text.xTaskCreate - 0x0000000008000d28 0x82 FreeRTOS/Source/tasks.o - 0x0000000008000d28 xTaskCreate + 0x0000000008000f6c 0x82 FreeRTOS/org/Source/tasks.o + 0x0000000008000f6c xTaskCreate .text.prvInitialiseNewTask - 0x0000000008000daa 0x12a FreeRTOS/Source/tasks.o + 0x0000000008000fee 0x12a FreeRTOS/org/Source/tasks.o .text.prvAddNewTaskToReadyList - 0x0000000008000ed4 0xdc FreeRTOS/Source/tasks.o - .text.vTaskDelay - 0x0000000008000fb0 0x68 FreeRTOS/Source/tasks.o - 0x0000000008000fb0 vTaskDelay + 0x0000000008001118 0x118 FreeRTOS/org/Source/tasks.o + .text.vTaskDelete + 0x0000000008001230 0x150 FreeRTOS/org/Source/tasks.o + 0x0000000008001230 vTaskDelete .text.vTaskStartScheduler - 0x0000000008001018 0xa0 FreeRTOS/Source/tasks.o - 0x0000000008001018 vTaskStartScheduler + 0x0000000008001380 0xc0 FreeRTOS/org/Source/tasks.o + 0x0000000008001380 vTaskStartScheduler .text.vTaskSuspendAll - 0x00000000080010b8 0x1c FreeRTOS/Source/tasks.o - 0x00000000080010b8 vTaskSuspendAll + 0x0000000008001440 0x1c FreeRTOS/org/Source/tasks.o + 0x0000000008001440 vTaskSuspendAll .text.xTaskResumeAll - 0x00000000080010d4 0x138 FreeRTOS/Source/tasks.o - 0x00000000080010d4 xTaskResumeAll + 0x000000000800145c 0x140 FreeRTOS/org/Source/tasks.o + 0x000000000800145c xTaskResumeAll .text.xTaskGetTickCount - 0x000000000800120c 0x20 FreeRTOS/Source/tasks.o - 0x000000000800120c xTaskGetTickCount + 0x000000000800159c 0x20 FreeRTOS/org/Source/tasks.o + 0x000000000800159c xTaskGetTickCount + .text.xTaskGetTickCountFromISR + 0x00000000080015bc 0x24 FreeRTOS/org/Source/tasks.o + 0x00000000080015bc xTaskGetTickCountFromISR .text.xTaskIncrementTick - 0x000000000800122c 0x170 FreeRTOS/Source/tasks.o - 0x000000000800122c xTaskIncrementTick + 0x00000000080015e0 0x178 FreeRTOS/org/Source/tasks.o + 0x00000000080015e0 xTaskIncrementTick .text.vTaskSwitchContext - 0x000000000800139c 0xb4 FreeRTOS/Source/tasks.o - 0x000000000800139c vTaskSwitchContext + 0x0000000008001758 0xd0 FreeRTOS/org/Source/tasks.o + 0x0000000008001758 vTaskSwitchContext .text.vTaskPlaceOnEventList - 0x0000000008001450 0x48 FreeRTOS/Source/tasks.o - 0x0000000008001450 vTaskPlaceOnEventList + 0x0000000008001828 0x48 FreeRTOS/org/Source/tasks.o + 0x0000000008001828 vTaskPlaceOnEventList .text.vTaskPlaceOnEventListRestricted - 0x0000000008001498 0x54 FreeRTOS/Source/tasks.o - 0x0000000008001498 vTaskPlaceOnEventListRestricted + 0x0000000008001870 0x5c FreeRTOS/org/Source/tasks.o + 0x0000000008001870 vTaskPlaceOnEventListRestricted .text.xTaskRemoveFromEventList - 0x00000000080014ec 0xc4 FreeRTOS/Source/tasks.o - 0x00000000080014ec xTaskRemoveFromEventList + 0x00000000080018cc 0xcc FreeRTOS/org/Source/tasks.o + 0x00000000080018cc xTaskRemoveFromEventList .text.vTaskInternalSetTimeOutState - 0x00000000080015b0 0x2c FreeRTOS/Source/tasks.o - 0x00000000080015b0 vTaskInternalSetTimeOutState + 0x0000000008001998 0x2c FreeRTOS/org/Source/tasks.o + 0x0000000008001998 vTaskInternalSetTimeOutState .text.xTaskCheckForTimeOut - 0x00000000080015dc 0xc8 FreeRTOS/Source/tasks.o - 0x00000000080015dc xTaskCheckForTimeOut + 0x00000000080019c4 0xc8 FreeRTOS/org/Source/tasks.o + 0x00000000080019c4 xTaskCheckForTimeOut .text.vTaskMissedYield - 0x00000000080016a4 0x18 FreeRTOS/Source/tasks.o - 0x00000000080016a4 vTaskMissedYield + 0x0000000008001a8c 0x18 FreeRTOS/org/Source/tasks.o + 0x0000000008001a8c vTaskMissedYield .text.prvIdleTask - 0x00000000080016bc 0x30 FreeRTOS/Source/tasks.o + 0x0000000008001aa4 0x34 FreeRTOS/org/Source/tasks.o .text.prvInitialiseTaskLists - 0x00000000080016ec 0x80 FreeRTOS/Source/tasks.o + 0x0000000008001ad8 0x80 FreeRTOS/org/Source/tasks.o .text.prvCheckTasksWaitingTermination - 0x000000000800176c 0x58 FreeRTOS/Source/tasks.o + 0x0000000008001b58 0x58 FreeRTOS/org/Source/tasks.o .text.prvDeleteTCB - 0x00000000080017c4 0x20 FreeRTOS/Source/tasks.o + 0x0000000008001bb0 0x20 FreeRTOS/org/Source/tasks.o .text.prvResetNextTaskUnblockTime - 0x00000000080017e4 0x38 FreeRTOS/Source/tasks.o + 0x0000000008001bd0 0x38 FreeRTOS/org/Source/tasks.o .text.xTaskGetSchedulerState - 0x000000000800181c 0x3c FreeRTOS/Source/tasks.o - 0x000000000800181c xTaskGetSchedulerState + 0x0000000008001c08 0x3c FreeRTOS/org/Source/tasks.o + 0x0000000008001c08 xTaskGetSchedulerState .text.xTaskPriorityDisinherit - 0x0000000008001858 0xf0 FreeRTOS/Source/tasks.o - 0x0000000008001858 xTaskPriorityDisinherit + 0x0000000008001c44 0xfc FreeRTOS/org/Source/tasks.o + 0x0000000008001c44 xTaskPriorityDisinherit + .text.xTaskGenericNotifyWait + 0x0000000008001d40 0x110 FreeRTOS/org/Source/tasks.o + 0x0000000008001d40 xTaskGenericNotifyWait + .text.xTaskGenericNotify + 0x0000000008001e50 0x1dc FreeRTOS/org/Source/tasks.o + 0x0000000008001e50 xTaskGenericNotify + .text.xTaskGenericNotifyFromISR + 0x000000000800202c 0x220 FreeRTOS/org/Source/tasks.o + 0x000000000800202c xTaskGenericNotifyFromISR .text.prvAddCurrentTaskToDelayedList - 0x0000000008001948 0xcc FreeRTOS/Source/tasks.o + 0x000000000800224c 0xf0 FreeRTOS/org/Source/tasks.o .text.xTimerCreateTimerTask - 0x0000000008001a14 0x64 FreeRTOS/Source/timers.o - 0x0000000008001a14 xTimerCreateTimerTask + 0x000000000800233c 0x64 FreeRTOS/org/Source/timers.o + 0x000000000800233c xTimerCreateTimerTask + .text.xTimerCreate + 0x00000000080023a0 0x42 FreeRTOS/org/Source/timers.o + 0x00000000080023a0 xTimerCreate + .text.prvInitialiseNewTimer + 0x00000000080023e2 0x74 FreeRTOS/org/Source/timers.o + *fill* 0x0000000008002456 0x2 .text.xTimerGenericCommand - 0x0000000008001a78 0x98 FreeRTOS/Source/timers.o - 0x0000000008001a78 xTimerGenericCommand + 0x0000000008002458 0x98 FreeRTOS/org/Source/timers.o + 0x0000000008002458 xTimerGenericCommand .text.prvProcessExpiredTimer - 0x0000000008001b10 0x98 FreeRTOS/Source/timers.o + 0x00000000080024f0 0x98 FreeRTOS/org/Source/timers.o .text.prvTimerTask - 0x0000000008001ba8 0x24 FreeRTOS/Source/timers.o + 0x0000000008002588 0x24 FreeRTOS/org/Source/timers.o .text.prvProcessTimerOrBlockTask - 0x0000000008001bcc 0x9c FreeRTOS/Source/timers.o + 0x00000000080025ac 0x9c FreeRTOS/org/Source/timers.o .text.prvGetNextExpireTime - 0x0000000008001c68 0x48 FreeRTOS/Source/timers.o + 0x0000000008002648 0x48 FreeRTOS/org/Source/timers.o .text.prvSampleTimeNow - 0x0000000008001cb0 0x40 FreeRTOS/Source/timers.o + 0x0000000008002690 0x40 FreeRTOS/org/Source/timers.o .text.prvInsertTimerInActiveList - 0x0000000008001cf0 0x84 FreeRTOS/Source/timers.o + 0x00000000080026d0 0x84 FreeRTOS/org/Source/timers.o .text.prvProcessReceivedCommands - 0x0000000008001d74 0x188 FreeRTOS/Source/timers.o + 0x0000000008002754 0x188 FreeRTOS/org/Source/timers.o .text.prvSwitchTimerLists - 0x0000000008001efc 0xc8 FreeRTOS/Source/timers.o + 0x00000000080028dc 0xc8 FreeRTOS/org/Source/timers.o .text.prvCheckForValidListAndQueue - 0x0000000008001fc4 0x6c FreeRTOS/Source/timers.o + 0x00000000080029a4 0x6c FreeRTOS/org/Source/timers.o .text.pxPortInitialiseStack - 0x0000000008002030 0x68 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - 0x0000000008002030 pxPortInitialiseStack + 0x0000000008002a10 0x68 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + 0x0000000008002a10 pxPortInitialiseStack .text.prvTaskExitError - 0x0000000008002098 0x54 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - *fill* 0x00000000080020ec 0x4 + 0x0000000008002a78 0x54 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + *fill* 0x0000000008002acc 0x4 .text.SVC_Handler - 0x00000000080020f0 0x28 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - 0x00000000080020f0 SVC_Handler + 0x0000000008002ad0 0x28 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + 0x0000000008002ad0 SVC_Handler .text.prvPortStartFirstTask - 0x0000000008002118 0x2c FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o + 0x0000000008002af8 0x2c FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o .text.xPortStartScheduler - 0x0000000008002144 0x13c FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - 0x0000000008002144 xPortStartScheduler + 0x0000000008002b24 0x13c FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + 0x0000000008002b24 xPortStartScheduler .text.vPortEnterCritical - 0x0000000008002280 0x5c FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - 0x0000000008002280 vPortEnterCritical + 0x0000000008002c60 0x5c FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + 0x0000000008002c60 vPortEnterCritical .text.vPortExitCritical - 0x00000000080022dc 0x50 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - 0x00000000080022dc vPortExitCritical - *fill* 0x000000000800232c 0x4 + 0x0000000008002cbc 0x50 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + 0x0000000008002cbc vPortExitCritical + *fill* 0x0000000008002d0c 0x4 .text.PendSV_Handler - 0x0000000008002330 0x68 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - 0x0000000008002330 PendSV_Handler + 0x0000000008002d10 0x68 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + 0x0000000008002d10 PendSV_Handler .text.SysTick_Handler - 0x0000000008002398 0x40 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - 0x0000000008002398 SysTick_Handler + 0x0000000008002d78 0x50 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + 0x0000000008002d78 SysTick_Handler .text.vPortSetupTimerInterrupt - 0x00000000080023d8 0x48 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - 0x00000000080023d8 vPortSetupTimerInterrupt + 0x0000000008002dc8 0x48 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + 0x0000000008002dc8 vPortSetupTimerInterrupt .text.vPortEnableVFP - 0x0000000008002420 0x18 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o + 0x0000000008002e10 0x18 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o .text.vPortValidateInterruptPriority - 0x0000000008002438 0x7c FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - 0x0000000008002438 vPortValidateInterruptPriority + 0x0000000008002e28 0x7c FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + 0x0000000008002e28 vPortValidateInterruptPriority .text.pvPortMalloc - 0x00000000080024b4 0x1b8 FreeRTOS/Source/portable/MemMang/heap_4.o - 0x00000000080024b4 pvPortMalloc + 0x0000000008002ea4 0x1b8 FreeRTOS/org/Source/portable/MemMang/heap_4.o + 0x0000000008002ea4 pvPortMalloc .text.vPortFree - 0x000000000800266c 0xc0 FreeRTOS/Source/portable/MemMang/heap_4.o - 0x000000000800266c vPortFree + 0x000000000800305c 0xc0 FreeRTOS/org/Source/portable/MemMang/heap_4.o + 0x000000000800305c vPortFree .text.prvHeapInit - 0x000000000800272c 0xc4 FreeRTOS/Source/portable/MemMang/heap_4.o + 0x000000000800311c 0xc4 FreeRTOS/org/Source/portable/MemMang/heap_4.o .text.prvInsertBlockIntoFreeList - 0x00000000080027f0 0xb4 FreeRTOS/Source/portable/MemMang/heap_4.o + 0x00000000080031e0 0xb4 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .text._cbSendSystemDesc + 0x0000000008003294 0x1c SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .text.SEGGER_SYSVIEW_Conf + 0x00000000080032b0 0x2c SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + 0x00000000080032b0 SEGGER_SYSVIEW_Conf + .text._cbSendTaskList + 0x00000000080032dc 0x90 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .text._cbGetTime + 0x000000000800336c 0x76 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + *fill* 0x00000000080033e2 0x2 + .text.SYSVIEW_AddTask + 0x00000000080033e4 0xd0 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + 0x00000000080033e4 SYSVIEW_AddTask + .text.SYSVIEW_DeleteTask + 0x00000000080034b4 0x178 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + 0x00000000080034b4 SYSVIEW_DeleteTask + .text.SYSVIEW_SendTaskInfo + 0x000000000800362c 0x42 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + 0x000000000800362c SYSVIEW_SendTaskInfo + *fill* 0x000000000800366e 0x2 + .text._DoInit 0x0000000008003670 0xb0 SEGGER/SEGGER/SEGGER_RTT.o + .text.SEGGER_RTT_ReadNoLock + 0x0000000008003720 0x10c SEGGER/SEGGER/SEGGER_RTT.o + 0x0000000008003720 SEGGER_RTT_ReadNoLock + .text.SEGGER_RTT_AllocUpBuffer + 0x000000000800382c 0x108 SEGGER/SEGGER/SEGGER_RTT.o + 0x000000000800382c SEGGER_RTT_AllocUpBuffer + .text.SEGGER_RTT_ConfigDownBuffer + 0x0000000008003934 0xe0 SEGGER/SEGGER/SEGGER_RTT.o + 0x0000000008003934 SEGGER_RTT_ConfigDownBuffer + .text._EncodeStr + 0x0000000008003a14 0x9a SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text._PreparePacket + 0x0000000008003aae 0x18 SEGGER/SEGGER/SEGGER_SYSVIEW.o + *fill* 0x0000000008003ac6 0x2 + .text._HandleIncomingPacket + 0x0000000008003ac8 0xd8 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text._TrySendOverflowPacket + 0x0000000008003ba0 0xe4 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text._SendPacket + 0x0000000008003c84 0x1cc SEGGER/SEGGER/SEGGER_SYSVIEW.o + .text.SEGGER_SYSVIEW_Init + 0x0000000008003e50 0x88 SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x0000000008003e50 SEGGER_SYSVIEW_Init + .text.SEGGER_SYSVIEW_SetRAMBase + 0x0000000008003ed8 0x20 SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x0000000008003ed8 SEGGER_SYSVIEW_SetRAMBase + .text.SEGGER_SYSVIEW_RecordVoid + 0x0000000008003ef8 0x3c SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x0000000008003ef8 SEGGER_SYSVIEW_RecordVoid + .text.SEGGER_SYSVIEW_RecordU32 + 0x0000000008003f34 0x78 SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x0000000008003f34 SEGGER_SYSVIEW_RecordU32 + .text.SEGGER_SYSVIEW_RecordU32x2 + 0x0000000008003fac 0xb4 SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x0000000008003fac SEGGER_SYSVIEW_RecordU32x2 + .text.SEGGER_SYSVIEW_RecordU32x3 + 0x0000000008004060 0xec SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x0000000008004060 SEGGER_SYSVIEW_RecordU32x3 + .text.SEGGER_SYSVIEW_RecordU32x4 + 0x000000000800414c 0x124 SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x000000000800414c SEGGER_SYSVIEW_RecordU32x4 + .text.SEGGER_SYSVIEW_RecordU32x5 + 0x0000000008004270 0x15c SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x0000000008004270 SEGGER_SYSVIEW_RecordU32x5 + .text.SEGGER_SYSVIEW_Start + 0x00000000080043cc 0x174 SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x00000000080043cc SEGGER_SYSVIEW_Start + .text.SEGGER_SYSVIEW_Stop + 0x0000000008004540 0x4c SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x0000000008004540 SEGGER_SYSVIEW_Stop + .text.SEGGER_SYSVIEW_GetSysDesc + 0x000000000800458c 0x134 SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x000000000800458c SEGGER_SYSVIEW_GetSysDesc + .text.SEGGER_SYSVIEW_SendTaskInfo + 0x00000000080046c0 0x1c8 SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x00000000080046c0 SEGGER_SYSVIEW_SendTaskInfo + .text.SEGGER_SYSVIEW_SendTaskList + 0x0000000008004888 0x28 SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x0000000008004888 SEGGER_SYSVIEW_SendTaskList + .text.SEGGER_SYSVIEW_SendSysDesc + 0x00000000080048b0 0x48 SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x00000000080048b0 SEGGER_SYSVIEW_SendSysDesc + .text.SEGGER_SYSVIEW_RecordSystime + 0x00000000080048f8 0x60 SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x00000000080048f8 SEGGER_SYSVIEW_RecordSystime + .text.SEGGER_SYSVIEW_RecordEnterISR + 0x0000000008004958 0x84 SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x0000000008004958 SEGGER_SYSVIEW_RecordEnterISR + .text.SEGGER_SYSVIEW_RecordExitISR + 0x00000000080049dc 0x38 SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x00000000080049dc SEGGER_SYSVIEW_RecordExitISR + .text.SEGGER_SYSVIEW_RecordExitISRToScheduler + 0x0000000008004a14 0x38 SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x0000000008004a14 SEGGER_SYSVIEW_RecordExitISRToScheduler + .text.SEGGER_SYSVIEW_OnIdle + 0x0000000008004a4c 0x38 SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x0000000008004a4c SEGGER_SYSVIEW_OnIdle + .text.SEGGER_SYSVIEW_OnTaskCreate + 0x0000000008004a84 0x84 SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x0000000008004a84 SEGGER_SYSVIEW_OnTaskCreate + .text.SEGGER_SYSVIEW_OnTaskStartExec + 0x0000000008004b08 0x84 SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x0000000008004b08 SEGGER_SYSVIEW_OnTaskStartExec + .text.SEGGER_SYSVIEW_OnTaskStartReady + 0x0000000008004b8c 0x84 SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x0000000008004b8c SEGGER_SYSVIEW_OnTaskStartReady + .text.SEGGER_SYSVIEW_OnTaskStopReady + 0x0000000008004c10 0xc0 SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x0000000008004c10 SEGGER_SYSVIEW_OnTaskStopReady + .text.SEGGER_SYSVIEW_ShrinkId + 0x0000000008004cd0 0x20 SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x0000000008004cd0 SEGGER_SYSVIEW_ShrinkId + .text.SEGGER_SYSVIEW_SendModule + 0x0000000008004cf0 0x100 SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x0000000008004cf0 SEGGER_SYSVIEW_SendModule + .text.SEGGER_SYSVIEW_SendModuleDescription + 0x0000000008004df0 0x3c SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x0000000008004df0 SEGGER_SYSVIEW_SendModuleDescription + .text.SEGGER_SYSVIEW_SendNumModules + 0x0000000008004e2c 0x7c SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x0000000008004e2c SEGGER_SYSVIEW_SendNumModules + .text.SEGGER_SYSVIEW_Warn + 0x0000000008004ea8 0xb8 SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x0000000008004ea8 SEGGER_SYSVIEW_Warn .text.GPIO_Init - 0x00000000080028a4 0x11c StdPeriph_Driver/src/stm32f4xx_gpio.o - 0x00000000080028a4 GPIO_Init + 0x0000000008004f60 0x11c StdPeriph_Driver/src/stm32f4xx_gpio.o + 0x0000000008004f60 GPIO_Init + .text.GPIO_ReadOutputDataBit + 0x000000000800507c 0x34 StdPeriph_Driver/src/stm32f4xx_gpio.o + 0x000000000800507c GPIO_ReadOutputDataBit + .text.GPIO_SetBits + 0x00000000080050b0 0x1e StdPeriph_Driver/src/stm32f4xx_gpio.o + 0x00000000080050b0 GPIO_SetBits + .text.GPIO_ResetBits + 0x00000000080050ce 0x1e StdPeriph_Driver/src/stm32f4xx_gpio.o + 0x00000000080050ce GPIO_ResetBits .text.GPIO_ToggleBits - 0x00000000080029c0 0x24 StdPeriph_Driver/src/stm32f4xx_gpio.o - 0x00000000080029c0 GPIO_ToggleBits + 0x00000000080050ec 0x24 StdPeriph_Driver/src/stm32f4xx_gpio.o + 0x00000000080050ec GPIO_ToggleBits .text.GPIO_PinAFConfig - 0x00000000080029e4 0x92 StdPeriph_Driver/src/stm32f4xx_gpio.o - 0x00000000080029e4 GPIO_PinAFConfig - *fill* 0x0000000008002a76 0x2 + 0x0000000008005110 0x92 StdPeriph_Driver/src/stm32f4xx_gpio.o + 0x0000000008005110 GPIO_PinAFConfig + *fill* 0x00000000080051a2 0x2 .text.RCC_DeInit - 0x0000000008002a78 0x70 StdPeriph_Driver/src/stm32f4xx_rcc.o - 0x0000000008002a78 RCC_DeInit + 0x00000000080051a4 0x70 StdPeriph_Driver/src/stm32f4xx_rcc.o + 0x00000000080051a4 RCC_DeInit .text.RCC_SYSCLKConfig - 0x0000000008002ae8 0x38 StdPeriph_Driver/src/stm32f4xx_rcc.o - 0x0000000008002ae8 RCC_SYSCLKConfig + 0x0000000008005214 0x38 StdPeriph_Driver/src/stm32f4xx_rcc.o + 0x0000000008005214 RCC_SYSCLKConfig .text.RCC_GetClocksFreq - 0x0000000008002b20 0x150 StdPeriph_Driver/src/stm32f4xx_rcc.o - 0x0000000008002b20 RCC_GetClocksFreq + 0x000000000800524c 0x150 StdPeriph_Driver/src/stm32f4xx_rcc.o + 0x000000000800524c RCC_GetClocksFreq .text.RCC_AHB1PeriphClockCmd - 0x0000000008002c70 0x40 StdPeriph_Driver/src/stm32f4xx_rcc.o - 0x0000000008002c70 RCC_AHB1PeriphClockCmd + 0x000000000800539c 0x40 StdPeriph_Driver/src/stm32f4xx_rcc.o + 0x000000000800539c RCC_AHB1PeriphClockCmd .text.RCC_APB1PeriphClockCmd - 0x0000000008002cb0 0x40 StdPeriph_Driver/src/stm32f4xx_rcc.o - 0x0000000008002cb0 RCC_APB1PeriphClockCmd + 0x00000000080053dc 0x40 StdPeriph_Driver/src/stm32f4xx_rcc.o + 0x00000000080053dc RCC_APB1PeriphClockCmd + .text.RTC_GetTime + 0x000000000800541c 0xa4 StdPeriph_Driver/src/stm32f4xx_rtc.o + 0x000000000800541c RTC_GetTime + .text.RTC_GetDate + 0x00000000080054c0 0x9c StdPeriph_Driver/src/stm32f4xx_rtc.o + 0x00000000080054c0 RTC_GetDate + .text.RTC_Bcd2ToByte + 0x000000000800555c 0x38 StdPeriph_Driver/src/stm32f4xx_rtc.o .text.USART_Init - 0x0000000008002cf0 0x174 StdPeriph_Driver/src/stm32f4xx_usart.o - 0x0000000008002cf0 USART_Init + 0x0000000008005594 0x174 StdPeriph_Driver/src/stm32f4xx_usart.o + 0x0000000008005594 USART_Init .text.USART_Cmd - 0x0000000008002e64 0x40 StdPeriph_Driver/src/stm32f4xx_usart.o - 0x0000000008002e64 USART_Cmd + 0x0000000008005708 0x40 StdPeriph_Driver/src/stm32f4xx_usart.o + 0x0000000008005708 USART_Cmd .text.USART_SendData - 0x0000000008002ea4 0x24 StdPeriph_Driver/src/stm32f4xx_usart.o - 0x0000000008002ea4 USART_SendData + 0x0000000008005748 0x24 StdPeriph_Driver/src/stm32f4xx_usart.o + 0x0000000008005748 USART_SendData + .text.USART_ReceiveData + 0x000000000800576c 0x20 StdPeriph_Driver/src/stm32f4xx_usart.o + 0x000000000800576c USART_ReceiveData + .text.USART_ITConfig + 0x000000000800578c 0x90 StdPeriph_Driver/src/stm32f4xx_usart.o + 0x000000000800578c USART_ITConfig .text.USART_GetFlagStatus - 0x0000000008002ec8 0x38 StdPeriph_Driver/src/stm32f4xx_usart.o - 0x0000000008002ec8 USART_GetFlagStatus - .text.main 0x0000000008002f00 0xa4 src/main.o - 0x0000000008002f00 main - .text.vTask1_Handler - 0x0000000008002fa4 0x50 src/main.o - 0x0000000008002fa4 vTask1_Handler - .text.vTask2_Handler - 0x0000000008002ff4 0x50 src/main.o - 0x0000000008002ff4 vTask2_Handler - .text.vTask3_Handler - 0x0000000008003044 0x50 src/main.o - 0x0000000008003044 vTask3_Handler - .text.vTask4_Handler - 0x0000000008003094 0x50 src/main.o - 0x0000000008003094 vTask4_Handler + 0x000000000800581c 0x38 StdPeriph_Driver/src/stm32f4xx_usart.o + 0x000000000800581c USART_GetFlagStatus + .text.NVIC_EnableIRQ + 0x0000000008005854 0x34 src/main.o + .text.NVIC_DisableIRQ + 0x0000000008005888 0x34 src/main.o + .text.NVIC_SetPriority + 0x00000000080058bc 0x54 src/main.o + .text.main 0x0000000008005910 0x100 src/main.o + 0x0000000008005910 main + .text.menu_display_task + 0x0000000008005a10 0x3c src/main.o + 0x0000000008005a10 menu_display_task + .text.cmd_handling_task + 0x0000000008005a4c 0x68 src/main.o + 0x0000000008005a4c cmd_handling_task + .text.cmd_processing_task + 0x0000000008005ab4 0xb4 src/main.o + 0x0000000008005ab4 cmd_processing_task + .text.uart_write_task + 0x0000000008005b68 0x2c src/main.o + 0x0000000008005b68 uart_write_task .text.Init_GPIO_LED - 0x00000000080030e4 0x68 src/main.o - 0x00000000080030e4 Init_GPIO_LED + 0x0000000008005b94 0x68 src/main.o + 0x0000000008005b94 Init_GPIO_LED .text.Init_UART - 0x000000000800314c 0xb0 src/main.o - 0x000000000800314c Init_UART + 0x0000000008005bfc 0xc8 src/main.o + 0x0000000008005bfc Init_UART .text.printmsg - 0x00000000080031fc 0x50 src/main.o - 0x00000000080031fc printmsg + 0x0000000008005cc4 0x50 src/main.o + 0x0000000008005cc4 printmsg + .text.UART4_IRQHandler + 0x0000000008005d14 0xb4 src/main.o + 0x0000000008005d14 UART4_IRQHandler + .text.getCommandCode + 0x0000000008005dc8 0x1c src/main.o + 0x0000000008005dc8 getCommandCode + .text.getArguments + 0x0000000008005de4 0x14 src/main.o + 0x0000000008005de4 getArguments + .text.make_led_on + 0x0000000008005df8 0x18 src/main.o + 0x0000000008005df8 make_led_on + .text.make_led_off + 0x0000000008005e10 0x18 src/main.o + 0x0000000008005e10 make_led_off + .text.led_toggle + 0x0000000008005e28 0x20 src/main.o + 0x0000000008005e28 led_toggle + .text.make_led_toggle_start + 0x0000000008005e48 0x54 src/main.o + 0x0000000008005e48 make_led_toggle_start + .text.make_led_toggle_stop + 0x0000000008005e9c 0x2c src/main.o + 0x0000000008005e9c make_led_toggle_stop + .text.make_led_status_read + 0x0000000008005ec8 0x44 src/main.o + 0x0000000008005ec8 make_led_status_read + .text.make_rtc_datetime_read + 0x0000000008005f0c 0x64 src/main.o + 0x0000000008005f0c make_rtc_datetime_read + .text.make_exit_app + 0x0000000008005f70 0x48 src/main.o + 0x0000000008005f70 make_exit_app + .text.print_errormsg + 0x0000000008005fb8 0x44 src/main.o + 0x0000000008005fb8 print_errormsg + .text.vApplicationIdleHook + 0x0000000008005ffc 0x10 src/main.o + 0x0000000008005ffc vApplicationIdleHook + .text._sbrk 0x000000000800600c 0x58 src/syscalls.o + 0x000000000800600c _sbrk .text.SystemInit - 0x000000000800324c 0x6c src/system_stm32f4xx.o - 0x000000000800324c SystemInit + 0x0000000008006064 0x6c src/system_stm32f4xx.o + 0x0000000008006064 SystemInit .text.SystemCoreClockUpdate - 0x00000000080032b8 0xf8 src/system_stm32f4xx.o - 0x00000000080032b8 SystemCoreClockUpdate + 0x00000000080060d0 0xf8 src/system_stm32f4xx.o + 0x00000000080060d0 SystemCoreClockUpdate .text.SetSysClock - 0x00000000080033b0 0xf8 src/system_stm32f4xx.o + 0x00000000080061c8 0xf8 src/system_stm32f4xx.o .text.Reset_Handler - 0x00000000080034a8 0x50 startup/startup_stm32.o - 0x00000000080034a8 Reset_Handler + 0x00000000080062c0 0x50 startup/startup_stm32.o + 0x00000000080062c0 Reset_Handler .text.Default_Handler - 0x00000000080034f8 0x2 startup/startup_stm32.o - 0x00000000080034f8 RTC_Alarm_IRQHandler - 0x00000000080034f8 EXTI2_IRQHandler - 0x00000000080034f8 TIM8_CC_IRQHandler - 0x00000000080034f8 SPDIF_Rx_IRQHandler - 0x00000000080034f8 DebugMon_Handler - 0x00000000080034f8 SPI4_IRQHandler - 0x00000000080034f8 TIM1_CC_IRQHandler - 0x00000000080034f8 QuadSPI_IRQHandler - 0x00000000080034f8 DMA2_Stream5_IRQHandler - 0x00000000080034f8 HardFault_Handler - 0x00000000080034f8 DMA1_Stream5_IRQHandler - 0x00000000080034f8 PVD_IRQHandler - 0x00000000080034f8 SDIO_IRQHandler - 0x00000000080034f8 TAMP_STAMP_IRQHandler - 0x00000000080034f8 NMI_Handler - 0x00000000080034f8 CAN2_RX1_IRQHandler - 0x00000000080034f8 EXTI3_IRQHandler - 0x00000000080034f8 TIM8_TRG_COM_TIM14_IRQHandler - 0x00000000080034f8 TIM1_UP_TIM10_IRQHandler - 0x00000000080034f8 FMPI2C1_error_IRQHandler - 0x00000000080034f8 TIM8_UP_TIM13_IRQHandler - 0x00000000080034f8 I2C3_ER_IRQHandler - 0x00000000080034f8 EXTI0_IRQHandler - 0x00000000080034f8 I2C2_EV_IRQHandler - 0x00000000080034f8 DMA1_Stream2_IRQHandler - 0x00000000080034f8 CAN1_RX0_IRQHandler - 0x00000000080034f8 FPU_IRQHandler - 0x00000000080034f8 OTG_HS_WKUP_IRQHandler - 0x00000000080034f8 UsageFault_Handler - 0x00000000080034f8 CAN2_SCE_IRQHandler - 0x00000000080034f8 DMA2_Stream2_IRQHandler - 0x00000000080034f8 SPI1_IRQHandler - 0x00000000080034f8 TIM6_DAC_IRQHandler - 0x00000000080034f8 TIM1_BRK_TIM9_IRQHandler - 0x00000000080034f8 DCMI_IRQHandler - 0x00000000080034f8 CAN2_RX0_IRQHandler - 0x00000000080034f8 DMA2_Stream3_IRQHandler - 0x00000000080034f8 FMPI2C1_IRQHandler - 0x00000000080034f8 SAI2_IRQHandler - 0x00000000080034f8 USART6_IRQHandler - 0x00000000080034f8 USART3_IRQHandler - 0x00000000080034f8 CAN1_RX1_IRQHandler - 0x00000000080034f8 UART5_IRQHandler - 0x00000000080034f8 DMA2_Stream0_IRQHandler - 0x00000000080034f8 TIM4_IRQHandler - 0x00000000080034f8 I2C1_EV_IRQHandler - 0x00000000080034f8 HDMI_CEC_IRQHandler - 0x00000000080034f8 DMA1_Stream6_IRQHandler - 0x00000000080034f8 DMA1_Stream1_IRQHandler - 0x00000000080034f8 UART4_IRQHandler - 0x00000000080034f8 TIM3_IRQHandler - 0x00000000080034f8 RCC_IRQHandler - 0x00000000080034f8 TIM8_BRK_TIM12_IRQHandler - 0x00000000080034f8 Default_Handler - 0x00000000080034f8 EXTI15_10_IRQHandler - 0x00000000080034f8 ADC_IRQHandler - 0x00000000080034f8 DMA1_Stream7_IRQHandler - 0x00000000080034f8 TIM7_IRQHandler - 0x00000000080034f8 CAN2_TX_IRQHandler - 0x00000000080034f8 TIM5_IRQHandler - 0x00000000080034f8 DMA2_Stream7_IRQHandler - 0x00000000080034f8 I2C3_EV_IRQHandler - 0x00000000080034f8 EXTI9_5_IRQHandler - 0x00000000080034f8 RTC_WKUP_IRQHandler - 0x00000000080034f8 SPI2_IRQHandler - 0x00000000080034f8 OTG_HS_EP1_IN_IRQHandler - 0x00000000080034f8 MemManage_Handler - 0x00000000080034f8 DMA1_Stream0_IRQHandler - 0x00000000080034f8 CAN1_TX_IRQHandler - 0x00000000080034f8 EXTI4_IRQHandler - 0x00000000080034f8 OTG_HS_EP1_OUT_IRQHandler - 0x00000000080034f8 WWDG_IRQHandler - 0x00000000080034f8 TIM2_IRQHandler - 0x00000000080034f8 OTG_FS_WKUP_IRQHandler - 0x00000000080034f8 TIM1_TRG_COM_TIM11_IRQHandler - 0x00000000080034f8 OTG_HS_IRQHandler - 0x00000000080034f8 EXTI1_IRQHandler - 0x00000000080034f8 USART2_IRQHandler - 0x00000000080034f8 I2C2_ER_IRQHandler - 0x00000000080034f8 DMA2_Stream1_IRQHandler - 0x00000000080034f8 CAN1_SCE_IRQHandler - 0x00000000080034f8 FLASH_IRQHandler - 0x00000000080034f8 DMA2_Stream4_IRQHandler - 0x00000000080034f8 BusFault_Handler - 0x00000000080034f8 USART1_IRQHandler - 0x00000000080034f8 OTG_FS_IRQHandler - 0x00000000080034f8 SPI3_IRQHandler - 0x00000000080034f8 DMA1_Stream4_IRQHandler - 0x00000000080034f8 I2C1_ER_IRQHandler - 0x00000000080034f8 FMC_IRQHandler - 0x00000000080034f8 DMA2_Stream6_IRQHandler - 0x00000000080034f8 SAI1_IRQHandler - 0x00000000080034f8 DMA1_Stream3_IRQHandler - *fill* 0x00000000080034fa 0x2 + 0x0000000008006310 0x2 startup/startup_stm32.o + 0x0000000008006310 RTC_Alarm_IRQHandler + 0x0000000008006310 EXTI2_IRQHandler + 0x0000000008006310 TIM8_CC_IRQHandler + 0x0000000008006310 SPDIF_Rx_IRQHandler + 0x0000000008006310 DebugMon_Handler + 0x0000000008006310 SPI4_IRQHandler + 0x0000000008006310 TIM1_CC_IRQHandler + 0x0000000008006310 QuadSPI_IRQHandler + 0x0000000008006310 DMA2_Stream5_IRQHandler + 0x0000000008006310 HardFault_Handler + 0x0000000008006310 DMA1_Stream5_IRQHandler + 0x0000000008006310 PVD_IRQHandler + 0x0000000008006310 SDIO_IRQHandler + 0x0000000008006310 TAMP_STAMP_IRQHandler + 0x0000000008006310 NMI_Handler + 0x0000000008006310 CAN2_RX1_IRQHandler + 0x0000000008006310 EXTI3_IRQHandler + 0x0000000008006310 TIM8_TRG_COM_TIM14_IRQHandler + 0x0000000008006310 TIM1_UP_TIM10_IRQHandler + 0x0000000008006310 FMPI2C1_error_IRQHandler + 0x0000000008006310 TIM8_UP_TIM13_IRQHandler + 0x0000000008006310 I2C3_ER_IRQHandler + 0x0000000008006310 EXTI0_IRQHandler + 0x0000000008006310 I2C2_EV_IRQHandler + 0x0000000008006310 DMA1_Stream2_IRQHandler + 0x0000000008006310 CAN1_RX0_IRQHandler + 0x0000000008006310 FPU_IRQHandler + 0x0000000008006310 OTG_HS_WKUP_IRQHandler + 0x0000000008006310 UsageFault_Handler + 0x0000000008006310 CAN2_SCE_IRQHandler + 0x0000000008006310 DMA2_Stream2_IRQHandler + 0x0000000008006310 SPI1_IRQHandler + 0x0000000008006310 TIM6_DAC_IRQHandler + 0x0000000008006310 TIM1_BRK_TIM9_IRQHandler + 0x0000000008006310 DCMI_IRQHandler + 0x0000000008006310 CAN2_RX0_IRQHandler + 0x0000000008006310 DMA2_Stream3_IRQHandler + 0x0000000008006310 FMPI2C1_IRQHandler + 0x0000000008006310 SAI2_IRQHandler + 0x0000000008006310 USART6_IRQHandler + 0x0000000008006310 USART3_IRQHandler + 0x0000000008006310 CAN1_RX1_IRQHandler + 0x0000000008006310 UART5_IRQHandler + 0x0000000008006310 DMA2_Stream0_IRQHandler + 0x0000000008006310 TIM4_IRQHandler + 0x0000000008006310 I2C1_EV_IRQHandler + 0x0000000008006310 HDMI_CEC_IRQHandler + 0x0000000008006310 DMA1_Stream6_IRQHandler + 0x0000000008006310 DMA1_Stream1_IRQHandler + 0x0000000008006310 TIM3_IRQHandler + 0x0000000008006310 RCC_IRQHandler + 0x0000000008006310 TIM8_BRK_TIM12_IRQHandler + 0x0000000008006310 Default_Handler + 0x0000000008006310 EXTI15_10_IRQHandler + 0x0000000008006310 ADC_IRQHandler + 0x0000000008006310 DMA1_Stream7_IRQHandler + 0x0000000008006310 TIM7_IRQHandler + 0x0000000008006310 CAN2_TX_IRQHandler + 0x0000000008006310 TIM5_IRQHandler + 0x0000000008006310 DMA2_Stream7_IRQHandler + 0x0000000008006310 I2C3_EV_IRQHandler + 0x0000000008006310 EXTI9_5_IRQHandler + 0x0000000008006310 RTC_WKUP_IRQHandler + 0x0000000008006310 SPI2_IRQHandler + 0x0000000008006310 OTG_HS_EP1_IN_IRQHandler + 0x0000000008006310 MemManage_Handler + 0x0000000008006310 DMA1_Stream0_IRQHandler + 0x0000000008006310 CAN1_TX_IRQHandler + 0x0000000008006310 EXTI4_IRQHandler + 0x0000000008006310 OTG_HS_EP1_OUT_IRQHandler + 0x0000000008006310 WWDG_IRQHandler + 0x0000000008006310 TIM2_IRQHandler + 0x0000000008006310 OTG_FS_WKUP_IRQHandler + 0x0000000008006310 TIM1_TRG_COM_TIM11_IRQHandler + 0x0000000008006310 OTG_HS_IRQHandler + 0x0000000008006310 EXTI1_IRQHandler + 0x0000000008006310 USART2_IRQHandler + 0x0000000008006310 I2C2_ER_IRQHandler + 0x0000000008006310 DMA2_Stream1_IRQHandler + 0x0000000008006310 CAN1_SCE_IRQHandler + 0x0000000008006310 FLASH_IRQHandler + 0x0000000008006310 DMA2_Stream4_IRQHandler + 0x0000000008006310 BusFault_Handler + 0x0000000008006310 USART1_IRQHandler + 0x0000000008006310 OTG_FS_IRQHandler + 0x0000000008006310 SPI3_IRQHandler + 0x0000000008006310 DMA1_Stream4_IRQHandler + 0x0000000008006310 I2C1_ER_IRQHandler + 0x0000000008006310 FMC_IRQHandler + 0x0000000008006310 DMA2_Stream6_IRQHandler + 0x0000000008006310 SAI1_IRQHandler + 0x0000000008006310 DMA1_Stream3_IRQHandler + *fill* 0x0000000008006312 0x2 + .text.__errno 0x0000000008006314 0xc /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-errno.o) + 0x0000000008006314 __errno .text.__libc_init_array - 0x00000000080034fc 0x48 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-init.o) - 0x00000000080034fc __libc_init_array - .text.memcpy 0x0000000008003544 0x16 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memcpy-stub.o) - 0x0000000008003544 memcpy - .text.memset 0x000000000800355a 0x10 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memset.o) - 0x000000000800355a memset + 0x0000000008006320 0x48 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-init.o) + 0x0000000008006320 __libc_init_array + .text.memcmp 0x0000000008006368 0x1e /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memcmp.o) + 0x0000000008006368 memcmp + .text.memcpy 0x0000000008006386 0x16 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memcpy-stub.o) + 0x0000000008006386 memcpy + .text.memset 0x000000000800639c 0x10 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memset.o) + 0x000000000800639c memset + .text.sprintf 0x00000000080063ac 0x40 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-sprintf.o) + 0x00000000080063ac sprintf + 0x00000000080063ac siprintf + .text.__ssputs_r + 0x00000000080063ec 0xb4 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-svfprintf.o) + 0x00000000080063ec __ssputs_r + .text._svfprintf_r + 0x00000000080064a0 0x1f0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-svfprintf.o) + 0x00000000080064a0 _svfprintf_r + 0x00000000080064a0 _svfiprintf_r + .text._printf_common + 0x0000000008006690 0xea /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-vfprintf_i.o) + 0x0000000008006690 _printf_common + *fill* 0x000000000800677a 0x2 + .text._printf_i + 0x000000000800677c 0x224 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-vfprintf_i.o) + 0x000000000800677c _printf_i + .text.memmove 0x00000000080069a0 0x32 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memmove.o) + 0x00000000080069a0 memmove + *fill* 0x00000000080069d2 0x2 + .text._free_r 0x00000000080069d4 0x9c /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-freer.o) + 0x00000000080069d4 _free_r + .text._malloc_r + 0x0000000008006a70 0xb4 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-mallocr.o) + 0x0000000008006a70 _malloc_r + .text._realloc_r + 0x0000000008006b24 0x4c /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-reallocr.o) + 0x0000000008006b24 _realloc_r + .text._sbrk_r 0x0000000008006b70 0x20 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-sbrkr.o) + 0x0000000008006b70 _sbrk_r + .text.__malloc_lock + 0x0000000008006b90 0x2 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-mlock.o) + 0x0000000008006b90 __malloc_lock + .text.__malloc_unlock + 0x0000000008006b92 0x2 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-mlock.o) + 0x0000000008006b92 __malloc_unlock + .text._malloc_usable_size_r + 0x0000000008006b94 0x10 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-msizer.o) + 0x0000000008006b94 _malloc_usable_size_r *(.glue_7) - .glue_7 0x000000000800356a 0x0 linker stubs + .glue_7 0x0000000008006ba4 0x0 linker stubs *(.glue_7t) - .glue_7t 0x000000000800356a 0x0 linker stubs + .glue_7t 0x0000000008006ba4 0x0 linker stubs *(.eh_frame) - *fill* 0x000000000800356a 0x2 - .eh_frame 0x000000000800356c 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o + .eh_frame 0x0000000008006ba4 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o *(.init) - .init 0x000000000800356c 0x4 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crti.o - 0x000000000800356c _init - .init 0x0000000008003570 0x8 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtn.o + .init 0x0000000008006ba4 0x4 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crti.o + 0x0000000008006ba4 _init + .init 0x0000000008006ba8 0x8 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtn.o *(.fini) - .fini 0x0000000008003578 0x4 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crti.o - 0x0000000008003578 _fini - .fini 0x000000000800357c 0x8 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtn.o - 0x0000000008003584 . = ALIGN (0x4) - 0x0000000008003584 _etext = . + .fini 0x0000000008006bb0 0x4 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crti.o + 0x0000000008006bb0 _fini + .fini 0x0000000008006bb4 0x8 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtn.o + 0x0000000008006bbc . = ALIGN (0x4) + 0x0000000008006bbc _etext = . -.vfp11_veneer 0x0000000008003584 0x0 - .vfp11_veneer 0x0000000008003584 0x0 linker stubs +.vfp11_veneer 0x0000000008006bbc 0x0 + .vfp11_veneer 0x0000000008006bbc 0x0 linker stubs -.v4_bx 0x0000000008003584 0x0 - .v4_bx 0x0000000008003584 0x0 linker stubs +.v4_bx 0x0000000008006bbc 0x0 + .v4_bx 0x0000000008006bbc 0x0 linker stubs -.iplt 0x0000000008003584 0x0 - .iplt 0x0000000008003584 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o +.iplt 0x0000000008006bbc 0x0 + .iplt 0x0000000008006bbc 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o -.rodata 0x0000000008003584 0x88 - 0x0000000008003584 . = ALIGN (0x4) +.rodata 0x0000000008006bbc 0x1ec + 0x0000000008006bbc . = ALIGN (0x4) *(.rodata) - .rodata 0x0000000008003584 0x5 FreeRTOS/Source/tasks.o - *fill* 0x0000000008003589 0x3 - .rodata 0x000000000800358c 0xd FreeRTOS/Source/timers.o - *fill* 0x0000000008003599 0x3 - .rodata 0x000000000800359c 0x6f src/main.o + .rodata 0x0000000008006bbc 0x5 FreeRTOS/org/Source/tasks.o + *fill* 0x0000000008006bc1 0x3 + .rodata 0x0000000008006bc4 0xd FreeRTOS/org/Source/timers.o + *fill* 0x0000000008006bd1 0x3 + .rodata 0x0000000008006bd4 0x49 SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + *fill* 0x0000000008006c1d 0x3 + .rodata 0x0000000008006c20 0x58 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .rodata 0x0000000008006c78 0x17 SEGGER/SEGGER/SEGGER_RTT.o + *fill* 0x0000000008006c8f 0x1 + .rodata 0x0000000008006c90 0x8 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .rodata 0x0000000008006c98 0xc6 src/main.o *(.rodata*) - 0x000000000800360c . = ALIGN (0x4) - *fill* 0x000000000800360b 0x1 + *fill* 0x0000000008006d5e 0x2 + .rodata.SYSVIEW_X_OS_TraceAPI + 0x0000000008006d60 0x8 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + 0x0000000008006d60 SYSVIEW_X_OS_TraceAPI + .rodata._abSync + 0x0000000008006d68 0xa SEGGER/SEGGER/SEGGER_SYSVIEW.o + .rodata._svfprintf_r.str1.1 + 0x0000000008006d72 0x11 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-svfprintf.o) + .rodata._printf_i.str1.1 + 0x0000000008006d83 0x22 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-vfprintf_i.o) + 0x0000000008006da8 . = ALIGN (0x4) + *fill* 0x0000000008006da5 0x3 -.rel.dyn 0x000000000800360c 0x0 - .rel.iplt 0x000000000800360c 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o +.rel.dyn 0x0000000008006da8 0x0 + .rel.iplt 0x0000000008006da8 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o -.ARM.extab 0x000000000800360c 0x0 - 0x000000000800360c . = ALIGN (0x4) +.ARM.extab 0x0000000008006da8 0x0 + 0x0000000008006da8 . = ALIGN (0x4) *(.ARM.extab* .gnu.linkonce.armextab.*) - 0x000000000800360c . = ALIGN (0x4) + 0x0000000008006da8 . = ALIGN (0x4) -.ARM 0x000000000800360c 0x0 - 0x000000000800360c . = ALIGN (0x4) - 0x000000000800360c __exidx_start = . +.ARM 0x0000000008006da8 0x0 + 0x0000000008006da8 . = ALIGN (0x4) + 0x0000000008006da8 __exidx_start = . *(.ARM.exidx*) - 0x000000000800360c __exidx_end = . - 0x000000000800360c . = ALIGN (0x4) + 0x0000000008006da8 __exidx_end = . + 0x0000000008006da8 . = ALIGN (0x4) -.preinit_array 0x000000000800360c 0x0 - 0x000000000800360c . = ALIGN (0x4) - 0x000000000800360c PROVIDE (__preinit_array_start = .) +.preinit_array 0x0000000008006da8 0x0 + 0x0000000008006da8 . = ALIGN (0x4) + 0x0000000008006da8 PROVIDE (__preinit_array_start = .) *(.preinit_array*) - 0x000000000800360c PROVIDE (__preinit_array_end = .) - 0x000000000800360c . = ALIGN (0x4) + 0x0000000008006da8 PROVIDE (__preinit_array_end = .) + 0x0000000008006da8 . = ALIGN (0x4) -.init_array 0x000000000800360c 0x4 - 0x000000000800360c . = ALIGN (0x4) - 0x000000000800360c PROVIDE (__init_array_start = .) +.init_array 0x0000000008006da8 0x4 + 0x0000000008006da8 . = ALIGN (0x4) + 0x0000000008006da8 PROVIDE (__init_array_start = .) *(SORT_BY_NAME(.init_array.*)) *(.init_array*) - .init_array 0x000000000800360c 0x4 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o - 0x0000000008003610 PROVIDE (__init_array_end = .) - 0x0000000008003610 . = ALIGN (0x4) + .init_array 0x0000000008006da8 0x4 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o + 0x0000000008006dac PROVIDE (__init_array_end = .) + 0x0000000008006dac . = ALIGN (0x4) -.fini_array 0x0000000008003610 0x4 - 0x0000000008003610 . = ALIGN (0x4) +.fini_array 0x0000000008006dac 0x4 + 0x0000000008006dac . = ALIGN (0x4) [!provide] PROVIDE (__fini_array_start = .) *(SORT_BY_NAME(.fini_array.*)) *(.fini_array*) - .fini_array 0x0000000008003610 0x4 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o + .fini_array 0x0000000008006dac 0x4 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o [!provide] PROVIDE (__fini_array_end = .) - 0x0000000008003614 . = ALIGN (0x4) - 0x0000000008003614 _sidata = LOADADDR (.data) + 0x0000000008006db0 . = ALIGN (0x4) + 0x0000000008006db0 _sidata = LOADADDR (.data) -.data 0x0000000020000000 0x30 load address 0x0000000008003614 +.data 0x0000000020000000 0x184 load address 0x0000000008006db0 0x0000000020000000 . = ALIGN (0x4) 0x0000000020000000 _sdata = . *(.data) *(.data*) .data.uxTopUsedPriority - 0x0000000020000000 0x4 FreeRTOS/Source/tasks.o + 0x0000000020000000 0x4 FreeRTOS/org/Source/tasks.o 0x0000000020000000 uxTopUsedPriority .data.uxCriticalNesting - 0x0000000020000004 0x4 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o + 0x0000000020000004 0x4 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o .data.APBAHBPrescTable 0x0000000020000008 0x10 StdPeriph_Driver/src/stm32f4xx_rcc.o - .data.isUartfree - 0x0000000020000018 0x1 src/main.o - 0x0000000020000018 isUartfree - *fill* 0x0000000020000019 0x3 + .data.menu 0x0000000020000018 0xf1 src/main.o + 0x0000000020000018 menu + *fill* 0x0000000020000109 0x3 .data.SystemCoreClock - 0x000000002000001c 0x4 src/system_stm32f4xx.o - 0x000000002000001c SystemCoreClock + 0x000000002000010c 0x4 src/system_stm32f4xx.o + 0x000000002000010c SystemCoreClock .data.AHBPrescTable - 0x0000000020000020 0x10 src/system_stm32f4xx.o - 0x0000000020000020 AHBPrescTable - 0x0000000020000030 . = ALIGN (0x4) - 0x0000000020000030 _edata = . + 0x0000000020000110 0x10 src/system_stm32f4xx.o + 0x0000000020000110 AHBPrescTable + .data._impure_ptr + 0x0000000020000120 0x4 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-impure.o) + 0x0000000020000120 _impure_ptr + .data.impure_data + 0x0000000020000124 0x60 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-impure.o) + 0x0000000020000184 . = ALIGN (0x4) + 0x0000000020000184 _edata = . -.igot.plt 0x0000000020000030 0x0 load address 0x0000000008003644 - .igot.plt 0x0000000020000030 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o - 0x0000000020000030 . = ALIGN (0x4) +.igot.plt 0x0000000020000184 0x0 load address 0x0000000008006f34 + .igot.plt 0x0000000020000184 0x0 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o + 0x0000000020000184 . = ALIGN (0x4) -.bss 0x0000000020000030 0x12dd4 load address 0x0000000008003644 - 0x0000000020000030 _sbss = . - 0x0000000020000030 __bss_start__ = _sbss +.bss 0x0000000020000184 0x15c80 load address 0x0000000008006f34 + 0x0000000020000184 _sbss = . + 0x0000000020000184 __bss_start__ = _sbss *(.bss) - .bss 0x0000000020000030 0x1c /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o + .bss 0x0000000020000184 0x1c /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o *(.bss*) .bss.pxCurrentTCB - 0x000000002000004c 0x4 FreeRTOS/Source/tasks.o - 0x000000002000004c pxCurrentTCB + 0x00000000200001a0 0x4 FreeRTOS/org/Source/tasks.o + 0x00000000200001a0 pxCurrentTCB .bss.pxReadyTasksLists - 0x0000000020000050 0x64 FreeRTOS/Source/tasks.o + 0x00000000200001a4 0x64 FreeRTOS/org/Source/tasks.o .bss.xDelayedTaskList1 - 0x00000000200000b4 0x14 FreeRTOS/Source/tasks.o + 0x0000000020000208 0x14 FreeRTOS/org/Source/tasks.o .bss.xDelayedTaskList2 - 0x00000000200000c8 0x14 FreeRTOS/Source/tasks.o + 0x000000002000021c 0x14 FreeRTOS/org/Source/tasks.o .bss.pxDelayedTaskList - 0x00000000200000dc 0x4 FreeRTOS/Source/tasks.o + 0x0000000020000230 0x4 FreeRTOS/org/Source/tasks.o .bss.pxOverflowDelayedTaskList - 0x00000000200000e0 0x4 FreeRTOS/Source/tasks.o + 0x0000000020000234 0x4 FreeRTOS/org/Source/tasks.o .bss.xPendingReadyList - 0x00000000200000e4 0x14 FreeRTOS/Source/tasks.o + 0x0000000020000238 0x14 FreeRTOS/org/Source/tasks.o .bss.xTasksWaitingTermination - 0x00000000200000f8 0x14 FreeRTOS/Source/tasks.o + 0x000000002000024c 0x14 FreeRTOS/org/Source/tasks.o .bss.uxDeletedTasksWaitingCleanUp - 0x000000002000010c 0x4 FreeRTOS/Source/tasks.o + 0x0000000020000260 0x4 FreeRTOS/org/Source/tasks.o .bss.xSuspendedTaskList - 0x0000000020000110 0x14 FreeRTOS/Source/tasks.o + 0x0000000020000264 0x14 FreeRTOS/org/Source/tasks.o .bss.uxCurrentNumberOfTasks - 0x0000000020000124 0x4 FreeRTOS/Source/tasks.o + 0x0000000020000278 0x4 FreeRTOS/org/Source/tasks.o .bss.xTickCount - 0x0000000020000128 0x4 FreeRTOS/Source/tasks.o + 0x000000002000027c 0x4 FreeRTOS/org/Source/tasks.o .bss.uxTopReadyPriority - 0x000000002000012c 0x4 FreeRTOS/Source/tasks.o + 0x0000000020000280 0x4 FreeRTOS/org/Source/tasks.o .bss.xSchedulerRunning - 0x0000000020000130 0x4 FreeRTOS/Source/tasks.o + 0x0000000020000284 0x4 FreeRTOS/org/Source/tasks.o .bss.xPendedTicks - 0x0000000020000134 0x4 FreeRTOS/Source/tasks.o + 0x0000000020000288 0x4 FreeRTOS/org/Source/tasks.o .bss.xYieldPending - 0x0000000020000138 0x4 FreeRTOS/Source/tasks.o + 0x000000002000028c 0x4 FreeRTOS/org/Source/tasks.o .bss.xNumOfOverflows - 0x000000002000013c 0x4 FreeRTOS/Source/tasks.o + 0x0000000020000290 0x4 FreeRTOS/org/Source/tasks.o .bss.uxTaskNumber - 0x0000000020000140 0x4 FreeRTOS/Source/tasks.o + 0x0000000020000294 0x4 FreeRTOS/org/Source/tasks.o .bss.xNextTaskUnblockTime - 0x0000000020000144 0x4 FreeRTOS/Source/tasks.o + 0x0000000020000298 0x4 FreeRTOS/org/Source/tasks.o .bss.xIdleTaskHandle - 0x0000000020000148 0x4 FreeRTOS/Source/tasks.o + 0x000000002000029c 0x4 FreeRTOS/org/Source/tasks.o .bss.uxSchedulerSuspended - 0x000000002000014c 0x4 FreeRTOS/Source/tasks.o + 0x00000000200002a0 0x4 FreeRTOS/org/Source/tasks.o .bss.xActiveTimerList1 - 0x0000000020000150 0x14 FreeRTOS/Source/timers.o + 0x00000000200002a4 0x14 FreeRTOS/org/Source/timers.o .bss.xActiveTimerList2 - 0x0000000020000164 0x14 FreeRTOS/Source/timers.o + 0x00000000200002b8 0x14 FreeRTOS/org/Source/timers.o .bss.pxCurrentTimerList - 0x0000000020000178 0x4 FreeRTOS/Source/timers.o + 0x00000000200002cc 0x4 FreeRTOS/org/Source/timers.o .bss.pxOverflowTimerList - 0x000000002000017c 0x4 FreeRTOS/Source/timers.o + 0x00000000200002d0 0x4 FreeRTOS/org/Source/timers.o .bss.xTimerQueue - 0x0000000020000180 0x4 FreeRTOS/Source/timers.o + 0x00000000200002d4 0x4 FreeRTOS/org/Source/timers.o .bss.xTimerTaskHandle - 0x0000000020000184 0x4 FreeRTOS/Source/timers.o - .bss.xLastTime.6732 - 0x0000000020000188 0x4 FreeRTOS/Source/timers.o + 0x00000000200002d8 0x4 FreeRTOS/org/Source/timers.o + .bss.xLastTime.7144 + 0x00000000200002dc 0x4 FreeRTOS/org/Source/timers.o .bss.ucMaxSysCallPriority - 0x000000002000018c 0x1 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - *fill* 0x000000002000018d 0x3 + 0x00000000200002e0 0x1 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + *fill* 0x00000000200002e1 0x3 .bss.ulMaxPRIGROUPValue - 0x0000000020000190 0x4 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .bss.ucHeap 0x0000000020000194 0x12c00 FreeRTOS/Source/portable/MemMang/heap_4.o - .bss.xStart 0x0000000020012d94 0x8 FreeRTOS/Source/portable/MemMang/heap_4.o - .bss.pxEnd 0x0000000020012d9c 0x4 FreeRTOS/Source/portable/MemMang/heap_4.o + 0x00000000200002e4 0x4 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .bss.ucHeap 0x00000000200002e8 0x12c00 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .bss.xStart 0x0000000020012ee8 0x8 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .bss.pxEnd 0x0000000020012ef0 0x4 FreeRTOS/org/Source/portable/MemMang/heap_4.o .bss.xFreeBytesRemaining - 0x0000000020012da0 0x4 FreeRTOS/Source/portable/MemMang/heap_4.o + 0x0000000020012ef4 0x4 FreeRTOS/org/Source/portable/MemMang/heap_4.o .bss.xMinimumEverFreeBytesRemaining - 0x0000000020012da4 0x4 FreeRTOS/Source/portable/MemMang/heap_4.o + 0x0000000020012ef8 0x4 FreeRTOS/org/Source/portable/MemMang/heap_4.o .bss.xNumberOfSuccessfulAllocations - 0x0000000020012da8 0x4 FreeRTOS/Source/portable/MemMang/heap_4.o + 0x0000000020012efc 0x4 FreeRTOS/org/Source/portable/MemMang/heap_4.o .bss.xNumberOfSuccessfulFrees - 0x0000000020012dac 0x4 FreeRTOS/Source/portable/MemMang/heap_4.o + 0x0000000020012f00 0x4 FreeRTOS/org/Source/portable/MemMang/heap_4.o .bss.xBlockAllocatedBit - 0x0000000020012db0 0x4 FreeRTOS/Source/portable/MemMang/heap_4.o - .bss.xTask1_Handle - 0x0000000020012db4 0x4 src/main.o - 0x0000000020012db4 xTask1_Handle - .bss.xTask2_Handle - 0x0000000020012db8 0x4 src/main.o - 0x0000000020012db8 xTask2_Handle - .bss.xTask3_Handle - 0x0000000020012dbc 0x4 src/main.o - 0x0000000020012dbc xTask3_Handle - .bss.xTask4_Handle - 0x0000000020012dc0 0x4 src/main.o - 0x0000000020012dc0 xTask4_Handle + 0x0000000020012f04 0x4 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .bss._aTasks 0x0000000020012f08 0xa0 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .bss._NumTasks + 0x0000000020012fa8 0x4 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .bss._acUpBuffer + 0x0000000020012fac 0x400 SEGGER/SEGGER/SEGGER_RTT.o + .bss._acDownBuffer + 0x00000000200133ac 0x10 SEGGER/SEGGER/SEGGER_RTT.o + .bss._UpBuffer + 0x00000000200133bc 0x2800 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .bss._DownBuffer + 0x0000000020015bbc 0x8 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .bss._SYSVIEW_Globals + 0x0000000020015bc4 0x28 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .bss._pFirstModule + 0x0000000020015bec 0x4 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .bss._NumModules + 0x0000000020015bf0 0x1 SEGGER/SEGGER/SEGGER_SYSVIEW.o + *fill* 0x0000000020015bf1 0x3 + .bss._aPacket 0x0000000020015bf4 0xe3 SEGGER/SEGGER/SEGGER_SYSVIEW.o + *fill* 0x0000000020015cd7 0x1 + .bss.Handle_menu_display_task + 0x0000000020015cd8 0x4 src/main.o + 0x0000000020015cd8 Handle_menu_display_task + .bss.Handle_cmd_handling_task + 0x0000000020015cdc 0x4 src/main.o + 0x0000000020015cdc Handle_cmd_handling_task + .bss.Handle_cmd_processing_task + 0x0000000020015ce0 0x4 src/main.o + 0x0000000020015ce0 Handle_cmd_processing_task + .bss.Handle_uart_write_task + 0x0000000020015ce4 0x4 src/main.o + 0x0000000020015ce4 Handle_uart_write_task + .bss.command_queue + 0x0000000020015ce8 0x4 src/main.o + 0x0000000020015ce8 command_queue + .bss.uart_queue + 0x0000000020015cec 0x4 src/main.o + 0x0000000020015cec uart_queue + .bss.command_len + 0x0000000020015cf0 0x1 src/main.o + 0x0000000020015cf0 command_len + *fill* 0x0000000020015cf1 0x3 + .bss.Timer_LedToggle + 0x0000000020015cf4 0x4 src/main.o + 0x0000000020015cf4 Timer_LedToggle + .bss.heap_end.7221 + 0x0000000020015cf8 0x4 src/syscalls.o + .bss.__malloc_free_list + 0x0000000020015cfc 0x4 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-mallocr.o) + 0x0000000020015cfc __malloc_free_list + .bss.__malloc_sbrk_start + 0x0000000020015d00 0x4 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-mallocr.o) + 0x0000000020015d00 __malloc_sbrk_start *(COMMON) - COMMON 0x0000000020012dc4 0x40 FreeRTOS/Source/queue.o - 0x0000000020012dc4 xQueueRegistry - 0x0000000020012e04 . = ALIGN (0x4) - 0x0000000020012e04 _ebss = . - 0x0000000020012e04 __bss_end__ = _ebss + COMMON 0x0000000020015d04 0x40 FreeRTOS/org/Source/queue.o + 0x0000000020015d04 xQueueRegistry + COMMON 0x0000000020015d44 0xa8 SEGGER/SEGGER/SEGGER_RTT.o + 0x0000000020015d44 _SEGGER_RTT + COMMON 0x0000000020015dec 0x14 src/main.o + 0x0000000020015dec command_buffer + COMMON 0x0000000020015e00 0x4 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-reent.o) + 0x0000000020015e00 errno + 0x0000000020015e04 . = ALIGN (0x4) + 0x0000000020015e04 _ebss = . + 0x0000000020015e04 __bss_end__ = _ebss ._user_heap_stack - 0x0000000020012e04 0x604 load address 0x0000000008003644 - 0x0000000020012e08 . = ALIGN (0x8) - *fill* 0x0000000020012e04 0x4 - 0x0000000020012e08 PROVIDE (end = .) + 0x0000000020015e04 0x604 load address 0x0000000008006f34 + 0x0000000020015e08 . = ALIGN (0x8) + *fill* 0x0000000020015e04 0x4 + 0x0000000020015e08 PROVIDE (end = .) [!provide] PROVIDE (_end = .) - 0x0000000020013008 . = (. + _Min_Heap_Size) - *fill* 0x0000000020012e08 0x200 - 0x0000000020013408 . = (. + _Min_Stack_Size) - *fill* 0x0000000020013008 0x400 - 0x0000000020013408 . = ALIGN (0x8) + 0x0000000020016008 . = (. + _Min_Heap_Size) + *fill* 0x0000000020015e08 0x200 + 0x0000000020016408 . = (. + _Min_Stack_Size) + *fill* 0x0000000020016008 0x400 + 0x0000000020016408 . = ALIGN (0x8) /DISCARD/ libc.a(*) @@ -7137,197 +8023,357 @@ LOAD /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools .ARM.attributes 0x0000000000000022 0x34 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtbegin.o .ARM.attributes - 0x0000000000000056 0x39 FreeRTOS/Source/list.o + 0x0000000000000056 0x39 FreeRTOS/org/Source/list.o + .ARM.attributes + 0x000000000000008f 0x39 FreeRTOS/org/Source/queue.o .ARM.attributes - 0x000000000000008f 0x39 FreeRTOS/Source/queue.o + 0x00000000000000c8 0x39 FreeRTOS/org/Source/tasks.o .ARM.attributes - 0x00000000000000c8 0x39 FreeRTOS/Source/tasks.o + 0x0000000000000101 0x39 FreeRTOS/org/Source/timers.o .ARM.attributes - 0x0000000000000101 0x39 FreeRTOS/Source/timers.o + 0x000000000000013a 0x39 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o .ARM.attributes - 0x000000000000013a 0x39 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o + 0x0000000000000173 0x39 FreeRTOS/org/Source/portable/MemMang/heap_4.o .ARM.attributes - 0x0000000000000173 0x39 FreeRTOS/Source/portable/MemMang/heap_4.o + 0x00000000000001ac 0x39 SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o .ARM.attributes - 0x00000000000001ac 0x39 StdPeriph_Driver/src/stm32f4xx_gpio.o + 0x00000000000001e5 0x39 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o .ARM.attributes - 0x00000000000001e5 0x39 StdPeriph_Driver/src/stm32f4xx_rcc.o + 0x000000000000021e 0x39 SEGGER/SEGGER/SEGGER_RTT.o .ARM.attributes - 0x000000000000021e 0x39 StdPeriph_Driver/src/stm32f4xx_usart.o + 0x0000000000000257 0x25 SEGGER/SEGGER/SEGGER_RTT_ASM_ARMv7M.o .ARM.attributes - 0x0000000000000257 0x39 src/main.o + 0x000000000000027c 0x39 SEGGER/SEGGER/SEGGER_SYSVIEW.o .ARM.attributes - 0x0000000000000290 0x39 src/system_stm32f4xx.o + 0x00000000000002b5 0x39 StdPeriph_Driver/src/stm32f4xx_gpio.o .ARM.attributes - 0x00000000000002c9 0x21 startup/startup_stm32.o + 0x00000000000002ee 0x39 StdPeriph_Driver/src/stm32f4xx_rcc.o .ARM.attributes - 0x00000000000002ea 0x34 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-init.o) + 0x0000000000000327 0x39 StdPeriph_Driver/src/stm32f4xx_rtc.o .ARM.attributes - 0x000000000000031e 0x34 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memcpy-stub.o) + 0x0000000000000360 0x39 StdPeriph_Driver/src/stm32f4xx_usart.o .ARM.attributes - 0x0000000000000352 0x34 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memset.o) + 0x0000000000000399 0x39 src/main.o .ARM.attributes - 0x0000000000000386 0x1b /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-strlen.o) + 0x00000000000003d2 0x39 src/syscalls.o .ARM.attributes - 0x00000000000003a1 0x22 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtn.o + 0x000000000000040b 0x39 src/system_stm32f4xx.o + .ARM.attributes + 0x0000000000000444 0x21 startup/startup_stm32.o + .ARM.attributes + 0x0000000000000465 0x34 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-errno.o) + .ARM.attributes + 0x0000000000000499 0x34 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-impure.o) + .ARM.attributes + 0x00000000000004cd 0x34 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-init.o) + .ARM.attributes + 0x0000000000000501 0x34 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memcmp.o) + .ARM.attributes + 0x0000000000000535 0x34 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memcpy-stub.o) + .ARM.attributes + 0x0000000000000569 0x34 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memset.o) + .ARM.attributes + 0x000000000000059d 0x34 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-sprintf.o) + .ARM.attributes + 0x00000000000005d1 0x1b /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-strlen.o) + .ARM.attributes + 0x00000000000005ec 0x34 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-svfprintf.o) + .ARM.attributes + 0x0000000000000620 0x34 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-vfprintf_i.o) + .ARM.attributes + 0x0000000000000654 0x20 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memchr.o) + .ARM.attributes + 0x0000000000000674 0x34 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memmove.o) + .ARM.attributes + 0x00000000000006a8 0x34 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-freer.o) + .ARM.attributes + 0x00000000000006dc 0x34 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-mallocr.o) + .ARM.attributes + 0x0000000000000710 0x34 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-reallocr.o) + .ARM.attributes + 0x0000000000000744 0x34 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-sbrkr.o) + .ARM.attributes + 0x0000000000000778 0x34 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-mlock.o) + .ARM.attributes + 0x00000000000007ac 0x34 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-msizer.o) + .ARM.attributes + 0x00000000000007e0 0x34 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-reent.o) + .ARM.attributes + 0x0000000000000814 0x22 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/thumb/v7e-m/fpv4-sp/hard/crtn.o OUTPUT(FreeRTOS_STM32_Porting.elf elf32-littlearm) -.debug_info 0x0000000000000000 0xad57 - .debug_info 0x0000000000000000 0xacb FreeRTOS/Source/list.o - .debug_info 0x0000000000000acb 0x1ff2 FreeRTOS/Source/queue.o - .debug_info 0x0000000000002abd 0x2965 FreeRTOS/Source/tasks.o - .debug_info 0x0000000000005422 0x14c9 FreeRTOS/Source/timers.o - .debug_info 0x00000000000068eb 0x533 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .debug_info 0x0000000000006e1e 0xced FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_info 0x0000000000007b0b 0x62b StdPeriph_Driver/src/stm32f4xx_gpio.o - .debug_info 0x0000000000008136 0xe67 StdPeriph_Driver/src/stm32f4xx_rcc.o - .debug_info 0x0000000000008f9d 0x9d4 StdPeriph_Driver/src/stm32f4xx_usart.o - .debug_info 0x0000000000009971 0xdb2 src/main.o - .debug_info 0x000000000000a723 0x612 src/system_stm32f4xx.o - .debug_info 0x000000000000ad35 0x22 startup/startup_stm32.o +.debug_info 0x0000000000000000 0x13ec1 + .debug_info 0x0000000000000000 0xae1 FreeRTOS/org/Source/list.o + .debug_info 0x0000000000000ae1 0x200d FreeRTOS/org/Source/queue.o + .debug_info 0x0000000000002aee 0x2a18 FreeRTOS/org/Source/tasks.o + .debug_info 0x0000000000005506 0x14df FreeRTOS/org/Source/timers.o + .debug_info 0x00000000000069e5 0x549 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_info 0x0000000000006f2e 0xd03 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_info 0x0000000000007c31 0x125 SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_info 0x0000000000007d56 0xb92 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_info 0x00000000000088e8 0x1bab SEGGER/SEGGER/SEGGER_RTT.o + .debug_info 0x000000000000a493 0x26 SEGGER/SEGGER/SEGGER_RTT_ASM_ARMv7M.o + .debug_info 0x000000000000a4b9 0x3c91 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_info 0x000000000000e14a 0x62b StdPeriph_Driver/src/stm32f4xx_gpio.o + .debug_info 0x000000000000e775 0xe67 StdPeriph_Driver/src/stm32f4xx_rcc.o + .debug_info 0x000000000000f5dc 0x10f6 StdPeriph_Driver/src/stm32f4xx_rtc.o + .debug_info 0x00000000000106d2 0x9d4 StdPeriph_Driver/src/stm32f4xx_usart.o + .debug_info 0x00000000000110a6 0x18c9 src/main.o + .debug_info 0x000000000001296f 0xf1e src/syscalls.o + .debug_info 0x000000000001388d 0x612 src/system_stm32f4xx.o + .debug_info 0x0000000000013e9f 0x22 startup/startup_stm32.o -.debug_abbrev 0x0000000000000000 0x183d - .debug_abbrev 0x0000000000000000 0x1cf FreeRTOS/Source/list.o - .debug_abbrev 0x00000000000001cf 0x2f1 FreeRTOS/Source/queue.o - .debug_abbrev 0x00000000000004c0 0x350 FreeRTOS/Source/tasks.o - .debug_abbrev 0x0000000000000810 0x2c8 FreeRTOS/Source/timers.o - .debug_abbrev 0x0000000000000ad8 0x210 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .debug_abbrev 0x0000000000000ce8 0x29e FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_abbrev 0x0000000000000f86 0x1bf StdPeriph_Driver/src/stm32f4xx_gpio.o - .debug_abbrev 0x0000000000001145 0x1d4 StdPeriph_Driver/src/stm32f4xx_rcc.o - .debug_abbrev 0x0000000000001319 0x187 StdPeriph_Driver/src/stm32f4xx_usart.o - .debug_abbrev 0x00000000000014a0 0x22e src/main.o - .debug_abbrev 0x00000000000016ce 0x15d src/system_stm32f4xx.o - .debug_abbrev 0x000000000000182b 0x12 startup/startup_stm32.o +.debug_abbrev 0x0000000000000000 0x2661 + .debug_abbrev 0x0000000000000000 0x1cf FreeRTOS/org/Source/list.o + .debug_abbrev 0x00000000000001cf 0x2f1 FreeRTOS/org/Source/queue.o + .debug_abbrev 0x00000000000004c0 0x36e FreeRTOS/org/Source/tasks.o + .debug_abbrev 0x000000000000082e 0x2c8 FreeRTOS/org/Source/timers.o + .debug_abbrev 0x0000000000000af6 0x210 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_abbrev 0x0000000000000d06 0x29e FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_abbrev 0x0000000000000fa4 0xb5 SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_abbrev 0x0000000000001059 0x1ed SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_abbrev 0x0000000000001246 0x2a7 SEGGER/SEGGER/SEGGER_RTT.o + .debug_abbrev 0x00000000000014ed 0x14 SEGGER/SEGGER/SEGGER_RTT_ASM_ARMv7M.o + .debug_abbrev 0x0000000000001501 0x338 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_abbrev 0x0000000000001839 0x1bf StdPeriph_Driver/src/stm32f4xx_gpio.o + .debug_abbrev 0x00000000000019f8 0x1d4 StdPeriph_Driver/src/stm32f4xx_rcc.o + .debug_abbrev 0x0000000000001bcc 0x1e2 StdPeriph_Driver/src/stm32f4xx_rtc.o + .debug_abbrev 0x0000000000001dae 0x187 StdPeriph_Driver/src/stm32f4xx_usart.o + .debug_abbrev 0x0000000000001f35 0x349 src/main.o + .debug_abbrev 0x000000000000227e 0x274 src/syscalls.o + .debug_abbrev 0x00000000000024f2 0x15d src/system_stm32f4xx.o + .debug_abbrev 0x000000000000264f 0x12 startup/startup_stm32.o -.debug_aranges 0x0000000000000000 0x910 +.debug_aranges 0x0000000000000000 0x1080 + .debug_aranges + 0x0000000000000000 0x40 FreeRTOS/org/Source/list.o + .debug_aranges + 0x0000000000000040 0x130 FreeRTOS/org/Source/queue.o + .debug_aranges + 0x0000000000000170 0x208 FreeRTOS/org/Source/tasks.o + .debug_aranges + 0x0000000000000378 0xd8 FreeRTOS/org/Source/timers.o + .debug_aranges + 0x0000000000000450 0x80 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_aranges + 0x00000000000004d0 0x58 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_aranges + 0x0000000000000528 0x28 SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o .debug_aranges - 0x0000000000000000 0x40 FreeRTOS/Source/list.o + 0x0000000000000550 0x48 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o .debug_aranges - 0x0000000000000040 0x130 FreeRTOS/Source/queue.o + 0x0000000000000598 0x138 SEGGER/SEGGER/SEGGER_RTT.o .debug_aranges - 0x0000000000000170 0x1f8 FreeRTOS/Source/tasks.o + 0x00000000000006d0 0x20 SEGGER/SEGGER/SEGGER_RTT_ASM_ARMv7M.o .debug_aranges - 0x0000000000000368 0xd8 FreeRTOS/Source/timers.o + 0x00000000000006f0 0x280 SEGGER/SEGGER/SEGGER_SYSVIEW.o .debug_aranges - 0x0000000000000440 0x80 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o + 0x0000000000000970 0x88 StdPeriph_Driver/src/stm32f4xx_gpio.o .debug_aranges - 0x00000000000004c0 0x58 FreeRTOS/Source/portable/MemMang/heap_4.o + 0x00000000000009f8 0x1c0 StdPeriph_Driver/src/stm32f4xx_rcc.o .debug_aranges - 0x0000000000000518 0x88 StdPeriph_Driver/src/stm32f4xx_gpio.o + 0x0000000000000bb8 0x1e0 StdPeriph_Driver/src/stm32f4xx_rtc.o .debug_aranges - 0x00000000000005a0 0x1c0 StdPeriph_Driver/src/stm32f4xx_rcc.o + 0x0000000000000d98 0x100 StdPeriph_Driver/src/stm32f4xx_usart.o .debug_aranges - 0x0000000000000760 0x100 StdPeriph_Driver/src/stm32f4xx_usart.o + 0x0000000000000e98 0xe0 src/main.o .debug_aranges - 0x0000000000000860 0x58 src/main.o + 0x0000000000000f78 0xb0 src/syscalls.o .debug_aranges - 0x00000000000008b8 0x30 src/system_stm32f4xx.o + 0x0000000000001028 0x30 src/system_stm32f4xx.o .debug_aranges - 0x00000000000008e8 0x28 startup/startup_stm32.o + 0x0000000000001058 0x28 startup/startup_stm32.o -.debug_ranges 0x0000000000000000 0x858 - .debug_ranges 0x0000000000000000 0x30 FreeRTOS/Source/list.o - .debug_ranges 0x0000000000000030 0x120 FreeRTOS/Source/queue.o - .debug_ranges 0x0000000000000150 0x1e8 FreeRTOS/Source/tasks.o - .debug_ranges 0x0000000000000338 0xc8 FreeRTOS/Source/timers.o - .debug_ranges 0x0000000000000400 0x70 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .debug_ranges 0x0000000000000470 0x48 FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_ranges 0x00000000000004b8 0x78 StdPeriph_Driver/src/stm32f4xx_gpio.o - .debug_ranges 0x0000000000000530 0x1b0 StdPeriph_Driver/src/stm32f4xx_rcc.o - .debug_ranges 0x00000000000006e0 0xf0 StdPeriph_Driver/src/stm32f4xx_usart.o - .debug_ranges 0x00000000000007d0 0x48 src/main.o - .debug_ranges 0x0000000000000818 0x20 src/system_stm32f4xx.o - .debug_ranges 0x0000000000000838 0x20 startup/startup_stm32.o +.debug_ranges 0x0000000000000000 0xf48 + .debug_ranges 0x0000000000000000 0x30 FreeRTOS/org/Source/list.o + .debug_ranges 0x0000000000000030 0x120 FreeRTOS/org/Source/queue.o + .debug_ranges 0x0000000000000150 0x1f8 FreeRTOS/org/Source/tasks.o + .debug_ranges 0x0000000000000348 0xc8 FreeRTOS/org/Source/timers.o + .debug_ranges 0x0000000000000410 0x70 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_ranges 0x0000000000000480 0x48 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_ranges 0x00000000000004c8 0x18 SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_ranges 0x00000000000004e0 0x38 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_ranges 0x0000000000000518 0x128 SEGGER/SEGGER/SEGGER_RTT.o + .debug_ranges 0x0000000000000640 0x270 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_ranges 0x00000000000008b0 0x78 StdPeriph_Driver/src/stm32f4xx_gpio.o + .debug_ranges 0x0000000000000928 0x1b0 StdPeriph_Driver/src/stm32f4xx_rcc.o + .debug_ranges 0x0000000000000ad8 0x1d0 StdPeriph_Driver/src/stm32f4xx_rtc.o + .debug_ranges 0x0000000000000ca8 0xf0 StdPeriph_Driver/src/stm32f4xx_usart.o + .debug_ranges 0x0000000000000d98 0xd0 src/main.o + .debug_ranges 0x0000000000000e68 0xa0 src/syscalls.o + .debug_ranges 0x0000000000000f08 0x20 src/system_stm32f4xx.o + .debug_ranges 0x0000000000000f28 0x20 startup/startup_stm32.o -.debug_macro 0x0000000000000000 0x1d92 - .debug_macro 0x0000000000000000 0x186 FreeRTOS/Source/list.o - .debug_macro 0x0000000000000186 0x20f FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000395 0x16 FreeRTOS/Source/queue.o - .debug_macro 0x00000000000003ab 0x35 FreeRTOS/Source/queue.o - .debug_macro 0x00000000000003e0 0x20 FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000400 0x80 FreeRTOS/Source/queue.o - .debug_macro 0x0000000000000480 0x26c FreeRTOS/Source/tasks.o - .debug_macro 0x00000000000006ec 0x10 FreeRTOS/Source/tasks.o - .debug_macro 0x00000000000006fc 0x1cf FreeRTOS/Source/timers.o - .debug_macro 0x00000000000008cb 0x97 FreeRTOS/Source/timers.o - .debug_macro 0x0000000000000962 0x196 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .debug_macro 0x0000000000000af8 0x1a1 FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_macro 0x0000000000000c99 0x1bc StdPeriph_Driver/src/stm32f4xx_gpio.o - .debug_macro 0x0000000000000e55 0x2f5 StdPeriph_Driver/src/stm32f4xx_gpio.o - .debug_macro 0x000000000000114a 0x28b StdPeriph_Driver/src/stm32f4xx_rcc.o - .debug_macro 0x00000000000013d5 0x1d4 StdPeriph_Driver/src/stm32f4xx_usart.o - .debug_macro 0x00000000000015a9 0x21d StdPeriph_Driver/src/stm32f4xx_usart.o - .debug_macro 0x00000000000017c6 0x2f4 src/main.o - .debug_macro 0x0000000000001aba 0x106 src/main.o - .debug_macro 0x0000000000001bc0 0x1d2 src/system_stm32f4xx.o +.debug_macro 0x0000000000000000 0x40b7 + .debug_macro 0x0000000000000000 0x1e8 FreeRTOS/org/Source/list.o + .debug_macro 0x00000000000001e8 0x271 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000459 0x16 FreeRTOS/org/Source/queue.o + .debug_macro 0x000000000000046f 0x35 FreeRTOS/org/Source/queue.o + .debug_macro 0x00000000000004a4 0x20 FreeRTOS/org/Source/queue.o + .debug_macro 0x00000000000004c4 0x80 FreeRTOS/org/Source/queue.o + .debug_macro 0x0000000000000544 0x2d5 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000819 0x10 FreeRTOS/org/Source/tasks.o + .debug_macro 0x0000000000000829 0x231 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000a5a 0x97 FreeRTOS/org/Source/timers.o + .debug_macro 0x0000000000000af1 0x1f8 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_macro 0x0000000000000ce9 0x203 FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_macro 0x0000000000000eec 0x138 SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_macro 0x0000000000001024 0x1f7 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_macro 0x000000000000121b 0x1b0 SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x00000000000013cb 0x34 SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x00000000000013ff 0x138 SEGGER/SEGGER/SEGGER_RTT.o + .debug_macro 0x0000000000001537 0x206 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x000000000000173d 0x204 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000001941 0x16e SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_macro 0x0000000000001aaf 0x1bc StdPeriph_Driver/src/stm32f4xx_gpio.o + .debug_macro 0x0000000000001c6b 0x2f5 StdPeriph_Driver/src/stm32f4xx_gpio.o + .debug_macro 0x0000000000001f60 0x28b StdPeriph_Driver/src/stm32f4xx_rcc.o + .debug_macro 0x00000000000021eb 0x1f8 StdPeriph_Driver/src/stm32f4xx_rtc.o + .debug_macro 0x00000000000023e3 0x598 StdPeriph_Driver/src/stm32f4xx_rtc.o + .debug_macro 0x000000000000297b 0x1d4 StdPeriph_Driver/src/stm32f4xx_usart.o + .debug_macro 0x0000000000002b4f 0x21d StdPeriph_Driver/src/stm32f4xx_usart.o + .debug_macro 0x0000000000002d6c 0x43a src/main.o + .debug_macro 0x00000000000031a6 0x112 src/main.o + .debug_macro 0x00000000000032b8 0x16 src/main.o + .debug_macro 0x00000000000032ce 0x10 src/main.o + .debug_macro 0x00000000000032de 0x1c src/main.o + .debug_macro 0x00000000000032fa 0x52 src/main.o + .debug_macro 0x000000000000334c 0x40 src/main.o + .debug_macro 0x000000000000338c 0x10 src/main.o + .debug_macro 0x000000000000339c 0x40 src/main.o + .debug_macro 0x00000000000033dc 0xd7 src/main.o + .debug_macro 0x00000000000034b3 0x1c src/main.o + .debug_macro 0x00000000000034cf 0x3d src/main.o + .debug_macro 0x000000000000350c 0x16 src/main.o + .debug_macro 0x0000000000003522 0x145 src/main.o + .debug_macro 0x0000000000003667 0x243 src/syscalls.o + .debug_macro 0x00000000000038aa 0x10 src/syscalls.o + .debug_macro 0x00000000000038ba 0x10 src/syscalls.o + .debug_macro 0x00000000000038ca 0x10 src/syscalls.o + .debug_macro 0x00000000000038da 0x35 src/syscalls.o + .debug_macro 0x000000000000390f 0x122 src/syscalls.o + .debug_macro 0x0000000000003a31 0x10 src/syscalls.o + .debug_macro 0x0000000000003a41 0x241 src/syscalls.o + .debug_macro 0x0000000000003c82 0x1c src/syscalls.o + .debug_macro 0x0000000000003c9e 0x10 src/syscalls.o + .debug_macro 0x0000000000003cae 0x10 src/syscalls.o + .debug_macro 0x0000000000003cbe 0x189 src/syscalls.o + .debug_macro 0x0000000000003e47 0x16 src/syscalls.o + .debug_macro 0x0000000000003e5d 0x88 src/syscalls.o + .debug_macro 0x0000000000003ee5 0x1d2 src/system_stm32f4xx.o -.debug_line 0x0000000000000000 0x76a7 - .debug_line 0x0000000000000000 0x6f3 FreeRTOS/Source/list.o - .debug_line 0x00000000000006f3 0x10bf FreeRTOS/Source/queue.o - .debug_line 0x00000000000017b2 0x142d FreeRTOS/Source/tasks.o - .debug_line 0x0000000000002bdf 0xa90 FreeRTOS/Source/timers.o - .debug_line 0x000000000000366f 0x771 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .debug_line 0x0000000000003de0 0x818 FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_line 0x00000000000045f8 0x886 StdPeriph_Driver/src/stm32f4xx_gpio.o - .debug_line 0x0000000000004e7e 0xb7a StdPeriph_Driver/src/stm32f4xx_rcc.o - .debug_line 0x00000000000059f8 0x9cc StdPeriph_Driver/src/stm32f4xx_usart.o - .debug_line 0x00000000000063c4 0xaec src/main.o - .debug_line 0x0000000000006eb0 0x77b src/system_stm32f4xx.o - .debug_line 0x000000000000762b 0x7c startup/startup_stm32.o +.debug_line 0x0000000000000000 0xceff + .debug_line 0x0000000000000000 0x8c8 FreeRTOS/org/Source/list.o + .debug_line 0x00000000000008c8 0x12ae FreeRTOS/org/Source/queue.o + .debug_line 0x0000000000001b76 0x16a5 FreeRTOS/org/Source/tasks.o + .debug_line 0x000000000000321b 0xc65 FreeRTOS/org/Source/timers.o + .debug_line 0x0000000000003e80 0x949 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_line 0x00000000000047c9 0x9ed FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_line 0x00000000000051b6 0x734 SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_line 0x00000000000058ea 0x958 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_line 0x0000000000006242 0x9fd SEGGER/SEGGER/SEGGER_RTT.o + .debug_line 0x0000000000006c3f 0x95 SEGGER/SEGGER/SEGGER_RTT_ASM_ARMv7M.o + .debug_line 0x0000000000006cd4 0x189f SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_line 0x0000000000008573 0x886 StdPeriph_Driver/src/stm32f4xx_gpio.o + .debug_line 0x0000000000008df9 0xb7a StdPeriph_Driver/src/stm32f4xx_rcc.o + .debug_line 0x0000000000009973 0xd3c StdPeriph_Driver/src/stm32f4xx_rtc.o + .debug_line 0x000000000000a6af 0x9cc StdPeriph_Driver/src/stm32f4xx_usart.o + .debug_line 0x000000000000b07b 0xf5a src/main.o + .debug_line 0x000000000000bfd5 0x733 src/syscalls.o + .debug_line 0x000000000000c708 0x77b src/system_stm32f4xx.o + .debug_line 0x000000000000ce83 0x7c startup/startup_stm32.o -.debug_str 0x0000000000000000 0x6bba9 - .debug_str 0x0000000000000000 0xa7b0 FreeRTOS/Source/list.o - 0xaa2f (size before relaxing) - .debug_str 0x000000000000a7b0 0x22cb FreeRTOS/Source/queue.o - 0xccf3 (size before relaxing) - .debug_str 0x000000000000ca7b 0x1bdd FreeRTOS/Source/tasks.o - 0xda0a (size before relaxing) - .debug_str 0x000000000000e658 0x519 FreeRTOS/Source/timers.o - 0xd0d7 (size before relaxing) - .debug_str 0x000000000000eb71 0x7e3 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - 0x9377 (size before relaxing) - .debug_str 0x000000000000f354 0x323 FreeRTOS/Source/portable/MemMang/heap_4.o - 0xbea9 (size before relaxing) - .debug_str 0x000000000000f677 0x5afbf StdPeriph_Driver/src/stm32f4xx_gpio.o +.debug_str 0x0000000000000000 0x752ea + .debug_str 0x0000000000000000 0xe75e FreeRTOS/org/Source/list.o + 0xea27 (size before relaxing) + .debug_str 0x000000000000e75e 0x22cf FreeRTOS/org/Source/queue.o + 0x10ceb (size before relaxing) + .debug_str 0x0000000000010a2d 0x1d28 FreeRTOS/org/Source/tasks.o + 0x11b50 (size before relaxing) + .debug_str 0x0000000000012755 0x51d FreeRTOS/org/Source/timers.o + 0x110cf (size before relaxing) + .debug_str 0x0000000000012c72 0x7e7 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + 0xd36f (size before relaxing) + .debug_str 0x0000000000013459 0x327 FreeRTOS/org/Source/portable/MemMang/heap_4.o + 0xfea1 (size before relaxing) + .debug_str 0x0000000000013780 0x15e SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + 0xb21e (size before relaxing) + .debug_str 0x00000000000138de 0xef SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + 0xfbf1 (size before relaxing) + .debug_str 0x00000000000139cd 0x1042 SEGGER/SEGGER/SEGGER_RTT.o + 0x7948 (size before relaxing) + .debug_str 0x0000000000014a0f 0x37 SEGGER/SEGGER/SEGGER_RTT_ASM_ARMv7M.o + 0x92 (size before relaxing) + .debug_str 0x0000000000014a46 0xf49 SEGGER/SEGGER/SEGGER_SYSVIEW.o + 0x9906 (size before relaxing) + .debug_str 0x000000000001598f 0x5afbf StdPeriph_Driver/src/stm32f4xx_gpio.o 0x5ecc3 (size before relaxing) - .debug_str 0x000000000006a636 0xdb7 StdPeriph_Driver/src/stm32f4xx_rcc.o + .debug_str 0x000000000007094e 0xdb7 StdPeriph_Driver/src/stm32f4xx_rcc.o 0x5f7d0 (size before relaxing) - .debug_str 0x000000000006b3ed 0x53a StdPeriph_Driver/src/stm32f4xx_usart.o + .debug_str 0x0000000000071705 0xb8a StdPeriph_Driver/src/stm32f4xx_rtc.o + 0x5f5c4 (size before relaxing) + .debug_str 0x000000000007228f 0x53a StdPeriph_Driver/src/stm32f4xx_usart.o 0x5efd6 (size before relaxing) - .debug_str 0x000000000006b927 0x13e src/main.o - 0x66b5b (size before relaxing) - .debug_str 0x000000000006ba65 0x11b src/system_stm32f4xx.o + .debug_str 0x00000000000727c9 0x1ab6 src/main.o + 0x6d552 (size before relaxing) + .debug_str 0x000000000007427f 0xf89 src/syscalls.o + 0x8919 (size before relaxing) + .debug_str 0x0000000000075208 0xc7 src/system_stm32f4xx.o 0x5ec16 (size before relaxing) - .debug_str 0x000000000006bb80 0x29 startup/startup_stm32.o + .debug_str 0x00000000000752cf 0x1b startup/startup_stm32.o 0x84 (size before relaxing) .comment 0x0000000000000000 0x7b - .comment 0x0000000000000000 0x7b FreeRTOS/Source/list.o + .comment 0x0000000000000000 0x7b FreeRTOS/org/Source/list.o 0x7c (size before relaxing) - .comment 0x000000000000007b 0x7c FreeRTOS/Source/queue.o - .comment 0x000000000000007b 0x7c FreeRTOS/Source/tasks.o - .comment 0x000000000000007b 0x7c FreeRTOS/Source/timers.o - .comment 0x000000000000007b 0x7c FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .comment 0x000000000000007b 0x7c FreeRTOS/Source/portable/MemMang/heap_4.o + .comment 0x000000000000007b 0x7c FreeRTOS/org/Source/queue.o + .comment 0x000000000000007b 0x7c FreeRTOS/org/Source/tasks.o + .comment 0x000000000000007b 0x7c FreeRTOS/org/Source/timers.o + .comment 0x000000000000007b 0x7c FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .comment 0x000000000000007b 0x7c FreeRTOS/org/Source/portable/MemMang/heap_4.o + .comment 0x000000000000007b 0x7c SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .comment 0x000000000000007b 0x7c SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .comment 0x000000000000007b 0x7c SEGGER/SEGGER/SEGGER_RTT.o + .comment 0x000000000000007b 0x7c SEGGER/SEGGER/SEGGER_SYSVIEW.o .comment 0x000000000000007b 0x7c StdPeriph_Driver/src/stm32f4xx_gpio.o .comment 0x000000000000007b 0x7c StdPeriph_Driver/src/stm32f4xx_rcc.o + .comment 0x000000000000007b 0x7c StdPeriph_Driver/src/stm32f4xx_rtc.o .comment 0x000000000000007b 0x7c StdPeriph_Driver/src/stm32f4xx_usart.o .comment 0x000000000000007b 0x7c src/main.o + .comment 0x000000000000007b 0x7c src/syscalls.o .comment 0x000000000000007b 0x7c src/system_stm32f4xx.o -.debug_frame 0x0000000000000000 0x2614 - .debug_frame 0x0000000000000000 0xd8 FreeRTOS/Source/list.o - .debug_frame 0x00000000000000d8 0x534 FreeRTOS/Source/queue.o - .debug_frame 0x000000000000060c 0x894 FreeRTOS/Source/tasks.o - .debug_frame 0x0000000000000ea0 0x38c FreeRTOS/Source/timers.o - .debug_frame 0x000000000000122c 0x1a8 FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o - .debug_frame 0x00000000000013d4 0x12c FreeRTOS/Source/portable/MemMang/heap_4.o - .debug_frame 0x0000000000001500 0x23c StdPeriph_Driver/src/stm32f4xx_gpio.o - .debug_frame 0x000000000000173c 0x83c StdPeriph_Driver/src/stm32f4xx_rcc.o - .debug_frame 0x0000000000001f78 0x490 StdPeriph_Driver/src/stm32f4xx_usart.o - .debug_frame 0x0000000000002408 0x11c src/main.o - .debug_frame 0x0000000000002524 0x7c src/system_stm32f4xx.o - .debug_frame 0x00000000000025a0 0x2c /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-init.o) - .debug_frame 0x00000000000025cc 0x28 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memcpy-stub.o) - .debug_frame 0x00000000000025f4 0x20 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memset.o) +.debug_frame 0x0000000000000000 0x4a04 + .debug_frame 0x0000000000000000 0xd8 FreeRTOS/org/Source/list.o + .debug_frame 0x00000000000000d8 0x544 FreeRTOS/org/Source/queue.o + .debug_frame 0x000000000000061c 0x8fc FreeRTOS/org/Source/tasks.o + .debug_frame 0x0000000000000f18 0x38c FreeRTOS/org/Source/timers.o + .debug_frame 0x00000000000012a4 0x1a8 FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o + .debug_frame 0x000000000000144c 0x12c FreeRTOS/org/Source/portable/MemMang/heap_4.o + .debug_frame 0x0000000000001578 0x48 SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + .debug_frame 0x00000000000015c0 0x100 SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + .debug_frame 0x00000000000016c0 0x530 SEGGER/SEGGER/SEGGER_RTT.o + .debug_frame 0x0000000000001bf0 0xbc4 SEGGER/SEGGER/SEGGER_SYSVIEW.o + .debug_frame 0x00000000000027b4 0x23c StdPeriph_Driver/src/stm32f4xx_gpio.o + .debug_frame 0x00000000000029f0 0x83c StdPeriph_Driver/src/stm32f4xx_rcc.o + .debug_frame 0x000000000000322c 0x8b0 StdPeriph_Driver/src/stm32f4xx_rtc.o + .debug_frame 0x0000000000003adc 0x490 StdPeriph_Driver/src/stm32f4xx_usart.o + .debug_frame 0x0000000000003f6c 0x390 src/main.o + .debug_frame 0x00000000000042fc 0x2d0 src/syscalls.o + .debug_frame 0x00000000000045cc 0x7c src/system_stm32f4xx.o + .debug_frame 0x0000000000004648 0x20 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-errno.o) + .debug_frame 0x0000000000004668 0x2c /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-init.o) + .debug_frame 0x0000000000004694 0x2c /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memcmp.o) + .debug_frame 0x00000000000046c0 0x28 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memcpy-stub.o) + .debug_frame 0x00000000000046e8 0x20 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memset.o) + .debug_frame 0x0000000000004708 0x6c /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-sprintf.o) + .debug_frame 0x0000000000004774 0x90 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-svfprintf.o) + .debug_frame 0x0000000000004804 0x60 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-vfprintf_i.o) + .debug_frame 0x0000000000004864 0x28 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-memmove.o) + .debug_frame 0x000000000000488c 0x38 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-freer.o) + .debug_frame 0x00000000000048c4 0x2c /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-mallocr.o) + .debug_frame 0x00000000000048f0 0x3c /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-reallocr.o) + .debug_frame 0x000000000000492c 0x2c /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-sbrkr.o) + .debug_frame 0x0000000000004958 0x30 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-mlock.o) + .debug_frame 0x0000000000004988 0x20 /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-nano-msizer.o) + .debug_frame 0x00000000000049a8 0x5c /opt/st/stm32cubeide_1.3.0_2/plugins/com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.linux64_1.0.0.201904181610/tools/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m/fpv4-sp/hard/libc_nano.a(lib_a-reent.o) diff --git a/Debug/SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.d b/Debug/SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.d new file mode 100644 index 0000000..0181499 --- /dev/null +++ b/Debug/SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.d @@ -0,0 +1,44 @@ +SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o: \ + ../SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.c \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/FreeRTOS.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/Global.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_SYSVIEW_Conf.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/projdefs.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/portable.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/deprecated_definitions.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/mpu_wrappers.h + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/FreeRTOS.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/Global.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_SYSVIEW_Conf.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/projdefs.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/portable.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/deprecated_definitions.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/mpu_wrappers.h: diff --git a/Debug/SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o b/Debug/SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o new file mode 100644 index 0000000..1adbef3 Binary files /dev/null and b/Debug/SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o differ diff --git a/Debug/SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.su b/Debug/SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.su new file mode 100644 index 0000000..96233a9 --- /dev/null +++ b/Debug/SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.su @@ -0,0 +1,2 @@ +SEGGER_SYSVIEW_Config_FreeRTOS.c:87:13:_cbSendSystemDesc 8 static +SEGGER_SYSVIEW_Config_FreeRTOS.c:98:6:SEGGER_SYSVIEW_Conf 8 static diff --git a/Debug/SEGGER/Config/subdir.mk b/Debug/SEGGER/Config/subdir.mk new file mode 100644 index 0000000..6440a8e --- /dev/null +++ b/Debug/SEGGER/Config/subdir.mk @@ -0,0 +1,19 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.c + +OBJS += \ +./SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o + +C_DEPS += \ +./SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.d + + +# Each subdirectory must supply rules for building sources it contributes +SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o: ../SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.c + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + diff --git a/Debug/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.d b/Debug/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.d new file mode 100644 index 0000000..22c4ca1 --- /dev/null +++ b/Debug/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.d @@ -0,0 +1,53 @@ +SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o: \ + ../SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.c \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/FreeRTOS.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/Global.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_SYSVIEW_Conf.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/projdefs.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/portable.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/deprecated_definitions.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/mpu_wrappers.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/list.h \ + ../SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/FreeRTOS.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/Global.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_SYSVIEW_Conf.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/projdefs.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/portable.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/deprecated_definitions.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/mpu_wrappers.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/list.h: + +../SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h: diff --git a/Debug/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o b/Debug/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o new file mode 100644 index 0000000..964fc42 Binary files /dev/null and b/Debug/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o differ diff --git a/Debug/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.su b/Debug/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.su new file mode 100644 index 0000000..b13be57 --- /dev/null +++ b/Debug/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.su @@ -0,0 +1,6 @@ +SEGGER_SYSVIEW_FreeRTOS.c:84:13:_cbSendTaskList 40 static +SEGGER_SYSVIEW_FreeRTOS.c:104:12:_cbGetTime 32 static +SEGGER_SYSVIEW_FreeRTOS.c:126:6:SYSVIEW_AddTask 32 static +SEGGER_SYSVIEW_FreeRTOS.c:156:6:SYSVIEW_UpdateTask 40 static +SEGGER_SYSVIEW_FreeRTOS.c:187:6:SYSVIEW_DeleteTask 24 static +SEGGER_SYSVIEW_FreeRTOS.c:228:6:SYSVIEW_SendTaskInfo 48 static diff --git a/Debug/SEGGER/OS/subdir.mk b/Debug/SEGGER/OS/subdir.mk new file mode 100644 index 0000000..cfd1635 --- /dev/null +++ b/Debug/SEGGER/OS/subdir.mk @@ -0,0 +1,19 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.c + +OBJS += \ +./SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o + +C_DEPS += \ +./SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.d + + +# Each subdirectory must supply rules for building sources it contributes +SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o: ../SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.c + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + diff --git a/Debug/SEGGER/SEGGER/SEGGER_RTT.d b/Debug/SEGGER/SEGGER/SEGGER_RTT.d new file mode 100644 index 0000000..dcd543c --- /dev/null +++ b/Debug/SEGGER/SEGGER/SEGGER_RTT.d @@ -0,0 +1,7 @@ +SEGGER/SEGGER/SEGGER_RTT.o: ../SEGGER/SEGGER/SEGGER_RTT.c \ + ../SEGGER/SEGGER/SEGGER_RTT.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h + +../SEGGER/SEGGER/SEGGER_RTT.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h: diff --git a/Debug/SEGGER/SEGGER/SEGGER_RTT.o b/Debug/SEGGER/SEGGER/SEGGER_RTT.o new file mode 100644 index 0000000..0aa6a8a Binary files /dev/null and b/Debug/SEGGER/SEGGER/SEGGER_RTT.o differ diff --git a/Debug/SEGGER/SEGGER/SEGGER_RTT.su b/Debug/SEGGER/SEGGER/SEGGER_RTT.su new file mode 100644 index 0000000..b36ad60 --- /dev/null +++ b/Debug/SEGGER/SEGGER/SEGGER_RTT.su @@ -0,0 +1,36 @@ +SEGGER_RTT.c:301:13:_DoInit 16 static,ignoring_inline_asm +SEGGER_RTT.c:359:17:_WriteBlocking 48 static,ignoring_inline_asm +SEGGER_RTT.c:421:13:_WriteNoCheck 40 static,ignoring_inline_asm +SEGGER_RTT.c:489:13:_PostTerminalSwitch 24 static +SEGGER_RTT.c:511:17:_GetAvailWriteSpace 32 static +SEGGER_RTT.c:558:10:SEGGER_RTT_ReadUpBufferNoLock 56 static +SEGGER_RTT.c:650:10:SEGGER_RTT_ReadNoLock 56 static +SEGGER_RTT.c:747:10:SEGGER_RTT_ReadUpBuffer 32 static,ignoring_inline_asm +SEGGER_RTT.c:779:10:SEGGER_RTT_Read 32 static,ignoring_inline_asm +SEGGER_RTT.c:818:6:SEGGER_RTT_WriteWithOverwriteNoLock 40 static,ignoring_inline_asm +SEGGER_RTT.c:1009:10:SEGGER_RTT_WriteDownBufferNoLock 40 static +SEGGER_RTT.c:1084:10:SEGGER_RTT_WriteNoLock 40 static +SEGGER_RTT.c:1160:10:SEGGER_RTT_WriteDownBuffer 40 static,ignoring_inline_asm +SEGGER_RTT.c:1189:10:SEGGER_RTT_Write 40 static,ignoring_inline_asm +SEGGER_RTT.c:1219:10:SEGGER_RTT_WriteString 24 static +SEGGER_RTT.c:1249:10:SEGGER_RTT_PutCharSkipNoLock 32 static,ignoring_inline_asm +SEGGER_RTT.c:1299:10:SEGGER_RTT_PutCharSkip 40 static,ignoring_inline_asm +SEGGER_RTT.c:1358:10:SEGGER_RTT_PutChar 40 static,ignoring_inline_asm +SEGGER_RTT.c:1421:5:SEGGER_RTT_GetKey 16 static +SEGGER_RTT.c:1449:5:SEGGER_RTT_WaitKey 16 static +SEGGER_RTT.c:1472:5:SEGGER_RTT_HasKey 24 static +SEGGER_RTT.c:1500:10:SEGGER_RTT_HasData 24 static +SEGGER_RTT.c:1521:10:SEGGER_RTT_HasDataUp 24 static +SEGGER_RTT.c:1549:5:SEGGER_RTT_AllocDownBuffer 40 static,ignoring_inline_asm +SEGGER_RTT.c:1597:5:SEGGER_RTT_AllocUpBuffer 40 static,ignoring_inline_asm +SEGGER_RTT.c:1651:5:SEGGER_RTT_ConfigUpBuffer 40 static,ignoring_inline_asm +SEGGER_RTT.c:1700:5:SEGGER_RTT_ConfigDownBuffer 40 static,ignoring_inline_asm +SEGGER_RTT.c:1741:5:SEGGER_RTT_SetNameUpBuffer 32 static,ignoring_inline_asm +SEGGER_RTT.c:1774:5:SEGGER_RTT_SetNameDownBuffer 32 static,ignoring_inline_asm +SEGGER_RTT.c:1807:5:SEGGER_RTT_SetFlagsUpBuffer 32 static,ignoring_inline_asm +SEGGER_RTT.c:1840:5:SEGGER_RTT_SetFlagsDownBuffer 32 static,ignoring_inline_asm +SEGGER_RTT.c:1866:6:SEGGER_RTT_Init 8 static +SEGGER_RTT.c:1887:5:SEGGER_RTT_SetTerminal 40 static,ignoring_inline_asm +SEGGER_RTT.c:1936:5:SEGGER_RTT_TerminalOut 40 static,ignoring_inline_asm +SEGGER_RTT.c:2024:10:SEGGER_RTT_GetAvailWriteSpace 24 static +SEGGER_RTT.c:2045:10:SEGGER_RTT_GetBytesInBuffer 32 static diff --git a/Debug/SEGGER/SEGGER/SEGGER_RTT_ASM_ARMv7M.o b/Debug/SEGGER/SEGGER/SEGGER_RTT_ASM_ARMv7M.o new file mode 100644 index 0000000..0e6cf79 Binary files /dev/null and b/Debug/SEGGER/SEGGER/SEGGER_RTT_ASM_ARMv7M.o differ diff --git a/Debug/SEGGER/SEGGER/SEGGER_SYSVIEW.d b/Debug/SEGGER/SEGGER/SEGGER_SYSVIEW.d new file mode 100644 index 0000000..4ca764f --- /dev/null +++ b/Debug/SEGGER/SEGGER/SEGGER_SYSVIEW.d @@ -0,0 +1,24 @@ +SEGGER/SEGGER/SEGGER_SYSVIEW.o: ../SEGGER/SEGGER/SEGGER_SYSVIEW.c \ + ../SEGGER/SEGGER/SEGGER_SYSVIEW_Int.h ../SEGGER/SEGGER/SEGGER_SYSVIEW.h \ + ../SEGGER/SEGGER/SEGGER.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/Global.h \ + ../SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_SYSVIEW_Conf.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h \ + ../SEGGER/SEGGER/SEGGER_RTT.h + +../SEGGER/SEGGER/SEGGER_SYSVIEW_Int.h: + +../SEGGER/SEGGER/SEGGER_SYSVIEW.h: + +../SEGGER/SEGGER/SEGGER.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/Global.h: + +../SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_SYSVIEW_Conf.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h: + +../SEGGER/SEGGER/SEGGER_RTT.h: diff --git a/Debug/SEGGER/SEGGER/SEGGER_SYSVIEW.o b/Debug/SEGGER/SEGGER/SEGGER_SYSVIEW.o new file mode 100644 index 0000000..c0846c1 Binary files /dev/null and b/Debug/SEGGER/SEGGER/SEGGER_SYSVIEW.o differ diff --git a/Debug/SEGGER/SEGGER/SEGGER_SYSVIEW.su b/Debug/SEGGER/SEGGER/SEGGER_SYSVIEW.su new file mode 100644 index 0000000..1f640bc --- /dev/null +++ b/Debug/SEGGER/SEGGER/SEGGER_SYSVIEW.su @@ -0,0 +1,77 @@ +SEGGER_SYSVIEW.c:461:12:_EncodeData 32 static +SEGGER_SYSVIEW.c:495:12:_EncodeStr 32 static +SEGGER_SYSVIEW.c:547:12:_PreparePacket 16 static +SEGGER_SYSVIEW.c:564:13:_HandleIncomingPacket 16 static +SEGGER_SYSVIEW.c:631:12:_TrySendOverflowPacket 56 static +SEGGER_SYSVIEW.c:736:13:_SendPacket 48 static +SEGGER_SYSVIEW.c:877:12:_VPrintHost 144 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:958:13:_StoreChar 48 static +SEGGER_SYSVIEW.c:1000:13:_PrintUnsigned 48 static +SEGGER_SYSVIEW.c:1091:13:_PrintInt 40 static +SEGGER_SYSVIEW.c:1164:13:_VPrintTarget 104 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:1340:6:SEGGER_SYSVIEW_Init 32 static +SEGGER_SYSVIEW.c:1391:6:SEGGER_SYSVIEW_SetRAMBase 16 static +SEGGER_SYSVIEW.c:1405:6:SEGGER_SYSVIEW_RecordVoid 24 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:1425:6:SEGGER_SYSVIEW_RecordU32 40 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:1448:6:SEGGER_SYSVIEW_RecordU32x2 56 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:1473:6:SEGGER_SYSVIEW_RecordU32x3 64 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:1500:6:SEGGER_SYSVIEW_RecordU32x4 72 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:1529:6:SEGGER_SYSVIEW_RecordU32x5 80 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:1560:6:SEGGER_SYSVIEW_RecordU32x6 88 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:1593:6:SEGGER_SYSVIEW_RecordU32x7 96 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:1628:6:SEGGER_SYSVIEW_RecordU32x8 104 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:1665:6:SEGGER_SYSVIEW_RecordU32x9 112 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:1704:6:SEGGER_SYSVIEW_RecordU32x10 120 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:1739:6:SEGGER_SYSVIEW_RecordString 32 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:1775:6:SEGGER_SYSVIEW_Start 56 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:1830:6:SEGGER_SYSVIEW_Stop 16 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:1848:5:SEGGER_SYSVIEW_GetChannelID 4 static +SEGGER_SYSVIEW.c:1860:6:SEGGER_SYSVIEW_GetSysDesc 56 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:1888:6:SEGGER_SYSVIEW_SendTaskInfo 80 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:1915:6:SEGGER_SYSVIEW_SendTaskList 8 static +SEGGER_SYSVIEW.c:1945:6:SEGGER_SYSVIEW_SendSysDesc 32 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:1963:6:SEGGER_SYSVIEW_RecordSystime 24 static +SEGGER_SYSVIEW.c:1987:6:SEGGER_SYSVIEW_RecordEnterISR 32 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:2014:6:SEGGER_SYSVIEW_RecordExitISR 16 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:2036:6:SEGGER_SYSVIEW_RecordExitISRToScheduler 16 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:2054:6:SEGGER_SYSVIEW_RecordEnterTimer 40 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:2072:6:SEGGER_SYSVIEW_RecordExitTimer 16 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:2090:6:SEGGER_SYSVIEW_RecordEndCall 40 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:2112:6:SEGGER_SYSVIEW_RecordEndCallU32 48 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:2131:6:SEGGER_SYSVIEW_OnIdle 16 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:2150:6:SEGGER_SYSVIEW_OnTaskCreate 40 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:2175:6:SEGGER_SYSVIEW_OnTaskTerminate 40 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:2199:6:SEGGER_SYSVIEW_OnTaskStartExec 40 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:2219:6:SEGGER_SYSVIEW_OnTaskStopExec 16 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:2237:6:SEGGER_SYSVIEW_OnTaskStartReady 40 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:2260:6:SEGGER_SYSVIEW_OnTaskStopReady 48 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:2283:6:SEGGER_SYSVIEW_MarkStart 40 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:2304:6:SEGGER_SYSVIEW_MarkStop 40 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:2325:6:SEGGER_SYSVIEW_Mark 48 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:2352:6:SEGGER_SYSVIEW_NameMarker 48 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:2380:6:SEGGER_SYSVIEW_NameResource 40 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:2409:5:SEGGER_SYSVIEW_SendPacket 32 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:2436:5:SEGGER_SYSVIEW_EncodeU32 24 static +SEGGER_SYSVIEW.c:2463:5:SEGGER_SYSVIEW_EncodeString 24 static +SEGGER_SYSVIEW.c:2489:5:SEGGER_SYSVIEW_EncodeData 24 static +SEGGER_SYSVIEW.c:2517:5:SEGGER_SYSVIEW_EncodeId 24 static +SEGGER_SYSVIEW.c:2545:5:SEGGER_SYSVIEW_ShrinkId 16 static +SEGGER_SYSVIEW.c:2567:6:SEGGER_SYSVIEW_RegisterModule 24 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:2608:6:SEGGER_SYSVIEW_RecordModuleDescription 56 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:2649:6:SEGGER_SYSVIEW_SendModule 56 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:2688:6:SEGGER_SYSVIEW_SendModuleDescription 16 static +SEGGER_SYSVIEW.c:2709:6:SEGGER_SYSVIEW_SendNumModules 32 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:2736:6:SEGGER_SYSVIEW_PrintfHostEx 28 static +SEGGER_SYSVIEW.c:2770:6:SEGGER_SYSVIEW_PrintfHost 16 static +SEGGER_SYSVIEW.c:2805:6:SEGGER_SYSVIEW_WarnfHost 16 static +SEGGER_SYSVIEW.c:2840:6:SEGGER_SYSVIEW_ErrorfHost 16 static +SEGGER_SYSVIEW.c:2873:6:SEGGER_SYSVIEW_PrintfTargetEx 28 static +SEGGER_SYSVIEW.c:2892:6:SEGGER_SYSVIEW_PrintfTarget 16 static +SEGGER_SYSVIEW.c:2911:6:SEGGER_SYSVIEW_WarnfTarget 16 static +SEGGER_SYSVIEW.c:2930:6:SEGGER_SYSVIEW_ErrorfTarget 16 static +SEGGER_SYSVIEW.c:2949:6:SEGGER_SYSVIEW_Print 48 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:2971:6:SEGGER_SYSVIEW_Warn 48 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:2993:6:SEGGER_SYSVIEW_Error 48 static,ignoring_inline_asm +SEGGER_SYSVIEW.c:3015:6:SEGGER_SYSVIEW_EnableEvents 16 static +SEGGER_SYSVIEW.c:3029:6:SEGGER_SYSVIEW_DisableEvents 16 static +SEGGER_SYSVIEW.c:3044:5:SEGGER_SYSVIEW_IsStarted 8 static diff --git a/Debug/SEGGER/SEGGER/subdir.mk b/Debug/SEGGER/SEGGER/subdir.mk new file mode 100644 index 0000000..5d05fcc --- /dev/null +++ b/Debug/SEGGER/SEGGER/subdir.mk @@ -0,0 +1,30 @@ +################################################################################ +# Automatically-generated file. Do not edit! +################################################################################ + +# Add inputs and outputs from these tool invocations to the build variables +C_SRCS += \ +../SEGGER/SEGGER/SEGGER_RTT.c \ +../SEGGER/SEGGER/SEGGER_SYSVIEW.c + +S_UPPER_SRCS += \ +../SEGGER/SEGGER/SEGGER_RTT_ASM_ARMv7M.S + +OBJS += \ +./SEGGER/SEGGER/SEGGER_RTT.o \ +./SEGGER/SEGGER/SEGGER_RTT_ASM_ARMv7M.o \ +./SEGGER/SEGGER/SEGGER_SYSVIEW.o + +C_DEPS += \ +./SEGGER/SEGGER/SEGGER_RTT.d \ +./SEGGER/SEGGER/SEGGER_SYSVIEW.d + + +# Each subdirectory must supply rules for building sources it contributes +SEGGER/SEGGER/SEGGER_RTT.o: ../SEGGER/SEGGER/SEGGER_RTT.c + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"SEGGER/SEGGER/SEGGER_RTT.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" +SEGGER/SEGGER/%.o: ../SEGGER/SEGGER/%.S + arm-none-eabi-gcc -mcpu=cortex-m4 -g3 -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -x assembler-with-cpp --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" "$<" +SEGGER/SEGGER/SEGGER_SYSVIEW.o: ../SEGGER/SEGGER/SEGGER_SYSVIEW.c + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"SEGGER/SEGGER/SEGGER_SYSVIEW.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + diff --git a/Debug/StdPeriph_Driver/src/subdir.mk b/Debug/StdPeriph_Driver/src/subdir.mk index 866c759..126b1cb 100644 --- a/Debug/StdPeriph_Driver/src/subdir.mk +++ b/Debug/StdPeriph_Driver/src/subdir.mk @@ -141,89 +141,89 @@ C_DEPS += \ # Each subdirectory must supply rules for building sources it contributes StdPeriph_Driver/src/misc.o: ../StdPeriph_Driver/src/misc.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/misc.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/misc.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_adc.o: ../StdPeriph_Driver/src/stm32f4xx_adc.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_adc.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_adc.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_can.o: ../StdPeriph_Driver/src/stm32f4xx_can.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_can.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_can.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_cec.o: ../StdPeriph_Driver/src/stm32f4xx_cec.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_cec.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_cec.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_crc.o: ../StdPeriph_Driver/src/stm32f4xx_crc.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_crc.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_crc.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_cryp.o: ../StdPeriph_Driver/src/stm32f4xx_cryp.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_cryp.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_cryp.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_cryp_aes.o: ../StdPeriph_Driver/src/stm32f4xx_cryp_aes.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_cryp_aes.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_cryp_aes.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_cryp_des.o: ../StdPeriph_Driver/src/stm32f4xx_cryp_des.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_cryp_des.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_cryp_des.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_cryp_tdes.o: ../StdPeriph_Driver/src/stm32f4xx_cryp_tdes.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_cryp_tdes.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_cryp_tdes.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_dac.o: ../StdPeriph_Driver/src/stm32f4xx_dac.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_dac.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_dac.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_dbgmcu.o: ../StdPeriph_Driver/src/stm32f4xx_dbgmcu.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_dbgmcu.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_dbgmcu.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_dcmi.o: ../StdPeriph_Driver/src/stm32f4xx_dcmi.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_dcmi.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_dcmi.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_dfsdm.o: ../StdPeriph_Driver/src/stm32f4xx_dfsdm.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_dfsdm.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_dfsdm.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_dma.o: ../StdPeriph_Driver/src/stm32f4xx_dma.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_dma.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_dma.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_dma2d.o: ../StdPeriph_Driver/src/stm32f4xx_dma2d.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_dma2d.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_dma2d.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_dsi.o: ../StdPeriph_Driver/src/stm32f4xx_dsi.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_dsi.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_dsi.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_exti.o: ../StdPeriph_Driver/src/stm32f4xx_exti.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_exti.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_exti.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_flash.o: ../StdPeriph_Driver/src/stm32f4xx_flash.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_flash.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_flash.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_flash_ramfunc.o: ../StdPeriph_Driver/src/stm32f4xx_flash_ramfunc.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_flash_ramfunc.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_flash_ramfunc.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_fmc.o: ../StdPeriph_Driver/src/stm32f4xx_fmc.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_fmc.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_fmc.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_fmip2c.o: ../StdPeriph_Driver/src/stm32f4xx_fmip2c.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_fmip2c.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_fmip2c.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_fsmc.o: ../StdPeriph_Driver/src/stm32f4xx_fsmc.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_fsmc.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_fsmc.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_gpio.o: ../StdPeriph_Driver/src/stm32f4xx_gpio.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_gpio.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_gpio.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_hash.o: ../StdPeriph_Driver/src/stm32f4xx_hash.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_hash.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_hash.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_hash_md5.o: ../StdPeriph_Driver/src/stm32f4xx_hash_md5.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_hash_md5.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_hash_md5.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_hash_sha1.o: ../StdPeriph_Driver/src/stm32f4xx_hash_sha1.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_hash_sha1.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_hash_sha1.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_i2c.o: ../StdPeriph_Driver/src/stm32f4xx_i2c.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_i2c.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_i2c.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_iwdg.o: ../StdPeriph_Driver/src/stm32f4xx_iwdg.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_iwdg.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_iwdg.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_lptim.o: ../StdPeriph_Driver/src/stm32f4xx_lptim.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_lptim.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_lptim.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_ltdc.o: ../StdPeriph_Driver/src/stm32f4xx_ltdc.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_ltdc.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_ltdc.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_pwr.o: ../StdPeriph_Driver/src/stm32f4xx_pwr.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_pwr.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_pwr.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_qspi.o: ../StdPeriph_Driver/src/stm32f4xx_qspi.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_qspi.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_qspi.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_rcc.o: ../StdPeriph_Driver/src/stm32f4xx_rcc.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_rcc.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_rcc.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_rng.o: ../StdPeriph_Driver/src/stm32f4xx_rng.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_rng.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_rng.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_rtc.o: ../StdPeriph_Driver/src/stm32f4xx_rtc.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_rtc.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_rtc.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_sai.o: ../StdPeriph_Driver/src/stm32f4xx_sai.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_sai.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_sai.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_sdio.o: ../StdPeriph_Driver/src/stm32f4xx_sdio.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_sdio.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_sdio.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_spdifrx.o: ../StdPeriph_Driver/src/stm32f4xx_spdifrx.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_spdifrx.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_spdifrx.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_spi.o: ../StdPeriph_Driver/src/stm32f4xx_spi.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_spi.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_spi.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_syscfg.o: ../StdPeriph_Driver/src/stm32f4xx_syscfg.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_syscfg.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_syscfg.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_tim.o: ../StdPeriph_Driver/src/stm32f4xx_tim.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_tim.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_tim.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_usart.o: ../StdPeriph_Driver/src/stm32f4xx_usart.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_usart.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_usart.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" StdPeriph_Driver/src/stm32f4xx_wwdg.o: ../StdPeriph_Driver/src/stm32f4xx_wwdg.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_wwdg.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"StdPeriph_Driver/src/stm32f4xx_wwdg.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" diff --git a/Debug/makefile b/Debug/makefile index 500404c..aa7682e 100644 --- a/Debug/makefile +++ b/Debug/makefile @@ -11,9 +11,12 @@ RM := rm -rf -include startup/subdir.mk -include src/subdir.mk -include StdPeriph_Driver/src/subdir.mk --include FreeRTOS/Source/portable/MemMang/subdir.mk --include FreeRTOS/Source/portable/GCC/ARM_CM4F/subdir.mk --include FreeRTOS/Source/subdir.mk +-include SEGGER/SEGGER/subdir.mk +-include SEGGER/OS/subdir.mk +-include SEGGER/Config/subdir.mk +-include FreeRTOS/org/Source/portable/MemMang/subdir.mk +-include FreeRTOS/org/Source/portable/GCC/ARM_CM4F/subdir.mk +-include FreeRTOS/org/Source/subdir.mk -include subdir.mk -include objects.mk diff --git a/Debug/objects.list b/Debug/objects.list index 23974dc..56fd549 100644 --- a/Debug/objects.list +++ b/Debug/objects.list @@ -1,12 +1,17 @@ -"FreeRTOS/Source/croutine.o" -"FreeRTOS/Source/event_groups.o" -"FreeRTOS/Source/list.o" -"FreeRTOS/Source/queue.o" -"FreeRTOS/Source/stream_buffer.o" -"FreeRTOS/Source/tasks.o" -"FreeRTOS/Source/timers.o" -"FreeRTOS/Source/portable/GCC/ARM_CM4F/port.o" -"FreeRTOS/Source/portable/MemMang/heap_4.o" +"FreeRTOS/org/Source/croutine.o" +"FreeRTOS/org/Source/event_groups.o" +"FreeRTOS/org/Source/list.o" +"FreeRTOS/org/Source/queue.o" +"FreeRTOS/org/Source/stream_buffer.o" +"FreeRTOS/org/Source/tasks.o" +"FreeRTOS/org/Source/timers.o" +"FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.o" +"FreeRTOS/org/Source/portable/MemMang/heap_4.o" +"SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.o" +"SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.o" +"SEGGER/SEGGER/SEGGER_RTT.o" +"SEGGER/SEGGER/SEGGER_RTT_ASM_ARMv7M.o" +"SEGGER/SEGGER/SEGGER_SYSVIEW.o" "StdPeriph_Driver/src/misc.o" "StdPeriph_Driver/src/stm32f4xx_adc.o" "StdPeriph_Driver/src/stm32f4xx_can.o" diff --git a/Debug/sources.mk b/Debug/sources.mk index 4d4aee6..e27789e 100644 --- a/Debug/sources.mk +++ b/Debug/sources.mk @@ -17,9 +17,12 @@ OBJCOPY_BIN := # Every subdirectory with source files must be described here SUBDIRS := \ -FreeRTOS/Source \ -FreeRTOS/Source/portable/GCC/ARM_CM4F \ -FreeRTOS/Source/portable/MemMang \ +FreeRTOS/org/Source \ +FreeRTOS/org/Source/portable/GCC/ARM_CM4F \ +FreeRTOS/org/Source/portable/MemMang \ +SEGGER/Config \ +SEGGER/OS \ +SEGGER/SEGGER \ StdPeriph_Driver/src \ src \ startup \ diff --git a/Debug/src/main.d b/Debug/src/main.d index e3b1e83..333b735 100644 --- a/Debug/src/main.d +++ b/Debug/src/main.d @@ -31,15 +31,25 @@ src/main.o: ../src/main.c \ /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc/stm32f4xx_can.h \ /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc/stm32f4xx_dac.h \ /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc/stm32f4xx_dcmi.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/FreeRTOS.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/FreeRTOS.h \ /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/projdefs.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/portable.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/deprecated_definitions.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/mpu_wrappers.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/task.h \ - /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/list.h + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/Global.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_SYSVIEW_Conf.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/projdefs.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/portable.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/deprecated_definitions.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/mpu_wrappers.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/list.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/queue.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h \ + /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/timers.h /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device/stm32f4xx.h: @@ -105,20 +115,40 @@ src/main.o: ../src/main.c \ /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc/stm32f4xx_dcmi.h: -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/FreeRTOS.h: +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/FreeRTOS.h: /home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc/FreeRTOSConfig.h: -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/projdefs.h: +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h: -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/portable.h: +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW.h: -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/deprecated_definitions.h: +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER.h: -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h: +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/Global.h: -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/mpu_wrappers.h: +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h: -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/task.h: +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_SYSVIEW_Conf.h: -/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include/list.h: +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config/SEGGER_RTT_Conf.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/projdefs.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/portable.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/deprecated_definitions.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/mpu_wrappers.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/list.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/queue.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/task.h: + +/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include/timers.h: diff --git a/Debug/src/main.o b/Debug/src/main.o index 0234fd3..15f968c 100644 Binary files a/Debug/src/main.o and b/Debug/src/main.o differ diff --git a/Debug/src/main.su b/Debug/src/main.su index 8959eb5..b689cec 100644 --- a/Debug/src/main.su +++ b/Debug/src/main.su @@ -1,8 +1,25 @@ -main.c:39:5:main 16 static -main.c:68:6:vTask1_Handler 16 static,ignoring_inline_asm -main.c:83:6:vTask2_Handler 16 static,ignoring_inline_asm -main.c:99:6:vTask3_Handler 16 static,ignoring_inline_asm -main.c:115:6:vTask4_Handler 16 static,ignoring_inline_asm -main.c:132:6:Init_GPIO_LED 16 static -main.c:153:6:Init_UART 32 static -main.c:190:6:printmsg 24 static +core_cm4.h:1547:22:NVIC_EnableIRQ 16 static +core_cm4.h:1559:22:NVIC_DisableIRQ 16 static +core_cm4.h:1629:22:NVIC_SetPriority 16 static +main.c:80:5:main 16 static +main.c:124:6:menu_display_task 32 static +main.c:137:6:cmd_handling_task 32 static +main.c:164:6:cmd_processing_task 88 static +main.c:210:6:uart_write_task 24 static +main.c:222:6:Init_GPIO_LED 16 static +main.c:243:6:Init_UART 32 static +main.c:289:6:printmsg 24 static +main.c:297:6:rtos_delayms 16 static +main.c:303:6:UART4_IRQHandler 24 static,ignoring_inline_asm +main.c:331:9:getCommandCode 16 static +main.c:336:6:getArguments 16 static +main.c:341:6:make_led_on 8 static +main.c:345:6:make_led_off 8 static +main.c:350:6:led_toggle 16 static +main.c:353:6:make_led_toggle_start 32 static +main.c:363:6:make_led_toggle_stop 16 static +main.c:370:6:make_led_status_read 24 static +main.c:375:6:make_rtc_datetime_read 56 static +main.c:389:6:make_exit_app 8 static +main.c:404:6:print_errormsg 24 static +main.c:410:6:vApplicationIdleHook 4 static,ignoring_inline_asm diff --git a/Debug/src/subdir.mk b/Debug/src/subdir.mk index d49e2c3..6aa2396 100644 --- a/Debug/src/subdir.mk +++ b/Debug/src/subdir.mk @@ -21,9 +21,9 @@ C_DEPS += \ # Each subdirectory must supply rules for building sources it contributes src/main.o: ../src/main.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"src/main.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"src/main.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" src/syscalls.o: ../src/syscalls.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"src/syscalls.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"src/syscalls.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" src/system_stm32f4xx.o: ../src/system_stm32f4xx.c - arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"src/system_stm32f4xx.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" + arm-none-eabi-gcc "$<" -mcpu=cortex-m4 -std=gnu11 -g3 -DSTM32 -DUSE_STDPERIPH_DRIVER -DSTM32F40_41xxx -DSTM32F407G_DISC1 -DSTM32F4 -DSTM32F407VGTx -DDEBUG -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/core" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/include" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/FreeRTOS/org/Source/portable/GCC/ARM_CM4F" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/CMSIS/device" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/startup" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/StdPeriph_Driver/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/inc" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/OS" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"src/system_stm32f4xx.d" -MT"$@" --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" diff --git a/Debug/startup/subdir.mk b/Debug/startup/subdir.mk index 6bc4e73..4330ac6 100644 --- a/Debug/startup/subdir.mk +++ b/Debug/startup/subdir.mk @@ -12,5 +12,5 @@ OBJS += \ # Each subdirectory must supply rules for building sources it contributes startup/%.o: ../startup/%.s - arm-none-eabi-gcc -mcpu=cortex-m4 -g3 -c -x assembler-with-cpp --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" "$<" + arm-none-eabi-gcc -mcpu=cortex-m4 -g3 -c -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/Config" -I"/home/admirer/Desktop/master_mcu_stm32/FreeRTOS_STM32_Porting/FreeRTOS_STM32_Porting/SEGGER/SEGGER" -x assembler-with-cpp --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -o "$@" "$<" diff --git a/FreeRTOS/Source/croutine.c b/FreeRTOS/org/Source/croutine.c similarity index 100% rename from FreeRTOS/Source/croutine.c rename to FreeRTOS/org/Source/croutine.c diff --git a/FreeRTOS/Source/event_groups.c b/FreeRTOS/org/Source/event_groups.c similarity index 100% rename from FreeRTOS/Source/event_groups.c rename to FreeRTOS/org/Source/event_groups.c diff --git a/FreeRTOS/Source/include/FreeRTOS.h b/FreeRTOS/org/Source/include/FreeRTOS.h similarity index 98% rename from FreeRTOS/Source/include/FreeRTOS.h rename to FreeRTOS/org/Source/include/FreeRTOS.h index c81e2fa..41a1c9a 100644 --- a/FreeRTOS/Source/include/FreeRTOS.h +++ b/FreeRTOS/org/Source/include/FreeRTOS.h @@ -181,7 +181,11 @@ #ifndef INCLUDE_uxTaskGetStackHighWaterMark2 #define INCLUDE_uxTaskGetStackHighWaterMark2 0 #endif - +//SEGGER +#ifndef INCLUDE_pxTaskGetStackStart + #define INCLUDE_pxTaskGetStackStart 0 +#endif +//SEGGER #ifndef INCLUDE_eTaskGetState #define INCLUDE_eTaskGetState 0 #endif @@ -447,7 +451,23 @@ #ifndef tracePOST_MOVED_TASK_TO_READY_STATE #define tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB ) #endif +//SEGGER +#ifndef traceREADDED_TASK_TO_READY_STATE + #define traceREADDED_TASK_TO_READY_STATE( pxTCB ) traceMOVED_TASK_TO_READY_STATE( pxTCB ) +#endif + +#ifndef traceMOVED_TASK_TO_DELAYED_LIST + #define traceMOVED_TASK_TO_DELAYED_LIST() +#endif + +#ifndef traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST + #define traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST() +#endif +#ifndef traceMOVED_TASK_TO_SUSPENDED_LIST + #define traceMOVED_TASK_TO_SUSPENDED_LIST( pxTCB ) +#endif +//SEGGER #ifndef traceQUEUE_CREATE #define traceQUEUE_CREATE( pxNewQueue ) #endif @@ -695,7 +715,19 @@ #ifndef traceTASK_NOTIFY_GIVE_FROM_ISR #define traceTASK_NOTIFY_GIVE_FROM_ISR( uxIndexToNotify ) #endif +//SEGGER +#ifndef traceISR_EXIT_TO_SCHEDULER + #define traceISR_EXIT_TO_SCHEDULER() +#endif +#ifndef traceISR_EXIT + #define traceISR_EXIT() +#endif + +#ifndef traceISR_ENTER + #define traceISR_ENTER() +#endif +//SEGGER #ifndef traceSTREAM_BUFFER_CREATE_FAILED #define traceSTREAM_BUFFER_CREATE_FAILED( xIsMessageBuffer ) #endif diff --git a/FreeRTOS/Source/include/StackMacros.h b/FreeRTOS/org/Source/include/StackMacros.h similarity index 100% rename from FreeRTOS/Source/include/StackMacros.h rename to FreeRTOS/org/Source/include/StackMacros.h diff --git a/FreeRTOS/Source/include/atomic.h b/FreeRTOS/org/Source/include/atomic.h similarity index 100% rename from FreeRTOS/Source/include/atomic.h rename to FreeRTOS/org/Source/include/atomic.h diff --git a/FreeRTOS/Source/include/croutine.h b/FreeRTOS/org/Source/include/croutine.h similarity index 100% rename from FreeRTOS/Source/include/croutine.h rename to FreeRTOS/org/Source/include/croutine.h diff --git a/FreeRTOS/Source/include/deprecated_definitions.h b/FreeRTOS/org/Source/include/deprecated_definitions.h similarity index 100% rename from FreeRTOS/Source/include/deprecated_definitions.h rename to FreeRTOS/org/Source/include/deprecated_definitions.h diff --git a/FreeRTOS/Source/include/event_groups.h b/FreeRTOS/org/Source/include/event_groups.h similarity index 100% rename from FreeRTOS/Source/include/event_groups.h rename to FreeRTOS/org/Source/include/event_groups.h diff --git a/FreeRTOS/Source/include/list.h b/FreeRTOS/org/Source/include/list.h similarity index 100% rename from FreeRTOS/Source/include/list.h rename to FreeRTOS/org/Source/include/list.h diff --git a/FreeRTOS/Source/include/message_buffer.h b/FreeRTOS/org/Source/include/message_buffer.h similarity index 100% rename from FreeRTOS/Source/include/message_buffer.h rename to FreeRTOS/org/Source/include/message_buffer.h diff --git a/FreeRTOS/Source/include/mpu_prototypes.h b/FreeRTOS/org/Source/include/mpu_prototypes.h similarity index 100% rename from FreeRTOS/Source/include/mpu_prototypes.h rename to FreeRTOS/org/Source/include/mpu_prototypes.h diff --git a/FreeRTOS/Source/include/mpu_wrappers.h b/FreeRTOS/org/Source/include/mpu_wrappers.h similarity index 100% rename from FreeRTOS/Source/include/mpu_wrappers.h rename to FreeRTOS/org/Source/include/mpu_wrappers.h diff --git a/FreeRTOS/Source/include/portable.h b/FreeRTOS/org/Source/include/portable.h similarity index 100% rename from FreeRTOS/Source/include/portable.h rename to FreeRTOS/org/Source/include/portable.h diff --git a/FreeRTOS/Source/include/projdefs.h b/FreeRTOS/org/Source/include/projdefs.h similarity index 100% rename from FreeRTOS/Source/include/projdefs.h rename to FreeRTOS/org/Source/include/projdefs.h diff --git a/FreeRTOS/Source/include/queue.h b/FreeRTOS/org/Source/include/queue.h similarity index 100% rename from FreeRTOS/Source/include/queue.h rename to FreeRTOS/org/Source/include/queue.h diff --git a/FreeRTOS/Source/include/semphr.h b/FreeRTOS/org/Source/include/semphr.h similarity index 100% rename from FreeRTOS/Source/include/semphr.h rename to FreeRTOS/org/Source/include/semphr.h diff --git a/FreeRTOS/Source/include/stack_macros.h b/FreeRTOS/org/Source/include/stack_macros.h similarity index 100% rename from FreeRTOS/Source/include/stack_macros.h rename to FreeRTOS/org/Source/include/stack_macros.h diff --git a/FreeRTOS/Source/include/stdint.readme b/FreeRTOS/org/Source/include/stdint.readme similarity index 100% rename from FreeRTOS/Source/include/stdint.readme rename to FreeRTOS/org/Source/include/stdint.readme diff --git a/FreeRTOS/Source/include/stream_buffer.h b/FreeRTOS/org/Source/include/stream_buffer.h similarity index 100% rename from FreeRTOS/Source/include/stream_buffer.h rename to FreeRTOS/org/Source/include/stream_buffer.h diff --git a/FreeRTOS/Source/include/task.h b/FreeRTOS/org/Source/include/task.h similarity index 99% rename from FreeRTOS/Source/include/task.h rename to FreeRTOS/org/Source/include/task.h index 66c99c5..c35cbec 100644 --- a/FreeRTOS/Source/include/task.h +++ b/FreeRTOS/org/Source/include/task.h @@ -1509,8 +1509,29 @@ TaskHandle_t xTaskGetHandle( const char * pcNameToQuery ) PRIVILEGED_FUNCTION; * actual spaces on the stack rather than bytes) since the task referenced by * xTask was created. */ + UBaseType_t uxTaskGetStackHighWaterMark( TaskHandle_t xTask ) PRIVILEGED_FUNCTION; +/** + * task.h + *
uint8_t* pxTaskGetStackStart( TaskHandle_t xTask);
+ * + * INCLUDE_pxTaskGetStackStart must be set to 1 in FreeRTOSConfig.h for + * this function to be available. + * + * Returns the start of the stack associated with xTask. That is, + * the highest stack memory address on architectures where the stack grows down + * from high memory, and the lowest memory address on architectures where the + * stack grows up from low memory. + * + * @param xTask Handle of the task associated with the stack returned. + * Set xTask to NULL to return the stack of the calling task. + * + * @return A pointer to the start of the stack. + */ +uint8_t* pxTaskGetStackStart( TaskHandle_t xTask) PRIVILEGED_FUNCTION; + + /** * task.h *
configSTACK_DEPTH_TYPE uxTaskGetStackHighWaterMark2( TaskHandle_t xTask );
diff --git a/FreeRTOS/Source/include/timers.h b/FreeRTOS/org/Source/include/timers.h similarity index 100% rename from FreeRTOS/Source/include/timers.h rename to FreeRTOS/org/Source/include/timers.h diff --git a/FreeRTOS/Source/list.c b/FreeRTOS/org/Source/list.c similarity index 100% rename from FreeRTOS/Source/list.c rename to FreeRTOS/org/Source/list.c diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c b/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.c similarity index 99% rename from FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c rename to FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.c index d5a405c..6476a7f 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c +++ b/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/port.c @@ -498,14 +498,19 @@ void xPortSysTickHandler( void ) * save and then restore the interrupt mask value as its value is already * known. */ portDISABLE_INTERRUPTS(); + traceISR_ENTER(); { /* Increment the RTOS tick. */ if( xTaskIncrementTick() != pdFALSE ) { - /* A context switch is required. Context switching is performed in + traceISR_EXIT_TO_SCHEDULER(); + /* A context switch is required. Context switching is performed in * the PendSV interrupt. Pend the PendSV interrupt. */ portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; } + else{ + traceISR_EXIT(); + } } portENABLE_INTERRUPTS(); } diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h b/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h similarity index 97% rename from FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h rename to FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h index fcadd9d..ca02827 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h +++ b/FreeRTOS/org/Source/portable/GCC/ARM_CM4F/portmacro.h @@ -90,7 +90,8 @@ #define portNVIC_INT_CTRL_REG ( *( ( volatile uint32_t * ) 0xe000ed04 ) ) #define portNVIC_PENDSVSET_BIT ( 1UL << 28UL ) - #define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired != pdFALSE ) portYIELD() +// #define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired != pdFALSE ) portYIELD() + #define portEND_SWITCHING_ISR( xSwitchRequired ) { if( xSwitchRequired != pdFALSE ) { traceISR_EXIT_TO_SCHEDULER(); portYIELD(); } else { traceISR_EXIT(); } } #define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x ) /*-----------------------------------------------------------*/ diff --git a/FreeRTOS/Source/portable/MemMang/ReadMe.url b/FreeRTOS/org/Source/portable/MemMang/ReadMe.url similarity index 100% rename from FreeRTOS/Source/portable/MemMang/ReadMe.url rename to FreeRTOS/org/Source/portable/MemMang/ReadMe.url diff --git a/FreeRTOS/Source/portable/MemMang/heap_4.c b/FreeRTOS/org/Source/portable/MemMang/heap_4.c similarity index 100% rename from FreeRTOS/Source/portable/MemMang/heap_4.c rename to FreeRTOS/org/Source/portable/MemMang/heap_4.c diff --git a/FreeRTOS/Source/portable/readme.txt b/FreeRTOS/org/Source/portable/readme.txt similarity index 100% rename from FreeRTOS/Source/portable/readme.txt rename to FreeRTOS/org/Source/portable/readme.txt diff --git a/FreeRTOS/Source/queue.c b/FreeRTOS/org/Source/queue.c similarity index 100% rename from FreeRTOS/Source/queue.c rename to FreeRTOS/org/Source/queue.c diff --git a/FreeRTOS/Source/stream_buffer.c b/FreeRTOS/org/Source/stream_buffer.c similarity index 100% rename from FreeRTOS/Source/stream_buffer.c rename to FreeRTOS/org/Source/stream_buffer.c diff --git a/FreeRTOS/Source/tasks.c b/FreeRTOS/org/Source/tasks.c similarity index 99% rename from FreeRTOS/Source/tasks.c rename to FreeRTOS/org/Source/tasks.c index d3280e0..536c8a8 100644 --- a/FreeRTOS/Source/tasks.c +++ b/FreeRTOS/org/Source/tasks.c @@ -221,6 +221,17 @@ taskRECORD_READY_PRIORITY( ( pxTCB )->uxPriority ); \ vListInsertEnd( &( pxReadyTasksLists[ ( pxTCB )->uxPriority ] ), &( ( pxTCB )->xStateListItem ) ); \ tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB ) + +/* + * Place the task represented by pxTCB which has been in a ready list before + * into the appropriate ready list for the task. + * It is inserted at the end of the list. + */ +#define prvReaddTaskToReadyList( pxTCB ) \ + traceREADDED_TASK_TO_READY_STATE( pxTCB ); \ + taskRECORD_READY_PRIORITY( ( pxTCB )->uxPriority ); \ + vListInsertEnd( &( pxReadyTasksLists[ ( pxTCB )->uxPriority ] ), &( ( pxTCB )->xStateListItem ) ); \ + tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB ) /*-----------------------------------------------------------*/ /* @@ -1674,7 +1685,8 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB ) mtCOVERAGE_TEST_MARKER(); } - prvAddTaskToReadyList( pxTCB ); +// prvAddTaskToReadyList( pxTCB ); + prvReaddTaskToReadyList( pxTCB ); } else { @@ -1735,7 +1747,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB ) { mtCOVERAGE_TEST_MARKER(); } - + traceMOVED_TASK_TO_SUSPENDED_LIST(pxTCB); vListInsertEnd( &xSuspendedTaskList, &( pxTCB->xStateListItem ) ); #if ( configUSE_TASK_NOTIFICATIONS == 1 ) @@ -3927,6 +3939,20 @@ static void prvCheckTasksWaitingTermination( void ) #endif /* INCLUDE_uxTaskGetStackHighWaterMark */ /*-----------------------------------------------------------*/ +#if (INCLUDE_pxTaskGetStackStart == 1) + uint8_t* pxTaskGetStackStart( TaskHandle_t xTask) + { + TCB_t *pxTCB; + UBaseType_t uxReturn; + (void)uxReturn; + + pxTCB = prvGetTCBFromHandle( xTask ); + return ( uint8_t * ) pxTCB->pxStack; + } + +#endif /* INCLUDE_pxTaskGetStackStart */ +/*-----------------------------------------------------------*/ + #if ( INCLUDE_vTaskDelete == 1 ) static void prvDeleteTCB( TCB_t * pxTCB ) @@ -4098,7 +4124,8 @@ static void prvResetNextTaskUnblockTime( void ) /* Inherit the priority before being moved into the new list. */ pxMutexHolderTCB->uxPriority = pxCurrentTCB->uxPriority; - prvAddTaskToReadyList( pxMutexHolderTCB ); +// prvAddTaskToReadyList( pxMutexHolderTCB ); + prvReaddTaskToReadyList( pxMutexHolderTCB ); } else { @@ -4188,8 +4215,8 @@ static void prvResetNextTaskUnblockTime( void ) * any other purpose if this task is running, and it must be * running to give back the mutex. */ listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) pxTCB->uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ - prvAddTaskToReadyList( pxTCB ); - +// prvAddTaskToReadyList( pxTCB ); + prvReaddTaskToReadyList( pxTCB ); /* Return true to indicate that a context switch is required. * This is only actually required in the corner case whereby * multiple mutexes were held and the mutexes were given back @@ -5295,7 +5322,8 @@ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, /* Add the task to the suspended task list instead of a delayed task * list to ensure it is not woken by a timing event. It will block * indefinitely. */ - vListInsertEnd( &xSuspendedTaskList, &( pxCurrentTCB->xStateListItem ) ); + traceMOVED_TASK_TO_SUSPENDED_LIST(pxCurrentTCB); + vListInsertEnd( &xSuspendedTaskList, &( pxCurrentTCB->xStateListItem ) ); } else { @@ -5311,12 +5339,14 @@ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, { /* Wake time has overflowed. Place this item in the overflow * list. */ - vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); + traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST(); + vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); } else { /* The wake time has not overflowed, so the current block list * is used. */ + traceMOVED_TASK_TO_DELAYED_LIST(); vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); /* If the task entering the blocked state was placed at the @@ -5346,12 +5376,14 @@ static void prvAddCurrentTaskToDelayedList( TickType_t xTicksToWait, if( xTimeToWake < xConstTickCount ) { /* Wake time has overflowed. Place this item in the overflow list. */ - vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); + traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST(); + vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); } else { /* The wake time has not overflowed, so the current block list is used. */ - vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); + traceMOVED_TASK_TO_DELAYED_LIST(); + vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); /* If the task entering the blocked state was placed at the head of the * list of blocked tasks then xNextTaskUnblockTime needs to be updated diff --git a/FreeRTOS/Source/timers.c b/FreeRTOS/org/Source/timers.c similarity index 100% rename from FreeRTOS/Source/timers.c rename to FreeRTOS/org/Source/timers.c diff --git a/FreeRTOS_STM32_Porting Debug.launch b/FreeRTOS_STM32_Porting Debug.launch index e59fb4e..e113e8a 100644 --- a/FreeRTOS_STM32_Porting Debug.launch +++ b/FreeRTOS_STM32_Porting Debug.launch @@ -67,4 +67,5 @@ + diff --git a/SEGGER/Config/Global.h b/SEGGER/Config/Global.h new file mode 100644 index 0000000..e2ef426 --- /dev/null +++ b/SEGGER/Config/Global.h @@ -0,0 +1,113 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +---------------------------------------------------------------------- +File : Global.h +Purpose : Global types + In case your application already has a Global.h, you should + merge the files. In order to use Segger code, the types + U8, U16, U32, I8, I16, I32 need to be defined in Global.h; + additional definitions do not hurt. +Revision: $Rev: 12501 $ +---------------------------END-OF-HEADER------------------------------ +*/ + +#ifndef GLOBAL_H // Guard against multiple inclusion +#define GLOBAL_H + +#define U8 unsigned char +#define I8 signed char +#define U16 unsigned short +#define I16 signed short +#ifdef __x86_64__ +#define U32 unsigned +#define I32 int +#else +#define U32 unsigned long +#define I32 signed long +#endif + +// +// CC_NO_LONG_SUPPORT can be defined to compile test +// without long support for compilers that do not +// support C99 and its long type. +// +#ifdef CC_NO_LONG_SUPPORT + #define PTR_ADDR U32 +#else // Supports long type. +#if defined(_WIN32) && !defined(__clang__) && !defined(__MINGW32__) + // + // Microsoft VC6 compiler related + // + #define U64 unsigned __int64 + #define U128 unsigned __int128 + #define I64 __int64 + #define I128 __int128 + #if _MSC_VER <= 1200 + #define U64_C(x) x##UI64 + #else + #define U64_C(x) x##ULL + #endif +#else + // + // C99 compliant compiler + // + #define U64 unsigned long long + #define I64 signed long long + #define U64_C(x) x##ULL +#endif + +#if (defined(_WIN64) || defined(__LP64__)) // 64-bit symbols used by Visual Studio and GCC, maybe others as well. + #define PTR_ADDR U64 +#else + #define PTR_ADDR U32 +#endif +#endif // Supports long type. + +#endif // Avoid multiple inclusion + +/*************************** End of file ****************************/ diff --git a/SEGGER/Config/SEGGER_RTT_Conf.h b/SEGGER/Config/SEGGER_RTT_Conf.h new file mode 100644 index 0000000..4087f67 --- /dev/null +++ b/SEGGER/Config/SEGGER_RTT_Conf.h @@ -0,0 +1,428 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +---------------------------END-OF-HEADER------------------------------ +File : SEGGER_RTT_Conf.h +Purpose : Implementation of SEGGER real-time transfer (RTT) which + allows real-time communication on targets which support + debugger memory accesses while the CPU is running. +Revision: $Rev: 21386 $ + +*/ + +#ifndef SEGGER_RTT_CONF_H +#define SEGGER_RTT_CONF_H + +#ifdef __IAR_SYSTEMS_ICC__ + #include +#endif + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ + +// +// Take in and set to correct values for Cortex-A systems with CPU cache +// +//#define SEGGER_RTT_CPU_CACHE_LINE_SIZE (32) // Largest cache line size (in bytes) in the current system +//#define SEGGER_RTT_UNCACHED_OFF (0xFB000000) // Address alias where RTT CB and buffers can be accessed uncached +// +// Most common case: +// Up-channel 0: RTT +// Up-channel 1: SystemView +// +#ifndef SEGGER_RTT_MAX_NUM_UP_BUFFERS + #define SEGGER_RTT_MAX_NUM_UP_BUFFERS (3) // Max. number of up-buffers (T->H) available on this target (Default: 3) +#endif +// +// Most common case: +// Down-channel 0: RTT +// Down-channel 1: SystemView +// +#ifndef SEGGER_RTT_MAX_NUM_DOWN_BUFFERS + #define SEGGER_RTT_MAX_NUM_DOWN_BUFFERS (3) // Max. number of down-buffers (H->T) available on this target (Default: 3) +#endif + +#ifndef BUFFER_SIZE_UP + #define BUFFER_SIZE_UP (1024) // Size of the buffer for terminal output of target, up to host (Default: 1k) +#endif + +#ifndef BUFFER_SIZE_DOWN + #define BUFFER_SIZE_DOWN (16) // Size of the buffer for terminal input to target from host (Usually keyboard input) (Default: 16) +#endif + +#ifndef SEGGER_RTT_PRINTF_BUFFER_SIZE + #define SEGGER_RTT_PRINTF_BUFFER_SIZE (64u) // Size of buffer for RTT printf to bulk-send chars via RTT (Default: 64) +#endif + +#ifndef SEGGER_RTT_MODE_DEFAULT + #define SEGGER_RTT_MODE_DEFAULT SEGGER_RTT_MODE_NO_BLOCK_SKIP // Mode for pre-initialized terminal channel (buffer 0) +#endif + +/********************************************************************* +* +* RTT memcpy configuration +* +* memcpy() is good for large amounts of data, +* but the overhead is big for small amounts, which are usually stored via RTT. +* With SEGGER_RTT_MEMCPY_USE_BYTELOOP a simple byte loop can be used instead. +* +* SEGGER_RTT_MEMCPY() can be used to replace standard memcpy() in RTT functions. +* This is may be required with memory access restrictions, +* such as on Cortex-A devices with MMU. +*/ +#ifndef SEGGER_RTT_MEMCPY_USE_BYTELOOP + #define SEGGER_RTT_MEMCPY_USE_BYTELOOP 0 // 0: Use memcpy/SEGGER_RTT_MEMCPY, 1: Use a simple byte-loop +#endif +// +// Example definition of SEGGER_RTT_MEMCPY to external memcpy with GCC toolchains and Cortex-A targets +// +//#if ((defined __SES_ARM) || (defined __CROSSWORKS_ARM) || (defined __GNUC__)) && (defined (__ARM_ARCH_7A__)) +// #define SEGGER_RTT_MEMCPY(pDest, pSrc, NumBytes) SEGGER_memcpy((pDest), (pSrc), (NumBytes)) +//#endif + +// +// Target is not allowed to perform other RTT operations while string still has not been stored completely. +// Otherwise we would probably end up with a mixed string in the buffer. +// If using RTT from within interrupts, multiple tasks or multi processors, define the SEGGER_RTT_LOCK() and SEGGER_RTT_UNLOCK() function here. +// +// SEGGER_RTT_MAX_INTERRUPT_PRIORITY can be used in the sample lock routines on Cortex-M3/4. +// Make sure to mask all interrupts which can send RTT data, i.e. generate SystemView events, or cause task switches. +// When high-priority interrupts must not be masked while sending RTT data, SEGGER_RTT_MAX_INTERRUPT_PRIORITY needs to be adjusted accordingly. +// (Higher priority = lower priority number) +// Default value for embOS: 128u +// Default configuration in FreeRTOS: configMAX_SYSCALL_INTERRUPT_PRIORITY: ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) ) +// In case of doubt mask all interrupts: 1 << (8 - BASEPRI_PRIO_BITS) i.e. 1 << 5 when 3 bits are implemented in NVIC +// or define SEGGER_RTT_LOCK() to completely disable interrupts. +// +#ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY + #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20) // Interrupt priority to lock on SEGGER_RTT_LOCK on Cortex-M3/4 (Default: 0x20) +#endif + +/********************************************************************* +* +* RTT lock configuration for SEGGER Embedded Studio, +* Rowley CrossStudio and GCC +*/ +#if ((defined(__SES_ARM) || defined(__SES_RISCV) || defined(__CROSSWORKS_ARM) || defined(__GNUC__) || defined(__clang__)) && !defined (__CC_ARM) && !defined(WIN32)) + #if (defined(__ARM_ARCH_6M__) || defined(__ARM_ARCH_8M_BASE__)) + #define SEGGER_RTT_LOCK() { \ + unsigned int _SEGGER_RTT__LockState; \ + __asm volatile ("mrs %0, primask \n\t" \ + "movs r1, #1 \n\t" \ + "msr primask, r1 \n\t" \ + : "=r" (_SEGGER_RTT__LockState) \ + : \ + : "r1", "cc" \ + ); + + #define SEGGER_RTT_UNLOCK() __asm volatile ("msr primask, %0 \n\t" \ + : \ + : "r" (_SEGGER_RTT__LockState) \ + : \ + ); \ + } + #elif (defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_8M_MAIN__)) + #ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY + #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20) + #endif + #define SEGGER_RTT_LOCK() { \ + unsigned int _SEGGER_RTT__LockState; \ + __asm volatile ("mrs %0, basepri \n\t" \ + "mov r1, %1 \n\t" \ + "msr basepri, r1 \n\t" \ + : "=r" (_SEGGER_RTT__LockState) \ + : "i"(SEGGER_RTT_MAX_INTERRUPT_PRIORITY) \ + : "r1", "cc" \ + ); + + #define SEGGER_RTT_UNLOCK() __asm volatile ("msr basepri, %0 \n\t" \ + : \ + : "r" (_SEGGER_RTT__LockState) \ + : \ + ); \ + } + + #elif defined(__ARM_ARCH_7A__) + #define SEGGER_RTT_LOCK() { \ + unsigned int _SEGGER_RTT__LockState; \ + __asm volatile ("mrs r1, CPSR \n\t" \ + "mov %0, r1 \n\t" \ + "orr r1, r1, #0xC0 \n\t" \ + "msr CPSR_c, r1 \n\t" \ + : "=r" (_SEGGER_RTT__LockState) \ + : \ + : "r1", "cc" \ + ); + + #define SEGGER_RTT_UNLOCK() __asm volatile ("mov r0, %0 \n\t" \ + "mrs r1, CPSR \n\t" \ + "bic r1, r1, #0xC0 \n\t" \ + "and r0, r0, #0xC0 \n\t" \ + "orr r1, r1, r0 \n\t" \ + "msr CPSR_c, r1 \n\t" \ + : \ + : "r" (_SEGGER_RTT__LockState) \ + : "r0", "r1", "cc" \ + ); \ + } + #elif defined(__riscv) || defined(__riscv_xlen) + #define SEGGER_RTT_LOCK() { \ + unsigned int _SEGGER_RTT__LockState; \ + __asm volatile ("csrr %0, mstatus \n\t" \ + "csrci mstatus, 8 \n\t" \ + "andi %0, %0, 8 \n\t" \ + : "=r" (_SEGGER_RTT__LockState) \ + : \ + : \ + ); + + #define SEGGER_RTT_UNLOCK() __asm volatile ("csrr a1, mstatus \n\t" \ + "or %0, %0, a1 \n\t" \ + "csrs mstatus, %0 \n\t" \ + : \ + : "r" (_SEGGER_RTT__LockState) \ + : "a1" \ + ); \ + } + #else + #define SEGGER_RTT_LOCK() + #define SEGGER_RTT_UNLOCK() + #endif +#endif + +/********************************************************************* +* +* RTT lock configuration for IAR EWARM +*/ +#ifdef __ICCARM__ + #if (defined (__ARM6M__) && (__CORE__ == __ARM6M__)) || \ + (defined (__ARM8M_BASELINE__) && (__CORE__ == __ARM8M_BASELINE__)) + #define SEGGER_RTT_LOCK() { \ + unsigned int _SEGGER_RTT__LockState; \ + _SEGGER_RTT__LockState = __get_PRIMASK(); \ + __set_PRIMASK(1); + + #define SEGGER_RTT_UNLOCK() __set_PRIMASK(_SEGGER_RTT__LockState); \ + } + #elif (defined (__ARM7EM__) && (__CORE__ == __ARM7EM__)) || \ + (defined (__ARM7M__) && (__CORE__ == __ARM7M__)) || \ + (defined (__ARM8M_MAINLINE__) && (__CORE__ == __ARM8M_MAINLINE__)) || \ + (defined (__ARM8M_MAINLINE__) && (__CORE__ == __ARM8M_MAINLINE__)) + #ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY + #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20) + #endif + #define SEGGER_RTT_LOCK() { \ + unsigned int _SEGGER_RTT__LockState; \ + _SEGGER_RTT__LockState = __get_BASEPRI(); \ + __set_BASEPRI(SEGGER_RTT_MAX_INTERRUPT_PRIORITY); + + #define SEGGER_RTT_UNLOCK() __set_BASEPRI(_SEGGER_RTT__LockState); \ + } + #elif (defined (__ARM7A__) && (__CORE__ == __ARM7A__)) || \ + (defined (__ARM7R__) && (__CORE__ == __ARM7R__)) + #define SEGGER_RTT_LOCK() { \ + unsigned int _SEGGER_RTT__LockState; \ + __asm volatile ("mrs r1, CPSR \n\t" \ + "mov %0, r1 \n\t" \ + "orr r1, r1, #0xC0 \n\t" \ + "msr CPSR_c, r1 \n\t" \ + : "=r" (_SEGGER_RTT__LockState) \ + : \ + : "r1", "cc" \ + ); + + #define SEGGER_RTT_UNLOCK() __asm volatile ("mov r0, %0 \n\t" \ + "mrs r1, CPSR \n\t" \ + "bic r1, r1, #0xC0 \n\t" \ + "and r0, r0, #0xC0 \n\t" \ + "orr r1, r1, r0 \n\t" \ + "msr CPSR_c, r1 \n\t" \ + : \ + : "r" (_SEGGER_RTT__LockState) \ + : "r0", "r1", "cc" \ + ); \ + } + #endif +#endif + +/********************************************************************* +* +* RTT lock configuration for IAR RX +*/ +#ifdef __ICCRX__ + #define SEGGER_RTT_LOCK() { \ + unsigned long _SEGGER_RTT__LockState; \ + _SEGGER_RTT__LockState = __get_interrupt_state(); \ + __disable_interrupt(); + + #define SEGGER_RTT_UNLOCK() __set_interrupt_state(_SEGGER_RTT__LockState); \ + } +#endif + +/********************************************************************* +* +* RTT lock configuration for IAR RL78 +*/ +#ifdef __ICCRL78__ + #define SEGGER_RTT_LOCK() { \ + __istate_t _SEGGER_RTT__LockState; \ + _SEGGER_RTT__LockState = __get_interrupt_state(); \ + __disable_interrupt(); + + #define SEGGER_RTT_UNLOCK() __set_interrupt_state(_SEGGER_RTT__LockState); \ + } +#endif + +/********************************************************************* +* +* RTT lock configuration for KEIL ARM +*/ +#ifdef __CC_ARM + #if (defined __TARGET_ARCH_6S_M) + #define SEGGER_RTT_LOCK() { \ + unsigned int _SEGGER_RTT__LockState; \ + register unsigned char _SEGGER_RTT__PRIMASK __asm( "primask"); \ + _SEGGER_RTT__LockState = _SEGGER_RTT__PRIMASK; \ + _SEGGER_RTT__PRIMASK = 1u; \ + __schedule_barrier(); + + #define SEGGER_RTT_UNLOCK() _SEGGER_RTT__PRIMASK = _SEGGER_RTT__LockState; \ + __schedule_barrier(); \ + } + #elif (defined(__TARGET_ARCH_7_M) || defined(__TARGET_ARCH_7E_M)) + #ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY + #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20) + #endif + #define SEGGER_RTT_LOCK() { \ + unsigned int _SEGGER_RTT__LockState; \ + register unsigned char BASEPRI __asm( "basepri"); \ + _SEGGER_RTT__LockState = BASEPRI; \ + BASEPRI = SEGGER_RTT_MAX_INTERRUPT_PRIORITY; \ + __schedule_barrier(); + + #define SEGGER_RTT_UNLOCK() BASEPRI = _SEGGER_RTT__LockState; \ + __schedule_barrier(); \ + } + #endif +#endif + +/********************************************************************* +* +* RTT lock configuration for TI ARM +*/ +#ifdef __TI_ARM__ + #if defined (__TI_ARM_V6M0__) + #define SEGGER_RTT_LOCK() { \ + unsigned int _SEGGER_RTT__LockState; \ + _SEGGER_RTT__LockState = __get_PRIMASK(); \ + __set_PRIMASK(1); + + #define SEGGER_RTT_UNLOCK() __set_PRIMASK(_SEGGER_RTT__LockState); \ + } + #elif (defined (__TI_ARM_V7M3__) || defined (__TI_ARM_V7M4__)) + #ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY + #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20) + #endif + #define SEGGER_RTT_LOCK() { \ + unsigned int _SEGGER_RTT__LockState; \ + _SEGGER_RTT__LockState = _set_interrupt_priority(SEGGER_RTT_MAX_INTERRUPT_PRIORITY); + + #define SEGGER_RTT_UNLOCK() _set_interrupt_priority(_SEGGER_RTT__LockState); \ + } + #endif +#endif + +/********************************************************************* +* +* RTT lock configuration for CCRX +*/ +#ifdef __RX + #include + #define SEGGER_RTT_LOCK() { \ + unsigned long _SEGGER_RTT__LockState; \ + _SEGGER_RTT__LockState = get_psw() & 0x010000; \ + clrpsw_i(); + + #define SEGGER_RTT_UNLOCK() set_psw(get_psw() | _SEGGER_RTT__LockState); \ + } +#endif + +/********************************************************************* +* +* RTT lock configuration for embOS Simulation on Windows +* (Can also be used for generic RTT locking with embOS) +*/ +#if defined(WIN32) || defined(SEGGER_RTT_LOCK_EMBOS) + +void OS_SIM_EnterCriticalSection(void); +void OS_SIM_LeaveCriticalSection(void); + +#define SEGGER_RTT_LOCK() { \ + OS_SIM_EnterCriticalSection(); + +#define SEGGER_RTT_UNLOCK() OS_SIM_LeaveCriticalSection(); \ + } +#endif + +/********************************************************************* +* +* RTT lock configuration fallback +*/ +#ifndef SEGGER_RTT_LOCK + #define SEGGER_RTT_LOCK() // Lock RTT (nestable) (i.e. disable interrupts) +#endif + +#ifndef SEGGER_RTT_UNLOCK + #define SEGGER_RTT_UNLOCK() // Unlock RTT (nestable) (i.e. enable previous interrupt lock state) +#endif + +#endif +/*************************** End of file ****************************/ diff --git a/SEGGER/Config/SEGGER_SYSVIEW_Conf.h b/SEGGER/Config/SEGGER_SYSVIEW_Conf.h new file mode 100644 index 0000000..ef9df03 --- /dev/null +++ b/SEGGER/Config/SEGGER_SYSVIEW_Conf.h @@ -0,0 +1,85 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Conf.h +Purpose : SEGGER SystemView configuration file. + Set defines which deviate from the defaults (see SEGGER_SYSVIEW_ConfDefaults.h) here. +Revision: $Rev: 21292 $ + +Additional information: + Required defines which must be set are: + SEGGER_SYSVIEW_GET_TIMESTAMP + SEGGER_SYSVIEW_GET_INTERRUPT_ID + For known compilers and cores, these might be set to good defaults + in SEGGER_SYSVIEW_ConfDefaults.h. + + SystemView needs a (nestable) locking mechanism. + If not defined, the RTT locking mechanism is used, + which then needs to be properly configured. +*/ + +#ifndef SEGGER_SYSVIEW_CONF_H +#define SEGGER_SYSVIEW_CONF_H + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ + +/********************************************************************* +* TODO: Add your defines here. * +********************************************************************** +*/ + + +#endif // SEGGER_SYSVIEW_CONF_H + +/*************************** End of file ****************************/ diff --git a/SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.c b/SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.c new file mode 100644 index 0000000..b0a29cd --- /dev/null +++ b/SEGGER/Config/SEGGER_SYSVIEW_Config_FreeRTOS.c @@ -0,0 +1,104 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Config_FreeRTOS.c +Purpose : Sample setup configuration of SystemView with FreeRTOS. +Revision: $Rev: 7745 $ +*/ +#include "FreeRTOS.h" +#include "SEGGER_SYSVIEW.h" + +extern const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI; + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ +// The application name to be displayed in SystemViewer +#define SYSVIEW_APP_NAME "FreeRTOS SEGGER Application" + +// The target device name +#define SYSVIEW_DEVICE_NAME "STM32F407VGT6" + +// Frequency of the timestamp. Must match SEGGER_SYSVIEW_GET_TIMESTAMP in SEGGER_SYSVIEW_Conf.h +#define SYSVIEW_TIMESTAMP_FREQ (configCPU_CLOCK_HZ) + +// System Frequency. SystemcoreClock is used in most CMSIS compatible projects. +#define SYSVIEW_CPU_FREQ configCPU_CLOCK_HZ + +// The lowest RAM address used for IDs (pointers) +#define SYSVIEW_RAM_BASE (0x10000000) + +/********************************************************************* +* +* _cbSendSystemDesc() +* +* Function description +* Sends SystemView description strings. +*/ +static void _cbSendSystemDesc(void) { + SEGGER_SYSVIEW_SendSysDesc("N="SYSVIEW_APP_NAME",D="SYSVIEW_DEVICE_NAME",O=FreeRTOS"); + SEGGER_SYSVIEW_SendSysDesc("I#15=SysTick"); +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +void SEGGER_SYSVIEW_Conf(void) { + SEGGER_SYSVIEW_Init(SYSVIEW_TIMESTAMP_FREQ, SYSVIEW_CPU_FREQ, + &SYSVIEW_X_OS_TraceAPI, _cbSendSystemDesc); + SEGGER_SYSVIEW_SetRAMBase(SYSVIEW_RAM_BASE); +} + +/*************************** End of file ****************************/ diff --git a/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.c b/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.c new file mode 100644 index 0000000..bc7cd91 --- /dev/null +++ b/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.c @@ -0,0 +1,252 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_FreeRTOS.c +Purpose : Interface between FreeRTOS and SystemView. +Revision: $Rev: 7947 $ +*/ +#include "FreeRTOS.h" +#include "task.h" +#include "SEGGER_SYSVIEW.h" +#include "SEGGER_SYSVIEW_FreeRTOS.h" +#include "string.h" // Required for memset + + + +typedef struct SYSVIEW_FREERTOS_TASK_STATUS SYSVIEW_FREERTOS_TASK_STATUS; + +struct SYSVIEW_FREERTOS_TASK_STATUS { + U32 xHandle; + const char* pcTaskName; + unsigned uxCurrentPriority; + U32 pxStack; + unsigned uStackHighWaterMark; +}; + +static SYSVIEW_FREERTOS_TASK_STATUS _aTasks[SYSVIEW_FREERTOS_MAX_NOF_TASKS]; +static unsigned _NumTasks; + +/********************************************************************* +* +* _cbSendTaskList() +* +* Function description +* This function is part of the link between FreeRTOS and SYSVIEW. +* Called from SystemView when asked by the host, it uses SYSVIEW +* functions to send the entire task list to the host. +*/ +static void _cbSendTaskList(void) { + unsigned n; + + for (n = 0; n < _NumTasks; n++) { +#if INCLUDE_uxTaskGetStackHighWaterMark // Report Task Stack High Watermark + _aTasks[n].uStackHighWaterMark = uxTaskGetStackHighWaterMark((TaskHandle_t)_aTasks[n].xHandle); +#endif + SYSVIEW_SendTaskInfo((U32)_aTasks[n].xHandle, _aTasks[n].pcTaskName, (unsigned)_aTasks[n].uxCurrentPriority, (U32)_aTasks[n].pxStack, (unsigned)_aTasks[n].uStackHighWaterMark); + } +} + +/********************************************************************* +* +* _cbGetTime() +* +* Function description +* This function is part of the link between FreeRTOS and SYSVIEW. +* Called from SystemView when asked by the host, returns the +* current system time in micro seconds. +*/ +static U64 _cbGetTime(void) { + U64 Time; + + Time = xTaskGetTickCountFromISR(); + Time *= portTICK_PERIOD_MS; + Time *= 1000; + return Time; +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +/********************************************************************* +* +* SYSVIEW_AddTask() +* +* Function description +* Add a task to the internal list and record its information. +*/ +void SYSVIEW_AddTask(U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark) { + + if (memcmp(pcTaskName, "IDLE", 5) == 0) { + return; + } + + if (_NumTasks >= SYSVIEW_FREERTOS_MAX_NOF_TASKS) { + SEGGER_SYSVIEW_Warn("SYSTEMVIEW: Could not record task information. Maximum number of tasks reached."); + return; + } + + _aTasks[_NumTasks].xHandle = xHandle; + _aTasks[_NumTasks].pcTaskName = pcTaskName; + _aTasks[_NumTasks].uxCurrentPriority = uxCurrentPriority; + _aTasks[_NumTasks].pxStack = pxStack; + _aTasks[_NumTasks].uStackHighWaterMark = uStackHighWaterMark; + + _NumTasks++; + + SYSVIEW_SendTaskInfo(xHandle, pcTaskName,uxCurrentPriority, pxStack, uStackHighWaterMark); + +} + +/********************************************************************* +* +* SYSVIEW_UpdateTask() +* +* Function description +* Update a task in the internal list and record its information. +*/ +void SYSVIEW_UpdateTask(U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark) { + unsigned n; + + if (memcmp(pcTaskName, "IDLE", 5) == 0) { + return; + } + + for (n = 0; n < _NumTasks; n++) { + if (_aTasks[n].xHandle == xHandle) { + break; + } + } + if (n < _NumTasks) { + _aTasks[n].pcTaskName = pcTaskName; + _aTasks[n].uxCurrentPriority = uxCurrentPriority; + _aTasks[n].pxStack = pxStack; + _aTasks[n].uStackHighWaterMark = uStackHighWaterMark; + + SYSVIEW_SendTaskInfo(xHandle, pcTaskName, uxCurrentPriority, pxStack, uStackHighWaterMark); + } else { + SYSVIEW_AddTask(xHandle, pcTaskName, uxCurrentPriority, pxStack, uStackHighWaterMark); + } +} + +/********************************************************************* +* +* SYSVIEW_DeleteTask() +* +* Function description +* Delete a task from the internal list. +*/ +void SYSVIEW_DeleteTask(U32 xHandle) { + unsigned n; + + if (_NumTasks == 0) { + return; // Early out + } + for (n = 0; n < _NumTasks; n++) { + if (_aTasks[n].xHandle == xHandle) { + break; + } + } + if (n == (_NumTasks - 1)) { + // + // Task is last item in list. + // Simply zero the item and decrement number of tasks. + // + memset(&_aTasks[n], 0, sizeof(_aTasks[n])); + _NumTasks--; + } else if (n < _NumTasks) { + // + // Task is in the middle of the list. + // Move last item to current position and decrement number of tasks. + // Order of tasks does not really matter, so no need to move all following items. + // + _aTasks[n].xHandle = _aTasks[_NumTasks - 1].xHandle; + _aTasks[n].pcTaskName = _aTasks[_NumTasks - 1].pcTaskName; + _aTasks[n].uxCurrentPriority = _aTasks[_NumTasks - 1].uxCurrentPriority; + _aTasks[n].pxStack = _aTasks[_NumTasks - 1].pxStack; + _aTasks[n].uStackHighWaterMark = _aTasks[_NumTasks - 1].uStackHighWaterMark; + memset(&_aTasks[_NumTasks - 1], 0, sizeof(_aTasks[_NumTasks - 1])); + _NumTasks--; + } +} + +/********************************************************************* +* +* SYSVIEW_SendTaskInfo() +* +* Function description +* Record task information. +*/ +void SYSVIEW_SendTaskInfo(U32 TaskID, const char* sName, unsigned Prio, U32 StackBase, unsigned StackSize) { + SEGGER_SYSVIEW_TASKINFO TaskInfo; + + memset(&TaskInfo, 0, sizeof(TaskInfo)); // Fill all elements with 0 to allow extending the structure in future version without breaking the code + TaskInfo.TaskID = TaskID; + TaskInfo.sName = sName; + TaskInfo.Prio = Prio; + TaskInfo.StackBase = StackBase; + TaskInfo.StackSize = StackSize; + SEGGER_SYSVIEW_SendTaskInfo(&TaskInfo); +} + +/********************************************************************* +* +* Public API structures +* +********************************************************************** +*/ +// Callbacks provided to SYSTEMVIEW by FreeRTOS +const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI = { + _cbGetTime, + _cbSendTaskList, +}; + +/*************************** End of file ****************************/ diff --git a/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h b/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h new file mode 100644 index 0000000..6a3181b --- /dev/null +++ b/SEGGER/OS/SEGGER_SYSVIEW_FreeRTOS.h @@ -0,0 +1,330 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_FreeRTOS.h +Purpose : Interface between FreeRTOS and SystemView. +Revision: $Rev: 7745 $ + +Notes: + (1) Include this file at the end of FreeRTOSConfig.h +*/ + +#ifndef SYSVIEW_FREERTOS_H +#define SYSVIEW_FREERTOS_H + +#include "SEGGER_SYSVIEW.h" + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ +#ifndef portSTACK_GROWTH + #define portSTACK_GROWTH ( -1 ) +#endif + +#define SYSVIEW_FREERTOS_MAX_NOF_TASKS 8 + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ +#define apiID_OFFSET (32u) + +#define apiID_VTASKALLOCATEMPUREGIONS (1u) +#define apiID_VTASKDELETE (2u) +#define apiID_VTASKDELAY (3u) +#define apiID_VTASKDELAYUNTIL (4u) +#define apiID_UXTASKPRIORITYGET (5u) +#define apiID_UXTASKPRIORITYGETFROMISR (6u) +#define apiID_ETASKGETSTATE (7u) +#define apiID_VTASKPRIORITYSET (8u) +#define apiID_VTASKSUSPEND (9u) +#define apiID_VTASKRESUME (10u) +#define apiID_XTASKRESUMEFROMISR (11u) +#define apiID_VTASKSTARTSCHEDULER (12u) +#define apiID_VTASKENDSCHEDULER (13u) +#define apiID_VTASKSUSPENDALL (14u) +#define apiID_XTASKRESUMEALL (15u) +#define apiID_XTASKGETTICKCOUNT (16u) +#define apiID_XTASKGETTICKCOUNTFROMISR (17u) +#define apiID_UXTASKGETNUMBEROFTASKS (18u) +#define apiID_PCTASKGETTASKNAME (19u) +#define apiID_UXTASKGETSTACKHIGHWATERMARK (20u) +#define apiID_VTASKSETAPPLICATIONTASKTAG (21u) +#define apiID_XTASKGETAPPLICATIONTASKTAG (22u) +#define apiID_VTASKSETTHREADLOCALSTORAGEPOINTER (23u) +#define apiID_PVTASKGETTHREADLOCALSTORAGEPOINTER (24u) +#define apiID_XTASKCALLAPPLICATIONTASKHOOK (25u) +#define apiID_XTASKGETIDLETASKHANDLE (26u) +#define apiID_UXTASKGETSYSTEMSTATE (27u) +#define apiID_VTASKLIST (28u) +#define apiID_VTASKGETRUNTIMESTATS (29u) +#define apiID_XTASKGENERICNOTIFY (30u) +#define apiID_XTASKGENERICNOTIFYFROMISR (31u) +#define apiID_XTASKNOTIFYWAIT (32u) +#define apiID_VTASKNOTIFYGIVEFROMISR (33u) +#define apiID_ULTASKNOTIFYTAKE (34u) +#define apiID_XTASKNOTIFYSTATECLEAR (35u) +#define apiID_XTASKGETCURRENTTASKHANDLE (36u) +#define apiID_VTASKSETTIMEOUTSTATE (37u) +#define apiID_XTASKCHECKFORTIMEOUT (38u) +#define apiID_VTASKMISSEDYIELD (39u) +#define apiID_XTASKGETSCHEDULERSTATE (40u) +#define apiID_VTASKPRIORITYINHERIT (41u) +#define apiID_XTASKPRIORITYDISINHERIT (42u) +#define apiID_XTASKGENERICCREATE (43u) +#define apiID_UXTASKGETTASKNUMBER (44u) +#define apiID_VTASKSETTASKNUMBER (45u) +#define apiID_VTASKSTEPTICK (46u) +#define apiID_ETASKCONFIRMSLEEPMODESTATUS (47u) +#define apiID_XTIMERCREATE (48u) +#define apiID_PVTIMERGETTIMERID (49u) +#define apiID_VTIMERSETTIMERID (50u) +#define apiID_XTIMERISTIMERACTIVE (51u) +#define apiID_XTIMERGETTIMERDAEMONTASKHANDLE (52u) +#define apiID_XTIMERPENDFUNCTIONCALLFROMISR (53u) +#define apiID_XTIMERPENDFUNCTIONCALL (54u) +#define apiID_PCTIMERGETTIMERNAME (55u) +#define apiID_XTIMERCREATETIMERTASK (56u) +#define apiID_XTIMERGENERICCOMMAND (57u) +#define apiID_XQUEUEGENERICSEND (58u) +#define apiID_XQUEUEPEEKFROMISR (59u) +#define apiID_XQUEUEGENERICRECEIVE (60u) +#define apiID_UXQUEUEMESSAGESWAITING (61u) +#define apiID_UXQUEUESPACESAVAILABLE (62u) +#define apiID_VQUEUEDELETE (63u) +#define apiID_XQUEUEGENERICSENDFROMISR (64u) +#define apiID_XQUEUEGIVEFROMISR (65u) +#define apiID_XQUEUERECEIVEFROMISR (66u) +#define apiID_XQUEUEISQUEUEEMPTYFROMISR (67u) +#define apiID_XQUEUEISQUEUEFULLFROMISR (68u) +#define apiID_UXQUEUEMESSAGESWAITINGFROMISR (69u) +#define apiID_XQUEUEALTGENERICSEND (70u) +#define apiID_XQUEUEALTGENERICRECEIVE (71u) +#define apiID_XQUEUECRSENDFROMISR (72u) +#define apiID_XQUEUECRRECEIVEFROMISR (73u) +#define apiID_XQUEUECRSEND (74u) +#define apiID_XQUEUECRRECEIVE (75u) +#define apiID_XQUEUECREATEMUTEX (76u) +#define apiID_XQUEUECREATECOUNTINGSEMAPHORE (77u) +#define apiID_XQUEUEGETMUTEXHOLDER (78u) +#define apiID_XQUEUETAKEMUTEXRECURSIVE (79u) +#define apiID_XQUEUEGIVEMUTEXRECURSIVE (80u) +#define apiID_VQUEUEADDTOREGISTRY (81u) +#define apiID_VQUEUEUNREGISTERQUEUE (82u) +#define apiID_XQUEUEGENERICCREATE (83u) +#define apiID_XQUEUECREATESET (84u) +#define apiID_XQUEUEADDTOSET (85u) +#define apiID_XQUEUEREMOVEFROMSET (86u) +#define apiID_XQUEUESELECTFROMSET (87u) +#define apiID_XQUEUESELECTFROMSETFROMISR (88u) +#define apiID_XQUEUEGENERICRESET (89u) +#define apiID_VLISTINITIALISE (90u) +#define apiID_VLISTINITIALISEITEM (91u) +#define apiID_VLISTINSERT (92u) +#define apiID_VLISTINSERTEND (93u) +#define apiID_UXLISTREMOVE (94u) +#define apiID_XEVENTGROUPCREATE (95u) +#define apiID_XEVENTGROUPWAITBITS (96u) +#define apiID_XEVENTGROUPCLEARBITS (97u) +#define apiID_XEVENTGROUPCLEARBITSFROMISR (98u) +#define apiID_XEVENTGROUPSETBITS (99u) +#define apiID_XEVENTGROUPSETBITSFROMISR (100u) +#define apiID_XEVENTGROUPSYNC (101u) +#define apiID_XEVENTGROUPGETBITSFROMISR (102u) +#define apiID_VEVENTGROUPDELETE (103u) +#define apiID_UXEVENTGROUPGETNUMBER (104u) +#define apiID_XSTREAMBUFFERCREATE (105u) +#define apiID_VSTREAMBUFFERDELETE (106u) +#define apiID_XSTREAMBUFFERRESET (107u) +#define apiID_XSTREAMBUFFERSEND (108u) +#define apiID_XSTREAMBUFFERSENDFROMISR (109u) +#define apiID_XSTREAMBUFFERRECEIVE (110u) +#define apiID_XSTREAMBUFFERRECEIVEFROMISR (111u) + +#define traceTASK_NOTIFY_TAKE(uxIndexToWait) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_ULTASKNOTIFYTAKE, xClearCountOnExit, xTicksToWait) +#define traceTASK_DELAY() SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_VTASKDELAY, xTicksToDelay) +#define traceTASK_DELAY_UNTIL(xTimeToWake) SEGGER_SYSVIEW_RecordVoid (apiID_OFFSET + apiID_VTASKDELAYUNTIL) +#define traceTASK_NOTIFY_GIVE_FROM_ISR(uxIndexToNotify) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_VTASKNOTIFYGIVEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB), (U32)pxHigherPriorityTaskWoken) +#define traceTASK_PRIORITY_INHERIT( pxTCB, uxPriority ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_VTASKPRIORITYINHERIT, (U32)pxMutexHolder) +#define traceTASK_RESUME( pxTCB ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_VTASKRESUME, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB)) +#define traceINCREASE_TICK_COUNT( xTicksToJump ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_VTASKSTEPTICK, xTicksToJump) +#define traceTASK_SUSPEND( pxTCB ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_VTASKSUSPEND, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB)) +#define traceTASK_PRIORITY_DISINHERIT( pxTCB, uxBasePriority ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_XTASKPRIORITYDISINHERIT, (U32)pxMutexHolder) +#define traceTASK_RESUME_FROM_ISR( pxTCB ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_XTASKRESUMEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB)) +#define traceTASK_NOTIFY(uxIndexToNotify) SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XTASKGENERICNOTIFY, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB), ulValue, eAction, (U32)pulPreviousNotificationValue) +#define traceTASK_NOTIFY_FROM_ISR(uxIndexToNotify) SEGGER_SYSVIEW_RecordU32x5(apiID_OFFSET + apiID_XTASKGENERICNOTIFYFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB), ulValue, eAction, (U32)pulPreviousNotificationValue, (U32)pxHigherPriorityTaskWoken) +#define traceTASK_NOTIFY_WAIT(uxIndexToWait) SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XTASKNOTIFYWAIT, ulBitsToClearOnEntry, ulBitsToClearOnExit, (U32)pulNotificationValue, xTicksToWait) + +#define traceQUEUE_CREATE( pxNewQueue ) SEGGER_SYSVIEW_RecordU32x3(apiID_OFFSET + apiID_XQUEUEGENERICCREATE, uxQueueLength, uxItemSize, ucQueueType) +#define traceQUEUE_DELETE( pxQueue ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_VQUEUEDELETE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue)) +#define traceQUEUE_PEEK( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICRECEIVE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer), xTicksToWait, 1) +#define traceQUEUE_PEEK_FROM_ISR( pxQueue ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XQUEUEPEEKFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer)) +#define traceQUEUE_PEEK_FROM_ISR_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XQUEUEPEEKFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer)) +#define traceQUEUE_RECEIVE( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICRECEIVE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)0), xTicksToWait, 1) +#define traceQUEUE_RECEIVE_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICRECEIVE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)0), xTicksToWait, 1) +#define traceQUEUE_SEMAPHORE_RECEIVE( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICRECEIVE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)0), xTicksToWait, 0) +#define traceQUEUE_RECEIVE_FROM_ISR( pxQueue ) SEGGER_SYSVIEW_RecordU32x3(apiID_OFFSET + apiID_XQUEUERECEIVEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer), (U32)pxHigherPriorityTaskWoken) +#define traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x3(apiID_OFFSET + apiID_XQUEUERECEIVEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer), (U32)pxHigherPriorityTaskWoken) +#define traceQUEUE_REGISTRY_ADD( xQueue, pcQueueName ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_VQUEUEADDTOREGISTRY, SEGGER_SYSVIEW_ShrinkId((U32)xQueue), (U32)pcQueueName) +#if ( configUSE_QUEUE_SETS != 1 ) + #define traceQUEUE_SEND( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICSEND, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pvItemToQueue, xTicksToWait, xCopyPosition) +#else + #define traceQUEUE_SEND( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICSEND, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), 0u, 0u, xCopyPosition) +#endif +#define traceQUEUE_SEND_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICSEND, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pvItemToQueue, xTicksToWait, xCopyPosition) +#define traceQUEUE_SEND_FROM_ISR( pxQueue ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XQUEUEGENERICSENDFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pxHigherPriorityTaskWoken) +#define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XQUEUEGENERICSENDFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pxHigherPriorityTaskWoken) +#define traceSTREAM_BUFFER_CREATE( pxStreamBuffer, xIsMessageBuffer ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XSTREAMBUFFERCREATE, (U32)xIsMessageBuffer, (U32)pxStreamBuffer) +#define traceSTREAM_BUFFER_CREATE_FAILED( xIsMessageBuffer ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XSTREAMBUFFERCREATE, (U32)xIsMessageBuffer, 0u) +#define traceSTREAM_BUFFER_DELETE( xStreamBuffer ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_VSTREAMBUFFERDELETE, (U32)xStreamBuffer) +#define traceSTREAM_BUFFER_RESET( xStreamBuffer ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_XSTREAMBUFFERRESET, (U32)xStreamBuffer) +#define traceSTREAM_BUFFER_SEND( xStreamBuffer, xBytesSent ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XSTREAMBUFFERSEND, (U32)xStreamBuffer, (U32)xBytesSent) +#define traceSTREAM_BUFFER_SEND_FAILED( xStreamBuffer ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XSTREAMBUFFERSEND, (U32)xStreamBuffer, 0u) +#define traceSTREAM_BUFFER_SEND_FROM_ISR( xStreamBuffer, xBytesSent ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XSTREAMBUFFERSENDFROMISR, (U32)xStreamBuffer, (U32)xBytesSent) +#define traceSTREAM_BUFFER_RECEIVE( xStreamBuffer, xReceivedLength ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XSTREAMBUFFERRECEIVE, (U32)xStreamBuffer, (U32)xReceivedLength) +#define traceSTREAM_BUFFER_RECEIVE_FAILED( xStreamBuffer ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XSTREAMBUFFERRECEIVE, (U32)xStreamBuffer, 0u) +#define traceSTREAM_BUFFER_RECEIVE_FROM_ISR( xStreamBuffer, xReceivedLength ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XSTREAMBUFFERRECEIVEFROMISR, (U32)xStreamBuffer, (U32)xReceivedLength) + + +#define traceTASK_DELETE( pxTCB ) { \ + SEGGER_SYSVIEW_RecordU32(apiID_OFFSET + apiID_VTASKDELETE, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB)); \ + SYSVIEW_DeleteTask((U32)pxTCB); \ + } + + +#if( portSTACK_GROWTH < 0 ) +#define traceTASK_CREATE(pxNewTCB) if (pxNewTCB != NULL) { \ + SEGGER_SYSVIEW_OnTaskCreate((U32)pxNewTCB); \ + SYSVIEW_AddTask((U32)pxNewTCB, \ + &(pxNewTCB->pcTaskName[0]), \ + pxNewTCB->uxPriority, \ + (U32)pxNewTCB->pxStack, \ + ((U32)pxNewTCB->pxTopOfStack - (U32)pxNewTCB->pxStack) \ + ); \ + } +#else +#define traceTASK_CREATE(pxNewTCB) if (pxNewTCB != NULL) { \ + SEGGER_SYSVIEW_OnTaskCreate((U32)pxNewTCB); \ + SYSVIEW_AddTask((U32)pxNewTCB, \ + &(pxNewTCB->pcTaskName[0]), \ + pxNewTCB->uxPriority, \ + (U32)pxNewTCB->pxStack, \ + (U32)(pxNewTCB->pxStack-pxNewTCB->pxTopOfStack) \ + ); \ + } +#endif +#define traceTASK_PRIORITY_SET(pxTask, uxNewPriority) { \ + SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET+apiID_VTASKPRIORITYSET, \ + SEGGER_SYSVIEW_ShrinkId((U32)pxTCB), \ + uxNewPriority \ + ); \ + SYSVIEW_UpdateTask((U32)pxTask, \ + &(pxTask->pcTaskName[0]), \ + uxNewPriority, \ + (U32)pxTask->pxStack, \ + 0 \ + ); \ + } +// +// Define INCLUDE_xTaskGetIdleTaskHandle as 1 in FreeRTOSConfig.h to allow identification of Idle state. +// +#if ( INCLUDE_xTaskGetIdleTaskHandle == 1 ) + #define traceTASK_SWITCHED_IN() if(prvGetTCBFromHandle(NULL) == xIdleTaskHandle) { \ + SEGGER_SYSVIEW_OnIdle(); \ + } else { \ + SEGGER_SYSVIEW_OnTaskStartExec((U32)pxCurrentTCB); \ + } +#else + #define traceTASK_SWITCHED_IN() { \ + if (memcmp(pxCurrentTCB->pcTaskName, "IDLE", 5) != 0) { \ + SEGGER_SYSVIEW_OnTaskStartExec((U32)pxCurrentTCB); \ + } else { \ + SEGGER_SYSVIEW_OnIdle(); \ + } \ + } +#endif + +#define traceMOVED_TASK_TO_READY_STATE(pxTCB) SEGGER_SYSVIEW_OnTaskStartReady((U32)pxTCB) +#define traceREADDED_TASK_TO_READY_STATE(pxTCB) + +#define traceMOVED_TASK_TO_DELAYED_LIST() SEGGER_SYSVIEW_OnTaskStopReady((U32)pxCurrentTCB, (1u << 2)) +#define traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST() SEGGER_SYSVIEW_OnTaskStopReady((U32)pxCurrentTCB, (1u << 2)) +#define traceMOVED_TASK_TO_SUSPENDED_LIST(pxTCB) SEGGER_SYSVIEW_OnTaskStopReady((U32)pxTCB, ((3u << 3) | 3)) + + +#define traceISR_EXIT_TO_SCHEDULER() SEGGER_SYSVIEW_RecordExitISRToScheduler() +#define traceISR_EXIT() SEGGER_SYSVIEW_RecordExitISR() +#define traceISR_ENTER() SEGGER_SYSVIEW_RecordEnterISR() + +/********************************************************************* +* +* API functions +* +********************************************************************** +*/ +#ifdef __cplusplus +extern "C" { +#endif +void SYSVIEW_AddTask (U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark); +void SYSVIEW_UpdateTask (U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark); +void SYSVIEW_DeleteTask (U32 xHandle); +void SYSVIEW_SendTaskInfo (U32 TaskID, const char* sName, unsigned Prio, U32 StackBase, unsigned StackSize); + +#ifdef __cplusplus +} +#endif + +#endif + +/*************************** End of file ****************************/ diff --git a/SEGGER/Patch/FreeRTOSV10_Core.patch b/SEGGER/Patch/FreeRTOSV10_Core.patch new file mode 100644 index 0000000..b8ba356 --- /dev/null +++ b/SEGGER/Patch/FreeRTOSV10_Core.patch @@ -0,0 +1,308 @@ +diff -rupN org/Source/include/FreeRTOS.h new/Source/include/FreeRTOS.h +--- org/Source/include/FreeRTOS.h 2017-11-28 13:48:34.000000000 -0800 ++++ new/Source/include/FreeRTOS.h 2017-12-11 00:54:49.522222000 -0800 +@@ -157,6 +157,10 @@ extern "C" { + #define INCLUDE_uxTaskGetStackHighWaterMark 0 + #endif + ++#ifndef INCLUDE_pxTaskGetStackStart ++ #define INCLUDE_pxTaskGetStackStart 0 ++#endif ++ + #ifndef INCLUDE_eTaskGetState + #define INCLUDE_eTaskGetState 0 + #endif +@@ -393,6 +397,23 @@ extern "C" { + #define tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB ) + #endif + ++#ifndef traceREADDED_TASK_TO_READY_STATE ++ #define traceREADDED_TASK_TO_READY_STATE( pxTCB ) traceMOVED_TASK_TO_READY_STATE( pxTCB ) ++#endif ++ ++#ifndef traceMOVED_TASK_TO_DELAYED_LIST ++ #define traceMOVED_TASK_TO_DELAYED_LIST() ++#endif ++ ++#ifndef traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST ++ #define traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST() ++#endif ++ ++#ifndef traceMOVED_TASK_TO_SUSPENDED_LIST ++ #define traceMOVED_TASK_TO_SUSPENDED_LIST( pxTCB ) ++#endif ++ ++ + #ifndef traceQUEUE_CREATE + #define traceQUEUE_CREATE( pxNewQueue ) + #endif +@@ -637,6 +658,18 @@ extern "C" { + #define traceTASK_NOTIFY_GIVE_FROM_ISR() + #endif + ++#ifndef traceISR_EXIT_TO_SCHEDULER ++ #define traceISR_EXIT_TO_SCHEDULER() ++#endif ++ ++#ifndef traceISR_EXIT ++ #define traceISR_EXIT() ++#endif ++ ++#ifndef traceISR_ENTER ++ #define traceISR_ENTER() ++#endif ++ + #ifndef traceSTREAM_BUFFER_CREATE_FAILED + #define traceSTREAM_BUFFER_CREATE_FAILED( xIsMessageBuffer ) + #endif +diff -rupN org/Source/include/task.h new/Source/include/task.h +--- org/Source/include/task.h 2017-11-28 13:48:34.000000000 -0800 ++++ new/Source/include/task.h 2017-12-11 00:56:29.783423000 -0800 +@@ -1422,6 +1422,25 @@ TaskHandle_t xTaskGetHandle( const char + */ + UBaseType_t uxTaskGetStackHighWaterMark( TaskHandle_t xTask ) PRIVILEGED_FUNCTION; + ++/** ++ * task.h ++ *
uint8_t* pxTaskGetStackStart( TaskHandle_t xTask);
++ * ++ * INCLUDE_pxTaskGetStackStart must be set to 1 in FreeRTOSConfig.h for ++ * this function to be available. ++ * ++ * Returns the start of the stack associated with xTask. That is, ++ * the highest stack memory address on architectures where the stack grows down ++ * from high memory, and the lowest memory address on architectures where the ++ * stack grows up from low memory. ++ * ++ * @param xTask Handle of the task associated with the stack returned. ++ * Set xTask to NULL to return the stack of the calling task. ++ * ++ * @return A pointer to the start of the stack. ++ */ ++uint8_t* pxTaskGetStackStart( TaskHandle_t xTask) PRIVILEGED_FUNCTION; ++ + /* When using trace macros it is sometimes necessary to include task.h before + FreeRTOS.h. When this is done TaskHookFunction_t will not yet have been defined, + so the following two prototypes will cause a compilation error. This can be +diff -rupN org/Source/portable/GCC/ARM_CM0/port.c new/Source/portable/GCC/ARM_CM0/port.c +--- org/Source/portable/GCC/ARM_CM0/port.c 2017-11-28 13:48:34.000000000 -0800 ++++ new/Source/portable/GCC/ARM_CM0/port.c 2017-12-11 01:11:45.061429000 -0800 +@@ -333,13 +333,19 @@ void xPortSysTickHandler( void ) + uint32_t ulPreviousMask; + + ulPreviousMask = portSET_INTERRUPT_MASK_FROM_ISR(); ++ traceISR_ENTER(); + { + /* Increment the RTOS tick. */ + if( xTaskIncrementTick() != pdFALSE ) + { ++ traceISR_EXIT_TO_SCHEDULER(); + /* Pend a context switch. */ + *(portNVIC_INT_CTRL) = portNVIC_PENDSVSET; + } ++ else ++ { ++ traceISR_EXIT(); ++ } + } + portCLEAR_INTERRUPT_MASK_FROM_ISR( ulPreviousMask ); + } +diff -rupN org/Source/portable/GCC/ARM_CM0/portmacro.h new/Source/portable/GCC/ARM_CM0/portmacro.h +--- org/Source/portable/GCC/ARM_CM0/portmacro.h 2017-11-28 13:48:34.000000000 -0800 ++++ new/Source/portable/GCC/ARM_CM0/portmacro.h 2017-12-11 01:10:27.732228000 -0800 +@@ -82,7 +82,7 @@ extern void vPortYield( void ); + #define portNVIC_INT_CTRL_REG ( * ( ( volatile uint32_t * ) 0xe000ed04 ) ) + #define portNVIC_PENDSVSET_BIT ( 1UL << 28UL ) + #define portYIELD() vPortYield() +-#define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired ) portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT ++#define portEND_SWITCHING_ISR( xSwitchRequired ) { if( xSwitchRequired ) { traceISR_EXIT_TO_SCHEDULER(); portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; } else { traceISR_EXIT(); } } + #define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x ) + /*-----------------------------------------------------------*/ + +diff -rupN org/Source/portable/GCC/ARM_CM3/port.c new/Source/portable/GCC/ARM_CM3/port.c +--- org/Source/portable/GCC/ARM_CM3/port.c 2017-11-28 13:48:34.000000000 -0800 ++++ new/Source/portable/GCC/ARM_CM3/port.c 2017-12-11 01:14:50.515630000 -0800 +@@ -431,14 +431,20 @@ void xPortSysTickHandler( void ) + save and then restore the interrupt mask value as its value is already + known. */ + portDISABLE_INTERRUPTS(); ++ traceISR_ENTER(); + { + /* Increment the RTOS tick. */ + if( xTaskIncrementTick() != pdFALSE ) + { ++ traceISR_EXIT_TO_SCHEDULER(); + /* A context switch is required. Context switching is performed in + the PendSV interrupt. Pend the PendSV interrupt. */ + portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; + } ++ else ++ { ++ traceISR_EXIT(); ++ } + } + portENABLE_INTERRUPTS(); + } +diff -rupN org/Source/portable/GCC/ARM_CM3/portmacro.h new/Source/portable/GCC/ARM_CM3/portmacro.h +--- org/Source/portable/GCC/ARM_CM3/portmacro.h 2017-11-28 13:48:34.000000000 -0800 ++++ new/Source/portable/GCC/ARM_CM3/portmacro.h 2017-12-11 01:13:36.868029000 -0800 +@@ -90,7 +90,7 @@ typedef unsigned long UBaseType_t; + + #define portNVIC_INT_CTRL_REG ( * ( ( volatile uint32_t * ) 0xe000ed04 ) ) + #define portNVIC_PENDSVSET_BIT ( 1UL << 28UL ) +-#define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired != pdFALSE ) portYIELD() ++#define portEND_SWITCHING_ISR( xSwitchRequired ) { if( xSwitchRequired != pdFALSE ) { traceISR_EXIT_TO_SCHEDULER(); portYIELD() } else { traceISR_EXIT(); } } + #define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x ) + /*-----------------------------------------------------------*/ + +diff -rupN org/Source/portable/GCC/ARM_CM4F/port.c new/Source/portable/GCC/ARM_CM4F/port.c +--- org/Source/portable/GCC/ARM_CM4F/port.c 2017-11-28 13:48:34.000000000 -0800 ++++ new/Source/portable/GCC/ARM_CM4F/port.c 2017-12-11 01:16:01.771230000 -0800 +@@ -493,14 +493,20 @@ void xPortSysTickHandler( void ) + save and then restore the interrupt mask value as its value is already + known. */ + portDISABLE_INTERRUPTS(); ++ traceISR_ENTER(); + { + /* Increment the RTOS tick. */ + if( xTaskIncrementTick() != pdFALSE ) + { ++ traceISR_EXIT_TO_SCHEDULER(); + /* A context switch is required. Context switching is performed in + the PendSV interrupt. Pend the PendSV interrupt. */ + portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; + } ++ else ++ { ++ traceISR_EXIT(); ++ } + } + portENABLE_INTERRUPTS(); + } +diff -rupN org/Source/portable/GCC/ARM_CM4F/portmacro.h new/Source/portable/GCC/ARM_CM4F/portmacro.h +--- org/Source/portable/GCC/ARM_CM4F/portmacro.h 2017-11-28 13:48:34.000000000 -0800 ++++ new/Source/portable/GCC/ARM_CM4F/portmacro.h 2017-12-11 01:15:16.546830000 -0800 +@@ -90,7 +90,7 @@ typedef unsigned long UBaseType_t; + + #define portNVIC_INT_CTRL_REG ( * ( ( volatile uint32_t * ) 0xe000ed04 ) ) + #define portNVIC_PENDSVSET_BIT ( 1UL << 28UL ) +-#define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired != pdFALSE ) portYIELD() ++#define portEND_SWITCHING_ISR( xSwitchRequired ) { if( xSwitchRequired != pdFALSE ) { traceISR_EXIT_TO_SCHEDULER(); portYIELD(); } else { traceISR_EXIT(); } } + #define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x ) + /*-----------------------------------------------------------*/ + +diff -rupN org/Source/tasks.c new/Source/tasks.c +--- org/Source/tasks.c 2017-11-28 13:48:34.000000000 -0800 ++++ new/Source/tasks.c 2017-12-11 01:08:48.591428000 -0800 +@@ -237,6 +237,17 @@ count overflows. */ + taskRECORD_READY_PRIORITY( ( pxTCB )->uxPriority ); \ + vListInsertEnd( &( pxReadyTasksLists[ ( pxTCB )->uxPriority ] ), &( ( pxTCB )->xStateListItem ) ); \ + tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB ) ++ ++/* ++ * Place the task represented by pxTCB which has been in a ready list before ++ * into the appropriate ready list for the task. ++ * It is inserted at the end of the list. ++ */ ++#define prvReaddTaskToReadyList( pxTCB ) \ ++ traceREADDED_TASK_TO_READY_STATE( pxTCB ); \ ++ taskRECORD_READY_PRIORITY( ( pxTCB )->uxPriority ); \ ++ vListInsertEnd( &( pxReadyTasksLists[ ( pxTCB )->uxPriority ] ), &( ( pxTCB )->xStateListItem ) ); \ ++ tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB ) + /*-----------------------------------------------------------*/ + + /* +@@ -1598,7 +1609,7 @@ static void prvAddNewTaskToReadyList( TC + { + mtCOVERAGE_TEST_MARKER(); + } +- prvAddTaskToReadyList( pxTCB ); ++ prvReaddTaskToReadyList( pxTCB ); + } + else + { +@@ -1659,7 +1670,7 @@ static void prvAddNewTaskToReadyList( TC + { + mtCOVERAGE_TEST_MARKER(); + } +- ++ traceMOVED_TASK_TO_SUSPENDED_LIST(pxTCB); + vListInsertEnd( &xSuspendedTaskList, &( pxTCB->xStateListItem ) ); + + #if( configUSE_TASK_NOTIFICATIONS == 1 ) +@@ -3671,6 +3682,20 @@ static void prvCheckTasksWaitingTerminat + #endif /* INCLUDE_uxTaskGetStackHighWaterMark */ + /*-----------------------------------------------------------*/ + ++#if (INCLUDE_pxTaskGetStackStart == 1) ++ uint8_t* pxTaskGetStackStart( TaskHandle_t xTask) ++ { ++ TCB_t *pxTCB; ++ UBaseType_t uxReturn; ++ (void)uxReturn; ++ ++ pxTCB = prvGetTCBFromHandle( xTask ); ++ return ( uint8_t * ) pxTCB->pxStack; ++ } ++ ++#endif /* INCLUDE_pxTaskGetStackStart */ ++/*-----------------------------------------------------------*/ ++ + #if ( INCLUDE_vTaskDelete == 1 ) + + static void prvDeleteTCB( TCB_t *pxTCB ) +@@ -3840,7 +3865,7 @@ TCB_t *pxTCB; + + /* Inherit the priority before being moved into the new list. */ + pxMutexHolderTCB->uxPriority = pxCurrentTCB->uxPriority; +- prvAddTaskToReadyList( pxMutexHolderTCB ); ++ prvReaddTaskToReadyList( pxMutexHolderTCB ); + } + else + { +@@ -3930,7 +3955,7 @@ TCB_t *pxTCB; + any other purpose if this task is running, and it must be + running to give back the mutex. */ + listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) pxTCB->uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ +- prvAddTaskToReadyList( pxTCB ); ++ prvReaddTaskToReadyList( pxTCB ); + + /* Return true to indicate that a context switch is required. + This is only actually required in the corner case whereby +@@ -4940,6 +4965,7 @@ const TickType_t xConstTickCount = xTick + /* Add the task to the suspended task list instead of a delayed task + list to ensure it is not woken by a timing event. It will block + indefinitely. */ ++ traceMOVED_TASK_TO_SUSPENDED_LIST(pxCurrentTCB); + vListInsertEnd( &xSuspendedTaskList, &( pxCurrentTCB->xStateListItem ) ); + } + else +@@ -4956,12 +4982,14 @@ const TickType_t xConstTickCount = xTick + { + /* Wake time has overflowed. Place this item in the overflow + list. */ ++ traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST(); + vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); + } + else + { + /* The wake time has not overflowed, so the current block list + is used. */ ++ traceMOVED_TASK_TO_DELAYED_LIST(); + vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); + + /* If the task entering the blocked state was placed at the +@@ -4991,11 +5019,13 @@ const TickType_t xConstTickCount = xTick + if( xTimeToWake < xConstTickCount ) + { + /* Wake time has overflowed. Place this item in the overflow list. */ ++ traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST(); + vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); + } + else + { + /* The wake time has not overflowed, so the current block list is used. */ ++ traceMOVED_TASK_TO_DELAYED_LIST(); + vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); + + /* If the task entering the blocked state was placed at the head of the diff --git a/SEGGER/SEGGER/SEGGER.h b/SEGGER/SEGGER/SEGGER.h new file mode 100644 index 0000000..397bae8 --- /dev/null +++ b/SEGGER/SEGGER/SEGGER.h @@ -0,0 +1,248 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +---------------------------------------------------------------------- +File : SEGGER.h +Purpose : Global types etc & general purpose utility functions +Revision: $Rev: 18102 $ +---------------------------END-OF-HEADER------------------------------ +*/ + +#ifndef SEGGER_H // Guard against multiple inclusion +#define SEGGER_H + +#include // For va_list. +#include "Global.h" // Type definitions: U8, U16, U32, I8, I16, I32 + +#if defined(__cplusplus) +extern "C" { /* Make sure we have C-declarations in C++ programs */ +#endif + +/********************************************************************* +* +* Keywords/specifiers +* +********************************************************************** +*/ + +#ifndef INLINE + #if (defined(__ICCARM__) || defined(__RX) || defined(__ICCRX__)) + // + // Other known compilers. + // + #define INLINE inline + #else + #if (defined(_WIN32) && !defined(__clang__)) + // + // Microsoft VC6 and newer. + // Force inlining without cost checking. + // + #define INLINE __forceinline + #elif defined(__GNUC__) || defined(__clang__) + // + // Force inlining with GCC + clang + // + #define INLINE inline __attribute__((always_inline)) + #elif (defined(__CC_ARM)) + // + // Force inlining with ARMCC (Keil) + // + #define INLINE __inline + #else + // + // Unknown compilers. + // + #define INLINE + #endif + #endif +#endif + +/********************************************************************* +* +* Function-like macros +* +********************************************************************** +*/ + +#define SEGGER_COUNTOF(a) (sizeof((a))/sizeof((a)[0])) +#define SEGGER_MIN(a,b) (((a) < (b)) ? (a) : (b)) +#define SEGGER_MAX(a,b) (((a) > (b)) ? (a) : (b)) + +#ifndef SEGGER_USE_PARA // Some compiler complain about unused parameters. + #define SEGGER_USE_PARA(Para) (void)Para // This works for most compilers. +#endif + +#define SEGGER_ADDR2PTR(Type, Addr) (/*lint -e(923) -e(9078)*/((Type*)((PTR_ADDR)(Addr)))) // Allow cast from address to pointer. +#define SEGGER_PTR2ADDR(p) (/*lint -e(923) -e(9078)*/((PTR_ADDR)(p))) // Allow cast from pointer to address. +#define SEGGER_PTR2PTR(Type, p) (/*lint -e(740) -e(826) -e(9079) -e(9087)*/((Type*)(p))) // Allow cast from one pointer type to another (ignore different size). +#define SEGGER_PTR_DISTANCE(p0, p1) (SEGGER_PTR2ADDR(p0) - SEGGER_PTR2ADDR(p1)) + +/********************************************************************* +* +* Defines +* +********************************************************************** +*/ + +#define SEGGER_PRINTF_FLAG_ADJLEFT (1 << 0) +#define SEGGER_PRINTF_FLAG_SIGNFORCE (1 << 1) +#define SEGGER_PRINTF_FLAG_SIGNSPACE (1 << 2) +#define SEGGER_PRINTF_FLAG_PRECEED (1 << 3) +#define SEGGER_PRINTF_FLAG_ZEROPAD (1 << 4) +#define SEGGER_PRINTF_FLAG_NEGATIVE (1 << 5) + +/********************************************************************* +* +* Types +* +********************************************************************** +*/ + +typedef struct { + char* pBuffer; + int BufferSize; + int Cnt; +} SEGGER_BUFFER_DESC; + +typedef struct { + unsigned int CacheLineSize; // 0: No Cache. Most Systems such as ARM9 use a 32 bytes cache line size. + void (*pfDMB) (void); // Optional DMB function for Data Memory Barrier to make sure all memory operations are completed. + void (*pfClean) (void *p, unsigned long NumBytes); // Optional clean function for cached memory. + void (*pfInvalidate)(void *p, unsigned long NumBytes); // Optional invalidate function for cached memory. +} SEGGER_CACHE_CONFIG; + +typedef struct SEGGER_SNPRINTF_CONTEXT_struct SEGGER_SNPRINTF_CONTEXT; + +struct SEGGER_SNPRINTF_CONTEXT_struct { + void* pContext; // Application specific context. + SEGGER_BUFFER_DESC* pBufferDesc; // Buffer descriptor to use for output. + void (*pfFlush)(SEGGER_SNPRINTF_CONTEXT* pContext); // Callback executed once the buffer is full. Callback decides if the buffer gets cleared to store more or not. +}; + +typedef struct { + void (*pfStoreChar) (SEGGER_BUFFER_DESC* pBufferDesc, SEGGER_SNPRINTF_CONTEXT* pContext, char c); + int (*pfPrintUnsigned) (SEGGER_BUFFER_DESC* pBufferDesc, SEGGER_SNPRINTF_CONTEXT* pContext, U32 v, unsigned Base, char Flags, int Width, int Precision); + int (*pfPrintInt) (SEGGER_BUFFER_DESC* pBufferDesc, SEGGER_SNPRINTF_CONTEXT* pContext, I32 v, unsigned Base, char Flags, int Width, int Precision); +} SEGGER_PRINTF_API; + +typedef void (*SEGGER_pFormatter)(SEGGER_BUFFER_DESC* pBufferDesc, SEGGER_SNPRINTF_CONTEXT* pContext, const SEGGER_PRINTF_API* pApi, va_list* pParamList, char Lead, int Width, int Precision); + +typedef struct SEGGER_PRINTF_FORMATTER { + struct SEGGER_PRINTF_FORMATTER* pNext; // Pointer to next formatter. + SEGGER_pFormatter pfFormatter; // Formatter function. + char Specifier; // Format specifier. +} SEGGER_PRINTF_FORMATTER; + +typedef struct { + U32 (*pfGetHPTimestamp)(void); // Mandatory, pfGetHPTimestamp + int (*pfGetUID) (U8 abUID[16]); // Optional, pfGetUID +} SEGGER_BSP_API; + +/********************************************************************* +* +* Utility functions +* +********************************************************************** +*/ + +// +// Memory operations. +// +void SEGGER_ARM_memcpy(void* pDest, const void* pSrc, int NumBytes); +void SEGGER_memcpy (void* pDest, const void* pSrc, unsigned NumBytes); +void SEGGER_memxor (void* pDest, const void* pSrc, unsigned NumBytes); + +// +// String functions. +// +int SEGGER_atoi (const char* s); +int SEGGER_isalnum (int c); +int SEGGER_isalpha (int c); +unsigned SEGGER_strlen (const char* s); +int SEGGER_tolower (int c); +int SEGGER_strcasecmp (const char* sText1, const char* sText2); +int SEGGER_strncasecmp(const char *sText1, const char *sText2, unsigned Count); + +// +// Buffer/printf related. +// +void SEGGER_StoreChar (SEGGER_BUFFER_DESC* pBufferDesc, char c); +void SEGGER_PrintUnsigned(SEGGER_BUFFER_DESC* pBufferDesc, U32 v, unsigned Base, int Precision); +void SEGGER_PrintInt (SEGGER_BUFFER_DESC* pBufferDesc, I32 v, unsigned Base, int Precision); +int SEGGER_snprintf (char* pBuffer, int BufferSize, const char* sFormat, ...); +int SEGGER_vsnprintf (char* pBuffer, int BufferSize, const char* sFormat, va_list ParamList); +int SEGGER_vsnprintfEx (SEGGER_SNPRINTF_CONTEXT* pContext, const char* sFormat, va_list ParamList); + +int SEGGER_PRINTF_AddFormatter (SEGGER_PRINTF_FORMATTER* pFormatter, SEGGER_pFormatter pfFormatter, char c); +void SEGGER_PRINTF_AddDoubleFormatter (void); +void SEGGER_PRINTF_AddIPFormatter (void); +void SEGGER_PRINTF_AddBLUEFormatter (void); +void SEGGER_PRINTF_AddCONNECTFormatter(void); +void SEGGER_PRINTF_AddSSLFormatter (void); +void SEGGER_PRINTF_AddSSHFormatter (void); +void SEGGER_PRINTF_AddHTMLFormatter (void); + +// +// BSP abstraction API. +// +int SEGGER_BSP_GetUID (U8 abUID[16]); +int SEGGER_BSP_GetUID32(U32* pUID); +void SEGGER_BSP_SetAPI (const SEGGER_BSP_API* pAPI); +void SEGGER_BSP_SeedUID (void); + +// +// Other API. +// +void SEGGER_VERSION_GetString(char acText[8], unsigned Version); + +#if defined(__cplusplus) +} /* Make sure we have C-declarations in C++ programs */ +#endif + +#endif // Avoid multiple inclusion + +/*************************** End of file ****************************/ diff --git a/SEGGER/SEGGER/SEGGER_RTT.c b/SEGGER/SEGGER/SEGGER_RTT.c new file mode 100644 index 0000000..27b4514 --- /dev/null +++ b/SEGGER/SEGGER/SEGGER_RTT.c @@ -0,0 +1,2065 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +---------------------------END-OF-HEADER------------------------------ +File : SEGGER_RTT.c +Purpose : Implementation of SEGGER real-time transfer (RTT) which + allows real-time communication on targets which support + debugger memory accesses while the CPU is running. +Revision: $Rev: 20869 $ + +Additional information: + Type "int" is assumed to be 32-bits in size + H->T Host to target communication + T->H Target to host communication + + RTT channel 0 is always present and reserved for Terminal usage. + Name is fixed to "Terminal" + + Effective buffer size: SizeOfBuffer - 1 + + WrOff == RdOff: Buffer is empty + WrOff == (RdOff - 1): Buffer is full + WrOff > RdOff: Free space includes wrap-around + WrOff < RdOff: Used space includes wrap-around + (WrOff == (SizeOfBuffer - 1)) && (RdOff == 0): + Buffer full and wrap-around after next byte + + +---------------------------------------------------------------------- +*/ + +#include "SEGGER_RTT.h" + +#include // for memcpy + +/********************************************************************* +* +* Configuration, default values +* +********************************************************************** +*/ + +#if SEGGER_RTT_CPU_CACHE_LINE_SIZE + #ifdef SEGGER_RTT_CB_ALIGN + #error "Custom SEGGER_RTT_CB_ALIGN() is not supported for SEGGER_RTT_CPU_CACHE_LINE_SIZE != 0" + #endif + #ifdef SEGGER_RTT_BUFFER_ALIGN + #error "Custom SEGGER_RTT_BUFFER_ALIGN() is not supported for SEGGER_RTT_CPU_CACHE_LINE_SIZE != 0" + #endif + #ifdef SEGGER_RTT_PUT_CB_SECTION + #error "Custom SEGGER_RTT_PUT_CB_SECTION() is not supported for SEGGER_RTT_CPU_CACHE_LINE_SIZE != 0" + #endif + #ifdef SEGGER_RTT_PUT_BUFFER_SECTION + #error "Custom SEGGER_RTT_PUT_BUFFER_SECTION() is not supported for SEGGER_RTT_CPU_CACHE_LINE_SIZE != 0" + #endif + #ifdef SEGGER_RTT_BUFFER_ALIGNMENT + #error "Custom SEGGER_RTT_BUFFER_ALIGNMENT is not supported for SEGGER_RTT_CPU_CACHE_LINE_SIZE != 0" + #endif + #ifdef SEGGER_RTT_ALIGNMENT + #error "Custom SEGGER_RTT_ALIGNMENT is not supported for SEGGER_RTT_CPU_CACHE_LINE_SIZE != 0" + #endif +#endif + +#ifndef BUFFER_SIZE_UP + #define BUFFER_SIZE_UP 1024 // Size of the buffer for terminal output of target, up to host +#endif + +#ifndef BUFFER_SIZE_DOWN + #define BUFFER_SIZE_DOWN 16 // Size of the buffer for terminal input to target from host (Usually keyboard input) +#endif + +#ifndef SEGGER_RTT_MAX_NUM_UP_BUFFERS + #define SEGGER_RTT_MAX_NUM_UP_BUFFERS 2 // Number of up-buffers (T->H) available on this target +#endif + +#ifndef SEGGER_RTT_MAX_NUM_DOWN_BUFFERS + #define SEGGER_RTT_MAX_NUM_DOWN_BUFFERS 2 // Number of down-buffers (H->T) available on this target +#endif + +#ifndef SEGGER_RTT_BUFFER_SECTION + #if defined(SEGGER_RTT_SECTION) + #define SEGGER_RTT_BUFFER_SECTION SEGGER_RTT_SECTION + #endif +#endif + +#ifndef SEGGER_RTT_ALIGNMENT + #define SEGGER_RTT_ALIGNMENT SEGGER_RTT_CPU_CACHE_LINE_SIZE +#endif + +#ifndef SEGGER_RTT_BUFFER_ALIGNMENT + #define SEGGER_RTT_BUFFER_ALIGNMENT SEGGER_RTT_CPU_CACHE_LINE_SIZE +#endif + +#ifndef SEGGER_RTT_MODE_DEFAULT + #define SEGGER_RTT_MODE_DEFAULT SEGGER_RTT_MODE_NO_BLOCK_SKIP +#endif + +#ifndef SEGGER_RTT_LOCK + #define SEGGER_RTT_LOCK() +#endif + +#ifndef SEGGER_RTT_UNLOCK + #define SEGGER_RTT_UNLOCK() +#endif + +#ifndef STRLEN + #define STRLEN(a) strlen((a)) +#endif + +#ifndef STRCPY + #define STRCPY(pDest, pSrc) strcpy((pDest), (pSrc)) +#endif + +#ifndef SEGGER_RTT_MEMCPY_USE_BYTELOOP + #define SEGGER_RTT_MEMCPY_USE_BYTELOOP 0 +#endif + +#ifndef SEGGER_RTT_MEMCPY + #ifdef MEMCPY + #define SEGGER_RTT_MEMCPY(pDest, pSrc, NumBytes) MEMCPY((pDest), (pSrc), (NumBytes)) + #else + #define SEGGER_RTT_MEMCPY(pDest, pSrc, NumBytes) memcpy((pDest), (pSrc), (NumBytes)) + #endif +#endif + +#ifndef MIN + #define MIN(a, b) (((a) < (b)) ? (a) : (b)) +#endif + +#ifndef MAX + #define MAX(a, b) (((a) > (b)) ? (a) : (b)) +#endif +// +// For some environments, NULL may not be defined until certain headers are included +// +#ifndef NULL + #define NULL 0 +#endif + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ +#if (defined __ICCARM__) || (defined __ICCRX__) + #define RTT_PRAGMA(P) _Pragma(#P) +#endif + +#if SEGGER_RTT_ALIGNMENT || SEGGER_RTT_BUFFER_ALIGNMENT + #if (defined __GNUC__) + #define SEGGER_RTT_ALIGN(Var, Alignment) Var __attribute__ ((aligned (Alignment))) + #elif (defined __ICCARM__) || (defined __ICCRX__) + #define PRAGMA(A) _Pragma(#A) +#define SEGGER_RTT_ALIGN(Var, Alignment) RTT_PRAGMA(data_alignment=Alignment) \ + Var + #elif (defined __CC_ARM) + #define SEGGER_RTT_ALIGN(Var, Alignment) Var __attribute__ ((aligned (Alignment))) + #else + #error "Alignment not supported for this compiler." + #endif +#else + #define SEGGER_RTT_ALIGN(Var, Alignment) Var +#endif + +#if defined(SEGGER_RTT_SECTION) || defined (SEGGER_RTT_BUFFER_SECTION) + #if (defined __GNUC__) + #define SEGGER_RTT_PUT_SECTION(Var, Section) __attribute__ ((section (Section))) Var + #elif (defined __ICCARM__) || (defined __ICCRX__) +#define SEGGER_RTT_PUT_SECTION(Var, Section) RTT_PRAGMA(location=Section) \ + Var + #elif (defined __CC_ARM) + #define SEGGER_RTT_PUT_SECTION(Var, Section) __attribute__ ((section (Section), zero_init)) Var + #else + #error "Section placement not supported for this compiler." + #endif +#else + #define SEGGER_RTT_PUT_SECTION(Var, Section) Var +#endif + +#if SEGGER_RTT_ALIGNMENT + #define SEGGER_RTT_CB_ALIGN(Var) SEGGER_RTT_ALIGN(Var, SEGGER_RTT_ALIGNMENT) +#else + #define SEGGER_RTT_CB_ALIGN(Var) Var +#endif + +#if SEGGER_RTT_BUFFER_ALIGNMENT + #define SEGGER_RTT_BUFFER_ALIGN(Var) SEGGER_RTT_ALIGN(Var, SEGGER_RTT_BUFFER_ALIGNMENT) +#else + #define SEGGER_RTT_BUFFER_ALIGN(Var) Var +#endif + + +#if defined(SEGGER_RTT_SECTION) + #define SEGGER_RTT_PUT_CB_SECTION(Var) SEGGER_RTT_PUT_SECTION(Var, SEGGER_RTT_SECTION) +#else + #define SEGGER_RTT_PUT_CB_SECTION(Var) Var +#endif + +#if defined(SEGGER_RTT_BUFFER_SECTION) + #define SEGGER_RTT_PUT_BUFFER_SECTION(Var) SEGGER_RTT_PUT_SECTION(Var, SEGGER_RTT_BUFFER_SECTION) +#else + #define SEGGER_RTT_PUT_BUFFER_SECTION(Var) Var +#endif + +/********************************************************************* +* +* Static const data +* +********************************************************************** +*/ + +static unsigned char _aTerminalId[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; + +/********************************************************************* +* +* Static data +* +********************************************************************** +*/ + +// +// RTT Control Block and allocate buffers for channel 0 +// +SEGGER_RTT_PUT_CB_SECTION(SEGGER_RTT_CB_ALIGN(SEGGER_RTT_CB _SEGGER_RTT)); +SEGGER_RTT_PUT_BUFFER_SECTION(SEGGER_RTT_BUFFER_ALIGN(static char _acUpBuffer [SEGGER_RTT__ROUND_UP_2_CACHE_LINE_SIZE(BUFFER_SIZE_UP)])); +SEGGER_RTT_PUT_BUFFER_SECTION(SEGGER_RTT_BUFFER_ALIGN(static char _acDownBuffer[SEGGER_RTT__ROUND_UP_2_CACHE_LINE_SIZE(BUFFER_SIZE_DOWN)])); + +static unsigned char _ActiveTerminal; + +/********************************************************************* +* +* Static functions +* +********************************************************************** +*/ + +/********************************************************************* +* +* _DoInit() +* +* Function description +* Initializes the control block an buffers. +* May only be called via INIT() to avoid overriding settings. +* +*/ +#define INIT() { \ + volatile SEGGER_RTT_CB* pRTTCBInit; \ + pRTTCBInit = (volatile SEGGER_RTT_CB*)((char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); \ + do { \ + if (pRTTCBInit->acID[0] == '\0') { \ + _DoInit(); \ + } \ + } while (0); \ + } + +static void _DoInit(void) { + volatile SEGGER_RTT_CB* p; // Volatile to make sure that compiler cannot change the order of accesses to the control block + // + // Initialize control block + // + p = (volatile SEGGER_RTT_CB*)((char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access control block uncached so that nothing in the cache ever becomes dirty and all changes are visible in HW directly + p->MaxNumUpBuffers = SEGGER_RTT_MAX_NUM_UP_BUFFERS; + p->MaxNumDownBuffers = SEGGER_RTT_MAX_NUM_DOWN_BUFFERS; + // + // Initialize up buffer 0 + // + p->aUp[0].sName = "Terminal"; + p->aUp[0].pBuffer = _acUpBuffer; + p->aUp[0].SizeOfBuffer = BUFFER_SIZE_UP; + p->aUp[0].RdOff = 0u; + p->aUp[0].WrOff = 0u; + p->aUp[0].Flags = SEGGER_RTT_MODE_DEFAULT; + // + // Initialize down buffer 0 + // + p->aDown[0].sName = "Terminal"; + p->aDown[0].pBuffer = _acDownBuffer; + p->aDown[0].SizeOfBuffer = BUFFER_SIZE_DOWN; + p->aDown[0].RdOff = 0u; + p->aDown[0].WrOff = 0u; + p->aDown[0].Flags = SEGGER_RTT_MODE_DEFAULT; + // + // Finish initialization of the control block. + // Copy Id string in three steps to make sure "SEGGER RTT" is not found + // in initializer memory (usually flash) by J-Link + // + STRCPY((char*)&p->acID[7], "RTT"); + RTT__DMB(); // Force order of memory accessed inside core for cores that allow to change the order + STRCPY((char*)&p->acID[0], "SEGGER"); + RTT__DMB(); // Force order of memory accessed inside core for cores that allow to change the order + p->acID[6] = ' '; + RTT__DMB(); // Force order of memory accessed inside core for cores that allow to change the order +} + +/********************************************************************* +* +* _WriteBlocking() +* +* Function description +* Stores a specified number of characters in SEGGER RTT ring buffer +* and updates the associated write pointer which is periodically +* read by the host. +* The caller is responsible for managing the write chunk sizes as +* _WriteBlocking() will block until all data has been posted successfully. +* +* Parameters +* pRing Ring buffer to post to. +* pBuffer Pointer to character array. Does not need to point to a \0 terminated string. +* NumBytes Number of bytes to be stored in the SEGGER RTT control block. +* +* Return value +* >= 0 - Number of bytes written into buffer. +*/ +static unsigned _WriteBlocking(SEGGER_RTT_BUFFER_UP* pRing, const char* pBuffer, unsigned NumBytes) { + unsigned NumBytesToWrite; + unsigned NumBytesWritten; + unsigned RdOff; + unsigned WrOff; + volatile char* pDst; + // + // Write data to buffer and handle wrap-around if necessary + // + NumBytesWritten = 0u; + WrOff = pRing->WrOff; + do { + RdOff = pRing->RdOff; // May be changed by host (debug probe) in the meantime + if (RdOff > WrOff) { + NumBytesToWrite = RdOff - WrOff - 1u; + } else { + NumBytesToWrite = pRing->SizeOfBuffer - (WrOff - RdOff + 1u); + } + NumBytesToWrite = MIN(NumBytesToWrite, (pRing->SizeOfBuffer - WrOff)); // Number of bytes that can be written until buffer wrap-around + NumBytesToWrite = MIN(NumBytesToWrite, NumBytes); + pDst = (pRing->pBuffer + WrOff) + SEGGER_RTT_UNCACHED_OFF; +#if SEGGER_RTT_MEMCPY_USE_BYTELOOP + NumBytesWritten += NumBytesToWrite; + NumBytes -= NumBytesToWrite; + WrOff += NumBytesToWrite; + while (NumBytesToWrite--) { + *pDst++ = *pBuffer++; + }; +#else + SEGGER_RTT_MEMCPY((void*)pDst, pBuffer, NumBytesToWrite); + NumBytesWritten += NumBytesToWrite; + pBuffer += NumBytesToWrite; + NumBytes -= NumBytesToWrite; + WrOff += NumBytesToWrite; +#endif + if (WrOff == pRing->SizeOfBuffer) { + WrOff = 0u; + } + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff = WrOff; + } while (NumBytes); + return NumBytesWritten; +} + +/********************************************************************* +* +* _WriteNoCheck() +* +* Function description +* Stores a specified number of characters in SEGGER RTT ring buffer +* and updates the associated write pointer which is periodically +* read by the host. +* It is callers responsibility to make sure data actually fits in buffer. +* +* Parameters +* pRing Ring buffer to post to. +* pBuffer Pointer to character array. Does not need to point to a \0 terminated string. +* NumBytes Number of bytes to be stored in the SEGGER RTT control block. +* +* Notes +* (1) If there might not be enough space in the "Up"-buffer, call _WriteBlocking +*/ +static void _WriteNoCheck(SEGGER_RTT_BUFFER_UP* pRing, const char* pData, unsigned NumBytes) { + unsigned NumBytesAtOnce; + unsigned WrOff; + unsigned Rem; + volatile char* pDst; + + WrOff = pRing->WrOff; + Rem = pRing->SizeOfBuffer - WrOff; + if (Rem > NumBytes) { + // + // All data fits before wrap around + // + pDst = (pRing->pBuffer + WrOff) + SEGGER_RTT_UNCACHED_OFF; +#if SEGGER_RTT_MEMCPY_USE_BYTELOOP + WrOff += NumBytes; + while (NumBytes--) { + *pDst++ = *pData++; + }; + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff = WrOff; +#else + SEGGER_RTT_MEMCPY((void*)pDst, pData, NumBytes); + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff = WrOff + NumBytes; +#endif + } else { + // + // We reach the end of the buffer, so need to wrap around + // +#if SEGGER_RTT_MEMCPY_USE_BYTELOOP + pDst = (pRing->pBuffer + WrOff) + SEGGER_RTT_UNCACHED_OFF; + NumBytesAtOnce = Rem; + while (NumBytesAtOnce--) { + *pDst++ = *pData++; + }; + pDst = pRing->pBuffer + SEGGER_RTT_UNCACHED_OFF; + NumBytesAtOnce = NumBytes - Rem; + while (NumBytesAtOnce--) { + *pDst++ = *pData++; + }; + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff = NumBytes - Rem; +#else + NumBytesAtOnce = Rem; + pDst = (pRing->pBuffer + WrOff) + SEGGER_RTT_UNCACHED_OFF; + SEGGER_RTT_MEMCPY((void*)pDst, pData, NumBytesAtOnce); + NumBytesAtOnce = NumBytes - Rem; + pDst = pRing->pBuffer + SEGGER_RTT_UNCACHED_OFF; + SEGGER_RTT_MEMCPY((void*)pDst, pData + Rem, NumBytesAtOnce); + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff = NumBytesAtOnce; +#endif + } +} + +/********************************************************************* +* +* _PostTerminalSwitch() +* +* Function description +* Switch terminal to the given terminal ID. It is the caller's +* responsibility to ensure the terminal ID is correct and there is +* enough space in the buffer for this to complete successfully. +* +* Parameters +* pRing Ring buffer to post to. +* TerminalId Terminal ID to switch to. +*/ +static void _PostTerminalSwitch(SEGGER_RTT_BUFFER_UP* pRing, unsigned char TerminalId) { + unsigned char ac[2]; + + ac[0] = 0xFFu; + ac[1] = _aTerminalId[TerminalId]; // Caller made already sure that TerminalId does not exceed our terminal limit + _WriteBlocking(pRing, (const char*)ac, 2u); +} + +/********************************************************************* +* +* _GetAvailWriteSpace() +* +* Function description +* Returns the number of bytes that can be written to the ring +* buffer without blocking. +* +* Parameters +* pRing Ring buffer to check. +* +* Return value +* Number of bytes that are free in the buffer. +*/ +static unsigned _GetAvailWriteSpace(SEGGER_RTT_BUFFER_UP* pRing) { + unsigned RdOff; + unsigned WrOff; + unsigned r; + // + // Avoid warnings regarding volatile access order. It's not a problem + // in this case, but dampen compiler enthusiasm. + // + RdOff = pRing->RdOff; + WrOff = pRing->WrOff; + if (RdOff <= WrOff) { + r = pRing->SizeOfBuffer - 1u - WrOff + RdOff; + } else { + r = RdOff - WrOff - 1u; + } + return r; +} + +/********************************************************************* +* +* Public code +* +********************************************************************** +*/ + +/********************************************************************* +* +* SEGGER_RTT_ReadUpBufferNoLock() +* +* Function description +* Reads characters from SEGGER real-time-terminal control block +* which have been previously stored by the application. +* Do not lock against interrupts and multiple access. +* Used to do the same operation that J-Link does, to transfer +* RTT data via other channels, such as TCP/IP or UART. +* +* Parameters +* BufferIndex Index of Up-buffer to be used. +* pBuffer Pointer to buffer provided by target application, to copy characters from RTT-up-buffer to. +* BufferSize Size of the target application buffer. +* +* Return value +* Number of bytes that have been read. +* +* Additional information +* This function must not be called when J-Link might also do RTT. +*/ +unsigned SEGGER_RTT_ReadUpBufferNoLock(unsigned BufferIndex, void* pData, unsigned BufferSize) { + unsigned NumBytesRem; + unsigned NumBytesRead; + unsigned RdOff; + unsigned WrOff; + unsigned char* pBuffer; + SEGGER_RTT_BUFFER_UP* pRing; + volatile char* pSrc; + + INIT(); + pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + pBuffer = (unsigned char*)pData; + RdOff = pRing->RdOff; + WrOff = pRing->WrOff; + NumBytesRead = 0u; + // + // Read from current read position to wrap-around of buffer, first + // + if (RdOff > WrOff) { + NumBytesRem = pRing->SizeOfBuffer - RdOff; + NumBytesRem = MIN(NumBytesRem, BufferSize); + pSrc = (pRing->pBuffer + RdOff) + SEGGER_RTT_UNCACHED_OFF; +#if SEGGER_RTT_MEMCPY_USE_BYTELOOP + NumBytesRead += NumBytesRem; + BufferSize -= NumBytesRem; + RdOff += NumBytesRem; + while (NumBytesRem--) { + *pBuffer++ = *pSrc++; + }; +#else + SEGGER_RTT_MEMCPY(pBuffer, (void*)pSrc, NumBytesRem); + NumBytesRead += NumBytesRem; + pBuffer += NumBytesRem; + BufferSize -= NumBytesRem; + RdOff += NumBytesRem; +#endif + // + // Handle wrap-around of buffer + // + if (RdOff == pRing->SizeOfBuffer) { + RdOff = 0u; + } + } + // + // Read remaining items of buffer + // + NumBytesRem = WrOff - RdOff; + NumBytesRem = MIN(NumBytesRem, BufferSize); + if (NumBytesRem > 0u) { + pSrc = (pRing->pBuffer + RdOff) + SEGGER_RTT_UNCACHED_OFF; +#if SEGGER_RTT_MEMCPY_USE_BYTELOOP + NumBytesRead += NumBytesRem; + BufferSize -= NumBytesRem; + RdOff += NumBytesRem; + while (NumBytesRem--) { + *pBuffer++ = *pSrc++; + }; +#else + SEGGER_RTT_MEMCPY(pBuffer, (void*)pSrc, NumBytesRem); + NumBytesRead += NumBytesRem; + pBuffer += NumBytesRem; + BufferSize -= NumBytesRem; + RdOff += NumBytesRem; +#endif + } + // + // Update read offset of buffer + // + if (NumBytesRead) { + pRing->RdOff = RdOff; + } + // + return NumBytesRead; +} + +/********************************************************************* +* +* SEGGER_RTT_ReadNoLock() +* +* Function description +* Reads characters from SEGGER real-time-terminal control block +* which have been previously stored by the host. +* Do not lock against interrupts and multiple access. +* +* Parameters +* BufferIndex Index of Down-buffer to be used (e.g. 0 for "Terminal"). +* pBuffer Pointer to buffer provided by target application, to copy characters from RTT-down-buffer to. +* BufferSize Size of the target application buffer. +* +* Return value +* Number of bytes that have been read. +*/ +unsigned SEGGER_RTT_ReadNoLock(unsigned BufferIndex, void* pData, unsigned BufferSize) { + unsigned NumBytesRem; + unsigned NumBytesRead; + unsigned RdOff; + unsigned WrOff; + unsigned char* pBuffer; + SEGGER_RTT_BUFFER_DOWN* pRing; + volatile char* pSrc; + // + INIT(); + pRing = (SEGGER_RTT_BUFFER_DOWN*)((char*)&_SEGGER_RTT.aDown[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + pBuffer = (unsigned char*)pData; + RdOff = pRing->RdOff; + WrOff = pRing->WrOff; + NumBytesRead = 0u; + // + // Read from current read position to wrap-around of buffer, first + // + if (RdOff > WrOff) { + NumBytesRem = pRing->SizeOfBuffer - RdOff; + NumBytesRem = MIN(NumBytesRem, BufferSize); + pSrc = (pRing->pBuffer + RdOff) + SEGGER_RTT_UNCACHED_OFF; +#if SEGGER_RTT_MEMCPY_USE_BYTELOOP + NumBytesRead += NumBytesRem; + BufferSize -= NumBytesRem; + RdOff += NumBytesRem; + while (NumBytesRem--) { + *pBuffer++ = *pSrc++; + }; +#else + SEGGER_RTT_MEMCPY(pBuffer, (void*)pSrc, NumBytesRem); + NumBytesRead += NumBytesRem; + pBuffer += NumBytesRem; + BufferSize -= NumBytesRem; + RdOff += NumBytesRem; +#endif + // + // Handle wrap-around of buffer + // + if (RdOff == pRing->SizeOfBuffer) { + RdOff = 0u; + } + } + // + // Read remaining items of buffer + // + NumBytesRem = WrOff - RdOff; + NumBytesRem = MIN(NumBytesRem, BufferSize); + if (NumBytesRem > 0u) { + pSrc = (pRing->pBuffer + RdOff) + SEGGER_RTT_UNCACHED_OFF; +#if SEGGER_RTT_MEMCPY_USE_BYTELOOP + NumBytesRead += NumBytesRem; + BufferSize -= NumBytesRem; + RdOff += NumBytesRem; + while (NumBytesRem--) { + *pBuffer++ = *pSrc++; + }; +#else + SEGGER_RTT_MEMCPY(pBuffer, (void*)pSrc, NumBytesRem); + NumBytesRead += NumBytesRem; + pBuffer += NumBytesRem; + BufferSize -= NumBytesRem; + RdOff += NumBytesRem; +#endif + } + if (NumBytesRead) { + pRing->RdOff = RdOff; + } + // + return NumBytesRead; +} + +/********************************************************************* +* +* SEGGER_RTT_ReadUpBuffer +* +* Function description +* Reads characters from SEGGER real-time-terminal control block +* which have been previously stored by the application. +* Used to do the same operation that J-Link does, to transfer +* RTT data via other channels, such as TCP/IP or UART. +* +* Parameters +* BufferIndex Index of Up-buffer to be used. +* pBuffer Pointer to buffer provided by target application, to copy characters from RTT-up-buffer to. +* BufferSize Size of the target application buffer. +* +* Return value +* Number of bytes that have been read. +* +* Additional information +* This function must not be called when J-Link might also do RTT. +* This function locks against all other RTT operations. I.e. during +* the read operation, writing is also locked. +* If only one consumer reads from the up buffer, +* call sEGGER_RTT_ReadUpBufferNoLock() instead. +*/ +unsigned SEGGER_RTT_ReadUpBuffer(unsigned BufferIndex, void* pBuffer, unsigned BufferSize) { + unsigned NumBytesRead; + + SEGGER_RTT_LOCK(); + // + // Call the non-locking read function + // + NumBytesRead = SEGGER_RTT_ReadUpBufferNoLock(BufferIndex, pBuffer, BufferSize); + // + // Finish up. + // + SEGGER_RTT_UNLOCK(); + // + return NumBytesRead; +} + +/********************************************************************* +* +* SEGGER_RTT_Read +* +* Function description +* Reads characters from SEGGER real-time-terminal control block +* which have been previously stored by the host. +* +* Parameters +* BufferIndex Index of Down-buffer to be used (e.g. 0 for "Terminal"). +* pBuffer Pointer to buffer provided by target application, to copy characters from RTT-down-buffer to. +* BufferSize Size of the target application buffer. +* +* Return value +* Number of bytes that have been read. +*/ +unsigned SEGGER_RTT_Read(unsigned BufferIndex, void* pBuffer, unsigned BufferSize) { + unsigned NumBytesRead; + + SEGGER_RTT_LOCK(); + // + // Call the non-locking read function + // + NumBytesRead = SEGGER_RTT_ReadNoLock(BufferIndex, pBuffer, BufferSize); + // + // Finish up. + // + SEGGER_RTT_UNLOCK(); + // + return NumBytesRead; +} + +/********************************************************************* +* +* SEGGER_RTT_WriteWithOverwriteNoLock +* +* Function description +* Stores a specified number of characters in SEGGER RTT +* control block. +* SEGGER_RTT_WriteWithOverwriteNoLock does not lock the application +* and overwrites data if the data does not fit into the buffer. +* +* Parameters +* BufferIndex Index of "Up"-buffer to be used (e.g. 0 for "Terminal"). +* pBuffer Pointer to character array. Does not need to point to a \0 terminated string. +* NumBytes Number of bytes to be stored in the SEGGER RTT control block. +* +* Notes +* (1) If there is not enough space in the "Up"-buffer, data is overwritten. +* (2) For performance reasons this function does not call Init() +* and may only be called after RTT has been initialized. +* Either by calling SEGGER_RTT_Init() or calling another RTT API function first. +* (3) Do not use SEGGER_RTT_WriteWithOverwriteNoLock if a J-Link +* connection reads RTT data. +*/ +void SEGGER_RTT_WriteWithOverwriteNoLock(unsigned BufferIndex, const void* pBuffer, unsigned NumBytes) { + const char* pData; + SEGGER_RTT_BUFFER_UP* pRing; + unsigned Avail; + volatile char* pDst; + // + // Get "to-host" ring buffer and copy some elements into local variables. + // + pData = (const char *)pBuffer; + pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + // + // Check if we will overwrite data and need to adjust the RdOff. + // + if (pRing->WrOff == pRing->RdOff) { + Avail = pRing->SizeOfBuffer - 1u; + } else if ( pRing->WrOff < pRing->RdOff) { + Avail = pRing->RdOff - pRing->WrOff - 1u; + } else { + Avail = pRing->RdOff - pRing->WrOff - 1u + pRing->SizeOfBuffer; + } + if (NumBytes > Avail) { + pRing->RdOff += (NumBytes - Avail); + while (pRing->RdOff >= pRing->SizeOfBuffer) { + pRing->RdOff -= pRing->SizeOfBuffer; + } + } + // + // Write all data, no need to check the RdOff, but possibly handle multiple wrap-arounds + // + Avail = pRing->SizeOfBuffer - pRing->WrOff; + do { + if (Avail > NumBytes) { + // + // Last round + // + pDst = (pRing->pBuffer + pRing->WrOff) + SEGGER_RTT_UNCACHED_OFF; +#if SEGGER_RTT_MEMCPY_USE_BYTELOOP + Avail = NumBytes; + while (NumBytes--) { + *pDst++ = *pData++; + }; + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff += Avail; +#else + SEGGER_RTT_MEMCPY((void*)pDst, pData, NumBytes); + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff += NumBytes; +#endif + break; + } else { + // + // Wrap-around necessary, write until wrap-around and reset WrOff + // + pDst = (pRing->pBuffer + pRing->WrOff) + SEGGER_RTT_UNCACHED_OFF; +#if SEGGER_RTT_MEMCPY_USE_BYTELOOP + NumBytes -= Avail; + while (Avail--) { + *pDst++ = *pData++; + }; + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff = 0; +#else + SEGGER_RTT_MEMCPY((void*)pDst, pData, Avail); + pData += Avail; + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff = 0; + NumBytes -= Avail; +#endif + Avail = (pRing->SizeOfBuffer - 1); + } + } while (NumBytes); +} + +/********************************************************************* +* +* SEGGER_RTT_WriteSkipNoLock +* +* Function description +* Stores a specified number of characters in SEGGER RTT +* control block which is then read by the host. +* SEGGER_RTT_WriteSkipNoLock does not lock the application and +* skips all data, if the data does not fit into the buffer. +* +* Parameters +* BufferIndex Index of "Up"-buffer to be used (e.g. 0 for "Terminal"). +* pBuffer Pointer to character array. Does not need to point to a \0 terminated string. +* NumBytes Number of bytes to be stored in the SEGGER RTT control block. +* MUST be > 0!!! +* This is done for performance reasons, so no initial check has do be done. +* +* Return value +* 1: Data has been copied +* 0: No space, data has not been copied +* +* Notes +* (1) If there is not enough space in the "Up"-buffer, all data is dropped. +* (2) For performance reasons this function does not call Init() +* and may only be called after RTT has been initialized. +* Either by calling SEGGER_RTT_Init() or calling another RTT API function first. +*/ +#if (RTT_USE_ASM == 0) +unsigned SEGGER_RTT_WriteSkipNoLock(unsigned BufferIndex, const void* pBuffer, unsigned NumBytes) { + const char* pData; + SEGGER_RTT_BUFFER_UP* pRing; + unsigned Avail; + unsigned RdOff; + unsigned WrOff; + unsigned Rem; + volatile char* pDst; + // + // Cases: + // 1) RdOff <= WrOff => Space until wrap-around is sufficient + // 2) RdOff <= WrOff => Space after wrap-around needed (copy in 2 chunks) + // 3) RdOff < WrOff => No space in buf + // 4) RdOff > WrOff => Space is sufficient + // 5) RdOff > WrOff => No space in buf + // + // 1) is the most common case for large buffers and assuming that J-Link reads the data fast enough + // + pData = (const char *)pBuffer; + pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + RdOff = pRing->RdOff; + WrOff = pRing->WrOff; + if (RdOff <= WrOff) { // Case 1), 2) or 3) + Avail = pRing->SizeOfBuffer - WrOff - 1u; // Space until wrap-around (assume 1 byte not usable for case that RdOff == 0) + if (Avail >= NumBytes) { // Case 1)? +CopyStraight: + pDst = (pRing->pBuffer + WrOff) + SEGGER_RTT_UNCACHED_OFF; + memcpy((void*)pDst, pData, NumBytes); + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff = WrOff + NumBytes; + return 1; + } + Avail += RdOff; // Space incl. wrap-around + if (Avail >= NumBytes) { // Case 2? => If not, we have case 3) (does not fit) + Rem = pRing->SizeOfBuffer - WrOff; // Space until end of buffer + pDst = (pRing->pBuffer + WrOff) + SEGGER_RTT_UNCACHED_OFF; + memcpy((void*)pDst, pData, Rem); // Copy 1st chunk + NumBytes -= Rem; + // + // Special case: First check that assumed RdOff == 0 calculated that last element before wrap-around could not be used + // But 2nd check (considering space until wrap-around and until RdOff) revealed that RdOff is not 0, so we can use the last element + // In this case, we may use a copy straight until buffer end anyway without needing to copy 2 chunks + // Therefore, check if 2nd memcpy is necessary at all + // + if (NumBytes) { + pDst = pRing->pBuffer + SEGGER_RTT_UNCACHED_OFF; + memcpy((void*)pDst, pData + Rem, NumBytes); + } + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff = NumBytes; + return 1; + } + } else { // Potential case 4) + Avail = RdOff - WrOff - 1u; + if (Avail >= NumBytes) { // Case 4)? => If not, we have case 5) (does not fit) + goto CopyStraight; + } + } + return 0; // No space in buffer +} +#endif + +/********************************************************************* +* +* SEGGER_RTT_WriteDownBufferNoLock +* +* Function description +* Stores a specified number of characters in SEGGER RTT +* control block inside a buffer. +* SEGGER_RTT_WriteDownBufferNoLock does not lock the application. +* Used to do the same operation that J-Link does, to transfer +* RTT data from other channels, such as TCP/IP or UART. +* +* Parameters +* BufferIndex Index of "Down"-buffer to be used. +* pBuffer Pointer to character array. Does not need to point to a \0 terminated string. +* NumBytes Number of bytes to be stored in the SEGGER RTT control block. +* +* Return value +* Number of bytes which have been stored in the "Down"-buffer. +* +* Notes +* (1) Data is stored according to buffer flags. +* (2) For performance reasons this function does not call Init() +* and may only be called after RTT has been initialized. +* Either by calling SEGGER_RTT_Init() or calling another RTT API function first. +* +* Additional information +* This function must not be called when J-Link might also do RTT. +*/ +unsigned SEGGER_RTT_WriteDownBufferNoLock(unsigned BufferIndex, const void* pBuffer, unsigned NumBytes) { + unsigned Status; + unsigned Avail; + const char* pData; + SEGGER_RTT_BUFFER_UP* pRing; + // + // Get "to-target" ring buffer. + // It is save to cast that to a "to-host" buffer. Up and Down buffer differ in volatility of offsets that might be modified by J-Link. + // + pData = (const char *)pBuffer; + pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aDown[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + // + // How we output depends upon the mode... + // + switch (pRing->Flags) { + case SEGGER_RTT_MODE_NO_BLOCK_SKIP: + // + // If we are in skip mode and there is no space for the whole + // of this output, don't bother. + // + Avail = _GetAvailWriteSpace(pRing); + if (Avail < NumBytes) { + Status = 0u; + } else { + Status = NumBytes; + _WriteNoCheck(pRing, pData, NumBytes); + } + break; + case SEGGER_RTT_MODE_NO_BLOCK_TRIM: + // + // If we are in trim mode, trim to what we can output without blocking. + // + Avail = _GetAvailWriteSpace(pRing); + Status = Avail < NumBytes ? Avail : NumBytes; + _WriteNoCheck(pRing, pData, Status); + break; + case SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL: + // + // If we are in blocking mode, output everything. + // + Status = _WriteBlocking(pRing, pData, NumBytes); + break; + default: + Status = 0u; + break; + } + // + // Finish up. + // + return Status; +} + +/********************************************************************* +* +* SEGGER_RTT_WriteNoLock +* +* Function description +* Stores a specified number of characters in SEGGER RTT +* control block which is then read by the host. +* SEGGER_RTT_WriteNoLock does not lock the application. +* +* Parameters +* BufferIndex Index of "Up"-buffer to be used (e.g. 0 for "Terminal"). +* pBuffer Pointer to character array. Does not need to point to a \0 terminated string. +* NumBytes Number of bytes to be stored in the SEGGER RTT control block. +* +* Return value +* Number of bytes which have been stored in the "Up"-buffer. +* +* Notes +* (1) Data is stored according to buffer flags. +* (2) For performance reasons this function does not call Init() +* and may only be called after RTT has been initialized. +* Either by calling SEGGER_RTT_Init() or calling another RTT API function first. +*/ +unsigned SEGGER_RTT_WriteNoLock(unsigned BufferIndex, const void* pBuffer, unsigned NumBytes) { + unsigned Status; + unsigned Avail; + const char* pData; + SEGGER_RTT_BUFFER_UP* pRing; + // + // Get "to-host" ring buffer. + // + pData = (const char *)pBuffer; + pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + // + // How we output depends upon the mode... + // + switch (pRing->Flags) { + case SEGGER_RTT_MODE_NO_BLOCK_SKIP: + // + // If we are in skip mode and there is no space for the whole + // of this output, don't bother. + // + Avail = _GetAvailWriteSpace(pRing); + if (Avail < NumBytes) { + Status = 0u; + } else { + Status = NumBytes; + _WriteNoCheck(pRing, pData, NumBytes); + } + break; + case SEGGER_RTT_MODE_NO_BLOCK_TRIM: + // + // If we are in trim mode, trim to what we can output without blocking. + // + Avail = _GetAvailWriteSpace(pRing); + Status = Avail < NumBytes ? Avail : NumBytes; + _WriteNoCheck(pRing, pData, Status); + break; + case SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL: + // + // If we are in blocking mode, output everything. + // + Status = _WriteBlocking(pRing, pData, NumBytes); + break; + default: + Status = 0u; + break; + } + // + // Finish up. + // + return Status; +} + +/********************************************************************* +* +* SEGGER_RTT_WriteDownBuffer +* +* Function description +* Stores a specified number of characters in SEGGER RTT control block in a buffer. +* +* Parameters +* BufferIndex Index of "Up"-buffer to be used (e.g. 0 for "Terminal"). +* pBuffer Pointer to character array. Does not need to point to a \0 terminated string. +* NumBytes Number of bytes to be stored in the SEGGER RTT control block. +* +* Return value +* Number of bytes which have been stored in the "Down"-buffer. +* +* Notes +* (1) Data is stored according to buffer flags. +* +* Additional information +* This function must not be called when J-Link might also do RTT. +* This function locks against all other RTT operations. I.e. during +* the write operation, writing from the application is also locked. +* If only one consumer writes to the down buffer, +* call SEGGER_RTT_WriteDownBufferNoLock() instead. +*/ +unsigned SEGGER_RTT_WriteDownBuffer(unsigned BufferIndex, const void* pBuffer, unsigned NumBytes) { + unsigned Status; + + INIT(); + SEGGER_RTT_LOCK(); + Status = SEGGER_RTT_WriteDownBufferNoLock(BufferIndex, pBuffer, NumBytes); // Call the non-locking write function + SEGGER_RTT_UNLOCK(); + return Status; +} + +/********************************************************************* +* +* SEGGER_RTT_Write +* +* Function description +* Stores a specified number of characters in SEGGER RTT +* control block which is then read by the host. +* +* Parameters +* BufferIndex Index of "Up"-buffer to be used (e.g. 0 for "Terminal"). +* pBuffer Pointer to character array. Does not need to point to a \0 terminated string. +* NumBytes Number of bytes to be stored in the SEGGER RTT control block. +* +* Return value +* Number of bytes which have been stored in the "Up"-buffer. +* +* Notes +* (1) Data is stored according to buffer flags. +*/ +unsigned SEGGER_RTT_Write(unsigned BufferIndex, const void* pBuffer, unsigned NumBytes) { + unsigned Status; + + INIT(); + SEGGER_RTT_LOCK(); + Status = SEGGER_RTT_WriteNoLock(BufferIndex, pBuffer, NumBytes); // Call the non-locking write function + SEGGER_RTT_UNLOCK(); + return Status; +} + +/********************************************************************* +* +* SEGGER_RTT_WriteString +* +* Function description +* Stores string in SEGGER RTT control block. +* This data is read by the host. +* +* Parameters +* BufferIndex Index of "Up"-buffer to be used (e.g. 0 for "Terminal"). +* s Pointer to string. +* +* Return value +* Number of bytes which have been stored in the "Up"-buffer. +* +* Notes +* (1) Data is stored according to buffer flags. +* (2) String passed to this function has to be \0 terminated +* (3) \0 termination character is *not* stored in RTT buffer +*/ +unsigned SEGGER_RTT_WriteString(unsigned BufferIndex, const char* s) { + unsigned Len; + + Len = STRLEN(s); + return SEGGER_RTT_Write(BufferIndex, s, Len); +} + +/********************************************************************* +* +* SEGGER_RTT_PutCharSkipNoLock +* +* Function description +* Stores a single character/byte in SEGGER RTT buffer. +* SEGGER_RTT_PutCharSkipNoLock does not lock the application and +* skips the byte, if it does not fit into the buffer. +* +* Parameters +* BufferIndex Index of "Up"-buffer to be used (e.g. 0 for "Terminal"). +* c Byte to be stored. +* +* Return value +* Number of bytes which have been stored in the "Up"-buffer. +* +* Notes +* (1) If there is not enough space in the "Up"-buffer, the character is dropped. +* (2) For performance reasons this function does not call Init() +* and may only be called after RTT has been initialized. +* Either by calling SEGGER_RTT_Init() or calling another RTT API function first. +*/ + +unsigned SEGGER_RTT_PutCharSkipNoLock(unsigned BufferIndex, char c) { + SEGGER_RTT_BUFFER_UP* pRing; + unsigned WrOff; + unsigned Status; + volatile char* pDst; + // + // Get "to-host" ring buffer. + // + pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + // + // Get write position and handle wrap-around if necessary + // + WrOff = pRing->WrOff + 1; + if (WrOff == pRing->SizeOfBuffer) { + WrOff = 0; + } + // + // Output byte if free space is available + // + if (WrOff != pRing->RdOff) { + pDst = (pRing->pBuffer + pRing->WrOff) + SEGGER_RTT_UNCACHED_OFF; + *pDst = c; + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff = WrOff; + Status = 1; + } else { + Status = 0; + } + // + return Status; +} + +/********************************************************************* +* +* SEGGER_RTT_PutCharSkip +* +* Function description +* Stores a single character/byte in SEGGER RTT buffer. +* +* Parameters +* BufferIndex Index of "Up"-buffer to be used (e.g. 0 for "Terminal"). +* c Byte to be stored. +* +* Return value +* Number of bytes which have been stored in the "Up"-buffer. +* +* Notes +* (1) If there is not enough space in the "Up"-buffer, the character is dropped. +*/ + +unsigned SEGGER_RTT_PutCharSkip(unsigned BufferIndex, char c) { + SEGGER_RTT_BUFFER_UP* pRing; + unsigned WrOff; + unsigned Status; + volatile char* pDst; + // + // Prepare + // + INIT(); + SEGGER_RTT_LOCK(); + // + // Get "to-host" ring buffer. + // + pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + // + // Get write position and handle wrap-around if necessary + // + WrOff = pRing->WrOff + 1; + if (WrOff == pRing->SizeOfBuffer) { + WrOff = 0; + } + // + // Output byte if free space is available + // + if (WrOff != pRing->RdOff) { + pDst = (pRing->pBuffer + pRing->WrOff) + SEGGER_RTT_UNCACHED_OFF; + *pDst = c; + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff = WrOff; + Status = 1; + } else { + Status = 0; + } + // + // Finish up. + // + SEGGER_RTT_UNLOCK(); + // + return Status; +} + + /********************************************************************* +* +* SEGGER_RTT_PutChar +* +* Function description +* Stores a single character/byte in SEGGER RTT buffer. +* +* Parameters +* BufferIndex Index of "Up"-buffer to be used (e.g. 0 for "Terminal"). +* c Byte to be stored. +* +* Return value +* Number of bytes which have been stored in the "Up"-buffer. +* +* Notes +* (1) Data is stored according to buffer flags. +*/ + +unsigned SEGGER_RTT_PutChar(unsigned BufferIndex, char c) { + SEGGER_RTT_BUFFER_UP* pRing; + unsigned WrOff; + unsigned Status; + volatile char* pDst; + // + // Prepare + // + INIT(); + SEGGER_RTT_LOCK(); + // + // Get "to-host" ring buffer. + // + pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + // + // Get write position and handle wrap-around if necessary + // + WrOff = pRing->WrOff + 1; + if (WrOff == pRing->SizeOfBuffer) { + WrOff = 0; + } + // + // Wait for free space if mode is set to blocking + // + if (pRing->Flags == SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL) { + while (WrOff == pRing->RdOff) { + ; + } + } + // + // Output byte if free space is available + // + if (WrOff != pRing->RdOff) { + pDst = (pRing->pBuffer + pRing->WrOff) + SEGGER_RTT_UNCACHED_OFF; + *pDst = c; + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff = WrOff; + Status = 1; + } else { + Status = 0; + } + // + // Finish up. + // + SEGGER_RTT_UNLOCK(); + return Status; +} + +/********************************************************************* +* +* SEGGER_RTT_GetKey +* +* Function description +* Reads one character from the SEGGER RTT buffer. +* Host has previously stored data there. +* +* Return value +* < 0 - No character available (buffer empty). +* >= 0 - Character which has been read. (Possible values: 0 - 255) +* +* Notes +* (1) This function is only specified for accesses to RTT buffer 0. +*/ +int SEGGER_RTT_GetKey(void) { + char c; + int r; + + r = (int)SEGGER_RTT_Read(0u, &c, 1u); + if (r == 1) { + r = (int)(unsigned char)c; + } else { + r = -1; + } + return r; +} + +/********************************************************************* +* +* SEGGER_RTT_WaitKey +* +* Function description +* Waits until at least one character is avaible in the SEGGER RTT buffer. +* Once a character is available, it is read and this function returns. +* +* Return value +* >=0 - Character which has been read. +* +* Notes +* (1) This function is only specified for accesses to RTT buffer 0 +* (2) This function is blocking if no character is present in RTT buffer +*/ +int SEGGER_RTT_WaitKey(void) { + int r; + + do { + r = SEGGER_RTT_GetKey(); + } while (r < 0); + return r; +} + +/********************************************************************* +* +* SEGGER_RTT_HasKey +* +* Function description +* Checks if at least one character for reading is available in the SEGGER RTT buffer. +* +* Return value +* == 0 - No characters are available to read. +* == 1 - At least one character is available. +* +* Notes +* (1) This function is only specified for accesses to RTT buffer 0 +*/ +int SEGGER_RTT_HasKey(void) { + SEGGER_RTT_BUFFER_DOWN* pRing; + unsigned RdOff; + int r; + + INIT(); + pRing = (SEGGER_RTT_BUFFER_DOWN*)((char*)&_SEGGER_RTT.aDown[0] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + RdOff = pRing->RdOff; + if (RdOff != pRing->WrOff) { + r = 1; + } else { + r = 0; + } + return r; +} + +/********************************************************************* +* +* SEGGER_RTT_HasData +* +* Function description +* Check if there is data from the host in the given buffer. +* +* Return value: +* ==0: No data +* !=0: Data in buffer +* +*/ +unsigned SEGGER_RTT_HasData(unsigned BufferIndex) { + SEGGER_RTT_BUFFER_DOWN* pRing; + unsigned v; + + pRing = (SEGGER_RTT_BUFFER_DOWN*)((char*)&_SEGGER_RTT.aDown[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + v = pRing->WrOff; + return v - pRing->RdOff; +} + +/********************************************************************* +* +* SEGGER_RTT_HasDataUp +* +* Function description +* Check if there is data remaining to be sent in the given buffer. +* +* Return value: +* ==0: No data +* !=0: Data in buffer +* +*/ +unsigned SEGGER_RTT_HasDataUp(unsigned BufferIndex) { + SEGGER_RTT_BUFFER_UP* pRing; + unsigned v; + + pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + v = pRing->RdOff; + return pRing->WrOff - v; +} + +/********************************************************************* +* +* SEGGER_RTT_AllocDownBuffer +* +* Function description +* Run-time configuration of the next down-buffer (H->T). +* The next buffer, which is not used yet is configured. +* This includes: Buffer address, size, name, flags, ... +* +* Parameters +* sName Pointer to a constant name string. +* pBuffer Pointer to a buffer to be used. +* BufferSize Size of the buffer. +* Flags Operating modes. Define behavior if buffer is full (not enough space for entire message). +* +* Return value +* >= 0 - O.K. Buffer Index +* < 0 - Error +*/ +int SEGGER_RTT_AllocDownBuffer(const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags) { + int BufferIndex; + volatile SEGGER_RTT_CB* pRTTCB; + + INIT(); + SEGGER_RTT_LOCK(); + pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + BufferIndex = 0; + do { + if (pRTTCB->aDown[BufferIndex].pBuffer == NULL) { + break; + } + BufferIndex++; + } while (BufferIndex < pRTTCB->MaxNumDownBuffers); + if (BufferIndex < pRTTCB->MaxNumDownBuffers) { + pRTTCB->aDown[BufferIndex].sName = sName; + pRTTCB->aDown[BufferIndex].pBuffer = (char*)pBuffer; + pRTTCB->aDown[BufferIndex].SizeOfBuffer = BufferSize; + pRTTCB->aDown[BufferIndex].RdOff = 0u; + pRTTCB->aDown[BufferIndex].WrOff = 0u; + pRTTCB->aDown[BufferIndex].Flags = Flags; + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + } else { + BufferIndex = -1; + } + SEGGER_RTT_UNLOCK(); + return BufferIndex; +} + +/********************************************************************* +* +* SEGGER_RTT_AllocUpBuffer +* +* Function description +* Run-time configuration of the next up-buffer (T->H). +* The next buffer, which is not used yet is configured. +* This includes: Buffer address, size, name, flags, ... +* +* Parameters +* sName Pointer to a constant name string. +* pBuffer Pointer to a buffer to be used. +* BufferSize Size of the buffer. +* Flags Operating modes. Define behavior if buffer is full (not enough space for entire message). +* +* Return value +* >= 0 - O.K. Buffer Index +* < 0 - Error +*/ +int SEGGER_RTT_AllocUpBuffer(const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags) { + int BufferIndex; + volatile SEGGER_RTT_CB* pRTTCB; + + INIT(); + SEGGER_RTT_LOCK(); + pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + BufferIndex = 0; + do { + if (pRTTCB->aUp[BufferIndex].pBuffer == NULL) { + break; + } + BufferIndex++; + } while (BufferIndex < pRTTCB->MaxNumUpBuffers); + if (BufferIndex < pRTTCB->MaxNumUpBuffers) { + pRTTCB->aUp[BufferIndex].sName = sName; + pRTTCB->aUp[BufferIndex].pBuffer = (char*)pBuffer; + pRTTCB->aUp[BufferIndex].SizeOfBuffer = BufferSize; + pRTTCB->aUp[BufferIndex].RdOff = 0u; + pRTTCB->aUp[BufferIndex].WrOff = 0u; + pRTTCB->aUp[BufferIndex].Flags = Flags; + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + } else { + BufferIndex = -1; + } + SEGGER_RTT_UNLOCK(); + return BufferIndex; +} + +/********************************************************************* +* +* SEGGER_RTT_ConfigUpBuffer +* +* Function description +* Run-time configuration of a specific up-buffer (T->H). +* Buffer to be configured is specified by index. +* This includes: Buffer address, size, name, flags, ... +* +* Parameters +* BufferIndex Index of the buffer to configure. +* sName Pointer to a constant name string. +* pBuffer Pointer to a buffer to be used. +* BufferSize Size of the buffer. +* Flags Operating modes. Define behavior if buffer is full (not enough space for entire message). +* +* Return value +* >= 0 - O.K. +* < 0 - Error +* +* Additional information +* Buffer 0 is configured on compile-time. +* May only be called once per buffer. +* Buffer name and flags can be reconfigured using the appropriate functions. +*/ +int SEGGER_RTT_ConfigUpBuffer(unsigned BufferIndex, const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags) { + int r; + volatile SEGGER_RTT_CB* pRTTCB; + + INIT(); + pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + if (BufferIndex < (unsigned)pRTTCB->MaxNumUpBuffers) { + SEGGER_RTT_LOCK(); + if (BufferIndex > 0u) { + pRTTCB->aUp[BufferIndex].sName = sName; + pRTTCB->aUp[BufferIndex].pBuffer = (char*)pBuffer; + pRTTCB->aUp[BufferIndex].SizeOfBuffer = BufferSize; + pRTTCB->aUp[BufferIndex].RdOff = 0u; + pRTTCB->aUp[BufferIndex].WrOff = 0u; + } + pRTTCB->aUp[BufferIndex].Flags = Flags; + SEGGER_RTT_UNLOCK(); + r = 0; + } else { + r = -1; + } + return r; +} + +/********************************************************************* +* +* SEGGER_RTT_ConfigDownBuffer +* +* Function description +* Run-time configuration of a specific down-buffer (H->T). +* Buffer to be configured is specified by index. +* This includes: Buffer address, size, name, flags, ... +* +* Parameters +* BufferIndex Index of the buffer to configure. +* sName Pointer to a constant name string. +* pBuffer Pointer to a buffer to be used. +* BufferSize Size of the buffer. +* Flags Operating modes. Define behavior if buffer is full (not enough space for entire message). +* +* Return value +* >= 0 O.K. +* < 0 Error +* +* Additional information +* Buffer 0 is configured on compile-time. +* May only be called once per buffer. +* Buffer name and flags can be reconfigured using the appropriate functions. +*/ +int SEGGER_RTT_ConfigDownBuffer(unsigned BufferIndex, const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags) { + int r; + volatile SEGGER_RTT_CB* pRTTCB; + + INIT(); + pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + if (BufferIndex < (unsigned)pRTTCB->MaxNumDownBuffers) { + SEGGER_RTT_LOCK(); + if (BufferIndex > 0u) { + pRTTCB->aDown[BufferIndex].sName = sName; + pRTTCB->aDown[BufferIndex].pBuffer = (char*)pBuffer; + pRTTCB->aDown[BufferIndex].SizeOfBuffer = BufferSize; + pRTTCB->aDown[BufferIndex].RdOff = 0u; + pRTTCB->aDown[BufferIndex].WrOff = 0u; + } + pRTTCB->aDown[BufferIndex].Flags = Flags; + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + SEGGER_RTT_UNLOCK(); + r = 0; + } else { + r = -1; + } + return r; +} + +/********************************************************************* +* +* SEGGER_RTT_SetNameUpBuffer +* +* Function description +* Run-time configuration of a specific up-buffer name (T->H). +* Buffer to be configured is specified by index. +* +* Parameters +* BufferIndex Index of the buffer to renamed. +* sName Pointer to a constant name string. +* +* Return value +* >= 0 O.K. +* < 0 Error +*/ +int SEGGER_RTT_SetNameUpBuffer(unsigned BufferIndex, const char* sName) { + int r; + volatile SEGGER_RTT_CB* pRTTCB; + + INIT(); + pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + if (BufferIndex < (unsigned)pRTTCB->MaxNumUpBuffers) { + SEGGER_RTT_LOCK(); + pRTTCB->aUp[BufferIndex].sName = sName; + SEGGER_RTT_UNLOCK(); + r = 0; + } else { + r = -1; + } + return r; +} + +/********************************************************************* +* +* SEGGER_RTT_SetNameDownBuffer +* +* Function description +* Run-time configuration of a specific Down-buffer name (T->H). +* Buffer to be configured is specified by index. +* +* Parameters +* BufferIndex Index of the buffer to renamed. +* sName Pointer to a constant name string. +* +* Return value +* >= 0 O.K. +* < 0 Error +*/ +int SEGGER_RTT_SetNameDownBuffer(unsigned BufferIndex, const char* sName) { + int r; + volatile SEGGER_RTT_CB* pRTTCB; + + INIT(); + pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + if (BufferIndex < (unsigned)pRTTCB->MaxNumDownBuffers) { + SEGGER_RTT_LOCK(); + pRTTCB->aDown[BufferIndex].sName = sName; + SEGGER_RTT_UNLOCK(); + r = 0; + } else { + r = -1; + } + return r; +} + +/********************************************************************* +* +* SEGGER_RTT_SetFlagsUpBuffer +* +* Function description +* Run-time configuration of specific up-buffer flags (T->H). +* Buffer to be configured is specified by index. +* +* Parameters +* BufferIndex Index of the buffer. +* Flags Flags to set for the buffer. +* +* Return value +* >= 0 O.K. +* < 0 Error +*/ +int SEGGER_RTT_SetFlagsUpBuffer(unsigned BufferIndex, unsigned Flags) { + int r; + volatile SEGGER_RTT_CB* pRTTCB; + + INIT(); + pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + if (BufferIndex < (unsigned)pRTTCB->MaxNumUpBuffers) { + SEGGER_RTT_LOCK(); + pRTTCB->aUp[BufferIndex].Flags = Flags; + SEGGER_RTT_UNLOCK(); + r = 0; + } else { + r = -1; + } + return r; +} + +/********************************************************************* +* +* SEGGER_RTT_SetFlagsDownBuffer +* +* Function description +* Run-time configuration of specific Down-buffer flags (T->H). +* Buffer to be configured is specified by index. +* +* Parameters +* BufferIndex Index of the buffer to renamed. +* Flags Flags to set for the buffer. +* +* Return value +* >= 0 O.K. +* < 0 Error +*/ +int SEGGER_RTT_SetFlagsDownBuffer(unsigned BufferIndex, unsigned Flags) { + int r; + volatile SEGGER_RTT_CB* pRTTCB; + + INIT(); + pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + if (BufferIndex < (unsigned)pRTTCB->MaxNumDownBuffers) { + SEGGER_RTT_LOCK(); + pRTTCB->aDown[BufferIndex].Flags = Flags; + SEGGER_RTT_UNLOCK(); + r = 0; + } else { + r = -1; + } + return r; +} + +/********************************************************************* +* +* SEGGER_RTT_Init +* +* Function description +* Initializes the RTT Control Block. +* Should be used in RAM targets, at start of the application. +* +*/ +void SEGGER_RTT_Init (void) { + _DoInit(); +} + +/********************************************************************* +* +* SEGGER_RTT_SetTerminal +* +* Function description +* Sets the terminal to be used for output on channel 0. +* +* Parameters +* TerminalId Index of the terminal. +* +* Return value +* >= 0 O.K. +* < 0 Error (e.g. if RTT is configured for non-blocking mode and there was no space in the buffer to set the new terminal Id) +* +* Notes +* (1) Buffer 0 is always reserved for terminal I/O, so we can use index 0 here, fixed +*/ +int SEGGER_RTT_SetTerminal (unsigned char TerminalId) { + unsigned char ac[2]; + SEGGER_RTT_BUFFER_UP* pRing; + unsigned Avail; + int r; + + INIT(); + r = 0; + ac[0] = 0xFFu; + if (TerminalId < sizeof(_aTerminalId)) { // We only support a certain number of channels + ac[1] = _aTerminalId[TerminalId]; + pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[0] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + SEGGER_RTT_LOCK(); // Lock to make sure that no other task is writing into buffer, while we are and number of free bytes in buffer does not change downwards after checking and before writing + if ((pRing->Flags & SEGGER_RTT_MODE_MASK) == SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL) { + _ActiveTerminal = TerminalId; + _WriteBlocking(pRing, (const char*)ac, 2u); + } else { // Skipping mode or trim mode? => We cannot trim this command so handling is the same for both modes + Avail = _GetAvailWriteSpace(pRing); + if (Avail >= 2) { + _ActiveTerminal = TerminalId; // Only change active terminal in case of success + _WriteNoCheck(pRing, (const char*)ac, 2u); + } else { + r = -1; + } + } + SEGGER_RTT_UNLOCK(); + } else { + r = -1; + } + return r; +} + +/********************************************************************* +* +* SEGGER_RTT_TerminalOut +* +* Function description +* Writes a string to the given terminal +* without changing the terminal for channel 0. +* +* Parameters +* TerminalId Index of the terminal. +* s String to be printed on the terminal. +* +* Return value +* >= 0 - Number of bytes written. +* < 0 - Error. +* +*/ +int SEGGER_RTT_TerminalOut (unsigned char TerminalId, const char* s) { + int Status; + unsigned FragLen; + unsigned Avail; + SEGGER_RTT_BUFFER_UP* pRing; + // + INIT(); + // + // Validate terminal ID. + // + if (TerminalId < (char)sizeof(_aTerminalId)) { // We only support a certain number of channels + // + // Get "to-host" ring buffer. + // + pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[0] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + // + // Need to be able to change terminal, write data, change back. + // Compute the fixed and variable sizes. + // + FragLen = STRLEN(s); + // + // How we output depends upon the mode... + // + SEGGER_RTT_LOCK(); + Avail = _GetAvailWriteSpace(pRing); + switch (pRing->Flags & SEGGER_RTT_MODE_MASK) { + case SEGGER_RTT_MODE_NO_BLOCK_SKIP: + // + // If we are in skip mode and there is no space for the whole + // of this output, don't bother switching terminals at all. + // + if (Avail < (FragLen + 4u)) { + Status = 0; + } else { + _PostTerminalSwitch(pRing, TerminalId); + Status = (int)_WriteBlocking(pRing, s, FragLen); + _PostTerminalSwitch(pRing, _ActiveTerminal); + } + break; + case SEGGER_RTT_MODE_NO_BLOCK_TRIM: + // + // If we are in trim mode and there is not enough space for everything, + // trim the output but always include the terminal switch. If no room + // for terminal switch, skip that totally. + // + if (Avail < 4u) { + Status = -1; + } else { + _PostTerminalSwitch(pRing, TerminalId); + Status = (int)_WriteBlocking(pRing, s, (FragLen < (Avail - 4u)) ? FragLen : (Avail - 4u)); + _PostTerminalSwitch(pRing, _ActiveTerminal); + } + break; + case SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL: + // + // If we are in blocking mode, output everything. + // + _PostTerminalSwitch(pRing, TerminalId); + Status = (int)_WriteBlocking(pRing, s, FragLen); + _PostTerminalSwitch(pRing, _ActiveTerminal); + break; + default: + Status = -1; + break; + } + // + // Finish up. + // + SEGGER_RTT_UNLOCK(); + } else { + Status = -1; + } + return Status; +} + +/********************************************************************* +* +* SEGGER_RTT_GetAvailWriteSpace +* +* Function description +* Returns the number of bytes available in the ring buffer. +* +* Parameters +* BufferIndex Index of the up buffer. +* +* Return value +* Number of bytes that are free in the selected up buffer. +*/ +unsigned SEGGER_RTT_GetAvailWriteSpace (unsigned BufferIndex) { + SEGGER_RTT_BUFFER_UP* pRing; + + pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + return _GetAvailWriteSpace(pRing); +} + + +/********************************************************************* +* +* SEGGER_RTT_GetBytesInBuffer() +* +* Function description +* Returns the number of bytes currently used in the up buffer. +* +* Parameters +* BufferIndex Index of the up buffer. +* +* Return value +* Number of bytes that are used in the buffer. +*/ +unsigned SEGGER_RTT_GetBytesInBuffer(unsigned BufferIndex) { + unsigned RdOff; + unsigned WrOff; + unsigned r; + volatile SEGGER_RTT_CB* pRTTCB; + // + // Avoid warnings regarding volatile access order. It's not a problem + // in this case, but dampen compiler enthusiasm. + // + pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + RdOff = pRTTCB->aUp[BufferIndex].RdOff; + WrOff = pRTTCB->aUp[BufferIndex].WrOff; + if (RdOff <= WrOff) { + r = WrOff - RdOff; + } else { + r = pRTTCB->aUp[BufferIndex].SizeOfBuffer - (WrOff - RdOff); + } + return r; +} + +/*************************** End of file ****************************/ diff --git a/SEGGER/SEGGER/SEGGER_RTT.h b/SEGGER/SEGGER/SEGGER_RTT.h new file mode 100644 index 0000000..8000e13 --- /dev/null +++ b/SEGGER/SEGGER/SEGGER_RTT.h @@ -0,0 +1,418 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +---------------------------END-OF-HEADER------------------------------ +File : SEGGER_RTT.h +Purpose : Implementation of SEGGER real-time transfer which allows + real-time communication on targets which support debugger + memory accesses while the CPU is running. +Revision: $Rev: 20869 $ +---------------------------------------------------------------------- +*/ + +#ifndef SEGGER_RTT_H +#define SEGGER_RTT_H + +#include "SEGGER_RTT_Conf.h" + +/********************************************************************* +* +* Defines, defaults +* +********************************************************************** +*/ +#ifndef RTT_USE_ASM + #if (defined __SES_ARM) // SEGGER Embedded Studio + #define _CC_HAS_RTT_ASM_SUPPORT 1 + #elif (defined __CROSSWORKS_ARM) // Rowley Crossworks + #define _CC_HAS_RTT_ASM_SUPPORT 1 + #elif (defined __ARMCC_VERSION) // ARM compiler + #if (__ARMCC_VERSION >= 6000000) // ARM compiler V6.0 and later is clang based + #define _CC_HAS_RTT_ASM_SUPPORT 1 + #else + #define _CC_HAS_RTT_ASM_SUPPORT 0 + #endif + #elif (defined __GNUC__) // GCC + #define _CC_HAS_RTT_ASM_SUPPORT 1 + #elif (defined __clang__) // Clang compiler + #define _CC_HAS_RTT_ASM_SUPPORT 1 + #elif ((defined __IASMARM__) || (defined __ICCARM__)) // IAR assembler/compiler + #define _CC_HAS_RTT_ASM_SUPPORT 1 + #else + #define _CC_HAS_RTT_ASM_SUPPORT 0 + #endif + #if ((defined __IASMARM__) || (defined __ICCARM__)) // IAR assembler/compiler + // + // IAR assembler / compiler + // + #if (__VER__ < 6300000) + #define VOLATILE + #else + #define VOLATILE volatile + #endif + #if (defined __ARM7M__) // Needed for old versions that do not know the define yet + #if (__CORE__ == __ARM7M__) // Cortex-M3 + #define _CORE_HAS_RTT_ASM_SUPPORT 1 + #endif + #endif + #if (defined __ARM7EM__) // Needed for old versions that do not know the define yet + #if (__CORE__ == __ARM7EM__) // Cortex-M4/M7 + #define _CORE_HAS_RTT_ASM_SUPPORT 1 + #define _CORE_NEEDS_DMB 1 + #define RTT__DMB() asm VOLATILE ("DMB"); + #endif + #endif + #if (defined __ARM8M_BASELINE__) // Needed for old versions that do not know the define yet + #if (__CORE__ == __ARM8M_BASELINE__) // Cortex-M23 + #define _CORE_HAS_RTT_ASM_SUPPORT 0 + #define _CORE_NEEDS_DMB 1 + #define RTT__DMB() asm VOLATILE ("DMB"); + #endif + #endif + #if (defined __ARM8M_MAINLINE__) // Needed for old versions that do not know the define yet + #if (__CORE__ == __ARM8M_MAINLINE__) // Cortex-M33 + #define _CORE_HAS_RTT_ASM_SUPPORT 1 + #define _CORE_NEEDS_DMB 1 + #define RTT__DMB() asm VOLATILE ("DMB"); + #endif + #endif + #else + // + // GCC / Clang + // + #if (defined __ARM_ARCH_7M__) // Cortex-M3 + #define _CORE_HAS_RTT_ASM_SUPPORT 1 + #elif (defined __ARM_ARCH_7EM__) // Cortex-M4/M7 + #define _CORE_HAS_RTT_ASM_SUPPORT 1 + #define _CORE_NEEDS_DMB 1 + #define RTT__DMB() __asm volatile ("dmb\n" : : :); + #elif (defined __ARM_ARCH_8M_BASE__) // Cortex-M23 + #define _CORE_HAS_RTT_ASM_SUPPORT 0 + #define _CORE_NEEDS_DMB 1 + #define RTT__DMB() __asm volatile ("dmb\n" : : :); + #elif (defined __ARM_ARCH_8M_MAIN__) // Cortex-M33 + #define _CORE_HAS_RTT_ASM_SUPPORT 1 + #define _CORE_NEEDS_DMB 1 + #define RTT__DMB() __asm volatile ("dmb\n" : : :); + #else + #define _CORE_HAS_RTT_ASM_SUPPORT 0 + #endif + #endif + // + // If IDE and core support the ASM version, enable ASM version by default + // + #ifndef _CORE_HAS_RTT_ASM_SUPPORT + #define _CORE_HAS_RTT_ASM_SUPPORT 0 // Default for unknown cores + #endif + #if (_CC_HAS_RTT_ASM_SUPPORT && _CORE_HAS_RTT_ASM_SUPPORT) + #define RTT_USE_ASM (1) + #else + #define RTT_USE_ASM (0) + #endif +#endif + +// +// We need to know if a DMB is needed to make sure that on Cortex-M7 etc. +// the order of accesses to the ring buffers is guaranteed +// Needed for: Cortex-M7, Cortex-M23, Cortex-M33 +// +#ifndef _CORE_NEEDS_DMB + #define _CORE_NEEDS_DMB 0 +#endif + +#ifndef RTT__DMB + #if _CORE_NEEDS_DMB + #error "Don't know how to place inline assembly for DMB" + #else + #define RTT__DMB() + #endif +#endif + +#ifndef SEGGER_RTT_CPU_CACHE_LINE_SIZE + #define SEGGER_RTT_CPU_CACHE_LINE_SIZE (0) // On most target systems where RTT is used, we do not have a CPU cache, therefore 0 is a good default here +#endif + +#ifndef SEGGER_RTT_UNCACHED_OFF + #if SEGGER_RTT_CPU_CACHE_LINE_SIZE + #error "SEGGER_RTT_UNCACHED_OFF must be defined when setting SEGGER_RTT_CPU_CACHE_LINE_SIZE != 0" + #else + #define SEGGER_RTT_UNCACHED_OFF (0) + #endif +#endif +#if RTT_USE_ASM + #if SEGGER_RTT_CPU_CACHE_LINE_SIZE + #error "RTT_USE_ASM is not available if SEGGER_RTT_CPU_CACHE_LINE_SIZE != 0" + #endif +#endif + +#ifndef SEGGER_RTT_ASM // defined when SEGGER_RTT.h is included from assembly file +#include +#include + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ + +// +// Determine how much we must pad the control block to make it a multiple of a cache line in size +// Assuming: U8 = 1B +// U16 = 2B +// U32 = 4B +// U8/U16/U32* = 4B +// +#if SEGGER_RTT_CPU_CACHE_LINE_SIZE // Avoid division by zero in case we do not have any cache + #define SEGGER_RTT__ROUND_UP_2_CACHE_LINE_SIZE(NumBytes) (((NumBytes + SEGGER_RTT_CPU_CACHE_LINE_SIZE - 1) / SEGGER_RTT_CPU_CACHE_LINE_SIZE) * SEGGER_RTT_CPU_CACHE_LINE_SIZE) +#else + #define SEGGER_RTT__ROUND_UP_2_CACHE_LINE_SIZE(NumBytes) (NumBytes) +#endif +#define SEGGER_RTT__CB_SIZE (16 + 4 + 4 + (SEGGER_RTT_MAX_NUM_UP_BUFFERS * 24) + (SEGGER_RTT_MAX_NUM_DOWN_BUFFERS * 24)) +#define SEGGER_RTT__CB_PADDING (SEGGER_RTT__ROUND_UP_2_CACHE_LINE_SIZE(SEGGER_RTT__CB_SIZE) - SEGGER_RTT__CB_SIZE) + +/********************************************************************* +* +* Types +* +********************************************************************** +*/ + +// +// Description for a circular buffer (also called "ring buffer") +// which is used as up-buffer (T->H) +// +typedef struct { + const char* sName; // Optional name. Standard names so far are: "Terminal", "SysView", "J-Scope_t4i4" + char* pBuffer; // Pointer to start of buffer + unsigned SizeOfBuffer; // Buffer size in bytes. Note that one byte is lost, as this implementation does not fill up the buffer in order to avoid the problem of being unable to distinguish between full and empty. + unsigned WrOff; // Position of next item to be written by either target. + volatile unsigned RdOff; // Position of next item to be read by host. Must be volatile since it may be modified by host. + unsigned Flags; // Contains configuration flags +} SEGGER_RTT_BUFFER_UP; + +// +// Description for a circular buffer (also called "ring buffer") +// which is used as down-buffer (H->T) +// +typedef struct { + const char* sName; // Optional name. Standard names so far are: "Terminal", "SysView", "J-Scope_t4i4" + char* pBuffer; // Pointer to start of buffer + unsigned SizeOfBuffer; // Buffer size in bytes. Note that one byte is lost, as this implementation does not fill up the buffer in order to avoid the problem of being unable to distinguish between full and empty. + volatile unsigned WrOff; // Position of next item to be written by host. Must be volatile since it may be modified by host. + unsigned RdOff; // Position of next item to be read by target (down-buffer). + unsigned Flags; // Contains configuration flags +} SEGGER_RTT_BUFFER_DOWN; + +// +// RTT control block which describes the number of buffers available +// as well as the configuration for each buffer +// +// +typedef struct { + char acID[16]; // Initialized to "SEGGER RTT" + int MaxNumUpBuffers; // Initialized to SEGGER_RTT_MAX_NUM_UP_BUFFERS (type. 2) + int MaxNumDownBuffers; // Initialized to SEGGER_RTT_MAX_NUM_DOWN_BUFFERS (type. 2) + SEGGER_RTT_BUFFER_UP aUp[SEGGER_RTT_MAX_NUM_UP_BUFFERS]; // Up buffers, transferring information up from target via debug probe to host + SEGGER_RTT_BUFFER_DOWN aDown[SEGGER_RTT_MAX_NUM_DOWN_BUFFERS]; // Down buffers, transferring information down from host via debug probe to target +#if SEGGER_RTT__CB_PADDING + unsigned char aDummy[SEGGER_RTT__CB_PADDING]; +#endif +} SEGGER_RTT_CB; + +/********************************************************************* +* +* Global data +* +********************************************************************** +*/ +extern SEGGER_RTT_CB _SEGGER_RTT; + +/********************************************************************* +* +* RTT API functions +* +********************************************************************** +*/ +#ifdef __cplusplus + extern "C" { +#endif +int SEGGER_RTT_AllocDownBuffer (const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags); +int SEGGER_RTT_AllocUpBuffer (const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags); +int SEGGER_RTT_ConfigUpBuffer (unsigned BufferIndex, const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags); +int SEGGER_RTT_ConfigDownBuffer (unsigned BufferIndex, const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags); +int SEGGER_RTT_GetKey (void); +unsigned SEGGER_RTT_HasData (unsigned BufferIndex); +int SEGGER_RTT_HasKey (void); +unsigned SEGGER_RTT_HasDataUp (unsigned BufferIndex); +void SEGGER_RTT_Init (void); +unsigned SEGGER_RTT_Read (unsigned BufferIndex, void* pBuffer, unsigned BufferSize); +unsigned SEGGER_RTT_ReadNoLock (unsigned BufferIndex, void* pData, unsigned BufferSize); +int SEGGER_RTT_SetNameDownBuffer (unsigned BufferIndex, const char* sName); +int SEGGER_RTT_SetNameUpBuffer (unsigned BufferIndex, const char* sName); +int SEGGER_RTT_SetFlagsDownBuffer (unsigned BufferIndex, unsigned Flags); +int SEGGER_RTT_SetFlagsUpBuffer (unsigned BufferIndex, unsigned Flags); +int SEGGER_RTT_WaitKey (void); +unsigned SEGGER_RTT_Write (unsigned BufferIndex, const void* pBuffer, unsigned NumBytes); +unsigned SEGGER_RTT_WriteNoLock (unsigned BufferIndex, const void* pBuffer, unsigned NumBytes); +unsigned SEGGER_RTT_WriteSkipNoLock (unsigned BufferIndex, const void* pBuffer, unsigned NumBytes); +unsigned SEGGER_RTT_ASM_WriteSkipNoLock (unsigned BufferIndex, const void* pBuffer, unsigned NumBytes); +unsigned SEGGER_RTT_WriteString (unsigned BufferIndex, const char* s); +void SEGGER_RTT_WriteWithOverwriteNoLock(unsigned BufferIndex, const void* pBuffer, unsigned NumBytes); +unsigned SEGGER_RTT_PutChar (unsigned BufferIndex, char c); +unsigned SEGGER_RTT_PutCharSkip (unsigned BufferIndex, char c); +unsigned SEGGER_RTT_PutCharSkipNoLock (unsigned BufferIndex, char c); +unsigned SEGGER_RTT_GetAvailWriteSpace (unsigned BufferIndex); +unsigned SEGGER_RTT_GetBytesInBuffer (unsigned BufferIndex); +// +// Function macro for performance optimization +// +#define SEGGER_RTT_HASDATA(n) (((SEGGER_RTT_BUFFER_DOWN*)((char*)&_SEGGER_RTT.aDown[n] + SEGGER_RTT_UNCACHED_OFF))->WrOff - ((SEGGER_RTT_BUFFER_DOWN*)((char*)&_SEGGER_RTT.aDown[n] + SEGGER_RTT_UNCACHED_OFF))->RdOff) + +#if RTT_USE_ASM + #define SEGGER_RTT_WriteSkipNoLock SEGGER_RTT_ASM_WriteSkipNoLock +#endif + +/********************************************************************* +* +* RTT transfer functions to send RTT data via other channels. +* +********************************************************************** +*/ +unsigned SEGGER_RTT_ReadUpBuffer (unsigned BufferIndex, void* pBuffer, unsigned BufferSize); +unsigned SEGGER_RTT_ReadUpBufferNoLock (unsigned BufferIndex, void* pData, unsigned BufferSize); +unsigned SEGGER_RTT_WriteDownBuffer (unsigned BufferIndex, const void* pBuffer, unsigned NumBytes); +unsigned SEGGER_RTT_WriteDownBufferNoLock (unsigned BufferIndex, const void* pBuffer, unsigned NumBytes); + +#define SEGGER_RTT_HASDATA_UP(n) (((SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[n] + SEGGER_RTT_UNCACHED_OFF))->WrOff - ((SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[n] + SEGGER_RTT_UNCACHED_OFF))->RdOff) // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + +/********************************************************************* +* +* RTT "Terminal" API functions +* +********************************************************************** +*/ +int SEGGER_RTT_SetTerminal (unsigned char TerminalId); +int SEGGER_RTT_TerminalOut (unsigned char TerminalId, const char* s); + +/********************************************************************* +* +* RTT printf functions (require SEGGER_RTT_printf.c) +* +********************************************************************** +*/ +int SEGGER_RTT_printf(unsigned BufferIndex, const char * sFormat, ...); +int SEGGER_RTT_vprintf(unsigned BufferIndex, const char * sFormat, va_list * pParamList); + +#ifdef __cplusplus + } +#endif + +#endif // ifndef(SEGGER_RTT_ASM) + +/********************************************************************* +* +* Defines +* +********************************************************************** +*/ + +// +// Operating modes. Define behavior if buffer is full (not enough space for entire message) +// +#define SEGGER_RTT_MODE_NO_BLOCK_SKIP (0) // Skip. Do not block, output nothing. (Default) +#define SEGGER_RTT_MODE_NO_BLOCK_TRIM (1) // Trim: Do not block, output as much as fits. +#define SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL (2) // Block: Wait until there is space in the buffer. +#define SEGGER_RTT_MODE_MASK (3) + +// +// Control sequences, based on ANSI. +// Can be used to control color, and clear the screen +// +#define RTT_CTRL_RESET "\x1B[0m" // Reset to default colors +#define RTT_CTRL_CLEAR "\x1B[2J" // Clear screen, reposition cursor to top left + +#define RTT_CTRL_TEXT_BLACK "\x1B[2;30m" +#define RTT_CTRL_TEXT_RED "\x1B[2;31m" +#define RTT_CTRL_TEXT_GREEN "\x1B[2;32m" +#define RTT_CTRL_TEXT_YELLOW "\x1B[2;33m" +#define RTT_CTRL_TEXT_BLUE "\x1B[2;34m" +#define RTT_CTRL_TEXT_MAGENTA "\x1B[2;35m" +#define RTT_CTRL_TEXT_CYAN "\x1B[2;36m" +#define RTT_CTRL_TEXT_WHITE "\x1B[2;37m" + +#define RTT_CTRL_TEXT_BRIGHT_BLACK "\x1B[1;30m" +#define RTT_CTRL_TEXT_BRIGHT_RED "\x1B[1;31m" +#define RTT_CTRL_TEXT_BRIGHT_GREEN "\x1B[1;32m" +#define RTT_CTRL_TEXT_BRIGHT_YELLOW "\x1B[1;33m" +#define RTT_CTRL_TEXT_BRIGHT_BLUE "\x1B[1;34m" +#define RTT_CTRL_TEXT_BRIGHT_MAGENTA "\x1B[1;35m" +#define RTT_CTRL_TEXT_BRIGHT_CYAN "\x1B[1;36m" +#define RTT_CTRL_TEXT_BRIGHT_WHITE "\x1B[1;37m" + +#define RTT_CTRL_BG_BLACK "\x1B[24;40m" +#define RTT_CTRL_BG_RED "\x1B[24;41m" +#define RTT_CTRL_BG_GREEN "\x1B[24;42m" +#define RTT_CTRL_BG_YELLOW "\x1B[24;43m" +#define RTT_CTRL_BG_BLUE "\x1B[24;44m" +#define RTT_CTRL_BG_MAGENTA "\x1B[24;45m" +#define RTT_CTRL_BG_CYAN "\x1B[24;46m" +#define RTT_CTRL_BG_WHITE "\x1B[24;47m" + +#define RTT_CTRL_BG_BRIGHT_BLACK "\x1B[4;40m" +#define RTT_CTRL_BG_BRIGHT_RED "\x1B[4;41m" +#define RTT_CTRL_BG_BRIGHT_GREEN "\x1B[4;42m" +#define RTT_CTRL_BG_BRIGHT_YELLOW "\x1B[4;43m" +#define RTT_CTRL_BG_BRIGHT_BLUE "\x1B[4;44m" +#define RTT_CTRL_BG_BRIGHT_MAGENTA "\x1B[4;45m" +#define RTT_CTRL_BG_BRIGHT_CYAN "\x1B[4;46m" +#define RTT_CTRL_BG_BRIGHT_WHITE "\x1B[4;47m" + + +#endif + +/*************************** End of file ****************************/ diff --git a/SEGGER/SEGGER/SEGGER_RTT_ASM_ARMv7M.S b/SEGGER/SEGGER/SEGGER_RTT_ASM_ARMv7M.S new file mode 100644 index 0000000..cbbc52f --- /dev/null +++ b/SEGGER/SEGGER/SEGGER_RTT_ASM_ARMv7M.S @@ -0,0 +1,242 @@ +/********************************************************************* +* (c) SEGGER Microcontroller GmbH * +* The Embedded Experts * +* www.segger.com * +********************************************************************** + +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_RTT_ASM_ARMv7M.S +Purpose : Assembler implementation of RTT functions for ARMv7M + +Additional information: + This module is written to be assembler-independent and works with + GCC and clang (Embedded Studio) and IAR. +*/ + +#define SEGGER_RTT_ASM // Used to control processed input from header file +#include "SEGGER_RTT.h" + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ + +#define _CCIAR 0 +#define _CCCLANG 1 + +#if (defined __SES_ARM) || (defined __GNUC__) || (defined __clang__) + #define _CC_TYPE _CCCLANG + #define _PUB_SYM .global + #define _EXT_SYM .extern + #define _END .end + #define _WEAK .weak + #define _THUMB_FUNC .thumb_func + #define _THUMB_CODE .code 16 + #define _WORD .word + #define _SECTION(Sect, Type, AlignExp) .section Sect ##, "ax" + #define _ALIGN(Exp) .align Exp + #define _PLACE_LITS .ltorg + #define _DATA_SECT_START + #define _C_STARTUP _start + #define _STACK_END __stack_end__ + #define _RAMFUNC + // + // .text => Link to flash + // .fast => Link to RAM + // OtherSect => Usually link to RAM + // Alignment is 2^x + // +#elif defined (__IASMARM__) + #define _CC_TYPE _CCIAR + #define _PUB_SYM PUBLIC + #define _EXT_SYM EXTERN + #define _END END + #define _WEAK _WEAK + #define _THUMB_FUNC + #define _THUMB_CODE THUMB + #define _WORD DCD + #define _SECTION(Sect, Type, AlignExp) SECTION Sect ## : ## Type ## :REORDER:NOROOT ## (AlignExp) + #define _ALIGN(Exp) alignrom Exp + #define _PLACE_LITS + #define _DATA_SECT_START DATA + #define _C_STARTUP __iar_program_start + #define _STACK_END sfe(CSTACK) + #define _RAMFUNC SECTION_TYPE SHT_PROGBITS, SHF_WRITE | SHF_EXECINSTR + // + // .text => Link to flash + // .textrw => Link to RAM + // OtherSect => Usually link to RAM + // NOROOT => Allows linker to throw away the function, if not referenced + // Alignment is 2^x + // +#endif + +#if (_CC_TYPE == _CCIAR) + NAME SEGGER_RTT_ASM_ARMv7M +#else + .syntax unified +#endif + +#if defined (RTT_USE_ASM) && (RTT_USE_ASM == 1) + #define SHT_PROGBITS 0x1 + +/********************************************************************* +* +* Public / external symbols +* +********************************************************************** +*/ + + _EXT_SYM __aeabi_memcpy + _EXT_SYM __aeabi_memcpy4 + _EXT_SYM _SEGGER_RTT + + _PUB_SYM SEGGER_RTT_ASM_WriteSkipNoLock + +/********************************************************************* +* +* SEGGER_RTT_WriteSkipNoLock +* +* Function description +* Stores a specified number of characters in SEGGER RTT +* control block which is then read by the host. +* SEGGER_RTT_WriteSkipNoLock does not lock the application and +* skips all data, if the data does not fit into the buffer. +* +* Parameters +* BufferIndex Index of "Up"-buffer to be used (e.g. 0 for "Terminal"). +* pBuffer Pointer to character array. Does not need to point to a \0 terminated string. +* NumBytes Number of bytes to be stored in the SEGGER RTT control block. +* MUST be > 0!!! +* This is done for performance reasons, so no initial check has do be done. +* +* Return value +* 1: Data has been copied +* 0: No space, data has not been copied +* +* Notes +* (1) If there is not enough space in the "Up"-buffer, all data is dropped. +* (2) For performance reasons this function does not call Init() +* and may only be called after RTT has been initialized. +* Either by calling SEGGER_RTT_Init() or calling another RTT API function first. +*/ + _SECTION(.text, CODE, 2) + _ALIGN(2) + _THUMB_FUNC +SEGGER_RTT_ASM_WriteSkipNoLock: // unsigned SEGGER_RTT_WriteSkipNoLock(unsigned BufferIndex, const void* pData, unsigned NumBytes) { + // + // Cases: + // 1) RdOff <= WrOff => Space until wrap-around is sufficient + // 2) RdOff <= WrOff => Space after wrap-around needed (copy in 2 chunks) + // 3) RdOff < WrOff => No space in buf + // 4) RdOff > WrOff => Space is sufficient + // 5) RdOff > WrOff => No space in buf + // + // 1) is the most common case for large buffers and assuming that J-Link reads the data fast enough + // + // Register usage: + // R0 Temporary needed as RdOff, register later on + // R1 pData + // R2 + // R3 register. Hold free for subroutine calls + // R4 + // R5 pRing->pBuffer + // R6 pRing (Points to active struct SEGGER_RTT_BUFFER_DOWN) + // R7 WrOff + // + PUSH {R4-R7} + ADD R3,R0,R0, LSL #+1 + LDR.W R0,=_SEGGER_RTT // pRing = &_SEGGER_RTT.aUp[BufferIndex]; + ADD R0,R0,R3, LSL #+3 + ADD R6,R0,#+24 + LDR R0,[R6, #+16] // RdOff = pRing->RdOff; + LDR R7,[R6, #+12] // WrOff = pRing->WrOff; + LDR R5,[R6, #+4] // pRing->pBuffer + CMP R7,R0 + BCC.N _CheckCase4 // if (RdOff <= WrOff) { => Case 1), 2) or 3) + // + // Handling for case 1, later on identical to case 4 + // + LDR R3,[R6, #+8] // Avail = pRing->SizeOfBuffer - WrOff - 1u; => Space until wrap-around (assume 1 byte not usable for case that RdOff == 0) + SUBS R4,R3,R7 // (Used in case we jump into case 2 afterwards) + SUBS R3,R4,#+1 // + CMP R3,R2 + BCC.N _CheckCase2 // if (Avail >= NumBytes) { => Case 1)? +_Case4: + ADDS R5,R7,R5 // pBuffer += WrOff + ADDS R0,R2,R7 // v = WrOff + NumBytes + // + // 2x unrolling for the copy loop that is used most of the time + // This is a special optimization for small SystemView packets and makes them even faster + // + _ALIGN(2) +_LoopCopyStraight: // memcpy(pRing->pBuffer + WrOff, pData, NumBytes); + LDRB R3,[R1], #+1 + STRB R3,[R5], #+1 // *pDest++ = *pSrc++ + SUBS R2,R2,#+1 + BEQ _CSDone + LDRB R3,[R1], #+1 + STRB R3,[R5], #+1 // *pDest++ = *pSrc++ + SUBS R2,R2,#+1 + BNE _LoopCopyStraight +_CSDone: +#if _CORE_NEEDS_DMB // Do not slow down cores that do not need a DMB instruction here + DMB // Cortex-M7 may delay memory writes and also change the order in which the writes happen. Therefore, make sure that all buffer writes are finished, before updating the in the struct +#endif + STR R0,[R6, #+12] // pRing->WrOff = WrOff + NumBytes; + MOVS R0,#+1 + POP {R4-R7} + BX LR // Return 1 +_CheckCase2: + ADDS R0,R0,R3 // Avail += RdOff; => Space incl. wrap-around + CMP R0,R2 + BCC.N _Case3 // if (Avail >= NumBytes) { => Case 2? => If not, we have case 3) (does not fit) + // + // Handling for case 2 + // + ADDS R0,R7,R5 // v = pRing->pBuffer + WrOff => Do not change pRing->pBuffer here because 2nd chunk needs org. value + SUBS R2,R2,R4 // NumBytes -= Rem; (Rem = pRing->SizeOfBuffer - WrOff; => Space until end of buffer) +_LoopCopyBeforeWrapAround: // memcpy(pRing->pBuffer + WrOff, pData, Rem); => Copy 1st chunk + LDRB R3,[R1], #+1 + STRB R3,[R0], #+1 // *pDest++ = *pSrc++ + SUBS R4,R4,#+1 + BNE _LoopCopyBeforeWrapAround + // + // Special case: First check that assumed RdOff == 0 calculated that last element before wrap-around could not be used + // But 2nd check (considering space until wrap-around and until RdOff) revealed that RdOff is not 0, so we can use the last element + // In this case, we may use a copy straight until buffer end anyway without needing to copy 2 chunks + // Therefore, check if 2nd memcpy is necessary at all + // + ADDS R4,R2,#+0 // Save (needed as counter in loop but must be written to after the loop). Also use this inst to update the flags to skip 2nd loop if possible + BEQ.N _No2ChunkNeeded // if (NumBytes) { +_LoopCopyAfterWrapAround: // memcpy(pRing->pBuffer, pData + Rem, NumBytes); + LDRB R3,[R1], #+1 // pData already points to the next src byte due to copy loop increment before this loop + STRB R3,[R5], #+1 // *pDest++ = *pSrc++ + SUBS R2,R2,#+1 + BNE _LoopCopyAfterWrapAround +_No2ChunkNeeded: +#if _CORE_NEEDS_DMB // Do not slow down cores that do not need a DMB instruction here + DMB // Cortex-M7 may delay memory writes and also change the order in which the writes happen. Therefore, make sure that all buffer writes are finished, before updating the in the struct +#endif + STR R4,[R6, #+12] // pRing->WrOff = NumBytes; => Must be written after copying data because J-Link may read control block asynchronously while writing into buffer + MOVS R0,#+1 + POP {R4-R7} + BX LR // Return 1 +_CheckCase4: + SUBS R0,R0,R7 + SUBS R0,R0,#+1 // Avail = RdOff - WrOff - 1u; + CMP R0,R2 + BCS.N _Case4 // if (Avail >= NumBytes) { => Case 4) == 1) ? => If not, we have case 5) == 3) (does not fit) +_Case3: + MOVS R0,#+0 + POP {R4-R7} + BX LR // Return 0 + _PLACE_LITS + +#endif // defined (RTT_USE_ASM) && (RTT_USE_ASM == 1) + _END + +/*************************** End of file ****************************/ diff --git a/SEGGER/SEGGER/SEGGER_RTT_printf.c b/SEGGER/SEGGER/SEGGER_RTT_printf.c new file mode 100644 index 0000000..2b9ff12 --- /dev/null +++ b/SEGGER/SEGGER/SEGGER_RTT_printf.c @@ -0,0 +1,504 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +---------------------------END-OF-HEADER------------------------------ +File : SEGGER_RTT_printf.c +Purpose : Replacement for printf to write formatted data via RTT +Revision: $Rev: 17697 $ +---------------------------------------------------------------------- +*/ +#include "SEGGER_RTT.h" +#include "SEGGER_RTT_Conf.h" + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ + +#ifndef SEGGER_RTT_PRINTF_BUFFER_SIZE + #define SEGGER_RTT_PRINTF_BUFFER_SIZE (64) +#endif + +#include +#include + + +#define FORMAT_FLAG_LEFT_JUSTIFY (1u << 0) +#define FORMAT_FLAG_PAD_ZERO (1u << 1) +#define FORMAT_FLAG_PRINT_SIGN (1u << 2) +#define FORMAT_FLAG_ALTERNATE (1u << 3) + +/********************************************************************* +* +* Types +* +********************************************************************** +*/ + +typedef struct { + char* pBuffer; + unsigned BufferSize; + unsigned Cnt; + + int ReturnValue; + + unsigned RTTBufferIndex; +} SEGGER_RTT_PRINTF_DESC; + +/********************************************************************* +* +* Function prototypes +* +********************************************************************** +*/ + +/********************************************************************* +* +* Static code +* +********************************************************************** +*/ +/********************************************************************* +* +* _StoreChar +*/ +static void _StoreChar(SEGGER_RTT_PRINTF_DESC * p, char c) { + unsigned Cnt; + + Cnt = p->Cnt; + if ((Cnt + 1u) <= p->BufferSize) { + *(p->pBuffer + Cnt) = c; + p->Cnt = Cnt + 1u; + p->ReturnValue++; + } + // + // Write part of string, when the buffer is full + // + if (p->Cnt == p->BufferSize) { + if (SEGGER_RTT_Write(p->RTTBufferIndex, p->pBuffer, p->Cnt) != p->Cnt) { + p->ReturnValue = -1; + } else { + p->Cnt = 0u; + } + } +} + +/********************************************************************* +* +* _PrintUnsigned +*/ +static void _PrintUnsigned(SEGGER_RTT_PRINTF_DESC * pBufferDesc, unsigned v, unsigned Base, unsigned NumDigits, unsigned FieldWidth, unsigned FormatFlags) { + static const char _aV2C[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; + unsigned Div; + unsigned Digit; + unsigned Number; + unsigned Width; + char c; + + Number = v; + Digit = 1u; + // + // Get actual field width + // + Width = 1u; + while (Number >= Base) { + Number = (Number / Base); + Width++; + } + if (NumDigits > Width) { + Width = NumDigits; + } + // + // Print leading chars if necessary + // + if ((FormatFlags & FORMAT_FLAG_LEFT_JUSTIFY) == 0u) { + if (FieldWidth != 0u) { + if (((FormatFlags & FORMAT_FLAG_PAD_ZERO) == FORMAT_FLAG_PAD_ZERO) && (NumDigits == 0u)) { + c = '0'; + } else { + c = ' '; + } + while ((FieldWidth != 0u) && (Width < FieldWidth)) { + FieldWidth--; + _StoreChar(pBufferDesc, c); + if (pBufferDesc->ReturnValue < 0) { + break; + } + } + } + } + if (pBufferDesc->ReturnValue >= 0) { + // + // Compute Digit. + // Loop until Digit has the value of the highest digit required. + // Example: If the output is 345 (Base 10), loop 2 times until Digit is 100. + // + while (1) { + if (NumDigits > 1u) { // User specified a min number of digits to print? => Make sure we loop at least that often, before checking anything else (> 1 check avoids problems with NumDigits being signed / unsigned) + NumDigits--; + } else { + Div = v / Digit; + if (Div < Base) { // Is our divider big enough to extract the highest digit from value? => Done + break; + } + } + Digit *= Base; + } + // + // Output digits + // + do { + Div = v / Digit; + v -= Div * Digit; + _StoreChar(pBufferDesc, _aV2C[Div]); + if (pBufferDesc->ReturnValue < 0) { + break; + } + Digit /= Base; + } while (Digit); + // + // Print trailing spaces if necessary + // + if ((FormatFlags & FORMAT_FLAG_LEFT_JUSTIFY) == FORMAT_FLAG_LEFT_JUSTIFY) { + if (FieldWidth != 0u) { + while ((FieldWidth != 0u) && (Width < FieldWidth)) { + FieldWidth--; + _StoreChar(pBufferDesc, ' '); + if (pBufferDesc->ReturnValue < 0) { + break; + } + } + } + } + } +} + +/********************************************************************* +* +* _PrintInt +*/ +static void _PrintInt(SEGGER_RTT_PRINTF_DESC * pBufferDesc, int v, unsigned Base, unsigned NumDigits, unsigned FieldWidth, unsigned FormatFlags) { + unsigned Width; + int Number; + + Number = (v < 0) ? -v : v; + + // + // Get actual field width + // + Width = 1u; + while (Number >= (int)Base) { + Number = (Number / (int)Base); + Width++; + } + if (NumDigits > Width) { + Width = NumDigits; + } + if ((FieldWidth > 0u) && ((v < 0) || ((FormatFlags & FORMAT_FLAG_PRINT_SIGN) == FORMAT_FLAG_PRINT_SIGN))) { + FieldWidth--; + } + + // + // Print leading spaces if necessary + // + if ((((FormatFlags & FORMAT_FLAG_PAD_ZERO) == 0u) || (NumDigits != 0u)) && ((FormatFlags & FORMAT_FLAG_LEFT_JUSTIFY) == 0u)) { + if (FieldWidth != 0u) { + while ((FieldWidth != 0u) && (Width < FieldWidth)) { + FieldWidth--; + _StoreChar(pBufferDesc, ' '); + if (pBufferDesc->ReturnValue < 0) { + break; + } + } + } + } + // + // Print sign if necessary + // + if (pBufferDesc->ReturnValue >= 0) { + if (v < 0) { + v = -v; + _StoreChar(pBufferDesc, '-'); + } else if ((FormatFlags & FORMAT_FLAG_PRINT_SIGN) == FORMAT_FLAG_PRINT_SIGN) { + _StoreChar(pBufferDesc, '+'); + } else { + + } + if (pBufferDesc->ReturnValue >= 0) { + // + // Print leading zeros if necessary + // + if (((FormatFlags & FORMAT_FLAG_PAD_ZERO) == FORMAT_FLAG_PAD_ZERO) && ((FormatFlags & FORMAT_FLAG_LEFT_JUSTIFY) == 0u) && (NumDigits == 0u)) { + if (FieldWidth != 0u) { + while ((FieldWidth != 0u) && (Width < FieldWidth)) { + FieldWidth--; + _StoreChar(pBufferDesc, '0'); + if (pBufferDesc->ReturnValue < 0) { + break; + } + } + } + } + if (pBufferDesc->ReturnValue >= 0) { + // + // Print number without sign + // + _PrintUnsigned(pBufferDesc, (unsigned)v, Base, NumDigits, FieldWidth, FormatFlags); + } + } + } +} + +/********************************************************************* +* +* Public code +* +********************************************************************** +*/ +/********************************************************************* +* +* SEGGER_RTT_vprintf +* +* Function description +* Stores a formatted string in SEGGER RTT control block. +* This data is read by the host. +* +* Parameters +* BufferIndex Index of "Up"-buffer to be used. (e.g. 0 for "Terminal") +* sFormat Pointer to format string +* pParamList Pointer to the list of arguments for the format string +* +* Return values +* >= 0: Number of bytes which have been stored in the "Up"-buffer. +* < 0: Error +*/ +int SEGGER_RTT_vprintf(unsigned BufferIndex, const char * sFormat, va_list * pParamList) { + char c; + SEGGER_RTT_PRINTF_DESC BufferDesc; + int v; + unsigned NumDigits; + unsigned FormatFlags; + unsigned FieldWidth; + char acBuffer[SEGGER_RTT_PRINTF_BUFFER_SIZE]; + + BufferDesc.pBuffer = acBuffer; + BufferDesc.BufferSize = SEGGER_RTT_PRINTF_BUFFER_SIZE; + BufferDesc.Cnt = 0u; + BufferDesc.RTTBufferIndex = BufferIndex; + BufferDesc.ReturnValue = 0; + + do { + c = *sFormat; + sFormat++; + if (c == 0u) { + break; + } + if (c == '%') { + // + // Filter out flags + // + FormatFlags = 0u; + v = 1; + do { + c = *sFormat; + switch (c) { + case '-': FormatFlags |= FORMAT_FLAG_LEFT_JUSTIFY; sFormat++; break; + case '0': FormatFlags |= FORMAT_FLAG_PAD_ZERO; sFormat++; break; + case '+': FormatFlags |= FORMAT_FLAG_PRINT_SIGN; sFormat++; break; + case '#': FormatFlags |= FORMAT_FLAG_ALTERNATE; sFormat++; break; + default: v = 0; break; + } + } while (v); + // + // filter out field with + // + FieldWidth = 0u; + do { + c = *sFormat; + if ((c < '0') || (c > '9')) { + break; + } + sFormat++; + FieldWidth = (FieldWidth * 10u) + ((unsigned)c - '0'); + } while (1); + + // + // Filter out precision (number of digits to display) + // + NumDigits = 0u; + c = *sFormat; + if (c == '.') { + sFormat++; + do { + c = *sFormat; + if ((c < '0') || (c > '9')) { + break; + } + sFormat++; + NumDigits = NumDigits * 10u + ((unsigned)c - '0'); + } while (1); + } + // + // Filter out length modifier + // + c = *sFormat; + do { + if ((c == 'l') || (c == 'h')) { + sFormat++; + c = *sFormat; + } else { + break; + } + } while (1); + // + // Handle specifiers + // + switch (c) { + case 'c': { + char c0; + v = va_arg(*pParamList, int); + c0 = (char)v; + _StoreChar(&BufferDesc, c0); + break; + } + case 'd': + v = va_arg(*pParamList, int); + _PrintInt(&BufferDesc, v, 10u, NumDigits, FieldWidth, FormatFlags); + break; + case 'u': + v = va_arg(*pParamList, int); + _PrintUnsigned(&BufferDesc, (unsigned)v, 10u, NumDigits, FieldWidth, FormatFlags); + break; + case 'x': + case 'X': + v = va_arg(*pParamList, int); + _PrintUnsigned(&BufferDesc, (unsigned)v, 16u, NumDigits, FieldWidth, FormatFlags); + break; + case 's': + { + const char * s = va_arg(*pParamList, const char *); + do { + c = *s; + s++; + if (c == '\0') { + break; + } + _StoreChar(&BufferDesc, c); + } while (BufferDesc.ReturnValue >= 0); + } + break; + case 'p': + v = va_arg(*pParamList, int); + _PrintUnsigned(&BufferDesc, (unsigned)v, 16u, 8u, 8u, 0u); + break; + case '%': + _StoreChar(&BufferDesc, '%'); + break; + default: + break; + } + sFormat++; + } else { + _StoreChar(&BufferDesc, c); + } + } while (BufferDesc.ReturnValue >= 0); + + if (BufferDesc.ReturnValue > 0) { + // + // Write remaining data, if any + // + if (BufferDesc.Cnt != 0u) { + SEGGER_RTT_Write(BufferIndex, acBuffer, BufferDesc.Cnt); + } + BufferDesc.ReturnValue += (int)BufferDesc.Cnt; + } + return BufferDesc.ReturnValue; +} + +/********************************************************************* +* +* SEGGER_RTT_printf +* +* Function description +* Stores a formatted string in SEGGER RTT control block. +* This data is read by the host. +* +* Parameters +* BufferIndex Index of "Up"-buffer to be used. (e.g. 0 for "Terminal") +* sFormat Pointer to format string, followed by the arguments for conversion +* +* Return values +* >= 0: Number of bytes which have been stored in the "Up"-buffer. +* < 0: Error +* +* Notes +* (1) Conversion specifications have following syntax: +* %[flags][FieldWidth][.Precision]ConversionSpecifier +* (2) Supported flags: +* -: Left justify within the field width +* +: Always print sign extension for signed conversions +* 0: Pad with 0 instead of spaces. Ignored when using '-'-flag or precision +* Supported conversion specifiers: +* c: Print the argument as one char +* d: Print the argument as a signed integer +* u: Print the argument as an unsigned integer +* x: Print the argument as an hexadecimal integer +* s: Print the string pointed to by the argument +* p: Print the argument as an 8-digit hexadecimal integer. (Argument shall be a pointer to void.) +*/ +int SEGGER_RTT_printf(unsigned BufferIndex, const char * sFormat, ...) { + int r; + va_list ParamList; + + va_start(ParamList, sFormat); + r = SEGGER_RTT_vprintf(BufferIndex, sFormat, &ParamList); + va_end(ParamList); + return r; +} +/*************************** End of file ****************************/ diff --git a/SEGGER/SEGGER/SEGGER_SYSVIEW.c b/SEGGER/SEGGER/SEGGER_SYSVIEW.c new file mode 100644 index 0000000..43b7710 --- /dev/null +++ b/SEGGER/SEGGER/SEGGER_SYSVIEW.c @@ -0,0 +1,3061 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW.c +Purpose : System visualization API implementation. +Revision: $Rev: 21281 $ + +Additional information: + Packet format: + Packets with IDs 0..23 are standard packets with known structure. + For efficiency, they do *NOT* contain a length field. + + + Packets with IDs 24..31 are standard packets with extendible + structure and contain a length field. + + + Packet ID 31 is used for SystemView extended events. + + + Packets with IDs >= 32 always contain a length field. + + + Packet IDs: + 0.. 31 : Standard packets, known by SystemView. + 32..1023 : OS-definable packets, described in a SystemView description file. + 1024..2047 : User-definable packets, described in a SystemView description file. + 2048..32767: Undefined. + + Data encoding: + Basic types (int, short, char, ...): + Basic types are encoded little endian with most-significant bit variant + encoding. + Each encoded byte contains 7 data bits [6:0] and the MSB continuation bit. + The continuation bit indicates whether the next byte belongs to the data + (bit set) or this is the last byte (bit clear). + The most significant bits of data are encoded first, proceeding to the + least significant bits in the final byte (little endian). + + Example encoding: + Data: 0x1F4 (500) + Encoded: 0xF4 (First 7 data bits 74 | Continuation bit) + 0x03 (Second 7 data bits 03, no continuation) + + Data: 0xFFFFFFFF + Encoded: 0xFF 0xFF 0xFF 0xFF 0x0F + + Data: 0xA2 (162), 0x03 (3), 0x7000 + Encoded: 0xA2 0x01 0x03 0x80 0xE0 0x01 + + Byte arrays and strings: + Byte arrays and strings are encoded as followed by the raw data. + NumBytes is encoded as a basic type with a theoretical maximum of 4G. + + Example encoding: + Data: "Hello World\0" (0x48 0x65 0x6C 0x6C 0x6F 0x20 0x57 0x6F 0x72 0x6C 0x64 0x00) + Encoded: 0x0B 0x48 0x65 0x6C 0x6C 0x6F 0x20 0x57 0x6F 0x72 0x6C 0x64 + + Examples packets: + 01 F4 03 80 80 10 // Overflow packet. Data is a single U32. + This packet means: 500 packets lost, Timestamp is 0x40000 + + 02 0F 50 // ISR(15) Enter. Timestamp 80 (0x50) + + 03 20 // ISR Exit. Timestamp 32 (0x20) (Shortest possible packet.) + + Sample code for user defined Packets: + #define MY_ID 0x400 // Any value between 0x400 and 0x7FF + void SendMyPacket(unsigned Para0, unsigned Para1, const char* s) { + U8 aPacket[SEGGER_SYSVIEW_INFO_SIZE + 2 * SEGGER_SYSVIEW_QUANTA_U32 + MAX_STR_LEN + 1]; + U8* pPayload; + // + pPayload = SEGGER_SYSVIEW_PPREPARE_PACKET(aPacket); // Prepare the packet for SystemView + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para0); // Add the first parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para1); // Add the second parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeString(pPayload, s, MAX_STR_LEN); // Add the string to the packet + // + SEGGER_SYSVIEW_SendPacket(&aPacket[0], pPayload, MY_ID); // Send the packet with EventId = MY_ID + } + + #define MY_ID_1 0x401 + void SendOnePara(unsigned Para0) { + SEGGER_SYSVIEW_RecordU32(MY_ID_1, Para0); + } + +*/ + +/********************************************************************* +* +* #include section +* +********************************************************************** +*/ + +#define SEGGER_SYSVIEW_C // For EXTERN statements in SEGGER_SYSVIEW.h + +#include +#include +#include +#include "SEGGER_SYSVIEW_Int.h" +#include "SEGGER_RTT.h" + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ +#if SEGGER_SYSVIEW_ID_SHIFT + #define SHRINK_ID(Id) (((Id) - _SYSVIEW_Globals.RAMBaseAddress) >> SEGGER_SYSVIEW_ID_SHIFT) +#else + #define SHRINK_ID(Id) ((Id) - _SYSVIEW_Globals.RAMBaseAddress) +#endif + +#if SEGGER_SYSVIEW_RTT_CHANNEL > 0 + #define CHANNEL_ID_UP SEGGER_SYSVIEW_RTT_CHANNEL + #define CHANNEL_ID_DOWN SEGGER_SYSVIEW_RTT_CHANNEL +#else + #define CHANNEL_ID_UP _SYSVIEW_Globals.UpChannel + #define CHANNEL_ID_DOWN _SYSVIEW_Globals.DownChannel +#endif + +#if SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE + #if (SEGGER_SYSVIEW_RTT_BUFFER_SIZE % SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE) + #error "SEGGER_SYSVIEW_RTT_BUFFER_SIZE must be a multiple of SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE" + #endif +#endif + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ +// Timestamps may be less than full 32-bits, in which case we need to zero +// the unused bits to properly handle overflows. +// Note that this is a quite common scenario, as a 32-bit time such as +// SysTick might be scaled down to reduce bandwith +// or a 16-bit hardware time might be used. +#if SEGGER_SYSVIEW_TIMESTAMP_BITS < 32 // Eliminate unused bits in case hardware timestamps are less than 32 bits + #define MAKE_DELTA_32BIT(Delta) Delta <<= 32 - SEGGER_SYSVIEW_TIMESTAMP_BITS; \ + Delta >>= 32 - SEGGER_SYSVIEW_TIMESTAMP_BITS; +#else + #define MAKE_DELTA_32BIT(Delta) +#endif + + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ +#define ENABLE_STATE_OFF 0 +#define ENABLE_STATE_ON 1 +#define ENABLE_STATE_DROPPING 2 + +#define FORMAT_FLAG_LEFT_JUSTIFY (1u << 0) +#define FORMAT_FLAG_PAD_ZERO (1u << 1) +#define FORMAT_FLAG_PRINT_SIGN (1u << 2) +#define FORMAT_FLAG_ALTERNATE (1u << 3) + +#define MODULE_EVENT_OFFSET (512) + +/********************************************************************* +* +* Types, local +* +********************************************************************** +*/ +typedef struct { + U8* pBuffer; + U8* pPayload; + U8* pPayloadStart; + U32 Options; + unsigned Cnt; +} SEGGER_SYSVIEW_PRINTF_DESC; + +typedef struct { + U8 EnableState; // 0: Disabled, 1: Enabled, (2: Dropping) + U8 UpChannel; + U8 RecursionCnt; + U32 SysFreq; + U32 CPUFreq; + U32 LastTxTimeStamp; + U32 RAMBaseAddress; +#if (SEGGER_SYSVIEW_POST_MORTEM_MODE == 1) + U32 PacketCount; +#else + U32 DropCount; + U8 DownChannel; +#endif + U32 DisabledEvents; + const SEGGER_SYSVIEW_OS_API* pOSAPI; + SEGGER_SYSVIEW_SEND_SYS_DESC_FUNC* pfSendSysDesc; +} SEGGER_SYSVIEW_GLOBALS; + +/********************************************************************* +* +* Function prototypes, required +* +********************************************************************** +*/ +static void _SendPacket(U8* pStartPacket, U8* pEndPacket, unsigned int EventId); + +/********************************************************************* +* +* Static data +* +********************************************************************** +*/ +static const U8 _abSync[10] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + +#if SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE + #ifdef SEGGER_SYSVIEW_SECTION + // + // Alignment + special section required + // + #if (defined __GNUC__) + __attribute__ ((section (SEGGER_SYSVIEW_SECTION), aligned (SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE))) static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + __attribute__ ((section (SEGGER_SYSVIEW_SECTION), aligned (SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE))) static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #elif (defined __ICCARM__) || (defined __ICCRX__) + #pragma location=SEGGER_SYSVIEW_SECTION + #pragma data_alignment=SEGGER_RTT_CPU_CACHE_LINE_SIZE + static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + #pragma location=SEGGER_SYSVIEW_SECTION + #pragma data_alignment=SEGGER_RTT_CPU_CACHE_LINE_SIZE + static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #elif (defined __CC_ARM) + __attribute__ ((section (SEGGER_SYSVIEW_SECTION), aligned (SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE), zero_init)) static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + __attribute__ ((section (SEGGER_SYSVIEW_SECTION), aligned (SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE), zero_init)) static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #else + #error "Do not know how to place SystemView buffers in specific section" + #endif + #else + // + // Only alignment required + // + #if (defined __GNUC__) + __attribute__ ((aligned (SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE))) static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + __attribute__ ((aligned (SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE))) static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #elif (defined __ICCARM__) || (defined __ICCRX__) + #pragma data_alignment=SEGGER_RTT_CPU_CACHE_LINE_SIZE + static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + #pragma data_alignment=SEGGER_RTT_CPU_CACHE_LINE_SIZE + static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #elif (defined __CC_ARM) + __attribute__ ((aligned (SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE), zero_init)) static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + __attribute__ ((aligned (SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE), zero_init)) static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #else + #error "Do not know how to align SystemView buffers to cache line size" + #endif + #endif +#else + #ifdef SEGGER_SYSVIEW_SECTION + // + // Only special section required + // + #if (defined __GNUC__) + __attribute__ ((section (SEGGER_SYSVIEW_SECTION))) static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + __attribute__ ((section (SEGGER_SYSVIEW_SECTION))) static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #elif (defined __ICCARM__) || (defined __ICCRX__) + #pragma location=SEGGER_SYSVIEW_SECTION + static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + #pragma location=SEGGER_SYSVIEW_SECTION + static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #elif (defined __CC_ARM) + __attribute__ ((section (SEGGER_SYSVIEW_SECTION), zero_init)) static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + __attribute__ ((section (SEGGER_SYSVIEW_SECTION), zero_init)) static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #else + #error "Do not know how to place SystemView buffers in specific section" + #endif + #else + // + // Neither special section nor alignment required + // + static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #endif +#endif + +#ifdef SEGGER_SYSVIEW_SECTION + #if (defined __GNUC__) + __attribute__ ((section (SEGGER_SYSVIEW_SECTION))) static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + __attribute__ ((section (SEGGER_SYSVIEW_SECTION))) static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #elif (defined __ICCARM__) || (defined __ICCRX__) + #pragma location=SEGGER_SYSVIEW_SECTION + static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #pragma location=SEGGER_SYSVIEW_SECTION + static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #elif (defined __CC_ARM) + __attribute__ ((section (SEGGER_SYSVIEW_SECTION), zero_init)) static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + __attribute__ ((section (SEGGER_SYSVIEW_SECTION), zero_init)) static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #else + static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #endif +#else + #if SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE + #if (defined __GNUC__) + static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE] __attribute__ ((aligned (SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE))); + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + static char _DownBuffer[8] __attribute__ ((aligned (SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE))); // Small, fixed-size buffer, for back-channel comms + #endif + #elif (defined(__ICCARM__)) + #pragma data_alignment=SEGGER_RTT_CPU_CACHE_LINE_SIZE + static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + #pragma data_alignment=SEGGER_RTT_CPU_CACHE_LINE_SIZE + static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #else + #error "Don't know how to place _SEGGER_RTT, _acUpBuffer, _acDownBuffer cache-line aligned" + #endif + #else + static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #endif +#endif + +static SEGGER_SYSVIEW_GLOBALS _SYSVIEW_Globals; + +static SEGGER_SYSVIEW_MODULE* _pFirstModule; +static U8 _NumModules; + +/********************************************************************* +* +* Static code +* +********************************************************************** +*/ + +#define ENCODE_U32(pDest, Value) { \ + U8* pSysviewPointer; \ + U32 SysViewData; \ + pSysviewPointer = pDest; \ + SysViewData = Value; \ + while(SysViewData > 0x7F) { \ + *pSysviewPointer++ = (U8)(SysViewData | 0x80); \ + SysViewData >>= 7; \ + }; \ + *pSysviewPointer++ = (U8)SysViewData; \ + pDest = pSysviewPointer; \ + }; + + + +#if (SEGGER_SYSVIEW_USE_STATIC_BUFFER == 1) +static U8 _aPacket[SEGGER_SYSVIEW_MAX_PACKET_SIZE]; + +#define RECORD_START(PacketSize) SEGGER_SYSVIEW_LOCK(); \ + pPayloadStart = _PreparePacket(_aPacket); + +#define RECORD_END() SEGGER_SYSVIEW_UNLOCK() + +#else + +#define RECORD_START(PacketSize) U8 aPacket[(PacketSize)]; \ + pPayloadStart = _PreparePacket(aPacket); \ + +#define RECORD_END() + +#endif + +/********************************************************************* +* +* _EncodeData() +* +* Function description +* Encode a byte buffer in variable-length format. +* +* Parameters +* pPayload - Pointer to where string will be encoded. +* pSrc - Pointer to data buffer to be encoded. +* NumBytes - Number of bytes in the buffer to be encoded. +* +* Return value +* Pointer to the byte following the value, i.e. the first free +* byte in the payload and the next position to store payload +* content. +* +* Additional information +* The data is encoded as a count byte followed by the contents +* of the data buffer. +* Make sure NumBytes + 1 bytes are free for the payload. +*/ +static U8* _EncodeData(U8* pPayload, const char* pSrc, unsigned int NumBytes) { + unsigned int n; + // + n = 0; + *pPayload++ = NumBytes; + while (n < NumBytes) { + *pPayload++ = *pSrc++; + n++; + } + return pPayload; +} + +/********************************************************************* +* +* _EncodeStr() +* +* Function description +* Encode a string in variable-length format. +* +* Parameters +* pPayload - Pointer to where string will be encoded. +* pText - String to encode. +* Limit - Maximum number of characters to encode from string. +* +* Return value +* Pointer to the byte following the value, i.e. the first free +* byte in the payload and the next position to store payload +* content. +* +* Additional information +* The string is encoded as a count byte followed by the contents +* of the string. +* No more than 1 + Limit bytes will be encoded to the payload. +*/ +static U8 *_EncodeStr(U8 *pPayload, const char *pText, unsigned int Limit) { + unsigned int n; + unsigned int Len; + // + // Compute string len + // + Len = 0; + while(*(pText + Len) != 0) { + Len++; + } + if (Len > Limit) { + Len = Limit; + } + // + // Write Len + // + if (Len < 255) { + *pPayload++ = Len; + } else { + *pPayload++ = 255; + *pPayload++ = (Len & 255); + *pPayload++ = ((Len >> 8) & 255); + } + // + // copy string + // + n = 0; + while (n < Len) { + *pPayload++ = *pText++; + n++; + } + return pPayload; +} + +/********************************************************************* +* +* _PreparePacket() +* +* Function description +* Prepare a SystemView event packet header. +* +* Parameters +* pPacket - Pointer to start of packet to initialize. +* +* Return value +* Pointer to first byte of packet payload. +* +* Additional information +* The payload length and evnetId are not initialized. +* PreparePacket only reserves space for them and they are +* computed and filled in by the sending function. +*/ +static U8* _PreparePacket(U8* pPacket) { + return pPacket + 4; +} + +/********************************************************************* +* +* _HandleIncomingPacket() +* +* Function description +* Read an incoming command from the down channel and process it. +* +* Additional information +* This function is called each time after sending a packet. +* Processing incoming packets is done asynchronous. SystemView might +* already have sent event packets after the host has sent a command. +*/ +#if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) +static void _HandleIncomingPacket(void) { + U8 Cmd; + int Status; + // + Status = SEGGER_RTT_ReadNoLock(CHANNEL_ID_DOWN, &Cmd, 1); + if (Status > 0) { + switch (Cmd) { + case SEGGER_SYSVIEW_COMMAND_ID_START: + SEGGER_SYSVIEW_Start(); + break; + case SEGGER_SYSVIEW_COMMAND_ID_STOP: + SEGGER_SYSVIEW_Stop(); + break; + case SEGGER_SYSVIEW_COMMAND_ID_GET_SYSTIME: + SEGGER_SYSVIEW_RecordSystime(); + break; + case SEGGER_SYSVIEW_COMMAND_ID_GET_TASKLIST: + SEGGER_SYSVIEW_SendTaskList(); + break; + case SEGGER_SYSVIEW_COMMAND_ID_GET_SYSDESC: + SEGGER_SYSVIEW_GetSysDesc(); + break; + case SEGGER_SYSVIEW_COMMAND_ID_GET_NUMMODULES: + SEGGER_SYSVIEW_SendNumModules(); + break; + case SEGGER_SYSVIEW_COMMAND_ID_GET_MODULEDESC: + SEGGER_SYSVIEW_SendModuleDescription(); + break; + case SEGGER_SYSVIEW_COMMAND_ID_GET_MODULE: + Status = SEGGER_RTT_ReadNoLock(CHANNEL_ID_DOWN, &Cmd, 1); + if (Status > 0) { + SEGGER_SYSVIEW_SendModule(Cmd); + } + break; + case SEGGER_SYSVIEW_COMMAND_ID_HEARTBEAT: + break; + default: + if (Cmd >= 128) { // Unknown extended command. Dummy read its parameter. + SEGGER_RTT_ReadNoLock(CHANNEL_ID_DOWN, &Cmd, 1); + } + break; + } + } +} +#endif // (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + +/********************************************************************* +* +* _TrySendOverflowPacket() +* +* Function description +* Try to transmit an SystemView Overflow packet containing the +* number of dropped packets. +* +* Additional information +* Format as follows: +* 01 Max. packet len is 1 + 5 + 5 = 11 +* +* Example packets sent +* 01 20 40 +* +* Return value +* !=0: Success, Message sent (stored in RTT-Buffer) +* ==0: Buffer full, Message *NOT* stored +* +*/ +#if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) +static int _TrySendOverflowPacket(void) { + U32 TimeStamp; + I32 Delta; + int Status; + U8 aPacket[11]; + U8* pPayload; + + aPacket[0] = SYSVIEW_EVTID_OVERFLOW; // 1 + pPayload = &aPacket[1]; + ENCODE_U32(pPayload, _SYSVIEW_Globals.DropCount); + // + // Compute time stamp delta and append it to packet. + // + TimeStamp = SEGGER_SYSVIEW_GET_TIMESTAMP(); + Delta = TimeStamp - _SYSVIEW_Globals.LastTxTimeStamp; + MAKE_DELTA_32BIT(Delta); + ENCODE_U32(pPayload, Delta); + // + // Try to store packet in RTT buffer and update time stamp when this was successful + // + Status = SEGGER_RTT_WriteSkipNoLock(CHANNEL_ID_UP, aPacket, pPayload - aPacket); + SEGGER_SYSVIEW_ON_EVENT_RECORDED(pPayload - aPacket); + if (Status) { + _SYSVIEW_Globals.LastTxTimeStamp = TimeStamp; + _SYSVIEW_Globals.EnableState--; // EnableState has been 2, will be 1. Always. + } else { + _SYSVIEW_Globals.DropCount++; + } + // + return Status; +} +#endif // (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + +/********************************************************************* +* +* _SendSyncInfo() +* +* Function description +* Send SystemView sync packet and system information in +* post mortem mode. +* +* Additional information +* Sync is 10 * 0x00 without timestamp +*/ +#if (SEGGER_SYSVIEW_POST_MORTEM_MODE == 1) +static void _SendSyncInfo(void) { + // + // Add sync packet ( 10 * 0x00) + // Send system description + // Send system time + // Send task list + // Send module description + // Send module information + // + SEGGER_RTT_WriteWithOverwriteNoLock(CHANNEL_ID_UP, _abSync, 10); + SEGGER_SYSVIEW_ON_EVENT_RECORDED(10); + SEGGER_SYSVIEW_RecordVoid(SYSVIEW_EVTID_TRACE_START); + { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 4 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, _SYSVIEW_Globals.SysFreq); + ENCODE_U32(pPayload, _SYSVIEW_Globals.CPUFreq); + ENCODE_U32(pPayload, _SYSVIEW_Globals.RAMBaseAddress); + ENCODE_U32(pPayload, SEGGER_SYSVIEW_ID_SHIFT); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_INIT); + RECORD_END(); + } + if (_SYSVIEW_Globals.pfSendSysDesc) { + _SYSVIEW_Globals.pfSendSysDesc(); + } + SEGGER_SYSVIEW_RecordSystime(); + SEGGER_SYSVIEW_SendTaskList(); + if (_NumModules > 0) { + int n; + SEGGER_SYSVIEW_SendNumModules(); + for (n = 0; n < _NumModules; n++) { + SEGGER_SYSVIEW_SendModule(n); + } + SEGGER_SYSVIEW_SendModuleDescription(); + } +} +#endif // (SEGGER_SYSVIEW_POST_MORTEM_MODE == 1) + +/********************************************************************* +* +* _SendPacket() +* +* Function description +* Send a SystemView packet over RTT. RTT channel and mode are +* configured by macros when the SystemView component is initialized. +* This function takes care of maintaining the packet drop count +* and sending overflow packets when necessary. +* The packet must be passed without Id and Length because this +* function prepends it to the packet before transmission. +* +* Parameters +* pStartPacket - Pointer to start of packet payload. +* There must be at least 4 bytes free to prepend Id and Length. +* pEndPacket - Pointer to end of packet payload. +* EventId - Id of the event to send. +* +*/ +static void _SendPacket(U8* pStartPacket, U8* pEndPacket, unsigned int EventId) { + unsigned int NumBytes; + U32 TimeStamp; + U32 Delta; +#if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + int Status; +#endif + +#if (SEGGER_SYSVIEW_USE_STATIC_BUFFER == 0) + SEGGER_SYSVIEW_LOCK(); +#endif + +#if (SEGGER_SYSVIEW_POST_MORTEM_MODE == 1) + if (_SYSVIEW_Globals.EnableState == 0) { + goto SendDone; + } +#else + if (_SYSVIEW_Globals.EnableState == 1) { // Enabled, no dropped packets remaining + goto Send; + } + if (_SYSVIEW_Globals.EnableState == 0) { + goto SendDone; + } + // + // Handle buffer full situations: + // Have packets been dropped before because buffer was full? + // In this case try to send and overflow packet. + // + if (_SYSVIEW_Globals.EnableState == 2) { + _TrySendOverflowPacket(); + if (_SYSVIEW_Globals.EnableState != 1) { + goto SendDone; + } + } +Send: +#endif + // + // Check if event is disabled from being recorded. + // + if (EventId < 32) { + if (_SYSVIEW_Globals.DisabledEvents & ((U32)1u << EventId)) { + goto SendDone; + } + } + // + // Prepare actual packet. + // If it is a known packet, prepend eventId only, + // otherwise prepend packet length and eventId. + // + if (EventId < 24) { + *--pStartPacket = EventId; + } else { + NumBytes = pEndPacket - pStartPacket; + if (NumBytes > 127) { + *--pStartPacket = (NumBytes >> 7); + *--pStartPacket = NumBytes | 0x80; + } else { + *--pStartPacket = NumBytes; + } + if (EventId > 127) { + *--pStartPacket = (EventId >> 7); + *--pStartPacket = EventId | 0x80; + } else { + *--pStartPacket = EventId; + } + } + // + // Compute time stamp delta and append it to packet. + // + TimeStamp = SEGGER_SYSVIEW_GET_TIMESTAMP(); + Delta = TimeStamp - _SYSVIEW_Globals.LastTxTimeStamp; + MAKE_DELTA_32BIT(Delta); + ENCODE_U32(pEndPacket, Delta); +#if (SEGGER_SYSVIEW_POST_MORTEM_MODE == 1) + // + // Store packet in RTT buffer by overwriting old data and update time stamp + // + SEGGER_RTT_WriteWithOverwriteNoLock(CHANNEL_ID_UP, pStartPacket, pEndPacket - pStartPacket); + SEGGER_SYSVIEW_ON_EVENT_RECORDED(pEndPacket - pStartPacket); + _SYSVIEW_Globals.LastTxTimeStamp = TimeStamp; +#else + // + // Try to store packet in RTT buffer and update time stamp when this was successful + // + Status = SEGGER_RTT_WriteSkipNoLock(CHANNEL_ID_UP, pStartPacket, pEndPacket - pStartPacket); + SEGGER_SYSVIEW_ON_EVENT_RECORDED(pEndPacket - pStartPacket); + if (Status) { + _SYSVIEW_Globals.LastTxTimeStamp = TimeStamp; + } else { + _SYSVIEW_Globals.EnableState++; // EnableState has been 1, will be 2. Always. + } +#endif + +#if (SEGGER_SYSVIEW_POST_MORTEM_MODE == 1) + // + // Add sync and system information periodically if we are in post mortem mode + // + if (_SYSVIEW_Globals.RecursionCnt == 0) { // Avoid uncontrolled nesting. This way, this routine can call itself once, but no more often than that. + _SYSVIEW_Globals.RecursionCnt = 1; + if (_SYSVIEW_Globals.PacketCount++ & (1 << SEGGER_SYSVIEW_SYNC_PERIOD_SHIFT)) { + _SendSyncInfo(); + _SYSVIEW_Globals.PacketCount = 0; + } + _SYSVIEW_Globals.RecursionCnt = 0; + } +SendDone: + ; // Avoid "label at end of compound statement" error when using static buffer +#else +SendDone: + // + // Check if host is sending data which needs to be processed. + // Note that since this code is called for every packet, it is very time critical, so we do + // only what is really needed here, which is checking if there is any data + // + if (SEGGER_RTT_HASDATA(CHANNEL_ID_DOWN)) { + if (_SYSVIEW_Globals.RecursionCnt == 0) { // Avoid uncontrolled nesting. This way, this routine can call itself once, but no more often than that. + _SYSVIEW_Globals.RecursionCnt = 1; + _HandleIncomingPacket(); + _SYSVIEW_Globals.RecursionCnt = 0; + } + } +#endif + // +#if (SEGGER_SYSVIEW_USE_STATIC_BUFFER == 0) + SEGGER_SYSVIEW_UNLOCK(); // We are done. Unlock and return +#endif +} + +#ifndef SEGGER_SYSVIEW_EXCLUDE_PRINTF // Define in project to avoid warnings about variable parameter list +/********************************************************************* +* +* _VPrintHost() +* +* Function description +* Send a format string and its parameters to the host. +* +* Parameters +* s Pointer to format string. +* Options Options to be sent to the host. +* pParamList Pointer to the list of arguments for the format string. +*/ +static int _VPrintHost(const char* s, U32 Options, va_list* pParamList) { + U32 aParas[SEGGER_SYSVIEW_MAX_ARGUMENTS]; + U32* pParas; + U32 NumArguments; + const char* p; + char c; + U8* pPayload; + U8* pPayloadStart; +#if SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT + U8 HasNonScalar; + + HasNonScalar = 0; +#endif + // + // Count number of arguments by counting '%' characters in string. + // If enabled, check for non-scalar modifier flags to format string on the target. + // + p = s; + NumArguments = 0; + for (;;) { + c = *p++; + if (c == 0) { + break; + } + if (c == '%') { + c = *p; +#if SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT == 0 + aParas[NumArguments++] = va_arg(*pParamList, int); + if (NumArguments == SEGGER_SYSVIEW_MAX_ARGUMENTS) { + break; + } +#else + if (c == 's') { + HasNonScalar = 1; + break; + } else { + aParas[NumArguments++] = va_arg(*pParamList, int); + if (NumArguments == SEGGER_SYSVIEW_MAX_ARGUMENTS) { + break; + } + } +#endif + } + } + +#if SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT + if (HasNonScalar) { + return -1; + } +#endif + // + // Send string and parameters to host + // + { + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_MAX_STRING_LEN + 2 * SEGGER_SYSVIEW_QUANTA_U32 + SEGGER_SYSVIEW_MAX_ARGUMENTS * SEGGER_SYSVIEW_QUANTA_U32); + pPayload = _EncodeStr(pPayloadStart, s, SEGGER_SYSVIEW_MAX_STRING_LEN); + ENCODE_U32(pPayload, Options); + ENCODE_U32(pPayload, NumArguments); + pParas = aParas; + while (NumArguments--) { + ENCODE_U32(pPayload, (*pParas)); + pParas++; + } + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_PRINT_FORMATTED); + RECORD_END(); + } + return 0; +} + +/********************************************************************* +* +* _StoreChar() +* +* Function description +* Stores a character in the printf-buffer and sends the buffer when +* it is filled. +* +* Parameters +* p Pointer to the buffer description. +* c Character to be printed. +*/ +static void _StoreChar(SEGGER_SYSVIEW_PRINTF_DESC * p, char c) { + unsigned int Cnt; + U8* pPayload; + U32 Options; + + Cnt = p->Cnt; + if ((Cnt + 1u) <= SEGGER_SYSVIEW_MAX_STRING_LEN) { + *(p->pPayload++) = c; + p->Cnt = Cnt + 1u; + } + // + // Write part of string, when the buffer is full + // + if (p->Cnt == SEGGER_SYSVIEW_MAX_STRING_LEN) { + *(p->pPayloadStart) = p->Cnt; + pPayload = p->pPayload; + Options = p->Options; + ENCODE_U32(pPayload, Options); + ENCODE_U32(pPayload, 0); + _SendPacket(p->pPayloadStart, pPayload, SYSVIEW_EVTID_PRINT_FORMATTED); + p->pPayloadStart = _PreparePacket(p->pBuffer); + p->pPayload = p->pPayloadStart + 1u; + p->Cnt = 0u; + } +} + +/********************************************************************* +* +* _PrintUnsigned() +* +* Function description +* Print an unsigned integer with the given formatting into the +* formatted string. +* +* Parameters +* pBufferDesc Pointer to the buffer description. +* v Value to be printed. +* Base Base of the value. +* NumDigits Number of digits to be printed. +* FieldWidth Width of the printed field. +* FormatFlags Flags for formatting the value. +*/ +static void _PrintUnsigned(SEGGER_SYSVIEW_PRINTF_DESC * pBufferDesc, unsigned int v, unsigned int Base, unsigned int NumDigits, unsigned int FieldWidth, unsigned int FormatFlags) { + static const char _aV2C[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; + unsigned int Div; + unsigned int Digit; + unsigned int Number; + unsigned int Width; + char c; + + Number = v; + Digit = 1u; + // + // Get actual field width + // + Width = 1u; + while (Number >= Base) { + Number = (Number / Base); + Width++; + } + if (NumDigits > Width) { + Width = NumDigits; + } + // + // Print leading chars if necessary + // + if ((FormatFlags & FORMAT_FLAG_LEFT_JUSTIFY) == 0u) { + if (FieldWidth != 0u) { + if (((FormatFlags & FORMAT_FLAG_PAD_ZERO) == FORMAT_FLAG_PAD_ZERO) && (NumDigits == 0u)) { + c = '0'; + } else { + c = ' '; + } + while ((FieldWidth != 0u) && (Width < FieldWidth)) { + FieldWidth--; + _StoreChar(pBufferDesc, c); + } + } + } + // + // Compute Digit. + // Loop until Digit has the value of the highest digit required. + // Example: If the output is 345 (Base 10), loop 2 times until Digit is 100. + // + while (1) { + if (NumDigits > 1u) { // User specified a min number of digits to print? => Make sure we loop at least that often, before checking anything else (> 1 check avoids problems with NumDigits being signed / unsigned) + NumDigits--; + } else { + Div = v / Digit; + if (Div < Base) { // Is our divider big enough to extract the highest digit from value? => Done + break; + } + } + Digit *= Base; + } + // + // Output digits + // + do { + Div = v / Digit; + v -= Div * Digit; + _StoreChar(pBufferDesc, _aV2C[Div]); + Digit /= Base; + } while (Digit); + // + // Print trailing spaces if necessary + // + if ((FormatFlags & FORMAT_FLAG_LEFT_JUSTIFY) == FORMAT_FLAG_LEFT_JUSTIFY) { + if (FieldWidth != 0u) { + while ((FieldWidth != 0u) && (Width < FieldWidth)) { + FieldWidth--; + _StoreChar(pBufferDesc, ' '); + } + } + } +} + +/********************************************************************* +* +* _PrintInt() +* +* Function description +* Print a signed integer with the given formatting into the +* formatted string. +* +* Parameters +* pBufferDesc Pointer to the buffer description. +* v Value to be printed. +* Base Base of the value. +* NumDigits Number of digits to be printed. +* FieldWidth Width of the printed field. +* FormatFlags Flags for formatting the value. +*/ +static void _PrintInt(SEGGER_SYSVIEW_PRINTF_DESC * pBufferDesc, int v, unsigned int Base, unsigned int NumDigits, unsigned int FieldWidth, unsigned int FormatFlags) { + unsigned int Width; + int Number; + + Number = (v < 0) ? -v : v; + + // + // Get actual field width + // + Width = 1u; + while (Number >= (int)Base) { + Number = (Number / (int)Base); + Width++; + } + if (NumDigits > Width) { + Width = NumDigits; + } + if ((FieldWidth > 0u) && ((v < 0) || ((FormatFlags & FORMAT_FLAG_PRINT_SIGN) == FORMAT_FLAG_PRINT_SIGN))) { + FieldWidth--; + } + + // + // Print leading spaces if necessary + // + if ((((FormatFlags & FORMAT_FLAG_PAD_ZERO) == 0u) || (NumDigits != 0u)) && ((FormatFlags & FORMAT_FLAG_LEFT_JUSTIFY) == 0u)) { + if (FieldWidth != 0u) { + while ((FieldWidth != 0u) && (Width < FieldWidth)) { + FieldWidth--; + _StoreChar(pBufferDesc, ' '); + } + } + } + // + // Print sign if necessary + // + if (v < 0) { + v = -v; + _StoreChar(pBufferDesc, '-'); + } else if ((FormatFlags & FORMAT_FLAG_PRINT_SIGN) == FORMAT_FLAG_PRINT_SIGN) { + _StoreChar(pBufferDesc, '+'); + } else { + + } + // + // Print leading zeros if necessary + // + if (((FormatFlags & FORMAT_FLAG_PAD_ZERO) == FORMAT_FLAG_PAD_ZERO) && ((FormatFlags & FORMAT_FLAG_LEFT_JUSTIFY) == 0u) && (NumDigits == 0u)) { + if (FieldWidth != 0u) { + while ((FieldWidth != 0u) && (Width < FieldWidth)) { + FieldWidth--; + _StoreChar(pBufferDesc, '0'); + } + } + } + // + // Print number without sign + // + _PrintUnsigned(pBufferDesc, (unsigned int)v, Base, NumDigits, FieldWidth, FormatFlags); +} + +/********************************************************************* +* +* _VPrintTarget() +* +* Function description +* Stores a formatted string. +* This data is read by the host. +* +* Parameters +* sFormat Pointer to format string. +* Options Options to be sent to the host. +* pParamList Pointer to the list of arguments for the format string. +*/ +static void _VPrintTarget(const char* sFormat, U32 Options, va_list* pParamList) { + SEGGER_SYSVIEW_PRINTF_DESC BufferDesc; + char c; + int v; + unsigned int NumDigits; + unsigned int FormatFlags; + unsigned int FieldWidth; + U8* pPayloadStart; +#if SEGGER_SYSVIEW_USE_STATIC_BUFFER == 0 + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_MAX_STRING_LEN + 1 + 2 * SEGGER_SYSVIEW_QUANTA_U32); + SEGGER_SYSVIEW_LOCK(); +#else + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_MAX_STRING_LEN + 1 + 2 * SEGGER_SYSVIEW_QUANTA_U32); +#endif + +#if SEGGER_SYSVIEW_USE_STATIC_BUFFER == 0 + BufferDesc.pBuffer = aPacket; +#else + BufferDesc.pBuffer = _aPacket; +#endif + BufferDesc.Cnt = 0u; + BufferDesc.pPayloadStart = pPayloadStart; + BufferDesc.pPayload = BufferDesc.pPayloadStart + 1u; + BufferDesc.Options = Options; + + do { + c = *sFormat; + sFormat++; + if (c == 0u) { + break; + } + if (c == '%') { + // + // Filter out flags + // + FormatFlags = 0u; + v = 1; + do { + c = *sFormat; + switch (c) { + case '-': FormatFlags |= FORMAT_FLAG_LEFT_JUSTIFY; sFormat++; break; + case '0': FormatFlags |= FORMAT_FLAG_PAD_ZERO; sFormat++; break; + case '+': FormatFlags |= FORMAT_FLAG_PRINT_SIGN; sFormat++; break; + case '#': FormatFlags |= FORMAT_FLAG_ALTERNATE; sFormat++; break; + default: v = 0; break; + } + } while (v); + // + // filter out field with + // + FieldWidth = 0u; + do { + c = *sFormat; + if ((c < '0') || (c > '9')) { + break; + } + sFormat++; + FieldWidth = (FieldWidth * 10u) + ((unsigned int)c - '0'); + } while (1); + + // + // Filter out precision (number of digits to display) + // + NumDigits = 0u; + c = *sFormat; + if (c == '.') { + sFormat++; + do { + c = *sFormat; + if ((c < '0') || (c > '9')) { + break; + } + sFormat++; + NumDigits = NumDigits * 10u + ((unsigned int)c - '0'); + } while (1); + } + // + // Filter out length modifier + // + c = *sFormat; + do { + if ((c == 'l') || (c == 'h')) { + c = *sFormat; + sFormat++; + } else { + break; + } + } while (1); + // + // Handle specifiers + // + switch (c) { + case 'c': { + char c0; + v = va_arg(*pParamList, int); + c0 = (char)v; + _StoreChar(&BufferDesc, c0); + break; + } + case 'd': + v = va_arg(*pParamList, int); + _PrintInt(&BufferDesc, v, 10u, NumDigits, FieldWidth, FormatFlags); + break; + case 'u': + v = va_arg(*pParamList, int); + _PrintUnsigned(&BufferDesc, (unsigned int)v, 10u, NumDigits, FieldWidth, FormatFlags); + break; + case 'x': + case 'X': + v = va_arg(*pParamList, int); + _PrintUnsigned(&BufferDesc, (unsigned int)v, 16u, NumDigits, FieldWidth, FormatFlags); + break; + case 'p': + v = va_arg(*pParamList, int); + _PrintUnsigned(&BufferDesc, (unsigned int)v, 16u, 8u, 8u, 0u); + break; + case '%': + _StoreChar(&BufferDesc, '%'); + break; + default: + break; + } + sFormat++; + } else { + _StoreChar(&BufferDesc, c); + } + } while (*sFormat); + + // + // Write remaining data, if any + // + if (BufferDesc.Cnt != 0u) { + *(BufferDesc.pPayloadStart) = BufferDesc.Cnt; + ENCODE_U32(BufferDesc.pPayload, BufferDesc.Options); + ENCODE_U32(BufferDesc.pPayload, 0); + _SendPacket(BufferDesc.pPayloadStart, BufferDesc.pPayload, SYSVIEW_EVTID_PRINT_FORMATTED); + } +#if SEGGER_SYSVIEW_USE_STATIC_BUFFER == 0 + SEGGER_SYSVIEW_UNLOCK(); + RECORD_END(); +#else + RECORD_END(); +#endif +} +#endif // SEGGER_SYSVIEW_EXCLUDE_PRINTF + +/********************************************************************* +* +* Public code +* +********************************************************************** +*/ + +/********************************************************************* +* +* SEGGER_SYSVIEW_Init() +* +* Function description +* Initializes the SYSVIEW module. +* Must be called before the Systemview Application connects to +* the system. +* +* Parameters +* SysFreq - Frequency of timestamp, usually CPU core clock frequency. +* CPUFreq - CPU core clock frequency. +* pOSAPI - Pointer to the API structure for OS-specific functions. +* pfSendSysDesc - Pointer to record system description callback function. +* +* Additional information +* This function initializes the RTT channel used to transport +* SEGGER SystemView packets. +* The channel is assigned the label "SysView" for client software +* to identify the SystemView channel. +* +* The channel is configured with the macro SEGGER_SYSVIEW_RTT_CHANNEL. +*/ +void SEGGER_SYSVIEW_Init(U32 SysFreq, U32 CPUFreq, const SEGGER_SYSVIEW_OS_API *pOSAPI, SEGGER_SYSVIEW_SEND_SYS_DESC_FUNC pfSendSysDesc) { +#ifdef SEGGER_RTT_SECTION + // + // Explicitly initialize the RTT Control Block if it is in its dedicated section. + // + SEGGER_RTT_Init(); +#endif +#if (SEGGER_SYSVIEW_POST_MORTEM_MODE == 1) +#if SEGGER_SYSVIEW_RTT_CHANNEL > 0 + SEGGER_RTT_ConfigUpBuffer(SEGGER_SYSVIEW_RTT_CHANNEL, "SysView", &_UpBuffer[0], sizeof(_UpBuffer), SEGGER_RTT_MODE_NO_BLOCK_SKIP); +#else + _SYSVIEW_Globals.UpChannel = SEGGER_RTT_AllocUpBuffer ("SysView", &_UpBuffer[0], sizeof(_UpBuffer), SEGGER_RTT_MODE_NO_BLOCK_SKIP); +#endif + _SYSVIEW_Globals.RAMBaseAddress = SEGGER_SYSVIEW_ID_BASE; + _SYSVIEW_Globals.LastTxTimeStamp = SEGGER_SYSVIEW_GET_TIMESTAMP(); + _SYSVIEW_Globals.pOSAPI = pOSAPI; + _SYSVIEW_Globals.SysFreq = SysFreq; + _SYSVIEW_Globals.CPUFreq = CPUFreq; + _SYSVIEW_Globals.pfSendSysDesc = pfSendSysDesc; + _SYSVIEW_Globals.EnableState = 0; + _SYSVIEW_Globals.PacketCount = 0; +#else // (SEGGER_SYSVIEW_POST_MORTEM_MODE == 1) +#if SEGGER_SYSVIEW_RTT_CHANNEL > 0 + SEGGER_RTT_ConfigUpBuffer (SEGGER_SYSVIEW_RTT_CHANNEL, "SysView", &_UpBuffer[0], sizeof(_UpBuffer), SEGGER_RTT_MODE_NO_BLOCK_SKIP); + SEGGER_RTT_ConfigDownBuffer (SEGGER_SYSVIEW_RTT_CHANNEL, "SysView", &_DownBuffer[0], sizeof(_DownBuffer), SEGGER_RTT_MODE_NO_BLOCK_SKIP); +#else + _SYSVIEW_Globals.UpChannel = SEGGER_RTT_AllocUpBuffer ("SysView", &_UpBuffer[0], sizeof(_UpBuffer), SEGGER_RTT_MODE_NO_BLOCK_SKIP); + _SYSVIEW_Globals.DownChannel = _SYSVIEW_Globals.UpChannel; + SEGGER_RTT_ConfigDownBuffer (_SYSVIEW_Globals.DownChannel, "SysView", &_DownBuffer[0], sizeof(_DownBuffer), SEGGER_RTT_MODE_NO_BLOCK_SKIP); +#endif + _SYSVIEW_Globals.RAMBaseAddress = SEGGER_SYSVIEW_ID_BASE; + _SYSVIEW_Globals.LastTxTimeStamp = SEGGER_SYSVIEW_GET_TIMESTAMP(); + _SYSVIEW_Globals.pOSAPI = pOSAPI; + _SYSVIEW_Globals.SysFreq = SysFreq; + _SYSVIEW_Globals.CPUFreq = CPUFreq; + _SYSVIEW_Globals.pfSendSysDesc = pfSendSysDesc; + _SYSVIEW_Globals.EnableState = 0; +#endif // (SEGGER_SYSVIEW_POST_MORTEM_MODE == 1) +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_SetRAMBase() +* +* Function description +* Sets the RAM base address, which is subtracted from IDs in order +* to save bandwidth. +* +* Parameters +* RAMBaseAddress - Lowest RAM Address. (i.e. 0x20000000 on most Cortex-M) +*/ +void SEGGER_SYSVIEW_SetRAMBase(U32 RAMBaseAddress) { + _SYSVIEW_Globals.RAMBaseAddress = RAMBaseAddress; +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordVoid() +* +* Function description +* Formats and sends a SystemView packet with an empty payload. +* +* Parameters +* EventID - SystemView event ID. +*/ +void SEGGER_SYSVIEW_RecordVoid(unsigned int EventID) { + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE); + // + _SendPacket(pPayloadStart, pPayloadStart, EventID); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordU32() +* +* Function description +* Formats and sends a SystemView packet containing a single U32 +* parameter payload. +* +* Parameters +* EventID - SystemView event ID. +* Value - The 32-bit parameter encoded to SystemView packet payload. +*/ +void SEGGER_SYSVIEW_RecordU32(unsigned int EventID, U32 Value) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, Value); + _SendPacket(pPayloadStart, pPayload, EventID); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordU32x2() +* +* Function description +* Formats and sends a SystemView packet containing 2 U32 parameter payload. +* +* Parameters +* EventID - SystemView event ID. +* Para0 - The 32-bit parameter encoded to SystemView packet payload. +* Para1 - The 32-bit parameter encoded to SystemView packet payload. +*/ +void SEGGER_SYSVIEW_RecordU32x2(unsigned int EventID, U32 Para0, U32 Para1) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, Para0); + ENCODE_U32(pPayload, Para1); + _SendPacket(pPayloadStart, pPayload, EventID); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordU32x3() +* +* Function description +* Formats and sends a SystemView packet containing 3 U32 parameter payload. +* +* Parameters +* EventID - SystemView event ID. +* Para0 - The 32-bit parameter encoded to SystemView packet payload. +* Para1 - The 32-bit parameter encoded to SystemView packet payload. +* Para2 - The 32-bit parameter encoded to SystemView packet payload. +*/ +void SEGGER_SYSVIEW_RecordU32x3(unsigned int EventID, U32 Para0, U32 Para1, U32 Para2) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 3 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, Para0); + ENCODE_U32(pPayload, Para1); + ENCODE_U32(pPayload, Para2); + _SendPacket(pPayloadStart, pPayload, EventID); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordU32x4() +* +* Function description +* Formats and sends a SystemView packet containing 4 U32 parameter payload. +* +* Parameters +* EventID - SystemView event ID. +* Para0 - The 32-bit parameter encoded to SystemView packet payload. +* Para1 - The 32-bit parameter encoded to SystemView packet payload. +* Para2 - The 32-bit parameter encoded to SystemView packet payload. +* Para3 - The 32-bit parameter encoded to SystemView packet payload. +*/ +void SEGGER_SYSVIEW_RecordU32x4(unsigned int EventID, U32 Para0, U32 Para1, U32 Para2, U32 Para3) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 4 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, Para0); + ENCODE_U32(pPayload, Para1); + ENCODE_U32(pPayload, Para2); + ENCODE_U32(pPayload, Para3); + _SendPacket(pPayloadStart, pPayload, EventID); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordU32x5() +* +* Function description +* Formats and sends a SystemView packet containing 5 U32 parameter payload. +* +* Parameters +* EventID - SystemView event ID. +* Para0 - The 32-bit parameter encoded to SystemView packet payload. +* Para1 - The 32-bit parameter encoded to SystemView packet payload. +* Para2 - The 32-bit parameter encoded to SystemView packet payload. +* Para3 - The 32-bit parameter encoded to SystemView packet payload. +* Para4 - The 32-bit parameter encoded to SystemView packet payload. +*/ +void SEGGER_SYSVIEW_RecordU32x5(unsigned int EventID, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 5 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, Para0); + ENCODE_U32(pPayload, Para1); + ENCODE_U32(pPayload, Para2); + ENCODE_U32(pPayload, Para3); + ENCODE_U32(pPayload, Para4); + _SendPacket(pPayloadStart, pPayload, EventID); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordU32x6() +* +* Function description +* Formats and sends a SystemView packet containing 6 U32 parameter payload. +* +* Parameters +* EventID - SystemView event ID. +* Para0 - The 32-bit parameter encoded to SystemView packet payload. +* Para1 - The 32-bit parameter encoded to SystemView packet payload. +* Para2 - The 32-bit parameter encoded to SystemView packet payload. +* Para3 - The 32-bit parameter encoded to SystemView packet payload. +* Para4 - The 32-bit parameter encoded to SystemView packet payload. +* Para5 - The 32-bit parameter encoded to SystemView packet payload. +*/ +void SEGGER_SYSVIEW_RecordU32x6(unsigned int EventID, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 6 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, Para0); + ENCODE_U32(pPayload, Para1); + ENCODE_U32(pPayload, Para2); + ENCODE_U32(pPayload, Para3); + ENCODE_U32(pPayload, Para4); + ENCODE_U32(pPayload, Para5); + _SendPacket(pPayloadStart, pPayload, EventID); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordU32x7() +* +* Function description +* Formats and sends a SystemView packet containing 7 U32 parameter payload. +* +* Parameters +* EventID - SystemView event ID. +* Para0 - The 32-bit parameter encoded to SystemView packet payload. +* Para1 - The 32-bit parameter encoded to SystemView packet payload. +* Para2 - The 32-bit parameter encoded to SystemView packet payload. +* Para3 - The 32-bit parameter encoded to SystemView packet payload. +* Para4 - The 32-bit parameter encoded to SystemView packet payload. +* Para5 - The 32-bit parameter encoded to SystemView packet payload. +* Para6 - The 32-bit parameter encoded to SystemView packet payload. +*/ +void SEGGER_SYSVIEW_RecordU32x7(unsigned int EventID, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 7 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, Para0); + ENCODE_U32(pPayload, Para1); + ENCODE_U32(pPayload, Para2); + ENCODE_U32(pPayload, Para3); + ENCODE_U32(pPayload, Para4); + ENCODE_U32(pPayload, Para5); + ENCODE_U32(pPayload, Para6); + _SendPacket(pPayloadStart, pPayload, EventID); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordU32x8() +* +* Function description +* Formats and sends a SystemView packet containing 8 U32 parameter payload. +* +* Parameters +* EventID - SystemView event ID. +* Para0 - The 32-bit parameter encoded to SystemView packet payload. +* Para1 - The 32-bit parameter encoded to SystemView packet payload. +* Para2 - The 32-bit parameter encoded to SystemView packet payload. +* Para3 - The 32-bit parameter encoded to SystemView packet payload. +* Para4 - The 32-bit parameter encoded to SystemView packet payload. +* Para5 - The 32-bit parameter encoded to SystemView packet payload. +* Para6 - The 32-bit parameter encoded to SystemView packet payload. +* Para7 - The 32-bit parameter encoded to SystemView packet payload. +*/ +void SEGGER_SYSVIEW_RecordU32x8(unsigned int EventID, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6, U32 Para7) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 8 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, Para0); + ENCODE_U32(pPayload, Para1); + ENCODE_U32(pPayload, Para2); + ENCODE_U32(pPayload, Para3); + ENCODE_U32(pPayload, Para4); + ENCODE_U32(pPayload, Para5); + ENCODE_U32(pPayload, Para6); + ENCODE_U32(pPayload, Para7); + _SendPacket(pPayloadStart, pPayload, EventID); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordU32x9() +* +* Function description +* Formats and sends a SystemView packet containing 9 U32 parameter payload. +* +* Parameters +* EventID - SystemView event ID. +* Para0 - The 32-bit parameter encoded to SystemView packet payload. +* Para1 - The 32-bit parameter encoded to SystemView packet payload. +* Para2 - The 32-bit parameter encoded to SystemView packet payload. +* Para3 - The 32-bit parameter encoded to SystemView packet payload. +* Para4 - The 32-bit parameter encoded to SystemView packet payload. +* Para5 - The 32-bit parameter encoded to SystemView packet payload. +* Para6 - The 32-bit parameter encoded to SystemView packet payload. +* Para7 - The 32-bit parameter encoded to SystemView packet payload. +* Para8 - The 32-bit parameter encoded to SystemView packet payload. +*/ +void SEGGER_SYSVIEW_RecordU32x9(unsigned int EventID, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6, U32 Para7, U32 Para8) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 9 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, Para0); + ENCODE_U32(pPayload, Para1); + ENCODE_U32(pPayload, Para2); + ENCODE_U32(pPayload, Para3); + ENCODE_U32(pPayload, Para4); + ENCODE_U32(pPayload, Para5); + ENCODE_U32(pPayload, Para6); + ENCODE_U32(pPayload, Para7); + ENCODE_U32(pPayload, Para8); + _SendPacket(pPayloadStart, pPayload, EventID); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordU32x10() +* +* Function description +* Formats and sends a SystemView packet containing 10 U32 parameter payload. +* +* Parameters +* EventID - SystemView event ID. +* Para0 - The 32-bit parameter encoded to SystemView packet payload. +* Para1 - The 32-bit parameter encoded to SystemView packet payload. +* Para2 - The 32-bit parameter encoded to SystemView packet payload. +* Para3 - The 32-bit parameter encoded to SystemView packet payload. +* Para4 - The 32-bit parameter encoded to SystemView packet payload. +* Para5 - The 32-bit parameter encoded to SystemView packet payload. +* Para6 - The 32-bit parameter encoded to SystemView packet payload. +* Para7 - The 32-bit parameter encoded to SystemView packet payload. +* Para8 - The 32-bit parameter encoded to SystemView packet payload. +* Para9 - The 32-bit parameter encoded to SystemView packet payload. +*/ +void SEGGER_SYSVIEW_RecordU32x10(unsigned int EventID, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6, U32 Para7, U32 Para8, U32 Para9) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 10 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, Para0); + ENCODE_U32(pPayload, Para1); + ENCODE_U32(pPayload, Para2); + ENCODE_U32(pPayload, Para3); + ENCODE_U32(pPayload, Para4); + ENCODE_U32(pPayload, Para5); + ENCODE_U32(pPayload, Para6); + ENCODE_U32(pPayload, Para7); + ENCODE_U32(pPayload, Para8); + ENCODE_U32(pPayload, Para9); + _SendPacket(pPayloadStart, pPayload, EventID); + RECORD_END(); +} +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordString() +* +* Function description +* Formats and sends a SystemView packet containing a string. +* +* Parameters +* EventID - SystemView event ID. +* pString - The string to be sent in the SystemView packet payload. +* +* Additional information +* The string is encoded as a count byte followed by the contents +* of the string. +* No more than SEGGER_SYSVIEW_MAX_STRING_LEN bytes will be encoded to the payload. +*/ +void SEGGER_SYSVIEW_RecordString(unsigned int EventID, const char* pString) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 1 + SEGGER_SYSVIEW_MAX_STRING_LEN); + // + pPayload = _EncodeStr(pPayloadStart, pString, SEGGER_SYSVIEW_MAX_STRING_LEN); + _SendPacket(pPayloadStart, pPayload, EventID); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_Start() +* +* Function description +* Start recording SystemView events. +* +* This function is triggered by the SystemView Application on connect. +* For single-shot or post-mortem mode recording, it needs to be called +* by the application. +* +* Additional information +* This function enables transmission of SystemView packets recorded +* by subsequent trace calls and records a SystemView Start event. +* +* As part of start, a SystemView Init packet is sent, containing the system +* frequency. The list of current tasks, the current system time and the +* system description string is sent, too. +* +* Notes +* SEGGER_SYSVIEW_Start and SEGGER_SYSVIEW_Stop do not nest. +* When SEGGER_SYSVIEW_CAN_RESTART is 1, each received start command +* records the system information. This is required to enable restart +* of recordings when SystemView unexpectedly disconnects without sending +* a stop command before. +*/ +void SEGGER_SYSVIEW_Start(void) { +#if (SEGGER_SYSVIEW_CAN_RESTART == 0) + if (_SYSVIEW_Globals.EnableState == 0) { +#endif + _SYSVIEW_Globals.EnableState = 1; +#if (SEGGER_SYSVIEW_POST_MORTEM_MODE == 1) + _SendSyncInfo(); +#else + SEGGER_SYSVIEW_LOCK(); + SEGGER_RTT_WriteSkipNoLock(CHANNEL_ID_UP, _abSync, 10); + SEGGER_SYSVIEW_UNLOCK(); + SEGGER_SYSVIEW_ON_EVENT_RECORDED(10); + SEGGER_SYSVIEW_RecordVoid(SYSVIEW_EVTID_TRACE_START); + { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 4 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, _SYSVIEW_Globals.SysFreq); + ENCODE_U32(pPayload, _SYSVIEW_Globals.CPUFreq); + ENCODE_U32(pPayload, _SYSVIEW_Globals.RAMBaseAddress); + ENCODE_U32(pPayload, SEGGER_SYSVIEW_ID_SHIFT); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_INIT); + RECORD_END(); + } + if (_SYSVIEW_Globals.pfSendSysDesc) { + _SYSVIEW_Globals.pfSendSysDesc(); + } + SEGGER_SYSVIEW_RecordSystime(); + SEGGER_SYSVIEW_SendTaskList(); + SEGGER_SYSVIEW_SendNumModules(); +#endif +#if (SEGGER_SYSVIEW_CAN_RESTART == 0) + } +#endif +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_Stop() +* +* Function description +* Stop recording SystemView events. +* +* This function is triggered by the SystemView Application on disconnect. +* For single-shot or post-mortem mode recording, it can be called +* by the application. +* +* Additional information +* This function disables transmission of SystemView packets recorded +* by subsequent trace calls. If transmission is enabled when +* this function is called, a single SystemView Stop event is recorded +* to the trace, send, and then trace transmission is halted. +*/ +void SEGGER_SYSVIEW_Stop(void) { + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE); + // + if (_SYSVIEW_Globals.EnableState) { + _SendPacket(pPayloadStart, pPayloadStart, SYSVIEW_EVTID_TRACE_STOP); + _SYSVIEW_Globals.EnableState = 0; + } + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_GetChannelID() +* +* Function description +* Returns the RTT / channel ID used by SystemView. +*/ +int SEGGER_SYSVIEW_GetChannelID(void) { + return CHANNEL_ID_UP; +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_GetSysDesc() +* +* Function description +* Triggers a send of the system information and description. +* +*/ +void SEGGER_SYSVIEW_GetSysDesc(void) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 4 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, _SYSVIEW_Globals.SysFreq); + ENCODE_U32(pPayload, _SYSVIEW_Globals.CPUFreq); + ENCODE_U32(pPayload, _SYSVIEW_Globals.RAMBaseAddress); + ENCODE_U32(pPayload, SEGGER_SYSVIEW_ID_SHIFT); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_INIT); + RECORD_END(); + if (_SYSVIEW_Globals.pfSendSysDesc) { + _SYSVIEW_Globals.pfSendSysDesc(); + } +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_SendTaskInfo() +* +* Function description +* Send a Task Info Packet, containing TaskId for identification, +* task priority and task name. +* +* Parameters +* pInfo - Pointer to task information to send. +*/ +void SEGGER_SYSVIEW_SendTaskInfo(const SEGGER_SYSVIEW_TASKINFO *pInfo) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32 + 1 + 32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, SHRINK_ID(pInfo->TaskID)); + ENCODE_U32(pPayload, pInfo->Prio); + pPayload = _EncodeStr(pPayload, pInfo->sName, 32); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_TASK_INFO); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, SHRINK_ID(pInfo->TaskID)); + ENCODE_U32(pPayload, pInfo->StackBase); + ENCODE_U32(pPayload, pInfo->StackSize); + ENCODE_U32(pPayload, 0); // Stack End, future use + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_STACK_INFO); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_SendTaskList() +* +* Function description +* Send all tasks descriptors to the host. +*/ +void SEGGER_SYSVIEW_SendTaskList(void) { + if (_SYSVIEW_Globals.pOSAPI && _SYSVIEW_Globals.pOSAPI->pfSendTaskList) { + _SYSVIEW_Globals.pOSAPI->pfSendTaskList(); + } +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_SendSysDesc() +* +* Function description +* Send the system description string to the host. +* The system description is used by the Systemview Application +* to identify the current application and handle events accordingly. +* +* The system description is usually called by the system description +* callback, to ensure it is only sent when the SystemView Application +* is connected. +* +* Parameters +* sSysDesc - Pointer to the 0-terminated system description string. +* +* Additional information +* One system description string may not exceed SEGGER_SYSVIEW_MAX_STRING_LEN characters. +* Multiple description strings can be recorded. +* +* The Following items can be described in a system description string. +* Each item is identified by its identifier, followed by '=' and the value. +* Items are separated by ','. +*/ +void SEGGER_SYSVIEW_SendSysDesc(const char *sSysDesc) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 1 + SEGGER_SYSVIEW_MAX_STRING_LEN); + // + pPayload = _EncodeStr(pPayloadStart, sSysDesc, SEGGER_SYSVIEW_MAX_STRING_LEN); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_SYSDESC); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordSystime() +* +* Function description +* Formats and sends a SystemView Systime containing a single U64 or U32 +* parameter payload. +*/ +void SEGGER_SYSVIEW_RecordSystime(void) { + U64 Systime; + + if (_SYSVIEW_Globals.pOSAPI && _SYSVIEW_Globals.pOSAPI->pfGetTime) { + Systime = _SYSVIEW_Globals.pOSAPI->pfGetTime(); + SEGGER_SYSVIEW_RecordU32x2(SYSVIEW_EVTID_SYSTIME_US, + (U32)(Systime), + (U32)(Systime >> 32)); + } else { + SEGGER_SYSVIEW_RecordU32(SYSVIEW_EVTID_SYSTIME_CYCLES, SEGGER_SYSVIEW_GET_TIMESTAMP()); + } +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordEnterISR() +* +* Function description +* Format and send an ISR entry event. +* +* Additional information +* Example packets sent +* 02 0F 50 // ISR(15) Enter. Timestamp is 80 (0x50) +*/ +void SEGGER_SYSVIEW_RecordEnterISR(void) { + unsigned v; + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + v = SEGGER_SYSVIEW_GET_INTERRUPT_ID(); + ENCODE_U32(pPayload, v); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_ISR_ENTER); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordExitISR() +* +* Function description +* Format and send an ISR exit event. +* +* Additional information +* Format as follows: +* 03 // Max. packet len is 6 +* +* Example packets sent +* 03 20 // ISR Exit. Timestamp is 32 (0x20) +*/ +void SEGGER_SYSVIEW_RecordExitISR(void) { + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE); + // + _SendPacket(pPayloadStart, pPayloadStart, SYSVIEW_EVTID_ISR_EXIT); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordExitISRToScheduler() +* +* Function description +* Format and send an ISR exit into scheduler event. +* +* Additional information +* Format as follows: +* 18 // Max. packet len is 6 +* +* Example packets sent +* 18 20 // ISR Exit to Scheduler. Timestamp is 32 (0x20) +*/ +void SEGGER_SYSVIEW_RecordExitISRToScheduler(void) { + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE); + // + _SendPacket(pPayloadStart, pPayloadStart, SYSVIEW_EVTID_ISR_TO_SCHEDULER); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordEnterTimer() +* +* Function description +* Format and send a Timer entry event. +* +* Parameters +* TimerId - Id of the timer which starts. +*/ +void SEGGER_SYSVIEW_RecordEnterTimer(U32 TimerId) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, SHRINK_ID(TimerId)); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_TIMER_ENTER); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordExitTimer() +* +* Function description +* Format and send a Timer exit event. +*/ +void SEGGER_SYSVIEW_RecordExitTimer(void) { + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE); + // + _SendPacket(pPayloadStart, pPayloadStart, SYSVIEW_EVTID_TIMER_EXIT); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordEndCall() +* +* Function description +* Format and send an End API Call event without return value. +* +* Parameters +* EventID - Id of API function which ends. +*/ +void SEGGER_SYSVIEW_RecordEndCall(unsigned int EventID) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, EventID); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_END_CALL); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordEndCallU32() +* +* Function description +* Format and send an End API Call event with return value. +* +* Parameters +* EventID - Id of API function which ends. +* Para0 - Return value which will be returned by the API function. +*/ +void SEGGER_SYSVIEW_RecordEndCallU32(unsigned int EventID, U32 Para0) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, EventID); + ENCODE_U32(pPayload, Para0); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_END_CALL); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_OnIdle() +* +* Function description +* Record an Idle event. +*/ +void SEGGER_SYSVIEW_OnIdle(void) { + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE); + // + _SendPacket(pPayloadStart, pPayloadStart, SYSVIEW_EVTID_IDLE); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_OnTaskCreate() +* +* Function description +* Record a Task Create event. The Task Create event corresponds +* to creating a task in the OS. +* +* Parameters +* TaskId - Task ID of created task. +*/ +void SEGGER_SYSVIEW_OnTaskCreate(U32 TaskId) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + TaskId = SHRINK_ID(TaskId); + ENCODE_U32(pPayload, TaskId); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_TASK_CREATE); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_OnTaskTerminate() +* +* Function description +* Record a Task termination event. +* The Task termination event corresponds to terminating a task in +* the OS. If the TaskId is the currently active task, +* SEGGER_SYSVIEW_OnTaskStopExec may be used, either. +* +* Parameters +* TaskId - Task ID of terminated task. +*/ +void SEGGER_SYSVIEW_OnTaskTerminate(U32 TaskId) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + TaskId = SHRINK_ID(TaskId); + ENCODE_U32(pPayload, TaskId); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_TASK_TERMINATE); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_OnTaskStartExec() +* +* Function description +* Record a Task Start Execution event. The Task Start event +* corresponds to when a task has started to execute rather than +* when it is ready to execute. +* +* Parameters +* TaskId - Task ID of task that started to execute. +*/ +void SEGGER_SYSVIEW_OnTaskStartExec(U32 TaskId) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + TaskId = SHRINK_ID(TaskId); + ENCODE_U32(pPayload, TaskId); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_TASK_START_EXEC); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_OnTaskStopExec() +* +* Function description +* Record a Task Stop Execution event. The Task Stop event +* corresponds to when a task stops executing and terminates. +*/ +void SEGGER_SYSVIEW_OnTaskStopExec(void) { + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE); + // + _SendPacket(pPayloadStart, pPayloadStart, SYSVIEW_EVTID_TASK_STOP_EXEC); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_OnTaskStartReady() +* +* Function description +* Record a Task Start Ready event. +* +* Parameters +* TaskId - Task ID of task that started to execute. +*/ +void SEGGER_SYSVIEW_OnTaskStartReady(U32 TaskId) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + TaskId = SHRINK_ID(TaskId); + ENCODE_U32(pPayload, TaskId); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_TASK_START_READY); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_OnTaskStopReady() +* +* Function description +* Record a Task Stop Ready event. +* +* Parameters +* TaskId - Task ID of task that completed execution. +* Cause - Reason for task to stop (i.e. Idle/Sleep) +*/ +void SEGGER_SYSVIEW_OnTaskStopReady(U32 TaskId, unsigned int Cause) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + TaskId = SHRINK_ID(TaskId); + ENCODE_U32(pPayload, TaskId); + ENCODE_U32(pPayload, Cause); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_TASK_STOP_READY); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_MarkStart() +* +* Function description +* Record a Performance Marker Start event to start measuring runtime. +* +* Parameters +* MarkerId - User defined ID for the marker. +*/ +void SEGGER_SYSVIEW_MarkStart(unsigned MarkerId) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, MarkerId); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_MARK_START); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_MarkStop() +* +* Function description +* Record a Performance Marker Stop event to stop measuring runtime. +* +* Parameters +* MarkerId - User defined ID for the marker. +*/ +void SEGGER_SYSVIEW_MarkStop(unsigned MarkerId) { + U8 * pPayload; + U8 * pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, MarkerId); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_MARK_STOP); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_Mark() +* +* Function description +* Record a Performance Marker intermediate event. +* +* Parameters +* MarkerId - User defined ID for the marker. +*/ +void SEGGER_SYSVIEW_Mark(unsigned int MarkerId) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, SYSVIEW_EVTID_EX_MARK); + ENCODE_U32(pPayload, MarkerId); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_EX); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_NameMarker() +* +* Function description +* Send the name of a Performance Marker to be displayed in SystemView. +* +* Marker names are usually set in the system description +* callback, to ensure it is only sent when the SystemView Application +* is connected. +* +* Parameters +* MarkerId - User defined ID for the marker. +* sName - Pointer to the marker name. (Max. SEGGER_SYSVIEW_MAX_STRING_LEN Bytes) +*/ +void SEGGER_SYSVIEW_NameMarker(unsigned int MarkerId, const char* sName) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2 * SEGGER_SYSVIEW_QUANTA_U32 + 1 + SEGGER_SYSVIEW_MAX_STRING_LEN); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, SYSVIEW_EVTID_EX_NAME_MARKER); + ENCODE_U32(pPayload, MarkerId); + pPayload = _EncodeStr(pPayload, sName, SEGGER_SYSVIEW_MAX_STRING_LEN); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_EX); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_NameResource() +* +* Function description +* Send the name of a resource to be displayed in SystemView. +* +* Marker names are usually set in the system description +* callback, to ensure it is only sent when the SystemView Application +* is connected. +* +* Parameters +* ResourceId - Id of the resource to be named. i.e. its address. +* sName - Pointer to the resource name. (Max. SEGGER_SYSVIEW_MAX_STRING_LEN Bytes) +*/ +void SEGGER_SYSVIEW_NameResource(U32 ResourceId, const char* sName) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32 + 1 + SEGGER_SYSVIEW_MAX_STRING_LEN); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, SHRINK_ID(ResourceId)); + pPayload = _EncodeStr(pPayload, sName, SEGGER_SYSVIEW_MAX_STRING_LEN); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_NAME_RESOURCE); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_SendPacket() +* +* Function description +* Send an event packet. +* +* Parameters +* pPacket - Pointer to the start of the packet. +* pPayloadEnd - Pointer to the end of the payload. +* Make sure there are at least 5 bytes free after the payload. +* EventId - Id of the event packet. +* +* Return value +* !=0: Success, Message sent. +* ==0: Buffer full, Message *NOT* sent. +*/ +int SEGGER_SYSVIEW_SendPacket(U8* pPacket, U8* pPayloadEnd, unsigned int EventId) { +#if (SEGGER_SYSVIEW_USE_STATIC_BUFFER == 1) + SEGGER_SYSVIEW_LOCK(); +#endif + _SendPacket(pPacket + 4, pPayloadEnd, EventId); +#if (SEGGER_SYSVIEW_USE_STATIC_BUFFER == 1) + SEGGER_SYSVIEW_UNLOCK(); +#endif + return 0; +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_EncodeU32() +* +* Function description +* Encode a U32 in variable-length format. +* +* Parameters +* pPayload - Pointer to where U32 will be encoded. +* Value - The 32-bit value to be encoded. +* +* Return value +* Pointer to the byte following the value, i.e. the first free +* byte in the payload and the next position to store payload +* content. +*/ +U8* SEGGER_SYSVIEW_EncodeU32(U8* pPayload, U32 Value) { + ENCODE_U32(pPayload, Value); + return pPayload; +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_EncodeString() +* +* Function description +* Encode a string in variable-length format. +* +* Parameters +* pPayload - Pointer to where string will be encoded. +* s - String to encode. +* MaxLen - Maximum number of characters to encode from string. +* +* Return value +* Pointer to the byte following the value, i.e. the first free +* byte in the payload and the next position to store payload +* content. +* +* Additional information +* The string is encoded as a count byte followed by the contents +* of the string. +* No more than 1 + MaxLen bytes will be encoded to the payload. +*/ +U8* SEGGER_SYSVIEW_EncodeString(U8* pPayload, const char* s, unsigned int MaxLen) { + return _EncodeStr(pPayload, s, MaxLen); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_EncodeData() +* +* Function description +* Encode a byte buffer in variable-length format. +* +* Parameters +* pPayload - Pointer to where string will be encoded. +* pSrc - Pointer to data buffer to be encoded. +* NumBytes - Number of bytes in the buffer to be encoded. +* +* Return value +* Pointer to the byte following the value, i.e. the first free +* byte in the payload and the next position to store payload +* content. +* +* Additional information +* The data is encoded as a count byte followed by the contents +* of the data buffer. +* Make sure NumBytes + 1 bytes are free for the payload. +*/ +U8* SEGGER_SYSVIEW_EncodeData(U8 *pPayload, const char* pSrc, unsigned int NumBytes) { + return _EncodeData(pPayload, pSrc, NumBytes); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_EncodeId() +* +* Function description +* Encode a 32-bit Id in shrunken variable-length format. +* +* Parameters +* pPayload - Pointer to where the Id will be encoded. +* Id - The 32-bit value to be encoded. +* +* Return value +* Pointer to the byte following the value, i.e. the first free +* byte in the payload and the next position to store payload +* content. +* +* Additional information +* The parameters to shrink an Id can be configured in +* SEGGER_SYSVIEW_Conf.h and via SEGGER_SYSVIEW_SetRAMBase(). +* SEGGER_SYSVIEW_ID_BASE: Lowest Id reported by the application. +* (i.e. 0x20000000 when all Ids are an address in this RAM) +* SEGGER_SYSVIEW_ID_SHIFT: Number of bits to shift the Id to +* save bandwidth. (i.e. 2 when Ids are 4 byte aligned) +*/ +U8* SEGGER_SYSVIEW_EncodeId(U8* pPayload, U32 Id) { + Id = SHRINK_ID(Id); + ENCODE_U32(pPayload, Id); + return pPayload; +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_ShrinkId() +* +* Function description +* Get the shrunken value of an Id for further processing like in +* SEGGER_SYSVIEW_NameResource(). +* +* Parameters +* Id - The 32-bit value to be shrunken. +* +* Return value +* Shrunken Id. +* +* Additional information +* The parameters to shrink an Id can be configured in +* SEGGER_SYSVIEW_Conf.h and via SEGGER_SYSVIEW_SetRAMBase(). +* SEGGER_SYSVIEW_ID_BASE: Lowest Id reported by the application. +* (i.e. 0x20000000 when all Ids are an address in this RAM) +* SEGGER_SYSVIEW_ID_SHIFT: Number of bits to shift the Id to +* save bandwidth. (i.e. 2 when Ids are 4 byte aligned) +*/ +U32 SEGGER_SYSVIEW_ShrinkId(U32 Id) { + return SHRINK_ID(Id); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RegisterModule() +* +* Function description +* Register a middleware module for recording its events. +* +* Parameters +* pModule - The middleware module information. +* +* Additional information +* SEGGER_SYSVIEW_MODULE elements: +* sDescription - Pointer to a string containing the module name and optionally the module event description. +* NumEvents - Number of events the module wants to register. +* EventOffset - Offset to be added to the event Ids. Out parameter, set by this function. Do not modify after calling this function. +* pfSendModuleDesc - Callback function pointer to send more detailed module description to SystemView Application. +* pNext - Pointer to next registered module. Out parameter, set by this function. Do not modify after calling this function. +*/ +void SEGGER_SYSVIEW_RegisterModule(SEGGER_SYSVIEW_MODULE* pModule) { + SEGGER_SYSVIEW_LOCK(); + if (_pFirstModule == 0) { + // + // No module registered, yet. + // Start list with new module. + // EventOffset is the base offset for modules + // + pModule->EventOffset = MODULE_EVENT_OFFSET; + pModule->pNext = 0; + _pFirstModule = pModule; + _NumModules = 1; + } else { + // + // Registreded module(s) present. + // Prepend new module in list. + // EventOffset set from number of events and offset of previous module. + // + pModule->EventOffset = _pFirstModule->EventOffset + _pFirstModule->NumEvents; + pModule->pNext = _pFirstModule; + _pFirstModule = pModule; + _NumModules++; + } + SEGGER_SYSVIEW_SendModule(0); + if (pModule->pfSendModuleDesc) { + pModule->pfSendModuleDesc(); + } + SEGGER_SYSVIEW_UNLOCK(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordModuleDescription() +* +* Function description +* Sends detailed information of a registered module to the host. +* +* Parameters +* pModule - Pointer to the described module. +* sDescription - Pointer to a description string. +*/ +void SEGGER_SYSVIEW_RecordModuleDescription(const SEGGER_SYSVIEW_MODULE* pModule, const char* sDescription) { + U8 ModuleId; + SEGGER_SYSVIEW_MODULE* p; + + p = _pFirstModule; + ModuleId = 0; + do { + if (p == pModule) { + break; + } + ModuleId++; + p = p->pNext; + } while (p); + { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2 * SEGGER_SYSVIEW_QUANTA_U32 + 1 + SEGGER_SYSVIEW_MAX_STRING_LEN); + // + pPayload = pPayloadStart; + // + // Send module description + // Send event offset and number of events + // + ENCODE_U32(pPayload, ModuleId); + ENCODE_U32(pPayload, (pModule->EventOffset)); + pPayload = _EncodeStr(pPayload, sDescription, SEGGER_SYSVIEW_MAX_STRING_LEN); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_MODULEDESC); + RECORD_END(); + } +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_SendModule() +* +* Function description +* Sends the information of a registered module to the host. +* +* Parameters +* ModuleId - Id of the requested module. +*/ +void SEGGER_SYSVIEW_SendModule(U8 ModuleId) { + SEGGER_SYSVIEW_MODULE* pModule; + U32 n; + + if (_pFirstModule != 0) { + pModule = _pFirstModule; + for (n = 0; n < ModuleId; n++) { + pModule = pModule->pNext; + if (pModule == 0) { + break; + } + } + if (pModule != 0) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2 * SEGGER_SYSVIEW_QUANTA_U32 + 1 + SEGGER_SYSVIEW_MAX_STRING_LEN); + // + pPayload = pPayloadStart; + // + // Send module description + // Send event offset and number of events + // + ENCODE_U32(pPayload, ModuleId); + ENCODE_U32(pPayload, (pModule->EventOffset)); + pPayload = _EncodeStr(pPayload, pModule->sModule, SEGGER_SYSVIEW_MAX_STRING_LEN); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_MODULEDESC); + RECORD_END(); + } + } +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_SendModuleDescription() +* +* Function description +* Triggers a send of the registered module descriptions. +* +*/ +void SEGGER_SYSVIEW_SendModuleDescription(void) { + SEGGER_SYSVIEW_MODULE* pModule; + + if (_pFirstModule != 0) { + pModule = _pFirstModule; + do { + if (pModule->pfSendModuleDesc) { + pModule->pfSendModuleDesc(); + } + pModule = pModule->pNext; + } while (pModule); + } +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_SendNumModules() +* +* Function description +* Send the number of registered modules to the host. +*/ +void SEGGER_SYSVIEW_SendNumModules(void) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2*SEGGER_SYSVIEW_QUANTA_U32); + pPayload = pPayloadStart; + ENCODE_U32(pPayload, _NumModules); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_NUMMODULES); + RECORD_END(); +} + +#ifndef SEGGER_SYSVIEW_EXCLUDE_PRINTF // Define in project to avoid warnings about variable parameter list + +/********************************************************************* +* +* SEGGER_SYSVIEW_PrintfHostEx() +* +* Function description +* Print a string which is formatted on the host by the SystemView Application +* with Additional information. +* +* Parameters +* s - String to be formatted. +* Options - Options for the string. i.e. Log level. +* +* Additional information +* All format arguments are treated as 32-bit scalar values. +*/ +void SEGGER_SYSVIEW_PrintfHostEx(const char* s, U32 Options, ...) { + va_list ParamList; +#if SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT + int r; + + va_start(ParamList, Options); + r = _VPrintHost(s, Options, &ParamList); + va_end(ParamList); + + if (r == -1) { + va_start(ParamList, Options); + _VPrintTarget(s, Options, &ParamList); + va_end(ParamList); + } +#else + va_start(ParamList, Options); + _VPrintHost(s, Options, &ParamList); + va_end(ParamList); +#endif +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_PrintfHost() +* +* Function description +* Print a string which is formatted on the host by the SystemView Application. +* +* Parameters +* s - String to be formatted. +* +* Additional information +* All format arguments are treated as 32-bit scalar values. +*/ +void SEGGER_SYSVIEW_PrintfHost(const char* s, ...) { + va_list ParamList; +#if SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT + int r; + + va_start(ParamList, s); + r = _VPrintHost(s, SEGGER_SYSVIEW_LOG, &ParamList); + va_end(ParamList); + + if (r == -1) { + va_start(ParamList, s); + _VPrintTarget(s, SEGGER_SYSVIEW_LOG, &ParamList); + va_end(ParamList); + } +#else + va_start(ParamList, s); + _VPrintHost(s, SEGGER_SYSVIEW_LOG, &ParamList); + va_end(ParamList); +#endif +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_WarnfHost() +* +* Function description +* Print a warnin string which is formatted on the host by +* the SystemView Application. +* +* Parameters +* s - String to be formatted. +* +* Additional information +* All format arguments are treated as 32-bit scalar values. +*/ +void SEGGER_SYSVIEW_WarnfHost(const char* s, ...) { + va_list ParamList; +#if SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT + int r; + + va_start(ParamList, s); + r = _VPrintHost(s, SEGGER_SYSVIEW_WARNING, &ParamList); + va_end(ParamList); + + if (r == -1) { + va_start(ParamList, s); + _VPrintTarget(s, SEGGER_SYSVIEW_WARNING, &ParamList); + va_end(ParamList); + } +#else + va_start(ParamList, s); + _VPrintHost(s, SEGGER_SYSVIEW_WARNING, &ParamList); + va_end(ParamList); +#endif +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_ErrorfHost() +* +* Function description +* Print an error string which is formatted on the host by +* the SystemView Application. +* +* Parameters +* s - String to be formatted. +* +* Additional information +* All format arguments are treated as 32-bit scalar values. +*/ +void SEGGER_SYSVIEW_ErrorfHost(const char* s, ...) { + va_list ParamList; +#if SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT + int r; + + va_start(ParamList, s); + r = _VPrintHost(s, SEGGER_SYSVIEW_ERROR, &ParamList); + va_end(ParamList); + + if (r == -1) { + va_start(ParamList, s); + _VPrintTarget(s, SEGGER_SYSVIEW_ERROR, &ParamList); + va_end(ParamList); + } +#else + va_start(ParamList, s); + _VPrintHost(s, SEGGER_SYSVIEW_ERROR, &ParamList); + va_end(ParamList); +#endif +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_PrintfTargetEx() +* +* Function description +* Print a string which is formatted on the target before sent to +* the host with Additional information. +* +* Parameters +* s - String to be formatted. +* Options - Options for the string. i.e. Log level. +*/ +void SEGGER_SYSVIEW_PrintfTargetEx(const char* s, U32 Options, ...) { + va_list ParamList; + + va_start(ParamList, Options); + _VPrintTarget(s, Options, &ParamList); + va_end(ParamList); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_PrintfTarget() +* +* Function description +* Print a string which is formatted on the target before sent to +* the host. +* +* Parameters +* s - String to be formatted. +*/ +void SEGGER_SYSVIEW_PrintfTarget(const char* s, ...) { + va_list ParamList; + + va_start(ParamList, s); + _VPrintTarget(s, SEGGER_SYSVIEW_LOG, &ParamList); + va_end(ParamList); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_WarnfTarget() +* +* Function description +* Print a warning string which is formatted on the target before +* sent to the host. +* +* Parameters +* s - String to be formatted. +*/ +void SEGGER_SYSVIEW_WarnfTarget(const char* s, ...) { + va_list ParamList; + + va_start(ParamList, s); + _VPrintTarget(s, SEGGER_SYSVIEW_WARNING, &ParamList); + va_end(ParamList); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_ErrorfTarget() +* +* Function description +* Print an error string which is formatted on the target before +* sent to the host. +* +* Parameters +* s - String to be formatted. +*/ +void SEGGER_SYSVIEW_ErrorfTarget(const char* s, ...) { + va_list ParamList; + + va_start(ParamList, s); + _VPrintTarget(s, SEGGER_SYSVIEW_ERROR, &ParamList); + va_end(ParamList); +} +#endif // SEGGER_SYSVIEW_EXCLUDE_PRINTF + +/********************************************************************* +* +* SEGGER_SYSVIEW_Print() +* +* Function description +* Print a string to the host. +* +* Parameters +* s - String to sent. +*/ +void SEGGER_SYSVIEW_Print(const char* s) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2 * SEGGER_SYSVIEW_QUANTA_U32 + SEGGER_SYSVIEW_MAX_STRING_LEN); + // + pPayload = _EncodeStr(pPayloadStart, s, SEGGER_SYSVIEW_MAX_STRING_LEN); + ENCODE_U32(pPayload, SEGGER_SYSVIEW_LOG); + ENCODE_U32(pPayload, 0); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_PRINT_FORMATTED); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_Warn() +* +* Function description +* Print a warning string to the host. +* +* Parameters +* s - String to sent. +*/ +void SEGGER_SYSVIEW_Warn(const char* s) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2 * SEGGER_SYSVIEW_QUANTA_U32 + SEGGER_SYSVIEW_MAX_STRING_LEN); + // + pPayload = _EncodeStr(pPayloadStart, s, SEGGER_SYSVIEW_MAX_STRING_LEN); + ENCODE_U32(pPayload, SEGGER_SYSVIEW_WARNING); + ENCODE_U32(pPayload, 0); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_PRINT_FORMATTED); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_Error() +* +* Function description +* Print an error string to the host. +* +* Parameters +* s - String to sent. +*/ +void SEGGER_SYSVIEW_Error(const char* s) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2 * SEGGER_SYSVIEW_QUANTA_U32 + SEGGER_SYSVIEW_MAX_STRING_LEN); + // + pPayload = _EncodeStr(pPayloadStart, s, SEGGER_SYSVIEW_MAX_STRING_LEN); + ENCODE_U32(pPayload, SEGGER_SYSVIEW_ERROR); + ENCODE_U32(pPayload, 0); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_PRINT_FORMATTED); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_EnableEvents() +* +* Function description +* Enable standard SystemView events to be generated. +* +* Parameters +* EnableMask - Events to be enabled. +*/ +void SEGGER_SYSVIEW_EnableEvents(U32 EnableMask) { + _SYSVIEW_Globals.DisabledEvents &= ~EnableMask; +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_DisableEvents() +* +* Function description +* Disable standard SystemView events to not be generated. +* +* Parameters +* DisableMask - Events to be disabled. +*/ +void SEGGER_SYSVIEW_DisableEvents(U32 DisableMask) { + _SYSVIEW_Globals.DisabledEvents |= DisableMask; +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_IsStarted() +* +* Function description +* Handle incoming packets if any and check if recording is started. +* +* Return value +* 0: Recording not started. +* > 0: Recording started. +*/ +int SEGGER_SYSVIEW_IsStarted(void) { +#if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + // + // Check if host is sending data which needs to be processed. + // + if (SEGGER_RTT_HASDATA(CHANNEL_ID_DOWN)) { + if (_SYSVIEW_Globals.RecursionCnt == 0) { // Avoid uncontrolled nesting. This way, this routine can call itself once, but no more often than that. + _SYSVIEW_Globals.RecursionCnt = 1; + _HandleIncomingPacket(); + _SYSVIEW_Globals.RecursionCnt = 0; + } + } +#endif + return _SYSVIEW_Globals.EnableState; +} + + +/*************************** End of file ****************************/ diff --git a/SEGGER/SEGGER/SEGGER_SYSVIEW.h b/SEGGER/SEGGER/SEGGER_SYSVIEW.h new file mode 100644 index 0000000..cf61805 --- /dev/null +++ b/SEGGER/SEGGER/SEGGER_SYSVIEW.h @@ -0,0 +1,370 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- +File : SEGGER_SYSVIEW.h +Purpose : System visualization API. +Revision: $Rev: 21292 $ +*/ + +#ifndef SEGGER_SYSVIEW_H +#define SEGGER_SYSVIEW_H + +/********************************************************************* +* +* #include Section +* +********************************************************************** +*/ + +#include "SEGGER.h" +#include "SEGGER_SYSVIEW_ConfDefaults.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ + +#define SEGGER_SYSVIEW_MAJOR 3 +#define SEGGER_SYSVIEW_MINOR 10 +#define SEGGER_SYSVIEW_REV 0 +#define SEGGER_SYSVIEW_VERSION ((SEGGER_SYSVIEW_MAJOR * 10000) + (SEGGER_SYSVIEW_MINOR * 100) + SEGGER_SYSVIEW_REV) + +#define SEGGER_SYSVIEW_INFO_SIZE 9 // Minimum size, which has to be reserved for a packet. 1-2 byte of message type, 0-2 byte of payload length, 1-5 bytes of timestamp. +#define SEGGER_SYSVIEW_QUANTA_U32 5 // Maximum number of bytes to encode a U32, should be reserved for each 32-bit value in a packet. + +#define SEGGER_SYSVIEW_LOG (0u) +#define SEGGER_SYSVIEW_WARNING (1u) +#define SEGGER_SYSVIEW_ERROR (2u) +#define SEGGER_SYSVIEW_FLAG_APPEND (1u << 6) + +#define SEGGER_SYSVIEW_PREPARE_PACKET(p) (p) + 4 +// +// SystemView events. First 32 IDs from 0 .. 31 are reserved for these +// +#define SYSVIEW_EVTID_NOP 0 // Dummy packet. +#define SYSVIEW_EVTID_OVERFLOW 1 +#define SYSVIEW_EVTID_ISR_ENTER 2 +#define SYSVIEW_EVTID_ISR_EXIT 3 +#define SYSVIEW_EVTID_TASK_START_EXEC 4 +#define SYSVIEW_EVTID_TASK_STOP_EXEC 5 +#define SYSVIEW_EVTID_TASK_START_READY 6 +#define SYSVIEW_EVTID_TASK_STOP_READY 7 +#define SYSVIEW_EVTID_TASK_CREATE 8 +#define SYSVIEW_EVTID_TASK_INFO 9 +#define SYSVIEW_EVTID_TRACE_START 10 +#define SYSVIEW_EVTID_TRACE_STOP 11 +#define SYSVIEW_EVTID_SYSTIME_CYCLES 12 +#define SYSVIEW_EVTID_SYSTIME_US 13 +#define SYSVIEW_EVTID_SYSDESC 14 +#define SYSVIEW_EVTID_MARK_START 15 +#define SYSVIEW_EVTID_MARK_STOP 16 +#define SYSVIEW_EVTID_IDLE 17 +#define SYSVIEW_EVTID_ISR_TO_SCHEDULER 18 +#define SYSVIEW_EVTID_TIMER_ENTER 19 +#define SYSVIEW_EVTID_TIMER_EXIT 20 +#define SYSVIEW_EVTID_STACK_INFO 21 +#define SYSVIEW_EVTID_MODULEDESC 22 + +#define SYSVIEW_EVTID_INIT 24 +#define SYSVIEW_EVTID_NAME_RESOURCE 25 +#define SYSVIEW_EVTID_PRINT_FORMATTED 26 +#define SYSVIEW_EVTID_NUMMODULES 27 +#define SYSVIEW_EVTID_END_CALL 28 +#define SYSVIEW_EVTID_TASK_TERMINATE 29 + +#define SYSVIEW_EVTID_EX 31 +// +// SystemView extended events. Sent with ID 31. +// +#define SYSVIEW_EVTID_EX_MARK 0 +#define SYSVIEW_EVTID_EX_NAME_MARKER 1 +// +// Event masks to disable/enable events +// +#define SYSVIEW_EVTMASK_NOP (1 << SYSVIEW_EVTID_NOP) +#define SYSVIEW_EVTMASK_OVERFLOW (1 << SYSVIEW_EVTID_OVERFLOW) +#define SYSVIEW_EVTMASK_ISR_ENTER (1 << SYSVIEW_EVTID_ISR_ENTER) +#define SYSVIEW_EVTMASK_ISR_EXIT (1 << SYSVIEW_EVTID_ISR_EXIT) +#define SYSVIEW_EVTMASK_TASK_START_EXEC (1 << SYSVIEW_EVTID_TASK_START_EXEC) +#define SYSVIEW_EVTMASK_TASK_STOP_EXEC (1 << SYSVIEW_EVTID_TASK_STOP_EXEC) +#define SYSVIEW_EVTMASK_TASK_START_READY (1 << SYSVIEW_EVTID_TASK_START_READY) +#define SYSVIEW_EVTMASK_TASK_STOP_READY (1 << SYSVIEW_EVTID_TASK_STOP_READY) +#define SYSVIEW_EVTMASK_TASK_CREATE (1 << SYSVIEW_EVTID_TASK_CREATE) +#define SYSVIEW_EVTMASK_TASK_INFO (1 << SYSVIEW_EVTID_TASK_INFO) +#define SYSVIEW_EVTMASK_TRACE_START (1 << SYSVIEW_EVTID_TRACE_START) +#define SYSVIEW_EVTMASK_TRACE_STOP (1 << SYSVIEW_EVTID_TRACE_STOP) +#define SYSVIEW_EVTMASK_SYSTIME_CYCLES (1 << SYSVIEW_EVTID_SYSTIME_CYCLES) +#define SYSVIEW_EVTMASK_SYSTIME_US (1 << SYSVIEW_EVTID_SYSTIME_US) +#define SYSVIEW_EVTMASK_SYSDESC (1 << SYSVIEW_EVTID_SYSDESC) +#define SYSVIEW_EVTMASK_USER_START (1 << SYSVIEW_EVTID_USER_START) +#define SYSVIEW_EVTMASK_USER_STOP (1 << SYSVIEW_EVTID_USER_STOP) +#define SYSVIEW_EVTMASK_IDLE (1 << SYSVIEW_EVTID_IDLE) +#define SYSVIEW_EVTMASK_ISR_TO_SCHEDULER (1 << SYSVIEW_EVTID_ISR_TO_SCHEDULER) +#define SYSVIEW_EVTMASK_TIMER_ENTER (1 << SYSVIEW_EVTID_TIMER_ENTER) +#define SYSVIEW_EVTMASK_TIMER_EXIT (1 << SYSVIEW_EVTID_TIMER_EXIT) +#define SYSVIEW_EVTMASK_STACK_INFO (1 << SYSVIEW_EVTID_STACK_INFO) +#define SYSVIEW_EVTMASK_MODULEDESC (1 << SYSVIEW_EVTID_MODULEDESC) + +#define SYSVIEW_EVTMASK_INIT (1 << SYSVIEW_EVTID_INIT) +#define SYSVIEW_EVTMASK_NAME_RESOURCE (1 << SYSVIEW_EVTID_NAME_RESOURCE) +#define SYSVIEW_EVTMASK_PRINT_FORMATTED (1 << SYSVIEW_EVTID_PRINT_FORMATTED) +#define SYSVIEW_EVTMASK_NUMMODULES (1 << SYSVIEW_EVTID_NUMMODULES) +#define SYSVIEW_EVTMASK_END_CALL (1 << SYSVIEW_EVTID_END_CALL) +#define SYSVIEW_EVTMASK_TASK_TERMINATE (1 << SYSVIEW_EVTID_TASK_TERMINATE) + +#define SYSVIEW_EVTMASK_EX (1 << SYSVIEW_EVTID_EX) + +#define SYSVIEW_EVTMASK_ALL_INTERRUPTS ( SYSVIEW_EVTMASK_ISR_ENTER \ + | SYSVIEW_EVTMASK_ISR_EXIT \ + | SYSVIEW_EVTMASK_ISR_TO_SCHEDULER) +#define SYSVIEW_EVTMASK_ALL_TASKS ( SYSVIEW_EVTMASK_TASK_START_EXEC \ + | SYSVIEW_EVTMASK_TASK_STOP_EXEC \ + | SYSVIEW_EVTMASK_TASK_START_READY \ + | SYSVIEW_EVTMASK_TASK_STOP_READY \ + | SYSVIEW_EVTMASK_TASK_CREATE \ + | SYSVIEW_EVTMASK_TASK_INFO \ + | SYSVIEW_EVTMASK_STACK_INFO \ + | SYSVIEW_EVTMASK_TASK_TERMINATE) + +/********************************************************************* +* +* Structures +* +********************************************************************** +*/ + +typedef struct { + U32 TaskID; + const char* sName; + U32 Prio; + U32 StackBase; + U32 StackSize; +} SEGGER_SYSVIEW_TASKINFO; + +typedef struct SEGGER_SYSVIEW_MODULE_STRUCT SEGGER_SYSVIEW_MODULE; + +struct SEGGER_SYSVIEW_MODULE_STRUCT { + const char* sModule; + U32 NumEvents; + U32 EventOffset; + void (*pfSendModuleDesc)(void); + SEGGER_SYSVIEW_MODULE* pNext; +}; + +typedef void (SEGGER_SYSVIEW_SEND_SYS_DESC_FUNC)(void); + + +/********************************************************************* +* +* Global data +* +********************************************************************** +*/ + +#ifdef EXTERN + #undef EXTERN +#endif + +#ifndef SEGGER_SYSVIEW_C // Defined in SEGGER_SYSVIEW.c which includes this header beside other C-files + #define EXTERN extern +#else + #define EXTERN +#endif + +EXTERN unsigned int SEGGER_SYSVIEW_TickCnt; +EXTERN unsigned int SEGGER_SYSVIEW_InterruptId; + +#undef EXTERN + +/********************************************************************* +* +* API functions +* +********************************************************************** +*/ + +typedef struct { + U64 (*pfGetTime) (void); + void (*pfSendTaskList) (void); +} SEGGER_SYSVIEW_OS_API; + +/********************************************************************* +* +* Control and initialization functions +*/ +void SEGGER_SYSVIEW_Init (U32 SysFreq, U32 CPUFreq, const SEGGER_SYSVIEW_OS_API *pOSAPI, SEGGER_SYSVIEW_SEND_SYS_DESC_FUNC pfSendSysDesc); +void SEGGER_SYSVIEW_SetRAMBase (U32 RAMBaseAddress); +void SEGGER_SYSVIEW_Start (void); +void SEGGER_SYSVIEW_Stop (void); +void SEGGER_SYSVIEW_GetSysDesc (void); +void SEGGER_SYSVIEW_SendTaskList (void); +void SEGGER_SYSVIEW_SendTaskInfo (const SEGGER_SYSVIEW_TASKINFO* pInfo); +void SEGGER_SYSVIEW_SendSysDesc (const char* sSysDesc); +int SEGGER_SYSVIEW_IsStarted (void); +int SEGGER_SYSVIEW_GetChannelID (void); + +/********************************************************************* +* +* Event recording functions +*/ +void SEGGER_SYSVIEW_RecordVoid (unsigned int EventId); +void SEGGER_SYSVIEW_RecordU32 (unsigned int EventId, U32 Para0); +void SEGGER_SYSVIEW_RecordU32x2 (unsigned int EventId, U32 Para0, U32 Para1); +void SEGGER_SYSVIEW_RecordU32x3 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2); +void SEGGER_SYSVIEW_RecordU32x4 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3); +void SEGGER_SYSVIEW_RecordU32x5 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4); +void SEGGER_SYSVIEW_RecordU32x6 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5); +void SEGGER_SYSVIEW_RecordU32x7 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6); +void SEGGER_SYSVIEW_RecordU32x8 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6, U32 Para7); +void SEGGER_SYSVIEW_RecordU32x9 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6, U32 Para7, U32 Para8); +void SEGGER_SYSVIEW_RecordU32x10 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6, U32 Para7, U32 Para8, U32 Para9); +void SEGGER_SYSVIEW_RecordString (unsigned int EventId, const char* pString); +void SEGGER_SYSVIEW_RecordSystime (void); +void SEGGER_SYSVIEW_RecordEnterISR (void); +void SEGGER_SYSVIEW_RecordExitISR (void); +void SEGGER_SYSVIEW_RecordExitISRToScheduler (void); +void SEGGER_SYSVIEW_RecordEnterTimer (U32 TimerId); +void SEGGER_SYSVIEW_RecordExitTimer (void); +void SEGGER_SYSVIEW_RecordEndCall (unsigned int EventID); +void SEGGER_SYSVIEW_RecordEndCallU32 (unsigned int EventID, U32 Para0); + +void SEGGER_SYSVIEW_OnIdle (void); +void SEGGER_SYSVIEW_OnTaskCreate (U32 TaskId); +void SEGGER_SYSVIEW_OnTaskTerminate (U32 TaskId); +void SEGGER_SYSVIEW_OnTaskStartExec (U32 TaskId); +void SEGGER_SYSVIEW_OnTaskStopExec (void); +void SEGGER_SYSVIEW_OnTaskStartReady (U32 TaskId); +void SEGGER_SYSVIEW_OnTaskStopReady (U32 TaskId, unsigned int Cause); +void SEGGER_SYSVIEW_MarkStart (unsigned int MarkerId); +void SEGGER_SYSVIEW_MarkStop (unsigned int MarkerId); +void SEGGER_SYSVIEW_Mark (unsigned int MarkerId); +void SEGGER_SYSVIEW_NameMarker (unsigned int MarkerId, const char* sName); + +void SEGGER_SYSVIEW_NameResource (U32 ResourceId, const char* sName); + +int SEGGER_SYSVIEW_SendPacket (U8* pPacket, U8* pPayloadEnd, unsigned int EventId); + +/********************************************************************* +* +* Event parameter encoding functions +*/ +U8* SEGGER_SYSVIEW_EncodeU32 (U8* pPayload, U32 Value); +U8* SEGGER_SYSVIEW_EncodeData (U8* pPayload, const char* pSrc, unsigned int Len); +U8* SEGGER_SYSVIEW_EncodeString (U8* pPayload, const char* s, unsigned int MaxLen); +U8* SEGGER_SYSVIEW_EncodeId (U8* pPayload, U32 Id); +U32 SEGGER_SYSVIEW_ShrinkId (U32 Id); + + +/********************************************************************* +* +* Middleware module registration +*/ +void SEGGER_SYSVIEW_RegisterModule (SEGGER_SYSVIEW_MODULE* pModule); +void SEGGER_SYSVIEW_RecordModuleDescription (const SEGGER_SYSVIEW_MODULE* pModule, const char* sDescription); +void SEGGER_SYSVIEW_SendModule (U8 ModuleId); +void SEGGER_SYSVIEW_SendModuleDescription (void); +void SEGGER_SYSVIEW_SendNumModules (void); + +/********************************************************************* +* +* printf-Style functions +*/ +#ifndef SEGGER_SYSVIEW_EXCLUDE_PRINTF // Define in project to avoid warnings about variable parameter list +void SEGGER_SYSVIEW_PrintfHostEx (const char* s, U32 Options, ...); +void SEGGER_SYSVIEW_PrintfTargetEx (const char* s, U32 Options, ...); +void SEGGER_SYSVIEW_PrintfHost (const char* s, ...); +void SEGGER_SYSVIEW_PrintfTarget (const char* s, ...); +void SEGGER_SYSVIEW_WarnfHost (const char* s, ...); +void SEGGER_SYSVIEW_WarnfTarget (const char* s, ...); +void SEGGER_SYSVIEW_ErrorfHost (const char* s, ...); +void SEGGER_SYSVIEW_ErrorfTarget (const char* s, ...); +#endif + +void SEGGER_SYSVIEW_Print (const char* s); +void SEGGER_SYSVIEW_Warn (const char* s); +void SEGGER_SYSVIEW_Error (const char* s); + +/********************************************************************* +* +* Run-time configuration functions +*/ +void SEGGER_SYSVIEW_EnableEvents (U32 EnableMask); +void SEGGER_SYSVIEW_DisableEvents (U32 DisableMask); + +/********************************************************************* +* +* Application-provided functions +*/ +void SEGGER_SYSVIEW_Conf (void); +U32 SEGGER_SYSVIEW_X_GetTimestamp (void); +U32 SEGGER_SYSVIEW_X_GetInterruptId (void); + +void SEGGER_SYSVIEW_X_StartComm (void); +void SEGGER_SYSVIEW_X_OnEventRecorded (unsigned NumBytes); + +#ifdef __cplusplus +} +#endif + +/********************************************************************* +* +* Compatibility API defines +*/ +#define SEGGER_SYSVIEW_OnUserStart SEGGER_SYSVIEW_MarkStart +#define SEGGER_SYSVIEW_OnUserStop SEGGER_SYSVIEW_MarkStop + +#endif + +/*************************** End of file ****************************/ diff --git a/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h b/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h new file mode 100644 index 0000000..d535d0c --- /dev/null +++ b/SEGGER/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h @@ -0,0 +1,553 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- +File : SEGGER_SYSVIEW_ConfDefaults.h +Purpose : Defines defaults for configurable defines used in + SEGGER SystemView. +Revision: $Rev: 21319 $ +*/ + +#ifndef SEGGER_SYSVIEW_CONFDEFAULTS_H +#define SEGGER_SYSVIEW_CONFDEFAULTS_H + +/********************************************************************* +* +* #include Section +* +********************************************************************** +*/ + +#include "SEGGER_SYSVIEW_Conf.h" +#include "SEGGER_RTT_Conf.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ +// +// Use auto-detection for SEGGER_SYSVIEW_CORE define +// based on compiler-/toolchain-specific defines +// to define SEGGER_SYSVIEW_GET_INTERRUPT_ID and SEGGER_SYSVIEW_GET_TIMESTAMP +// +#define SEGGER_SYSVIEW_CORE_OTHER 0 +#define SEGGER_SYSVIEW_CORE_CM0 1 // Cortex-M0/M0+/M1 +#define SEGGER_SYSVIEW_CORE_CM3 2 // Cortex-M3/M4/M7 +#define SEGGER_SYSVIEW_CORE_RX 3 // Renesas RX +#ifndef SEGGER_SYSVIEW_CORE + #if (defined __SES_ARM) || (defined __CROSSWORKS_ARM) || (defined __SEGGER_CC__) || (defined __GNUC__) || (defined __clang__) + #if (defined __ARM_ARCH_6M__) || (defined __ARM_ARCH_8M_BASE__) + #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM0 + #elif (defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_8M_MAIN__)) + #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM3 + #endif + #elif defined(__ICCARM__) + #if (defined (__ARM6M__) && (__CORE__ == __ARM6M__)) \ + || (defined (__ARM8M_BASELINE__) && (__CORE__ == __ARM8M_BASELINE__)) + #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM0 + #elif (defined (__ARM7EM__) && (__CORE__ == __ARM7EM__)) \ + || (defined (__ARM7M__) && (__CORE__ == __ARM7M__)) \ + || (defined (__ARM8M_MAINLINE__) && (__CORE__ == __ARM8M_MAINLINE__)) \ + || (defined (__ARM8M_MAINLINE__) && (__CORE__ == __ARM8M_MAINLINE__)) + #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM3 + #endif + #elif defined(__CC_ARM) + #if (defined(__TARGET_ARCH_6S_M)) + #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM0 + #elif (defined(__TARGET_ARCH_7_M) || defined(__TARGET_ARCH_7E_M)) + #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM3 + #endif + #elif defined(__TI_ARM__) + #ifdef __TI_ARM_V6M0__ + #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM0 + #elif (defined(__TI_ARM_V7M3__) || defined(__TI_ARM_V7M4__)) + #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM3 + #endif + #elif defined(__ICCRX__) + #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_RX + #elif defined(__RX) + #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_RX + #endif + + #ifndef SEGGER_SYSVIEW_CORE + #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM3 + #endif +#endif + + +/********************************************************************* +* +* Defines, defaults +* +********************************************************************** +*/ +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_APP_NAME +* +* Description +* The application name to be displayed in SystemView. +* Default +* "SystemView-enabled Application" +* Notes +* Convenience define to be used for SEGGER_SYSVIEW_SendSysDesc(). +*/ +#ifndef SEGGER_SYSVIEW_APP_NAME + #define SEGGER_SYSVIEW_APP_NAME "SystemView-enabled Application" +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_DEVICE_NAME +* +* Description +* The target device name to be displayed in SystemView. +* Default +* "undefined device" +* Notes +* Convenience define to be used for SEGGER_SYSVIEW_SendSysDesc(). +*/ +#ifndef SEGGER_SYSVIEW_DEVICE_NAME + #define SEGGER_SYSVIEW_DEVICE_NAME "undefined device" +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_GET_INTERRUPT_ID() +* +* Description +* Function macro to retrieve the Id of the currently active +* interrupt. +* Default +* Call user-supplied function SEGGER_SYSVIEW_X_GetInterruptId(). +* Notes +* For some known compilers and cores, a ready-to-use, core-specific +* default is set. +* ARMv7M: Read ICSR[8:0] (active vector) +* ARMv6M: Read ICSR[5:0] (active vector) +*/ +#ifndef SEGGER_SYSVIEW_GET_INTERRUPT_ID + #if SEGGER_SYSVIEW_CORE == SEGGER_SYSVIEW_CORE_CM3 + #define SEGGER_SYSVIEW_GET_INTERRUPT_ID() ((*(U32*)(0xE000ED04)) & 0x1FF) // Get the currently active interrupt Id. (i.e. read Cortex-M ICSR[8:0] = active vector) + #elif SEGGER_SYSVIEW_CORE == SEGGER_SYSVIEW_CORE_CM0 + #if defined(__ICCARM__) + #if (__VER__ > 6010000) + #define SEGGER_SYSVIEW_GET_INTERRUPT_ID() (__get_IPSR()) // Workaround for IAR, which might do a byte-access to 0xE000ED04. Read IPSR instead. + #else + #define SEGGER_SYSVIEW_GET_INTERRUPT_ID() ((*(U32*)(0xE000ED04)) & 0x3F) // Older versions of IAR do not include __get_IPSR, but might also not optimize to byte-access. + #endif + #else + #define SEGGER_SYSVIEW_GET_INTERRUPT_ID() ((*(U32*)(0xE000ED04)) & 0x3F) // Get the currently active interrupt Id. (i.e. read Cortex-M ICSR[5:0] = active vector) + #endif + #else + #define SEGGER_SYSVIEW_GET_INTERRUPT_ID() SEGGER_SYSVIEW_X_GetInterruptId() // Get the currently active interrupt Id from the user-provided function. + #endif +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_GET_TIMESTAMP() +* +* Description +* Function macro to retrieve a system timestamp for SYSVIEW events. +* Default +* Call user-supplied function SEGGER_SYSVIEW_X_GetTimestamp(). +* Notes +* For some known compilers and cores, a ready-to-use, core-specific +* default is set. +* ARMv7M: Read Cortex-M Cycle Count register. +* +* The system timestamp clock frequency has to be passed in +* SEGGER_SYSVIEW_Init(). +*/ +#ifndef SEGGER_SYSVIEW_GET_TIMESTAMP + #if defined (SEGGER_SYSVIEW_CORE) && (SEGGER_SYSVIEW_CORE == SEGGER_SYSVIEW_CORE_CM3) + #define SEGGER_SYSVIEW_GET_TIMESTAMP() (*(U32 *)(0xE0001004)) // Retrieve a system timestamp. Cortex-M cycle counter. + #else + #define SEGGER_SYSVIEW_GET_TIMESTAMP() SEGGER_SYSVIEW_X_GetTimestamp() // Retrieve a system timestamp via user-defined function + #endif +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_TIMESTAMP_BITS +* +* Description +* Number of valid (low-order) bits delivered in system timestamp. +* Default +* 32 +* Notes +* Value has to match system timestamp clock source. +*/ +// Define number of valid bits low-order delivered by clock source. +#ifndef SEGGER_SYSVIEW_TIMESTAMP_BITS + #define SEGGER_SYSVIEW_TIMESTAMP_BITS 32 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_RTT_CHANNEL +* +* Description +* The RTT channel that SystemView will use. +* Default +* 0: Auto selection. +* Notes +* Value has to be lower than SEGGER_RTT_MAX_NUM_UP_BUFFERS. +*/ +#ifndef SEGGER_SYSVIEW_RTT_CHANNEL + #define SEGGER_SYSVIEW_RTT_CHANNEL 0 +#endif +// Sanity check of RTT channel +#if (SEGGER_SYSVIEW_RTT_CHANNEL == 0) && (SEGGER_RTT_MAX_NUM_UP_BUFFERS < 2) + #error "SEGGER_RTT_MAX_NUM_UP_BUFFERS in SEGGER_RTT_Conf.h has to be > 1!" +#elif (SEGGER_SYSVIEW_RTT_CHANNEL >= SEGGER_RTT_MAX_NUM_UP_BUFFERS) + #error "SEGGER_RTT_MAX_NUM_UP_BUFFERS in SEGGER_RTT_Conf.h has to be > SEGGER_SYSVIEW_RTT_CHANNEL!" +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_RTT_BUFFER_SIZE +* +* Description +* Number of bytes that SystemView uses for the RTT buffer. +* Default +* 1024 +*/ +#ifndef SEGGER_SYSVIEW_RTT_BUFFER_SIZE + #define SEGGER_SYSVIEW_RTT_BUFFER_SIZE ( 1024 * 10 ) +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_SECTION +* +* Description +* Section to place the SystemView RTT Buffer into. +* Default +* undefined: Do not place into a specific section. +* Notes +* If SEGGER_RTT_SECTION is defined, the default changes to use +* this section for the SystemView RTT Buffer, too. +*/ +#if !(defined SEGGER_SYSVIEW_SECTION) && (defined SEGGER_RTT_SECTION) + #define SEGGER_SYSVIEW_SECTION SEGGER_RTT_SECTION +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE +* +* Description +* Largest cache line size (in bytes) in the target system. +* Default +* 0 +* Notes +* Required in systems with caches to make sure that the SystemView +* RTT buffer can be aligned accordingly. +*/ +#ifndef SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE + #define SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE 0 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_ID_BASE +* +* Description +* Lowest Id reported by the application. +* Default +* 0 +* Notes +* Value is usually subtracted from mailboxes, semaphores, tasks, +* .... addresses, to compress event parameters. +* Should be the lowest RAM address of the system. +*/ +#ifndef SEGGER_SYSVIEW_ID_BASE + #define SEGGER_SYSVIEW_ID_BASE 0 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_ID_SHIFT +* +* Description +* Number of bits to shift Ids. +* Default +* 0 +* Notes +* Ids are shifted to compress event parameters. +* Should match the alignment of Ids (addresses), +* e.g. 2 when Ids are 4 byte aligned. +*/ +#ifndef SEGGER_SYSVIEW_ID_SHIFT + #define SEGGER_SYSVIEW_ID_SHIFT 0 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_MAX_ARGUMENTS +* +* Description +* Maximum number of arguments which are handled with SystemView +* print routines or may be encoded in one recording function. +* routines. +* Default +* 16 +*/ +#ifndef SEGGER_SYSVIEW_MAX_ARGUMENTS + #define SEGGER_SYSVIEW_MAX_ARGUMENTS 16 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_MAX_STRING_LEN +* +* Description +* Maximum string length which can be used in SystemView print and +* system description routines. +* Default +* 128 +*/ +#ifndef SEGGER_SYSVIEW_MAX_STRING_LEN + #define SEGGER_SYSVIEW_MAX_STRING_LEN 128 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT +* +* Description +* If enabled, on SEGGER_SYSVIEW_PrintHost, check the format string +* and if it includes unsupported formatters, use formatting on the +* target instead. +* Default +* 0: Disabled. +*/ +#ifndef SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT + #define SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT 0 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_USE_INTERNAL_RECORDER +* +* Description +* If set, an internal recorder, such as UART or IP is used. +* Default +* 0: Disabled. +* Notes +* Convenience define to be used by SEGGER_SYSVIEW_Conf(), +* such as in embOS configuration to enable Cortex-M cycle counter. +*/ +#ifndef SEGGER_SYSVIEW_USE_INTERNAL_RECORDER + #define SEGGER_SYSVIEW_USE_INTERNAL_RECORDER 0 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_CAN_RESTART +* +* Description +* If enabled, send the SystemView start sequence on every start +* command, not just on the first one. +* Enables restart when SystemView disconnected unexpectedly. +* Default +* 1: Enabled +*/ +#ifndef SEGGER_SYSVIEW_CAN_RESTART + #define SEGGER_SYSVIEW_CAN_RESTART 1 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_START_ON_INIT +* +* Description +* Enable calling SEGGER_SYSVIEW_Start() after initialization. +* Default +* 0: Disabled. +* Notes +* Convenience define to be used by SEGGER_SYSVIEW_Conf(), +* such as in embOS configuration. +*/ +#ifndef SEGGER_SYSVIEW_START_ON_INIT + #define SEGGER_SYSVIEW_START_ON_INIT 0 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_USE_STATIC_BUFFER +* +* Description +* If enabled, use a static buffer instead of a buffer on the stack +* for SystemView event packets. +* Default +* 1: Enabled. +* Notes +* If enabled, the static memory use by SystemView is increased by +* the maximum packet size. SystemView is locked on entry of a +* recording function. +* If disabled, the stack usage by SystemView recording functions +* might be increased by up to the maximum packet size. SystemView +* is locked when writing the packet to the RTT buffer. +*/ +#ifndef SEGGER_SYSVIEW_USE_STATIC_BUFFER + #define SEGGER_SYSVIEW_USE_STATIC_BUFFER 1 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_MAX_PACKET_SIZE +* +* Description +* Maximum packet size for a SystemView event. +* Default +* Automatically calculated. +* Notes +* The maximum packet size is mainly defined by the maximum string +* length and the maximum number of arguments. +*/ +#ifndef SEGGER_SYSVIEW_MAX_PACKET_SIZE + #define SEGGER_SYSVIEW_MAX_PACKET_SIZE (SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_MAX_STRING_LEN + 2 * SEGGER_SYSVIEW_QUANTA_U32 + SEGGER_SYSVIEW_MAX_ARGUMENTS * SEGGER_SYSVIEW_QUANTA_U32) +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_POST_MORTEM_MODE +* +* Description +* If enabled, SystemView records for post-mortem analysis instead +* of real-time analysis. +* Default +* 0: Disabled. +* Notes +* For more information refer to +* https://www.segger.com/products/development-tools/systemview/technology/post-mortem-mode +*/ +#ifndef SEGGER_SYSVIEW_POST_MORTEM_MODE + #define SEGGER_SYSVIEW_POST_MORTEM_MODE 0 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_SYNC_PERIOD_SHIFT +* +* Description +* Configure how frequently syncronization is sent in post-mortem +* mode. +* Default +* 8: (1 << 8) = Every 256 Events. +* Notes +* In post-mortem mode, at least one sync has to be in the RTT buffer. +* Recommended sync frequency: Buffer Size / 16 +* For more information refer to +* https://www.segger.com/products/development-tools/systemview/technology/post-mortem-mode +*/ +#ifndef SEGGER_SYSVIEW_SYNC_PERIOD_SHIFT + #define SEGGER_SYSVIEW_SYNC_PERIOD_SHIFT 8 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_ON_EVENT_RECORDED() +* +* Description +* Function macro to notify recorder about a new event in buffer. +* Default +* undefined: Do not notify recorder. +* Notes +* Used for non-J-Link recorder, +* such as to enable transmission via UART or notify IP task. +*/ +#ifndef SEGGER_SYSVIEW_ON_EVENT_RECORDED + #define SEGGER_SYSVIEW_ON_EVENT_RECORDED(NumBytes) +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_LOCK() +* +* Description +* Function macro to (nestable) lock SystemView recording. +* Default +* Use RTT Locking mechanism (defined by SEGGER_RTT_LOCK()). +* Notes +* If SystemView recording is not locked, recording events from +* interrupts and tasks may lead to unpredictable, undefined, event +* data. +*/ +#ifndef SEGGER_SYSVIEW_LOCK + #define SEGGER_SYSVIEW_LOCK() SEGGER_RTT_LOCK() +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_UNLOCK +* +* Description +* Function macro to unlock SystemView recording. +* Default +* Use RTT Unlocking mechanism (defined by SEGGER_RTT_UNLOCK()). +*/ +#ifndef SEGGER_SYSVIEW_UNLOCK + #define SEGGER_SYSVIEW_UNLOCK() SEGGER_RTT_UNLOCK() +#endif + +#ifdef __cplusplus +} +#endif + +#endif + +/*************************** End of file ****************************/ diff --git a/SEGGER/SEGGER/SEGGER_SYSVIEW_Int.h b/SEGGER/SEGGER/SEGGER_SYSVIEW_Int.h new file mode 100644 index 0000000..a079381 --- /dev/null +++ b/SEGGER/SEGGER/SEGGER_SYSVIEW_Int.h @@ -0,0 +1,99 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- +File : SEGGER_SYSVIEW_Int.h +Purpose : SEGGER SystemView internal header. +Revision: $Rev: 21281 $ +*/ + +#ifndef SEGGER_SYSVIEW_INT_H +#define SEGGER_SYSVIEW_INT_H + +/********************************************************************* +* +* #include Section +* +********************************************************************** +*/ + +#include "SEGGER_SYSVIEW.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/********************************************************************* +* +* Private data types +* +********************************************************************** +*/ +// +// Commands that Host can send to target +// +typedef enum { + SEGGER_SYSVIEW_COMMAND_ID_START = 1, + SEGGER_SYSVIEW_COMMAND_ID_STOP, + SEGGER_SYSVIEW_COMMAND_ID_GET_SYSTIME, + SEGGER_SYSVIEW_COMMAND_ID_GET_TASKLIST, + SEGGER_SYSVIEW_COMMAND_ID_GET_SYSDESC, + SEGGER_SYSVIEW_COMMAND_ID_GET_NUMMODULES, + SEGGER_SYSVIEW_COMMAND_ID_GET_MODULEDESC, + SEGGER_SYSVIEW_COMMAND_ID_HEARTBEAT = 127, + // Extended commands: Commands >= 128 have a second parameter + SEGGER_SYSVIEW_COMMAND_ID_GET_MODULE = 128 +} SEGGER_SYSVIEW_COMMAND_ID; + +#ifdef __cplusplus +} +#endif + +#endif + +/*************************** End of file ****************************/ diff --git a/SEGGER/SEGGER/Syscalls/SEGGER_RTT_Syscalls_GCC.c b/SEGGER/SEGGER/Syscalls/SEGGER_RTT_Syscalls_GCC.c new file mode 100644 index 0000000..ea980eb --- /dev/null +++ b/SEGGER/SEGGER/Syscalls/SEGGER_RTT_Syscalls_GCC.c @@ -0,0 +1,124 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +---------------------------END-OF-HEADER------------------------------ +File : SEGGER_RTT_Syscalls_GCC.c +Purpose : Low-level functions for using printf() via RTT in GCC. + To use RTT for printf output, include this file in your + application. +Revision: $Rev: 20755 $ +---------------------------------------------------------------------- +*/ +#if (defined __GNUC__) && !(defined __SES_ARM) && !(defined __CROSSWORKS_ARM) && !(defined __ARMCC_VERSION) && !(defined __CC_ARM) + +#include // required for _write_r +#include "SEGGER_RTT.h" + + +/********************************************************************* +* +* Types +* +********************************************************************** +*/ +// +// If necessary define the _reent struct +// to match the one passed by the used standard library. +// +struct _reent; + +/********************************************************************* +* +* Function prototypes +* +********************************************************************** +*/ +_ssize_t _write (int file, const void *ptr, size_t len); +_ssize_t _write_r(struct _reent *r, int file, const void *ptr, size_t len); + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ + +/********************************************************************* +* +* _write() +* +* Function description +* Low-level write function. +* libc subroutines will use this system routine for output to all files, +* including stdout. +* Write data via RTT. +*/ +_ssize_t _write(int file, const void *ptr, size_t len) { + (void) file; /* Not used, avoid warning */ + SEGGER_RTT_Write(0, ptr, len); + return len; +} + +/********************************************************************* +* +* _write_r() +* +* Function description +* Low-level reentrant write function. +* libc subroutines will use this system routine for output to all files, +* including stdout. +* Write data via RTT. +*/ +_ssize_t _write_r(struct _reent *r, int file, const void *ptr, size_t len) { + (void) file; /* Not used, avoid warning */ + (void) r; /* Not used, avoid warning */ + SEGGER_RTT_Write(0, ptr, len); + return len; +} + +#endif +/****** End Of File *************************************************/ diff --git a/SEGGER/SEGGER/Syscalls/SEGGER_RTT_Syscalls_IAR.c b/SEGGER/SEGGER/Syscalls/SEGGER_RTT_Syscalls_IAR.c new file mode 100644 index 0000000..bdea1a4 --- /dev/null +++ b/SEGGER/SEGGER/Syscalls/SEGGER_RTT_Syscalls_IAR.c @@ -0,0 +1,119 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +---------------------------END-OF-HEADER------------------------------ +File : SEGGER_RTT_Syscalls_IAR.c +Purpose : Low-level functions for using printf() via RTT in IAR. + To use RTT for printf output, include this file in your + application and set the Library Configuration to Normal. +Revision: $Rev: 17697 $ +---------------------------------------------------------------------- +*/ +#ifdef __IAR_SYSTEMS_ICC__ + +// +// Since IAR EWARM V8 and EWRX V4, yfuns.h is considered as deprecated and LowLevelIOInterface.h +// shall be used instead. To not break any compatibility with older compiler versions, we have a +// version check in here. +// +#if ((defined __ICCARM__) && (__VER__ >= 8000000)) || ((defined __ICCRX__) && (__VER__ >= 400)) + #include +#else + #include +#endif + +#include "SEGGER_RTT.h" +#pragma module_name = "?__write" + +/********************************************************************* +* +* Function prototypes +* +********************************************************************** +*/ +size_t __write(int handle, const unsigned char * buffer, size_t size); + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +/********************************************************************* +* +* __write() +* +* Function description +* Low-level write function. +* Standard library subroutines will use this system routine +* for output to all files, including stdout. +* Write data via RTT. +*/ +size_t __write(int handle, const unsigned char * buffer, size_t size) { + (void) handle; /* Not used, avoid warning */ + SEGGER_RTT_Write(0, (const char*)buffer, size); + return size; +} + +/********************************************************************* +* +* __write_buffered() +* +* Function description +* Low-level write function. +* Standard library subroutines will use this system routine +* for output to all files, including stdout. +* Write data via RTT. +*/ +size_t __write_buffered(int handle, const unsigned char * buffer, size_t size) { + (void) handle; /* Not used, avoid warning */ + SEGGER_RTT_Write(0, (const char*)buffer, size); + return size; +} + +#endif +/****** End Of File *************************************************/ diff --git a/SEGGER/SEGGER/Syscalls/SEGGER_RTT_Syscalls_KEIL.c b/SEGGER/SEGGER/Syscalls/SEGGER_RTT_Syscalls_KEIL.c new file mode 100644 index 0000000..988035f --- /dev/null +++ b/SEGGER/SEGGER/Syscalls/SEGGER_RTT_Syscalls_KEIL.c @@ -0,0 +1,393 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +---------------------------END-OF-HEADER------------------------------ +File : RTT_Syscalls_KEIL.c +Purpose : Retargeting module for KEIL MDK-CM3. + Low-level functions for using printf() via RTT +Revision: $Rev: 20754 $ +Notes : (1) https://wiki.segger.com/Keil_MDK-ARM#RTT_in_uVision +---------------------------------------------------------------------- +*/ +#if (defined __CC_ARM) || (defined __ARMCC_VERSION) + +#include +#include +#include +#include +#include + +#include "SEGGER_RTT.h" +/********************************************************************* +* +* #pragmas +* +********************************************************************** +*/ +#if __ARMCC_VERSION < 6000000 +#pragma import(__use_no_semihosting) +#endif + +#ifdef _MICROLIB + #pragma import(__use_full_stdio) +#endif + +/********************************************************************* +* +* Defines non-configurable +* +********************************************************************** +*/ + +/* Standard IO device handles - arbitrary, but any real file system handles must be + less than 0x8000. */ +#define STDIN 0x8001 // Standard Input Stream +#define STDOUT 0x8002 // Standard Output Stream +#define STDERR 0x8003 // Standard Error Stream + +/********************************************************************* +* +* Public const +* +********************************************************************** +*/ +#if __ARMCC_VERSION < 5000000 +//const char __stdin_name[] = "STDIN"; +const char __stdout_name[] = "STDOUT"; +const char __stderr_name[] = "STDERR"; +#endif + +/********************************************************************* +* +* Public code +* +********************************************************************** +*/ + +/********************************************************************* +* +* _ttywrch +* +* Function description: +* Outputs a character to the console +* +* Parameters: +* c - character to output +* +*/ +void _ttywrch(int c) { + fputc(c, stdout); // stdout + fflush(stdout); +} + +/********************************************************************* +* +* _sys_open +* +* Function description: +* Opens the device/file in order to do read/write operations +* +* Parameters: +* sName - sName of the device/file to open +* OpenMode - This parameter is currently ignored +* +* Return value: +* != 0 - Handle to the object to open, otherwise +* == 0 -"device" is not handled by this module +* +*/ +FILEHANDLE _sys_open(const char * sName, int OpenMode) { + (void)OpenMode; + // Register standard Input Output devices. + if (strcmp(sName, __stdout_name) == 0) { + return (STDOUT); + } else if (strcmp(sName, __stderr_name) == 0) { + return (STDERR); + } else + return (0); // Not implemented +} + +/********************************************************************* +* +* _sys_close +* +* Function description: +* Closes the handle to the open device/file +* +* Parameters: +* hFile - Handle to a file opened via _sys_open +* +* Return value: +* 0 - device/file closed +* +*/ +int _sys_close(FILEHANDLE hFile) { + (void)hFile; + return 0; // Not implemented +} + +/********************************************************************* +* +* _sys_write +* +* Function description: +* Writes the data to an open handle. +* Currently this function only outputs data to the console +* +* Parameters: +* hFile - Handle to a file opened via _sys_open +* pBuffer - Pointer to the data that shall be written +* NumBytes - Number of bytes to write +* Mode - The Mode that shall be used +* +* Return value: +* Number of bytes *not* written to the file/device +* +*/ +int _sys_write(FILEHANDLE hFile, const unsigned char * pBuffer, unsigned NumBytes, int Mode) { + int r = 0; + + (void)Mode; + if (hFile == STDOUT) { + SEGGER_RTT_Write(0, (const char*)pBuffer, NumBytes); + return 0; + } + return r; +} + +/********************************************************************* +* +* _sys_read +* +* Function description: +* Reads data from an open handle. +* Currently this modules does nothing. +* +* Parameters: +* hFile - Handle to a file opened via _sys_open +* pBuffer - Pointer to buffer to store the read data +* NumBytes - Number of bytes to read +* Mode - The Mode that shall be used +* +* Return value: +* Number of bytes read from the file/device +* +*/ +int _sys_read(FILEHANDLE hFile, unsigned char * pBuffer, unsigned NumBytes, int Mode) { + (void)hFile; + (void)pBuffer; + (void)NumBytes; + (void)Mode; + return (0); // Not implemented +} + +/********************************************************************* +* +* _sys_istty +* +* Function description: +* This function shall return whether the opened file +* is a console device or not. +* +* Parameters: +* hFile - Handle to a file opened via _sys_open +* +* Return value: +* 1 - Device is a console +* 0 - Device is not a console +* +*/ +int _sys_istty(FILEHANDLE hFile) { + if (hFile > 0x8000) { + return (1); + } + return (0); // Not implemented +} + +/********************************************************************* +* +* _sys_seek +* +* Function description: +* Seeks via the file to a specific position +* +* Parameters: +* hFile - Handle to a file opened via _sys_open +* Pos - +* +* Return value: +* int - +* +*/ +int _sys_seek(FILEHANDLE hFile, long Pos) { + (void)hFile; + (void)Pos; + return (0); // Not implemented +} + +/********************************************************************* +* +* _sys_ensure +* +* Function description: +* +* +* Parameters: +* hFile - Handle to a file opened via _sys_open +* +* Return value: +* int - +* +*/ +int _sys_ensure(FILEHANDLE hFile) { + (void)hFile; + return (-1); // Not implemented +} + +/********************************************************************* +* +* _sys_flen +* +* Function description: +* Returns the length of the opened file handle +* +* Parameters: +* hFile - Handle to a file opened via _sys_open +* +* Return value: +* Length of the file +* +*/ +long _sys_flen(FILEHANDLE hFile) { + (void)hFile; + return (0); // Not implemented +} + +/********************************************************************* +* +* _sys_tmpnam +* +* Function description: +* This function converts the file number fileno for a temporary +* file to a unique filename, for example, tmp0001. +* +* Parameters: +* pBuffer - Pointer to a buffer to store the name +* FileNum - file number to convert +* MaxLen - Size of the buffer +* +* Return value: +* 1 - Error +* 0 - Success +* +*/ +int _sys_tmpnam(char * pBuffer, int FileNum, unsigned MaxLen) { + (void)pBuffer; + (void)FileNum; + (void)MaxLen; + return (1); // Not implemented +} + +/********************************************************************* +* +* _sys_command_string +* +* Function description: +* This function shall execute a system command. +* +* Parameters: +* cmd - Pointer to the command string +* len - Length of the string +* +* Return value: +* == NULL - Command was not successfully executed +* == sCmd - Command was passed successfully +* +*/ +char * _sys_command_string(char * cmd, int len) { + (void)len; + return cmd; // Not implemented +} + +/********************************************************************* +* +* _sys_exit +* +* Function description: +* This function is called when the application returns from main +* +* Parameters: +* ReturnCode - Return code from the main function +* +* +*/ +void _sys_exit(int ReturnCode) { + (void)ReturnCode; + while (1); // Not implemented +} + +#if __ARMCC_VERSION >= 5000000 +/********************************************************************* +* +* stdout_putchar +* +* Function description: +* Put a character to the stdout +* +* Parameters: +* ch - Character to output +* +* +*/ +int stdout_putchar(int ch) { + (void)ch; + return ch; // Not implemented +} +#endif + +#endif +/*************************** End of file ****************************/ diff --git a/SEGGER/SEGGER/Syscalls/SEGGER_RTT_Syscalls_SES.c b/SEGGER/SEGGER/Syscalls/SEGGER_RTT_Syscalls_SES.c new file mode 100644 index 0000000..6c438a9 --- /dev/null +++ b/SEGGER/SEGGER/Syscalls/SEGGER_RTT_Syscalls_SES.c @@ -0,0 +1,251 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +---------------------------END-OF-HEADER------------------------------ +File : SEGGER_RTT_Syscalls_SES.c +Purpose : Reimplementation of printf, puts and __getchar using RTT + in SEGGER Embedded Studio. + To use RTT for printf output, include this file in your + application. +Revision: $Rev: 18539 $ +---------------------------------------------------------------------- +*/ +#if (defined __SES_ARM) || (defined __SES_RISCV) || (defined __CROSSWORKS_ARM) + +#include "SEGGER_RTT.h" +#include +#include +#include "limits.h" +#include "__libc.h" +#include "__vfprintf.h" + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ +// +// Select string formatting implementation. +// +// RTT printf formatting +// - Configurable stack usage. (SEGGER_RTT_PRINTF_BUFFER_SIZE in SEGGER_RTT_Conf.h) +// - No maximum string length. +// - Limited conversion specifiers and flags. (See SEGGER_RTT_printf.c) +// Standard library printf formatting +// - Configurable formatting capabilities. +// - Full conversion specifier and flag support. +// - Maximum string length has to be known or (slightly) slower character-wise output. +// +// #define PRINTF_USE_SEGGER_RTT_FORMATTING 0 // Use standard library formatting +// #define PRINTF_USE_SEGGER_RTT_FORMATTING 1 // Use RTT formatting +// +#ifndef PRINTF_USE_SEGGER_RTT_FORMATTING + #define PRINTF_USE_SEGGER_RTT_FORMATTING 0 +#endif +// +// If using standard library formatting, +// select maximum output string buffer size or character-wise output. +// +// #define PRINTF_BUFFER_SIZE 0 // Use character-wise output +// #define PRINTF_BUFFER_SIZE 128 // Default maximum string length +// +#ifndef PRINTF_BUFFER_SIZE + #define PRINTF_BUFFER_SIZE 128 +#endif + +#if PRINTF_USE_SEGGER_RTT_FORMATTING // Use SEGGER RTT formatting implementation +/********************************************************************* +* +* Function prototypes +* +********************************************************************** +*/ +int SEGGER_RTT_vprintf(unsigned BufferIndex, const char * sFormat, va_list * pParamList); + +/********************************************************************* +* +* Global functions, printf +* +********************************************************************** +*/ +/********************************************************************* +* +* printf() +* +* Function description +* print a formatted string using RTT and SEGGER RTT formatting. +*/ +int printf(const char *fmt,...) { + int n; + va_list args; + + va_start (args, fmt); + n = SEGGER_RTT_vprintf(0, fmt, &args); + va_end(args); + return n; +} + +#elif PRINTF_BUFFER_SIZE == 0 // Use standard library formatting with character-wise output + +/********************************************************************* +* +* Static functions +* +********************************************************************** +*/ +static int _putchar(int x, __printf_tag_ptr ctx) { + (void)ctx; + SEGGER_RTT_Write(0, (char *)&x, 1); + return x; +} + +/********************************************************************* +* +* Global functions, printf +* +********************************************************************** +*/ +/********************************************************************* +* +* printf() +* +* Function description +* print a formatted string character-wise, using RTT and standard +* library formatting. +*/ +int printf(const char *fmt, ...) { + int n; + va_list args; + __printf_t iod; + + va_start(args, fmt); + iod.string = 0; + iod.maxchars = INT_MAX; + iod.output_fn = _putchar; + SEGGER_RTT_LOCK(); + n = __vfprintf(&iod, fmt, args); + SEGGER_RTT_UNLOCK(); + va_end(args); + return n; +} + +#else // Use standard library formatting with static buffer + +/********************************************************************* +* +* Global functions, printf +* +********************************************************************** +*/ +/********************************************************************* +* +* printf() +* +* Function description +* print a formatted string using RTT and standard library formatting. +*/ +int printf(const char *fmt,...) { + int n; + char aBuffer[PRINTF_BUFFER_SIZE]; + va_list args; + + va_start (args, fmt); + n = vsnprintf(aBuffer, sizeof(aBuffer), fmt, args); + if (n > (int)sizeof(aBuffer)) { + SEGGER_RTT_Write(0, aBuffer, sizeof(aBuffer)); + } else if (n > 0) { + SEGGER_RTT_Write(0, aBuffer, n); + } + va_end(args); + return n; +} +#endif + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +/********************************************************************* +* +* puts() +* +* Function description +* print a string using RTT. +*/ +int puts(const char *s) { + return SEGGER_RTT_WriteString(0, s); +} + +/********************************************************************* +* +* __putchar() +* +* Function description +* Write one character via RTT. +*/ +int __putchar(int x, __printf_tag_ptr ctx) { + (void)ctx; + SEGGER_RTT_Write(0, (char *)&x, 1); + return x; +} + +/********************************************************************* +* +* __getchar() +* +* Function description +* Wait for and get a character via RTT. +*/ +int __getchar() { + return SEGGER_RTT_WaitKey(); +} + +#endif +/****** End Of File *************************************************/ diff --git a/SEGGER_MEM_DUMP/Single_shot.SVdat b/SEGGER_MEM_DUMP/Single_shot.SVdat new file mode 100644 index 0000000..2dd96a3 Binary files /dev/null and b/SEGGER_MEM_DUMP/Single_shot.SVdat differ diff --git a/inc/FreeRTOSConfig.h b/inc/FreeRTOSConfig.h index 9569899..9a12c48 100644 --- a/inc/FreeRTOSConfig.h +++ b/inc/FreeRTOSConfig.h @@ -48,7 +48,7 @@ #endif extern uint32_t SystemCoreClock; #define configUSE_PREEMPTION 1 -#define configUSE_IDLE_HOOK 0 +#define configUSE_IDLE_HOOK 1 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( SystemCoreClock ) #define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) @@ -88,6 +88,8 @@ to exclude the API function. */ #define INCLUDE_vTaskDelayUntil 1 #define INCLUDE_vTaskDelay 1 +#define INCLUDE_xTaskGetIdleTaskHandle 1 +#define INCLUDE_pxTaskGetStackStart 1 /* Cortex-M specific definitions. */ #ifdef __NVIC_PRIO_BITS /* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */ @@ -123,5 +125,6 @@ standard names. */ #define xPortPendSVHandler PendSV_Handler #define xPortSysTickHandler SysTick_Handler +#include "SEGGER_SYSVIEW_FreeRTOS.h" #endif /* FREERTOS_CONFIG_H */ diff --git a/resources_extra/SystemView_Src_V320/Config/Global.h b/resources_extra/SystemView_Src_V320/Config/Global.h new file mode 100644 index 0000000..e2ef426 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Config/Global.h @@ -0,0 +1,113 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +---------------------------------------------------------------------- +File : Global.h +Purpose : Global types + In case your application already has a Global.h, you should + merge the files. In order to use Segger code, the types + U8, U16, U32, I8, I16, I32 need to be defined in Global.h; + additional definitions do not hurt. +Revision: $Rev: 12501 $ +---------------------------END-OF-HEADER------------------------------ +*/ + +#ifndef GLOBAL_H // Guard against multiple inclusion +#define GLOBAL_H + +#define U8 unsigned char +#define I8 signed char +#define U16 unsigned short +#define I16 signed short +#ifdef __x86_64__ +#define U32 unsigned +#define I32 int +#else +#define U32 unsigned long +#define I32 signed long +#endif + +// +// CC_NO_LONG_SUPPORT can be defined to compile test +// without long support for compilers that do not +// support C99 and its long type. +// +#ifdef CC_NO_LONG_SUPPORT + #define PTR_ADDR U32 +#else // Supports long type. +#if defined(_WIN32) && !defined(__clang__) && !defined(__MINGW32__) + // + // Microsoft VC6 compiler related + // + #define U64 unsigned __int64 + #define U128 unsigned __int128 + #define I64 __int64 + #define I128 __int128 + #if _MSC_VER <= 1200 + #define U64_C(x) x##UI64 + #else + #define U64_C(x) x##ULL + #endif +#else + // + // C99 compliant compiler + // + #define U64 unsigned long long + #define I64 signed long long + #define U64_C(x) x##ULL +#endif + +#if (defined(_WIN64) || defined(__LP64__)) // 64-bit symbols used by Visual Studio and GCC, maybe others as well. + #define PTR_ADDR U64 +#else + #define PTR_ADDR U32 +#endif +#endif // Supports long type. + +#endif // Avoid multiple inclusion + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Config/SEGGER_RTT_Conf.h b/resources_extra/SystemView_Src_V320/Config/SEGGER_RTT_Conf.h new file mode 100644 index 0000000..4087f67 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Config/SEGGER_RTT_Conf.h @@ -0,0 +1,428 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +---------------------------END-OF-HEADER------------------------------ +File : SEGGER_RTT_Conf.h +Purpose : Implementation of SEGGER real-time transfer (RTT) which + allows real-time communication on targets which support + debugger memory accesses while the CPU is running. +Revision: $Rev: 21386 $ + +*/ + +#ifndef SEGGER_RTT_CONF_H +#define SEGGER_RTT_CONF_H + +#ifdef __IAR_SYSTEMS_ICC__ + #include +#endif + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ + +// +// Take in and set to correct values for Cortex-A systems with CPU cache +// +//#define SEGGER_RTT_CPU_CACHE_LINE_SIZE (32) // Largest cache line size (in bytes) in the current system +//#define SEGGER_RTT_UNCACHED_OFF (0xFB000000) // Address alias where RTT CB and buffers can be accessed uncached +// +// Most common case: +// Up-channel 0: RTT +// Up-channel 1: SystemView +// +#ifndef SEGGER_RTT_MAX_NUM_UP_BUFFERS + #define SEGGER_RTT_MAX_NUM_UP_BUFFERS (3) // Max. number of up-buffers (T->H) available on this target (Default: 3) +#endif +// +// Most common case: +// Down-channel 0: RTT +// Down-channel 1: SystemView +// +#ifndef SEGGER_RTT_MAX_NUM_DOWN_BUFFERS + #define SEGGER_RTT_MAX_NUM_DOWN_BUFFERS (3) // Max. number of down-buffers (H->T) available on this target (Default: 3) +#endif + +#ifndef BUFFER_SIZE_UP + #define BUFFER_SIZE_UP (1024) // Size of the buffer for terminal output of target, up to host (Default: 1k) +#endif + +#ifndef BUFFER_SIZE_DOWN + #define BUFFER_SIZE_DOWN (16) // Size of the buffer for terminal input to target from host (Usually keyboard input) (Default: 16) +#endif + +#ifndef SEGGER_RTT_PRINTF_BUFFER_SIZE + #define SEGGER_RTT_PRINTF_BUFFER_SIZE (64u) // Size of buffer for RTT printf to bulk-send chars via RTT (Default: 64) +#endif + +#ifndef SEGGER_RTT_MODE_DEFAULT + #define SEGGER_RTT_MODE_DEFAULT SEGGER_RTT_MODE_NO_BLOCK_SKIP // Mode for pre-initialized terminal channel (buffer 0) +#endif + +/********************************************************************* +* +* RTT memcpy configuration +* +* memcpy() is good for large amounts of data, +* but the overhead is big for small amounts, which are usually stored via RTT. +* With SEGGER_RTT_MEMCPY_USE_BYTELOOP a simple byte loop can be used instead. +* +* SEGGER_RTT_MEMCPY() can be used to replace standard memcpy() in RTT functions. +* This is may be required with memory access restrictions, +* such as on Cortex-A devices with MMU. +*/ +#ifndef SEGGER_RTT_MEMCPY_USE_BYTELOOP + #define SEGGER_RTT_MEMCPY_USE_BYTELOOP 0 // 0: Use memcpy/SEGGER_RTT_MEMCPY, 1: Use a simple byte-loop +#endif +// +// Example definition of SEGGER_RTT_MEMCPY to external memcpy with GCC toolchains and Cortex-A targets +// +//#if ((defined __SES_ARM) || (defined __CROSSWORKS_ARM) || (defined __GNUC__)) && (defined (__ARM_ARCH_7A__)) +// #define SEGGER_RTT_MEMCPY(pDest, pSrc, NumBytes) SEGGER_memcpy((pDest), (pSrc), (NumBytes)) +//#endif + +// +// Target is not allowed to perform other RTT operations while string still has not been stored completely. +// Otherwise we would probably end up with a mixed string in the buffer. +// If using RTT from within interrupts, multiple tasks or multi processors, define the SEGGER_RTT_LOCK() and SEGGER_RTT_UNLOCK() function here. +// +// SEGGER_RTT_MAX_INTERRUPT_PRIORITY can be used in the sample lock routines on Cortex-M3/4. +// Make sure to mask all interrupts which can send RTT data, i.e. generate SystemView events, or cause task switches. +// When high-priority interrupts must not be masked while sending RTT data, SEGGER_RTT_MAX_INTERRUPT_PRIORITY needs to be adjusted accordingly. +// (Higher priority = lower priority number) +// Default value for embOS: 128u +// Default configuration in FreeRTOS: configMAX_SYSCALL_INTERRUPT_PRIORITY: ( configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY << (8 - configPRIO_BITS) ) +// In case of doubt mask all interrupts: 1 << (8 - BASEPRI_PRIO_BITS) i.e. 1 << 5 when 3 bits are implemented in NVIC +// or define SEGGER_RTT_LOCK() to completely disable interrupts. +// +#ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY + #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20) // Interrupt priority to lock on SEGGER_RTT_LOCK on Cortex-M3/4 (Default: 0x20) +#endif + +/********************************************************************* +* +* RTT lock configuration for SEGGER Embedded Studio, +* Rowley CrossStudio and GCC +*/ +#if ((defined(__SES_ARM) || defined(__SES_RISCV) || defined(__CROSSWORKS_ARM) || defined(__GNUC__) || defined(__clang__)) && !defined (__CC_ARM) && !defined(WIN32)) + #if (defined(__ARM_ARCH_6M__) || defined(__ARM_ARCH_8M_BASE__)) + #define SEGGER_RTT_LOCK() { \ + unsigned int _SEGGER_RTT__LockState; \ + __asm volatile ("mrs %0, primask \n\t" \ + "movs r1, #1 \n\t" \ + "msr primask, r1 \n\t" \ + : "=r" (_SEGGER_RTT__LockState) \ + : \ + : "r1", "cc" \ + ); + + #define SEGGER_RTT_UNLOCK() __asm volatile ("msr primask, %0 \n\t" \ + : \ + : "r" (_SEGGER_RTT__LockState) \ + : \ + ); \ + } + #elif (defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_8M_MAIN__)) + #ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY + #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20) + #endif + #define SEGGER_RTT_LOCK() { \ + unsigned int _SEGGER_RTT__LockState; \ + __asm volatile ("mrs %0, basepri \n\t" \ + "mov r1, %1 \n\t" \ + "msr basepri, r1 \n\t" \ + : "=r" (_SEGGER_RTT__LockState) \ + : "i"(SEGGER_RTT_MAX_INTERRUPT_PRIORITY) \ + : "r1", "cc" \ + ); + + #define SEGGER_RTT_UNLOCK() __asm volatile ("msr basepri, %0 \n\t" \ + : \ + : "r" (_SEGGER_RTT__LockState) \ + : \ + ); \ + } + + #elif defined(__ARM_ARCH_7A__) + #define SEGGER_RTT_LOCK() { \ + unsigned int _SEGGER_RTT__LockState; \ + __asm volatile ("mrs r1, CPSR \n\t" \ + "mov %0, r1 \n\t" \ + "orr r1, r1, #0xC0 \n\t" \ + "msr CPSR_c, r1 \n\t" \ + : "=r" (_SEGGER_RTT__LockState) \ + : \ + : "r1", "cc" \ + ); + + #define SEGGER_RTT_UNLOCK() __asm volatile ("mov r0, %0 \n\t" \ + "mrs r1, CPSR \n\t" \ + "bic r1, r1, #0xC0 \n\t" \ + "and r0, r0, #0xC0 \n\t" \ + "orr r1, r1, r0 \n\t" \ + "msr CPSR_c, r1 \n\t" \ + : \ + : "r" (_SEGGER_RTT__LockState) \ + : "r0", "r1", "cc" \ + ); \ + } + #elif defined(__riscv) || defined(__riscv_xlen) + #define SEGGER_RTT_LOCK() { \ + unsigned int _SEGGER_RTT__LockState; \ + __asm volatile ("csrr %0, mstatus \n\t" \ + "csrci mstatus, 8 \n\t" \ + "andi %0, %0, 8 \n\t" \ + : "=r" (_SEGGER_RTT__LockState) \ + : \ + : \ + ); + + #define SEGGER_RTT_UNLOCK() __asm volatile ("csrr a1, mstatus \n\t" \ + "or %0, %0, a1 \n\t" \ + "csrs mstatus, %0 \n\t" \ + : \ + : "r" (_SEGGER_RTT__LockState) \ + : "a1" \ + ); \ + } + #else + #define SEGGER_RTT_LOCK() + #define SEGGER_RTT_UNLOCK() + #endif +#endif + +/********************************************************************* +* +* RTT lock configuration for IAR EWARM +*/ +#ifdef __ICCARM__ + #if (defined (__ARM6M__) && (__CORE__ == __ARM6M__)) || \ + (defined (__ARM8M_BASELINE__) && (__CORE__ == __ARM8M_BASELINE__)) + #define SEGGER_RTT_LOCK() { \ + unsigned int _SEGGER_RTT__LockState; \ + _SEGGER_RTT__LockState = __get_PRIMASK(); \ + __set_PRIMASK(1); + + #define SEGGER_RTT_UNLOCK() __set_PRIMASK(_SEGGER_RTT__LockState); \ + } + #elif (defined (__ARM7EM__) && (__CORE__ == __ARM7EM__)) || \ + (defined (__ARM7M__) && (__CORE__ == __ARM7M__)) || \ + (defined (__ARM8M_MAINLINE__) && (__CORE__ == __ARM8M_MAINLINE__)) || \ + (defined (__ARM8M_MAINLINE__) && (__CORE__ == __ARM8M_MAINLINE__)) + #ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY + #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20) + #endif + #define SEGGER_RTT_LOCK() { \ + unsigned int _SEGGER_RTT__LockState; \ + _SEGGER_RTT__LockState = __get_BASEPRI(); \ + __set_BASEPRI(SEGGER_RTT_MAX_INTERRUPT_PRIORITY); + + #define SEGGER_RTT_UNLOCK() __set_BASEPRI(_SEGGER_RTT__LockState); \ + } + #elif (defined (__ARM7A__) && (__CORE__ == __ARM7A__)) || \ + (defined (__ARM7R__) && (__CORE__ == __ARM7R__)) + #define SEGGER_RTT_LOCK() { \ + unsigned int _SEGGER_RTT__LockState; \ + __asm volatile ("mrs r1, CPSR \n\t" \ + "mov %0, r1 \n\t" \ + "orr r1, r1, #0xC0 \n\t" \ + "msr CPSR_c, r1 \n\t" \ + : "=r" (_SEGGER_RTT__LockState) \ + : \ + : "r1", "cc" \ + ); + + #define SEGGER_RTT_UNLOCK() __asm volatile ("mov r0, %0 \n\t" \ + "mrs r1, CPSR \n\t" \ + "bic r1, r1, #0xC0 \n\t" \ + "and r0, r0, #0xC0 \n\t" \ + "orr r1, r1, r0 \n\t" \ + "msr CPSR_c, r1 \n\t" \ + : \ + : "r" (_SEGGER_RTT__LockState) \ + : "r0", "r1", "cc" \ + ); \ + } + #endif +#endif + +/********************************************************************* +* +* RTT lock configuration for IAR RX +*/ +#ifdef __ICCRX__ + #define SEGGER_RTT_LOCK() { \ + unsigned long _SEGGER_RTT__LockState; \ + _SEGGER_RTT__LockState = __get_interrupt_state(); \ + __disable_interrupt(); + + #define SEGGER_RTT_UNLOCK() __set_interrupt_state(_SEGGER_RTT__LockState); \ + } +#endif + +/********************************************************************* +* +* RTT lock configuration for IAR RL78 +*/ +#ifdef __ICCRL78__ + #define SEGGER_RTT_LOCK() { \ + __istate_t _SEGGER_RTT__LockState; \ + _SEGGER_RTT__LockState = __get_interrupt_state(); \ + __disable_interrupt(); + + #define SEGGER_RTT_UNLOCK() __set_interrupt_state(_SEGGER_RTT__LockState); \ + } +#endif + +/********************************************************************* +* +* RTT lock configuration for KEIL ARM +*/ +#ifdef __CC_ARM + #if (defined __TARGET_ARCH_6S_M) + #define SEGGER_RTT_LOCK() { \ + unsigned int _SEGGER_RTT__LockState; \ + register unsigned char _SEGGER_RTT__PRIMASK __asm( "primask"); \ + _SEGGER_RTT__LockState = _SEGGER_RTT__PRIMASK; \ + _SEGGER_RTT__PRIMASK = 1u; \ + __schedule_barrier(); + + #define SEGGER_RTT_UNLOCK() _SEGGER_RTT__PRIMASK = _SEGGER_RTT__LockState; \ + __schedule_barrier(); \ + } + #elif (defined(__TARGET_ARCH_7_M) || defined(__TARGET_ARCH_7E_M)) + #ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY + #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20) + #endif + #define SEGGER_RTT_LOCK() { \ + unsigned int _SEGGER_RTT__LockState; \ + register unsigned char BASEPRI __asm( "basepri"); \ + _SEGGER_RTT__LockState = BASEPRI; \ + BASEPRI = SEGGER_RTT_MAX_INTERRUPT_PRIORITY; \ + __schedule_barrier(); + + #define SEGGER_RTT_UNLOCK() BASEPRI = _SEGGER_RTT__LockState; \ + __schedule_barrier(); \ + } + #endif +#endif + +/********************************************************************* +* +* RTT lock configuration for TI ARM +*/ +#ifdef __TI_ARM__ + #if defined (__TI_ARM_V6M0__) + #define SEGGER_RTT_LOCK() { \ + unsigned int _SEGGER_RTT__LockState; \ + _SEGGER_RTT__LockState = __get_PRIMASK(); \ + __set_PRIMASK(1); + + #define SEGGER_RTT_UNLOCK() __set_PRIMASK(_SEGGER_RTT__LockState); \ + } + #elif (defined (__TI_ARM_V7M3__) || defined (__TI_ARM_V7M4__)) + #ifndef SEGGER_RTT_MAX_INTERRUPT_PRIORITY + #define SEGGER_RTT_MAX_INTERRUPT_PRIORITY (0x20) + #endif + #define SEGGER_RTT_LOCK() { \ + unsigned int _SEGGER_RTT__LockState; \ + _SEGGER_RTT__LockState = _set_interrupt_priority(SEGGER_RTT_MAX_INTERRUPT_PRIORITY); + + #define SEGGER_RTT_UNLOCK() _set_interrupt_priority(_SEGGER_RTT__LockState); \ + } + #endif +#endif + +/********************************************************************* +* +* RTT lock configuration for CCRX +*/ +#ifdef __RX + #include + #define SEGGER_RTT_LOCK() { \ + unsigned long _SEGGER_RTT__LockState; \ + _SEGGER_RTT__LockState = get_psw() & 0x010000; \ + clrpsw_i(); + + #define SEGGER_RTT_UNLOCK() set_psw(get_psw() | _SEGGER_RTT__LockState); \ + } +#endif + +/********************************************************************* +* +* RTT lock configuration for embOS Simulation on Windows +* (Can also be used for generic RTT locking with embOS) +*/ +#if defined(WIN32) || defined(SEGGER_RTT_LOCK_EMBOS) + +void OS_SIM_EnterCriticalSection(void); +void OS_SIM_LeaveCriticalSection(void); + +#define SEGGER_RTT_LOCK() { \ + OS_SIM_EnterCriticalSection(); + +#define SEGGER_RTT_UNLOCK() OS_SIM_LeaveCriticalSection(); \ + } +#endif + +/********************************************************************* +* +* RTT lock configuration fallback +*/ +#ifndef SEGGER_RTT_LOCK + #define SEGGER_RTT_LOCK() // Lock RTT (nestable) (i.e. disable interrupts) +#endif + +#ifndef SEGGER_RTT_UNLOCK + #define SEGGER_RTT_UNLOCK() // Unlock RTT (nestable) (i.e. enable previous interrupt lock state) +#endif + +#endif +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Config/SEGGER_SYSVIEW_Conf.h b/resources_extra/SystemView_Src_V320/Config/SEGGER_SYSVIEW_Conf.h new file mode 100644 index 0000000..ef9df03 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Config/SEGGER_SYSVIEW_Conf.h @@ -0,0 +1,85 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Conf.h +Purpose : SEGGER SystemView configuration file. + Set defines which deviate from the defaults (see SEGGER_SYSVIEW_ConfDefaults.h) here. +Revision: $Rev: 21292 $ + +Additional information: + Required defines which must be set are: + SEGGER_SYSVIEW_GET_TIMESTAMP + SEGGER_SYSVIEW_GET_INTERRUPT_ID + For known compilers and cores, these might be set to good defaults + in SEGGER_SYSVIEW_ConfDefaults.h. + + SystemView needs a (nestable) locking mechanism. + If not defined, the RTT locking mechanism is used, + which then needs to be properly configured. +*/ + +#ifndef SEGGER_SYSVIEW_CONF_H +#define SEGGER_SYSVIEW_CONF_H + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ + +/********************************************************************* +* TODO: Add your defines here. * +********************************************************************** +*/ + + +#endif // SEGGER_SYSVIEW_CONF_H + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/SEGGER/SEGGER.h b/resources_extra/SystemView_Src_V320/SEGGER/SEGGER.h new file mode 100644 index 0000000..397bae8 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/SEGGER/SEGGER.h @@ -0,0 +1,248 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +---------------------------------------------------------------------- +File : SEGGER.h +Purpose : Global types etc & general purpose utility functions +Revision: $Rev: 18102 $ +---------------------------END-OF-HEADER------------------------------ +*/ + +#ifndef SEGGER_H // Guard against multiple inclusion +#define SEGGER_H + +#include // For va_list. +#include "Global.h" // Type definitions: U8, U16, U32, I8, I16, I32 + +#if defined(__cplusplus) +extern "C" { /* Make sure we have C-declarations in C++ programs */ +#endif + +/********************************************************************* +* +* Keywords/specifiers +* +********************************************************************** +*/ + +#ifndef INLINE + #if (defined(__ICCARM__) || defined(__RX) || defined(__ICCRX__)) + // + // Other known compilers. + // + #define INLINE inline + #else + #if (defined(_WIN32) && !defined(__clang__)) + // + // Microsoft VC6 and newer. + // Force inlining without cost checking. + // + #define INLINE __forceinline + #elif defined(__GNUC__) || defined(__clang__) + // + // Force inlining with GCC + clang + // + #define INLINE inline __attribute__((always_inline)) + #elif (defined(__CC_ARM)) + // + // Force inlining with ARMCC (Keil) + // + #define INLINE __inline + #else + // + // Unknown compilers. + // + #define INLINE + #endif + #endif +#endif + +/********************************************************************* +* +* Function-like macros +* +********************************************************************** +*/ + +#define SEGGER_COUNTOF(a) (sizeof((a))/sizeof((a)[0])) +#define SEGGER_MIN(a,b) (((a) < (b)) ? (a) : (b)) +#define SEGGER_MAX(a,b) (((a) > (b)) ? (a) : (b)) + +#ifndef SEGGER_USE_PARA // Some compiler complain about unused parameters. + #define SEGGER_USE_PARA(Para) (void)Para // This works for most compilers. +#endif + +#define SEGGER_ADDR2PTR(Type, Addr) (/*lint -e(923) -e(9078)*/((Type*)((PTR_ADDR)(Addr)))) // Allow cast from address to pointer. +#define SEGGER_PTR2ADDR(p) (/*lint -e(923) -e(9078)*/((PTR_ADDR)(p))) // Allow cast from pointer to address. +#define SEGGER_PTR2PTR(Type, p) (/*lint -e(740) -e(826) -e(9079) -e(9087)*/((Type*)(p))) // Allow cast from one pointer type to another (ignore different size). +#define SEGGER_PTR_DISTANCE(p0, p1) (SEGGER_PTR2ADDR(p0) - SEGGER_PTR2ADDR(p1)) + +/********************************************************************* +* +* Defines +* +********************************************************************** +*/ + +#define SEGGER_PRINTF_FLAG_ADJLEFT (1 << 0) +#define SEGGER_PRINTF_FLAG_SIGNFORCE (1 << 1) +#define SEGGER_PRINTF_FLAG_SIGNSPACE (1 << 2) +#define SEGGER_PRINTF_FLAG_PRECEED (1 << 3) +#define SEGGER_PRINTF_FLAG_ZEROPAD (1 << 4) +#define SEGGER_PRINTF_FLAG_NEGATIVE (1 << 5) + +/********************************************************************* +* +* Types +* +********************************************************************** +*/ + +typedef struct { + char* pBuffer; + int BufferSize; + int Cnt; +} SEGGER_BUFFER_DESC; + +typedef struct { + unsigned int CacheLineSize; // 0: No Cache. Most Systems such as ARM9 use a 32 bytes cache line size. + void (*pfDMB) (void); // Optional DMB function for Data Memory Barrier to make sure all memory operations are completed. + void (*pfClean) (void *p, unsigned long NumBytes); // Optional clean function for cached memory. + void (*pfInvalidate)(void *p, unsigned long NumBytes); // Optional invalidate function for cached memory. +} SEGGER_CACHE_CONFIG; + +typedef struct SEGGER_SNPRINTF_CONTEXT_struct SEGGER_SNPRINTF_CONTEXT; + +struct SEGGER_SNPRINTF_CONTEXT_struct { + void* pContext; // Application specific context. + SEGGER_BUFFER_DESC* pBufferDesc; // Buffer descriptor to use for output. + void (*pfFlush)(SEGGER_SNPRINTF_CONTEXT* pContext); // Callback executed once the buffer is full. Callback decides if the buffer gets cleared to store more or not. +}; + +typedef struct { + void (*pfStoreChar) (SEGGER_BUFFER_DESC* pBufferDesc, SEGGER_SNPRINTF_CONTEXT* pContext, char c); + int (*pfPrintUnsigned) (SEGGER_BUFFER_DESC* pBufferDesc, SEGGER_SNPRINTF_CONTEXT* pContext, U32 v, unsigned Base, char Flags, int Width, int Precision); + int (*pfPrintInt) (SEGGER_BUFFER_DESC* pBufferDesc, SEGGER_SNPRINTF_CONTEXT* pContext, I32 v, unsigned Base, char Flags, int Width, int Precision); +} SEGGER_PRINTF_API; + +typedef void (*SEGGER_pFormatter)(SEGGER_BUFFER_DESC* pBufferDesc, SEGGER_SNPRINTF_CONTEXT* pContext, const SEGGER_PRINTF_API* pApi, va_list* pParamList, char Lead, int Width, int Precision); + +typedef struct SEGGER_PRINTF_FORMATTER { + struct SEGGER_PRINTF_FORMATTER* pNext; // Pointer to next formatter. + SEGGER_pFormatter pfFormatter; // Formatter function. + char Specifier; // Format specifier. +} SEGGER_PRINTF_FORMATTER; + +typedef struct { + U32 (*pfGetHPTimestamp)(void); // Mandatory, pfGetHPTimestamp + int (*pfGetUID) (U8 abUID[16]); // Optional, pfGetUID +} SEGGER_BSP_API; + +/********************************************************************* +* +* Utility functions +* +********************************************************************** +*/ + +// +// Memory operations. +// +void SEGGER_ARM_memcpy(void* pDest, const void* pSrc, int NumBytes); +void SEGGER_memcpy (void* pDest, const void* pSrc, unsigned NumBytes); +void SEGGER_memxor (void* pDest, const void* pSrc, unsigned NumBytes); + +// +// String functions. +// +int SEGGER_atoi (const char* s); +int SEGGER_isalnum (int c); +int SEGGER_isalpha (int c); +unsigned SEGGER_strlen (const char* s); +int SEGGER_tolower (int c); +int SEGGER_strcasecmp (const char* sText1, const char* sText2); +int SEGGER_strncasecmp(const char *sText1, const char *sText2, unsigned Count); + +// +// Buffer/printf related. +// +void SEGGER_StoreChar (SEGGER_BUFFER_DESC* pBufferDesc, char c); +void SEGGER_PrintUnsigned(SEGGER_BUFFER_DESC* pBufferDesc, U32 v, unsigned Base, int Precision); +void SEGGER_PrintInt (SEGGER_BUFFER_DESC* pBufferDesc, I32 v, unsigned Base, int Precision); +int SEGGER_snprintf (char* pBuffer, int BufferSize, const char* sFormat, ...); +int SEGGER_vsnprintf (char* pBuffer, int BufferSize, const char* sFormat, va_list ParamList); +int SEGGER_vsnprintfEx (SEGGER_SNPRINTF_CONTEXT* pContext, const char* sFormat, va_list ParamList); + +int SEGGER_PRINTF_AddFormatter (SEGGER_PRINTF_FORMATTER* pFormatter, SEGGER_pFormatter pfFormatter, char c); +void SEGGER_PRINTF_AddDoubleFormatter (void); +void SEGGER_PRINTF_AddIPFormatter (void); +void SEGGER_PRINTF_AddBLUEFormatter (void); +void SEGGER_PRINTF_AddCONNECTFormatter(void); +void SEGGER_PRINTF_AddSSLFormatter (void); +void SEGGER_PRINTF_AddSSHFormatter (void); +void SEGGER_PRINTF_AddHTMLFormatter (void); + +// +// BSP abstraction API. +// +int SEGGER_BSP_GetUID (U8 abUID[16]); +int SEGGER_BSP_GetUID32(U32* pUID); +void SEGGER_BSP_SetAPI (const SEGGER_BSP_API* pAPI); +void SEGGER_BSP_SeedUID (void); + +// +// Other API. +// +void SEGGER_VERSION_GetString(char acText[8], unsigned Version); + +#if defined(__cplusplus) +} /* Make sure we have C-declarations in C++ programs */ +#endif + +#endif // Avoid multiple inclusion + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/SEGGER/SEGGER_RTT.c b/resources_extra/SystemView_Src_V320/SEGGER/SEGGER_RTT.c new file mode 100644 index 0000000..27b4514 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/SEGGER/SEGGER_RTT.c @@ -0,0 +1,2065 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +---------------------------END-OF-HEADER------------------------------ +File : SEGGER_RTT.c +Purpose : Implementation of SEGGER real-time transfer (RTT) which + allows real-time communication on targets which support + debugger memory accesses while the CPU is running. +Revision: $Rev: 20869 $ + +Additional information: + Type "int" is assumed to be 32-bits in size + H->T Host to target communication + T->H Target to host communication + + RTT channel 0 is always present and reserved for Terminal usage. + Name is fixed to "Terminal" + + Effective buffer size: SizeOfBuffer - 1 + + WrOff == RdOff: Buffer is empty + WrOff == (RdOff - 1): Buffer is full + WrOff > RdOff: Free space includes wrap-around + WrOff < RdOff: Used space includes wrap-around + (WrOff == (SizeOfBuffer - 1)) && (RdOff == 0): + Buffer full and wrap-around after next byte + + +---------------------------------------------------------------------- +*/ + +#include "SEGGER_RTT.h" + +#include // for memcpy + +/********************************************************************* +* +* Configuration, default values +* +********************************************************************** +*/ + +#if SEGGER_RTT_CPU_CACHE_LINE_SIZE + #ifdef SEGGER_RTT_CB_ALIGN + #error "Custom SEGGER_RTT_CB_ALIGN() is not supported for SEGGER_RTT_CPU_CACHE_LINE_SIZE != 0" + #endif + #ifdef SEGGER_RTT_BUFFER_ALIGN + #error "Custom SEGGER_RTT_BUFFER_ALIGN() is not supported for SEGGER_RTT_CPU_CACHE_LINE_SIZE != 0" + #endif + #ifdef SEGGER_RTT_PUT_CB_SECTION + #error "Custom SEGGER_RTT_PUT_CB_SECTION() is not supported for SEGGER_RTT_CPU_CACHE_LINE_SIZE != 0" + #endif + #ifdef SEGGER_RTT_PUT_BUFFER_SECTION + #error "Custom SEGGER_RTT_PUT_BUFFER_SECTION() is not supported for SEGGER_RTT_CPU_CACHE_LINE_SIZE != 0" + #endif + #ifdef SEGGER_RTT_BUFFER_ALIGNMENT + #error "Custom SEGGER_RTT_BUFFER_ALIGNMENT is not supported for SEGGER_RTT_CPU_CACHE_LINE_SIZE != 0" + #endif + #ifdef SEGGER_RTT_ALIGNMENT + #error "Custom SEGGER_RTT_ALIGNMENT is not supported for SEGGER_RTT_CPU_CACHE_LINE_SIZE != 0" + #endif +#endif + +#ifndef BUFFER_SIZE_UP + #define BUFFER_SIZE_UP 1024 // Size of the buffer for terminal output of target, up to host +#endif + +#ifndef BUFFER_SIZE_DOWN + #define BUFFER_SIZE_DOWN 16 // Size of the buffer for terminal input to target from host (Usually keyboard input) +#endif + +#ifndef SEGGER_RTT_MAX_NUM_UP_BUFFERS + #define SEGGER_RTT_MAX_NUM_UP_BUFFERS 2 // Number of up-buffers (T->H) available on this target +#endif + +#ifndef SEGGER_RTT_MAX_NUM_DOWN_BUFFERS + #define SEGGER_RTT_MAX_NUM_DOWN_BUFFERS 2 // Number of down-buffers (H->T) available on this target +#endif + +#ifndef SEGGER_RTT_BUFFER_SECTION + #if defined(SEGGER_RTT_SECTION) + #define SEGGER_RTT_BUFFER_SECTION SEGGER_RTT_SECTION + #endif +#endif + +#ifndef SEGGER_RTT_ALIGNMENT + #define SEGGER_RTT_ALIGNMENT SEGGER_RTT_CPU_CACHE_LINE_SIZE +#endif + +#ifndef SEGGER_RTT_BUFFER_ALIGNMENT + #define SEGGER_RTT_BUFFER_ALIGNMENT SEGGER_RTT_CPU_CACHE_LINE_SIZE +#endif + +#ifndef SEGGER_RTT_MODE_DEFAULT + #define SEGGER_RTT_MODE_DEFAULT SEGGER_RTT_MODE_NO_BLOCK_SKIP +#endif + +#ifndef SEGGER_RTT_LOCK + #define SEGGER_RTT_LOCK() +#endif + +#ifndef SEGGER_RTT_UNLOCK + #define SEGGER_RTT_UNLOCK() +#endif + +#ifndef STRLEN + #define STRLEN(a) strlen((a)) +#endif + +#ifndef STRCPY + #define STRCPY(pDest, pSrc) strcpy((pDest), (pSrc)) +#endif + +#ifndef SEGGER_RTT_MEMCPY_USE_BYTELOOP + #define SEGGER_RTT_MEMCPY_USE_BYTELOOP 0 +#endif + +#ifndef SEGGER_RTT_MEMCPY + #ifdef MEMCPY + #define SEGGER_RTT_MEMCPY(pDest, pSrc, NumBytes) MEMCPY((pDest), (pSrc), (NumBytes)) + #else + #define SEGGER_RTT_MEMCPY(pDest, pSrc, NumBytes) memcpy((pDest), (pSrc), (NumBytes)) + #endif +#endif + +#ifndef MIN + #define MIN(a, b) (((a) < (b)) ? (a) : (b)) +#endif + +#ifndef MAX + #define MAX(a, b) (((a) > (b)) ? (a) : (b)) +#endif +// +// For some environments, NULL may not be defined until certain headers are included +// +#ifndef NULL + #define NULL 0 +#endif + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ +#if (defined __ICCARM__) || (defined __ICCRX__) + #define RTT_PRAGMA(P) _Pragma(#P) +#endif + +#if SEGGER_RTT_ALIGNMENT || SEGGER_RTT_BUFFER_ALIGNMENT + #if (defined __GNUC__) + #define SEGGER_RTT_ALIGN(Var, Alignment) Var __attribute__ ((aligned (Alignment))) + #elif (defined __ICCARM__) || (defined __ICCRX__) + #define PRAGMA(A) _Pragma(#A) +#define SEGGER_RTT_ALIGN(Var, Alignment) RTT_PRAGMA(data_alignment=Alignment) \ + Var + #elif (defined __CC_ARM) + #define SEGGER_RTT_ALIGN(Var, Alignment) Var __attribute__ ((aligned (Alignment))) + #else + #error "Alignment not supported for this compiler." + #endif +#else + #define SEGGER_RTT_ALIGN(Var, Alignment) Var +#endif + +#if defined(SEGGER_RTT_SECTION) || defined (SEGGER_RTT_BUFFER_SECTION) + #if (defined __GNUC__) + #define SEGGER_RTT_PUT_SECTION(Var, Section) __attribute__ ((section (Section))) Var + #elif (defined __ICCARM__) || (defined __ICCRX__) +#define SEGGER_RTT_PUT_SECTION(Var, Section) RTT_PRAGMA(location=Section) \ + Var + #elif (defined __CC_ARM) + #define SEGGER_RTT_PUT_SECTION(Var, Section) __attribute__ ((section (Section), zero_init)) Var + #else + #error "Section placement not supported for this compiler." + #endif +#else + #define SEGGER_RTT_PUT_SECTION(Var, Section) Var +#endif + +#if SEGGER_RTT_ALIGNMENT + #define SEGGER_RTT_CB_ALIGN(Var) SEGGER_RTT_ALIGN(Var, SEGGER_RTT_ALIGNMENT) +#else + #define SEGGER_RTT_CB_ALIGN(Var) Var +#endif + +#if SEGGER_RTT_BUFFER_ALIGNMENT + #define SEGGER_RTT_BUFFER_ALIGN(Var) SEGGER_RTT_ALIGN(Var, SEGGER_RTT_BUFFER_ALIGNMENT) +#else + #define SEGGER_RTT_BUFFER_ALIGN(Var) Var +#endif + + +#if defined(SEGGER_RTT_SECTION) + #define SEGGER_RTT_PUT_CB_SECTION(Var) SEGGER_RTT_PUT_SECTION(Var, SEGGER_RTT_SECTION) +#else + #define SEGGER_RTT_PUT_CB_SECTION(Var) Var +#endif + +#if defined(SEGGER_RTT_BUFFER_SECTION) + #define SEGGER_RTT_PUT_BUFFER_SECTION(Var) SEGGER_RTT_PUT_SECTION(Var, SEGGER_RTT_BUFFER_SECTION) +#else + #define SEGGER_RTT_PUT_BUFFER_SECTION(Var) Var +#endif + +/********************************************************************* +* +* Static const data +* +********************************************************************** +*/ + +static unsigned char _aTerminalId[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; + +/********************************************************************* +* +* Static data +* +********************************************************************** +*/ + +// +// RTT Control Block and allocate buffers for channel 0 +// +SEGGER_RTT_PUT_CB_SECTION(SEGGER_RTT_CB_ALIGN(SEGGER_RTT_CB _SEGGER_RTT)); +SEGGER_RTT_PUT_BUFFER_SECTION(SEGGER_RTT_BUFFER_ALIGN(static char _acUpBuffer [SEGGER_RTT__ROUND_UP_2_CACHE_LINE_SIZE(BUFFER_SIZE_UP)])); +SEGGER_RTT_PUT_BUFFER_SECTION(SEGGER_RTT_BUFFER_ALIGN(static char _acDownBuffer[SEGGER_RTT__ROUND_UP_2_CACHE_LINE_SIZE(BUFFER_SIZE_DOWN)])); + +static unsigned char _ActiveTerminal; + +/********************************************************************* +* +* Static functions +* +********************************************************************** +*/ + +/********************************************************************* +* +* _DoInit() +* +* Function description +* Initializes the control block an buffers. +* May only be called via INIT() to avoid overriding settings. +* +*/ +#define INIT() { \ + volatile SEGGER_RTT_CB* pRTTCBInit; \ + pRTTCBInit = (volatile SEGGER_RTT_CB*)((char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); \ + do { \ + if (pRTTCBInit->acID[0] == '\0') { \ + _DoInit(); \ + } \ + } while (0); \ + } + +static void _DoInit(void) { + volatile SEGGER_RTT_CB* p; // Volatile to make sure that compiler cannot change the order of accesses to the control block + // + // Initialize control block + // + p = (volatile SEGGER_RTT_CB*)((char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access control block uncached so that nothing in the cache ever becomes dirty and all changes are visible in HW directly + p->MaxNumUpBuffers = SEGGER_RTT_MAX_NUM_UP_BUFFERS; + p->MaxNumDownBuffers = SEGGER_RTT_MAX_NUM_DOWN_BUFFERS; + // + // Initialize up buffer 0 + // + p->aUp[0].sName = "Terminal"; + p->aUp[0].pBuffer = _acUpBuffer; + p->aUp[0].SizeOfBuffer = BUFFER_SIZE_UP; + p->aUp[0].RdOff = 0u; + p->aUp[0].WrOff = 0u; + p->aUp[0].Flags = SEGGER_RTT_MODE_DEFAULT; + // + // Initialize down buffer 0 + // + p->aDown[0].sName = "Terminal"; + p->aDown[0].pBuffer = _acDownBuffer; + p->aDown[0].SizeOfBuffer = BUFFER_SIZE_DOWN; + p->aDown[0].RdOff = 0u; + p->aDown[0].WrOff = 0u; + p->aDown[0].Flags = SEGGER_RTT_MODE_DEFAULT; + // + // Finish initialization of the control block. + // Copy Id string in three steps to make sure "SEGGER RTT" is not found + // in initializer memory (usually flash) by J-Link + // + STRCPY((char*)&p->acID[7], "RTT"); + RTT__DMB(); // Force order of memory accessed inside core for cores that allow to change the order + STRCPY((char*)&p->acID[0], "SEGGER"); + RTT__DMB(); // Force order of memory accessed inside core for cores that allow to change the order + p->acID[6] = ' '; + RTT__DMB(); // Force order of memory accessed inside core for cores that allow to change the order +} + +/********************************************************************* +* +* _WriteBlocking() +* +* Function description +* Stores a specified number of characters in SEGGER RTT ring buffer +* and updates the associated write pointer which is periodically +* read by the host. +* The caller is responsible for managing the write chunk sizes as +* _WriteBlocking() will block until all data has been posted successfully. +* +* Parameters +* pRing Ring buffer to post to. +* pBuffer Pointer to character array. Does not need to point to a \0 terminated string. +* NumBytes Number of bytes to be stored in the SEGGER RTT control block. +* +* Return value +* >= 0 - Number of bytes written into buffer. +*/ +static unsigned _WriteBlocking(SEGGER_RTT_BUFFER_UP* pRing, const char* pBuffer, unsigned NumBytes) { + unsigned NumBytesToWrite; + unsigned NumBytesWritten; + unsigned RdOff; + unsigned WrOff; + volatile char* pDst; + // + // Write data to buffer and handle wrap-around if necessary + // + NumBytesWritten = 0u; + WrOff = pRing->WrOff; + do { + RdOff = pRing->RdOff; // May be changed by host (debug probe) in the meantime + if (RdOff > WrOff) { + NumBytesToWrite = RdOff - WrOff - 1u; + } else { + NumBytesToWrite = pRing->SizeOfBuffer - (WrOff - RdOff + 1u); + } + NumBytesToWrite = MIN(NumBytesToWrite, (pRing->SizeOfBuffer - WrOff)); // Number of bytes that can be written until buffer wrap-around + NumBytesToWrite = MIN(NumBytesToWrite, NumBytes); + pDst = (pRing->pBuffer + WrOff) + SEGGER_RTT_UNCACHED_OFF; +#if SEGGER_RTT_MEMCPY_USE_BYTELOOP + NumBytesWritten += NumBytesToWrite; + NumBytes -= NumBytesToWrite; + WrOff += NumBytesToWrite; + while (NumBytesToWrite--) { + *pDst++ = *pBuffer++; + }; +#else + SEGGER_RTT_MEMCPY((void*)pDst, pBuffer, NumBytesToWrite); + NumBytesWritten += NumBytesToWrite; + pBuffer += NumBytesToWrite; + NumBytes -= NumBytesToWrite; + WrOff += NumBytesToWrite; +#endif + if (WrOff == pRing->SizeOfBuffer) { + WrOff = 0u; + } + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff = WrOff; + } while (NumBytes); + return NumBytesWritten; +} + +/********************************************************************* +* +* _WriteNoCheck() +* +* Function description +* Stores a specified number of characters in SEGGER RTT ring buffer +* and updates the associated write pointer which is periodically +* read by the host. +* It is callers responsibility to make sure data actually fits in buffer. +* +* Parameters +* pRing Ring buffer to post to. +* pBuffer Pointer to character array. Does not need to point to a \0 terminated string. +* NumBytes Number of bytes to be stored in the SEGGER RTT control block. +* +* Notes +* (1) If there might not be enough space in the "Up"-buffer, call _WriteBlocking +*/ +static void _WriteNoCheck(SEGGER_RTT_BUFFER_UP* pRing, const char* pData, unsigned NumBytes) { + unsigned NumBytesAtOnce; + unsigned WrOff; + unsigned Rem; + volatile char* pDst; + + WrOff = pRing->WrOff; + Rem = pRing->SizeOfBuffer - WrOff; + if (Rem > NumBytes) { + // + // All data fits before wrap around + // + pDst = (pRing->pBuffer + WrOff) + SEGGER_RTT_UNCACHED_OFF; +#if SEGGER_RTT_MEMCPY_USE_BYTELOOP + WrOff += NumBytes; + while (NumBytes--) { + *pDst++ = *pData++; + }; + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff = WrOff; +#else + SEGGER_RTT_MEMCPY((void*)pDst, pData, NumBytes); + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff = WrOff + NumBytes; +#endif + } else { + // + // We reach the end of the buffer, so need to wrap around + // +#if SEGGER_RTT_MEMCPY_USE_BYTELOOP + pDst = (pRing->pBuffer + WrOff) + SEGGER_RTT_UNCACHED_OFF; + NumBytesAtOnce = Rem; + while (NumBytesAtOnce--) { + *pDst++ = *pData++; + }; + pDst = pRing->pBuffer + SEGGER_RTT_UNCACHED_OFF; + NumBytesAtOnce = NumBytes - Rem; + while (NumBytesAtOnce--) { + *pDst++ = *pData++; + }; + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff = NumBytes - Rem; +#else + NumBytesAtOnce = Rem; + pDst = (pRing->pBuffer + WrOff) + SEGGER_RTT_UNCACHED_OFF; + SEGGER_RTT_MEMCPY((void*)pDst, pData, NumBytesAtOnce); + NumBytesAtOnce = NumBytes - Rem; + pDst = pRing->pBuffer + SEGGER_RTT_UNCACHED_OFF; + SEGGER_RTT_MEMCPY((void*)pDst, pData + Rem, NumBytesAtOnce); + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff = NumBytesAtOnce; +#endif + } +} + +/********************************************************************* +* +* _PostTerminalSwitch() +* +* Function description +* Switch terminal to the given terminal ID. It is the caller's +* responsibility to ensure the terminal ID is correct and there is +* enough space in the buffer for this to complete successfully. +* +* Parameters +* pRing Ring buffer to post to. +* TerminalId Terminal ID to switch to. +*/ +static void _PostTerminalSwitch(SEGGER_RTT_BUFFER_UP* pRing, unsigned char TerminalId) { + unsigned char ac[2]; + + ac[0] = 0xFFu; + ac[1] = _aTerminalId[TerminalId]; // Caller made already sure that TerminalId does not exceed our terminal limit + _WriteBlocking(pRing, (const char*)ac, 2u); +} + +/********************************************************************* +* +* _GetAvailWriteSpace() +* +* Function description +* Returns the number of bytes that can be written to the ring +* buffer without blocking. +* +* Parameters +* pRing Ring buffer to check. +* +* Return value +* Number of bytes that are free in the buffer. +*/ +static unsigned _GetAvailWriteSpace(SEGGER_RTT_BUFFER_UP* pRing) { + unsigned RdOff; + unsigned WrOff; + unsigned r; + // + // Avoid warnings regarding volatile access order. It's not a problem + // in this case, but dampen compiler enthusiasm. + // + RdOff = pRing->RdOff; + WrOff = pRing->WrOff; + if (RdOff <= WrOff) { + r = pRing->SizeOfBuffer - 1u - WrOff + RdOff; + } else { + r = RdOff - WrOff - 1u; + } + return r; +} + +/********************************************************************* +* +* Public code +* +********************************************************************** +*/ + +/********************************************************************* +* +* SEGGER_RTT_ReadUpBufferNoLock() +* +* Function description +* Reads characters from SEGGER real-time-terminal control block +* which have been previously stored by the application. +* Do not lock against interrupts and multiple access. +* Used to do the same operation that J-Link does, to transfer +* RTT data via other channels, such as TCP/IP or UART. +* +* Parameters +* BufferIndex Index of Up-buffer to be used. +* pBuffer Pointer to buffer provided by target application, to copy characters from RTT-up-buffer to. +* BufferSize Size of the target application buffer. +* +* Return value +* Number of bytes that have been read. +* +* Additional information +* This function must not be called when J-Link might also do RTT. +*/ +unsigned SEGGER_RTT_ReadUpBufferNoLock(unsigned BufferIndex, void* pData, unsigned BufferSize) { + unsigned NumBytesRem; + unsigned NumBytesRead; + unsigned RdOff; + unsigned WrOff; + unsigned char* pBuffer; + SEGGER_RTT_BUFFER_UP* pRing; + volatile char* pSrc; + + INIT(); + pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + pBuffer = (unsigned char*)pData; + RdOff = pRing->RdOff; + WrOff = pRing->WrOff; + NumBytesRead = 0u; + // + // Read from current read position to wrap-around of buffer, first + // + if (RdOff > WrOff) { + NumBytesRem = pRing->SizeOfBuffer - RdOff; + NumBytesRem = MIN(NumBytesRem, BufferSize); + pSrc = (pRing->pBuffer + RdOff) + SEGGER_RTT_UNCACHED_OFF; +#if SEGGER_RTT_MEMCPY_USE_BYTELOOP + NumBytesRead += NumBytesRem; + BufferSize -= NumBytesRem; + RdOff += NumBytesRem; + while (NumBytesRem--) { + *pBuffer++ = *pSrc++; + }; +#else + SEGGER_RTT_MEMCPY(pBuffer, (void*)pSrc, NumBytesRem); + NumBytesRead += NumBytesRem; + pBuffer += NumBytesRem; + BufferSize -= NumBytesRem; + RdOff += NumBytesRem; +#endif + // + // Handle wrap-around of buffer + // + if (RdOff == pRing->SizeOfBuffer) { + RdOff = 0u; + } + } + // + // Read remaining items of buffer + // + NumBytesRem = WrOff - RdOff; + NumBytesRem = MIN(NumBytesRem, BufferSize); + if (NumBytesRem > 0u) { + pSrc = (pRing->pBuffer + RdOff) + SEGGER_RTT_UNCACHED_OFF; +#if SEGGER_RTT_MEMCPY_USE_BYTELOOP + NumBytesRead += NumBytesRem; + BufferSize -= NumBytesRem; + RdOff += NumBytesRem; + while (NumBytesRem--) { + *pBuffer++ = *pSrc++; + }; +#else + SEGGER_RTT_MEMCPY(pBuffer, (void*)pSrc, NumBytesRem); + NumBytesRead += NumBytesRem; + pBuffer += NumBytesRem; + BufferSize -= NumBytesRem; + RdOff += NumBytesRem; +#endif + } + // + // Update read offset of buffer + // + if (NumBytesRead) { + pRing->RdOff = RdOff; + } + // + return NumBytesRead; +} + +/********************************************************************* +* +* SEGGER_RTT_ReadNoLock() +* +* Function description +* Reads characters from SEGGER real-time-terminal control block +* which have been previously stored by the host. +* Do not lock against interrupts and multiple access. +* +* Parameters +* BufferIndex Index of Down-buffer to be used (e.g. 0 for "Terminal"). +* pBuffer Pointer to buffer provided by target application, to copy characters from RTT-down-buffer to. +* BufferSize Size of the target application buffer. +* +* Return value +* Number of bytes that have been read. +*/ +unsigned SEGGER_RTT_ReadNoLock(unsigned BufferIndex, void* pData, unsigned BufferSize) { + unsigned NumBytesRem; + unsigned NumBytesRead; + unsigned RdOff; + unsigned WrOff; + unsigned char* pBuffer; + SEGGER_RTT_BUFFER_DOWN* pRing; + volatile char* pSrc; + // + INIT(); + pRing = (SEGGER_RTT_BUFFER_DOWN*)((char*)&_SEGGER_RTT.aDown[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + pBuffer = (unsigned char*)pData; + RdOff = pRing->RdOff; + WrOff = pRing->WrOff; + NumBytesRead = 0u; + // + // Read from current read position to wrap-around of buffer, first + // + if (RdOff > WrOff) { + NumBytesRem = pRing->SizeOfBuffer - RdOff; + NumBytesRem = MIN(NumBytesRem, BufferSize); + pSrc = (pRing->pBuffer + RdOff) + SEGGER_RTT_UNCACHED_OFF; +#if SEGGER_RTT_MEMCPY_USE_BYTELOOP + NumBytesRead += NumBytesRem; + BufferSize -= NumBytesRem; + RdOff += NumBytesRem; + while (NumBytesRem--) { + *pBuffer++ = *pSrc++; + }; +#else + SEGGER_RTT_MEMCPY(pBuffer, (void*)pSrc, NumBytesRem); + NumBytesRead += NumBytesRem; + pBuffer += NumBytesRem; + BufferSize -= NumBytesRem; + RdOff += NumBytesRem; +#endif + // + // Handle wrap-around of buffer + // + if (RdOff == pRing->SizeOfBuffer) { + RdOff = 0u; + } + } + // + // Read remaining items of buffer + // + NumBytesRem = WrOff - RdOff; + NumBytesRem = MIN(NumBytesRem, BufferSize); + if (NumBytesRem > 0u) { + pSrc = (pRing->pBuffer + RdOff) + SEGGER_RTT_UNCACHED_OFF; +#if SEGGER_RTT_MEMCPY_USE_BYTELOOP + NumBytesRead += NumBytesRem; + BufferSize -= NumBytesRem; + RdOff += NumBytesRem; + while (NumBytesRem--) { + *pBuffer++ = *pSrc++; + }; +#else + SEGGER_RTT_MEMCPY(pBuffer, (void*)pSrc, NumBytesRem); + NumBytesRead += NumBytesRem; + pBuffer += NumBytesRem; + BufferSize -= NumBytesRem; + RdOff += NumBytesRem; +#endif + } + if (NumBytesRead) { + pRing->RdOff = RdOff; + } + // + return NumBytesRead; +} + +/********************************************************************* +* +* SEGGER_RTT_ReadUpBuffer +* +* Function description +* Reads characters from SEGGER real-time-terminal control block +* which have been previously stored by the application. +* Used to do the same operation that J-Link does, to transfer +* RTT data via other channels, such as TCP/IP or UART. +* +* Parameters +* BufferIndex Index of Up-buffer to be used. +* pBuffer Pointer to buffer provided by target application, to copy characters from RTT-up-buffer to. +* BufferSize Size of the target application buffer. +* +* Return value +* Number of bytes that have been read. +* +* Additional information +* This function must not be called when J-Link might also do RTT. +* This function locks against all other RTT operations. I.e. during +* the read operation, writing is also locked. +* If only one consumer reads from the up buffer, +* call sEGGER_RTT_ReadUpBufferNoLock() instead. +*/ +unsigned SEGGER_RTT_ReadUpBuffer(unsigned BufferIndex, void* pBuffer, unsigned BufferSize) { + unsigned NumBytesRead; + + SEGGER_RTT_LOCK(); + // + // Call the non-locking read function + // + NumBytesRead = SEGGER_RTT_ReadUpBufferNoLock(BufferIndex, pBuffer, BufferSize); + // + // Finish up. + // + SEGGER_RTT_UNLOCK(); + // + return NumBytesRead; +} + +/********************************************************************* +* +* SEGGER_RTT_Read +* +* Function description +* Reads characters from SEGGER real-time-terminal control block +* which have been previously stored by the host. +* +* Parameters +* BufferIndex Index of Down-buffer to be used (e.g. 0 for "Terminal"). +* pBuffer Pointer to buffer provided by target application, to copy characters from RTT-down-buffer to. +* BufferSize Size of the target application buffer. +* +* Return value +* Number of bytes that have been read. +*/ +unsigned SEGGER_RTT_Read(unsigned BufferIndex, void* pBuffer, unsigned BufferSize) { + unsigned NumBytesRead; + + SEGGER_RTT_LOCK(); + // + // Call the non-locking read function + // + NumBytesRead = SEGGER_RTT_ReadNoLock(BufferIndex, pBuffer, BufferSize); + // + // Finish up. + // + SEGGER_RTT_UNLOCK(); + // + return NumBytesRead; +} + +/********************************************************************* +* +* SEGGER_RTT_WriteWithOverwriteNoLock +* +* Function description +* Stores a specified number of characters in SEGGER RTT +* control block. +* SEGGER_RTT_WriteWithOverwriteNoLock does not lock the application +* and overwrites data if the data does not fit into the buffer. +* +* Parameters +* BufferIndex Index of "Up"-buffer to be used (e.g. 0 for "Terminal"). +* pBuffer Pointer to character array. Does not need to point to a \0 terminated string. +* NumBytes Number of bytes to be stored in the SEGGER RTT control block. +* +* Notes +* (1) If there is not enough space in the "Up"-buffer, data is overwritten. +* (2) For performance reasons this function does not call Init() +* and may only be called after RTT has been initialized. +* Either by calling SEGGER_RTT_Init() or calling another RTT API function first. +* (3) Do not use SEGGER_RTT_WriteWithOverwriteNoLock if a J-Link +* connection reads RTT data. +*/ +void SEGGER_RTT_WriteWithOverwriteNoLock(unsigned BufferIndex, const void* pBuffer, unsigned NumBytes) { + const char* pData; + SEGGER_RTT_BUFFER_UP* pRing; + unsigned Avail; + volatile char* pDst; + // + // Get "to-host" ring buffer and copy some elements into local variables. + // + pData = (const char *)pBuffer; + pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + // + // Check if we will overwrite data and need to adjust the RdOff. + // + if (pRing->WrOff == pRing->RdOff) { + Avail = pRing->SizeOfBuffer - 1u; + } else if ( pRing->WrOff < pRing->RdOff) { + Avail = pRing->RdOff - pRing->WrOff - 1u; + } else { + Avail = pRing->RdOff - pRing->WrOff - 1u + pRing->SizeOfBuffer; + } + if (NumBytes > Avail) { + pRing->RdOff += (NumBytes - Avail); + while (pRing->RdOff >= pRing->SizeOfBuffer) { + pRing->RdOff -= pRing->SizeOfBuffer; + } + } + // + // Write all data, no need to check the RdOff, but possibly handle multiple wrap-arounds + // + Avail = pRing->SizeOfBuffer - pRing->WrOff; + do { + if (Avail > NumBytes) { + // + // Last round + // + pDst = (pRing->pBuffer + pRing->WrOff) + SEGGER_RTT_UNCACHED_OFF; +#if SEGGER_RTT_MEMCPY_USE_BYTELOOP + Avail = NumBytes; + while (NumBytes--) { + *pDst++ = *pData++; + }; + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff += Avail; +#else + SEGGER_RTT_MEMCPY((void*)pDst, pData, NumBytes); + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff += NumBytes; +#endif + break; + } else { + // + // Wrap-around necessary, write until wrap-around and reset WrOff + // + pDst = (pRing->pBuffer + pRing->WrOff) + SEGGER_RTT_UNCACHED_OFF; +#if SEGGER_RTT_MEMCPY_USE_BYTELOOP + NumBytes -= Avail; + while (Avail--) { + *pDst++ = *pData++; + }; + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff = 0; +#else + SEGGER_RTT_MEMCPY((void*)pDst, pData, Avail); + pData += Avail; + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff = 0; + NumBytes -= Avail; +#endif + Avail = (pRing->SizeOfBuffer - 1); + } + } while (NumBytes); +} + +/********************************************************************* +* +* SEGGER_RTT_WriteSkipNoLock +* +* Function description +* Stores a specified number of characters in SEGGER RTT +* control block which is then read by the host. +* SEGGER_RTT_WriteSkipNoLock does not lock the application and +* skips all data, if the data does not fit into the buffer. +* +* Parameters +* BufferIndex Index of "Up"-buffer to be used (e.g. 0 for "Terminal"). +* pBuffer Pointer to character array. Does not need to point to a \0 terminated string. +* NumBytes Number of bytes to be stored in the SEGGER RTT control block. +* MUST be > 0!!! +* This is done for performance reasons, so no initial check has do be done. +* +* Return value +* 1: Data has been copied +* 0: No space, data has not been copied +* +* Notes +* (1) If there is not enough space in the "Up"-buffer, all data is dropped. +* (2) For performance reasons this function does not call Init() +* and may only be called after RTT has been initialized. +* Either by calling SEGGER_RTT_Init() or calling another RTT API function first. +*/ +#if (RTT_USE_ASM == 0) +unsigned SEGGER_RTT_WriteSkipNoLock(unsigned BufferIndex, const void* pBuffer, unsigned NumBytes) { + const char* pData; + SEGGER_RTT_BUFFER_UP* pRing; + unsigned Avail; + unsigned RdOff; + unsigned WrOff; + unsigned Rem; + volatile char* pDst; + // + // Cases: + // 1) RdOff <= WrOff => Space until wrap-around is sufficient + // 2) RdOff <= WrOff => Space after wrap-around needed (copy in 2 chunks) + // 3) RdOff < WrOff => No space in buf + // 4) RdOff > WrOff => Space is sufficient + // 5) RdOff > WrOff => No space in buf + // + // 1) is the most common case for large buffers and assuming that J-Link reads the data fast enough + // + pData = (const char *)pBuffer; + pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + RdOff = pRing->RdOff; + WrOff = pRing->WrOff; + if (RdOff <= WrOff) { // Case 1), 2) or 3) + Avail = pRing->SizeOfBuffer - WrOff - 1u; // Space until wrap-around (assume 1 byte not usable for case that RdOff == 0) + if (Avail >= NumBytes) { // Case 1)? +CopyStraight: + pDst = (pRing->pBuffer + WrOff) + SEGGER_RTT_UNCACHED_OFF; + memcpy((void*)pDst, pData, NumBytes); + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff = WrOff + NumBytes; + return 1; + } + Avail += RdOff; // Space incl. wrap-around + if (Avail >= NumBytes) { // Case 2? => If not, we have case 3) (does not fit) + Rem = pRing->SizeOfBuffer - WrOff; // Space until end of buffer + pDst = (pRing->pBuffer + WrOff) + SEGGER_RTT_UNCACHED_OFF; + memcpy((void*)pDst, pData, Rem); // Copy 1st chunk + NumBytes -= Rem; + // + // Special case: First check that assumed RdOff == 0 calculated that last element before wrap-around could not be used + // But 2nd check (considering space until wrap-around and until RdOff) revealed that RdOff is not 0, so we can use the last element + // In this case, we may use a copy straight until buffer end anyway without needing to copy 2 chunks + // Therefore, check if 2nd memcpy is necessary at all + // + if (NumBytes) { + pDst = pRing->pBuffer + SEGGER_RTT_UNCACHED_OFF; + memcpy((void*)pDst, pData + Rem, NumBytes); + } + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff = NumBytes; + return 1; + } + } else { // Potential case 4) + Avail = RdOff - WrOff - 1u; + if (Avail >= NumBytes) { // Case 4)? => If not, we have case 5) (does not fit) + goto CopyStraight; + } + } + return 0; // No space in buffer +} +#endif + +/********************************************************************* +* +* SEGGER_RTT_WriteDownBufferNoLock +* +* Function description +* Stores a specified number of characters in SEGGER RTT +* control block inside a buffer. +* SEGGER_RTT_WriteDownBufferNoLock does not lock the application. +* Used to do the same operation that J-Link does, to transfer +* RTT data from other channels, such as TCP/IP or UART. +* +* Parameters +* BufferIndex Index of "Down"-buffer to be used. +* pBuffer Pointer to character array. Does not need to point to a \0 terminated string. +* NumBytes Number of bytes to be stored in the SEGGER RTT control block. +* +* Return value +* Number of bytes which have been stored in the "Down"-buffer. +* +* Notes +* (1) Data is stored according to buffer flags. +* (2) For performance reasons this function does not call Init() +* and may only be called after RTT has been initialized. +* Either by calling SEGGER_RTT_Init() or calling another RTT API function first. +* +* Additional information +* This function must not be called when J-Link might also do RTT. +*/ +unsigned SEGGER_RTT_WriteDownBufferNoLock(unsigned BufferIndex, const void* pBuffer, unsigned NumBytes) { + unsigned Status; + unsigned Avail; + const char* pData; + SEGGER_RTT_BUFFER_UP* pRing; + // + // Get "to-target" ring buffer. + // It is save to cast that to a "to-host" buffer. Up and Down buffer differ in volatility of offsets that might be modified by J-Link. + // + pData = (const char *)pBuffer; + pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aDown[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + // + // How we output depends upon the mode... + // + switch (pRing->Flags) { + case SEGGER_RTT_MODE_NO_BLOCK_SKIP: + // + // If we are in skip mode and there is no space for the whole + // of this output, don't bother. + // + Avail = _GetAvailWriteSpace(pRing); + if (Avail < NumBytes) { + Status = 0u; + } else { + Status = NumBytes; + _WriteNoCheck(pRing, pData, NumBytes); + } + break; + case SEGGER_RTT_MODE_NO_BLOCK_TRIM: + // + // If we are in trim mode, trim to what we can output without blocking. + // + Avail = _GetAvailWriteSpace(pRing); + Status = Avail < NumBytes ? Avail : NumBytes; + _WriteNoCheck(pRing, pData, Status); + break; + case SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL: + // + // If we are in blocking mode, output everything. + // + Status = _WriteBlocking(pRing, pData, NumBytes); + break; + default: + Status = 0u; + break; + } + // + // Finish up. + // + return Status; +} + +/********************************************************************* +* +* SEGGER_RTT_WriteNoLock +* +* Function description +* Stores a specified number of characters in SEGGER RTT +* control block which is then read by the host. +* SEGGER_RTT_WriteNoLock does not lock the application. +* +* Parameters +* BufferIndex Index of "Up"-buffer to be used (e.g. 0 for "Terminal"). +* pBuffer Pointer to character array. Does not need to point to a \0 terminated string. +* NumBytes Number of bytes to be stored in the SEGGER RTT control block. +* +* Return value +* Number of bytes which have been stored in the "Up"-buffer. +* +* Notes +* (1) Data is stored according to buffer flags. +* (2) For performance reasons this function does not call Init() +* and may only be called after RTT has been initialized. +* Either by calling SEGGER_RTT_Init() or calling another RTT API function first. +*/ +unsigned SEGGER_RTT_WriteNoLock(unsigned BufferIndex, const void* pBuffer, unsigned NumBytes) { + unsigned Status; + unsigned Avail; + const char* pData; + SEGGER_RTT_BUFFER_UP* pRing; + // + // Get "to-host" ring buffer. + // + pData = (const char *)pBuffer; + pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + // + // How we output depends upon the mode... + // + switch (pRing->Flags) { + case SEGGER_RTT_MODE_NO_BLOCK_SKIP: + // + // If we are in skip mode and there is no space for the whole + // of this output, don't bother. + // + Avail = _GetAvailWriteSpace(pRing); + if (Avail < NumBytes) { + Status = 0u; + } else { + Status = NumBytes; + _WriteNoCheck(pRing, pData, NumBytes); + } + break; + case SEGGER_RTT_MODE_NO_BLOCK_TRIM: + // + // If we are in trim mode, trim to what we can output without blocking. + // + Avail = _GetAvailWriteSpace(pRing); + Status = Avail < NumBytes ? Avail : NumBytes; + _WriteNoCheck(pRing, pData, Status); + break; + case SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL: + // + // If we are in blocking mode, output everything. + // + Status = _WriteBlocking(pRing, pData, NumBytes); + break; + default: + Status = 0u; + break; + } + // + // Finish up. + // + return Status; +} + +/********************************************************************* +* +* SEGGER_RTT_WriteDownBuffer +* +* Function description +* Stores a specified number of characters in SEGGER RTT control block in a buffer. +* +* Parameters +* BufferIndex Index of "Up"-buffer to be used (e.g. 0 for "Terminal"). +* pBuffer Pointer to character array. Does not need to point to a \0 terminated string. +* NumBytes Number of bytes to be stored in the SEGGER RTT control block. +* +* Return value +* Number of bytes which have been stored in the "Down"-buffer. +* +* Notes +* (1) Data is stored according to buffer flags. +* +* Additional information +* This function must not be called when J-Link might also do RTT. +* This function locks against all other RTT operations. I.e. during +* the write operation, writing from the application is also locked. +* If only one consumer writes to the down buffer, +* call SEGGER_RTT_WriteDownBufferNoLock() instead. +*/ +unsigned SEGGER_RTT_WriteDownBuffer(unsigned BufferIndex, const void* pBuffer, unsigned NumBytes) { + unsigned Status; + + INIT(); + SEGGER_RTT_LOCK(); + Status = SEGGER_RTT_WriteDownBufferNoLock(BufferIndex, pBuffer, NumBytes); // Call the non-locking write function + SEGGER_RTT_UNLOCK(); + return Status; +} + +/********************************************************************* +* +* SEGGER_RTT_Write +* +* Function description +* Stores a specified number of characters in SEGGER RTT +* control block which is then read by the host. +* +* Parameters +* BufferIndex Index of "Up"-buffer to be used (e.g. 0 for "Terminal"). +* pBuffer Pointer to character array. Does not need to point to a \0 terminated string. +* NumBytes Number of bytes to be stored in the SEGGER RTT control block. +* +* Return value +* Number of bytes which have been stored in the "Up"-buffer. +* +* Notes +* (1) Data is stored according to buffer flags. +*/ +unsigned SEGGER_RTT_Write(unsigned BufferIndex, const void* pBuffer, unsigned NumBytes) { + unsigned Status; + + INIT(); + SEGGER_RTT_LOCK(); + Status = SEGGER_RTT_WriteNoLock(BufferIndex, pBuffer, NumBytes); // Call the non-locking write function + SEGGER_RTT_UNLOCK(); + return Status; +} + +/********************************************************************* +* +* SEGGER_RTT_WriteString +* +* Function description +* Stores string in SEGGER RTT control block. +* This data is read by the host. +* +* Parameters +* BufferIndex Index of "Up"-buffer to be used (e.g. 0 for "Terminal"). +* s Pointer to string. +* +* Return value +* Number of bytes which have been stored in the "Up"-buffer. +* +* Notes +* (1) Data is stored according to buffer flags. +* (2) String passed to this function has to be \0 terminated +* (3) \0 termination character is *not* stored in RTT buffer +*/ +unsigned SEGGER_RTT_WriteString(unsigned BufferIndex, const char* s) { + unsigned Len; + + Len = STRLEN(s); + return SEGGER_RTT_Write(BufferIndex, s, Len); +} + +/********************************************************************* +* +* SEGGER_RTT_PutCharSkipNoLock +* +* Function description +* Stores a single character/byte in SEGGER RTT buffer. +* SEGGER_RTT_PutCharSkipNoLock does not lock the application and +* skips the byte, if it does not fit into the buffer. +* +* Parameters +* BufferIndex Index of "Up"-buffer to be used (e.g. 0 for "Terminal"). +* c Byte to be stored. +* +* Return value +* Number of bytes which have been stored in the "Up"-buffer. +* +* Notes +* (1) If there is not enough space in the "Up"-buffer, the character is dropped. +* (2) For performance reasons this function does not call Init() +* and may only be called after RTT has been initialized. +* Either by calling SEGGER_RTT_Init() or calling another RTT API function first. +*/ + +unsigned SEGGER_RTT_PutCharSkipNoLock(unsigned BufferIndex, char c) { + SEGGER_RTT_BUFFER_UP* pRing; + unsigned WrOff; + unsigned Status; + volatile char* pDst; + // + // Get "to-host" ring buffer. + // + pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + // + // Get write position and handle wrap-around if necessary + // + WrOff = pRing->WrOff + 1; + if (WrOff == pRing->SizeOfBuffer) { + WrOff = 0; + } + // + // Output byte if free space is available + // + if (WrOff != pRing->RdOff) { + pDst = (pRing->pBuffer + pRing->WrOff) + SEGGER_RTT_UNCACHED_OFF; + *pDst = c; + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff = WrOff; + Status = 1; + } else { + Status = 0; + } + // + return Status; +} + +/********************************************************************* +* +* SEGGER_RTT_PutCharSkip +* +* Function description +* Stores a single character/byte in SEGGER RTT buffer. +* +* Parameters +* BufferIndex Index of "Up"-buffer to be used (e.g. 0 for "Terminal"). +* c Byte to be stored. +* +* Return value +* Number of bytes which have been stored in the "Up"-buffer. +* +* Notes +* (1) If there is not enough space in the "Up"-buffer, the character is dropped. +*/ + +unsigned SEGGER_RTT_PutCharSkip(unsigned BufferIndex, char c) { + SEGGER_RTT_BUFFER_UP* pRing; + unsigned WrOff; + unsigned Status; + volatile char* pDst; + // + // Prepare + // + INIT(); + SEGGER_RTT_LOCK(); + // + // Get "to-host" ring buffer. + // + pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + // + // Get write position and handle wrap-around if necessary + // + WrOff = pRing->WrOff + 1; + if (WrOff == pRing->SizeOfBuffer) { + WrOff = 0; + } + // + // Output byte if free space is available + // + if (WrOff != pRing->RdOff) { + pDst = (pRing->pBuffer + pRing->WrOff) + SEGGER_RTT_UNCACHED_OFF; + *pDst = c; + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff = WrOff; + Status = 1; + } else { + Status = 0; + } + // + // Finish up. + // + SEGGER_RTT_UNLOCK(); + // + return Status; +} + + /********************************************************************* +* +* SEGGER_RTT_PutChar +* +* Function description +* Stores a single character/byte in SEGGER RTT buffer. +* +* Parameters +* BufferIndex Index of "Up"-buffer to be used (e.g. 0 for "Terminal"). +* c Byte to be stored. +* +* Return value +* Number of bytes which have been stored in the "Up"-buffer. +* +* Notes +* (1) Data is stored according to buffer flags. +*/ + +unsigned SEGGER_RTT_PutChar(unsigned BufferIndex, char c) { + SEGGER_RTT_BUFFER_UP* pRing; + unsigned WrOff; + unsigned Status; + volatile char* pDst; + // + // Prepare + // + INIT(); + SEGGER_RTT_LOCK(); + // + // Get "to-host" ring buffer. + // + pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + // + // Get write position and handle wrap-around if necessary + // + WrOff = pRing->WrOff + 1; + if (WrOff == pRing->SizeOfBuffer) { + WrOff = 0; + } + // + // Wait for free space if mode is set to blocking + // + if (pRing->Flags == SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL) { + while (WrOff == pRing->RdOff) { + ; + } + } + // + // Output byte if free space is available + // + if (WrOff != pRing->RdOff) { + pDst = (pRing->pBuffer + pRing->WrOff) + SEGGER_RTT_UNCACHED_OFF; + *pDst = c; + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + pRing->WrOff = WrOff; + Status = 1; + } else { + Status = 0; + } + // + // Finish up. + // + SEGGER_RTT_UNLOCK(); + return Status; +} + +/********************************************************************* +* +* SEGGER_RTT_GetKey +* +* Function description +* Reads one character from the SEGGER RTT buffer. +* Host has previously stored data there. +* +* Return value +* < 0 - No character available (buffer empty). +* >= 0 - Character which has been read. (Possible values: 0 - 255) +* +* Notes +* (1) This function is only specified for accesses to RTT buffer 0. +*/ +int SEGGER_RTT_GetKey(void) { + char c; + int r; + + r = (int)SEGGER_RTT_Read(0u, &c, 1u); + if (r == 1) { + r = (int)(unsigned char)c; + } else { + r = -1; + } + return r; +} + +/********************************************************************* +* +* SEGGER_RTT_WaitKey +* +* Function description +* Waits until at least one character is avaible in the SEGGER RTT buffer. +* Once a character is available, it is read and this function returns. +* +* Return value +* >=0 - Character which has been read. +* +* Notes +* (1) This function is only specified for accesses to RTT buffer 0 +* (2) This function is blocking if no character is present in RTT buffer +*/ +int SEGGER_RTT_WaitKey(void) { + int r; + + do { + r = SEGGER_RTT_GetKey(); + } while (r < 0); + return r; +} + +/********************************************************************* +* +* SEGGER_RTT_HasKey +* +* Function description +* Checks if at least one character for reading is available in the SEGGER RTT buffer. +* +* Return value +* == 0 - No characters are available to read. +* == 1 - At least one character is available. +* +* Notes +* (1) This function is only specified for accesses to RTT buffer 0 +*/ +int SEGGER_RTT_HasKey(void) { + SEGGER_RTT_BUFFER_DOWN* pRing; + unsigned RdOff; + int r; + + INIT(); + pRing = (SEGGER_RTT_BUFFER_DOWN*)((char*)&_SEGGER_RTT.aDown[0] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + RdOff = pRing->RdOff; + if (RdOff != pRing->WrOff) { + r = 1; + } else { + r = 0; + } + return r; +} + +/********************************************************************* +* +* SEGGER_RTT_HasData +* +* Function description +* Check if there is data from the host in the given buffer. +* +* Return value: +* ==0: No data +* !=0: Data in buffer +* +*/ +unsigned SEGGER_RTT_HasData(unsigned BufferIndex) { + SEGGER_RTT_BUFFER_DOWN* pRing; + unsigned v; + + pRing = (SEGGER_RTT_BUFFER_DOWN*)((char*)&_SEGGER_RTT.aDown[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + v = pRing->WrOff; + return v - pRing->RdOff; +} + +/********************************************************************* +* +* SEGGER_RTT_HasDataUp +* +* Function description +* Check if there is data remaining to be sent in the given buffer. +* +* Return value: +* ==0: No data +* !=0: Data in buffer +* +*/ +unsigned SEGGER_RTT_HasDataUp(unsigned BufferIndex) { + SEGGER_RTT_BUFFER_UP* pRing; + unsigned v; + + pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + v = pRing->RdOff; + return pRing->WrOff - v; +} + +/********************************************************************* +* +* SEGGER_RTT_AllocDownBuffer +* +* Function description +* Run-time configuration of the next down-buffer (H->T). +* The next buffer, which is not used yet is configured. +* This includes: Buffer address, size, name, flags, ... +* +* Parameters +* sName Pointer to a constant name string. +* pBuffer Pointer to a buffer to be used. +* BufferSize Size of the buffer. +* Flags Operating modes. Define behavior if buffer is full (not enough space for entire message). +* +* Return value +* >= 0 - O.K. Buffer Index +* < 0 - Error +*/ +int SEGGER_RTT_AllocDownBuffer(const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags) { + int BufferIndex; + volatile SEGGER_RTT_CB* pRTTCB; + + INIT(); + SEGGER_RTT_LOCK(); + pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + BufferIndex = 0; + do { + if (pRTTCB->aDown[BufferIndex].pBuffer == NULL) { + break; + } + BufferIndex++; + } while (BufferIndex < pRTTCB->MaxNumDownBuffers); + if (BufferIndex < pRTTCB->MaxNumDownBuffers) { + pRTTCB->aDown[BufferIndex].sName = sName; + pRTTCB->aDown[BufferIndex].pBuffer = (char*)pBuffer; + pRTTCB->aDown[BufferIndex].SizeOfBuffer = BufferSize; + pRTTCB->aDown[BufferIndex].RdOff = 0u; + pRTTCB->aDown[BufferIndex].WrOff = 0u; + pRTTCB->aDown[BufferIndex].Flags = Flags; + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + } else { + BufferIndex = -1; + } + SEGGER_RTT_UNLOCK(); + return BufferIndex; +} + +/********************************************************************* +* +* SEGGER_RTT_AllocUpBuffer +* +* Function description +* Run-time configuration of the next up-buffer (T->H). +* The next buffer, which is not used yet is configured. +* This includes: Buffer address, size, name, flags, ... +* +* Parameters +* sName Pointer to a constant name string. +* pBuffer Pointer to a buffer to be used. +* BufferSize Size of the buffer. +* Flags Operating modes. Define behavior if buffer is full (not enough space for entire message). +* +* Return value +* >= 0 - O.K. Buffer Index +* < 0 - Error +*/ +int SEGGER_RTT_AllocUpBuffer(const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags) { + int BufferIndex; + volatile SEGGER_RTT_CB* pRTTCB; + + INIT(); + SEGGER_RTT_LOCK(); + pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + BufferIndex = 0; + do { + if (pRTTCB->aUp[BufferIndex].pBuffer == NULL) { + break; + } + BufferIndex++; + } while (BufferIndex < pRTTCB->MaxNumUpBuffers); + if (BufferIndex < pRTTCB->MaxNumUpBuffers) { + pRTTCB->aUp[BufferIndex].sName = sName; + pRTTCB->aUp[BufferIndex].pBuffer = (char*)pBuffer; + pRTTCB->aUp[BufferIndex].SizeOfBuffer = BufferSize; + pRTTCB->aUp[BufferIndex].RdOff = 0u; + pRTTCB->aUp[BufferIndex].WrOff = 0u; + pRTTCB->aUp[BufferIndex].Flags = Flags; + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + } else { + BufferIndex = -1; + } + SEGGER_RTT_UNLOCK(); + return BufferIndex; +} + +/********************************************************************* +* +* SEGGER_RTT_ConfigUpBuffer +* +* Function description +* Run-time configuration of a specific up-buffer (T->H). +* Buffer to be configured is specified by index. +* This includes: Buffer address, size, name, flags, ... +* +* Parameters +* BufferIndex Index of the buffer to configure. +* sName Pointer to a constant name string. +* pBuffer Pointer to a buffer to be used. +* BufferSize Size of the buffer. +* Flags Operating modes. Define behavior if buffer is full (not enough space for entire message). +* +* Return value +* >= 0 - O.K. +* < 0 - Error +* +* Additional information +* Buffer 0 is configured on compile-time. +* May only be called once per buffer. +* Buffer name and flags can be reconfigured using the appropriate functions. +*/ +int SEGGER_RTT_ConfigUpBuffer(unsigned BufferIndex, const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags) { + int r; + volatile SEGGER_RTT_CB* pRTTCB; + + INIT(); + pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + if (BufferIndex < (unsigned)pRTTCB->MaxNumUpBuffers) { + SEGGER_RTT_LOCK(); + if (BufferIndex > 0u) { + pRTTCB->aUp[BufferIndex].sName = sName; + pRTTCB->aUp[BufferIndex].pBuffer = (char*)pBuffer; + pRTTCB->aUp[BufferIndex].SizeOfBuffer = BufferSize; + pRTTCB->aUp[BufferIndex].RdOff = 0u; + pRTTCB->aUp[BufferIndex].WrOff = 0u; + } + pRTTCB->aUp[BufferIndex].Flags = Flags; + SEGGER_RTT_UNLOCK(); + r = 0; + } else { + r = -1; + } + return r; +} + +/********************************************************************* +* +* SEGGER_RTT_ConfigDownBuffer +* +* Function description +* Run-time configuration of a specific down-buffer (H->T). +* Buffer to be configured is specified by index. +* This includes: Buffer address, size, name, flags, ... +* +* Parameters +* BufferIndex Index of the buffer to configure. +* sName Pointer to a constant name string. +* pBuffer Pointer to a buffer to be used. +* BufferSize Size of the buffer. +* Flags Operating modes. Define behavior if buffer is full (not enough space for entire message). +* +* Return value +* >= 0 O.K. +* < 0 Error +* +* Additional information +* Buffer 0 is configured on compile-time. +* May only be called once per buffer. +* Buffer name and flags can be reconfigured using the appropriate functions. +*/ +int SEGGER_RTT_ConfigDownBuffer(unsigned BufferIndex, const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags) { + int r; + volatile SEGGER_RTT_CB* pRTTCB; + + INIT(); + pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + if (BufferIndex < (unsigned)pRTTCB->MaxNumDownBuffers) { + SEGGER_RTT_LOCK(); + if (BufferIndex > 0u) { + pRTTCB->aDown[BufferIndex].sName = sName; + pRTTCB->aDown[BufferIndex].pBuffer = (char*)pBuffer; + pRTTCB->aDown[BufferIndex].SizeOfBuffer = BufferSize; + pRTTCB->aDown[BufferIndex].RdOff = 0u; + pRTTCB->aDown[BufferIndex].WrOff = 0u; + } + pRTTCB->aDown[BufferIndex].Flags = Flags; + RTT__DMB(); // Force data write to be complete before writing the , in case CPU is allowed to change the order of memory accesses + SEGGER_RTT_UNLOCK(); + r = 0; + } else { + r = -1; + } + return r; +} + +/********************************************************************* +* +* SEGGER_RTT_SetNameUpBuffer +* +* Function description +* Run-time configuration of a specific up-buffer name (T->H). +* Buffer to be configured is specified by index. +* +* Parameters +* BufferIndex Index of the buffer to renamed. +* sName Pointer to a constant name string. +* +* Return value +* >= 0 O.K. +* < 0 Error +*/ +int SEGGER_RTT_SetNameUpBuffer(unsigned BufferIndex, const char* sName) { + int r; + volatile SEGGER_RTT_CB* pRTTCB; + + INIT(); + pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + if (BufferIndex < (unsigned)pRTTCB->MaxNumUpBuffers) { + SEGGER_RTT_LOCK(); + pRTTCB->aUp[BufferIndex].sName = sName; + SEGGER_RTT_UNLOCK(); + r = 0; + } else { + r = -1; + } + return r; +} + +/********************************************************************* +* +* SEGGER_RTT_SetNameDownBuffer +* +* Function description +* Run-time configuration of a specific Down-buffer name (T->H). +* Buffer to be configured is specified by index. +* +* Parameters +* BufferIndex Index of the buffer to renamed. +* sName Pointer to a constant name string. +* +* Return value +* >= 0 O.K. +* < 0 Error +*/ +int SEGGER_RTT_SetNameDownBuffer(unsigned BufferIndex, const char* sName) { + int r; + volatile SEGGER_RTT_CB* pRTTCB; + + INIT(); + pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + if (BufferIndex < (unsigned)pRTTCB->MaxNumDownBuffers) { + SEGGER_RTT_LOCK(); + pRTTCB->aDown[BufferIndex].sName = sName; + SEGGER_RTT_UNLOCK(); + r = 0; + } else { + r = -1; + } + return r; +} + +/********************************************************************* +* +* SEGGER_RTT_SetFlagsUpBuffer +* +* Function description +* Run-time configuration of specific up-buffer flags (T->H). +* Buffer to be configured is specified by index. +* +* Parameters +* BufferIndex Index of the buffer. +* Flags Flags to set for the buffer. +* +* Return value +* >= 0 O.K. +* < 0 Error +*/ +int SEGGER_RTT_SetFlagsUpBuffer(unsigned BufferIndex, unsigned Flags) { + int r; + volatile SEGGER_RTT_CB* pRTTCB; + + INIT(); + pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + if (BufferIndex < (unsigned)pRTTCB->MaxNumUpBuffers) { + SEGGER_RTT_LOCK(); + pRTTCB->aUp[BufferIndex].Flags = Flags; + SEGGER_RTT_UNLOCK(); + r = 0; + } else { + r = -1; + } + return r; +} + +/********************************************************************* +* +* SEGGER_RTT_SetFlagsDownBuffer +* +* Function description +* Run-time configuration of specific Down-buffer flags (T->H). +* Buffer to be configured is specified by index. +* +* Parameters +* BufferIndex Index of the buffer to renamed. +* Flags Flags to set for the buffer. +* +* Return value +* >= 0 O.K. +* < 0 Error +*/ +int SEGGER_RTT_SetFlagsDownBuffer(unsigned BufferIndex, unsigned Flags) { + int r; + volatile SEGGER_RTT_CB* pRTTCB; + + INIT(); + pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + if (BufferIndex < (unsigned)pRTTCB->MaxNumDownBuffers) { + SEGGER_RTT_LOCK(); + pRTTCB->aDown[BufferIndex].Flags = Flags; + SEGGER_RTT_UNLOCK(); + r = 0; + } else { + r = -1; + } + return r; +} + +/********************************************************************* +* +* SEGGER_RTT_Init +* +* Function description +* Initializes the RTT Control Block. +* Should be used in RAM targets, at start of the application. +* +*/ +void SEGGER_RTT_Init (void) { + _DoInit(); +} + +/********************************************************************* +* +* SEGGER_RTT_SetTerminal +* +* Function description +* Sets the terminal to be used for output on channel 0. +* +* Parameters +* TerminalId Index of the terminal. +* +* Return value +* >= 0 O.K. +* < 0 Error (e.g. if RTT is configured for non-blocking mode and there was no space in the buffer to set the new terminal Id) +* +* Notes +* (1) Buffer 0 is always reserved for terminal I/O, so we can use index 0 here, fixed +*/ +int SEGGER_RTT_SetTerminal (unsigned char TerminalId) { + unsigned char ac[2]; + SEGGER_RTT_BUFFER_UP* pRing; + unsigned Avail; + int r; + + INIT(); + r = 0; + ac[0] = 0xFFu; + if (TerminalId < sizeof(_aTerminalId)) { // We only support a certain number of channels + ac[1] = _aTerminalId[TerminalId]; + pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[0] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + SEGGER_RTT_LOCK(); // Lock to make sure that no other task is writing into buffer, while we are and number of free bytes in buffer does not change downwards after checking and before writing + if ((pRing->Flags & SEGGER_RTT_MODE_MASK) == SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL) { + _ActiveTerminal = TerminalId; + _WriteBlocking(pRing, (const char*)ac, 2u); + } else { // Skipping mode or trim mode? => We cannot trim this command so handling is the same for both modes + Avail = _GetAvailWriteSpace(pRing); + if (Avail >= 2) { + _ActiveTerminal = TerminalId; // Only change active terminal in case of success + _WriteNoCheck(pRing, (const char*)ac, 2u); + } else { + r = -1; + } + } + SEGGER_RTT_UNLOCK(); + } else { + r = -1; + } + return r; +} + +/********************************************************************* +* +* SEGGER_RTT_TerminalOut +* +* Function description +* Writes a string to the given terminal +* without changing the terminal for channel 0. +* +* Parameters +* TerminalId Index of the terminal. +* s String to be printed on the terminal. +* +* Return value +* >= 0 - Number of bytes written. +* < 0 - Error. +* +*/ +int SEGGER_RTT_TerminalOut (unsigned char TerminalId, const char* s) { + int Status; + unsigned FragLen; + unsigned Avail; + SEGGER_RTT_BUFFER_UP* pRing; + // + INIT(); + // + // Validate terminal ID. + // + if (TerminalId < (char)sizeof(_aTerminalId)) { // We only support a certain number of channels + // + // Get "to-host" ring buffer. + // + pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[0] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + // + // Need to be able to change terminal, write data, change back. + // Compute the fixed and variable sizes. + // + FragLen = STRLEN(s); + // + // How we output depends upon the mode... + // + SEGGER_RTT_LOCK(); + Avail = _GetAvailWriteSpace(pRing); + switch (pRing->Flags & SEGGER_RTT_MODE_MASK) { + case SEGGER_RTT_MODE_NO_BLOCK_SKIP: + // + // If we are in skip mode and there is no space for the whole + // of this output, don't bother switching terminals at all. + // + if (Avail < (FragLen + 4u)) { + Status = 0; + } else { + _PostTerminalSwitch(pRing, TerminalId); + Status = (int)_WriteBlocking(pRing, s, FragLen); + _PostTerminalSwitch(pRing, _ActiveTerminal); + } + break; + case SEGGER_RTT_MODE_NO_BLOCK_TRIM: + // + // If we are in trim mode and there is not enough space for everything, + // trim the output but always include the terminal switch. If no room + // for terminal switch, skip that totally. + // + if (Avail < 4u) { + Status = -1; + } else { + _PostTerminalSwitch(pRing, TerminalId); + Status = (int)_WriteBlocking(pRing, s, (FragLen < (Avail - 4u)) ? FragLen : (Avail - 4u)); + _PostTerminalSwitch(pRing, _ActiveTerminal); + } + break; + case SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL: + // + // If we are in blocking mode, output everything. + // + _PostTerminalSwitch(pRing, TerminalId); + Status = (int)_WriteBlocking(pRing, s, FragLen); + _PostTerminalSwitch(pRing, _ActiveTerminal); + break; + default: + Status = -1; + break; + } + // + // Finish up. + // + SEGGER_RTT_UNLOCK(); + } else { + Status = -1; + } + return Status; +} + +/********************************************************************* +* +* SEGGER_RTT_GetAvailWriteSpace +* +* Function description +* Returns the number of bytes available in the ring buffer. +* +* Parameters +* BufferIndex Index of the up buffer. +* +* Return value +* Number of bytes that are free in the selected up buffer. +*/ +unsigned SEGGER_RTT_GetAvailWriteSpace (unsigned BufferIndex) { + SEGGER_RTT_BUFFER_UP* pRing; + + pRing = (SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[BufferIndex] + SEGGER_RTT_UNCACHED_OFF); // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + return _GetAvailWriteSpace(pRing); +} + + +/********************************************************************* +* +* SEGGER_RTT_GetBytesInBuffer() +* +* Function description +* Returns the number of bytes currently used in the up buffer. +* +* Parameters +* BufferIndex Index of the up buffer. +* +* Return value +* Number of bytes that are used in the buffer. +*/ +unsigned SEGGER_RTT_GetBytesInBuffer(unsigned BufferIndex) { + unsigned RdOff; + unsigned WrOff; + unsigned r; + volatile SEGGER_RTT_CB* pRTTCB; + // + // Avoid warnings regarding volatile access order. It's not a problem + // in this case, but dampen compiler enthusiasm. + // + pRTTCB = (volatile SEGGER_RTT_CB*)((unsigned char*)&_SEGGER_RTT + SEGGER_RTT_UNCACHED_OFF); // Access RTTCB uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + RdOff = pRTTCB->aUp[BufferIndex].RdOff; + WrOff = pRTTCB->aUp[BufferIndex].WrOff; + if (RdOff <= WrOff) { + r = WrOff - RdOff; + } else { + r = pRTTCB->aUp[BufferIndex].SizeOfBuffer - (WrOff - RdOff); + } + return r; +} + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/SEGGER/SEGGER_RTT.h b/resources_extra/SystemView_Src_V320/SEGGER/SEGGER_RTT.h new file mode 100644 index 0000000..8000e13 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/SEGGER/SEGGER_RTT.h @@ -0,0 +1,418 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +---------------------------END-OF-HEADER------------------------------ +File : SEGGER_RTT.h +Purpose : Implementation of SEGGER real-time transfer which allows + real-time communication on targets which support debugger + memory accesses while the CPU is running. +Revision: $Rev: 20869 $ +---------------------------------------------------------------------- +*/ + +#ifndef SEGGER_RTT_H +#define SEGGER_RTT_H + +#include "SEGGER_RTT_Conf.h" + +/********************************************************************* +* +* Defines, defaults +* +********************************************************************** +*/ +#ifndef RTT_USE_ASM + #if (defined __SES_ARM) // SEGGER Embedded Studio + #define _CC_HAS_RTT_ASM_SUPPORT 1 + #elif (defined __CROSSWORKS_ARM) // Rowley Crossworks + #define _CC_HAS_RTT_ASM_SUPPORT 1 + #elif (defined __ARMCC_VERSION) // ARM compiler + #if (__ARMCC_VERSION >= 6000000) // ARM compiler V6.0 and later is clang based + #define _CC_HAS_RTT_ASM_SUPPORT 1 + #else + #define _CC_HAS_RTT_ASM_SUPPORT 0 + #endif + #elif (defined __GNUC__) // GCC + #define _CC_HAS_RTT_ASM_SUPPORT 1 + #elif (defined __clang__) // Clang compiler + #define _CC_HAS_RTT_ASM_SUPPORT 1 + #elif ((defined __IASMARM__) || (defined __ICCARM__)) // IAR assembler/compiler + #define _CC_HAS_RTT_ASM_SUPPORT 1 + #else + #define _CC_HAS_RTT_ASM_SUPPORT 0 + #endif + #if ((defined __IASMARM__) || (defined __ICCARM__)) // IAR assembler/compiler + // + // IAR assembler / compiler + // + #if (__VER__ < 6300000) + #define VOLATILE + #else + #define VOLATILE volatile + #endif + #if (defined __ARM7M__) // Needed for old versions that do not know the define yet + #if (__CORE__ == __ARM7M__) // Cortex-M3 + #define _CORE_HAS_RTT_ASM_SUPPORT 1 + #endif + #endif + #if (defined __ARM7EM__) // Needed for old versions that do not know the define yet + #if (__CORE__ == __ARM7EM__) // Cortex-M4/M7 + #define _CORE_HAS_RTT_ASM_SUPPORT 1 + #define _CORE_NEEDS_DMB 1 + #define RTT__DMB() asm VOLATILE ("DMB"); + #endif + #endif + #if (defined __ARM8M_BASELINE__) // Needed for old versions that do not know the define yet + #if (__CORE__ == __ARM8M_BASELINE__) // Cortex-M23 + #define _CORE_HAS_RTT_ASM_SUPPORT 0 + #define _CORE_NEEDS_DMB 1 + #define RTT__DMB() asm VOLATILE ("DMB"); + #endif + #endif + #if (defined __ARM8M_MAINLINE__) // Needed for old versions that do not know the define yet + #if (__CORE__ == __ARM8M_MAINLINE__) // Cortex-M33 + #define _CORE_HAS_RTT_ASM_SUPPORT 1 + #define _CORE_NEEDS_DMB 1 + #define RTT__DMB() asm VOLATILE ("DMB"); + #endif + #endif + #else + // + // GCC / Clang + // + #if (defined __ARM_ARCH_7M__) // Cortex-M3 + #define _CORE_HAS_RTT_ASM_SUPPORT 1 + #elif (defined __ARM_ARCH_7EM__) // Cortex-M4/M7 + #define _CORE_HAS_RTT_ASM_SUPPORT 1 + #define _CORE_NEEDS_DMB 1 + #define RTT__DMB() __asm volatile ("dmb\n" : : :); + #elif (defined __ARM_ARCH_8M_BASE__) // Cortex-M23 + #define _CORE_HAS_RTT_ASM_SUPPORT 0 + #define _CORE_NEEDS_DMB 1 + #define RTT__DMB() __asm volatile ("dmb\n" : : :); + #elif (defined __ARM_ARCH_8M_MAIN__) // Cortex-M33 + #define _CORE_HAS_RTT_ASM_SUPPORT 1 + #define _CORE_NEEDS_DMB 1 + #define RTT__DMB() __asm volatile ("dmb\n" : : :); + #else + #define _CORE_HAS_RTT_ASM_SUPPORT 0 + #endif + #endif + // + // If IDE and core support the ASM version, enable ASM version by default + // + #ifndef _CORE_HAS_RTT_ASM_SUPPORT + #define _CORE_HAS_RTT_ASM_SUPPORT 0 // Default for unknown cores + #endif + #if (_CC_HAS_RTT_ASM_SUPPORT && _CORE_HAS_RTT_ASM_SUPPORT) + #define RTT_USE_ASM (1) + #else + #define RTT_USE_ASM (0) + #endif +#endif + +// +// We need to know if a DMB is needed to make sure that on Cortex-M7 etc. +// the order of accesses to the ring buffers is guaranteed +// Needed for: Cortex-M7, Cortex-M23, Cortex-M33 +// +#ifndef _CORE_NEEDS_DMB + #define _CORE_NEEDS_DMB 0 +#endif + +#ifndef RTT__DMB + #if _CORE_NEEDS_DMB + #error "Don't know how to place inline assembly for DMB" + #else + #define RTT__DMB() + #endif +#endif + +#ifndef SEGGER_RTT_CPU_CACHE_LINE_SIZE + #define SEGGER_RTT_CPU_CACHE_LINE_SIZE (0) // On most target systems where RTT is used, we do not have a CPU cache, therefore 0 is a good default here +#endif + +#ifndef SEGGER_RTT_UNCACHED_OFF + #if SEGGER_RTT_CPU_CACHE_LINE_SIZE + #error "SEGGER_RTT_UNCACHED_OFF must be defined when setting SEGGER_RTT_CPU_CACHE_LINE_SIZE != 0" + #else + #define SEGGER_RTT_UNCACHED_OFF (0) + #endif +#endif +#if RTT_USE_ASM + #if SEGGER_RTT_CPU_CACHE_LINE_SIZE + #error "RTT_USE_ASM is not available if SEGGER_RTT_CPU_CACHE_LINE_SIZE != 0" + #endif +#endif + +#ifndef SEGGER_RTT_ASM // defined when SEGGER_RTT.h is included from assembly file +#include +#include + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ + +// +// Determine how much we must pad the control block to make it a multiple of a cache line in size +// Assuming: U8 = 1B +// U16 = 2B +// U32 = 4B +// U8/U16/U32* = 4B +// +#if SEGGER_RTT_CPU_CACHE_LINE_SIZE // Avoid division by zero in case we do not have any cache + #define SEGGER_RTT__ROUND_UP_2_CACHE_LINE_SIZE(NumBytes) (((NumBytes + SEGGER_RTT_CPU_CACHE_LINE_SIZE - 1) / SEGGER_RTT_CPU_CACHE_LINE_SIZE) * SEGGER_RTT_CPU_CACHE_LINE_SIZE) +#else + #define SEGGER_RTT__ROUND_UP_2_CACHE_LINE_SIZE(NumBytes) (NumBytes) +#endif +#define SEGGER_RTT__CB_SIZE (16 + 4 + 4 + (SEGGER_RTT_MAX_NUM_UP_BUFFERS * 24) + (SEGGER_RTT_MAX_NUM_DOWN_BUFFERS * 24)) +#define SEGGER_RTT__CB_PADDING (SEGGER_RTT__ROUND_UP_2_CACHE_LINE_SIZE(SEGGER_RTT__CB_SIZE) - SEGGER_RTT__CB_SIZE) + +/********************************************************************* +* +* Types +* +********************************************************************** +*/ + +// +// Description for a circular buffer (also called "ring buffer") +// which is used as up-buffer (T->H) +// +typedef struct { + const char* sName; // Optional name. Standard names so far are: "Terminal", "SysView", "J-Scope_t4i4" + char* pBuffer; // Pointer to start of buffer + unsigned SizeOfBuffer; // Buffer size in bytes. Note that one byte is lost, as this implementation does not fill up the buffer in order to avoid the problem of being unable to distinguish between full and empty. + unsigned WrOff; // Position of next item to be written by either target. + volatile unsigned RdOff; // Position of next item to be read by host. Must be volatile since it may be modified by host. + unsigned Flags; // Contains configuration flags +} SEGGER_RTT_BUFFER_UP; + +// +// Description for a circular buffer (also called "ring buffer") +// which is used as down-buffer (H->T) +// +typedef struct { + const char* sName; // Optional name. Standard names so far are: "Terminal", "SysView", "J-Scope_t4i4" + char* pBuffer; // Pointer to start of buffer + unsigned SizeOfBuffer; // Buffer size in bytes. Note that one byte is lost, as this implementation does not fill up the buffer in order to avoid the problem of being unable to distinguish between full and empty. + volatile unsigned WrOff; // Position of next item to be written by host. Must be volatile since it may be modified by host. + unsigned RdOff; // Position of next item to be read by target (down-buffer). + unsigned Flags; // Contains configuration flags +} SEGGER_RTT_BUFFER_DOWN; + +// +// RTT control block which describes the number of buffers available +// as well as the configuration for each buffer +// +// +typedef struct { + char acID[16]; // Initialized to "SEGGER RTT" + int MaxNumUpBuffers; // Initialized to SEGGER_RTT_MAX_NUM_UP_BUFFERS (type. 2) + int MaxNumDownBuffers; // Initialized to SEGGER_RTT_MAX_NUM_DOWN_BUFFERS (type. 2) + SEGGER_RTT_BUFFER_UP aUp[SEGGER_RTT_MAX_NUM_UP_BUFFERS]; // Up buffers, transferring information up from target via debug probe to host + SEGGER_RTT_BUFFER_DOWN aDown[SEGGER_RTT_MAX_NUM_DOWN_BUFFERS]; // Down buffers, transferring information down from host via debug probe to target +#if SEGGER_RTT__CB_PADDING + unsigned char aDummy[SEGGER_RTT__CB_PADDING]; +#endif +} SEGGER_RTT_CB; + +/********************************************************************* +* +* Global data +* +********************************************************************** +*/ +extern SEGGER_RTT_CB _SEGGER_RTT; + +/********************************************************************* +* +* RTT API functions +* +********************************************************************** +*/ +#ifdef __cplusplus + extern "C" { +#endif +int SEGGER_RTT_AllocDownBuffer (const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags); +int SEGGER_RTT_AllocUpBuffer (const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags); +int SEGGER_RTT_ConfigUpBuffer (unsigned BufferIndex, const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags); +int SEGGER_RTT_ConfigDownBuffer (unsigned BufferIndex, const char* sName, void* pBuffer, unsigned BufferSize, unsigned Flags); +int SEGGER_RTT_GetKey (void); +unsigned SEGGER_RTT_HasData (unsigned BufferIndex); +int SEGGER_RTT_HasKey (void); +unsigned SEGGER_RTT_HasDataUp (unsigned BufferIndex); +void SEGGER_RTT_Init (void); +unsigned SEGGER_RTT_Read (unsigned BufferIndex, void* pBuffer, unsigned BufferSize); +unsigned SEGGER_RTT_ReadNoLock (unsigned BufferIndex, void* pData, unsigned BufferSize); +int SEGGER_RTT_SetNameDownBuffer (unsigned BufferIndex, const char* sName); +int SEGGER_RTT_SetNameUpBuffer (unsigned BufferIndex, const char* sName); +int SEGGER_RTT_SetFlagsDownBuffer (unsigned BufferIndex, unsigned Flags); +int SEGGER_RTT_SetFlagsUpBuffer (unsigned BufferIndex, unsigned Flags); +int SEGGER_RTT_WaitKey (void); +unsigned SEGGER_RTT_Write (unsigned BufferIndex, const void* pBuffer, unsigned NumBytes); +unsigned SEGGER_RTT_WriteNoLock (unsigned BufferIndex, const void* pBuffer, unsigned NumBytes); +unsigned SEGGER_RTT_WriteSkipNoLock (unsigned BufferIndex, const void* pBuffer, unsigned NumBytes); +unsigned SEGGER_RTT_ASM_WriteSkipNoLock (unsigned BufferIndex, const void* pBuffer, unsigned NumBytes); +unsigned SEGGER_RTT_WriteString (unsigned BufferIndex, const char* s); +void SEGGER_RTT_WriteWithOverwriteNoLock(unsigned BufferIndex, const void* pBuffer, unsigned NumBytes); +unsigned SEGGER_RTT_PutChar (unsigned BufferIndex, char c); +unsigned SEGGER_RTT_PutCharSkip (unsigned BufferIndex, char c); +unsigned SEGGER_RTT_PutCharSkipNoLock (unsigned BufferIndex, char c); +unsigned SEGGER_RTT_GetAvailWriteSpace (unsigned BufferIndex); +unsigned SEGGER_RTT_GetBytesInBuffer (unsigned BufferIndex); +// +// Function macro for performance optimization +// +#define SEGGER_RTT_HASDATA(n) (((SEGGER_RTT_BUFFER_DOWN*)((char*)&_SEGGER_RTT.aDown[n] + SEGGER_RTT_UNCACHED_OFF))->WrOff - ((SEGGER_RTT_BUFFER_DOWN*)((char*)&_SEGGER_RTT.aDown[n] + SEGGER_RTT_UNCACHED_OFF))->RdOff) + +#if RTT_USE_ASM + #define SEGGER_RTT_WriteSkipNoLock SEGGER_RTT_ASM_WriteSkipNoLock +#endif + +/********************************************************************* +* +* RTT transfer functions to send RTT data via other channels. +* +********************************************************************** +*/ +unsigned SEGGER_RTT_ReadUpBuffer (unsigned BufferIndex, void* pBuffer, unsigned BufferSize); +unsigned SEGGER_RTT_ReadUpBufferNoLock (unsigned BufferIndex, void* pData, unsigned BufferSize); +unsigned SEGGER_RTT_WriteDownBuffer (unsigned BufferIndex, const void* pBuffer, unsigned NumBytes); +unsigned SEGGER_RTT_WriteDownBufferNoLock (unsigned BufferIndex, const void* pBuffer, unsigned NumBytes); + +#define SEGGER_RTT_HASDATA_UP(n) (((SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[n] + SEGGER_RTT_UNCACHED_OFF))->WrOff - ((SEGGER_RTT_BUFFER_UP*)((char*)&_SEGGER_RTT.aUp[n] + SEGGER_RTT_UNCACHED_OFF))->RdOff) // Access uncached to make sure we see changes made by the J-Link side and all of our changes go into HW directly + +/********************************************************************* +* +* RTT "Terminal" API functions +* +********************************************************************** +*/ +int SEGGER_RTT_SetTerminal (unsigned char TerminalId); +int SEGGER_RTT_TerminalOut (unsigned char TerminalId, const char* s); + +/********************************************************************* +* +* RTT printf functions (require SEGGER_RTT_printf.c) +* +********************************************************************** +*/ +int SEGGER_RTT_printf(unsigned BufferIndex, const char * sFormat, ...); +int SEGGER_RTT_vprintf(unsigned BufferIndex, const char * sFormat, va_list * pParamList); + +#ifdef __cplusplus + } +#endif + +#endif // ifndef(SEGGER_RTT_ASM) + +/********************************************************************* +* +* Defines +* +********************************************************************** +*/ + +// +// Operating modes. Define behavior if buffer is full (not enough space for entire message) +// +#define SEGGER_RTT_MODE_NO_BLOCK_SKIP (0) // Skip. Do not block, output nothing. (Default) +#define SEGGER_RTT_MODE_NO_BLOCK_TRIM (1) // Trim: Do not block, output as much as fits. +#define SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL (2) // Block: Wait until there is space in the buffer. +#define SEGGER_RTT_MODE_MASK (3) + +// +// Control sequences, based on ANSI. +// Can be used to control color, and clear the screen +// +#define RTT_CTRL_RESET "\x1B[0m" // Reset to default colors +#define RTT_CTRL_CLEAR "\x1B[2J" // Clear screen, reposition cursor to top left + +#define RTT_CTRL_TEXT_BLACK "\x1B[2;30m" +#define RTT_CTRL_TEXT_RED "\x1B[2;31m" +#define RTT_CTRL_TEXT_GREEN "\x1B[2;32m" +#define RTT_CTRL_TEXT_YELLOW "\x1B[2;33m" +#define RTT_CTRL_TEXT_BLUE "\x1B[2;34m" +#define RTT_CTRL_TEXT_MAGENTA "\x1B[2;35m" +#define RTT_CTRL_TEXT_CYAN "\x1B[2;36m" +#define RTT_CTRL_TEXT_WHITE "\x1B[2;37m" + +#define RTT_CTRL_TEXT_BRIGHT_BLACK "\x1B[1;30m" +#define RTT_CTRL_TEXT_BRIGHT_RED "\x1B[1;31m" +#define RTT_CTRL_TEXT_BRIGHT_GREEN "\x1B[1;32m" +#define RTT_CTRL_TEXT_BRIGHT_YELLOW "\x1B[1;33m" +#define RTT_CTRL_TEXT_BRIGHT_BLUE "\x1B[1;34m" +#define RTT_CTRL_TEXT_BRIGHT_MAGENTA "\x1B[1;35m" +#define RTT_CTRL_TEXT_BRIGHT_CYAN "\x1B[1;36m" +#define RTT_CTRL_TEXT_BRIGHT_WHITE "\x1B[1;37m" + +#define RTT_CTRL_BG_BLACK "\x1B[24;40m" +#define RTT_CTRL_BG_RED "\x1B[24;41m" +#define RTT_CTRL_BG_GREEN "\x1B[24;42m" +#define RTT_CTRL_BG_YELLOW "\x1B[24;43m" +#define RTT_CTRL_BG_BLUE "\x1B[24;44m" +#define RTT_CTRL_BG_MAGENTA "\x1B[24;45m" +#define RTT_CTRL_BG_CYAN "\x1B[24;46m" +#define RTT_CTRL_BG_WHITE "\x1B[24;47m" + +#define RTT_CTRL_BG_BRIGHT_BLACK "\x1B[4;40m" +#define RTT_CTRL_BG_BRIGHT_RED "\x1B[4;41m" +#define RTT_CTRL_BG_BRIGHT_GREEN "\x1B[4;42m" +#define RTT_CTRL_BG_BRIGHT_YELLOW "\x1B[4;43m" +#define RTT_CTRL_BG_BRIGHT_BLUE "\x1B[4;44m" +#define RTT_CTRL_BG_BRIGHT_MAGENTA "\x1B[4;45m" +#define RTT_CTRL_BG_BRIGHT_CYAN "\x1B[4;46m" +#define RTT_CTRL_BG_BRIGHT_WHITE "\x1B[4;47m" + + +#endif + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/SEGGER/SEGGER_RTT_ASM_ARMv7M.S b/resources_extra/SystemView_Src_V320/SEGGER/SEGGER_RTT_ASM_ARMv7M.S new file mode 100644 index 0000000..cbbc52f --- /dev/null +++ b/resources_extra/SystemView_Src_V320/SEGGER/SEGGER_RTT_ASM_ARMv7M.S @@ -0,0 +1,242 @@ +/********************************************************************* +* (c) SEGGER Microcontroller GmbH * +* The Embedded Experts * +* www.segger.com * +********************************************************************** + +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_RTT_ASM_ARMv7M.S +Purpose : Assembler implementation of RTT functions for ARMv7M + +Additional information: + This module is written to be assembler-independent and works with + GCC and clang (Embedded Studio) and IAR. +*/ + +#define SEGGER_RTT_ASM // Used to control processed input from header file +#include "SEGGER_RTT.h" + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ + +#define _CCIAR 0 +#define _CCCLANG 1 + +#if (defined __SES_ARM) || (defined __GNUC__) || (defined __clang__) + #define _CC_TYPE _CCCLANG + #define _PUB_SYM .global + #define _EXT_SYM .extern + #define _END .end + #define _WEAK .weak + #define _THUMB_FUNC .thumb_func + #define _THUMB_CODE .code 16 + #define _WORD .word + #define _SECTION(Sect, Type, AlignExp) .section Sect ##, "ax" + #define _ALIGN(Exp) .align Exp + #define _PLACE_LITS .ltorg + #define _DATA_SECT_START + #define _C_STARTUP _start + #define _STACK_END __stack_end__ + #define _RAMFUNC + // + // .text => Link to flash + // .fast => Link to RAM + // OtherSect => Usually link to RAM + // Alignment is 2^x + // +#elif defined (__IASMARM__) + #define _CC_TYPE _CCIAR + #define _PUB_SYM PUBLIC + #define _EXT_SYM EXTERN + #define _END END + #define _WEAK _WEAK + #define _THUMB_FUNC + #define _THUMB_CODE THUMB + #define _WORD DCD + #define _SECTION(Sect, Type, AlignExp) SECTION Sect ## : ## Type ## :REORDER:NOROOT ## (AlignExp) + #define _ALIGN(Exp) alignrom Exp + #define _PLACE_LITS + #define _DATA_SECT_START DATA + #define _C_STARTUP __iar_program_start + #define _STACK_END sfe(CSTACK) + #define _RAMFUNC SECTION_TYPE SHT_PROGBITS, SHF_WRITE | SHF_EXECINSTR + // + // .text => Link to flash + // .textrw => Link to RAM + // OtherSect => Usually link to RAM + // NOROOT => Allows linker to throw away the function, if not referenced + // Alignment is 2^x + // +#endif + +#if (_CC_TYPE == _CCIAR) + NAME SEGGER_RTT_ASM_ARMv7M +#else + .syntax unified +#endif + +#if defined (RTT_USE_ASM) && (RTT_USE_ASM == 1) + #define SHT_PROGBITS 0x1 + +/********************************************************************* +* +* Public / external symbols +* +********************************************************************** +*/ + + _EXT_SYM __aeabi_memcpy + _EXT_SYM __aeabi_memcpy4 + _EXT_SYM _SEGGER_RTT + + _PUB_SYM SEGGER_RTT_ASM_WriteSkipNoLock + +/********************************************************************* +* +* SEGGER_RTT_WriteSkipNoLock +* +* Function description +* Stores a specified number of characters in SEGGER RTT +* control block which is then read by the host. +* SEGGER_RTT_WriteSkipNoLock does not lock the application and +* skips all data, if the data does not fit into the buffer. +* +* Parameters +* BufferIndex Index of "Up"-buffer to be used (e.g. 0 for "Terminal"). +* pBuffer Pointer to character array. Does not need to point to a \0 terminated string. +* NumBytes Number of bytes to be stored in the SEGGER RTT control block. +* MUST be > 0!!! +* This is done for performance reasons, so no initial check has do be done. +* +* Return value +* 1: Data has been copied +* 0: No space, data has not been copied +* +* Notes +* (1) If there is not enough space in the "Up"-buffer, all data is dropped. +* (2) For performance reasons this function does not call Init() +* and may only be called after RTT has been initialized. +* Either by calling SEGGER_RTT_Init() or calling another RTT API function first. +*/ + _SECTION(.text, CODE, 2) + _ALIGN(2) + _THUMB_FUNC +SEGGER_RTT_ASM_WriteSkipNoLock: // unsigned SEGGER_RTT_WriteSkipNoLock(unsigned BufferIndex, const void* pData, unsigned NumBytes) { + // + // Cases: + // 1) RdOff <= WrOff => Space until wrap-around is sufficient + // 2) RdOff <= WrOff => Space after wrap-around needed (copy in 2 chunks) + // 3) RdOff < WrOff => No space in buf + // 4) RdOff > WrOff => Space is sufficient + // 5) RdOff > WrOff => No space in buf + // + // 1) is the most common case for large buffers and assuming that J-Link reads the data fast enough + // + // Register usage: + // R0 Temporary needed as RdOff, register later on + // R1 pData + // R2 + // R3 register. Hold free for subroutine calls + // R4 + // R5 pRing->pBuffer + // R6 pRing (Points to active struct SEGGER_RTT_BUFFER_DOWN) + // R7 WrOff + // + PUSH {R4-R7} + ADD R3,R0,R0, LSL #+1 + LDR.W R0,=_SEGGER_RTT // pRing = &_SEGGER_RTT.aUp[BufferIndex]; + ADD R0,R0,R3, LSL #+3 + ADD R6,R0,#+24 + LDR R0,[R6, #+16] // RdOff = pRing->RdOff; + LDR R7,[R6, #+12] // WrOff = pRing->WrOff; + LDR R5,[R6, #+4] // pRing->pBuffer + CMP R7,R0 + BCC.N _CheckCase4 // if (RdOff <= WrOff) { => Case 1), 2) or 3) + // + // Handling for case 1, later on identical to case 4 + // + LDR R3,[R6, #+8] // Avail = pRing->SizeOfBuffer - WrOff - 1u; => Space until wrap-around (assume 1 byte not usable for case that RdOff == 0) + SUBS R4,R3,R7 // (Used in case we jump into case 2 afterwards) + SUBS R3,R4,#+1 // + CMP R3,R2 + BCC.N _CheckCase2 // if (Avail >= NumBytes) { => Case 1)? +_Case4: + ADDS R5,R7,R5 // pBuffer += WrOff + ADDS R0,R2,R7 // v = WrOff + NumBytes + // + // 2x unrolling for the copy loop that is used most of the time + // This is a special optimization for small SystemView packets and makes them even faster + // + _ALIGN(2) +_LoopCopyStraight: // memcpy(pRing->pBuffer + WrOff, pData, NumBytes); + LDRB R3,[R1], #+1 + STRB R3,[R5], #+1 // *pDest++ = *pSrc++ + SUBS R2,R2,#+1 + BEQ _CSDone + LDRB R3,[R1], #+1 + STRB R3,[R5], #+1 // *pDest++ = *pSrc++ + SUBS R2,R2,#+1 + BNE _LoopCopyStraight +_CSDone: +#if _CORE_NEEDS_DMB // Do not slow down cores that do not need a DMB instruction here + DMB // Cortex-M7 may delay memory writes and also change the order in which the writes happen. Therefore, make sure that all buffer writes are finished, before updating the in the struct +#endif + STR R0,[R6, #+12] // pRing->WrOff = WrOff + NumBytes; + MOVS R0,#+1 + POP {R4-R7} + BX LR // Return 1 +_CheckCase2: + ADDS R0,R0,R3 // Avail += RdOff; => Space incl. wrap-around + CMP R0,R2 + BCC.N _Case3 // if (Avail >= NumBytes) { => Case 2? => If not, we have case 3) (does not fit) + // + // Handling for case 2 + // + ADDS R0,R7,R5 // v = pRing->pBuffer + WrOff => Do not change pRing->pBuffer here because 2nd chunk needs org. value + SUBS R2,R2,R4 // NumBytes -= Rem; (Rem = pRing->SizeOfBuffer - WrOff; => Space until end of buffer) +_LoopCopyBeforeWrapAround: // memcpy(pRing->pBuffer + WrOff, pData, Rem); => Copy 1st chunk + LDRB R3,[R1], #+1 + STRB R3,[R0], #+1 // *pDest++ = *pSrc++ + SUBS R4,R4,#+1 + BNE _LoopCopyBeforeWrapAround + // + // Special case: First check that assumed RdOff == 0 calculated that last element before wrap-around could not be used + // But 2nd check (considering space until wrap-around and until RdOff) revealed that RdOff is not 0, so we can use the last element + // In this case, we may use a copy straight until buffer end anyway without needing to copy 2 chunks + // Therefore, check if 2nd memcpy is necessary at all + // + ADDS R4,R2,#+0 // Save (needed as counter in loop but must be written to after the loop). Also use this inst to update the flags to skip 2nd loop if possible + BEQ.N _No2ChunkNeeded // if (NumBytes) { +_LoopCopyAfterWrapAround: // memcpy(pRing->pBuffer, pData + Rem, NumBytes); + LDRB R3,[R1], #+1 // pData already points to the next src byte due to copy loop increment before this loop + STRB R3,[R5], #+1 // *pDest++ = *pSrc++ + SUBS R2,R2,#+1 + BNE _LoopCopyAfterWrapAround +_No2ChunkNeeded: +#if _CORE_NEEDS_DMB // Do not slow down cores that do not need a DMB instruction here + DMB // Cortex-M7 may delay memory writes and also change the order in which the writes happen. Therefore, make sure that all buffer writes are finished, before updating the in the struct +#endif + STR R4,[R6, #+12] // pRing->WrOff = NumBytes; => Must be written after copying data because J-Link may read control block asynchronously while writing into buffer + MOVS R0,#+1 + POP {R4-R7} + BX LR // Return 1 +_CheckCase4: + SUBS R0,R0,R7 + SUBS R0,R0,#+1 // Avail = RdOff - WrOff - 1u; + CMP R0,R2 + BCS.N _Case4 // if (Avail >= NumBytes) { => Case 4) == 1) ? => If not, we have case 5) == 3) (does not fit) +_Case3: + MOVS R0,#+0 + POP {R4-R7} + BX LR // Return 0 + _PLACE_LITS + +#endif // defined (RTT_USE_ASM) && (RTT_USE_ASM == 1) + _END + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/SEGGER/SEGGER_RTT_printf.c b/resources_extra/SystemView_Src_V320/SEGGER/SEGGER_RTT_printf.c new file mode 100644 index 0000000..2b9ff12 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/SEGGER/SEGGER_RTT_printf.c @@ -0,0 +1,504 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +---------------------------END-OF-HEADER------------------------------ +File : SEGGER_RTT_printf.c +Purpose : Replacement for printf to write formatted data via RTT +Revision: $Rev: 17697 $ +---------------------------------------------------------------------- +*/ +#include "SEGGER_RTT.h" +#include "SEGGER_RTT_Conf.h" + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ + +#ifndef SEGGER_RTT_PRINTF_BUFFER_SIZE + #define SEGGER_RTT_PRINTF_BUFFER_SIZE (64) +#endif + +#include +#include + + +#define FORMAT_FLAG_LEFT_JUSTIFY (1u << 0) +#define FORMAT_FLAG_PAD_ZERO (1u << 1) +#define FORMAT_FLAG_PRINT_SIGN (1u << 2) +#define FORMAT_FLAG_ALTERNATE (1u << 3) + +/********************************************************************* +* +* Types +* +********************************************************************** +*/ + +typedef struct { + char* pBuffer; + unsigned BufferSize; + unsigned Cnt; + + int ReturnValue; + + unsigned RTTBufferIndex; +} SEGGER_RTT_PRINTF_DESC; + +/********************************************************************* +* +* Function prototypes +* +********************************************************************** +*/ + +/********************************************************************* +* +* Static code +* +********************************************************************** +*/ +/********************************************************************* +* +* _StoreChar +*/ +static void _StoreChar(SEGGER_RTT_PRINTF_DESC * p, char c) { + unsigned Cnt; + + Cnt = p->Cnt; + if ((Cnt + 1u) <= p->BufferSize) { + *(p->pBuffer + Cnt) = c; + p->Cnt = Cnt + 1u; + p->ReturnValue++; + } + // + // Write part of string, when the buffer is full + // + if (p->Cnt == p->BufferSize) { + if (SEGGER_RTT_Write(p->RTTBufferIndex, p->pBuffer, p->Cnt) != p->Cnt) { + p->ReturnValue = -1; + } else { + p->Cnt = 0u; + } + } +} + +/********************************************************************* +* +* _PrintUnsigned +*/ +static void _PrintUnsigned(SEGGER_RTT_PRINTF_DESC * pBufferDesc, unsigned v, unsigned Base, unsigned NumDigits, unsigned FieldWidth, unsigned FormatFlags) { + static const char _aV2C[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; + unsigned Div; + unsigned Digit; + unsigned Number; + unsigned Width; + char c; + + Number = v; + Digit = 1u; + // + // Get actual field width + // + Width = 1u; + while (Number >= Base) { + Number = (Number / Base); + Width++; + } + if (NumDigits > Width) { + Width = NumDigits; + } + // + // Print leading chars if necessary + // + if ((FormatFlags & FORMAT_FLAG_LEFT_JUSTIFY) == 0u) { + if (FieldWidth != 0u) { + if (((FormatFlags & FORMAT_FLAG_PAD_ZERO) == FORMAT_FLAG_PAD_ZERO) && (NumDigits == 0u)) { + c = '0'; + } else { + c = ' '; + } + while ((FieldWidth != 0u) && (Width < FieldWidth)) { + FieldWidth--; + _StoreChar(pBufferDesc, c); + if (pBufferDesc->ReturnValue < 0) { + break; + } + } + } + } + if (pBufferDesc->ReturnValue >= 0) { + // + // Compute Digit. + // Loop until Digit has the value of the highest digit required. + // Example: If the output is 345 (Base 10), loop 2 times until Digit is 100. + // + while (1) { + if (NumDigits > 1u) { // User specified a min number of digits to print? => Make sure we loop at least that often, before checking anything else (> 1 check avoids problems with NumDigits being signed / unsigned) + NumDigits--; + } else { + Div = v / Digit; + if (Div < Base) { // Is our divider big enough to extract the highest digit from value? => Done + break; + } + } + Digit *= Base; + } + // + // Output digits + // + do { + Div = v / Digit; + v -= Div * Digit; + _StoreChar(pBufferDesc, _aV2C[Div]); + if (pBufferDesc->ReturnValue < 0) { + break; + } + Digit /= Base; + } while (Digit); + // + // Print trailing spaces if necessary + // + if ((FormatFlags & FORMAT_FLAG_LEFT_JUSTIFY) == FORMAT_FLAG_LEFT_JUSTIFY) { + if (FieldWidth != 0u) { + while ((FieldWidth != 0u) && (Width < FieldWidth)) { + FieldWidth--; + _StoreChar(pBufferDesc, ' '); + if (pBufferDesc->ReturnValue < 0) { + break; + } + } + } + } + } +} + +/********************************************************************* +* +* _PrintInt +*/ +static void _PrintInt(SEGGER_RTT_PRINTF_DESC * pBufferDesc, int v, unsigned Base, unsigned NumDigits, unsigned FieldWidth, unsigned FormatFlags) { + unsigned Width; + int Number; + + Number = (v < 0) ? -v : v; + + // + // Get actual field width + // + Width = 1u; + while (Number >= (int)Base) { + Number = (Number / (int)Base); + Width++; + } + if (NumDigits > Width) { + Width = NumDigits; + } + if ((FieldWidth > 0u) && ((v < 0) || ((FormatFlags & FORMAT_FLAG_PRINT_SIGN) == FORMAT_FLAG_PRINT_SIGN))) { + FieldWidth--; + } + + // + // Print leading spaces if necessary + // + if ((((FormatFlags & FORMAT_FLAG_PAD_ZERO) == 0u) || (NumDigits != 0u)) && ((FormatFlags & FORMAT_FLAG_LEFT_JUSTIFY) == 0u)) { + if (FieldWidth != 0u) { + while ((FieldWidth != 0u) && (Width < FieldWidth)) { + FieldWidth--; + _StoreChar(pBufferDesc, ' '); + if (pBufferDesc->ReturnValue < 0) { + break; + } + } + } + } + // + // Print sign if necessary + // + if (pBufferDesc->ReturnValue >= 0) { + if (v < 0) { + v = -v; + _StoreChar(pBufferDesc, '-'); + } else if ((FormatFlags & FORMAT_FLAG_PRINT_SIGN) == FORMAT_FLAG_PRINT_SIGN) { + _StoreChar(pBufferDesc, '+'); + } else { + + } + if (pBufferDesc->ReturnValue >= 0) { + // + // Print leading zeros if necessary + // + if (((FormatFlags & FORMAT_FLAG_PAD_ZERO) == FORMAT_FLAG_PAD_ZERO) && ((FormatFlags & FORMAT_FLAG_LEFT_JUSTIFY) == 0u) && (NumDigits == 0u)) { + if (FieldWidth != 0u) { + while ((FieldWidth != 0u) && (Width < FieldWidth)) { + FieldWidth--; + _StoreChar(pBufferDesc, '0'); + if (pBufferDesc->ReturnValue < 0) { + break; + } + } + } + } + if (pBufferDesc->ReturnValue >= 0) { + // + // Print number without sign + // + _PrintUnsigned(pBufferDesc, (unsigned)v, Base, NumDigits, FieldWidth, FormatFlags); + } + } + } +} + +/********************************************************************* +* +* Public code +* +********************************************************************** +*/ +/********************************************************************* +* +* SEGGER_RTT_vprintf +* +* Function description +* Stores a formatted string in SEGGER RTT control block. +* This data is read by the host. +* +* Parameters +* BufferIndex Index of "Up"-buffer to be used. (e.g. 0 for "Terminal") +* sFormat Pointer to format string +* pParamList Pointer to the list of arguments for the format string +* +* Return values +* >= 0: Number of bytes which have been stored in the "Up"-buffer. +* < 0: Error +*/ +int SEGGER_RTT_vprintf(unsigned BufferIndex, const char * sFormat, va_list * pParamList) { + char c; + SEGGER_RTT_PRINTF_DESC BufferDesc; + int v; + unsigned NumDigits; + unsigned FormatFlags; + unsigned FieldWidth; + char acBuffer[SEGGER_RTT_PRINTF_BUFFER_SIZE]; + + BufferDesc.pBuffer = acBuffer; + BufferDesc.BufferSize = SEGGER_RTT_PRINTF_BUFFER_SIZE; + BufferDesc.Cnt = 0u; + BufferDesc.RTTBufferIndex = BufferIndex; + BufferDesc.ReturnValue = 0; + + do { + c = *sFormat; + sFormat++; + if (c == 0u) { + break; + } + if (c == '%') { + // + // Filter out flags + // + FormatFlags = 0u; + v = 1; + do { + c = *sFormat; + switch (c) { + case '-': FormatFlags |= FORMAT_FLAG_LEFT_JUSTIFY; sFormat++; break; + case '0': FormatFlags |= FORMAT_FLAG_PAD_ZERO; sFormat++; break; + case '+': FormatFlags |= FORMAT_FLAG_PRINT_SIGN; sFormat++; break; + case '#': FormatFlags |= FORMAT_FLAG_ALTERNATE; sFormat++; break; + default: v = 0; break; + } + } while (v); + // + // filter out field with + // + FieldWidth = 0u; + do { + c = *sFormat; + if ((c < '0') || (c > '9')) { + break; + } + sFormat++; + FieldWidth = (FieldWidth * 10u) + ((unsigned)c - '0'); + } while (1); + + // + // Filter out precision (number of digits to display) + // + NumDigits = 0u; + c = *sFormat; + if (c == '.') { + sFormat++; + do { + c = *sFormat; + if ((c < '0') || (c > '9')) { + break; + } + sFormat++; + NumDigits = NumDigits * 10u + ((unsigned)c - '0'); + } while (1); + } + // + // Filter out length modifier + // + c = *sFormat; + do { + if ((c == 'l') || (c == 'h')) { + sFormat++; + c = *sFormat; + } else { + break; + } + } while (1); + // + // Handle specifiers + // + switch (c) { + case 'c': { + char c0; + v = va_arg(*pParamList, int); + c0 = (char)v; + _StoreChar(&BufferDesc, c0); + break; + } + case 'd': + v = va_arg(*pParamList, int); + _PrintInt(&BufferDesc, v, 10u, NumDigits, FieldWidth, FormatFlags); + break; + case 'u': + v = va_arg(*pParamList, int); + _PrintUnsigned(&BufferDesc, (unsigned)v, 10u, NumDigits, FieldWidth, FormatFlags); + break; + case 'x': + case 'X': + v = va_arg(*pParamList, int); + _PrintUnsigned(&BufferDesc, (unsigned)v, 16u, NumDigits, FieldWidth, FormatFlags); + break; + case 's': + { + const char * s = va_arg(*pParamList, const char *); + do { + c = *s; + s++; + if (c == '\0') { + break; + } + _StoreChar(&BufferDesc, c); + } while (BufferDesc.ReturnValue >= 0); + } + break; + case 'p': + v = va_arg(*pParamList, int); + _PrintUnsigned(&BufferDesc, (unsigned)v, 16u, 8u, 8u, 0u); + break; + case '%': + _StoreChar(&BufferDesc, '%'); + break; + default: + break; + } + sFormat++; + } else { + _StoreChar(&BufferDesc, c); + } + } while (BufferDesc.ReturnValue >= 0); + + if (BufferDesc.ReturnValue > 0) { + // + // Write remaining data, if any + // + if (BufferDesc.Cnt != 0u) { + SEGGER_RTT_Write(BufferIndex, acBuffer, BufferDesc.Cnt); + } + BufferDesc.ReturnValue += (int)BufferDesc.Cnt; + } + return BufferDesc.ReturnValue; +} + +/********************************************************************* +* +* SEGGER_RTT_printf +* +* Function description +* Stores a formatted string in SEGGER RTT control block. +* This data is read by the host. +* +* Parameters +* BufferIndex Index of "Up"-buffer to be used. (e.g. 0 for "Terminal") +* sFormat Pointer to format string, followed by the arguments for conversion +* +* Return values +* >= 0: Number of bytes which have been stored in the "Up"-buffer. +* < 0: Error +* +* Notes +* (1) Conversion specifications have following syntax: +* %[flags][FieldWidth][.Precision]ConversionSpecifier +* (2) Supported flags: +* -: Left justify within the field width +* +: Always print sign extension for signed conversions +* 0: Pad with 0 instead of spaces. Ignored when using '-'-flag or precision +* Supported conversion specifiers: +* c: Print the argument as one char +* d: Print the argument as a signed integer +* u: Print the argument as an unsigned integer +* x: Print the argument as an hexadecimal integer +* s: Print the string pointed to by the argument +* p: Print the argument as an 8-digit hexadecimal integer. (Argument shall be a pointer to void.) +*/ +int SEGGER_RTT_printf(unsigned BufferIndex, const char * sFormat, ...) { + int r; + va_list ParamList; + + va_start(ParamList, sFormat); + r = SEGGER_RTT_vprintf(BufferIndex, sFormat, &ParamList); + va_end(ParamList); + return r; +} +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/SEGGER/SEGGER_SYSVIEW.c b/resources_extra/SystemView_Src_V320/SEGGER/SEGGER_SYSVIEW.c new file mode 100644 index 0000000..43b7710 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/SEGGER/SEGGER_SYSVIEW.c @@ -0,0 +1,3061 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW.c +Purpose : System visualization API implementation. +Revision: $Rev: 21281 $ + +Additional information: + Packet format: + Packets with IDs 0..23 are standard packets with known structure. + For efficiency, they do *NOT* contain a length field. + + + Packets with IDs 24..31 are standard packets with extendible + structure and contain a length field. + + + Packet ID 31 is used for SystemView extended events. + + + Packets with IDs >= 32 always contain a length field. + + + Packet IDs: + 0.. 31 : Standard packets, known by SystemView. + 32..1023 : OS-definable packets, described in a SystemView description file. + 1024..2047 : User-definable packets, described in a SystemView description file. + 2048..32767: Undefined. + + Data encoding: + Basic types (int, short, char, ...): + Basic types are encoded little endian with most-significant bit variant + encoding. + Each encoded byte contains 7 data bits [6:0] and the MSB continuation bit. + The continuation bit indicates whether the next byte belongs to the data + (bit set) or this is the last byte (bit clear). + The most significant bits of data are encoded first, proceeding to the + least significant bits in the final byte (little endian). + + Example encoding: + Data: 0x1F4 (500) + Encoded: 0xF4 (First 7 data bits 74 | Continuation bit) + 0x03 (Second 7 data bits 03, no continuation) + + Data: 0xFFFFFFFF + Encoded: 0xFF 0xFF 0xFF 0xFF 0x0F + + Data: 0xA2 (162), 0x03 (3), 0x7000 + Encoded: 0xA2 0x01 0x03 0x80 0xE0 0x01 + + Byte arrays and strings: + Byte arrays and strings are encoded as followed by the raw data. + NumBytes is encoded as a basic type with a theoretical maximum of 4G. + + Example encoding: + Data: "Hello World\0" (0x48 0x65 0x6C 0x6C 0x6F 0x20 0x57 0x6F 0x72 0x6C 0x64 0x00) + Encoded: 0x0B 0x48 0x65 0x6C 0x6C 0x6F 0x20 0x57 0x6F 0x72 0x6C 0x64 + + Examples packets: + 01 F4 03 80 80 10 // Overflow packet. Data is a single U32. + This packet means: 500 packets lost, Timestamp is 0x40000 + + 02 0F 50 // ISR(15) Enter. Timestamp 80 (0x50) + + 03 20 // ISR Exit. Timestamp 32 (0x20) (Shortest possible packet.) + + Sample code for user defined Packets: + #define MY_ID 0x400 // Any value between 0x400 and 0x7FF + void SendMyPacket(unsigned Para0, unsigned Para1, const char* s) { + U8 aPacket[SEGGER_SYSVIEW_INFO_SIZE + 2 * SEGGER_SYSVIEW_QUANTA_U32 + MAX_STR_LEN + 1]; + U8* pPayload; + // + pPayload = SEGGER_SYSVIEW_PPREPARE_PACKET(aPacket); // Prepare the packet for SystemView + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para0); // Add the first parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para1); // Add the second parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeString(pPayload, s, MAX_STR_LEN); // Add the string to the packet + // + SEGGER_SYSVIEW_SendPacket(&aPacket[0], pPayload, MY_ID); // Send the packet with EventId = MY_ID + } + + #define MY_ID_1 0x401 + void SendOnePara(unsigned Para0) { + SEGGER_SYSVIEW_RecordU32(MY_ID_1, Para0); + } + +*/ + +/********************************************************************* +* +* #include section +* +********************************************************************** +*/ + +#define SEGGER_SYSVIEW_C // For EXTERN statements in SEGGER_SYSVIEW.h + +#include +#include +#include +#include "SEGGER_SYSVIEW_Int.h" +#include "SEGGER_RTT.h" + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ +#if SEGGER_SYSVIEW_ID_SHIFT + #define SHRINK_ID(Id) (((Id) - _SYSVIEW_Globals.RAMBaseAddress) >> SEGGER_SYSVIEW_ID_SHIFT) +#else + #define SHRINK_ID(Id) ((Id) - _SYSVIEW_Globals.RAMBaseAddress) +#endif + +#if SEGGER_SYSVIEW_RTT_CHANNEL > 0 + #define CHANNEL_ID_UP SEGGER_SYSVIEW_RTT_CHANNEL + #define CHANNEL_ID_DOWN SEGGER_SYSVIEW_RTT_CHANNEL +#else + #define CHANNEL_ID_UP _SYSVIEW_Globals.UpChannel + #define CHANNEL_ID_DOWN _SYSVIEW_Globals.DownChannel +#endif + +#if SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE + #if (SEGGER_SYSVIEW_RTT_BUFFER_SIZE % SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE) + #error "SEGGER_SYSVIEW_RTT_BUFFER_SIZE must be a multiple of SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE" + #endif +#endif + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ +// Timestamps may be less than full 32-bits, in which case we need to zero +// the unused bits to properly handle overflows. +// Note that this is a quite common scenario, as a 32-bit time such as +// SysTick might be scaled down to reduce bandwith +// or a 16-bit hardware time might be used. +#if SEGGER_SYSVIEW_TIMESTAMP_BITS < 32 // Eliminate unused bits in case hardware timestamps are less than 32 bits + #define MAKE_DELTA_32BIT(Delta) Delta <<= 32 - SEGGER_SYSVIEW_TIMESTAMP_BITS; \ + Delta >>= 32 - SEGGER_SYSVIEW_TIMESTAMP_BITS; +#else + #define MAKE_DELTA_32BIT(Delta) +#endif + + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ +#define ENABLE_STATE_OFF 0 +#define ENABLE_STATE_ON 1 +#define ENABLE_STATE_DROPPING 2 + +#define FORMAT_FLAG_LEFT_JUSTIFY (1u << 0) +#define FORMAT_FLAG_PAD_ZERO (1u << 1) +#define FORMAT_FLAG_PRINT_SIGN (1u << 2) +#define FORMAT_FLAG_ALTERNATE (1u << 3) + +#define MODULE_EVENT_OFFSET (512) + +/********************************************************************* +* +* Types, local +* +********************************************************************** +*/ +typedef struct { + U8* pBuffer; + U8* pPayload; + U8* pPayloadStart; + U32 Options; + unsigned Cnt; +} SEGGER_SYSVIEW_PRINTF_DESC; + +typedef struct { + U8 EnableState; // 0: Disabled, 1: Enabled, (2: Dropping) + U8 UpChannel; + U8 RecursionCnt; + U32 SysFreq; + U32 CPUFreq; + U32 LastTxTimeStamp; + U32 RAMBaseAddress; +#if (SEGGER_SYSVIEW_POST_MORTEM_MODE == 1) + U32 PacketCount; +#else + U32 DropCount; + U8 DownChannel; +#endif + U32 DisabledEvents; + const SEGGER_SYSVIEW_OS_API* pOSAPI; + SEGGER_SYSVIEW_SEND_SYS_DESC_FUNC* pfSendSysDesc; +} SEGGER_SYSVIEW_GLOBALS; + +/********************************************************************* +* +* Function prototypes, required +* +********************************************************************** +*/ +static void _SendPacket(U8* pStartPacket, U8* pEndPacket, unsigned int EventId); + +/********************************************************************* +* +* Static data +* +********************************************************************** +*/ +static const U8 _abSync[10] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + +#if SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE + #ifdef SEGGER_SYSVIEW_SECTION + // + // Alignment + special section required + // + #if (defined __GNUC__) + __attribute__ ((section (SEGGER_SYSVIEW_SECTION), aligned (SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE))) static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + __attribute__ ((section (SEGGER_SYSVIEW_SECTION), aligned (SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE))) static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #elif (defined __ICCARM__) || (defined __ICCRX__) + #pragma location=SEGGER_SYSVIEW_SECTION + #pragma data_alignment=SEGGER_RTT_CPU_CACHE_LINE_SIZE + static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + #pragma location=SEGGER_SYSVIEW_SECTION + #pragma data_alignment=SEGGER_RTT_CPU_CACHE_LINE_SIZE + static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #elif (defined __CC_ARM) + __attribute__ ((section (SEGGER_SYSVIEW_SECTION), aligned (SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE), zero_init)) static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + __attribute__ ((section (SEGGER_SYSVIEW_SECTION), aligned (SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE), zero_init)) static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #else + #error "Do not know how to place SystemView buffers in specific section" + #endif + #else + // + // Only alignment required + // + #if (defined __GNUC__) + __attribute__ ((aligned (SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE))) static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + __attribute__ ((aligned (SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE))) static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #elif (defined __ICCARM__) || (defined __ICCRX__) + #pragma data_alignment=SEGGER_RTT_CPU_CACHE_LINE_SIZE + static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + #pragma data_alignment=SEGGER_RTT_CPU_CACHE_LINE_SIZE + static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #elif (defined __CC_ARM) + __attribute__ ((aligned (SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE), zero_init)) static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + __attribute__ ((aligned (SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE), zero_init)) static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #else + #error "Do not know how to align SystemView buffers to cache line size" + #endif + #endif +#else + #ifdef SEGGER_SYSVIEW_SECTION + // + // Only special section required + // + #if (defined __GNUC__) + __attribute__ ((section (SEGGER_SYSVIEW_SECTION))) static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + __attribute__ ((section (SEGGER_SYSVIEW_SECTION))) static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #elif (defined __ICCARM__) || (defined __ICCRX__) + #pragma location=SEGGER_SYSVIEW_SECTION + static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + #pragma location=SEGGER_SYSVIEW_SECTION + static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #elif (defined __CC_ARM) + __attribute__ ((section (SEGGER_SYSVIEW_SECTION), zero_init)) static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + __attribute__ ((section (SEGGER_SYSVIEW_SECTION), zero_init)) static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #else + #error "Do not know how to place SystemView buffers in specific section" + #endif + #else + // + // Neither special section nor alignment required + // + static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #endif +#endif + +#ifdef SEGGER_SYSVIEW_SECTION + #if (defined __GNUC__) + __attribute__ ((section (SEGGER_SYSVIEW_SECTION))) static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + __attribute__ ((section (SEGGER_SYSVIEW_SECTION))) static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #elif (defined __ICCARM__) || (defined __ICCRX__) + #pragma location=SEGGER_SYSVIEW_SECTION + static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #pragma location=SEGGER_SYSVIEW_SECTION + static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #elif (defined __CC_ARM) + __attribute__ ((section (SEGGER_SYSVIEW_SECTION), zero_init)) static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + __attribute__ ((section (SEGGER_SYSVIEW_SECTION), zero_init)) static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #else + static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #endif +#else + #if SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE + #if (defined __GNUC__) + static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE] __attribute__ ((aligned (SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE))); + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + static char _DownBuffer[8] __attribute__ ((aligned (SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE))); // Small, fixed-size buffer, for back-channel comms + #endif + #elif (defined(__ICCARM__)) + #pragma data_alignment=SEGGER_RTT_CPU_CACHE_LINE_SIZE + static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + #pragma data_alignment=SEGGER_RTT_CPU_CACHE_LINE_SIZE + static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #else + #error "Don't know how to place _SEGGER_RTT, _acUpBuffer, _acDownBuffer cache-line aligned" + #endif + #else + static char _UpBuffer [SEGGER_SYSVIEW_RTT_BUFFER_SIZE]; + #if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + static char _DownBuffer[8]; // Small, fixed-size buffer, for back-channel comms + #endif + #endif +#endif + +static SEGGER_SYSVIEW_GLOBALS _SYSVIEW_Globals; + +static SEGGER_SYSVIEW_MODULE* _pFirstModule; +static U8 _NumModules; + +/********************************************************************* +* +* Static code +* +********************************************************************** +*/ + +#define ENCODE_U32(pDest, Value) { \ + U8* pSysviewPointer; \ + U32 SysViewData; \ + pSysviewPointer = pDest; \ + SysViewData = Value; \ + while(SysViewData > 0x7F) { \ + *pSysviewPointer++ = (U8)(SysViewData | 0x80); \ + SysViewData >>= 7; \ + }; \ + *pSysviewPointer++ = (U8)SysViewData; \ + pDest = pSysviewPointer; \ + }; + + + +#if (SEGGER_SYSVIEW_USE_STATIC_BUFFER == 1) +static U8 _aPacket[SEGGER_SYSVIEW_MAX_PACKET_SIZE]; + +#define RECORD_START(PacketSize) SEGGER_SYSVIEW_LOCK(); \ + pPayloadStart = _PreparePacket(_aPacket); + +#define RECORD_END() SEGGER_SYSVIEW_UNLOCK() + +#else + +#define RECORD_START(PacketSize) U8 aPacket[(PacketSize)]; \ + pPayloadStart = _PreparePacket(aPacket); \ + +#define RECORD_END() + +#endif + +/********************************************************************* +* +* _EncodeData() +* +* Function description +* Encode a byte buffer in variable-length format. +* +* Parameters +* pPayload - Pointer to where string will be encoded. +* pSrc - Pointer to data buffer to be encoded. +* NumBytes - Number of bytes in the buffer to be encoded. +* +* Return value +* Pointer to the byte following the value, i.e. the first free +* byte in the payload and the next position to store payload +* content. +* +* Additional information +* The data is encoded as a count byte followed by the contents +* of the data buffer. +* Make sure NumBytes + 1 bytes are free for the payload. +*/ +static U8* _EncodeData(U8* pPayload, const char* pSrc, unsigned int NumBytes) { + unsigned int n; + // + n = 0; + *pPayload++ = NumBytes; + while (n < NumBytes) { + *pPayload++ = *pSrc++; + n++; + } + return pPayload; +} + +/********************************************************************* +* +* _EncodeStr() +* +* Function description +* Encode a string in variable-length format. +* +* Parameters +* pPayload - Pointer to where string will be encoded. +* pText - String to encode. +* Limit - Maximum number of characters to encode from string. +* +* Return value +* Pointer to the byte following the value, i.e. the first free +* byte in the payload and the next position to store payload +* content. +* +* Additional information +* The string is encoded as a count byte followed by the contents +* of the string. +* No more than 1 + Limit bytes will be encoded to the payload. +*/ +static U8 *_EncodeStr(U8 *pPayload, const char *pText, unsigned int Limit) { + unsigned int n; + unsigned int Len; + // + // Compute string len + // + Len = 0; + while(*(pText + Len) != 0) { + Len++; + } + if (Len > Limit) { + Len = Limit; + } + // + // Write Len + // + if (Len < 255) { + *pPayload++ = Len; + } else { + *pPayload++ = 255; + *pPayload++ = (Len & 255); + *pPayload++ = ((Len >> 8) & 255); + } + // + // copy string + // + n = 0; + while (n < Len) { + *pPayload++ = *pText++; + n++; + } + return pPayload; +} + +/********************************************************************* +* +* _PreparePacket() +* +* Function description +* Prepare a SystemView event packet header. +* +* Parameters +* pPacket - Pointer to start of packet to initialize. +* +* Return value +* Pointer to first byte of packet payload. +* +* Additional information +* The payload length and evnetId are not initialized. +* PreparePacket only reserves space for them and they are +* computed and filled in by the sending function. +*/ +static U8* _PreparePacket(U8* pPacket) { + return pPacket + 4; +} + +/********************************************************************* +* +* _HandleIncomingPacket() +* +* Function description +* Read an incoming command from the down channel and process it. +* +* Additional information +* This function is called each time after sending a packet. +* Processing incoming packets is done asynchronous. SystemView might +* already have sent event packets after the host has sent a command. +*/ +#if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) +static void _HandleIncomingPacket(void) { + U8 Cmd; + int Status; + // + Status = SEGGER_RTT_ReadNoLock(CHANNEL_ID_DOWN, &Cmd, 1); + if (Status > 0) { + switch (Cmd) { + case SEGGER_SYSVIEW_COMMAND_ID_START: + SEGGER_SYSVIEW_Start(); + break; + case SEGGER_SYSVIEW_COMMAND_ID_STOP: + SEGGER_SYSVIEW_Stop(); + break; + case SEGGER_SYSVIEW_COMMAND_ID_GET_SYSTIME: + SEGGER_SYSVIEW_RecordSystime(); + break; + case SEGGER_SYSVIEW_COMMAND_ID_GET_TASKLIST: + SEGGER_SYSVIEW_SendTaskList(); + break; + case SEGGER_SYSVIEW_COMMAND_ID_GET_SYSDESC: + SEGGER_SYSVIEW_GetSysDesc(); + break; + case SEGGER_SYSVIEW_COMMAND_ID_GET_NUMMODULES: + SEGGER_SYSVIEW_SendNumModules(); + break; + case SEGGER_SYSVIEW_COMMAND_ID_GET_MODULEDESC: + SEGGER_SYSVIEW_SendModuleDescription(); + break; + case SEGGER_SYSVIEW_COMMAND_ID_GET_MODULE: + Status = SEGGER_RTT_ReadNoLock(CHANNEL_ID_DOWN, &Cmd, 1); + if (Status > 0) { + SEGGER_SYSVIEW_SendModule(Cmd); + } + break; + case SEGGER_SYSVIEW_COMMAND_ID_HEARTBEAT: + break; + default: + if (Cmd >= 128) { // Unknown extended command. Dummy read its parameter. + SEGGER_RTT_ReadNoLock(CHANNEL_ID_DOWN, &Cmd, 1); + } + break; + } + } +} +#endif // (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + +/********************************************************************* +* +* _TrySendOverflowPacket() +* +* Function description +* Try to transmit an SystemView Overflow packet containing the +* number of dropped packets. +* +* Additional information +* Format as follows: +* 01 Max. packet len is 1 + 5 + 5 = 11 +* +* Example packets sent +* 01 20 40 +* +* Return value +* !=0: Success, Message sent (stored in RTT-Buffer) +* ==0: Buffer full, Message *NOT* stored +* +*/ +#if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) +static int _TrySendOverflowPacket(void) { + U32 TimeStamp; + I32 Delta; + int Status; + U8 aPacket[11]; + U8* pPayload; + + aPacket[0] = SYSVIEW_EVTID_OVERFLOW; // 1 + pPayload = &aPacket[1]; + ENCODE_U32(pPayload, _SYSVIEW_Globals.DropCount); + // + // Compute time stamp delta and append it to packet. + // + TimeStamp = SEGGER_SYSVIEW_GET_TIMESTAMP(); + Delta = TimeStamp - _SYSVIEW_Globals.LastTxTimeStamp; + MAKE_DELTA_32BIT(Delta); + ENCODE_U32(pPayload, Delta); + // + // Try to store packet in RTT buffer and update time stamp when this was successful + // + Status = SEGGER_RTT_WriteSkipNoLock(CHANNEL_ID_UP, aPacket, pPayload - aPacket); + SEGGER_SYSVIEW_ON_EVENT_RECORDED(pPayload - aPacket); + if (Status) { + _SYSVIEW_Globals.LastTxTimeStamp = TimeStamp; + _SYSVIEW_Globals.EnableState--; // EnableState has been 2, will be 1. Always. + } else { + _SYSVIEW_Globals.DropCount++; + } + // + return Status; +} +#endif // (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + +/********************************************************************* +* +* _SendSyncInfo() +* +* Function description +* Send SystemView sync packet and system information in +* post mortem mode. +* +* Additional information +* Sync is 10 * 0x00 without timestamp +*/ +#if (SEGGER_SYSVIEW_POST_MORTEM_MODE == 1) +static void _SendSyncInfo(void) { + // + // Add sync packet ( 10 * 0x00) + // Send system description + // Send system time + // Send task list + // Send module description + // Send module information + // + SEGGER_RTT_WriteWithOverwriteNoLock(CHANNEL_ID_UP, _abSync, 10); + SEGGER_SYSVIEW_ON_EVENT_RECORDED(10); + SEGGER_SYSVIEW_RecordVoid(SYSVIEW_EVTID_TRACE_START); + { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 4 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, _SYSVIEW_Globals.SysFreq); + ENCODE_U32(pPayload, _SYSVIEW_Globals.CPUFreq); + ENCODE_U32(pPayload, _SYSVIEW_Globals.RAMBaseAddress); + ENCODE_U32(pPayload, SEGGER_SYSVIEW_ID_SHIFT); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_INIT); + RECORD_END(); + } + if (_SYSVIEW_Globals.pfSendSysDesc) { + _SYSVIEW_Globals.pfSendSysDesc(); + } + SEGGER_SYSVIEW_RecordSystime(); + SEGGER_SYSVIEW_SendTaskList(); + if (_NumModules > 0) { + int n; + SEGGER_SYSVIEW_SendNumModules(); + for (n = 0; n < _NumModules; n++) { + SEGGER_SYSVIEW_SendModule(n); + } + SEGGER_SYSVIEW_SendModuleDescription(); + } +} +#endif // (SEGGER_SYSVIEW_POST_MORTEM_MODE == 1) + +/********************************************************************* +* +* _SendPacket() +* +* Function description +* Send a SystemView packet over RTT. RTT channel and mode are +* configured by macros when the SystemView component is initialized. +* This function takes care of maintaining the packet drop count +* and sending overflow packets when necessary. +* The packet must be passed without Id and Length because this +* function prepends it to the packet before transmission. +* +* Parameters +* pStartPacket - Pointer to start of packet payload. +* There must be at least 4 bytes free to prepend Id and Length. +* pEndPacket - Pointer to end of packet payload. +* EventId - Id of the event to send. +* +*/ +static void _SendPacket(U8* pStartPacket, U8* pEndPacket, unsigned int EventId) { + unsigned int NumBytes; + U32 TimeStamp; + U32 Delta; +#if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + int Status; +#endif + +#if (SEGGER_SYSVIEW_USE_STATIC_BUFFER == 0) + SEGGER_SYSVIEW_LOCK(); +#endif + +#if (SEGGER_SYSVIEW_POST_MORTEM_MODE == 1) + if (_SYSVIEW_Globals.EnableState == 0) { + goto SendDone; + } +#else + if (_SYSVIEW_Globals.EnableState == 1) { // Enabled, no dropped packets remaining + goto Send; + } + if (_SYSVIEW_Globals.EnableState == 0) { + goto SendDone; + } + // + // Handle buffer full situations: + // Have packets been dropped before because buffer was full? + // In this case try to send and overflow packet. + // + if (_SYSVIEW_Globals.EnableState == 2) { + _TrySendOverflowPacket(); + if (_SYSVIEW_Globals.EnableState != 1) { + goto SendDone; + } + } +Send: +#endif + // + // Check if event is disabled from being recorded. + // + if (EventId < 32) { + if (_SYSVIEW_Globals.DisabledEvents & ((U32)1u << EventId)) { + goto SendDone; + } + } + // + // Prepare actual packet. + // If it is a known packet, prepend eventId only, + // otherwise prepend packet length and eventId. + // + if (EventId < 24) { + *--pStartPacket = EventId; + } else { + NumBytes = pEndPacket - pStartPacket; + if (NumBytes > 127) { + *--pStartPacket = (NumBytes >> 7); + *--pStartPacket = NumBytes | 0x80; + } else { + *--pStartPacket = NumBytes; + } + if (EventId > 127) { + *--pStartPacket = (EventId >> 7); + *--pStartPacket = EventId | 0x80; + } else { + *--pStartPacket = EventId; + } + } + // + // Compute time stamp delta and append it to packet. + // + TimeStamp = SEGGER_SYSVIEW_GET_TIMESTAMP(); + Delta = TimeStamp - _SYSVIEW_Globals.LastTxTimeStamp; + MAKE_DELTA_32BIT(Delta); + ENCODE_U32(pEndPacket, Delta); +#if (SEGGER_SYSVIEW_POST_MORTEM_MODE == 1) + // + // Store packet in RTT buffer by overwriting old data and update time stamp + // + SEGGER_RTT_WriteWithOverwriteNoLock(CHANNEL_ID_UP, pStartPacket, pEndPacket - pStartPacket); + SEGGER_SYSVIEW_ON_EVENT_RECORDED(pEndPacket - pStartPacket); + _SYSVIEW_Globals.LastTxTimeStamp = TimeStamp; +#else + // + // Try to store packet in RTT buffer and update time stamp when this was successful + // + Status = SEGGER_RTT_WriteSkipNoLock(CHANNEL_ID_UP, pStartPacket, pEndPacket - pStartPacket); + SEGGER_SYSVIEW_ON_EVENT_RECORDED(pEndPacket - pStartPacket); + if (Status) { + _SYSVIEW_Globals.LastTxTimeStamp = TimeStamp; + } else { + _SYSVIEW_Globals.EnableState++; // EnableState has been 1, will be 2. Always. + } +#endif + +#if (SEGGER_SYSVIEW_POST_MORTEM_MODE == 1) + // + // Add sync and system information periodically if we are in post mortem mode + // + if (_SYSVIEW_Globals.RecursionCnt == 0) { // Avoid uncontrolled nesting. This way, this routine can call itself once, but no more often than that. + _SYSVIEW_Globals.RecursionCnt = 1; + if (_SYSVIEW_Globals.PacketCount++ & (1 << SEGGER_SYSVIEW_SYNC_PERIOD_SHIFT)) { + _SendSyncInfo(); + _SYSVIEW_Globals.PacketCount = 0; + } + _SYSVIEW_Globals.RecursionCnt = 0; + } +SendDone: + ; // Avoid "label at end of compound statement" error when using static buffer +#else +SendDone: + // + // Check if host is sending data which needs to be processed. + // Note that since this code is called for every packet, it is very time critical, so we do + // only what is really needed here, which is checking if there is any data + // + if (SEGGER_RTT_HASDATA(CHANNEL_ID_DOWN)) { + if (_SYSVIEW_Globals.RecursionCnt == 0) { // Avoid uncontrolled nesting. This way, this routine can call itself once, but no more often than that. + _SYSVIEW_Globals.RecursionCnt = 1; + _HandleIncomingPacket(); + _SYSVIEW_Globals.RecursionCnt = 0; + } + } +#endif + // +#if (SEGGER_SYSVIEW_USE_STATIC_BUFFER == 0) + SEGGER_SYSVIEW_UNLOCK(); // We are done. Unlock and return +#endif +} + +#ifndef SEGGER_SYSVIEW_EXCLUDE_PRINTF // Define in project to avoid warnings about variable parameter list +/********************************************************************* +* +* _VPrintHost() +* +* Function description +* Send a format string and its parameters to the host. +* +* Parameters +* s Pointer to format string. +* Options Options to be sent to the host. +* pParamList Pointer to the list of arguments for the format string. +*/ +static int _VPrintHost(const char* s, U32 Options, va_list* pParamList) { + U32 aParas[SEGGER_SYSVIEW_MAX_ARGUMENTS]; + U32* pParas; + U32 NumArguments; + const char* p; + char c; + U8* pPayload; + U8* pPayloadStart; +#if SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT + U8 HasNonScalar; + + HasNonScalar = 0; +#endif + // + // Count number of arguments by counting '%' characters in string. + // If enabled, check for non-scalar modifier flags to format string on the target. + // + p = s; + NumArguments = 0; + for (;;) { + c = *p++; + if (c == 0) { + break; + } + if (c == '%') { + c = *p; +#if SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT == 0 + aParas[NumArguments++] = va_arg(*pParamList, int); + if (NumArguments == SEGGER_SYSVIEW_MAX_ARGUMENTS) { + break; + } +#else + if (c == 's') { + HasNonScalar = 1; + break; + } else { + aParas[NumArguments++] = va_arg(*pParamList, int); + if (NumArguments == SEGGER_SYSVIEW_MAX_ARGUMENTS) { + break; + } + } +#endif + } + } + +#if SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT + if (HasNonScalar) { + return -1; + } +#endif + // + // Send string and parameters to host + // + { + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_MAX_STRING_LEN + 2 * SEGGER_SYSVIEW_QUANTA_U32 + SEGGER_SYSVIEW_MAX_ARGUMENTS * SEGGER_SYSVIEW_QUANTA_U32); + pPayload = _EncodeStr(pPayloadStart, s, SEGGER_SYSVIEW_MAX_STRING_LEN); + ENCODE_U32(pPayload, Options); + ENCODE_U32(pPayload, NumArguments); + pParas = aParas; + while (NumArguments--) { + ENCODE_U32(pPayload, (*pParas)); + pParas++; + } + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_PRINT_FORMATTED); + RECORD_END(); + } + return 0; +} + +/********************************************************************* +* +* _StoreChar() +* +* Function description +* Stores a character in the printf-buffer and sends the buffer when +* it is filled. +* +* Parameters +* p Pointer to the buffer description. +* c Character to be printed. +*/ +static void _StoreChar(SEGGER_SYSVIEW_PRINTF_DESC * p, char c) { + unsigned int Cnt; + U8* pPayload; + U32 Options; + + Cnt = p->Cnt; + if ((Cnt + 1u) <= SEGGER_SYSVIEW_MAX_STRING_LEN) { + *(p->pPayload++) = c; + p->Cnt = Cnt + 1u; + } + // + // Write part of string, when the buffer is full + // + if (p->Cnt == SEGGER_SYSVIEW_MAX_STRING_LEN) { + *(p->pPayloadStart) = p->Cnt; + pPayload = p->pPayload; + Options = p->Options; + ENCODE_U32(pPayload, Options); + ENCODE_U32(pPayload, 0); + _SendPacket(p->pPayloadStart, pPayload, SYSVIEW_EVTID_PRINT_FORMATTED); + p->pPayloadStart = _PreparePacket(p->pBuffer); + p->pPayload = p->pPayloadStart + 1u; + p->Cnt = 0u; + } +} + +/********************************************************************* +* +* _PrintUnsigned() +* +* Function description +* Print an unsigned integer with the given formatting into the +* formatted string. +* +* Parameters +* pBufferDesc Pointer to the buffer description. +* v Value to be printed. +* Base Base of the value. +* NumDigits Number of digits to be printed. +* FieldWidth Width of the printed field. +* FormatFlags Flags for formatting the value. +*/ +static void _PrintUnsigned(SEGGER_SYSVIEW_PRINTF_DESC * pBufferDesc, unsigned int v, unsigned int Base, unsigned int NumDigits, unsigned int FieldWidth, unsigned int FormatFlags) { + static const char _aV2C[16] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; + unsigned int Div; + unsigned int Digit; + unsigned int Number; + unsigned int Width; + char c; + + Number = v; + Digit = 1u; + // + // Get actual field width + // + Width = 1u; + while (Number >= Base) { + Number = (Number / Base); + Width++; + } + if (NumDigits > Width) { + Width = NumDigits; + } + // + // Print leading chars if necessary + // + if ((FormatFlags & FORMAT_FLAG_LEFT_JUSTIFY) == 0u) { + if (FieldWidth != 0u) { + if (((FormatFlags & FORMAT_FLAG_PAD_ZERO) == FORMAT_FLAG_PAD_ZERO) && (NumDigits == 0u)) { + c = '0'; + } else { + c = ' '; + } + while ((FieldWidth != 0u) && (Width < FieldWidth)) { + FieldWidth--; + _StoreChar(pBufferDesc, c); + } + } + } + // + // Compute Digit. + // Loop until Digit has the value of the highest digit required. + // Example: If the output is 345 (Base 10), loop 2 times until Digit is 100. + // + while (1) { + if (NumDigits > 1u) { // User specified a min number of digits to print? => Make sure we loop at least that often, before checking anything else (> 1 check avoids problems with NumDigits being signed / unsigned) + NumDigits--; + } else { + Div = v / Digit; + if (Div < Base) { // Is our divider big enough to extract the highest digit from value? => Done + break; + } + } + Digit *= Base; + } + // + // Output digits + // + do { + Div = v / Digit; + v -= Div * Digit; + _StoreChar(pBufferDesc, _aV2C[Div]); + Digit /= Base; + } while (Digit); + // + // Print trailing spaces if necessary + // + if ((FormatFlags & FORMAT_FLAG_LEFT_JUSTIFY) == FORMAT_FLAG_LEFT_JUSTIFY) { + if (FieldWidth != 0u) { + while ((FieldWidth != 0u) && (Width < FieldWidth)) { + FieldWidth--; + _StoreChar(pBufferDesc, ' '); + } + } + } +} + +/********************************************************************* +* +* _PrintInt() +* +* Function description +* Print a signed integer with the given formatting into the +* formatted string. +* +* Parameters +* pBufferDesc Pointer to the buffer description. +* v Value to be printed. +* Base Base of the value. +* NumDigits Number of digits to be printed. +* FieldWidth Width of the printed field. +* FormatFlags Flags for formatting the value. +*/ +static void _PrintInt(SEGGER_SYSVIEW_PRINTF_DESC * pBufferDesc, int v, unsigned int Base, unsigned int NumDigits, unsigned int FieldWidth, unsigned int FormatFlags) { + unsigned int Width; + int Number; + + Number = (v < 0) ? -v : v; + + // + // Get actual field width + // + Width = 1u; + while (Number >= (int)Base) { + Number = (Number / (int)Base); + Width++; + } + if (NumDigits > Width) { + Width = NumDigits; + } + if ((FieldWidth > 0u) && ((v < 0) || ((FormatFlags & FORMAT_FLAG_PRINT_SIGN) == FORMAT_FLAG_PRINT_SIGN))) { + FieldWidth--; + } + + // + // Print leading spaces if necessary + // + if ((((FormatFlags & FORMAT_FLAG_PAD_ZERO) == 0u) || (NumDigits != 0u)) && ((FormatFlags & FORMAT_FLAG_LEFT_JUSTIFY) == 0u)) { + if (FieldWidth != 0u) { + while ((FieldWidth != 0u) && (Width < FieldWidth)) { + FieldWidth--; + _StoreChar(pBufferDesc, ' '); + } + } + } + // + // Print sign if necessary + // + if (v < 0) { + v = -v; + _StoreChar(pBufferDesc, '-'); + } else if ((FormatFlags & FORMAT_FLAG_PRINT_SIGN) == FORMAT_FLAG_PRINT_SIGN) { + _StoreChar(pBufferDesc, '+'); + } else { + + } + // + // Print leading zeros if necessary + // + if (((FormatFlags & FORMAT_FLAG_PAD_ZERO) == FORMAT_FLAG_PAD_ZERO) && ((FormatFlags & FORMAT_FLAG_LEFT_JUSTIFY) == 0u) && (NumDigits == 0u)) { + if (FieldWidth != 0u) { + while ((FieldWidth != 0u) && (Width < FieldWidth)) { + FieldWidth--; + _StoreChar(pBufferDesc, '0'); + } + } + } + // + // Print number without sign + // + _PrintUnsigned(pBufferDesc, (unsigned int)v, Base, NumDigits, FieldWidth, FormatFlags); +} + +/********************************************************************* +* +* _VPrintTarget() +* +* Function description +* Stores a formatted string. +* This data is read by the host. +* +* Parameters +* sFormat Pointer to format string. +* Options Options to be sent to the host. +* pParamList Pointer to the list of arguments for the format string. +*/ +static void _VPrintTarget(const char* sFormat, U32 Options, va_list* pParamList) { + SEGGER_SYSVIEW_PRINTF_DESC BufferDesc; + char c; + int v; + unsigned int NumDigits; + unsigned int FormatFlags; + unsigned int FieldWidth; + U8* pPayloadStart; +#if SEGGER_SYSVIEW_USE_STATIC_BUFFER == 0 + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_MAX_STRING_LEN + 1 + 2 * SEGGER_SYSVIEW_QUANTA_U32); + SEGGER_SYSVIEW_LOCK(); +#else + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_MAX_STRING_LEN + 1 + 2 * SEGGER_SYSVIEW_QUANTA_U32); +#endif + +#if SEGGER_SYSVIEW_USE_STATIC_BUFFER == 0 + BufferDesc.pBuffer = aPacket; +#else + BufferDesc.pBuffer = _aPacket; +#endif + BufferDesc.Cnt = 0u; + BufferDesc.pPayloadStart = pPayloadStart; + BufferDesc.pPayload = BufferDesc.pPayloadStart + 1u; + BufferDesc.Options = Options; + + do { + c = *sFormat; + sFormat++; + if (c == 0u) { + break; + } + if (c == '%') { + // + // Filter out flags + // + FormatFlags = 0u; + v = 1; + do { + c = *sFormat; + switch (c) { + case '-': FormatFlags |= FORMAT_FLAG_LEFT_JUSTIFY; sFormat++; break; + case '0': FormatFlags |= FORMAT_FLAG_PAD_ZERO; sFormat++; break; + case '+': FormatFlags |= FORMAT_FLAG_PRINT_SIGN; sFormat++; break; + case '#': FormatFlags |= FORMAT_FLAG_ALTERNATE; sFormat++; break; + default: v = 0; break; + } + } while (v); + // + // filter out field with + // + FieldWidth = 0u; + do { + c = *sFormat; + if ((c < '0') || (c > '9')) { + break; + } + sFormat++; + FieldWidth = (FieldWidth * 10u) + ((unsigned int)c - '0'); + } while (1); + + // + // Filter out precision (number of digits to display) + // + NumDigits = 0u; + c = *sFormat; + if (c == '.') { + sFormat++; + do { + c = *sFormat; + if ((c < '0') || (c > '9')) { + break; + } + sFormat++; + NumDigits = NumDigits * 10u + ((unsigned int)c - '0'); + } while (1); + } + // + // Filter out length modifier + // + c = *sFormat; + do { + if ((c == 'l') || (c == 'h')) { + c = *sFormat; + sFormat++; + } else { + break; + } + } while (1); + // + // Handle specifiers + // + switch (c) { + case 'c': { + char c0; + v = va_arg(*pParamList, int); + c0 = (char)v; + _StoreChar(&BufferDesc, c0); + break; + } + case 'd': + v = va_arg(*pParamList, int); + _PrintInt(&BufferDesc, v, 10u, NumDigits, FieldWidth, FormatFlags); + break; + case 'u': + v = va_arg(*pParamList, int); + _PrintUnsigned(&BufferDesc, (unsigned int)v, 10u, NumDigits, FieldWidth, FormatFlags); + break; + case 'x': + case 'X': + v = va_arg(*pParamList, int); + _PrintUnsigned(&BufferDesc, (unsigned int)v, 16u, NumDigits, FieldWidth, FormatFlags); + break; + case 'p': + v = va_arg(*pParamList, int); + _PrintUnsigned(&BufferDesc, (unsigned int)v, 16u, 8u, 8u, 0u); + break; + case '%': + _StoreChar(&BufferDesc, '%'); + break; + default: + break; + } + sFormat++; + } else { + _StoreChar(&BufferDesc, c); + } + } while (*sFormat); + + // + // Write remaining data, if any + // + if (BufferDesc.Cnt != 0u) { + *(BufferDesc.pPayloadStart) = BufferDesc.Cnt; + ENCODE_U32(BufferDesc.pPayload, BufferDesc.Options); + ENCODE_U32(BufferDesc.pPayload, 0); + _SendPacket(BufferDesc.pPayloadStart, BufferDesc.pPayload, SYSVIEW_EVTID_PRINT_FORMATTED); + } +#if SEGGER_SYSVIEW_USE_STATIC_BUFFER == 0 + SEGGER_SYSVIEW_UNLOCK(); + RECORD_END(); +#else + RECORD_END(); +#endif +} +#endif // SEGGER_SYSVIEW_EXCLUDE_PRINTF + +/********************************************************************* +* +* Public code +* +********************************************************************** +*/ + +/********************************************************************* +* +* SEGGER_SYSVIEW_Init() +* +* Function description +* Initializes the SYSVIEW module. +* Must be called before the Systemview Application connects to +* the system. +* +* Parameters +* SysFreq - Frequency of timestamp, usually CPU core clock frequency. +* CPUFreq - CPU core clock frequency. +* pOSAPI - Pointer to the API structure for OS-specific functions. +* pfSendSysDesc - Pointer to record system description callback function. +* +* Additional information +* This function initializes the RTT channel used to transport +* SEGGER SystemView packets. +* The channel is assigned the label "SysView" for client software +* to identify the SystemView channel. +* +* The channel is configured with the macro SEGGER_SYSVIEW_RTT_CHANNEL. +*/ +void SEGGER_SYSVIEW_Init(U32 SysFreq, U32 CPUFreq, const SEGGER_SYSVIEW_OS_API *pOSAPI, SEGGER_SYSVIEW_SEND_SYS_DESC_FUNC pfSendSysDesc) { +#ifdef SEGGER_RTT_SECTION + // + // Explicitly initialize the RTT Control Block if it is in its dedicated section. + // + SEGGER_RTT_Init(); +#endif +#if (SEGGER_SYSVIEW_POST_MORTEM_MODE == 1) +#if SEGGER_SYSVIEW_RTT_CHANNEL > 0 + SEGGER_RTT_ConfigUpBuffer(SEGGER_SYSVIEW_RTT_CHANNEL, "SysView", &_UpBuffer[0], sizeof(_UpBuffer), SEGGER_RTT_MODE_NO_BLOCK_SKIP); +#else + _SYSVIEW_Globals.UpChannel = SEGGER_RTT_AllocUpBuffer ("SysView", &_UpBuffer[0], sizeof(_UpBuffer), SEGGER_RTT_MODE_NO_BLOCK_SKIP); +#endif + _SYSVIEW_Globals.RAMBaseAddress = SEGGER_SYSVIEW_ID_BASE; + _SYSVIEW_Globals.LastTxTimeStamp = SEGGER_SYSVIEW_GET_TIMESTAMP(); + _SYSVIEW_Globals.pOSAPI = pOSAPI; + _SYSVIEW_Globals.SysFreq = SysFreq; + _SYSVIEW_Globals.CPUFreq = CPUFreq; + _SYSVIEW_Globals.pfSendSysDesc = pfSendSysDesc; + _SYSVIEW_Globals.EnableState = 0; + _SYSVIEW_Globals.PacketCount = 0; +#else // (SEGGER_SYSVIEW_POST_MORTEM_MODE == 1) +#if SEGGER_SYSVIEW_RTT_CHANNEL > 0 + SEGGER_RTT_ConfigUpBuffer (SEGGER_SYSVIEW_RTT_CHANNEL, "SysView", &_UpBuffer[0], sizeof(_UpBuffer), SEGGER_RTT_MODE_NO_BLOCK_SKIP); + SEGGER_RTT_ConfigDownBuffer (SEGGER_SYSVIEW_RTT_CHANNEL, "SysView", &_DownBuffer[0], sizeof(_DownBuffer), SEGGER_RTT_MODE_NO_BLOCK_SKIP); +#else + _SYSVIEW_Globals.UpChannel = SEGGER_RTT_AllocUpBuffer ("SysView", &_UpBuffer[0], sizeof(_UpBuffer), SEGGER_RTT_MODE_NO_BLOCK_SKIP); + _SYSVIEW_Globals.DownChannel = _SYSVIEW_Globals.UpChannel; + SEGGER_RTT_ConfigDownBuffer (_SYSVIEW_Globals.DownChannel, "SysView", &_DownBuffer[0], sizeof(_DownBuffer), SEGGER_RTT_MODE_NO_BLOCK_SKIP); +#endif + _SYSVIEW_Globals.RAMBaseAddress = SEGGER_SYSVIEW_ID_BASE; + _SYSVIEW_Globals.LastTxTimeStamp = SEGGER_SYSVIEW_GET_TIMESTAMP(); + _SYSVIEW_Globals.pOSAPI = pOSAPI; + _SYSVIEW_Globals.SysFreq = SysFreq; + _SYSVIEW_Globals.CPUFreq = CPUFreq; + _SYSVIEW_Globals.pfSendSysDesc = pfSendSysDesc; + _SYSVIEW_Globals.EnableState = 0; +#endif // (SEGGER_SYSVIEW_POST_MORTEM_MODE == 1) +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_SetRAMBase() +* +* Function description +* Sets the RAM base address, which is subtracted from IDs in order +* to save bandwidth. +* +* Parameters +* RAMBaseAddress - Lowest RAM Address. (i.e. 0x20000000 on most Cortex-M) +*/ +void SEGGER_SYSVIEW_SetRAMBase(U32 RAMBaseAddress) { + _SYSVIEW_Globals.RAMBaseAddress = RAMBaseAddress; +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordVoid() +* +* Function description +* Formats and sends a SystemView packet with an empty payload. +* +* Parameters +* EventID - SystemView event ID. +*/ +void SEGGER_SYSVIEW_RecordVoid(unsigned int EventID) { + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE); + // + _SendPacket(pPayloadStart, pPayloadStart, EventID); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordU32() +* +* Function description +* Formats and sends a SystemView packet containing a single U32 +* parameter payload. +* +* Parameters +* EventID - SystemView event ID. +* Value - The 32-bit parameter encoded to SystemView packet payload. +*/ +void SEGGER_SYSVIEW_RecordU32(unsigned int EventID, U32 Value) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, Value); + _SendPacket(pPayloadStart, pPayload, EventID); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordU32x2() +* +* Function description +* Formats and sends a SystemView packet containing 2 U32 parameter payload. +* +* Parameters +* EventID - SystemView event ID. +* Para0 - The 32-bit parameter encoded to SystemView packet payload. +* Para1 - The 32-bit parameter encoded to SystemView packet payload. +*/ +void SEGGER_SYSVIEW_RecordU32x2(unsigned int EventID, U32 Para0, U32 Para1) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, Para0); + ENCODE_U32(pPayload, Para1); + _SendPacket(pPayloadStart, pPayload, EventID); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordU32x3() +* +* Function description +* Formats and sends a SystemView packet containing 3 U32 parameter payload. +* +* Parameters +* EventID - SystemView event ID. +* Para0 - The 32-bit parameter encoded to SystemView packet payload. +* Para1 - The 32-bit parameter encoded to SystemView packet payload. +* Para2 - The 32-bit parameter encoded to SystemView packet payload. +*/ +void SEGGER_SYSVIEW_RecordU32x3(unsigned int EventID, U32 Para0, U32 Para1, U32 Para2) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 3 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, Para0); + ENCODE_U32(pPayload, Para1); + ENCODE_U32(pPayload, Para2); + _SendPacket(pPayloadStart, pPayload, EventID); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordU32x4() +* +* Function description +* Formats and sends a SystemView packet containing 4 U32 parameter payload. +* +* Parameters +* EventID - SystemView event ID. +* Para0 - The 32-bit parameter encoded to SystemView packet payload. +* Para1 - The 32-bit parameter encoded to SystemView packet payload. +* Para2 - The 32-bit parameter encoded to SystemView packet payload. +* Para3 - The 32-bit parameter encoded to SystemView packet payload. +*/ +void SEGGER_SYSVIEW_RecordU32x4(unsigned int EventID, U32 Para0, U32 Para1, U32 Para2, U32 Para3) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 4 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, Para0); + ENCODE_U32(pPayload, Para1); + ENCODE_U32(pPayload, Para2); + ENCODE_U32(pPayload, Para3); + _SendPacket(pPayloadStart, pPayload, EventID); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordU32x5() +* +* Function description +* Formats and sends a SystemView packet containing 5 U32 parameter payload. +* +* Parameters +* EventID - SystemView event ID. +* Para0 - The 32-bit parameter encoded to SystemView packet payload. +* Para1 - The 32-bit parameter encoded to SystemView packet payload. +* Para2 - The 32-bit parameter encoded to SystemView packet payload. +* Para3 - The 32-bit parameter encoded to SystemView packet payload. +* Para4 - The 32-bit parameter encoded to SystemView packet payload. +*/ +void SEGGER_SYSVIEW_RecordU32x5(unsigned int EventID, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 5 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, Para0); + ENCODE_U32(pPayload, Para1); + ENCODE_U32(pPayload, Para2); + ENCODE_U32(pPayload, Para3); + ENCODE_U32(pPayload, Para4); + _SendPacket(pPayloadStart, pPayload, EventID); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordU32x6() +* +* Function description +* Formats and sends a SystemView packet containing 6 U32 parameter payload. +* +* Parameters +* EventID - SystemView event ID. +* Para0 - The 32-bit parameter encoded to SystemView packet payload. +* Para1 - The 32-bit parameter encoded to SystemView packet payload. +* Para2 - The 32-bit parameter encoded to SystemView packet payload. +* Para3 - The 32-bit parameter encoded to SystemView packet payload. +* Para4 - The 32-bit parameter encoded to SystemView packet payload. +* Para5 - The 32-bit parameter encoded to SystemView packet payload. +*/ +void SEGGER_SYSVIEW_RecordU32x6(unsigned int EventID, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 6 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, Para0); + ENCODE_U32(pPayload, Para1); + ENCODE_U32(pPayload, Para2); + ENCODE_U32(pPayload, Para3); + ENCODE_U32(pPayload, Para4); + ENCODE_U32(pPayload, Para5); + _SendPacket(pPayloadStart, pPayload, EventID); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordU32x7() +* +* Function description +* Formats and sends a SystemView packet containing 7 U32 parameter payload. +* +* Parameters +* EventID - SystemView event ID. +* Para0 - The 32-bit parameter encoded to SystemView packet payload. +* Para1 - The 32-bit parameter encoded to SystemView packet payload. +* Para2 - The 32-bit parameter encoded to SystemView packet payload. +* Para3 - The 32-bit parameter encoded to SystemView packet payload. +* Para4 - The 32-bit parameter encoded to SystemView packet payload. +* Para5 - The 32-bit parameter encoded to SystemView packet payload. +* Para6 - The 32-bit parameter encoded to SystemView packet payload. +*/ +void SEGGER_SYSVIEW_RecordU32x7(unsigned int EventID, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 7 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, Para0); + ENCODE_U32(pPayload, Para1); + ENCODE_U32(pPayload, Para2); + ENCODE_U32(pPayload, Para3); + ENCODE_U32(pPayload, Para4); + ENCODE_U32(pPayload, Para5); + ENCODE_U32(pPayload, Para6); + _SendPacket(pPayloadStart, pPayload, EventID); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordU32x8() +* +* Function description +* Formats and sends a SystemView packet containing 8 U32 parameter payload. +* +* Parameters +* EventID - SystemView event ID. +* Para0 - The 32-bit parameter encoded to SystemView packet payload. +* Para1 - The 32-bit parameter encoded to SystemView packet payload. +* Para2 - The 32-bit parameter encoded to SystemView packet payload. +* Para3 - The 32-bit parameter encoded to SystemView packet payload. +* Para4 - The 32-bit parameter encoded to SystemView packet payload. +* Para5 - The 32-bit parameter encoded to SystemView packet payload. +* Para6 - The 32-bit parameter encoded to SystemView packet payload. +* Para7 - The 32-bit parameter encoded to SystemView packet payload. +*/ +void SEGGER_SYSVIEW_RecordU32x8(unsigned int EventID, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6, U32 Para7) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 8 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, Para0); + ENCODE_U32(pPayload, Para1); + ENCODE_U32(pPayload, Para2); + ENCODE_U32(pPayload, Para3); + ENCODE_U32(pPayload, Para4); + ENCODE_U32(pPayload, Para5); + ENCODE_U32(pPayload, Para6); + ENCODE_U32(pPayload, Para7); + _SendPacket(pPayloadStart, pPayload, EventID); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordU32x9() +* +* Function description +* Formats and sends a SystemView packet containing 9 U32 parameter payload. +* +* Parameters +* EventID - SystemView event ID. +* Para0 - The 32-bit parameter encoded to SystemView packet payload. +* Para1 - The 32-bit parameter encoded to SystemView packet payload. +* Para2 - The 32-bit parameter encoded to SystemView packet payload. +* Para3 - The 32-bit parameter encoded to SystemView packet payload. +* Para4 - The 32-bit parameter encoded to SystemView packet payload. +* Para5 - The 32-bit parameter encoded to SystemView packet payload. +* Para6 - The 32-bit parameter encoded to SystemView packet payload. +* Para7 - The 32-bit parameter encoded to SystemView packet payload. +* Para8 - The 32-bit parameter encoded to SystemView packet payload. +*/ +void SEGGER_SYSVIEW_RecordU32x9(unsigned int EventID, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6, U32 Para7, U32 Para8) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 9 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, Para0); + ENCODE_U32(pPayload, Para1); + ENCODE_U32(pPayload, Para2); + ENCODE_U32(pPayload, Para3); + ENCODE_U32(pPayload, Para4); + ENCODE_U32(pPayload, Para5); + ENCODE_U32(pPayload, Para6); + ENCODE_U32(pPayload, Para7); + ENCODE_U32(pPayload, Para8); + _SendPacket(pPayloadStart, pPayload, EventID); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordU32x10() +* +* Function description +* Formats and sends a SystemView packet containing 10 U32 parameter payload. +* +* Parameters +* EventID - SystemView event ID. +* Para0 - The 32-bit parameter encoded to SystemView packet payload. +* Para1 - The 32-bit parameter encoded to SystemView packet payload. +* Para2 - The 32-bit parameter encoded to SystemView packet payload. +* Para3 - The 32-bit parameter encoded to SystemView packet payload. +* Para4 - The 32-bit parameter encoded to SystemView packet payload. +* Para5 - The 32-bit parameter encoded to SystemView packet payload. +* Para6 - The 32-bit parameter encoded to SystemView packet payload. +* Para7 - The 32-bit parameter encoded to SystemView packet payload. +* Para8 - The 32-bit parameter encoded to SystemView packet payload. +* Para9 - The 32-bit parameter encoded to SystemView packet payload. +*/ +void SEGGER_SYSVIEW_RecordU32x10(unsigned int EventID, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6, U32 Para7, U32 Para8, U32 Para9) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 10 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, Para0); + ENCODE_U32(pPayload, Para1); + ENCODE_U32(pPayload, Para2); + ENCODE_U32(pPayload, Para3); + ENCODE_U32(pPayload, Para4); + ENCODE_U32(pPayload, Para5); + ENCODE_U32(pPayload, Para6); + ENCODE_U32(pPayload, Para7); + ENCODE_U32(pPayload, Para8); + ENCODE_U32(pPayload, Para9); + _SendPacket(pPayloadStart, pPayload, EventID); + RECORD_END(); +} +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordString() +* +* Function description +* Formats and sends a SystemView packet containing a string. +* +* Parameters +* EventID - SystemView event ID. +* pString - The string to be sent in the SystemView packet payload. +* +* Additional information +* The string is encoded as a count byte followed by the contents +* of the string. +* No more than SEGGER_SYSVIEW_MAX_STRING_LEN bytes will be encoded to the payload. +*/ +void SEGGER_SYSVIEW_RecordString(unsigned int EventID, const char* pString) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 1 + SEGGER_SYSVIEW_MAX_STRING_LEN); + // + pPayload = _EncodeStr(pPayloadStart, pString, SEGGER_SYSVIEW_MAX_STRING_LEN); + _SendPacket(pPayloadStart, pPayload, EventID); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_Start() +* +* Function description +* Start recording SystemView events. +* +* This function is triggered by the SystemView Application on connect. +* For single-shot or post-mortem mode recording, it needs to be called +* by the application. +* +* Additional information +* This function enables transmission of SystemView packets recorded +* by subsequent trace calls and records a SystemView Start event. +* +* As part of start, a SystemView Init packet is sent, containing the system +* frequency. The list of current tasks, the current system time and the +* system description string is sent, too. +* +* Notes +* SEGGER_SYSVIEW_Start and SEGGER_SYSVIEW_Stop do not nest. +* When SEGGER_SYSVIEW_CAN_RESTART is 1, each received start command +* records the system information. This is required to enable restart +* of recordings when SystemView unexpectedly disconnects without sending +* a stop command before. +*/ +void SEGGER_SYSVIEW_Start(void) { +#if (SEGGER_SYSVIEW_CAN_RESTART == 0) + if (_SYSVIEW_Globals.EnableState == 0) { +#endif + _SYSVIEW_Globals.EnableState = 1; +#if (SEGGER_SYSVIEW_POST_MORTEM_MODE == 1) + _SendSyncInfo(); +#else + SEGGER_SYSVIEW_LOCK(); + SEGGER_RTT_WriteSkipNoLock(CHANNEL_ID_UP, _abSync, 10); + SEGGER_SYSVIEW_UNLOCK(); + SEGGER_SYSVIEW_ON_EVENT_RECORDED(10); + SEGGER_SYSVIEW_RecordVoid(SYSVIEW_EVTID_TRACE_START); + { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 4 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, _SYSVIEW_Globals.SysFreq); + ENCODE_U32(pPayload, _SYSVIEW_Globals.CPUFreq); + ENCODE_U32(pPayload, _SYSVIEW_Globals.RAMBaseAddress); + ENCODE_U32(pPayload, SEGGER_SYSVIEW_ID_SHIFT); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_INIT); + RECORD_END(); + } + if (_SYSVIEW_Globals.pfSendSysDesc) { + _SYSVIEW_Globals.pfSendSysDesc(); + } + SEGGER_SYSVIEW_RecordSystime(); + SEGGER_SYSVIEW_SendTaskList(); + SEGGER_SYSVIEW_SendNumModules(); +#endif +#if (SEGGER_SYSVIEW_CAN_RESTART == 0) + } +#endif +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_Stop() +* +* Function description +* Stop recording SystemView events. +* +* This function is triggered by the SystemView Application on disconnect. +* For single-shot or post-mortem mode recording, it can be called +* by the application. +* +* Additional information +* This function disables transmission of SystemView packets recorded +* by subsequent trace calls. If transmission is enabled when +* this function is called, a single SystemView Stop event is recorded +* to the trace, send, and then trace transmission is halted. +*/ +void SEGGER_SYSVIEW_Stop(void) { + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE); + // + if (_SYSVIEW_Globals.EnableState) { + _SendPacket(pPayloadStart, pPayloadStart, SYSVIEW_EVTID_TRACE_STOP); + _SYSVIEW_Globals.EnableState = 0; + } + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_GetChannelID() +* +* Function description +* Returns the RTT / channel ID used by SystemView. +*/ +int SEGGER_SYSVIEW_GetChannelID(void) { + return CHANNEL_ID_UP; +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_GetSysDesc() +* +* Function description +* Triggers a send of the system information and description. +* +*/ +void SEGGER_SYSVIEW_GetSysDesc(void) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 4 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, _SYSVIEW_Globals.SysFreq); + ENCODE_U32(pPayload, _SYSVIEW_Globals.CPUFreq); + ENCODE_U32(pPayload, _SYSVIEW_Globals.RAMBaseAddress); + ENCODE_U32(pPayload, SEGGER_SYSVIEW_ID_SHIFT); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_INIT); + RECORD_END(); + if (_SYSVIEW_Globals.pfSendSysDesc) { + _SYSVIEW_Globals.pfSendSysDesc(); + } +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_SendTaskInfo() +* +* Function description +* Send a Task Info Packet, containing TaskId for identification, +* task priority and task name. +* +* Parameters +* pInfo - Pointer to task information to send. +*/ +void SEGGER_SYSVIEW_SendTaskInfo(const SEGGER_SYSVIEW_TASKINFO *pInfo) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32 + 1 + 32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, SHRINK_ID(pInfo->TaskID)); + ENCODE_U32(pPayload, pInfo->Prio); + pPayload = _EncodeStr(pPayload, pInfo->sName, 32); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_TASK_INFO); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, SHRINK_ID(pInfo->TaskID)); + ENCODE_U32(pPayload, pInfo->StackBase); + ENCODE_U32(pPayload, pInfo->StackSize); + ENCODE_U32(pPayload, 0); // Stack End, future use + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_STACK_INFO); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_SendTaskList() +* +* Function description +* Send all tasks descriptors to the host. +*/ +void SEGGER_SYSVIEW_SendTaskList(void) { + if (_SYSVIEW_Globals.pOSAPI && _SYSVIEW_Globals.pOSAPI->pfSendTaskList) { + _SYSVIEW_Globals.pOSAPI->pfSendTaskList(); + } +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_SendSysDesc() +* +* Function description +* Send the system description string to the host. +* The system description is used by the Systemview Application +* to identify the current application and handle events accordingly. +* +* The system description is usually called by the system description +* callback, to ensure it is only sent when the SystemView Application +* is connected. +* +* Parameters +* sSysDesc - Pointer to the 0-terminated system description string. +* +* Additional information +* One system description string may not exceed SEGGER_SYSVIEW_MAX_STRING_LEN characters. +* Multiple description strings can be recorded. +* +* The Following items can be described in a system description string. +* Each item is identified by its identifier, followed by '=' and the value. +* Items are separated by ','. +*/ +void SEGGER_SYSVIEW_SendSysDesc(const char *sSysDesc) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 1 + SEGGER_SYSVIEW_MAX_STRING_LEN); + // + pPayload = _EncodeStr(pPayloadStart, sSysDesc, SEGGER_SYSVIEW_MAX_STRING_LEN); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_SYSDESC); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordSystime() +* +* Function description +* Formats and sends a SystemView Systime containing a single U64 or U32 +* parameter payload. +*/ +void SEGGER_SYSVIEW_RecordSystime(void) { + U64 Systime; + + if (_SYSVIEW_Globals.pOSAPI && _SYSVIEW_Globals.pOSAPI->pfGetTime) { + Systime = _SYSVIEW_Globals.pOSAPI->pfGetTime(); + SEGGER_SYSVIEW_RecordU32x2(SYSVIEW_EVTID_SYSTIME_US, + (U32)(Systime), + (U32)(Systime >> 32)); + } else { + SEGGER_SYSVIEW_RecordU32(SYSVIEW_EVTID_SYSTIME_CYCLES, SEGGER_SYSVIEW_GET_TIMESTAMP()); + } +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordEnterISR() +* +* Function description +* Format and send an ISR entry event. +* +* Additional information +* Example packets sent +* 02 0F 50 // ISR(15) Enter. Timestamp is 80 (0x50) +*/ +void SEGGER_SYSVIEW_RecordEnterISR(void) { + unsigned v; + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + v = SEGGER_SYSVIEW_GET_INTERRUPT_ID(); + ENCODE_U32(pPayload, v); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_ISR_ENTER); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordExitISR() +* +* Function description +* Format and send an ISR exit event. +* +* Additional information +* Format as follows: +* 03 // Max. packet len is 6 +* +* Example packets sent +* 03 20 // ISR Exit. Timestamp is 32 (0x20) +*/ +void SEGGER_SYSVIEW_RecordExitISR(void) { + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE); + // + _SendPacket(pPayloadStart, pPayloadStart, SYSVIEW_EVTID_ISR_EXIT); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordExitISRToScheduler() +* +* Function description +* Format and send an ISR exit into scheduler event. +* +* Additional information +* Format as follows: +* 18 // Max. packet len is 6 +* +* Example packets sent +* 18 20 // ISR Exit to Scheduler. Timestamp is 32 (0x20) +*/ +void SEGGER_SYSVIEW_RecordExitISRToScheduler(void) { + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE); + // + _SendPacket(pPayloadStart, pPayloadStart, SYSVIEW_EVTID_ISR_TO_SCHEDULER); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordEnterTimer() +* +* Function description +* Format and send a Timer entry event. +* +* Parameters +* TimerId - Id of the timer which starts. +*/ +void SEGGER_SYSVIEW_RecordEnterTimer(U32 TimerId) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, SHRINK_ID(TimerId)); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_TIMER_ENTER); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordExitTimer() +* +* Function description +* Format and send a Timer exit event. +*/ +void SEGGER_SYSVIEW_RecordExitTimer(void) { + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE); + // + _SendPacket(pPayloadStart, pPayloadStart, SYSVIEW_EVTID_TIMER_EXIT); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordEndCall() +* +* Function description +* Format and send an End API Call event without return value. +* +* Parameters +* EventID - Id of API function which ends. +*/ +void SEGGER_SYSVIEW_RecordEndCall(unsigned int EventID) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, EventID); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_END_CALL); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordEndCallU32() +* +* Function description +* Format and send an End API Call event with return value. +* +* Parameters +* EventID - Id of API function which ends. +* Para0 - Return value which will be returned by the API function. +*/ +void SEGGER_SYSVIEW_RecordEndCallU32(unsigned int EventID, U32 Para0) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, EventID); + ENCODE_U32(pPayload, Para0); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_END_CALL); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_OnIdle() +* +* Function description +* Record an Idle event. +*/ +void SEGGER_SYSVIEW_OnIdle(void) { + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE); + // + _SendPacket(pPayloadStart, pPayloadStart, SYSVIEW_EVTID_IDLE); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_OnTaskCreate() +* +* Function description +* Record a Task Create event. The Task Create event corresponds +* to creating a task in the OS. +* +* Parameters +* TaskId - Task ID of created task. +*/ +void SEGGER_SYSVIEW_OnTaskCreate(U32 TaskId) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + TaskId = SHRINK_ID(TaskId); + ENCODE_U32(pPayload, TaskId); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_TASK_CREATE); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_OnTaskTerminate() +* +* Function description +* Record a Task termination event. +* The Task termination event corresponds to terminating a task in +* the OS. If the TaskId is the currently active task, +* SEGGER_SYSVIEW_OnTaskStopExec may be used, either. +* +* Parameters +* TaskId - Task ID of terminated task. +*/ +void SEGGER_SYSVIEW_OnTaskTerminate(U32 TaskId) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + TaskId = SHRINK_ID(TaskId); + ENCODE_U32(pPayload, TaskId); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_TASK_TERMINATE); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_OnTaskStartExec() +* +* Function description +* Record a Task Start Execution event. The Task Start event +* corresponds to when a task has started to execute rather than +* when it is ready to execute. +* +* Parameters +* TaskId - Task ID of task that started to execute. +*/ +void SEGGER_SYSVIEW_OnTaskStartExec(U32 TaskId) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + TaskId = SHRINK_ID(TaskId); + ENCODE_U32(pPayload, TaskId); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_TASK_START_EXEC); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_OnTaskStopExec() +* +* Function description +* Record a Task Stop Execution event. The Task Stop event +* corresponds to when a task stops executing and terminates. +*/ +void SEGGER_SYSVIEW_OnTaskStopExec(void) { + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE); + // + _SendPacket(pPayloadStart, pPayloadStart, SYSVIEW_EVTID_TASK_STOP_EXEC); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_OnTaskStartReady() +* +* Function description +* Record a Task Start Ready event. +* +* Parameters +* TaskId - Task ID of task that started to execute. +*/ +void SEGGER_SYSVIEW_OnTaskStartReady(U32 TaskId) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + TaskId = SHRINK_ID(TaskId); + ENCODE_U32(pPayload, TaskId); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_TASK_START_READY); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_OnTaskStopReady() +* +* Function description +* Record a Task Stop Ready event. +* +* Parameters +* TaskId - Task ID of task that completed execution. +* Cause - Reason for task to stop (i.e. Idle/Sleep) +*/ +void SEGGER_SYSVIEW_OnTaskStopReady(U32 TaskId, unsigned int Cause) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + TaskId = SHRINK_ID(TaskId); + ENCODE_U32(pPayload, TaskId); + ENCODE_U32(pPayload, Cause); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_TASK_STOP_READY); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_MarkStart() +* +* Function description +* Record a Performance Marker Start event to start measuring runtime. +* +* Parameters +* MarkerId - User defined ID for the marker. +*/ +void SEGGER_SYSVIEW_MarkStart(unsigned MarkerId) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, MarkerId); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_MARK_START); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_MarkStop() +* +* Function description +* Record a Performance Marker Stop event to stop measuring runtime. +* +* Parameters +* MarkerId - User defined ID for the marker. +*/ +void SEGGER_SYSVIEW_MarkStop(unsigned MarkerId) { + U8 * pPayload; + U8 * pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, MarkerId); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_MARK_STOP); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_Mark() +* +* Function description +* Record a Performance Marker intermediate event. +* +* Parameters +* MarkerId - User defined ID for the marker. +*/ +void SEGGER_SYSVIEW_Mark(unsigned int MarkerId) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2 * SEGGER_SYSVIEW_QUANTA_U32); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, SYSVIEW_EVTID_EX_MARK); + ENCODE_U32(pPayload, MarkerId); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_EX); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_NameMarker() +* +* Function description +* Send the name of a Performance Marker to be displayed in SystemView. +* +* Marker names are usually set in the system description +* callback, to ensure it is only sent when the SystemView Application +* is connected. +* +* Parameters +* MarkerId - User defined ID for the marker. +* sName - Pointer to the marker name. (Max. SEGGER_SYSVIEW_MAX_STRING_LEN Bytes) +*/ +void SEGGER_SYSVIEW_NameMarker(unsigned int MarkerId, const char* sName) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2 * SEGGER_SYSVIEW_QUANTA_U32 + 1 + SEGGER_SYSVIEW_MAX_STRING_LEN); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, SYSVIEW_EVTID_EX_NAME_MARKER); + ENCODE_U32(pPayload, MarkerId); + pPayload = _EncodeStr(pPayload, sName, SEGGER_SYSVIEW_MAX_STRING_LEN); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_EX); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_NameResource() +* +* Function description +* Send the name of a resource to be displayed in SystemView. +* +* Marker names are usually set in the system description +* callback, to ensure it is only sent when the SystemView Application +* is connected. +* +* Parameters +* ResourceId - Id of the resource to be named. i.e. its address. +* sName - Pointer to the resource name. (Max. SEGGER_SYSVIEW_MAX_STRING_LEN Bytes) +*/ +void SEGGER_SYSVIEW_NameResource(U32 ResourceId, const char* sName) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_QUANTA_U32 + 1 + SEGGER_SYSVIEW_MAX_STRING_LEN); + // + pPayload = pPayloadStart; + ENCODE_U32(pPayload, SHRINK_ID(ResourceId)); + pPayload = _EncodeStr(pPayload, sName, SEGGER_SYSVIEW_MAX_STRING_LEN); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_NAME_RESOURCE); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_SendPacket() +* +* Function description +* Send an event packet. +* +* Parameters +* pPacket - Pointer to the start of the packet. +* pPayloadEnd - Pointer to the end of the payload. +* Make sure there are at least 5 bytes free after the payload. +* EventId - Id of the event packet. +* +* Return value +* !=0: Success, Message sent. +* ==0: Buffer full, Message *NOT* sent. +*/ +int SEGGER_SYSVIEW_SendPacket(U8* pPacket, U8* pPayloadEnd, unsigned int EventId) { +#if (SEGGER_SYSVIEW_USE_STATIC_BUFFER == 1) + SEGGER_SYSVIEW_LOCK(); +#endif + _SendPacket(pPacket + 4, pPayloadEnd, EventId); +#if (SEGGER_SYSVIEW_USE_STATIC_BUFFER == 1) + SEGGER_SYSVIEW_UNLOCK(); +#endif + return 0; +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_EncodeU32() +* +* Function description +* Encode a U32 in variable-length format. +* +* Parameters +* pPayload - Pointer to where U32 will be encoded. +* Value - The 32-bit value to be encoded. +* +* Return value +* Pointer to the byte following the value, i.e. the first free +* byte in the payload and the next position to store payload +* content. +*/ +U8* SEGGER_SYSVIEW_EncodeU32(U8* pPayload, U32 Value) { + ENCODE_U32(pPayload, Value); + return pPayload; +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_EncodeString() +* +* Function description +* Encode a string in variable-length format. +* +* Parameters +* pPayload - Pointer to where string will be encoded. +* s - String to encode. +* MaxLen - Maximum number of characters to encode from string. +* +* Return value +* Pointer to the byte following the value, i.e. the first free +* byte in the payload and the next position to store payload +* content. +* +* Additional information +* The string is encoded as a count byte followed by the contents +* of the string. +* No more than 1 + MaxLen bytes will be encoded to the payload. +*/ +U8* SEGGER_SYSVIEW_EncodeString(U8* pPayload, const char* s, unsigned int MaxLen) { + return _EncodeStr(pPayload, s, MaxLen); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_EncodeData() +* +* Function description +* Encode a byte buffer in variable-length format. +* +* Parameters +* pPayload - Pointer to where string will be encoded. +* pSrc - Pointer to data buffer to be encoded. +* NumBytes - Number of bytes in the buffer to be encoded. +* +* Return value +* Pointer to the byte following the value, i.e. the first free +* byte in the payload and the next position to store payload +* content. +* +* Additional information +* The data is encoded as a count byte followed by the contents +* of the data buffer. +* Make sure NumBytes + 1 bytes are free for the payload. +*/ +U8* SEGGER_SYSVIEW_EncodeData(U8 *pPayload, const char* pSrc, unsigned int NumBytes) { + return _EncodeData(pPayload, pSrc, NumBytes); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_EncodeId() +* +* Function description +* Encode a 32-bit Id in shrunken variable-length format. +* +* Parameters +* pPayload - Pointer to where the Id will be encoded. +* Id - The 32-bit value to be encoded. +* +* Return value +* Pointer to the byte following the value, i.e. the first free +* byte in the payload and the next position to store payload +* content. +* +* Additional information +* The parameters to shrink an Id can be configured in +* SEGGER_SYSVIEW_Conf.h and via SEGGER_SYSVIEW_SetRAMBase(). +* SEGGER_SYSVIEW_ID_BASE: Lowest Id reported by the application. +* (i.e. 0x20000000 when all Ids are an address in this RAM) +* SEGGER_SYSVIEW_ID_SHIFT: Number of bits to shift the Id to +* save bandwidth. (i.e. 2 when Ids are 4 byte aligned) +*/ +U8* SEGGER_SYSVIEW_EncodeId(U8* pPayload, U32 Id) { + Id = SHRINK_ID(Id); + ENCODE_U32(pPayload, Id); + return pPayload; +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_ShrinkId() +* +* Function description +* Get the shrunken value of an Id for further processing like in +* SEGGER_SYSVIEW_NameResource(). +* +* Parameters +* Id - The 32-bit value to be shrunken. +* +* Return value +* Shrunken Id. +* +* Additional information +* The parameters to shrink an Id can be configured in +* SEGGER_SYSVIEW_Conf.h and via SEGGER_SYSVIEW_SetRAMBase(). +* SEGGER_SYSVIEW_ID_BASE: Lowest Id reported by the application. +* (i.e. 0x20000000 when all Ids are an address in this RAM) +* SEGGER_SYSVIEW_ID_SHIFT: Number of bits to shift the Id to +* save bandwidth. (i.e. 2 when Ids are 4 byte aligned) +*/ +U32 SEGGER_SYSVIEW_ShrinkId(U32 Id) { + return SHRINK_ID(Id); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RegisterModule() +* +* Function description +* Register a middleware module for recording its events. +* +* Parameters +* pModule - The middleware module information. +* +* Additional information +* SEGGER_SYSVIEW_MODULE elements: +* sDescription - Pointer to a string containing the module name and optionally the module event description. +* NumEvents - Number of events the module wants to register. +* EventOffset - Offset to be added to the event Ids. Out parameter, set by this function. Do not modify after calling this function. +* pfSendModuleDesc - Callback function pointer to send more detailed module description to SystemView Application. +* pNext - Pointer to next registered module. Out parameter, set by this function. Do not modify after calling this function. +*/ +void SEGGER_SYSVIEW_RegisterModule(SEGGER_SYSVIEW_MODULE* pModule) { + SEGGER_SYSVIEW_LOCK(); + if (_pFirstModule == 0) { + // + // No module registered, yet. + // Start list with new module. + // EventOffset is the base offset for modules + // + pModule->EventOffset = MODULE_EVENT_OFFSET; + pModule->pNext = 0; + _pFirstModule = pModule; + _NumModules = 1; + } else { + // + // Registreded module(s) present. + // Prepend new module in list. + // EventOffset set from number of events and offset of previous module. + // + pModule->EventOffset = _pFirstModule->EventOffset + _pFirstModule->NumEvents; + pModule->pNext = _pFirstModule; + _pFirstModule = pModule; + _NumModules++; + } + SEGGER_SYSVIEW_SendModule(0); + if (pModule->pfSendModuleDesc) { + pModule->pfSendModuleDesc(); + } + SEGGER_SYSVIEW_UNLOCK(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_RecordModuleDescription() +* +* Function description +* Sends detailed information of a registered module to the host. +* +* Parameters +* pModule - Pointer to the described module. +* sDescription - Pointer to a description string. +*/ +void SEGGER_SYSVIEW_RecordModuleDescription(const SEGGER_SYSVIEW_MODULE* pModule, const char* sDescription) { + U8 ModuleId; + SEGGER_SYSVIEW_MODULE* p; + + p = _pFirstModule; + ModuleId = 0; + do { + if (p == pModule) { + break; + } + ModuleId++; + p = p->pNext; + } while (p); + { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2 * SEGGER_SYSVIEW_QUANTA_U32 + 1 + SEGGER_SYSVIEW_MAX_STRING_LEN); + // + pPayload = pPayloadStart; + // + // Send module description + // Send event offset and number of events + // + ENCODE_U32(pPayload, ModuleId); + ENCODE_U32(pPayload, (pModule->EventOffset)); + pPayload = _EncodeStr(pPayload, sDescription, SEGGER_SYSVIEW_MAX_STRING_LEN); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_MODULEDESC); + RECORD_END(); + } +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_SendModule() +* +* Function description +* Sends the information of a registered module to the host. +* +* Parameters +* ModuleId - Id of the requested module. +*/ +void SEGGER_SYSVIEW_SendModule(U8 ModuleId) { + SEGGER_SYSVIEW_MODULE* pModule; + U32 n; + + if (_pFirstModule != 0) { + pModule = _pFirstModule; + for (n = 0; n < ModuleId; n++) { + pModule = pModule->pNext; + if (pModule == 0) { + break; + } + } + if (pModule != 0) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2 * SEGGER_SYSVIEW_QUANTA_U32 + 1 + SEGGER_SYSVIEW_MAX_STRING_LEN); + // + pPayload = pPayloadStart; + // + // Send module description + // Send event offset and number of events + // + ENCODE_U32(pPayload, ModuleId); + ENCODE_U32(pPayload, (pModule->EventOffset)); + pPayload = _EncodeStr(pPayload, pModule->sModule, SEGGER_SYSVIEW_MAX_STRING_LEN); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_MODULEDESC); + RECORD_END(); + } + } +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_SendModuleDescription() +* +* Function description +* Triggers a send of the registered module descriptions. +* +*/ +void SEGGER_SYSVIEW_SendModuleDescription(void) { + SEGGER_SYSVIEW_MODULE* pModule; + + if (_pFirstModule != 0) { + pModule = _pFirstModule; + do { + if (pModule->pfSendModuleDesc) { + pModule->pfSendModuleDesc(); + } + pModule = pModule->pNext; + } while (pModule); + } +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_SendNumModules() +* +* Function description +* Send the number of registered modules to the host. +*/ +void SEGGER_SYSVIEW_SendNumModules(void) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2*SEGGER_SYSVIEW_QUANTA_U32); + pPayload = pPayloadStart; + ENCODE_U32(pPayload, _NumModules); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_NUMMODULES); + RECORD_END(); +} + +#ifndef SEGGER_SYSVIEW_EXCLUDE_PRINTF // Define in project to avoid warnings about variable parameter list + +/********************************************************************* +* +* SEGGER_SYSVIEW_PrintfHostEx() +* +* Function description +* Print a string which is formatted on the host by the SystemView Application +* with Additional information. +* +* Parameters +* s - String to be formatted. +* Options - Options for the string. i.e. Log level. +* +* Additional information +* All format arguments are treated as 32-bit scalar values. +*/ +void SEGGER_SYSVIEW_PrintfHostEx(const char* s, U32 Options, ...) { + va_list ParamList; +#if SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT + int r; + + va_start(ParamList, Options); + r = _VPrintHost(s, Options, &ParamList); + va_end(ParamList); + + if (r == -1) { + va_start(ParamList, Options); + _VPrintTarget(s, Options, &ParamList); + va_end(ParamList); + } +#else + va_start(ParamList, Options); + _VPrintHost(s, Options, &ParamList); + va_end(ParamList); +#endif +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_PrintfHost() +* +* Function description +* Print a string which is formatted on the host by the SystemView Application. +* +* Parameters +* s - String to be formatted. +* +* Additional information +* All format arguments are treated as 32-bit scalar values. +*/ +void SEGGER_SYSVIEW_PrintfHost(const char* s, ...) { + va_list ParamList; +#if SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT + int r; + + va_start(ParamList, s); + r = _VPrintHost(s, SEGGER_SYSVIEW_LOG, &ParamList); + va_end(ParamList); + + if (r == -1) { + va_start(ParamList, s); + _VPrintTarget(s, SEGGER_SYSVIEW_LOG, &ParamList); + va_end(ParamList); + } +#else + va_start(ParamList, s); + _VPrintHost(s, SEGGER_SYSVIEW_LOG, &ParamList); + va_end(ParamList); +#endif +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_WarnfHost() +* +* Function description +* Print a warnin string which is formatted on the host by +* the SystemView Application. +* +* Parameters +* s - String to be formatted. +* +* Additional information +* All format arguments are treated as 32-bit scalar values. +*/ +void SEGGER_SYSVIEW_WarnfHost(const char* s, ...) { + va_list ParamList; +#if SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT + int r; + + va_start(ParamList, s); + r = _VPrintHost(s, SEGGER_SYSVIEW_WARNING, &ParamList); + va_end(ParamList); + + if (r == -1) { + va_start(ParamList, s); + _VPrintTarget(s, SEGGER_SYSVIEW_WARNING, &ParamList); + va_end(ParamList); + } +#else + va_start(ParamList, s); + _VPrintHost(s, SEGGER_SYSVIEW_WARNING, &ParamList); + va_end(ParamList); +#endif +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_ErrorfHost() +* +* Function description +* Print an error string which is formatted on the host by +* the SystemView Application. +* +* Parameters +* s - String to be formatted. +* +* Additional information +* All format arguments are treated as 32-bit scalar values. +*/ +void SEGGER_SYSVIEW_ErrorfHost(const char* s, ...) { + va_list ParamList; +#if SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT + int r; + + va_start(ParamList, s); + r = _VPrintHost(s, SEGGER_SYSVIEW_ERROR, &ParamList); + va_end(ParamList); + + if (r == -1) { + va_start(ParamList, s); + _VPrintTarget(s, SEGGER_SYSVIEW_ERROR, &ParamList); + va_end(ParamList); + } +#else + va_start(ParamList, s); + _VPrintHost(s, SEGGER_SYSVIEW_ERROR, &ParamList); + va_end(ParamList); +#endif +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_PrintfTargetEx() +* +* Function description +* Print a string which is formatted on the target before sent to +* the host with Additional information. +* +* Parameters +* s - String to be formatted. +* Options - Options for the string. i.e. Log level. +*/ +void SEGGER_SYSVIEW_PrintfTargetEx(const char* s, U32 Options, ...) { + va_list ParamList; + + va_start(ParamList, Options); + _VPrintTarget(s, Options, &ParamList); + va_end(ParamList); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_PrintfTarget() +* +* Function description +* Print a string which is formatted on the target before sent to +* the host. +* +* Parameters +* s - String to be formatted. +*/ +void SEGGER_SYSVIEW_PrintfTarget(const char* s, ...) { + va_list ParamList; + + va_start(ParamList, s); + _VPrintTarget(s, SEGGER_SYSVIEW_LOG, &ParamList); + va_end(ParamList); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_WarnfTarget() +* +* Function description +* Print a warning string which is formatted on the target before +* sent to the host. +* +* Parameters +* s - String to be formatted. +*/ +void SEGGER_SYSVIEW_WarnfTarget(const char* s, ...) { + va_list ParamList; + + va_start(ParamList, s); + _VPrintTarget(s, SEGGER_SYSVIEW_WARNING, &ParamList); + va_end(ParamList); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_ErrorfTarget() +* +* Function description +* Print an error string which is formatted on the target before +* sent to the host. +* +* Parameters +* s - String to be formatted. +*/ +void SEGGER_SYSVIEW_ErrorfTarget(const char* s, ...) { + va_list ParamList; + + va_start(ParamList, s); + _VPrintTarget(s, SEGGER_SYSVIEW_ERROR, &ParamList); + va_end(ParamList); +} +#endif // SEGGER_SYSVIEW_EXCLUDE_PRINTF + +/********************************************************************* +* +* SEGGER_SYSVIEW_Print() +* +* Function description +* Print a string to the host. +* +* Parameters +* s - String to sent. +*/ +void SEGGER_SYSVIEW_Print(const char* s) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2 * SEGGER_SYSVIEW_QUANTA_U32 + SEGGER_SYSVIEW_MAX_STRING_LEN); + // + pPayload = _EncodeStr(pPayloadStart, s, SEGGER_SYSVIEW_MAX_STRING_LEN); + ENCODE_U32(pPayload, SEGGER_SYSVIEW_LOG); + ENCODE_U32(pPayload, 0); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_PRINT_FORMATTED); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_Warn() +* +* Function description +* Print a warning string to the host. +* +* Parameters +* s - String to sent. +*/ +void SEGGER_SYSVIEW_Warn(const char* s) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2 * SEGGER_SYSVIEW_QUANTA_U32 + SEGGER_SYSVIEW_MAX_STRING_LEN); + // + pPayload = _EncodeStr(pPayloadStart, s, SEGGER_SYSVIEW_MAX_STRING_LEN); + ENCODE_U32(pPayload, SEGGER_SYSVIEW_WARNING); + ENCODE_U32(pPayload, 0); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_PRINT_FORMATTED); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_Error() +* +* Function description +* Print an error string to the host. +* +* Parameters +* s - String to sent. +*/ +void SEGGER_SYSVIEW_Error(const char* s) { + U8* pPayload; + U8* pPayloadStart; + RECORD_START(SEGGER_SYSVIEW_INFO_SIZE + 2 * SEGGER_SYSVIEW_QUANTA_U32 + SEGGER_SYSVIEW_MAX_STRING_LEN); + // + pPayload = _EncodeStr(pPayloadStart, s, SEGGER_SYSVIEW_MAX_STRING_LEN); + ENCODE_U32(pPayload, SEGGER_SYSVIEW_ERROR); + ENCODE_U32(pPayload, 0); + _SendPacket(pPayloadStart, pPayload, SYSVIEW_EVTID_PRINT_FORMATTED); + RECORD_END(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_EnableEvents() +* +* Function description +* Enable standard SystemView events to be generated. +* +* Parameters +* EnableMask - Events to be enabled. +*/ +void SEGGER_SYSVIEW_EnableEvents(U32 EnableMask) { + _SYSVIEW_Globals.DisabledEvents &= ~EnableMask; +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_DisableEvents() +* +* Function description +* Disable standard SystemView events to not be generated. +* +* Parameters +* DisableMask - Events to be disabled. +*/ +void SEGGER_SYSVIEW_DisableEvents(U32 DisableMask) { + _SYSVIEW_Globals.DisabledEvents |= DisableMask; +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_IsStarted() +* +* Function description +* Handle incoming packets if any and check if recording is started. +* +* Return value +* 0: Recording not started. +* > 0: Recording started. +*/ +int SEGGER_SYSVIEW_IsStarted(void) { +#if (SEGGER_SYSVIEW_POST_MORTEM_MODE != 1) + // + // Check if host is sending data which needs to be processed. + // + if (SEGGER_RTT_HASDATA(CHANNEL_ID_DOWN)) { + if (_SYSVIEW_Globals.RecursionCnt == 0) { // Avoid uncontrolled nesting. This way, this routine can call itself once, but no more often than that. + _SYSVIEW_Globals.RecursionCnt = 1; + _HandleIncomingPacket(); + _SYSVIEW_Globals.RecursionCnt = 0; + } + } +#endif + return _SYSVIEW_Globals.EnableState; +} + + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/SEGGER/SEGGER_SYSVIEW.h b/resources_extra/SystemView_Src_V320/SEGGER/SEGGER_SYSVIEW.h new file mode 100644 index 0000000..cf61805 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/SEGGER/SEGGER_SYSVIEW.h @@ -0,0 +1,370 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- +File : SEGGER_SYSVIEW.h +Purpose : System visualization API. +Revision: $Rev: 21292 $ +*/ + +#ifndef SEGGER_SYSVIEW_H +#define SEGGER_SYSVIEW_H + +/********************************************************************* +* +* #include Section +* +********************************************************************** +*/ + +#include "SEGGER.h" +#include "SEGGER_SYSVIEW_ConfDefaults.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ + +#define SEGGER_SYSVIEW_MAJOR 3 +#define SEGGER_SYSVIEW_MINOR 10 +#define SEGGER_SYSVIEW_REV 0 +#define SEGGER_SYSVIEW_VERSION ((SEGGER_SYSVIEW_MAJOR * 10000) + (SEGGER_SYSVIEW_MINOR * 100) + SEGGER_SYSVIEW_REV) + +#define SEGGER_SYSVIEW_INFO_SIZE 9 // Minimum size, which has to be reserved for a packet. 1-2 byte of message type, 0-2 byte of payload length, 1-5 bytes of timestamp. +#define SEGGER_SYSVIEW_QUANTA_U32 5 // Maximum number of bytes to encode a U32, should be reserved for each 32-bit value in a packet. + +#define SEGGER_SYSVIEW_LOG (0u) +#define SEGGER_SYSVIEW_WARNING (1u) +#define SEGGER_SYSVIEW_ERROR (2u) +#define SEGGER_SYSVIEW_FLAG_APPEND (1u << 6) + +#define SEGGER_SYSVIEW_PREPARE_PACKET(p) (p) + 4 +// +// SystemView events. First 32 IDs from 0 .. 31 are reserved for these +// +#define SYSVIEW_EVTID_NOP 0 // Dummy packet. +#define SYSVIEW_EVTID_OVERFLOW 1 +#define SYSVIEW_EVTID_ISR_ENTER 2 +#define SYSVIEW_EVTID_ISR_EXIT 3 +#define SYSVIEW_EVTID_TASK_START_EXEC 4 +#define SYSVIEW_EVTID_TASK_STOP_EXEC 5 +#define SYSVIEW_EVTID_TASK_START_READY 6 +#define SYSVIEW_EVTID_TASK_STOP_READY 7 +#define SYSVIEW_EVTID_TASK_CREATE 8 +#define SYSVIEW_EVTID_TASK_INFO 9 +#define SYSVIEW_EVTID_TRACE_START 10 +#define SYSVIEW_EVTID_TRACE_STOP 11 +#define SYSVIEW_EVTID_SYSTIME_CYCLES 12 +#define SYSVIEW_EVTID_SYSTIME_US 13 +#define SYSVIEW_EVTID_SYSDESC 14 +#define SYSVIEW_EVTID_MARK_START 15 +#define SYSVIEW_EVTID_MARK_STOP 16 +#define SYSVIEW_EVTID_IDLE 17 +#define SYSVIEW_EVTID_ISR_TO_SCHEDULER 18 +#define SYSVIEW_EVTID_TIMER_ENTER 19 +#define SYSVIEW_EVTID_TIMER_EXIT 20 +#define SYSVIEW_EVTID_STACK_INFO 21 +#define SYSVIEW_EVTID_MODULEDESC 22 + +#define SYSVIEW_EVTID_INIT 24 +#define SYSVIEW_EVTID_NAME_RESOURCE 25 +#define SYSVIEW_EVTID_PRINT_FORMATTED 26 +#define SYSVIEW_EVTID_NUMMODULES 27 +#define SYSVIEW_EVTID_END_CALL 28 +#define SYSVIEW_EVTID_TASK_TERMINATE 29 + +#define SYSVIEW_EVTID_EX 31 +// +// SystemView extended events. Sent with ID 31. +// +#define SYSVIEW_EVTID_EX_MARK 0 +#define SYSVIEW_EVTID_EX_NAME_MARKER 1 +// +// Event masks to disable/enable events +// +#define SYSVIEW_EVTMASK_NOP (1 << SYSVIEW_EVTID_NOP) +#define SYSVIEW_EVTMASK_OVERFLOW (1 << SYSVIEW_EVTID_OVERFLOW) +#define SYSVIEW_EVTMASK_ISR_ENTER (1 << SYSVIEW_EVTID_ISR_ENTER) +#define SYSVIEW_EVTMASK_ISR_EXIT (1 << SYSVIEW_EVTID_ISR_EXIT) +#define SYSVIEW_EVTMASK_TASK_START_EXEC (1 << SYSVIEW_EVTID_TASK_START_EXEC) +#define SYSVIEW_EVTMASK_TASK_STOP_EXEC (1 << SYSVIEW_EVTID_TASK_STOP_EXEC) +#define SYSVIEW_EVTMASK_TASK_START_READY (1 << SYSVIEW_EVTID_TASK_START_READY) +#define SYSVIEW_EVTMASK_TASK_STOP_READY (1 << SYSVIEW_EVTID_TASK_STOP_READY) +#define SYSVIEW_EVTMASK_TASK_CREATE (1 << SYSVIEW_EVTID_TASK_CREATE) +#define SYSVIEW_EVTMASK_TASK_INFO (1 << SYSVIEW_EVTID_TASK_INFO) +#define SYSVIEW_EVTMASK_TRACE_START (1 << SYSVIEW_EVTID_TRACE_START) +#define SYSVIEW_EVTMASK_TRACE_STOP (1 << SYSVIEW_EVTID_TRACE_STOP) +#define SYSVIEW_EVTMASK_SYSTIME_CYCLES (1 << SYSVIEW_EVTID_SYSTIME_CYCLES) +#define SYSVIEW_EVTMASK_SYSTIME_US (1 << SYSVIEW_EVTID_SYSTIME_US) +#define SYSVIEW_EVTMASK_SYSDESC (1 << SYSVIEW_EVTID_SYSDESC) +#define SYSVIEW_EVTMASK_USER_START (1 << SYSVIEW_EVTID_USER_START) +#define SYSVIEW_EVTMASK_USER_STOP (1 << SYSVIEW_EVTID_USER_STOP) +#define SYSVIEW_EVTMASK_IDLE (1 << SYSVIEW_EVTID_IDLE) +#define SYSVIEW_EVTMASK_ISR_TO_SCHEDULER (1 << SYSVIEW_EVTID_ISR_TO_SCHEDULER) +#define SYSVIEW_EVTMASK_TIMER_ENTER (1 << SYSVIEW_EVTID_TIMER_ENTER) +#define SYSVIEW_EVTMASK_TIMER_EXIT (1 << SYSVIEW_EVTID_TIMER_EXIT) +#define SYSVIEW_EVTMASK_STACK_INFO (1 << SYSVIEW_EVTID_STACK_INFO) +#define SYSVIEW_EVTMASK_MODULEDESC (1 << SYSVIEW_EVTID_MODULEDESC) + +#define SYSVIEW_EVTMASK_INIT (1 << SYSVIEW_EVTID_INIT) +#define SYSVIEW_EVTMASK_NAME_RESOURCE (1 << SYSVIEW_EVTID_NAME_RESOURCE) +#define SYSVIEW_EVTMASK_PRINT_FORMATTED (1 << SYSVIEW_EVTID_PRINT_FORMATTED) +#define SYSVIEW_EVTMASK_NUMMODULES (1 << SYSVIEW_EVTID_NUMMODULES) +#define SYSVIEW_EVTMASK_END_CALL (1 << SYSVIEW_EVTID_END_CALL) +#define SYSVIEW_EVTMASK_TASK_TERMINATE (1 << SYSVIEW_EVTID_TASK_TERMINATE) + +#define SYSVIEW_EVTMASK_EX (1 << SYSVIEW_EVTID_EX) + +#define SYSVIEW_EVTMASK_ALL_INTERRUPTS ( SYSVIEW_EVTMASK_ISR_ENTER \ + | SYSVIEW_EVTMASK_ISR_EXIT \ + | SYSVIEW_EVTMASK_ISR_TO_SCHEDULER) +#define SYSVIEW_EVTMASK_ALL_TASKS ( SYSVIEW_EVTMASK_TASK_START_EXEC \ + | SYSVIEW_EVTMASK_TASK_STOP_EXEC \ + | SYSVIEW_EVTMASK_TASK_START_READY \ + | SYSVIEW_EVTMASK_TASK_STOP_READY \ + | SYSVIEW_EVTMASK_TASK_CREATE \ + | SYSVIEW_EVTMASK_TASK_INFO \ + | SYSVIEW_EVTMASK_STACK_INFO \ + | SYSVIEW_EVTMASK_TASK_TERMINATE) + +/********************************************************************* +* +* Structures +* +********************************************************************** +*/ + +typedef struct { + U32 TaskID; + const char* sName; + U32 Prio; + U32 StackBase; + U32 StackSize; +} SEGGER_SYSVIEW_TASKINFO; + +typedef struct SEGGER_SYSVIEW_MODULE_STRUCT SEGGER_SYSVIEW_MODULE; + +struct SEGGER_SYSVIEW_MODULE_STRUCT { + const char* sModule; + U32 NumEvents; + U32 EventOffset; + void (*pfSendModuleDesc)(void); + SEGGER_SYSVIEW_MODULE* pNext; +}; + +typedef void (SEGGER_SYSVIEW_SEND_SYS_DESC_FUNC)(void); + + +/********************************************************************* +* +* Global data +* +********************************************************************** +*/ + +#ifdef EXTERN + #undef EXTERN +#endif + +#ifndef SEGGER_SYSVIEW_C // Defined in SEGGER_SYSVIEW.c which includes this header beside other C-files + #define EXTERN extern +#else + #define EXTERN +#endif + +EXTERN unsigned int SEGGER_SYSVIEW_TickCnt; +EXTERN unsigned int SEGGER_SYSVIEW_InterruptId; + +#undef EXTERN + +/********************************************************************* +* +* API functions +* +********************************************************************** +*/ + +typedef struct { + U64 (*pfGetTime) (void); + void (*pfSendTaskList) (void); +} SEGGER_SYSVIEW_OS_API; + +/********************************************************************* +* +* Control and initialization functions +*/ +void SEGGER_SYSVIEW_Init (U32 SysFreq, U32 CPUFreq, const SEGGER_SYSVIEW_OS_API *pOSAPI, SEGGER_SYSVIEW_SEND_SYS_DESC_FUNC pfSendSysDesc); +void SEGGER_SYSVIEW_SetRAMBase (U32 RAMBaseAddress); +void SEGGER_SYSVIEW_Start (void); +void SEGGER_SYSVIEW_Stop (void); +void SEGGER_SYSVIEW_GetSysDesc (void); +void SEGGER_SYSVIEW_SendTaskList (void); +void SEGGER_SYSVIEW_SendTaskInfo (const SEGGER_SYSVIEW_TASKINFO* pInfo); +void SEGGER_SYSVIEW_SendSysDesc (const char* sSysDesc); +int SEGGER_SYSVIEW_IsStarted (void); +int SEGGER_SYSVIEW_GetChannelID (void); + +/********************************************************************* +* +* Event recording functions +*/ +void SEGGER_SYSVIEW_RecordVoid (unsigned int EventId); +void SEGGER_SYSVIEW_RecordU32 (unsigned int EventId, U32 Para0); +void SEGGER_SYSVIEW_RecordU32x2 (unsigned int EventId, U32 Para0, U32 Para1); +void SEGGER_SYSVIEW_RecordU32x3 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2); +void SEGGER_SYSVIEW_RecordU32x4 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3); +void SEGGER_SYSVIEW_RecordU32x5 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4); +void SEGGER_SYSVIEW_RecordU32x6 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5); +void SEGGER_SYSVIEW_RecordU32x7 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6); +void SEGGER_SYSVIEW_RecordU32x8 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6, U32 Para7); +void SEGGER_SYSVIEW_RecordU32x9 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6, U32 Para7, U32 Para8); +void SEGGER_SYSVIEW_RecordU32x10 (unsigned int EventId, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4, U32 Para5, U32 Para6, U32 Para7, U32 Para8, U32 Para9); +void SEGGER_SYSVIEW_RecordString (unsigned int EventId, const char* pString); +void SEGGER_SYSVIEW_RecordSystime (void); +void SEGGER_SYSVIEW_RecordEnterISR (void); +void SEGGER_SYSVIEW_RecordExitISR (void); +void SEGGER_SYSVIEW_RecordExitISRToScheduler (void); +void SEGGER_SYSVIEW_RecordEnterTimer (U32 TimerId); +void SEGGER_SYSVIEW_RecordExitTimer (void); +void SEGGER_SYSVIEW_RecordEndCall (unsigned int EventID); +void SEGGER_SYSVIEW_RecordEndCallU32 (unsigned int EventID, U32 Para0); + +void SEGGER_SYSVIEW_OnIdle (void); +void SEGGER_SYSVIEW_OnTaskCreate (U32 TaskId); +void SEGGER_SYSVIEW_OnTaskTerminate (U32 TaskId); +void SEGGER_SYSVIEW_OnTaskStartExec (U32 TaskId); +void SEGGER_SYSVIEW_OnTaskStopExec (void); +void SEGGER_SYSVIEW_OnTaskStartReady (U32 TaskId); +void SEGGER_SYSVIEW_OnTaskStopReady (U32 TaskId, unsigned int Cause); +void SEGGER_SYSVIEW_MarkStart (unsigned int MarkerId); +void SEGGER_SYSVIEW_MarkStop (unsigned int MarkerId); +void SEGGER_SYSVIEW_Mark (unsigned int MarkerId); +void SEGGER_SYSVIEW_NameMarker (unsigned int MarkerId, const char* sName); + +void SEGGER_SYSVIEW_NameResource (U32 ResourceId, const char* sName); + +int SEGGER_SYSVIEW_SendPacket (U8* pPacket, U8* pPayloadEnd, unsigned int EventId); + +/********************************************************************* +* +* Event parameter encoding functions +*/ +U8* SEGGER_SYSVIEW_EncodeU32 (U8* pPayload, U32 Value); +U8* SEGGER_SYSVIEW_EncodeData (U8* pPayload, const char* pSrc, unsigned int Len); +U8* SEGGER_SYSVIEW_EncodeString (U8* pPayload, const char* s, unsigned int MaxLen); +U8* SEGGER_SYSVIEW_EncodeId (U8* pPayload, U32 Id); +U32 SEGGER_SYSVIEW_ShrinkId (U32 Id); + + +/********************************************************************* +* +* Middleware module registration +*/ +void SEGGER_SYSVIEW_RegisterModule (SEGGER_SYSVIEW_MODULE* pModule); +void SEGGER_SYSVIEW_RecordModuleDescription (const SEGGER_SYSVIEW_MODULE* pModule, const char* sDescription); +void SEGGER_SYSVIEW_SendModule (U8 ModuleId); +void SEGGER_SYSVIEW_SendModuleDescription (void); +void SEGGER_SYSVIEW_SendNumModules (void); + +/********************************************************************* +* +* printf-Style functions +*/ +#ifndef SEGGER_SYSVIEW_EXCLUDE_PRINTF // Define in project to avoid warnings about variable parameter list +void SEGGER_SYSVIEW_PrintfHostEx (const char* s, U32 Options, ...); +void SEGGER_SYSVIEW_PrintfTargetEx (const char* s, U32 Options, ...); +void SEGGER_SYSVIEW_PrintfHost (const char* s, ...); +void SEGGER_SYSVIEW_PrintfTarget (const char* s, ...); +void SEGGER_SYSVIEW_WarnfHost (const char* s, ...); +void SEGGER_SYSVIEW_WarnfTarget (const char* s, ...); +void SEGGER_SYSVIEW_ErrorfHost (const char* s, ...); +void SEGGER_SYSVIEW_ErrorfTarget (const char* s, ...); +#endif + +void SEGGER_SYSVIEW_Print (const char* s); +void SEGGER_SYSVIEW_Warn (const char* s); +void SEGGER_SYSVIEW_Error (const char* s); + +/********************************************************************* +* +* Run-time configuration functions +*/ +void SEGGER_SYSVIEW_EnableEvents (U32 EnableMask); +void SEGGER_SYSVIEW_DisableEvents (U32 DisableMask); + +/********************************************************************* +* +* Application-provided functions +*/ +void SEGGER_SYSVIEW_Conf (void); +U32 SEGGER_SYSVIEW_X_GetTimestamp (void); +U32 SEGGER_SYSVIEW_X_GetInterruptId (void); + +void SEGGER_SYSVIEW_X_StartComm (void); +void SEGGER_SYSVIEW_X_OnEventRecorded (unsigned NumBytes); + +#ifdef __cplusplus +} +#endif + +/********************************************************************* +* +* Compatibility API defines +*/ +#define SEGGER_SYSVIEW_OnUserStart SEGGER_SYSVIEW_MarkStart +#define SEGGER_SYSVIEW_OnUserStop SEGGER_SYSVIEW_MarkStop + +#endif + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h b/resources_extra/SystemView_Src_V320/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h new file mode 100644 index 0000000..19fd87e --- /dev/null +++ b/resources_extra/SystemView_Src_V320/SEGGER/SEGGER_SYSVIEW_ConfDefaults.h @@ -0,0 +1,553 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- +File : SEGGER_SYSVIEW_ConfDefaults.h +Purpose : Defines defaults for configurable defines used in + SEGGER SystemView. +Revision: $Rev: 21319 $ +*/ + +#ifndef SEGGER_SYSVIEW_CONFDEFAULTS_H +#define SEGGER_SYSVIEW_CONFDEFAULTS_H + +/********************************************************************* +* +* #include Section +* +********************************************************************** +*/ + +#include "SEGGER_SYSVIEW_Conf.h" +#include "SEGGER_RTT_Conf.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ +// +// Use auto-detection for SEGGER_SYSVIEW_CORE define +// based on compiler-/toolchain-specific defines +// to define SEGGER_SYSVIEW_GET_INTERRUPT_ID and SEGGER_SYSVIEW_GET_TIMESTAMP +// +#define SEGGER_SYSVIEW_CORE_OTHER 0 +#define SEGGER_SYSVIEW_CORE_CM0 1 // Cortex-M0/M0+/M1 +#define SEGGER_SYSVIEW_CORE_CM3 2 // Cortex-M3/M4/M7 +#define SEGGER_SYSVIEW_CORE_RX 3 // Renesas RX +#ifndef SEGGER_SYSVIEW_CORE + #if (defined __SES_ARM) || (defined __CROSSWORKS_ARM) || (defined __SEGGER_CC__) || (defined __GNUC__) || (defined __clang__) + #if (defined __ARM_ARCH_6M__) || (defined __ARM_ARCH_8M_BASE__) + #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM0 + #elif (defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_8M_MAIN__)) + #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM3 + #endif + #elif defined(__ICCARM__) + #if (defined (__ARM6M__) && (__CORE__ == __ARM6M__)) \ + || (defined (__ARM8M_BASELINE__) && (__CORE__ == __ARM8M_BASELINE__)) + #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM0 + #elif (defined (__ARM7EM__) && (__CORE__ == __ARM7EM__)) \ + || (defined (__ARM7M__) && (__CORE__ == __ARM7M__)) \ + || (defined (__ARM8M_MAINLINE__) && (__CORE__ == __ARM8M_MAINLINE__)) \ + || (defined (__ARM8M_MAINLINE__) && (__CORE__ == __ARM8M_MAINLINE__)) + #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM3 + #endif + #elif defined(__CC_ARM) + #if (defined(__TARGET_ARCH_6S_M)) + #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM0 + #elif (defined(__TARGET_ARCH_7_M) || defined(__TARGET_ARCH_7E_M)) + #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM3 + #endif + #elif defined(__TI_ARM__) + #ifdef __TI_ARM_V6M0__ + #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM0 + #elif (defined(__TI_ARM_V7M3__) || defined(__TI_ARM_V7M4__)) + #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_CM3 + #endif + #elif defined(__ICCRX__) + #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_RX + #elif defined(__RX) + #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_RX + #endif + + #ifndef SEGGER_SYSVIEW_CORE + #define SEGGER_SYSVIEW_CORE SEGGER_SYSVIEW_CORE_OTHER + #endif +#endif + + +/********************************************************************* +* +* Defines, defaults +* +********************************************************************** +*/ +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_APP_NAME +* +* Description +* The application name to be displayed in SystemView. +* Default +* "SystemView-enabled Application" +* Notes +* Convenience define to be used for SEGGER_SYSVIEW_SendSysDesc(). +*/ +#ifndef SEGGER_SYSVIEW_APP_NAME + #define SEGGER_SYSVIEW_APP_NAME "SystemView-enabled Application" +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_DEVICE_NAME +* +* Description +* The target device name to be displayed in SystemView. +* Default +* "undefined device" +* Notes +* Convenience define to be used for SEGGER_SYSVIEW_SendSysDesc(). +*/ +#ifndef SEGGER_SYSVIEW_DEVICE_NAME + #define SEGGER_SYSVIEW_DEVICE_NAME "undefined device" +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_GET_INTERRUPT_ID() +* +* Description +* Function macro to retrieve the Id of the currently active +* interrupt. +* Default +* Call user-supplied function SEGGER_SYSVIEW_X_GetInterruptId(). +* Notes +* For some known compilers and cores, a ready-to-use, core-specific +* default is set. +* ARMv7M: Read ICSR[8:0] (active vector) +* ARMv6M: Read ICSR[5:0] (active vector) +*/ +#ifndef SEGGER_SYSVIEW_GET_INTERRUPT_ID + #if SEGGER_SYSVIEW_CORE == SEGGER_SYSVIEW_CORE_CM3 + #define SEGGER_SYSVIEW_GET_INTERRUPT_ID() ((*(U32*)(0xE000ED04)) & 0x1FF) // Get the currently active interrupt Id. (i.e. read Cortex-M ICSR[8:0] = active vector) + #elif SEGGER_SYSVIEW_CORE == SEGGER_SYSVIEW_CORE_CM0 + #if defined(__ICCARM__) + #if (__VER__ > 6010000) + #define SEGGER_SYSVIEW_GET_INTERRUPT_ID() (__get_IPSR()) // Workaround for IAR, which might do a byte-access to 0xE000ED04. Read IPSR instead. + #else + #define SEGGER_SYSVIEW_GET_INTERRUPT_ID() ((*(U32*)(0xE000ED04)) & 0x3F) // Older versions of IAR do not include __get_IPSR, but might also not optimize to byte-access. + #endif + #else + #define SEGGER_SYSVIEW_GET_INTERRUPT_ID() ((*(U32*)(0xE000ED04)) & 0x3F) // Get the currently active interrupt Id. (i.e. read Cortex-M ICSR[5:0] = active vector) + #endif + #else + #define SEGGER_SYSVIEW_GET_INTERRUPT_ID() SEGGER_SYSVIEW_X_GetInterruptId() // Get the currently active interrupt Id from the user-provided function. + #endif +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_GET_TIMESTAMP() +* +* Description +* Function macro to retrieve a system timestamp for SYSVIEW events. +* Default +* Call user-supplied function SEGGER_SYSVIEW_X_GetTimestamp(). +* Notes +* For some known compilers and cores, a ready-to-use, core-specific +* default is set. +* ARMv7M: Read Cortex-M Cycle Count register. +* +* The system timestamp clock frequency has to be passed in +* SEGGER_SYSVIEW_Init(). +*/ +#ifndef SEGGER_SYSVIEW_GET_TIMESTAMP + #if defined (SEGGER_SYSVIEW_CORE) && (SEGGER_SYSVIEW_CORE == SEGGER_SYSVIEW_CORE_CM3) + #define SEGGER_SYSVIEW_GET_TIMESTAMP() (*(U32 *)(0xE0001004)) // Retrieve a system timestamp. Cortex-M cycle counter. + #else + #define SEGGER_SYSVIEW_GET_TIMESTAMP() SEGGER_SYSVIEW_X_GetTimestamp() // Retrieve a system timestamp via user-defined function + #endif +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_TIMESTAMP_BITS +* +* Description +* Number of valid (low-order) bits delivered in system timestamp. +* Default +* 32 +* Notes +* Value has to match system timestamp clock source. +*/ +// Define number of valid bits low-order delivered by clock source. +#ifndef SEGGER_SYSVIEW_TIMESTAMP_BITS + #define SEGGER_SYSVIEW_TIMESTAMP_BITS 32 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_RTT_CHANNEL +* +* Description +* The RTT channel that SystemView will use. +* Default +* 0: Auto selection. +* Notes +* Value has to be lower than SEGGER_RTT_MAX_NUM_UP_BUFFERS. +*/ +#ifndef SEGGER_SYSVIEW_RTT_CHANNEL + #define SEGGER_SYSVIEW_RTT_CHANNEL 0 +#endif +// Sanity check of RTT channel +#if (SEGGER_SYSVIEW_RTT_CHANNEL == 0) && (SEGGER_RTT_MAX_NUM_UP_BUFFERS < 2) + #error "SEGGER_RTT_MAX_NUM_UP_BUFFERS in SEGGER_RTT_Conf.h has to be > 1!" +#elif (SEGGER_SYSVIEW_RTT_CHANNEL >= SEGGER_RTT_MAX_NUM_UP_BUFFERS) + #error "SEGGER_RTT_MAX_NUM_UP_BUFFERS in SEGGER_RTT_Conf.h has to be > SEGGER_SYSVIEW_RTT_CHANNEL!" +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_RTT_BUFFER_SIZE +* +* Description +* Number of bytes that SystemView uses for the RTT buffer. +* Default +* 1024 +*/ +#ifndef SEGGER_SYSVIEW_RTT_BUFFER_SIZE + #define SEGGER_SYSVIEW_RTT_BUFFER_SIZE 1024 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_SECTION +* +* Description +* Section to place the SystemView RTT Buffer into. +* Default +* undefined: Do not place into a specific section. +* Notes +* If SEGGER_RTT_SECTION is defined, the default changes to use +* this section for the SystemView RTT Buffer, too. +*/ +#if !(defined SEGGER_SYSVIEW_SECTION) && (defined SEGGER_RTT_SECTION) + #define SEGGER_SYSVIEW_SECTION SEGGER_RTT_SECTION +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE +* +* Description +* Largest cache line size (in bytes) in the target system. +* Default +* 0 +* Notes +* Required in systems with caches to make sure that the SystemView +* RTT buffer can be aligned accordingly. +*/ +#ifndef SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE + #define SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE 0 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_ID_BASE +* +* Description +* Lowest Id reported by the application. +* Default +* 0 +* Notes +* Value is usually subtracted from mailboxes, semaphores, tasks, +* .... addresses, to compress event parameters. +* Should be the lowest RAM address of the system. +*/ +#ifndef SEGGER_SYSVIEW_ID_BASE + #define SEGGER_SYSVIEW_ID_BASE 0 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_ID_SHIFT +* +* Description +* Number of bits to shift Ids. +* Default +* 0 +* Notes +* Ids are shifted to compress event parameters. +* Should match the alignment of Ids (addresses), +* e.g. 2 when Ids are 4 byte aligned. +*/ +#ifndef SEGGER_SYSVIEW_ID_SHIFT + #define SEGGER_SYSVIEW_ID_SHIFT 0 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_MAX_ARGUMENTS +* +* Description +* Maximum number of arguments which are handled with SystemView +* print routines or may be encoded in one recording function. +* routines. +* Default +* 16 +*/ +#ifndef SEGGER_SYSVIEW_MAX_ARGUMENTS + #define SEGGER_SYSVIEW_MAX_ARGUMENTS 16 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_MAX_STRING_LEN +* +* Description +* Maximum string length which can be used in SystemView print and +* system description routines. +* Default +* 128 +*/ +#ifndef SEGGER_SYSVIEW_MAX_STRING_LEN + #define SEGGER_SYSVIEW_MAX_STRING_LEN 128 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT +* +* Description +* If enabled, on SEGGER_SYSVIEW_PrintHost, check the format string +* and if it includes unsupported formatters, use formatting on the +* target instead. +* Default +* 0: Disabled. +*/ +#ifndef SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT + #define SEGGER_SYSVIEW_PRINTF_IMPLICIT_FORMAT 0 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_USE_INTERNAL_RECORDER +* +* Description +* If set, an internal recorder, such as UART or IP is used. +* Default +* 0: Disabled. +* Notes +* Convenience define to be used by SEGGER_SYSVIEW_Conf(), +* such as in embOS configuration to enable Cortex-M cycle counter. +*/ +#ifndef SEGGER_SYSVIEW_USE_INTERNAL_RECORDER + #define SEGGER_SYSVIEW_USE_INTERNAL_RECORDER 0 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_CAN_RESTART +* +* Description +* If enabled, send the SystemView start sequence on every start +* command, not just on the first one. +* Enables restart when SystemView disconnected unexpectedly. +* Default +* 1: Enabled +*/ +#ifndef SEGGER_SYSVIEW_CAN_RESTART + #define SEGGER_SYSVIEW_CAN_RESTART 1 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_START_ON_INIT +* +* Description +* Enable calling SEGGER_SYSVIEW_Start() after initialization. +* Default +* 0: Disabled. +* Notes +* Convenience define to be used by SEGGER_SYSVIEW_Conf(), +* such as in embOS configuration. +*/ +#ifndef SEGGER_SYSVIEW_START_ON_INIT + #define SEGGER_SYSVIEW_START_ON_INIT 0 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_USE_STATIC_BUFFER +* +* Description +* If enabled, use a static buffer instead of a buffer on the stack +* for SystemView event packets. +* Default +* 1: Enabled. +* Notes +* If enabled, the static memory use by SystemView is increased by +* the maximum packet size. SystemView is locked on entry of a +* recording function. +* If disabled, the stack usage by SystemView recording functions +* might be increased by up to the maximum packet size. SystemView +* is locked when writing the packet to the RTT buffer. +*/ +#ifndef SEGGER_SYSVIEW_USE_STATIC_BUFFER + #define SEGGER_SYSVIEW_USE_STATIC_BUFFER 1 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_MAX_PACKET_SIZE +* +* Description +* Maximum packet size for a SystemView event. +* Default +* Automatically calculated. +* Notes +* The maximum packet size is mainly defined by the maximum string +* length and the maximum number of arguments. +*/ +#ifndef SEGGER_SYSVIEW_MAX_PACKET_SIZE + #define SEGGER_SYSVIEW_MAX_PACKET_SIZE (SEGGER_SYSVIEW_INFO_SIZE + SEGGER_SYSVIEW_MAX_STRING_LEN + 2 * SEGGER_SYSVIEW_QUANTA_U32 + SEGGER_SYSVIEW_MAX_ARGUMENTS * SEGGER_SYSVIEW_QUANTA_U32) +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_POST_MORTEM_MODE +* +* Description +* If enabled, SystemView records for post-mortem analysis instead +* of real-time analysis. +* Default +* 0: Disabled. +* Notes +* For more information refer to +* https://www.segger.com/products/development-tools/systemview/technology/post-mortem-mode +*/ +#ifndef SEGGER_SYSVIEW_POST_MORTEM_MODE + #define SEGGER_SYSVIEW_POST_MORTEM_MODE 0 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_SYNC_PERIOD_SHIFT +* +* Description +* Configure how frequently syncronization is sent in post-mortem +* mode. +* Default +* 8: (1 << 8) = Every 256 Events. +* Notes +* In post-mortem mode, at least one sync has to be in the RTT buffer. +* Recommended sync frequency: Buffer Size / 16 +* For more information refer to +* https://www.segger.com/products/development-tools/systemview/technology/post-mortem-mode +*/ +#ifndef SEGGER_SYSVIEW_SYNC_PERIOD_SHIFT + #define SEGGER_SYSVIEW_SYNC_PERIOD_SHIFT 8 +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_ON_EVENT_RECORDED() +* +* Description +* Function macro to notify recorder about a new event in buffer. +* Default +* undefined: Do not notify recorder. +* Notes +* Used for non-J-Link recorder, +* such as to enable transmission via UART or notify IP task. +*/ +#ifndef SEGGER_SYSVIEW_ON_EVENT_RECORDED + #define SEGGER_SYSVIEW_ON_EVENT_RECORDED(NumBytes) +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_LOCK() +* +* Description +* Function macro to (nestable) lock SystemView recording. +* Default +* Use RTT Locking mechanism (defined by SEGGER_RTT_LOCK()). +* Notes +* If SystemView recording is not locked, recording events from +* interrupts and tasks may lead to unpredictable, undefined, event +* data. +*/ +#ifndef SEGGER_SYSVIEW_LOCK + #define SEGGER_SYSVIEW_LOCK() SEGGER_RTT_LOCK() +#endif + +/********************************************************************* +* +* Define: SEGGER_SYSVIEW_UNLOCK +* +* Description +* Function macro to unlock SystemView recording. +* Default +* Use RTT Unlocking mechanism (defined by SEGGER_RTT_UNLOCK()). +*/ +#ifndef SEGGER_SYSVIEW_UNLOCK + #define SEGGER_SYSVIEW_UNLOCK() SEGGER_RTT_UNLOCK() +#endif + +#ifdef __cplusplus +} +#endif + +#endif + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/SEGGER/SEGGER_SYSVIEW_Int.h b/resources_extra/SystemView_Src_V320/SEGGER/SEGGER_SYSVIEW_Int.h new file mode 100644 index 0000000..a079381 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/SEGGER/SEGGER_SYSVIEW_Int.h @@ -0,0 +1,99 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- +File : SEGGER_SYSVIEW_Int.h +Purpose : SEGGER SystemView internal header. +Revision: $Rev: 21281 $ +*/ + +#ifndef SEGGER_SYSVIEW_INT_H +#define SEGGER_SYSVIEW_INT_H + +/********************************************************************* +* +* #include Section +* +********************************************************************** +*/ + +#include "SEGGER_SYSVIEW.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/********************************************************************* +* +* Private data types +* +********************************************************************** +*/ +// +// Commands that Host can send to target +// +typedef enum { + SEGGER_SYSVIEW_COMMAND_ID_START = 1, + SEGGER_SYSVIEW_COMMAND_ID_STOP, + SEGGER_SYSVIEW_COMMAND_ID_GET_SYSTIME, + SEGGER_SYSVIEW_COMMAND_ID_GET_TASKLIST, + SEGGER_SYSVIEW_COMMAND_ID_GET_SYSDESC, + SEGGER_SYSVIEW_COMMAND_ID_GET_NUMMODULES, + SEGGER_SYSVIEW_COMMAND_ID_GET_MODULEDESC, + SEGGER_SYSVIEW_COMMAND_ID_HEARTBEAT = 127, + // Extended commands: Commands >= 128 have a second parameter + SEGGER_SYSVIEW_COMMAND_ID_GET_MODULE = 128 +} SEGGER_SYSVIEW_COMMAND_ID; + +#ifdef __cplusplus +} +#endif + +#endif + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/SEGGER/Syscalls/SEGGER_RTT_Syscalls_GCC.c b/resources_extra/SystemView_Src_V320/SEGGER/Syscalls/SEGGER_RTT_Syscalls_GCC.c new file mode 100644 index 0000000..ea980eb --- /dev/null +++ b/resources_extra/SystemView_Src_V320/SEGGER/Syscalls/SEGGER_RTT_Syscalls_GCC.c @@ -0,0 +1,124 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +---------------------------END-OF-HEADER------------------------------ +File : SEGGER_RTT_Syscalls_GCC.c +Purpose : Low-level functions for using printf() via RTT in GCC. + To use RTT for printf output, include this file in your + application. +Revision: $Rev: 20755 $ +---------------------------------------------------------------------- +*/ +#if (defined __GNUC__) && !(defined __SES_ARM) && !(defined __CROSSWORKS_ARM) && !(defined __ARMCC_VERSION) && !(defined __CC_ARM) + +#include // required for _write_r +#include "SEGGER_RTT.h" + + +/********************************************************************* +* +* Types +* +********************************************************************** +*/ +// +// If necessary define the _reent struct +// to match the one passed by the used standard library. +// +struct _reent; + +/********************************************************************* +* +* Function prototypes +* +********************************************************************** +*/ +_ssize_t _write (int file, const void *ptr, size_t len); +_ssize_t _write_r(struct _reent *r, int file, const void *ptr, size_t len); + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ + +/********************************************************************* +* +* _write() +* +* Function description +* Low-level write function. +* libc subroutines will use this system routine for output to all files, +* including stdout. +* Write data via RTT. +*/ +_ssize_t _write(int file, const void *ptr, size_t len) { + (void) file; /* Not used, avoid warning */ + SEGGER_RTT_Write(0, ptr, len); + return len; +} + +/********************************************************************* +* +* _write_r() +* +* Function description +* Low-level reentrant write function. +* libc subroutines will use this system routine for output to all files, +* including stdout. +* Write data via RTT. +*/ +_ssize_t _write_r(struct _reent *r, int file, const void *ptr, size_t len) { + (void) file; /* Not used, avoid warning */ + (void) r; /* Not used, avoid warning */ + SEGGER_RTT_Write(0, ptr, len); + return len; +} + +#endif +/****** End Of File *************************************************/ diff --git a/resources_extra/SystemView_Src_V320/SEGGER/Syscalls/SEGGER_RTT_Syscalls_IAR.c b/resources_extra/SystemView_Src_V320/SEGGER/Syscalls/SEGGER_RTT_Syscalls_IAR.c new file mode 100644 index 0000000..bdea1a4 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/SEGGER/Syscalls/SEGGER_RTT_Syscalls_IAR.c @@ -0,0 +1,119 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +---------------------------END-OF-HEADER------------------------------ +File : SEGGER_RTT_Syscalls_IAR.c +Purpose : Low-level functions for using printf() via RTT in IAR. + To use RTT for printf output, include this file in your + application and set the Library Configuration to Normal. +Revision: $Rev: 17697 $ +---------------------------------------------------------------------- +*/ +#ifdef __IAR_SYSTEMS_ICC__ + +// +// Since IAR EWARM V8 and EWRX V4, yfuns.h is considered as deprecated and LowLevelIOInterface.h +// shall be used instead. To not break any compatibility with older compiler versions, we have a +// version check in here. +// +#if ((defined __ICCARM__) && (__VER__ >= 8000000)) || ((defined __ICCRX__) && (__VER__ >= 400)) + #include +#else + #include +#endif + +#include "SEGGER_RTT.h" +#pragma module_name = "?__write" + +/********************************************************************* +* +* Function prototypes +* +********************************************************************** +*/ +size_t __write(int handle, const unsigned char * buffer, size_t size); + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +/********************************************************************* +* +* __write() +* +* Function description +* Low-level write function. +* Standard library subroutines will use this system routine +* for output to all files, including stdout. +* Write data via RTT. +*/ +size_t __write(int handle, const unsigned char * buffer, size_t size) { + (void) handle; /* Not used, avoid warning */ + SEGGER_RTT_Write(0, (const char*)buffer, size); + return size; +} + +/********************************************************************* +* +* __write_buffered() +* +* Function description +* Low-level write function. +* Standard library subroutines will use this system routine +* for output to all files, including stdout. +* Write data via RTT. +*/ +size_t __write_buffered(int handle, const unsigned char * buffer, size_t size) { + (void) handle; /* Not used, avoid warning */ + SEGGER_RTT_Write(0, (const char*)buffer, size); + return size; +} + +#endif +/****** End Of File *************************************************/ diff --git a/resources_extra/SystemView_Src_V320/SEGGER/Syscalls/SEGGER_RTT_Syscalls_KEIL.c b/resources_extra/SystemView_Src_V320/SEGGER/Syscalls/SEGGER_RTT_Syscalls_KEIL.c new file mode 100644 index 0000000..988035f --- /dev/null +++ b/resources_extra/SystemView_Src_V320/SEGGER/Syscalls/SEGGER_RTT_Syscalls_KEIL.c @@ -0,0 +1,393 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +---------------------------END-OF-HEADER------------------------------ +File : RTT_Syscalls_KEIL.c +Purpose : Retargeting module for KEIL MDK-CM3. + Low-level functions for using printf() via RTT +Revision: $Rev: 20754 $ +Notes : (1) https://wiki.segger.com/Keil_MDK-ARM#RTT_in_uVision +---------------------------------------------------------------------- +*/ +#if (defined __CC_ARM) || (defined __ARMCC_VERSION) + +#include +#include +#include +#include +#include + +#include "SEGGER_RTT.h" +/********************************************************************* +* +* #pragmas +* +********************************************************************** +*/ +#if __ARMCC_VERSION < 6000000 +#pragma import(__use_no_semihosting) +#endif + +#ifdef _MICROLIB + #pragma import(__use_full_stdio) +#endif + +/********************************************************************* +* +* Defines non-configurable +* +********************************************************************** +*/ + +/* Standard IO device handles - arbitrary, but any real file system handles must be + less than 0x8000. */ +#define STDIN 0x8001 // Standard Input Stream +#define STDOUT 0x8002 // Standard Output Stream +#define STDERR 0x8003 // Standard Error Stream + +/********************************************************************* +* +* Public const +* +********************************************************************** +*/ +#if __ARMCC_VERSION < 5000000 +//const char __stdin_name[] = "STDIN"; +const char __stdout_name[] = "STDOUT"; +const char __stderr_name[] = "STDERR"; +#endif + +/********************************************************************* +* +* Public code +* +********************************************************************** +*/ + +/********************************************************************* +* +* _ttywrch +* +* Function description: +* Outputs a character to the console +* +* Parameters: +* c - character to output +* +*/ +void _ttywrch(int c) { + fputc(c, stdout); // stdout + fflush(stdout); +} + +/********************************************************************* +* +* _sys_open +* +* Function description: +* Opens the device/file in order to do read/write operations +* +* Parameters: +* sName - sName of the device/file to open +* OpenMode - This parameter is currently ignored +* +* Return value: +* != 0 - Handle to the object to open, otherwise +* == 0 -"device" is not handled by this module +* +*/ +FILEHANDLE _sys_open(const char * sName, int OpenMode) { + (void)OpenMode; + // Register standard Input Output devices. + if (strcmp(sName, __stdout_name) == 0) { + return (STDOUT); + } else if (strcmp(sName, __stderr_name) == 0) { + return (STDERR); + } else + return (0); // Not implemented +} + +/********************************************************************* +* +* _sys_close +* +* Function description: +* Closes the handle to the open device/file +* +* Parameters: +* hFile - Handle to a file opened via _sys_open +* +* Return value: +* 0 - device/file closed +* +*/ +int _sys_close(FILEHANDLE hFile) { + (void)hFile; + return 0; // Not implemented +} + +/********************************************************************* +* +* _sys_write +* +* Function description: +* Writes the data to an open handle. +* Currently this function only outputs data to the console +* +* Parameters: +* hFile - Handle to a file opened via _sys_open +* pBuffer - Pointer to the data that shall be written +* NumBytes - Number of bytes to write +* Mode - The Mode that shall be used +* +* Return value: +* Number of bytes *not* written to the file/device +* +*/ +int _sys_write(FILEHANDLE hFile, const unsigned char * pBuffer, unsigned NumBytes, int Mode) { + int r = 0; + + (void)Mode; + if (hFile == STDOUT) { + SEGGER_RTT_Write(0, (const char*)pBuffer, NumBytes); + return 0; + } + return r; +} + +/********************************************************************* +* +* _sys_read +* +* Function description: +* Reads data from an open handle. +* Currently this modules does nothing. +* +* Parameters: +* hFile - Handle to a file opened via _sys_open +* pBuffer - Pointer to buffer to store the read data +* NumBytes - Number of bytes to read +* Mode - The Mode that shall be used +* +* Return value: +* Number of bytes read from the file/device +* +*/ +int _sys_read(FILEHANDLE hFile, unsigned char * pBuffer, unsigned NumBytes, int Mode) { + (void)hFile; + (void)pBuffer; + (void)NumBytes; + (void)Mode; + return (0); // Not implemented +} + +/********************************************************************* +* +* _sys_istty +* +* Function description: +* This function shall return whether the opened file +* is a console device or not. +* +* Parameters: +* hFile - Handle to a file opened via _sys_open +* +* Return value: +* 1 - Device is a console +* 0 - Device is not a console +* +*/ +int _sys_istty(FILEHANDLE hFile) { + if (hFile > 0x8000) { + return (1); + } + return (0); // Not implemented +} + +/********************************************************************* +* +* _sys_seek +* +* Function description: +* Seeks via the file to a specific position +* +* Parameters: +* hFile - Handle to a file opened via _sys_open +* Pos - +* +* Return value: +* int - +* +*/ +int _sys_seek(FILEHANDLE hFile, long Pos) { + (void)hFile; + (void)Pos; + return (0); // Not implemented +} + +/********************************************************************* +* +* _sys_ensure +* +* Function description: +* +* +* Parameters: +* hFile - Handle to a file opened via _sys_open +* +* Return value: +* int - +* +*/ +int _sys_ensure(FILEHANDLE hFile) { + (void)hFile; + return (-1); // Not implemented +} + +/********************************************************************* +* +* _sys_flen +* +* Function description: +* Returns the length of the opened file handle +* +* Parameters: +* hFile - Handle to a file opened via _sys_open +* +* Return value: +* Length of the file +* +*/ +long _sys_flen(FILEHANDLE hFile) { + (void)hFile; + return (0); // Not implemented +} + +/********************************************************************* +* +* _sys_tmpnam +* +* Function description: +* This function converts the file number fileno for a temporary +* file to a unique filename, for example, tmp0001. +* +* Parameters: +* pBuffer - Pointer to a buffer to store the name +* FileNum - file number to convert +* MaxLen - Size of the buffer +* +* Return value: +* 1 - Error +* 0 - Success +* +*/ +int _sys_tmpnam(char * pBuffer, int FileNum, unsigned MaxLen) { + (void)pBuffer; + (void)FileNum; + (void)MaxLen; + return (1); // Not implemented +} + +/********************************************************************* +* +* _sys_command_string +* +* Function description: +* This function shall execute a system command. +* +* Parameters: +* cmd - Pointer to the command string +* len - Length of the string +* +* Return value: +* == NULL - Command was not successfully executed +* == sCmd - Command was passed successfully +* +*/ +char * _sys_command_string(char * cmd, int len) { + (void)len; + return cmd; // Not implemented +} + +/********************************************************************* +* +* _sys_exit +* +* Function description: +* This function is called when the application returns from main +* +* Parameters: +* ReturnCode - Return code from the main function +* +* +*/ +void _sys_exit(int ReturnCode) { + (void)ReturnCode; + while (1); // Not implemented +} + +#if __ARMCC_VERSION >= 5000000 +/********************************************************************* +* +* stdout_putchar +* +* Function description: +* Put a character to the stdout +* +* Parameters: +* ch - Character to output +* +* +*/ +int stdout_putchar(int ch) { + (void)ch; + return ch; // Not implemented +} +#endif + +#endif +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/SEGGER/Syscalls/SEGGER_RTT_Syscalls_SES.c b/resources_extra/SystemView_Src_V320/SEGGER/Syscalls/SEGGER_RTT_Syscalls_SES.c new file mode 100644 index 0000000..6c438a9 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/SEGGER/Syscalls/SEGGER_RTT_Syscalls_SES.c @@ -0,0 +1,251 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +---------------------------END-OF-HEADER------------------------------ +File : SEGGER_RTT_Syscalls_SES.c +Purpose : Reimplementation of printf, puts and __getchar using RTT + in SEGGER Embedded Studio. + To use RTT for printf output, include this file in your + application. +Revision: $Rev: 18539 $ +---------------------------------------------------------------------- +*/ +#if (defined __SES_ARM) || (defined __SES_RISCV) || (defined __CROSSWORKS_ARM) + +#include "SEGGER_RTT.h" +#include +#include +#include "limits.h" +#include "__libc.h" +#include "__vfprintf.h" + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ +// +// Select string formatting implementation. +// +// RTT printf formatting +// - Configurable stack usage. (SEGGER_RTT_PRINTF_BUFFER_SIZE in SEGGER_RTT_Conf.h) +// - No maximum string length. +// - Limited conversion specifiers and flags. (See SEGGER_RTT_printf.c) +// Standard library printf formatting +// - Configurable formatting capabilities. +// - Full conversion specifier and flag support. +// - Maximum string length has to be known or (slightly) slower character-wise output. +// +// #define PRINTF_USE_SEGGER_RTT_FORMATTING 0 // Use standard library formatting +// #define PRINTF_USE_SEGGER_RTT_FORMATTING 1 // Use RTT formatting +// +#ifndef PRINTF_USE_SEGGER_RTT_FORMATTING + #define PRINTF_USE_SEGGER_RTT_FORMATTING 0 +#endif +// +// If using standard library formatting, +// select maximum output string buffer size or character-wise output. +// +// #define PRINTF_BUFFER_SIZE 0 // Use character-wise output +// #define PRINTF_BUFFER_SIZE 128 // Default maximum string length +// +#ifndef PRINTF_BUFFER_SIZE + #define PRINTF_BUFFER_SIZE 128 +#endif + +#if PRINTF_USE_SEGGER_RTT_FORMATTING // Use SEGGER RTT formatting implementation +/********************************************************************* +* +* Function prototypes +* +********************************************************************** +*/ +int SEGGER_RTT_vprintf(unsigned BufferIndex, const char * sFormat, va_list * pParamList); + +/********************************************************************* +* +* Global functions, printf +* +********************************************************************** +*/ +/********************************************************************* +* +* printf() +* +* Function description +* print a formatted string using RTT and SEGGER RTT formatting. +*/ +int printf(const char *fmt,...) { + int n; + va_list args; + + va_start (args, fmt); + n = SEGGER_RTT_vprintf(0, fmt, &args); + va_end(args); + return n; +} + +#elif PRINTF_BUFFER_SIZE == 0 // Use standard library formatting with character-wise output + +/********************************************************************* +* +* Static functions +* +********************************************************************** +*/ +static int _putchar(int x, __printf_tag_ptr ctx) { + (void)ctx; + SEGGER_RTT_Write(0, (char *)&x, 1); + return x; +} + +/********************************************************************* +* +* Global functions, printf +* +********************************************************************** +*/ +/********************************************************************* +* +* printf() +* +* Function description +* print a formatted string character-wise, using RTT and standard +* library formatting. +*/ +int printf(const char *fmt, ...) { + int n; + va_list args; + __printf_t iod; + + va_start(args, fmt); + iod.string = 0; + iod.maxchars = INT_MAX; + iod.output_fn = _putchar; + SEGGER_RTT_LOCK(); + n = __vfprintf(&iod, fmt, args); + SEGGER_RTT_UNLOCK(); + va_end(args); + return n; +} + +#else // Use standard library formatting with static buffer + +/********************************************************************* +* +* Global functions, printf +* +********************************************************************** +*/ +/********************************************************************* +* +* printf() +* +* Function description +* print a formatted string using RTT and standard library formatting. +*/ +int printf(const char *fmt,...) { + int n; + char aBuffer[PRINTF_BUFFER_SIZE]; + va_list args; + + va_start (args, fmt); + n = vsnprintf(aBuffer, sizeof(aBuffer), fmt, args); + if (n > (int)sizeof(aBuffer)) { + SEGGER_RTT_Write(0, aBuffer, sizeof(aBuffer)); + } else if (n > 0) { + SEGGER_RTT_Write(0, aBuffer, n); + } + va_end(args); + return n; +} +#endif + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +/********************************************************************* +* +* puts() +* +* Function description +* print a string using RTT. +*/ +int puts(const char *s) { + return SEGGER_RTT_WriteString(0, s); +} + +/********************************************************************* +* +* __putchar() +* +* Function description +* Write one character via RTT. +*/ +int __putchar(int x, __printf_tag_ptr ctx) { + (void)ctx; + SEGGER_RTT_Write(0, (char *)&x, 1); + return x; +} + +/********************************************************************* +* +* __getchar() +* +* Function description +* Wait for and get a character via RTT. +*/ +int __getchar() { + return SEGGER_RTT_WaitKey(); +} + +#endif +/****** End Of File *************************************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/COMM/SEGGER_SYSVIEW_COMM_IP_embOS_emNet.c b/resources_extra/SystemView_Src_V320/Sample/COMM/SEGGER_SYSVIEW_COMM_IP_embOS_emNet.c new file mode 100644 index 0000000..810effb --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/COMM/SEGGER_SYSVIEW_COMM_IP_embOS_emNet.c @@ -0,0 +1,445 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_COMM_IP_embOS_emNet.c +Purpose : SystemView Communication for IP Recorder with embOS and emNet. +Revision: $Rev: 15024 $ + +Additional Information + emNet needs to be initialized by the application, ideally before calling SEGGER_SYSVIEW_X_StartComm. + Example code: + static OS_STACKPTR int _IPStack[TASK_STACK_SIZE_IP_TASK/sizeof(int)]; // Stack of the IP_Task. + static OS_TASK _IPTCB; // Task-Control-Block of the IP_Task. + + void MainTask(void) { + // + // Initialize emNet + // + IP_Init(); + OS_CREATETASK(&_IPTCB , "IP_Task" , IP_Task , TASK_PRIO_IP_TASK , _IPStack); // Start the IP_Task. + IP_Connect(IP_INFO_GetNumInterfaces() - 1); // Connect the interface if necessary. + // + // Start SystemView communication + // + SEGGER_SYSVIEW_X_StartComm(); + + ... + } + +*/ +#include "SEGGER_SYSVIEW.h" +#include "SEGGER_SYSVIEW_Conf.h" +#include "SEGGER_RTT.h" + +#include "RTOS.h" +#include "IP.h" +#include "IP_Int.h" + +/********************************************************************* +* +* Defines, OS +* +********************************************************************** +*/ +#define SYSVIEW_COMM_TASK_STACK_SIZE 1024 + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ +/********************************************************************* +* +* SYSVIEW_COMM_TASK_PRIO +* Priority of the communication task. +* Typically low to keep SystemVeiw minimally intrusive. +* Higher when there are overflows due to too long blocking time. +* +*/ +#ifndef SYSVIEW_COMM_TASK_PRIO + #define SYSVIEW_COMM_TASK_PRIO 1 +#endif + +/********************************************************************* +* +* SYSVIEW_COMM_SEND_THRESHOLD +* Threshold for the SystemView RTT Buffer level, +* after which the data is sent to SystemView App. +* +*/ +#ifndef SYSVIEW_COMM_SEND_THRESHOLD + #define SYSVIEW_COMM_SEND_THRESHOLD 512 +#endif + +/********************************************************************* +* +* SYSVIEW_COMM_IDLE_DELAY +* Maximum delay after which available data from the SystemView RTT +* Buffer is sent to SystemView App. +* +*/ +#ifndef SYSVIEW_COMM_IDLE_DELAY + #define SYSVIEW_COMM_IDLE_DELAY 100 +#endif + +/********************************************************************* +* +* SYSVIEW_COMM_POLL_INTERVAL +* Polling interval to check for send threshold or idle delay timeout. +* +*/ +#ifndef SYSVIEW_COMM_POLL_INTERVAL + #define SYSVIEW_COMM_POLL_INTERVAL 2 +#endif + +/********************************************************************* +* +* SYSVIEW_COMM_SERVER_PORT +* Communication port on which SystemView App can connect. +* +*/ +#ifndef SYSVIEW_COMM_SERVER_PORT + #define SYSVIEW_COMM_SERVER_PORT 19111 +#endif + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ +#define SYSVIEW_COMM_APP_HELLO_SIZE 32 +#define SYSVIEW_COMM_TARGET_HELLO_SIZE 32 + +/********************************************************************* +* +* Static data, OS +* +********************************************************************** +*/ +static OS_STACKPTR int _SysViewCommStack[SYSVIEW_COMM_TASK_STACK_SIZE/sizeof(int)]; +static OS_TASK _SysViewCommTCB; + +/********************************************************************* +* +* Static data +* +********************************************************************** +*/ +// "Hello" message expected by SystemView App: SEGGER SystemView VM.mm.rr +static const U8 _abHelloMsg[SYSVIEW_COMM_TARGET_HELLO_SIZE] = { 'S', 'E', 'G', 'G', 'E', 'R', ' ', 'S', 'y', 's', 't', 'e', 'm', 'V', 'i', 'e', 'w', ' ', 'V', '0' + SEGGER_SYSVIEW_MAJOR, '.', '0' + (SEGGER_SYSVIEW_MINOR / 10), '0' + (SEGGER_SYSVIEW_MINOR % 10), '.', '0' + (SEGGER_SYSVIEW_REV / 10), '0' + (SEGGER_SYSVIEW_REV % 10), '\0', 0, 0, 0, 0, 0 }; +static int _ChannelID; +static char _acBuf[SYSVIEW_COMM_SEND_THRESHOLD * 2]; + +/********************************************************************* +* +* Local functions, OS +* +********************************************************************** +*/ +/********************************************************************* +* +* _Delay +* +* Function description +* Delay for some time. +* +*/ +static void _Delay(int Ticks) { + OS_TASK_Delay(Ticks); +} + +/********************************************************************* +* +* _WaitPolling +* +* Function description +* Poll SystemView Buffer to reach threshold fill level. +* +*/ +static void _WaitPolling(int Timeout) { + int BytesInBuffer; + do { + BytesInBuffer = SEGGER_RTT_GetBytesInBuffer(_ChannelID); + if (BytesInBuffer >= SYSVIEW_COMM_SEND_THRESHOLD) { + break; + } + _Delay(SYSVIEW_COMM_POLL_INTERVAL); + Timeout -= SYSVIEW_COMM_POLL_INTERVAL; + } while (Timeout > 0); +} + +/********************************************************************* +* +* Local functions, IP +* +********************************************************************** +*/ +/********************************************************************* +* +* _WaitForIPInit +* +* Function description +* Wait for IP Stack to be initialized. +* +*/ +static void _WaitForIPInit(void) { + while (IP_Global.InitCompleted == 0) { + _Delay(2); + } +} + +/********************************************************************* +* +* _ListenAtTcpPort() +* +* Function description +* Creates a socket, binds it to a port and sets the socket into +* listening state. +* +* Parameter +* Port - Port which should be to wait for connections. +* +* Return value +* O.K. : Socket handle. +* Error: SOCKET_ERROR . +*/ +static int _ListenAtTcpPort(U16 Port) { + int hSock; + int r; + struct sockaddr_in Addr; + + // + // Create socket + // + hSock = socket(AF_INET, SOCK_STREAM, 0); + if (hSock != SOCKET_ERROR) { + // + // Bind it to the port + // + IP_MEMSET(&Addr, 0, sizeof(Addr)); + Addr.sin_family = AF_INET; + Addr.sin_port = htons(Port); + Addr.sin_addr.s_addr = INADDR_ANY; + r = bind(hSock, (struct sockaddr*)&Addr, sizeof(Addr)); + // + // Start listening on the socket. + // + if (r != 0) { + hSock = SOCKET_ERROR; + } else { + r = listen(hSock, 1); + if (r != 0) { + hSock = SOCKET_ERROR; + } + } + } + return hSock; +} + +/********************************************************************* +* +* _SocketIsReadable +* +* Function description +* Check if data can be read from the connected socket. +* +* Parameters +* hSocket Socket to check. +* +* Return value +* == 1 O.K., socket readable +* == 0 O.K., socket not readable +*/ +static int _SocketIsReadable(int hSocket, int TimeoutMs) { + I32 tv = TimeoutMs; + IP_fd_set rfds; + IP_fd_set efds; + int v; + + FD_ZERO(&rfds); // Zero init file descriptor list + FD_SET(hSocket, &rfds); // Add socket to file descriptor list to be monitored by select() + FD_ZERO(&efds); + FD_SET(hSocket, &efds); + + v = select(&rfds, NULL, &efds, tv); // > 0: in case of success, == 0: Timeout, < 0: Error + return v; +} + +/********************************************************************* +* +* Local functions, SystemView Communication +* +********************************************************************** +*/ +/********************************************************************* +* +* _SysViewCommTask +* +* Function description +* Task that handles TCP/IP connection and communication +* with SystemView App. +* +*/ +static void _SysViewCommTask(void) { + int hSockListen; + int hSockSV; + int v; + int r; + int NumBytes; + char acRecv[16]; + // + _ChannelID = SEGGER_SYSVIEW_GetChannelID(); + // + // Wait for IP Stack to be initialized. + // + _WaitForIPInit(); + // + // Try until we get a valid listening socket. + // + while (1) { + hSockListen = _ListenAtTcpPort(SYSVIEW_COMM_SERVER_PORT); + if (hSockListen == SOCKET_ERROR) { + _Delay(100); + continue; // Error, try again. + } + break; + } + // + // Wait for a connection and process the communication. + // + do { + // + // Check for a new connection. + // + hSockSV = accept(hSockListen, NULL, NULL); + if (hSockSV == SOCKET_ERROR) { + continue; // Error, try again. + } + // + // Successful connection? => Start systemview session + // First, receive message from SysView and send back own message + // + r = recv(hSockSV, acRecv, SYSVIEW_COMM_APP_HELLO_SIZE, 0); + if (r != SYSVIEW_COMM_APP_HELLO_SIZE) { // Failed to receive Hello message from SystemView App + closesocket(hSockSV); + hSockSV = SOCKET_ERROR; + } + r = send(hSockSV, (const char*)_abHelloMsg, SYSVIEW_COMM_TARGET_HELLO_SIZE, 0); + if (r != SYSVIEW_COMM_TARGET_HELLO_SIZE) { // Failed to send Hello message to SystemView App + closesocket(hSockSV); + hSockSV = SOCKET_ERROR; + } + // + // After a succesful connection, poll RTT buffer for data + // + while (hSockSV != SOCKET_ERROR) { + _WaitPolling(SYSVIEW_COMM_IDLE_DELAY); // Wait until there is "enough" data in the buffer to be sent. + // + // Check for data to be received from SystemView App + // + r = _SocketIsReadable(hSockSV, 0); + if (r == 1) { // Data to read from SysView available? + r = recv(hSockSV, acRecv, 1, 0); // Receive to read + if (r != 1) { // Failed to receive data? => Connection lost + break; + } + v = acRecv[0]; + r = recv(hSockSV, acRecv, v, 0); // Receive all data + if (r != v) { // Failed to receive data? => Connection lost + break; + } + NumBytes = SEGGER_RTT_WriteDownBufferNoLock(_ChannelID, &acRecv[0], r); // Write data into corresponding RTT buffer for application to read and handle accordingly + } + // + // Read available RTT data into send bufer and send it. + // + NumBytes = SEGGER_RTT_ReadUpBufferNoLock(_ChannelID, &_acBuf[0], sizeof(_acBuf)); + if (NumBytes > 0) { + // + // Send data to SystemView App + // + r = send(hSockSV, _acBuf, NumBytes, 0); + if (NumBytes != r) { // Failed to send data? => Connection lost + break; + } + } + } + // + // Processing done. close socket handle. + // + if (hSockSV != SOCKET_ERROR) { + closesocket(hSockSV); + } + } while (1); +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ + +/********************************************************************* +* +* SEGGER_SYSVIEW_X_StartComm() +* +* Function description +* Setup communication channel. +*/ +void SEGGER_SYSVIEW_X_StartComm(void) { + // + // Initialize SystemView communication + // + OS_TASK_CREATE(&_SysViewCommTCB, "SysView Comm", SYSVIEW_COMM_TASK_PRIO, _SysViewCommTask, _SysViewCommStack); +} + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/COMM/SEGGER_SYSVIEW_COMM_IP_embOS_emNet_Notify.c b/resources_extra/SystemView_Src_V320/Sample/COMM/SEGGER_SYSVIEW_COMM_IP_embOS_emNet_Notify.c new file mode 100644 index 0000000..889d089 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/COMM/SEGGER_SYSVIEW_COMM_IP_embOS_emNet_Notify.c @@ -0,0 +1,479 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_COMM_IP_embOS_emNet.c +Purpose : SystemView Communication for IP Recorder with embOS and emNet. +Revision: $Rev: 15024 $ + +Additional Information + emNet needs to be initialized by the application, ideally before calling SEGGER_SYSVIEW_X_StartComm. + Example code: + static OS_STACKPTR int _IPStack[TASK_STACK_SIZE_IP_TASK/sizeof(int)]; // Stack of the IP_Task. + static OS_TASK _IPTCB; // Task-Control-Block of the IP_Task. + + void MainTask(void) { + // + // Initialize emNet + // + IP_Init(); + OS_CREATETASK(&_IPTCB , "IP_Task" , IP_Task , TASK_PRIO_IP_TASK , _IPStack); // Start the IP_Task. + IP_Connect(IP_INFO_GetNumInterfaces() - 1); // Connect the interface if necessary. + // + // Start SystemView communication + // + SEGGER_SYSVIEW_X_StartComm(); + + ... + } + +*/ +#include "SEGGER_SYSVIEW.h" +#include "SEGGER_SYSVIEW_Conf.h" +#include "SEGGER_RTT.h" + +#include "RTOS.h" +#include "IP.h" +#include "IP_Int.h" + +/********************************************************************* +* +* Defines, OS +* +********************************************************************** +*/ +#define SYSVIEW_COMM_TASK_STACK_SIZE 1024 + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ +#ifndef SYSVIEW_COMM_TASK_PRIO + #define SYSVIEW_COMM_TASK_PRIO 1 // Priority of the communication task +#endif + +#ifndef SYSVIEW_COMM_SEND_THRESHOLD + #define SYSVIEW_COMM_SEND_THRESHOLD 512 // Minimum number of bytes to read and send from the RTT Buffer. +#endif + +#ifndef SYSVIEW_COMM_IDLE_DELAY + #define SYSVIEW_COMM_IDLE_DELAY 100 // Delay if no data had to be sent. +#endif + +#ifndef SYSVIEW_COMM_POLL_INTERVAL + #define SYSVIEW_COMM_POLL_INTERVAL 2 // Interval to check for buffer level. +#endif + +#ifndef SYSVIEW_COMM_SERVER_PORT + #define SYSVIEW_COMM_SERVER_PORT 19111 +#endif + +#define _NO_NOTIFY + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ +#define SYSVIEW_COMM_SERVER_HELLO_SIZE 4 +#define SYSVIEW_COMM_TARGET_HELLO_SIZE 4 + +/********************************************************************* +* +* Static data, OS +* +********************************************************************** +*/ +static OS_STACKPTR int _SysViewCommStack[SYSVIEW_COMM_TASK_STACK_SIZE/sizeof(int)]; +static OS_TASK _SysViewCommTCB; + +/********************************************************************* +* +* Static data +* +********************************************************************** +*/ +static int _ChannelID; +static const U8 _abHelloMsg[SYSVIEW_COMM_TARGET_HELLO_SIZE] = { 'S', 'V', (SEGGER_SYSVIEW_VERSION / 10000), (SEGGER_SYSVIEW_VERSION / 1000) % 10 }; // "Hello" message expected by SysView: [ 'S', 'V', , ] +static char _acBuf[SYSVIEW_COMM_SEND_THRESHOLD * 2]; + +#ifndef _NO_NOTIFY +static unsigned _NumBytesRecorded; +#endif + +/********************************************************************* +* +* Local functions, OS +* +********************************************************************** +*/ +/********************************************************************* +* +* _Delay +* +* Function description +* Delay for some time. +* +*/ +static void _Delay(int Ticks) { + OS_TASK_Delay(Ticks); +} + +#ifdef _NO_NOTIFY +/********************************************************************* +* +* _WaitPolling +* +* Function description +* Poll SystemView Buffer to reach threshold fill level. +* +*/ +static void _WaitPolling(int Timeout) { + int BytesInBuffer; + do { + BytesInBuffer = SEGGER_RTT_GetBytesInBuffer(_ChannelID); + if (BytesInBuffer >= SYSVIEW_COMM_SEND_THRESHOLD) { + break; + } + _Delay(SYSVIEW_COMM_POLL_INTERVAL); + Timeout -= SYSVIEW_COMM_POLL_INTERVAL; + } while (Timeout > 0); +} +#else +/********************************************************************* +* +* _WaitNotify +* +* Function description +* Wait to be notified or the timeout runs out. +* +*/ +static void _WaitNotify(int Timeout) { + OS_TASKEVENT_GetTimed(1, Timeout); +} + +/********************************************************************* +* +* _Notify +* +* Function description +* Notify the communication task. +* +*/ +static void _Notify(void) { + // + // There might be SystemView Events before the communication task is created. + // Only notify task when it has been created + // + if (OS_TASK_IsTask(&_SysViewCommTCB)) { + OS_TASKEVENT_Set(&_SysViewCommTCB, 1); + } +} +#endif + +/********************************************************************* +* +* Local functions, IP +* +********************************************************************** +*/ +/********************************************************************* +* +* _WaitForIPInit +* +* Function description +* Wait for IP Stack to be initialized. +* +*/ +static void _WaitForIPInit(void) { + while (IP_Global.InitCompleted == 0) { + _Delay(2); + } +} + +/********************************************************************* +* +* _ListenAtTcpPort() +* +* Function description +* Creates a socket, binds it to a port and sets the socket into +* listening state. +* +* Parameter +* Port - Port which should be to wait for connections. +* +* Return value +* O.K. : Socket handle. +* Error: SOCKET_ERROR . +*/ +static int _ListenAtTcpPort(U16 Port) { + int hSock; + int r; + struct sockaddr_in Addr; + + // + // Create socket + // + hSock = socket(AF_INET, SOCK_STREAM, 0); + if (hSock != SOCKET_ERROR) { + // + // Bind it to the port + // + IP_MEMSET(&Addr, 0, sizeof(Addr)); + Addr.sin_family = AF_INET; + Addr.sin_port = htons(Port); + Addr.sin_addr.s_addr = INADDR_ANY; + r = bind(hSock, (struct sockaddr*)&Addr, sizeof(Addr)); + // + // Start listening on the socket. + // + if (r != 0) { + hSock = SOCKET_ERROR; + } else { + r = listen(hSock, 1); + if (r != 0) { + hSock = SOCKET_ERROR; + } + } + } + return hSock; +} + +/********************************************************************* +* +* _SocketIsReadable +* +* Function description +* Check if data can be read from the connected socket. +* +* Parameters +* hSocket Socket to check. +* +* Return value +* == 1 O.K., socket readable +* == 0 O.K., socket not readable +*/ +static int _SocketIsReadable(int hSocket, int TimeoutMs) { + I32 tv = TimeoutMs; + IP_fd_set rfds; + IP_fd_set efds; + int v; + + FD_ZERO(&rfds); // Zero init file descriptor list + FD_SET(hSocket, &rfds); // Add socket to file descriptor list to be monitored by select() + FD_ZERO(&efds); + FD_SET(hSocket, &efds); + + v = select(&rfds, NULL, &efds, tv); // > 0: in case of success, == 0: Timeout, < 0: Error + return v; +} + +/********************************************************************* +* +* Local functions, SystemView Communication +* +********************************************************************** +*/ +/********************************************************************* +* +* _SysViewCommTask +* +* Function description +* Task that handles TCP/IP connection and communication +* with SystemView App. +* +*/ +static void _SysViewCommTask(void) { + int hSockListen; + int hSockSV; + int v; + int r; + int NumBytes; + char acRecv[16]; + // + _ChannelID = SEGGER_SYSVIEW_GetChannelID(); + hSockSV = SOCKET_ERROR; + // + // Wait for IP Stack to be initialized. + // + _WaitForIPInit(); + // + // Try until we get a valid listening socket. + // + while (1) { + hSockListen = _ListenAtTcpPort(SYSVIEW_COMM_SERVER_PORT); + if (hSockListen == SOCKET_ERROR) { + _Delay(100); + continue; // Error, try again. + } + break; + } + // + // Wait for a connection and process the communication. + // + do { + // + // Check for a new connection. + // + hSockSV = accept(hSockListen, NULL, NULL); + if (hSockSV == SOCKET_ERROR) { + continue; // Error, try again. + } + // + // Successful connection? => Start systemview session + // First, receive message from SysView and send back own message + // + r = recv(hSockSV, acRecv, SYSVIEW_COMM_SERVER_HELLO_SIZE, 0); + if (r != SYSVIEW_COMM_SERVER_HELLO_SIZE) { // Failed to receive Hello message from SystemView App + closesocket(hSockSV); + hSockSV = SOCKET_ERROR; + } + r = send(hSockSV, (const char*)_abHelloMsg, SYSVIEW_COMM_TARGET_HELLO_SIZE, 0); + if (r != SYSVIEW_COMM_TARGET_HELLO_SIZE) { // Failed to send Hello message to SystemView App + closesocket(hSockSV); + hSockSV = SOCKET_ERROR; + } + // + // After a succesful connection, poll RTT buffer for data + // + while (hSockSV != SOCKET_ERROR) { +#ifdef _NO_NOTIFY + _WaitPolling(SYSVIEW_COMM_IDLE_DELAY); // Wait until there is "enough" data in the buffer to be sent. +#else + _WaitNotify(SYSVIEW_COMM_IDLE_DELAY); // Wait for event to be signaled when there is "enough" data in the buffer to be sent. + _NumBytesRecorded = 0; // Reset counter when we are going to send current RTT Buffer +#endif + // + // Check for data to be received from SystemView App + // + r = _SocketIsReadable(hSockSV, 0); + if (r == 1) { // Data to read from SysView available? + r = recv(hSockSV, acRecv, 1, 0); // Receive to read + if (r != 1) { // Failed to receive data? => Connection lost + break; + } + v = acRecv[0]; + r = recv(hSockSV, acRecv, v, 0); // Receive all data + if (r != v) { // Failed to receive data? => Connection lost + break; + } + NumBytes = SEGGER_RTT_WriteDownBufferNoLock(_ChannelID, &acRecv[0], r); // Write data into corresponding RTT buffer for application to read and handle accordingly + } + // + // Read available RTT data into send bufer and send it. + // + NumBytes = SEGGER_RTT_ReadUpBufferNoLock(_ChannelID, &_acBuf[0], sizeof(_acBuf)); + if (NumBytes > 0) { + // + // Send data to SystemView App + // + r = send(hSockSV, _acBuf, NumBytes, 0); + if (NumBytes != r) { // Failed to send data? => Connection lost + break; + } + } + } + // + // Processing done. close socket handle. + // + if (hSockSV != SOCKET_ERROR) { + closesocket(hSockSV); + hSockSV = SOCKET_ERROR; + } + } while (1); +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ + +/********************************************************************* +* +* SEGGER_SYSVIEW_X_StartComm() +* +* Function description +* Setup communication channel. +*/ +void SEGGER_SYSVIEW_X_StartComm(void) { + // + // Initialize SystemView communication + // + OS_TASK_CREATE(&_SysViewCommTCB, "SysView Comm", SYSVIEW_COMM_TASK_PRIO, _SysViewCommTask, _SysViewCommStack); +} + +#ifndef _NO_NOTIFY +/********************************************************************* +* +* SEGGER_SYSVIEW_X_OnEventRecorded() +* +* Function description +* Macro callback to be called when an event has been stored in the +* SystemView RTT Buffer. +* +* Parameters +* NumBytes: Number of bytes stored in the buffer. +*/ +void SEGGER_SYSVIEW_X_OnEventRecorded(unsigned NumBytes) { + // + // Notify SystemView Communication Task when the send threshold is reached. + // + _NumBytesRecorded += NumBytes; + if (_NumBytesRecorded >= SYSVIEW_COMM_SEND_THRESHOLD) { + _NumBytesRecorded = 0; + _Notify(); + } +} +#endif + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV10/Config/Cortex-M/SEGGER_SYSVIEW_Config_FreeRTOS.c b/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV10/Config/Cortex-M/SEGGER_SYSVIEW_Config_FreeRTOS.c new file mode 100644 index 0000000..ded7848 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV10/Config/Cortex-M/SEGGER_SYSVIEW_Config_FreeRTOS.c @@ -0,0 +1,104 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Config_FreeRTOS.c +Purpose : Sample setup configuration of SystemView with FreeRTOS. +Revision: $Rev: 7745 $ +*/ +#include "FreeRTOS.h" +#include "SEGGER_SYSVIEW.h" + +extern const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI; + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ +// The application name to be displayed in SystemViewer +#define SYSVIEW_APP_NAME "FreeRTOS Demo Application" + +// The target device name +#define SYSVIEW_DEVICE_NAME "Cortex-M4" + +// Frequency of the timestamp. Must match SEGGER_SYSVIEW_GET_TIMESTAMP in SEGGER_SYSVIEW_Conf.h +#define SYSVIEW_TIMESTAMP_FREQ (configCPU_CLOCK_HZ) + +// System Frequency. SystemcoreClock is used in most CMSIS compatible projects. +#define SYSVIEW_CPU_FREQ configCPU_CLOCK_HZ + +// The lowest RAM address used for IDs (pointers) +#define SYSVIEW_RAM_BASE (0x10000000) + +/********************************************************************* +* +* _cbSendSystemDesc() +* +* Function description +* Sends SystemView description strings. +*/ +static void _cbSendSystemDesc(void) { + SEGGER_SYSVIEW_SendSysDesc("N="SYSVIEW_APP_NAME",D="SYSVIEW_DEVICE_NAME",O=FreeRTOS"); + SEGGER_SYSVIEW_SendSysDesc("I#15=SysTick"); +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +void SEGGER_SYSVIEW_Conf(void) { + SEGGER_SYSVIEW_Init(SYSVIEW_TIMESTAMP_FREQ, SYSVIEW_CPU_FREQ, + &SYSVIEW_X_OS_TraceAPI, _cbSendSystemDesc); + SEGGER_SYSVIEW_SetRAMBase(SYSVIEW_RAM_BASE); +} + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV10/Patch/FreeRTOSV10_Amazon_Core.patch b/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV10/Patch/FreeRTOSV10_Amazon_Core.patch new file mode 100644 index 0000000..666a0e7 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV10/Patch/FreeRTOSV10_Amazon_Core.patch @@ -0,0 +1,308 @@ +diff -rupN org/lib/FreeRTOS/portable/GCC/ARM_CM0/port.c new/lib/FreeRTOS/portable/GCC/ARM_CM0/port.c +--- org/lib/FreeRTOS/portable/GCC/ARM_CM0/port.c 2017-11-28 13:48:34.000000000 -0800 ++++ new/lib/FreeRTOS/portable/GCC/ARM_CM0/port.c 2017-12-11 01:11:45.061429000 -0800 +@@ -333,13 +333,19 @@ void xPortSysTickHandler( void ) + uint32_t ulPreviousMask; + + ulPreviousMask = portSET_INTERRUPT_MASK_FROM_ISR(); ++ traceISR_ENTER(); + { + /* Increment the RTOS tick. */ + if( xTaskIncrementTick() != pdFALSE ) + { ++ traceISR_EXIT_TO_SCHEDULER(); + /* Pend a context switch. */ + *(portNVIC_INT_CTRL) = portNVIC_PENDSVSET; + } ++ else ++ { ++ traceISR_EXIT(); ++ } + } + portCLEAR_INTERRUPT_MASK_FROM_ISR( ulPreviousMask ); + } +diff -rupN org/lib/FreeRTOS/portable/GCC/ARM_CM0/portmacro.h new/lib/FreeRTOS/portable/GCC/ARM_CM0/portmacro.h +--- org/lib/FreeRTOS/portable/GCC/ARM_CM0/portmacro.h 2017-11-28 13:48:34.000000000 -0800 ++++ new/lib/FreeRTOS/portable/GCC/ARM_CM0/portmacro.h 2017-12-11 01:10:27.732228000 -0800 +@@ -82,7 +82,7 @@ extern void vPortYield( void ); + #define portNVIC_INT_CTRL_REG ( * ( ( volatile uint32_t * ) 0xe000ed04 ) ) + #define portNVIC_PENDSVSET_BIT ( 1UL << 28UL ) + #define portYIELD() vPortYield() +-#define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired ) portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT ++#define portEND_SWITCHING_ISR( xSwitchRequired ) { if( xSwitchRequired ) { traceISR_EXIT_TO_SCHEDULER(); portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; } else { traceISR_EXIT(); } } + #define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x ) + /*-----------------------------------------------------------*/ + +diff -rupN org/lib/FreeRTOS/portable/GCC/ARM_CM3/port.c new/lib/FreeRTOS/portable/GCC/ARM_CM3/port.c +--- org/lib/FreeRTOS/portable/GCC/ARM_CM3/port.c 2017-11-28 13:48:34.000000000 -0800 ++++ new/lib/FreeRTOS/portable/GCC/ARM_CM3/port.c 2017-12-11 01:14:50.515630000 -0800 +@@ -431,14 +431,20 @@ void xPortSysTickHandler( void ) + save and then restore the interrupt mask value as its value is already + known. */ + portDISABLE_INTERRUPTS(); ++ traceISR_ENTER(); + { + /* Increment the RTOS tick. */ + if( xTaskIncrementTick() != pdFALSE ) + { ++ traceISR_EXIT_TO_SCHEDULER(); + /* A context switch is required. Context switching is performed in + the PendSV interrupt. Pend the PendSV interrupt. */ + portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; + } ++ else ++ { ++ traceISR_EXIT(); ++ } + } + portENABLE_INTERRUPTS(); + } +diff -rupN org/lib/FreeRTOS/portable/GCC/ARM_CM3/portmacro.h new/lib/FreeRTOS/portable/GCC/ARM_CM3/portmacro.h +--- org/lib/FreeRTOS/portable/GCC/ARM_CM3/portmacro.h 2017-11-28 13:48:34.000000000 -0800 ++++ new/lib/FreeRTOS/portable/GCC/ARM_CM3/portmacro.h 2017-12-11 01:13:36.868029000 -0800 +@@ -90,7 +90,7 @@ typedef unsigned long UBaseType_t; + + #define portNVIC_INT_CTRL_REG ( * ( ( volatile uint32_t * ) 0xe000ed04 ) ) + #define portNVIC_PENDSVSET_BIT ( 1UL << 28UL ) +-#define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired != pdFALSE ) portYIELD() ++#define portEND_SWITCHING_ISR( xSwitchRequired ) { if( xSwitchRequired != pdFALSE ) { traceISR_EXIT_TO_SCHEDULER(); portYIELD() } else { traceISR_EXIT(); } } + #define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x ) + /*-----------------------------------------------------------*/ + +diff -rupN org/lib/FreeRTOS/portable/GCC/ARM_CM4F/port.c new/lib/FreeRTOS/portable/GCC/ARM_CM4F/port.c +--- org/lib/FreeRTOS/portable/GCC/ARM_CM4F/port.c 2017-11-28 13:48:34.000000000 -0800 ++++ new/lib/FreeRTOS/portable/GCC/ARM_CM4F/port.c 2017-12-11 01:16:01.771230000 -0800 +@@ -493,14 +493,20 @@ void xPortSysTickHandler( void ) + save and then restore the interrupt mask value as its value is already + known. */ + portDISABLE_INTERRUPTS(); ++ traceISR_ENTER(); + { + /* Increment the RTOS tick. */ + if( xTaskIncrementTick() != pdFALSE ) + { ++ traceISR_EXIT_TO_SCHEDULER(); + /* A context switch is required. Context switching is performed in + the PendSV interrupt. Pend the PendSV interrupt. */ + portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; + } ++ else ++ { ++ traceISR_EXIT(); ++ } + } + portENABLE_INTERRUPTS(); + } +diff -rupN org/lib/FreeRTOS/portable/GCC/ARM_CM4F/portmacro.h new/lib/FreeRTOS/portable/GCC/ARM_CM4F/portmacro.h +--- org/lib/FreeRTOS/portable/GCC/ARM_CM4F/portmacro.h 2017-11-28 13:48:34.000000000 -0800 ++++ new/lib/FreeRTOS/portable/GCC/ARM_CM4F/portmacro.h 2017-12-11 01:15:16.546830000 -0800 +@@ -90,7 +90,7 @@ typedef unsigned long UBaseType_t; + + #define portNVIC_INT_CTRL_REG ( * ( ( volatile uint32_t * ) 0xe000ed04 ) ) + #define portNVIC_PENDSVSET_BIT ( 1UL << 28UL ) +-#define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired != pdFALSE ) portYIELD() ++#define portEND_SWITCHING_ISR( xSwitchRequired ) { if( xSwitchRequired != pdFALSE ) { traceISR_EXIT_TO_SCHEDULER(); portYIELD(); } else { traceISR_EXIT(); } } + #define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x ) + /*-----------------------------------------------------------*/ + +diff -rupN org/lib/FreeRTOS/tasks.c new/lib/FreeRTOS/tasks.c +--- org/lib/FreeRTOS/tasks.c 2017-11-28 13:48:34.000000000 -0800 ++++ new/lib/FreeRTOS/tasks.c 2017-12-11 01:08:48.591428000 -0800 +@@ -237,6 +237,17 @@ count overflows. */ + taskRECORD_READY_PRIORITY( ( pxTCB )->uxPriority ); \ + vListInsertEnd( &( pxReadyTasksLists[ ( pxTCB )->uxPriority ] ), &( ( pxTCB )->xStateListItem ) ); \ + tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB ) ++ ++/* ++ * Place the task represented by pxTCB which has been in a ready list before ++ * into the appropriate ready list for the task. ++ * It is inserted at the end of the list. ++ */ ++#define prvReaddTaskToReadyList( pxTCB ) \ ++ traceREADDED_TASK_TO_READY_STATE( pxTCB ); \ ++ taskRECORD_READY_PRIORITY( ( pxTCB )->uxPriority ); \ ++ vListInsertEnd( &( pxReadyTasksLists[ ( pxTCB )->uxPriority ] ), &( ( pxTCB )->xStateListItem ) ); \ ++ tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB ) + /*-----------------------------------------------------------*/ + + /* +@@ -1598,7 +1609,7 @@ static void prvAddNewTaskToReadyList( TC + { + mtCOVERAGE_TEST_MARKER(); + } +- prvAddTaskToReadyList( pxTCB ); ++ prvReaddTaskToReadyList( pxTCB ); + } + else + { +@@ -1659,7 +1670,7 @@ static void prvAddNewTaskToReadyList( TC + { + mtCOVERAGE_TEST_MARKER(); + } +- ++ traceMOVED_TASK_TO_SUSPENDED_LIST(pxTCB); + vListInsertEnd( &xSuspendedTaskList, &( pxTCB->xStateListItem ) ); + + #if( configUSE_TASK_NOTIFICATIONS == 1 ) +@@ -3671,6 +3682,20 @@ static void prvCheckTasksWaitingTerminat + #endif /* INCLUDE_uxTaskGetStackHighWaterMark */ + /*-----------------------------------------------------------*/ + ++#if (INCLUDE_pxTaskGetStackStart == 1) ++ uint8_t* pxTaskGetStackStart( TaskHandle_t xTask) ++ { ++ TCB_t *pxTCB; ++ UBaseType_t uxReturn; ++ (void)uxReturn; ++ ++ pxTCB = prvGetTCBFromHandle( xTask ); ++ return ( uint8_t * ) pxTCB->pxStack; ++ } ++ ++#endif /* INCLUDE_pxTaskGetStackStart */ ++/*-----------------------------------------------------------*/ ++ + #if ( INCLUDE_vTaskDelete == 1 ) + + static void prvDeleteTCB( TCB_t *pxTCB ) +@@ -3840,7 +3865,7 @@ TCB_t *pxTCB; + + /* Inherit the priority before being moved into the new list. */ + pxMutexHolderTCB->uxPriority = pxCurrentTCB->uxPriority; +- prvAddTaskToReadyList( pxMutexHolderTCB ); ++ prvReaddTaskToReadyList( pxMutexHolderTCB ); + } + else + { +@@ -3930,7 +3955,7 @@ TCB_t *pxTCB; + any other purpose if this task is running, and it must be + running to give back the mutex. */ + listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) pxTCB->uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ +- prvAddTaskToReadyList( pxTCB ); ++ prvReaddTaskToReadyList( pxTCB ); + + /* Return true to indicate that a context switch is required. + This is only actually required in the corner case whereby +@@ -4940,6 +4965,7 @@ const TickType_t xConstTickCount = xTick + /* Add the task to the suspended task list instead of a delayed task + list to ensure it is not woken by a timing event. It will block + indefinitely. */ ++ traceMOVED_TASK_TO_SUSPENDED_LIST(pxCurrentTCB); + vListInsertEnd( &xSuspendedTaskList, &( pxCurrentTCB->xStateListItem ) ); + } + else +@@ -4956,12 +4982,14 @@ const TickType_t xConstTickCount = xTick + { + /* Wake time has overflowed. Place this item in the overflow + list. */ ++ traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST(); + vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); + } + else + { + /* The wake time has not overflowed, so the current block list + is used. */ ++ traceMOVED_TASK_TO_DELAYED_LIST(); + vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); + + /* If the task entering the blocked state was placed at the +@@ -4991,11 +5019,13 @@ const TickType_t xConstTickCount = xTick + if( xTimeToWake < xConstTickCount ) + { + /* Wake time has overflowed. Place this item in the overflow list. */ ++ traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST(); + vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); + } + else + { + /* The wake time has not overflowed, so the current block list is used. */ ++ traceMOVED_TASK_TO_DELAYED_LIST(); + vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); + + /* If the task entering the blocked state was placed at the head of the +diff -rupN org/lib/include/FreeRTOS.h new/lib/include/FreeRTOS.h +--- org/lib/include/FreeRTOS.h 2017-11-28 13:48:34.000000000 -0800 ++++ new/lib/include/FreeRTOS.h 2017-12-11 00:54:49.522222000 -0800 +@@ -157,6 +157,10 @@ extern "C" { + #define INCLUDE_uxTaskGetStackHighWaterMark 0 + #endif + ++#ifndef INCLUDE_pxTaskGetStackStart ++ #define INCLUDE_pxTaskGetStackStart 0 ++#endif ++ + #ifndef INCLUDE_eTaskGetState + #define INCLUDE_eTaskGetState 0 + #endif +@@ -393,6 +397,23 @@ extern "C" { + #define tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB ) + #endif + ++#ifndef traceREADDED_TASK_TO_READY_STATE ++ #define traceREADDED_TASK_TO_READY_STATE( pxTCB ) traceMOVED_TASK_TO_READY_STATE( pxTCB ) ++#endif ++ ++#ifndef traceMOVED_TASK_TO_DELAYED_LIST ++ #define traceMOVED_TASK_TO_DELAYED_LIST() ++#endif ++ ++#ifndef traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST ++ #define traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST() ++#endif ++ ++#ifndef traceMOVED_TASK_TO_SUSPENDED_LIST ++ #define traceMOVED_TASK_TO_SUSPENDED_LIST( pxTCB ) ++#endif ++ ++ + #ifndef traceQUEUE_CREATE + #define traceQUEUE_CREATE( pxNewQueue ) + #endif +@@ -637,6 +658,18 @@ extern "C" { + #define traceTASK_NOTIFY_GIVE_FROM_ISR() + #endif + ++#ifndef traceISR_EXIT_TO_SCHEDULER ++ #define traceISR_EXIT_TO_SCHEDULER() ++#endif ++ ++#ifndef traceISR_EXIT ++ #define traceISR_EXIT() ++#endif ++ ++#ifndef traceISR_ENTER ++ #define traceISR_ENTER() ++#endif ++ + #ifndef traceSTREAM_BUFFER_CREATE_FAILED + #define traceSTREAM_BUFFER_CREATE_FAILED( xIsMessageBuffer ) + #endif +diff -rupN org/lib/include/task.h new/lib/include/task.h +--- org/lib/include/task.h 2017-11-28 13:48:34.000000000 -0800 ++++ new/lib/include/task.h 2017-12-11 00:56:29.783423000 -0800 +@@ -1422,6 +1422,25 @@ TaskHandle_t xTaskGetHandle( const char + */ + UBaseType_t uxTaskGetStackHighWaterMark( TaskHandle_t xTask ) PRIVILEGED_FUNCTION; + ++/** ++ * task.h ++ *
uint8_t* pxTaskGetStackStart( TaskHandle_t xTask);
++ * ++ * INCLUDE_pxTaskGetStackStart must be set to 1 in FreeRTOSConfig.h for ++ * this function to be available. ++ * ++ * Returns the start of the stack associated with xTask. That is, ++ * the highest stack memory address on architectures where the stack grows down ++ * from high memory, and the lowest memory address on architectures where the ++ * stack grows up from low memory. ++ * ++ * @param xTask Handle of the task associated with the stack returned. ++ * Set xTask to NULL to return the stack of the calling task. ++ * ++ * @return A pointer to the start of the stack. ++ */ ++uint8_t* pxTaskGetStackStart( TaskHandle_t xTask) PRIVILEGED_FUNCTION; ++ + /* When using trace macros it is sometimes necessary to include task.h before + FreeRTOS.h. When this is done TaskHookFunction_t will not yet have been defined, + so the following two prototypes will cause a compilation error. This can be diff --git a/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV10/Patch/FreeRTOSV10_Core.patch b/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV10/Patch/FreeRTOSV10_Core.patch new file mode 100644 index 0000000..b8ba356 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV10/Patch/FreeRTOSV10_Core.patch @@ -0,0 +1,308 @@ +diff -rupN org/Source/include/FreeRTOS.h new/Source/include/FreeRTOS.h +--- org/Source/include/FreeRTOS.h 2017-11-28 13:48:34.000000000 -0800 ++++ new/Source/include/FreeRTOS.h 2017-12-11 00:54:49.522222000 -0800 +@@ -157,6 +157,10 @@ extern "C" { + #define INCLUDE_uxTaskGetStackHighWaterMark 0 + #endif + ++#ifndef INCLUDE_pxTaskGetStackStart ++ #define INCLUDE_pxTaskGetStackStart 0 ++#endif ++ + #ifndef INCLUDE_eTaskGetState + #define INCLUDE_eTaskGetState 0 + #endif +@@ -393,6 +397,23 @@ extern "C" { + #define tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB ) + #endif + ++#ifndef traceREADDED_TASK_TO_READY_STATE ++ #define traceREADDED_TASK_TO_READY_STATE( pxTCB ) traceMOVED_TASK_TO_READY_STATE( pxTCB ) ++#endif ++ ++#ifndef traceMOVED_TASK_TO_DELAYED_LIST ++ #define traceMOVED_TASK_TO_DELAYED_LIST() ++#endif ++ ++#ifndef traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST ++ #define traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST() ++#endif ++ ++#ifndef traceMOVED_TASK_TO_SUSPENDED_LIST ++ #define traceMOVED_TASK_TO_SUSPENDED_LIST( pxTCB ) ++#endif ++ ++ + #ifndef traceQUEUE_CREATE + #define traceQUEUE_CREATE( pxNewQueue ) + #endif +@@ -637,6 +658,18 @@ extern "C" { + #define traceTASK_NOTIFY_GIVE_FROM_ISR() + #endif + ++#ifndef traceISR_EXIT_TO_SCHEDULER ++ #define traceISR_EXIT_TO_SCHEDULER() ++#endif ++ ++#ifndef traceISR_EXIT ++ #define traceISR_EXIT() ++#endif ++ ++#ifndef traceISR_ENTER ++ #define traceISR_ENTER() ++#endif ++ + #ifndef traceSTREAM_BUFFER_CREATE_FAILED + #define traceSTREAM_BUFFER_CREATE_FAILED( xIsMessageBuffer ) + #endif +diff -rupN org/Source/include/task.h new/Source/include/task.h +--- org/Source/include/task.h 2017-11-28 13:48:34.000000000 -0800 ++++ new/Source/include/task.h 2017-12-11 00:56:29.783423000 -0800 +@@ -1422,6 +1422,25 @@ TaskHandle_t xTaskGetHandle( const char + */ + UBaseType_t uxTaskGetStackHighWaterMark( TaskHandle_t xTask ) PRIVILEGED_FUNCTION; + ++/** ++ * task.h ++ *
uint8_t* pxTaskGetStackStart( TaskHandle_t xTask);
++ * ++ * INCLUDE_pxTaskGetStackStart must be set to 1 in FreeRTOSConfig.h for ++ * this function to be available. ++ * ++ * Returns the start of the stack associated with xTask. That is, ++ * the highest stack memory address on architectures where the stack grows down ++ * from high memory, and the lowest memory address on architectures where the ++ * stack grows up from low memory. ++ * ++ * @param xTask Handle of the task associated with the stack returned. ++ * Set xTask to NULL to return the stack of the calling task. ++ * ++ * @return A pointer to the start of the stack. ++ */ ++uint8_t* pxTaskGetStackStart( TaskHandle_t xTask) PRIVILEGED_FUNCTION; ++ + /* When using trace macros it is sometimes necessary to include task.h before + FreeRTOS.h. When this is done TaskHookFunction_t will not yet have been defined, + so the following two prototypes will cause a compilation error. This can be +diff -rupN org/Source/portable/GCC/ARM_CM0/port.c new/Source/portable/GCC/ARM_CM0/port.c +--- org/Source/portable/GCC/ARM_CM0/port.c 2017-11-28 13:48:34.000000000 -0800 ++++ new/Source/portable/GCC/ARM_CM0/port.c 2017-12-11 01:11:45.061429000 -0800 +@@ -333,13 +333,19 @@ void xPortSysTickHandler( void ) + uint32_t ulPreviousMask; + + ulPreviousMask = portSET_INTERRUPT_MASK_FROM_ISR(); ++ traceISR_ENTER(); + { + /* Increment the RTOS tick. */ + if( xTaskIncrementTick() != pdFALSE ) + { ++ traceISR_EXIT_TO_SCHEDULER(); + /* Pend a context switch. */ + *(portNVIC_INT_CTRL) = portNVIC_PENDSVSET; + } ++ else ++ { ++ traceISR_EXIT(); ++ } + } + portCLEAR_INTERRUPT_MASK_FROM_ISR( ulPreviousMask ); + } +diff -rupN org/Source/portable/GCC/ARM_CM0/portmacro.h new/Source/portable/GCC/ARM_CM0/portmacro.h +--- org/Source/portable/GCC/ARM_CM0/portmacro.h 2017-11-28 13:48:34.000000000 -0800 ++++ new/Source/portable/GCC/ARM_CM0/portmacro.h 2017-12-11 01:10:27.732228000 -0800 +@@ -82,7 +82,7 @@ extern void vPortYield( void ); + #define portNVIC_INT_CTRL_REG ( * ( ( volatile uint32_t * ) 0xe000ed04 ) ) + #define portNVIC_PENDSVSET_BIT ( 1UL << 28UL ) + #define portYIELD() vPortYield() +-#define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired ) portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT ++#define portEND_SWITCHING_ISR( xSwitchRequired ) { if( xSwitchRequired ) { traceISR_EXIT_TO_SCHEDULER(); portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; } else { traceISR_EXIT(); } } + #define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x ) + /*-----------------------------------------------------------*/ + +diff -rupN org/Source/portable/GCC/ARM_CM3/port.c new/Source/portable/GCC/ARM_CM3/port.c +--- org/Source/portable/GCC/ARM_CM3/port.c 2017-11-28 13:48:34.000000000 -0800 ++++ new/Source/portable/GCC/ARM_CM3/port.c 2017-12-11 01:14:50.515630000 -0800 +@@ -431,14 +431,20 @@ void xPortSysTickHandler( void ) + save and then restore the interrupt mask value as its value is already + known. */ + portDISABLE_INTERRUPTS(); ++ traceISR_ENTER(); + { + /* Increment the RTOS tick. */ + if( xTaskIncrementTick() != pdFALSE ) + { ++ traceISR_EXIT_TO_SCHEDULER(); + /* A context switch is required. Context switching is performed in + the PendSV interrupt. Pend the PendSV interrupt. */ + portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; + } ++ else ++ { ++ traceISR_EXIT(); ++ } + } + portENABLE_INTERRUPTS(); + } +diff -rupN org/Source/portable/GCC/ARM_CM3/portmacro.h new/Source/portable/GCC/ARM_CM3/portmacro.h +--- org/Source/portable/GCC/ARM_CM3/portmacro.h 2017-11-28 13:48:34.000000000 -0800 ++++ new/Source/portable/GCC/ARM_CM3/portmacro.h 2017-12-11 01:13:36.868029000 -0800 +@@ -90,7 +90,7 @@ typedef unsigned long UBaseType_t; + + #define portNVIC_INT_CTRL_REG ( * ( ( volatile uint32_t * ) 0xe000ed04 ) ) + #define portNVIC_PENDSVSET_BIT ( 1UL << 28UL ) +-#define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired != pdFALSE ) portYIELD() ++#define portEND_SWITCHING_ISR( xSwitchRequired ) { if( xSwitchRequired != pdFALSE ) { traceISR_EXIT_TO_SCHEDULER(); portYIELD() } else { traceISR_EXIT(); } } + #define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x ) + /*-----------------------------------------------------------*/ + +diff -rupN org/Source/portable/GCC/ARM_CM4F/port.c new/Source/portable/GCC/ARM_CM4F/port.c +--- org/Source/portable/GCC/ARM_CM4F/port.c 2017-11-28 13:48:34.000000000 -0800 ++++ new/Source/portable/GCC/ARM_CM4F/port.c 2017-12-11 01:16:01.771230000 -0800 +@@ -493,14 +493,20 @@ void xPortSysTickHandler( void ) + save and then restore the interrupt mask value as its value is already + known. */ + portDISABLE_INTERRUPTS(); ++ traceISR_ENTER(); + { + /* Increment the RTOS tick. */ + if( xTaskIncrementTick() != pdFALSE ) + { ++ traceISR_EXIT_TO_SCHEDULER(); + /* A context switch is required. Context switching is performed in + the PendSV interrupt. Pend the PendSV interrupt. */ + portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; + } ++ else ++ { ++ traceISR_EXIT(); ++ } + } + portENABLE_INTERRUPTS(); + } +diff -rupN org/Source/portable/GCC/ARM_CM4F/portmacro.h new/Source/portable/GCC/ARM_CM4F/portmacro.h +--- org/Source/portable/GCC/ARM_CM4F/portmacro.h 2017-11-28 13:48:34.000000000 -0800 ++++ new/Source/portable/GCC/ARM_CM4F/portmacro.h 2017-12-11 01:15:16.546830000 -0800 +@@ -90,7 +90,7 @@ typedef unsigned long UBaseType_t; + + #define portNVIC_INT_CTRL_REG ( * ( ( volatile uint32_t * ) 0xe000ed04 ) ) + #define portNVIC_PENDSVSET_BIT ( 1UL << 28UL ) +-#define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired != pdFALSE ) portYIELD() ++#define portEND_SWITCHING_ISR( xSwitchRequired ) { if( xSwitchRequired != pdFALSE ) { traceISR_EXIT_TO_SCHEDULER(); portYIELD(); } else { traceISR_EXIT(); } } + #define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x ) + /*-----------------------------------------------------------*/ + +diff -rupN org/Source/tasks.c new/Source/tasks.c +--- org/Source/tasks.c 2017-11-28 13:48:34.000000000 -0800 ++++ new/Source/tasks.c 2017-12-11 01:08:48.591428000 -0800 +@@ -237,6 +237,17 @@ count overflows. */ + taskRECORD_READY_PRIORITY( ( pxTCB )->uxPriority ); \ + vListInsertEnd( &( pxReadyTasksLists[ ( pxTCB )->uxPriority ] ), &( ( pxTCB )->xStateListItem ) ); \ + tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB ) ++ ++/* ++ * Place the task represented by pxTCB which has been in a ready list before ++ * into the appropriate ready list for the task. ++ * It is inserted at the end of the list. ++ */ ++#define prvReaddTaskToReadyList( pxTCB ) \ ++ traceREADDED_TASK_TO_READY_STATE( pxTCB ); \ ++ taskRECORD_READY_PRIORITY( ( pxTCB )->uxPriority ); \ ++ vListInsertEnd( &( pxReadyTasksLists[ ( pxTCB )->uxPriority ] ), &( ( pxTCB )->xStateListItem ) ); \ ++ tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB ) + /*-----------------------------------------------------------*/ + + /* +@@ -1598,7 +1609,7 @@ static void prvAddNewTaskToReadyList( TC + { + mtCOVERAGE_TEST_MARKER(); + } +- prvAddTaskToReadyList( pxTCB ); ++ prvReaddTaskToReadyList( pxTCB ); + } + else + { +@@ -1659,7 +1670,7 @@ static void prvAddNewTaskToReadyList( TC + { + mtCOVERAGE_TEST_MARKER(); + } +- ++ traceMOVED_TASK_TO_SUSPENDED_LIST(pxTCB); + vListInsertEnd( &xSuspendedTaskList, &( pxTCB->xStateListItem ) ); + + #if( configUSE_TASK_NOTIFICATIONS == 1 ) +@@ -3671,6 +3682,20 @@ static void prvCheckTasksWaitingTerminat + #endif /* INCLUDE_uxTaskGetStackHighWaterMark */ + /*-----------------------------------------------------------*/ + ++#if (INCLUDE_pxTaskGetStackStart == 1) ++ uint8_t* pxTaskGetStackStart( TaskHandle_t xTask) ++ { ++ TCB_t *pxTCB; ++ UBaseType_t uxReturn; ++ (void)uxReturn; ++ ++ pxTCB = prvGetTCBFromHandle( xTask ); ++ return ( uint8_t * ) pxTCB->pxStack; ++ } ++ ++#endif /* INCLUDE_pxTaskGetStackStart */ ++/*-----------------------------------------------------------*/ ++ + #if ( INCLUDE_vTaskDelete == 1 ) + + static void prvDeleteTCB( TCB_t *pxTCB ) +@@ -3840,7 +3865,7 @@ TCB_t *pxTCB; + + /* Inherit the priority before being moved into the new list. */ + pxMutexHolderTCB->uxPriority = pxCurrentTCB->uxPriority; +- prvAddTaskToReadyList( pxMutexHolderTCB ); ++ prvReaddTaskToReadyList( pxMutexHolderTCB ); + } + else + { +@@ -3930,7 +3955,7 @@ TCB_t *pxTCB; + any other purpose if this task is running, and it must be + running to give back the mutex. */ + listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) pxTCB->uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ +- prvAddTaskToReadyList( pxTCB ); ++ prvReaddTaskToReadyList( pxTCB ); + + /* Return true to indicate that a context switch is required. + This is only actually required in the corner case whereby +@@ -4940,6 +4965,7 @@ const TickType_t xConstTickCount = xTick + /* Add the task to the suspended task list instead of a delayed task + list to ensure it is not woken by a timing event. It will block + indefinitely. */ ++ traceMOVED_TASK_TO_SUSPENDED_LIST(pxCurrentTCB); + vListInsertEnd( &xSuspendedTaskList, &( pxCurrentTCB->xStateListItem ) ); + } + else +@@ -4956,12 +4982,14 @@ const TickType_t xConstTickCount = xTick + { + /* Wake time has overflowed. Place this item in the overflow + list. */ ++ traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST(); + vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); + } + else + { + /* The wake time has not overflowed, so the current block list + is used. */ ++ traceMOVED_TASK_TO_DELAYED_LIST(); + vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); + + /* If the task entering the blocked state was placed at the +@@ -4991,11 +5019,13 @@ const TickType_t xConstTickCount = xTick + if( xTimeToWake < xConstTickCount ) + { + /* Wake time has overflowed. Place this item in the overflow list. */ ++ traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST(); + vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); + } + else + { + /* The wake time has not overflowed, so the current block list is used. */ ++ traceMOVED_TASK_TO_DELAYED_LIST(); + vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); + + /* If the task entering the blocked state was placed at the head of the diff --git a/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV10/SEGGER_SYSVIEW_FreeRTOS.c b/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV10/SEGGER_SYSVIEW_FreeRTOS.c new file mode 100644 index 0000000..bc7cd91 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV10/SEGGER_SYSVIEW_FreeRTOS.c @@ -0,0 +1,252 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_FreeRTOS.c +Purpose : Interface between FreeRTOS and SystemView. +Revision: $Rev: 7947 $ +*/ +#include "FreeRTOS.h" +#include "task.h" +#include "SEGGER_SYSVIEW.h" +#include "SEGGER_SYSVIEW_FreeRTOS.h" +#include "string.h" // Required for memset + + + +typedef struct SYSVIEW_FREERTOS_TASK_STATUS SYSVIEW_FREERTOS_TASK_STATUS; + +struct SYSVIEW_FREERTOS_TASK_STATUS { + U32 xHandle; + const char* pcTaskName; + unsigned uxCurrentPriority; + U32 pxStack; + unsigned uStackHighWaterMark; +}; + +static SYSVIEW_FREERTOS_TASK_STATUS _aTasks[SYSVIEW_FREERTOS_MAX_NOF_TASKS]; +static unsigned _NumTasks; + +/********************************************************************* +* +* _cbSendTaskList() +* +* Function description +* This function is part of the link between FreeRTOS and SYSVIEW. +* Called from SystemView when asked by the host, it uses SYSVIEW +* functions to send the entire task list to the host. +*/ +static void _cbSendTaskList(void) { + unsigned n; + + for (n = 0; n < _NumTasks; n++) { +#if INCLUDE_uxTaskGetStackHighWaterMark // Report Task Stack High Watermark + _aTasks[n].uStackHighWaterMark = uxTaskGetStackHighWaterMark((TaskHandle_t)_aTasks[n].xHandle); +#endif + SYSVIEW_SendTaskInfo((U32)_aTasks[n].xHandle, _aTasks[n].pcTaskName, (unsigned)_aTasks[n].uxCurrentPriority, (U32)_aTasks[n].pxStack, (unsigned)_aTasks[n].uStackHighWaterMark); + } +} + +/********************************************************************* +* +* _cbGetTime() +* +* Function description +* This function is part of the link between FreeRTOS and SYSVIEW. +* Called from SystemView when asked by the host, returns the +* current system time in micro seconds. +*/ +static U64 _cbGetTime(void) { + U64 Time; + + Time = xTaskGetTickCountFromISR(); + Time *= portTICK_PERIOD_MS; + Time *= 1000; + return Time; +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +/********************************************************************* +* +* SYSVIEW_AddTask() +* +* Function description +* Add a task to the internal list and record its information. +*/ +void SYSVIEW_AddTask(U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark) { + + if (memcmp(pcTaskName, "IDLE", 5) == 0) { + return; + } + + if (_NumTasks >= SYSVIEW_FREERTOS_MAX_NOF_TASKS) { + SEGGER_SYSVIEW_Warn("SYSTEMVIEW: Could not record task information. Maximum number of tasks reached."); + return; + } + + _aTasks[_NumTasks].xHandle = xHandle; + _aTasks[_NumTasks].pcTaskName = pcTaskName; + _aTasks[_NumTasks].uxCurrentPriority = uxCurrentPriority; + _aTasks[_NumTasks].pxStack = pxStack; + _aTasks[_NumTasks].uStackHighWaterMark = uStackHighWaterMark; + + _NumTasks++; + + SYSVIEW_SendTaskInfo(xHandle, pcTaskName,uxCurrentPriority, pxStack, uStackHighWaterMark); + +} + +/********************************************************************* +* +* SYSVIEW_UpdateTask() +* +* Function description +* Update a task in the internal list and record its information. +*/ +void SYSVIEW_UpdateTask(U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark) { + unsigned n; + + if (memcmp(pcTaskName, "IDLE", 5) == 0) { + return; + } + + for (n = 0; n < _NumTasks; n++) { + if (_aTasks[n].xHandle == xHandle) { + break; + } + } + if (n < _NumTasks) { + _aTasks[n].pcTaskName = pcTaskName; + _aTasks[n].uxCurrentPriority = uxCurrentPriority; + _aTasks[n].pxStack = pxStack; + _aTasks[n].uStackHighWaterMark = uStackHighWaterMark; + + SYSVIEW_SendTaskInfo(xHandle, pcTaskName, uxCurrentPriority, pxStack, uStackHighWaterMark); + } else { + SYSVIEW_AddTask(xHandle, pcTaskName, uxCurrentPriority, pxStack, uStackHighWaterMark); + } +} + +/********************************************************************* +* +* SYSVIEW_DeleteTask() +* +* Function description +* Delete a task from the internal list. +*/ +void SYSVIEW_DeleteTask(U32 xHandle) { + unsigned n; + + if (_NumTasks == 0) { + return; // Early out + } + for (n = 0; n < _NumTasks; n++) { + if (_aTasks[n].xHandle == xHandle) { + break; + } + } + if (n == (_NumTasks - 1)) { + // + // Task is last item in list. + // Simply zero the item and decrement number of tasks. + // + memset(&_aTasks[n], 0, sizeof(_aTasks[n])); + _NumTasks--; + } else if (n < _NumTasks) { + // + // Task is in the middle of the list. + // Move last item to current position and decrement number of tasks. + // Order of tasks does not really matter, so no need to move all following items. + // + _aTasks[n].xHandle = _aTasks[_NumTasks - 1].xHandle; + _aTasks[n].pcTaskName = _aTasks[_NumTasks - 1].pcTaskName; + _aTasks[n].uxCurrentPriority = _aTasks[_NumTasks - 1].uxCurrentPriority; + _aTasks[n].pxStack = _aTasks[_NumTasks - 1].pxStack; + _aTasks[n].uStackHighWaterMark = _aTasks[_NumTasks - 1].uStackHighWaterMark; + memset(&_aTasks[_NumTasks - 1], 0, sizeof(_aTasks[_NumTasks - 1])); + _NumTasks--; + } +} + +/********************************************************************* +* +* SYSVIEW_SendTaskInfo() +* +* Function description +* Record task information. +*/ +void SYSVIEW_SendTaskInfo(U32 TaskID, const char* sName, unsigned Prio, U32 StackBase, unsigned StackSize) { + SEGGER_SYSVIEW_TASKINFO TaskInfo; + + memset(&TaskInfo, 0, sizeof(TaskInfo)); // Fill all elements with 0 to allow extending the structure in future version without breaking the code + TaskInfo.TaskID = TaskID; + TaskInfo.sName = sName; + TaskInfo.Prio = Prio; + TaskInfo.StackBase = StackBase; + TaskInfo.StackSize = StackSize; + SEGGER_SYSVIEW_SendTaskInfo(&TaskInfo); +} + +/********************************************************************* +* +* Public API structures +* +********************************************************************** +*/ +// Callbacks provided to SYSTEMVIEW by FreeRTOS +const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI = { + _cbGetTime, + _cbSendTaskList, +}; + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV10/SEGGER_SYSVIEW_FreeRTOS.h b/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV10/SEGGER_SYSVIEW_FreeRTOS.h new file mode 100644 index 0000000..490b1b5 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV10/SEGGER_SYSVIEW_FreeRTOS.h @@ -0,0 +1,330 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_FreeRTOS.h +Purpose : Interface between FreeRTOS and SystemView. +Revision: $Rev: 7745 $ + +Notes: + (1) Include this file at the end of FreeRTOSConfig.h +*/ + +#ifndef SYSVIEW_FREERTOS_H +#define SYSVIEW_FREERTOS_H + +#include "SEGGER_SYSVIEW.h" + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ +#ifndef portSTACK_GROWTH + #define portSTACK_GROWTH ( -1 ) +#endif + +#define SYSVIEW_FREERTOS_MAX_NOF_TASKS 8 + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ +#define apiID_OFFSET (32u) + +#define apiID_VTASKALLOCATEMPUREGIONS (1u) +#define apiID_VTASKDELETE (2u) +#define apiID_VTASKDELAY (3u) +#define apiID_VTASKDELAYUNTIL (4u) +#define apiID_UXTASKPRIORITYGET (5u) +#define apiID_UXTASKPRIORITYGETFROMISR (6u) +#define apiID_ETASKGETSTATE (7u) +#define apiID_VTASKPRIORITYSET (8u) +#define apiID_VTASKSUSPEND (9u) +#define apiID_VTASKRESUME (10u) +#define apiID_XTASKRESUMEFROMISR (11u) +#define apiID_VTASKSTARTSCHEDULER (12u) +#define apiID_VTASKENDSCHEDULER (13u) +#define apiID_VTASKSUSPENDALL (14u) +#define apiID_XTASKRESUMEALL (15u) +#define apiID_XTASKGETTICKCOUNT (16u) +#define apiID_XTASKGETTICKCOUNTFROMISR (17u) +#define apiID_UXTASKGETNUMBEROFTASKS (18u) +#define apiID_PCTASKGETTASKNAME (19u) +#define apiID_UXTASKGETSTACKHIGHWATERMARK (20u) +#define apiID_VTASKSETAPPLICATIONTASKTAG (21u) +#define apiID_XTASKGETAPPLICATIONTASKTAG (22u) +#define apiID_VTASKSETTHREADLOCALSTORAGEPOINTER (23u) +#define apiID_PVTASKGETTHREADLOCALSTORAGEPOINTER (24u) +#define apiID_XTASKCALLAPPLICATIONTASKHOOK (25u) +#define apiID_XTASKGETIDLETASKHANDLE (26u) +#define apiID_UXTASKGETSYSTEMSTATE (27u) +#define apiID_VTASKLIST (28u) +#define apiID_VTASKGETRUNTIMESTATS (29u) +#define apiID_XTASKGENERICNOTIFY (30u) +#define apiID_XTASKGENERICNOTIFYFROMISR (31u) +#define apiID_XTASKNOTIFYWAIT (32u) +#define apiID_VTASKNOTIFYGIVEFROMISR (33u) +#define apiID_ULTASKNOTIFYTAKE (34u) +#define apiID_XTASKNOTIFYSTATECLEAR (35u) +#define apiID_XTASKGETCURRENTTASKHANDLE (36u) +#define apiID_VTASKSETTIMEOUTSTATE (37u) +#define apiID_XTASKCHECKFORTIMEOUT (38u) +#define apiID_VTASKMISSEDYIELD (39u) +#define apiID_XTASKGETSCHEDULERSTATE (40u) +#define apiID_VTASKPRIORITYINHERIT (41u) +#define apiID_XTASKPRIORITYDISINHERIT (42u) +#define apiID_XTASKGENERICCREATE (43u) +#define apiID_UXTASKGETTASKNUMBER (44u) +#define apiID_VTASKSETTASKNUMBER (45u) +#define apiID_VTASKSTEPTICK (46u) +#define apiID_ETASKCONFIRMSLEEPMODESTATUS (47u) +#define apiID_XTIMERCREATE (48u) +#define apiID_PVTIMERGETTIMERID (49u) +#define apiID_VTIMERSETTIMERID (50u) +#define apiID_XTIMERISTIMERACTIVE (51u) +#define apiID_XTIMERGETTIMERDAEMONTASKHANDLE (52u) +#define apiID_XTIMERPENDFUNCTIONCALLFROMISR (53u) +#define apiID_XTIMERPENDFUNCTIONCALL (54u) +#define apiID_PCTIMERGETTIMERNAME (55u) +#define apiID_XTIMERCREATETIMERTASK (56u) +#define apiID_XTIMERGENERICCOMMAND (57u) +#define apiID_XQUEUEGENERICSEND (58u) +#define apiID_XQUEUEPEEKFROMISR (59u) +#define apiID_XQUEUEGENERICRECEIVE (60u) +#define apiID_UXQUEUEMESSAGESWAITING (61u) +#define apiID_UXQUEUESPACESAVAILABLE (62u) +#define apiID_VQUEUEDELETE (63u) +#define apiID_XQUEUEGENERICSENDFROMISR (64u) +#define apiID_XQUEUEGIVEFROMISR (65u) +#define apiID_XQUEUERECEIVEFROMISR (66u) +#define apiID_XQUEUEISQUEUEEMPTYFROMISR (67u) +#define apiID_XQUEUEISQUEUEFULLFROMISR (68u) +#define apiID_UXQUEUEMESSAGESWAITINGFROMISR (69u) +#define apiID_XQUEUEALTGENERICSEND (70u) +#define apiID_XQUEUEALTGENERICRECEIVE (71u) +#define apiID_XQUEUECRSENDFROMISR (72u) +#define apiID_XQUEUECRRECEIVEFROMISR (73u) +#define apiID_XQUEUECRSEND (74u) +#define apiID_XQUEUECRRECEIVE (75u) +#define apiID_XQUEUECREATEMUTEX (76u) +#define apiID_XQUEUECREATECOUNTINGSEMAPHORE (77u) +#define apiID_XQUEUEGETMUTEXHOLDER (78u) +#define apiID_XQUEUETAKEMUTEXRECURSIVE (79u) +#define apiID_XQUEUEGIVEMUTEXRECURSIVE (80u) +#define apiID_VQUEUEADDTOREGISTRY (81u) +#define apiID_VQUEUEUNREGISTERQUEUE (82u) +#define apiID_XQUEUEGENERICCREATE (83u) +#define apiID_XQUEUECREATESET (84u) +#define apiID_XQUEUEADDTOSET (85u) +#define apiID_XQUEUEREMOVEFROMSET (86u) +#define apiID_XQUEUESELECTFROMSET (87u) +#define apiID_XQUEUESELECTFROMSETFROMISR (88u) +#define apiID_XQUEUEGENERICRESET (89u) +#define apiID_VLISTINITIALISE (90u) +#define apiID_VLISTINITIALISEITEM (91u) +#define apiID_VLISTINSERT (92u) +#define apiID_VLISTINSERTEND (93u) +#define apiID_UXLISTREMOVE (94u) +#define apiID_XEVENTGROUPCREATE (95u) +#define apiID_XEVENTGROUPWAITBITS (96u) +#define apiID_XEVENTGROUPCLEARBITS (97u) +#define apiID_XEVENTGROUPCLEARBITSFROMISR (98u) +#define apiID_XEVENTGROUPSETBITS (99u) +#define apiID_XEVENTGROUPSETBITSFROMISR (100u) +#define apiID_XEVENTGROUPSYNC (101u) +#define apiID_XEVENTGROUPGETBITSFROMISR (102u) +#define apiID_VEVENTGROUPDELETE (103u) +#define apiID_UXEVENTGROUPGETNUMBER (104u) +#define apiID_XSTREAMBUFFERCREATE (105u) +#define apiID_VSTREAMBUFFERDELETE (106u) +#define apiID_XSTREAMBUFFERRESET (107u) +#define apiID_XSTREAMBUFFERSEND (108u) +#define apiID_XSTREAMBUFFERSENDFROMISR (109u) +#define apiID_XSTREAMBUFFERRECEIVE (110u) +#define apiID_XSTREAMBUFFERRECEIVEFROMISR (111u) + +#define traceTASK_NOTIFY_TAKE() SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_ULTASKNOTIFYTAKE, xClearCountOnExit, xTicksToWait) +#define traceTASK_DELAY() SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_VTASKDELAY, xTicksToDelay) +#define traceTASK_DELAY_UNTIL(xTimeToWake) SEGGER_SYSVIEW_RecordVoid (apiID_OFFSET + apiID_VTASKDELAYUNTIL) +#define traceTASK_NOTIFY_GIVE_FROM_ISR() SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_VTASKNOTIFYGIVEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB), (U32)pxHigherPriorityTaskWoken) +#define traceTASK_PRIORITY_INHERIT( pxTCB, uxPriority ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_VTASKPRIORITYINHERIT, (U32)pxMutexHolder) +#define traceTASK_RESUME( pxTCB ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_VTASKRESUME, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB)) +#define traceINCREASE_TICK_COUNT( xTicksToJump ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_VTASKSTEPTICK, xTicksToJump) +#define traceTASK_SUSPEND( pxTCB ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_VTASKSUSPEND, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB)) +#define traceTASK_PRIORITY_DISINHERIT( pxTCB, uxBasePriority ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_XTASKPRIORITYDISINHERIT, (U32)pxMutexHolder) +#define traceTASK_RESUME_FROM_ISR( pxTCB ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_XTASKRESUMEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB)) +#define traceTASK_NOTIFY() SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XTASKGENERICNOTIFY, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB), ulValue, eAction, (U32)pulPreviousNotificationValue) +#define traceTASK_NOTIFY_FROM_ISR() SEGGER_SYSVIEW_RecordU32x5(apiID_OFFSET + apiID_XTASKGENERICNOTIFYFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB), ulValue, eAction, (U32)pulPreviousNotificationValue, (U32)pxHigherPriorityTaskWoken) +#define traceTASK_NOTIFY_WAIT() SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XTASKNOTIFYWAIT, ulBitsToClearOnEntry, ulBitsToClearOnExit, (U32)pulNotificationValue, xTicksToWait) + +#define traceQUEUE_CREATE( pxNewQueue ) SEGGER_SYSVIEW_RecordU32x3(apiID_OFFSET + apiID_XQUEUEGENERICCREATE, uxQueueLength, uxItemSize, ucQueueType) +#define traceQUEUE_DELETE( pxQueue ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_VQUEUEDELETE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue)) +#define traceQUEUE_PEEK( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICRECEIVE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer), xTicksToWait, 1) +#define traceQUEUE_PEEK_FROM_ISR( pxQueue ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XQUEUEPEEKFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer)) +#define traceQUEUE_PEEK_FROM_ISR_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XQUEUEPEEKFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer)) +#define traceQUEUE_RECEIVE( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICRECEIVE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)0), xTicksToWait, 1) +#define traceQUEUE_RECEIVE_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICRECEIVE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)0), xTicksToWait, 1) +#define traceQUEUE_SEMAPHORE_RECEIVE( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICRECEIVE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)0), xTicksToWait, 0) +#define traceQUEUE_RECEIVE_FROM_ISR( pxQueue ) SEGGER_SYSVIEW_RecordU32x3(apiID_OFFSET + apiID_XQUEUERECEIVEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer), (U32)pxHigherPriorityTaskWoken) +#define traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x3(apiID_OFFSET + apiID_XQUEUERECEIVEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer), (U32)pxHigherPriorityTaskWoken) +#define traceQUEUE_REGISTRY_ADD( xQueue, pcQueueName ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_VQUEUEADDTOREGISTRY, SEGGER_SYSVIEW_ShrinkId((U32)xQueue), (U32)pcQueueName) +#if ( configUSE_QUEUE_SETS != 1 ) + #define traceQUEUE_SEND( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICSEND, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pvItemToQueue, xTicksToWait, xCopyPosition) +#else + #define traceQUEUE_SEND( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICSEND, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), 0u, 0u, xCopyPosition) +#endif +#define traceQUEUE_SEND_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICSEND, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pvItemToQueue, xTicksToWait, xCopyPosition) +#define traceQUEUE_SEND_FROM_ISR( pxQueue ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XQUEUEGENERICSENDFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pxHigherPriorityTaskWoken) +#define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XQUEUEGENERICSENDFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pxHigherPriorityTaskWoken) +#define traceSTREAM_BUFFER_CREATE( pxStreamBuffer, xIsMessageBuffer ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XSTREAMBUFFERCREATE, (U32)xIsMessageBuffer, (U32)pxStreamBuffer) +#define traceSTREAM_BUFFER_CREATE_FAILED( xIsMessageBuffer ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XSTREAMBUFFERCREATE, (U32)xIsMessageBuffer, 0u) +#define traceSTREAM_BUFFER_DELETE( xStreamBuffer ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_VSTREAMBUFFERDELETE, (U32)xStreamBuffer) +#define traceSTREAM_BUFFER_RESET( xStreamBuffer ) SEGGER_SYSVIEW_RecordU32 (apiID_OFFSET + apiID_XSTREAMBUFFERRESET, (U32)xStreamBuffer) +#define traceSTREAM_BUFFER_SEND( xStreamBuffer, xBytesSent ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XSTREAMBUFFERSEND, (U32)xStreamBuffer, (U32)xBytesSent) +#define traceSTREAM_BUFFER_SEND_FAILED( xStreamBuffer ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XSTREAMBUFFERSEND, (U32)xStreamBuffer, 0u) +#define traceSTREAM_BUFFER_SEND_FROM_ISR( xStreamBuffer, xBytesSent ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XSTREAMBUFFERSENDFROMISR, (U32)xStreamBuffer, (U32)xBytesSent) +#define traceSTREAM_BUFFER_RECEIVE( xStreamBuffer, xReceivedLength ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XSTREAMBUFFERRECEIVE, (U32)xStreamBuffer, (U32)xReceivedLength) +#define traceSTREAM_BUFFER_RECEIVE_FAILED( xStreamBuffer ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XSTREAMBUFFERRECEIVE, (U32)xStreamBuffer, 0u) +#define traceSTREAM_BUFFER_RECEIVE_FROM_ISR( xStreamBuffer, xReceivedLength ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XSTREAMBUFFERRECEIVEFROMISR, (U32)xStreamBuffer, (U32)xReceivedLength) + + +#define traceTASK_DELETE( pxTCB ) { \ + SEGGER_SYSVIEW_RecordU32(apiID_OFFSET + apiID_VTASKDELETE, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB)); \ + SYSVIEW_DeleteTask((U32)pxTCB); \ + } + + +#if( portSTACK_GROWTH < 0 ) +#define traceTASK_CREATE(pxNewTCB) if (pxNewTCB != NULL) { \ + SEGGER_SYSVIEW_OnTaskCreate((U32)pxNewTCB); \ + SYSVIEW_AddTask((U32)pxNewTCB, \ + &(pxNewTCB->pcTaskName[0]), \ + pxNewTCB->uxPriority, \ + (U32)pxNewTCB->pxStack, \ + ((U32)pxNewTCB->pxTopOfStack - (U32)pxNewTCB->pxStack) \ + ); \ + } +#else +#define traceTASK_CREATE(pxNewTCB) if (pxNewTCB != NULL) { \ + SEGGER_SYSVIEW_OnTaskCreate((U32)pxNewTCB); \ + SYSVIEW_AddTask((U32)pxNewTCB, \ + &(pxNewTCB->pcTaskName[0]), \ + pxNewTCB->uxPriority, \ + (U32)pxNewTCB->pxStack, \ + (U32)(pxNewTCB->pxStack-pxNewTCB->pxTopOfStack) \ + ); \ + } +#endif +#define traceTASK_PRIORITY_SET(pxTask, uxNewPriority) { \ + SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET+apiID_VTASKPRIORITYSET, \ + SEGGER_SYSVIEW_ShrinkId((U32)pxTCB), \ + uxNewPriority \ + ); \ + SYSVIEW_UpdateTask((U32)pxTask, \ + &(pxTask->pcTaskName[0]), \ + uxNewPriority, \ + (U32)pxTask->pxStack, \ + 0 \ + ); \ + } +// +// Define INCLUDE_xTaskGetIdleTaskHandle as 1 in FreeRTOSConfig.h to allow identification of Idle state. +// +#if ( INCLUDE_xTaskGetIdleTaskHandle == 1 ) + #define traceTASK_SWITCHED_IN() if(prvGetTCBFromHandle(NULL) == xIdleTaskHandle) { \ + SEGGER_SYSVIEW_OnIdle(); \ + } else { \ + SEGGER_SYSVIEW_OnTaskStartExec((U32)pxCurrentTCB); \ + } +#else + #define traceTASK_SWITCHED_IN() { \ + if (memcmp(pxCurrentTCB->pcTaskName, "IDLE", 5) != 0) { \ + SEGGER_SYSVIEW_OnTaskStartExec((U32)pxCurrentTCB); \ + } else { \ + SEGGER_SYSVIEW_OnIdle(); \ + } \ + } +#endif + +#define traceMOVED_TASK_TO_READY_STATE(pxTCB) SEGGER_SYSVIEW_OnTaskStartReady((U32)pxTCB) +#define traceREADDED_TASK_TO_READY_STATE(pxTCB) + +#define traceMOVED_TASK_TO_DELAYED_LIST() SEGGER_SYSVIEW_OnTaskStopReady((U32)pxCurrentTCB, (1u << 2)) +#define traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST() SEGGER_SYSVIEW_OnTaskStopReady((U32)pxCurrentTCB, (1u << 2)) +#define traceMOVED_TASK_TO_SUSPENDED_LIST(pxTCB) SEGGER_SYSVIEW_OnTaskStopReady((U32)pxTCB, ((3u << 3) | 3)) + + +#define traceISR_EXIT_TO_SCHEDULER() SEGGER_SYSVIEW_RecordExitISRToScheduler() +#define traceISR_EXIT() SEGGER_SYSVIEW_RecordExitISR() +#define traceISR_ENTER() SEGGER_SYSVIEW_RecordEnterISR() + +/********************************************************************* +* +* API functions +* +********************************************************************** +*/ +#ifdef __cplusplus +extern "C" { +#endif +void SYSVIEW_AddTask (U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark); +void SYSVIEW_UpdateTask (U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark); +void SYSVIEW_DeleteTask (U32 xHandle); +void SYSVIEW_SendTaskInfo (U32 TaskID, const char* sName, unsigned Prio, U32 StackBase, unsigned StackSize); + +#ifdef __cplusplus +} +#endif + +#endif + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV8/Config/Cortex-M/SEGGER_SYSVIEW_Config_FreeRTOS.c b/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV8/Config/Cortex-M/SEGGER_SYSVIEW_Config_FreeRTOS.c new file mode 100644 index 0000000..b695024 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV8/Config/Cortex-M/SEGGER_SYSVIEW_Config_FreeRTOS.c @@ -0,0 +1,104 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Config_FreeRTOS.c +Purpose : Sample setup configuration of SystemView with FreeRTOS. +Revision: $Rev: 18540 $ +*/ +#include "FreeRTOS.h" +#include "SEGGER_SYSVIEW.h" + +extern const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI; + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ +// The application name to be displayed in SystemViewer +#define SYSVIEW_APP_NAME "FreeRTOS Demo Application" + +// The target device name +#define SYSVIEW_DEVICE_NAME "Cortex-M4" + +// Frequency of the timestamp. Must match SEGGER_SYSVIEW_GET_TIMESTAMP in SEGGER_SYSVIEW_Conf.h +#define SYSVIEW_TIMESTAMP_FREQ (configCPU_CLOCK_HZ) + +// System Frequency. SystemcoreClock is used in most CMSIS compatible projects. +#define SYSVIEW_CPU_FREQ configCPU_CLOCK_HZ + +// The lowest RAM address used for IDs (pointers) +#define SYSVIEW_RAM_BASE (0x10000000) + +/********************************************************************* +* +* _cbSendSystemDesc() +* +* Function description +* Sends SystemView description strings. +*/ +static void _cbSendSystemDesc(void) { + SEGGER_SYSVIEW_SendSysDesc("N="SYSVIEW_APP_NAME",D="SYSVIEW_DEVICE_NAME",O=FreeRTOS"); + SEGGER_SYSVIEW_SendSysDesc("I#15=SysTick"); +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +void SEGGER_SYSVIEW_Conf(void) { + SEGGER_SYSVIEW_Init(SYSVIEW_TIMESTAMP_FREQ, SYSVIEW_CPU_FREQ, + &SYSVIEW_X_OS_TraceAPI, _cbSendSystemDesc); + SEGGER_SYSVIEW_SetRAMBase(SYSVIEW_RAM_BASE); +} + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV8/Patch/FreeRTOSV8.2.3_Core.patch b/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV8/Patch/FreeRTOSV8.2.3_Core.patch new file mode 100644 index 0000000..e78a848 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV8/Patch/FreeRTOSV8.2.3_Core.patch @@ -0,0 +1,252 @@ +diff -rupN ./Source_org/include/FreeRTOS.h ./Source_new/include/FreeRTOS.h +--- ./Source_org/include/FreeRTOS.h 2015-10-16 15:12:58.000000000 +0200 ++++ ./Source_new/include/FreeRTOS.h 2015-11-13 18:08:30.000000000 +0100 +@@ -203,6 +203,10 @@ extern "C" { + #define INCLUDE_uxTaskGetStackHighWaterMark 0 + #endif + ++#ifndef INCLUDE_pxTaskGetStackStart ++ #define INCLUDE_pxTaskGetStackStart 0 ++#endif ++ + #ifndef INCLUDE_eTaskGetState + #define INCLUDE_eTaskGetState 0 + #endif +@@ -405,6 +409,22 @@ extern "C" { + #define traceMOVED_TASK_TO_READY_STATE( pxTCB ) + #endif + ++#ifndef traceREADDED_TASK_TO_READY_STATE ++ #define traceREADDED_TASK_TO_READY_STATE( pxTCB ) traceMOVED_TASK_TO_READY_STATE( pxTCB ) ++#endif ++ ++#ifndef traceMOVED_TASK_TO_DELAYED_LIST ++ #define traceMOVED_TASK_TO_DELAYED_LIST() ++#endif ++ ++#ifndef traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST ++ #define traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST() ++#endif ++ ++#ifndef traceMOVED_TASK_TO_SUSPENDED_LIST ++ #define traceMOVED_TASK_TO_SUSPENDED_LIST( pxTCB ) ++#endif ++ + #ifndef traceQUEUE_CREATE + #define traceQUEUE_CREATE( pxNewQueue ) + #endif +@@ -645,6 +665,19 @@ extern "C" { + #define traceTASK_NOTIFY_GIVE_FROM_ISR() + #endif + ++#ifndef traceISR_EXIT_TO_SCHEDULER ++ #define traceISR_EXIT_TO_SCHEDULER() ++#endif ++ ++#ifndef traceISR_EXIT ++ #define traceISR_EXIT() ++#endif ++ ++#ifndef traceISR_ENTER ++ #define traceISR_ENTER() ++#endif ++ ++ + #ifndef configGENERATE_RUN_TIME_STATS + #define configGENERATE_RUN_TIME_STATS 0 + #endif +diff -rupN ./Source_org/include/task.h ./Source_new/include/task.h +--- ./Source_org/include/task.h 2015-10-17 19:12:22.000000000 +0200 ++++ ./Source_new/include/task.h 2015-11-13 18:08:30.000000000 +0100 +@@ -1131,6 +1131,25 @@ char *pcTaskGetTaskName( TaskHandle_t xT + */ + UBaseType_t uxTaskGetStackHighWaterMark( TaskHandle_t xTask ) PRIVILEGED_FUNCTION; + ++/** ++ * task.h ++ *
uint8_t* pxTaskGetStackStart( TaskHandle_t xTask);
++ * ++ * INCLUDE_pxTaskGetStackStart must be set to 1 in FreeRTOSConfig.h for ++ * this function to be available. ++ * ++ * Returns the start of the stack associated with xTask. That is, ++ * the highest stack memory address on architectures where the stack grows down ++ * from high memory, and the lowest memory address on architectures where the ++ * stack grows up from low memory. ++ * ++ * @param xTask Handle of the task associated with the stack returned. ++ * Set xTask to NULL to return the stack of the calling task. ++ * ++ * @return A pointer to the start of the stack. ++ */ ++uint8_t* pxTaskGetStackStart( TaskHandle_t xTask) PRIVILEGED_FUNCTION; ++ + /* When using trace macros it is sometimes necessary to include task.h before + FreeRTOS.h. When this is done TaskHookFunction_t will not yet have been defined, + so the following two prototypes will cause a compilation error. This can be +diff -rupN ./Source_org/portable/GCC/ARM_CM4F/port.c ./Source_new/portable/GCC/ARM_CM4F/port.c +--- ./Source_org/portable/GCC/ARM_CM4F/port.c 2015-10-16 15:12:58.000000000 +0200 ++++ ./Source_new/portable/GCC/ARM_CM4F/port.c 2015-11-12 10:35:25.000000000 +0100 +@@ -493,14 +493,20 @@ void xPortSysTickHandler( void ) + save and then restore the interrupt mask value as its value is already + known. */ + ( void ) portSET_INTERRUPT_MASK_FROM_ISR(); ++ traceISR_ENTER(); + { + /* Increment the RTOS tick. */ + if( xTaskIncrementTick() != pdFALSE ) + { ++ traceISR_EXIT_TO_SCHEDULER(); + /* A context switch is required. Context switching is performed in + the PendSV interrupt. Pend the PendSV interrupt. */ + portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; + } ++ else ++ { ++ traceISR_EXIT(); ++ } + } + portCLEAR_INTERRUPT_MASK_FROM_ISR( 0 ); + } +diff -rupN ./Source_org/portable/GCC/ARM_CM4F/portmacro.h ./Source_new/portable/GCC/ARM_CM4F/portmacro.h +--- ./Source_org/portable/GCC/ARM_CM4F/portmacro.h 2015-10-16 15:12:58.000000000 +0200 ++++ ./Source_new/portable/GCC/ARM_CM4F/portmacro.h 2015-11-11 18:49:58.000000000 +0100 +@@ -131,7 +131,7 @@ typedef unsigned long UBaseType_t; + + #define portNVIC_INT_CTRL_REG ( * ( ( volatile uint32_t * ) 0xe000ed04 ) ) + #define portNVIC_PENDSVSET_BIT ( 1UL << 28UL ) +-#define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired != pdFALSE ) portYIELD() ++#define portEND_SWITCHING_ISR( xSwitchRequired ) { if( xSwitchRequired != pdFALSE ) { traceISR_EXIT_TO_SCHEDULER(); portYIELD(); } else { traceISR_EXIT(); } } + #define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x ) + /*-----------------------------------------------------------*/ + +diff -rupN ./Source_org/tasks.c ./Source_new/tasks.c +--- ./Source_org/tasks.c 2015-10-16 15:12:59.000000000 +0200 ++++ ./Source_new/tasks.c 2015-11-13 18:14:04.000000000 +0100 +@@ -390,6 +390,16 @@ count overflows. */ + traceMOVED_TASK_TO_READY_STATE( pxTCB ); \ + taskRECORD_READY_PRIORITY( ( pxTCB )->uxPriority ); \ + vListInsertEnd( &( pxReadyTasksLists[ ( pxTCB )->uxPriority ] ), &( ( pxTCB )->xGenericListItem ) ) ++ ++/* ++ * Place the task represented by pxTCB which has been in a ready list before ++ * into the appropriate ready list for the task. ++ * It is inserted at the end of the list. ++ */ ++#define prvReaddTaskToReadyList( pxTCB ) \ ++ traceREADDED_TASK_TO_READY_STATE( pxTCB ); \ ++ taskRECORD_READY_PRIORITY( ( pxTCB )->uxPriority ); \ ++ vListInsertEnd( &( pxReadyTasksLists[ ( pxTCB )->uxPriority ] ), &( ( pxTCB )->xGenericListItem ) ) + /*-----------------------------------------------------------*/ + + /* +@@ -1252,7 +1262,7 @@ StackType_t *pxTopOfStack; + { + mtCOVERAGE_TEST_MARKER(); + } +- prvAddTaskToReadyList( pxTCB ); ++ prvReaddTaskToReadyList( pxTCB ); + } + else + { +@@ -1313,7 +1323,7 @@ StackType_t *pxTopOfStack; + { + mtCOVERAGE_TEST_MARKER(); + } +- ++ traceMOVED_TASK_TO_SUSPENDED_LIST(pxTCB); + vListInsertEnd( &xSuspendedTaskList, &( pxTCB->xGenericListItem ) ); + } + taskEXIT_CRITICAL(); +@@ -2295,6 +2305,7 @@ TickType_t xTimeToWake; + /* Add the task to the suspended task list instead of a delayed task + list to ensure the task is not woken by a timing event. It will + block indefinitely. */ ++ traceMOVED_TASK_TO_SUSPENDED_LIST(pxCurrentTCB); + vListInsertEnd( &xSuspendedTaskList, &( pxCurrentTCB->xGenericListItem ) ); + } + else +@@ -2361,6 +2372,7 @@ TickType_t xTimeToWake; + /* Add the task to the suspended task list instead of a delayed task + list to ensure it is not woken by a timing event. It will block + indefinitely. */ ++ traceMOVED_TASK_TO_SUSPENDED_LIST(pxCurrentTCB); + vListInsertEnd( &xSuspendedTaskList, &( pxCurrentTCB->xGenericListItem ) ); + } + else +@@ -2432,6 +2444,7 @@ TickType_t xTimeToWake; + /* Add the task to the suspended task list instead of a delayed + task list to ensure the task is not woken by a timing event. It + will block indefinitely. */ ++ traceMOVED_TASK_TO_SUSPENDED_LIST(pxCurrentTCB); + vListInsertEnd( &xSuspendedTaskList, &( pxCurrentTCB->xGenericListItem ) ); + } + else +@@ -3075,11 +3088,13 @@ static void prvAddCurrentTaskToDelayedLi + + if( xTimeToWake < xTickCount ) + { ++ traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST(); + /* Wake time has overflowed. Place this item in the overflow list. */ + vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xGenericListItem ) ); + } + else + { ++ traceMOVED_TASK_TO_DELAYED_LIST(); + /* The wake time has not overflowed, so the current block list is used. */ + vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xGenericListItem ) ); + +@@ -3306,6 +3321,19 @@ TCB_t *pxNewTCB; + #endif /* INCLUDE_uxTaskGetStackHighWaterMark */ + /*-----------------------------------------------------------*/ + ++#if (INCLUDE_pxTaskGetStackStart == 1) ++ uint8_t* pxTaskGetStackStart( TaskHandle_t xTask) ++ { ++ TCB_t *pxTCB; ++ UBaseType_t uxReturn; ++ ++ pxTCB = prvGetTCBFromHandle( xTask ); ++ return ( uint8_t * ) pxTCB->pxStack; ++ } ++ ++#endif /* INCLUDE_pxTaskGetStackStart */ ++/*-----------------------------------------------------------*/ ++ + #if ( INCLUDE_vTaskDelete == 1 ) + + static void prvDeleteTCB( TCB_t *pxTCB ) +@@ -3455,7 +3483,7 @@ TCB_t *pxTCB; + + /* Inherit the priority before being moved into the new list. */ + pxTCB->uxPriority = pxCurrentTCB->uxPriority; +- prvAddTaskToReadyList( pxTCB ); ++ prvReaddTaskToReadyList( pxTCB ); + } + else + { +@@ -3527,7 +3555,7 @@ TCB_t *pxTCB; + any other purpose if this task is running, and it must be + running to give back the mutex. */ + listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) pxTCB->uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ +- prvAddTaskToReadyList( pxTCB ); ++ prvReaddTaskToReadyList( pxTCB ); + + /* Return true to indicate that a context switch is required. + This is only actually required in the corner case whereby +@@ -3935,6 +3963,7 @@ TickType_t uxReturn; + of a delayed task list to ensure the task is not + woken by a timing event. It will block + indefinitely. */ ++ traceMOVED_TASK_TO_SUSPENDED_LIST(pxCurrentTCB); + vListInsertEnd( &xSuspendedTaskList, &( pxCurrentTCB->xGenericListItem ) ); + } + else +@@ -4053,6 +4082,7 @@ TickType_t uxReturn; + of a delayed task list to ensure the task is not + woken by a timing event. It will block + indefinitely. */ ++ traceMOVED_TASK_TO_SUSPENDED_LIST(pxCurrentTCB); + vListInsertEnd( &xSuspendedTaskList, &( pxCurrentTCB->xGenericListItem ) ); + } + else diff --git a/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV8/SEGGER_SYSVIEW_FreeRTOS.c b/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV8/SEGGER_SYSVIEW_FreeRTOS.c new file mode 100644 index 0000000..1870c5e --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV8/SEGGER_SYSVIEW_FreeRTOS.c @@ -0,0 +1,293 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_FreeRTOS.c +Purpose : Interface between FreeRTOS and SystemView. +Revision: $Rev: 9599 $ +*/ +#include "FreeRTOS.h" +#include "task.h" +#include "SEGGER_SYSVIEW.h" +#include "SEGGER_SYSVIEW_FreeRTOS.h" +#include "string.h" // Required for memset + + + +typedef struct SYSVIEW_FREERTOS_TASK_STATUS SYSVIEW_FREERTOS_TASK_STATUS; + +struct SYSVIEW_FREERTOS_TASK_STATUS { + U32 xHandle; + const char* pcTaskName; + unsigned uxCurrentPriority; + U32 pxStack; + unsigned uStackHighWaterMark; +}; + +static SYSVIEW_FREERTOS_TASK_STATUS _aTasks[SYSVIEW_FREERTOS_MAX_NOF_TASKS]; +static unsigned _NumTasks; + +/********************************************************************* +* +* _cbSendTaskList() +* +* Function description +* This function is part of the link between FreeRTOS and SYSVIEW. +* Called from SystemView when asked by the host, it uses SYSVIEW +* functions to send the entire task list to the host. +*/ +static void _cbSendTaskList(void) { + unsigned n; + + for (n = 0; n < _NumTasks; n++) { +#if INCLUDE_uxTaskGetStackHighWaterMark // Report Task Stack High Watermark + _aTasks[n].uStackHighWaterMark = uxTaskGetStackHighWaterMark((TaskHandle_t)_aTasks[n].xHandle); +#endif + SYSVIEW_SendTaskInfo((U32)_aTasks[n].xHandle, _aTasks[n].pcTaskName, (unsigned)_aTasks[n].uxCurrentPriority, (U32)_aTasks[n].pxStack, (unsigned)_aTasks[n].uStackHighWaterMark); + } +} + +/********************************************************************* +* +* _cbGetTime() +* +* Function description +* This function is part of the link between FreeRTOS and SYSVIEW. +* Called from SystemView when asked by the host, returns the +* current system time in micro seconds. +*/ +static U64 _cbGetTime(void) { + U64 Time; + + Time = xTaskGetTickCountFromISR(); + Time *= portTICK_PERIOD_MS; + Time *= 1000; + return Time; +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +/********************************************************************* +* +* SYSVIEW_AddTask() +* +* Function description +* Add a task to the internal list and record its information. +*/ +void SYSVIEW_AddTask(U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark) { + + if (memcmp(pcTaskName, "IDLE", 5) == 0) { + return; + } + + if (_NumTasks >= SYSVIEW_FREERTOS_MAX_NOF_TASKS) { + SEGGER_SYSVIEW_Warn("SYSTEMVIEW: Could not record task information. Maximum number of tasks reached."); + return; + } + + _aTasks[_NumTasks].xHandle = xHandle; + _aTasks[_NumTasks].pcTaskName = pcTaskName; + _aTasks[_NumTasks].uxCurrentPriority = uxCurrentPriority; + _aTasks[_NumTasks].pxStack = pxStack; + _aTasks[_NumTasks].uStackHighWaterMark = uStackHighWaterMark; + + _NumTasks++; + + SYSVIEW_SendTaskInfo(xHandle, pcTaskName,uxCurrentPriority, pxStack, uStackHighWaterMark); + +} + +/********************************************************************* +* +* SYSVIEW_UpdateTask() +* +* Function description +* Update a task in the internal list and record its information. +*/ +void SYSVIEW_UpdateTask(U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark) { + unsigned n; + + if (memcmp(pcTaskName, "IDLE", 5) == 0) { + return; + } + + for (n = 0; n < _NumTasks; n++) { + if (_aTasks[n].xHandle == xHandle) { + break; + } + } + if (n < _NumTasks) { + _aTasks[n].pcTaskName = pcTaskName; + _aTasks[n].uxCurrentPriority = uxCurrentPriority; + _aTasks[n].pxStack = pxStack; + _aTasks[n].uStackHighWaterMark = uStackHighWaterMark; + + SYSVIEW_SendTaskInfo(xHandle, pcTaskName, uxCurrentPriority, pxStack, uStackHighWaterMark); + } else { + SYSVIEW_AddTask(xHandle, pcTaskName, uxCurrentPriority, pxStack, uStackHighWaterMark); + } +} + +/********************************************************************* +* +* SYSVIEW_DeleteTask() +* +* Function description +* Delete a task from the internal list. +*/ +void SYSVIEW_DeleteTask(U32 xHandle) { + unsigned n; + + if (_NumTasks == 0) { + return; // Early out + } + for (n = 0; n < _NumTasks; n++) { + if (_aTasks[n].xHandle == xHandle) { + break; + } + } + if (n == (_NumTasks - 1)) { + // + // Task is last item in list. + // Simply zero the item and decrement number of tasks. + // + memset(&_aTasks[n], 0, sizeof(_aTasks[n])); + _NumTasks--; + } else if (n < _NumTasks) { + // + // Task is in the middle of the list. + // Move last item to current position and decrement number of tasks. + // Order of tasks does not really matter, so no need to move all following items. + // + _aTasks[n].xHandle = _aTasks[_NumTasks - 1].xHandle; + _aTasks[n].pcTaskName = _aTasks[_NumTasks - 1].pcTaskName; + _aTasks[n].uxCurrentPriority = _aTasks[_NumTasks - 1].uxCurrentPriority; + _aTasks[n].pxStack = _aTasks[_NumTasks - 1].pxStack; + _aTasks[n].uStackHighWaterMark = _aTasks[_NumTasks - 1].uStackHighWaterMark; + memset(&_aTasks[_NumTasks - 1], 0, sizeof(_aTasks[_NumTasks - 1])); + _NumTasks--; + } +} + +/********************************************************************* +* +* SYSVIEW_SendTaskInfo() +* +* Function description +* Record task information. +*/ +void SYSVIEW_SendTaskInfo(U32 TaskID, const char* sName, unsigned Prio, U32 StackBase, unsigned StackSize) { + SEGGER_SYSVIEW_TASKINFO TaskInfo; + + memset(&TaskInfo, 0, sizeof(TaskInfo)); // Fill all elements with 0 to allow extending the structure in future version without breaking the code + TaskInfo.TaskID = TaskID; + TaskInfo.sName = sName; + TaskInfo.Prio = Prio; + TaskInfo.StackBase = StackBase; + TaskInfo.StackSize = StackSize; + SEGGER_SYSVIEW_SendTaskInfo(&TaskInfo); +} + +/********************************************************************* +* +* SYSVIEW_RecordU32x4() +* +* Function description +* Record an event with 4 parameters +*/ +void SYSVIEW_RecordU32x4(unsigned Id, U32 Para0, U32 Para1, U32 Para2, U32 Para3) { + U8 aPacket[SEGGER_SYSVIEW_INFO_SIZE + 4 * SEGGER_SYSVIEW_QUANTA_U32]; + U8* pPayload; + // + pPayload = SEGGER_SYSVIEW_PREPARE_PACKET(aPacket); // Prepare the packet for SystemView + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para0); // Add the first parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para1); // Add the second parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para2); // Add the third parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para3); // Add the fourth parameter to the packet + // + SEGGER_SYSVIEW_SendPacket(&aPacket[0], pPayload, Id); // Send the packet +} + +/********************************************************************* +* +* SYSVIEW_RecordU32x5() +* +* Function description +* Record an event with 5 parameters +*/ +void SYSVIEW_RecordU32x5(unsigned Id, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4) { + U8 aPacket[SEGGER_SYSVIEW_INFO_SIZE + 5 * SEGGER_SYSVIEW_QUANTA_U32]; + U8* pPayload; + // + pPayload = SEGGER_SYSVIEW_PREPARE_PACKET(aPacket); // Prepare the packet for SystemView + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para0); // Add the first parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para1); // Add the second parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para2); // Add the third parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para3); // Add the fourth parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para4); // Add the fifth parameter to the packet + // + SEGGER_SYSVIEW_SendPacket(&aPacket[0], pPayload, Id); // Send the packet +} + +/********************************************************************* +* +* Public API structures +* +********************************************************************** +*/ +// Callbacks provided to SYSTEMVIEW by FreeRTOS +const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI = { + _cbGetTime, + _cbSendTaskList, +}; + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV8/SEGGER_SYSVIEW_FreeRTOS.h b/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV8/SEGGER_SYSVIEW_FreeRTOS.h new file mode 100644 index 0000000..0cdc351 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV8/SEGGER_SYSVIEW_FreeRTOS.h @@ -0,0 +1,313 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_FreeRTOS.h +Purpose : Interface between FreeRTOS and SystemView. +Revision: $Rev: 9599 $ + +Notes: + (1) Include this file at the end of FreeRTOSConfig.h +*/ + +#ifndef SYSVIEW_FREERTOS_H +#define SYSVIEW_FREERTOS_H + +#include "SEGGER_SYSVIEW.h" + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ +#ifndef portSTACK_GROWTH + #define portSTACK_GROWTH ( -1 ) +#endif + +#define SYSVIEW_FREERTOS_MAX_NOF_TASKS 8 + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ +#define apiID_OFFSET (32u) + +#define apiID_VTASKALLOCATEMPUREGIONS (1u) +#define apiID_VTASKDELETE (2u) +#define apiID_VTASKDELAY (3u) +#define apiID_VTASKDELAYUNTIL (4u) +#define apiID_UXTASKPRIORITYGET (5u) +#define apiID_UXTASKPRIORITYGETFROMISR (6u) +#define apiID_ETASKGETSTATE (7u) +#define apiID_VTASKPRIORITYSET (8u) +#define apiID_VTASKSUSPEND (9u) +#define apiID_VTASKRESUME (10u) +#define apiID_XTASKRESUMEFROMISR (11u) +#define apiID_VTASKSTARTSCHEDULER (12u) +#define apiID_VTASKENDSCHEDULER (13u) +#define apiID_VTASKSUSPENDALL (14u) +#define apiID_XTASKRESUMEALL (15u) +#define apiID_XTASKGETTICKCOUNT (16u) +#define apiID_XTASKGETTICKCOUNTFROMISR (17u) +#define apiID_UXTASKGETNUMBEROFTASKS (18u) +#define apiID_PCTASKGETTASKNAME (19u) +#define apiID_UXTASKGETSTACKHIGHWATERMARK (20u) +#define apiID_VTASKSETAPPLICATIONTASKTAG (21u) +#define apiID_XTASKGETAPPLICATIONTASKTAG (22u) +#define apiID_VTASKSETTHREADLOCALSTORAGEPOINTER (23u) +#define apiID_PVTASKGETTHREADLOCALSTORAGEPOINTER (24u) +#define apiID_XTASKCALLAPPLICATIONTASKHOOK (25u) +#define apiID_XTASKGETIDLETASKHANDLE (26u) +#define apiID_UXTASKGETSYSTEMSTATE (27u) +#define apiID_VTASKLIST (28u) +#define apiID_VTASKGETRUNTIMESTATS (29u) +#define apiID_XTASKGENERICNOTIFY (30u) +#define apiID_XTASKGENERICNOTIFYFROMISR (31u) +#define apiID_XTASKNOTIFYWAIT (32u) +#define apiID_VTASKNOTIFYGIVEFROMISR (33u) +#define apiID_ULTASKNOTIFYTAKE (34u) +#define apiID_XTASKNOTIFYSTATECLEAR (35u) +#define apiID_XTASKGETCURRENTTASKHANDLE (36u) +#define apiID_VTASKSETTIMEOUTSTATE (37u) +#define apiID_XTASKCHECKFORTIMEOUT (38u) +#define apiID_VTASKMISSEDYIELD (39u) +#define apiID_XTASKGETSCHEDULERSTATE (40u) +#define apiID_VTASKPRIORITYINHERIT (41u) +#define apiID_XTASKPRIORITYDISINHERIT (42u) +#define apiID_XTASKGENERICCREATE (43u) +#define apiID_UXTASKGETTASKNUMBER (44u) +#define apiID_VTASKSETTASKNUMBER (45u) +#define apiID_VTASKSTEPTICK (46u) +#define apiID_ETASKCONFIRMSLEEPMODESTATUS (47u) +#define apiID_XTIMERCREATE (48u) +#define apiID_PVTIMERGETTIMERID (49u) +#define apiID_VTIMERSETTIMERID (50u) +#define apiID_XTIMERISTIMERACTIVE (51u) +#define apiID_XTIMERGETTIMERDAEMONTASKHANDLE (52u) +#define apiID_XTIMERPENDFUNCTIONCALLFROMISR (53u) +#define apiID_XTIMERPENDFUNCTIONCALL (54u) +#define apiID_PCTIMERGETTIMERNAME (55u) +#define apiID_XTIMERCREATETIMERTASK (56u) +#define apiID_XTIMERGENERICCOMMAND (57u) +#define apiID_XQUEUEGENERICSEND (58u) +#define apiID_XQUEUEPEEKFROMISR (59u) +#define apiID_XQUEUEGENERICRECEIVE (60u) +#define apiID_UXQUEUEMESSAGESWAITING (61u) +#define apiID_UXQUEUESPACESAVAILABLE (62u) +#define apiID_VQUEUEDELETE (63u) +#define apiID_XQUEUEGENERICSENDFROMISR (64u) +#define apiID_XQUEUEGIVEFROMISR (65u) +#define apiID_XQUEUERECEIVEFROMISR (66u) +#define apiID_XQUEUEISQUEUEEMPTYFROMISR (67u) +#define apiID_XQUEUEISQUEUEFULLFROMISR (68u) +#define apiID_UXQUEUEMESSAGESWAITINGFROMISR (69u) +#define apiID_XQUEUEALTGENERICSEND (70u) +#define apiID_XQUEUEALTGENERICRECEIVE (71u) +#define apiID_XQUEUECRSENDFROMISR (72u) +#define apiID_XQUEUECRRECEIVEFROMISR (73u) +#define apiID_XQUEUECRSEND (74u) +#define apiID_XQUEUECRRECEIVE (75u) +#define apiID_XQUEUECREATEMUTEX (76u) +#define apiID_XQUEUECREATECOUNTINGSEMAPHORE (77u) +#define apiID_XQUEUEGETMUTEXHOLDER (78u) +#define apiID_XQUEUETAKEMUTEXRECURSIVE (79u) +#define apiID_XQUEUEGIVEMUTEXRECURSIVE (80u) +#define apiID_VQUEUEADDTOREGISTRY (81u) +#define apiID_VQUEUEUNREGISTERQUEUE (82u) +#define apiID_XQUEUEGENERICCREATE (83u) +#define apiID_XQUEUECREATESET (84u) +#define apiID_XQUEUEADDTOSET (85u) +#define apiID_XQUEUEREMOVEFROMSET (86u) +#define apiID_XQUEUESELECTFROMSET (87u) +#define apiID_XQUEUESELECTFROMSETFROMISR (88u) +#define apiID_XQUEUEGENERICRESET (89u) +#define apiID_VLISTINITIALISE (90u) +#define apiID_VLISTINITIALISEITEM (91u) +#define apiID_VLISTINSERT (92u) +#define apiID_VLISTINSERTEND (93u) +#define apiID_UXLISTREMOVE (94u) +#define apiID_XEVENTGROUPCREATE (95u) +#define apiID_XEVENTGROUPWAITBITS (96u) +#define apiID_XEVENTGROUPCLEARBITS (97u) +#define apiID_XEVENTGROUPCLEARBITSFROMISR (98u) +#define apiID_XEVENTGROUPSETBITS (99u) +#define apiID_XEVENTGROUPSETBITSFROMISR (100u) +#define apiID_XEVENTGROUPSYNC (101u) +#define apiID_XEVENTGROUPGETBITSFROMISR (102u) +#define apiID_VEVENTGROUPDELETE (103u) +#define apiID_UXEVENTGROUPGETNUMBER (104u) + +#define traceTASK_NOTIFY_TAKE() SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_ULTASKNOTIFYTAKE, xClearCountOnExit, xTicksToWait) +#define traceTASK_DELAY() SEGGER_SYSVIEW_RecordU32(apiID_OFFSET + apiID_VTASKDELAY, xTicksToDelay) +#define traceTASK_DELAY_UNTIL() SEGGER_SYSVIEW_RecordVoid(apiID_OFFSET + apiID_VTASKDELAYUNTIL) +#define traceTASK_NOTIFY_GIVE_FROM_ISR() SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_VTASKNOTIFYGIVEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB), (U32)pxHigherPriorityTaskWoken) +#define traceTASK_PRIORITY_INHERIT( pxTCB, uxPriority ) SEGGER_SYSVIEW_RecordU32(apiID_OFFSET + apiID_VTASKPRIORITYINHERIT, (U32)pxMutexHolder) +#define traceTASK_RESUME( pxTCB ) SEGGER_SYSVIEW_RecordU32(apiID_OFFSET + apiID_VTASKRESUME, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB)) +#define traceINCREASE_TICK_COUNT( xTicksToJump ) SEGGER_SYSVIEW_RecordU32(apiID_OFFSET + apiID_VTASKSTEPTICK, xTicksToJump) +#define traceTASK_SUSPEND( pxTCB ) SEGGER_SYSVIEW_RecordU32(apiID_OFFSET + apiID_VTASKSUSPEND, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB)) +#define traceTASK_PRIORITY_DISINHERIT( pxTCB, uxBasePriority ) SEGGER_SYSVIEW_RecordU32(apiID_OFFSET + apiID_XTASKPRIORITYDISINHERIT, (U32)pxMutexHolder) +#define traceTASK_RESUME_FROM_ISR( pxTCB ) SEGGER_SYSVIEW_RecordU32(apiID_OFFSET + apiID_XTASKRESUMEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB)) +#define traceTASK_NOTIFY() SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XTASKGENERICNOTIFY, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB), ulValue, eAction, (U32)pulPreviousNotificationValue) +#define traceTASK_NOTIFY_FROM_ISR() SYSVIEW_RecordU32x5(apiID_OFFSET + apiID_XTASKGENERICNOTIFYFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB), ulValue, eAction, (U32)pulPreviousNotificationValue, (U32)pxHigherPriorityTaskWoken) +#define traceTASK_NOTIFY_WAIT() SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XTASKNOTIFYWAIT, ulBitsToClearOnEntry, ulBitsToClearOnExit, (U32)pulNotificationValue, xTicksToWait) + +#define traceQUEUE_CREATE( pxNewQueue ) SEGGER_SYSVIEW_RecordU32x3(apiID_OFFSET + apiID_XQUEUEGENERICCREATE, uxQueueLength, uxItemSize, ucQueueType) +#define traceQUEUE_DELETE( pxQueue ) SEGGER_SYSVIEW_RecordU32(apiID_OFFSET + apiID_VQUEUEDELETE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue)) +#define traceQUEUE_PEEK( pxQueue ) SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICRECEIVE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer), xTicksToWait, xJustPeeking) +#define traceQUEUE_PEEK_FROM_ISR( pxQueue ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XQUEUEPEEKFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer)) +#define traceQUEUE_PEEK_FROM_ISR_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XQUEUEPEEKFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer)) +#define traceQUEUE_RECEIVE( pxQueue ) SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICRECEIVE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer), xTicksToWait, xJustPeeking) +#define traceQUEUE_RECEIVE_FAILED( pxQueue ) SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICRECEIVE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer), xTicksToWait, xJustPeeking) +#define traceQUEUE_RECEIVE_FROM_ISR( pxQueue ) SEGGER_SYSVIEW_RecordU32x3(apiID_OFFSET + apiID_XQUEUERECEIVEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer), (U32)pxHigherPriorityTaskWoken) +#define traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x3(apiID_OFFSET + apiID_XQUEUERECEIVEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer), (U32)pxHigherPriorityTaskWoken) +#define traceQUEUE_REGISTRY_ADD( xQueue, pcQueueName ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_VQUEUEADDTOREGISTRY, SEGGER_SYSVIEW_ShrinkId((U32)xQueue), (U32)pcQueueName) +#if ( configUSE_QUEUE_SETS != 1 ) + #define traceQUEUE_SEND( pxQueue ) SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICSEND, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pvItemToQueue, xTicksToWait, xCopyPosition) +#else + #define traceQUEUE_SEND( pxQueue ) SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICSEND, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), 0, 0, xCopyPosition) +#endif +#define traceQUEUE_SEND_FAILED( pxQueue ) SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICSEND, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pvItemToQueue, xTicksToWait, xCopyPosition) +#define traceQUEUE_SEND_FROM_ISR( pxQueue ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XQUEUEGENERICSENDFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pxHigherPriorityTaskWoken) +#define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XQUEUEGENERICSENDFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pxHigherPriorityTaskWoken) + +#define traceTASK_DELETE( pxTCB ) { \ + SEGGER_SYSVIEW_RecordU32(apiID_OFFSET + apiID_VTASKDELETE, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB)); \ + SYSVIEW_DeleteTask((U32)pxTCB); \ + } + + +#if( portSTACK_GROWTH < 0 ) +#define traceTASK_CREATE(pxNewTCB) if (pxNewTCB != NULL) { \ + SEGGER_SYSVIEW_OnTaskCreate((U32)pxNewTCB); \ + SYSVIEW_AddTask((U32)pxNewTCB, \ + &(pxNewTCB->pcTaskName[0]), \ + pxNewTCB->uxPriority, \ + (U32)pxNewTCB->pxStack, \ + ((U32)pxNewTCB->pxTopOfStack - (U32)pxNewTCB->pxStack) \ + ); \ + } +#else +#define traceTASK_CREATE(pxNewTCB) if (pxNewTCB != NULL) { \ + SEGGER_SYSVIEW_OnTaskCreate((U32)pxNewTCB); \ + SYSVIEW_AddTask((U32)pxNewTCB, \ + &(pxNewTCB->pcTaskName[0]), \ + pxNewTCB->uxPriority, \ + (U32)pxNewTCB->pxStack, \ + (U32)(pxNewTCB->pxStack-pxNewTCB->pxTopOfStack) \ + ); \ + } +#endif +#define traceTASK_PRIORITY_SET(pxTask, uxNewPriority) { \ + SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET+apiID_VTASKPRIORITYSET, \ + SEGGER_SYSVIEW_ShrinkId((U32)pxTCB), \ + uxNewPriority \ + ); \ + SYSVIEW_UpdateTask((U32)pxTask, \ + &(pxTask->pcTaskName[0]), \ + uxNewPriority, \ + (U32)pxTask->pxStack, \ + 0 \ + ); \ + } +// +// Define INCLUDE_xTaskGetIdleTaskHandle as 1 in FreeRTOSConfig.h to allow identification of Idle state. +// +#if ( INCLUDE_xTaskGetIdleTaskHandle == 1 ) + #define traceTASK_SWITCHED_IN() if(prvGetTCBFromHandle(NULL) == xIdleTaskHandle) { \ + SEGGER_SYSVIEW_OnIdle(); \ + } else { \ + SEGGER_SYSVIEW_OnTaskStartExec((U32)pxCurrentTCB); \ + } +#else + #define traceTASK_SWITCHED_IN() { \ + if (memcmp(pxCurrentTCB->pcTaskName, "IDLE", 5) != 0) { \ + SEGGER_SYSVIEW_OnTaskStartExec((U32)pxCurrentTCB); \ + } else { \ + SEGGER_SYSVIEW_OnIdle(); \ + } \ + } +#endif + +#define traceMOVED_TASK_TO_READY_STATE(pxTCB) SEGGER_SYSVIEW_OnTaskStartReady((U32)pxTCB) +#define traceREADDED_TASK_TO_READY_STATE(pxTCB) + +#define traceMOVED_TASK_TO_DELAYED_LIST() SEGGER_SYSVIEW_OnTaskStopReady((U32)pxCurrentTCB, (1u << 2)) +#define traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST() SEGGER_SYSVIEW_OnTaskStopReady((U32)pxCurrentTCB, (1u << 2)) +#define traceMOVED_TASK_TO_SUSPENDED_LIST(pxTCB) SEGGER_SYSVIEW_OnTaskStopReady((U32)pxTCB, ((3u << 3) | 3)) + + +#define traceISR_EXIT_TO_SCHEDULER() SEGGER_SYSVIEW_RecordExitISRToScheduler() +#define traceISR_EXIT() SEGGER_SYSVIEW_RecordExitISR() +#define traceISR_ENTER() SEGGER_SYSVIEW_RecordEnterISR() + +/********************************************************************* +* +* API functions +* +********************************************************************** +*/ +#ifdef __cplusplus +extern "C" { +#endif +void SYSVIEW_AddTask (U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark); +void SYSVIEW_UpdateTask (U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark); +void SYSVIEW_DeleteTask (U32 xHandle); +void SYSVIEW_SendTaskInfo (U32 TaskID, const char* sName, unsigned Prio, U32 StackBase, unsigned StackSize); +void SYSVIEW_RecordU32x4 (unsigned Id, U32 Para0, U32 Para1, U32 Para2, U32 Para3); +void SYSVIEW_RecordU32x5 (unsigned Id, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4); + +#ifdef __cplusplus +} +#endif + +#endif + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV9/Config/Cortex-M/SEGGER_SYSVIEW_Config_FreeRTOS.c b/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV9/Config/Cortex-M/SEGGER_SYSVIEW_Config_FreeRTOS.c new file mode 100644 index 0000000..ded7848 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV9/Config/Cortex-M/SEGGER_SYSVIEW_Config_FreeRTOS.c @@ -0,0 +1,104 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Config_FreeRTOS.c +Purpose : Sample setup configuration of SystemView with FreeRTOS. +Revision: $Rev: 7745 $ +*/ +#include "FreeRTOS.h" +#include "SEGGER_SYSVIEW.h" + +extern const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI; + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ +// The application name to be displayed in SystemViewer +#define SYSVIEW_APP_NAME "FreeRTOS Demo Application" + +// The target device name +#define SYSVIEW_DEVICE_NAME "Cortex-M4" + +// Frequency of the timestamp. Must match SEGGER_SYSVIEW_GET_TIMESTAMP in SEGGER_SYSVIEW_Conf.h +#define SYSVIEW_TIMESTAMP_FREQ (configCPU_CLOCK_HZ) + +// System Frequency. SystemcoreClock is used in most CMSIS compatible projects. +#define SYSVIEW_CPU_FREQ configCPU_CLOCK_HZ + +// The lowest RAM address used for IDs (pointers) +#define SYSVIEW_RAM_BASE (0x10000000) + +/********************************************************************* +* +* _cbSendSystemDesc() +* +* Function description +* Sends SystemView description strings. +*/ +static void _cbSendSystemDesc(void) { + SEGGER_SYSVIEW_SendSysDesc("N="SYSVIEW_APP_NAME",D="SYSVIEW_DEVICE_NAME",O=FreeRTOS"); + SEGGER_SYSVIEW_SendSysDesc("I#15=SysTick"); +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +void SEGGER_SYSVIEW_Conf(void) { + SEGGER_SYSVIEW_Init(SYSVIEW_TIMESTAMP_FREQ, SYSVIEW_CPU_FREQ, + &SYSVIEW_X_OS_TraceAPI, _cbSendSystemDesc); + SEGGER_SYSVIEW_SetRAMBase(SYSVIEW_RAM_BASE); +} + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV9/Patch/FreeRTOSV9_Core.patch b/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV9/Patch/FreeRTOSV9_Core.patch new file mode 100644 index 0000000..906fb12 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV9/Patch/FreeRTOSV9_Core.patch @@ -0,0 +1,296 @@ +From 37806244da7d4f4fe26bf966cf9ad3f479be931d Mon Sep 17 00:00:00 2001 +From: Maxime Vincent +Date: Tue, 18 Apr 2017 15:55:05 +0200 +Subject: [PATCH] Patch FreeRTOS 9 for Segger SystemView + +--- + libs/FreeRTOS/include/FreeRTOS.h | 33 ++++++++++++++++++++++ + libs/FreeRTOS/include/task.h | 19 +++++++++++++ + libs/FreeRTOS/portable/GCC/ARM_CM0/port.c | 6 ++++ + libs/FreeRTOS/portable/GCC/ARM_CM0/portmacro.h | 2 +- + libs/FreeRTOS/portable/GCC/ARM_CM4F/port.c | 6 ++++ + libs/FreeRTOS/portable/GCC/ARM_CM4F/portmacro.h | 2 +- + libs/FreeRTOS/tasks.c | 37 +++++++++++++++++++++++-- + 7 files changed, 100 insertions(+), 5 deletions(-) + +diff --git a/libs/FreeRTOS/include/FreeRTOS.h b/libs/FreeRTOS/include/FreeRTOS.h +index 08a6be4..b10b407 100644 +--- a/libs/FreeRTOS/include/FreeRTOS.h ++++ b/libs/FreeRTOS/include/FreeRTOS.h +@@ -198,6 +198,10 @@ extern "C" { + #define INCLUDE_uxTaskGetStackHighWaterMark 0 + #endif + ++#ifndef INCLUDE_pxTaskGetStackStart ++ #define INCLUDE_pxTaskGetStackStart 0 ++#endif ++ + #ifndef INCLUDE_eTaskGetState + #define INCLUDE_eTaskGetState 0 + #endif +@@ -418,6 +422,22 @@ extern "C" { + #define tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB ) + #endif + ++#ifndef traceREADDED_TASK_TO_READY_STATE ++ #define traceREADDED_TASK_TO_READY_STATE( pxTCB ) traceMOVED_TASK_TO_READY_STATE( pxTCB ) ++#endif ++ ++#ifndef traceMOVED_TASK_TO_DELAYED_LIST ++ #define traceMOVED_TASK_TO_DELAYED_LIST() ++#endif ++ ++#ifndef traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST ++ #define traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST() ++#endif ++ ++#ifndef traceMOVED_TASK_TO_SUSPENDED_LIST ++ #define traceMOVED_TASK_TO_SUSPENDED_LIST( pxTCB ) ++#endif ++ + #ifndef traceQUEUE_CREATE + #define traceQUEUE_CREATE( pxNewQueue ) + #endif +@@ -658,6 +678,19 @@ extern "C" { + #define traceTASK_NOTIFY_GIVE_FROM_ISR() + #endif + ++#ifndef traceISR_EXIT_TO_SCHEDULER ++ #define traceISR_EXIT_TO_SCHEDULER() ++#endif ++ ++#ifndef traceISR_EXIT ++ #define traceISR_EXIT() ++#endif ++ ++#ifndef traceISR_ENTER ++ #define traceISR_ENTER() ++#endif ++ ++ + #ifndef configGENERATE_RUN_TIME_STATS + #define configGENERATE_RUN_TIME_STATS 0 + #endif +diff --git a/libs/FreeRTOS/include/task.h b/libs/FreeRTOS/include/task.h +index 5e409c8..f9e24dd 100644 +--- a/libs/FreeRTOS/include/task.h ++++ b/libs/FreeRTOS/include/task.h +@@ -1367,6 +1367,25 @@ TaskHandle_t xTaskGetHandle( const char *pcNameToQuery ) PRIVILEGED_FUNCTION; /* + */ + UBaseType_t uxTaskGetStackHighWaterMark( TaskHandle_t xTask ) PRIVILEGED_FUNCTION; + ++/** ++ * task.h ++ *
uint8_t* pxTaskGetStackStart( TaskHandle_t xTask);
++ * ++ * INCLUDE_pxTaskGetStackStart must be set to 1 in FreeRTOSConfig.h for ++ * this function to be available. ++ * ++ * Returns the start of the stack associated with xTask. That is, ++ * the highest stack memory address on architectures where the stack grows down ++ * from high memory, and the lowest memory address on architectures where the ++ * stack grows up from low memory. ++ * ++ * @param xTask Handle of the task associated with the stack returned. ++ * Set xTask to NULL to return the stack of the calling task. ++ * ++ * @return A pointer to the start of the stack. ++ */ ++uint8_t* pxTaskGetStackStart( TaskHandle_t xTask) PRIVILEGED_FUNCTION; ++ + /* When using trace macros it is sometimes necessary to include task.h before + FreeRTOS.h. When this is done TaskHookFunction_t will not yet have been defined, + so the following two prototypes will cause a compilation error. This can be +diff --git a/libs/FreeRTOS/portable/GCC/ARM_CM0/port.c b/libs/FreeRTOS/portable/GCC/ARM_CM0/port.c +index 191d19c..dffbfb5 100644 +--- a/libs/FreeRTOS/portable/GCC/ARM_CM0/port.c ++++ b/libs/FreeRTOS/portable/GCC/ARM_CM0/port.c +@@ -345,13 +345,19 @@ void xPortSysTickHandler( void ) + uint32_t ulPreviousMask; + + ulPreviousMask = portSET_INTERRUPT_MASK_FROM_ISR(); ++ traceISR_ENTER(); + { + /* Increment the RTOS tick. */ + if( xTaskIncrementTick() != pdFALSE ) + { ++ traceISR_EXIT_TO_SCHEDULER(); + /* Pend a context switch. */ + *(portNVIC_INT_CTRL) = portNVIC_PENDSVSET; + } ++ else ++ { ++ traceISR_EXIT(); ++ } + } + portCLEAR_INTERRUPT_MASK_FROM_ISR( ulPreviousMask ); + } +diff --git a/libs/FreeRTOS/portable/GCC/ARM_CM0/portmacro.h b/libs/FreeRTOS/portable/GCC/ARM_CM0/portmacro.h +index c947595..6465ad8 100644 +--- a/libs/FreeRTOS/portable/GCC/ARM_CM0/portmacro.h ++++ b/libs/FreeRTOS/portable/GCC/ARM_CM0/portmacro.h +@@ -123,7 +123,7 @@ extern void vPortYield( void ); + #define portNVIC_INT_CTRL_REG ( * ( ( volatile uint32_t * ) 0xe000ed04 ) ) + #define portNVIC_PENDSVSET_BIT ( 1UL << 28UL ) + #define portYIELD() vPortYield() +-#define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired ) portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT ++#define portEND_SWITCHING_ISR( xSwitchRequired ) { if( xSwitchRequired ) { traceISR_EXIT_TO_SCHEDULER(); portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; } else { traceISR_EXIT(); } } + #define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x ) + /*-----------------------------------------------------------*/ + +diff --git a/libs/FreeRTOS/portable/GCC/ARM_CM4F/port.c b/libs/FreeRTOS/portable/GCC/ARM_CM4F/port.c +index 42f5b37..6b8483d 100644 +--- a/libs/FreeRTOS/portable/GCC/ARM_CM4F/port.c ++++ b/libs/FreeRTOS/portable/GCC/ARM_CM4F/port.c +@@ -497,14 +497,20 @@ void xPortSysTickHandler( void ) + save and then restore the interrupt mask value as its value is already + known. */ + portDISABLE_INTERRUPTS(); ++ traceISR_ENTER(); + { + /* Increment the RTOS tick. */ + if( xTaskIncrementTick() != pdFALSE ) + { ++ traceISR_EXIT_TO_SCHEDULER(); + /* A context switch is required. Context switching is performed in + the PendSV interrupt. Pend the PendSV interrupt. */ + portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT; + } ++ else ++ { ++ traceISR_EXIT(); ++ } + } + portENABLE_INTERRUPTS(); + } +diff --git a/libs/FreeRTOS/portable/GCC/ARM_CM4F/portmacro.h b/libs/FreeRTOS/portable/GCC/ARM_CM4F/portmacro.h +index b72042d..1a449e7 100644 +--- a/libs/FreeRTOS/portable/GCC/ARM_CM4F/portmacro.h ++++ b/libs/FreeRTOS/portable/GCC/ARM_CM4F/portmacro.h +@@ -131,7 +131,7 @@ typedef unsigned long UBaseType_t; + + #define portNVIC_INT_CTRL_REG ( * ( ( volatile uint32_t * ) 0xe000ed04 ) ) + #define portNVIC_PENDSVSET_BIT ( 1UL << 28UL ) +-#define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired != pdFALSE ) portYIELD() ++#define portEND_SWITCHING_ISR( xSwitchRequired ) { if( xSwitchRequired != pdFALSE ) { traceISR_EXIT_TO_SCHEDULER(); portYIELD(); } else { traceISR_EXIT(); } } + #define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x ) + /*-----------------------------------------------------------*/ + +diff --git a/libs/FreeRTOS/tasks.c b/libs/FreeRTOS/tasks.c +index 94b1f6d..1631637 100644 +--- a/libs/FreeRTOS/tasks.c ++++ b/libs/FreeRTOS/tasks.c +@@ -261,6 +261,17 @@ count overflows. */ + taskRECORD_READY_PRIORITY( ( pxTCB )->uxPriority ); \ + vListInsertEnd( &( pxReadyTasksLists[ ( pxTCB )->uxPriority ] ), &( ( pxTCB )->xStateListItem ) ); \ + tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB ) ++ ++/* ++ * Place the task represented by pxTCB which has been in a ready list before ++ * into the appropriate ready list for the task. ++ * It is inserted at the end of the list. ++ */ ++#define prvReaddTaskToReadyList( pxTCB ) \ ++ traceREADDED_TASK_TO_READY_STATE( pxTCB ); \ ++ taskRECORD_READY_PRIORITY( ( pxTCB )->uxPriority ); \ ++ vListInsertEnd( &( pxReadyTasksLists[ ( pxTCB )->uxPriority ] ), &( ( pxTCB )->xStateListItem ) ); \ ++ tracePOST_MOVED_TASK_TO_READY_STATE( pxTCB ) + /*-----------------------------------------------------------*/ + + /* +@@ -1534,7 +1545,7 @@ static void prvAddNewTaskToReadyList( TCB_t *pxNewTCB ) + { + mtCOVERAGE_TEST_MARKER(); + } +- prvAddTaskToReadyList( pxTCB ); ++ prvReaddTaskToReadyList( pxTCB ); + } + else + { +@@ -1596,6 +1607,7 @@ static void prvAddNewTaskToReadyList( TCB_t *pxNewTCB ) + mtCOVERAGE_TEST_MARKER(); + } + ++ traceMOVED_TASK_TO_SUSPENDED_LIST(pxTCB); + vListInsertEnd( &xSuspendedTaskList, &( pxTCB->xStateListItem ) ); + } + taskEXIT_CRITICAL(); +@@ -3576,6 +3588,20 @@ static void prvCheckTasksWaitingTermination( void ) + #endif /* INCLUDE_uxTaskGetStackHighWaterMark */ + /*-----------------------------------------------------------*/ + ++#if (INCLUDE_pxTaskGetStackStart == 1) ++ uint8_t* pxTaskGetStackStart( TaskHandle_t xTask) ++ { ++ TCB_t *pxTCB; ++ UBaseType_t uxReturn; ++ (void)uxReturn; ++ ++ pxTCB = prvGetTCBFromHandle( xTask ); ++ return ( uint8_t * ) pxTCB->pxStack; ++ } ++ ++#endif /* INCLUDE_pxTaskGetStackStart */ ++/*-----------------------------------------------------------*/ ++ + #if ( INCLUDE_vTaskDelete == 1 ) + + static void prvDeleteTCB( TCB_t *pxTCB ) +@@ -3743,7 +3769,7 @@ TCB_t *pxTCB; + + /* Inherit the priority before being moved into the new list. */ + pxTCB->uxPriority = pxCurrentTCB->uxPriority; +- prvAddTaskToReadyList( pxTCB ); ++ prvReaddTaskToReadyList( pxTCB ); + } + else + { +@@ -3815,7 +3841,7 @@ TCB_t *pxTCB; + any other purpose if this task is running, and it must be + running to give back the mutex. */ + listSET_LIST_ITEM_VALUE( &( pxTCB->xEventListItem ), ( TickType_t ) configMAX_PRIORITIES - ( TickType_t ) pxTCB->uxPriority ); /*lint !e961 MISRA exception as the casts are only redundant for some ports. */ +- prvAddTaskToReadyList( pxTCB ); ++ prvReaddTaskToReadyList( pxTCB ); + + /* Return true to indicate that a context switch is required. + This is only actually required in the corner case whereby +@@ -4723,6 +4749,7 @@ const TickType_t xConstTickCount = xTickCount; + /* Add the task to the suspended task list instead of a delayed task + list to ensure it is not woken by a timing event. It will block + indefinitely. */ ++ traceMOVED_TASK_TO_SUSPENDED_LIST(pxCurrentTCB); + vListInsertEnd( &xSuspendedTaskList, &( pxCurrentTCB->xStateListItem ) ); + } + else +@@ -4737,12 +4764,14 @@ const TickType_t xConstTickCount = xTickCount; + + if( xTimeToWake < xConstTickCount ) + { ++ traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST(); + /* Wake time has overflowed. Place this item in the overflow + list. */ + vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); + } + else + { ++ traceMOVED_TASK_TO_DELAYED_LIST(); + /* The wake time has not overflowed, so the current block list + is used. */ + vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); +@@ -4773,11 +4802,13 @@ const TickType_t xConstTickCount = xTickCount; + + if( xTimeToWake < xConstTickCount ) + { ++ traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST(); + /* Wake time has overflowed. Place this item in the overflow list. */ + vListInsert( pxOverflowDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); + } + else + { ++ traceMOVED_TASK_TO_DELAYED_LIST(); + /* The wake time has not overflowed, so the current block list is used. */ + vListInsert( pxDelayedTaskList, &( pxCurrentTCB->xStateListItem ) ); + +-- +2.12.2 + diff --git a/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV9/SEGGER_SYSVIEW_FreeRTOS.c b/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV9/SEGGER_SYSVIEW_FreeRTOS.c new file mode 100644 index 0000000..e92e93a --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV9/SEGGER_SYSVIEW_FreeRTOS.c @@ -0,0 +1,293 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_FreeRTOS.c +Purpose : Interface between FreeRTOS and SystemView. +Revision: $Rev: 7947 $ +*/ +#include "FreeRTOS.h" +#include "task.h" +#include "SEGGER_SYSVIEW.h" +#include "SEGGER_SYSVIEW_FreeRTOS.h" +#include "string.h" // Required for memset + + + +typedef struct SYSVIEW_FREERTOS_TASK_STATUS SYSVIEW_FREERTOS_TASK_STATUS; + +struct SYSVIEW_FREERTOS_TASK_STATUS { + U32 xHandle; + const char* pcTaskName; + unsigned uxCurrentPriority; + U32 pxStack; + unsigned uStackHighWaterMark; +}; + +static SYSVIEW_FREERTOS_TASK_STATUS _aTasks[SYSVIEW_FREERTOS_MAX_NOF_TASKS]; +static unsigned _NumTasks; + +/********************************************************************* +* +* _cbSendTaskList() +* +* Function description +* This function is part of the link between FreeRTOS and SYSVIEW. +* Called from SystemView when asked by the host, it uses SYSVIEW +* functions to send the entire task list to the host. +*/ +static void _cbSendTaskList(void) { + unsigned n; + + for (n = 0; n < _NumTasks; n++) { +#if INCLUDE_uxTaskGetStackHighWaterMark // Report Task Stack High Watermark + _aTasks[n].uStackHighWaterMark = uxTaskGetStackHighWaterMark((TaskHandle_t)_aTasks[n].xHandle); +#endif + SYSVIEW_SendTaskInfo((U32)_aTasks[n].xHandle, _aTasks[n].pcTaskName, (unsigned)_aTasks[n].uxCurrentPriority, (U32)_aTasks[n].pxStack, (unsigned)_aTasks[n].uStackHighWaterMark); + } +} + +/********************************************************************* +* +* _cbGetTime() +* +* Function description +* This function is part of the link between FreeRTOS and SYSVIEW. +* Called from SystemView when asked by the host, returns the +* current system time in micro seconds. +*/ +static U64 _cbGetTime(void) { + U64 Time; + + Time = xTaskGetTickCountFromISR(); + Time *= portTICK_PERIOD_MS; + Time *= 1000; + return Time; +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +/********************************************************************* +* +* SYSVIEW_AddTask() +* +* Function description +* Add a task to the internal list and record its information. +*/ +void SYSVIEW_AddTask(U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark) { + + if (memcmp(pcTaskName, "IDLE", 5) == 0) { + return; + } + + if (_NumTasks >= SYSVIEW_FREERTOS_MAX_NOF_TASKS) { + SEGGER_SYSVIEW_Warn("SYSTEMVIEW: Could not record task information. Maximum number of tasks reached."); + return; + } + + _aTasks[_NumTasks].xHandle = xHandle; + _aTasks[_NumTasks].pcTaskName = pcTaskName; + _aTasks[_NumTasks].uxCurrentPriority = uxCurrentPriority; + _aTasks[_NumTasks].pxStack = pxStack; + _aTasks[_NumTasks].uStackHighWaterMark = uStackHighWaterMark; + + _NumTasks++; + + SYSVIEW_SendTaskInfo(xHandle, pcTaskName,uxCurrentPriority, pxStack, uStackHighWaterMark); + +} + +/********************************************************************* +* +* SYSVIEW_UpdateTask() +* +* Function description +* Update a task in the internal list and record its information. +*/ +void SYSVIEW_UpdateTask(U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark) { + unsigned n; + + if (memcmp(pcTaskName, "IDLE", 5) == 0) { + return; + } + + for (n = 0; n < _NumTasks; n++) { + if (_aTasks[n].xHandle == xHandle) { + break; + } + } + if (n < _NumTasks) { + _aTasks[n].pcTaskName = pcTaskName; + _aTasks[n].uxCurrentPriority = uxCurrentPriority; + _aTasks[n].pxStack = pxStack; + _aTasks[n].uStackHighWaterMark = uStackHighWaterMark; + + SYSVIEW_SendTaskInfo(xHandle, pcTaskName, uxCurrentPriority, pxStack, uStackHighWaterMark); + } else { + SYSVIEW_AddTask(xHandle, pcTaskName, uxCurrentPriority, pxStack, uStackHighWaterMark); + } +} + +/********************************************************************* +* +* SYSVIEW_DeleteTask() +* +* Function description +* Delete a task from the internal list. +*/ +void SYSVIEW_DeleteTask(U32 xHandle) { + unsigned n; + + if (_NumTasks == 0) { + return; // Early out + } + for (n = 0; n < _NumTasks; n++) { + if (_aTasks[n].xHandle == xHandle) { + break; + } + } + if (n == (_NumTasks - 1)) { + // + // Task is last item in list. + // Simply zero the item and decrement number of tasks. + // + memset(&_aTasks[n], 0, sizeof(_aTasks[n])); + _NumTasks--; + } else if (n < _NumTasks) { + // + // Task is in the middle of the list. + // Move last item to current position and decrement number of tasks. + // Order of tasks does not really matter, so no need to move all following items. + // + _aTasks[n].xHandle = _aTasks[_NumTasks - 1].xHandle; + _aTasks[n].pcTaskName = _aTasks[_NumTasks - 1].pcTaskName; + _aTasks[n].uxCurrentPriority = _aTasks[_NumTasks - 1].uxCurrentPriority; + _aTasks[n].pxStack = _aTasks[_NumTasks - 1].pxStack; + _aTasks[n].uStackHighWaterMark = _aTasks[_NumTasks - 1].uStackHighWaterMark; + memset(&_aTasks[_NumTasks - 1], 0, sizeof(_aTasks[_NumTasks - 1])); + _NumTasks--; + } +} + +/********************************************************************* +* +* SYSVIEW_SendTaskInfo() +* +* Function description +* Record task information. +*/ +void SYSVIEW_SendTaskInfo(U32 TaskID, const char* sName, unsigned Prio, U32 StackBase, unsigned StackSize) { + SEGGER_SYSVIEW_TASKINFO TaskInfo; + + memset(&TaskInfo, 0, sizeof(TaskInfo)); // Fill all elements with 0 to allow extending the structure in future version without breaking the code + TaskInfo.TaskID = TaskID; + TaskInfo.sName = sName; + TaskInfo.Prio = Prio; + TaskInfo.StackBase = StackBase; + TaskInfo.StackSize = StackSize; + SEGGER_SYSVIEW_SendTaskInfo(&TaskInfo); +} + +/********************************************************************* +* +* SYSVIEW_RecordU32x4() +* +* Function description +* Record an event with 4 parameters +*/ +void SYSVIEW_RecordU32x4(unsigned Id, U32 Para0, U32 Para1, U32 Para2, U32 Para3) { + U8 aPacket[SEGGER_SYSVIEW_INFO_SIZE + 4 * SEGGER_SYSVIEW_QUANTA_U32]; + U8* pPayload; + // + pPayload = SEGGER_SYSVIEW_PREPARE_PACKET(aPacket); // Prepare the packet for SystemView + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para0); // Add the first parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para1); // Add the second parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para2); // Add the third parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para3); // Add the fourth parameter to the packet + // + SEGGER_SYSVIEW_SendPacket(&aPacket[0], pPayload, Id); // Send the packet +} + +/********************************************************************* +* +* SYSVIEW_RecordU32x5() +* +* Function description +* Record an event with 5 parameters +*/ +void SYSVIEW_RecordU32x5(unsigned Id, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4) { + U8 aPacket[SEGGER_SYSVIEW_INFO_SIZE + 5 * SEGGER_SYSVIEW_QUANTA_U32]; + U8* pPayload; + // + pPayload = SEGGER_SYSVIEW_PREPARE_PACKET(aPacket); // Prepare the packet for SystemView + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para0); // Add the first parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para1); // Add the second parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para2); // Add the third parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para3); // Add the fourth parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para4); // Add the fifth parameter to the packet + // + SEGGER_SYSVIEW_SendPacket(&aPacket[0], pPayload, Id); // Send the packet +} + +/********************************************************************* +* +* Public API structures +* +********************************************************************** +*/ +// Callbacks provided to SYSTEMVIEW by FreeRTOS +const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI = { + _cbGetTime, + _cbSendTaskList, +}; + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV9/SEGGER_SYSVIEW_FreeRTOS.h b/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV9/SEGGER_SYSVIEW_FreeRTOS.h new file mode 100644 index 0000000..43fff65 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/FreeRTOSV9/SEGGER_SYSVIEW_FreeRTOS.h @@ -0,0 +1,313 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_FreeRTOS.h +Purpose : Interface between FreeRTOS and SystemView. +Revision: $Rev: 7745 $ + +Notes: + (1) Include this file at the end of FreeRTOSConfig.h +*/ + +#ifndef SYSVIEW_FREERTOS_H +#define SYSVIEW_FREERTOS_H + +#include "SEGGER_SYSVIEW.h" + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ +#ifndef portSTACK_GROWTH + #define portSTACK_GROWTH ( -1 ) +#endif + +#define SYSVIEW_FREERTOS_MAX_NOF_TASKS 8 + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ +#define apiID_OFFSET (32u) + +#define apiID_VTASKALLOCATEMPUREGIONS (1u) +#define apiID_VTASKDELETE (2u) +#define apiID_VTASKDELAY (3u) +#define apiID_VTASKDELAYUNTIL (4u) +#define apiID_UXTASKPRIORITYGET (5u) +#define apiID_UXTASKPRIORITYGETFROMISR (6u) +#define apiID_ETASKGETSTATE (7u) +#define apiID_VTASKPRIORITYSET (8u) +#define apiID_VTASKSUSPEND (9u) +#define apiID_VTASKRESUME (10u) +#define apiID_XTASKRESUMEFROMISR (11u) +#define apiID_VTASKSTARTSCHEDULER (12u) +#define apiID_VTASKENDSCHEDULER (13u) +#define apiID_VTASKSUSPENDALL (14u) +#define apiID_XTASKRESUMEALL (15u) +#define apiID_XTASKGETTICKCOUNT (16u) +#define apiID_XTASKGETTICKCOUNTFROMISR (17u) +#define apiID_UXTASKGETNUMBEROFTASKS (18u) +#define apiID_PCTASKGETTASKNAME (19u) +#define apiID_UXTASKGETSTACKHIGHWATERMARK (20u) +#define apiID_VTASKSETAPPLICATIONTASKTAG (21u) +#define apiID_XTASKGETAPPLICATIONTASKTAG (22u) +#define apiID_VTASKSETTHREADLOCALSTORAGEPOINTER (23u) +#define apiID_PVTASKGETTHREADLOCALSTORAGEPOINTER (24u) +#define apiID_XTASKCALLAPPLICATIONTASKHOOK (25u) +#define apiID_XTASKGETIDLETASKHANDLE (26u) +#define apiID_UXTASKGETSYSTEMSTATE (27u) +#define apiID_VTASKLIST (28u) +#define apiID_VTASKGETRUNTIMESTATS (29u) +#define apiID_XTASKGENERICNOTIFY (30u) +#define apiID_XTASKGENERICNOTIFYFROMISR (31u) +#define apiID_XTASKNOTIFYWAIT (32u) +#define apiID_VTASKNOTIFYGIVEFROMISR (33u) +#define apiID_ULTASKNOTIFYTAKE (34u) +#define apiID_XTASKNOTIFYSTATECLEAR (35u) +#define apiID_XTASKGETCURRENTTASKHANDLE (36u) +#define apiID_VTASKSETTIMEOUTSTATE (37u) +#define apiID_XTASKCHECKFORTIMEOUT (38u) +#define apiID_VTASKMISSEDYIELD (39u) +#define apiID_XTASKGETSCHEDULERSTATE (40u) +#define apiID_VTASKPRIORITYINHERIT (41u) +#define apiID_XTASKPRIORITYDISINHERIT (42u) +#define apiID_XTASKGENERICCREATE (43u) +#define apiID_UXTASKGETTASKNUMBER (44u) +#define apiID_VTASKSETTASKNUMBER (45u) +#define apiID_VTASKSTEPTICK (46u) +#define apiID_ETASKCONFIRMSLEEPMODESTATUS (47u) +#define apiID_XTIMERCREATE (48u) +#define apiID_PVTIMERGETTIMERID (49u) +#define apiID_VTIMERSETTIMERID (50u) +#define apiID_XTIMERISTIMERACTIVE (51u) +#define apiID_XTIMERGETTIMERDAEMONTASKHANDLE (52u) +#define apiID_XTIMERPENDFUNCTIONCALLFROMISR (53u) +#define apiID_XTIMERPENDFUNCTIONCALL (54u) +#define apiID_PCTIMERGETTIMERNAME (55u) +#define apiID_XTIMERCREATETIMERTASK (56u) +#define apiID_XTIMERGENERICCOMMAND (57u) +#define apiID_XQUEUEGENERICSEND (58u) +#define apiID_XQUEUEPEEKFROMISR (59u) +#define apiID_XQUEUEGENERICRECEIVE (60u) +#define apiID_UXQUEUEMESSAGESWAITING (61u) +#define apiID_UXQUEUESPACESAVAILABLE (62u) +#define apiID_VQUEUEDELETE (63u) +#define apiID_XQUEUEGENERICSENDFROMISR (64u) +#define apiID_XQUEUEGIVEFROMISR (65u) +#define apiID_XQUEUERECEIVEFROMISR (66u) +#define apiID_XQUEUEISQUEUEEMPTYFROMISR (67u) +#define apiID_XQUEUEISQUEUEFULLFROMISR (68u) +#define apiID_UXQUEUEMESSAGESWAITINGFROMISR (69u) +#define apiID_XQUEUEALTGENERICSEND (70u) +#define apiID_XQUEUEALTGENERICRECEIVE (71u) +#define apiID_XQUEUECRSENDFROMISR (72u) +#define apiID_XQUEUECRRECEIVEFROMISR (73u) +#define apiID_XQUEUECRSEND (74u) +#define apiID_XQUEUECRRECEIVE (75u) +#define apiID_XQUEUECREATEMUTEX (76u) +#define apiID_XQUEUECREATECOUNTINGSEMAPHORE (77u) +#define apiID_XQUEUEGETMUTEXHOLDER (78u) +#define apiID_XQUEUETAKEMUTEXRECURSIVE (79u) +#define apiID_XQUEUEGIVEMUTEXRECURSIVE (80u) +#define apiID_VQUEUEADDTOREGISTRY (81u) +#define apiID_VQUEUEUNREGISTERQUEUE (82u) +#define apiID_XQUEUEGENERICCREATE (83u) +#define apiID_XQUEUECREATESET (84u) +#define apiID_XQUEUEADDTOSET (85u) +#define apiID_XQUEUEREMOVEFROMSET (86u) +#define apiID_XQUEUESELECTFROMSET (87u) +#define apiID_XQUEUESELECTFROMSETFROMISR (88u) +#define apiID_XQUEUEGENERICRESET (89u) +#define apiID_VLISTINITIALISE (90u) +#define apiID_VLISTINITIALISEITEM (91u) +#define apiID_VLISTINSERT (92u) +#define apiID_VLISTINSERTEND (93u) +#define apiID_UXLISTREMOVE (94u) +#define apiID_XEVENTGROUPCREATE (95u) +#define apiID_XEVENTGROUPWAITBITS (96u) +#define apiID_XEVENTGROUPCLEARBITS (97u) +#define apiID_XEVENTGROUPCLEARBITSFROMISR (98u) +#define apiID_XEVENTGROUPSETBITS (99u) +#define apiID_XEVENTGROUPSETBITSFROMISR (100u) +#define apiID_XEVENTGROUPSYNC (101u) +#define apiID_XEVENTGROUPGETBITSFROMISR (102u) +#define apiID_VEVENTGROUPDELETE (103u) +#define apiID_UXEVENTGROUPGETNUMBER (104u) + +#define traceTASK_NOTIFY_TAKE() SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_ULTASKNOTIFYTAKE, xClearCountOnExit, xTicksToWait) +#define traceTASK_DELAY() SEGGER_SYSVIEW_RecordU32(apiID_OFFSET + apiID_VTASKDELAY, xTicksToDelay) +#define traceTASK_DELAY_UNTIL(xTimeToWake) SEGGER_SYSVIEW_RecordVoid(apiID_OFFSET + apiID_VTASKDELAYUNTIL) +#define traceTASK_NOTIFY_GIVE_FROM_ISR() SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_VTASKNOTIFYGIVEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB), (U32)pxHigherPriorityTaskWoken) +#define traceTASK_PRIORITY_INHERIT( pxTCB, uxPriority ) SEGGER_SYSVIEW_RecordU32(apiID_OFFSET + apiID_VTASKPRIORITYINHERIT, (U32)pxMutexHolder) +#define traceTASK_RESUME( pxTCB ) SEGGER_SYSVIEW_RecordU32(apiID_OFFSET + apiID_VTASKRESUME, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB)) +#define traceINCREASE_TICK_COUNT( xTicksToJump ) SEGGER_SYSVIEW_RecordU32(apiID_OFFSET + apiID_VTASKSTEPTICK, xTicksToJump) +#define traceTASK_SUSPEND( pxTCB ) SEGGER_SYSVIEW_RecordU32(apiID_OFFSET + apiID_VTASKSUSPEND, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB)) +#define traceTASK_PRIORITY_DISINHERIT( pxTCB, uxBasePriority ) SEGGER_SYSVIEW_RecordU32(apiID_OFFSET + apiID_XTASKPRIORITYDISINHERIT, (U32)pxMutexHolder) +#define traceTASK_RESUME_FROM_ISR( pxTCB ) SEGGER_SYSVIEW_RecordU32(apiID_OFFSET + apiID_XTASKRESUMEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB)) +#define traceTASK_NOTIFY() SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XTASKGENERICNOTIFY, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB), ulValue, eAction, (U32)pulPreviousNotificationValue) +#define traceTASK_NOTIFY_FROM_ISR() SYSVIEW_RecordU32x5(apiID_OFFSET + apiID_XTASKGENERICNOTIFYFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB), ulValue, eAction, (U32)pulPreviousNotificationValue, (U32)pxHigherPriorityTaskWoken) +#define traceTASK_NOTIFY_WAIT() SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XTASKNOTIFYWAIT, ulBitsToClearOnEntry, ulBitsToClearOnExit, (U32)pulNotificationValue, xTicksToWait) + +#define traceQUEUE_CREATE( pxNewQueue ) SEGGER_SYSVIEW_RecordU32x3(apiID_OFFSET + apiID_XQUEUEGENERICCREATE, uxQueueLength, uxItemSize, ucQueueType) +#define traceQUEUE_DELETE( pxQueue ) SEGGER_SYSVIEW_RecordU32(apiID_OFFSET + apiID_VQUEUEDELETE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue)) +#define traceQUEUE_PEEK( pxQueue ) SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICRECEIVE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer), xTicksToWait, xJustPeeking) +#define traceQUEUE_PEEK_FROM_ISR( pxQueue ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XQUEUEPEEKFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer)) +#define traceQUEUE_PEEK_FROM_ISR_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XQUEUEPEEKFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer)) +#define traceQUEUE_RECEIVE( pxQueue ) SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICRECEIVE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer), xTicksToWait, xJustPeeking) +#define traceQUEUE_RECEIVE_FAILED( pxQueue ) SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICRECEIVE, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer), xTicksToWait, xJustPeeking) +#define traceQUEUE_RECEIVE_FROM_ISR( pxQueue ) SEGGER_SYSVIEW_RecordU32x3(apiID_OFFSET + apiID_XQUEUERECEIVEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer), (U32)pxHigherPriorityTaskWoken) +#define traceQUEUE_RECEIVE_FROM_ISR_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x3(apiID_OFFSET + apiID_XQUEUERECEIVEFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), SEGGER_SYSVIEW_ShrinkId((U32)pvBuffer), (U32)pxHigherPriorityTaskWoken) +#define traceQUEUE_REGISTRY_ADD( xQueue, pcQueueName ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_VQUEUEADDTOREGISTRY, SEGGER_SYSVIEW_ShrinkId((U32)xQueue), (U32)pcQueueName) +#if ( configUSE_QUEUE_SETS != 1 ) + #define traceQUEUE_SEND( pxQueue ) SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICSEND, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pvItemToQueue, xTicksToWait, xCopyPosition) +#else + #define traceQUEUE_SEND( pxQueue ) SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICSEND, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), 0, 0, xCopyPosition) +#endif +#define traceQUEUE_SEND_FAILED( pxQueue ) SYSVIEW_RecordU32x4(apiID_OFFSET + apiID_XQUEUEGENERICSEND, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pvItemToQueue, xTicksToWait, xCopyPosition) +#define traceQUEUE_SEND_FROM_ISR( pxQueue ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XQUEUEGENERICSENDFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pxHigherPriorityTaskWoken) +#define traceQUEUE_SEND_FROM_ISR_FAILED( pxQueue ) SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET + apiID_XQUEUEGENERICSENDFROMISR, SEGGER_SYSVIEW_ShrinkId((U32)pxQueue), (U32)pxHigherPriorityTaskWoken) + +#define traceTASK_DELETE( pxTCB ) { \ + SEGGER_SYSVIEW_RecordU32(apiID_OFFSET + apiID_VTASKDELETE, SEGGER_SYSVIEW_ShrinkId((U32)pxTCB)); \ + SYSVIEW_DeleteTask((U32)pxTCB); \ + } + + +#if( portSTACK_GROWTH < 0 ) +#define traceTASK_CREATE(pxNewTCB) if (pxNewTCB != NULL) { \ + SEGGER_SYSVIEW_OnTaskCreate((U32)pxNewTCB); \ + SYSVIEW_AddTask((U32)pxNewTCB, \ + &(pxNewTCB->pcTaskName[0]), \ + pxNewTCB->uxPriority, \ + (U32)pxNewTCB->pxStack, \ + ((U32)pxNewTCB->pxTopOfStack - (U32)pxNewTCB->pxStack) \ + ); \ + } +#else +#define traceTASK_CREATE(pxNewTCB) if (pxNewTCB != NULL) { \ + SEGGER_SYSVIEW_OnTaskCreate((U32)pxNewTCB); \ + SYSVIEW_AddTask((U32)pxNewTCB, \ + &(pxNewTCB->pcTaskName[0]), \ + pxNewTCB->uxPriority, \ + (U32)pxNewTCB->pxStack, \ + (U32)(pxNewTCB->pxStack-pxNewTCB->pxTopOfStack) \ + ); \ + } +#endif +#define traceTASK_PRIORITY_SET(pxTask, uxNewPriority) { \ + SEGGER_SYSVIEW_RecordU32x2(apiID_OFFSET+apiID_VTASKPRIORITYSET, \ + SEGGER_SYSVIEW_ShrinkId((U32)pxTCB), \ + uxNewPriority \ + ); \ + SYSVIEW_UpdateTask((U32)pxTask, \ + &(pxTask->pcTaskName[0]), \ + uxNewPriority, \ + (U32)pxTask->pxStack, \ + 0 \ + ); \ + } +// +// Define INCLUDE_xTaskGetIdleTaskHandle as 1 in FreeRTOSConfig.h to allow identification of Idle state. +// +#if ( INCLUDE_xTaskGetIdleTaskHandle == 1 ) + #define traceTASK_SWITCHED_IN() if(prvGetTCBFromHandle(NULL) == xIdleTaskHandle) { \ + SEGGER_SYSVIEW_OnIdle(); \ + } else { \ + SEGGER_SYSVIEW_OnTaskStartExec((U32)pxCurrentTCB); \ + } +#else + #define traceTASK_SWITCHED_IN() { \ + if (memcmp(pxCurrentTCB->pcTaskName, "IDLE", 5) != 0) { \ + SEGGER_SYSVIEW_OnTaskStartExec((U32)pxCurrentTCB); \ + } else { \ + SEGGER_SYSVIEW_OnIdle(); \ + } \ + } +#endif + +#define traceMOVED_TASK_TO_READY_STATE(pxTCB) SEGGER_SYSVIEW_OnTaskStartReady((U32)pxTCB) +#define traceREADDED_TASK_TO_READY_STATE(pxTCB) + +#define traceMOVED_TASK_TO_DELAYED_LIST() SEGGER_SYSVIEW_OnTaskStopReady((U32)pxCurrentTCB, (1u << 2)) +#define traceMOVED_TASK_TO_OVERFLOW_DELAYED_LIST() SEGGER_SYSVIEW_OnTaskStopReady((U32)pxCurrentTCB, (1u << 2)) +#define traceMOVED_TASK_TO_SUSPENDED_LIST(pxTCB) SEGGER_SYSVIEW_OnTaskStopReady((U32)pxTCB, ((3u << 3) | 3)) + + +#define traceISR_EXIT_TO_SCHEDULER() SEGGER_SYSVIEW_RecordExitISRToScheduler() +#define traceISR_EXIT() SEGGER_SYSVIEW_RecordExitISR() +#define traceISR_ENTER() SEGGER_SYSVIEW_RecordEnterISR() + +/********************************************************************* +* +* API functions +* +********************************************************************** +*/ +#ifdef __cplusplus +extern "C" { +#endif +void SYSVIEW_AddTask (U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark); +void SYSVIEW_UpdateTask (U32 xHandle, const char* pcTaskName, unsigned uxCurrentPriority, U32 pxStack, unsigned uStackHighWaterMark); +void SYSVIEW_DeleteTask (U32 xHandle); +void SYSVIEW_SendTaskInfo (U32 TaskID, const char* sName, unsigned Prio, U32 StackBase, unsigned StackSize); +void SYSVIEW_RecordU32x4 (unsigned Id, U32 Para0, U32 Para1, U32 Para2, U32 Para3); +void SYSVIEW_RecordU32x5 (unsigned Id, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4); + +#ifdef __cplusplus +} +#endif + +#endif + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/MicriumOSKernel/Config/Cortex-M/SEGGER_SYSVIEW_Config_MicriumOSKernel.c b/resources_extra/SystemView_Src_V320/Sample/MicriumOSKernel/Config/Cortex-M/SEGGER_SYSVIEW_Config_MicriumOSKernel.c new file mode 100644 index 0000000..94e6572 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/MicriumOSKernel/Config/Cortex-M/SEGGER_SYSVIEW_Config_MicriumOSKernel.c @@ -0,0 +1,116 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Config_MicriumOSKernel.c +Purpose : Sample setup configuration of SystemView with Micrium + OS Kernel on the Silicon Labs Giant Gecko. +Revision: $Rev: 9599 $ +*/ +#include "SEGGER_SYSVIEW.h" +#include +#include + +#if (defined(OS_CFG_TRACE_EN) && (OS_CFG_TRACE_EN > 0u)) + +extern const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI; + +RTOS_ERR local_err; + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ +// The application name to be displayed in SystemViewer +#define SYSVIEW_APP_NAME "App Name Here" + +// The target device name +#define SYSVIEW_DEVICE_NAME "Dev Name Here" + + + +// Frequency of the timestamp. Must match SEGGER_SYSVIEW_GET_TIMESTAMP in SEGGER_SYSVIEW_Conf.h +#define SYSVIEW_TIMESTAMP_FREQ (CPU_TS_TmrFreqGet(&local_err)) + +// System Frequency. SystemcoreClock is used in most CMSIS compatible projects. +#define SYSVIEW_CPU_FREQ (CPU_TS_TmrFreqGet(&local_err)) + +// The lowest RAM address used for IDs (pointers) +#define SYSVIEW_RAM_BASE (0x20000000) + +/********************************************************************* +* +* _cbSendSystemDesc() +* +* Function description +* Sends SystemView description strings. +*/ +static void _cbSendSystemDesc(void) { + SEGGER_SYSVIEW_SendSysDesc("N="SYSVIEW_APP_NAME",D="SYSVIEW_DEVICE_NAME",O=Micrium OS Kernel"); + SEGGER_SYSVIEW_SendSysDesc("I#15=SysTick IRQ"); + // + SYSVIEW_SendResourceList(); +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +void SEGGER_SYSVIEW_Conf(void) { + SEGGER_SYSVIEW_Init(SYSVIEW_TIMESTAMP_FREQ, SYSVIEW_CPU_FREQ, + &SYSVIEW_X_OS_TraceAPI, _cbSendSystemDesc); + SEGGER_SYSVIEW_SetRAMBase(SYSVIEW_RAM_BASE); +} + +#endif + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/MicriumOSKernel/Config/os_cfg_trace.h b/resources_extra/SystemView_Src_V320/Sample/MicriumOSKernel/Config/os_cfg_trace.h new file mode 100644 index 0000000..1c664da --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/MicriumOSKernel/Config/os_cfg_trace.h @@ -0,0 +1,83 @@ +/* +********************************************************************************************************* +* EXAMPLE CODE +********************************************************************************************************* +* Licensing: +* The licensor of this EXAMPLE CODE is Silicon Laboratories Inc. +* +* Silicon Laboratories Inc. grants you a personal, worldwide, royalty-free, fully paid-up license to +* use, copy, modify and distribute the EXAMPLE CODE software, or portions thereof, in any of your +* products. +* +* Your use of this EXAMPLE CODE is at your own risk. This EXAMPLE CODE does not come with any +* warranties, and the licensor disclaims all implied warranties concerning performance, accuracy, +* non-infringement, merchantability and fitness for your application. +* +* The EXAMPLE CODE is provided "AS IS" and does not come with any support. +* +* You can find user manuals, API references, release notes and more at: https://doc.micrium.com +* +* You can contact us at: https://www.micrium.com +********************************************************************************************************* +*/ + +/* +********************************************************************************************************* +* +* KERNEL TRACE RECORDER CONFIGURATION +* +* CONFIGURATION TEMPLATE FILE +* +* File : os_cfg_trace.h +********************************************************************************************************* +*/ + +/* +********************************************************************************************************* +********************************************************************************************************* +* MODULE +********************************************************************************************************* +********************************************************************************************************* +*/ + +#ifndef _OS_CFG_TRACE_H_ +#define _OS_CFG_TRACE_H_ + + +/* +********************************************************************************************************* +********************************************************************************************************* +* INCLUDE FILES +********************************************************************************************************* +********************************************************************************************************* +*/ + +#include + + +/* +********************************************************************************************************* +********************************************************************************************************* +* TRACE RECORDER RESOURCES +********************************************************************************************************* +********************************************************************************************************* +*/ + +#define OS_CFG_TRACE_MAX_TASK 32 + +#define OS_CFG_TRACE_MAX_RESOURCES 256 + +#define OS_CFG_TRACE_API_ENTER_EN DEF_DISABLED + +#define OS_CFG_TRACE_API_EXIT_EN DEF_DISABLED + + +/* +********************************************************************************************************* +********************************************************************************************************* +* MODULE END +********************************************************************************************************* +********************************************************************************************************* +*/ + +#endif /* End of os_cfg_trace.h module include. */ diff --git a/resources_extra/SystemView_Src_V320/Sample/MicriumOSKernel/SEGGER_SYSVIEW_MicriumOSKernel.c b/resources_extra/SystemView_Src_V320/Sample/MicriumOSKernel/SEGGER_SYSVIEW_MicriumOSKernel.c new file mode 100644 index 0000000..f8056b9 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/MicriumOSKernel/SEGGER_SYSVIEW_MicriumOSKernel.c @@ -0,0 +1,346 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_MicriumOSKernel.c +Purpose : Interface between Micrium OS Kernel and SystemView. +*/ + +#include +#include + +#ifndef SYSVIEW_MEMSET + #include + #define SYSVIEW_MEMSET(p, v, n) memset(p, v, n) +#endif + +#ifndef OS_CFG_TRACE_MAX_RESOURCES +#define OS_CFG_TRACE_MAX_RESOURCES 0 +#endif + +typedef struct SYSVIEW_UCOSIII_TASK_STATUS SYSVIEW_UCOSIII_TASK_STATUS; + +struct SYSVIEW_UCOSIII_TASK_STATUS { + U32 TaskID; + const char* NamePtr; + OS_PRIO Prio; + CPU_STK* StkBasePtr; + CPU_STK_SIZE StkSize; +}; + +typedef struct SYSVIEW_UCOSIII_RESOURCE SYSVIEW_UCOSIII_RESOURCE; + +struct SYSVIEW_UCOSIII_RESOURCE { + U32 ResourceId; + const char* sResource; + U32 Registered; +}; + +static SYSVIEW_UCOSIII_TASK_STATUS _aTasks[OS_CFG_TRACE_MAX_TASK]; +static unsigned _NumTasks; + +#if OS_CFG_TRACE_MAX_RESOURCES > 0 +static SYSVIEW_UCOSIII_RESOURCE _aResources[OS_CFG_TRACE_MAX_RESOURCES]; +static unsigned _NumResources; +#endif + +/********************************************************************* +* +* _cbSendTaskList() +* +* Function description +* This function is part of the link between FreeRTOS and SYSVIEW. +* Called from SystemView when asked by the host, it uses SYSVIEW +* functions to send the entire task list to the host. +*/ +static void _cbSendTaskList(void) { + unsigned n; + + for (n = 0; n < _NumTasks; n++) { + SYSVIEW_SendTaskInfo((U32)_aTasks[n].TaskID, _aTasks[n].NamePtr, (unsigned)_aTasks[n].Prio, (U32)_aTasks[n].StkBasePtr, (unsigned)_aTasks[n].StkSize); + } +} + +/********************************************************************* +* +* _cbGetTime() +* +* Function description +* This function is part of the link between FreeRTOS and SYSVIEW. +* Called from SystemView when asked by the host, returns the +* current system time in micro seconds. +*/ +static U64 _cbGetTime(void) { + RTOS_ERR Err; + OS_TICK Tick; + + Tick = OSTimeGet(&Err); + + if (RTOS_ERR_CODE_GET(Err) != RTOS_ERR_NONE) { + Tick = 0; + } + return Tick * 1000; +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ + +/********************************************************************* +* +* SYSVIEW_TaskReady() +* +* Function description +* Record when a task is ready for execution. +*/ +void SYSVIEW_TaskReady(U32 TaskID) { + if (TaskID != (U32)&OSIdleTaskTCB) { + SEGGER_SYSVIEW_OnTaskStartReady(TaskID); + } +} + +/********************************************************************* +* +* SYSVIEW_TaskSwitchedIn() +* +* Function description +* Record when a task starts/continues execution. +* If the idle task continues, record an on idle event. +*/ +void SYSVIEW_TaskSwitchedIn(U32 TaskID) { + if (TaskID != (U32)&OSIdleTaskTCB) { + SEGGER_SYSVIEW_OnTaskStartExec(TaskID); + } else { + SEGGER_SYSVIEW_OnIdle(); + } +} + +/********************************************************************* +* +* SYSVIEW_TaskSuspend() +* +* Function description +* Record when a task is suspended. +*/ +void SYSVIEW_TaskSuspend(U32 TaskID) { + if (TaskID != (U32)&OSIdleTaskTCB) { + SEGGER_SYSVIEW_OnTaskStopReady(TaskID, (1u << 2)); + } +} + +/********************************************************************* +* +* SYSVIEW_AddTask() +* +* Function description +* Add a task to the internal list and record its information. +*/ +void SYSVIEW_AddTask(U32 TaskID, const char* NamePtr, OS_PRIO Prio, CPU_STK* StkBasePtr, CPU_STK_SIZE StkSize) { + if (TaskID != (U32)&OSIdleTaskTCB) { + if (_NumTasks >= OS_CFG_TRACE_MAX_TASK) { + SEGGER_SYSVIEW_Warn("SYSTEMVIEW: Could not record task information. Maximum number of tasks reached."); + return; + } + + _aTasks[_NumTasks].TaskID = TaskID; + _aTasks[_NumTasks].NamePtr = NamePtr; + _aTasks[_NumTasks].Prio = Prio; + _aTasks[_NumTasks].StkBasePtr = StkBasePtr; + _aTasks[_NumTasks].StkSize = StkSize; + + _NumTasks++; + + SYSVIEW_SendTaskInfo(TaskID, NamePtr, (unsigned)Prio, (U32)StkBasePtr, (unsigned)StkSize); + } +} + +/********************************************************************* +* +* SYSVIEW_UpdateTask() +* +* Function description +* Update a task in the internal list and record its information. +*/ +void SYSVIEW_UpdateTask(U32 TaskID, const char* NamePtr, OS_PRIO Prio, CPU_STK* StkBasePtr, CPU_STK_SIZE StkSize) { + unsigned n; + + if (TaskID != (U32)&OSIdleTaskTCB) { + for (n = 0; n < _NumTasks; n++) { + if (_aTasks[n].TaskID == TaskID) { + break; + } + } + if (n < _NumTasks) { + _aTasks[n].NamePtr = NamePtr; + _aTasks[n].Prio = Prio; + _aTasks[n].StkBasePtr = StkBasePtr; + _aTasks[n].StkSize = StkSize; + + SYSVIEW_SendTaskInfo(TaskID, NamePtr, (unsigned)Prio, (U32)StkBasePtr, (unsigned)StkSize); + } else { + SYSVIEW_AddTask(TaskID, NamePtr, Prio, StkBasePtr, StkSize); + } + } +} + +/********************************************************************* +* +* SYSVIEW_SendTaskInfo() +* +* Function description +* Record task information. +*/ +void SYSVIEW_SendTaskInfo(U32 TaskID, const char* sName, unsigned Prio, U32 StackBase, unsigned StackSize) { + SEGGER_SYSVIEW_TASKINFO TaskInfo; + + // + // Fill all elements with 0 to allow extending the structure in future version without breaking the code + // + SYSVIEW_MEMSET(&TaskInfo, 0, sizeof(TaskInfo)); + TaskInfo.TaskID = TaskID; + TaskInfo.sName = sName; + TaskInfo.Prio = Prio; + TaskInfo.StackBase = StackBase; + TaskInfo.StackSize = StackSize; + SEGGER_SYSVIEW_SendTaskInfo(&TaskInfo); +} + +/********************************************************************* +* +* SYSVIEW_RecordU32x4() +* +* Function description +* Record an event with 4 parameters +*/ +void SYSVIEW_RecordU32x4(unsigned Id, U32 Para0, U32 Para1, U32 Para2, U32 Para3) { + U8 aPacket[SEGGER_SYSVIEW_INFO_SIZE + 4 * SEGGER_SYSVIEW_QUANTA_U32]; + U8* pPayload; + // + pPayload = SEGGER_SYSVIEW_PREPARE_PACKET(aPacket); // Prepare the packet for SystemView + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para0); // Add the first parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para1); // Add the second parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para2); // Add the third parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para3); // Add the fourth parameter to the packet + // + SEGGER_SYSVIEW_SendPacket(&aPacket[0], pPayload, Id); // Send the packet +} + +/********************************************************************* +* +* SYSVIEW_RecordU32x5() +* +* Function description +* Record an event with 5 parameters +*/ +void SYSVIEW_RecordU32x5(unsigned Id, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4) { + U8 aPacket[SEGGER_SYSVIEW_INFO_SIZE + 5 * SEGGER_SYSVIEW_QUANTA_U32]; + U8* pPayload; + // + pPayload = SEGGER_SYSVIEW_PREPARE_PACKET(aPacket); // Prepare the packet for SystemView + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para0); // Add the first parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para1); // Add the second parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para2); // Add the third parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para3); // Add the fourth parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para4); // Add the fifth parameter to the packet + // + SEGGER_SYSVIEW_SendPacket(&aPacket[0], pPayload, Id); // Send the packet +} +/********************************************************************* +* +* SYSVIEW_RecordU32Register() +* +* Function description +* Record an event with 1 parameter and register the resource to be +* sent in the system description. +*/ +void SYSVIEW_RecordU32Register(unsigned EventId, U32 ResourceId, const char* sResource) { + SEGGER_SYSVIEW_NameResource(ResourceId, sResource); + SEGGER_SYSVIEW_RecordU32(EventId, SEGGER_SYSVIEW_ShrinkId(ResourceId)); +#if OS_CFG_TRACE_MAX_RESOURCES > 0 + if (_NumResources >= OS_CFG_TRACE_MAX_RESOURCES) { + SEGGER_SYSVIEW_Warn("SYSTEMVIEW: Could not register resource name. Maximum number of resources reached."); + return; + } + + _aResources[_NumResources].ResourceId = ResourceId; + _aResources[_NumResources].sResource = sResource; + _aResources[_NumResources].Registered = 0; + + _NumResources++; +#endif +} + +void SYSVIEW_SendResourceList(void) { +#if OS_CFG_TRACE_MAX_RESOURCES > 0 + unsigned int n; + + for (n = 0; n < _NumResources; n++) { + if (_aResources[n].Registered == 0) { + SEGGER_SYSVIEW_NameResource(_aResources[n].ResourceId, _aResources[n].sResource); + _aResources[n].Registered = 1; + } + } +#endif +} + +/********************************************************************* +* +* Public API structures +* +********************************************************************** +*/ +// Callbacks provided to SYSTEMVIEW by FreeRTOS +const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI = { + _cbGetTime, + _cbSendTaskList, +}; + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/MicriumOSKernel/os_trace_events.h b/resources_extra/SystemView_Src_V320/Sample/MicriumOSKernel/os_trace_events.h new file mode 100644 index 0000000..ab4113c --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/MicriumOSKernel/os_trace_events.h @@ -0,0 +1,488 @@ +/* +********************************************************************************************************* +* Micrium OS +* Kernel +* +* (c) Copyright 2009; Silicon Laboratories Inc. +* https://www.micrium.com +* +********************************************************************************************************* +* Licensing: +* YOUR USE OF THIS SOFTWARE IS SUBJECT TO THE TERMS OF A MICRIUM SOFTWARE LICENSE. +* If you are not willing to accept the terms of an appropriate Micrium Software License, you must not +* download or use this software for any reason. +* Information about Micrium software licensing is available at https://www.micrium.com/licensing/ +* It is your obligation to select an appropriate license based on your intended use of the Micrium OS. +* Unless you have executed a Micrium Commercial License, your use of the Micrium OS is limited to +* evaluation, educational or personal non-commercial uses. The Micrium OS may not be redistributed or +* disclosed to any third party without the written consent of Silicon Laboratories Inc. +********************************************************************************************************* +* Documentation: +* You can find user manuals, API references, release notes and more at: https://doc.micrium.com +********************************************************************************************************* +* Technical Support: +* Support is available for commercially licensed users of Micrium's software. For additional +* information on support, you can contact info@micrium.com. +********************************************************************************************************* +*/ + +/* +********************************************************************************************************* +* +* KERNEL TRACE EVENTS +* +* File : os_trace_events.h +********************************************************************************************************* +*/ + + +/* +********************************************************************************************************* +********************************************************************************************************* +* MODULE +********************************************************************************************************* +********************************************************************************************************* +*/ + +#ifndef _OS_TRACE_EVENTS_H_ +#define _OS_TRACE_EVENTS_H_ + +#ifdef VSC_INCLUDE_H_FILE_NAMES +const CPU_CHAR *os_trace_events__h = "$Id: $"; +#endif + + +/* +********************************************************************************************************* +********************************************************************************************************* +* INCLUDE FILES +********************************************************************************************************* +********************************************************************************************************* +*/ + +#include +#include +#include "os.h" + + +/* +********************************************************************************************************* +********************************************************************************************************* +* TRACE EVENT MACROS +********************************************************************************************************* +********************************************************************************************************* +*/ + +/* +********************************************************************************************************* +* RECORDER CONTROL +********************************************************************************************************* +*/ + +#if (OS_CFG_TRACE_EN == DEF_ENABLED) +#define OS_TRACE_INIT() SEGGER_SYSVIEW_Conf() +#define OS_TRACE_START() SEGGER_SYSVIEW_Start() +#define OS_TRACE_STOP() SEGGER_SYSVIEW_Stop() +#else +#define OS_TRACE_INIT() +#define OS_TRACE_START() +#define OS_TRACE_STOP() +#endif + + +/* +********************************************************************************************************* +* TRACE EVENT IDS +********************************************************************************************************* +*/ + +#if (OS_CFG_TRACE_EN == DEF_ENABLED) +#define OS_TRACE_ID_OFFSET (32u) + +#define OS_TRACE_ID_TICK_INCREMENT ( 1u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_ISR_REGISTER ( 2u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_TASK_MSG_Q_CREATE ( 3u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_TASK_MSG_Q_POST ( 4u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_TASK_MSG_Q_PEND ( 5u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_TASK_SEM_CREATE ( 6u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_TASK_SEM_POST ( 7u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_TASK_SEM_PEND ( 8u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MUTEX_CREATE ( 9u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MUTEX_DEL (10u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MUTEX_POST (11u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MUTEX_PEND (12u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MUTEX_TASK_PRIO_INHERIT (13u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MUTEX_TASK_PRIO_DISINHERIT (14u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_SEM_CREATE (15u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_SEM_DEL (16u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_SEM_POST (17u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_SEM_PEND (18u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_Q_CREATE (19u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_Q_DEL (20u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_Q_POST (21u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_Q_PEND (22u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_FLAG_CREATE (23u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_FLAG_DEL (24u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_FLAG_POST (25u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_FLAG_PEND (26u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MEM_CREATE (27u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MEM_PUT (28u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MEM_GET (29u + OS_TRACE_ID_OFFSET) +#endif + + +/* +********************************************************************************************************* +* KERNEL RELATED MACROS +********************************************************************************************************* +*/ + +#if (OS_CFG_TRACE_EN == DEF_ENABLED) +#define OS_TRACE_TASK_CREATE(p_tcb) if (p_tcb != 0) { \ + SEGGER_SYSVIEW_OnTaskCreate((U32)p_tcb); \ + SYSVIEW_AddTask((U32)p_tcb, \ + &(p_tcb->NamePtr[0]), \ + p_tcb->Prio, \ + p_tcb->StkBasePtr, \ + p_tcb->StkSize \ + ); \ + } + +#define OS_TRACE_TASK_READY(p_tcb) SYSVIEW_TaskReady((U32)p_tcb) +#define OS_TRACE_TASK_SWITCHED_IN(p_tcb) SYSVIEW_TaskSwitchedIn((U32)p_tcb) +#define OS_TRACE_TASK_DLY(dly_ticks) +#define OS_TRACE_TASK_SUSPEND(p_tcb) +#define OS_TRACE_TASK_SUSPENDED(p_tcb) SYSVIEW_TaskSuspend((U32)p_tcb) +#define OS_TRACE_TASK_RESUME(p_tcb) SYSVIEW_TaskReady((U32)p_tcb) + +#define OS_TRACE_ISR_BEGIN(isr_id) +#define OS_TRACE_ISR_END() + +#define OS_TRACE_ISR_ENTER() SEGGER_SYSVIEW_RecordEnterISR() +#define OS_TRACE_ISR_EXIT() SEGGER_SYSVIEW_RecordExitISR() +#define OS_TRACE_ISR_EXIT_TO_SCHEDULER() SEGGER_SYSVIEW_RecordExitISRToScheduler() + + +/* +********************************************************************************************************* +* SIMPLE RECORDER FUNCTIONS +********************************************************************************************************* +*/ + +#define OS_TRACE_TICK_INCREMENT(OSTickCtr) SEGGER_SYSVIEW_RecordU32 (OS_TRACE_ID_TICK_INCREMENT, (U32)OSTickCtr) +#define OS_TRACE_ISR_REGISTER(isr_id, isr_name, isr_prio) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_ISR_REGISTER, (U32)isr_id, (U32)isr_prio) +#define OS_TRACE_MUTEX_TASK_PRIO_INHERIT(p_tcb, prio) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_MUTEX_TASK_PRIO_INHERIT, SEGGER_SYSVIEW_ShrinkId((U32)p_tcb), (U32)prio) +#define OS_TRACE_MUTEX_TASK_PRIO_DISINHERIT(p_tcb, prio) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_MUTEX_TASK_PRIO_DISINHERIT, SEGGER_SYSVIEW_ShrinkId((U32)p_tcb), (U32)prio) +#define OS_TRACE_TASK_DEL(p_tcb) + + +/* +********************************************************************************************************* +* COMPLEX RECORDER FUNCTIONS +********************************************************************************************************* +*/ + +#define OS_TRACE_MUTEX_CREATE(p_mutex, p_name) SYSVIEW_RecordU32Register(OS_TRACE_ID_MUTEX_CREATE, ((U32)p_mutex), p_name) +#define OS_TRACE_TASK_MSG_Q_CREATE(p_msg_q, p_name) SYSVIEW_RecordU32Register(OS_TRACE_ID_TASK_MSG_Q_CREATE, ((U32)p_msg_q), p_name) +#define OS_TRACE_TASK_SEM_CREATE(p_tcb, p_name) SYSVIEW_RecordU32Register(OS_TRACE_ID_TASK_SEM_CREATE, ((U32)p_tcb), p_name) +#define OS_TRACE_SEM_CREATE(p_sem, p_name) SYSVIEW_RecordU32Register(OS_TRACE_ID_SEM_CREATE, ((U32)p_sem), p_name) +#define OS_TRACE_Q_CREATE(p_q, p_name) SYSVIEW_RecordU32Register(OS_TRACE_ID_Q_CREATE, ((U32)p_q), p_name) +#define OS_TRACE_FLAG_CREATE(p_grp, p_name) SYSVIEW_RecordU32Register(OS_TRACE_ID_FLAG_CREATE, ((U32)p_grp), p_name) +#define OS_TRACE_MEM_CREATE(p_mem, p_name) SYSVIEW_RecordU32Register(OS_TRACE_ID_MEM_CREATE, ((U32)p_mem), p_name) + + +/* +********************************************************************************************************* +* KERNEL API ENTER FUNCTIONS +********************************************************************************************************* +*/ + +#if (OS_CFG_TRACE_API_ENTER_EN == DEF_ENABLED) +#define OS_TRACE_MUTEX_DEL_ENTER(p_mutex, opt) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_MUTEX_DEL, SEGGER_SYSVIEW_ShrinkId((U32)p_mutex), (U32)opt) +#define OS_TRACE_MUTEX_POST_ENTER(p_mutex, opt) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_MUTEX_POST, SEGGER_SYSVIEW_ShrinkId((U32)p_mutex), (U32)opt) +#define OS_TRACE_MUTEX_PEND_ENTER(p_mutex, timeout, opt, p_ts) SEGGER_SYSVIEW_RecordU32x3(OS_TRACE_ID_MUTEX_PEND, SEGGER_SYSVIEW_ShrinkId((U32)p_mutex), (U32)timeout, (U32)opt) +#define OS_TRACE_TASK_MSG_Q_POST_ENTER(p_msg_q, p_void, msg_size, opt) SEGGER_SYSVIEW_RecordU32x3(OS_TRACE_ID_TASK_MSG_Q_POST, SEGGER_SYSVIEW_ShrinkId((U32)p_msg_q), (U32)msg_size, (U32)opt) +#define OS_TRACE_TASK_MSG_Q_PEND_ENTER(p_msg_q, timeout, opt, p_msg_size, p_ts) SEGGER_SYSVIEW_RecordU32x3(OS_TRACE_ID_TASK_MSG_Q_PEND, SEGGER_SYSVIEW_ShrinkId((U32)p_msg_q), (U32)timeout, (U32)opt) +#define OS_TRACE_TASK_SEM_POST_ENTER(p_tcb, opt) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_TASK_SEM_POST, SEGGER_SYSVIEW_ShrinkId((U32)p_tcb), (U32)opt) +#define OS_TRACE_TASK_SEM_PEND_ENTER(p_tcb, timeout, opt, p_ts) SEGGER_SYSVIEW_RecordU32x3(OS_TRACE_ID_TASK_SEM_PEND, SEGGER_SYSVIEW_ShrinkId((U32)p_tcb), (U32)timeout, (U32)opt) +#define OS_TRACE_SEM_DEL_ENTER(p_sem, opt) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_SEM_DEL, SEGGER_SYSVIEW_ShrinkId((U32)p_sem), (U32)opt) +#define OS_TRACE_SEM_POST_ENTER(p_sem, opt) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_SEM_POST, SEGGER_SYSVIEW_ShrinkId((U32)p_sem), (U32)opt) +#define OS_TRACE_SEM_PEND_ENTER(p_sem, timeout, opt, p_ts) SEGGER_SYSVIEW_RecordU32x3(OS_TRACE_ID_SEM_PEND, SEGGER_SYSVIEW_ShrinkId((U32)p_sem), (U32)timeout, (U32)opt) +#define OS_TRACE_Q_DEL_ENTER(p_q, opt) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_Q_DEL, SEGGER_SYSVIEW_ShrinkId((U32)p_q), (U32)opt) +#define OS_TRACE_Q_POST_ENTER(p_q, p_void, msg_size, opt) SEGGER_SYSVIEW_RecordU32x3(OS_TRACE_ID_Q_POST, SEGGER_SYSVIEW_ShrinkId((U32)p_q), (U32)msg_size, (U32)opt) +#define OS_TRACE_Q_PEND_ENTER(p_q, timeout, opt, p_msg_size, p_ts) SEGGER_SYSVIEW_RecordU32x3(OS_TRACE_ID_Q_PEND, SEGGER_SYSVIEW_ShrinkId((U32)p_q), (U32)timeout, (U32)opt) +#define OS_TRACE_FLAG_DEL_ENTER(p_grp, opt) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_FLAG_DEL, SEGGER_SYSVIEW_ShrinkId((U32)p_grp), (U32)opt) +#define OS_TRACE_FLAG_POST_ENTER(p_grp, flags, opt) SEGGER_SYSVIEW_RecordU32x3(OS_TRACE_ID_FLAG_POST, SEGGER_SYSVIEW_ShrinkId((U32)p_grp), (U32)flags, (U32)opt) +#define OS_TRACE_FLAG_PEND_ENTER(p_grp, flags, timeout, opt, p_ts) SYSVIEW_RecordU32x4 (OS_TRACE_ID_FLAG_PEND, SEGGER_SYSVIEW_ShrinkId((U32)p_grp), (U32)flags, (U32)timeout, (U32)opt) +#define OS_TRACE_MEM_PUT_ENTER(p_mem, p_blk) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_MEM_PUT, SEGGER_SYSVIEW_ShrinkId((U32)p_mem), (U32)p_blk) +#define OS_TRACE_MEM_GET_ENTER(p_mem) SEGGER_SYSVIEW_RecordU32 (OS_TRACE_ID_MEM_GET, SEGGER_SYSVIEW_ShrinkId((U32)p_mem)) +#else +#define OS_TRACE_MUTEX_DEL_ENTER(p_mutex, opt) +#define OS_TRACE_MUTEX_POST_ENTER(p_mutex, opt) +#define OS_TRACE_MUTEX_PEND_ENTER(p_mutex, timeout, opt, p_ts) +#define OS_TRACE_TASK_MSG_Q_POST_ENTER(p_msg_q, p_void, msg_size, opt) +#define OS_TRACE_TASK_MSG_Q_PEND_ENTER(p_msg_q, timeout, opt, p_msg_size, p_ts) +#define OS_TRACE_TASK_SEM_POST_ENTER(p_tcb, opt) +#define OS_TRACE_TASK_SEM_PEND_ENTER(p_tcb, timeout, opt, p_ts) +#define OS_TRACE_SEM_DEL_ENTER(p_sem, opt) +#define OS_TRACE_SEM_POST_ENTER(p_sem, opt) +#define OS_TRACE_SEM_PEND_ENTER(p_sem, timeout, opt, p_ts) +#define OS_TRACE_Q_DEL_ENTER(p_q, opt) +#define OS_TRACE_Q_POST_ENTER(p_q, p_void, msg_size, opt) +#define OS_TRACE_Q_PEND_ENTER(p_q, timeout, opt, p_msg_size, p_ts) +#define OS_TRACE_FLAG_DEL_ENTER(p_grp, opt) +#define OS_TRACE_FLAG_POST_ENTER(p_grp, flags, opt) +#define OS_TRACE_FLAG_PEND_ENTER(p_grp, flags, timeout, opt, p_ts) +#define OS_TRACE_MEM_PUT_ENTER(p_mem, p_blk) +#define OS_TRACE_MEM_GET_ENTER(p_mem) +#endif + + +/* +********************************************************************************************************* +* KERNEL API EXIT FUNCTIONS +********************************************************************************************************* +*/ + +#if (OS_CFG_TRACE_API_EXIT_EN == DEF_ENABLED) +#define OS_TRACE_MUTEX_DEL_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallReturnValue (OS_TRACE_ID_MUTEX_DEL, RetVal) +#define OS_TRACE_MUTEX_POST_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallReturnValue (OS_TRACE_ID_MUTEX_POST, RetVal) +#define OS_TRACE_MUTEX_PEND_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallReturnValue (OS_TRACE_ID_MUTEX_PEND, RetVal) +#define OS_TRACE_TASK_MSG_Q_POST_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallReturnValue (OS_TRACE_ID_TASK_MSG_Q_POST, RetVal) +#define OS_TRACE_TASK_MSG_Q_PEND_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallReturnValue (OS_TRACE_ID_TASK_MSG_Q_PEND, RetVal) +#define OS_TRACE_TASK_SEM_POST_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallReturnValue (OS_TRACE_ID_TASK_SEM_POST, RetVal) +#define OS_TRACE_TASK_SEM_PEND_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallReturnValue (OS_TRACE_ID_TASK_SEM_PEND, RetVal) +#define OS_TRACE_SEM_DEL_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallReturnValue (OS_TRACE_ID_SEM_DEL, RetVal) +#define OS_TRACE_SEM_POST_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallReturnValue (OS_TRACE_ID_SEM_POST, RetVal) +#define OS_TRACE_SEM_PEND_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallReturnValue (OS_TRACE_ID_SEM_PEND, RetVal) +#define OS_TRACE_Q_DEL_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallReturnValue (OS_TRACE_ID_Q_DEL, RetVal) +#define OS_TRACE_Q_POST_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallReturnValue (OS_TRACE_ID_Q_POST, RetVal) +#define OS_TRACE_Q_PEND_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallReturnValue (OS_TRACE_ID_Q_PEND, RetVal) +#define OS_TRACE_FLAG_DEL_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallReturnValue (OS_TRACE_ID_FLAG_DEL, RetVal) +#define OS_TRACE_FLAG_POST_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallReturnValue (OS_TRACE_ID_FLAG_POST, RetVal) +#define OS_TRACE_FLAG_PEND_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallReturnValue (OS_TRACE_ID_FLAG_PEND, RetVal) +#define OS_TRACE_MEM_PUT_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallReturnValue (OS_TRACE_ID_MEM_PUT, RetVal) +#define OS_TRACE_MEM_GET_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallReturnValue (OS_TRACE_ID_MEM_GET, RetVal) +#else +#define OS_TRACE_MUTEX_DEL_EXIT(RetVal) +#define OS_TRACE_MUTEX_POST_EXIT(RetVal) +#define OS_TRACE_MUTEX_PEND_EXIT(RetVal) +#define OS_TRACE_TASK_MSG_Q_POST_EXIT(RetVal) +#define OS_TRACE_TASK_MSG_Q_PEND_EXIT(RetVal) +#define OS_TRACE_TASK_SEM_POST_EXIT(RetVal) +#define OS_TRACE_TASK_SEM_PEND_EXIT(RetVal) +#define OS_TRACE_SEM_DEL_EXIT(RetVal) +#define OS_TRACE_SEM_POST_EXIT(RetVal) +#define OS_TRACE_SEM_PEND_EXIT(RetVal) +#define OS_TRACE_Q_DEL_EXIT(RetVal) +#define OS_TRACE_Q_POST_EXIT(RetVal) +#define OS_TRACE_Q_PEND_EXIT(RetVal) +#define OS_TRACE_FLAG_DEL_EXIT(RetVal) +#define OS_TRACE_FLAG_POST_EXIT(RetVal) +#define OS_TRACE_FLAG_PEND_EXIT(RetVal) +#define OS_TRACE_MEM_PUT_EXIT(RetVal) +#define OS_TRACE_MEM_GET_EXIT(RetVal) +#endif + + +/* +********************************************************************************************************* +* UNUSED FUNCTIONS (OTHER RECORDERS) +********************************************************************************************************* +*/ + +#define OS_TRACE_MUTEX_DEL(p_mutex) +#define OS_TRACE_MUTEX_POST(p_mutex) +#define OS_TRACE_MUTEX_PEND(p_mutex) +#define OS_TRACE_TASK_MSG_Q_POST(p_msg_q) +#define OS_TRACE_TASK_MSG_Q_PEND(p_msg_q) +#define OS_TRACE_TASK_SEM_POST(p_tcb) +#define OS_TRACE_TASK_SEM_PEND(p_tcb) +#define OS_TRACE_SEM_DEL(p_sem) +#define OS_TRACE_SEM_POST(p_sem) +#define OS_TRACE_SEM_PEND(p_sem) +#define OS_TRACE_Q_DEL(p_q) +#define OS_TRACE_Q_POST(p_q) +#define OS_TRACE_Q_PEND(p_q) +#define OS_TRACE_FLAG_DEL(p_grp) +#define OS_TRACE_FLAG_POST(p_grp) +#define OS_TRACE_FLAG_PEND(p_grp) +#define OS_TRACE_MEM_PUT(p_mem) +#define OS_TRACE_MEM_GET(p_mem) +#define OS_TRACE_MUTEX_POST_FAILED(p_mutex) +#define OS_TRACE_MUTEX_PEND_FAILED(p_mutex) +#define OS_TRACE_MUTEX_PEND_BLOCK(p_mutex) +#define OS_TRACE_TASK_CREATE_FAILED(p_tcb) +#define OS_TRACE_TASK_MSG_Q_POST_FAILED(p_msg_q) +#define OS_TRACE_TASK_MSG_Q_PEND_FAILED(p_msg_q) +#define OS_TRACE_TASK_MSG_Q_PEND_BLOCK(p_msg_q) +#define OS_TRACE_TASK_SEM_POST_FAILED(p_tcb) +#define OS_TRACE_TASK_SEM_PEND_FAILED(p_tcb) +#define OS_TRACE_TASK_SEM_PEND_BLOCK(p_tcb) +#define OS_TRACE_SEM_POST_FAILED(p_sem) +#define OS_TRACE_SEM_PEND_FAILED(p_sem) +#define OS_TRACE_SEM_PEND_BLOCK(p_sem) +#define OS_TRACE_Q_POST_FAILED(p_q) +#define OS_TRACE_Q_PEND_FAILED(p_q) +#define OS_TRACE_Q_PEND_BLOCK(p_q) +#define OS_TRACE_FLAG_POST_FAILED(p_grp) +#define OS_TRACE_FLAG_PEND_FAILED(p_grp) +#define OS_TRACE_FLAG_PEND_BLOCK(p_grp) +#define OS_TRACE_MEM_PUT_FAILED(p_mem) +#define OS_TRACE_MEM_GET_FAILED(p_mem) +#define OS_TRACE_TASK_PRIO_CHANGE(p_tcb, prio) + +#else /* End of OS_CFG_TRACE_EN == DEF_ENABLED */ + +#define OS_TRACE_TICK_INCREMENT(OSTickCtr) + +#define OS_TRACE_TASK_CREATE(p_tcb) +#define OS_TRACE_TASK_CREATE_FAILED(p_tcb) +#define OS_TRACE_TASK_DEL(p_tcb) +#define OS_TRACE_TASK_READY(p_tcb) +#define OS_TRACE_TASK_SWITCHED_IN(p_tcb) +#define OS_TRACE_TASK_DLY(dly_ticks) +#define OS_TRACE_TASK_SUSPEND(p_tcb) +#define OS_TRACE_TASK_SUSPENDED(p_tcb) +#define OS_TRACE_TASK_RESUME(p_tcb) + +#define OS_TRACE_ISR_BEGIN(isr_id) +#define OS_TRACE_ISR_END() + +#define OS_TRACE_ISR_ENTER() +#define OS_TRACE_ISR_EXIT() +#define OS_TRACE_ISR_EXIT_TO_SCHEDULER() + +#define OS_TRACE_TASK_MSG_Q_CREATE(p_msg_q, p_name) +#define OS_TRACE_TASK_MSG_Q_POST(p_msg_q) +#define OS_TRACE_TASK_MSG_Q_POST_FAILED(p_msg_q) +#define OS_TRACE_TASK_MSG_Q_PEND(p_msg_q) +#define OS_TRACE_TASK_MSG_Q_PEND_FAILED(p_msg_q) +#define OS_TRACE_TASK_MSG_Q_PEND_BLOCK(p_msg_q) + +#define OS_TRACE_TASK_SEM_CREATE(p_tcb, p_name) +#define OS_TRACE_TASK_SEM_POST(p_tcb) +#define OS_TRACE_TASK_SEM_POST_FAILED(p_tcb) +#define OS_TRACE_TASK_SEM_PEND(p_tcb) +#define OS_TRACE_TASK_SEM_PEND_FAILED(p_tcb) +#define OS_TRACE_TASK_SEM_PEND_BLOCK(p_tcb) + +#define OS_TRACE_MUTEX_CREATE(p_mutex, p_name) +#define OS_TRACE_MUTEX_DEL(p_mutex) +#define OS_TRACE_MUTEX_POST(p_mutex) +#define OS_TRACE_MUTEX_POST_FAILED(p_mutex) +#define OS_TRACE_MUTEX_PEND(p_mutex) +#define OS_TRACE_MUTEX_PEND_FAILED(p_mutex) +#define OS_TRACE_MUTEX_PEND_BLOCK(p_mutex) + +#define OS_TRACE_MUTEX_TASK_PRIO_INHERIT(p_tcb, prio) +#define OS_TRACE_MUTEX_TASK_PRIO_DISINHERIT(p_tcb, prio) + +#define OS_TRACE_SEM_CREATE(p_sem, p_name) +#define OS_TRACE_SEM_DEL(p_sem) +#define OS_TRACE_SEM_POST(p_sem) +#define OS_TRACE_SEM_POST_FAILED(p_sem) +#define OS_TRACE_SEM_PEND(p_sem) +#define OS_TRACE_SEM_PEND_FAILED(p_sem) +#define OS_TRACE_SEM_PEND_BLOCK(p_sem) + +#define OS_TRACE_Q_CREATE(p_q, p_name) +#define OS_TRACE_Q_DEL(p_q) +#define OS_TRACE_Q_POST(p_q) +#define OS_TRACE_Q_POST_FAILED(p_q) +#define OS_TRACE_Q_PEND(p_q) +#define OS_TRACE_Q_PEND_FAILED(p_q) +#define OS_TRACE_Q_PEND_BLOCK(p_q) + +#define OS_TRACE_FLAG_CREATE(p_grp, p_name) +#define OS_TRACE_FLAG_DEL(p_grp) +#define OS_TRACE_FLAG_POST(p_grp) +#define OS_TRACE_FLAG_POST_FAILED(p_grp) +#define OS_TRACE_FLAG_PEND(p_grp) +#define OS_TRACE_FLAG_PEND_FAILED(p_grp) +#define OS_TRACE_FLAG_PEND_BLOCK(p_grp) + +#define OS_TRACE_MEM_CREATE(p_mem, p_name) +#define OS_TRACE_MEM_PUT(p_mem) +#define OS_TRACE_MEM_PUT_FAILED(p_mem) +#define OS_TRACE_MEM_GET(p_mem) +#define OS_TRACE_MEM_GET_FAILED(p_mem) + +#define OS_TRACE_TASK_PRIO_CHANGE(p_tcb, prio) + +#define OS_TRACE_MUTEX_DEL_ENTER(p_mutex, opt) +#define OS_TRACE_MUTEX_POST_ENTER(p_mutex, opt) +#define OS_TRACE_MUTEX_PEND_ENTER(p_mutex, timeout, opt, p_ts) +#define OS_TRACE_TASK_MSG_Q_POST_ENTER(p_msg_q, p_void, msg_size, opt) +#define OS_TRACE_TASK_MSG_Q_PEND_ENTER(p_msg_q, timeout, opt, p_msg_size, p_ts) +#define OS_TRACE_TASK_SEM_POST_ENTER(p_tcb, opt) +#define OS_TRACE_TASK_SEM_PEND_ENTER(p_tcb, timeout, opt, p_ts) +#define OS_TRACE_SEM_DEL_ENTER(p_sem, opt) +#define OS_TRACE_SEM_POST_ENTER(p_sem, opt) +#define OS_TRACE_SEM_PEND_ENTER(p_sem, timeout, opt, p_ts) +#define OS_TRACE_Q_DEL_ENTER(p_q, opt) +#define OS_TRACE_Q_POST_ENTER(p_q, p_void, msg_size, opt) +#define OS_TRACE_Q_PEND_ENTER(p_q, timeout, opt, p_msg_size, p_ts) +#define OS_TRACE_FLAG_DEL_ENTER(p_grp, opt) +#define OS_TRACE_FLAG_POST_ENTER(p_grp, flags, opt) +#define OS_TRACE_FLAG_PEND_ENTER(p_grp, flags, timeout, opt, p_ts) +#define OS_TRACE_MEM_PUT_ENTER(p_mem, p_blk) +#define OS_TRACE_MEM_GET_ENTER(p_mem) + +#define OS_TRACE_MUTEX_DEL_EXIT(RetVal) +#define OS_TRACE_MUTEX_POST_EXIT(RetVal) +#define OS_TRACE_MUTEX_PEND_EXIT(RetVal) +#define OS_TRACE_TASK_MSG_Q_POST_EXIT(RetVal) +#define OS_TRACE_TASK_MSG_Q_PEND_EXIT(RetVal) +#define OS_TRACE_TASK_SEM_POST_EXIT(RetVal) +#define OS_TRACE_TASK_SEM_PEND_EXIT(RetVal) +#define OS_TRACE_SEM_DEL_EXIT(RetVal) +#define OS_TRACE_SEM_POST_EXIT(RetVal) +#define OS_TRACE_SEM_PEND_EXIT(RetVal) +#define OS_TRACE_Q_DEL_EXIT(RetVal) +#define OS_TRACE_Q_POST_EXIT(RetVal) +#define OS_TRACE_Q_PEND_EXIT(RetVal) +#define OS_TRACE_FLAG_DEL_EXIT(RetVal) +#define OS_TRACE_FLAG_POST_EXIT(RetVal) +#define OS_TRACE_FLAG_PEND_EXIT(RetVal) +#define OS_TRACE_MEM_PUT_EXIT(RetVal) +#define OS_TRACE_MEM_GET_EXIT(RetVal) + +#endif + + +/* +********************************************************************************************************* +* RECORDER API FUNCTIONS +********************************************************************************************************* +*/ + +#ifdef __cplusplus +extern "C" { +#endif +void SYSVIEW_TaskReady (U32 TaskID); +void SYSVIEW_TaskSwitchedIn (U32 TaskID); +void SYSVIEW_TaskSuspend (U32 TaskID); +void SYSVIEW_AddTask (U32 TaskID, const char* NamePtr, OS_PRIO Prio, CPU_STK* StkBasePtr, CPU_STK_SIZE StkSize); +void SYSVIEW_UpdateTask (U32 TaskID, const char* NamePtr, OS_PRIO Prio, CPU_STK* StkBasePtr, CPU_STK_SIZE StkSize); +void SYSVIEW_SendTaskInfo (U32 TaskID, const char* sName, unsigned Prio, U32 StackBase, unsigned StackSize); +void SYSVIEW_RecordU32x4 (unsigned Id, U32 Para0, U32 Para1, U32 Para2, U32 Para3); +void SYSVIEW_RecordU32x5 (unsigned Id, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4); + +void SYSVIEW_RecordU32Register(unsigned EventId, U32 ResourceId, const char* sResource); +void SYSVIEW_SendResourceList (void); + +#ifdef __cplusplus +} +#endif + + +/* +********************************************************************************************************* +********************************************************************************************************* +* MODULE END +********************************************************************************************************* +********************************************************************************************************* +*/ + +#endif /* End of Kernel trace events module include. */ diff --git a/resources_extra/SystemView_Src_V320/Sample/NoOS/Config/Cortex-M/SEGGER_SYSVIEW_Config_NoOS.c b/resources_extra/SystemView_Src_V320/Sample/NoOS/Config/Cortex-M/SEGGER_SYSVIEW_Config_NoOS.c new file mode 100644 index 0000000..353a5a1 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/NoOS/Config/Cortex-M/SEGGER_SYSVIEW_Config_NoOS.c @@ -0,0 +1,147 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Config_NoOS.c +Purpose : Sample setup configuration of SystemView without an OS. +Revision: $Rev: 9599 $ +*/ +#include "SEGGER_SYSVIEW.h" +#include "SEGGER_SYSVIEW_Conf.h" + +// SystemcoreClock can be used in most CMSIS compatible projects. +// In non-CMSIS projects define SYSVIEW_CPU_FREQ. +extern unsigned int SystemCoreClock; + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ +// The application name to be displayed in SystemViewer +#define SYSVIEW_APP_NAME "Demo Application" + +// The target device name +#define SYSVIEW_DEVICE_NAME "Cortex-M4" + +// Frequency of the timestamp. Must match SEGGER_SYSVIEW_Conf.h +#define SYSVIEW_TIMESTAMP_FREQ (SystemCoreClock) + +// System Frequency. SystemcoreClock is used in most CMSIS compatible projects. +#define SYSVIEW_CPU_FREQ (SystemCoreClock) + +// The lowest RAM address used for IDs (pointers) +#define SYSVIEW_RAM_BASE (0x10000000) + +// Define as 1 if the Cortex-M cycle counter is used as SystemView timestamp. Must match SEGGER_SYSVIEW_Conf.h +#ifndef USE_CYCCNT_TIMESTAMP + #define USE_CYCCNT_TIMESTAMP 1 +#endif + +// Define as 1 if the Cortex-M cycle counter is used and there might be no debugger attached while recording. +#ifndef ENABLE_DWT_CYCCNT + #define ENABLE_DWT_CYCCNT (USE_CYCCNT_TIMESTAMP & SEGGER_SYSVIEW_POST_MORTEM_MODE) +#endif + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ +#define DEMCR (*(volatile unsigned long*) (0xE000EDFCuL)) // Debug Exception and Monitor Control Register +#define TRACEENA_BIT (1uL << 24) // Trace enable bit +#define DWT_CTRL (*(volatile unsigned long*) (0xE0001000uL)) // DWT Control Register +#define NOCYCCNT_BIT (1uL << 25) // Cycle counter support bit +#define CYCCNTENA_BIT (1uL << 0) // Cycle counter enable bit + +/********************************************************************* +* +* _cbSendSystemDesc() +* +* Function description +* Sends SystemView description strings. +*/ +static void _cbSendSystemDesc(void) { + SEGGER_SYSVIEW_SendSysDesc("N="SYSVIEW_APP_NAME",D="SYSVIEW_DEVICE_NAME); + SEGGER_SYSVIEW_SendSysDesc("I#15=SysTick"); +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +void SEGGER_SYSVIEW_Conf(void) { +#if USE_CYCCNT_TIMESTAMP +#if ENABLE_DWT_CYCCNT + // + // If no debugger is connected, the DWT must be enabled by the application + // + if ((DEMCR & TRACEENA_BIT) == 0) { + DEMCR |= TRACEENA_BIT; + } +#endif + // + // The cycle counter must be activated in order + // to use time related functions. + // + if ((DWT_CTRL & NOCYCCNT_BIT) == 0) { // Cycle counter supported? + if ((DWT_CTRL & CYCCNTENA_BIT) == 0) { // Cycle counter not enabled? + DWT_CTRL |= CYCCNTENA_BIT; // Enable Cycle counter + } + } +#endif + SEGGER_SYSVIEW_Init(SYSVIEW_TIMESTAMP_FREQ, SYSVIEW_CPU_FREQ, + 0, _cbSendSystemDesc); + SEGGER_SYSVIEW_SetRAMBase(SYSVIEW_RAM_BASE); +} + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/NoOS/Config/Cortex-M0/SEGGER_SYSVIEW_Config_NoOS_CM0.c b/resources_extra/SystemView_Src_V320/Sample/NoOS/Config/Cortex-M0/SEGGER_SYSVIEW_Config_NoOS_CM0.c new file mode 100644 index 0000000..40818f1 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/NoOS/Config/Cortex-M0/SEGGER_SYSVIEW_Config_NoOS_CM0.c @@ -0,0 +1,232 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Config_NoOS.c +Purpose : Sample setup configuration of SystemView without an OS for Cortex-M0. +Revision: $Rev: 18540 $ +*/ +#include "SEGGER_SYSVIEW.h" +#include "SEGGER_SYSVIEW_Conf.h" + +// SystemcoreClock can be used in most CMSIS compatible projects. +// In non-CMSIS projects define SYSVIEW_CPU_FREQ. +extern unsigned int SystemCoreClock; +extern unsigned int SEGGER_SYSVIEW_TickCnt; + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ +#define SCB_ICSR (*(volatile U32*) (0xE000ED04uL)) // Interrupt Control State Register +#define SCB_ICSR_PENDSTSET_MASK (1UL << 26) // SysTick pending bit +#define SYST_RVR (*(volatile U32*) (0xE000E014uL)) // SysTick Reload Value Register +#define SYST_CVR (*(volatile U32*) (0xE000E018uL)) // SysTick Current Value Register + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ +// The application name to be displayed in SystemViewer +#define SYSVIEW_APP_NAME "Demo Application" + +// The target device name +#define SYSVIEW_DEVICE_NAME "Cortex-M0" + +// Frequency of the timestamp. Must match SEGGER_SYSVIEW_Conf.h +#define SYSVIEW_TIMESTAMP_FREQ (SystemCoreClock) + +// System Frequency. SystemcoreClock is used in most CMSIS compatible projects. +#define SYSVIEW_CPU_FREQ (SystemCoreClock) + +// The lowest RAM address used for IDs (pointers) +#define SYSVIEW_RAM_BASE (0x10000000) + +// Define as 1 if the Cortex-M cycle counter is used as SystemView timestamp. Must match SEGGER_SYSVIEW_Conf.h +#ifndef USE_CYCCNT_TIMESTAMP + #define USE_CYCCNT_TIMESTAMP 1 +#endif + +// Define as 1 if the Cortex-M cycle counter is used and there might be no debugger attached while recording. +#ifndef ENABLE_DWT_CYCCNT + #define ENABLE_DWT_CYCCNT (USE_CYCCNT_TIMESTAMP & SEGGER_SYSVIEW_POST_MORTEM_MODE) +#endif + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ +#define DEMCR (*(volatile unsigned long*) (0xE000EDFCuL)) // Debug Exception and Monitor Control Register +#define TRACEENA_BIT (1uL << 24) // Trace enable bit +#define DWT_CTRL (*(volatile unsigned long*) (0xE0001000uL)) // DWT Control Register +#define NOCYCCNT_BIT (1uL << 25) // Cycle counter support bit +#define CYCCNTENA_BIT (1uL << 0) // Cycle counter enable bit + +/********************************************************************* +* +* _cbSendSystemDesc() +* +* Function description +* Sends SystemView description strings. +*/ +static void _cbSendSystemDesc(void) { + SEGGER_SYSVIEW_SendSysDesc("N="SYSVIEW_APP_NAME",D="SYSVIEW_DEVICE_NAME); + SEGGER_SYSVIEW_SendSysDesc("I#15=SysTick"); +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +void SEGGER_SYSVIEW_Conf(void) { +#if USE_CYCCNT_TIMESTAMP +#if ENABLE_DWT_CYCCNT + // + // If no debugger is connected, the DWT must be enabled by the application + // + if ((DEMCR & TRACEENA_BIT) == 0) { + DEMCR |= TRACEENA_BIT; + } +#endif + // + // The cycle counter must be activated in order + // to use time related functions. + // + if ((DWT_CTRL & NOCYCCNT_BIT) == 0) { // Cycle counter supported? + if ((DWT_CTRL & CYCCNTENA_BIT) == 0) { // Cycle counter not enabled? + DWT_CTRL |= CYCCNTENA_BIT; // Enable Cycle counter + } + } +#endif + SEGGER_SYSVIEW_Init(SYSVIEW_TIMESTAMP_FREQ, SYSVIEW_CPU_FREQ, + 0, _cbSendSystemDesc); + SEGGER_SYSVIEW_SetRAMBase(SYSVIEW_RAM_BASE); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_X_GetTimestamp() +* +* Function description +* Returns the current timestamp in ticks using the system tick +* count and the SysTick counter. +* All parameters of the SysTick have to be known and are set via +* configuration defines on top of the file. +* +* Return value +* The current timestamp. +* +* Additional information +* SEGGER_SYSVIEW_X_GetTimestamp is always called when interrupts are +* disabled. Therefore locking here is not required. +*/ +U32 SEGGER_SYSVIEW_X_GetTimestamp(void) { +#if USE_CYCCNT_TIMESTAMP + U32 TickCount; + U32 Cycles; + U32 CyclesPerTick; + // + // Get the cycles of the current system tick. + // SysTick is down-counting, subtract the current value from the number of cycles per tick. + // + CyclesPerTick = SYST_RVR + 1; + Cycles = (CyclesPerTick - SYST_CVR); + // + // Get the system tick count. + // + TickCount = SEGGER_SYSVIEW_TickCnt; + // + // If a SysTick interrupt is pending, re-read timer and adjust result + // + if ((SCB_ICSR & SCB_ICSR_PENDSTSET_MASK) != 0) { + Cycles = (CyclesPerTick - SYST_CVR); + TickCount++; + } + Cycles += TickCount * CyclesPerTick; + + return Cycles; +#endif +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_X_GetInterruptId() +* +* Function description +* Return the currently active interrupt Id, +* which ist the active vector taken from IPSR[5:0]. +* +* Return value +* The current currently active interrupt Id. +* +* Additional information +* This function is not used by default, as the active vector can be +* read from ICSR instead on Cortex-M0. +* For Cortex-M0+ devices, change SEGGER_SYSVIEW_GET_INTERRUPT_ID +* in SEGGER_SYSVIEW_Conf.h to call this function instead. +*/ +U32 SEGGER_SYSVIEW_X_GetInterruptId(void) { + U32 Id; + + __asm volatile ("mrs %0, ipsr" + : "=r" (Id) + ); + Id &= 0x3F; + + return Id; +} + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/NoOS/Config/RX/SEGGER_SYSVIEW_Config_NoOS_RX.c b/resources_extra/SystemView_Src_V320/Sample/NoOS/Config/RX/SEGGER_SYSVIEW_Config_NoOS_RX.c new file mode 100644 index 0000000..83be62c --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/NoOS/Config/RX/SEGGER_SYSVIEW_Config_NoOS_RX.c @@ -0,0 +1,211 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Config_NoOS_RX.c +Purpose : Sample setup configuration of SystemView on Renesas RX + systems without an operating system. +Revision: $Rev: 18540 $ +*/ +#include "RTOS.h" +#include "SEGGER_SYSVIEW.h" +#include "SEGGER_SYSVIEW_embOS.h" + +// +// SystemcoreClock can be used in most CMSIS compatible projects. +// In non-CMSIS projects define SYSVIEW_CPU_FREQ directly. +// +extern unsigned int SystemCoreClock; + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ +// The application name to be displayed in SystemViewer +#ifndef SYSVIEW_APP_NAME + #define SYSVIEW_APP_NAME "Demo Application" +#endif + +// The target device name +#ifndef SYSVIEW_DEVICE_NAME + #define SYSVIEW_DEVICE_NAME "RX64M" +#endif + +// System Frequency. SystemcoreClock is used in most CMSIS compatible projects. +#ifndef SYSVIEW_CPU_FREQ + #define SYSVIEW_CPU_FREQ (SystemCoreClock) +#endif + +// Frequency of the timestamp. Must match SEGGER_SYSVIEW_Conf.h and RTOSInit.c +#ifndef SYSVIEW_TIMESTAMP_FREQ + #define SYSVIEW_TIMESTAMP_FREQ (SYSVIEW_CPU_FREQ/2u/8u) // Assume system timer runs at 1/16th of the CPU frequency +#endif + +// The lowest RAM address used for IDs (pointers) +#ifndef SYSVIEW_RAM_BASE + #define SYSVIEW_RAM_BASE (0) +#endif + +#ifndef SYSVIEW_SYSDESC0 + #define SYSVIEW_SYSDESC0 "I#0=IntPrio0,I#1=IntPrio1,I#2=IntPrio2,I#3=IntPrio3,I#4=IntPrio4" +#endif + +//#ifndef SYSVIEW_SYSDESC1 +// #define SYSVIEW_SYSDESC1 "I#5=IntPrio5,I#6=IntPrio6,I#7=IntPrio7,I#8=IntPrio8,I#9=IntPrio9,I#10=IntPrio10" +//#endif + +//#ifndef SYSVIEW_SYSDESC2 +// #define SYSVIEW_SYSDESC2 "I#11=IntPrio11,I#12=IntPrio12,I#13=IntPrio13,I#14=IntPrio14,I#15=IntPrio15" +//#endif + +// System Timer configuration +#define IRR_BASE_ADDR (0x00087000u) +#define CMT0_VECT 28u +#define OS_TIMER_VECT CMT0_VECT +#define TIMER_PRESCALE (8u) +#define CMT0_BASE_ADDR (0x00088000u) +#define CMT0_CMCNT (*(volatile U16*) (CMT0_BASE_ADDR + 0x04u)) + +extern unsigned SEGGER_SYSVIEW_TickCnt; // Tick Counter value incremented in the tick handler. + +/********************************************************************* +* +* _cbSendSystemDesc() +* +* Function description +* Sends SystemView description strings. +*/ +static void _cbSendSystemDesc(void) { + SEGGER_SYSVIEW_SendSysDesc("N="SYSVIEW_APP_NAME",D="SYSVIEW_DEVICE_NAME); +#ifdef SYSVIEW_SYSDESC0 + SEGGER_SYSVIEW_SendSysDesc(SYSVIEW_SYSDESC0); +#endif +#ifdef SYSVIEW_SYSDESC1 + SEGGER_SYSVIEW_SendSysDesc(SYSVIEW_SYSDESC1); +#endif +#ifdef SYSVIEW_SYSDESC2 + SEGGER_SYSVIEW_SendSysDesc(SYSVIEW_SYSDESC2); +#endif +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +void SEGGER_SYSVIEW_Conf(void) { + SEGGER_SYSVIEW_Init(SYSVIEW_TIMESTAMP_FREQ, SYSVIEW_CPU_FREQ, + 0, _cbSendSystemDesc); + SEGGER_SYSVIEW_SetRAMBase(SYSVIEW_RAM_BASE); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_X_GetTimestamp() +* +* Function description +* Returns the current timestamp in ticks using the system tick +* count and the SysTick counter. +* All parameters of the SysTick have to be known and are set via +* configuration defines on top of the file. +* +* Return value +* The current timestamp. +* +* Additional information +* SEGGER_SYSVIEW_X_GetTimestamp is always called when interrupts are +* disabled. +* Therefore locking here is not required and OS_GetTime_Cycles() may +* be called. +*/ +U32 SEGGER_SYSVIEW_X_GetTimestamp(void) { + U32 Time; + U32 Cnt; + + Time = SEGGER_SYSVIEW_TickCnt; + Cnt = CMT0_CMCNT; + // + // Check if timer interrupt pending ... + // + if ((*(volatile U8*)(IRR_BASE_ADDR + OS_TIMER_VECT) & (1u << 0u)) != 0u) { + Cnt = CMT0_CMCNT; // Interrupt pending, re-read timer and adjust result + Time++; + } + return ((SYSVIEW_TIMESTAMP_FREQ/1000) * Time) + Cnt; +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_X_GetInterruptId() +* +* Function description +* Return the priority of the currently active interrupt. +*/ +U32 SEGGER_SYSVIEW_X_GetInterruptId(void) { + U32 IntId; + __asm volatile ("mvfc PSW, %0 \t\n" // Load current PSW + "and #0x0F000000, %0 \t\n" // Clear all except IPL ([27:24]) + "shlr #24, %0 \t\n" // Shift IPL to [3:0] + : "=r" (IntId) // Output result + : // Input + : // Clobbered list + ); + return IntId; +} + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/RTT/Main_RTT_InputEchoApp.c b/resources_extra/SystemView_Src_V320/Sample/RTT/Main_RTT_InputEchoApp.c new file mode 100644 index 0000000..619cc9a --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/RTT/Main_RTT_InputEchoApp.c @@ -0,0 +1,79 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +--------- END-OF-HEADER -------------------------------------------- +File : Main_RTT_MenuApp.c +Purpose : Sample application to demonstrate RTT bi-directional functionality +*/ + +#define MAIN_C + +#include + +#include "SEGGER_RTT.h" + +volatile int _Cnt; +volatile int _Delay; + +static char r; + +/********************************************************************* +* +* main +*/ +void main(void) { + + SEGGER_RTT_WriteString(0, "SEGGER Real-Time-Terminal Sample\r\n"); + SEGGER_RTT_ConfigUpBuffer(0, NULL, NULL, 0, SEGGER_RTT_MODE_NO_BLOCK_SKIP); + do { + r = SEGGER_RTT_WaitKey(); + SEGGER_RTT_Write(0, &r, 1); + r++; + } while (1); +} + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/RTT/Main_RTT_MenuApp.c b/resources_extra/SystemView_Src_V320/Sample/RTT/Main_RTT_MenuApp.c new file mode 100644 index 0000000..0a13cc1 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/RTT/Main_RTT_MenuApp.c @@ -0,0 +1,107 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +--------- END-OF-HEADER -------------------------------------------- +File : Main_RTT_MenuApp.c +Purpose : Sample application to demonstrate RTT bi-directional functionality +*/ + +#define MAIN_C + +#include + +#include "SEGGER_RTT.h" + +volatile int _Cnt; +volatile int _Delay; + +/********************************************************************* +* +* main +*/ +void main(void) { + int r; + int CancelOp; + + do { + _Cnt = 0; + + SEGGER_RTT_WriteString(0, "SEGGER Real-Time-Terminal Sample\r\n"); + SEGGER_RTT_WriteString(0, "Press <1> to continue in blocking mode (Application waits if necessary, no data lost)\r\n"); + SEGGER_RTT_WriteString(0, "Press <2> to continue in non-blocking mode (Application does not wait, data lost if fifo full)\r\n"); + do { + r = SEGGER_RTT_WaitKey(); + } while ((r != '1') && (r != '2')); + if (r == '1') { + SEGGER_RTT_WriteString(0, "\r\nSelected <1>. Configuring RTT and starting...\r\n"); + SEGGER_RTT_ConfigUpBuffer(0, NULL, NULL, 0, SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL); + } else { + SEGGER_RTT_WriteString(0, "\r\nSelected <2>. Configuring RTT and starting...\r\n"); + SEGGER_RTT_ConfigUpBuffer(0, NULL, NULL, 0, SEGGER_RTT_MODE_NO_BLOCK_SKIP); + } + CancelOp = 0; + do { + //for (_Delay = 0; _Delay < 10000; _Delay++); + SEGGER_RTT_printf(0, "Count: %d. Press to get back to menu.\r\n", _Cnt++); + r = SEGGER_RTT_HasKey(); + if (r) { + CancelOp = (SEGGER_RTT_GetKey() == ' ') ? 1 : 0; + } + // + // Check if user selected to cancel the current operation + // + if (CancelOp) { + SEGGER_RTT_WriteString(0, "Operation cancelled, going back to menu...\r\n"); + break; + } + } while (1); + SEGGER_RTT_GetKey(); + SEGGER_RTT_WriteString(0, "\r\n"); + } while (1); +} + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/RTT/Main_RTT_PrintfTest.c b/resources_extra/SystemView_Src_V320/Sample/RTT/Main_RTT_PrintfTest.c new file mode 100644 index 0000000..33a7a48 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/RTT/Main_RTT_PrintfTest.c @@ -0,0 +1,154 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +--------- END-OF-HEADER -------------------------------------------- +File : Main_RTT_MenuApp.c +Purpose : Sample application to demonstrate RTT bi-directional functionality +*/ + +#define MAIN_C + +#include + +#include "SEGGER_RTT.h" + +volatile int _Cnt; + +/********************************************************************* +* +* main +*/ +void main(void) { + + SEGGER_RTT_ConfigUpBuffer(0, NULL, NULL, 0, SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL); + + SEGGER_RTT_WriteString(0, "SEGGER Real-Time-Terminal Sample\r\n\r\n"); + SEGGER_RTT_WriteString(0, "###### Testing SEGGER_printf() ######\r\n"); + + SEGGER_RTT_printf(0, "printf Test: %%c, 'S' : %c.\r\n", 'S'); + SEGGER_RTT_printf(0, "printf Test: %%5c, 'E' : %5c.\r\n", 'E'); + SEGGER_RTT_printf(0, "printf Test: %%-5c, 'G' : %-5c.\r\n", 'G'); + SEGGER_RTT_printf(0, "printf Test: %%5.3c, 'G' : %-5c.\r\n", 'G'); + SEGGER_RTT_printf(0, "printf Test: %%.3c, 'E' : %-5c.\r\n", 'E'); + SEGGER_RTT_printf(0, "printf Test: %%c, 'R' : %c.\r\n", 'R'); + + SEGGER_RTT_printf(0, "printf Test: %%s, \"RTT\" : %s.\r\n", "RTT"); + SEGGER_RTT_printf(0, "printf Test: %%s, \"RTT\\r\\nRocks.\" : %s.\r\n", "RTT\r\nRocks."); + + SEGGER_RTT_printf(0, "printf Test: %%u, 12345 : %u.\r\n", 12345); + SEGGER_RTT_printf(0, "printf Test: %%+u, 12345 : %+u.\r\n", 12345); + SEGGER_RTT_printf(0, "printf Test: %%.3u, 12345 : %.3u.\r\n", 12345); + SEGGER_RTT_printf(0, "printf Test: %%.6u, 12345 : %.6u.\r\n", 12345); + SEGGER_RTT_printf(0, "printf Test: %%6.3u, 12345 : %6.3u.\r\n", 12345); + SEGGER_RTT_printf(0, "printf Test: %%8.6u, 12345 : %8.6u.\r\n", 12345); + SEGGER_RTT_printf(0, "printf Test: %%08u, 12345 : %08u.\r\n", 12345); + SEGGER_RTT_printf(0, "printf Test: %%08.6u, 12345 : %08.6u.\r\n", 12345); + SEGGER_RTT_printf(0, "printf Test: %%0u, 12345 : %0u.\r\n", 12345); + SEGGER_RTT_printf(0, "printf Test: %%-.6u, 12345 : %-.6u.\r\n", 12345); + SEGGER_RTT_printf(0, "printf Test: %%-6.3u, 12345 : %-6.3u.\r\n", 12345); + SEGGER_RTT_printf(0, "printf Test: %%-8.6u, 12345 : %-8.6u.\r\n", 12345); + SEGGER_RTT_printf(0, "printf Test: %%-08u, 12345 : %-08u.\r\n", 12345); + SEGGER_RTT_printf(0, "printf Test: %%-08.6u, 12345 : %-08.6u.\r\n", 12345); + SEGGER_RTT_printf(0, "printf Test: %%-0u, 12345 : %-0u.\r\n", 12345); + + SEGGER_RTT_printf(0, "printf Test: %%u, -12345 : %u.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%+u, -12345 : %+u.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%.3u, -12345 : %.3u.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%.6u, -12345 : %.6u.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%6.3u, -12345 : %6.3u.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%8.6u, -12345 : %8.6u.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%08u, -12345 : %08u.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%08.6u, -12345 : %08.6u.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%0u, -12345 : %0u.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%-.6u, -12345 : %-.6u.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%-6.3u, -12345 : %-6.3u.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%-8.6u, -12345 : %-8.6u.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%-08u, -12345 : %-08u.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%-08.6u, -12345 : %-08.6u.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%-0u, -12345 : %-0u.\r\n", -12345); + + SEGGER_RTT_printf(0, "printf Test: %%d, -12345 : %d.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%+d, -12345 : %+d.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%.3d, -12345 : %.3d.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%.6d, -12345 : %.6d.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%6.3d, -12345 : %6.3d.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%8.6d, -12345 : %8.6d.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%08d, -12345 : %08d.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%08.6d, -12345 : %08.6d.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%0d, -12345 : %0d.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%-.6d, -12345 : %-.6d.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%-6.3d, -12345 : %-6.3d.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%-8.6d, -12345 : %-8.6d.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%-08d, -12345 : %-08d.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%-08.6d, -12345 : %-08.6d.\r\n", -12345); + SEGGER_RTT_printf(0, "printf Test: %%-0d, -12345 : %-0d.\r\n", -12345); + + SEGGER_RTT_printf(0, "printf Test: %%x, 0x1234ABC : %x.\r\n", 0x1234ABC); + SEGGER_RTT_printf(0, "printf Test: %%+x, 0x1234ABC : %+x.\r\n", 0x1234ABC); + SEGGER_RTT_printf(0, "printf Test: %%.3x, 0x1234ABC : %.3x.\r\n", 0x1234ABC); + SEGGER_RTT_printf(0, "printf Test: %%.6x, 0x1234ABC : %.6x.\r\n", 0x1234ABC); + SEGGER_RTT_printf(0, "printf Test: %%6.3x, 0x1234ABC : %6.3x.\r\n", 0x1234ABC); + SEGGER_RTT_printf(0, "printf Test: %%8.6x, 0x1234ABC : %8.6x.\r\n", 0x1234ABC); + SEGGER_RTT_printf(0, "printf Test: %%08x, 0x1234ABC : %08x.\r\n", 0x1234ABC); + SEGGER_RTT_printf(0, "printf Test: %%08.6x, 0x1234ABC : %08.6x.\r\n", 0x1234ABC); + SEGGER_RTT_printf(0, "printf Test: %%0x, 0x1234ABC : %0x.\r\n", 0x1234ABC); + SEGGER_RTT_printf(0, "printf Test: %%-.6x, 0x1234ABC : %-.6x.\r\n", 0x1234ABC); + SEGGER_RTT_printf(0, "printf Test: %%-6.3x, 0x1234ABC : %-6.3x.\r\n", 0x1234ABC); + SEGGER_RTT_printf(0, "printf Test: %%-8.6x, 0x1234ABC : %-8.6x.\r\n", 0x1234ABC); + SEGGER_RTT_printf(0, "printf Test: %%-08x, 0x1234ABC : %-08x.\r\n", 0x1234ABC); + SEGGER_RTT_printf(0, "printf Test: %%-08.6x, 0x1234ABC : %-08.6x.\r\n", 0x1234ABC); + SEGGER_RTT_printf(0, "printf Test: %%-0x, 0x1234ABC : %-0x.\r\n", 0x1234ABC); + + SEGGER_RTT_printf(0, "printf Test: %%p, &_Cnt : %p.\r\n", &_Cnt); + + SEGGER_RTT_WriteString(0, "###### SEGGER_printf() Tests done. ######\r\n"); + do { + _Cnt++; + } while (1); +} + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/RTT/Main_RTT_SpeedTestApp.c b/resources_extra/SystemView_Src_V320/Sample/RTT/Main_RTT_SpeedTestApp.c new file mode 100644 index 0000000..70bfb49 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/RTT/Main_RTT_SpeedTestApp.c @@ -0,0 +1,105 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +--------- END-OF-HEADER -------------------------------------------- +File : Main_RTT_SpeedTestApp.c +Purpose : Sample program for measuring RTT performance. +*/ + +#include "RTOS.h" +#include "BSP.h" + +#include "SEGGER_RTT.h" +#include + +OS_STACKPTR int StackHP[128], StackLP[128]; /* Task stacks */ +OS_TASK TCBHP, TCBLP; /* Task-control-blocks */ + +static void HPTask(void) { + while (1) { + // + // Measure time needed for RTT output + // Perform dummy write with 0 characters, so we know the overhead of toggling LEDs and RTT in general + // +// Set BP here. Then start sampling on scope + BSP_ClrLED(0); + SEGGER_RTT_Write(0, 0, 0); + BSP_SetLED(0); + BSP_ClrLED(0); + SEGGER_RTT_Write(0, "01234567890123456789012345678901234567890123456789012345678901234567890123456789\r\n", 82); + BSP_SetLED(0); +// Set BP here. Then stop sampling on scope + OS_Delay(200); + } +} + +static void LPTask(void) { + while (1) { + BSP_ToggleLED(1); + OS_Delay (500); + } +} + +/********************************************************************* +* +* main +* +*********************************************************************/ + +int main(void) { + OS_IncDI(); /* Initially disable interrupts */ + OS_InitKern(); /* Initialize OS */ + OS_InitHW(); /* Initialize Hardware for OS */ + BSP_Init(); /* Initialize LED ports */ + BSP_SetLED(0); + /* You need to create at least one task before calling OS_Start() */ + OS_CREATETASK(&TCBHP, "HP Task", HPTask, 100, StackHP); + OS_CREATETASK(&TCBLP, "LP Task", LPTask, 50, StackLP); + OS_Start(); /* Start multitasking */ + return 0; +} + diff --git a/resources_extra/SystemView_Src_V320/Sample/embOS/Config/Cortex-M/SEGGER_SYSVIEW_Conf_example.h b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/Cortex-M/SEGGER_SYSVIEW_Conf_example.h new file mode 100644 index 0000000..e4d917f --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/Cortex-M/SEGGER_SYSVIEW_Conf_example.h @@ -0,0 +1,98 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Conf.h +Purpose : SEGGER SystemView configuration file. + Set defines which deviate from the defaults (see SEGGER_SYSVIEW_ConfDefaults.h) here. +Revision: $Rev: 17066 $ + +Additional information: + Required defines which must be set are: + SEGGER_SYSVIEW_GET_TIMESTAMP + SEGGER_SYSVIEW_GET_INTERRUPT_ID + For known compilers and cores, these might be set to good defaults + in SEGGER_SYSVIEW_ConfDefaults.h. + + SystemView needs a (nestable) locking mechanism. + If not defined, the RTT locking mechanism is used, + which then needs to be properly configured. +*/ + +#ifndef SEGGER_SYSVIEW_CONF_H +#define SEGGER_SYSVIEW_CONF_H + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ + +// The application name to be displayed in SystemViewer +#define SEGGER_SYSVIEW_APP_NAME "embOS start project" + +// The target device name +#define SEGGER_SYSVIEW_DEVICE_NAME "Cortex-M3/M4/M7" + +// Frequency of the timestamp +#define SEGGER_SYSVIEW_TIMESTAMP_FREQ (SystemCoreClock) + +// System Frequency. SystemcoreClock is used in most CMSIS compatible projects. +#define SEGGER_SYSVIEW_CPU_FREQ (SystemCoreClock) + +#define SEGGER_SYSVIEW_SYSDESC0 "I#15=SysTick" +// +// SystemCoreClock can be used in most CMSIS compatible projects. +// In non-CMSIS projects define SYSVIEW_CPU_FREQ directly. +// +extern unsigned int SystemCoreClock; + +#endif // SEGGER_SYSVIEW_CONF_H + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/embOS/Config/Cortex-M/SEGGER_SYSVIEW_Config_embOS.c b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/Cortex-M/SEGGER_SYSVIEW_Config_embOS.c new file mode 100644 index 0000000..3681eba --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/Cortex-M/SEGGER_SYSVIEW_Config_embOS.c @@ -0,0 +1,144 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Config_embOS.c +Purpose : Sample setup configuration of SystemView with embOS. +Revision: $Rev: 21319 $ +*/ +#include "RTOS.h" +#include "SEGGER_SYSVIEW.h" +#include "SEGGER_SYSVIEW_embOS.h" + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ +#define DEMCR (*(volatile U32*) (0xE000EDFCuL)) // Debug Exception and Monitor Control Register +#define TRACEENA_BIT (1uL << 24) // Trace enable bit +#define DWT_CTRL (*(volatile U32*) (0xE0001000uL)) // DWT Control Register +#define NOCYCCNT_BIT (1uL << 25) // Cycle counter support bit +#define CYCCNTENA_BIT (1uL << 0) // Cycle counter enable bit +// +// If events will be recorded without a debug probe (J-Link) attached, +// enable the cycle counter +// +#define ENABLE_DWT_CYCCNT (SEGGER_SYSVIEW_POST_MORTEM_MODE || SEGGER_SYSVIEW_USE_INTERNAL_RECORDER) + +/********************************************************************* +* +* Local functions +* +********************************************************************** +*/ +/********************************************************************* +* +* _cbSendSystemDesc() +* +* Function description +* Sends SystemView description strings. +*/ +static void _cbSendSystemDesc(void) { + SEGGER_SYSVIEW_SendSysDesc("N=" SEGGER_SYSVIEW_APP_NAME ",O=embOS,D=" SEGGER_SYSVIEW_DEVICE_NAME ); +#ifdef SEGGER_SYSVIEW_SYSDESC0 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC0); +#endif +#ifdef SEGGER_SYSVIEW_SYSDESC1 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC1); +#endif +#ifdef SEGGER_SYSVIEW_SYSDESC2 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC2); +#endif +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +/********************************************************************* +* +* SEGGER_SYSVIEW_Conf() +* +* Function description +* Configure and initialize SystemView and register it with embOS. +* +* Additional information +* If enabled, SEGGER_SYSVIEW_Conf() will also immediately start +* recording events with SystemView. +*/ +void SEGGER_SYSVIEW_Conf(void) { +#if ENABLE_DWT_CYCCNT + // + // If no debugger is connected, the DWT must be enabled by the application + // + if ((DEMCR & TRACEENA_BIT) == 0) { + DEMCR |= TRACEENA_BIT; + } +#endif + // + // The cycle counter must be activated in order + // to use time related functions. + // + if ((DWT_CTRL & NOCYCCNT_BIT) == 0) { // Cycle counter supported? + if ((DWT_CTRL & CYCCNTENA_BIT) == 0) { // Cycle counter not enabled? + DWT_CTRL |= CYCCNTENA_BIT; // Enable Cycle counter + } + } + SEGGER_SYSVIEW_Init(SEGGER_SYSVIEW_TIMESTAMP_FREQ, SEGGER_SYSVIEW_CPU_FREQ, + &SYSVIEW_X_OS_TraceAPI, _cbSendSystemDesc); + OS_TRACE_SetAPI(&embOS_TraceAPI_SYSVIEW); // Configure embOS to use SYSVIEW. +#if SEGGER_SYSVIEW_START_ON_INIT + SEGGER_SYSVIEW_Start(); // Start recording to catch system initialization. +#endif +} + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/embOS/Config/Cortex-M0/SEGGER_SYSVIEW_Conf_example.h b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/Cortex-M0/SEGGER_SYSVIEW_Conf_example.h new file mode 100644 index 0000000..20e45b5 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/Cortex-M0/SEGGER_SYSVIEW_Conf_example.h @@ -0,0 +1,98 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Conf.h +Purpose : SEGGER SystemView configuration file. + Set defines which deviate from the defaults (see SEGGER_SYSVIEW_ConfDefaults.h) here. +Revision: $Rev: 17066 $ + +Additional information: + Required defines which must be set are: + SEGGER_SYSVIEW_GET_TIMESTAMP + SEGGER_SYSVIEW_GET_INTERRUPT_ID + For known compilers and cores, these might be set to good defaults + in SEGGER_SYSVIEW_ConfDefaults.h. + + SystemView needs a (nestable) locking mechanism. + If not defined, the RTT locking mechanism is used, + which then needs to be properly configured. +*/ + +#ifndef SEGGER_SYSVIEW_CONF_H +#define SEGGER_SYSVIEW_CONF_H + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ + +// The application name to be displayed in SystemViewer +#define SEGGER_SYSVIEW_APP_NAME "embOS start project" + +// The target device name +#define SEGGER_SYSVIEW_DEVICE_NAME "Cortex-M0/M0+/M1" + +// +// SystemCoreClock can be used in most CMSIS compatible projects. +// In non-CMSIS projects define SYSVIEW_CPU_FREQ directly. +// +extern unsigned int SystemCoreClock; +// Frequency of the timestamp +#define SEGGER_SYSVIEW_TIMESTAMP_FREQ (SystemCoreClock) + +// System Frequency. SystemcoreClock is used in most CMSIS compatible projects. +#define SEGGER_SYSVIEW_CPU_FREQ (SystemCoreClock) + +#define SEGGER_SYSVIEW_SYSDESC0 "I#15=SysTick" + +#endif // SEGGER_SYSVIEW_CONF_H + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/embOS/Config/Cortex-M0/SEGGER_SYSVIEW_Config_embOS_CM0.c b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/Cortex-M0/SEGGER_SYSVIEW_Config_embOS_CM0.c new file mode 100644 index 0000000..d8d74bd --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/Cortex-M0/SEGGER_SYSVIEW_Config_embOS_CM0.c @@ -0,0 +1,181 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Config_embOS_CM0.c +Purpose : Sample setup configuration of SystemView with embOS + on Cortex-M0/Cortex-M0+/Cortex-M1 systems which do not + have a cycle counter. +Revision: $Rev: 21298 $ + +Additional information: + SEGGER_SYSVIEW_TickCnt must be incremented in the SysTick + handler before any SYSVIEW event is generated. + + Example in embOS RTOSInit.c: + + void SysTick_Handler(void) { + #if (OS_PROFILE != 0) + SEGGER_SYSVIEW_TickCnt++; // Increment SEGGER_SYSVIEW_TickCnt before calling OS_INT_EnterNestable(). + #endif + OS_INT_EnterNestable(); + OS_TICK_Handle(); + OS_INT_LeaveNestable(); + } +*/ +#include "RTOS.h" +#include "SEGGER_SYSVIEW.h" +#include "SEGGER_SYSVIEW_embOS.h" + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ +#define SCB_ICSR (*(volatile U32*) (0xE000ED04uL)) // Interrupt Control State Register +#define SCB_ICSR_PENDSTSET_MASK (1UL << 26) // SysTick pending bit +#define SYST_RVR (*(volatile U32*) (0xE000E014uL)) // SysTick Reload Value Register +#define SYST_CVR (*(volatile U32*) (0xE000E018uL)) // SysTick Current Value Register + +/********************************************************************* +* +* Local functions +* +********************************************************************** +*/ +/********************************************************************* +* +* _cbSendSystemDesc() +* +* Function description +* Sends SystemView description strings. +*/ +static void _cbSendSystemDesc(void) { + SEGGER_SYSVIEW_SendSysDesc("N=" SEGGER_SYSVIEW_APP_NAME ",O=embOS,D=" SEGGER_SYSVIEW_DEVICE_NAME ); +#ifdef SEGGER_SYSVIEW_SYSDESC0 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC0); +#endif +#ifdef SEGGER_SYSVIEW_SYSDESC1 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC1); +#endif +#ifdef SEGGER_SYSVIEW_SYSDESC2 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC2); +#endif +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +/********************************************************************* +* +* SEGGER_SYSVIEW_Conf() +* +* Function description +* Configure and initialize SystemView and register it with embOS. +* +* Additional information +* If enabled, SEGGER_SYSVIEW_Conf() will also immediately start +* recording events with SystemView. +*/ +void SEGGER_SYSVIEW_Conf(void) { + SEGGER_SYSVIEW_Init(SEGGER_SYSVIEW_TIMESTAMP_FREQ, SEGGER_SYSVIEW_CPU_FREQ, + &SYSVIEW_X_OS_TraceAPI, _cbSendSystemDesc); + OS_TRACE_SetAPI(&embOS_TraceAPI_SYSVIEW); // Configure embOS to use SYSVIEW. +#if SEGGER_SYSVIEW_START_ON_INIT + SEGGER_SYSVIEW_Start(); // Start recording to catch system initialization. +#endif +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_X_GetTimestamp() +* +* Function description +* Returns the current timestamp in cycles using the system tick +* count and the SysTick counter. +* All parameters of the SysTick have to be known and are set via +* configuration defines on top of the file. +* +* Return value +* The current timestamp. +* +* Additional information +* SEGGER_SYSVIEW_X_GetTimestamp is always called when interrupts are +* disabled. Therefore locking here is not required. +*/ +U32 SEGGER_SYSVIEW_X_GetTimestamp(void) { + U32 TickCount; + U32 Cycles; + U32 CyclesPerTick; + // + // Get the cycles of the current system tick. + // SysTick is down-counting, subtract the current value from the number of cycles per tick. + // + CyclesPerTick = SYST_RVR + 1; + Cycles = (CyclesPerTick - SYST_CVR); + // + // Get the system tick count. + // + TickCount = SEGGER_SYSVIEW_TickCnt; + // + // If a SysTick interrupt is pending, re-read timer and adjust result + // + if ((SCB_ICSR & SCB_ICSR_PENDSTSET_MASK) != 0) { + Cycles = (CyclesPerTick - SYST_CVR); + TickCount++; + } + Cycles += TickCount * CyclesPerTick; + + return Cycles; +} + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/embOS/Config/MAX3263x/SEGGER_SYSVIEW_Conf_example.h b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/MAX3263x/SEGGER_SYSVIEW_Conf_example.h new file mode 100644 index 0000000..9c37bd9 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/MAX3263x/SEGGER_SYSVIEW_Conf_example.h @@ -0,0 +1,104 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Conf.h +Purpose : SEGGER SystemView configuration file. + Set defines which deviate from the defaults (see SEGGER_SYSVIEW_ConfDefaults.h) here. +Revision: $Rev: 17066 $ + +Additional information: + Required defines which must be set are: + SEGGER_SYSVIEW_GET_TIMESTAMP + SEGGER_SYSVIEW_GET_INTERRUPT_ID + For known compilers and cores, these might be set to good defaults + in SEGGER_SYSVIEW_ConfDefaults.h. + + SystemView needs a (nestable) locking mechanism. + If not defined, the RTT locking mechanism is used, + which then needs to be properly configured. +*/ + +#ifndef SEGGER_SYSVIEW_CONF_H +#define SEGGER_SYSVIEW_CONF_H + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ + +// The application name to be displayed in SystemViewer +#define SEGGER_SYSVIEW_APP_NAME "embOS start project" + +// The target device name +#define SEGGER_SYSVIEW_DEVICE_NAME "MAX3263x" + +// +// SystemCoreClock can be used in most CMSIS compatible projects. +// In non-CMSIS projects define SYSVIEW_CPU_FREQ directly. +// +extern unsigned int SystemCoreClock; +// Frequency of the timestamp +#define SEGGER_SYSVIEW_TIMESTAMP_FREQ (SystemCoreClock) + +// System Frequency. SystemcoreClock is used in most CMSIS compatible projects. +#define SEGGER_SYSVIEW_CPU_FREQ (SystemCoreClock) + +// The lowest RAM address used for IDs (pointers) +#define SEGGER_SYSVIEW_ID_BASE (0x20000000) + +#define SEGGER_SYSVIEW_SYSDESC0 "I#15=SysTick" + +// Retrieve a system timestamp used for SystemView events. +#define SEGGER_SYSVIEW_GET_TIMESTAMP() SEGGER_SYSVIEW_X_GetTimestamp() + +#endif // SEGGER_SYSVIEW_CONF_H + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/embOS/Config/MAX3263x/SEGGER_SYSVIEW_Config_embOS_MAX3263x.c b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/MAX3263x/SEGGER_SYSVIEW_Config_embOS_MAX3263x.c new file mode 100644 index 0000000..aab2b14 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/MAX3263x/SEGGER_SYSVIEW_Config_embOS_MAX3263x.c @@ -0,0 +1,179 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Config_embOS_MAX3263x.c +Purpose : Sample setup configuration of SystemView with embOS. +Revision: $Rev: 12706 $ + +Additional information: + SEGGER_SYSVIEW_TickCnt must be incremented in the SysTick + handler before any SYSVIEW event is generated. + + Example in embOS RTOSInit.c: + + void SysTick_Handler(void) { + #if (OS_PROFILE != 0) + SEGGER_SYSVIEW_TickCnt++; // Increment SEGGER_SYSVIEW_TickCnt before calling OS_INT_EnterNestable(). + #endif + OS_INT_EnterNestable(); + OS_TICK_Handle(); + OS_INT_LeaveNestable(); + } +*/ +#include "RTOS.h" +#include "SEGGER_SYSVIEW.h" +#include "SEGGER_SYSVIEW_embOS.h" + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ +#define SCB_ICSR (*(volatile U32*) (0xE000ED04uL)) // Interrupt Control State Register +#define SCB_ICSR_PENDSTSET_MASK (1UL << 26) // SysTick pending bit +#define SYST_RVR (*(volatile U32*) (0xE000E014uL)) // SysTick Reload Value Register +#define SYST_CVR (*(volatile U32*) (0xE000E018uL)) // SysTick Current Value Register + +/********************************************************************* +* +* Local functions +* +********************************************************************** +*/ +/********************************************************************* +* +* _cbSendSystemDesc() +* +* Function description +* Sends SystemView description strings. +*/ +static void _cbSendSystemDesc(void) { + SEGGER_SYSVIEW_SendSysDesc("N=" SEGGER_SYSVIEW_APP_NAME ",O=embOS,D=" SEGGER_SYSVIEW_DEVICE_NAME ); +#ifdef SEGGER_SYSVIEW_SYSDESC0 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC0); +#endif +#ifdef SEGGER_SYSVIEW_SYSDESC1 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC1); +#endif +#ifdef SEGGER_SYSVIEW_SYSDESC2 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC2); +#endif +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +/********************************************************************* +* +* SEGGER_SYSVIEW_Conf() +* +* Function description +* Configure and initialize SystemView and register it with embOS. +* +* Additional information +* If enabled, SEGGER_SYSVIEW_Conf() will also immediately start +* recording events with SystemView. +*/ +void SEGGER_SYSVIEW_Conf(void) { + SEGGER_SYSVIEW_Init(SEGGER_SYSVIEW_TIMESTAMP_FREQ, SEGGER_SYSVIEW_CPU_FREQ, + &SYSVIEW_X_OS_TraceAPI, _cbSendSystemDesc); + OS_TRACE_SetAPI(&embOS_TraceAPI_SYSVIEW); // Configure embOS to use SYSVIEW. +#if SEGGER_SYSVIEW_START_ON_INIT + SEGGER_SYSVIEW_Start(); // Start recording to catch system initialization. +#endif +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_X_GetTimestamp() +* +* Function description +* Returns the current timestamp in cycles using the system tick +* count and the SysTick counter. +* All parameters of the SysTick have to be known and are set via +* configuration defines on top of the file. +* +* Return value +* The current timestamp. +* +* Additional information +* SEGGER_SYSVIEW_X_GetTimestamp is always called when interrupts are +* disabled. Therefore locking here is not required. +*/ +U32 SEGGER_SYSVIEW_X_GetTimestamp(void) { + U32 TickCount; + U32 Cycles; + U32 CyclesPerTick; + // + // Get the cycles of the current system tick. + // SysTick is down-counting, subtract the current value from the number of cycles per tick. + // + CyclesPerTick = SYST_RVR + 1; + Cycles = (CyclesPerTick - SYST_CVR); + // + // Get the system tick count. + // + TickCount = SEGGER_SYSVIEW_TickCnt; + // + // If a SysTick interrupt is pending, re-read timer and adjust result + // + if ((SCB_ICSR & SCB_ICSR_PENDSTSET_MASK) != 0) { + Cycles = (CyclesPerTick - SYST_CVR); + TickCount++; + } + Cycles += TickCount * CyclesPerTick; + + return Cycles; +} + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/embOS/Config/RISCV/SEGGER_SYSVIEW_Conf_example.h b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/RISCV/SEGGER_SYSVIEW_Conf_example.h new file mode 100644 index 0000000..9e96285 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/RISCV/SEGGER_SYSVIEW_Conf_example.h @@ -0,0 +1,104 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Conf.h +Purpose : SEGGER SystemView configuration file. + Set defines which deviate from the defaults (see SEGGER_SYSVIEW_ConfDefaults.h) here. +Revision: $Rev: 17066 $ + +Additional information: + Required defines which must be set are: + SEGGER_SYSVIEW_GET_TIMESTAMP + SEGGER_SYSVIEW_GET_INTERRUPT_ID + For known compilers and cores, these might be set to good defaults + in SEGGER_SYSVIEW_ConfDefaults.h. + + SystemView needs a (nestable) locking mechanism. + If not defined, the RTT locking mechanism is used, + which then needs to be properly configured. +*/ + +#ifndef SEGGER_SYSVIEW_CONF_H +#define SEGGER_SYSVIEW_CONF_H + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ + +// The application name to be displayed in SystemViewer +#define SEGGER_SYSVIEW_APP_NAME "embOS start project" + +// The target device name +#define SEGGER_SYSVIEW_DEVICE_NAME "RISC-V" + +// Frequency of the timestamp +#warning "SEGGER_SYSVIEW_TIMESTAMP_FREQ needs to be set." +#define SEGGER_SYSVIEW_TIMESTAMP_FREQ (0) + +// System Frequency. SystemcoreClock is used in most CMSIS compatible projects. +#warning "SEGGER_SYSVIEW_CPU_FREQ needs to be set." +#define SEGGER_SYSVIEW_CPU_FREQ (0) + +// Lowest Id reported by the Application. +#define SEGGER_SYSVIEW_ID_BASE (0x00000000) + +#define SEGGER_SYSVIEW_SYSDESC0 "I#7=System Tick" + +// Retrieve a system timestamp via user-defined function +#define SEGGER_SYSVIEW_GET_TIMESTAMP() SEGGER_SYSVIEW_X_GetTimestamp() + +// Get the currently active interrupt Id from the user-provided function. +#define SEGGER_SYSVIEW_GET_INTERRUPT_ID() SEGGER_SYSVIEW_X_GetInterruptId() + +#endif // SEGGER_SYSVIEW_CONF_H + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/embOS/Config/RISCV/SEGGER_SYSVIEW_Config_embOS_RISCV.c b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/RISCV/SEGGER_SYSVIEW_Config_embOS_RISCV.c new file mode 100644 index 0000000..24863f8 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/RISCV/SEGGER_SYSVIEW_Config_embOS_RISCV.c @@ -0,0 +1,169 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Config_embOS_RISCV.c +Purpose : Sample setup configuration of SystemView with embOS. +Revision: $Rev: 12706 $ + +Additional information: + SEGGER_SYSVIEW_TickCnt must be incremented in the SysTick + handler before any SYSVIEW event is generated. + + Example in embOS RTOSInit.c: + + void SysTick_Handler(void) { + #if (OS_PROFILE != 0) + SEGGER_SYSVIEW_TickCnt++; // Increment SEGGER_SYSVIEW_TickCnt before calling OS_INT_EnterNestable(). + #endif + OS_INT_EnterNestable(); + OS_TICK_Handle(); + OS_INT_LeaveNestable(); + } +*/ +#include "RTOS.h" +#include "SEGGER_SYSVIEW.h" +#include "SEGGER_SYSVIEW_embOS.h" + +/********************************************************************* +* +* Local functions +* +********************************************************************** +*/ +/********************************************************************* +* +* _cbSendSystemDesc() +* +* Function description +* Sends SystemView description strings. +*/ +static void _cbSendSystemDesc(void) { + SEGGER_SYSVIEW_SendSysDesc("N=" SEGGER_SYSVIEW_APP_NAME ",O=embOS,D=" SEGGER_SYSVIEW_DEVICE_NAME ); +#ifdef SEGGER_SYSVIEW_SYSDESC0 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC0); +#endif +#ifdef SEGGER_SYSVIEW_SYSDESC1 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC1); +#endif +#ifdef SEGGER_SYSVIEW_SYSDESC2 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC2); +#endif +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +/********************************************************************* +* +* SEGGER_SYSVIEW_Conf() +* +* Function description +* Configure and initialize SystemView and register it with embOS. +* +* Additional information +* If enabled, SEGGER_SYSVIEW_Conf() will also immediately start +* recording events with SystemView. +*/ +void SEGGER_SYSVIEW_Conf(void) { + SEGGER_SYSVIEW_Init(SEGGER_SYSVIEW_TIMESTAMP_FREQ, SEGGER_SYSVIEW_CPU_FREQ, + &SYSVIEW_X_OS_TraceAPI, _cbSendSystemDesc); + OS_TRACE_SetAPI(&embOS_TraceAPI_SYSVIEW); // Configure embOS to use SYSVIEW. +#if SEGGER_SYSVIEW_START_ON_INIT + SEGGER_SYSVIEW_Start(); // Start recording to catch system initialization. +#endif +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_X_GetTimestamp() +* +* Function description +* Returns the current timestamp in ticks. +* +* Return value +* The current timestamp. +* +* Additional information +* SEGGER_SYSVIEW_X_GetTimestamp is always called when interrupts are +* disabled. Therefore locking here is not required. +*/ +U32 SEGGER_SYSVIEW_X_GetTimestamp(void) { + register unsigned long MCycle; + + __asm volatile("csrr %0, mcycle \n\t" + : "=r" (MCycle) // Output + : // Input + : // Clobbered list + ); + return MCycle; +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_X_GetInterruptId() +* +* Function description +* Return the currently active IRQ interrupt number +* from the INTC_SIR_IRQ. +*/ +U32 SEGGER_SYSVIEW_X_GetInterruptId(void) { + register unsigned long MCauseValue; + + __asm volatile("csrr %0, mcause \n\t" + : "=r" (MCauseValue) // Output + : // Input + : // Clobbered list + ); + return MCauseValue & 0x7FFFFFFFuL; +} + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/embOS/Config/RL78/SEGGER_SYSVIEW_Conf_example.h b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/RL78/SEGGER_SYSVIEW_Conf_example.h new file mode 100644 index 0000000..8bd8e04 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/RL78/SEGGER_SYSVIEW_Conf_example.h @@ -0,0 +1,100 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Conf.h +Purpose : SEGGER SystemView configuration file. + Set defines which deviate from the defaults (see SEGGER_SYSVIEW_ConfDefaults.h) here. +Revision: $Rev: 17066 $ + +Additional information: + Required defines which must be set are: + SEGGER_SYSVIEW_GET_TIMESTAMP + SEGGER_SYSVIEW_GET_INTERRUPT_ID + For known compilers and cores, these might be set to good defaults + in SEGGER_SYSVIEW_ConfDefaults.h. + + SystemView needs a (nestable) locking mechanism. + If not defined, the RTT locking mechanism is used, + which then needs to be properly configured. +*/ + +#ifndef SEGGER_SYSVIEW_CONF_H +#define SEGGER_SYSVIEW_CONF_H + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ + +// The application name to be displayed in SystemViewer +#define SEGGER_SYSVIEW_APP_NAME "embOS start project" + +// The target device name +#define SEGGER_SYSVIEW_DEVICE_NAME "RL78G14" + +// Frequency of the timestamp +#define SEGGER_SYSVIEW_TIMESTAMP_FREQ (32000000uL) + +// System Frequency +#define SEGGER_SYSVIEW_CPU_FREQ (32000000uL) + +// Lowest Id reported by the Application. +#define SEGGER_SYSVIEW_ID_BASE (0x00000000) + +// Retrieve a system timestamp via user-defined function +#define SEGGER_SYSVIEW_GET_TIMESTAMP() SEGGER_SYSVIEW_X_GetTimestamp() + +// Get the currently active interrupt Id from the user-provided function. +#define SEGGER_SYSVIEW_GET_INTERRUPT_ID() SEGGER_SYSVIEW_X_GetInterruptId() + +#endif // SEGGER_SYSVIEW_CONF_H + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/embOS/Config/RL78/SEGGER_SYSVIEW_Config_embOS_RL78.c b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/RL78/SEGGER_SYSVIEW_Config_embOS_RL78.c new file mode 100644 index 0000000..a948189 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/RL78/SEGGER_SYSVIEW_Config_embOS_RL78.c @@ -0,0 +1,189 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Config_embOS_RL78.c +Purpose : Sample setup configuration of SystemView with embOS. +Revision: $Rev: 21298 $ + +Additional information: + SEGGER_SYSVIEW_TickCnt must be incremented in the SysTick + handler before any SYSVIEW event is generated. + + Example in embOS RTOSInit.c: + + void SysTick_Handler(void) { + #if (OS_PROFILE != 0) + SEGGER_SYSVIEW_TickCnt++; // Increment SEGGER_SYSVIEW_TickCnt before calling OS_INT_EnterNestable(). + #endif + OS_INT_EnterNestable(); + OS_TICK_Handle(); + OS_INT_LeaveNestable(); + } +*/ +#include "RTOS.h" +#include "SEGGER_SYSVIEW.h" +#include "SEGGER_SYSVIEW_embOS.h" + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ +#define TDR00 (*(volatile U16*) (0xFF18)) // System Timer Reload Value Register +#define TCR00 (*(volatile U16*) (0x0180)) // System Timer Current Value Register +#define IF1 (*(volatile U16*) (0xFFE2)) + +/********************************************************************* +* +* Local functions +* +********************************************************************** +*/ +/********************************************************************* +* +* _cbSendSystemDesc() +* +* Function description +* Sends SystemView description strings. +*/ +static void _cbSendSystemDesc(void) { + SEGGER_SYSVIEW_SendSysDesc("N=" SEGGER_SYSVIEW_APP_NAME ",O=embOS,D=" SEGGER_SYSVIEW_DEVICE_NAME ); +#ifdef SEGGER_SYSVIEW_SYSDESC0 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC0); +#endif +#ifdef SEGGER_SYSVIEW_SYSDESC1 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC1); +#endif +#ifdef SEGGER_SYSVIEW_SYSDESC2 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC2); +#endif +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +/********************************************************************* +* +* SEGGER_SYSVIEW_Conf() +* +* Function description +* Configure and initialize SystemView and register it with embOS. +* +* Additional information +* If enabled, SEGGER_SYSVIEW_Conf() will also immediately start +* recording events with SystemView. +*/ +void SEGGER_SYSVIEW_Conf(void) { + SEGGER_SYSVIEW_Init(SEGGER_SYSVIEW_TIMESTAMP_FREQ, SEGGER_SYSVIEW_CPU_FREQ, + &SYSVIEW_X_OS_TraceAPI, _cbSendSystemDesc); + OS_TRACE_SetAPI(&embOS_TraceAPI_SYSVIEW); // Configure embOS to use SYSVIEW. +#if SEGGER_SYSVIEW_START_ON_INIT + SEGGER_SYSVIEW_Start(); // Start recording to catch system initialization. +#endif +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_X_GetTimestamp() +* +* Function description +* Returns the current timestamp in cycles using the system tick +* count and the System Tick counter. +* All parameters of the System Tick have to be known and are set via +* configuration defines on top of the file. +* +* Return value +* The current timestamp. +* +* Additional information +* SEGGER_SYSVIEW_X_GetTimestamp is always called when interrupts are +* disabled. Therefore locking here is not required. +*/ +U32 SEGGER_SYSVIEW_X_GetTimestamp(void) { + U32 TickCount; + U32 Cycles; + U32 CyclesPerTick; + // + // Get the cycles of the current system tick. + // System Tick is down-counting, subtract the current value from the number of cycles per tick. + // + CyclesPerTick = TDR00 + 1; + Cycles = (CyclesPerTick - TCR00); + // + // Get the system tick count. + // + TickCount = SEGGER_SYSVIEW_TickCnt; + // + // If a System Tick interrupt is pending, re-read timer and adjust result + // + if (IF1 & (1u << 4u)) { + Cycles = (CyclesPerTick - TCR00); + TickCount++; + } + Cycles += TickCount * CyclesPerTick; + + return Cycles; +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_X_GetInterruptId() +* +* Function description +* Return the priority of the currently active interrupt. +*/ +U32 SEGGER_SYSVIEW_X_GetInterruptId(void) { + return 0; +} + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/embOS/Config/RX/SEGGER_SYSVIEW_Conf_example.h b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/RX/SEGGER_SYSVIEW_Conf_example.h new file mode 100644 index 0000000..bd76bfe --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/RX/SEGGER_SYSVIEW_Conf_example.h @@ -0,0 +1,104 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Conf.h +Purpose : SEGGER SystemView configuration file. + Set defines which deviate from the defaults (see SEGGER_SYSVIEW_ConfDefaults.h) here. +Revision: $Rev: 17066 $ + +Additional information: + Required defines which must be set are: + SEGGER_SYSVIEW_GET_TIMESTAMP + SEGGER_SYSVIEW_GET_INTERRUPT_ID + For known compilers and cores, these might be set to good defaults + in SEGGER_SYSVIEW_ConfDefaults.h. + + SystemView needs a (nestable) locking mechanism. + If not defined, the RTT locking mechanism is used, + which then needs to be properly configured. +*/ + +#ifndef SEGGER_SYSVIEW_CONF_H +#define SEGGER_SYSVIEW_CONF_H + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ + +// The application name to be displayed in SystemViewer +#define SEGGER_SYSVIEW_APP_NAME "embOS start project" + +// The target device name +#define SEGGER_SYSVIEW_DEVICE_NAME "RX" + +// System Frequency +#define SEGGER_SYSVIEW_CPU_FREQ (96000000u) + +// Frequency of the timestamp +#define SEGGER_SYSVIEW_TIMESTAMP_FREQ (SEGGER_SYSVIEW_CPU_FREQ/2u/8u) // Assume system timer runs at 1/16th of the CPU frequency + +// Lowest Id reported by the Application. +#define SEGGER_SYSVIEW_ID_BASE (0x00000000) + +#define SEGGER_SYSVIEW_SYSDESC0 "I#0=IntPrio0,I#1=IntPrio1,I#2=IntPrio2,I#3=IntPrio3,I#4=IntPrio4" +//#define SEGGER_SYSVIEW_SYSDESC1 "I#5=IntPrio5,I#6=IntPrio6,I#7=IntPrio7,I#8=IntPrio8,I#9=IntPrio9,I#10=IntPrio10" +//#define SEGGER_SYSVIEW_SYSDESC2 "I#11=IntPrio11,I#12=IntPrio12,I#13=IntPrio13,I#14=IntPrio14,I#15=IntPrio15" + +// Retrieve a system timestamp via user-defined function +#define SEGGER_SYSVIEW_GET_TIMESTAMP() SEGGER_SYSVIEW_X_GetTimestamp() + +// Get the currently active interrupt Id from the user-provided function. +#define SEGGER_SYSVIEW_GET_INTERRUPT_ID() SEGGER_SYSVIEW_X_GetInterruptId() + +#endif // SEGGER_SYSVIEW_CONF_H + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/embOS/Config/RX/SEGGER_SYSVIEW_Config_embOS_RX.c b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/RX/SEGGER_SYSVIEW_Config_embOS_RX.c new file mode 100644 index 0000000..38195e8 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/RX/SEGGER_SYSVIEW_Config_embOS_RX.c @@ -0,0 +1,197 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Config_embOS_RX.c +Purpose : Sample setup configuration of SystemView with embOS + on Renesas RX systems. +Revision: $Rev: 21298 $ + +Additional information: + SEGGER_SYSVIEW_TickCnt must be incremented in the SysTick + handler before any SYSVIEW event is generated. + + Example in embOS RTOSInit.c: + + void SysTick_Handler(void) { + #if (OS_PROFILE != 0) + SEGGER_SYSVIEW_TickCnt++; // Increment SEGGER_SYSVIEW_TickCnt before calling OS_INT_EnterNestable(). + #endif + OS_INT_EnterNestable(); + OS_TICK_Handle(); + OS_INT_LeaveNestable(); + } +*/ +#include "RTOS.h" +#include "SEGGER_SYSVIEW.h" +#include "SEGGER_SYSVIEW_embOS.h" + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ +#define IRR_BASE_ADDR (0x00087000u) +#define CMT0_VECT 28u +#define OS_TIMER_VECT CMT0_VECT +#define TIMER_PRESCALE (8u) +#define CMT0_BASE_ADDR (0x00088000u) +#define CMT0_CMCNT (*(volatile U16*) (CMT0_BASE_ADDR + 0x04u)) + +/********************************************************************* +* +* Local functions +* +********************************************************************** +*/ +/********************************************************************* +* +* _cbSendSystemDesc() +* +* Function description +* Sends SystemView description strings. +*/ +static void _cbSendSystemDesc(void) { + SEGGER_SYSVIEW_SendSysDesc("N=" SEGGER_SYSVIEW_APP_NAME ",O=embOS,D=" SEGGER_SYSVIEW_DEVICE_NAME ); +#ifdef SEGGER_SYSVIEW_SYSDESC0 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC0); +#endif +#ifdef SEGGER_SYSVIEW_SYSDESC1 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC1); +#endif +#ifdef SEGGER_SYSVIEW_SYSDESC2 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC2); +#endif +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +/********************************************************************* +* +* SEGGER_SYSVIEW_Conf() +* +* Function description +* Configure and initialize SystemView and register it with embOS. +* +* Additional information +* If enabled, SEGGER_SYSVIEW_Conf() will also immediately start +* recording events with SystemView. +*/ +void SEGGER_SYSVIEW_Conf(void) { + SEGGER_SYSVIEW_Init(SEGGER_SYSVIEW_TIMESTAMP_FREQ, SEGGER_SYSVIEW_CPU_FREQ, + &SYSVIEW_X_OS_TraceAPI, _cbSendSystemDesc); + OS_TRACE_SetAPI(&embOS_TraceAPI_SYSVIEW); // Configure embOS to use SYSVIEW. +#if SEGGER_SYSVIEW_START_ON_INIT + SEGGER_SYSVIEW_Start(); // Start recording to catch system initialization. +#endif +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_X_GetTimestamp() +* +* Function description +* Returns the current timestamp in cycles using the system tick +* count and the SysTick counter. +* All parameters of the SysTick have to be known and are set via +* configuration defines on top of the file. +* +* Return value +* The current timestamp. +* +* Additional information +* SEGGER_SYSVIEW_X_GetTimestamp is always called when interrupts are +* disabled. +* Therefore locking here is not required and OS_GetTime_Cycles() may +* be called. +*/ +U32 SEGGER_SYSVIEW_X_GetTimestamp(void) { + U32 Time; + U32 Cnt; + + Time = SEGGER_SYSVIEW_TickCnt; + Cnt = CMT0_CMCNT; + // + // Check if timer interrupt pending ... + // + if ((*(volatile U8*)(IRR_BASE_ADDR + OS_TIMER_VECT) & (1u << 0u)) != 0u) { + Cnt = CMT0_CMCNT; // Interrupt pending, re-read timer and adjust result + Time++; + } + return ((SYSVIEW_TIMESTAMP_FREQ/1000) * Time) + Cnt; +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_X_GetInterruptId() +* +* Function description +* Return the priority of the currently active interrupt. +*/ +U32 SEGGER_SYSVIEW_X_GetInterruptId(void) { + U32 IntId; +#ifdef __RX // Renesas CCRX + IntId = (get_psw() & 0x0F000000) >> 24u; +#else + __asm volatile ("mvfc PSW, %0 \t\n" // Load current PSW + "and #0x0F000000, %0 \t\n" // Clear all except IPL ([27:24]) + "shlr #24, %0 \t\n" // Shift IPL to [3:0] + : "=r" (IntId) // Output result + : // Input + : // Clobbered list + ); +#endif + return IntId; +} + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/embOS/Config/RZA1/SEGGER_SYSVIEW_Conf_example.h b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/RZA1/SEGGER_SYSVIEW_Conf_example.h new file mode 100644 index 0000000..66713cd --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/RZA1/SEGGER_SYSVIEW_Conf_example.h @@ -0,0 +1,124 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Conf.h +Purpose : SEGGER SystemView configuration file. + Set defines which deviate from the defaults (see SEGGER_SYSVIEW_ConfDefaults.h) here. +Revision: $Rev: 17066 $ + +Additional information: + Required defines which must be set are: + SEGGER_SYSVIEW_GET_TIMESTAMP + SEGGER_SYSVIEW_GET_INTERRUPT_ID + For known compilers and cores, these might be set to good defaults + in SEGGER_SYSVIEW_ConfDefaults.h. + + SystemView needs a (nestable) locking mechanism. + If not defined, the RTT locking mechanism is used, + which then needs to be properly configured. +*/ + +#ifndef SEGGER_SYSVIEW_CONF_H +#define SEGGER_SYSVIEW_CONF_H + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ +#ifndef OS_FSYS + #define OS_FSYS (399900000u) +#endif + +#ifndef OS_PCLK_TIMER + #define OS_PCLK_TIMER (OS_FSYS / 12) +#endif + +#ifndef OS_TICK_FREQ + #define OS_TICK_FREQ (1000) +#endif + +#ifndef OS_TIMER_RELOAD + #define OS_TIMER_RELOAD (OS_PCLK_TIMER / OS_TICK_FREQ) +#endif + +// The application name to be displayed in SystemViewer +#define SEGGER_SYSVIEW_APP_NAME "embOS start project" + +// The target device name +#define SEGGER_SYSVIEW_DEVICE_NAME "R7S721001" + +// Frequency of the timestamp +#define SEGGER_SYSVIEW_TIMESTAMP_FREQ (OS_PCLK_TIMER) + +// System Frequency. SystemcoreClock is used in most CMSIS compatible projects. +#define SEGGER_SYSVIEW_CPU_FREQ (OS_FSYS) + +// Lowest Id reported by the Application. +#define SEGGER_SYSVIEW_ID_BASE (0x60000000) + +#define SEGGER_SYSVIEW_SYSDESC0 "I#134=OS_ISR_Tick" + +// Retrieve a system timestamp via user-defined function +#define SEGGER_SYSVIEW_GET_TIMESTAMP() SEGGER_SYSVIEW_X_GetTimestamp() + +// Get the currently active interrupt Id from the user-provided function. +#define SEGGER_SYSVIEW_GET_INTERRUPT_ID() SEGGER_SYSVIEW_X_GetInterruptId() + +#endif // SEGGER_SYSVIEW_CONF_H + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/embOS/Config/RZA1/SEGGER_SYSVIEW_Config_embOS_RZA1.c b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/RZA1/SEGGER_SYSVIEW_Config_embOS_RZA1.c new file mode 100644 index 0000000..f044d15 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/RZA1/SEGGER_SYSVIEW_Config_embOS_RZA1.c @@ -0,0 +1,188 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Config_embOS_RZA1.c +Purpose : Sample setup configuration of SystemView with embOS + on Renesas RZA1 devices. +Revision: $Rev: 12316 $ + +Additional information: + SEGGER_SYSVIEW_TickCnt must be incremented in the SysTick + handler before any SYSVIEW event is generated. + + Example in embOS RTOSInit.c: + + void SysTick_Handler(void) { + #if (OS_PROFILE != 0) + SEGGER_SYSVIEW_TickCnt++; // Increment SEGGER_SYSVIEW_TickCnt before calling OS_INT_EnterNestable(). + #endif + OS_INT_EnterNestable(); + OS_TICK_Handle(); + OS_INT_LeaveNestable(); + } + + SEGGER_SYSVIEW_InterruptId has to be set in the IRQ handler + to identify the active interrupt. +*/ +#include "RTOS.h" +#include "SEGGER_SYSVIEW.h" +#include "SEGGER_SYSVIEW_embOS.h" + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ +#define OSTM_CNT (*(volatile unsigned int*) 0xFCFEC004u) +#define OSTM_INT_ID (134) +#define TIMER_INTERRUPT_PENDING() (OS_GIC_IsPending(OSTM_INT_ID)) + +/********************************************************************* +* +* Local functions +* +********************************************************************** +*/ +/********************************************************************* +* +* _cbSendSystemDesc() +* +* Function description +* Sends SystemView description strings. +*/ +static void _cbSendSystemDesc(void) { + SEGGER_SYSVIEW_SendSysDesc("N=" SEGGER_SYSVIEW_APP_NAME ",O=embOS,D=" SEGGER_SYSVIEW_DEVICE_NAME ); +#ifdef SEGGER_SYSVIEW_SYSDESC0 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC0); +#endif +#ifdef SEGGER_SYSVIEW_SYSDESC1 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC1); +#endif +#ifdef SEGGER_SYSVIEW_SYSDESC2 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC2); +#endif +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +/********************************************************************* +* +* SEGGER_SYSVIEW_Conf() +* +* Function description +* Configure and initialize SystemView and register it with embOS. +* +* Additional information +* If enabled, SEGGER_SYSVIEW_Conf() will also immediately start +* recording events with SystemView. +*/ +void SEGGER_SYSVIEW_Conf(void) { + SEGGER_SYSVIEW_Init(SEGGER_SYSVIEW_TIMESTAMP_FREQ, SEGGER_SYSVIEW_CPU_FREQ, + &SYSVIEW_X_OS_TraceAPI, _cbSendSystemDesc); + OS_TRACE_SetAPI(&embOS_TraceAPI_SYSVIEW); // Configure embOS to use SYSVIEW. +#if SEGGER_SYSVIEW_START_ON_INIT + SEGGER_SYSVIEW_Start(); // Start recording to catch system initialization. +#endif +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_X_GetTimestamp() +* +* Function description +* Returns the current timestamp in cycles using the system tick +* count and the SysTick counter. +* All parameters of the SysTick have to be known and are set via +* configuration defines on top of the file. +* +* Return value +* The current timestamp. +* +* Additional information +* SEGGER_SYSVIEW_X_GetTimestamp is always called when interrupts are +* disabled. Therefore locking here is not required. +*/ +U32 SEGGER_SYSVIEW_X_GetTimestamp(void) { + U32 TickCount; + U32 Cycles; + // + // Get the cycles of the current system tick. + // Sample timer is down-counting, subtract the current value from the number of cycles per tick. + // + Cycles = OS_TIMER_RELOAD - OSTM_CNT; + // + // Get the system tick count. + // + TickCount = SEGGER_SYSVIEW_TickCnt; + // + // If a SysTick interrupt is pending, re-read timer and adjust result + // + if (TIMER_INTERRUPT_PENDING() != 0) { + TickCount++; + Cycles = OS_TIMER_RELOAD - OSTM_CNT; + } + Cycles += TickCount * OS_TIMER_RELOAD; + + return Cycles; +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_X_GetInterruptId() +*/ +U32 SEGGER_SYSVIEW_X_GetInterruptId(void) { + return SEGGER_SYSVIEW_InterruptId; +} + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/embOS/Config/Win32/SEGGER_SYSVIEW_Config_embOS_Win32.c b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/Win32/SEGGER_SYSVIEW_Config_embOS_Win32.c new file mode 100644 index 0000000..91927eb --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/Win32/SEGGER_SYSVIEW_Config_embOS_Win32.c @@ -0,0 +1,1004 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Config_embOS_Win32.c +Purpose : Sample setup configuration of SystemView with embOS. +Revision: $Rev: 15024 $ +*/ +#include "RTOS.h" +#include "SEGGER_SYSVIEW.h" +#include "SEGGER_SYSVIEW_Conf.h" +#include "SEGGER_SYSVIEW_embOS.h" +#include "SEGGER_SYSVIEW_Win32.h" +#include "SEGGER_RTT.h" + +#define WIN32_LEAN_AND_MEAN +#include +#include +#include +#include +#include + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ +// The application name to be displayed in SystemViewer +#ifndef SYSVIEW_APP_NAME + #define SYSVIEW_APP_NAME "embOS start project" +#endif + +// The target device name +#ifndef SYSVIEW_DEVICE_NAME + #define SYSVIEW_DEVICE_NAME "Simulation" +#endif + +// Frequency of the timestamp. Must match SEGGER_SYSVIEW_Conf.h +#ifndef SYSVIEW_TIMESTAMP_FREQ + #define SYSVIEW_TIMESTAMP_FREQ (1000u) +#endif + +// System Frequency. SystemcoreClock is used in most CMSIS compatible projects. +#ifndef SYSVIEW_CPU_FREQ + #define SYSVIEW_CPU_FREQ (1000000u) +#endif + +// Define as 1 to immediately start recording after initialization to catch system initialization. +#ifndef SYSVIEW_START_ON_INIT + #define SYSVIEW_START_ON_INIT 0 +#endif + +#ifndef MAX_ISRNAMES_LENGTH + #define MAX_ISRNAMES_LENGTH 400 +#endif + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ + +#define SYSVIEW_COMM_APP_HELLO_SIZE 32 +#define SYSVIEW_COMM_TARGET_HELLO_SIZE 32 + + +#ifdef WIN32 + #define _SYS_THREAD_PROC_EX_TYPE U32 __stdcall + #define _SYS_THREAD_PROC_EX_R_TYPE U32 +#else + #define _SYS_THREAD_PROC_EX_TYPE void* + #define _SYS_THREAD_PROC_EX_R_TYPE void* +#endif + +#define _SYS_THREAD_CREATE_SUSPENDED (1) + +#define _SYS_SOCKET_INVALID_HANDLE (-1) +#define _SYS_SOCKET_IP_ADDR_ANY 0 +#define _SYS_SOCKET_IP_ADDR_LOCALHOST 0x7F000001 // 127.0.0.1 (localhost) + +#define _SYS_SOCKET_PORT_ANY 0 + +#define _SYS_SOCKET_ERR_UNSPECIFIED -1 +#define _SYS_SOCKET_ERR_WOULDBLOCK -2 +#define _SYS_SOCKET_ERR_TIMEDOUT -3 +#define _SYS_SOCKET_ERR_CONNRESET -4 + +#define _SYS_SOCKET_SHUT_RD 0 +#define _SYS_SOCKET_SHUT_WR 1 +#define _SYS_SOCKET_SHUT_RDWR 2 + +/********************************************************************* +* +* Types, local +* +********************************************************************** +*/ +typedef void* _SYS_HANDLE; +typedef int _SYS_SOCKET_HANDLE; +typedef _SYS_THREAD_PROC_EX_TYPE _SYS_THREAD_PROC_EX(void* pPara); + +/********************************************************************* +* +* Static data +* +********************************************************************** +*/// "Hello" message expected by SystemView App: SEGGER SystemView VM.mm.rr +static const U8 _abHelloMsg[SYSVIEW_COMM_TARGET_HELLO_SIZE] = { 'S', 'E', 'G', 'G', 'E', 'R', ' ', 'S', 'y', 's', 't', 'e', 'm', 'V', 'i', 'e', 'w', ' ', 'V', '0' + SEGGER_SYSVIEW_MAJOR, '.', '0' + (SEGGER_SYSVIEW_MINOR / 10), '0' + (SEGGER_SYSVIEW_MINOR % 10), '.', '0' + (SEGGER_SYSVIEW_REV / 10), '0' + (SEGGER_SYSVIEW_REV % 10), '\0', 0, 0, 0, 0, 0 }; +static volatile int _CloseRequested; // Indicator for threads to terminate themselves +static volatile int _SysViewCommThreadRunning; // Indicator for status of the "SysView communication" thread + +static int _int1 = 1; + +static U64 _TSFreq; +static U32 _TSDiv; + +static CRITICAL_SECTION _csLockString; +static char _sISRNames[MAX_ISRNAMES_LENGTH]; + +/********************************************************************* +* +* Local functions, SYS +* +********************************************************************** +*/ + +/********************************************************************* +* +* SYS_Sleep +*/ +static void _SYS_Sleep(int ms) { + Sleep(ms); +} + +/********************************************************************* +* +* SYS_GetLastError +*/ +static U32 _SYS_GetLastError(void) { + return GetLastError(); +} + +/********************************************************************* +* +* SYS_CreateThreadEx +*/ +static _SYS_HANDLE _SYS_CreateThreadEx(_SYS_THREAD_PROC_EX* pfThreadProc, void* pPara, U64* pThreadId, const char* sName, U32 Flags) { + _SYS_HANDLE hThread; + U32 ThreadId; + U32 CreateFlags; + + CreateFlags = 0; + if (Flags & _SYS_THREAD_CREATE_SUSPENDED) { + CreateFlags = CREATE_SUSPENDED; + } + hThread = (_SYS_HANDLE)CreateThread(NULL, 0, pfThreadProc, pPara, CreateFlags, &ThreadId); + if (sName != NULL) { + OS_SIM_SetThreadName(ThreadId, sName); + } + if (hThread) { + if (pThreadId) { + *pThreadId = ThreadId; + } + } + return hThread; +} + +/********************************************************************* +* +* _WSAStartup +* +* Function description +* Initializes Winsock API. Needs to be called once before using any socket API. +* May be called multiple times. +*/ +static void _WSAStartup(void) { + WORD wVersionRequested; + WSADATA wsaData; + // + // Init Winsock API + // + wVersionRequested = MAKEWORD(2, 2); + WSAStartup(wVersionRequested, &wsaData); +} + +/********************************************************************* +* +* _WSACleanup +* +* Function description +* Cleans up Winsock API. WSACleanup() needs to be called as many times +* as WSAStartup() if socket API is no longer needed. +*/ +static void _WSACleanup(void) { + WSACleanup(); +} + +/********************************************************************* +* +* _SYS_SOCKET_OpenTCP +* +* Function description +* Creates an IPv4 TCP socket. +* +* Return value +* Handle to socket +*/ +static _SYS_SOCKET_HANDLE _SYS_SOCKET_OpenTCP(void) { + SOCKET sock; + // + // Init Winsock API as this is the first socket-related function being called + // WSACleanup is called on SocketClose() + // + _WSAStartup(); + // + // Create socket + // + sock = socket(AF_INET, SOCK_STREAM, 0); + if (sock != INVALID_SOCKET) { + // + // Disable Nagle's algorithm to speed things up + // Nagle's algorithm prevents small packets from being transmitted and collects some time until data is actually sent out + // + setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (char*)&_int1, sizeof(int)); + } else { + return _SYS_SOCKET_INVALID_HANDLE; + } + return (_SYS_SOCKET_HANDLE)sock; +} + +/********************************************************************* +* +* _SYS_SOCKET_Close +* +* Function description +* Closes a socket. Resources allocated by this socket are freed. +* +* Parameters +* hSocket Handle to socket that has been returned by _SYS_SOCKET_OpenTCP() / _SYS_SOCKET_OpenUDP() +*/ +static void _SYS_SOCKET_Close(_SYS_SOCKET_HANDLE hSocket) { + SOCKET Sock; + int OptVal; + int OptLen; + // + // MSDN: A socket that is using the SO_EXCLUSIVEADDRUSE option must be shut down properly prior to closing it. Failure to do so can cause a denial of service attack if the associated service needs to restart. + // + Sock = (SOCKET)hSocket; + OptLen = 4; + OptVal = 0; // Make sure it is zero initialized in case getsockopt does not fill it completely + getsockopt(Sock, SOL_SOCKET, -5, (char*)&OptVal, &OptLen); // SO_EXCLUSIVEADDRUSE (Define not known in the VC6 headers, we use...) + if (OptVal) { + shutdown(Sock, SD_BOTH); + } + // + // Close socket + // + closesocket(Sock); + // + // De-init Winsock API. Needs to be called as often as WSAStartup() has been called + // Has an internal reference counter + // If the counter reaches 0, all sockets opened by the process, are forced closed + // + _WSACleanup(); +} + +/********************************************************************* +* +* _SYS_SOCKET_ListenAtTCPAddr +* +* Function description +* Puts IPv4 socket into listening state. +* +* Parameters +* hSocket Handle to socket that has been returned by _SYS_SOCKET_OpenTCP() / _SYS_SOCKET_OpenUDP() +* IPAddr IPv4 address expected in little endian form, meaning 127.0.0.1 is expected as 0x7F000001 +* To accept connections from any IP address, pass _SYS_SOCKET_IP_ADDR_ANY +* Port Port to listen at +* +* Return value +* >= 0: O.K. +* < 0: Error +*/ +static int _SYS_SOCKET_ListenAtTCPAddr(_SYS_SOCKET_HANDLE hSocket, U32 IPAddr, U32 Port, unsigned NumConnectionsQueued) { + struct sockaddr_in addr; + SOCKET Sock; + int r; + // + // Option SO_REUSEADDR: + // + // : IP addresses of network adapters + // + // ================================================== + // Original idea from BSD sockets + // ================================================== + // bind() without SO_REUSEADDR set (default): + // bind(SockA, 0.0.0.0:21) + // bind(SockB, 192.168.0.1:21) + // SockB will fail because of SockA is a wildcard that means "Any local address", + // so it is not possible to bind to any other local address with the same port. + // bind(SockA, 127.0.0.1:21) + // bind(SockB, 192.168.0.1:21) + // Both calls will succeed, as different : combinations are used. + // + // bind() with SO_REUSEADDR set: + // bind(SockA, 0.0.0.0:21) + // bind(SockB, 192.168.0.1:21) + // SockA and SockB will succeed. + // The original idea includes that *each* of the sockets must have SO_REUSEADDR set before bind(). + // If only the second one calls it, bind() will fail as the first socket did not allow sharing at all. + // + // This was the original idea of SO_REUSEADDR. + // NOTE: Not sure who really ever needed this, but that's the way it is... + // + // ================================================== + // Second effect of SO_REUSEADDR (TIME_WAIT) + // ================================================== + // There is another case where this option has an effect on: + // Calls to send() do not guarantee that data is sent when the function returns. It may be sent delayed. + // Therefore, it is possible that when calling close() to close a socket, send data is still pending. + // What the OS does is: preparing everything for closing the connection and return from close(). + // Now the socket changed it's state from ACTIVE to TIME_WAIT but still exists inside the OS (not accessible for the user anymore) + // If now a new socket is opened and a bind() is performed on exactly the : combination of the TIME_WAIT socket, the behavior depends on if the original socket had SO_REUSEADDR set. + // + // SO_REUSEADDR not set: + // bind() will fail as TIME_WAIT is handled as if it is ACTIVE + // + // SO_REUSEADDR set: + // bind() will succeed as TIME_WAIT is handled as if socket was not existing anymore. + // NOTE: Under rare circumstances, it now can happen that if there is any receive data arriving late at the system, the new socket that did the bind(), will receive it. + // + // ================================================== + // OS specifics + // ================================================== + // + // Windows: + // When specifying SO_REUSEADDR before bind(), Windows will report SUCCESS on bind(), + // even if there is another ACTIVE socket that is bound to the same : combination. + // It does not matter if the process that did the first bind() did specify SO_REUSEADDR for its socket or not + // This allows processes to steal data from other ones...pretty awful bug in Windows... (See MSDN: Using SO_REUSEADDR and SO_EXCLUSIVEADDRUSE) + // Microsoft introduced SO_EXCLUSIVEADDRUSE for this. + // This makes sure hijacking the socket data is not possible. + // But it still allows the special behavior in case a bind() to a closed socket in TIME_WAIT state is possible. (See "Second effect of SO_REUSEADDR (TIME_WAIT)" above) + // + // MSDN: A socket that is using the SO_EXCLUSIVEADDRUSE option must be shut down properly prior to closing it. Failure to do so can cause a denial of service attack if the associated service needs to restart. + // + // Linux: + // Listening socket: + // SO_REUSEADDR does not have any effect for the "original idea" (see above). Linux is more restrictive than BSD sockets here. + // But it has the desired effect on closed sockets in TIME_WAIT state (see above). + // + // Client socket: + // Behaves like the original BSD idea and has the TIME_WAIT effect + // + // Kernel >= 3.9: To have "original idea" effect for listening sockets, since kernel 3.9 SO_REUSEPORT has been introduced. + // + // Normal TCP connection close: + // Client1 (C1), Client2 (C2) + // C1 -> C2 FIN + // C1 <- C2 ACK + // C1 <- C2 FIN + // C1 -> C2 ACK + // Socket of C1 (as the initiator of the close request) now is in TIME_WAIT state and can stay there several seconds/minutes + // so the : combination is blocked for some time, after the socket has been closed + // As this is not acceptable for us as the DLL and other J-Link utilities must be able to be started / terminated multiple times in a row, + // we make use of SO_REUSEADDR for all of our listener sockets which need to bind() to a specific port + // + Sock = (SOCKET)hSocket; + r = setsockopt(Sock, SOL_SOCKET, -5, (char*)&_int1, sizeof(int)); // SO_EXCLUSIVEADDRUSE (Define not known in the VC6 headers, we use...) + if (r == 0) { + addr.sin_family = AF_INET; + addr.sin_port = htons((U16)Port); + addr.sin_addr.s_addr = htonl(IPAddr); + r = bind(Sock, (struct sockaddr*)&addr, sizeof(addr)); + if (r == 0) { + r = listen(Sock, NumConnectionsQueued); + } + if (r) { + r = -1; + } + } else { + r = -1; + } + return r; +} + +/********************************************************************* +* +* _SYS_SOCKET_IsReady +* +* Function description +* Checks if a socket that has been connected with _SYS_SOCKET_Connect() is ready. +* Mainly used on non-blocking sockets to check if they are ready to operate on. +* The procedure (non-blocking connect, then trying FIONREAD) is recommended by MS (MSDN). +* +* Parameters +* hSocket Handle to socket that has been returned by _SYS_SOCKET_OpenTCP() / _SYS_SOCKET_OpenUDP() +* +* Return value +* == 1 O.K., socket ready +* == 0 O.K., socket not ready yet +* < 0 Error +*/ +static unsigned _SYS_SOCKET_IsReady(_SYS_SOCKET_HANDLE hSocket) { + SOCKET Sock; + int IsReady; + unsigned long v; + + Sock = (SOCKET)hSocket; + ioctlsocket(Sock, FIONREAD, &v); // Check if socket is ready to read from + IsReady = v ? 1 : 0; + return IsReady; +} + +/********************************************************************* +* +* _SYS_SOCKET_IsReadable +* +* Function description +* Checks if a socket that has been connected with _SYS_SOCKET_Connect() is readable. +* +* Parameters +* hSocket Handle to socket that has been returned by _SYS_SOCKET_OpenTCP() / _SYS_SOCKET_OpenUDP() +* +* Return value +* == 1 O.K., socket readable +* == 0 O.K., socket not readable yet +* < 0 Error +*/ +static int _SYS_SOCKET_IsReadable(_SYS_SOCKET_HANDLE hSocket, int TimeoutMs) { + SOCKET Sock; + struct timeval tv; + fd_set rfds; + fd_set efds; + int v; + // + // + // Two possible cases when opening a TCP connection: + // 1) On the other side, there is a server listening on the destination port + // 2) On the other side, there is NO server listening on the destination port + // + // Reg 1) + // In such cases, the socket is reported non-writeable for a few [us] up to a few [s] depending on if this is a localhost, LAN or internet connection + // After that period, the socket is reported as writeable + // + // Reg 2) + // In such cases, the following happens (S = Server): + // C -> S: SYN + // S -> C: RST ACK + // This means, the server has rejected the connection and closed it + // In such a case, we need to close the socket and try connecting again + // + // However, Windows is difficult regarding 2)... + // Usually an RST means "it's over, you can close the socket. There is nobody listening" + // Windows keeps the socket in connecting state, so IsReadable() IsWriteable() simply returns 0 instead of 1 (which would allow a following send/receive to return with error) + // In the background, Windows performs the SYN sending another 3 times in intervals of 500ms before giving up and reporting an error state + // Usually, the retransmissions are there in case we do not get an ACK from the other side and therefore must assume that the packet got lost + // Then also the interval time is doubled for each retransmission + // However, Microsoft decided to also retry it in case of RST ACK but without increasing the interval time + // This is explained here: https://support.microsoft.com/en-in/help/175523/info-winsock-tcp-connection-performance-to-unused-ports + // + // Unfortunately, even after this 1.5 seconds, Windows not necessarily reports the socket as readable/writable but instead returns "exceptional state" on select() + // Therefore, we also pass the "exceptional state" structure to select() to catch this case + // + Sock = (SOCKET)hSocket; + FD_ZERO(&rfds); // Zero init file descriptor list + FD_SET(Sock, &rfds); // Add socket to file descriptor list to be monitored by select() + FD_ZERO(&efds); + FD_SET(Sock, &efds); + tv.tv_sec = (long)(TimeoutMs / 1000); + tv.tv_usec = (TimeoutMs % 1000) * 1000; + v = select(0, &rfds, NULL, &efds, &tv); // > 0: in case of success, == 0: Timeout, < 0: Error + return v; +} + +/********************************************************************* +* +* _SYS_SOCKET_AcceptEx +* +* Function description +* Waits for a connection (with timeout) on the given socket. +* +* Parameters +* hSocket Handle to socket that has been returned by _SYS_SOCKET_OpenTCP() / _SYS_SOCKET_OpenUDP() +* TimeoutMs Timeout in ms for waiting +* +* Return value +* >= 0 Handle to socket of new connection that has been established +* < 0 Error (_SYS_SOCKET_INVALID_HANDLE) +* -2 Timeout +*/ +static _SYS_SOCKET_HANDLE _SYS_SOCKET_AcceptEx(_SYS_SOCKET_HANDLE hSocket, int TimeoutMs) { + SOCKET SockChild; + int r; + // + // accept() itself does not allow using timeouts + // Therefore we check readability first and then call accept() which should not block then + // + r = _SYS_SOCKET_IsReadable(hSocket, TimeoutMs); + if (r < 0) { + return _SYS_SOCKET_INVALID_HANDLE; // error + } else if (r == 0) { + return -2; // timeout + } else { + SockChild = accept((SOCKET)hSocket, NULL, NULL); + if (SockChild != INVALID_SOCKET) { + // + // If connection is successfully established, handle it as an implicit open(), so also init Winsock API as WSACleanup() is called on SocketClose() + // No matter if the socket has been opened via open() or accept() + // + _WSAStartup(); + // + // Disable Nagle's algorithm to speed things up + // Nagle's algorithm prevents small packets from being transmitted and collects some time until data is actually sent out + // + setsockopt(SockChild, IPPROTO_TCP, TCP_NODELAY, (char*)&_int1, sizeof(int)); + } else { + return _SYS_SOCKET_INVALID_HANDLE; + } + } + return (_SYS_SOCKET_HANDLE)SockChild; +} + +/********************************************************************* +* +* _SYS_SOCKET_Receive +* +* Function description +* Receives data on the given socket. +* +* Parameters +* hSocket Handle to socket that has been returned by _SYS_SOCKET_OpenTCP() / _SYS_SOCKET_OpenUDP() +* +* Return value +* >= 0: O.K., number of bytes received +* < 0: Error, see _SYS_SOCKET_ERR_* +* +* Notes +* (1) Returns as soon as something has been received (may be less than MaxNumBytes) or error happened +*/ +static int _SYS_SOCKET_Receive(_SYS_SOCKET_HANDLE hSocket, void* pData, U32 MaxNumBytes) { + int r; + int Err; + SOCKET Sock; + + Sock = (SOCKET)hSocket; + r = recv(Sock, (char*)pData, MaxNumBytes, 0); + if (r < 0) { + Err = WSAGetLastError(); + switch (Err) { + case WSAEWOULDBLOCK: + r = _SYS_SOCKET_ERR_WOULDBLOCK; + break; + case WSAECONNRESET: + r = _SYS_SOCKET_ERR_CONNRESET; + break; + case WSAETIMEDOUT: + r = _SYS_SOCKET_ERR_TIMEDOUT; + break; + default: + r = _SYS_SOCKET_ERR_UNSPECIFIED; + } + } + return r; +} + +/********************************************************************* +* +* _SYS_SOCKET_IsWriteable +* +* Function description +* Checks if a socket that has been connected with _SYS_SOCKET_Connect() is writeable. +* +* Parameters +* hSocket Handle to socket that has been returned by _SYS_SOCKET_OpenTCP() / _SYS_SOCKET_OpenUDP() +* +* Return value +* == 1 O.K., socket writeable +* == 0 O.K., socket not writeable yet +*/ +static int _SYS_SOCKET_IsWriteable(_SYS_SOCKET_HANDLE hSocket, int TimeoutMs) { + SOCKET Sock; + struct timeval tv; + fd_set wfds; + fd_set efds; + int v; + // + // + // Two possible cases when opening a TCP connection: + // 1) On the other side, there is a server listening on the destination port + // 2) On the other side, there is NO server listening on the destination port + // + // Reg 1) + // In such cases, the socket is reported non-writeable for a few [us] up to a few [s] depending on if this is a localhost, LAN or internet connection + // After that period, the socket is reported as writeable + // + // Reg 2) + // In such cases, the following happens (S = Server): + // C -> S: SYN + // S -> C: RST ACK + // This means, the server has rejected the connection and closed it + // In such a case, we need to close the socket and try connecting again + // + // However, Windows is difficult regarding 2)... + // Usually an RST means "it's over, you can close the socket. There is nobody listening" + // Windows keeps the socket in connecting state, so IsReadable() IsWriteable() simply returns 0 instead of 1 (which would allow a following send/receive to return with error) + // In the background, Windows performs the SYN sending another 3 times in intervals of 500ms before giving up and reporting an error state + // Usually, the retransmissions are there in case we do not get an ACK from the other side and therefore must assume that the packet got lost + // Then also the interval time is doubled for each retransmission + // However, Microsoft decided to also retry it in case of RST ACK but without increasing the interval time + // This is explained here: https://support.microsoft.com/en-in/help/175523/info-winsock-tcp-connection-performance-to-unused-ports + // + // Unfortunately, even after this 1.5 seconds, Windows not necessarily reports the socket as readable/writable but instead returns "exceptional state" on select() + // Therefore, we also pass the "exceptional state" structure to select() to catch this case + // + Sock = (SOCKET)hSocket; + FD_ZERO(&wfds); // Zero init file descriptor list + FD_SET(Sock, &wfds); // Add socket to file descriptor list to be monitored by select() + FD_ZERO(&efds); + FD_SET(Sock, &efds); + tv.tv_sec = (long)(TimeoutMs / 1000); + tv.tv_usec = (TimeoutMs % 1000) * 1000; + v = select(0, NULL, &wfds, &efds, &tv); // > 0: in case of success, == 0: Timeout, < 0: Error + return v; +} + +/********************************************************************* +* +* _SYS_SOCKET_Send +* +* Function description +* Sends data on the specified socket +* +* Parameters +* hSocket Handle to socket that has been returned by _SYS_SOCKET_OpenTCP() / _SYS_SOCKET_OpenUDP() +* +* Return value +* >= 0: O.K., number of bytes sent +* < 0: Error, see _SYS_SOCKET_ERR_* +*/ +static int _SYS_SOCKET_Send(_SYS_SOCKET_HANDLE hSocket, const void* pData, U32 NumBytes) { + int r; + int Err; + SOCKET Sock; + + Sock = (SOCKET)hSocket; + r = send(Sock, pData, NumBytes, 0); + if (r == SOCKET_ERROR) { + Err = WSAGetLastError(); + r = (Err == WSAEWOULDBLOCK) ? _SYS_SOCKET_ERR_WOULDBLOCK : _SYS_SOCKET_ERR_UNSPECIFIED; + } + return r; +} + +/********************************************************************* +* +* Local functions, SystemView +* +********************************************************************** +*/ +/********************************************************************* +* +* _cbSendSystemDesc() +* +* Function description +* Sends SystemView description strings. +*/ +static void _cbSendSystemDesc(void) { + SEGGER_SYSVIEW_SendSysDesc("N=" SYSVIEW_APP_NAME ",O=embOS,D=" SYSVIEW_DEVICE_NAME ); + if (strlen(_sISRNames) > 0) { + SEGGER_SYSVIEW_SendSysDesc(_sISRNames); + } +} + +/********************************************************************* +* +* Local functions, SystemView Communication Channel +* +********************************************************************** +*/ +/********************************************************************* +* +* _SysViewCommThread +* +* Function description +* Function that handles TCP/IP connection and communication with SysView. +* +* Parameters +* pPara Expected to be the ID of the RTT channel used by SysView +*/ +_SYS_THREAD_PROC_EX_TYPE _SysViewCommThread(void* pPara) { + _SYS_SOCKET_HANDLE hSockListen; + _SYS_SOCKET_HANDLE hSockSV; + int Result; + int ChannelID; + int v; + int r; + int NumBytes; + char acBuf[2048]; + + _SysViewCommThreadRunning = 1; + Result = 0; + ChannelID = (int)pPara; + hSockSV = _SYS_SOCKET_INVALID_HANDLE; + // + // Try and connect to SystemView instance + // + hSockListen = _SYS_SOCKET_OpenTCP(); + if (hSockListen == _SYS_SOCKET_INVALID_HANDLE) { // Failed to open socket? => Done + Result = -1; + goto Done; + } + r = _SYS_SOCKET_ListenAtTCPAddr(hSockListen, _SYS_SOCKET_IP_ADDR_ANY, 19111, 1); + if (r < 0) { // Failed to set socket to listening? => Done + Result = -1; + goto Done; + } + // + // After a succesful connection, poll RTT buffer for data + // + do { + if (_CloseRequested) { // Close requested? => Stop systemview session + if (r == 1) { // Systemview session running? + r = _SYS_SOCKET_IsWriteable(hSockSV, 10); + if (r == 1 && v == 1) { // TCP/IP connection still established? => Stop systemview session + r = SEGGER_RTT_ReadUpBufferNoLock(ChannelID, acBuf, sizeof(acBuf)); + if (r > 0) { // Read RTT data? => Send it via TCP/IP + NumBytes = _SYS_SOCKET_Send(hSockSV, acBuf, r); // We do not care if the send succeded or not as we are closing anyway. + _SYS_Sleep(10); // Give system view some time to receive info before closing socket. + } + } + } + goto Done; + } + if (hSockSV > _SYS_SOCKET_INVALID_HANDLE) { + r = _SYS_SOCKET_IsWriteable(hSockSV, 10); + if (r == 0) { // Timeout + continue; + } else if (r < 0) { // Error + _SYS_SOCKET_Close(hSockSV); + hSockSV = _SYS_SOCKET_INVALID_HANDLE; + continue; + } + } else { + hSockSV = _SYS_SOCKET_AcceptEx(hSockListen, 100); + if (hSockSV < 0) { + continue; + } + r = _SYS_SOCKET_IsReady(hSockSV); + if (r != 1) { // Failed to connect? => Try again later + continue; + } + // + // Successful connection? => Start systemview session + // First, receive message from SysView and send back own message + // + r = _SYS_SOCKET_Receive(hSockSV, acBuf, SYSVIEW_COMM_APP_HELLO_SIZE); + if (r != SYSVIEW_COMM_APP_HELLO_SIZE) { + printf(" --- Failed to receive \"Hello\" message from SysView...\n"); + } + r = _SYS_SOCKET_Send(hSockSV, _abHelloMsg, SYSVIEW_COMM_TARGET_HELLO_SIZE); + if (r != SYSVIEW_COMM_TARGET_HELLO_SIZE) { + printf(" --- Failed to send \"Hello\" message to SysView...\n"); + } + } + // + // Connection established? => Handle communication + // Check for data sent by SysView + // + r = _SYS_SOCKET_IsReadable(hSockSV, 0); + if (r == 1) { // Data to read from SysView available? + r = _SYS_SOCKET_Receive(hSockSV, acBuf, 1); // Receive to read + if (r != 1) { // Failed to receive data? => Connection lost + _SYS_SOCKET_Close(hSockSV); + hSockSV = _SYS_SOCKET_INVALID_HANDLE; + continue; + } + v = acBuf[0]; + r = _SYS_SOCKET_Receive(hSockSV, acBuf, v); // Receive all data + if (r != v) { // Failed to receive data? => Connection lost + _SYS_SOCKET_Close(hSockSV); + hSockSV = _SYS_SOCKET_INVALID_HANDLE; + continue; + } + NumBytes = SEGGER_RTT_WriteDownBufferNoLock(ChannelID, &acBuf[0], r); // Write data into corresponding RTT buffer for application to read and handle accordingly + } + // + // Check for data to send to SysView + // + NumBytes = SEGGER_RTT_ReadUpBufferNoLock(ChannelID, &acBuf[0], sizeof(acBuf)); + if (NumBytes > 0) { // Data to send available? + r = _SYS_SOCKET_Send(hSockSV, acBuf, NumBytes); // Send data to SysView + if (NumBytes != r) { // Failed to send data? => Connection lost + v = _SYS_GetLastError(); + _SYS_SOCKET_Close(hSockSV); + hSockSV = _SYS_SOCKET_INVALID_HANDLE; + } + } + _SYS_Sleep(1); // Sleep for some time before polling again + } while (1); +Done: + // + // Clean up + // + if (hSockSV >= 0) { + _SYS_SOCKET_Close(hSockSV); + } + if (hSockListen >= 0) { + _SYS_SOCKET_Close(hSockListen); + } + _SysViewCommThreadRunning = 0; + return Result; +} + +/********************************************************************* +* +* _SetupComm() +* +* Function description +* Setup communication channel. +*/ +static void _SetupComm(void) { + int r; + U64 ThreadID; + // + // Initialize SysView communication + // + r = SEGGER_SYSVIEW_GetChannelID(); // Retrieve the ID of the RTT / channel used by SysView + _SYS_CreateThreadEx(_SysViewCommThread, (void*)r, &ThreadID, "SysView Communication Thread", 0); // Start thread handling TCP/IP connection and communication with SysView instance +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ + +/********************************************************************* +* +* SEGGER_SYSVIEW_Conf() +* +* Function description +* Configure SystemView and embOS for use of SystemView. +*/ +void SEGGER_SYSVIEW_Conf(void) { + LARGE_INTEGER TSFreq; + + // + // Get the performace counter frequency and scale it down to be < 1 GHz. + // (We can only handle cycles >= 1ns) + // + QueryPerformanceFrequency(&TSFreq); + _TSDiv = 1; + if (TSFreq.QuadPart > 1000000000LL) { + _TSDiv = (U32)(TSFreq.QuadPart / 1000000000LL); + if (TSFreq.QuadPart % 1000000000LL) { + _TSDiv++; + } + _TSFreq = TSFreq.QuadPart; + TSFreq.QuadPart /= _TSDiv; + } + SEGGER_SYSVIEW_Init(TSFreq.LowPart, TSFreq.LowPart, + &SYSVIEW_X_OS_TraceAPI, _cbSendSystemDesc); + OS_TRACE_SetAPI(&embOS_TraceAPI_SYSVIEW); // Configure embOS to use SYSVIEW. +#if SYSVIEW_START_ON_INIT + SEGGER_SYSVIEW_Start(); // Start recording to catch system initialization. +#endif + + _SetupComm(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_X_GetTimestamp() +* +* Function description +* Get the timestamp for SystemView. +* On Windows use the performance counter. +*/ +U32 SEGGER_SYSVIEW_X_GetTimestamp(void) { + LARGE_INTEGER TS; + + QueryPerformanceCounter(&TS); + if (_TSDiv > 1) { + TS.QuadPart /= _TSDiv; + } + + return TS.LowPart; +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_X_GetInterruptId() +* +* Function description +* Get the "dummy" interrupt ID. +*/ +U32 SEGGER_SYSVIEW_X_GetInterruptId(void) { + return GetCurrentThreadId(); +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_X_SetISRName() +* +* Function description +* Informs SystemView about an ISR name. +* +* Parameters +* sName: ISR Name +* +* Additional information +* Must be called from an ISR after SEGGER_SYSVIEW_Conf() only. +* It uses the thread ID as an unique ID for SystemView. +*/ +void SEGGER_SYSVIEW_X_SetISRName(const char* sName) { + static int CriticalSectionInitialized = 0; + char s[100]; + + // + // Make sure the used critical section is initialized. + // + if (CriticalSectionInitialized == 0) { + InitializeCriticalSection(&_csLockString); + CriticalSectionInitialized = 1; + } + // + // Check whether the string fits in the string buffer. + // + if (strlen(sName) < (sizeof(s) - 10)) { + // + // If this is the first entry we don't need the comma. + // + EnterCriticalSection(&_csLockString); + if (strlen(_sISRNames) == 0) { + sprintf(s, "I#%u=%s", (unsigned int)GetCurrentThreadId(), sName); + } else { + sprintf(s, ",I#%u=%s", (unsigned int)GetCurrentThreadId(), sName); + } + // + // Add new ISR name to the ISR name string and inform SystemView (if enough space is left in the string buffer). + // + if ((strlen(_sISRNames) + strlen(s) + 1) < MAX_ISRNAMES_LENGTH) { + strcat(_sISRNames, s); + // + // Send new description if SystemView is started. + // + if (SEGGER_SYSVIEW_IsStarted() > 0) { + SEGGER_SYSVIEW_SendSysDesc(_sISRNames); + } + } + LeaveCriticalSection(&_csLockString); + } +} + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/embOS/Config/Win32/SEGGER_SYSVIEW_Win32.h b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/Win32/SEGGER_SYSVIEW_Win32.h new file mode 100644 index 0000000..1a58861 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/Win32/SEGGER_SYSVIEW_Win32.h @@ -0,0 +1,84 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- +File : SEGGER_SYSVIEW_Win32.h +Purpose : System visualization API. +Revision: $Rev: 16723 $ +*/ + +#ifndef SEGGER_SYSVIEW_WIN32_H +#define SEGGER_SYSVIEW_WIN32_H + +/********************************************************************* +* +* #include Section +* +********************************************************************** +*/ + +#include "SEGGER_SYSVIEW.h" + +/********************************************************************* +* +* Prototypes +* +********************************************************************** +*/ +#ifdef __cplusplus +extern "C" { +#endif + +void SEGGER_SYSVIEW_X_SetISRName(const char* sName); + +#ifdef __cplusplus +} +#endif + +#endif + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/embOS/Config/Zynq7010/SEGGER_SYSVIEW_Conf_example.h b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/Zynq7010/SEGGER_SYSVIEW_Conf_example.h new file mode 100644 index 0000000..634198d --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/Zynq7010/SEGGER_SYSVIEW_Conf_example.h @@ -0,0 +1,111 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Conf.h +Purpose : SEGGER SystemView configuration file. + Set defines which deviate from the defaults (see SEGGER_SYSVIEW_ConfDefaults.h) here. +Revision: $Rev: 17066 $ + +Additional information: + Required defines which must be set are: + SEGGER_SYSVIEW_GET_TIMESTAMP + SEGGER_SYSVIEW_GET_INTERRUPT_ID + For known compilers and cores, these might be set to good defaults + in SEGGER_SYSVIEW_ConfDefaults.h. + + SystemView needs a (nestable) locking mechanism. + If not defined, the RTT locking mechanism is used, + which then needs to be properly configured. +*/ + +#ifndef SEGGER_SYSVIEW_CONF_H +#define SEGGER_SYSVIEW_CONF_H + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ + +// Largest cache line size (in bytes) in the current system. Needed in systems with cache to make sure that we align the SYSVIEW buffers accordingly +#define SEGGER_SYSVIEW_CPU_CACHE_LINE_SIZE (32) + +// The RTT channel that SystemView will use. 0: Auto selection +#define SEGGER_SYSVIEW_RTT_CHANNEL 1 + +// The application name to be displayed in SystemViewer +#define SEGGER_SYSVIEW_APP_NAME "embOS start project" + +// The target device name +#define SEGGER_SYSVIEW_DEVICE_NAME "Zynq 7010" + +// System Frequency. SystemcoreClock is used in most CMSIS compatible projects. +#define SEGGER_SYSVIEW_CPU_FREQ (HW_OS_FSYS) + +// Frequency of the timestamp +#define SEGGER_SYSVIEW_TIMESTAMP_FREQ (SEGGER_SYSVIEW_CPU_FREQ / 2) // HW timer used to generate tick runs at 1/2 CPU speed + +// Number of bits to shift the Id to +#define SEGGER_SYSVIEW_ID_SHIFT 2 + +// Lowest Id reported by the Application. +#define SEGGER_SYSVIEW_ID_BASE (0x60000000) + +#define SEGGER_SYSVIEW_SYSDESC0 "I#29=OS_ISR_Tick" + +// Retrieve a system timestamp via user-defined function +#define SEGGER_SYSVIEW_GET_TIMESTAMP() SEGGER_SYSVIEW_X_GetTimestamp() + +// Get the currently active interrupt Id from the user-provided function. +#define SEGGER_SYSVIEW_GET_INTERRUPT_ID() SEGGER_SYSVIEW_X_GetInterruptId() + +#endif // SEGGER_SYSVIEW_CONF_H + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/embOS/Config/Zynq7010/SEGGER_SYSVIEW_Config_embOS_Zynq7010.c b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/Zynq7010/SEGGER_SYSVIEW_Config_embOS_Zynq7010.c new file mode 100644 index 0000000..c298d7c --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/Zynq7010/SEGGER_SYSVIEW_Config_embOS_Zynq7010.c @@ -0,0 +1,168 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Config_embOS_Zynq7000.c +Purpose : Sample setup configuration of SystemView with embOS + on Xilinx Zynq 7010 devices. +Revision: $Rev: 12316 $ + +Additional information: + SEGGER_SYSVIEW_TickCnt must be incremented in the SysTick + handler before any SYSVIEW event is generated. + + Example in embOS RTOSInit.c: + + void SysTick_Handler(void) { + #if (OS_PROFILE != 0) + SEGGER_SYSVIEW_TickCnt++; // Increment SEGGER_SYSVIEW_TickCnt before calling OS_INT_EnterNestable(). + #endif + OS_INT_EnterNestable(); + OS_TICK_Handle(); + OS_INT_LeaveNestable(); + } + + SEGGER_SYSVIEW_InterruptId has to be set in the IRQ handler + to identify the active interrupt. +*/ +#include "RTOS.h" +#include "SEGGER_SYSVIEW.h" +#include "SEGGER_SYSVIEW_embOS.h" + +/********************************************************************* +* +* Defines, fixed +* +********************************************************************** +*/ + +/********************************************************************* +* +* Local functions +* +********************************************************************** +*/ +/********************************************************************* +* +* _cbSendSystemDesc() +* +* Function description +* Sends SystemView description strings. +*/ +static void _cbSendSystemDesc(void) { + SEGGER_SYSVIEW_SendSysDesc("N=" SEGGER_SYSVIEW_APP_NAME ",O=embOS,D=" SEGGER_SYSVIEW_DEVICE_NAME ); +#ifdef SEGGER_SYSVIEW_SYSDESC0 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC0); +#endif +#ifdef SEGGER_SYSVIEW_SYSDESC1 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC1); +#endif +#ifdef SEGGER_SYSVIEW_SYSDESC2 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC2); +#endif +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +/********************************************************************* +* +* SEGGER_SYSVIEW_Conf() +* +* Function description +* Configure and initialize SystemView and register it with embOS. +* +* Additional information +* If enabled, SEGGER_SYSVIEW_Conf() will also immediately start +* recording events with SystemView. +*/ +void SEGGER_SYSVIEW_Conf(void) { + SEGGER_SYSVIEW_Init(SEGGER_SYSVIEW_TIMESTAMP_FREQ, SEGGER_SYSVIEW_CPU_FREQ, + &SYSVIEW_X_OS_TraceAPI, _cbSendSystemDesc); + OS_TRACE_SetAPI(&embOS_TraceAPI_SYSVIEW); // Configure embOS to use SYSVIEW. +#if SEGGER_SYSVIEW_START_ON_INIT + SEGGER_SYSVIEW_Start(); // Start recording to catch system initialization. +#endif +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_X_GetTimestamp() +* +* Function description +* Returns the current timestamp in cycles using the system tick +* count and the SysTick counter. +* All parameters of the SysTick have to be known and are set via +* configuration defines on top of the file. +* +* Return value +* The current timestamp. +* +* Additional information +* SEGGER_SYSVIEW_X_GetTimestamp is always called when interrupts are +* disabled. Therefore locking here is not required. +*/ +U32 SEGGER_SYSVIEW_X_GetTimestamp(void) { + U32 Cycles; + + Cycles = RTOSINIT__SYSVIEWGetTimerCycles(); + return Cycles; +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_X_GetInterruptId() +*/ +U32 SEGGER_SYSVIEW_X_GetInterruptId(void) { + return SEGGER_SYSVIEW_InterruptId; +} + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/embOS/Config/nRF51/SEGGER_SYSVIEW_Conf_example.h b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/nRF51/SEGGER_SYSVIEW_Conf_example.h new file mode 100644 index 0000000..1d50881 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/nRF51/SEGGER_SYSVIEW_Conf_example.h @@ -0,0 +1,102 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Conf.h +Purpose : SEGGER SystemView configuration file. + Set defines which deviate from the defaults (see SEGGER_SYSVIEW_ConfDefaults.h) here. +Revision: $Rev: 17066 $ + +Additional information: + Required defines which must be set are: + SEGGER_SYSVIEW_GET_TIMESTAMP + SEGGER_SYSVIEW_GET_INTERRUPT_ID + For known compilers and cores, these might be set to good defaults + in SEGGER_SYSVIEW_ConfDefaults.h. + + SystemView needs a (nestable) locking mechanism. + If not defined, the RTT locking mechanism is used, + which then needs to be properly configured. +*/ + +#ifndef SEGGER_SYSVIEW_CONF_H +#define SEGGER_SYSVIEW_CONF_H + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ + +// The application name to be displayed in SystemViewer +#define SEGGER_SYSVIEW_APP_NAME "embOS start project" + +// The target device name +#define SEGGER_SYSVIEW_DEVICE_NAME "nRF51" + +// +// SystemCoreClock can be used in most CMSIS compatible projects. +// In non-CMSIS projects define SYSVIEW_CPU_FREQ directly. +// +extern unsigned int SystemCoreClock; +// Frequency of the timestamp +#define SEGGER_SYSVIEW_TIMESTAMP_FREQ (SystemCoreClock) + +// System Frequency. SystemcoreClock is used in most CMSIS compatible projects. +#define SEGGER_SYSVIEW_CPU_FREQ (SystemCoreClock) + +// The lowest RAM address used for IDs (pointers) +#define SEGGER_SYSVIEW_ID_BASE (0x20000000) + +// Retrieve a system timestamp used for SystemView events. +#define SEGGER_SYSVIEW_GET_TIMESTAMP() SEGGER_SYSVIEW_X_GetTimestamp() + +#endif // SEGGER_SYSVIEW_CONF_H + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/embOS/Config/nRF51/SEGGER_SYSVIEW_Config_embOS_nRF51822.c b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/nRF51/SEGGER_SYSVIEW_Config_embOS_nRF51822.c new file mode 100644 index 0000000..f97891f --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/embOS/Config/nRF51/SEGGER_SYSVIEW_Config_embOS_nRF51822.c @@ -0,0 +1,164 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Config_embOS_nRF51822.c +Purpose : Sample setup configuration of SystemView with embOS + on Nordic Semi nRF51 devices + which do neither have a cycle counter nor a SysTick. +Revision: $Rev: 12706 $ + +Additional information: + SEGGER_SYSVIEW_TickCnt must be incremented in the SysTick + handler before any SYSVIEW event is generated. + + Example in embOS RTOSInit.c: + + void SysTick_Handler(void) { + #if (OS_PROFILE != 0) + SEGGER_SYSVIEW_TickCnt++; // Increment SEGGER_SYSVIEW_TickCnt before calling OS_INT_EnterNestable(). + #endif + OS_INT_EnterNestable(); + OS_TICK_Handle(); + OS_INT_LeaveNestable(); + } +*/ +#include "RTOS.h" +#include "SEGGER_SYSVIEW.h" +#include "SEGGER_SYSVIEW_embOS.h" +#include "nrf.h" + +/********************************************************************* +* +* Local functions +* +********************************************************************** +*/ +/********************************************************************* +* +* _cbSendSystemDesc() +* +* Function description +* Sends SystemView description strings. +*/ +static void _cbSendSystemDesc(void) { + SEGGER_SYSVIEW_SendSysDesc("N=" SEGGER_SYSVIEW_APP_NAME ",O=embOS,D=" SEGGER_SYSVIEW_DEVICE_NAME ); +#ifdef SEGGER_SYSVIEW_SYSDESC0 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC0); +#endif +#ifdef SEGGER_SYSVIEW_SYSDESC1 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC1); +#endif +#ifdef SEGGER_SYSVIEW_SYSDESC2 + SEGGER_SYSVIEW_SendSysDesc(SEGGER_SYSVIEW_SYSDESC2); +#endif +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +/********************************************************************* +* +* SEGGER_SYSVIEW_Conf() +* +* Function description +* Configure and initialize SystemView and register it with embOS. +* +* Additional information +* If enabled, SEGGER_SYSVIEW_Conf() will also immediately start +* recording events with SystemView. +*/ +void SEGGER_SYSVIEW_Conf(void) { + SEGGER_SYSVIEW_Init(SEGGER_SYSVIEW_TIMESTAMP_FREQ, SEGGER_SYSVIEW_CPU_FREQ, + &SYSVIEW_X_OS_TraceAPI, _cbSendSystemDesc); + OS_TRACE_SetAPI(&embOS_TraceAPI_SYSVIEW); // Configure embOS to use SYSVIEW. +#if SEGGER_SYSVIEW_START_ON_INIT + SEGGER_SYSVIEW_Start(); // Start recording to catch system initialization. +#endif +} + +/********************************************************************* +* +* SEGGER_SYSVIEW_X_GetTimestamp() +* +* Function description +* Returns the current timestamp in cycles using the system tick +* count and the system timer counter. +* All parameters of the system timer have to be known and are set via +* configuration defines on top of the file. +* +* Return value +* The current timestamp. +* +* Additional information +* SEGGER_SYSVIEW_X_GetTimestamp is always called when interrupts are +* disabled. Therefore locking here is not required. +*/ +U32 SEGGER_SYSVIEW_X_GetTimestamp(void) { + U32 TickCount; + U32 Cycles; + U32 CyclesPerTick; + + CyclesPerTick = OS_INFO_GetTimerFreq() / OS_SysTimer_Settings.Config.IntFreq; // Int frequency and tick frequency are expected to be equal + TickCount = SEGGER_SYSVIEW_TickCnt; + // + // Get the cycles of the current system tick. + // + NRF_TIMER0->TASKS_CAPTURE[3] = 1; + Cycles = NRF_TIMER0->CC[3] - NRF_TIMER0->CC[0]; + // + // Get the system tick count. + // + Cycles += TickCount * CyclesPerTick; + return Cycles; +} + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/embOS/SEGGER_SYSVIEW_embOS.c b/resources_extra/SystemView_Src_V320/Sample/embOS/SEGGER_SYSVIEW_embOS.c new file mode 100644 index 0000000..8c78ae2 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/embOS/SEGGER_SYSVIEW_embOS.c @@ -0,0 +1,233 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_embOS.c +Purpose : Interface between embOS and System View. +Revision: $Rev: 13453 $ +*/ + +#include "RTOS.h" +#include "SEGGER_SYSVIEW.h" +#include "SEGGER_RTT.h" +#include "SEGGER_SYSVIEW_embOS.h" + +#if (OS_VERSION < 41201) + #error "SystemView is only supported in embOS V4.12a and later." +#endif + +static void _cbSendTaskInfo(const OS_TASK* pTask) { + SEGGER_SYSVIEW_TASKINFO Info; + + OS_EnterRegion(); // No scheduling to make sure the task list does not change while we are transmitting it + memset(&Info, 0, sizeof(Info)); // Fill all elements with 0 to allow extending the structure in future version without breaking the code + Info.TaskID = (U32)pTask; +#if OS_TRACKNAME + Info.sName = pTask->Name; +#endif + Info.Prio = pTask->Priority; +#if OS_CHECKSTACK + Info.StackBase = (U32)pTask->pStackBot; + Info.StackSize = pTask->StackSize; +#endif + SEGGER_SYSVIEW_SendTaskInfo(&Info); + OS_LeaveRegion(); // No scheduling to make sure the task list does not change while we are transmitting it +} + +/********************************************************************* +* +* OS_SYSVIEW_SendTaskList() +* +* Function description +* This function is part of the link between embOS and SYSVIEW. +* Called from SystemView when asked by the host, it uses SYSVIEW +* functions to send the entire task list to the host. +*/ +static void _cbSendTaskList(void) { + OS_TASK* pTask; + + OS_EnterRegion(); // No scheduling to make sure the task list does not change while we are transmitting it + for (pTask = OS_Global.pTask; pTask; pTask = pTask->pNext) { + _cbSendTaskInfo(pTask); + } +#if ((OS_VERSION >= 43800) && (OS_TRACKNAME != 0)) // Human readable object identifiers supported since embOS V4.38 + { + OS_OBJNAME* p; + for (p = OS_pObjNameRoot; p != NULL; p = p->pNext) { + SEGGER_SYSVIEW_NameResource((OS_U32)p->pOSObjID, p->sName); + } + } +#endif + OS_LeaveRegion(); // No scheduling to make sure the task list does not change while we are transmitting it +} + +static void _cbRecordU32(unsigned int Id, OS_U32 Para0) { + SEGGER_SYSVIEW_RecordU32 (Id, Para0); +} +static void _cbRecordU32x2(unsigned int Id, OS_U32 Para0, OS_U32 Para1) { + SEGGER_SYSVIEW_RecordU32x2(Id, Para0, Para1); +} +static void _cbRecordU32x3(unsigned int Id, OS_U32 Para0, OS_U32 Para1, OS_U32 Para2) { + SEGGER_SYSVIEW_RecordU32x3(Id, Para0, Para1, Para2); +} + +static void _cbRecordU32x4(unsigned int Id, OS_U32 Para0, OS_U32 Para1, OS_U32 Para2, OS_U32 Para3) { + SEGGER_SYSVIEW_RecordU32x4(Id, Para0, Para1, Para2, Para3); +} +static void _cbRecordU32x5(unsigned int Id, OS_U32 Para0, OS_U32 Para1, OS_U32 Para2, OS_U32 Para3, OS_U32 Para4) { + SEGGER_SYSVIEW_RecordU32x5(Id, Para0, Para1, Para2, Para3, Para4); +} + +static OS_U32 _ShrinkId(OS_U32 Ptr) { + return (OS_U32)SEGGER_SYSVIEW_ShrinkId(Ptr); +} + +static void _RecordEnterTimer(OS_U32 TimerID) { + SEGGER_SYSVIEW_RecordEnterTimer(TimerID); +} + +static void _RecordExitTimer(void) { + SEGGER_SYSVIEW_RecordExitTimer(); +} + +static void _RecordEndCallU32(unsigned int Id, OS_U32 RetVal) { + SEGGER_SYSVIEW_RecordEndCallU32(Id, RetVal); +} + +#if (OS_VERSION < 43200) // Work around different embOS Trace API function types prior to V4.32 +static void _cbOnTaskCreate(unsigned int TaskId) { + SEGGER_SYSVIEW_OnTaskCreate((OS_U32)TaskId); +} +#else +#define _cbOnTaskCreate SEGGER_SYSVIEW_OnTaskCreate +#endif + +#if (OS_VERSION < 43200) // Work around different embOS Trace API function types prior to V4.32 +static void _cbOnTaskStartExec(unsigned int TaskId) { + SEGGER_SYSVIEW_OnTaskStartExec((OS_U32)TaskId); +} +#else +#define _cbOnTaskStartExec SEGGER_SYSVIEW_OnTaskStartExec +#endif + +#if (OS_VERSION < 43200) // Work around different embOS Trace API function types prior to V4.32 +static void _cbOnTaskStartReady(unsigned int TaskId) { + SEGGER_SYSVIEW_OnTaskStartReady((OS_U32)TaskId); +} +#else +#define _cbOnTaskStartReady SEGGER_SYSVIEW_OnTaskStartReady +#endif + +#if (OS_VERSION < 43200) // Work around different embOS Trace API function types prior to V4.32 +static void _cbOnTaskStopReady(unsigned int TaskId, unsigned int Reason) { + SEGGER_SYSVIEW_OnTaskStopReady((OS_U32)TaskId, Reason); +} +#else +#define _cbOnTaskStopReady SEGGER_SYSVIEW_OnTaskStopReady +#endif + +#if (OS_VERSION < 43200) // Work around different embOS Trace API function types prior to V4.32 +static void _cbOnTaskTerminate(unsigned int TaskId) { + SEGGER_SYSVIEW_OnTaskTerminate((OS_U32)TaskId); +} +#else +#define _cbOnTaskTerminate SEGGER_SYSVIEW_OnTaskTerminate +#endif + +#if (OS_VERSION >= 43800) +static void _cbRecordObjName(OS_U32 Id, OS_CONST_PTR char* sName) { + SEGGER_SYSVIEW_NameResource(Id, sName); +} +#endif + +// embOS trace API that targets SYSVIEW +const OS_TRACE_API embOS_TraceAPI_SYSVIEW = { +// +// Specific Trace Events +// +SEGGER_SYSVIEW_RecordEnterISR, // void (*pfRecordEnterISR) (void); +SEGGER_SYSVIEW_RecordExitISR, // void (*pfRecordExitISR) (void); +SEGGER_SYSVIEW_RecordExitISRToScheduler, // void (*pfRecordExitISRToScheduler) (void); +_cbSendTaskInfo, // void (*pfRecordTaskInfo) (const OS_TASK* pTask); +_cbOnTaskCreate, // void (*pfRecordTaskCreate) (OS_U32 TaskId); +_cbOnTaskStartExec, // void (*pfRecordTaskStartExec) (OS_U32 TaskId); +SEGGER_SYSVIEW_OnTaskStopExec, // void (*pfRecordTaskStopExec) (void); +_cbOnTaskStartReady, // void (*pfRecordTaskStartReady) (OS_U32 TaskId); +_cbOnTaskStopReady, // void (*pfRecordTaskStopReady) (OS_U32 TaskId, unsigned Reason); +SEGGER_SYSVIEW_OnIdle, // void (*pfRecordIdle) (void); +// +// Generic Trace Event logging +// +SEGGER_SYSVIEW_RecordVoid, // void (*pfRecordVoid) (unsigned Id); +_cbRecordU32, // void (*pfRecordU32) (unsigned Id, OS_U32 Para0); +_cbRecordU32x2, // void (*pfRecordU32x2) (unsigned Id, OS_U32 Para0, OS_U32 Para1); +_cbRecordU32x3, // void (*pfRecordU32x3) (unsigned Id, OS_U32 Para0, OS_U32 Para1, OS_U32 Para2); +_cbRecordU32x4, // void (*pfRecordU32x4) (unsigned Id, OS_U32 Para0, OS_U32 Para1, OS_U32 Para2, OS_U32 Para3); +_ShrinkId, // OS_U32 (*pfPtrToId) (OS_U32 Ptr); +#if (OS_VERSION >= 41400) // Tracing timer is supported since embOS V4.14 +_RecordEnterTimer, // void (*pfRecordEnterTimer) (OS_U32 TimerID); +_RecordExitTimer, // void (*pfRecordExitTimer) (void); +#endif +#if (OS_VERSION >= 42400) // Tracing end of call supported since embOS V4.24 +SEGGER_SYSVIEW_RecordEndCall, // void (*pfRecordEndCall) (unsigned int Id); +_RecordEndCallU32, // void (*pfRecordEndCallReturnValue) (unsigned int Id, OS_U32 ReturnValue); +_cbOnTaskTerminate, // void (*pfRecordTaskTerminate) (OS_U32 TaskId); +_cbRecordU32x5, // void (*pfRecordU32x5) (unsigned Id, OS_U32 Para0, OS_U32 Para1, OS_U32 Para2, OS_U32 Para3, OS_U32 Para4); +#endif +#if (OS_VERSION >= 43800) // Human readable object identifiers supported since embOS V4.38 +_cbRecordObjName, // void (*pfRecordObjName) (OS_U32 Id, OS_CONST_PTR char* Para0); +#endif +}; + +// Services provided to SYSVIEW by embOS +const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI = { + OS_GetTime_us64, + _cbSendTaskList, +}; + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/embOS/SEGGER_SYSVIEW_embOS.h b/resources_extra/SystemView_Src_V320/Sample/embOS/SEGGER_SYSVIEW_embOS.h new file mode 100644 index 0000000..c264e95 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/embOS/SEGGER_SYSVIEW_embOS.h @@ -0,0 +1,69 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_embOS.h +Purpose : Interface between embOS and System View. +Revision: $Rev: 9599 $ +*/ + +#ifndef SYSVIEW_EMBOS_H +#define SYSVIEW_EMBOS_H + +#include "RTOS.h" +#include "SEGGER_SYSVIEW.h" + +// embOS trace API that targets SYSVIEW +extern const OS_TRACE_API embOS_TraceAPI_SYSVIEW; + +// Services provided to SYSVIEW by embOS +extern const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI; + +#endif + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/uCOS-II/Config/Cortex-M/SEGGER_SYSVIEW_Config_uCOSII.c b/resources_extra/SystemView_Src_V320/Sample/uCOS-II/Config/Cortex-M/SEGGER_SYSVIEW_Config_uCOSII.c new file mode 100644 index 0000000..40c1391 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/uCOS-II/Config/Cortex-M/SEGGER_SYSVIEW_Config_uCOSII.c @@ -0,0 +1,116 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Config_uCOSII.c +Purpose : Sample setup configuration of SystemView with Micrium + uC/OS-II. +Revision: $Rev: 9599 $ +*/ +#include "SEGGER_SYSVIEW.h" +#include "os.h" +#include "cpu_core.h" + +#if (defined(OS_TRACE_EN) && (OS_TRACE_EN > 0u)) + +extern const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI; + +CPU_ERR local_err; + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ +// The application name to be displayed in SystemViewer +#define SYSVIEW_APP_NAME "ARM Cortex-M Demo" + +// The target device name +#define SYSVIEW_DEVICE_NAME "Cortex-M Device" + + + +// Frequency of the timestamp. Must match SEGGER_SYSVIEW_GET_TIMESTAMP in SEGGER_SYSVIEW_Conf.h +#define SYSVIEW_TIMESTAMP_FREQ (CPU_TS_TmrFreqGet(&local_err)) + +// System Frequency. SystemcoreClock is used in most CMSIS compatible projects. +#define SYSVIEW_CPU_FREQ (CPU_TS_TmrFreqGet(&local_err)) + +// The lowest RAM address used for IDs (pointers) +#define SYSVIEW_RAM_BASE (0x20000000) + +/********************************************************************* +* +* _cbSendSystemDesc() +* +* Function description +* Sends SystemView description strings. +*/ +static void _cbSendSystemDesc(void) { + SEGGER_SYSVIEW_SendSysDesc("N="SYSVIEW_APP_NAME",D="SYSVIEW_DEVICE_NAME",O=uCOS-II"); + SEGGER_SYSVIEW_SendSysDesc("I#15=SysTick"); + // + SYSVIEW_SendResourceList(); +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +void SEGGER_SYSVIEW_Conf(void) { + SEGGER_SYSVIEW_Init(SYSVIEW_TIMESTAMP_FREQ, SYSVIEW_CPU_FREQ, + &SYSVIEW_X_OS_TraceAPI, _cbSendSystemDesc); + SEGGER_SYSVIEW_SetRAMBase(SYSVIEW_RAM_BASE); +} + +#endif + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/uCOS-II/Config/RX/SEGGER_SYSVIEW_Config_uCOSII.c b/resources_extra/SystemView_Src_V320/Sample/uCOS-II/Config/RX/SEGGER_SYSVIEW_Config_uCOSII.c new file mode 100644 index 0000000..41b54b8 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/uCOS-II/Config/RX/SEGGER_SYSVIEW_Config_uCOSII.c @@ -0,0 +1,134 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Config_uCOSII.c +Purpose : Sample setup configuration of SystemView with Micrium + uC/OS-II. +Revision: $Rev: 9599 $ +*/ +#include "SEGGER_SYSVIEW.h" +#include "os.h" +#include "cpu_core.h" +#include "bsp_sys.h" + +#if (defined(OS_TRACE_EN) && (OS_TRACE_EN > 0u)) + +extern const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI; + +CPU_ERR local_err; + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ +// The application name to be displayed in SystemViewer +#define SYSVIEW_APP_NAME "Renesas RX Demo" + +// The target device name +#define SYSVIEW_DEVICE_NAME "Renesas RX Device" + + + +// Frequency of the timestamp. Must match SEGGER_SYSVIEW_GET_TIMESTAMP in SEGGER_SYSVIEW_Conf.h +#define SYSVIEW_TIMESTAMP_FREQ (CPU_TS_TmrFreqGet(&local_err)) + +// System Frequency. SystemcoreClock is used in most CMSIS compatible projects. +#define SYSVIEW_CPU_FREQ (BSP_SysPerClkFreqGet()) + +// The lowest RAM address used for IDs (pointers) +#define SYSVIEW_RAM_BASE (0) + + +U32 SEGGER_SYSVIEW_X_GetTimestamp(void) { + return (CPU_TS_Get32()); +} + +U32 SEGGER_SYSVIEW_X_GetInterruptId(void) { + U32 IntId; + __asm volatile ("mvfc PSW, %0 \t\n" // Load current PSW + "and #0x0F000000, %0 \t\n" // Clear all except IPL ([27:24]) + "shlr #24, %0 \t\n" // Shift IPL to [3:0] + : "=r" (IntId) // Output result + : // Input + : // Clobbered list + ); + return IntId; +} + +/********************************************************************* +* +* _cbSendSystemDesc() +* +* Function description +* Sends SystemView description strings. +*/ +static void _cbSendSystemDesc(void) { + SEGGER_SYSVIEW_SendSysDesc("N="SYSVIEW_APP_NAME",D="SYSVIEW_DEVICE_NAME",O=uCOS-II"); + SEGGER_SYSVIEW_SendSysDesc("I#12=CMT0 Tmr IRQ (Tick)"); + // + SYSVIEW_SendResourceList(); +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +void SEGGER_SYSVIEW_Conf(void) { + SEGGER_SYSVIEW_Init(SYSVIEW_TIMESTAMP_FREQ, SYSVIEW_CPU_FREQ, + &SYSVIEW_X_OS_TraceAPI, _cbSendSystemDesc); + SEGGER_SYSVIEW_SetRAMBase(SYSVIEW_RAM_BASE); +} + +#endif + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/uCOS-II/Config/os_cfg_trace.h b/resources_extra/SystemView_Src_V320/Sample/uCOS-II/Config/os_cfg_trace.h new file mode 100644 index 0000000..c88ae9c --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/uCOS-II/Config/os_cfg_trace.h @@ -0,0 +1,73 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +* --------------- +* uC/OS-II is provided in source form for FREE short-term evaluation, for educational use or +* for peaceful research. If you plan or intend to use uC/OS-II in a commercial application/ +* product then, you need to contact Micrium to properly license uC/OS-II for its use in your +* application/product. We provide ALL the source code for your convenience and to help you +* experience uC/OS-II. The fact that the source is provided does NOT mean that you can use +* it commercially without paying a licensing fee. +* +* Knowledge of the source code may NOT be used to develop a similar product. +* +* Please help us continue to provide the embedded community with the finest software available. +* Your honesty is greatly appreciated. +* +* You can find our product's user manual, API reference, release notes and +* more information at https://doc.micrium.com. +* You can contact us at www.micrium.com. +************************************************************************************************************************ +*/ + +#ifndef OS_CFG_TRACE_H +#define OS_CFG_TRACE_H + +#define OS_CFG_TRACE_MAX_TASK 32u /* Maximum number of tasks to record. */ +#define OS_CFG_TRACE_MAX_RESOURCES 128u /* Maximum number of combined kernel objects to record. */ + +#endif diff --git a/resources_extra/SystemView_Src_V320/Sample/uCOS-II/SEGGER_SYSVIEW_uCOSII.c b/resources_extra/SystemView_Src_V320/Sample/uCOS-II/SEGGER_SYSVIEW_uCOSII.c new file mode 100644 index 0000000..c1ff485 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/uCOS-II/SEGGER_SYSVIEW_uCOSII.c @@ -0,0 +1,366 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_uCOSII.c +Purpose : Interface between Micrium uC/OS-II and SystemView. +Revision: $Rev: 9599 $ +*/ + +#include + +#ifndef SYSVIEW_MEMSET + #include + #define SYSVIEW_MEMSET(p, v, n) memset(p, v, n) +#endif + +#ifndef OS_CFG_TRACE_MAX_RESOURCES +#define OS_CFG_TRACE_MAX_RESOURCES 0 +#endif + +typedef struct SYSVIEW_UCOSII_TASK_STATUS SYSVIEW_UCOSII_TASK_STATUS; + +struct SYSVIEW_UCOSII_TASK_STATUS { + U32 TaskID; + const char* OSTCBTaskName; + INT8U OSTCBPrio; + OS_STK* OSTCBStkBottom; + INT32U OSTCBStkSize; +}; + +typedef struct SYSVIEW_UCOSII_RESOURCE SYSVIEW_UCOSII_RESOURCE; + +struct SYSVIEW_UCOSII_RESOURCE { + U32 ResourceId; + const char* sResource; + U32 Registered; +}; + +static SYSVIEW_UCOSII_TASK_STATUS _aTasks[OS_CFG_TRACE_MAX_TASK]; +static unsigned _NumTasks; + +#if OS_CFG_TRACE_MAX_RESOURCES > 0 +static SYSVIEW_UCOSII_RESOURCE _aResources[OS_CFG_TRACE_MAX_RESOURCES]; +static unsigned _NumResources; +#endif + +/********************************************************************* +* +* _cbSendTaskList() +* +* Function description +* This function is part of the link between FreeRTOS and SYSVIEW. +* Called from SystemView when asked by the host, it uses SYSVIEW +* functions to send the entire task list to the host. +*/ +static void _cbSendTaskList(void) { + unsigned n; + + for (n = 0; n < _NumTasks; n++) { + SYSVIEW_SendTaskInfo((U32)_aTasks[n].TaskID, _aTasks[n].OSTCBTaskName, (unsigned)_aTasks[n].OSTCBPrio, (U32)_aTasks[n].OSTCBStkBottom, (unsigned)_aTasks[n].OSTCBStkSize); + } +} + +/********************************************************************* +* +* _cbGetTime() +* +* Function description +* This function is part of the link between FreeRTOS and SYSVIEW. +* Called from SystemView when asked by the host, returns the +* current system time in micro seconds. +*/ +static U64 _cbGetTime(void) { + INT32U Tick; + + Tick = OSTimeGet(); + + return Tick * 1000; +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ + +/********************************************************************* +* +* SYSVIEW_TaskReady() +* +* Function description +* Record when a task is ready for execution. +*/ +void SYSVIEW_TaskReady(U32 TaskID) { + if (TaskID != (U32)OSTCBPrioTbl[OS_TASK_IDLE_PRIO]) { + SEGGER_SYSVIEW_OnTaskStartReady(TaskID); + } +} + +/********************************************************************* +* +* SYSVIEW_TaskSwitchedIn() +* +* Function description +* Record when a task starts/continues execution. +* If the idle task continues, record an on idle event. +*/ +void SYSVIEW_TaskSwitchedIn(U32 TaskID) { + if (TaskID != (U32)OSTCBPrioTbl[OS_TASK_IDLE_PRIO]) { + SEGGER_SYSVIEW_OnTaskStartExec(TaskID); + } else { + SEGGER_SYSVIEW_OnIdle(); + } +} + +/********************************************************************* +* +* SYSVIEW_TaskSuspend() +* +* Function description +* Record when a task is suspended. +*/ +void SYSVIEW_TaskSuspend(U32 TaskID) { + if (TaskID != (U32)OSTCBPrioTbl[OS_TASK_IDLE_PRIO]) { + SEGGER_SYSVIEW_OnTaskStopReady(TaskID, (1u << 2)); + } +} + +/********************************************************************* +* +* SYSVIEW_AddTask() +* +* Function description +* Add a task to the internal list and record its information. +*/ +void SYSVIEW_AddTask(U32 TaskID, const char* OSTCBTaskName, INT8U OSTCBPrio, OS_STK* OSTCBStkBottom, INT32U OSTCBStkSize) { + if (TaskID != (U32)OSTCBPrioTbl[OS_TASK_IDLE_PRIO]) { + if (_NumTasks >= OS_CFG_TRACE_MAX_TASK) { + SEGGER_SYSVIEW_Warn("SYSTEMVIEW: Could not record task information. Maximum number of tasks reached."); + return; + } + + _aTasks[_NumTasks].TaskID = TaskID; + _aTasks[_NumTasks].OSTCBTaskName = OSTCBTaskName; + _aTasks[_NumTasks].OSTCBPrio = OSTCBPrio; + _aTasks[_NumTasks].OSTCBStkBottom = OSTCBStkBottom; + _aTasks[_NumTasks].OSTCBStkSize = OSTCBStkSize; + + _NumTasks++; + + SYSVIEW_SendTaskInfo(TaskID, OSTCBTaskName, (unsigned)OSTCBPrio, (U32)OSTCBStkBottom, (unsigned)OSTCBStkSize); + } +} + +/********************************************************************* +* +* SYSVIEW_UpdateTask() +* +* Function description +* Update a task in the internal list and record its information. +*/ +void SYSVIEW_UpdateTask(U32 TaskID, const char* OSTCBTaskName, INT8U OSTCBPrio, OS_STK* OSTCBStkBottom, INT32U OSTCBStkSize) { + unsigned n; + + if (TaskID != (U32)OSTCBPrioTbl[OS_TASK_IDLE_PRIO]) { + for (n = 0; n < _NumTasks; n++) { + if (_aTasks[n].TaskID == TaskID) { + break; + } + } + if (n < _NumTasks) { + _aTasks[n].OSTCBTaskName = OSTCBTaskName; + _aTasks[n].OSTCBPrio = OSTCBPrio; + _aTasks[n].OSTCBStkBottom = OSTCBStkBottom; + _aTasks[n].OSTCBStkSize = OSTCBStkSize; + + SYSVIEW_SendTaskInfo(TaskID, OSTCBTaskName, (unsigned)OSTCBPrio, (U32)OSTCBStkBottom, (unsigned)OSTCBStkSize); + } else { + SYSVIEW_AddTask(TaskID, OSTCBTaskName, OSTCBPrio, OSTCBStkBottom, OSTCBStkSize); + } + } +} + +/********************************************************************* +* +* SYSVIEW_SendTaskInfo() +* +* Function description +* Record task information. +*/ +void SYSVIEW_SendTaskInfo(U32 TaskID, const char* sName, unsigned Prio, U32 StackBase, unsigned StackSize) { + SEGGER_SYSVIEW_TASKINFO TaskInfo; + + // + // Fill all elements with 0 to allow extending the structure in future version without breaking the code + // + SYSVIEW_MEMSET(&TaskInfo, 0, sizeof(TaskInfo)); + TaskInfo.TaskID = TaskID; + TaskInfo.sName = sName; + TaskInfo.Prio = Prio; + TaskInfo.StackBase = StackBase; + TaskInfo.StackSize = StackSize; + SEGGER_SYSVIEW_SendTaskInfo(&TaskInfo); +} + + +/********************************************************************* +* +* SYSVIEW_UpdateResource() +* +* Function description +* Update a kernel object in the internal list and record its information. +*/ +void SYSVIEW_UpdateResource(U32 EventID, const char* OSEventName) { + unsigned n; + + for (n = 0; n < _NumResources; n++) { + if (_aResources[n].ResourceId == EventID) { + break; + } + } + if (n < _NumResources) { + _aResources[n].sResource = OSEventName; + + SEGGER_SYSVIEW_NameResource(_aResources[n].ResourceId, _aResources[n].sResource); + } +} + + +/********************************************************************* +* +* SYSVIEW_RecordU32x4() +* +* Function description +* Record an event with 4 parameters +*/ +void SYSVIEW_RecordU32x4(unsigned Id, U32 Para0, U32 Para1, U32 Para2, U32 Para3) { + U8 aPacket[SEGGER_SYSVIEW_INFO_SIZE + 4 * SEGGER_SYSVIEW_QUANTA_U32]; + U8* pPayload; + // + pPayload = SEGGER_SYSVIEW_PREPARE_PACKET(aPacket); // Prepare the packet for SystemView + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para0); // Add the first parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para1); // Add the second parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para2); // Add the third parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para3); // Add the fourth parameter to the packet + // + SEGGER_SYSVIEW_SendPacket(&aPacket[0], pPayload, Id); // Send the packet +} + +/********************************************************************* +* +* SYSVIEW_RecordU32x5() +* +* Function description +* Record an event with 5 parameters +*/ +void SYSVIEW_RecordU32x5(unsigned Id, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4) { + U8 aPacket[SEGGER_SYSVIEW_INFO_SIZE + 5 * SEGGER_SYSVIEW_QUANTA_U32]; + U8* pPayload; + // + pPayload = SEGGER_SYSVIEW_PREPARE_PACKET(aPacket); // Prepare the packet for SystemView + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para0); // Add the first parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para1); // Add the second parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para2); // Add the third parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para3); // Add the fourth parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para4); // Add the fifth parameter to the packet + // + SEGGER_SYSVIEW_SendPacket(&aPacket[0], pPayload, Id); // Send the packet +} +/********************************************************************* +* +* SYSVIEW_RecordU32Register() +* +* Function description +* Record an event with 1 parameter and register the resource to be +* sent in the system description. +*/ +void SYSVIEW_RecordU32Register(unsigned EventId, U32 ResourceId, const char* sResource) { + SEGGER_SYSVIEW_NameResource(ResourceId, sResource); + SEGGER_SYSVIEW_RecordU32(EventId, SEGGER_SYSVIEW_ShrinkId(ResourceId)); +#if OS_CFG_TRACE_MAX_RESOURCES > 0 + if (_NumResources >= OS_CFG_TRACE_MAX_RESOURCES) { + SEGGER_SYSVIEW_Warn("SYSTEMVIEW: Could not register resource name. Maximum number of resources reached."); + return; + } + + _aResources[_NumResources].ResourceId = ResourceId; + _aResources[_NumResources].sResource = sResource; + _aResources[_NumResources].Registered = 0; + + _NumResources++; +#endif +} + +void SYSVIEW_SendResourceList(void) { +#if OS_CFG_TRACE_MAX_RESOURCES > 0 + unsigned int n; + + for (n = 0; n < _NumResources; n++) { + if (_aResources[n].Registered == 0) { + SEGGER_SYSVIEW_NameResource(_aResources[n].ResourceId, _aResources[n].sResource); + _aResources[n].Registered = 1; + } + } +#endif +} + +/********************************************************************* +* +* Public API structures +* +********************************************************************** +*/ +// Callbacks provided to SYSTEMVIEW by FreeRTOS +const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI = { + _cbGetTime, + _cbSendTaskList, +}; + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/uCOS-II/os_trace_events.h b/resources_extra/SystemView_Src_V320/Sample/uCOS-II/os_trace_events.h new file mode 100644 index 0000000..9f488e3 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/uCOS-II/os_trace_events.h @@ -0,0 +1,505 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +* --------------- +* uC/OS-II is provided in source form for FREE short-term evaluation, for educational use or +* for peaceful research. If you plan or intend to use uC/OS-II in a commercial application/ +* product then, you need to contact Micrium to properly license uC/OS-II for its use in your +* application/product. We provide ALL the source code for your convenience and to help you +* experience uC/OS-II. The fact that the source is provided does NOT mean that you can use +* it commercially without paying a licensing fee. +* +* Knowledge of the source code may NOT be used to develop a similar product. +* +* Please help us continue to provide the embedded community with the finest software available. +* Your honesty is greatly appreciated. +* +* You can find our product's user manual, API reference, release notes and +* more information at https://doc.micrium.com. +* You can contact us at www.micrium.com. +************************************************************************************************************************ +*/ + +#include "SEGGER_SYSVIEW.h" +#include "ucos_ii.h" +#include "os_cfg_trace.h" + + +/* +************************************************************************************************************************ +* uC/OS-II Trace Macros +************************************************************************************************************************ +*/ + +#if (defined(OS_TRACE_EN) && (OS_TRACE_EN > 0u)) +#define OS_TRACE_INIT() SEGGER_SYSVIEW_Conf() +#define OS_TRACE_START() SEGGER_SYSVIEW_Start() +#define OS_TRACE_STOP() SEGGER_SYSVIEW_Stop() +#else +#define OS_TRACE_INIT() +#define OS_TRACE_START() +#define OS_TRACE_STOP() +#endif + + +/* +************************************************************************************************************************ +* uC/OS-II Trace fixed defines for SystemView +************************************************************************************************************************ +*/ + +#if (defined(OS_TRACE_EN) && (OS_TRACE_EN > 0u)) +#define OS_TRACE_ID_OFFSET (32u) + +#define OS_TRACE_ID_TICK_INCREMENT ( 1u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_ISR_REGISTER ( 2u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MBOX_CREATE ( 3u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MBOX_DEL ( 4u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MBOX_POST ( 5u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MBOX_POST_OPT ( 6u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MBOX_PEND ( 7u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MUTEX_CREATE ( 8u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MUTEX_DEL ( 9u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MUTEX_POST (10u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MUTEX_PEND (11u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MUTEX_TASK_PRIO_INHERIT (12u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MUTEX_TASK_PRIO_DISINHERIT (13u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_SEM_CREATE (14u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_SEM_DEL (15u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_SEM_POST (16u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_SEM_PEND (17u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_Q_CREATE (18u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_Q_DEL (19u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_Q_POST (20u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_Q_POST_FRONT (21u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_Q_POST_OPT (22u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_Q_PEND (23u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_FLAG_CREATE (24u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_FLAG_DEL (25u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_FLAG_POST (26u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_FLAG_PEND (27u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MEM_CREATE (28u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MEM_PUT (29u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MEM_GET (30u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_TMR_CREATE (31u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_TMR_DEL (32u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_TMR_START (33u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_TMR_STOP (34u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_TMR_EXPIRED (35u + OS_TRACE_ID_OFFSET) +#endif + + +/* +************************************************************************************************************************ +* uC/OS-II Trace Kernel-Related Macros +************************************************************************************************************************ +*/ + +#if (defined(OS_TRACE_EN) && (OS_TRACE_EN > 0u)) +#define OS_TRACE_TASK_CREATE(p_tcb) if (p_tcb != 0) { \ + SEGGER_SYSVIEW_OnTaskCreate((U32)p_tcb); \ + SYSVIEW_AddTask((U32)p_tcb, \ + (const char *)(&(p_tcb->OSTCBTaskName[0])), \ + p_tcb->OSTCBPrio, \ + p_tcb->OSTCBStkBottom, \ + p_tcb->OSTCBStkSize \ + ); \ + } + +#define OS_TRACE_TASK_NAME_SET(p_tcb) if (p_tcb != 0) { \ + SYSVIEW_UpdateTask((U32)p_tcb, \ + (const char *)(&(p_tcb->OSTCBTaskName[0])), \ + p_tcb->OSTCBPrio, \ + p_tcb->OSTCBStkBottom, \ + p_tcb->OSTCBStkSize \ + ); \ + } + +#define OS_TRACE_TASK_READY(p_tcb) SYSVIEW_TaskReady((U32)p_tcb) +#define OS_TRACE_TASK_SWITCHED_IN(p_tcb) SYSVIEW_TaskSwitchedIn((U32)p_tcb) +#define OS_TRACE_TASK_DLY(dly_ticks) +#define OS_TRACE_TASK_SUSPEND(p_tcb) +#define OS_TRACE_TASK_SUSPENDED(p_tcb) SYSVIEW_TaskSuspend((U32)p_tcb) +#define OS_TRACE_TASK_RESUME(p_tcb) SYSVIEW_TaskReady((U32)p_tcb) + +#define OS_TRACE_EVENT_NAME_SET(p_event, p_name) if (p_event != 0 && p_name != 0) { \ + SYSVIEW_UpdateResource((U32)p_event, \ + (const char *)(p_name)); \ + } + +#define OS_TRACE_ISR_BEGIN(isr_id) +#define OS_TRACE_ISR_END() + +#define OS_TRACE_ISR_ENTER() SEGGER_SYSVIEW_RecordEnterISR() +#define OS_TRACE_ISR_EXIT() SEGGER_SYSVIEW_RecordExitISR() +#define OS_TRACE_ISR_EXIT_TO_SCHEDULER() SEGGER_SYSVIEW_RecordExitISRToScheduler() + + +/* +************************************************************************************************************************ +* uC/OS-II Trace Simple Recorder Functions +************************************************************************************************************************ +*/ + +#define OS_TRACE_TICK_INCREMENT(OSTime) SEGGER_SYSVIEW_RecordU32 (OS_TRACE_ID_TICK_INCREMENT, (U32)OSTime) +#define OS_TRACE_ISR_REGISTER(isr_id, isr_name, isr_prio) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_ISR_REGISTER, (U32)isr_id, (U32)isr_prio) +#define OS_TRACE_MUTEX_TASK_PRIO_INHERIT(p_tcb, prio) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_MUTEX_TASK_PRIO_INHERIT, SEGGER_SYSVIEW_ShrinkId((U32)p_tcb), (U32)prio); +#define OS_TRACE_MUTEX_TASK_PRIO_DISINHERIT(p_tcb, prio) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_MUTEX_TASK_PRIO_DISINHERIT, SEGGER_SYSVIEW_ShrinkId((U32)p_tcb), (U32)prio); +#define OS_TRACE_TASK_DEL(p_tcb) + + +/* +************************************************************************************************************************ +* uC/OS-II Trace Complex Recorder Functions +************************************************************************************************************************ +*/ + +#define OS_TRACE_MBOX_CREATE(p_mbox, p_name) SYSVIEW_RecordU32Register(OS_TRACE_ID_MBOX_CREATE, ((U32)p_mbox), (const char *)p_name) +#define OS_TRACE_MUTEX_CREATE(p_mutex, p_name) SYSVIEW_RecordU32Register(OS_TRACE_ID_MUTEX_CREATE, ((U32)p_mutex), (const char *)p_name) +#define OS_TRACE_SEM_CREATE(p_sem, p_name) SYSVIEW_RecordU32Register(OS_TRACE_ID_SEM_CREATE, ((U32)p_sem), (const char *)p_name) +#define OS_TRACE_Q_CREATE(p_q, p_name) SYSVIEW_RecordU32Register(OS_TRACE_ID_Q_CREATE, ((U32)p_q), (const char *)p_name) +#define OS_TRACE_FLAG_CREATE(p_grp, p_name) SYSVIEW_RecordU32Register(OS_TRACE_ID_FLAG_CREATE, ((U32)p_grp), (const char *)p_name) +#define OS_TRACE_MEM_CREATE(p_mem) SYSVIEW_RecordU32Register(OS_TRACE_ID_MEM_CREATE, ((U32)p_mem), (const char *)"Mem Block") +#define OS_TRACE_TMR_CREATE(p_tmr, p_name) SYSVIEW_RecordU32Register(OS_TRACE_ID_TMR_CREATE, ((U32)p_tmr), (const char *)p_name) + + +/* +************************************************************************************************************************ +* uC/OS-II Trace API Enter Functions +************************************************************************************************************************ +*/ + +#if (defined(OS_TRACE_API_ENTER_EN) && (OS_TRACE_API_ENTER_EN > 0u)) +#define OS_TRACE_MBOX_DEL_ENTER(p_mbox, opt) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_MBOX_DEL, SEGGER_SYSVIEW_ShrinkId((U32)p_mbox), (U32)opt) +#define OS_TRACE_MBOX_POST_ENTER(p_mbox) SEGGER_SYSVIEW_RecordU32 (OS_TRACE_ID_MBOX_POST, SEGGER_SYSVIEW_ShrinkId((U32)p_mbox)) +#define OS_TRACE_MBOX_POST_OPT_ENTER(p_mbox, opt) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_MBOX_POST_OPT, SEGGER_SYSVIEW_ShrinkId((U32)p_mbox), (U32)opt) +#define OS_TRACE_MBOX_PEND_ENTER(p_mbox, timeout) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_MBOX_PEND, SEGGER_SYSVIEW_ShrinkId((U32)p_mbox), (U32)timeout) +#define OS_TRACE_MUTEX_DEL_ENTER(p_mutex, opt) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_MUTEX_DEL, SEGGER_SYSVIEW_ShrinkId((U32)p_mutex), (U32)opt) +#define OS_TRACE_MUTEX_POST_ENTER(p_mutex) SEGGER_SYSVIEW_RecordU32 (OS_TRACE_ID_MUTEX_POST, SEGGER_SYSVIEW_ShrinkId((U32)p_mutex)) +#define OS_TRACE_MUTEX_PEND_ENTER(p_mutex, timeout) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_MUTEX_PEND, SEGGER_SYSVIEW_ShrinkId((U32)p_mutex), (U32)timeout) +#define OS_TRACE_SEM_DEL_ENTER(p_sem, opt) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_SEM_DEL, SEGGER_SYSVIEW_ShrinkId((U32)p_sem), (U32)opt) +#define OS_TRACE_SEM_POST_ENTER(p_sem) SEGGER_SYSVIEW_RecordU32 (OS_TRACE_ID_SEM_POST, SEGGER_SYSVIEW_ShrinkId((U32)p_sem)) +#define OS_TRACE_SEM_PEND_ENTER(p_sem, timeout) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_SEM_PEND, SEGGER_SYSVIEW_ShrinkId((U32)p_sem), (U32)timeout) +#define OS_TRACE_Q_DEL_ENTER(p_q, opt) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_Q_DEL, SEGGER_SYSVIEW_ShrinkId((U32)p_q), (U32)opt) +#define OS_TRACE_Q_POST_ENTER(p_q) SEGGER_SYSVIEW_RecordU32 (OS_TRACE_ID_Q_POST, SEGGER_SYSVIEW_ShrinkId((U32)p_q)) +#define OS_TRACE_Q_POST_FRONT_ENTER(p_q) SEGGER_SYSVIEW_RecordU32 (OS_TRACE_ID_Q_POST_FRONT, SEGGER_SYSVIEW_ShrinkId((U32)p_q)) +#define OS_TRACE_Q_POST_OPT_ENTER(p_q, opt) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_Q_POST_OPT, SEGGER_SYSVIEW_ShrinkId((U32)p_q), (U32)opt) +#define OS_TRACE_Q_PEND_ENTER(p_q, timeout) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_Q_PEND, SEGGER_SYSVIEW_ShrinkId((U32)p_q), (U32)timeout) +#define OS_TRACE_FLAG_DEL_ENTER(p_grp, opt) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_FLAG_DEL, SEGGER_SYSVIEW_ShrinkId((U32)p_grp), (U32)opt) +#define OS_TRACE_FLAG_POST_ENTER(p_grp, flags, opt) SEGGER_SYSVIEW_RecordU32x3(OS_TRACE_ID_FLAG_POST, SEGGER_SYSVIEW_ShrinkId((U32)p_grp), (U32)flags, (U32)opt) +#define OS_TRACE_FLAG_PEND_ENTER(p_grp, flags, timeout, opt) SYSVIEW_RecordU32x4 (OS_TRACE_ID_FLAG_PEND, SEGGER_SYSVIEW_ShrinkId((U32)p_grp), (U32)flags, (U32)timeout, (U32)opt) +#define OS_TRACE_MEM_PUT_ENTER(p_mem, p_blk) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_MEM_PUT, SEGGER_SYSVIEW_ShrinkId((U32)p_mem), (U32)p_blk) +#define OS_TRACE_MEM_GET_ENTER(p_mem) SEGGER_SYSVIEW_RecordU32 (OS_TRACE_ID_MEM_GET, SEGGER_SYSVIEW_ShrinkId((U32)p_mem)) +#define OS_TRACE_TMR_DEL_ENTER(p_tmr) SEGGER_SYSVIEW_RecordU32 (OS_TRACE_ID_TMR_DEL, SEGGER_SYSVIEW_ShrinkId((U32)p_tmr)) +#define OS_TRACE_TMR_START_ENTER(p_tmr) SEGGER_SYSVIEW_RecordU32 (OS_TRACE_ID_TMR_START, SEGGER_SYSVIEW_ShrinkId((U32)p_tmr)) +#define OS_TRACE_TMR_STOP_ENTER(p_tmr) SEGGER_SYSVIEW_RecordU32 (OS_TRACE_ID_TMR_STOP, SEGGER_SYSVIEW_ShrinkId((U32)p_tmr)) +#define OS_TRACE_TMR_EXPIRED(p_tmr) SEGGER_SYSVIEW_RecordU32 (OS_TRACE_ID_TMR_EXPIRED, SEGGER_SYSVIEW_ShrinkId((U32)p_tmr)) +#else +#define OS_TRACE_MBOX_DEL_ENTER(p_mbox, opt) +#define OS_TRACE_MBOX_POST_ENTER(p_mbox) +#define OS_TRACE_MBOX_POST_OPT_ENTER(p_mbox, opt) +#define OS_TRACE_MBOX_PEND_ENTER(p_mbox, timeout) +#define OS_TRACE_MUTEX_DEL_ENTER(p_mutex, opt) +#define OS_TRACE_MUTEX_POST_ENTER(p_mutex) +#define OS_TRACE_MUTEX_PEND_ENTER(p_mutex, timeout) +#define OS_TRACE_SEM_DEL_ENTER(p_sem, opt) +#define OS_TRACE_SEM_POST_ENTER(p_sem) +#define OS_TRACE_SEM_PEND_ENTER(p_sem, timeout) +#define OS_TRACE_Q_DEL_ENTER(p_q, opt) +#define OS_TRACE_Q_POST_ENTER(p_q) +#define OS_TRACE_Q_POST_FRONT_ENTER(p_q) +#define OS_TRACE_Q_POST_OPT_ENTER(p_q, opt) +#define OS_TRACE_Q_PEND_ENTER(p_q, timeout) +#define OS_TRACE_FLAG_DEL_ENTER(p_grp, opt) +#define OS_TRACE_FLAG_POST_ENTER(p_grp, flags, opt) +#define OS_TRACE_FLAG_PEND_ENTER(p_grp, flags, timeout, opt) +#define OS_TRACE_MEM_PUT_ENTER(p_mem, p_blk) +#define OS_TRACE_MEM_GET_ENTER(p_mem) +#define OS_TRACE_TMR_DEL_ENTER(p_tmr) +#define OS_TRACE_TMR_START_ENTER(p_tmr) +#define OS_TRACE_TMR_STOP_ENTER(p_tmr) +#define OS_TRACE_TMR_EXPIRED(p_tmr) +#endif + + +/* +************************************************************************************************************************ +* uC/OS-II Trace API Exit Functions +************************************************************************************************************************ +*/ + +#if (defined(OS_TRACE_API_EXIT_EN) && (OS_TRACE_API_EXIT_EN > 0u)) +#define OS_TRACE_MBOX_DEL_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_MBOX_DEL, RetVal) +#define OS_TRACE_MBOX_POST_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_MBOX_POST, RetVal) +#define OS_TRACE_MBOX_POST_OPT_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_MBOX_POST_OPT, RetVal) +#define OS_TRACE_MBOX_PEND_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_MBOX_PEND, RetVal) +#define OS_TRACE_MUTEX_DEL_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_MUTEX_DEL, RetVal) +#define OS_TRACE_MUTEX_POST_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_MUTEX_POST, RetVal) +#define OS_TRACE_MUTEX_PEND_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_MUTEX_PEND, RetVal) +#define OS_TRACE_SEM_DEL_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_SEM_DEL, RetVal) +#define OS_TRACE_SEM_POST_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_SEM_POST, RetVal) +#define OS_TRACE_SEM_PEND_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_SEM_PEND, RetVal) +#define OS_TRACE_Q_DEL_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_Q_DEL, RetVal) +#define OS_TRACE_Q_POST_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_Q_POST, RetVal) +#define OS_TRACE_Q_POST_FRONT_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_Q_POST_FRONT, RetVal) +#define OS_TRACE_Q_POST_OPT_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_Q_POST_OPT, RetVal) +#define OS_TRACE_Q_PEND_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_Q_PEND, RetVal) +#define OS_TRACE_FLAG_DEL_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_FLAG_DEL, RetVal) +#define OS_TRACE_FLAG_POST_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_FLAG_POST, RetVal) +#define OS_TRACE_FLAG_PEND_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_FLAG_PEND, RetVal) +#define OS_TRACE_MEM_PUT_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_MEM_PUT, RetVal) +#define OS_TRACE_MEM_GET_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_MEM_GET, RetVal) +#define OS_TRACE_TMR_DEL_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_TMR_DEL, RetVal) +#define OS_TRACE_TMR_START_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_TMR_START, RetVal) +#define OS_TRACE_TMR_STOP_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_TMR_STOP, RetVal) +#else +#define OS_TRACE_MBOX_DEL_EXIT(RetVal) +#define OS_TRACE_MBOX_POST_EXIT(RetVal) +#define OS_TRACE_MBOX_POST_OPT_EXIT(RetVal) +#define OS_TRACE_MBOX_PEND_EXIT(RetVal) +#define OS_TRACE_MUTEX_DEL_EXIT(RetVal) +#define OS_TRACE_MUTEX_POST_EXIT(RetVal) +#define OS_TRACE_MUTEX_PEND_EXIT(RetVal) +#define OS_TRACE_SEM_DEL_EXIT(RetVal) +#define OS_TRACE_SEM_POST_EXIT(RetVal) +#define OS_TRACE_SEM_PEND_EXIT(RetVal) +#define OS_TRACE_Q_DEL_EXIT(RetVal) +#define OS_TRACE_Q_POST_EXIT(RetVal) +#define OS_TRACE_Q_POST_FRONT_EXIT(RetVal) +#define OS_TRACE_Q_POST_OPT_EXIT(RetVal) +#define OS_TRACE_Q_PEND_EXIT(RetVal) +#define OS_TRACE_FLAG_DEL_EXIT(RetVal) +#define OS_TRACE_FLAG_POST_EXIT(RetVal) +#define OS_TRACE_FLAG_PEND_EXIT(RetVal) +#define OS_TRACE_MEM_PUT_EXIT(RetVal) +#define OS_TRACE_MEM_GET_EXIT(RetVal) +#define OS_TRACE_TMR_DEL_EXIT(RetVal) +#define OS_TRACE_TMR_START_EXIT(RetVal) +#define OS_TRACE_TMR_STOP_EXIT(RetVal) +#endif + + +/* +************************************************************************************************************************ +* uC/OS-II Trace Unused Macros (other recorders) +************************************************************************************************************************ +*/ + +#define OS_TRACE_MUTEX_DEL(p_mutex) +#define OS_TRACE_MUTEX_POST(p_mutex) +#define OS_TRACE_MUTEX_PEND(p_mutex) +#define OS_TRACE_SEM_DEL(p_sem) +#define OS_TRACE_SEM_POST(p_sem) +#define OS_TRACE_SEM_PEND(p_sem) +#define OS_TRACE_Q_DEL(p_q) +#define OS_TRACE_Q_POST(p_q) +#define OS_TRACE_Q_PEND(p_q) +#define OS_TRACE_FLAG_DEL(p_grp) +#define OS_TRACE_FLAG_POST(p_grp) +#define OS_TRACE_FLAG_PEND(p_grp) +#define OS_TRACE_MEM_PUT(p_mem) +#define OS_TRACE_MEM_GET(p_mem) +#define OS_TRACE_MUTEX_POST_FAILED(p_mutex) +#define OS_TRACE_MUTEX_PEND_FAILED(p_mutex) +#define OS_TRACE_MUTEX_PEND_BLOCK(p_mutex) +#define OS_TRACE_TASK_CREATE_FAILED(p_tcb) +#define OS_TRACE_SEM_POST_FAILED(p_sem) +#define OS_TRACE_SEM_PEND_FAILED(p_sem) +#define OS_TRACE_SEM_PEND_BLOCK(p_sem) +#define OS_TRACE_Q_POST_FAILED(p_q) +#define OS_TRACE_Q_PEND_FAILED(p_q) +#define OS_TRACE_Q_PEND_BLOCK(p_q) +#define OS_TRACE_FLAG_POST_FAILED(p_grp) +#define OS_TRACE_FLAG_PEND_FAILED(p_grp) +#define OS_TRACE_FLAG_PEND_BLOCK(p_grp) +#define OS_TRACE_MEM_PUT_FAILED(p_mem) +#define OS_TRACE_MEM_GET_FAILED(p_mem) +#define OS_TRACE_TASK_PRIO_CHANGE(p_tcb, prio) + +#else /* End of OS_TRACE_EN > 0 */ + +#define OS_TRACE_TICK_INCREMENT(OSTickCtr) + +#define OS_TRACE_TASK_CREATE(p_tcb) +#define OS_TRACE_TASK_CREATE_FAILED(p_tcb) +#define OS_TRACE_TASK_DEL(p_tcb) +#define OS_TRACE_TASK_READY(p_tcb) +#define OS_TRACE_TASK_SWITCHED_IN(p_tcb) +#define OS_TRACE_TASK_DLY(dly_ticks) +#define OS_TRACE_TASK_SUSPEND(p_tcb) +#define OS_TRACE_TASK_SUSPENDED(p_tcb) +#define OS_TRACE_TASK_RESUME(p_tcb) + +#define OS_TRACE_ISR_BEGIN(isr_id) +#define OS_TRACE_ISR_END() + +#define OS_TRACE_ISR_ENTER() +#define OS_TRACE_ISR_EXIT() +#define OS_TRACE_ISR_EXIT_TO_SCHEDULER() + +#define OS_TRACE_MUTEX_CREATE(p_mutex, p_name) +#define OS_TRACE_MUTEX_DEL(p_mutex) +#define OS_TRACE_MUTEX_POST(p_mutex) +#define OS_TRACE_MUTEX_POST_FAILED(p_mutex) +#define OS_TRACE_MUTEX_PEND(p_mutex) +#define OS_TRACE_MUTEX_PEND_FAILED(p_mutex) +#define OS_TRACE_MUTEX_PEND_BLOCK(p_mutex) + +#define OS_TRACE_MUTEX_TASK_PRIO_INHERIT(p_tcb, prio) +#define OS_TRACE_MUTEX_TASK_PRIO_DISINHERIT(p_tcb, prio) + +#define OS_TRACE_SEM_CREATE(p_sem, p_name) +#define OS_TRACE_SEM_DEL(p_sem) +#define OS_TRACE_SEM_POST(p_sem) +#define OS_TRACE_SEM_POST_FAILED(p_sem) +#define OS_TRACE_SEM_PEND(p_sem) +#define OS_TRACE_SEM_PEND_FAILED(p_sem) +#define OS_TRACE_SEM_PEND_BLOCK(p_sem) + +#define OS_TRACE_Q_CREATE(p_q, p_name) +#define OS_TRACE_Q_DEL(p_q) +#define OS_TRACE_Q_POST(p_q) +#define OS_TRACE_Q_POST_FAILED(p_q) +#define OS_TRACE_Q_PEND(p_q) +#define OS_TRACE_Q_PEND_FAILED(p_q) +#define OS_TRACE_Q_PEND_BLOCK(p_q) + +#define OS_TRACE_FLAG_CREATE(p_grp, p_name) +#define OS_TRACE_FLAG_DEL(p_grp) +#define OS_TRACE_FLAG_POST(p_grp) +#define OS_TRACE_FLAG_POST_FAILED(p_grp) +#define OS_TRACE_FLAG_PEND(p_grp) +#define OS_TRACE_FLAG_PEND_FAILED(p_grp) +#define OS_TRACE_FLAG_PEND_BLOCK(p_grp) + +#define OS_TRACE_MEM_CREATE(p_mem) +#define OS_TRACE_MEM_PUT(p_mem) +#define OS_TRACE_MEM_PUT_FAILED(p_mem) +#define OS_TRACE_MEM_GET(p_mem) +#define OS_TRACE_MEM_GET_FAILED(p_mem) + +#define OS_TRACE_TMR_CREATE(p_tmr, p_name) + +#define OS_TRACE_TASK_PRIO_CHANGE(p_tcb, prio) + +#define OS_TRACE_MBOX_DEL_ENTER(p_mbox, opt) +#define OS_TRACE_MBOX_POST_ENTER(p_mbox) +#define OS_TRACE_MBOX_POST_OPT_ENTER(p_mbox, opt) +#define OS_TRACE_MBOX_PEND_ENTER(p_mbox, timeout) +#define OS_TRACE_MUTEX_DEL_ENTER(p_mutex, opt) +#define OS_TRACE_MUTEX_POST_ENTER(p_mutex) +#define OS_TRACE_MUTEX_PEND_ENTER(p_mutex, timeout) +#define OS_TRACE_SEM_DEL_ENTER(p_sem, opt) +#define OS_TRACE_SEM_POST_ENTER(p_sem) +#define OS_TRACE_SEM_PEND_ENTER(p_sem, timeout) +#define OS_TRACE_Q_DEL_ENTER(p_q, opt) +#define OS_TRACE_Q_POST_ENTER(p_q) +#define OS_TRACE_Q_POST_FRONT_ENTER(p_q) +#define OS_TRACE_Q_POST_OPT_ENTER(p_q, opt) +#define OS_TRACE_Q_PEND_ENTER(p_q, timeout) +#define OS_TRACE_FLAG_DEL_ENTER(p_grp, opt) +#define OS_TRACE_FLAG_POST_ENTER(p_grp, flags, opt) +#define OS_TRACE_FLAG_PEND_ENTER(p_grp, flags, timeout, opt) +#define OS_TRACE_MEM_PUT_ENTER(p_mem, p_blk) +#define OS_TRACE_MEM_GET_ENTER(p_mem) +#define OS_TRACE_TMR_DEL_ENTER(p_tmr) +#define OS_TRACE_TMR_START_ENTER(p_tmr) +#define OS_TRACE_TMR_STOP_ENTER(p_tmr) +#define OS_TRACE_TMR_EXPIRED(p_tmr) + +#define OS_TRACE_MBOX_DEL_EXIT(RetVal) +#define OS_TRACE_MBOX_POST_EXIT(RetVal) +#define OS_TRACE_MBOX_POST_OPT_EXIT(RetVal) +#define OS_TRACE_MBOX_PEND_EXIT(RetVal) +#define OS_TRACE_MUTEX_DEL_EXIT(RetVal) +#define OS_TRACE_MUTEX_POST_EXIT(RetVal) +#define OS_TRACE_MUTEX_PEND_EXIT(RetVal) +#define OS_TRACE_SEM_DEL_EXIT(RetVal) +#define OS_TRACE_SEM_POST_EXIT(RetVal) +#define OS_TRACE_SEM_PEND_EXIT(RetVal) +#define OS_TRACE_Q_DEL_EXIT(RetVal) +#define OS_TRACE_Q_POST_EXIT(RetVal) +#define OS_TRACE_Q_POST_FRONT_EXIT(RetVal) +#define OS_TRACE_Q_POST_OPT_EXIT(RetVal) +#define OS_TRACE_Q_PEND_EXIT(RetVal) +#define OS_TRACE_FLAG_DEL_EXIT(RetVal) +#define OS_TRACE_FLAG_POST_EXIT(RetVal) +#define OS_TRACE_FLAG_PEND_EXIT(RetVal) +#define OS_TRACE_MEM_PUT_EXIT(RetVal) +#define OS_TRACE_MEM_GET_EXIT(RetVal) +#define OS_TRACE_TMR_DEL_EXIT(RetVal) +#define OS_TRACE_TMR_START_EXIT(RetVal) +#define OS_TRACE_TMR_STOP_EXIT(RetVal) + +#endif + + +/* +************************************************************************************************************************ +* API Functions +************************************************************************************************************************ +*/ + +#ifdef __cplusplus +extern "C" { +#endif +void SYSVIEW_TaskReady (U32 TaskID); +void SYSVIEW_TaskSwitchedIn (U32 TaskID); +void SYSVIEW_TaskSuspend (U32 TaskID); +void SYSVIEW_AddTask (U32 TaskID, const char* OSTCBTaskName, INT8U OSTCBPrio, OS_STK* OSTCBStkBottom, INT32U OSTCBStkSize); +void SYSVIEW_UpdateTask (U32 TaskID, const char* OSTCBTaskName, INT8U OSTCBPrio, OS_STK* OSTCBStkBottom, INT32U OSTCBStkSize); +void SYSVIEW_UpdateResource (U32 EventID, const char* OSEventName); +void SYSVIEW_SendTaskInfo (U32 TaskID, const char* sName, unsigned Prio, U32 StackBase, unsigned StackSize); +void SYSVIEW_RecordU32x4 (unsigned Id, U32 Para0, U32 Para1, U32 Para2, U32 Para3); +void SYSVIEW_RecordU32x5 (unsigned Id, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4); + +void SYSVIEW_RecordU32Register(unsigned EventId, U32 ResourceId, const char* sResource); +void SYSVIEW_SendResourceList (void); + +#ifdef __cplusplus +} +#endif diff --git a/resources_extra/SystemView_Src_V320/Sample/uCOS-III/Config/Cortex-M/SEGGER_SYSVIEW_Config_uCOSIII.c b/resources_extra/SystemView_Src_V320/Sample/uCOS-III/Config/Cortex-M/SEGGER_SYSVIEW_Config_uCOSIII.c new file mode 100644 index 0000000..af908ef --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/uCOS-III/Config/Cortex-M/SEGGER_SYSVIEW_Config_uCOSIII.c @@ -0,0 +1,110 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Config_uCOSIII.c +Purpose : Sample setup configuration of SystemView with Micrium + uC/OS-III. +Revision: $Rev: 9599 $ +*/ +#include "SEGGER_SYSVIEW.h" +#include "os.h" +#include "bsp_clock.h" + +extern const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI; + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ +// The application name to be displayed in SystemViewer +#define SYSVIEW_APP_NAME "ARM Cortex-M Demo" + +// The target device name +#define SYSVIEW_DEVICE_NAME "Cortex-M Device" + + + +// Frequency of the timestamp. Must match SEGGER_SYSVIEW_GET_TIMESTAMP in SEGGER_SYSVIEW_Conf.h +#define SYSVIEW_TIMESTAMP_FREQ (BSP_ClkFreqGet(BSP_CLK_ID_SYSCLK)) + +// System Frequency. SystemcoreClock is used in most CMSIS compatible projects. +#define SYSVIEW_CPU_FREQ (BSP_ClkFreqGet(BSP_CLK_ID_SYSCLK)) + +// The lowest RAM address used for IDs (pointers) +#define SYSVIEW_RAM_BASE (0x20000000) + +/********************************************************************* +* +* _cbSendSystemDesc() +* +* Function description +* Sends SystemView description strings. +*/ +static void _cbSendSystemDesc(void) { + SEGGER_SYSVIEW_SendSysDesc("N="SYSVIEW_APP_NAME",D="SYSVIEW_DEVICE_NAME",O=uCOS-III"); + SEGGER_SYSVIEW_SendSysDesc("I#15=SysTick"); + // + SYSVIEW_SendResourceList(); +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +void SEGGER_SYSVIEW_Conf(void) { + SEGGER_SYSVIEW_Init(SYSVIEW_TIMESTAMP_FREQ, SYSVIEW_CPU_FREQ, + &SYSVIEW_X_OS_TraceAPI, _cbSendSystemDesc); + SEGGER_SYSVIEW_SetRAMBase(SYSVIEW_RAM_BASE); +} + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/uCOS-III/Config/RX/SEGGER_SYSVIEW_Config_uCOSIII.c b/resources_extra/SystemView_Src_V320/Sample/uCOS-III/Config/RX/SEGGER_SYSVIEW_Config_uCOSIII.c new file mode 100644 index 0000000..16ddba0 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/uCOS-III/Config/RX/SEGGER_SYSVIEW_Config_uCOSIII.c @@ -0,0 +1,130 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_Config_uCOSIII.c +Purpose : Sample setup configuration of SystemView with Micrium + uC/OS-III. +Revision: $Rev: 9599 $ +*/ +#include "SEGGER_SYSVIEW.h" +#include "os.h" +#include "cpu.h" +#include "bsp_sys.h" + +extern const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI; + +CPU_ERR local_err; + +/********************************************************************* +* +* Defines, configurable +* +********************************************************************** +*/ +// The application name to be displayed in SystemViewer +#define SYSVIEW_APP_NAME "Renesas RX Demo" + +// The target device name +#define SYSVIEW_DEVICE_NAME "Renesas RX Device" + + + +// Frequency of the timestamp. Must match SEGGER_SYSVIEW_GET_TIMESTAMP in SEGGER_SYSVIEW_Conf.h +#define SYSVIEW_TIMESTAMP_FREQ (CPU_TS_TmrFreqGet(&local_err)) + +// System Frequency. SystemcoreClock is used in most CMSIS compatible projects. +#define SYSVIEW_CPU_FREQ (BSP_SysPerClkFreqGet()) + +// The lowest RAM address used for IDs (pointers) +#define SYSVIEW_RAM_BASE (0) + + +U32 SEGGER_SYSVIEW_X_GetTimestamp(void) { + return (CPU_TS_Get32()); +} + +U32 SEGGER_SYSVIEW_X_GetInterruptId(void) { + U32 IntId; + __asm volatile ("mvfc PSW, %0 \t\n" // Load current PSW + "and #0x0F000000, %0 \t\n" // Clear all except IPL ([27:24]) + "shlr #24, %0 \t\n" // Shift IPL to [3:0] + : "=r" (IntId) // Output result + : // Input + : // Clobbered list + ); + return IntId; +} + +/********************************************************************* +* +* _cbSendSystemDesc() +* +* Function description +* Sends SystemView description strings. +*/ +static void _cbSendSystemDesc(void) { + SEGGER_SYSVIEW_SendSysDesc("N="SYSVIEW_APP_NAME",D="SYSVIEW_DEVICE_NAME",O=uCOS-III"); + SEGGER_SYSVIEW_SendSysDesc("I#12=CMT0 Tmr IRQ (Tick)"); + // + SYSVIEW_SendResourceList(); +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ +void SEGGER_SYSVIEW_Conf(void) { + SEGGER_SYSVIEW_Init(SYSVIEW_TIMESTAMP_FREQ, SYSVIEW_CPU_FREQ, + &SYSVIEW_X_OS_TraceAPI, _cbSendSystemDesc); + SEGGER_SYSVIEW_SetRAMBase(SYSVIEW_RAM_BASE); +} + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/uCOS-III/Config/os_cfg_trace.h b/resources_extra/SystemView_Src_V320/Sample/uCOS-III/Config/os_cfg_trace.h new file mode 100644 index 0000000..2aaa16a --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/uCOS-III/Config/os_cfg_trace.h @@ -0,0 +1,62 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : os_cfg_trace.h +Purpose : Minimal trace configuration file for Micrium uC/OS-III + with SystemView. +Revision: $Rev: 9599 $ +*/ + +#ifndef OS_CFG_TRACE_H +#define OS_CFG_TRACE_H + +#define OS_CFG_TRACE_MAX_TASK 16u +#define OS_CFG_TRACE_MAX_RESOURCES 16u + +#endif // OS_CFG_TRACE_H \ No newline at end of file diff --git a/resources_extra/SystemView_Src_V320/Sample/uCOS-III/SEGGER_SYSVIEW_uCOSIII.c b/resources_extra/SystemView_Src_V320/Sample/uCOS-III/SEGGER_SYSVIEW_uCOSIII.c new file mode 100644 index 0000000..b247f83 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/uCOS-III/SEGGER_SYSVIEW_uCOSIII.c @@ -0,0 +1,345 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : SEGGER_SYSVIEW_uCOSIII.c +Purpose : Interface between Micrium uC/OS-III and SystemView. +Revision: $Rev: 9599 $ +*/ + +#include + +#ifndef SYSVIEW_MEMSET + #include + #define SYSVIEW_MEMSET(p, v, n) memset(p, v, n) +#endif + +#ifndef OS_CFG_TRACE_MAX_RESOURCES +#define OS_CFG_TRACE_MAX_RESOURCES 0 +#endif + +typedef struct SYSVIEW_UCOSIII_TASK_STATUS SYSVIEW_UCOSIII_TASK_STATUS; + +struct SYSVIEW_UCOSIII_TASK_STATUS { + U32 TaskID; + const char* NamePtr; + OS_PRIO Prio; + CPU_STK* StkBasePtr; + CPU_STK_SIZE StkSize; +}; + +typedef struct SYSVIEW_UCOSIII_RESOURCE SYSVIEW_UCOSIII_RESOURCE; + +struct SYSVIEW_UCOSIII_RESOURCE { + U32 ResourceId; + const char* sResource; + U32 Registered; +}; + +static SYSVIEW_UCOSIII_TASK_STATUS _aTasks[OS_CFG_TRACE_MAX_TASK]; +static unsigned _NumTasks; + +#if OS_CFG_TRACE_MAX_RESOURCES > 0 +static SYSVIEW_UCOSIII_RESOURCE _aResources[OS_CFG_TRACE_MAX_RESOURCES]; +static unsigned _NumResources; +#endif + +/********************************************************************* +* +* _cbSendTaskList() +* +* Function description +* This function is part of the link between FreeRTOS and SYSVIEW. +* Called from SystemView when asked by the host, it uses SYSVIEW +* functions to send the entire task list to the host. +*/ +static void _cbSendTaskList(void) { + unsigned n; + + for (n = 0; n < _NumTasks; n++) { + SYSVIEW_SendTaskInfo((U32)_aTasks[n].TaskID, _aTasks[n].NamePtr, (unsigned)_aTasks[n].Prio, (U32)_aTasks[n].StkBasePtr, (unsigned)_aTasks[n].StkSize); + } +} + +/********************************************************************* +* +* _cbGetTime() +* +* Function description +* This function is part of the link between FreeRTOS and SYSVIEW. +* Called from SystemView when asked by the host, returns the +* current system time in micro seconds. +*/ +static U64 _cbGetTime(void) { + OS_ERR Err; + OS_TICK Tick; + + Tick = OSTimeGet(&Err); + if (Err != OS_ERR_NONE) { + Tick = 0; + } + return Tick * 1000; +} + +/********************************************************************* +* +* Global functions +* +********************************************************************** +*/ + +/********************************************************************* +* +* SYSVIEW_TaskReady() +* +* Function description +* Record when a task is ready for execution. +*/ +void SYSVIEW_TaskReady(U32 TaskID) { + if (TaskID != (U32)&OSIdleTaskTCB) { + SEGGER_SYSVIEW_OnTaskStartReady(TaskID); + } +} + +/********************************************************************* +* +* SYSVIEW_TaskSwitchedIn() +* +* Function description +* Record when a task starts/continues execution. +* If the idle task continues, record an on idle event. +*/ +void SYSVIEW_TaskSwitchedIn(U32 TaskID) { + if (TaskID != (U32)&OSIdleTaskTCB) { + SEGGER_SYSVIEW_OnTaskStartExec(TaskID); + } else { + SEGGER_SYSVIEW_OnIdle(); + } +} + +/********************************************************************* +* +* SYSVIEW_TaskSuspend() +* +* Function description +* Record when a task is suspended. +*/ +void SYSVIEW_TaskSuspend(U32 TaskID) { + if (TaskID != (U32)&OSIdleTaskTCB) { + SEGGER_SYSVIEW_OnTaskStopReady(TaskID, (1u << 2)); + } +} + +/********************************************************************* +* +* SYSVIEW_AddTask() +* +* Function description +* Add a task to the internal list and record its information. +*/ +void SYSVIEW_AddTask(U32 TaskID, const char* NamePtr, OS_PRIO Prio, CPU_STK* StkBasePtr, CPU_STK_SIZE StkSize) { + if (TaskID != (U32)&OSIdleTaskTCB) { + if (_NumTasks >= OS_CFG_TRACE_MAX_TASK) { + SEGGER_SYSVIEW_Warn("SYSTEMVIEW: Could not record task information. Maximum number of tasks reached."); + return; + } + + _aTasks[_NumTasks].TaskID = TaskID; + _aTasks[_NumTasks].NamePtr = NamePtr; + _aTasks[_NumTasks].Prio = Prio; + _aTasks[_NumTasks].StkBasePtr = StkBasePtr; + _aTasks[_NumTasks].StkSize = StkSize; + + _NumTasks++; + + SYSVIEW_SendTaskInfo(TaskID, NamePtr, (unsigned)Prio, (U32)StkBasePtr, (unsigned)StkSize); + } +} + +/********************************************************************* +* +* SYSVIEW_UpdateTask() +* +* Function description +* Update a task in the internal list and record its information. +*/ +void SYSVIEW_UpdateTask(U32 TaskID, const char* NamePtr, OS_PRIO Prio, CPU_STK* StkBasePtr, CPU_STK_SIZE StkSize) { + unsigned n; + + if (TaskID != (U32)&OSIdleTaskTCB) { + for (n = 0; n < _NumTasks; n++) { + if (_aTasks[n].TaskID == TaskID) { + break; + } + } + if (n < _NumTasks) { + _aTasks[n].NamePtr = NamePtr; + _aTasks[n].Prio = Prio; + _aTasks[n].StkBasePtr = StkBasePtr; + _aTasks[n].StkSize = StkSize; + + SYSVIEW_SendTaskInfo(TaskID, NamePtr, (unsigned)Prio, (U32)StkBasePtr, (unsigned)StkSize); + } else { + SYSVIEW_AddTask(TaskID, NamePtr, Prio, StkBasePtr, StkSize); + } + } +} + +/********************************************************************* +* +* SYSVIEW_SendTaskInfo() +* +* Function description +* Record task information. +*/ +void SYSVIEW_SendTaskInfo(U32 TaskID, const char* sName, unsigned Prio, U32 StackBase, unsigned StackSize) { + SEGGER_SYSVIEW_TASKINFO TaskInfo; + + // + // Fill all elements with 0 to allow extending the structure in future version without breaking the code + // + SYSVIEW_MEMSET(&TaskInfo, 0, sizeof(TaskInfo)); + TaskInfo.TaskID = TaskID; + TaskInfo.sName = sName; + TaskInfo.Prio = Prio; + TaskInfo.StackBase = StackBase; + TaskInfo.StackSize = StackSize; + SEGGER_SYSVIEW_SendTaskInfo(&TaskInfo); +} + +/********************************************************************* +* +* SYSVIEW_RecordU32x4() +* +* Function description +* Record an event with 4 parameters +*/ +void SYSVIEW_RecordU32x4(unsigned Id, U32 Para0, U32 Para1, U32 Para2, U32 Para3) { + U8 aPacket[SEGGER_SYSVIEW_INFO_SIZE + 4 * SEGGER_SYSVIEW_QUANTA_U32]; + U8* pPayload; + // + pPayload = SEGGER_SYSVIEW_PREPARE_PACKET(aPacket); // Prepare the packet for SystemView + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para0); // Add the first parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para1); // Add the second parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para2); // Add the third parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para3); // Add the fourth parameter to the packet + // + SEGGER_SYSVIEW_SendPacket(&aPacket[0], pPayload, Id); // Send the packet +} + +/********************************************************************* +* +* SYSVIEW_RecordU32x5() +* +* Function description +* Record an event with 5 parameters +*/ +void SYSVIEW_RecordU32x5(unsigned Id, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4) { + U8 aPacket[SEGGER_SYSVIEW_INFO_SIZE + 5 * SEGGER_SYSVIEW_QUANTA_U32]; + U8* pPayload; + // + pPayload = SEGGER_SYSVIEW_PREPARE_PACKET(aPacket); // Prepare the packet for SystemView + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para0); // Add the first parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para1); // Add the second parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para2); // Add the third parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para3); // Add the fourth parameter to the packet + pPayload = SEGGER_SYSVIEW_EncodeU32(pPayload, Para4); // Add the fifth parameter to the packet + // + SEGGER_SYSVIEW_SendPacket(&aPacket[0], pPayload, Id); // Send the packet +} +/********************************************************************* +* +* SYSVIEW_RecordU32Register() +* +* Function description +* Record an event with 1 parameter and register the resource to be +* sent in the system description. +*/ +void SYSVIEW_RecordU32Register(unsigned EventId, U32 ResourceId, const char* sResource) { + SEGGER_SYSVIEW_NameResource(ResourceId, sResource); + SEGGER_SYSVIEW_RecordU32(EventId, SEGGER_SYSVIEW_ShrinkId(ResourceId)); +#if OS_CFG_TRACE_MAX_RESOURCES > 0 + if (_NumResources >= OS_CFG_TRACE_MAX_RESOURCES) { + SEGGER_SYSVIEW_Warn("SYSTEMVIEW: Could not register resource name. Maximum number of resources reached."); + return; + } + + _aResources[_NumResources].ResourceId = ResourceId; + _aResources[_NumResources].sResource = sResource; + _aResources[_NumResources].Registered = 0; + + _NumResources++; +#endif +} + +void SYSVIEW_SendResourceList(void) { +#if OS_CFG_TRACE_MAX_RESOURCES > 0 + unsigned int n; + + for (n = 0; n < _NumResources; n++) { + if (_aResources[n].Registered == 0) { + SEGGER_SYSVIEW_NameResource(_aResources[n].ResourceId, _aResources[n].sResource); + _aResources[n].Registered = 1; + } + } +#endif +} + +/********************************************************************* +* +* Public API structures +* +********************************************************************** +*/ +// Callbacks provided to SYSTEMVIEW by FreeRTOS +const SEGGER_SYSVIEW_OS_API SYSVIEW_X_OS_TraceAPI = { + _cbGetTime, + _cbSendTaskList, +}; + +/*************************** End of file ****************************/ diff --git a/resources_extra/SystemView_Src_V320/Sample/uCOS-III/os_trace_events.h b/resources_extra/SystemView_Src_V320/Sample/uCOS-III/os_trace_events.h new file mode 100644 index 0000000..7cf54f9 --- /dev/null +++ b/resources_extra/SystemView_Src_V320/Sample/uCOS-III/os_trace_events.h @@ -0,0 +1,460 @@ +/********************************************************************* +* SEGGER Microcontroller GmbH * +* The Embedded Experts * +********************************************************************** +* * +* (c) 1995 - 2019 SEGGER Microcontroller GmbH * +* * +* www.segger.com Support: support@segger.com * +* * +********************************************************************** +* * +* SEGGER SystemView * Real-time application analysis * +* * +********************************************************************** +* * +* All rights reserved. * +* * +* SEGGER strongly recommends to not make any changes * +* to or modify the source code of this software in order to stay * +* compatible with the SystemView and RTT protocol, and J-Link. * +* * +* Redistribution and use in source and binary forms, with or * +* without modification, are permitted provided that the following * +* condition is met: * +* * +* o Redistributions of source code must retain the above copyright * +* notice, this condition and the following disclaimer. * +* * +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * +* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * +* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * +* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * +* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR * +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * +* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE * +* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH * +* DAMAGE. * +* * +********************************************************************** +* * +* SystemView version: 3.20 * +* * +********************************************************************** +-------------------------- END-OF-HEADER ----------------------------- + +File : os_trace.h +Purpose : Interface header for Micrium uC/OS-III and SystemView. +Revision: $Rev: 9599 $ +*/ +#include "SEGGER_SYSVIEW.h" +#include "os.h" +#include "os_cfg_trace.h" + + +/* +************************************************************************************************************************ +* uC/OS-III Trace Macros +************************************************************************************************************************ +*/ + +#if (defined(OS_CFG_TRACE_EN) && (OS_CFG_TRACE_EN > 0u)) +#define OS_TRACE_INIT() SEGGER_SYSVIEW_Conf() +#define OS_TRACE_START() SEGGER_SYSVIEW_Start() +#define OS_TRACE_STOP() SEGGER_SYSVIEW_Stop() +#else +#define OS_TRACE_INIT() +#define OS_TRACE_START() +#define OS_TRACE_STOP() +#endif + + +/* +************************************************************************************************************************ +* uC/OS-III Trace fixed defines for SystemView +************************************************************************************************************************ +*/ + +#if (defined(OS_CFG_TRACE_EN) && (OS_CFG_TRACE_EN > 0u)) +#define OS_TRACE_ID_OFFSET (32u) + +#define OS_TRACE_ID_TICK_INCREMENT ( 1u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_ISR_REGISTER ( 2u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_TASK_MSG_Q_CREATE ( 3u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_TASK_MSG_Q_POST ( 4u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_TASK_MSG_Q_PEND ( 5u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_TASK_SEM_CREATE ( 6u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_TASK_SEM_POST ( 7u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_TASK_SEM_PEND ( 8u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MUTEX_CREATE ( 9u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MUTEX_DEL (10u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MUTEX_POST (11u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MUTEX_PEND (12u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MUTEX_TASK_PRIO_INHERIT (13u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MUTEX_TASK_PRIO_DISINHERIT (14u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_SEM_CREATE (15u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_SEM_DEL (16u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_SEM_POST (17u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_SEM_PEND (18u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_Q_CREATE (19u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_Q_DEL (20u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_Q_POST (21u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_Q_PEND (22u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_FLAG_CREATE (23u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_FLAG_DEL (24u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_FLAG_POST (25u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_FLAG_PEND (26u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MEM_CREATE (27u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MEM_PUT (28u + OS_TRACE_ID_OFFSET) +#define OS_TRACE_ID_MEM_GET (29u + OS_TRACE_ID_OFFSET) +#endif + + +/* +************************************************************************************************************************ +* uC/OS-III Trace Kernel-Related Macros +************************************************************************************************************************ +*/ + +#if (defined(OS_CFG_TRACE_EN) && (OS_CFG_TRACE_EN > 0u)) +#define OS_TRACE_TASK_CREATE(p_tcb) if (p_tcb != 0) { \ + SEGGER_SYSVIEW_OnTaskCreate((U32)p_tcb); \ + SYSVIEW_AddTask((U32)p_tcb, \ + &(p_tcb->NamePtr[0]), \ + p_tcb->Prio, \ + p_tcb->StkBasePtr, \ + p_tcb->StkSize \ + ); \ + } + +#define OS_TRACE_TASK_READY(p_tcb) SYSVIEW_TaskReady((U32)p_tcb) +#define OS_TRACE_TASK_SWITCHED_IN(p_tcb) SYSVIEW_TaskSwitchedIn((U32)p_tcb) +#define OS_TRACE_TASK_DLY(dly_ticks) +#define OS_TRACE_TASK_SUSPEND(p_tcb) +#define OS_TRACE_TASK_SUSPENDED(p_tcb) SYSVIEW_TaskSuspend((U32)p_tcb) +#define OS_TRACE_TASK_RESUME(p_tcb) SYSVIEW_TaskReady((U32)p_tcb) + +#define OS_TRACE_ISR_BEGIN(isr_id) +#define OS_TRACE_ISR_END() + +#define OS_TRACE_ISR_ENTER() SEGGER_SYSVIEW_RecordEnterISR() +#define OS_TRACE_ISR_EXIT() SEGGER_SYSVIEW_RecordExitISR() +#define OS_TRACE_ISR_EXIT_TO_SCHEDULER() SEGGER_SYSVIEW_RecordExitISRToScheduler() + + +/* +************************************************************************************************************************ +* uC/OS-III Trace Simple Recorder Functions +************************************************************************************************************************ +*/ + +#define OS_TRACE_TICK_INCREMENT(OSTickCtr) SEGGER_SYSVIEW_RecordU32 (OS_TRACE_ID_TICK_INCREMENT, (U32)OSTickCtr) +#define OS_TRACE_ISR_REGISTER(isr_id, isr_name, isr_prio) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_ISR_REGISTER, (U32)isr_id, (U32)isr_prio) +#define OS_TRACE_MUTEX_TASK_PRIO_INHERIT(p_tcb, prio) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_MUTEX_TASK_PRIO_INHERIT, SEGGER_SYSVIEW_ShrinkId((U32)p_tcb), (U32)prio); +#define OS_TRACE_MUTEX_TASK_PRIO_DISINHERIT(p_tcb, prio) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_MUTEX_TASK_PRIO_DISINHERIT, SEGGER_SYSVIEW_ShrinkId((U32)p_tcb), (U32)prio); +#define OS_TRACE_TASK_DEL(p_tcb) + + +/* +************************************************************************************************************************ +* uC/OS-III Trace Complex Recorder Functions +************************************************************************************************************************ +*/ + +#define OS_TRACE_MUTEX_CREATE(p_mutex, p_name) SYSVIEW_RecordU32Register(OS_TRACE_ID_MUTEX_CREATE, ((U32)p_mutex), p_name) +#define OS_TRACE_TASK_MSG_Q_CREATE(p_msg_q, p_name) SYSVIEW_RecordU32Register(OS_TRACE_ID_TASK_MSG_Q_CREATE, ((U32)p_msg_q), p_name) +#define OS_TRACE_TASK_SEM_CREATE(p_tcb, p_name) SYSVIEW_RecordU32Register(OS_TRACE_ID_TASK_SEM_CREATE, ((U32)p_tcb), p_name) +#define OS_TRACE_SEM_CREATE(p_sem, p_name) SYSVIEW_RecordU32Register(OS_TRACE_ID_SEM_CREATE, ((U32)p_sem), p_name) +#define OS_TRACE_Q_CREATE(p_q, p_name) SYSVIEW_RecordU32Register(OS_TRACE_ID_Q_CREATE, ((U32)p_q), p_name) +#define OS_TRACE_FLAG_CREATE(p_grp, p_name) SYSVIEW_RecordU32Register(OS_TRACE_ID_FLAG_CREATE, ((U32)p_grp), p_name) +#define OS_TRACE_MEM_CREATE(p_mem, p_name) SYSVIEW_RecordU32Register(OS_TRACE_ID_MEM_CREATE, ((U32)p_mem), p_name) + + +/* +************************************************************************************************************************ +* uC/OS-III Trace API Enter Functions +************************************************************************************************************************ +*/ + +#if (defined(OS_CFG_TRACE_API_ENTER_EN) && (OS_CFG_TRACE_API_ENTER_EN > 0u)) +#define OS_TRACE_MUTEX_DEL_ENTER(p_mutex, opt) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_MUTEX_DEL, SEGGER_SYSVIEW_ShrinkId((U32)p_mutex), (U32)opt) +#define OS_TRACE_MUTEX_POST_ENTER(p_mutex, opt) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_MUTEX_POST, SEGGER_SYSVIEW_ShrinkId((U32)p_mutex), (U32)opt) +#define OS_TRACE_MUTEX_PEND_ENTER(p_mutex, timeout, opt, p_ts) SEGGER_SYSVIEW_RecordU32x3(OS_TRACE_ID_MUTEX_PEND, SEGGER_SYSVIEW_ShrinkId((U32)p_mutex), (U32)timeout, (U32)opt) +#define OS_TRACE_TASK_MSG_Q_POST_ENTER(p_msg_q, p_void, msg_size, opt) SEGGER_SYSVIEW_RecordU32x3(OS_TRACE_ID_TASK_MSG_Q_POST, SEGGER_SYSVIEW_ShrinkId((U32)p_msg_q), (U32)msg_size, (U32)opt) +#define OS_TRACE_TASK_MSG_Q_PEND_ENTER(p_msg_q, timeout, opt, p_msg_size, p_ts) SEGGER_SYSVIEW_RecordU32x3(OS_TRACE_ID_TASK_MSG_Q_PEND, SEGGER_SYSVIEW_ShrinkId((U32)p_msg_q), (U32)timeout, (U32)opt) +#define OS_TRACE_TASK_SEM_POST_ENTER(p_tcb, opt) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_TASK_SEM_POST, SEGGER_SYSVIEW_ShrinkId((U32)p_tcb), (U32)opt) +#define OS_TRACE_TASK_SEM_PEND_ENTER(p_tcb, timeout, opt, p_ts) SEGGER_SYSVIEW_RecordU32x3(OS_TRACE_ID_TASK_SEM_PEND, SEGGER_SYSVIEW_ShrinkId((U32)p_tcb), (U32)timeout, (U32)opt) +#define OS_TRACE_SEM_DEL_ENTER(p_sem, opt) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_SEM_DEL, SEGGER_SYSVIEW_ShrinkId((U32)p_sem), (U32)opt) +#define OS_TRACE_SEM_POST_ENTER(p_sem, opt) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_SEM_POST, SEGGER_SYSVIEW_ShrinkId((U32)p_sem), (U32)opt) +#define OS_TRACE_SEM_PEND_ENTER(p_sem, timeout, opt, p_ts) SEGGER_SYSVIEW_RecordU32x3(OS_TRACE_ID_SEM_PEND, SEGGER_SYSVIEW_ShrinkId((U32)p_sem), (U32)timeout, (U32)opt) +#define OS_TRACE_Q_DEL_ENTER(p_q, opt) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_Q_DEL, SEGGER_SYSVIEW_ShrinkId((U32)p_q), (U32)opt) +#define OS_TRACE_Q_POST_ENTER(p_q, p_void, msg_size, opt) SEGGER_SYSVIEW_RecordU32x3(OS_TRACE_ID_Q_POST, SEGGER_SYSVIEW_ShrinkId((U32)p_q), (U32)msg_size, (U32)opt) +#define OS_TRACE_Q_PEND_ENTER(p_q, timeout, opt, p_msg_size, p_ts) SEGGER_SYSVIEW_RecordU32x3(OS_TRACE_ID_Q_PEND, SEGGER_SYSVIEW_ShrinkId((U32)p_q), (U32)timeout, (U32)opt) +#define OS_TRACE_FLAG_DEL_ENTER(p_grp, opt) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_FLAG_DEL, SEGGER_SYSVIEW_ShrinkId((U32)p_grp), (U32)opt) +#define OS_TRACE_FLAG_POST_ENTER(p_grp, flags, opt) SEGGER_SYSVIEW_RecordU32x3(OS_TRACE_ID_FLAG_POST, SEGGER_SYSVIEW_ShrinkId((U32)p_grp), (U32)flags, (U32)opt) +#define OS_TRACE_FLAG_PEND_ENTER(p_grp, flags, timeout, opt, p_ts) SYSVIEW_RecordU32x4 (OS_TRACE_ID_FLAG_PEND, SEGGER_SYSVIEW_ShrinkId((U32)p_grp), (U32)flags, (U32)timeout, (U32)opt) +#define OS_TRACE_MEM_PUT_ENTER(p_mem, p_blk) SEGGER_SYSVIEW_RecordU32x2(OS_TRACE_ID_MEM_PUT, SEGGER_SYSVIEW_ShrinkId((U32)p_mem), (U32)p_blk) +#define OS_TRACE_MEM_GET_ENTER(p_mem) SEGGER_SYSVIEW_RecordU32 (OS_TRACE_ID_MEM_GET, SEGGER_SYSVIEW_ShrinkId((U32)p_mem)) +#else +#define OS_TRACE_MUTEX_DEL_ENTER(p_mutex, opt) +#define OS_TRACE_MUTEX_POST_ENTER(p_mutex, opt) +#define OS_TRACE_MUTEX_PEND_ENTER(p_mutex, timeout, opt, p_ts) +#define OS_TRACE_TASK_MSG_Q_POST_ENTER(p_msg_q, p_void, msg_size, opt) +#define OS_TRACE_TASK_MSG_Q_PEND_ENTER(p_msg_q, timeout, opt, p_msg_size, p_ts) +#define OS_TRACE_TASK_SEM_POST_ENTER(p_tcb, opt) +#define OS_TRACE_TASK_SEM_PEND_ENTER(p_tcb, timeout, opt, p_ts) +#define OS_TRACE_SEM_DEL_ENTER(p_sem, opt) +#define OS_TRACE_SEM_POST_ENTER(p_sem, opt) +#define OS_TRACE_SEM_PEND_ENTER(p_sem, timeout, opt, p_ts) +#define OS_TRACE_Q_DEL_ENTER(p_q, opt) +#define OS_TRACE_Q_POST_ENTER(p_q, p_void, msg_size, opt) +#define OS_TRACE_Q_PEND_ENTER(p_q, timeout, opt, p_msg_size, p_ts) +#define OS_TRACE_FLAG_DEL_ENTER(p_grp, opt) +#define OS_TRACE_FLAG_POST_ENTER(p_grp, flags, opt) +#define OS_TRACE_FLAG_PEND_ENTER(p_grp, flags, timeout, opt, p_ts) +#define OS_TRACE_MEM_PUT_ENTER(p_mem, p_blk) +#define OS_TRACE_MEM_GET_ENTER(p_mem) +#endif + + +/* +************************************************************************************************************************ +* uC/OS-III Trace API Exit Functions +************************************************************************************************************************ +*/ + +#if (defined(OS_CFG_TRACE_API_EXIT_EN) && (OS_CFG_TRACE_API_EXIT_EN > 0u)) +#define OS_TRACE_MUTEX_DEL_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_MUTEX_DEL, RetVal) +#define OS_TRACE_MUTEX_POST_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_MUTEX_POST, RetVal) +#define OS_TRACE_MUTEX_PEND_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_MUTEX_PEND, RetVal) +#define OS_TRACE_TASK_MSG_Q_POST_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_TASK_MSG_Q_POST, RetVal) +#define OS_TRACE_TASK_MSG_Q_PEND_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_TASK_MSG_Q_PEND, RetVal) +#define OS_TRACE_TASK_SEM_POST_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_TASK_SEM_POST, RetVal) +#define OS_TRACE_TASK_SEM_PEND_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_TASK_SEM_PEND, RetVal) +#define OS_TRACE_SEM_DEL_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_SEM_DEL, RetVal) +#define OS_TRACE_SEM_POST_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_SEM_POST, RetVal) +#define OS_TRACE_SEM_PEND_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_SEM_PEND, RetVal) +#define OS_TRACE_Q_DEL_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_Q_DEL, RetVal) +#define OS_TRACE_Q_POST_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_Q_POST, RetVal) +#define OS_TRACE_Q_PEND_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_Q_PEND, RetVal) +#define OS_TRACE_FLAG_DEL_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_FLAG_DEL, RetVal) +#define OS_TRACE_FLAG_POST_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_FLAG_POST, RetVal) +#define OS_TRACE_FLAG_PEND_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_FLAG_PEND, RetVal) +#define OS_TRACE_MEM_PUT_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_MEM_PUT, RetVal) +#define OS_TRACE_MEM_GET_EXIT(RetVal) SEGGER_SYSVIEW_RecordEndCallU32(OS_TRACE_ID_MEM_GET, RetVal) +#else +#define OS_TRACE_MUTEX_DEL_EXIT(RetVal) +#define OS_TRACE_MUTEX_POST_EXIT(RetVal) +#define OS_TRACE_MUTEX_PEND_EXIT(RetVal) +#define OS_TRACE_TASK_MSG_Q_POST_EXIT(RetVal) +#define OS_TRACE_TASK_MSG_Q_PEND_EXIT(RetVal) +#define OS_TRACE_TASK_SEM_POST_EXIT(RetVal) +#define OS_TRACE_TASK_SEM_PEND_EXIT(RetVal) +#define OS_TRACE_SEM_DEL_EXIT(RetVal) +#define OS_TRACE_SEM_POST_EXIT(RetVal) +#define OS_TRACE_SEM_PEND_EXIT(RetVal) +#define OS_TRACE_Q_DEL_EXIT(RetVal) +#define OS_TRACE_Q_POST_EXIT(RetVal) +#define OS_TRACE_Q_PEND_EXIT(RetVal) +#define OS_TRACE_FLAG_DEL_EXIT(RetVal) +#define OS_TRACE_FLAG_POST_EXIT(RetVal) +#define OS_TRACE_FLAG_PEND_EXIT(RetVal) +#define OS_TRACE_MEM_PUT_EXIT(RetVal) +#define OS_TRACE_MEM_GET_EXIT(RetVal) +#endif + + +/* +************************************************************************************************************************ +* uC/OS-III Trace Unused Macros (other recorders) +************************************************************************************************************************ +*/ + +#define OS_TRACE_MUTEX_DEL(p_mutex) +#define OS_TRACE_MUTEX_POST(p_mutex) +#define OS_TRACE_MUTEX_PEND(p_mutex) +#define OS_TRACE_TASK_MSG_Q_POST(p_msg_q) +#define OS_TRACE_TASK_MSG_Q_PEND(p_msg_q) +#define OS_TRACE_TASK_SEM_POST(p_tcb) +#define OS_TRACE_TASK_SEM_PEND(p_tcb) +#define OS_TRACE_SEM_DEL(p_sem) +#define OS_TRACE_SEM_POST(p_sem) +#define OS_TRACE_SEM_PEND(p_sem) +#define OS_TRACE_Q_DEL(p_q) +#define OS_TRACE_Q_POST(p_q) +#define OS_TRACE_Q_PEND(p_q) +#define OS_TRACE_FLAG_DEL(p_grp) +#define OS_TRACE_FLAG_POST(p_grp) +#define OS_TRACE_FLAG_PEND(p_grp) +#define OS_TRACE_MEM_PUT(p_mem) +#define OS_TRACE_MEM_GET(p_mem) +#define OS_TRACE_MUTEX_POST_FAILED(p_mutex) +#define OS_TRACE_MUTEX_PEND_FAILED(p_mutex) +#define OS_TRACE_MUTEX_PEND_BLOCK(p_mutex) +#define OS_TRACE_TASK_CREATE_FAILED(p_tcb) +#define OS_TRACE_TASK_MSG_Q_POST_FAILED(p_msg_q) +#define OS_TRACE_TASK_MSG_Q_PEND_FAILED(p_msg_q) +#define OS_TRACE_TASK_MSG_Q_PEND_BLOCK(p_msg_q) +#define OS_TRACE_TASK_SEM_POST_FAILED(p_tcb) +#define OS_TRACE_TASK_SEM_PEND_FAILED(p_tcb) +#define OS_TRACE_TASK_SEM_PEND_BLOCK(p_tcb) +#define OS_TRACE_SEM_POST_FAILED(p_sem) +#define OS_TRACE_SEM_PEND_FAILED(p_sem) +#define OS_TRACE_SEM_PEND_BLOCK(p_sem) +#define OS_TRACE_Q_POST_FAILED(p_q) +#define OS_TRACE_Q_PEND_FAILED(p_q) +#define OS_TRACE_Q_PEND_BLOCK(p_q) +#define OS_TRACE_FLAG_POST_FAILED(p_grp) +#define OS_TRACE_FLAG_PEND_FAILED(p_grp) +#define OS_TRACE_FLAG_PEND_BLOCK(p_grp) +#define OS_TRACE_MEM_PUT_FAILED(p_mem) +#define OS_TRACE_MEM_GET_FAILED(p_mem) +#define OS_TRACE_TASK_PRIO_CHANGE(p_tcb, prio) + +#else /* End of OS_CFG_TRACE_EN > 0 */ + +#define OS_TRACE_TICK_INCREMENT(OSTickCtr) + +#define OS_TRACE_TASK_CREATE(p_tcb) +#define OS_TRACE_TASK_CREATE_FAILED(p_tcb) +#define OS_TRACE_TASK_DEL(p_tcb) +#define OS_TRACE_TASK_READY(p_tcb) +#define OS_TRACE_TASK_SWITCHED_IN(p_tcb) +#define OS_TRACE_TASK_DLY(dly_ticks) +#define OS_TRACE_TASK_SUSPEND(p_tcb) +#define OS_TRACE_TASK_SUSPENDED(p_tcb) +#define OS_TRACE_TASK_RESUME(p_tcb) + +#define OS_TRACE_ISR_BEGIN(isr_id) +#define OS_TRACE_ISR_END() + +#define OS_TRACE_ISR_ENTER() +#define OS_TRACE_ISR_EXIT() +#define OS_TRACE_ISR_EXIT_TO_SCHEDULER() + +#define OS_TRACE_TASK_MSG_Q_CREATE(p_msg_q, p_name) +#define OS_TRACE_TASK_MSG_Q_POST(p_msg_q) +#define OS_TRACE_TASK_MSG_Q_POST_FAILED(p_msg_q) +#define OS_TRACE_TASK_MSG_Q_PEND(p_msg_q) +#define OS_TRACE_TASK_MSG_Q_PEND_FAILED(p_msg_q) +#define OS_TRACE_TASK_MSG_Q_PEND_BLOCK(p_msg_q) + +#define OS_TRACE_TASK_SEM_CREATE(p_tcb, p_name) +#define OS_TRACE_TASK_SEM_POST(p_tcb) +#define OS_TRACE_TASK_SEM_POST_FAILED(p_tcb) +#define OS_TRACE_TASK_SEM_PEND(p_tcb) +#define OS_TRACE_TASK_SEM_PEND_FAILED(p_tcb) +#define OS_TRACE_TASK_SEM_PEND_BLOCK(p_tcb) + +#define OS_TRACE_MUTEX_CREATE(p_mutex, p_name) +#define OS_TRACE_MUTEX_DEL(p_mutex) +#define OS_TRACE_MUTEX_POST(p_mutex) +#define OS_TRACE_MUTEX_POST_FAILED(p_mutex) +#define OS_TRACE_MUTEX_PEND(p_mutex) +#define OS_TRACE_MUTEX_PEND_FAILED(p_mutex) +#define OS_TRACE_MUTEX_PEND_BLOCK(p_mutex) + +#define OS_TRACE_MUTEX_TASK_PRIO_INHERIT(p_tcb, prio) +#define OS_TRACE_MUTEX_TASK_PRIO_DISINHERIT(p_tcb, prio) + +#define OS_TRACE_SEM_CREATE(p_sem, p_name) +#define OS_TRACE_SEM_DEL(p_sem) +#define OS_TRACE_SEM_POST(p_sem) +#define OS_TRACE_SEM_POST_FAILED(p_sem) +#define OS_TRACE_SEM_PEND(p_sem) +#define OS_TRACE_SEM_PEND_FAILED(p_sem) +#define OS_TRACE_SEM_PEND_BLOCK(p_sem) + +#define OS_TRACE_Q_CREATE(p_q, p_name) +#define OS_TRACE_Q_DEL(p_q) +#define OS_TRACE_Q_POST(p_q) +#define OS_TRACE_Q_POST_FAILED(p_q) +#define OS_TRACE_Q_PEND(p_q) +#define OS_TRACE_Q_PEND_FAILED(p_q) +#define OS_TRACE_Q_PEND_BLOCK(p_q) + +#define OS_TRACE_FLAG_CREATE(p_grp, p_name) +#define OS_TRACE_FLAG_DEL(p_grp) +#define OS_TRACE_FLAG_POST(p_grp) +#define OS_TRACE_FLAG_POST_FAILED(p_grp) +#define OS_TRACE_FLAG_PEND(p_grp) +#define OS_TRACE_FLAG_PEND_FAILED(p_grp) +#define OS_TRACE_FLAG_PEND_BLOCK(p_grp) + +#define OS_TRACE_MEM_CREATE(p_mem, p_name) +#define OS_TRACE_MEM_PUT(p_mem) +#define OS_TRACE_MEM_PUT_FAILED(p_mem) +#define OS_TRACE_MEM_GET(p_mem) +#define OS_TRACE_MEM_GET_FAILED(p_mem) + +#define OS_TRACE_TASK_PRIO_CHANGE(p_tcb, prio) + +#define OS_TRACE_MUTEX_DEL_ENTER(p_mutex, opt) +#define OS_TRACE_MUTEX_POST_ENTER(p_mutex, opt) +#define OS_TRACE_MUTEX_PEND_ENTER(p_mutex, timeout, opt, p_ts) +#define OS_TRACE_TASK_MSG_Q_POST_ENTER(p_msg_q, p_void, msg_size, opt) +#define OS_TRACE_TASK_MSG_Q_PEND_ENTER(p_msg_q, timeout, opt, p_msg_size, p_ts) +#define OS_TRACE_TASK_SEM_POST_ENTER(p_tcb, opt) +#define OS_TRACE_TASK_SEM_PEND_ENTER(p_tcb, timeout, opt, p_ts) +#define OS_TRACE_SEM_DEL_ENTER(p_sem, opt) +#define OS_TRACE_SEM_POST_ENTER(p_sem, opt) +#define OS_TRACE_SEM_PEND_ENTER(p_sem, timeout, opt, p_ts) +#define OS_TRACE_Q_DEL_ENTER(p_q, opt) +#define OS_TRACE_Q_POST_ENTER(p_q, p_void, msg_size, opt) +#define OS_TRACE_Q_PEND_ENTER(p_q, timeout, opt, p_msg_size, p_ts) +#define OS_TRACE_FLAG_DEL_ENTER(p_grp, opt) +#define OS_TRACE_FLAG_POST_ENTER(p_grp, flags, opt) +#define OS_TRACE_FLAG_PEND_ENTER(p_grp, flags, timeout, opt, p_ts) +#define OS_TRACE_MEM_PUT_ENTER(p_mem, p_blk) +#define OS_TRACE_MEM_GET_ENTER(p_mem) + +#define OS_TRACE_MUTEX_DEL_EXIT(RetVal) +#define OS_TRACE_MUTEX_POST_EXIT(RetVal) +#define OS_TRACE_MUTEX_PEND_EXIT(RetVal) +#define OS_TRACE_TASK_MSG_Q_POST_EXIT(RetVal) +#define OS_TRACE_TASK_MSG_Q_PEND_EXIT(RetVal) +#define OS_TRACE_TASK_SEM_POST_EXIT(RetVal) +#define OS_TRACE_TASK_SEM_PEND_EXIT(RetVal) +#define OS_TRACE_SEM_DEL_EXIT(RetVal) +#define OS_TRACE_SEM_POST_EXIT(RetVal) +#define OS_TRACE_SEM_PEND_EXIT(RetVal) +#define OS_TRACE_Q_DEL_EXIT(RetVal) +#define OS_TRACE_Q_POST_EXIT(RetVal) +#define OS_TRACE_Q_PEND_EXIT(RetVal) +#define OS_TRACE_FLAG_DEL_EXIT(RetVal) +#define OS_TRACE_FLAG_POST_EXIT(RetVal) +#define OS_TRACE_FLAG_PEND_EXIT(RetVal) +#define OS_TRACE_MEM_PUT_EXIT(RetVal) +#define OS_TRACE_MEM_GET_EXIT(RetVal) + +#endif + + +/* +************************************************************************************************************************ +* API Functions +************************************************************************************************************************ +*/ + +#ifdef __cplusplus +extern "C" { +#endif +void SYSVIEW_TaskReady (U32 TaskID); +void SYSVIEW_TaskSwitchedIn (U32 TaskID); +void SYSVIEW_TaskSuspend (U32 TaskID); +void SYSVIEW_AddTask (U32 TaskID, const char* NamePtr, OS_PRIO Prio, CPU_STK* StkBasePtr, CPU_STK_SIZE StkSize); +void SYSVIEW_UpdateTask (U32 TaskID, const char* NamePtr, OS_PRIO Prio, CPU_STK* StkBasePtr, CPU_STK_SIZE StkSize); +void SYSVIEW_SendTaskInfo (U32 TaskID, const char* sName, unsigned Prio, U32 StackBase, unsigned StackSize); +void SYSVIEW_RecordU32x4 (unsigned Id, U32 Para0, U32 Para1, U32 Para2, U32 Para3); +void SYSVIEW_RecordU32x5 (unsigned Id, U32 Para0, U32 Para1, U32 Para2, U32 Para3, U32 Para4); + +void SYSVIEW_RecordU32Register(unsigned EventId, U32 ResourceId, const char* sResource); +void SYSVIEW_SendResourceList (void); + +#ifdef __cplusplus +} +#endif diff --git a/src/main.c b/src/main.c index 85842b6..5d27e95 100644 --- a/src/main.c +++ b/src/main.c @@ -12,32 +12,75 @@ #include "stm32f4xx.h" #include "FreeRTOS.h" #include "task.h" +#include "queue.h" +#include "timers.h" +#include #include #include -#define TASK1_PRIORITY 2 //remember task priority can never be 0 as idle task priority is 0 -#define TASK2_PRIORITY 2 -#define TASK3_PRIORITY 2 -#define TASK4_PRIORITY 2 +TaskHandle_t Handle_menu_display_task = NULL; +TaskHandle_t Handle_cmd_handling_task = NULL; +TaskHandle_t Handle_cmd_processing_task = NULL; +TaskHandle_t Handle_uart_write_task = NULL; -TaskHandle_t xTask1_Handle = NULL; -TaskHandle_t xTask2_Handle = NULL; -TaskHandle_t xTask3_Handle = NULL; -TaskHandle_t xTask4_Handle = NULL; +//task handles +void menu_display_task(void* params); +void cmd_handling_task(void* params); +void cmd_processing_task(void* params); +void uart_write_task(void* params); -void vTask1_Handler(void* params); -void vTask2_Handler(void* params); -void vTask3_Handler(void* params); -void vTask4_Handler(void* params); +//Queue handles +QueueHandle_t command_queue=NULL, uart_queue=NULL; void Init_GPIO_LED(void); void Init_UART(void); void printmsg(char* msg); +void rtos_delayms(uint32_t delay_ms); -uint8_t isUartfree = 1; +uint8_t getCommandCode(uint8_t* buffer); +void getArguments(uint8_t* data); + +void make_led_on(void); +void make_led_off(void); +void make_led_toggle_start(uint32_t toggle_delay); +void make_led_toggle_stop(void); +void make_led_status_read(char* data); +void make_rtc_datetime_read(char* data); +void make_exit_app(void); +void print_errormsg(char* data); + +char menu[] = "\r\nFreeRTOS APPLICATION can perform Below Functions \r\n" + "(1) LED_ON\r\n" + "(2) LED_OFF\r\n" + "(3) LED_TOGGLE_START\r\n" + "(4) LED_TOGGLE_STOP\r\n" + "(5) LED_STATUS_READ\r\n" + "(6) RTC_DATETIME_READ\r\n" + "(0) EXIT APP\r\n" + "\r\nPlease Enter the task number which needs to be performed\r\n" + ":"; + +#define LED_ON 1 +#define LED_OFF 2 +#define LED_TOGGLE_START 3 +#define LED_TOGGLE_STOP 4 +#define LED_STATUS_READ 5 +#define RTC_DATETIME_READ 6 +#define EXIT_APP 0 + +typedef struct APP_CMD{ + uint8_t CMD; + uint8_t CMD_ARGS[10]; +}APP_CMD_t; + +uint8_t command_len=0; +uint8_t command_buffer[20]; +TimerHandle_t Timer_LedToggle = NULL; int main(void) { + + DWT->CTRL |= (1 << 0); //required by SEGGER to maintain timestamp information it enable to store cycle count information //By default the system clk is running at max speed which 168Mhz //this is done by setsysclk function //if it is not required then deinit the clk config and set it to desired value using functions provided in stm32f4xx_rcc.c @@ -52,83 +95,130 @@ int main(void) Init_GPIO_LED(); Init_UART(); - //create task - xTaskCreate(vTask1_Handler, "Led_1", configMINIMAL_STACK_SIZE, NULL, TASK1_PRIORITY, &xTask1_Handle); - xTaskCreate(vTask2_Handler, "Led_2", configMINIMAL_STACK_SIZE, NULL, TASK2_PRIORITY, &xTask2_Handle); - xTaskCreate(vTask3_Handler, "Led_3", configMINIMAL_STACK_SIZE, NULL, TASK3_PRIORITY, &xTask3_Handle); - xTaskCreate(vTask4_Handler, "Led_4", configMINIMAL_STACK_SIZE, NULL, TASK4_PRIORITY, &xTask4_Handle); + //start SEGGER recording + SEGGER_SYSVIEW_Conf(); + SEGGER_SYSVIEW_Start(); - //start the FreeRtos Task Scheduler - vTaskStartScheduler(); + //create queues + command_queue = xQueueCreate(10,sizeof(APP_CMD_t*)); + uart_queue = xQueueCreate(10,sizeof(char*)); + + if((command_queue != NULL && uart_queue != NULL)){ + //create task + xTaskCreate(menu_display_task, "MENU_DISP", configMINIMAL_STACK_SIZE, NULL, 1, &Handle_menu_display_task); + xTaskCreate(cmd_handling_task, "CMD_HANDLE", configMINIMAL_STACK_SIZE, NULL, 2, &Handle_cmd_handling_task); + xTaskCreate(cmd_processing_task, "CMD_PROCESS", configMINIMAL_STACK_SIZE, NULL, 2, &Handle_cmd_processing_task); + xTaskCreate(uart_write_task, "UART_WRITE", configMINIMAL_STACK_SIZE, NULL, 2, &Handle_uart_write_task); + + //start the FreeRtos Task Scheduler + vTaskStartScheduler(); + + }else{ + printmsg("Failed To create queues\r\n"); + } for(;;); } -void vTask1_Handler(void* params) //this will toggle pin 15 led +void menu_display_task(void* params) //this will toggle pin 15 led { + char* pdata = menu; //task must never return while(1){ - if(isUartfree == 1){ - GPIO_ToggleBits(GPIOD, GPIO_Pin_15); - printmsg("Hello world led1\r\n"); - vTaskDelay(50); - isUartfree = 2; - taskYIELD(); - } + xQueueSend(uart_queue,&pdata,portMAX_DELAY); + + //wait till someone notifies + xTaskNotifyWait(0,0,NULL,portMAX_DELAY); }; //if it returns anyhow or task work is complete it is not repeating then delete the task vTaskDelete(NULL); //NULL means the task itself or can call the vtask1_handler } -void vTask2_Handler(void* params) //this will toggle pin 14 led +void cmd_handling_task(void* params) //this will toggle pin 14 led { + APP_CMD_t* new_cmd; + uint8_t command_code=0; //task must never return while(1){ - if(isUartfree == 2){ - GPIO_ToggleBits(GPIOD, GPIO_Pin_14); - printmsg("Hello world led2\r\n"); - vTaskDelay(60); - isUartfree = 3; - taskYIELD(); //leave the mcpu and get in task ready state in the queue at last in same priority task lists - } + + xTaskNotifyWait(0,0,NULL,portMAX_DELAY); + //send command to queue + new_cmd = (APP_CMD_t*)pvPortMalloc(sizeof(APP_CMD_t)); + + taskENTER_CRITICAL(); //it will disable all the interrupts having priority lower than max SYSCALL priority + + command_code = getCommandCode(command_buffer); + new_cmd->CMD = command_code; + getArguments(new_cmd->CMD_ARGS); + + taskEXIT_CRITICAL(); + + //send data to the queue + xQueueSend(command_queue,&new_cmd,portMAX_DELAY); + }; //if it returns anyhow or task work is complete it is not repeating then delete the task - vTaskDelete(xTask2_Handle); //NULL means the task itself + vTaskDelete(NULL); //NULL means the task itself } -void vTask3_Handler(void* params) //this will toggle pin 13 led +void cmd_processing_task(void* params) //this will toggle pin 13 led { + APP_CMD_t* cmd; + char task_msg[50]; + uint32_t toggle_delay = pdMS_TO_TICKS(600); //task must never return while(1){ - if(isUartfree == 3){ - GPIO_ToggleBits(GPIOD, GPIO_Pin_13); - printmsg("Hello world led3\r\n"); - vTaskDelay(70); - isUartfree = 4; - taskYIELD(); + xQueueReceive(command_queue, (void *)&cmd, portMAX_DELAY); + switch(cmd->CMD){ + case LED_ON: + make_led_on(); + break; + case LED_OFF: + make_led_off(); + break; + case LED_TOGGLE_START: + make_led_toggle_start(toggle_delay); + break; + case LED_TOGGLE_STOP: + make_led_toggle_stop(); + break; + case LED_STATUS_READ: + make_led_status_read(task_msg); + break; + case RTC_DATETIME_READ: + make_rtc_datetime_read(task_msg); + break; + case EXIT_APP: + make_exit_app(); + break; + default: + //cmd not found enable the menu printing + print_errormsg(task_msg); + xTaskNotify(Handle_menu_display_task,0,eNoAction); + break; + } + + //free the malloc memory created for storing cmd + vPortFree(cmd); + }; //if it returns anyhow or task work is complete it is not repeating then delete the task - vTaskDelete(xTask3_Handle); //NULL means the task itself + vTaskDelete(NULL); //NULL means the task itself } -void vTask4_Handler(void* params) //this will toggle pin 13 led +void uart_write_task(void* params) //this will toggle pin 13 led { + char *Data = NULL; //task must never return while(1){ - if(isUartfree == 4){ - GPIO_ToggleBits(GPIOD, GPIO_Pin_12); - printmsg("Hello world led4\r\n"); - vTaskDelay(80); - isUartfree = 1; - taskYIELD(); - } + xQueueReceive(uart_queue, &Data, portMAX_DELAY); + printmsg(Data); }; //if it returns anyhow or task work is complete it is not repeating then delete the task - vTaskDelete(xTask4_Handle); //NULL means the task itself + vTaskDelete(NULL); //NULL means the task itself } - void Init_GPIO_LED(void) { //Init GPIOD Peripheral @@ -182,6 +272,15 @@ void Init_UART(void) uart4_init.USART_HardwareFlowControl = USART_HardwareFlowControl_None; USART_Init(UART4, &uart4_init); + //enable uart4 RXNE interrupt + USART_ITConfig(UART4, USART_IT_RXNE, ENABLE); + + //NVIC UART4 priority + NVIC_SetPriority(UART4_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY + 1); + + //ENABLE NVIC INTERRUPT + NVIC_EnableIRQ(UART4_IRQn); + //enable uart4 peripheral USART_Cmd(UART4, ENABLE); @@ -195,4 +294,125 @@ void printmsg(char* msg) } } +void rtos_delayms(uint32_t delay_ms) +{ + vTaskDelay((delay_ms*configTICK_RATE_HZ)/1000); +} + + +void UART4_IRQHandler(void){ + + uint8_t data_byte; + BaseType_t pxHigherPriorityTaskWoken = pdFALSE; + if(USART_GetFlagStatus(UART4, USART_FLAG_RXNE)){ + //yes we received some data + data_byte = (uint8_t)USART_ReceiveData(UART4); + command_buffer[command_len++] = data_byte; + if(command_len >=(20-1)){ + command_len=0; //prevent the app from crashing + } + if(data_byte == '\r'){ + //reset the command len + command_len = 0; + //user finished entering command + //notify command handle task + xTaskNotifyFromISR(Handle_cmd_handling_task,0,eNoAction,&pxHigherPriorityTaskWoken); + //notify menu print task as well + xTaskNotifyFromISR(Handle_menu_display_task,0,eNoAction,&pxHigherPriorityTaskWoken); + } + } + //if higher priority task woken up then task yield + if(pxHigherPriorityTaskWoken){ + taskYIELD(); + } + +} + +uint8_t getCommandCode(uint8_t* buffer) +{ + return (buffer[0] - 48) ; +} + +void getArguments(uint8_t* data) +{ + +} + +void make_led_on(void) +{ + GPIO_SetBits(GPIOD, GPIO_Pin_14); +} +void make_led_off(void) +{ + GPIO_ResetBits(GPIOD, GPIO_Pin_14); +} + +void led_toggle(TimerHandle_t xTimer){ + GPIO_ToggleBits(GPIOD, GPIO_Pin_14); +} +void make_led_toggle_start(uint32_t toggle_delay) +{ + if(Timer_LedToggle == NULL){ + //create the Software Timer + Timer_LedToggle = xTimerCreate("LED_TOGGLE_TIMER", toggle_delay, pdTRUE, NULL, led_toggle); + } + //start the timer + xTimerStart(Timer_LedToggle,portMAX_DELAY); + +} +void make_led_toggle_stop(void) +{ + if(Timer_LedToggle != NULL){ + //stop the created timer + xTimerStop(Timer_LedToggle,portMAX_DELAY); + } +} +void make_led_status_read(char* data) +{ + sprintf(data, "\r\n LED STATUS is : %d\r\n", GPIO_ReadOutputDataBit(GPIOD, GPIO_Pin_14)); + xQueueSend(uart_queue,&data,portMAX_DELAY); +} +void make_rtc_datetime_read(char* data) +{ + RTC_DateTypeDef RTC_DateStruct; + RTC_TimeTypeDef RTC_TimeStruct; + + RTC_GetDate(RTC_Format_BIN, &RTC_DateStruct); + RTC_GetTime(RTC_Format_BIN, &RTC_TimeStruct); + + sprintf(data,"\r\nYY:MM:DD = %02d:%02d:%02d\r\nHH:MM:SS = %02d:%02d:%02d",RTC_DateStruct.RTC_Year,RTC_DateStruct.RTC_Month, + RTC_DateStruct.RTC_Date,RTC_TimeStruct.RTC_Hours,RTC_TimeStruct.RTC_Minutes,RTC_TimeStruct.RTC_Seconds); + + xQueueSend(uart_queue,&data,portMAX_DELAY); +} + +void make_exit_app(void) +{ + //delete all the tasks + vTaskDelete(Handle_menu_display_task); + vTaskDelete(Handle_uart_write_task); + vTaskDelete(Handle_cmd_processing_task); + vTaskDelete(Handle_cmd_handling_task); + + //disable all the interrupts or disable interrupts which you don't require + NVIC_DisableIRQ(UART4_IRQn); //or use basepri assembly instructions to disable all interrupts portDISABLE_INTERRUPTS(); + + //set the cpu in low power mode that will be done by idle hook function + +} + +void print_errormsg(char* data) +{ + sprintf(data, "\r\nCommand Not found\r\n"); + xQueueSend(uart_queue,&data,portMAX_DELAY); +} + +void vApplicationIdleHook(void) +{ + //send the system in sleep mode + __WFI(); +} + + +