========================================== FreeRTOSConfig.h: ========================================== #define configUSE_PREEMPTION 1 #define configUSE_PORT_OPTIMISED_TASK_SELECTION 1 #define configUSE_QUEUE_SETS 1 #define configSUPPORT_STATIC_ALLOCATION 1 #define configSUPPORT_DYNAMIC_ALLOCATION 1 #define configUSE_IDLE_HOOK 0 #define configUSE_TICK_HOOK 0 #define configCPU_CLOCK_HZ ( SystemCoreClock ) #define configTICK_RATE_HZ ((TickType_t)100000) #define configMAX_PRIORITIES ( 7 ) #define configMINIMAL_STACK_SIZE ((uint16_t)8*1024) #define configTOTAL_HEAP_SIZE ((size_t)15360) #define configMAX_TASK_NAME_LEN ( 16 ) #define configUSE_16_BIT_TICKS 0 #define configIDLE_SHOULD_YIELD 1 #define configUSE_MUTEXES 1 #define configUSE_RECURSIVE_MUTEXES 1 #define configUSE_COUNTING_SEMAPHORES 1 #define configQUEUE_REGISTRY_SIZE 8 #define configGENERATE_RUN_TIME_STATS 1 #define configUSE_STATS_FORMATTING_FUNCTIONS 1 #define configUSE_TRACE_FACILITY 1 #define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() #define portGET_RUN_TIME_COUNTER_VALUE() (SysTickHandler_TimeStampTicksHR()) /* Co-routine definitions. */ #define configUSE_CO_ROUTINES 0 #define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) /* Software timer definitions. */ #define configUSE_TIMERS 1 #define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 ) // (2) #define configTIMER_QUEUE_LENGTH 20 #define configTIMER_TASK_STACK_DEPTH ((uint16_t)128 * 2) #define configINCLUDE_FREERTOS_TASK_C_ADDITIONS_H 1 //mj /* Set the following definitions to 1 to include the API function, or zero to exclude the API function. */ #define INCLUDE_vTaskPrioritySet 1 #define INCLUDE_uxTaskPriorityGet 1 #define INCLUDE_vTaskDelete 1 #define INCLUDE_vTaskCleanUpResources 0 #define INCLUDE_vTaskSuspend 1 #define INCLUDE_vTaskDelayUntil 1 #define INCLUDE_vTaskDelay 1 #define INCLUDE_eTaskGetState 1 #define INCLUDE_xTimerPendFunctionCall 1 #define INCLUDE_xTaskGetSchedulerState 1 /* Cortex-M specific definitions. */ #ifdef __NVIC_PRIO_BITS /* __BVIC_PRIO_BITS will be specified when CMSIS is being used. */ #define configPRIO_BITS __NVIC_PRIO_BITS #else #define configPRIO_BITS 4 #endif /* The lowest interrupt priority that can be used in a call to a "set priority" function. */ #define configLIBRARY_LOWEST_INTERRUPT_PRIORITY 15 ========================================== SEGGER J-LINK Console Log at start of debugging: ========================================== SEGGER J-Link GDB Server V6.48a Command Line Version JLinkARM.dll V6.48a (DLL compiled Jul 30 2019 15:16:09) Command line: -port 2331 -s -CPU Cortex-M -device STM32H743VI -endian little -speed 4000 -if swd -vd -rtos C:\Program Files (x86)\Atollic\TrueSTUDIO for STM32 9.3.0\Servers\J-Link_gdbserver\GDBServer\RTOSPlugin_FreeRTOS.dll -swoport 2332 -----GDB Server start settings----- GDBInit file: none GDB Server Listening port: 2331 SWO raw output listening port: 2332 Terminal I/O port: 2333 Accept remote connection: localhost only Generate logfile: off Verify download: on Init regs on start: off Silent mode: off Single run mode: on Target connection timeout: 0 ms ------J-Link related settings------ J-Link Host interface: USB J-Link script: none J-Link settings file: none ------Target related settings------ Target device: STM32H743VI Target interface: SWD Target interface speed: 4000kHz Target endian: little Connecting to J-Link... J-Link is connected. Firmware: J-Link V10 compiled Jul 23 2019 13:46:10 Hardware: V10.10 S/N: 260115474 OEM: SEGGER-EDU Feature(s): FlashBP, GDB Checking target voltage... Target voltage: 3.34 V Listening on TCP/IP port 2331 Connecting to target...Connected to target Waiting for GDB connection...Connected to 127.0.0.1 Reading all registers Read 2 bytes @ address 0x080175CC (Data = 0xB508) Read 4 bytes @ address 0x08016B68 (Data = 0xD034F8DF) Loading RTOS plugin: C:\Program Files (x86)\Atollic\TrueSTUDIO for STM32 9.3.0\Servers\J-Link_gdbserver\GDBServer\RTOSPlugin_FreeRTOS.dll... RTOS plugin (API v1.0) loaded successfully RTOS plugin: Loaded Received symbol: pxCurrentTCB (0x200006C4) Received symbol: pxReadyTasksLists (0x200006C8) Received symbol: xDelayedTaskList1 (0x20000754) Received symbol: xDelayedTaskList2 (0x20000768) Received symbol: pxDelayedTaskList (0x2000077C) Received symbol: pxOverflowDelayedTaskList (0x20000780) Received symbol: xPendingReadyList (0x20000784) Received symbol: xTasksWaitingTermination (0x20000798) Received symbol: xSuspendedTaskList (0x200007B0) Received symbol: uxCurrentNumberOfTasks (0x200007C4) Received symbol: uxTopUsedPriority (0x00000000) Received symbol: uxTopReadyPriority (0x200007D0) Received symbol: vPortEnableVFP (0x08004F64) Received symbol: FreeRTOSDebugConfig (0x080181B0) All mandatory symbols successfully loaded. ...... ========================================== when I create the first RTOS task the debugger reports: ========================================== [New Remote target] [Switching to Thread 1] Breakpoint 4, main () at ..\src\main.cpp:658 658 TestLED::OutPin(); Breakpoint 2, main () at ..\src\main.cpp:727 727 g_WCOMHostThread.Create("TWCOMHost",6000,&threadArg,(Rt_Priority)RtP_PriorityNormal);//WCOMHostThread Breakpoint 8, prvAddNewTaskToReadyList (pxNewTCB=0x200100f0 ) at ..\..\..\..\..\ARM\FreeRTOS\tasks.c:1055 1055 pxCurrentTCB = pxNewTCB; [New Remote target] [New Thread 288099352] [Switching to Thread 536936688] Invalid selected thread. ========================================= and the SEGGER J-LINK log: ========================================= ... Performing single step... ...Breakpoint reached @ address 0x08006BE0 Reading all registers Read 4 bytes @ address 0x00000000 (Data = 0x4F5CE4F4) Starting target CPU... ...Breakpoint reached @ address 0x08012C30 WARNING: Mis-aligned memory read: Address: 0x0000000B, NumBytes: 4, Alignment: 4 (Word-aligned) WARNING: Failed to read memory @ address 0x112C0C58 ERROR: Error reading thread name in FreeRTOS task control block. Reading all registers Read register 0 (4 bytes) from DLL: 01000000 Read register 1 (4 bytes) from DLL: F8000120 Read register 2 (4 bytes) from DLL: F0000120 Read register 3 (4 bytes) from DLL: 01000000 Read register 4 (4 bytes) from DLL: 00000000 Read register 5 (4 bytes) from DLL: 00000000 Read register 6 (4 bytes) from DLL: 00000000 Read register 7 (4 bytes) from DLL: 00FF0120 Read register 8 (4 bytes) from DLL: 00000000 Read register 9 (4 bytes) from DLL: 00000000 Read register 10 (4 bytes) from DLL: 00000000 Read register 11 (4 bytes) from DLL: 00000000 Read register 12 (4 bytes) from DLL: 84270000 Read register 13 (4 bytes) from DLL: F8FE0120 Read register 14 (4 bytes) from DLL: 4F6C0008 Read register 15 (4 bytes) from DLL: 302C0108 Read register 16 (4 bytes) from DLL: 00000001 Read 4 bytes @ address 0x08012C30 (Data = 0x0284F107) Reading all registers ERROR: Error reading stack frame from FreeRTOS task. ERROR: Error reading stack frame from FreeRTOS task. Read register 0 (4 bytes) from DLL: 01000000 ERROR: Error reading stack frame from FreeRTOS task. Read register 1 (4 bytes) from DLL: F8000120 ERROR: Error reading stack frame from FreeRTOS task. Read register 2 (4 bytes) from DLL: F0000120 ERROR: Error reading stack frame from FreeRTOS task. Read register 3 (4 bytes) from DLL: 01000000 ERROR: Error reading stack frame from FreeRTOS task. Read register 4 (4 bytes) from DLL: 00000000 ERROR: Error reading stack frame from FreeRTOS task. Read register 5 (4 bytes) from DLL: 00000000 ERROR: Error reading stack frame from FreeRTOS task. Read register 6 (4 bytes) from DLL: 00000000 ERROR: Error reading stack frame from FreeRTOS task. Read register 7 (4 bytes) from DLL: 00FF0120 ERROR: Error reading stack frame from FreeRTOS task. Read register 8 (4 bytes) from DLL: 00000000 ERROR: Error reading stack frame from FreeRTOS task. Read register 9 (4 bytes) from DLL: 00000000 ERROR: Error reading stack frame from FreeRTOS task. Read register 10 (4 bytes) from DLL: 00000000 ERROR: Error reading stack frame from FreeRTOS task. Read register 11 (4 bytes) from DLL: 00000000 ERROR: Error reading stack frame from FreeRTOS task. Read register 12 (4 bytes) from DLL: 84270000 ERROR: Error reading stack frame from FreeRTOS task. Read register 13 (4 bytes) from DLL: F8FE0120 ERROR: Error reading stack frame from FreeRTOS task. Read register 14 (4 bytes) from DLL: 4F6C0008 ERROR: Error reading stack frame from FreeRTOS task. Read register 15 (4 bytes) from DLL: 302C0108 ERROR: Error reading stack frame from FreeRTOS task. Read register 16 (4 bytes) from DLL: 00000001 Removing breakpoint @ address 0x08006BDA, Size = 2 Removing breakpoint @ address 0x08012B22, Size = 2 Removing breakpoint @ address 0x08012C1A, Size = 2 Removing breakpoint @ address 0x08012C30, Size = 2 Removing breakpoint @ address 0x08012C5C, Size = 2