0x080015e0 in main () at Core/Src/main.c:128 128 HAL_UART_Receive_IT(&huart1, &huart1_rxc, 1); ### Assembly ######################################################################################################## 0x080015d4 main+112 bl 0x8003f84 0x080015d8 main+116 movs r4, #0 0x080015da main+118 ldr r3, [pc, #72] ; (0x8001624 ) 0x080015dc main+120 ldrb r3, [r3, #0] 0x080015de main+122 cmp r3, #0 0x080015e0 main+124 beq.n 0x80015da 0x080015e2 main+126 ldr r3, [pc, #64] ; (0x8001624 ) 0x080015e4 main+128 movs r2, #0 0x080015e6 main+130 strb r2, [r3, #0] 0x080015e8 main+132 adds r3, r4, #1 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x20000ae8 r10 0x00000000 pc 0x080015e0 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x00000001 r7 0x00000000 r12 0x00001000 fpscr 0x20000010 faultmask 0x00 r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x0000004f r9 0x00000000 lr 0x08002029 psp 0x00000000 ### Source ########################################################################################################## 118 setPWM(&htim2, TIM_CHANNEL_2, 50); 119 setPWM(&htim2, TIM_CHANNEL_4, 25); 120 121 HAL_GPIO_WritePin(m1_dir_GPIO_Port, m1_dir_Pin, 1); 122 HAL_GPIO_WritePin(m2_dir_GPIO_Port, m2_dir_Pin, 1); 123 124 mc_init(&htim2); 125 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1); 126 HAL_TIM_Base_Start_IT(&htim6); 127 128 HAL_UART_Receive_IT(&huart1, &huart1_rxc, 1); 129 uint16_t motor_degrees = 0; 130 /* USER CODE END 2 */ 131 132 /* Infinite loop */ 133 /* USER CODE BEGIN WHILE */ 134 while (1) 135 { 136 if (b_timer_struck) 137 { ### Stack ########################################################################################################### [0] from 0x080015e0 in main+124 at Core/Src/main.c:128 ### Threads ######################################################################################################### [1] id 0 from 0x080015e0 in main+124 at Core/Src/main.c:128 ### Variables ####################################################################################################### loc motor_degrees = ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0xa9a8 lma 0x80001c0 Loading section .rodata, size 0x648 lma 0x800ab68 Loading section .ARM, size 0x8 lma 0x800b1b0 Loading section .init_array, size 0x8 lma 0x800b1b8 Loading section .fini_array, size 0x8 lma 0x800b1c0 Loading section .data, size 0x9a8 lma 0x800b1c8 Start address 0x08004288, load size 47936 Transfer rate: 30 KB/sec, 5326 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x080015ea in HAL_TIM_PWM_MspInit (htim_pwm=0x0) at Core/Src/stm32l4xx_hal_msp.c:95 95 __HAL_RCC_TIM2_CLK_ENABLE(); ### Assembly ########################################################################################################## 0x080015de HAL_TIM_PWM_MspInit+6 ldr r1, [pc, #88] ; (0x8001638 ) 0x080015e0 HAL_TIM_PWM_MspInit+8 mov r0, r6 0x080015e2 HAL_TIM_PWM_MspInit+10 bl 0x8004048 0x080015e6 HAL_TIM_PWM_MspInit+14 movs r4, #0 0x080015e8 HAL_TIM_PWM_MspInit+16 ldr r3, [pc, #80] ; (0x800163c ) 0x080015ea HAL_TIM_PWM_MspInit+18 ldrb r3, [r3, #0] 0x080015ec HAL_TIM_PWM_MspInit+20 cmp r3, #0 0x080015ee HAL_TIM_PWM_MspInit+22 beq.n 0x80015e8 0x080015f0 HAL_TIM_PWM_MspInit+24 ldr r3, [pc, #72] ; (0x800163c ) 0x080015f2 HAL_TIM_PWM_MspInit+26 movs r2, #0 ### Breakpoints ####################################################################################################### ### Expressions ####################################################################################################### ### History ########################################################################################################### ### Memory ############################################################################################################ ### Registers ######################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080015ea primask 0x00 r1 0x00000000 r6 0x20000a60 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x00000001 r7 0x00000000 r12 0x00001000 fpscr 0x20000010 faultmask 0x00 r3 0x200009c4 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000154 r9 0x00000000 lr 0x08002041 psp 0x00000000 ### Source ############################################################################################################ 85 * @retval None 86 */ 87 void HAL_TIM_PWM_MspInit(TIM_HandleTypeDef* htim_pwm) 88 { 89 if(htim_pwm->Instance==TIM2) 90 { 91 /* USER CODE BEGIN TIM2_MspInit 0 */ 92 93 /* USER CODE END TIM2_MspInit 0 */ 94 /* Peripheral clock enable */ 95 __HAL_RCC_TIM2_CLK_ENABLE(); 96 /* USER CODE BEGIN TIM2_MspInit 1 */ 97 98 /* USER CODE END TIM2_MspInit 1 */ 99 } 100 101 } 102 103 /** 104 * @brief TIM_Base MSP Initialization ### Stack ############################################################################################################# [0] from 0x080015ea in HAL_TIM_PWM_MspInit+18 at Core/Src/stm32l4xx_hal_msp.c:95 [1] from 0x08002040 in HAL_TIM_PWM_Stop+72 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c:1533 [2] from 0x00000000 ### Threads ########################################################################################################### [1] id 0 from 0x080015ea in HAL_TIM_PWM_MspInit+18 at Core/Src/stm32l4xx_hal_msp.c:95 ### Variables ######################################################################################################### arg htim_pwm = 0x0: {Instance = 0x20010000,Init = {Prescaler = 134234761,CounterMode = 134223429,Period = … loc tmpreg = 0 ####################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9678 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009838 Loading section .ARM, size 0x8 lma 0x8009d10 Loading section .init_array, size 0x8 lma 0x8009d18 Loading section .fini_array, size 0x8 lma 0x8009d20 Loading section .data, size 0x9a8 lma 0x8009d28 Start address 0x080042d4, load size 42656 Transfer rate: 29 KB/sec, 4739 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x0800151c in main () at Core/Src/main.c:144 144 if ((pkt = p_serial_mgr_service()) != NULL) ### Assembly ################################################################## 0x0800150e main+154 movs r1, #0 0x08001510 main+156 mov r0, r4 0x08001512 main+158 bl 0x8004370 0x08001516 main+162 bl 0x8004298 0x0800151a main+166 mov r4, r0 0x0800151c main+168 cmp r0, #0 0x0800151e main+170 beq.n 0x8001516 0x08001520 main+172 ldrb r2, [r0, #1] 0x08001522 main+174 ldrb r1, [r0, #0] 0x08001524 main+176 ldr r0, [pc, #48] ; (0x8001558 ) ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151b faultmask 0x00 r7 0x00000000 pc 0x0800151c control 0x04 ### Source #################################################################### 134 while (1) 135 { 136 // if (b_timer_struck) 137 // { 138 // // PDEBUG("%d\n", sys_time); 139 // b_timer_struck = false; 140 // motor_degrees = (motor_degrees + 1) % 360; 141 // mc_service(motor_degrees, 50); 142 // } 143 serial_pkt_t *pkt = NULL; 144 if ((pkt = p_serial_mgr_service()) != NULL) 145 { 146 PDEBUG("Source: %02x\n" 147 "Destination: %02x\n", 148 pkt->src_addr, pkt->dest_addr); 149 PDEBUG("Frame Data: \n"); 150 for (int ind = 0; ind < pkt->len; pkt++) 151 { 152 if (ind % 8 == 0) 153 { ### Stack ##################################################################### [0] from 0x0800151c in main+168 at Core/Src/main.c:144 ### Threads ################################################################### [1] id 0 from 0x0800151c in main+168 at Core/Src/main.c:144 ### Variables ################################################################# loc pkt = 0x0: {src_addr = 0 '\000',dest_addr = 0 '\000',len = 134234837,frame_data = "a\025\000\bc\0… ############################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x080042d4 msp: 0x20010000 Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9678 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009838 Loading section .ARM, size 0x8 lma 0x8009d10 Loading section .init_array, size 0x8 lma 0x8009d18 Loading section .fini_array, size 0x8 lma 0x8009d20 Loading section .data, size 0x9a8 lma 0x8009d28 Start address 0x080042d4, load size 42656 Transfer rate: 29 KB/sec, 4739 bytes/write. Breakpoint 1 at 0x8001168: file Core/Src/main.c, line 412. Note: automatically using hardware breakpoints for read-only addresses. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### Breakpoint 1, UART2_RxCpltCallback (huart=0x20000b14 ) at Core/Src/main.c:412 412 { ### Assembly ################################################################## ~ ~ ~ ~ ~ !0x08001168 UART2_RxCpltCallback+0 push {r4, lr} 0x0800116a UART2_RxCpltCallback+2 ldr r4, [pc, #24] ; (0x8001184 ) 0x0800116c UART2_RxCpltCallback+4 movs r3, #100 ; 0x64 0x0800116e UART2_RxCpltCallback+6 movs r2, #1 0x08001170 UART2_RxCpltCallback+8 mov r1, r4 ### Breakpoints ############################################################### [1] break at 0x08001168 in Core/Src/main.c:412 for /storage/Shared/Projects/Penguinator/motor_controller/Core/Src/main.c:411 hit 1 time ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x20000b14 r8 0x00000000 xPSR 0x81000036 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x40004408 r10 0x00000000 msp 0x2000ff68 r3 0x08001169 r11 0x00000000 psp 0x00000000 r4 0x20000b14 r12 0x00001000 primask 0x00 r5 0x00000001 sp 0x2000ff68 basepri 0x00 r6 0x00000000 lr 0x0800348b faultmask 0x00 r7 0x00000000 pc 0x08001168 control 0x00 ### Source #################################################################### 402 GPIO_InitStruct.Pin = m1_dir_Pin | m2_dir_Pin; 403 GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; 404 GPIO_InitStruct.Pull = GPIO_NOPULL; 405 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; 406 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); 407 } 408 409 /* USER CODE BEGIN 4 */ 410 411 void UART2_RxCpltCallback(UART_HandleTypeDef *huart) !412 { 413 HAL_UART_Transmit(&huart1, &huart2_rxc, 1, 100); 414 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1); 415 } 416 // void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart) 417 // { 418 // else if (huart == &huart2) 419 // { 420 // } 421 // } ### Stack ##################################################################### [0] from 0x08001168 in UART2_RxCpltCallback+0 at Core/Src/main.c:412 [1] from 0x0800348a in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035dc in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001590 in USART2_IRQHandler+8 at Core/Src/stm32l4xx_it.c:225 [4] from 0xffffffe9 [5] from 0x080042a2 in p_serial_mgr_service+10 at shared/drivers/p_serial_mgr.c:143 [6] from 0x0800151a in main+166 at Core/Src/main.c:144 ### Threads ################################################################### [1] id 0 from 0x08001168 in UART2_RxCpltCallback+0 at Core/Src/main.c:412 ### Variables ################################################################# arg huart = 0x20000b14 : {Instance = 0x40004400,Init = {BaudRate = 115200,WordLength = 0,StopBi… ############################################################################### Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] UART2_RxCpltCallback (huart=0x20000b14 ) at Core/Src/main.c:412 412 { ### Assembly ################################################################## ~ ~ ~ ~ ~ 0x08001168 UART2_RxCpltCallback+0 push {r4, lr} 0x0800116a UART2_RxCpltCallback+2 ldr r4, [pc, #24] ; (0x8001184 ) 0x0800116c UART2_RxCpltCallback+4 movs r3, #100 ; 0x64 0x0800116e UART2_RxCpltCallback+6 movs r2, #1 0x08001170 UART2_RxCpltCallback+8 mov r1, r4 ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x20000b14 r8 0x00000000 xPSR 0x81000036 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x40004408 r10 0x00000000 msp 0x2000ff68 r3 0x08001169 r11 0x00000000 psp 0x00000000 r4 0x20000b14 r12 0x00001000 primask 0x00 r5 0x00000001 sp 0x2000ff68 basepri 0x00 r6 0x00000000 lr 0x0800348b faultmask 0x00 r7 0x00000000 pc 0x08001168 control 0x00 ### Source #################################################################### 402 GPIO_InitStruct.Pin = m1_dir_Pin | m2_dir_Pin; 403 GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; 404 GPIO_InitStruct.Pull = GPIO_NOPULL; 405 GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; 406 HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); 407 } 408 409 /* USER CODE BEGIN 4 */ 410 411 void UART2_RxCpltCallback(UART_HandleTypeDef *huart) 412 { 413 HAL_UART_Transmit(&huart1, &huart2_rxc, 1, 100); 414 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1); 415 } 416 // void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart) 417 // { 418 // else if (huart == &huart2) 419 // { 420 // } 421 // } ### Stack ##################################################################### [0] from 0x08001168 in UART2_RxCpltCallback+0 at Core/Src/main.c:412 [1] from 0x0800348a in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035dc in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001590 in USART2_IRQHandler+8 at Core/Src/stm32l4xx_it.c:225 [4] from 0xffffffe9 [5] from 0x080042a2 in p_serial_mgr_service+10 at shared/drivers/p_serial_mgr.c:143 [6] from 0x0800151a in main+166 at Core/Src/main.c:144 ### Threads ################################################################### [1] id 0 from 0x08001168 in UART2_RxCpltCallback+0 at Core/Src/main.c:412 ### Variables ################################################################# arg huart = 0x20000b14 : {Instance = 0x40004400,Init = {BaudRate = 115200,WordLength = 0,StopBi… ############################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9678 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009838 Loading section .ARM, size 0x8 lma 0x8009d10 Loading section .init_array, size 0x8 lma 0x8009d18 Loading section .fini_array, size 0x8 lma 0x8009d20 Loading section .data, size 0x9a8 lma 0x8009d28 Start address 0x080042d4, load size 42656 Transfer rate: 29 KB/sec, 4739 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:143 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ################################################################## ~ ~ ~ ~ ~ 0x08004298 p_serial_mgr_service+0 movs r3, #0 0x0800429a p_serial_mgr_service+2 b.n 0x800429e 0x0800429c p_serial_mgr_service+4 adds r3, #1 0x0800429e p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x80042c4 ) 0x080042a0 p_serial_mgr_service+8 ldrh r2, [r2, #6] ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151b faultmask 0x00 r7 0x00000000 pc 0x08004298 control 0x04 ### Source #################################################################### 133 { 134 _serial_huart_inst = huart; 135 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 136 137 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 138 } 139 140 serial_pkt_t *p_serial_mgr_service(void) 141 { 142 // this will be less garbage when i switch to a queue 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 144 { 145 if (serial_pkt_cb.buffer[ind].b_ready) 146 { 147 return &serial_pkt_cb.buffer; 148 } 149 } 150 return NULL; 151 } 152 ### Stack ##################################################################### [0] from 0x08004298 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:143 [1] from 0x0800151a in main+166 at Core/Src/main.c:144 ### Threads ################################################################### [1] id 0 from 0x08004298 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:143 ### Variables ################################################################# loc ind = 0 ############################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9678 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009838 Loading section .ARM, size 0x8 lma 0x8009d10 Loading section .init_array, size 0x8 lma 0x8009d18 Loading section .fini_array, size 0x8 lma 0x8009d20 Loading section .data, size 0x9a8 lma 0x8009d28 Start address 0x080042d4, load size 42656 Transfer rate: 29 KB/sec, 4739 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x080042a2 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:143 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ################################################################## 0x08004298 p_serial_mgr_service+0 movs r3, #0 0x0800429a p_serial_mgr_service+2 b.n 0x800429e 0x0800429c p_serial_mgr_service+4 adds r3, #1 0x0800429e p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x80042c4 ) 0x080042a0 p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x080042a2 p_serial_mgr_service+10 cmp r2, r3 0x080042a4 p_serial_mgr_service+12 ble.n 0x80042be 0x080042a6 p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x80042c4 ) 0x080042a8 p_serial_mgr_service+16 ldr r2, [r2, #0] 0x080042aa p_serial_mgr_service+18 mov.w r1, #268 ; 0x10c ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151b faultmask 0x00 r7 0x00000000 pc 0x080042a2 control 0x04 ### Source #################################################################### 133 { 134 _serial_huart_inst = huart; 135 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 136 137 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 138 } 139 140 serial_pkt_t *p_serial_mgr_service(void) 141 { 142 // this will be less garbage when i switch to a queue 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 144 { 145 if (serial_pkt_cb.buffer[ind].b_ready) 146 { 147 return &serial_pkt_cb.buffer; 148 } 149 } 150 return NULL; 151 } 152 ### Stack ##################################################################### [0] from 0x080042a2 in p_serial_mgr_service+10 at shared/drivers/p_serial_mgr.c:143 [1] from 0x0800151a in main+166 at Core/Src/main.c:144 ### Threads ################################################################### [1] id 0 from 0x080042a2 in p_serial_mgr_service+10 at shared/drivers/p_serial_mgr.c:143 ### Variables ################################################################# loc ind = 0 ############################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9678 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009838 Loading section .ARM, size 0x8 lma 0x8009d10 Loading section .init_array, size 0x8 lma 0x8009d18 Loading section .fini_array, size 0x8 lma 0x8009d20 Loading section .data, size 0x9a8 lma 0x8009d28 Start address 0x080042d4, load size 42656 Transfer rate: 29 KB/sec, 4739 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x0800151c in main () at Core/Src/main.c:144 144 if ((pkt = p_serial_mgr_service()) != NULL) ### Assembly ################################################################## 0x0800150e main+154 movs r1, #0 0x08001510 main+156 mov r0, r4 0x08001512 main+158 bl 0x8004370 0x08001516 main+162 bl 0x8004298 0x0800151a main+166 mov r4, r0 0x0800151c main+168 cmp r0, #0 0x0800151e main+170 beq.n 0x8001516 0x08001520 main+172 ldrb r2, [r0, #1] 0x08001522 main+174 ldrb r1, [r0, #0] 0x08001524 main+176 ldr r0, [pc, #48] ; (0x8001558 ) ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151b faultmask 0x00 r7 0x00000000 pc 0x0800151c control 0x04 ### Source #################################################################### 134 while (1) 135 { 136 // if (b_timer_struck) 137 // { 138 // // PDEBUG("%d\n", sys_time); 139 // b_timer_struck = false; 140 // motor_degrees = (motor_degrees + 1) % 360; 141 // mc_service(motor_degrees, 50); 142 // } 143 serial_pkt_t *pkt = NULL; 144 if ((pkt = p_serial_mgr_service()) != NULL) 145 { 146 PDEBUG("Source: %02x\n" 147 "Destination: %02x\n", 148 pkt->src_addr, pkt->dest_addr); 149 PDEBUG("Frame Data: \n"); 150 for (int ind = 0; ind < pkt->len; pkt++) 151 { 152 if (ind % 8 == 0) 153 { ### Stack ##################################################################### [0] from 0x0800151c in main+168 at Core/Src/main.c:144 ### Threads ################################################################### [1] id 0 from 0x0800151c in main+168 at Core/Src/main.c:144 ### Variables ################################################################# loc pkt = 0x0: {src_addr = 0 '\000',dest_addr = 0 '\000',len = 134234837,frame_data = "a\025\000\bc\0… ############################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x080042d4 msp: 0x20010000 Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9678 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009838 Loading section .ARM, size 0x8 lma 0x8009d10 Loading section .init_array, size 0x8 lma 0x8009d18 Loading section .fini_array, size 0x8 lma 0x8009d20 Loading section .data, size 0x9a8 lma 0x8009d28 Start address 0x080042d4, load size 42656 Transfer rate: 29 KB/sec, 4739 bytes/write. Breakpoint 1 at 0x8001520: file Core/Src/main.c, line 146. Note: automatically using hardware breakpoints for read-only addresses. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### Program received signal SIGINT, Interrupt. 0x080042be in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:150 150 return NULL; ### Assembly ################################################################## 0x080042b2 p_serial_mgr_service+26 ldrb.w r2, [r2, #265] ; 0x109 0x080042b6 p_serial_mgr_service+30 cmp r2, #0 0x080042b8 p_serial_mgr_service+32 beq.n 0x800429c 0x080042ba p_serial_mgr_service+34 ldr r0, [pc, #8] ; (0x80042c4 ) 0x080042bc p_serial_mgr_service+36 bx lr 0x080042be p_serial_mgr_service+38 movs r0, #0 0x080042c0 p_serial_mgr_service+40 bx lr 0x080042c2 p_serial_mgr_service+42 nop 0x080042c4 p_serial_mgr_service+44 asrs r4, r3, #25 0x080042c6 p_serial_mgr_service+46 movs r0, #0 ### Breakpoints ############################################################### [1] break at 0x08001520 in Core/Src/main.c:146 for /storage/Shared/Projects/Penguinator/motor_controller/Core/Src/main.c:145 ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151b faultmask 0x00 r7 0x00000000 pc 0x080042be control 0x04 ### Source #################################################################### 140 serial_pkt_t *p_serial_mgr_service(void) 141 { 142 // this will be less garbage when i switch to a queue 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 144 { 145 if (serial_pkt_cb.buffer[ind].b_ready) 146 { 147 return &serial_pkt_cb.buffer; 148 } 149 } 150 return NULL; 151 } 152 153 void p_serial_mgr_start() 154 { 155 HAL_UART_Receive_IT(_serial_huart_inst, &rxc, 1); 156 } ~ ~ ~ ### Stack ##################################################################### [0] from 0x080042be in p_serial_mgr_service+38 at shared/drivers/p_serial_mgr.c:150 [1] from 0x0800151a in main+166 at Core/Src/main.c:144 ### Threads ################################################################### [1] id 0 from 0x080042be in p_serial_mgr_service+38 at shared/drivers/p_serial_mgr.c:150 ### Variables ################################################################# ############################################################################### ### Output/messages ########################################################### halted: PC: 0x080042c0 halted: PC: 0x0800151a halted: PC: 0x0800151c halted: PC: 0x0800151e halted: PC: 0x08001516 halted: PC: 0x08004298 p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:143 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ################################################################## ~ ~ ~ ~ ~ 0x08004298 p_serial_mgr_service+0 movs r3, #0 0x0800429a p_serial_mgr_service+2 b.n 0x800429e 0x0800429c p_serial_mgr_service+4 adds r3, #1 0x0800429e p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x80042c4 ) 0x080042a0 p_serial_mgr_service+8 ldrh r2, [r2, #6] ### Breakpoints ############################################################### [1] break at 0x08001520 in Core/Src/main.c:146 for /storage/Shared/Projects/Penguinator/motor_controller/Core/Src/main.c:145 ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151b faultmask 0x00 r7 0x00000000 pc 0x08004298 control 0x04 ### Source #################################################################### 133 { 134 _serial_huart_inst = huart; 135 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 136 137 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 138 } 139 140 serial_pkt_t *p_serial_mgr_service(void) 141 { 142 // this will be less garbage when i switch to a queue 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 144 { 145 if (serial_pkt_cb.buffer[ind].b_ready) 146 { 147 return &serial_pkt_cb.buffer; 148 } 149 } 150 return NULL; 151 } 152 ### Stack ##################################################################### [0] from 0x08004298 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:143 [1] from 0x0800151a in main+166 at Core/Src/main.c:144 ### Threads ################################################################### [1] id 0 from 0x08004298 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:143 ### Variables ################################################################# loc ind = 0 ############################################################################### ### Output/messages ########################################################### halted: PC: 0x0800429a halted: PC: 0x0800429e halted: PC: 0x080042a0 halted: PC: 0x080042a2 halted: PC: 0x080042a4 halted: PC: 0x080042be halted: PC: 0x080042c0 halted: PC: 0x0800151a halted: PC: 0x0800151c halted: PC: 0x0800151e halted: PC: 0x08001516 halted: PC: 0x08004298 halted: PC: 0x0800151c halted: PC: 0x0800151e halted: PC: 0x08001516 halted: PC: 0x08004298 halted: PC: 0x0800151c halted: PC: 0x0800151e halted: PC: 0x08001516 halted: PC: 0x08004298 halted: PC: 0x0800151c halted: PC: 0x0800151e halted: PC: 0x08001516 halted: PC: 0x08004298 halted: PC: 0x0800151c halted: PC: 0x0800151e halted: PC: 0x08001516 halted: PC: 0x08004298 halted: PC: 0x0800151c halted: PC: 0x0800151e halted: PC: 0x08001516 halted: PC: 0x08004298 halted: PC: 0x0800151c halted: PC: 0x0800151e halted: PC: 0x08001516 halted: PC: 0x08004298 halted: PC: 0x0800151c halted: PC: 0x0800151e halted: PC: 0x08001516 halted: PC: 0x08004298 halted: PC: 0x0800151c halted: PC: 0x0800151e halted: PC: 0x08001516 halted: PC: 0x08004298 halted: PC: 0x0800151c Program received signal SIGINT, Interrupt. 0x0800151c in main () at Core/Src/main.c:144 144 if ((pkt = p_serial_mgr_service()) != NULL) ### Assembly ################################################################## 0x0800150e main+154 movs r1, #0 0x08001510 main+156 mov r0, r4 0x08001512 main+158 bl 0x8004370 0x08001516 main+162 bl 0x8004298 0x0800151a main+166 mov r4, r0 0x0800151c main+168 cmp r0, #0 0x0800151e main+170 beq.n 0x8001516 !0x08001520 main+172 ldrb r2, [r0, #1] 0x08001522 main+174 ldrb r1, [r0, #0] 0x08001524 main+176 ldr r0, [pc, #48] ; (0x8001558 ) ### Breakpoints ############################################################### [1] break at 0x08001520 in Core/Src/main.c:146 for /storage/Shared/Projects/Penguinator/motor_controller/Core/Src/main.c:145 ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151b faultmask 0x00 r7 0x00000000 pc 0x0800151c control 0x04 ### Source #################################################################### 134 while (1) 135 { 136 // if (b_timer_struck) 137 // { 138 // // PDEBUG("%d\n", sys_time); 139 // b_timer_struck = false; 140 // motor_degrees = (motor_degrees + 1) % 360; 141 // mc_service(motor_degrees, 50); 142 // } 143 serial_pkt_t *pkt = NULL; 144 if ((pkt = p_serial_mgr_service()) != NULL) 145 { !146 PDEBUG("Source: %02x\n" 147 "Destination: %02x\n", 148 pkt->src_addr, pkt->dest_addr); 149 PDEBUG("Frame Data: \n"); 150 for (int ind = 0; ind < pkt->len; pkt++) 151 { 152 if (ind % 8 == 0) 153 { ### Stack ##################################################################### [0] from 0x0800151c in main+168 at Core/Src/main.c:144 ### Threads ################################################################### [1] id 0 from 0x0800151c in main+168 at Core/Src/main.c:144 ### Variables ################################################################# loc pkt = 0x0: {src_addr = 0 '\000',dest_addr = 0 '\000',len = 134234837,frame_data = "a\025\000\bc\0… ############################################################################### Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] 0x0800151c in main () at Core/Src/main.c:144 144 if ((pkt = p_serial_mgr_service()) != NULL) ### Assembly ################################################################## 0x0800150e main+154 movs r1, #0 0x08001510 main+156 mov r0, r4 0x08001512 main+158 bl 0x8004370 0x08001516 main+162 bl 0x8004298 0x0800151a main+166 mov r4, r0 0x0800151c main+168 cmp r0, #0 0x0800151e main+170 beq.n 0x8001516 0x08001520 main+172 ldrb r2, [r0, #1] 0x08001522 main+174 ldrb r1, [r0, #0] 0x08001524 main+176 ldr r0, [pc, #48] ; (0x8001558 ) ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151b faultmask 0x00 r7 0x00000000 pc 0x0800151c control 0x04 ### Source #################################################################### 134 while (1) 135 { 136 // if (b_timer_struck) 137 // { 138 // // PDEBUG("%d\n", sys_time); 139 // b_timer_struck = false; 140 // motor_degrees = (motor_degrees + 1) % 360; 141 // mc_service(motor_degrees, 50); 142 // } 143 serial_pkt_t *pkt = NULL; 144 if ((pkt = p_serial_mgr_service()) != NULL) 145 { 146 PDEBUG("Source: %02x\n" 147 "Destination: %02x\n", 148 pkt->src_addr, pkt->dest_addr); 149 PDEBUG("Frame Data: \n"); 150 for (int ind = 0; ind < pkt->len; pkt++) 151 { 152 if (ind % 8 == 0) 153 { ### Stack ##################################################################### [0] from 0x0800151c in main+168 at Core/Src/main.c:144 ### Threads ################################################################### [1] id 0 from 0x0800151c in main+168 at Core/Src/main.c:144 ### Variables ################################################################# loc pkt = 0x0: {src_addr = 0 '\000',dest_addr = 0 '\000',len = 134234837,frame_data = "a\025\000\bc\0… ############################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x080042d4 msp: 0x20010000 Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9678 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009838 Loading section .ARM, size 0x8 lma 0x8009d10 Loading section .init_array, size 0x8 lma 0x8009d18 Loading section .fini_array, size 0x8 lma 0x8009d20 Loading section .data, size 0x9a8 lma 0x8009d28 Start address 0x080042d4, load size 42656 Transfer rate: 29 KB/sec, 4739 bytes/write. Breakpoint 1 at 0x8001520: file Core/Src/main.c, line 146. Note: automatically using hardware breakpoints for read-only addresses. Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] Reset_Handler () at startup_stm32l432xx.s:65 65 bl SystemInit ### Assembly ################################################################## 0x080042d4 ? ldr.w sp, [pc, #52] ; 0x800430c 0x080042d8 ? bl 0x8004060 0x080042dc ? ldr r0, [pc, #48] ; (0x8004310 ) 0x080042de ? ldr r1, [pc, #52] ; (0x8004314 ) 0x080042e0 ? ldr r2, [pc, #52] ; (0x8004318 ) 0x080042e2 ? movs r3, #0 0x080042e4 ? b.n 0x80042ec 0x080042e6 ? ldr r4, [r2, r3] 0x080042e8 ? str r4, [r0, r3] 0x080042ea ? adds r3, #4 ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x01000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000000 r2 0x00000000 r10 0x00000000 msp 0x20010000 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00000000 primask 0x00 r5 0x00000000 sp 0x20010000 basepri 0x00 r6 0x00000000 lr 0xffffffff faultmask 0x00 r7 0x00000000 pc 0x080042d4 control 0x00 ### Source #################################################################### 55 * @retval : None 56 */ 57 58 .section .text.Reset_Handler 59 .weak Reset_Handler 60 .type Reset_Handler, %function 61 Reset_Handler: 62 ldr sp, =_estack /* Set stack pointer */ 63 64 /* Call the clock system initialization function.*/ 65 bl SystemInit 66 67 /* Copy the data segment initializers from flash to SRAM */ 68 ldr r0, =_sdata 69 ldr r1, =_edata 70 ldr r2, =_sidata 71 movs r3, #0 72 b LoopCopyDataInit 73 74 CopyDataInit: ### Stack ##################################################################### [0] from 0x080042d4 in Reset_Handler at startup_stm32l432xx.s:65 ### Threads ################################################################### [1] id 0 from 0x080042d4 in Reset_Handler at startup_stm32l432xx.s:65 ### Variables ################################################################# ############################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9678 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009838 Loading section .ARM, size 0x8 lma 0x8009d10 Loading section .init_array, size 0x8 lma 0x8009d18 Loading section .fini_array, size 0x8 lma 0x8009d20 Loading section .data, size 0x9a8 lma 0x8009d28 Start address 0x080042d0, load size 42656 Transfer rate: 29 KB/sec, 4739 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x080042bc in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:150 150 return NULL; ### Assembly ################################################################## 0x080042ae p_serial_mgr_service+22 mla r0, r2, r3, r0 0x080042b2 p_serial_mgr_service+26 ldrb.w r2, [r0, #265] ; 0x109 0x080042b6 p_serial_mgr_service+30 cmp r2, #0 0x080042b8 p_serial_mgr_service+32 beq.n 0x800429c 0x080042ba p_serial_mgr_service+34 b.n 0x80042be 0x080042bc p_serial_mgr_service+36 movs r0, #0 0x080042be p_serial_mgr_service+38 bx lr 0x080042c0 p_serial_mgr_service+40 asrs r4, r3, #25 0x080042c2 p_serial_mgr_service+42 movs r0, #0 ~ ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151b faultmask 0x00 r7 0x00000000 pc 0x080042bc control 0x04 ### Source #################################################################### 140 serial_pkt_t *p_serial_mgr_service(void) 141 { 142 // this will be less garbage when i switch to a queue 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 144 { 145 if (serial_pkt_cb.buffer[ind].b_ready) 146 { 147 return &serial_pkt_cb.buffer[ind]; 148 } 149 } 150 return NULL; 151 } 152 153 void p_serial_mgr_start() 154 { 155 HAL_UART_Receive_IT(_serial_huart_inst, &rxc, 1); 156 } ~ ~ ~ ### Stack ##################################################################### [0] from 0x080042bc in p_serial_mgr_service+36 at shared/drivers/p_serial_mgr.c:150 [1] from 0x0800151a in main+166 at Core/Src/main.c:144 ### Threads ################################################################### [1] id 0 from 0x080042bc in p_serial_mgr_service+36 at shared/drivers/p_serial_mgr.c:150 ### Variables ################################################################# ############################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x080042d0 msp: 0x20010000 Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9678 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009838 Loading section .ARM, size 0x8 lma 0x8009d10 Loading section .init_array, size 0x8 lma 0x8009d18 Loading section .fini_array, size 0x8 lma 0x8009d20 Loading section .data, size 0x9a8 lma 0x8009d28 Start address 0x080042d0, load size 42656 Transfer rate: 29 KB/sec, 4739 bytes/write. No line 146 in the current file. Quit Breakpoint 1 at 0x8001520: file Core/Src/main.c, line 146. Note: automatically using hardware breakpoints for read-only addresses. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### Program received signal SIGINT, Interrupt. 0x080042a0 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:143 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ################################################################## ~ 0x08004298 p_serial_mgr_service+0 movs r3, #0 0x0800429a p_serial_mgr_service+2 b.n 0x800429e 0x0800429c p_serial_mgr_service+4 adds r3, #1 0x0800429e p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042c0 ) 0x080042a0 p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x080042a2 p_serial_mgr_service+10 cmp r2, r3 0x080042a4 p_serial_mgr_service+12 ble.n 0x80042bc 0x080042a6 p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x80042c0 ) 0x080042a8 p_serial_mgr_service+16 ldr r0, [r2, #0] ### Breakpoints ############################################################### [1] break at 0x08001520 in Core/Src/main.c:146 for main.c:146 ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x2000165c r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151b faultmask 0x00 r7 0x00000000 pc 0x080042a0 control 0x04 ### Source #################################################################### 133 { 134 _serial_huart_inst = huart; 135 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 136 137 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 138 } 139 140 serial_pkt_t *p_serial_mgr_service(void) 141 { 142 // this will be less garbage when i switch to a queue 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 144 { 145 if (serial_pkt_cb.buffer[ind].b_ready) 146 { 147 return &serial_pkt_cb.buffer[ind]; 148 } 149 } 150 return NULL; 151 } 152 ### Stack ##################################################################### [0] from 0x080042a0 in p_serial_mgr_service+8 at shared/drivers/p_serial_mgr.c:143 [1] from 0x0800151a in main+166 at Core/Src/main.c:144 ### Threads ################################################################### [1] id 0 from 0x080042a0 in p_serial_mgr_service+8 at shared/drivers/p_serial_mgr.c:143 ### Variables ################################################################# loc ind = 0 ############################################################################### Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] 0x080042a0 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:143 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ################################################################## ~ ~ ~ 0x0800429c p_serial_mgr_service+0 adds r3, #1 0x0800429e p_serial_mgr_service+2 ldr r2, [pc, #32] ; (0x80042c0 ) 0x080042a0 p_serial_mgr_service+4 ldrh r2, [r2, #6] 0x080042a2 p_serial_mgr_service+6 cmp r2, r3 0x080042a4 p_serial_mgr_service+8 ble.n 0x80042bc 0x080042a6 p_serial_mgr_service+10 ldr r2, [pc, #24] ; (0x80042c0 ) 0x080042a8 p_serial_mgr_service+12 ldr r0, [r2, #0] ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x2000165c r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151b faultmask 0x00 r7 0x00000000 pc 0x080042a0 control 0x04 ### Source #################################################################### 133 { 134 _serial_huart_inst = huart; 135 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 136 137 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 138 } 139 140 serial_pkt_t *p_serial_mgr_service(void) 141 { 142 // this will be less garbage when i switch to a queue 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 144 { 145 if (serial_pkt_cb.buffer[ind].b_ready) 146 { 147 return &serial_pkt_cb.buffer[ind]; 148 } 149 } 150 return NULL; 151 } 152 ### Stack ##################################################################### [0] from 0x080042a0 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:143 [1] from 0x0800151a in main+166 at Core/Src/main.c:161 ### Threads ################################################################### [1] id 0 from 0x080042a0 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:143 ### Variables ################################################################# loc ind = 0 ############################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9690 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009850 Loading section .ARM, size 0x8 lma 0x8009d28 Loading section .init_array, size 0x8 lma 0x8009d30 Loading section .fini_array, size 0x8 lma 0x8009d38 Loading section .data, size 0x9a8 lma 0x8009d40 Start address 0x080042ec, load size 42680 Transfer rate: 29 KB/sec, 4742 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x080042a2 in p_serial_mgr_init (huart=) at shared/drivers/p_serial_mgr.c:139 139 } ### Assembly ################################################################## 0x08004298 p_serial_mgr_init+20 asrs r4, r3, #25 0x0800429a p_serial_mgr_init+22 movs r0, #0 0x0800429c p_serial_mgr_init+24 movs r3, #0 0x0800429e p_serial_mgr_init+26 b.n 0x80042a2 0x080042a0 p_serial_mgr_init+28 adds r3, #1 0x080042a2 p_serial_mgr_init+30 ldr r2, [pc, #32] ; (0x80042c4 ) 0x080042a4 p_serial_mgr_init+32 ldrh r2, [r2, #6] 0x080042a6 p_serial_mgr_init+34 cmp r2, r3 0x080042a8 p_serial_mgr_init+36 ble.n 0x80042c0 0x080042aa p_serial_mgr_init+38 ldr r2, [pc, #24] ; (0x80042c4 ) ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042a2 control 0x04 ### Source #################################################################### 129 // HAL_UART_Transmit(&huart2, &huart2_rxc, 1, 500); 130 // HAL_UART_Receive_IT(&huart1, &huart1_rxc, 1); 131 // HAL_GPIO_WritePin(USART1_DE_GPIO_Port, USART1_DE_Pin, 0); 132 } 133 void p_serial_mgr_init(UART_HandleTypeDef *huart) 134 { 135 _serial_huart_inst = huart; 136 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 137 138 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 139 } 140 141 serial_pkt_t *p_serial_mgr_service(void) 142 { 143 // this will be less garbage when i switch to a queue 144 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 145 { 146 if (serial_pkt_cb.buffer[ind].b_ready) 147 { 148 return &serial_pkt_cb.buffer[ind]; ### Stack ##################################################################### [0] from 0x080042a2 in p_serial_mgr_init+30 at shared/drivers/p_serial_mgr.c:139 [1] from 0x200016b4 in heap_end ### Threads ################################################################### [1] id 0 from 0x080042a2 in p_serial_mgr_init+30 at shared/drivers/p_serial_mgr.c:139 ### Variables ################################################################# arg huart = ############################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x96a0 lma 0x80001c0 Loading section .rodata, size 0x4e0 lma 0x8009860 Loading section .ARM, size 0x8 lma 0x8009d40 Loading section .init_array, size 0x8 lma 0x8009d48 Loading section .fini_array, size 0x8 lma 0x8009d50 Loading section .data, size 0x9a8 lma 0x8009d58 Start address 0x080042fc, load size 42704 Transfer rate: 29 KB/sec, 4744 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x080042b2 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:145 145 if (serial_pkt_cb.buffer[ind].b_ready) ### Assembly ################################################################## 0x080042a8 p_serial_mgr_service+12 asrs r4, r3, #25 0x080042aa p_serial_mgr_service+14 movs r0, #0 0x080042ac p_serial_mgr_service+16 movs r3, #0 0x080042ae p_serial_mgr_service+18 b.n 0x80042b2 0x080042b0 p_serial_mgr_service+20 adds r3, #1 0x080042b2 p_serial_mgr_service+22 ldr r2, [pc, #32] ; (0x80042d4 ) 0x080042b4 p_serial_mgr_service+24 ldrh r2, [r2, #6] 0x080042b6 p_serial_mgr_service+26 cmp r2, r3 0x080042b8 p_serial_mgr_service+28 ble.n 0x80042d0 0x080042ba p_serial_mgr_service+30 ldr r2, [pc, #24] ; (0x80042d4 ) ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042b2 control 0x04 ### Source #################################################################### 135 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 136 137 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 138 } 139 140 serial_pkt_t *p_serial_mgr_service(void) 141 { 142 // this will be less garbage when i switch to a queue 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 144 { 145 if (serial_pkt_cb.buffer[ind].b_ready) 146 { 147 return &serial_pkt_cb.buffer[ind]; 148 } 149 } 150 return NULL; 151 } 152 153 void p_serial_mgr_start() 154 { ### Stack ##################################################################### [0] from 0x080042b2 in p_serial_mgr_service+22 at shared/drivers/p_serial_mgr.c:145 [1] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080042b2 in p_serial_mgr_service+22 at shared/drivers/p_serial_mgr.c:145 ### Variables ################################################################# loc ind = 0 ############################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9690 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009850 Loading section .ARM, size 0x8 lma 0x8009d28 Loading section .init_array, size 0x8 lma 0x8009d30 Loading section .fini_array, size 0x8 lma 0x8009d38 Loading section .data, size 0x9a8 lma 0x8009d40 Start address 0x080042ec, load size 42680 Transfer rate: 29 KB/sec, 4742 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x080042a4 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:143 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ################################################################## ~ 0x0800429c p_serial_mgr_service+0 movs r3, #0 0x0800429e p_serial_mgr_service+2 b.n 0x80042a2 0x080042a0 p_serial_mgr_service+4 adds r3, #1 0x080042a2 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042c4 ) 0x080042a4 p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x080042a6 p_serial_mgr_service+10 cmp r2, r3 0x080042a8 p_serial_mgr_service+12 ble.n 0x80042c0 0x080042aa p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x80042c4 ) 0x080042ac p_serial_mgr_service+16 ldr r0, [r2, #0] ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x2000165c r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042a4 control 0x04 ### Source #################################################################### 133 { 134 _serial_huart_inst = huart; 135 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 136 137 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 138 } 139 140 serial_pkt_t *p_serial_mgr_service(void) 141 { 142 // this will be less garbage when i switch to a queue 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 144 { 145 if (serial_pkt_cb.buffer[ind].b_ready) 146 { 147 return &serial_pkt_cb.buffer[ind]; 148 } 149 } 150 return NULL; 151 } 152 ### Stack ##################################################################### [0] from 0x080042a4 in p_serial_mgr_service+8 at shared/drivers/p_serial_mgr.c:143 [1] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080042a4 in p_serial_mgr_service+8 at shared/drivers/p_serial_mgr.c:143 ### Variables ################################################################# loc ind = 0 ############################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x080042ec msp: 0x20010000 Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9690 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009850 Loading section .ARM, size 0x8 lma 0x8009d28 Loading section .init_array, size 0x8 lma 0x8009d30 Loading section .fini_array, size 0x8 lma 0x8009d38 Loading section .data, size 0x9a8 lma 0x8009d40 Start address 0x080042ec, load size 42680 Transfer rate: 29 KB/sec, 4742 bytes/write. Breakpoint 1 at 0x800151a: file Core/Src/main.c, line 146. Note: automatically using hardware breakpoints for read-only addresses. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### Breakpoint 1, main () at Core/Src/main.c:146 146 if ((pkt = p_serial_mgr_service()) != NULL) ### Assembly ################################################################## 0x0800150a main+150 bl 0x8004078 0x0800150e main+154 mov.w r2, #268 ; 0x10c 0x08001512 main+158 movs r1, #0 0x08001514 main+160 mov r0, r4 0x08001516 main+162 bl 0x8004388 !0x0800151a main+166 bl 0x800429c 0x0800151e main+170 mov r4, r0 0x08001520 main+172 cmp r0, #0 0x08001522 main+174 beq.n 0x800151a 0x08001524 main+176 ldrb r2, [r0, #1] ### Breakpoints ############################################################### [1] break at 0x0800151a in Core/Src/main.c:146 for main.c:146 hit 1 time ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x40013800 r10 0x00000000 msp 0x2000fff0 r3 0x40001000 r11 0x00000000 psp 0x00000000 r4 0x20000b14 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x08003fad faultmask 0x00 r7 0x00000000 pc 0x0800151a control 0x04 ### Source #################################################################### 136 while (1) 137 { 138 // if (b_timer_struck) 139 // { 140 // // PDEBUG("%d\n", sys_time); 141 // b_timer_struck = false; 142 // motor_degrees = (motor_degrees + 1) % 360; 143 // mc_service(motor_degrees, 50); 144 // } 145 serial_pkt_t *pkt = NULL; !146 if ((pkt = p_serial_mgr_service()) != NULL) 147 { 148 PDEBUG("Source: %02x\n" 149 "Destination: %02x\n", 150 pkt->src_addr, pkt->dest_addr); 151 PDEBUG("Frame Data: \n"); 152 for (int ind = 0; ind < pkt->len; pkt++) 153 { 154 if (ind % 8 == 0) 155 { ### Stack ##################################################################### [0] from 0x0800151a in main+166 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x0800151a in main+166 at Core/Src/main.c:146 ### Variables ################################################################# loc pkt = 0x0: {src_addr = 0 '\000',dest_addr = 0 '\000',len = 134234861,frame_data = "e\025\000\bg\0… ############################################################################### ### Output/messages ########################################################### halted: PC: 0x0800429c p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:143 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ################################################################## ~ ~ ~ ~ ~ 0x0800429c p_serial_mgr_service+0 movs r3, #0 0x0800429e p_serial_mgr_service+2 b.n 0x80042a2 0x080042a0 p_serial_mgr_service+4 adds r3, #1 0x080042a2 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042c4 ) 0x080042a4 p_serial_mgr_service+8 ldrh r2, [r2, #6] ### Breakpoints ############################################################### [1] break at 0x0800151a in Core/Src/main.c:146 for main.c:146 hit 1 time ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x40013800 r10 0x00000000 msp 0x2000fff0 r3 0x40001000 r11 0x00000000 psp 0x00000000 r4 0x20000b14 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x0800429c control 0x04 ### Source #################################################################### 133 { 134 _serial_huart_inst = huart; 135 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 136 137 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 138 } 139 140 serial_pkt_t *p_serial_mgr_service(void) 141 { 142 // this will be less garbage when i switch to a queue 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 144 { 145 if (serial_pkt_cb.buffer[ind].b_ready) 146 { 147 return &serial_pkt_cb.buffer[ind]; 148 } 149 } 150 return NULL; 151 } 152 ### Stack ##################################################################### [0] from 0x0800429c in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:143 [1] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x0800429c in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:143 ### Variables ################################################################# loc ind = 0 ############################################################################### Breakpoint 2 at 0x8001524: file Core/Src/main.c, line 148. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### Program received signal SIGINT, Interrupt. 0x080042a8 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:143 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ################################################################## 0x0800429e p_serial_mgr_service+2 b.n 0x80042a2 0x080042a0 p_serial_mgr_service+4 adds r3, #1 0x080042a2 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042c4 ) 0x080042a4 p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x080042a6 p_serial_mgr_service+10 cmp r2, r3 0x080042a8 p_serial_mgr_service+12 ble.n 0x80042c0 0x080042aa p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x80042c4 ) 0x080042ac p_serial_mgr_service+16 ldr r0, [r2, #0] 0x080042ae p_serial_mgr_service+18 mov.w r2, #268 ; 0x10c 0x080042b2 p_serial_mgr_service+22 mla r0, r2, r3, r0 ### Breakpoints ############################################################### [2] break at 0x08001524 in Core/Src/main.c:148 for main.c:147 ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042a8 control 0x04 ### Source #################################################################### 133 { 134 _serial_huart_inst = huart; 135 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 136 137 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 138 } 139 140 serial_pkt_t *p_serial_mgr_service(void) 141 { 142 // this will be less garbage when i switch to a queue 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 144 { 145 if (serial_pkt_cb.buffer[ind].b_ready) 146 { 147 return &serial_pkt_cb.buffer[ind]; 148 } 149 } 150 return NULL; 151 } 152 ### Stack ##################################################################### [0] from 0x080042a8 in p_serial_mgr_service+12 at shared/drivers/p_serial_mgr.c:143 [1] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080042a8 in p_serial_mgr_service+12 at shared/drivers/p_serial_mgr.c:143 ### Variables ################################################################# loc ind = 0 ############################################################################### Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] 0x080042a8 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:143 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ################################################################## 0x0800429e p_serial_mgr_service+2 b.n 0x80042a2 0x080042a0 p_serial_mgr_service+4 adds r3, #1 0x080042a2 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042c4 ) 0x080042a4 p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x080042a6 p_serial_mgr_service+10 cmp r2, r3 0x080042a8 p_serial_mgr_service+12 ble.n 0x80042c0 0x080042aa p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x80042c4 ) 0x080042ac p_serial_mgr_service+16 ldr r0, [r2, #0] 0x080042ae p_serial_mgr_service+18 mov.w r2, #268 ; 0x10c 0x080042b2 p_serial_mgr_service+22 mla r0, r2, r3, r0 ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042a8 control 0x04 ### Source #################################################################### 133 { 134 _serial_huart_inst = huart; 135 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 136 137 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 138 } 139 140 serial_pkt_t *p_serial_mgr_service(void) 141 { 142 // this will be less garbage when i switch to a queue 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 144 { 145 if (serial_pkt_cb.buffer[ind].b_ready) 146 { 147 return &serial_pkt_cb.buffer[ind]; 148 } 149 } 150 return NULL; 151 } 152 ### Stack ##################################################################### [0] from 0x080042a8 in p_serial_mgr_service+12 at shared/drivers/p_serial_mgr.c:143 [1] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080042a8 in p_serial_mgr_service+12 at shared/drivers/p_serial_mgr.c:143 ### Variables ################################################################# loc ind = 0 ############################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9690 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009850 Loading section .ARM, size 0x8 lma 0x8009d28 Loading section .init_array, size 0x8 lma 0x8009d30 Loading section .fini_array, size 0x8 lma 0x8009d38 Loading section .data, size 0x9a8 lma 0x8009d40 Start address 0x080042ec, load size 42680 Transfer rate: 29 KB/sec, 4742 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x080042c2 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:151 151 } ### Assembly ################################################################## 0x080042b6 p_serial_mgr_service+26 ldrb.w r2, [r0, #265] ; 0x109 0x080042ba p_serial_mgr_service+30 cmp r2, #0 0x080042bc p_serial_mgr_service+32 beq.n 0x80042a0 0x080042be p_serial_mgr_service+34 b.n 0x80042c2 0x080042c0 p_serial_mgr_service+36 movs r0, #0 0x080042c2 p_serial_mgr_service+38 bx lr 0x080042c4 p_serial_mgr_service+40 asrs r4, r3, #25 0x080042c6 p_serial_mgr_service+42 movs r0, #0 ~ ~ ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042c2 control 0x04 ### Source #################################################################### 141 { 142 // this will be less garbage when i switch to a queue 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 144 { 145 if (serial_pkt_cb.buffer[ind].b_ready) 146 { 147 return &serial_pkt_cb.buffer[ind]; 148 } 149 } 150 return NULL; 151 } 152 153 void p_serial_mgr_start() 154 { 155 HAL_UART_Receive_IT(_serial_huart_inst, &rxc, 1); 156 } ~ ~ ~ ~ ### Stack ##################################################################### [0] from 0x080042c2 in p_serial_mgr_service+38 at shared/drivers/p_serial_mgr.c:151 [1] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080042c2 in p_serial_mgr_service+38 at shared/drivers/p_serial_mgr.c:151 ### Variables ################################################################# ############################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x080042ec msp: 0x20010000 Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9690 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009850 Loading section .ARM, size 0x8 lma 0x8009d28 Loading section .init_array, size 0x8 lma 0x8009d30 Loading section .fini_array, size 0x8 lma 0x8009d38 Loading section .data, size 0x9a8 lma 0x8009d40 Start address 0x080042ec, load size 42680 Transfer rate: 29 KB/sec, 4742 bytes/write. Breakpoint 1 at 0x8001524: file Core/Src/main.c, line 148. Note: automatically using hardware breakpoints for read-only addresses. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### Program received signal SIGINT, Interrupt. 0x080042a6 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:143 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ################################################################## 0x0800429c p_serial_mgr_service+0 movs r3, #0 0x0800429e p_serial_mgr_service+2 b.n 0x80042a2 0x080042a0 p_serial_mgr_service+4 adds r3, #1 0x080042a2 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042c4 ) 0x080042a4 p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x080042a6 p_serial_mgr_service+10 cmp r2, r3 0x080042a8 p_serial_mgr_service+12 ble.n 0x80042c0 0x080042aa p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x80042c4 ) 0x080042ac p_serial_mgr_service+16 ldr r0, [r2, #0] 0x080042ae p_serial_mgr_service+18 mov.w r2, #268 ; 0x10c ### Breakpoints ############################################################### [1] break at 0x08001524 in Core/Src/main.c:148 for main.c:147 ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042a6 control 0x04 ### Source #################################################################### 133 { 134 _serial_huart_inst = huart; 135 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 136 137 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 138 } 139 140 serial_pkt_t *p_serial_mgr_service(void) 141 { 142 // this will be less garbage when i switch to a queue 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 144 { 145 if (serial_pkt_cb.buffer[ind].b_ready) 146 { 147 return &serial_pkt_cb.buffer[ind]; 148 } 149 } 150 return NULL; 151 } 152 ### Stack ##################################################################### [0] from 0x080042a6 in p_serial_mgr_service+10 at shared/drivers/p_serial_mgr.c:143 [1] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080042a6 in p_serial_mgr_service+10 at shared/drivers/p_serial_mgr.c:143 ### Variables ################################################################# loc ind = 0 ############################################################################### Breakpoint 2 at 0x8004122: file shared/drivers/p_serial_mgr.c, line 46. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### Breakpoint 2, UART1_RxCpltCallback (huart=0x20000a60 ) at shared/drivers/p_serial_mgr.c:46 46 if (rxc == 0x7E) ### Assembly ################################################################## 0x08004114 UART1_RxCpltCallback+8 bhi.w 0x8004250 0x08004118 UART1_RxCpltCallback+12 tbb [pc, r3] 0x0800411c UART1_RxCpltCallback+16 lsrs r3, r0, #16 0x0800411e UART1_RxCpltCallback+18 str r4, [r7, #0] 0x08004120 UART1_RxCpltCallback+20 lsls r6, r7, #1 !0x08004122 UART1_RxCpltCallback+22 ldr r3, [pc, #312] ; (0x800425c ) 0x08004124 UART1_RxCpltCallback+24 ldrb r3, [r3, #0] 0x08004126 UART1_RxCpltCallback+26 cmp r3, #126 ; 0x7e 0x08004128 UART1_RxCpltCallback+28 bne.w 0x8004242 0x0800412c UART1_RxCpltCallback+32 ldr r3, [pc, #296] ; (0x8004258 ) ### Breakpoints ############################################################### [1] break at 0x08001524 in Core/Src/main.c:148 for main.c:147 [2] break at 0x08004122 in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:43 hit 1 time ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x20000a60 r8 0x00000000 xPSR 0x81000035 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x40013808 r10 0x00000000 msp 0x2000ff60 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x20000a60 r12 0x00001000 primask 0x00 r5 0x00004001 sp 0x2000ff60 basepri 0x00 r6 0x00000000 lr 0x0800348f faultmask 0x00 r7 0x00000000 pc 0x08004122 control 0x00 ### Source #################################################################### 36 static volatile uint8_t frame_index_tracker = 0; 37 38 #pragma message(Reminder "Move away from cirular buffer to a managed queue") 39 40 void UART1_RxCpltCallback(UART_HandleTypeDef *huart) 41 { 42 switch (sstate) 43 { 44 case SS_IDLE: // packet start 45 { !46 if (rxc == 0x7E) 47 { 48 sstate = SS_START; 49 } 50 } 51 break; 52 case SS_START: 53 { 54 switch (start_index_tracker) 55 { ### Stack ##################################################################### [0] from 0x08004122 in UART1_RxCpltCallback+22 at shared/drivers/p_serial_mgr.c:46 [1] from 0x0800348e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035e0 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001584 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x08004122 in UART1_RxCpltCallback+22 at shared/drivers/p_serial_mgr.c:46 ### Variables ################################################################# arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi… ############################################################################### $1 = 126 '~' $2 = 126 '~' $3 = 0x7e Continuing. ### Output/messages ########################################################### halted: PC: 0x08004124 Program received signal SIGINT, Interrupt. 0x080042a2 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:143 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ################################################################## ~ ~ 0x0800429c p_serial_mgr_service+0 movs r3, #0 0x0800429e p_serial_mgr_service+2 b.n 0x80042a2 0x080042a0 p_serial_mgr_service+4 adds r3, #1 0x080042a2 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042c4 ) 0x080042a4 p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x080042a6 p_serial_mgr_service+10 cmp r2, r3 0x080042a8 p_serial_mgr_service+12 ble.n 0x80042c0 0x080042aa p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x80042c4 ) ### Breakpoints ############################################################### [1] break at 0x08001524 in Core/Src/main.c:148 for main.c:147 [2] break at 0x08004122 in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:43 hit 1 time ### Expressions ############################################################### ### History ################################################################### $$2 = 126 '~' $$1 = 126 '~' $$0 = 126 '~' ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042a2 control 0x04 ### Source #################################################################### 133 { 134 _serial_huart_inst = huart; 135 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 136 137 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 138 } 139 140 serial_pkt_t *p_serial_mgr_service(void) 141 { 142 // this will be less garbage when i switch to a queue 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 144 { 145 if (serial_pkt_cb.buffer[ind].b_ready) 146 { 147 return &serial_pkt_cb.buffer[ind]; 148 } 149 } 150 return NULL; 151 } 152 ### Stack ##################################################################### [0] from 0x080042a2 in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:143 [1] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080042a2 in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:143 ### Variables ################################################################# loc ind = 0 ############################################################################### Continuing. ### Output/messages ########################################################### Program received signal SIGINT, Interrupt. 0x080042c0 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:150 150 return NULL; ### Assembly ################################################################## 0x080042b2 p_serial_mgr_service+22 mla r0, r2, r3, r0 0x080042b6 p_serial_mgr_service+26 ldrb.w r2, [r0, #265] ; 0x109 0x080042ba p_serial_mgr_service+30 cmp r2, #0 0x080042bc p_serial_mgr_service+32 beq.n 0x80042a0 0x080042be p_serial_mgr_service+34 b.n 0x80042c2 0x080042c0 p_serial_mgr_service+36 movs r0, #0 0x080042c2 p_serial_mgr_service+38 bx lr 0x080042c4 p_serial_mgr_service+40 asrs r4, r3, #25 0x080042c6 p_serial_mgr_service+42 movs r0, #0 ~ ### Breakpoints ############################################################### [1] break at 0x08001524 in Core/Src/main.c:148 for main.c:147 [2] break at 0x08004122 in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:43 hit 1 time ### Expressions ############################################################### ### History ################################################################### $$2 = 126 '~' $$1 = 126 '~' $$0 = 126 '~' ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042c0 control 0x04 ### Source #################################################################### 140 serial_pkt_t *p_serial_mgr_service(void) 141 { 142 // this will be less garbage when i switch to a queue 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 144 { 145 if (serial_pkt_cb.buffer[ind].b_ready) 146 { 147 return &serial_pkt_cb.buffer[ind]; 148 } 149 } 150 return NULL; 151 } 152 153 void p_serial_mgr_start() 154 { 155 HAL_UART_Receive_IT(_serial_huart_inst, &rxc, 1); 156 } ~ ~ ~ ### Stack ##################################################################### [0] from 0x080042c0 in p_serial_mgr_service+36 at shared/drivers/p_serial_mgr.c:150 [1] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080042c0 in p_serial_mgr_service+36 at shared/drivers/p_serial_mgr.c:150 ### Variables ################################################################# ############################################################################### ### Output/messages ########################################################### halted: PC: 0x080042c2 halted: PC: 0x0800151e halted: PC: 0x08001520 halted: PC: 0x08001522 halted: PC: 0x0800151a halted: PC: 0x0800429c halted: PC: 0x08001520 halted: PC: 0x08001522 halted: PC: 0x0800151a halted: PC: 0x0800429c halted: PC: 0x08001520 halted: PC: 0x08001522 halted: PC: 0x0800151a halted: PC: 0x0800429c halted: PC: 0x08001520 halted: PC: 0x08001522 halted: PC: 0x0800151a halted: PC: 0x0800429c halted: PC: 0x08001520 halted: PC: 0x08001522 halted: PC: 0x0800151a halted: PC: 0x0800429c halted: PC: 0x08001520 halted: PC: 0x08001522 halted: PC: 0x0800151a halted: PC: 0x0800429c halted: PC: 0x08001520 halted: PC: 0x08001522 halted: PC: 0x0800151a halted: PC: 0x0800429c halted: PC: 0x08001520 halted: PC: 0x08001522 halted: PC: 0x0800151a halted: PC: 0x0800429c halted: PC: 0x08001520 halted: PC: 0x08001522 halted: PC: 0x0800151a halted: PC: 0x0800429c halted: PC: 0x08001520 halted: PC: 0x08001522 halted: PC: 0x0800151a halted: PC: 0x0800429c halted: PC: 0x08001520 halted: PC: 0x08001522 halted: PC: 0x0800151a halted: PC: 0x0800429c halted: PC: 0x08001520 halted: PC: 0x08001522 halted: PC: 0x0800151a halted: PC: 0x0800429c halted: PC: 0x08001520 halted: PC: 0x08001522 halted: PC: 0x0800151a halted: PC: 0x0800429c halted: PC: 0x08001520 halted: PC: 0x08001522 halted: PC: 0x0800151a halted: PC: 0x0800429c halted: PC: 0x08001520 halted: PC: 0x08001522 halted: PC: 0x0800151a halted: PC: 0x0800429c halted: PC: 0x08001520 halted: PC: 0x08001522 halted: PC: 0x0800151a halted: PC: 0x0800429c halted: PC: 0x08001520 halted: PC: 0x08001522 halted: PC: 0x0800151a halted: PC: 0x0800429c halted: PC: 0x08001520 halted: PC: 0x08001522 halted: PC: 0x0800151a halted: PC: 0x0800429c Program received signal SIGINT, Interrupt. 0x0800151e in main () at Core/Src/main.c:146 146 if ((pkt = p_serial_mgr_service()) != NULL) ### Assembly ################################################################## 0x0800150e main+154 mov.w r2, #268 ; 0x10c 0x08001512 main+158 movs r1, #0 0x08001514 main+160 mov r0, r4 0x08001516 main+162 bl 0x8004388 0x0800151a main+166 bl 0x800429c 0x0800151e main+170 mov r4, r0 0x08001520 main+172 cmp r0, #0 0x08001522 main+174 beq.n 0x800151a !0x08001524 main+176 ldrb r2, [r0, #1] 0x08001526 main+178 ldrb r1, [r0, #0] ### Breakpoints ############################################################### [1] break at 0x08001524 in Core/Src/main.c:148 for main.c:147 [2] break at 0x08004122 in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:43 hit 1 time ### Expressions ############################################################### ### History ################################################################### $$2 = 126 '~' $$1 = 126 '~' $$0 = 126 '~' ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x0800151e control 0x04 ### Source #################################################################### 136 while (1) 137 { 138 // if (b_timer_struck) 139 // { 140 // // PDEBUG("%d\n", sys_time); 141 // b_timer_struck = false; 142 // motor_degrees = (motor_degrees + 1) % 360; 143 // mc_service(motor_degrees, 50); 144 // } 145 serial_pkt_t *pkt = NULL; 146 if ((pkt = p_serial_mgr_service()) != NULL) 147 { !148 PDEBUG("Source: %02x\n" 149 "Destination: %02x\n", 150 pkt->src_addr, pkt->dest_addr); 151 PDEBUG("Frame Data: \n"); 152 for (int ind = 0; ind < pkt->len; pkt++) 153 { 154 if (ind % 8 == 0) 155 { ### Stack ##################################################################### [0] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x0800151e in main+170 at Core/Src/main.c:146 ### Variables ################################################################# loc pkt = 0x0: {src_addr = 0 '\000',dest_addr = 0 '\000',len = 134234861,frame_data = "e\025\000\bg\0… ############################################################################### Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### Breakpoint 2, UART1_RxCpltCallback (huart=0x20000a60 ) at shared/drivers/p_serial_mgr.c:46 46 if (rxc == 0x7E) ### Assembly ################################################################## 0x08004114 UART1_RxCpltCallback+8 bhi.w 0x8004250 0x08004118 UART1_RxCpltCallback+12 tbb [pc, r3] 0x0800411c UART1_RxCpltCallback+16 lsrs r3, r0, #16 0x0800411e UART1_RxCpltCallback+18 str r4, [r7, #0] 0x08004120 UART1_RxCpltCallback+20 lsls r6, r7, #1 !0x08004122 UART1_RxCpltCallback+22 ldr r3, [pc, #312] ; (0x800425c ) 0x08004124 UART1_RxCpltCallback+24 ldrb r3, [r3, #0] 0x08004126 UART1_RxCpltCallback+26 cmp r3, #126 ; 0x7e 0x08004128 UART1_RxCpltCallback+28 bne.w 0x8004242 0x0800412c UART1_RxCpltCallback+32 ldr r3, [pc, #296] ; (0x8004258 ) ### Breakpoints ############################################################### [1] break at 0x08001524 in Core/Src/main.c:148 for main.c:147 [2] break at 0x08004122 in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:43 hit 1 time ### Expressions ############################################################### ### History ################################################################### $$2 = 126 '~' $$1 = 126 '~' $$0 = 126 '~' ### Memory #################################################################### ### Registers ################################################################# r0 0x20000a60 r8 0x00000000 xPSR 0x81000035 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x40013808 r10 0x00000000 msp 0x2000ff60 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x20000a60 r12 0x00001000 primask 0x00 r5 0x00004001 sp 0x2000ff60 basepri 0x00 r6 0x00000000 lr 0x0800348f faultmask 0x00 r7 0x00000000 pc 0x08004122 control 0x00 ### Source #################################################################### 36 static volatile uint8_t frame_index_tracker = 0; 37 38 #pragma message(Reminder "Move away from cirular buffer to a managed queue") 39 40 void UART1_RxCpltCallback(UART_HandleTypeDef *huart) 41 { 42 switch (sstate) 43 { 44 case SS_IDLE: // packet start 45 { !46 if (rxc == 0x7E) 47 { 48 sstate = SS_START; 49 } 50 } 51 break; 52 case SS_START: 53 { 54 switch (start_index_tracker) 55 { ### Stack ##################################################################### [0] from 0x08004122 in UART1_RxCpltCallback+22 at shared/drivers/p_serial_mgr.c:46 [1] from 0x0800348e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035e0 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001584 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x0800151a in main+166 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x08004122 in UART1_RxCpltCallback+22 at shared/drivers/p_serial_mgr.c:46 ### Variables ################################################################# arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi… ############################################################################### $4 = 126 '~' Breakpoint 3 at 0x8004218: file shared/drivers/p_serial_mgr.c, line 113. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### Program received signal SIGINT, Interrupt. 0x080042a2 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:143 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ################################################################## ~ ~ 0x0800429c p_serial_mgr_service+0 movs r3, #0 0x0800429e p_serial_mgr_service+2 b.n 0x80042a2 0x080042a0 p_serial_mgr_service+4 adds r3, #1 0x080042a2 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042c4 ) 0x080042a4 p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x080042a6 p_serial_mgr_service+10 cmp r2, r3 0x080042a8 p_serial_mgr_service+12 ble.n 0x80042c0 0x080042aa p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x80042c4 ) ### Breakpoints ############################################################### [3] break at 0x08004218 in shared/drivers/p_serial_mgr.c:113 for p_serial_mgr.c:113 ### Expressions ############################################################### ### History ################################################################### $$2 = 126 '~' $$1 = 126 '~' $$0 = 126 '~' ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042a2 control 0x04 ### Source #################################################################### 133 { 134 _serial_huart_inst = huart; 135 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 136 137 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 138 } 139 140 serial_pkt_t *p_serial_mgr_service(void) 141 { 142 // this will be less garbage when i switch to a queue 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 144 { 145 if (serial_pkt_cb.buffer[ind].b_ready) 146 { 147 return &serial_pkt_cb.buffer[ind]; 148 } 149 } 150 return NULL; 151 } 152 ### Stack ##################################################################### [0] from 0x080042a2 in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:143 [1] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080042a2 in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:143 ### Variables ################################################################# loc ind = 0 ############################################################################### Breakpoint 4 at 0x8004172: file shared/drivers/p_serial_mgr.c, line 68. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### Program received signal SIGINT, Interrupt. 0x080042a8 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:143 143 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ################################################################## 0x0800429e p_serial_mgr_service+2 b.n 0x80042a2 0x080042a0 p_serial_mgr_service+4 adds r3, #1 0x080042a2 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042c4 ) 0x080042a4 p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x080042a6 p_serial_mgr_service+10 cmp r2, r3 0x080042a8 p_serial_mgr_service+12 ble.n 0x80042c0 0x080042aa p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x80042c4 ) 0x080042ac p_serial_mgr_service+16 ldr r0, [r2, #0] 0x080042ae p_serial_mgr_service+18 mov.w r2, #268 ; 0x10c 0x080042b2 p_serial_mgr_service+22 mla r0, r2, r3, r0 ### Breakpoints ############################################################### [3] break at 0x08004218 in shared/drivers/p_serial_mgr.c:113 for p_serial_mgr.c:113 [4] break at 0x08004172 in shared/drivers/p_serial_mgr.c:68 for p_serial_mgr.c:68 ### Expressions ############################################################### ### History ################################################################### $$2 = 126 '~' $$1 = 126 '~' $$0 = 126 '~' ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042a8 control 0x04 ### Source #################################################################### 133 } 134 void p_serial_mgr_init(UART_HandleTypeDef *huart) 135 { 136 _serial_huart_inst = huart; 137 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 138 139 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 140 } 141 142 serial_pkt_t *p_serial_mgr_service(void) 143 { 144 // this will be less garbage when i switch to a queue 145 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 146 { 147 if (serial_pkt_cb.buffer[ind].b_ready) 148 { 149 return &serial_pkt_cb.buffer[ind]; 150 } 151 } 152 return NULL; ### Stack ##################################################################### [0] from 0x080042a8 in p_serial_mgr_service+12 at shared/drivers/p_serial_mgr.c:143 [1] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080042a8 in p_serial_mgr_service+12 at shared/drivers/p_serial_mgr.c:143 ### Variables ################################################################# loc ind = 0 ############################################################################### Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] 0x080042a8 in p_serial_mgr_init (huart=) at shared/drivers/p_serial_mgr.c:140 140 } ### Assembly ################################################################## 0x0800429e p_serial_mgr_init+22 b.n 0x80042a2 0x080042a0 p_serial_mgr_init+24 adds r3, #1 0x080042a2 p_serial_mgr_init+26 ldr r2, [pc, #32] ; (0x80042c4 ) 0x080042a4 p_serial_mgr_init+28 ldrh r2, [r2, #6] 0x080042a6 p_serial_mgr_init+30 cmp r2, r3 0x080042a8 p_serial_mgr_init+32 ble.n 0x80042c0 0x080042aa p_serial_mgr_init+34 ldr r2, [pc, #24] ; (0x80042c4 ) 0x080042ac p_serial_mgr_init+36 ldr r0, [r2, #0] 0x080042ae p_serial_mgr_init+38 mov.w r2, #268 ; 0x10c ~ ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042a8 control 0x04 ### Source #################################################################### 130 // HAL_UART_Transmit(&huart2, &huart2_rxc, 1, 500); 131 // HAL_UART_Receive_IT(&huart1, &huart1_rxc, 1); 132 // HAL_GPIO_WritePin(USART1_DE_GPIO_Port, USART1_DE_Pin, 0); 133 } 134 void p_serial_mgr_init(UART_HandleTypeDef *huart) 135 { 136 _serial_huart_inst = huart; 137 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 138 139 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 140 } 141 142 serial_pkt_t *p_serial_mgr_service(void) 143 { 144 // this will be less garbage when i switch to a queue 145 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 146 { 147 if (serial_pkt_cb.buffer[ind].b_ready) 148 { 149 return &serial_pkt_cb.buffer[ind]; ### Stack ##################################################################### [0] from 0x080042a8 in p_serial_mgr_init+32 at shared/drivers/p_serial_mgr.c:140 [1] from 0x200016b4 in heap_end ### Threads ################################################################### [1] id 0 from 0x080042a8 in p_serial_mgr_init+32 at shared/drivers/p_serial_mgr.c:140 ### Variables ################################################################# arg huart = ############################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x96a8 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009868 Loading section .ARM, size 0x8 lma 0x8009d40 Loading section .init_array, size 0x8 lma 0x8009d48 Loading section .fini_array, size 0x8 lma 0x8009d50 Loading section .data, size 0x9a8 lma 0x8009d58 Start address 0x08004300, load size 42704 Transfer rate: 29 KB/sec, 4744 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:145 145 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ################################################################## ~ ~ ~ ~ ~ 0x080042b0 p_serial_mgr_service+0 movs r3, #0 0x080042b2 p_serial_mgr_service+2 b.n 0x80042b6 0x080042b4 p_serial_mgr_service+4 adds r3, #1 0x080042b6 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042d8 ) 0x080042b8 p_serial_mgr_service+8 ldrh r2, [r2, #6] ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042b0 control 0x04 ### Source #################################################################### 135 { 136 _serial_huart_inst = huart; 137 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 138 139 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 140 } 141 142 serial_pkt_t *p_serial_mgr_service(void) 143 { 144 // this will be less garbage when i switch to a queue 145 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 146 { 147 if (serial_pkt_cb.buffer[ind].b_ready) 148 { 149 return &serial_pkt_cb.buffer[ind]; 150 } 151 } 152 return NULL; 153 } 154 ### Stack ##################################################################### [0] from 0x080042b0 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:145 [1] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080042b0 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:145 ### Variables ################################################################# loc ind = 0 ############################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08004300 msp: 0x20010000 Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x96a8 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009868 Loading section .ARM, size 0x8 lma 0x8009d40 Loading section .init_array, size 0x8 lma 0x8009d48 Loading section .fini_array, size 0x8 lma 0x8009d50 Loading section .data, size 0x9a8 lma 0x8009d58 Start address 0x08004300, load size 42704 Transfer rate: 29 KB/sec, 4744 bytes/write. Breakpoint 1 at 0x8004186: file shared/drivers/p_serial_mgr.c, line 70. Note: automatically using hardware breakpoints for read-only addresses. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### Breakpoint 1, UART1_RxCpltCallback (huart=0x20000a60 ) at shared/drivers/p_serial_mgr.c:70 70 serial_pkt_cb.buffer[serial_pkt_cb.head].len = rxc; ### Assembly ################################################################## 0x0800417c UART1_RxCpltCallback+112 ldrb r3, [r2, #0] 0x0800417e UART1_RxCpltCallback+114 adds r3, #1 0x08004180 UART1_RxCpltCallback+116 uxtb r3, r3 0x08004182 UART1_RxCpltCallback+118 strb r3, [r2, #0] 0x08004184 UART1_RxCpltCallback+120 b.n 0x8004256 !0x08004186 UART1_RxCpltCallback+122 ldr r2, [pc, #240] ; (0x8004278 ) 0x08004188 UART1_RxCpltCallback+124 ldr r3, [r2, #0] 0x0800418a UART1_RxCpltCallback+126 ldrh r2, [r2, #4] 0x0800418c UART1_RxCpltCallback+128 mov.w r1, #268 ; 0x10c 0x08004190 UART1_RxCpltCallback+132 mla r3, r1, r2, r3 ### Breakpoints ############################################################### [1] break at 0x08004186 in shared/drivers/p_serial_mgr.c:70 for p_serial_mgr.c:68 hit 1 time ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x20000a60 r8 0x00000000 xPSR 0x61000035 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x40013808 r10 0x00000000 msp 0x2000ff60 r3 0x00000002 r11 0x00000000 psp 0x00000000 r4 0x20000a60 r12 0x00001000 primask 0x00 r5 0x00004001 sp 0x2000ff60 basepri 0x00 r6 0x00000000 lr 0x0800348f faultmask 0x00 r7 0x00000000 pc 0x08004186 control 0x00 ### Source #################################################################### 60 } 61 break; 62 case 1: 63 { 64 serial_pkt_cb.buffer[serial_pkt_cb.head].dest_addr = rxc; 65 start_index_tracker++; 66 } 67 break; 68 case 2: 69 { !70 serial_pkt_cb.buffer[serial_pkt_cb.head].len = rxc; 71 frame_index_tracker = 0; 72 sstate = SS_FRAME; 73 } 74 break; 75 default: 76 { 77 // shouldnt get here 78 for (;;) {} 79 } ### Stack ##################################################################### [0] from 0x08004186 in UART1_RxCpltCallback+122 at shared/drivers/p_serial_mgr.c:70 [1] from 0x0800348e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035e0 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001584 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x08004186 in UART1_RxCpltCallback+122 at shared/drivers/p_serial_mgr.c:70 ### Variables ################################################################# arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi… ############################################################################### $1 = 15 '\017' Continuing. ### Output/messages ########################################################### halted: PC: 0x08004188 Program received signal SIGINT, Interrupt. 0x0800151e in main () at Core/Src/main.c:146 146 if ((pkt = p_serial_mgr_service()) != NULL) Traceback (most recent call last): File "", line 430, in on_stop File "", line 543, in render File "", line 1334, in lines File "", line 1529, in fetch_asm File "", line 224, in process File "/usr/lib/python3.9/site-packages/pygments/__init__.py", line 82, in highlight return format(lex(code, lexer), formatter, outfile) File "/usr/lib/python3.9/site-packages/pygments/__init__.py", line 61, in format formatter.format(tokens, realoutfile) File "/usr/lib/python3.9/site-packages/pygments/formatters/terminal256.py", line 250, in format return Formatter.format(self, tokensource, outfile) File "/usr/lib/python3.9/site-packages/pygments/formatter.py", line 94, in format return self.format_unencoded(tokensource, outfile) File "/usr/lib/python3.9/site-packages/pygments/formatters/terminal256.py", line 266, in format_unencoded for line in spl[:-1]: KeyboardInterrupt Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] 0x0800151e in main () at Core/Src/main.c:146 146 if ((pkt = p_serial_mgr_service()) != NULL) ### Assembly ################################################################## 0x0800150e main+154 mov.w r2, #268 ; 0x10c 0x08001512 main+158 movs r1, #0 0x08001514 main+160 mov r0, r4 0x08001516 main+162 bl 0x800439c 0x0800151a main+166 bl 0x80042b0 0x0800151e main+170 mov r4, r0 0x08001520 main+172 cmp r0, #0 0x08001522 main+174 beq.n 0x800151a 0x08001524 main+176 ldrb r2, [r0, #1] 0x08001526 main+178 ldrb r1, [r0, #0] ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x0800151e control 0x04 ### Source #################################################################### 136 while (1) 137 { 138 // if (b_timer_struck) 139 // { 140 // // PDEBUG("%d\n", sys_time); 141 // b_timer_struck = false; 142 // motor_degrees = (motor_degrees + 1) % 360; 143 // mc_service(motor_degrees, 50); 144 // } 145 serial_pkt_t *pkt = NULL; 146 if ((pkt = p_serial_mgr_service()) != NULL) 147 { 148 PDEBUG("Source: %02x\n" 149 "Destination: %02x\n", 150 pkt->src_addr, pkt->dest_addr); 151 PDEBUG("Frame Data: \n"); 152 for (int ind = 0; ind < pkt->len; pkt++) 153 { 154 if (ind % 8 == 0) 155 { ### Stack ##################################################################### [0] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x0800151e in main+170 at Core/Src/main.c:146 ### Variables ################################################################# loc pkt = 0x0: {src_addr = 0 '\000',dest_addr = 0 '\000',len = 134234881,frame_data = "e\025\000\bg\0… ############################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08004300 msp: 0x20010000 Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x96a8 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009868 Loading section .ARM, size 0x8 lma 0x8009d40 Loading section .init_array, size 0x8 lma 0x8009d48 Loading section .fini_array, size 0x8 lma 0x8009d50 Loading section .data, size 0x9a8 lma 0x8009d58 Start address 0x08004300, load size 42704 Transfer rate: 29 KB/sec, 4744 bytes/write. Breakpoint 1 at 0x800422c: file shared/drivers/p_serial_mgr.c, line 115. Note: automatically using hardware breakpoints for read-only addresses. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### Program received signal SIGINT, Interrupt. p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:145 145 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ################################################################## ~ ~ ~ ~ ~ 0x080042b0 p_serial_mgr_service+0 movs r3, #0 0x080042b2 p_serial_mgr_service+2 b.n 0x80042b6 0x080042b4 p_serial_mgr_service+4 adds r3, #1 0x080042b6 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042d8 ) 0x080042b8 p_serial_mgr_service+8 ldrh r2, [r2, #6] ### Breakpoints ############################################################### [1] break at 0x0800422c in shared/drivers/p_serial_mgr.c:115 for p_serial_mgr.c:113 ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042b0 control 0x04 ### Source #################################################################### 135 { 136 _serial_huart_inst = huart; 137 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 138 139 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 140 } 141 142 serial_pkt_t *p_serial_mgr_service(void) 143 { 144 // this will be less garbage when i switch to a queue 145 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 146 { 147 if (serial_pkt_cb.buffer[ind].b_ready) 148 { 149 return &serial_pkt_cb.buffer[ind]; 150 } 151 } 152 return NULL; 153 } 154 ### Stack ##################################################################### [0] from 0x080042b0 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:145 [1] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080042b0 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:145 ### Variables ################################################################# loc ind = 0 ############################################################################### Quit Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:145 warning: Source file is more recent than executable. 145 ### Assembly ################################################################## ~ ~ ~ ~ ~ 0x080042b0 p_serial_mgr_service+0 movs r3, #0 0x080042b2 p_serial_mgr_service+2 b.n 0x80042b6 0x080042b4 p_serial_mgr_service+4 adds r3, #1 0x080042b6 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042d8 ) 0x080042b8 p_serial_mgr_service+8 ldrh r2, [r2, #6] ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042b0 control 0x04 ### Source #################################################################### 135 // HAL_UART_Receive_IT(&huart1, &huart1_rxc, 1); 136 // HAL_GPIO_WritePin(USART1_DE_GPIO_Port, USART1_DE_Pin, 0); 137 } 138 void p_serial_mgr_init(UART_HandleTypeDef *huart) 139 { 140 _serial_huart_inst = huart; 141 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 142 143 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 144 } 145 146 serial_pkt_t *p_serial_mgr_service(void) 147 { 148 // this will be less garbage when i switch to a queue 149 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 150 { 151 if (serial_pkt_cb.buffer[ind].b_ready) 152 { 153 return &serial_pkt_cb.buffer[ind]; 154 } ### Stack ##################################################################### [0] from 0x080042b0 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:145 [1] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080042b0 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:145 ### Variables ################################################################# loc ind = 0 ############################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 generic_push.gdb:7: Error in sourced command file: Canceled the download Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] 0x08004300 in mc_init (tim=0x0) at shared/devices/motor_controller.c:10 10 } ### Assembly ################################################################## ~ ~ ~ ~ 0x080042fc mc_init+0 ; instruction: 0xffffffff 0x08004300 mc_init+4 ; instruction: 0xffffffff 0x08004304 mc_init+8 ; instruction: 0xffffffff ~ ~ ~ ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x01000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000000 r2 0x00000000 r10 0x00000000 msp 0x20010000 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00000000 primask 0x00 r5 0x00000000 sp 0x20010000 basepri 0x00 r6 0x00000000 lr 0xffffffff faultmask 0x00 r7 0x00000000 pc 0x08004300 control 0x00 ### Source #################################################################### ~ 1 #include "motor_controller.h" 2 #include "putil.h" 3 #include "stm32l4xx_hal_tim.h" 4 #include 5 6 static TIM_HandleTypeDef *_motor_timer = NULL; 7 void mc_init(TIM_HandleTypeDef *tim) 8 { 9 _motor_timer = tim; 10 } 11 12 // degrees is anything from 0-359 13 // speed is anything from 0-99 14 void mc_service(uint16_t degrees, uint8_t speed) 15 { 16 float right_pwm = cos(((float)degrees * (3.1415 / 180.0f))); 17 float left_pwm = right_pwm; 18 // PDEBUG("| DEGREES | COS | SIN | \n"); 19 // PDEBUG("| %7d | %-5.3f | %-5.3f | \n", ### Stack ##################################################################### [0] from 0x08004300 in mc_init+4 at shared/devices/motor_controller.c:10 [1] from 0xfffffffe ### Threads ################################################################### [1] id 0 from 0x08004300 in mc_init+4 at shared/devices/motor_controller.c:10 ### Variables ################################################################# arg tim = 0x0: {Instance = 0xffffffff,Init = {Prescaler = 4294967295,CounterMode = 4294967295,Period … ############################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x96b0 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009870 Loading section .ARM, size 0x8 lma 0x8009d48 Loading section .init_array, size 0x8 lma 0x8009d50 Loading section .fini_array, size 0x8 lma 0x8009d58 Loading section .data, size 0x9a8 lma 0x8009d60 Start address 0x08004308, load size 42712 Transfer rate: 29 KB/sec, 4745 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] main () at Core/Src/main.c:146 146 if ((pkt = p_serial_mgr_service()) != NULL) ### Assembly ################################################################## 0x0800150a main+150 bl 0x8004078 0x0800150e main+154 mov.w r2, #268 ; 0x10c 0x08001512 main+158 movs r1, #0 0x08001514 main+160 mov r0, r4 0x08001516 main+162 bl 0x80043a4 0x0800151a main+166 bl 0x80042b8 0x0800151e main+170 mov r4, r0 0x08001520 main+172 cmp r0, #0 0x08001522 main+174 beq.n 0x800151a 0x08001524 main+176 ldrb r2, [r0, #1] ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x0800151a control 0x04 ### Source #################################################################### 136 while (1) 137 { 138 // if (b_timer_struck) 139 // { 140 // // PDEBUG("%d\n", sys_time); 141 // b_timer_struck = false; 142 // motor_degrees = (motor_degrees + 1) % 360; 143 // mc_service(motor_degrees, 50); 144 // } 145 serial_pkt_t *pkt = NULL; 146 if ((pkt = p_serial_mgr_service()) != NULL) 147 { 148 PDEBUG("Source: %02x\n" 149 "Destination: %02x\n", 150 pkt->src_addr, pkt->dest_addr); 151 PDEBUG("Frame Data: \n"); 152 for (int ind = 0; ind < pkt->len; pkt++) 153 { 154 if (ind % 8 == 0) 155 { ### Stack ##################################################################### [0] from 0x0800151a in main+166 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x0800151a in main+166 at Core/Src/main.c:146 ### Variables ################################################################# loc pkt = 0x0: {src_addr = 0 '\000',dest_addr = 0 '\000',len = 134234889,frame_data = "e\025\000\bg\0… ############################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08004308 msp: 0x20010000 Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x96b0 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009870 Loading section .ARM, size 0x8 lma 0x8009d48 Loading section .init_array, size 0x8 lma 0x8009d50 Loading section .fini_array, size 0x8 lma 0x8009d58 Loading section .data, size 0x9a8 lma 0x8009d60 Start address 0x08004308, load size 42712 Transfer rate: 29 KB/sec, 4745 bytes/write. Breakpoint 1 at 0x8004234: file shared/drivers/p_serial_mgr.c, line 119. Note: automatically using hardware breakpoints for read-only addresses. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### Program received signal SIGINT, Interrupt. 0x080042c2 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:149 149 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ################################################################## 0x080042b8 p_serial_mgr_service+0 movs r3, #0 0x080042ba p_serial_mgr_service+2 b.n 0x80042be 0x080042bc p_serial_mgr_service+4 adds r3, #1 0x080042be p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042e0 ) 0x080042c0 p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x080042c2 p_serial_mgr_service+10 cmp r2, r3 0x080042c4 p_serial_mgr_service+12 ble.n 0x80042dc 0x080042c6 p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x80042e0 ) 0x080042c8 p_serial_mgr_service+16 ldr r0, [r2, #0] 0x080042ca p_serial_mgr_service+18 mov.w r2, #268 ; 0x10c ### Breakpoints ############################################################### [1] break at 0x08004234 in shared/drivers/p_serial_mgr.c:119 for p_serial_mgr.c:119 ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042c2 control 0x04 ### Source #################################################################### 139 { 140 _serial_huart_inst = huart; 141 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 142 143 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 144 } 145 146 serial_pkt_t *p_serial_mgr_service(void) 147 { 148 // this will be less garbage when i switch to a queue 149 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 150 { 151 if (serial_pkt_cb.buffer[ind].b_ready) 152 { 153 return &serial_pkt_cb.buffer[ind]; 154 } 155 } 156 return NULL; 157 } 158 ### Stack ##################################################################### [0] from 0x080042c2 in p_serial_mgr_service+10 at shared/drivers/p_serial_mgr.c:149 [1] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080042c2 in p_serial_mgr_service+10 at shared/drivers/p_serial_mgr.c:149 ### Variables ################################################################# loc ind = 0 ############################################################################### Quit Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] 0x080042c2 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:150 150 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ################################################################## ~ ~ 0x080042bc p_serial_mgr_service+0 adds r3, #1 0x080042be p_serial_mgr_service+2 ldr r2, [pc, #32] ; (0x80042e0 ) 0x080042c0 p_serial_mgr_service+4 ldrh r2, [r2, #6] 0x080042c2 p_serial_mgr_service+6 cmp r2, r3 0x080042c4 p_serial_mgr_service+8 ble.n 0x80042dc 0x080042c6 p_serial_mgr_service+10 ldr r2, [pc, #24] ; (0x80042e0 ) 0x080042c8 p_serial_mgr_service+12 ldr r0, [r2, #0] 0x080042ca p_serial_mgr_service+14 mov.w r2, #268 ; 0x10c ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042c2 control 0x04 ### Source #################################################################### 140 { 141 _serial_huart_inst = huart; 142 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 143 144 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 145 } 146 147 serial_pkt_t *p_serial_mgr_service(void) 148 { 149 // this will be less garbage when i switch to a queue 150 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 151 { 152 if (serial_pkt_cb.buffer[ind].b_ready) 153 { 154 return &serial_pkt_cb.buffer[ind]; 155 } 156 } 157 return NULL; 158 } 159 ### Stack ##################################################################### [0] from 0x080042c2 in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:150 [1] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080042c2 in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:150 ### Variables ################################################################# loc ind = 0 ############################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08004308 msp: 0x20010000 Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x96b0 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009870 Loading section .ARM, size 0x8 lma 0x8009d48 Loading section .init_array, size 0x8 lma 0x8009d50 Loading section .fini_array, size 0x8 lma 0x8009d58 Loading section .data, size 0x9a8 lma 0x8009d60 Start address 0x0800430c, load size 42712 Transfer rate: 29 KB/sec, 4745 bytes/write. Breakpoint 1 at 0x80041e8: file shared/drivers/p_serial_mgr.c, line 87. Note: automatically using hardware breakpoints for read-only addresses. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### Breakpoint 1, UART1_RxCpltCallback (huart=0x20000a60 ) at shared/drivers/p_serial_mgr.c:87 87 asm volatile("nop"); ### Assembly ################################################################## 0x080041de UART1_RxCpltCallback+210 bne.n 0x8004262 0x080041e0 UART1_RxCpltCallback+212 ldr r3, [pc, #148] ; (0x8004278 ) 0x080041e2 UART1_RxCpltCallback+214 movs r2, #4 0x080041e4 UART1_RxCpltCallback+216 strb r2, [r3, #0] 0x080041e6 UART1_RxCpltCallback+218 b.n 0x8004262 !0x080041e8 UART1_RxCpltCallback+220 nop 0x080041ea UART1_RxCpltCallback+222 b.n 0x8004262 0x080041ec UART1_RxCpltCallback+224 ldr r3, [pc, #136] ; (0x8004278 ) 0x080041ee UART1_RxCpltCallback+226 movs r2, #3 0x080041f0 UART1_RxCpltCallback+228 strb r2, [r3, #0] ### Breakpoints ############################################################### [1] break at 0x080041e8 in shared/drivers/p_serial_mgr.c:87 for p_serial_mgr.c:87 hit 1 time ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x20000a60 r8 0x00000000 xPSR 0x61000035 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x40013808 r10 0x00000000 msp 0x2000ff60 r3 0x0000007e r11 0x00000000 psp 0x00000000 r4 0x20000a60 r12 0x00001000 primask 0x00 r5 0x00004001 sp 0x2000ff60 basepri 0x00 r6 0x00000000 lr 0x0800348f faultmask 0x00 r7 0x00000000 pc 0x080041e8 control 0x00 ### Source #################################################################### 77 // shouldnt get here 78 for (;;) {} 79 } 80 }; 81 } 82 break; 83 case SS_FRAME: 84 { 85 if (rxc == 0x7E) 86 { !87 asm volatile("nop"); 88 // error occured. bail 89 #pragma message(Reminder "add a safe escape routine for this") 90 } 91 else if (rxc == 0x7D) 92 { 93 sstate = SS_ESC; 94 } 95 else 96 { ### Stack ##################################################################### [0] from 0x080041e8 in UART1_RxCpltCallback+220 at shared/drivers/p_serial_mgr.c:87 [1] from 0x0800348e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035e0 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001584 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x080042e0 in p_serial_mgr_service+36 at shared/drivers/p_serial_mgr.c:157 [6] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080041e8 in UART1_RxCpltCallback+220 at shared/drivers/p_serial_mgr.c:87 ### Variables ################################################################# arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi… ############################################################################### $1 = { src_addr = 0 '\000', dest_addr = 0 '\000', len = 134234893, frame_data = "e\025\000\bg\025\000\bi\025\000\bk\025\000\bm\025\000\b", '\000' , "o\025\000\bq\025\000\b\000\000\000\000s\025\000\bu\025\000\b]C\000\b]C\000\b]C\000\b]C\000\b]C\000\b]C\000\b]C\000\b]C\000\b]C\000\b]C\000\b]C\000\b]C\000\b]C\000\b]C\000\b]C\000\b]C\000\b]C\000\b]C\000\b]C\000\b]C\000\b]C\000\b]C\000\b]C\000\b]C\000\b]C\000\b]C\000\b]C\000\b]C\000\b]C\000\b\000\000\000\000\000\000\000\000]C\000\b]C\000\b\000\000\000\000\000\000\000\000]C\000\b"..., checksum = 0 '\000', b_ready = false } Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] UART1_RxCpltCallback (huart=0x20000a60 ) at shared/drivers/p_serial_mgr.c:87 87 asm volatile("nop"); ### Assembly ################################################################## 0x080041de UART1_RxCpltCallback+210 bne.n 0x8004262 0x080041e0 UART1_RxCpltCallback+212 ldr r3, [pc, #148] ; (0x8004278 ) 0x080041e2 UART1_RxCpltCallback+214 movs r2, #4 0x080041e4 UART1_RxCpltCallback+216 strb r2, [r3, #0] 0x080041e6 UART1_RxCpltCallback+218 b.n 0x8004262 0x080041e8 UART1_RxCpltCallback+220 nop 0x080041ea UART1_RxCpltCallback+222 b.n 0x8004262 0x080041ec UART1_RxCpltCallback+224 ldr r3, [pc, #136] ; (0x8004278 ) 0x080041ee UART1_RxCpltCallback+226 movs r2, #3 0x080041f0 UART1_RxCpltCallback+228 strb r2, [r3, #0] ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x20000a60 r8 0x00000000 xPSR 0x61000035 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x40013808 r10 0x00000000 msp 0x2000ff60 r3 0x0000007e r11 0x00000000 psp 0x00000000 r4 0x20000a60 r12 0x00001000 primask 0x00 r5 0x00004001 sp 0x2000ff60 basepri 0x00 r6 0x00000000 lr 0x0800348f faultmask 0x00 r7 0x00000000 pc 0x080041e8 control 0x00 ### Source #################################################################### 77 // shouldnt get here 78 for (;;) {} 79 } 80 }; 81 } 82 break; 83 case SS_FRAME: 84 { 85 if (rxc == 0x7E) 86 { 87 asm volatile("nop"); 88 // error occured. bail 89 #pragma message(Reminder "add a safe escape routine for this") 90 sstate = SS_START; 91 } 92 else if (rxc == 0x7D) 93 { 94 sstate = SS_ESC; 95 } 96 else ### Stack ##################################################################### [0] from 0x080041e8 in UART1_RxCpltCallback+220 at shared/drivers/p_serial_mgr.c:87 [1] from 0x0800348e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035e0 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001584 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x080042e0 in p_serial_mgr_service+28 at shared/drivers/p_serial_mgr.c:153 [6] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080041e8 in UART1_RxCpltCallback+220 at shared/drivers/p_serial_mgr.c:87 ### Variables ################################################################# arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi… ############################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x96b8 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009878 Loading section .ARM, size 0x8 lma 0x8009d50 Loading section .init_array, size 0x8 lma 0x8009d58 Loading section .fini_array, size 0x8 lma 0x8009d60 Loading section .data, size 0x9a8 lma 0x8009d68 Start address 0x08004314, load size 42720 Transfer rate: 29 KB/sec, 4746 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x080042c6 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:151 151 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ################################################################## ~ ~ ~ ~ 0x080042c4 p_serial_mgr_service+0 movs r3, #0 0x080042c6 p_serial_mgr_service+2 b.n 0x80042ca 0x080042c8 p_serial_mgr_service+4 adds r3, #1 0x080042ca p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042ec ) 0x080042cc p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x080042ce p_serial_mgr_service+10 cmp r2, r3 ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042c6 control 0x04 ### Source #################################################################### 141 { 142 _serial_huart_inst = huart; 143 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 144 145 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 146 } 147 148 serial_pkt_t *p_serial_mgr_service(void) 149 { 150 // this will be less garbage when i switch to a queue 151 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 152 { 153 if (serial_pkt_cb.buffer[ind].b_ready) 154 { 155 return &serial_pkt_cb.buffer[ind]; 156 } 157 } 158 return NULL; 159 } 160 ### Stack ##################################################################### [0] from 0x080042c6 in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:151 [1] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080042c6 in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:151 ### Variables ################################################################# loc ind = 0 ############################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x96b8 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009878 Loading section .ARM, size 0x8 lma 0x8009d50 Loading section .init_array, size 0x8 lma 0x8009d58 Loading section .fini_array, size 0x8 lma 0x8009d60 Loading section .data, size 0x9a8 lma 0x8009d68 Start address 0x08004314, load size 42720 Transfer rate: 29 KB/sec, 4746 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x08001b12 in HAL_TIM_IRQHandler (htim=0x20000a14 ) at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c:3978 3978 if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_BREAK2) != RESET) ### Assembly ################################################################## 0x08001b06 HAL_TIM_IRQHandler+222 ldr r2, [r3, #12] 0x08001b08 HAL_TIM_IRQHandler+224 tst.w r2, #128 ; 0x80 0x08001b0c HAL_TIM_IRQHandler+228 bne.n 0x8001b8a 0x08001b0e HAL_TIM_IRQHandler+230 ldr r3, [r4, #0] 0x08001b10 HAL_TIM_IRQHandler+232 ldr r2, [r3, #16] 0x08001b12 HAL_TIM_IRQHandler+234 tst.w r2, #256 ; 0x100 0x08001b16 HAL_TIM_IRQHandler+238 beq.n 0x8001b20 0x08001b18 HAL_TIM_IRQHandler+240 ldr r2, [r3, #12] 0x08001b1a HAL_TIM_IRQHandler+242 tst.w r2, #128 ; 0x80 0x08001b1e HAL_TIM_IRQHandler+246 bne.n 0x8001b98 ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x20000a14 r8 0x00000000 xPSR 0x41000046 r1 0x000000fa r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000ff78 r3 0x40001000 r11 0x00000000 psp 0x00000000 r4 0x20000a14 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000ff78 basepri 0x00 r6 0x00000000 lr 0x08001b89 faultmask 0x00 r7 0x00000000 pc 0x08001b12 control 0x00 ### Source #################################################################### 3968 { 3969 __HAL_TIM_CLEAR_IT(htim, TIM_IT_BREAK); 3970 #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) 3971 htim->BreakCallback(htim); 3972 #else 3973 HAL_TIMEx_BreakCallback(htim); 3974 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ 3975 } 3976 } 3977 /* TIM Break2 input event */ 3978 if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_BREAK2) != RESET) 3979 { 3980 if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_BREAK) != RESET) 3981 { 3982 __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_BREAK2); 3983 #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) 3984 htim->Break2Callback(htim); 3985 #else 3986 HAL_TIMEx_Break2Callback(htim); 3987 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ ### Stack ##################################################################### [0] from 0x08001b12 in HAL_TIM_IRQHandler+234 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c:3978 [1] from 0x080015a4 in TIM6_DAC_IRQHandler+8 at Core/Src/stm32l4xx_it.c:239 [2] from 0xffffffe9 [3] from 0x080042cc in p_serial_mgr_init+32 at shared/drivers/p_serial_mgr.c:147 [4] from 0x200016b4 in heap_end ### Threads ################################################################### [1] id 0 from 0x08001b12 in HAL_TIM_IRQHandler+234 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c:3978 ### Variables ################################################################# arg htim = 0x20000a14 : {Instance = 0x40001000,Init = {Prescaler = 127,CounterMode = 0,Period =… ############################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x96c8 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009888 Loading section .ARM, size 0x8 lma 0x8009d60 Loading section .init_array, size 0x8 lma 0x8009d68 Loading section .fini_array, size 0x8 lma 0x8009d70 Loading section .data, size 0x9a8 lma 0x8009d78 Start address 0x08004324, load size 42736 Transfer rate: 29 KB/sec, 4748 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x0800151e in main () at Core/Src/main.c:146 146 if ((pkt = p_serial_mgr_service()) != NULL) ### Assembly ################################################################## 0x0800150e main+154 mov.w r2, #268 ; 0x10c 0x08001512 main+158 movs r1, #0 0x08001514 main+160 mov r0, r4 0x08001516 main+162 bl 0x80043c0 0x0800151a main+166 bl 0x80042d4 0x0800151e main+170 mov r4, r0 0x08001520 main+172 cmp r0, #0 0x08001522 main+174 beq.n 0x800151a 0x08001524 main+176 ldrb r2, [r0, #1] 0x08001526 main+178 ldrb r1, [r0, #0] ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x0800151e control 0x04 ### Source #################################################################### 136 while (1) 137 { 138 // if (b_timer_struck) 139 // { 140 // // PDEBUG("%d\n", sys_time); 141 // b_timer_struck = false; 142 // motor_degrees = (motor_degrees + 1) % 360; 143 // mc_service(motor_degrees, 50); 144 // } 145 serial_pkt_t *pkt = NULL; 146 if ((pkt = p_serial_mgr_service()) != NULL) 147 { 148 PDEBUG("Source: %02x\n" 149 "Destination: %02x\n", 150 pkt->src_addr, pkt->dest_addr); 151 PDEBUG("Frame Data: \n"); 152 for (int ind = 0; ind < pkt->len; pkt++) 153 { 154 if (ind % 8 == 0) 155 { ### Stack ##################################################################### [0] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x0800151e in main+170 at Core/Src/main.c:146 ### Variables ################################################################# loc pkt = 0x0: {src_addr = 0 '\000',dest_addr = 0 '\000',len = 134234917,frame_data = "e\025\000\bg\0… ############################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08004324 msp: 0x20010000 Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x96c8 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009888 Loading section .ARM, size 0x8 lma 0x8009d60 Loading section .init_array, size 0x8 lma 0x8009d68 Loading section .fini_array, size 0x8 lma 0x8009d70 Loading section .data, size 0x9a8 lma 0x8009d78 Start address 0x08004324, load size 42736 Transfer rate: 29 KB/sec, 4748 bytes/write. Breakpoint 1 at 0x80041e8: file shared/drivers/p_serial_mgr.c, line 87. Note: automatically using hardware breakpoints for read-only addresses. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### Program received signal SIGINT, Interrupt. p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:152 152 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ################################################################## ~ ~ ~ ~ ~ 0x080042d4 p_serial_mgr_service+0 movs r3, #0 0x080042d6 p_serial_mgr_service+2 b.n 0x80042da 0x080042d8 p_serial_mgr_service+4 adds r3, #1 0x080042da p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042fc ) 0x080042dc p_serial_mgr_service+8 ldrh r2, [r2, #6] ### Breakpoints ############################################################### [1] break at 0x080041e8 in shared/drivers/p_serial_mgr.c:87 for p_serial_mgr.c:87 ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042d4 control 0x04 ### Source #################################################################### 142 { 143 _serial_huart_inst = huart; 144 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 145 146 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 147 } 148 149 serial_pkt_t *p_serial_mgr_service(void) 150 { 151 // this will be less garbage when i switch to a queue 152 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 153 { 154 if (serial_pkt_cb.buffer[ind].b_ready) 155 { 156 return &serial_pkt_cb.buffer[ind]; 157 } 158 } 159 return NULL; 160 } 161 ### Stack ##################################################################### [0] from 0x080042d4 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:152 [1] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080042d4 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:152 ### Variables ################################################################# loc ind = 0 ############################################################################### Breakpoint 2 at 0x8004250: file shared/drivers/p_serial_mgr.c, line 122. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### Program received signal SIGINT, Interrupt. 0x080042da in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:152 152 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ################################################################## ~ ~ 0x080042d4 p_serial_mgr_service+0 movs r3, #0 0x080042d6 p_serial_mgr_service+2 b.n 0x80042da 0x080042d8 p_serial_mgr_service+4 adds r3, #1 0x080042da p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042fc ) 0x080042dc p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x080042de p_serial_mgr_service+10 cmp r2, r3 0x080042e0 p_serial_mgr_service+12 ble.n 0x80042f8 0x080042e2 p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x80042fc ) ### Breakpoints ############################################################### [1] break at 0x080041e8 in shared/drivers/p_serial_mgr.c:87 for p_serial_mgr.c:87 [2] break at 0x08004250 in shared/drivers/p_serial_mgr.c:122 for p_serial_mgr.c:122 ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042da control 0x04 ### Source #################################################################### 142 { 143 _serial_huart_inst = huart; 144 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 145 146 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 147 } 148 149 serial_pkt_t *p_serial_mgr_service(void) 150 { 151 // this will be less garbage when i switch to a queue 152 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 153 { 154 if (serial_pkt_cb.buffer[ind].b_ready) 155 { 156 return &serial_pkt_cb.buffer[ind]; 157 } 158 } 159 return NULL; 160 } 161 ### Stack ##################################################################### [0] from 0x080042da in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:152 [1] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080042da in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:152 ### Variables ################################################################# loc ind = 0 ############################################################################### Quit Quit Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] 0x080042da in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:152 warning: Source file is more recent than executable. 152 // this will be less garbage when i switch to a queue ### Assembly ################################################################## ~ ~ 0x080042d4 p_serial_mgr_service+0 movs r3, #0 0x080042d6 p_serial_mgr_service+2 b.n 0x80042da 0x080042d8 p_serial_mgr_service+4 adds r3, #1 0x080042da p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042fc ) 0x080042dc p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x080042de p_serial_mgr_service+10 cmp r2, r3 0x080042e0 p_serial_mgr_service+12 ble.n 0x80042f8 0x080042e2 p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x80042fc ) ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042da control 0x04 ### Source #################################################################### 142 void p_serial_mgr_init(UART_HandleTypeDef *huart) 143 { 144 _serial_huart_inst = huart; 145 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 146 147 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 148 } 149 150 serial_pkt_t *p_serial_mgr_service(void) 151 { 152 // this will be less garbage when i switch to a queue 153 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 154 { 155 if (serial_pkt_cb.buffer[ind].b_ready) 156 { 157 return &serial_pkt_cb.buffer[ind]; 158 } 159 } 160 return NULL; 161 } ### Stack ##################################################################### [0] from 0x080042da in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:152 [1] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080042da in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:152 ### Variables ################################################################# loc ind = 0 ############################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x96c8 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009888 Loading section .ARM, size 0x8 lma 0x8009d60 Loading section .init_array, size 0x8 lma 0x8009d68 Loading section .fini_array, size 0x8 lma 0x8009d70 Loading section .data, size 0x9a8 lma 0x8009d78 Start address 0x08004324, load size 42736 Transfer rate: 29 KB/sec, 4748 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x080042fa in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:155 155 if (serial_pkt_cb.buffer[ind].b_ready) ### Assembly ################################################################## 0x080042ee p_serial_mgr_service+18 ldrb.w r2, [r0, #265] ; 0x109 0x080042f2 p_serial_mgr_service+22 cmp r2, #0 0x080042f4 p_serial_mgr_service+24 beq.n 0x80042d8 0x080042f6 p_serial_mgr_service+26 b.n 0x80042fa 0x080042f8 p_serial_mgr_service+28 movs r0, #0 0x080042fa p_serial_mgr_service+30 bx lr 0x080042fc p_serial_mgr_service+32 asrs r4, r3, #25 0x080042fe p_serial_mgr_service+34 movs r0, #0 0x08004300 p_serial_mgr_service+36 push {r3, lr} 0x08004302 p_serial_mgr_service+38 movs r2, #1 ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042fa control 0x04 ### Source #################################################################### 145 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 146 147 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 148 } 149 150 serial_pkt_t *p_serial_mgr_service(void) 151 { 152 // this will be less garbage when i switch to a queue 153 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 154 { 155 if (serial_pkt_cb.buffer[ind].b_ready) 156 { 157 return &serial_pkt_cb.buffer[ind]; 158 } 159 } 160 return NULL; 161 } 162 163 void p_serial_mgr_start() 164 { ### Stack ##################################################################### [0] from 0x080042fa in p_serial_mgr_service+30 at shared/drivers/p_serial_mgr.c:155 [1] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080042fa in p_serial_mgr_service+30 at shared/drivers/p_serial_mgr.c:155 ### Variables ################################################################# loc ind = 0 ############################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x96d0 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009890 Loading section .ARM, size 0x8 lma 0x8009d68 Loading section .init_array, size 0x8 lma 0x8009d70 Loading section .fini_array, size 0x8 lma 0x8009d78 Loading section .data, size 0x9a8 lma 0x8009d80 Start address 0x0800432c, load size 42744 Transfer rate: 29 KB/sec, 4749 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x080042e8 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:153 153 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ################################################################## 0x080042de p_serial_mgr_service+2 b.n 0x80042e2 0x080042e0 p_serial_mgr_service+4 adds r3, #1 0x080042e2 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x8004304 ) 0x080042e4 p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x080042e6 p_serial_mgr_service+10 cmp r2, r3 0x080042e8 p_serial_mgr_service+12 ble.n 0x8004300 0x080042ea p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x8004304 ) 0x080042ec p_serial_mgr_service+16 ldr r0, [r2, #0] 0x080042ee p_serial_mgr_service+18 mov.w r2, #268 ; 0x10c 0x080042f2 p_serial_mgr_service+22 mla r0, r2, r3, r0 ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042e8 control 0x04 ### Source #################################################################### 143 { 144 _serial_huart_inst = huart; 145 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 146 147 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 148 } 149 150 serial_pkt_t *p_serial_mgr_service(void) 151 { 152 // this will be less garbage when i switch to a queue 153 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 154 { 155 if (serial_pkt_cb.buffer[ind].b_ready) 156 { 157 return &serial_pkt_cb.buffer[ind]; 158 } 159 } 160 return NULL; 161 } 162 ### Stack ##################################################################### [0] from 0x080042e8 in p_serial_mgr_service+12 at shared/drivers/p_serial_mgr.c:153 [1] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080042e8 in p_serial_mgr_service+12 at shared/drivers/p_serial_mgr.c:153 ### Variables ################################################################# loc ind = 0 ############################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x0800432c msp: 0x20010000 Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x96d0 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009890 Loading section .ARM, size 0x8 lma 0x8009d68 Loading section .init_array, size 0x8 lma 0x8009d70 Loading section .fini_array, size 0x8 lma 0x8009d78 Loading section .data, size 0x9a8 lma 0x8009d80 Start address 0x0800432c, load size 42744 Transfer rate: 29 KB/sec, 4749 bytes/write. Breakpoint 1 at 0x80041d6: file shared/drivers/p_serial_mgr.c, line 100. Note: automatically using hardware breakpoints for read-only addresses. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### Program received signal SIGINT, Interrupt. 0x080042e8 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:153 153 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ################################################################## 0x080042de p_serial_mgr_service+2 b.n 0x80042e2 0x080042e0 p_serial_mgr_service+4 adds r3, #1 0x080042e2 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x8004304 ) 0x080042e4 p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x080042e6 p_serial_mgr_service+10 cmp r2, r3 0x080042e8 p_serial_mgr_service+12 ble.n 0x8004300 0x080042ea p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x8004304 ) 0x080042ec p_serial_mgr_service+16 ldr r0, [r2, #0] 0x080042ee p_serial_mgr_service+18 mov.w r2, #268 ; 0x10c 0x080042f2 p_serial_mgr_service+22 mla r0, r2, r3, r0 ### Breakpoints ############################################################### [1] break at 0x080041d6 in shared/drivers/p_serial_mgr.c:100 for p_serial_mgr.c:100 if frame_index_tracker > 5 ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042e8 control 0x04 ### Source #################################################################### 143 { 144 _serial_huart_inst = huart; 145 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 146 147 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 148 } 149 150 serial_pkt_t *p_serial_mgr_service(void) 151 { 152 // this will be less garbage when i switch to a queue 153 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 154 { 155 if (serial_pkt_cb.buffer[ind].b_ready) 156 { 157 return &serial_pkt_cb.buffer[ind]; 158 } 159 } 160 return NULL; 161 } 162 ### Stack ##################################################################### [0] from 0x080042e8 in p_serial_mgr_service+12 at shared/drivers/p_serial_mgr.c:153 [1] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080042e8 in p_serial_mgr_service+12 at shared/drivers/p_serial_mgr.c:153 ### Variables ################################################################# loc ind = 0 ############################################################################### Note: breakpoint 1 also set at pc 0x80041d6. Breakpoint 2 at 0x80041d6: file shared/drivers/p_serial_mgr.c, line 100. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### Program received signal SIGINT, Interrupt. main () at Core/Src/main.c:146 146 if ((pkt = p_serial_mgr_service()) != NULL) ### Assembly ################################################################## 0x0800150a main+150 bl 0x8004078 0x0800150e main+154 mov.w r2, #268 ; 0x10c 0x08001512 main+158 movs r1, #0 0x08001514 main+160 mov r0, r4 0x08001516 main+162 bl 0x80043c8 0x0800151a main+166 bl 0x80042dc 0x0800151e main+170 mov r4, r0 0x08001520 main+172 cmp r0, #0 0x08001522 main+174 beq.n 0x800151a 0x08001524 main+176 ldrb r2, [r0, #1] ### Breakpoints ############################################################### [1] break at 0x080041d6 in shared/drivers/p_serial_mgr.c:100 for p_serial_mgr.c:100 if frame_index_tracker > 5 [2] break at 0x080041d6 in shared/drivers/p_serial_mgr.c:100 for p_serial_mgr.c:100 if frame_index_tracker > 0 ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x0800151a control 0x04 ### Source #################################################################### 136 while (1) 137 { 138 // if (b_timer_struck) 139 // { 140 // // PDEBUG("%d\n", sys_time); 141 // b_timer_struck = false; 142 // motor_degrees = (motor_degrees + 1) % 360; 143 // mc_service(motor_degrees, 50); 144 // } 145 serial_pkt_t *pkt = NULL; 146 if ((pkt = p_serial_mgr_service()) != NULL) 147 { 148 PDEBUG("Source: %02x\n" 149 "Destination: %02x\n", 150 pkt->src_addr, pkt->dest_addr); 151 PDEBUG("Frame Data: \n"); 152 for (int ind = 0; ind < pkt->len; pkt++) 153 { 154 if (ind % 8 == 0) 155 { ### Stack ##################################################################### [0] from 0x0800151a in main+166 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x0800151a in main+166 at Core/Src/main.c:146 ### Variables ################################################################# loc pkt = 0x0: {src_addr = 0 '\000',dest_addr = 0 '\000',len = 134234925,frame_data = "e\025\000\bg\0… ############################################################################### Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] main () at Core/Src/main.c:146 146 if ((pkt = p_serial_mgr_service()) != NULL) ### Assembly ################################################################## 0x0800150a main+150 bl 0x8004078 0x0800150e main+154 mov.w r2, #268 ; 0x10c 0x08001512 main+158 movs r1, #0 0x08001514 main+160 mov r0, r4 0x08001516 main+162 bl 0x80043c8 <__libc_init_array+68> 0x0800151a main+166 bl 0x80042dc 0x0800151e main+170 mov r4, r0 0x08001520 main+172 cmp r0, #0 0x08001522 main+174 beq.n 0x800151a 0x08001524 main+176 ldrb r2, [r0, #1] ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x0800151a control 0x04 ### Source #################################################################### 136 while (1) 137 { 138 // if (b_timer_struck) 139 // { 140 // // PDEBUG("%d\n", sys_time); 141 // b_timer_struck = false; 142 // motor_degrees = (motor_degrees + 1) % 360; 143 // mc_service(motor_degrees, 50); 144 // } 145 serial_pkt_t *pkt = NULL; 146 if ((pkt = p_serial_mgr_service()) != NULL) 147 { 148 PDEBUG("Source: %02x\n" 149 "Destination: %02x\n", 150 pkt->src_addr, pkt->dest_addr); 151 PDEBUG("Frame Data: \n"); 152 for (int ind = 0; ind < pkt->len; pkt++) 153 { 154 if (ind % 8 == 0) 155 { ### Stack ##################################################################### [0] from 0x0800151a in main+166 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x0800151a in main+166 at Core/Src/main.c:146 ### Variables ################################################################# loc pkt = 0x0: {src_addr = 0 '\000',dest_addr = 0 '\000',len = 134234925,frame_data = "e\025\000\bg\0… ############################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x96d8 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009898 Loading section .ARM, size 0x8 lma 0x8009d70 Loading section .init_array, size 0x8 lma 0x8009d78 Loading section .fini_array, size 0x8 lma 0x8009d80 Loading section .data, size 0x9a8 lma 0x8009d88 Start address 0x08004330, load size 42752 Transfer rate: 29 KB/sec, 4750 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x080042e8 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:154 154 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ################################################################## ~ 0x080042e0 p_serial_mgr_service+0 movs r3, #0 0x080042e2 p_serial_mgr_service+2 b.n 0x80042e6 0x080042e4 p_serial_mgr_service+4 adds r3, #1 0x080042e6 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x8004308 ) 0x080042e8 p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x080042ea p_serial_mgr_service+10 cmp r2, r3 0x080042ec p_serial_mgr_service+12 ble.n 0x8004304 0x080042ee p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x8004308 ) 0x080042f0 p_serial_mgr_service+16 ldr r0, [r2, #0] ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x2000165c r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042e8 control 0x04 ### Source #################################################################### 144 { 145 _serial_huart_inst = huart; 146 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 147 148 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 149 } 150 151 serial_pkt_t *p_serial_mgr_service(void) 152 { 153 // this will be less garbage when i switch to a queue 154 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 155 { 156 if (serial_pkt_cb.buffer[ind].b_ready) 157 { 158 return &serial_pkt_cb.buffer[ind]; 159 } 160 } 161 return NULL; 162 } 163 ### Stack ##################################################################### [0] from 0x080042e8 in p_serial_mgr_service+8 at shared/drivers/p_serial_mgr.c:154 [1] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080042e8 in p_serial_mgr_service+8 at shared/drivers/p_serial_mgr.c:154 ### Variables ################################################################# loc ind = 0 ############################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08004330 msp: 0x20010000 Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x96d8 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009898 Loading section .ARM, size 0x8 lma 0x8009d70 Loading section .init_array, size 0x8 lma 0x8009d78 Loading section .fini_array, size 0x8 lma 0x8009d80 Loading section .data, size 0x9a8 lma 0x8009d88 Start address 0x08004330, load size 42752 Transfer rate: 29 KB/sec, 4750 bytes/write. Breakpoint 1 at 0x8004144: file shared/drivers/p_serial_mgr.c, line 79. Note: automatically using hardware breakpoints for read-only addresses. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### Program received signal SIGINT, Interrupt. main () at Core/Src/main.c:146 146 if ((pkt = p_serial_mgr_service()) != NULL) ### Assembly ################################################################## 0x0800150a main+150 bl 0x8004078 0x0800150e main+154 mov.w r2, #268 ; 0x10c 0x08001512 main+158 movs r1, #0 0x08001514 main+160 mov r0, r4 0x08001516 main+162 bl 0x80043cc 0x0800151a main+166 bl 0x80042e0 0x0800151e main+170 mov r4, r0 0x08001520 main+172 cmp r0, #0 0x08001522 main+174 beq.n 0x800151a 0x08001524 main+176 ldrb r2, [r0, #1] ### Breakpoints ############################################################### [1] break at 0x08004144 in shared/drivers/p_serial_mgr.c:79 for p_serial_mgr.c:79 ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x0800151a control 0x04 ### Source #################################################################### 136 while (1) 137 { 138 // if (b_timer_struck) 139 // { 140 // // PDEBUG("%d\n", sys_time); 141 // b_timer_struck = false; 142 // motor_degrees = (motor_degrees + 1) % 360; 143 // mc_service(motor_degrees, 50); 144 // } 145 serial_pkt_t *pkt = NULL; 146 if ((pkt = p_serial_mgr_service()) != NULL) 147 { 148 PDEBUG("Source: %02x\n" 149 "Destination: %02x\n", 150 pkt->src_addr, pkt->dest_addr); 151 PDEBUG("Frame Data: \n"); 152 for (int ind = 0; ind < pkt->len; pkt++) 153 { 154 if (ind % 8 == 0) 155 { ### Stack ##################################################################### [0] from 0x0800151a in main+166 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x0800151a in main+166 at Core/Src/main.c:146 ### Variables ################################################################# loc pkt = 0x0: {src_addr = 0 '\000',dest_addr = 0 '\000',len = 134234929,frame_data = "e\025\000\bg\0… ############################################################################### Breakpoint 2 at 0x80041b8: file shared/drivers/p_serial_mgr.c, line 100. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### halted: PC: 0x080041ba halted: PC: 0x080041ba Program received signal SIGINT, Interrupt. 0x080042e8 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:154 154 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ################################################################## ~ 0x080042e0 p_serial_mgr_service+0 movs r3, #0 0x080042e2 p_serial_mgr_service+2 b.n 0x80042e6 0x080042e4 p_serial_mgr_service+4 adds r3, #1 0x080042e6 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x8004308 ) 0x080042e8 p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x080042ea p_serial_mgr_service+10 cmp r2, r3 0x080042ec p_serial_mgr_service+12 ble.n 0x8004304 0x080042ee p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x8004308 ) 0x080042f0 p_serial_mgr_service+16 ldr r0, [r2, #0] ### Breakpoints ############################################################### [1] break at 0x08004144 in shared/drivers/p_serial_mgr.c:79 for p_serial_mgr.c:79 [2] break at 0x080041b8 in shared/drivers/p_serial_mgr.c:100 for p_serial_mgr.c:100 if frame_index_tracker > 5 ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x2000165c r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042e8 control 0x04 ### Source #################################################################### 144 { 145 _serial_huart_inst = huart; 146 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 147 148 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 149 } 150 151 serial_pkt_t *p_serial_mgr_service(void) 152 { 153 // this will be less garbage when i switch to a queue 154 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 155 { 156 if (serial_pkt_cb.buffer[ind].b_ready) 157 { 158 return &serial_pkt_cb.buffer[ind]; 159 } 160 } 161 return NULL; 162 } 163 ### Stack ##################################################################### [0] from 0x080042e8 in p_serial_mgr_service+8 at shared/drivers/p_serial_mgr.c:154 [1] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080042e8 in p_serial_mgr_service+8 at shared/drivers/p_serial_mgr.c:154 ### Variables ################################################################# loc ind = 0 ############################################################################### Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### halted: PC: 0x080041ba halted: PC: 0x080041ba Program received signal SIGINT, Interrupt. 0x080042e2 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:154 154 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ################################################################## ~ ~ ~ ~ 0x080042e0 p_serial_mgr_service+0 movs r3, #0 0x080042e2 p_serial_mgr_service+2 b.n 0x80042e6 0x080042e4 p_serial_mgr_service+4 adds r3, #1 0x080042e6 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x8004308 ) 0x080042e8 p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x080042ea p_serial_mgr_service+10 cmp r2, r3 ### Breakpoints ############################################################### [1] break at 0x08004144 in shared/drivers/p_serial_mgr.c:79 for p_serial_mgr.c:79 [2] break at 0x080041b8 in shared/drivers/p_serial_mgr.c:100 for p_serial_mgr.c:100 if frame_index_tracker > 5 ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x080042e2 control 0x04 ### Source #################################################################### 144 { 145 _serial_huart_inst = huart; 146 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 147 148 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 149 } 150 151 serial_pkt_t *p_serial_mgr_service(void) 152 { 153 // this will be less garbage when i switch to a queue 154 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 155 { 156 if (serial_pkt_cb.buffer[ind].b_ready) 157 { 158 return &serial_pkt_cb.buffer[ind]; 159 } 160 } 161 return NULL; 162 } 163 ### Stack ##################################################################### [0] from 0x080042e2 in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:154 [1] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080042e2 in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:154 ### Variables ################################################################# loc ind = 0 ############################################################################### Breakpoint 3 at 0x8004210: file shared/drivers/p_serial_mgr.c, line 110. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### halted: PC: 0x080041ba halted: PC: 0x080041ba halted: PC: 0x080041ba halted: PC: 0x080041ba halted: PC: 0x080041ba Program received signal SIGINT, Interrupt. 0x080041ba in UART1_RxCpltCallback (huart=0x20000a60 ) at shared/drivers/p_serial_mgr.c:100 100 serial_pkt_cb.buffer[serial_pkt_cb.head].frame_data[frame_index_tracker++] = rxc; ### Assembly ################################################################## 0x080041b0 UART1_RxCpltCallback+164 cmp r3, #126 ; 0x7e 0x080041b2 UART1_RxCpltCallback+166 beq.n 0x80041ec 0x080041b4 UART1_RxCpltCallback+168 cmp r3, #125 ; 0x7d 0x080041b6 UART1_RxCpltCallback+170 beq.n 0x8004208 !0x080041b8 UART1_RxCpltCallback+172 ldr r1, [pc, #236] ; (0x80042a8 ) 0x080041ba UART1_RxCpltCallback+174 ldr r2, [r1, #0] 0x080041bc UART1_RxCpltCallback+176 ldrh r1, [r1, #4] 0x080041be UART1_RxCpltCallback+178 mov.w r0, #268 ; 0x10c 0x080041c2 UART1_RxCpltCallback+182 mla r2, r0, r1, r2 0x080041c6 UART1_RxCpltCallback+186 ldr r0, [pc, #228] ; (0x80042ac ) ### Breakpoints ############################################################### [1] break at 0x08004144 in shared/drivers/p_serial_mgr.c:79 for p_serial_mgr.c:79 [2] break at 0x080041b8 in shared/drivers/p_serial_mgr.c:100 for p_serial_mgr.c:100 if frame_index_tracker > 5 [3] break at 0x08004210 in shared/drivers/p_serial_mgr.c:110 for p_serial_mgr.c:110 if frame_index_tracker > 5 ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x20000a60 r8 0x00000000 xPSR 0x81000035 r1 0x2000165c r9 0x00000000 fpscr 0x00000010 r2 0x40013808 r10 0x00000000 msp 0x2000ff60 r3 0x00000001 r11 0x00000000 psp 0x00000000 r4 0x20000a60 r12 0x00001000 primask 0x00 r5 0x00004001 sp 0x2000ff60 basepri 0x00 r6 0x00000000 lr 0x0800348f faultmask 0x00 r7 0x00000000 pc 0x080041ba control 0x00 ### Source #################################################################### 90 #pragma message(Reminder "add a safe escape routine for this") 91 sstate = SS_IDLE; 92 memset(&serial_pkt_cb.buffer[serial_pkt_cb.head], 0, sizeof(serial_pkt_t)); 93 } 94 else if (rxc == 0x7D) 95 { 96 sstate = SS_ESC; 97 } 98 else 99 { !100 serial_pkt_cb.buffer[serial_pkt_cb.head].frame_data[frame_index_tracker++] = rxc; 101 if (frame_index_tracker >= serial_pkt_cb.buffer[serial_pkt_cb.head].len) 102 { 103 sstate = SS_CHECKSUM; 104 } 105 } 106 } 107 break; 108 case SS_ESC: 109 { ### Stack ##################################################################### [0] from 0x080041ba in UART1_RxCpltCallback+174 at shared/drivers/p_serial_mgr.c:100 [1] from 0x0800348e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035e0 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001584 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080041ba in UART1_RxCpltCallback+174 at shared/drivers/p_serial_mgr.c:100 ### Variables ################################################################# arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi… ############################################################################### Quit Breakpoint 4 at 0x8004144: file shared/drivers/p_serial_mgr.c, line 79. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### Program received signal SIGINT, Interrupt. 0x0800151e in main () at Core/Src/main.c:146 146 if ((pkt = p_serial_mgr_service()) != NULL) ### Assembly ################################################################## 0x0800150e main+154 mov.w r2, #268 ; 0x10c 0x08001512 main+158 movs r1, #0 0x08001514 main+160 mov r0, r4 0x08001516 main+162 bl 0x80043cc 0x0800151a main+166 bl 0x80042e0 0x0800151e main+170 mov r4, r0 0x08001520 main+172 cmp r0, #0 0x08001522 main+174 beq.n 0x800151a 0x08001524 main+176 ldrb r2, [r0, #1] 0x08001526 main+178 ldrb r1, [r0, #0] ### Breakpoints ############################################################### [4] break at 0x08004144 in shared/drivers/p_serial_mgr.c:79 for p_serial_mgr.c:79 ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x0800151f faultmask 0x00 r7 0x00000000 pc 0x0800151e control 0x04 ### Source #################################################################### 136 while (1) 137 { 138 // if (b_timer_struck) 139 // { 140 // // PDEBUG("%d\n", sys_time); 141 // b_timer_struck = false; 142 // motor_degrees = (motor_degrees + 1) % 360; 143 // mc_service(motor_degrees, 50); 144 // } 145 serial_pkt_t *pkt = NULL; 146 if ((pkt = p_serial_mgr_service()) != NULL) 147 { 148 PDEBUG("Source: %02x\n" 149 "Destination: %02x\n", 150 pkt->src_addr, pkt->dest_addr); 151 PDEBUG("Frame Data: \n"); 152 for (int ind = 0; ind < pkt->len; pkt++) 153 { 154 if (ind % 8 == 0) 155 { ### Stack ##################################################################### [0] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x0800151e in main+170 at Core/Src/main.c:146 ### Variables ################################################################# loc pkt = 0x0: {src_addr = 0 '\000',dest_addr = 0 '\000',len = 134234929,frame_data = "e\025\000\bg\0… ############################################################################### Breakpoint 5 at 0x80041ac: file shared/drivers/p_serial_mgr.c, line 86. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### Breakpoint 5, UART1_RxCpltCallback (huart=0x20000a60 ) at shared/drivers/p_serial_mgr.c:86 86 if (rxc == 0x7E) ### Assembly ################################################################## 0x080041a2 UART1_RxCpltCallback+150 str r2, [r3, #4] 0x080041a4 UART1_RxCpltCallback+152 ldr r3, [pc, #244] ; (0x800429c ) 0x080041a6 UART1_RxCpltCallback+154 movs r2, #2 0x080041a8 UART1_RxCpltCallback+156 strb r2, [r3, #0] 0x080041aa UART1_RxCpltCallback+158 b.n 0x8004284 !0x080041ac UART1_RxCpltCallback+160 ldr r3, [pc, #240] ; (0x80042a0 ) 0x080041ae UART1_RxCpltCallback+162 ldrb r3, [r3, #0] 0x080041b0 UART1_RxCpltCallback+164 cmp r3, #126 ; 0x7e 0x080041b2 UART1_RxCpltCallback+166 beq.n 0x80041ec 0x080041b4 UART1_RxCpltCallback+168 cmp r3, #125 ; 0x7d ### Breakpoints ############################################################### [5] break at 0x080041ac in shared/drivers/p_serial_mgr.c:86 for p_serial_mgr.c:86 hit 1 time ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x20000a60 r8 0x00000000 xPSR 0x81000035 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x40013808 r10 0x00000000 msp 0x2000ff60 r3 0x00000002 r11 0x00000000 psp 0x00000000 r4 0x20000a60 r12 0x00001000 primask 0x00 r5 0x00004001 sp 0x2000ff60 basepri 0x00 r6 0x00000000 lr 0x0800348f faultmask 0x00 r7 0x00000000 pc 0x080041ac control 0x00 ### Source #################################################################### 76 default: 77 { 78 // shouldnt get here 79 asm volatile("nop"); 80 } 81 }; 82 } 83 break; 84 case SS_FRAME: 85 { !86 if (rxc == 0x7E) 87 { 88 asm volatile("nop"); 89 // error occured. bail 90 #pragma message(Reminder "add a safe escape routine for this") 91 sstate = SS_IDLE; 92 memset(&serial_pkt_cb.buffer[serial_pkt_cb.head], 0, sizeof(serial_pkt_t)); 93 } 94 else if (rxc == 0x7D) 95 { ### Stack ##################################################################### [0] from 0x080041ac in UART1_RxCpltCallback+160 at shared/drivers/p_serial_mgr.c:86 [1] from 0x0800348e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035e0 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001584 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x080042e8 in p_serial_mgr_service+8 at shared/drivers/p_serial_mgr.c:154 [6] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080041ac in UART1_RxCpltCallback+160 at shared/drivers/p_serial_mgr.c:86 ### Variables ################################################################# arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi… ############################################################################### $1 = 1 '\001' $2 = { src_addr = 0 '\000', dest_addr = 0 '\000', len = 134234929, frame_data = "e\025\000\bg\025\000\bi\025\000\bk\025\000\bm\025\000\b", '\000' , "o\025\000\bq\025\000\b\000\000\000\000s\025\000\bu\025\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\000\000\000\000\000\000\000\000\201C\000\b\201C\000\b\000\000\000\000\000\000\000\000\201C\000\b"..., checksum = 0 '\000', b_ready = false } $3 = "e\025\000\bg\025\000\bi\025\000\bk\025\000\bm\025\000\b", '\000' , "o\025\000\bq\025\000\b\000\000\000\000s\025\000\bu\025\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\201C\000\b\000\000\000\000\000\000\000\000\201C\000\b\201C\000\b\000\000\000\000\000\000\000\000\201C\000\b"... $4 = {[0x0] = 0x65, [0x1] = 0x15, [0x2] = 0x0, [0x3] = 0x8, [0x4] = 0x67, [0x5] = 0x15, [0x6] = 0x0, [0x7] = 0x8, [0x8] = 0x69, [0x9] = 0x15, [0xa] = 0x0, [0xb] = 0x8, [0xc] = 0x6b, [0xd] = 0x15, [0xe] = 0x0, [0xf] = 0x8, [0x10] = 0x6d, [0x11] = 0x15, [0x12] = 0x0, [0x13] = 0x8, [0x14] = 0x0 , [0x24] = 0x6f, [0x25] = 0x15, [0x26] = 0x0, [0x27] = 0x8, [0x28] = 0x71, [0x29] = 0x15, [0x2a] = 0x0, [0x2b] = 0x8, [0x2c] = 0x0, [0x2d] = 0x0, [0x2e] = 0x0, [0x2f] = 0x0, [0x30] = 0x73, [0x31] = 0x15, [0x32] = 0x0, [0x33] = 0x8, [0x34] = 0x75, [0x35] = 0x15, [0x36] = 0x0, [0x37] = 0x8, [0x38] = 0x81, [0x39] = 0x43, [0x3a] = 0x0, [0x3b] = 0x8, [0x3c] = 0x81, [0x3d] = 0x43, [0x3e] = 0x0, [0x3f] = 0x8, [0x40] = 0x81, [0x41] = 0x43, [0x42] = 0x0, [0x43] = 0x8, [0x44] = 0x81, [0x45] = 0x43, [0x46] = 0x0, [0x47] = 0x8, [0x48] = 0x81, [0x49] = 0x43, [0x4a] = 0x0, [0x4b] = 0x8, [0x4c] = 0x81, [0x4d] = 0x43, [0x4e] = 0x0, [0x4f] = 0x8, [0x50] = 0x81, [0x51] = 0x43, [0x52] = 0x0, [0x53] = 0x8, [0x54] = 0x81, [0x55] = 0x43, [0x56] = 0x0, [0x57] = 0x8, [0x58] = 0x81, [0x59] = 0x43, [0x5a] = 0x0, [0x5b] = 0x8, [0x5c] = 0x81, [0x5d] = 0x43, [0x5e] = 0x0, [0x5f] = 0x8, [0x60] = 0x81, [0x61] = 0x43, [0x62] = 0x0, [0x63] = 0x8, [0x64] = 0x81, [0x65] = 0x43, [0x66] = 0x0, [0x67] = 0x8, [0x68] = 0x81, [0x69] = 0x43, [0x6a] = 0x0, [0x6b] = 0x8, [0x6c] = 0x81, [0x6d] = 0x43, [0x6e] = 0x0, [0x6f] = 0x8, [0x70] = 0x81, [0x71] = 0x43, [0x72] = 0x0, [0x73] = 0x8, [0x74] = 0x81, [0x75] = 0x43, [0x76] = 0x0, [0x77] = 0x8, [0x78] = 0x81, [0x79] = 0x43, [0x7a] = 0x0, [0x7b] = 0x8, [0x7c] = 0x81, [0x7d] = 0x43, [0x7e] = 0x0, [0x7f] = 0x8, [0x80] = 0x81, [0x81] = 0x43, [0x82] = 0x0, [0x83] = 0x8, [0x84] = 0x81, [0x85] = 0x43, [0x86] = 0x0, [0x87] = 0x8, [0x88] = 0x81, [0x89] = 0x43, [0x8a] = 0x0, [0x8b] = 0x8, [0x8c] = 0x81, [0x8d] = 0x43, [0x8e] = 0x0, [0x8f] = 0x8, [0x90] = 0x81, [0x91] = 0x43, [0x92] = 0x0, [0x93] = 0x8, [0x94] = 0x81, [0x95] = 0x43, [0x96] = 0x0, [0x97] = 0x8, [0x98] = 0x81, [0x99] = 0x43, [0x9a] = 0x0, [0x9b] = 0x8, [0x9c] = 0x81, [0x9d] = 0x43, [0x9e] = 0x0, [0x9f] = 0x8, [0xa0] = 0x81, [0xa1] = 0x43, [0xa2] = 0x0, [0xa3] = 0x8, [0xa4] = 0x81, [0xa5] = 0x43, [0xa6] = 0x0, [0xa7] = 0x8, [0xa8] = 0x81, [0xa9] = 0x43, [0xaa] = 0x0, [0xab] = 0x8, [0xac] = 0x0, [0xad] = 0x0, [0xae] = 0x0, [0xaf] = 0x0, [0xb0] = 0x0, [0xb1] = 0x0, [0xb2] = 0x0, [0xb3] = 0x0, [0xb4] = 0x81, [0xb5] = 0x43, [0xb6] = 0x0, [0xb7] = 0x8, [0xb8] = 0x81, [0xb9] = 0x43, [0xba] = 0x0, [0xbb] = 0x8, [0xbc] = 0x0, [0xbd] = 0x0, [0xbe] = 0x0, [0xbf] = 0x0, [0xc0] = 0x0, [0xc1] = 0x0, [0xc2] = 0x0, [0xc3] = 0x0, [0xc4] = 0x81, [0xc5] = 0x43, [0xc6] = 0x0, [0xc7] = 0x8, [0xc8] = 0x0, [0xc9] = 0x0, [0xca] = 0x0, [0xcb] = 0x0, [0xcc] = 0x7d, [0xcd] = 0x15...} Quit Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] UART1_RxCpltCallback (huart=0x20000a60 ) at shared/drivers/p_serial_mgr.c:75 75 break; ### Assembly ################################################################## 0x080041a2 UART1_RxCpltCallback+150 str r2, [r3, #4] 0x080041a4 UART1_RxCpltCallback+152 ldr r3, [pc, #244] ; (0x800429c ) 0x080041a6 UART1_RxCpltCallback+154 movs r2, #2 0x080041a8 UART1_RxCpltCallback+156 strb r2, [r3, #0] 0x080041aa UART1_RxCpltCallback+158 b.n 0x8004284 0x080041ac UART1_RxCpltCallback+160 ldr r3, [pc, #240] ; (0x80042a0 ) 0x080041ae UART1_RxCpltCallback+162 ldrb r3, [r3, #0] 0x080041b0 UART1_RxCpltCallback+164 cmp r3, #126 ; 0x7e 0x080041b2 UART1_RxCpltCallback+166 beq.n 0x80041ec 0x080041b4 UART1_RxCpltCallback+168 cmp r3, #125 ; 0x7d ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x20000a60 r8 0x00000000 xPSR 0x81000035 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x40013808 r10 0x00000000 msp 0x2000ff60 r3 0x00000002 r11 0x00000000 psp 0x00000000 r4 0x20000a60 r12 0x00001000 primask 0x00 r5 0x00004001 sp 0x2000ff60 basepri 0x00 r6 0x00000000 lr 0x0800348f faultmask 0x00 r7 0x00000000 pc 0x080041ac control 0x00 ### Source #################################################################### 65 start_index_tracker++; 66 } 67 break; 68 case 2: 69 { 70 start_index_tracker = 0; 71 frame_index_tracker = 0; 72 serial_pkt_cb.buffer[serial_pkt_cb.head].len = rxc; 73 sstate = SS_FRAME; 74 } 75 break; 76 default: 77 { 78 // shouldnt get here 79 asm volatile("nop"); 80 } 81 }; 82 } 83 break; 84 case SS_FRAME: ### Stack ##################################################################### [0] from 0x080041ac in UART1_RxCpltCallback+160 at shared/drivers/p_serial_mgr.c:75 [1] from 0x0800348e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035e0 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001584 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x080042e8 in p_serial_mgr_init+48 at shared/drivers/p_serial_mgr.c:150 [6] from 0x200016b4 in heap_end ### Threads ################################################################### [1] id 0 from 0x080041ac in UART1_RxCpltCallback+160 at shared/drivers/p_serial_mgr.c:75 ### Variables ################################################################# arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi… ############################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08004330 msp: 0x20010000 Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x96e8 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x80098a8 Loading section .ARM, size 0x8 lma 0x8009d80 Loading section .init_array, size 0x8 lma 0x8009d88 Loading section .fini_array, size 0x8 lma 0x8009d90 Loading section .data, size 0x9a8 lma 0x8009d98 Start address 0x08004340, load size 42768 Transfer rate: 29 KB/sec, 4752 bytes/write. Breakpoint 1 at 0x80041ae: file shared/drivers/p_serial_mgr.c, line 86. Note: automatically using hardware breakpoints for read-only addresses. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### Breakpoint 1, UART1_RxCpltCallback (huart=0x20000a60 ) at shared/drivers/p_serial_mgr.c:86 86 if (rxc == 0x7E) ### Assembly ################################################################## 0x080041a4 UART1_RxCpltCallback+152 ldr r3, [pc, #244] ; (0x800429c ) 0x080041a6 UART1_RxCpltCallback+154 movs r2, #2 0x080041a8 UART1_RxCpltCallback+156 strb r2, [r3, #0] 0x080041aa UART1_RxCpltCallback+158 b.n 0x8004284 0x080041ac UART1_RxCpltCallback+160 ldr r3, [pc, #240] ; (0x80042a0 ) !0x080041ae UART1_RxCpltCallback+162 ldrb r3, [r3, #0] 0x080041b0 UART1_RxCpltCallback+164 cmp r3, #126 ; 0x7e 0x080041b2 UART1_RxCpltCallback+166 beq.n 0x80041ec 0x080041b4 UART1_RxCpltCallback+168 cmp r3, #125 ; 0x7d 0x080041b6 UART1_RxCpltCallback+170 beq.n 0x8004208 ### Breakpoints ############################################################### [1] break at 0x080041ae in shared/drivers/p_serial_mgr.c:86 for p_serial_mgr.c:86 hit 1 time ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x20000a60 r8 0x00000000 xPSR 0x81000035 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x40013808 r10 0x00000000 msp 0x2000ff60 r3 0x00000002 r11 0x00000000 psp 0x00000000 r4 0x20000a60 r12 0x00001000 primask 0x00 r5 0x00004001 sp 0x2000ff60 basepri 0x00 r6 0x00000000 lr 0x0800348f faultmask 0x00 r7 0x00000000 pc 0x080041ae control 0x00 ### Source #################################################################### 76 default: 77 { 78 // shouldnt get here 79 asm volatile("nop"); 80 } 81 }; 82 } 83 break; 84 case SS_FRAME: 85 { !86 if (rxc == 0x7E) 87 { 88 asm volatile("nop"); 89 // error occured. bail 90 #pragma message(Reminder "add a safe escape routine for this") 91 sstate = SS_IDLE; 92 memset(&serial_pkt_cb.buffer[serial_pkt_cb.head], 0, sizeof(serial_pkt_t)); 93 } 94 else if (rxc == 0x7D) 95 { ### Stack ##################################################################### [0] from 0x080041ae in UART1_RxCpltCallback+162 at shared/drivers/p_serial_mgr.c:86 [1] from 0x0800348e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035e0 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001584 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x0800151a in main+166 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080041ae in UART1_RxCpltCallback+162 at shared/drivers/p_serial_mgr.c:86 ### Variables ################################################################# arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi… ############################################################################### $1 = 1 '\001' $2 = { src_addr = 0 '\000', dest_addr = 0 '\000', len = 134234945, frame_data = "e\025\000\bg\025\000\bi\025\000\bk\025\000\bm\025\000\b", '\000' , "o\025\000\bq\025\000\b\000\000\000\000s\025\000\bu\025\000\b\221C\000\b\221C\000\b\221C\000\b\221C\000\b\221C\000\b\221C\000\b\221C\000\b\221C\000\b\221C\000\b\221C\000\b\221C\000\b\221C\000\b\221C\000\b\221C\000\b\221C\000\b\221C\000\b\221C\000\b\221C\000\b\221C\000\b\221C\000\b\221C\000\b\221C\000\b\221C\000\b\221C\000\b\221C\000\b\221C\000\b\221C\000\b\221C\000\b\221C\000\b\000\000\000\000\000\000\000\000\221C\000\b\221C\000\b\000\000\000\000\000\000\000\000\221C\000\b"..., checksum = 0 '\000', b_ready = false } $3 = {[0x0] = 0x65, [0x1] = 0x15, [0x2] = 0x0, [0x3] = 0x8, [0x4] = 0x67, [0x5] = 0x15, [0x6] = 0x0, [0x7] = 0x8, [0x8] = 0x69, [0x9] = 0x15, [0xa] = 0x0, [0xb] = 0x8, [0xc] = 0x6b, [0xd] = 0x15, [0xe] = 0x0, [0xf] = 0x8, [0x10] = 0x6d, [0x11] = 0x15, [0x12] = 0x0, [0x13] = 0x8, [0x14] = 0x0 , [0x24] = 0x6f, [0x25] = 0x15, [0x26] = 0x0, [0x27] = 0x8, [0x28] = 0x71, [0x29] = 0x15, [0x2a] = 0x0, [0x2b] = 0x8, [0x2c] = 0x0, [0x2d] = 0x0, [0x2e] = 0x0, [0x2f] = 0x0, [0x30] = 0x73, [0x31] = 0x15, [0x32] = 0x0, [0x33] = 0x8, [0x34] = 0x75, [0x35] = 0x15, [0x36] = 0x0, [0x37] = 0x8, [0x38] = 0x91, [0x39] = 0x43, [0x3a] = 0x0, [0x3b] = 0x8, [0x3c] = 0x91, [0x3d] = 0x43, [0x3e] = 0x0, [0x3f] = 0x8, [0x40] = 0x91, [0x41] = 0x43, [0x42] = 0x0, [0x43] = 0x8, [0x44] = 0x91, [0x45] = 0x43, [0x46] = 0x0, [0x47] = 0x8, [0x48] = 0x91, [0x49] = 0x43, [0x4a] = 0x0, [0x4b] = 0x8, [0x4c] = 0x91, [0x4d] = 0x43, [0x4e] = 0x0, [0x4f] = 0x8, [0x50] = 0x91, [0x51] = 0x43, [0x52] = 0x0, [0x53] = 0x8, [0x54] = 0x91, [0x55] = 0x43, [0x56] = 0x0, [0x57] = 0x8, [0x58] = 0x91, [0x59] = 0x43, [0x5a] = 0x0, [0x5b] = 0x8, [0x5c] = 0x91, [0x5d] = 0x43, [0x5e] = 0x0, [0x5f] = 0x8, [0x60] = 0x91, [0x61] = 0x43, [0x62] = 0x0, [0x63] = 0x8, [0x64] = 0x91, [0x65] = 0x43, [0x66] = 0x0, [0x67] = 0x8, [0x68] = 0x91, [0x69] = 0x43, [0x6a] = 0x0, [0x6b] = 0x8, [0x6c] = 0x91, [0x6d] = 0x43, [0x6e] = 0x0, [0x6f] = 0x8, [0x70] = 0x91, [0x71] = 0x43, [0x72] = 0x0, [0x73] = 0x8, [0x74] = 0x91, [0x75] = 0x43, [0x76] = 0x0, [0x77] = 0x8, [0x78] = 0x91, [0x79] = 0x43, [0x7a] = 0x0, [0x7b] = 0x8, [0x7c] = 0x91, [0x7d] = 0x43, [0x7e] = 0x0, [0x7f] = 0x8, [0x80] = 0x91, [0x81] = 0x43, [0x82] = 0x0, [0x83] = 0x8, [0x84] = 0x91, [0x85] = 0x43, [0x86] = 0x0, [0x87] = 0x8, [0x88] = 0x91, [0x89] = 0x43, [0x8a] = 0x0, [0x8b] = 0x8, [0x8c] = 0x91, [0x8d] = 0x43, [0x8e] = 0x0, [0x8f] = 0x8, [0x90] = 0x91, [0x91] = 0x43, [0x92] = 0x0, [0x93] = 0x8, [0x94] = 0x91, [0x95] = 0x43, [0x96] = 0x0, [0x97] = 0x8, [0x98] = 0x91, [0x99] = 0x43, [0x9a] = 0x0, [0x9b] = 0x8, [0x9c] = 0x91, [0x9d] = 0x43, [0x9e] = 0x0, [0x9f] = 0x8, [0xa0] = 0x91, [0xa1] = 0x43, [0xa2] = 0x0, [0xa3] = 0x8, [0xa4] = 0x91, [0xa5] = 0x43, [0xa6] = 0x0, [0xa7] = 0x8, [0xa8] = 0x91, [0xa9] = 0x43, [0xaa] = 0x0, [0xab] = 0x8, [0xac] = 0x0, [0xad] = 0x0, [0xae] = 0x0, [0xaf] = 0x0, [0xb0] = 0x0, [0xb1] = 0x0, [0xb2] = 0x0, [0xb3] = 0x0, [0xb4] = 0x91, [0xb5] = 0x43, [0xb6] = 0x0, [0xb7] = 0x8, [0xb8] = 0x91, [0xb9] = 0x43, [0xba] = 0x0, [0xbb] = 0x8, [0xbc] = 0x0, [0xbd] = 0x0, [0xbe] = 0x0, [0xbf] = 0x0, [0xc0] = 0x0, [0xc1] = 0x0, [0xc2] = 0x0, [0xc3] = 0x0, [0xc4] = 0x91, [0xc5] = 0x43, [0xc6] = 0x0, [0xc7] = 0x8, [0xc8] = 0x0, [0xc9] = 0x0, [0xca] = 0x0, [0xcb] = 0x0, [0xcc] = 0x7d, [0xcd] = 0x15...} $4 = {[0x0] = 0x65, [0x1] = 0x15, [0x2] = 0x0, [0x3] = 0x8, [0x4] = 0x67, [0x5] = 0x15, [0x6] = 0x0, [0x7] = 0x8, [0x8] = 0x69, [0x9] = 0x15, [0xa] = 0x0, [0xb] = 0x8, [0xc] = 0x6b, [0xd] = 0x15, [0xe] = 0x0, [0xf] = 0x8, [0x10] = 0x6d, [0x11] = 0x15, [0x12] = 0x0, [0x13] = 0x8, [0x14] = 0x0 , [0x24] = 0x6f, [0x25] = 0x15, [0x26] = 0x0, [0x27] = 0x8, [0x28] = 0x71, [0x29] = 0x15, [0x2a] = 0x0, [0x2b] = 0x8, [0x2c] = 0x0, [0x2d] = 0x0, [0x2e] = 0x0, [0x2f] = 0x0, [0x30] = 0x73, [0x31] = 0x15, [0x32] = 0x0, [0x33] = 0x8, [0x34] = 0x75, [0x35] = 0x15, [0x36] = 0x0, [0x37] = 0x8, [0x38] = 0x91, [0x39] = 0x43, [0x3a] = 0x0, [0x3b] = 0x8, [0x3c] = 0x91, [0x3d] = 0x43, [0x3e] = 0x0, [0x3f] = 0x8, [0x40] = 0x91, [0x41] = 0x43, [0x42] = 0x0, [0x43] = 0x8, [0x44] = 0x91, [0x45] = 0x43, [0x46] = 0x0, [0x47] = 0x8, [0x48] = 0x91, [0x49] = 0x43, [0x4a] = 0x0, [0x4b] = 0x8, [0x4c] = 0x91, [0x4d] = 0x43, [0x4e] = 0x0, [0x4f] = 0x8, [0x50] = 0x91, [0x51] = 0x43, [0x52] = 0x0, [0x53] = 0x8, [0x54] = 0x91, [0x55] = 0x43, [0x56] = 0x0, [0x57] = 0x8, [0x58] = 0x91, [0x59] = 0x43, [0x5a] = 0x0, [0x5b] = 0x8, [0x5c] = 0x91, [0x5d] = 0x43, [0x5e] = 0x0, [0x5f] = 0x8, [0x60] = 0x91, [0x61] = 0x43, [0x62] = 0x0, [0x63] = 0x8, [0x64] = 0x91, [0x65] = 0x43, [0x66] = 0x0, [0x67] = 0x8, [0x68] = 0x91, [0x69] = 0x43, [0x6a] = 0x0, [0x6b] = 0x8, [0x6c] = 0x91, [0x6d] = 0x43, [0x6e] = 0x0, [0x6f] = 0x8, [0x70] = 0x91, [0x71] = 0x43, [0x72] = 0x0, [0x73] = 0x8, [0x74] = 0x91, [0x75] = 0x43, [0x76] = 0x0, [0x77] = 0x8, [0x78] = 0x91, [0x79] = 0x43, [0x7a] = 0x0, [0x7b] = 0x8, [0x7c] = 0x91, [0x7d] = 0x43, [0x7e] = 0x0, [0x7f] = 0x8, [0x80] = 0x91, [0x81] = 0x43, [0x82] = 0x0, [0x83] = 0x8, [0x84] = 0x91, [0x85] = 0x43, [0x86] = 0x0, [0x87] = 0x8, [0x88] = 0x91, [0x89] = 0x43, [0x8a] = 0x0, [0x8b] = 0x8, [0x8c] = 0x91, [0x8d] = 0x43, [0x8e] = 0x0, [0x8f] = 0x8, [0x90] = 0x91, [0x91] = 0x43, [0x92] = 0x0, [0x93] = 0x8, [0x94] = 0x91, [0x95] = 0x43, [0x96] = 0x0, [0x97] = 0x8, [0x98] = 0x91, [0x99] = 0x43, [0x9a] = 0x0, [0x9b] = 0x8, [0x9c] = 0x91, [0x9d] = 0x43, [0x9e] = 0x0, [0x9f] = 0x8, [0xa0] = 0x91, [0xa1] = 0x43, [0xa2] = 0x0, [0xa3] = 0x8, [0xa4] = 0x91, [0xa5] = 0x43, [0xa6] = 0x0, [0xa7] = 0x8, [0xa8] = 0x91, [0xa9] = 0x43, [0xaa] = 0x0, [0xab] = 0x8, [0xac] = 0x0, [0xad] = 0x0, [0xae] = 0x0, [0xaf] = 0x0, [0xb0] = 0x0, [0xb1] = 0x0, [0xb2] = 0x0, [0xb3] = 0x0, [0xb4] = 0x91, [0xb5] = 0x43, [0xb6] = 0x0, [0xb7] = 0x8, [0xb8] = 0x91, [0xb9] = 0x43, [0xba] = 0x0, [0xbb] = 0x8, [0xbc] = 0x0, [0xbd] = 0x0, [0xbe] = 0x0, [0xbf] = 0x0, [0xc0] = 0x0, [0xc1] = 0x0, [0xc2] = 0x0, [0xc3] = 0x0, [0xc4] = 0x91, [0xc5] = 0x43, [0xc6] = 0x0, [0xc7] = 0x8, [0xc8] = 0x0, [0xc9] = 0x0, [0xca] = 0x0, [0xcb] = 0x0, [0xcc] = 0x7d, [0xcd] = 0x15...} Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] UART1_RxCpltCallback (huart=0x20000a60 ) at shared/drivers/p_serial_mgr.c:67 67 break; ### Assembly ################################################################## 0x080041a4 UART1_RxCpltCallback+112 str r2, [r3, #4] 0x080041a6 UART1_RxCpltCallback+114 ldr r3, [pc, #244] ; (0x800429c ) 0x080041a8 UART1_RxCpltCallback+116 movs r2, #2 0x080041aa UART1_RxCpltCallback+118 strb r2, [r3, #0] 0x080041ac UART1_RxCpltCallback+120 b.n 0x8004286 0x080041ae UART1_RxCpltCallback+122 ldr r3, [pc, #240] ; (0x80042a0 ) 0x080041b0 UART1_RxCpltCallback+124 ldrb r3, [r3, #0] 0x080041b2 UART1_RxCpltCallback+126 cmp r3, #126 ; 0x7e 0x080041b4 UART1_RxCpltCallback+128 beq.n 0x80041ee 0x080041b6 UART1_RxCpltCallback+130 cmp r3, #125 ; 0x7d ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x20000a60 r8 0x00000000 xPSR 0x81000035 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x40013808 r10 0x00000000 msp 0x2000ff60 r3 0x00000002 r11 0x00000000 psp 0x00000000 r4 0x20000a60 r12 0x00001000 primask 0x00 r5 0x00004001 sp 0x2000ff60 basepri 0x00 r6 0x00000000 lr 0x0800348f faultmask 0x00 r7 0x00000000 pc 0x080041ae control 0x00 ### Source #################################################################### 57 { 58 serial_pkt_cb.buffer[serial_pkt_cb.head].src_addr = rxc; 59 start_index_tracker++; 60 } 61 break; 62 case 1: 63 { 64 serial_pkt_cb.buffer[serial_pkt_cb.head].dest_addr = rxc; 65 start_index_tracker++; 66 } 67 break; 68 case 2: 69 { 70 start_index_tracker = 0; 71 frame_index_tracker = 0; 72 serial_pkt_cb.buffer[serial_pkt_cb.head].len = rxc; 73 sstate = SS_FRAME; 74 } 75 break; 76 default: ### Stack ##################################################################### [0] from 0x080041ae in UART1_RxCpltCallback+122 at shared/drivers/p_serial_mgr.c:67 [1] from 0x0800348e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035e0 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001584 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x0800151a in main+166 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080041ae in UART1_RxCpltCallback+122 at shared/drivers/p_serial_mgr.c:67 ### Variables ################################################################# arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi… ############################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08004340 msp: 0x20010000 Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9710 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x80098d0 Loading section .ARM, size 0x8 lma 0x8009da8 Loading section .init_array, size 0x8 lma 0x8009db0 Loading section .fini_array, size 0x8 lma 0x8009db8 Loading section .data, size 0x9a8 lma 0x8009dc0 Start address 0x08004368, load size 42808 Transfer rate: 29 KB/sec, 4756 bytes/write. Breakpoint 1 at 0x80041d6: file shared/drivers/p_serial_mgr.c, line 86. Note: automatically using hardware breakpoints for read-only addresses. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### Breakpoint 1, UART1_RxCpltCallback (huart=0x20000a60 ) at shared/drivers/p_serial_mgr.c:86 86 if (rxc == 0x7E) ### Assembly ################################################################## !0x080041d6 UART1_RxCpltCallback+162 ldr r3, [pc, #240] ; (0x80042c8 ) 0x080041d8 UART1_RxCpltCallback+164 ldrb r3, [r3, #0] 0x080041da UART1_RxCpltCallback+166 cmp r3, #126 ; 0x7e 0x080041dc UART1_RxCpltCallback+168 beq.n 0x8004216 0x080041de UART1_RxCpltCallback+170 cmp r3, #125 ; 0x7d 0x080041e0 UART1_RxCpltCallback+172 beq.n 0x8004232 0x080041e2 UART1_RxCpltCallback+174 ldr r1, [pc, #236] ; (0x80042d0 ) 0x080041e4 UART1_RxCpltCallback+176 ldr r2, [r1, #0] 0x080041e6 UART1_RxCpltCallback+178 ldrh r1, [r1, #4] 0x080041e8 UART1_RxCpltCallback+180 mov.w r0, #268 ; 0x10c ### Breakpoints ############################################################### [1] break at 0x080041d6 in shared/drivers/p_serial_mgr.c:86 for p_serial_mgr.c:86 hit 1 time ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x20000a60 r8 0x00000000 xPSR 0x81000035 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x40013808 r10 0x00000000 msp 0x2000ff60 r3 0x00000002 r11 0x00000000 psp 0x00000000 r4 0x20000a60 r12 0x00001000 primask 0x00 r5 0x00004001 sp 0x2000ff60 basepri 0x00 r6 0x00000000 lr 0x0800348f faultmask 0x00 r7 0x00000000 pc 0x080041d6 control 0x00 ### Source #################################################################### 76 default: 77 { 78 // shouldnt get here 79 asm volatile("nop"); 80 } 81 }; 82 } 83 break; 84 case SS_FRAME: 85 { !86 if (rxc == 0x7E) 87 { 88 asm volatile("nop"); 89 // error occured. bail 90 #pragma message(Reminder "add a safe escape routine for this") 91 sstate = SS_IDLE; 92 memset(&serial_pkt_cb.buffer[serial_pkt_cb.head], 0, sizeof(serial_pkt_t)); 93 } 94 else if (rxc == 0x7D) 95 { ### Stack ##################################################################### [0] from 0x080041d6 in UART1_RxCpltCallback+162 at shared/drivers/p_serial_mgr.c:86 [1] from 0x0800348e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035e0 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001584 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x08004320 in p_serial_mgr_service+8 at shared/drivers/p_serial_mgr.c:155 [6] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080041d6 in UART1_RxCpltCallback+162 at shared/drivers/p_serial_mgr.c:86 ### Variables ################################################################# arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi… ############################################################################### $1 = {[0x0] = 0x65, [0x1] = 0x15, [0x2] = 0x0, [0x3] = 0x8, [0x4] = 0x67, [0x5] = 0x15, [0x6] = 0x0, [0x7] = 0x8, [0x8] = 0x69, [0x9] = 0x15, [0xa] = 0x0, [0xb] = 0x8, [0xc] = 0x6b, [0xd] = 0x15, [0xe] = 0x0, [0xf] = 0x8, [0x10] = 0x6d, [0x11] = 0x15, [0x12] = 0x0, [0x13] = 0x8, [0x14] = 0x0 , [0x24] = 0x6f, [0x25] = 0x15, [0x26] = 0x0, [0x27] = 0x8, [0x28] = 0x71, [0x29] = 0x15, [0x2a] = 0x0, [0x2b] = 0x8, [0x2c] = 0x0, [0x2d] = 0x0, [0x2e] = 0x0, [0x2f] = 0x0, [0x30] = 0x73, [0x31] = 0x15, [0x32] = 0x0, [0x33] = 0x8, [0x34] = 0x75, [0x35] = 0x15, [0x36] = 0x0, [0x37] = 0x8, [0x38] = 0xb9, [0x39] = 0x43, [0x3a] = 0x0, [0x3b] = 0x8, [0x3c] = 0xb9, [0x3d] = 0x43, [0x3e] = 0x0, [0x3f] = 0x8, [0x40] = 0xb9, [0x41] = 0x43, [0x42] = 0x0, [0x43] = 0x8, [0x44] = 0xb9, [0x45] = 0x43, [0x46] = 0x0, [0x47] = 0x8, [0x48] = 0xb9, [0x49] = 0x43, [0x4a] = 0x0, [0x4b] = 0x8, [0x4c] = 0xb9, [0x4d] = 0x43, [0x4e] = 0x0, [0x4f] = 0x8, [0x50] = 0xb9, [0x51] = 0x43, [0x52] = 0x0, [0x53] = 0x8, [0x54] = 0xb9, [0x55] = 0x43, [0x56] = 0x0, [0x57] = 0x8, [0x58] = 0xb9, [0x59] = 0x43, [0x5a] = 0x0, [0x5b] = 0x8, [0x5c] = 0xb9, [0x5d] = 0x43, [0x5e] = 0x0, [0x5f] = 0x8, [0x60] = 0xb9, [0x61] = 0x43, [0x62] = 0x0, [0x63] = 0x8, [0x64] = 0xb9, [0x65] = 0x43, [0x66] = 0x0, [0x67] = 0x8, [0x68] = 0xb9, [0x69] = 0x43, [0x6a] = 0x0, [0x6b] = 0x8, [0x6c] = 0xb9, [0x6d] = 0x43, [0x6e] = 0x0, [0x6f] = 0x8, [0x70] = 0xb9, [0x71] = 0x43, [0x72] = 0x0, [0x73] = 0x8, [0x74] = 0xb9, [0x75] = 0x43, [0x76] = 0x0, [0x77] = 0x8, [0x78] = 0xb9, [0x79] = 0x43, [0x7a] = 0x0, [0x7b] = 0x8, [0x7c] = 0xb9, [0x7d] = 0x43, [0x7e] = 0x0, [0x7f] = 0x8, [0x80] = 0xb9, [0x81] = 0x43, [0x82] = 0x0, [0x83] = 0x8, [0x84] = 0xb9, [0x85] = 0x43, [0x86] = 0x0, [0x87] = 0x8, [0x88] = 0xb9, [0x89] = 0x43, [0x8a] = 0x0, [0x8b] = 0x8, [0x8c] = 0xb9, [0x8d] = 0x43, [0x8e] = 0x0, [0x8f] = 0x8, [0x90] = 0xb9, [0x91] = 0x43, [0x92] = 0x0, [0x93] = 0x8, [0x94] = 0xb9, [0x95] = 0x43, [0x96] = 0x0, [0x97] = 0x8, [0x98] = 0xb9, [0x99] = 0x43, [0x9a] = 0x0, [0x9b] = 0x8, [0x9c] = 0xb9, [0x9d] = 0x43, [0x9e] = 0x0, [0x9f] = 0x8, [0xa0] = 0xb9, [0xa1] = 0x43, [0xa2] = 0x0, [0xa3] = 0x8, [0xa4] = 0xb9, [0xa5] = 0x43, [0xa6] = 0x0, [0xa7] = 0x8, [0xa8] = 0xb9, [0xa9] = 0x43, [0xaa] = 0x0, [0xab] = 0x8, [0xac] = 0x0, [0xad] = 0x0, [0xae] = 0x0, [0xaf] = 0x0, [0xb0] = 0x0, [0xb1] = 0x0, [0xb2] = 0x0, [0xb3] = 0x0, [0xb4] = 0xb9, [0xb5] = 0x43, [0xb6] = 0x0, [0xb7] = 0x8, [0xb8] = 0xb9, [0xb9] = 0x43, [0xba] = 0x0, [0xbb] = 0x8, [0xbc] = 0x0, [0xbd] = 0x0, [0xbe] = 0x0, [0xbf] = 0x0, [0xc0] = 0x0, [0xc1] = 0x0, [0xc2] = 0x0, [0xc3] = 0x0, [0xc4] = 0xb9, [0xc5] = 0x43, [0xc6] = 0x0, [0xc7] = 0x8, [0xc8] = 0x0, [0xc9] = 0x0, [0xca] = 0x0, [0xcb] = 0x0, [0xcc] = 0x7d, [0xcd] = 0x15...} $2 = 0x0 Invalid character '\' in expression. Invalid character '\' in expression. Invalid character '\' in expression. Undefined command: "pserial_pkt_cb.buffer". Try "help". $3 = (serial_pkt_t *) 0x0 $4 = { src_addr = 0 '\000', dest_addr = 0 '\000', len = 134234985, frame_data = "e\025\000\bg\025\000\bi\025\000\bk\025\000\bm\025\000\b", '\000' , "o\025\000\bq\025\000\b\000\000\000\000s\025\000\bu\025\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\000\000\000\000\000\000\000\000\271C\000\b\271C\000\b\000\000\000\000\000\000\000\000\271C\000\b"..., checksum = 0 '\000', b_ready = false } $5 = { src_addr = 0x0, dest_addr = 0x0, len = 0x8004369, frame_data = {[0x0] = 0x65, [0x1] = 0x15, [0x2] = 0x0, [0x3] = 0x8, [0x4] = 0x67, [0x5] = 0x15, [0x6] = 0x0, [0x7] = 0x8, [0x8] = 0x69, [0x9] = 0x15, [0xa] = 0x0, [0xb] = 0x8, [0xc] = 0x6b, [0xd] = 0x15, [0xe] = 0x0, [0xf] = 0x8, [0x10] = 0x6d, [0x11] = 0x15, [0x12] = 0x0, [0x13] = 0x8, [0x14] = 0x0 , [0x24] = 0x6f, [0x25] = 0x15, [0x26] = 0x0, [0x27] = 0x8, [0x28] = 0x71, [0x29] = 0x15, [0x2a] = 0x0, [0x2b] = 0x8, [0x2c] = 0x0, [0x2d] = 0x0, [0x2e] = 0x0, [0x2f] = 0x0, [0x30] = 0x73, [0x31] = 0x15, [0x32] = 0x0, [0x33] = 0x8, [0x34] = 0x75, [0x35] = 0x15, [0x36] = 0x0, [0x37] = 0x8, [0x38] = 0xb9, [0x39] = 0x43, [0x3a] = 0x0, [0x3b] = 0x8, [0x3c] = 0xb9, [0x3d] = 0x43, [0x3e] = 0x0, [0x3f] = 0x8, [0x40] = 0xb9, [0x41] = 0x43, [0x42] = 0x0, [0x43] = 0x8, [0x44] = 0xb9, [0x45] = 0x43, [0x46] = 0x0, [0x47] = 0x8, [0x48] = 0xb9, [0x49] = 0x43, [0x4a] = 0x0, [0x4b] = 0x8, [0x4c] = 0xb9, [0x4d] = 0x43, [0x4e] = 0x0, [0x4f] = 0x8, [0x50] = 0xb9, [0x51] = 0x43, [0x52] = 0x0, [0x53] = 0x8, [0x54] = 0xb9, [0x55] = 0x43, [0x56] = 0x0, [0x57] = 0x8, [0x58] = 0xb9, [0x59] = 0x43, [0x5a] = 0x0, [0x5b] = 0x8, [0x5c] = 0xb9, [0x5d] = 0x43, [0x5e] = 0x0, [0x5f] = 0x8, [0x60] = 0xb9, [0x61] = 0x43, [0x62] = 0x0, [0x63] = 0x8, [0x64] = 0xb9, [0x65] = 0x43, [0x66] = 0x0, [0x67] = 0x8, [0x68] = 0xb9, [0x69] = 0x43, [0x6a] = 0x0, [0x6b] = 0x8, [0x6c] = 0xb9, [0x6d] = 0x43, [0x6e] = 0x0, [0x6f] = 0x8, [0x70] = 0xb9, [0x71] = 0x43, [0x72] = 0x0, [0x73] = 0x8, [0x74] = 0xb9, [0x75] = 0x43, [0x76] = 0x0, [0x77] = 0x8, [0x78] = 0xb9, [0x79] = 0x43, [0x7a] = 0x0, [0x7b] = 0x8, [0x7c] = 0xb9, [0x7d] = 0x43, [0x7e] = 0x0, [0x7f] = 0x8, [0x80] = 0xb9, [0x81] = 0x43, [0x82] = 0x0, [0x83] = 0x8, [0x84] = 0xb9, [0x85] = 0x43, [0x86] = 0x0, [0x87] = 0x8, [0x88] = 0xb9, [0x89] = 0x43, [0x8a] = 0x0, [0x8b] = 0x8, [0x8c] = 0xb9, [0x8d] = 0x43, [0x8e] = 0x0, [0x8f] = 0x8, [0x90] = 0xb9, [0x91] = 0x43, [0x92] = 0x0, [0x93] = 0x8, [0x94] = 0xb9, [0x95] = 0x43, [0x96] = 0x0, [0x97] = 0x8, [0x98] = 0xb9, [0x99] = 0x43, [0x9a] = 0x0, [0x9b] = 0x8, [0x9c] = 0xb9, [0x9d] = 0x43, [0x9e] = 0x0, [0x9f] = 0x8, [0xa0] = 0xb9, [0xa1] = 0x43, [0xa2] = 0x0, [0xa3] = 0x8, [0xa4] = 0xb9, [0xa5] = 0x43, [0xa6] = 0x0, [0xa7] = 0x8, [0xa8] = 0xb9, [0xa9] = 0x43, [0xaa] = 0x0, [0xab] = 0x8, [0xac] = 0x0, [0xad] = 0x0, [0xae] = 0x0, [0xaf] = 0x0, [0xb0] = 0x0, [0xb1] = 0x0, [0xb2] = 0x0, [0xb3] = 0x0, [0xb4] = 0xb9, [0xb5] = 0x43, [0xb6] = 0x0, [0xb7] = 0x8, [0xb8] = 0xb9, [0xb9] = 0x43, [0xba] = 0x0, [0xbb] = 0x8, [0xbc] = 0x0, [0xbd] = 0x0, [0xbe] = 0x0, [0xbf] = 0x0, [0xc0] = 0x0, [0xc1] = 0x0, [0xc2] = 0x0, [0xc3] = 0x0, [0xc4] = 0xb9, [0xc5] = 0x43, [0xc6] = 0x0, [0xc7] = 0x8, [0xc8] = 0x0, [0xc9] = 0x0, [0xca] = 0x0, [0xcb] = 0x0, [0xcc] = 0x7d, [0xcd] = 0x15...}, checksum = 0x0, b_ready = 0x0 } Quit Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] UART1_RxCpltCallback (huart=0x20000a60 ) at shared/drivers/p_serial_mgr.c:86 warning: Source file is more recent than executable. 86 if (rxc == 0x7E) ### Assembly ################################################################## 0x080041cc UART1_RxCpltCallback+152 str r2, [r3, #4] 0x080041ce UART1_RxCpltCallback+154 ldr r3, [pc, #244] ; (0x80042c4 ) 0x080041d0 UART1_RxCpltCallback+156 movs r2, #2 0x080041d2 UART1_RxCpltCallback+158 strb r2, [r3, #0] 0x080041d4 UART1_RxCpltCallback+160 b.n 0x80042ae 0x080041d6 UART1_RxCpltCallback+162 ldr r3, [pc, #240] ; (0x80042c8 ) 0x080041d8 UART1_RxCpltCallback+164 ldrb r3, [r3, #0] 0x080041da UART1_RxCpltCallback+166 cmp r3, #126 ; 0x7e 0x080041dc UART1_RxCpltCallback+168 beq.n 0x8004216 0x080041de UART1_RxCpltCallback+170 cmp r3, #125 ; 0x7d ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x20000a60 r8 0x00000000 xPSR 0x81000035 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x40013808 r10 0x00000000 msp 0x2000ff60 r3 0x00000002 r11 0x00000000 psp 0x00000000 r4 0x20000a60 r12 0x00001000 primask 0x00 r5 0x00004001 sp 0x2000ff60 basepri 0x00 r6 0x00000000 lr 0x0800348f faultmask 0x00 r7 0x00000000 pc 0x080041d6 control 0x00 ### Source #################################################################### 76 default: 77 { 78 // shouldnt get here 79 asm volatile("nop"); 80 } 81 }; 82 } 83 break; 84 case SS_FRAME: 85 { 86 if (rxc == 0x7E) 87 { 88 asm volatile("nop"); 89 // error occured. bail 90 #pragma message(Reminder "add a safe escape routine for this") 91 sstate = SS_IDLE; 92 memset(&serial_pkt_cb.buffer[serial_pkt_cb.head], 0, sizeof(serial_pkt_t)); 93 } 94 else if (rxc == 0x7D) 95 { ### Stack ##################################################################### [0] from 0x080041d6 in UART1_RxCpltCallback+162 at shared/drivers/p_serial_mgr.c:86 [1] from 0x0800348e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035e0 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001584 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x08004320 in p_serial_mgr_service+8 at shared/drivers/p_serial_mgr.c:155 [6] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x080041d6 in UART1_RxCpltCallback+162 at shared/drivers/p_serial_mgr.c:86 ### Variables ################################################################# arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi… ############################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08004368 msp: 0x20010000 Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9710 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x80098d0 Loading section .ARM, size 0x8 lma 0x8009da8 Loading section .init_array, size 0x8 lma 0x8009db0 Loading section .fini_array, size 0x8 lma 0x8009db8 Loading section .data, size 0x9a8 lma 0x8009dc0 Start address 0x08004368, load size 42808 Transfer rate: 29 KB/sec, 4756 bytes/write. Breakpoint 1 at 0x800414a: file shared/drivers/p_serial_mgr.c, line 46. Note: automatically using hardware breakpoints for read-only addresses. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### Breakpoint 1, UART1_RxCpltCallback (huart=0x20000a60 ) at shared/drivers/p_serial_mgr.c:46 46 if (rxc == 0x7E) ### Assembly ################################################################## 0x0800413c UART1_RxCpltCallback+8 bhi.w 0x80042bc 0x08004140 UART1_RxCpltCallback+12 tbb [pc, r3] 0x08004144 UART1_RxCpltCallback+16 lsrs r3, r0, #16 0x08004146 UART1_RxCpltCallback+18 ldrb r1, [r1, #13] 0x08004148 UART1_RxCpltCallback+20 lsls r5, r3, #2 !0x0800414a UART1_RxCpltCallback+22 ldr r3, [pc, #380] ; (0x80042c8 ) 0x0800414c UART1_RxCpltCallback+24 ldrb r3, [r3, #0] 0x0800414e UART1_RxCpltCallback+26 cmp r3, #126 ; 0x7e 0x08004150 UART1_RxCpltCallback+28 bne.w 0x80042ae 0x08004154 UART1_RxCpltCallback+32 ldr r3, [pc, #364] ; (0x80042c4 ) ### Breakpoints ############################################################### [1] break at 0x0800414a in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:44 hit 1 time ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x20000a60 r8 0x00000000 xPSR 0x81000035 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x40013808 r10 0x00000000 msp 0x2000ff60 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x20000a60 r12 0x00001000 primask 0x00 r5 0x00004001 sp 0x2000ff60 basepri 0x00 r6 0x00000000 lr 0x0800348f faultmask 0x00 r7 0x00000000 pc 0x0800414a control 0x00 ### Source #################################################################### 36 static volatile uint8_t frame_index_tracker = 0; 37 38 #pragma message(Reminder "Move away from cirular buffer to a managed queue") 39 40 void UART1_RxCpltCallback(UART_HandleTypeDef *huart) 41 { 42 switch (sstate) 43 { 44 case SS_IDLE: // packet start 45 { !46 if (rxc == 0x7E) 47 { 48 sstate = SS_START; 49 } 50 } 51 break; 52 case SS_START: 53 { 54 switch (start_index_tracker) 55 { ### Stack ##################################################################### [0] from 0x0800414a in UART1_RxCpltCallback+22 at shared/drivers/p_serial_mgr.c:46 [1] from 0x0800348e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035e0 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001584 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x08004320 in p_serial_mgr_service+8 at shared/drivers/p_serial_mgr.c:155 [6] from 0x0800151e in main+170 at Core/Src/main.c:146 ### Threads ################################################################### [1] id 0 from 0x0800414a in UART1_RxCpltCallback+22 at shared/drivers/p_serial_mgr.c:46 ### Variables ################################################################# arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi… ############################################################################### $1 = 0 $2 = { src_addr = 0 '\000', dest_addr = 0 '\000', len = 134234985, frame_data = "e\025\000\bg\025\000\bi\025\000\bk\025\000\bm\025\000\b", '\000' , "o\025\000\bq\025\000\b\000\000\000\000s\025\000\bu\025\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\271C\000\b\000\000\000\000\000\000\000\000\271C\000\b\271C\000\b\000\000\000\000\000\000\000\000\271C\000\b"..., checksum = 0 '\000', b_ready = false } $3 = { src_addr = 0x0, dest_addr = 0x0, len = 0x8004369, frame_data = {[0x0] = 0x65, [0x1] = 0x15, [0x2] = 0x0, [0x3] = 0x8, [0x4] = 0x67, [0x5] = 0x15, [0x6] = 0x0, [0x7] = 0x8, [0x8] = 0x69, [0x9] = 0x15, [0xa] = 0x0, [0xb] = 0x8, [0xc] = 0x6b, [0xd] = 0x15, [0xe] = 0x0, [0xf] = 0x8, [0x10] = 0x6d, [0x11] = 0x15, [0x12] = 0x0, [0x13] = 0x8, [0x14] = 0x0 , [0x24] = 0x6f, [0x25] = 0x15, [0x26] = 0x0, [0x27] = 0x8, [0x28] = 0x71, [0x29] = 0x15, [0x2a] = 0x0, [0x2b] = 0x8, [0x2c] = 0x0, [0x2d] = 0x0, [0x2e] = 0x0, [0x2f] = 0x0, [0x30] = 0x73, [0x31] = 0x15, [0x32] = 0x0, [0x33] = 0x8, [0x34] = 0x75, [0x35] = 0x15, [0x36] = 0x0, [0x37] = 0x8, [0x38] = 0xb9, [0x39] = 0x43, [0x3a] = 0x0, [0x3b] = 0x8, [0x3c] = 0xb9, [0x3d] = 0x43, [0x3e] = 0x0, [0x3f] = 0x8, [0x40] = 0xb9, [0x41] = 0x43, [0x42] = 0x0, [0x43] = 0x8, [0x44] = 0xb9, [0x45] = 0x43, [0x46] = 0x0, [0x47] = 0x8, [0x48] = 0xb9, [0x49] = 0x43, [0x4a] = 0x0, [0x4b] = 0x8, [0x4c] = 0xb9, [0x4d] = 0x43, [0x4e] = 0x0, [0x4f] = 0x8, [0x50] = 0xb9, [0x51] = 0x43, [0x52] = 0x0, [0x53] = 0x8, [0x54] = 0xb9, [0x55] = 0x43, [0x56] = 0x0, [0x57] = 0x8, [0x58] = 0xb9, [0x59] = 0x43, [0x5a] = 0x0, [0x5b] = 0x8, [0x5c] = 0xb9, [0x5d] = 0x43, [0x5e] = 0x0, [0x5f] = 0x8, [0x60] = 0xb9, [0x61] = 0x43, [0x62] = 0x0, [0x63] = 0x8, [0x64] = 0xb9, [0x65] = 0x43, [0x66] = 0x0, [0x67] = 0x8, [0x68] = 0xb9, [0x69] = 0x43, [0x6a] = 0x0, [0x6b] = 0x8, [0x6c] = 0xb9, [0x6d] = 0x43, [0x6e] = 0x0, [0x6f] = 0x8, [0x70] = 0xb9, [0x71] = 0x43, [0x72] = 0x0, [0x73] = 0x8, [0x74] = 0xb9, [0x75] = 0x43, [0x76] = 0x0, [0x77] = 0x8, [0x78] = 0xb9, [0x79] = 0x43, [0x7a] = 0x0, [0x7b] = 0x8, [0x7c] = 0xb9, [0x7d] = 0x43, [0x7e] = 0x0, [0x7f] = 0x8, [0x80] = 0xb9, [0x81] = 0x43, [0x82] = 0x0, [0x83] = 0x8, [0x84] = 0xb9, [0x85] = 0x43, [0x86] = 0x0, [0x87] = 0x8, [0x88] = 0xb9, [0x89] = 0x43, [0x8a] = 0x0, [0x8b] = 0x8, [0x8c] = 0xb9, [0x8d] = 0x43, [0x8e] = 0x0, [0x8f] = 0x8, [0x90] = 0xb9, [0x91] = 0x43, [0x92] = 0x0, [0x93] = 0x8, [0x94] = 0xb9, [0x95] = 0x43, [0x96] = 0x0, [0x97] = 0x8, [0x98] = 0xb9, [0x99] = 0x43, [0x9a] = 0x0, [0x9b] = 0x8, [0x9c] = 0xb9, [0x9d] = 0x43, [0x9e] = 0x0, [0x9f] = 0x8, [0xa0] = 0xb9, [0xa1] = 0x43, [0xa2] = 0x0, [0xa3] = 0x8, [0xa4] = 0xb9, [0xa5] = 0x43, [0xa6] = 0x0, [0xa7] = 0x8, [0xa8] = 0xb9, [0xa9] = 0x43, [0xaa] = 0x0, [0xab] = 0x8, [0xac] = 0x0, [0xad] = 0x0, [0xae] = 0x0, [0xaf] = 0x0, [0xb0] = 0x0, [0xb1] = 0x0, [0xb2] = 0x0, [0xb3] = 0x0, [0xb4] = 0xb9, [0xb5] = 0x43, [0xb6] = 0x0, [0xb7] = 0x8, [0xb8] = 0xb9, [0xb9] = 0x43, [0xba] = 0x0, [0xbb] = 0x8, [0xbc] = 0x0, [0xbd] = 0x0, [0xbe] = 0x0, [0xbf] = 0x0, [0xc0] = 0x0, [0xc1] = 0x0, [0xc2] = 0x0, [0xc3] = 0x0, [0xc4] = 0xb9, [0xc5] = 0x43, [0xc6] = 0x0, [0xc7] = 0x8, [0xc8] = 0x0, [0xc9] = 0x0, [0xca] = 0x0, [0xcb] = 0x0, [0xcc] = 0x7d, [0xcd] = 0x15...}, checksum = 0x0, b_ready = 0x0 } Quit $4 = 268 Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] 0x0800414a in UART1_RxCpltCallback (huart=0x20000a60 ) at shared/drivers/p_serial_mgr.c:42 42 switch (sstate) ### Assembly ############################################################################################################################ 0x0800413c UART1_RxCpltCallback+4 bhi.w 0x80042bc 0x08004140 UART1_RxCpltCallback+8 tbb [pc, r3] 0x08004144 UART1_RxCpltCallback+12 lsrs r3, r0, #16 0x08004146 UART1_RxCpltCallback+14 ldrb r1, [r1, #13] 0x08004148 UART1_RxCpltCallback+16 lsls r5, r3, #2 0x0800414a UART1_RxCpltCallback+18 ldr r3, [pc, #380] ; (0x80042c8 ) 0x0800414c UART1_RxCpltCallback+20 ldrb r3, [r3, #0] 0x0800414e UART1_RxCpltCallback+22 cmp r3, #126 ; 0x7e 0x08004150 UART1_RxCpltCallback+24 bne.w 0x80042ae 0x08004154 UART1_RxCpltCallback+28 ldr r3, [pc, #364] ; (0x80042c4 ) ### Breakpoints ######################################################################################################################### ### Expressions ######################################################################################################################### ### History ############################################################################################################################# ### Memory ############################################################################################################################## ### Registers ########################################################################################################################### r0 0x20000a60 r4 0x20000a60 r8 0x00000000 r12 0x00001000 xPSR 0x81000035 primask 0x00 r1 0x00000000 r5 0x00004001 r9 0x00000000 sp 0x2000ff60 fpscr 0x00000010 basepri 0x00 r2 0x40013808 r6 0x00000000 r10 0x00000000 lr 0x0800348f msp 0x2000ff60 faultmask 0x00 r3 0x00000000 r7 0x00000000 r11 0x00000000 pc 0x0800414a psp 0x00000000 control 0x00 ### Source ############################################################################################################################## 32 static serial_pkt_t pkt_bank[10]; 33 static p_cb_serial_pkt_t serial_pkt_cb; 34 35 static volatile uint8_t start_index_tracker = 0; 36 static volatile uint8_t frame_index_tracker = 0; 37 38 #pragma message(Reminder "Move away from cirular buffer to a managed queue") 39 40 void UART1_RxCpltCallback(UART_HandleTypeDef *huart) 41 { 42 switch (sstate) 43 { 44 case SS_IDLE: // packet start 45 { 46 if (rxc == 0x7E) 47 { 48 sstate = SS_START; 49 } 50 } 51 break; ### Stack ############################################################################################################################### [0] from 0x0800414a in UART1_RxCpltCallback+18 at shared/drivers/p_serial_mgr.c:42 [1] from 0x0800348e in UART_RxISR_8BIT+126 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035e0 in HAL_UART_IRQHandler+104 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2345 [3] from 0x08001584 in USART1_IRQHandler+4 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x08004320 in p_serial_mgr_init+4 at shared/drivers/p_serial_mgr.c:145 [6] from 0x200016b4 in end ### Threads ############################################################################################################################# [1] id 0 from 0x0800414a in UART1_RxCpltCallback+18 at shared/drivers/p_serial_mgr.c:42 ### Variables ########################################################################################################################### arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi… ######################################################################################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08004368 msp: 0x20010000 Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9750 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009910 Loading section .ARM, size 0x8 lma 0x8009de8 Loading section .init_array, size 0x8 lma 0x8009df0 Loading section .fini_array, size 0x8 lma 0x8009df8 Loading section .data, size 0x9a8 lma 0x8009e00 Start address 0x080043a8, load size 42872 Transfer rate: 29 KB/sec, 4763 bytes/write. Breakpoint 1 at 0x800414e: file shared/drivers/p_serial_mgr.c, line 46. Note: automatically using hardware breakpoints for read-only addresses. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ##################################################################################################################### Breakpoint 1, UART1_RxCpltCallback (huart=0x20000a60 ) at shared/drivers/p_serial_mgr.c:46 46 if (rxc == 0x7E) ### Assembly ############################################################################################################################ 0x08004144 UART1_RxCpltCallback+12 lsrs r3, r0, #16 0x08004146 UART1_RxCpltCallback+14 ldrb r1, [r1, #13] 0x08004148 UART1_RxCpltCallback+16 lsls r5, r3, #2 0x0800414a UART1_RxCpltCallback+18 ldr r3, [pc, #380] ; (0x80042c8 ) 0x0800414c UART1_RxCpltCallback+20 ldrb r3, [r3, #0] !0x0800414e UART1_RxCpltCallback+22 cmp r3, #126 ; 0x7e 0x08004150 UART1_RxCpltCallback+24 bne.w 0x80042ae 0x08004154 UART1_RxCpltCallback+28 ldr r3, [pc, #364] ; (0x80042c4 ) 0x08004156 UART1_RxCpltCallback+30 movs r2, #1 0x08004158 UART1_RxCpltCallback+32 strb r2, [r3, #0] ### Breakpoints ######################################################################################################################### [1] break at 0x0800414e in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:44 hit 1 time ### Expressions ######################################################################################################################### ### History ############################################################################################################################# ### Memory ############################################################################################################################## ### Registers ########################################################################################################################### r0 0x20000a60 r4 0x20000a60 r8 0x00000000 r12 0x00001000 xPSR 0x81000035 primask 0x00 r1 0x00000000 r5 0x00004001 r9 0x00000000 sp 0x2000ff60 fpscr 0x00000010 basepri 0x00 r2 0x40013808 r6 0x00000000 r10 0x00000000 lr 0x08003493 msp 0x2000ff60 faultmask 0x00 r3 0x00000000 r7 0x00000000 r11 0x00000000 pc 0x0800414e psp 0x00000000 control 0x00 ### Source ############################################################################################################################## 36 static volatile uint8_t frame_index_tracker = 0; 37 38 #pragma message(Reminder "Move away from cirular buffer to a managed queue") 39 40 void UART1_RxCpltCallback(UART_HandleTypeDef *huart) 41 { 42 switch (sstate) 43 { 44 case SS_IDLE: // packet start 45 { !46 if (rxc == 0x7E) 47 { 48 sstate = SS_START; 49 } 50 } 51 break; 52 case SS_START: 53 { 54 switch (start_index_tracker) 55 { ### Stack ############################################################################################################################### [0] from 0x0800414e in UART1_RxCpltCallback+22 at shared/drivers/p_serial_mgr.c:46 [1] from 0x08003492 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035e4 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x0800437a in p_serial_mgr_service+38 at shared/drivers/p_serial_mgr.c:162 [6] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ############################################################################################################################# [1] id 0 from 0x0800414e in UART1_RxCpltCallback+22 at shared/drivers/p_serial_mgr.c:46 ### Variables ########################################################################################################################### arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi… ######################################################################################################################################### $1 = 261 Continuing. ### Output/messages ##################################################################################################################### halted: PC: 0x08004150 Program received signal SIGINT, Interrupt. HAL_TIM_IRQHandler (htim=0x20000a14 ) at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c:3965 3965 if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_BREAK) != RESET) ### Assembly ############################################################################################################################ 0x08001af2 HAL_TIM_IRQHandler+198 tst.w r2, #1 0x08001af6 HAL_TIM_IRQHandler+202 beq.n 0x8001b00 0x08001af8 HAL_TIM_IRQHandler+204 ldr r2, [r3, #12] 0x08001afa HAL_TIM_IRQHandler+206 tst.w r2, #1 0x08001afe HAL_TIM_IRQHandler+210 bne.n 0x8001b80 0x08001b00 HAL_TIM_IRQHandler+212 ldr r3, [r4, #0] 0x08001b02 HAL_TIM_IRQHandler+214 ldr r2, [r3, #16] 0x08001b04 HAL_TIM_IRQHandler+216 tst.w r2, #128 ; 0x80 0x08001b08 HAL_TIM_IRQHandler+220 beq.n 0x8001b12 0x08001b0a HAL_TIM_IRQHandler+222 ldr r2, [r3, #12] ### Breakpoints ######################################################################################################################### [1] break at 0x0800414e in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:44 hit 1 time ### Expressions ######################################################################################################################### ### History ############################################################################################################################# $$0 = 261 ### Memory ############################################################################################################################## ### Registers ########################################################################################################################### r0 0x20000a14 r4 0x20000a14 r8 0x00000000 r12 0x00001000 xPSR 0x21000046 primask 0x00 r1 0x000000fa r5 0x200009c8 r9 0x00000000 sp 0x2000ff78 fpscr 0x00000010 basepri 0x00 r2 0x00002e66 r6 0x00000000 r10 0x00000000 lr 0x08001b8d msp 0x2000ff78 faultmask 0x00 r3 0x00000080 r7 0x00000000 r11 0x00000000 pc 0x08001b00 psp 0x00000000 control 0x00 ### Source ############################################################################################################################## 3955 { 3956 __HAL_TIM_CLEAR_IT(htim, TIM_IT_UPDATE); 3957 #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) 3958 htim->PeriodElapsedCallback(htim); 3959 #else 3960 HAL_TIM_PeriodElapsedCallback(htim); 3961 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ 3962 } 3963 } 3964 /* TIM Break input event */ 3965 if (__HAL_TIM_GET_FLAG(htim, TIM_FLAG_BREAK) != RESET) 3966 { 3967 if (__HAL_TIM_GET_IT_SOURCE(htim, TIM_IT_BREAK) != RESET) 3968 { 3969 __HAL_TIM_CLEAR_IT(htim, TIM_IT_BREAK); 3970 #if (USE_HAL_TIM_REGISTER_CALLBACKS == 1) 3971 htim->BreakCallback(htim); 3972 #else 3973 HAL_TIMEx_BreakCallback(htim); 3974 #endif /* USE_HAL_TIM_REGISTER_CALLBACKS */ ### Stack ############################################################################################################################### [0] from 0x08001b00 in HAL_TIM_IRQHandler+212 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c:3965 [1] from 0x080015a8 in TIM6_DAC_IRQHandler+8 at Core/Src/stm32l4xx_it.c:239 [2] from 0xffffffe9 [3] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ############################################################################################################################# [1] id 0 from 0x08001b00 in HAL_TIM_IRQHandler+212 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_tim.c:3965 ### Variables ########################################################################################################################### arg htim = 0x20000a14 : {Instance = 0x40001000,Init = {Prescaler = 127,CounterMode = 0,Period =… ######################################################################################################################################### Continuing. ### Output/messages ##################################################################################################################### Program received signal SIGINT, Interrupt. 0x080014f6 in main () at Core/Src/main.c:146 146 if ((pkt = p_serial_mgr_service()) != NULL) ### Assembly ############################################################################################################################ 0x080014e6 main+114 bl 0x80019b8 0x080014ea main+118 bl 0x8004384 0x080014ee main+122 bl 0x8004354 0x080014f2 main+126 mov r4, r0 0x080014f4 main+128 cmp r0, #0 0x080014f6 main+130 beq.n 0x80014ee 0x080014f8 main+132 ldrb.w r2, [r0, #257] ; 0x101 0x080014fc main+136 ldrb.w r1, [r0, #256] ; 0x100 0x08001500 main+140 ldr r0, [pc, #80] ; (0x8001554 ) 0x08001502 main+142 bl 0x800407c ### Breakpoints ######################################################################################################################### [1] break at 0x0800414e in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:44 hit 1 time ### Expressions ######################################################################################################################### ### History ############################################################################################################################# $$0 = 261 ### Memory ############################################################################################################################## ### Registers ########################################################################################################################### r0 0x00000000 r4 0x00000000 r8 0x00000000 r12 0x00001000 xPSR 0x61000000 primask 0x00 r1 0x00000000 r5 0x200009c8 r9 0x00000000 sp 0x2000fff0 fpscr 0x00000010 basepri 0x00 r2 0x00000000 r6 0x00000000 r10 0x00000000 lr 0x080014f3 msp 0x2000fff0 faultmask 0x00 r3 0x00000000 r7 0x00000000 r11 0x00000000 pc 0x080014f6 psp 0x00000000 control 0x04 ### Source ############################################################################################################################## 136 while (1) 137 { 138 // if (b_timer_struck) 139 // { 140 // // PDEBUG("%d\n", sys_time); 141 // b_timer_struck = false; 142 // motor_degrees = (motor_degrees + 1) % 360; 143 // mc_service(motor_degrees, 50); 144 // } 145 serial_pkt_t *pkt = NULL; 146 if ((pkt = p_serial_mgr_service()) != NULL) 147 { 148 PDEBUG("Source: %02x\n" 149 "Destination: %02x\n", 150 pkt->src_addr, pkt->dest_addr); 151 PDEBUG("Frame Data: \n"); 152 for (int ind = 0; ind < pkt->len; pkt++) 153 { 154 if (ind % 8 == 0) 155 { ### Stack ############################################################################################################################### [0] from 0x080014f6 in main+130 at Core/Src/main.c:146 ### Threads ############################################################################################################################# [1] id 0 from 0x080014f6 in main+130 at Core/Src/main.c:146 ### Variables ########################################################################################################################### loc pkt = 0x0: {frame_data = "\000\000\001 \251C\000\bi\025\000\bk\025\000\bm\025\000\bo\025\000\bq\0… ######################################################################################################################################### Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ##################################################################################################################### Breakpoint 1, UART1_RxCpltCallback (huart=0x20000a60 ) at shared/drivers/p_serial_mgr.c:46 46 if (rxc == 0x7E) ### Assembly ############################################################################################################################ 0x08004140 UART1_RxCpltCallback+8 bhi.w 0x80042f8 0x08004144 UART1_RxCpltCallback+12 tbb [pc, r3] 0x08004148 UART1_RxCpltCallback+16 lsrs r3, r0, #16 0x0800414a UART1_RxCpltCallback+18 ldrh r7, [r1, #42] ; 0x2a 0x0800414c UART1_RxCpltCallback+20 lsls r0, r7, #2 !0x0800414e UART1_RxCpltCallback+22 ldr r3, [pc, #436] ; (0x8004304 ) 0x08004150 UART1_RxCpltCallback+24 ldrb r3, [r3, #0] 0x08004152 UART1_RxCpltCallback+26 cmp r3, #126 ; 0x7e 0x08004154 UART1_RxCpltCallback+28 bne.w 0x80042ea 0x08004158 UART1_RxCpltCallback+32 ldr r3, [pc, #420] ; (0x8004300 ) ### Breakpoints ######################################################################################################################### [1] break at 0x0800414e in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:44 hit 1 time ### Expressions ######################################################################################################################### ### History ############################################################################################################################# $$0 = 261 ### Memory ############################################################################################################################## ### Registers ########################################################################################################################### r0 0x20000a60 r4 0x20000a60 r8 0x00000000 r12 0x00001000 xPSR 0x81000035 primask 0x00 r1 0x00000000 r5 0x00004001 r9 0x00000000 sp 0x2000ff60 fpscr 0x00000010 basepri 0x00 r2 0x40013808 r6 0x00000000 r10 0x00000000 lr 0x08003493 msp 0x2000ff60 faultmask 0x00 r3 0x00000000 r7 0x00000000 r11 0x00000000 pc 0x0800414e psp 0x00000000 control 0x00 ### Source ############################################################################################################################## 36 static volatile uint8_t frame_index_tracker = 0; 37 38 #pragma message(Reminder "Move away from cirular buffer to a managed queue") 39 40 void UART1_RxCpltCallback(UART_HandleTypeDef *huart) 41 { 42 switch (sstate) 43 { 44 case SS_IDLE: // packet start 45 { !46 if (rxc == 0x7E) 47 { 48 sstate = SS_START; 49 } 50 } 51 break; 52 case SS_START: 53 { 54 switch (start_index_tracker) 55 { ### Stack ############################################################################################################################### [0] from 0x0800414e in UART1_RxCpltCallback+22 at shared/drivers/p_serial_mgr.c:46 [1] from 0x08003492 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035e4 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x08004354 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:155 [6] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ############################################################################################################################# [1] id 0 from 0x0800414e in UART1_RxCpltCallback+22 at shared/drivers/p_serial_mgr.c:46 ### Variables ########################################################################################################################### arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi… ######################################################################################################################################### `/storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf' has changed; re-reading symbols. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ##################################################################################################################### Breakpoint 1, UART1_RxCpltCallback (huart=0x20000a60 ) at shared/drivers/p_serial_mgr.c:46 46 if (rxc == 0x7E) ### Assembly ############################################################################################################################ 0x08004140 UART1_RxCpltCallback+8 bhi.w 0x80042f8 0x08004144 UART1_RxCpltCallback+12 tbb [pc, r3] 0x08004148 UART1_RxCpltCallback+16 lsrs r3, r0, #16 0x0800414a UART1_RxCpltCallback+18 ldrh r7, [r1, #42] ; 0x2a 0x0800414c UART1_RxCpltCallback+20 lsls r0, r7, #2 !0x0800414e UART1_RxCpltCallback+22 ldr r3, [pc, #436] ; (0x8004304 ) 0x08004150 UART1_RxCpltCallback+24 ldrb r3, [r3, #0] 0x08004152 UART1_RxCpltCallback+26 cmp r3, #126 ; 0x7e 0x08004154 UART1_RxCpltCallback+28 bne.w 0x80042ea 0x08004158 UART1_RxCpltCallback+32 ldr r3, [pc, #420] ; (0x8004300 ) ### Breakpoints ######################################################################################################################### [1] break at 0x0800414e in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:44 hit 1 time ### Expressions ######################################################################################################################### ### History ############################################################################################################################# $$0 = 261 ### Memory ############################################################################################################################## ### Registers ########################################################################################################################### r0 0x20000a60 r4 0x20000a60 r8 0x00000000 r12 0x00001000 xPSR 0x81000035 primask 0x00 r1 0x00000000 r5 0x00004001 r9 0x00000000 sp 0x2000ff60 fpscr 0x00000010 basepri 0x00 r2 0x40013808 r6 0x00000000 r10 0x00000000 lr 0x08003493 msp 0x2000ff60 faultmask 0x00 r3 0x00000000 r7 0x00000000 r11 0x00000000 pc 0x0800414e psp 0x00000000 control 0x00 ### Source ############################################################################################################################## 36 static volatile uint8_t frame_index_tracker = 0; 37 38 #pragma message(Reminder "Move away from cirular buffer to a managed queue") 39 40 void UART1_RxCpltCallback(UART_HandleTypeDef *huart) 41 { 42 switch (sstate) 43 { 44 case SS_IDLE: // packet start 45 { !46 if (rxc == 0x7E) 47 { 48 sstate = SS_START; 49 } 50 } 51 break; 52 case SS_START: 53 { 54 switch (start_index_tracker) 55 { ### Stack ############################################################################################################################### [0] from 0x0800414e in UART1_RxCpltCallback+22 at shared/drivers/p_serial_mgr.c:46 [1] from 0x08003492 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035e4 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x0800435a in p_serial_mgr_init+50 at shared/drivers/p_serial_mgr.c:151 [6] from 0x2000166c in heap_end ### Threads ############################################################################################################################# [1] id 0 from 0x0800414e in UART1_RxCpltCallback+22 at shared/drivers/p_serial_mgr.c:46 ### Variables ########################################################################################################################### arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi… ######################################################################################################################################### Continuing. ### Output/messages ##################################################################################################################### halted: PC: 0x08004150 Program received signal SIGINT, Interrupt. 0x080014f2 in main () at Core/Src/main.c:146 146 if ((pkt = p_serial_mgr_service()) != NULL) ### Assembly ############################################################################################################################ 0x080014e0 main+108 bl 0x8003f6c 0x080014e4 main+112 ldr r0, [pc, #104] ; (0x8001550 ) 0x080014e6 main+114 bl 0x80019b8 0x080014ea main+118 bl 0x8004384 0x080014ee main+122 bl 0x8004354 0x080014f2 main+126 mov r4, r0 0x080014f4 main+128 cmp r0, #0 0x080014f6 main+130 beq.n 0x80014ee 0x080014f8 main+132 ldrb.w r2, [r0, #257] ; 0x101 0x080014fc main+136 ldrb.w r1, [r0, #256] ; 0x100 ### Breakpoints ######################################################################################################################### [1] break at 0x0800414e in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:44 hit 1 time ### Expressions ######################################################################################################################### ### History ############################################################################################################################# $$0 = 261 ### Memory ############################################################################################################################## ### Registers ########################################################################################################################### r0 0x00000000 r4 0x00000000 r8 0x00000000 r12 0x00001000 xPSR 0x61000000 primask 0x00 r1 0x00000000 r5 0x200009c8 r9 0x00000000 sp 0x2000fff0 fpscr 0x00000010 basepri 0x00 r2 0x00000000 r6 0x00000000 r10 0x00000000 lr 0x080014f3 msp 0x2000fff0 faultmask 0x00 r3 0x00000000 r7 0x00000000 r11 0x00000000 pc 0x080014f2 psp 0x00000000 control 0x04 ### Source ############################################################################################################################## 136 while (1) 137 { 138 // if (b_timer_struck) 139 // { 140 // // PDEBUG("%d\n", sys_time); 141 // b_timer_struck = false; 142 // motor_degrees = (motor_degrees + 1) % 360; 143 // mc_service(motor_degrees, 50); 144 // } 145 serial_pkt_t *pkt = NULL; 146 if ((pkt = p_serial_mgr_service()) != NULL) 147 { 148 PDEBUG("Source: %02x\n" 149 "Destination: %02x\n", 150 pkt->src_addr, pkt->dest_addr); 151 PDEBUG("Frame Data: \n"); 152 for (int ind = 0; ind < pkt->len; pkt++) 153 { 154 if (ind % 8 == 0) 155 { ### Stack ############################################################################################################################### [0] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ############################################################################################################################# [1] id 0 from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Variables ########################################################################################################################### loc pkt = 0x0: {frame_data = "\000\000\001 \251C\000\bi\025\000\bk\025\000\bm\025\000\bo\025\000\bq\0… ######################################################################################################################################### Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ##################################################################################################################### Breakpoint 1, UART1_RxCpltCallback (huart=0x20000a60 ) at shared/drivers/p_serial_mgr.c:46 46 if (rxc == 0x7E) ### Assembly ############################################################################################################################ 0x08004140 UART1_RxCpltCallback+8 bhi.w 0x80042f8 0x08004144 UART1_RxCpltCallback+12 tbb [pc, r3] 0x08004148 UART1_RxCpltCallback+16 lsrs r3, r0, #16 0x0800414a UART1_RxCpltCallback+18 ldrh r7, [r1, #42] ; 0x2a 0x0800414c UART1_RxCpltCallback+20 lsls r0, r7, #2 !0x0800414e UART1_RxCpltCallback+22 ldr r3, [pc, #436] ; (0x8004304 ) 0x08004150 UART1_RxCpltCallback+24 ldrb r3, [r3, #0] 0x08004152 UART1_RxCpltCallback+26 cmp r3, #126 ; 0x7e 0x08004154 UART1_RxCpltCallback+28 bne.w 0x80042ea 0x08004158 UART1_RxCpltCallback+32 ldr r3, [pc, #420] ; (0x8004300 ) ### Breakpoints ######################################################################################################################### [1] break at 0x0800414e in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:44 hit 1 time ### Expressions ######################################################################################################################### ### History ############################################################################################################################# $$0 = 261 ### Memory ############################################################################################################################## ### Registers ########################################################################################################################### r0 0x20000a60 r4 0x20000a60 r8 0x00000000 r12 0x00001000 xPSR 0x81000035 primask 0x00 r1 0x00000000 r5 0x00004001 r9 0x00000000 sp 0x2000ff60 fpscr 0x00000010 basepri 0x00 r2 0x40013808 r6 0x00000000 r10 0x00000000 lr 0x08003493 msp 0x2000ff60 faultmask 0x00 r3 0x00000000 r7 0x00000000 r11 0x00000000 pc 0x0800414e psp 0x00000000 control 0x00 ### Source ############################################################################################################################## 36 static volatile uint8_t frame_index_tracker = 0; 37 38 #pragma message(Reminder "Move away from cirular buffer to a managed queue") 39 40 void UART1_RxCpltCallback(UART_HandleTypeDef *huart) 41 { 42 switch (sstate) 43 { 44 case SS_IDLE: // packet start 45 { !46 if (rxc == 0x7E) 47 { 48 sstate = SS_START; 49 } 50 } 51 break; 52 case SS_START: 53 { 54 switch (start_index_tracker) 55 { ### Stack ############################################################################################################################### [0] from 0x0800414e in UART1_RxCpltCallback+22 at shared/drivers/p_serial_mgr.c:46 [1] from 0x08003492 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035e4 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x08004354 in p_serial_mgr_init+44 at shared/drivers/p_serial_mgr.c:151 [6] from 0x2000166c in heap_end ### Threads ############################################################################################################################# [1] id 0 from 0x0800414e in UART1_RxCpltCallback+22 at shared/drivers/p_serial_mgr.c:46 ### Variables ########################################################################################################################### arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi… ######################################################################################################################################### $2 = 261 $3 = { frame_data = {[0x0] = 0x0, [0x1] = 0x0, [0x2] = 0x1, [0x3] = 0x20, [0x4] = 0xa9, [0x5] = 0x43, [0x6] = 0x0, [0x7] = 0x8, [0x8] = 0x69, [0x9] = 0x15, [0xa] = 0x0, [0xb] = 0x8, [0xc] = 0x6b, [0xd] = 0x15, [0xe] = 0x0, [0xf] = 0x8, [0x10] = 0x6d, [0x11] = 0x15, [0x12] = 0x0, [0x13] = 0x8, [0x14] = 0x6f, [0x15] = 0x15, [0x16] = 0x0, [0x17] = 0x8, [0x18] = 0x71, [0x19] = 0x15, [0x1a] = 0x0, [0x1b] = 0x8, [0x1c] = 0x0 , [0x2c] = 0x73, [0x2d] = 0x15, [0x2e] = 0x0, [0x2f] = 0x8, [0x30] = 0x75, [0x31] = 0x15, [0x32] = 0x0, [0x33] = 0x8, [0x34] = 0x0, [0x35] = 0x0, [0x36] = 0x0, [0x37] = 0x0, [0x38] = 0x77, [0x39] = 0x15, [0x3a] = 0x0, [0x3b] = 0x8, [0x3c] = 0x79, [0x3d] = 0x15, [0x3e] = 0x0, [0x3f] = 0x8, [0x40] = 0xf9, [0x41] = 0x43, [0x42] = 0x0, [0x43] = 0x8, [0x44] = 0xf9, [0x45] = 0x43, [0x46] = 0x0, [0x47] = 0x8, [0x48] = 0xf9, [0x49] = 0x43, [0x4a] = 0x0, [0x4b] = 0x8, [0x4c] = 0xf9, [0x4d] = 0x43, [0x4e] = 0x0, [0x4f] = 0x8, [0x50] = 0xf9, [0x51] = 0x43, [0x52] = 0x0, [0x53] = 0x8, [0x54] = 0xf9, [0x55] = 0x43, [0x56] = 0x0, [0x57] = 0x8, [0x58] = 0xf9, [0x59] = 0x43, [0x5a] = 0x0, [0x5b] = 0x8, [0x5c] = 0xf9, [0x5d] = 0x43, [0x5e] = 0x0, [0x5f] = 0x8, [0x60] = 0xf9, [0x61] = 0x43, [0x62] = 0x0, [0x63] = 0x8, [0x64] = 0xf9, [0x65] = 0x43, [0x66] = 0x0, [0x67] = 0x8, [0x68] = 0xf9, [0x69] = 0x43, [0x6a] = 0x0, [0x6b] = 0x8, [0x6c] = 0xf9, [0x6d] = 0x43, [0x6e] = 0x0, [0x6f] = 0x8, [0x70] = 0xf9, [0x71] = 0x43, [0x72] = 0x0, [0x73] = 0x8, [0x74] = 0xf9, [0x75] = 0x43, [0x76] = 0x0, [0x77] = 0x8, [0x78] = 0xf9, [0x79] = 0x43, [0x7a] = 0x0, [0x7b] = 0x8, [0x7c] = 0xf9, [0x7d] = 0x43, [0x7e] = 0x0, [0x7f] = 0x8, [0x80] = 0xf9, [0x81] = 0x43, [0x82] = 0x0, [0x83] = 0x8, [0x84] = 0xf9, [0x85] = 0x43, [0x86] = 0x0, [0x87] = 0x8, [0x88] = 0xf9, [0x89] = 0x43, [0x8a] = 0x0, [0x8b] = 0x8, [0x8c] = 0xf9, [0x8d] = 0x43, [0x8e] = 0x0, [0x8f] = 0x8, [0x90] = 0xf9, [0x91] = 0x43, [0x92] = 0x0, [0x93] = 0x8, [0x94] = 0xf9, [0x95] = 0x43, [0x96] = 0x0, [0x97] = 0x8, [0x98] = 0xf9, [0x99] = 0x43, [0x9a] = 0x0, [0x9b] = 0x8, [0x9c] = 0xf9, [0x9d] = 0x43, [0x9e] = 0x0, [0x9f] = 0x8, [0xa0] = 0xf9, [0xa1] = 0x43, [0xa2] = 0x0, [0xa3] = 0x8, [0xa4] = 0xf9, [0xa5] = 0x43, [0xa6] = 0x0, [0xa7] = 0x8, [0xa8] = 0xf9, [0xa9] = 0x43, [0xaa] = 0x0, [0xab] = 0x8, [0xac] = 0xf9, [0xad] = 0x43, [0xae] = 0x0, [0xaf] = 0x8, [0xb0] = 0xf9, [0xb1] = 0x43, [0xb2] = 0x0, [0xb3] = 0x8, [0xb4] = 0x0, [0xb5] = 0x0, [0xb6] = 0x0, [0xb7] = 0x0, [0xb8] = 0x0, [0xb9] = 0x0, [0xba] = 0x0, [0xbb] = 0x0, [0xbc] = 0xf9, [0xbd] = 0x43, [0xbe] = 0x0, [0xbf] = 0x8, [0xc0] = 0xf9, [0xc1] = 0x43, [0xc2] = 0x0, [0xc3] = 0x8, [0xc4] = 0x0, [0xc5] = 0x0, [0xc6] = 0x0, [0xc7] = 0x0, [0xc8] = 0x0, [0xc9] = 0x0, [0xca] = 0x0, [0xcb] = 0x0, [0xcc] = 0xf9, [0xcd] = 0x43...}, src_addr = 0x0, dest_addr = 0x0, checksum = 0x0, len = 0x0, b_ready = 0x0 } `/storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf' has changed; re-reading symbols. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ##################################################################################################################### Breakpoint 1, UART1_RxCpltCallback (huart=0x20000a60 ) at shared/drivers/p_serial_mgr.c:46 46 if (rxc == 0x7E) ### Assembly ############################################################################################################################ 0x08004148 UART1_RxCpltCallback+16 lsrs r3, r0, #16 0x0800414a UART1_RxCpltCallback+18 ldrh r7, [r1, #42] ; 0x2a 0x0800414c UART1_RxCpltCallback+20 lsls r0, r7, #2 0x0800414e UART1_RxCpltCallback+22 ldr r3, [pc, #436] ; (0x8004304 ) 0x08004150 UART1_RxCpltCallback+24 ldrb r3, [r3, #0] !0x08004152 UART1_RxCpltCallback+26 cmp r3, #126 ; 0x7e 0x08004154 UART1_RxCpltCallback+28 bne.w 0x80042ea 0x08004158 UART1_RxCpltCallback+32 ldr r3, [pc, #420] ; (0x8004300 ) 0x0800415a UART1_RxCpltCallback+34 movs r2, #1 0x0800415c UART1_RxCpltCallback+36 strb r2, [r3, #0] ### Breakpoints ######################################################################################################################### [1] break at 0x08004152 in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:44 hit 1 time ### Expressions ######################################################################################################################### ### History ############################################################################################################################# $$2 = 261 $$1 = 261 $$0 = {frame_data = "\000\000\001 \251C\000\bi\025\000\bk\025\000\bm\025\000\bo\025\000\bq\025\000\b", '\0… ### Memory ############################################################################################################################## ### Registers ########################################################################################################################### r0 0x20000a60 r4 0x20000a60 r8 0x00000000 r12 0x00001000 xPSR 0x81000035 primask 0x00 r1 0x00000000 r5 0x00004001 r9 0x00000000 sp 0x2000ff60 fpscr 0x00000010 basepri 0x00 r2 0x40013808 r6 0x00000000 r10 0x00000000 lr 0x08003493 msp 0x2000ff60 faultmask 0x00 r3 0x0000007e r7 0x00000000 r11 0x00000000 pc 0x08004152 psp 0x00000000 control 0x00 ### Source ############################################################################################################################## 36 static volatile uint8_t frame_index_tracker = 0; 37 38 #pragma message(Reminder "Move away from cirular buffer to a managed queue") 39 40 void UART1_RxCpltCallback(UART_HandleTypeDef *huart) 41 { 42 switch (sstate) 43 { 44 case SS_IDLE: // packet start 45 { !46 if (rxc == 0x7E) 47 { 48 sstate = SS_START; 49 } 50 } 51 break; 52 case SS_START: 53 { 54 switch (start_index_tracker) 55 { ### Stack ############################################################################################################################### [0] from 0x08004152 in UART1_RxCpltCallback+26 at shared/drivers/p_serial_mgr.c:46 [1] from 0x08003492 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035e4 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x08004354 in p_serial_mgr_init+4 at shared/drivers/p_serial_mgr.c:146 [6] from 0x2000166c in heap_end ### Threads ############################################################################################################################# [1] id 0 from 0x08004152 in UART1_RxCpltCallback+26 at shared/drivers/p_serial_mgr.c:46 ### Variables ########################################################################################################################### arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi… ######################################################################################################################################### $4 = { frame_data = {[0x0] = 0x0, [0x1] = 0x0, [0x2] = 0x1, [0x3] = 0x20, [0x4] = 0xa9, [0x5] = 0x43, [0x6] = 0x0, [0x7] = 0x8, [0x8] = 0x69, [0x9] = 0x15, [0xa] = 0x0, [0xb] = 0x8, [0xc] = 0x6b, [0xd] = 0x15, [0xe] = 0x0, [0xf] = 0x8, [0x10] = 0x6d, [0x11] = 0x15, [0x12] = 0x0, [0x13] = 0x8, [0x14] = 0x6f, [0x15] = 0x15, [0x16] = 0x0, [0x17] = 0x8, [0x18] = 0x71, [0x19] = 0x15, [0x1a] = 0x0, [0x1b] = 0x8, [0x1c] = 0x0 , [0x2c] = 0x73, [0x2d] = 0x15, [0x2e] = 0x0, [0x2f] = 0x8, [0x30] = 0x75, [0x31] = 0x15, [0x32] = 0x0, [0x33] = 0x8, [0x34] = 0x0, [0x35] = 0x0, [0x36] = 0x0, [0x37] = 0x0, [0x38] = 0x77, [0x39] = 0x15, [0x3a] = 0x0, [0x3b] = 0x8, [0x3c] = 0x79, [0x3d] = 0x15, [0x3e] = 0x0, [0x3f] = 0x8, [0x40] = 0xf9, [0x41] = 0x43, [0x42] = 0x0, [0x43] = 0x8, [0x44] = 0xf9, [0x45] = 0x43, [0x46] = 0x0, [0x47] = 0x8, [0x48] = 0xf9, [0x49] = 0x43, [0x4a] = 0x0, [0x4b] = 0x8, [0x4c] = 0xf9, [0x4d] = 0x43, [0x4e] = 0x0, [0x4f] = 0x8, [0x50] = 0xf9, [0x51] = 0x43, [0x52] = 0x0, [0x53] = 0x8, [0x54] = 0xf9, [0x55] = 0x43, [0x56] = 0x0, [0x57] = 0x8, [0x58] = 0xf9, [0x59] = 0x43, [0x5a] = 0x0, [0x5b] = 0x8, [0x5c] = 0xf9, [0x5d] = 0x43, [0x5e] = 0x0, [0x5f] = 0x8, [0x60] = 0xf9, [0x61] = 0x43, [0x62] = 0x0, [0x63] = 0x8, [0x64] = 0xf9, [0x65] = 0x43, [0x66] = 0x0, [0x67] = 0x8, [0x68] = 0xf9, [0x69] = 0x43, [0x6a] = 0x0, [0x6b] = 0x8, [0x6c] = 0xf9, [0x6d] = 0x43, [0x6e] = 0x0, [0x6f] = 0x8, [0x70] = 0xf9, [0x71] = 0x43, [0x72] = 0x0, [0x73] = 0x8, [0x74] = 0xf9, [0x75] = 0x43, [0x76] = 0x0, [0x77] = 0x8, [0x78] = 0xf9, [0x79] = 0x43, [0x7a] = 0x0, [0x7b] = 0x8, [0x7c] = 0xf9, [0x7d] = 0x43, [0x7e] = 0x0, [0x7f] = 0x8, [0x80] = 0xf9, [0x81] = 0x43, [0x82] = 0x0, [0x83] = 0x8, [0x84] = 0xf9, [0x85] = 0x43, [0x86] = 0x0, [0x87] = 0x8, [0x88] = 0xf9, [0x89] = 0x43, [0x8a] = 0x0, [0x8b] = 0x8, [0x8c] = 0xf9, [0x8d] = 0x43, [0x8e] = 0x0, [0x8f] = 0x8, [0x90] = 0xf9, [0x91] = 0x43, [0x92] = 0x0, [0x93] = 0x8, [0x94] = 0xf9, [0x95] = 0x43, [0x96] = 0x0, [0x97] = 0x8, [0x98] = 0xf9, [0x99] = 0x43, [0x9a] = 0x0, [0x9b] = 0x8, [0x9c] = 0xf9, [0x9d] = 0x43, [0x9e] = 0x0, [0x9f] = 0x8, [0xa0] = 0xf9, [0xa1] = 0x43, [0xa2] = 0x0, [0xa3] = 0x8, [0xa4] = 0xf9, [0xa5] = 0x43, [0xa6] = 0x0, [0xa7] = 0x8, [0xa8] = 0xf9, [0xa9] = 0x43, [0xaa] = 0x0, [0xab] = 0x8, [0xac] = 0xf9, [0xad] = 0x43, [0xae] = 0x0, [0xaf] = 0x8, [0xb0] = 0xf9, [0xb1] = 0x43, [0xb2] = 0x0, [0xb3] = 0x8, [0xb4] = 0x0, [0xb5] = 0x0, [0xb6] = 0x0, [0xb7] = 0x0, [0xb8] = 0x0, [0xb9] = 0x0, [0xba] = 0x0, [0xbb] = 0x0, [0xbc] = 0xf9, [0xbd] = 0x43, [0xbe] = 0x0, [0xbf] = 0x8, [0xc0] = 0xf9, [0xc1] = 0x43, [0xc2] = 0x0, [0xc3] = 0x8, [0xc4] = 0x0, [0xc5] = 0x0, [0xc6] = 0x0, [0xc7] = 0x0, [0xc8] = 0x0, [0xc9] = 0x0, [0xca] = 0x0, [0xcb] = 0x0, [0xcc] = 0xf9, [0xcd] = 0x43...}, src_addr = 0x0, dest_addr = 0x0, checksum = 0x0, len = 0x0, b_ready = 0x0 } Continuing. ### Output/messages ##################################################################################################################### halted: PC: 0x08004154 Program received signal SIGINT, Interrupt. 0x0800437c in p_serial_mgr_init (huart=) at shared/drivers/p_serial_mgr.c:151 151 } ### Assembly ############################################################################################################################ 0x08004370 p_serial_mgr_init+32 ldrb.w r2, [r0, #260] ; 0x104 0x08004374 p_serial_mgr_init+36 cmp r2, #0 0x08004376 p_serial_mgr_init+38 beq.n 0x8004358 0x08004378 p_serial_mgr_init+40 b.n 0x800437c 0x0800437a p_serial_mgr_init+42 movs r0, #0 0x0800437c p_serial_mgr_init+44 bx lr 0x0800437e p_serial_mgr_init+46 nop 0x08004380 p_serial_mgr_init+48 asrs r4, r2, #24 0x08004382 p_serial_mgr_init+50 movs r0, #0 0x08004384 p_serial_mgr_init+52 push {r3, lr} ### Breakpoints ######################################################################################################################### [1] break at 0x08004152 in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:44 hit 1 time ### Expressions ######################################################################################################################### ### History ############################################################################################################################# $$2 = 261 $$1 = {frame_data = "\000\000\001 \251C\000\bi\025\000\bk\025\000\bm\025\000\bo\025\000\bq\025\000\b", '\0… $$0 = {frame_data = "\000\000\001 \251C\000\bi\025\000\bk\025\000\bm\025\000\bo\025\000\bq\025\000\b", '\0… ### Memory ############################################################################################################################## ### Registers ########################################################################################################################### r0 0x00000000 r4 0x00000000 r8 0x00000000 r12 0x00001000 xPSR 0x61000000 primask 0x00 r1 0x00000000 r5 0x200009c8 r9 0x00000000 sp 0x2000fff0 fpscr 0x00000010 basepri 0x00 r2 0x00000000 r6 0x00000000 r10 0x00000000 lr 0x080014f3 msp 0x2000fff0 faultmask 0x00 r3 0x00000000 r7 0x00000000 r11 0x00000000 pc 0x0800437c psp 0x00000000 control 0x04 ### Source ############################################################################################################################## 141 // HAL_UART_Receive_IT(&huart1, &huart1_rxc, 1); 142 // HAL_GPIO_WritePin(USART1_DE_GPIO_Port, USART1_DE_Pin, 0); 143 } 144 void p_serial_mgr_init(UART_HandleTypeDef *huart) 145 { 146 _serial_huart_inst = huart; 147 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 148 149 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 150 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 151 } 152 153 serial_pkt_t *p_serial_mgr_service(void) 154 { 155 // this will be less garbage when i switch to a queue 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) 159 { 160 return &serial_pkt_cb.buffer[ind]; ### Stack ############################################################################################################################### [0] from 0x0800437c in p_serial_mgr_init+44 at shared/drivers/p_serial_mgr.c:151 [1] from 0x2000166c in heap_end ### Threads ############################################################################################################################# [1] id 0 from 0x0800437c in p_serial_mgr_init+44 at shared/drivers/p_serial_mgr.c:151 ### Variables ########################################################################################################################### arg huart = ######################################################################################################################################### Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ##################################################################################################################### Breakpoint 1, UART1_RxCpltCallback (huart=0x20000a60 ) at shared/drivers/p_serial_mgr.c:46 46 if (rxc == 0x7E) ### Assembly ############################################################################################################################ 0x08004148 UART1_RxCpltCallback+16 lsrs r3, r0, #16 0x0800414a UART1_RxCpltCallback+18 ldrh r7, [r1, #42] ; 0x2a 0x0800414c UART1_RxCpltCallback+20 lsls r0, r7, #2 0x0800414e UART1_RxCpltCallback+22 ldr r3, [pc, #436] ; (0x8004304 ) 0x08004150 UART1_RxCpltCallback+24 ldrb r3, [r3, #0] !0x08004152 UART1_RxCpltCallback+26 cmp r3, #126 ; 0x7e 0x08004154 UART1_RxCpltCallback+28 bne.w 0x80042ea 0x08004158 UART1_RxCpltCallback+32 ldr r3, [pc, #420] ; (0x8004300 ) 0x0800415a UART1_RxCpltCallback+34 movs r2, #1 0x0800415c UART1_RxCpltCallback+36 strb r2, [r3, #0] ### Breakpoints ######################################################################################################################### [1] break at 0x08004152 in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:44 hit 1 time ### Expressions ######################################################################################################################### ### History ############################################################################################################################# $$2 = 261 $$1 = {frame_data = "\000\000\001 \251C\000\bi\025\000\bk\025\000\bm\025\000\bo\025\000\bq\025\000\b", '\0… $$0 = {frame_data = "\000\000\001 \251C\000\bi\025\000\bk\025\000\bm\025\000\bo\025\000\bq\025\000\b", '\0… ### Memory ############################################################################################################################## ### Registers ########################################################################################################################### r0 0x20000a60 r4 0x20000a60 r8 0x00000000 r12 0x00001000 xPSR 0x81000035 primask 0x00 r1 0x00000000 r5 0x00004001 r9 0x00000000 sp 0x2000ff60 fpscr 0x00000010 basepri 0x00 r2 0x40013808 r6 0x00000000 r10 0x00000000 lr 0x08003493 msp 0x2000ff60 faultmask 0x00 r3 0x0000007e r7 0x00000000 r11 0x00000000 pc 0x08004152 psp 0x00000000 control 0x00 ### Source ############################################################################################################################## 36 static volatile uint8_t frame_index_tracker = 0; 37 38 #pragma message(Reminder "Move away from cirular buffer to a managed queue") 39 40 void UART1_RxCpltCallback(UART_HandleTypeDef *huart) 41 { 42 switch (sstate) 43 { 44 case SS_IDLE: // packet start 45 { !46 if (rxc == 0x7E) 47 { 48 sstate = SS_START; 49 } 50 } 51 break; 52 case SS_START: 53 { 54 switch (start_index_tracker) 55 { ### Stack ############################################################################################################################### [0] from 0x08004152 in UART1_RxCpltCallback+26 at shared/drivers/p_serial_mgr.c:46 [1] from 0x08003492 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035e4 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x08004360 in p_serial_mgr_init+16 at shared/drivers/p_serial_mgr.c:149 [6] from 0x2000166c in heap_end ### Threads ############################################################################################################################# [1] id 0 from 0x08004152 in UART1_RxCpltCallback+26 at shared/drivers/p_serial_mgr.c:46 ### Variables ########################################################################################################################### arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi… ######################################################################################################################################### Continuing. ### Output/messages ##################################################################################################################### halted: PC: 0x08004154 Program received signal SIGINT, Interrupt. p_serial_mgr_init (huart=0x0) at shared/drivers/p_serial_mgr.c:149 149 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); ### Assembly ############################################################################################################################ 0x08004352 p_serial_mgr_init+2 movs r0, #0 0x08004354 p_serial_mgr_init+4 movs r3, #0 0x08004356 p_serial_mgr_init+6 b.n 0x800435a 0x08004358 p_serial_mgr_init+8 adds r3, #1 0x0800435a p_serial_mgr_init+10 ldr r2, [pc, #36] ; (0x8004380 ) 0x0800435c p_serial_mgr_init+12 ldrh r2, [r2, #6] 0x0800435e p_serial_mgr_init+14 cmp r2, r3 0x08004360 p_serial_mgr_init+16 ble.n 0x800437a 0x08004362 p_serial_mgr_init+18 ldr r2, [pc, #28] ; (0x8004380 ) 0x08004364 p_serial_mgr_init+20 ldr r0, [r2, #0] ### Breakpoints ######################################################################################################################### [1] break at 0x08004152 in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:44 hit 1 time ### Expressions ######################################################################################################################### ### History ############################################################################################################################# $$2 = 261 $$1 = {frame_data = "\000\000\001 \251C\000\bi\025\000\bk\025\000\bm\025\000\bo\025\000\bq\025\000\b", '\0… $$0 = {frame_data = "\000\000\001 \251C\000\bi\025\000\bk\025\000\bm\025\000\bo\025\000\bq\025\000\b", '\0… ### Memory ############################################################################################################################## ### Registers ########################################################################################################################### r0 0x00000000 r4 0x00000000 r8 0x00000000 r12 0x00001000 xPSR 0x61000000 primask 0x00 r1 0x00000000 r5 0x200009c8 r9 0x00000000 sp 0x2000fff0 fpscr 0x00000010 basepri 0x00 r2 0x20001614 r6 0x00000000 r10 0x00000000 lr 0x080014f3 msp 0x2000fff0 faultmask 0x00 r3 0x00000000 r7 0x00000000 r11 0x00000000 pc 0x0800435c psp 0x00000000 control 0x04 ### Source ############################################################################################################################## 139 140 // HAL_UART_Transmit(&huart2, &huart2_rxc, 1, 500); 141 // HAL_UART_Receive_IT(&huart1, &huart1_rxc, 1); 142 // HAL_GPIO_WritePin(USART1_DE_GPIO_Port, USART1_DE_Pin, 0); 143 } 144 void p_serial_mgr_init(UART_HandleTypeDef *huart) 145 { 146 _serial_huart_inst = huart; 147 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 148 149 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 150 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 151 } 152 153 serial_pkt_t *p_serial_mgr_service(void) 154 { 155 // this will be less garbage when i switch to a queue 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) ### Stack ############################################################################################################################### [0] from 0x0800435c in p_serial_mgr_init+12 at shared/drivers/p_serial_mgr.c:149 [1] from 0x2000166c in heap_end ### Threads ############################################################################################################################# [1] id 0 from 0x0800435c in p_serial_mgr_init+12 at shared/drivers/p_serial_mgr.c:149 ### Variables ########################################################################################################################### arg huart = 0x0: {Instance = 0x20010000,Init = {BaudRate = 134235049,WordLength = 134223209,StopBits = … ######################################################################################################################################### Quit Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] warning: No executable has been specified and target does not support determining executable automatically. Try using the "file" command. 0x080014f2 in ?? () ### Assembly ################################################################## 0x080014f2 ? mov r4, r0 0x080014f4 ? cmp r0, #0 0x080014f6 ? beq.n 0x80014ee 0x080014f8 ? ldrb.w r2, [r0, #257] ; 0x101 0x080014fc ? ldrb.w r1, [r0, #256] ; 0x100 0x08001500 ? ldr r0, [pc, #80] ; (0x8001554) 0x08001502 ? bl 0x800407c 0x08001506 ? ldr r0, [pc, #80] ; (0x8001558) 0x08001508 ? bl 0x800407c 0x0800150c ? ldrb.w r3, [r4, #259] ; 0x103 ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x61000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000010 r2 0x00000000 r10 0x00000000 msp 0x2000fff0 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00001000 primask 0x00 r5 0x200009c8 sp 0x2000fff0 basepri 0x00 r6 0x00000000 lr 0x080014f3 faultmask 0x00 r7 0x00000000 pc 0x080014f2 control 0x04 ### Source #################################################################### ### Stack ##################################################################### [0] from 0x080014f2 ### Threads ################################################################### [1] id 0 from 0x080014f2 ### Variables ################################################################# ############################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x080043a8 msp: 0x20010000 generic_debug.gdb:7: Error in sourced command file: No executable file specified. Use the "file" or "exec-file" command. Detaching from program: , Remote target [Inferior 1 (Remote target) detached] mc_init (tim=0x0) at shared/devices/motor_controller.c:9 9 _motor_timer = tim; ### Assembly ################################################################## ~ ~ ~ ~ ~ 0x080043a8 mc_init+0 ldr.w sp, [pc, #52] ; 0x80043e0 0x080043ac mc_init+4 bl 0x8004068 0x080043b0 mc_init+8 ldr r0, [pc, #48] ; (0x80043e4 ) 0x080043b2 mc_init+10 ldr r1, [pc, #52] ; (0x80043e8 ) ~ ### Breakpoints ############################################################### ### Expressions ############################################################### ### History ################################################################### ### Memory #################################################################### ### Registers ################################################################# r0 0x00000000 r8 0x00000000 xPSR 0x01000000 r1 0x00000000 r9 0x00000000 fpscr 0x00000000 r2 0x00000000 r10 0x00000000 msp 0x20010000 r3 0x00000000 r11 0x00000000 psp 0x00000000 r4 0x00000000 r12 0x00000000 primask 0x00 r5 0x00000000 sp 0x20010000 basepri 0x00 r6 0x00000000 lr 0xffffffff faultmask 0x00 r7 0x00000000 pc 0x080043a8 control 0x00 ### Source #################################################################### ~ ~ 1 #include "motor_controller.h" 2 #include "putil.h" 3 #include "stm32l4xx_hal_tim.h" 4 #include 5 6 static TIM_HandleTypeDef *_motor_timer = NULL; 7 void mc_init(TIM_HandleTypeDef *tim) 8 { 9 _motor_timer = tim; 10 } 11 12 // degrees is anything from 0-359 13 // speed is anything from 0-99 14 void mc_service(uint16_t degrees, uint8_t speed) 15 { 16 float right_pwm = cos(((float)degrees * (3.1415 / 180.0f))); 17 float left_pwm = right_pwm; 18 // PDEBUG("| DEGREES | COS | SIN | \n"); ### Stack ##################################################################### [0] from 0x080043a8 in mc_init+0 at shared/devices/motor_controller.c:9 [1] from 0xfffffffe ### Threads ################################################################### [1] id 0 from 0x080043a8 in mc_init+0 at shared/devices/motor_controller.c:9 ### Variables ################################################################# arg tim = 0x0: {Instance = 0x20010000,Init = {Prescaler = 134235049,CounterMode = 134223209,Period = … ############################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x080043a8 msp: 0x20010000 Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9758 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009918 Loading section .ARM, size 0x8 lma 0x8009df0 Loading section .init_array, size 0x8 lma 0x8009df8 Loading section .fini_array, size 0x8 lma 0x8009e00 Loading section .data, size 0x9a8 lma 0x8009e08 Start address 0x080043b4, load size 42880 Transfer rate: 29 KB/sec, 4764 bytes/write. Breakpoint 1 at 0x800414e: file shared/drivers/p_serial_mgr.c, line 46. Note: automatically using hardware breakpoints for read-only addresses. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ########################################################### halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 Program received signal SIGINT, Interrupt. 0x08004368 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:156 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ############################################################################################################################ ~ 0x08004360 p_serial_mgr_service+0 movs r3, #0 0x08004362 p_serial_mgr_service+2 b.n 0x8004366 0x08004364 p_serial_mgr_service+4 adds r3, #1 0x08004366 p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x800438c ) 0x08004368 p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x0800436a p_serial_mgr_service+10 cmp r2, r3 0x0800436c p_serial_mgr_service+12 ble.n 0x8004386 0x0800436e p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x800438c ) 0x08004370 p_serial_mgr_service+16 ldr r0, [r2, #0] ### Breakpoints ######################################################################################################################### [1] break at 0x0800414e in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:43 if rxc == 0x7D ### Expressions ######################################################################################################################### ### History ############################################################################################################################# ### Memory ############################################################################################################################## ### Registers ########################################################################################################################### r0 0x00000000 r4 0x00000000 r8 0x00000000 r12 0x00001000 xPSR 0x61000000 primask 0x00 r1 0x00000000 r5 0x200009c8 r9 0x00000000 sp 0x2000fff0 fpscr 0x00000010 basepri 0x00 r2 0x20001614 r6 0x00000000 r10 0x00000000 lr 0x080014f3 msp 0x2000fff0 faultmask 0x00 r3 0x00000000 r7 0x00000000 r11 0x00000000 pc 0x08004368 psp 0x00000000 control 0x04 ### Source ############################################################################################################################## 146 _serial_huart_inst = huart; 147 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 148 149 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 150 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 151 } 152 153 serial_pkt_t *p_serial_mgr_service(void) 154 { 155 // this will be less garbage when i switch to a queue 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) 159 { 160 return &serial_pkt_cb.buffer[ind]; 161 } 162 } 163 return NULL; 164 } 165 ### Stack ############################################################################################################################### [0] from 0x08004368 in p_serial_mgr_service+8 at shared/drivers/p_serial_mgr.c:156 [1] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ############################################################################################################################# [1] id 0 from 0x08004368 in p_serial_mgr_service+8 at shared/drivers/p_serial_mgr.c:156 ### Variables ########################################################################################################################### loc ind = 0 ######################################################################################################################################### `/storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf' has changed; re-reading symbols. Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0xb440 lma 0x80001c0 Loading section .rodata, size 0x4b0 lma 0x800b600 Loading section .ARM, size 0x8 lma 0x800bab0 Loading section .init_array, size 0x8 lma 0x800bab8 Loading section .fini_array, size 0x8 lma 0x800bac0 Loading section .data, size 0x9a8 lma 0x800bac8 Start address 0x0800618c, load size 50240 Transfer rate: 30 KB/sec, 5582 bytes/write. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ##################################################################################################################### halted: PC: 0x08005e46 halted: PC: 0x08005e46 halted: PC: 0x08005e46 halted: PC: 0x08005e46 halted: PC: 0x08005e46 halted: PC: 0x08005e46 halted: PC: 0x08005e46 halted: PC: 0x08005e46 halted: PC: 0x08005e46 halted: PC: 0x08005e46 halted: PC: 0x08005e46 halted: PC: 0x08005e46 halted: PC: 0x08005e46 halted: PC: 0x08005e46 halted: PC: 0x08005e46 halted: PC: 0x08005e46 halted: PC: 0x08005e46 halted: PC: 0x08005e46 halted: PC: 0x08005e46 Program received signal SIGINT, Interrupt. 0x08006134 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:156 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ############################################################################################################################ 0x0800612a p_serial_mgr_service+62 str r3, [r7, #4] 0x0800612c p_serial_mgr_service+64 ldr r3, [pc, #24] ; (0x8006148 ) 0x0800612e p_serial_mgr_service+66 ldrh r3, [r3, #6] 0x08006130 p_serial_mgr_service+68 mov r2, r3 0x08006132 p_serial_mgr_service+70 ldr r3, [r7, #4] 0x08006134 p_serial_mgr_service+72 cmp r3, r2 0x08006136 p_serial_mgr_service+74 blt.n 0x80060f8 0x08006138 p_serial_mgr_service+76 movs r3, #0 0x0800613a p_serial_mgr_service+78 mov r0, r3 0x0800613c p_serial_mgr_service+80 adds r7, #12 ### Breakpoints ######################################################################################################################### [1] break at 0x08005e44 in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:43 if rxc == 0x7D ### Expressions ######################################################################################################################### ### History ############################################################################################################################# ### Memory ############################################################################################################################## ### Registers ########################################################################################################################### r0 0x00000000 r4 0x2000166c r8 0x00000000 r12 0x0000000d xPSR 0x61030000 primask 0x00 r1 0x40013800 r5 0x00000000 r9 0x00000000 sp 0x2000ffd8 fpscr 0x00000010 basepri 0x00 r2 0x00000000 r6 0x00000000 r10 0x00000000 lr 0x080011bd msp 0x2000ffd8 faultmask 0x00 r3 0x00000000 r7 0x2000ffd8 r11 0x00000000 pc 0x08006134 psp 0x00000000 control 0x04 ### Source ############################################################################################################################## 146 _serial_huart_inst = huart; 147 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 148 149 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 150 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 151 } 152 153 serial_pkt_t *p_serial_mgr_service(void) 154 { 155 // this will be less garbage when i switch to a queue 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) 159 { 160 return &serial_pkt_cb.buffer[ind]; 161 } 162 } 163 return NULL; 164 } 165 ### Stack ############################################################################################################################### [0] from 0x08006134 in p_serial_mgr_service+72 at shared/drivers/p_serial_mgr.c:156 [1] from 0x080011bc in main+136 at Core/Src/main.c:146 ### Threads ############################################################################################################################# [1] id 0 from 0x08006134 in p_serial_mgr_service+72 at shared/drivers/p_serial_mgr.c:156 ### Variables ########################################################################################################################### loc ind = 0 ######################################################################################################################################### `/storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf' has changed; re-reading symbols. Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9758 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009918 Loading section .ARM, size 0x8 lma 0x8009df0 Loading section .init_array, size 0x8 lma 0x8009df8 Loading section .fini_array, size 0x8 lma 0x8009e00 Loading section .data, size 0x9a8 lma 0x8009e08 Start address 0x080043b4, load size 42880 Transfer rate: 29 KB/sec, 4764 bytes/write. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ##################################################################################################################### halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 Program received signal SIGINT, Interrupt. 0x080014f2 in main () at Core/Src/main.c:146 146 if ((pkt = p_serial_mgr_service()) != NULL) ### Assembly ############################################################################################################################ 0x080014e0 main+108 bl 0x8003f6c 0x080014e4 main+112 ldr r0, [pc, #104] ; (0x8001550 ) 0x080014e6 main+114 bl 0x80019b8 0x080014ea main+118 bl 0x8004390 0x080014ee main+122 bl 0x8004360 0x080014f2 main+126 mov r4, r0 0x080014f4 main+128 cmp r0, #0 0x080014f6 main+130 beq.n 0x80014ee 0x080014f8 main+132 ldrb.w r2, [r0, #257] ; 0x101 0x080014fc main+136 ldrb.w r1, [r0, #256] ; 0x100 ### Breakpoints ######################################################################################################################### [1] break at 0x0800414e in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:43 if rxc == 0x7D ### Expressions ######################################################################################################################### ### History ############################################################################################################################# ### Memory ############################################################################################################################## ### Registers ########################################################################################################################### r0 0x00000000 r4 0x00000000 r8 0x00000000 r12 0x00001000 xPSR 0x61000000 primask 0x00 r1 0x00000000 r5 0x200009c8 r9 0x00000000 sp 0x2000fff0 fpscr 0x00000010 basepri 0x00 r2 0x00000000 r6 0x00000000 r10 0x00000000 lr 0x080014f3 msp 0x2000fff0 faultmask 0x00 r3 0x00000000 r7 0x00000000 r11 0x00000000 pc 0x080014f2 psp 0x00000000 control 0x04 ### Source ############################################################################################################################## 136 while (1) 137 { 138 // if (b_timer_struck) 139 // { 140 // // PDEBUG("%d\n", sys_time); 141 // b_timer_struck = false; 142 // motor_degrees = (motor_degrees + 1) % 360; 143 // mc_service(motor_degrees, 50); 144 // } 145 serial_pkt_t *pkt = NULL; 146 if ((pkt = p_serial_mgr_service()) != NULL) 147 { 148 PDEBUG("Source: %02x\n" 149 "Destination: %02x\n", 150 pkt->src_addr, pkt->dest_addr); 151 PDEBUG("Frame Data: \n"); 152 for (int ind = 0; ind < pkt->len; pkt++) 153 { 154 if (ind % 8 == 0) 155 { ### Stack ############################################################################################################################### [0] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ############################################################################################################################# [1] id 0 from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Variables ########################################################################################################################### loc pkt = 0x0: {frame_data = "\000\000\001 \265C\000\bi\025\000\bk\025\000\bm\025\000\bo\025\000\bq\0… ######################################################################################################################################### Breakpoint 2 at 0x800414e: file shared/drivers/p_serial_mgr.c, line 46. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ##################################################################################################################### Breakpoint 2, UART1_RxCpltCallback (huart=0x20000a60 ) at shared/drivers/p_serial_mgr.c:46 46 if (rxc == 0x7E) ### Assembly ############################################################################################################################ 0x08004140 UART1_RxCpltCallback+8 bhi.w 0x8004302 0x08004144 UART1_RxCpltCallback+12 tbb [pc, r3] 0x08004148 UART1_RxCpltCallback+16 lsrs r3, r0, #16 0x0800414a UART1_RxCpltCallback+18 ldrh r7, [r1, #42] ; 0x2a 0x0800414c UART1_RxCpltCallback+20 lsls r0, r7, #2 !0x0800414e UART1_RxCpltCallback+22 ldr r3, [pc, #448] ; (0x8004310 ) 0x08004150 UART1_RxCpltCallback+24 ldrb r3, [r3, #0] 0x08004152 UART1_RxCpltCallback+26 cmp r3, #126 ; 0x7e 0x08004154 UART1_RxCpltCallback+28 bne.w 0x80042f4 0x08004158 UART1_RxCpltCallback+32 ldr r3, [pc, #432] ; (0x800430c ) ### Breakpoints ######################################################################################################################### [2] break at 0x0800414e in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:44 hit 1 time ### Expressions ######################################################################################################################### ### History ############################################################################################################################# ### Memory ############################################################################################################################## ### Registers ########################################################################################################################### r0 0x20000a60 r4 0x20000a60 r8 0x00000000 r12 0x00001000 xPSR 0x81000035 primask 0x00 r1 0x00000000 r5 0x00004001 r9 0x00000000 sp 0x2000ff60 fpscr 0x00000010 basepri 0x00 r2 0x40013808 r6 0x00000000 r10 0x00000000 lr 0x08003493 msp 0x2000ff60 faultmask 0x00 r3 0x00000000 r7 0x00000000 r11 0x00000000 pc 0x0800414e psp 0x00000000 control 0x00 ### Source ############################################################################################################################## 36 static volatile uint8_t frame_index_tracker = 0; 37 38 #pragma message(Reminder "Move away from cirular buffer to a managed queue") 39 40 void UART1_RxCpltCallback(UART_HandleTypeDef *huart) 41 { 42 switch (sstate) 43 { 44 case SS_IDLE: // packet start 45 { !46 if (rxc == 0x7E) 47 { 48 sstate = SS_START; 49 } 50 } 51 break; 52 case SS_START: 53 { 54 switch (start_index_tracker) 55 { ### Stack ############################################################################################################################### [0] from 0x0800414e in UART1_RxCpltCallback+22 at shared/drivers/p_serial_mgr.c:46 [1] from 0x08003492 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035e4 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x08004366 in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:156 [6] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ############################################################################################################################# [1] id 0 from 0x0800414e in UART1_RxCpltCallback+22 at shared/drivers/p_serial_mgr.c:46 ### Variables ########################################################################################################################### arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi… ######################################################################################################################################### Note: breakpoint 2 also set at pc 0x800414e. Breakpoint 3 at 0x800414e: file shared/drivers/p_serial_mgr.c, line 46. Breakpoint 4 at 0x800414e: file shared/drivers/p_serial_mgr.c, line 46. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ##################################################################################################################### halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 Program received signal SIGINT, Interrupt. 0x08004386 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:163 163 return NULL; ### Assembly ############################################################################################################################ 0x0800437a p_serial_mgr_service+26 add r0, r2 0x0800437c p_serial_mgr_service+28 ldrb.w r2, [r0, #260] ; 0x104 0x08004380 p_serial_mgr_service+32 cmp r2, #0 0x08004382 p_serial_mgr_service+34 beq.n 0x8004364 0x08004384 p_serial_mgr_service+36 b.n 0x8004388 0x08004386 p_serial_mgr_service+38 movs r0, #0 0x08004388 p_serial_mgr_service+40 bx lr 0x0800438a p_serial_mgr_service+42 nop 0x0800438c p_serial_mgr_service+44 asrs r4, r2, #24 0x0800438e p_serial_mgr_service+46 movs r0, #0 ### Breakpoints ######################################################################################################################### [4] break at 0x0800414e in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:44 if rxc == 0x7D ### Expressions ######################################################################################################################### ### History ############################################################################################################################# ### Memory ############################################################################################################################## ### Registers ########################################################################################################################### r0 0x00000000 r4 0x00000000 r8 0x00000000 r12 0x00001000 xPSR 0x61000000 primask 0x00 r1 0x00000000 r5 0x200009c8 r9 0x00000000 sp 0x2000fff0 fpscr 0x00000010 basepri 0x00 r2 0x00000000 r6 0x00000000 r10 0x00000000 lr 0x080014f3 msp 0x2000fff0 faultmask 0x00 r3 0x00000000 r7 0x00000000 r11 0x00000000 pc 0x08004386 psp 0x00000000 control 0x04 ### Source ############################################################################################################################## 153 serial_pkt_t *p_serial_mgr_service(void) 154 { 155 // this will be less garbage when i switch to a queue 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) 159 { 160 return &serial_pkt_cb.buffer[ind]; 161 } 162 } 163 return NULL; 164 } 165 166 void p_serial_mgr_start() 167 { 168 HAL_UART_Receive_IT(_serial_huart_inst, &rxc, 1); 169 } ~ ~ ~ ### Stack ############################################################################################################################### [0] from 0x08004386 in p_serial_mgr_service+38 at shared/drivers/p_serial_mgr.c:163 [1] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ############################################################################################################################# [1] id 0 from 0x08004386 in p_serial_mgr_service+38 at shared/drivers/p_serial_mgr.c:163 ### Variables ########################################################################################################################### ######################################################################################################################################### Quit Breakpoint 5 at 0x800414e: file shared/drivers/p_serial_mgr.c, line 46. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ##################################################################################################################### Program received signal SIGINT, Interrupt. 0x08004368 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:156 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ############################################################################################################################ ~ 0x08004360 p_serial_mgr_service+0 movs r3, #0 0x08004362 p_serial_mgr_service+2 b.n 0x8004366 0x08004364 p_serial_mgr_service+4 adds r3, #1 0x08004366 p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x800438c ) 0x08004368 p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x0800436a p_serial_mgr_service+10 cmp r2, r3 0x0800436c p_serial_mgr_service+12 ble.n 0x8004386 0x0800436e p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x800438c ) 0x08004370 p_serial_mgr_service+16 ldr r0, [r2, #0] ### Breakpoints ######################################################################################################################### [5] break at 0x0800414e in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:44 if (rxc == 0x7D) ### Expressions ######################################################################################################################### ### History ############################################################################################################################# ### Memory ############################################################################################################################## ### Registers ########################################################################################################################### r0 0x00000000 r4 0x00000000 r8 0x00000000 r12 0x00001000 xPSR 0x61000000 primask 0x00 r1 0x00000000 r5 0x200009c8 r9 0x00000000 sp 0x2000fff0 fpscr 0x00000010 basepri 0x00 r2 0x20001614 r6 0x00000000 r10 0x00000000 lr 0x080014f3 msp 0x2000fff0 faultmask 0x00 r3 0x00000000 r7 0x00000000 r11 0x00000000 pc 0x08004368 psp 0x00000000 control 0x04 ### Source ############################################################################################################################## 146 _serial_huart_inst = huart; 147 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 148 149 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 150 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 151 } 152 153 serial_pkt_t *p_serial_mgr_service(void) 154 { 155 // this will be less garbage when i switch to a queue 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) 159 { 160 return &serial_pkt_cb.buffer[ind]; 161 } 162 } 163 return NULL; 164 } 165 ### Stack ############################################################################################################################### [0] from 0x08004368 in p_serial_mgr_service+8 at shared/drivers/p_serial_mgr.c:156 [1] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ############################################################################################################################# [1] id 0 from 0x08004368 in p_serial_mgr_service+8 at shared/drivers/p_serial_mgr.c:156 ### Variables ########################################################################################################################### loc ind = 0 ######################################################################################################################################### Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ##################################################################################################################### halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 halted: PC: 0x08004150 Program received signal SIGINT, Interrupt. p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:156 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ############################################################################################################################ ~ ~ ~ ~ ~ 0x08004360 p_serial_mgr_service+0 movs r3, #0 0x08004362 p_serial_mgr_service+2 b.n 0x8004366 0x08004364 p_serial_mgr_service+4 adds r3, #1 0x08004366 p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x800438c ) 0x08004368 p_serial_mgr_service+8 ldrh r2, [r2, #6] ### Breakpoints ######################################################################################################################### [5] break at 0x0800414e in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:44 if (rxc == 0x7D) ### Expressions ######################################################################################################################### ### History ############################################################################################################################# ### Memory ############################################################################################################################## ### Registers ########################################################################################################################### r0 0x00000000 r4 0x00000000 r8 0x00000000 r12 0x00001000 xPSR 0x61000000 primask 0x00 r1 0x00000000 r5 0x200009c8 r9 0x00000000 sp 0x2000fff0 fpscr 0x00000010 basepri 0x00 r2 0x00000000 r6 0x00000000 r10 0x00000000 lr 0x080014f3 msp 0x2000fff0 faultmask 0x00 r3 0x00000000 r7 0x00000000 r11 0x00000000 pc 0x08004360 psp 0x00000000 control 0x04 ### Source ############################################################################################################################## 146 _serial_huart_inst = huart; 147 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 148 149 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 150 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 151 } 152 153 serial_pkt_t *p_serial_mgr_service(void) 154 { 155 // this will be less garbage when i switch to a queue 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) 159 { 160 return &serial_pkt_cb.buffer[ind]; 161 } 162 } 163 return NULL; 164 } 165 ### Stack ############################################################################################################################### [0] from 0x08004360 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:156 [1] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ############################################################################################################################# [1] id 0 from 0x08004360 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:156 ### Variables ########################################################################################################################### loc ind = 0 ######################################################################################################################################### ### Output/messages ##################################################################################################################### halted: PC: 0x08004362 halted: PC: 0x08004366 halted: PC: 0x08004368 halted: PC: 0x0800436a halted: PC: 0x0800436c halted: PC: 0x08004386 halted: PC: 0x08004388 halted: PC: 0x080014f2 halted: PC: 0x080014f4 halted: PC: 0x080014f6 halted: PC: 0x080014ee halted: PC: 0x08004360 p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:156 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ############################################################################################################################ ~ ~ ~ ~ ~ 0x08004360 p_serial_mgr_service+0 movs r3, #0 0x08004362 p_serial_mgr_service+2 b.n 0x8004366 0x08004364 p_serial_mgr_service+4 adds r3, #1 0x08004366 p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x800438c ) 0x08004368 p_serial_mgr_service+8 ldrh r2, [r2, #6] ### Breakpoints ######################################################################################################################### [5] break at 0x0800414e in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:44 if (rxc == 0x7D) ### Expressions ######################################################################################################################### ### History ############################################################################################################################# ### Memory ############################################################################################################################## ### Registers ########################################################################################################################### r0 0x00000000 r4 0x00000000 r8 0x00000000 r12 0x00001000 xPSR 0x61000000 primask 0x00 r1 0x00000000 r5 0x200009c8 r9 0x00000000 sp 0x2000fff0 fpscr 0x00000010 basepri 0x00 r2 0x00000000 r6 0x00000000 r10 0x00000000 lr 0x080014f3 msp 0x2000fff0 faultmask 0x00 r3 0x00000000 r7 0x00000000 r11 0x00000000 pc 0x08004360 psp 0x00000000 control 0x04 ### Source ############################################################################################################################## 146 _serial_huart_inst = huart; 147 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 148 149 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 150 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 151 } 152 153 serial_pkt_t *p_serial_mgr_service(void) 154 { 155 // this will be less garbage when i switch to a queue 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) 159 { 160 return &serial_pkt_cb.buffer[ind]; 161 } 162 } 163 return NULL; 164 } 165 ### Stack ############################################################################################################################### [0] from 0x08004360 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:156 [1] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ############################################################################################################################# [1] id 0 from 0x08004360 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:156 ### Variables ########################################################################################################################### loc ind = 0 ######################################################################################################################################### ### Output/messages ##################################################################################################################### halted: PC: 0x08004362 halted: PC: 0x08004366 halted: PC: 0x08004368 halted: PC: 0x0800436a halted: PC: 0x0800436c halted: PC: 0x08004386 halted: PC: 0x08004388 halted: PC: 0x080014f2 halted: PC: 0x080014f4 halted: PC: 0x080014f6 halted: PC: 0x080014ee halted: PC: 0x08004360 p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:156 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ############################################################################################################################ ~ ~ ~ ~ ~ 0x08004360 p_serial_mgr_service+0 movs r3, #0 0x08004362 p_serial_mgr_service+2 b.n 0x8004366 0x08004364 p_serial_mgr_service+4 adds r3, #1 0x08004366 p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x800438c ) 0x08004368 p_serial_mgr_service+8 ldrh r2, [r2, #6] ### Breakpoints ######################################################################################################################### [5] break at 0x0800414e in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:44 if (rxc == 0x7D) ### Expressions ######################################################################################################################### ### History ############################################################################################################################# ### Memory ############################################################################################################################## ### Registers ########################################################################################################################### r0 0x00000000 r4 0x00000000 r8 0x00000000 r12 0x00001000 xPSR 0x61000000 primask 0x00 r1 0x00000000 r5 0x200009c8 r9 0x00000000 sp 0x2000fff0 fpscr 0x00000010 basepri 0x00 r2 0x00000000 r6 0x00000000 r10 0x00000000 lr 0x080014f3 msp 0x2000fff0 faultmask 0x00 r3 0x00000000 r7 0x00000000 r11 0x00000000 pc 0x08004360 psp 0x00000000 control 0x04 ### Source ############################################################################################################################## 146 _serial_huart_inst = huart; 147 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 148 149 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 150 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 151 } 152 153 serial_pkt_t *p_serial_mgr_service(void) 154 { 155 // this will be less garbage when i switch to a queue 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) 159 { 160 return &serial_pkt_cb.buffer[ind]; 161 } 162 } 163 return NULL; 164 } 165 ### Stack ############################################################################################################################### [0] from 0x08004360 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:156 [1] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ############################################################################################################################# [1] id 0 from 0x08004360 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:156 ### Variables ########################################################################################################################### loc ind = 0 ######################################################################################################################################### ### Output/messages ##################################################################################################################### halted: PC: 0x08004362 halted: PC: 0x08004366 halted: PC: 0x08004368 halted: PC: 0x0800436a halted: PC: 0x0800436c halted: PC: 0x08004386 halted: PC: 0x08004388 halted: PC: 0x080014f2 halted: PC: 0x080014f4 halted: PC: 0x080014f6 halted: PC: 0x080014ee halted: PC: 0x08004360 p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:156 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ############################################################################################################################ ~ ~ ~ ~ ~ 0x08004360 p_serial_mgr_service+0 movs r3, #0 0x08004362 p_serial_mgr_service+2 b.n 0x8004366 0x08004364 p_serial_mgr_service+4 adds r3, #1 0x08004366 p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x800438c ) 0x08004368 p_serial_mgr_service+8 ldrh r2, [r2, #6] ### Breakpoints ######################################################################################################################### [5] break at 0x0800414e in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:44 if (rxc == 0x7D) ### Expressions ######################################################################################################################### ### History ############################################################################################################################# ### Memory ############################################################################################################################## ### Registers ########################################################################################################################### r0 0x00000000 r4 0x00000000 r8 0x00000000 r12 0x00001000 xPSR 0x61000000 primask 0x00 r1 0x00000000 r5 0x200009c8 r9 0x00000000 sp 0x2000fff0 fpscr 0x00000010 basepri 0x00 r2 0x00000000 r6 0x00000000 r10 0x00000000 lr 0x080014f3 msp 0x2000fff0 faultmask 0x00 r3 0x00000000 r7 0x00000000 r11 0x00000000 pc 0x08004360 psp 0x00000000 control 0x04 ### Source ############################################################################################################################## 146 _serial_huart_inst = huart; 147 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 148 149 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 150 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 151 } 152 153 serial_pkt_t *p_serial_mgr_service(void) 154 { 155 // this will be less garbage when i switch to a queue 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) 159 { 160 return &serial_pkt_cb.buffer[ind]; 161 } 162 } 163 return NULL; 164 } 165 ### Stack ############################################################################################################################### [0] from 0x08004360 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:156 [1] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ############################################################################################################################# [1] id 0 from 0x08004360 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:156 ### Variables ########################################################################################################################### loc ind = 0 ######################################################################################################################################### Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] 0x08004360 in UART1_RxCpltCallback (huart=) at shared/drivers/p_serial_mgr.c:101 101 serial_pkt_cb.buffer[serial_pkt_cb.head].frame_data[frame_index_tracker++] = rxc; ### Assembly ######################################################################################################## 0x08004356 UART1_RxCpltCallback+210 lsrs r0, r0, #32 0x08004358 UART1_RxCpltCallback+212 lsrs r0, r4, #15 0x0800435a UART1_RxCpltCallback+214 movs r0, #0 0x0800435c UART1_RxCpltCallback+216 asrs r4, r2, #24 0x0800435e UART1_RxCpltCallback+218 movs r0, #0 0x08004360 UART1_RxCpltCallback+220 movs r3, #0 0x08004362 UART1_RxCpltCallback+222 b.n 0x8004366 0x08004364 UART1_RxCpltCallback+224 adds r3, #1 0x08004366 UART1_RxCpltCallback+226 ldr r2, [pc, #36] ; (0x800438c ) 0x08004368 UART1_RxCpltCallback+228 ldrh r2, [r2, #6] ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x08004360 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x00000000 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014f3 psp 0x00000000 ### Source ########################################################################################################## 91 #pragma message(Reminder "add a safe escape routine for this") 92 sstate = SS_IDLE; 93 memset(&serial_pkt_cb.buffer[serial_pkt_cb.head], 0, sizeof(serial_pkt_t)); 94 } 95 else if (rxc == 0x7D) 96 { 97 sstate = SS_ESC; 98 } 99 else 100 { 101 serial_pkt_cb.buffer[serial_pkt_cb.head].frame_data[frame_index_tracker++] = rxc; 102 if (frame_index_tracker >= serial_pkt_cb.buffer[serial_pkt_cb.head].len) 103 { 104 sstate = SS_CHECKSUM; 105 } 106 } 107 } 108 break; 109 case SS_ESC: 110 { ### Stack ########################################################################################################### [0] from 0x08004360 in UART1_RxCpltCallback+220 at shared/drivers/p_serial_mgr.c:101 [1] from 0x2000166c in heap_end ### Threads ######################################################################################################### [1] id 0 from 0x08004360 in UART1_RxCpltCallback+220 at shared/drivers/p_serial_mgr.c:101 ### Variables ####################################################################################################### arg huart = ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x98b0 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009a70 Loading section .ARM, size 0x8 lma 0x8009f48 Loading section .init_array, size 0x8 lma 0x8009f50 Loading section .fini_array, size 0x8 lma 0x8009f58 Loading section .data, size 0x9a8 lma 0x8009f60 Start address 0x08004508, load size 43224 Transfer rate: 29 KB/sec, 4802 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x080044ba in memset () ### Assembly ######################################################################################################## 0x080044ba ? ldr r2, [pc, #36] ; (0x80044e0 ) 0x080044bc ? ldrh r2, [r2, #6] 0x080044be ? cmp r2, r3 0x080044c0 ? ble.n 0x80044da 0x080044c2 ? ldr r2, [pc, #28] ; (0x80044e0 ) 0x080044c4 ? ldr r0, [r2, #0] 0x080044c6 ? add.w r2, r3, r3, lsl #6 0x080044ca ? add.w r2, r3, r2, lsl #2 0x080044ce ? add r0, r2 0x080044d0 ? ldrb.w r2, [r0, #260] ; 0x104 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080044ba primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x00000000 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014f3 psp 0x00000000 ### Source ########################################################################################################## ### Stack ########################################################################################################### [0] from 0x080044ba in memset [1] from 0x2000166c in heap_end ### Threads ######################################################################################################### [1] id 0 from 0x080044ba in memset ### Variables ####################################################################################################### ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9788 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009948 Loading section .ARM, size 0x8 lma 0x8009e20 Loading section .init_array, size 0x8 lma 0x8009e28 Loading section .fini_array, size 0x8 lma 0x8009e30 Loading section .data, size 0x9a8 lma 0x8009e38 Start address 0x080043e0, load size 42928 Transfer rate: 29 KB/sec, 4769 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:157 157 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ######################################################################################################## ~ ~ ~ ~ ~ 0x0800438c p_serial_mgr_service+0 movs r3, #0 0x0800438e p_serial_mgr_service+2 b.n 0x8004392 0x08004390 p_serial_mgr_service+4 adds r3, #1 0x08004392 p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x80043b8 ) 0x08004394 p_serial_mgr_service+8 ldrh r2, [r2, #6] ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x0800438c primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x00000000 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014f3 psp 0x00000000 ### Source ########################################################################################################## 147 _serial_huart_inst = huart; 148 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 149 150 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 151 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 152 } 153 154 serial_pkt_t *p_serial_mgr_service(void) 155 { 156 // this will be less garbage when i switch to a queue 157 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 158 { 159 if (serial_pkt_cb.buffer[ind].b_ready) 160 { 161 return &serial_pkt_cb.buffer[ind]; 162 } 163 } 164 return NULL; 165 } 166 ### Stack ########################################################################################################### [0] from 0x0800438c in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:157 [1] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x0800438c in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:157 ### Variables ####################################################################################################### loc ind = 0 ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9788 lma 0x80001c0 Loading section .rodata, size 0x4d8 lma 0x8009948 Loading section .ARM, size 0x8 lma 0x8009e20 Loading section .init_array, size 0x8 lma 0x8009e28 Loading section .fini_array, size 0x8 lma 0x8009e30 Loading section .data, size 0x9a8 lma 0x8009e38 Start address 0x080043e0, load size 42928 Transfer rate: 29 KB/sec, 4769 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x08004392 in UART1_RxCpltCallback (huart=) at shared/drivers/p_serial_mgr.c:102 102 if (frame_index_tracker >= serial_pkt_cb.buffer[serial_pkt_cb.head].len) ### Assembly ######################################################################################################## 0x08004388 UART1_RxCpltCallback+240 asrs r4, r2, #24 0x0800438a UART1_RxCpltCallback+242 movs r0, #0 0x0800438c UART1_RxCpltCallback+244 movs r3, #0 0x0800438e UART1_RxCpltCallback+246 b.n 0x8004392 0x08004390 UART1_RxCpltCallback+248 adds r3, #1 0x08004392 UART1_RxCpltCallback+250 ldr r2, [pc, #36] ; (0x80043b8 ) 0x08004394 UART1_RxCpltCallback+252 ldrh r2, [r2, #6] 0x08004396 UART1_RxCpltCallback+254 cmp r2, r3 0x08004398 UART1_RxCpltCallback+256 ble.n 0x80043b2 0x0800439a UART1_RxCpltCallback+258 ldr r2, [pc, #28] ; (0x80043b8 ) ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x08004392 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x00000000 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014f3 psp 0x00000000 ### Source ########################################################################################################## 92 sstate = SS_IDLE; 93 memset(&serial_pkt_cb.buffer[serial_pkt_cb.head], 0, sizeof(serial_pkt_t)); 94 } 95 else if (rxc == 0x7D) 96 { 97 sstate = SS_ESC; 98 } 99 else 100 { 101 serial_pkt_cb.buffer[serial_pkt_cb.head].frame_data[frame_index_tracker++] = rxc; 102 if (frame_index_tracker >= serial_pkt_cb.buffer[serial_pkt_cb.head].len) 103 { 104 sstate = SS_CHECKSUM; 105 } 106 } 107 } 108 break; 109 case SS_ESC: 110 { 111 serial_pkt_cb.buffer[serial_pkt_cb.head].frame_data[frame_index_tracker++] = rxc ^ 0x20; ### Stack ########################################################################################################### [0] from 0x08004392 in UART1_RxCpltCallback+250 at shared/drivers/p_serial_mgr.c:102 [1] from 0x2000166c in heap_end ### Threads ######################################################################################################### [1] id 0 from 0x08004392 in UART1_RxCpltCallback+250 at shared/drivers/p_serial_mgr.c:102 ### Variables ####################################################################################################### arg huart = ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9908 lma 0x80001c0 Loading section .rodata, size 0x4e0 lma 0x8009ac8 Loading section .ARM, size 0x8 lma 0x8009fa8 Loading section .init_array, size 0x8 lma 0x8009fb0 Loading section .fini_array, size 0x8 lma 0x8009fb8 Loading section .data, size 0x9a8 lma 0x8009fc0 Start address 0x0800451c, load size 43320 Transfer rate: 29 KB/sec, 4813 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x08009aa8 in _exit () ### Assembly ######################################################################################################## 0x08009aa8 ? b.n 0x8009aa8 <_exit> 0x08009aaa ? nop 0x08009aac ? push {r3, r4, r5, r6, r7, lr} 0x08009aae ? nop 0x08009ab0 ? pop {r3, r4, r5, r6, r7} 0x08009ab2 ? pop {r3} 0x08009ab4 ? mov lr, r3 0x08009ab6 ? bx lr 0x08009ab8 ? push {r3, r4, r5, r6, r7, lr} 0x08009aba ? nop ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007f r5 0x00004001 r10 0x00000000 pc 0x08009aa8 primask 0x00 r1 0x00000006 r6 0x00000000 r11 0x00000000 xPSR 0x21010035 basepri 0x00 r2 0x00000058 r7 0x00000000 r12 0x20000010 fpscr 0x00000000 faultmask 0x00 r3 0x00000058 r8 0x00000000 sp 0x2000fef8 msp 0x2000fef8 control 0x04 r4 0x08009bbc r9 0x00000000 lr 0x080047ad psp 0x00000000 ### Source ########################################################################################################## ### Stack ########################################################################################################### [0] from 0x08009aa8 in _exit [1] from 0x080047ac in __chk_fail [2] from 0x0800469c in __sprintf_chk [3] from 0x0800423c in p_uart_async_write_byte+24 at shared/util/putil.c:35 [4] from 0x080042a2 in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [5] from 0x0800353e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [6] from 0x08003710 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [7] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [8] from 0xffffffe9 [9] from 0x080044f0 in p_serial_mgr_service+40 at shared/drivers/p_serial_mgr.c:165 [+] ### Threads ######################################################################################################### [1] id 0 from 0x08009aa8 in _exit ### Variables ####################################################################################################### ##################################################################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x0800451c msp: 0x20010000 Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9908 lma 0x80001c0 Loading section .rodata, size 0x4e0 lma 0x8009ac8 Loading section .ARM, size 0x8 lma 0x8009fa8 Loading section .init_array, size 0x8 lma 0x8009fb0 Loading section .fini_array, size 0x8 lma 0x8009fb8 Loading section .data, size 0x9a8 lma 0x8009fc0 Start address 0x0800451c, load size 43320 Transfer rate: 29 KB/sec, 4813 bytes/write. Breakpoint 1 at 0x8004228: file shared/util/putil.c, line 34. Note: automatically using hardware breakpoints for read-only addresses. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ################################################################################################# Breakpoint 1, p_uart_async_write_byte (byte=126 '~') at shared/util/putil.c:34 34 char send = '\0'; ### Assembly ######################################################################################################## ~ ~ ~ 0x08004224 p_uart_async_write_byte+0 push {lr} 0x08004226 p_uart_async_write_byte+2 sub sp, #20 !0x08004228 p_uart_async_write_byte+4 movs r1, #0 0x0800422a p_uart_async_write_byte+6 strb.w r1, [sp, #15] 0x0800422e p_uart_async_write_byte+10 str r0, [sp, #0] 0x08004230 p_uart_async_write_byte+12 ldr r3, [pc, #28] ; (0x8004250 ) 0x08004232 p_uart_async_write_byte+14 movs r2, #1 ### Breakpoints ##################################################################################################### [1] break at 0x08004228 in shared/util/putil.c:34 for putil.c:34 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007e r5 0x00004001 r10 0x00000000 pc 0x08004228 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00 r2 0x40013808 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x20001612 r8 0x00000000 sp 0x2000ff48 msp 0x2000ff48 control 0x00 r4 0x20000a60 r9 0x00000000 lr 0x080042a3 psp 0x00000000 ### Source ########################################################################################################## 24 return 0; 25 } 26 void p_uart_init(UART_HandleTypeDef *huart) 27 { 28 huart_inst = huart; 29 PDEBUG("...\n"); 30 PDEBUG("UART2 Initialized\n"); 31 } 32 void p_uart_async_write_byte(uint8_t byte) 33 { !34 char send = '\0'; 35 sprintf(&send, "%02x\n", byte); 36 HAL_UART_Transmit_IT(huart_inst, &send, 1); 37 } ~ ~ ~ ~ ~ ~ ### Stack ########################################################################################################### [0] from 0x08004228 in p_uart_async_write_byte+4 at shared/util/putil.c:34 [1] from 0x080042a2 in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [2] from 0x0800353e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [3] from 0x08003710 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [4] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [5] from 0xffffffe9 [6] from 0x080044f0 in p_serial_mgr_service+40 at shared/drivers/p_serial_mgr.c:165 [7] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08004228 in p_uart_async_write_byte+4 at shared/util/putil.c:34 ### Variables ####################################################################################################### arg byte = 126 '~' loc send = 0 '\000' ##################################################################################################################### Quit No symbol "bytep" in current context. Quit Quit Quit Quit $1 = 126 '~' Undefined command: "". Try "help". $2 = 0x7e `/storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf' has changed; re-reading symbols. Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9900 lma 0x80001c0 Loading section .rodata, size 0x4e0 lma 0x8009ac0 Loading section .ARM, size 0x8 lma 0x8009fa0 Loading section .init_array, size 0x8 lma 0x8009fa8 Loading section .fini_array, size 0x8 lma 0x8009fb0 Loading section .data, size 0x9a8 lma 0x8009fb8 Start address 0x08004514, load size 43312 Transfer rate: 29 KB/sec, 4812 bytes/write. Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] Reset_Handler () at startup_stm32l432xx.s:62 62 ldr sp, =_estack /* Set stack pointer */ ### Assembly ######################################################################################################## 0x08004514 ? ldr.w sp, [pc, #52] ; 0x800454c 0x08004518 ? bl 0x8004194 0x0800451c ? ldr r0, [pc, #48] ; (0x8004550 ) 0x0800451e ? ldr r1, [pc, #52] ; (0x8004554 ) 0x08004520 ? ldr r2, [pc, #52] ; (0x8004558 ) 0x08004522 ? movs r3, #0 0x08004524 ? b.n 0x800452c 0x08004526 ? ldr r4, [r2, r3] 0x08004528 ? str r4, [r0, r3] 0x0800452a ? adds r3, #4 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x08004514 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x01000000 basepri 0x00 r2 0x00000000 r7 0x00000000 r12 0x00000000 fpscr 0x00000000 faultmask 0x00 r3 0x00000000 r8 0x00000000 sp 0x20010000 msp 0x20010000 control 0x00 r4 0x00000000 r9 0x00000000 lr 0xffffffff psp 0x00000000 ### Source ########################################################################################################## 52 * necessary set is performed, after which the application 53 * supplied main() routine is called. 54 * @param None 55 * @retval : None 56 */ 57 58 .section .text.Reset_Handler 59 .weak Reset_Handler 60 .type Reset_Handler, %function 61 Reset_Handler: 62 ldr sp, =_estack /* Set stack pointer */ 63 64 /* Call the clock system initialization function.*/ 65 bl SystemInit 66 67 /* Copy the data segment initializers from flash to SRAM */ 68 ldr r0, =_sdata 69 ldr r1, =_edata 70 ldr r2, =_sidata 71 movs r3, #0 ### Stack ########################################################################################################### [0] from 0x08004514 in Reset_Handler at startup_stm32l432xx.s:62 ### Threads ######################################################################################################### [1] id 0 from 0x08004514 in Reset_Handler at startup_stm32l432xx.s:62 ### Variables ####################################################################################################### ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9900 lma 0x80001c0 Loading section .rodata, size 0x4e0 lma 0x8009ac0 Loading section .ARM, size 0x8 lma 0x8009fa0 Loading section .init_array, size 0x8 lma 0x8009fa8 Loading section .fini_array, size 0x8 lma 0x8009fb0 Loading section .data, size 0x9a8 lma 0x8009fb8 Start address 0x08004514, load size 43312 Transfer rate: 29 KB/sec, 4812 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x08009aa0 in _exit () ### Assembly ######################################################################################################## 0x08009aa0 ? b.n 0x8009aa0 <_exit> 0x08009aa2 ? nop 0x08009aa4 ? push {r3, r4, r5, r6, r7, lr} 0x08009aa6 ? nop 0x08009aa8 ? pop {r3, r4, r5, r6, r7} 0x08009aaa ? pop {r3} 0x08009aac ? mov lr, r3 0x08009aae ? bx lr 0x08009ab0 ? push {r3, r4, r5, r6, r7, lr} 0x08009ab2 ? nop ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007f r5 0x00004001 r10 0x00000000 pc 0x08009aa0 primask 0x00 r1 0x00000006 r6 0x00000000 r11 0x00000000 xPSR 0x21010035 basepri 0x00 r2 0x00000058 r7 0x00000000 r12 0x20000010 fpscr 0x00000000 faultmask 0x00 r3 0x00000058 r8 0x00000000 sp 0x2000fef8 msp 0x2000fef8 control 0x04 r4 0x08009bb4 r9 0x00000000 lr 0x080047a5 psp 0x00000000 ### Source ########################################################################################################## ### Stack ########################################################################################################### [0] from 0x08009aa0 in _exit [1] from 0x080047a4 in __chk_fail [2] from 0x08004694 in __sprintf_chk [3] from 0x08004236 in p_uart_async_write_byte+18 at shared/util/putil.c:35 [4] from 0x0800429a in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [5] from 0x0800353e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [6] from 0x08003710 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [7] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [8] from 0xffffffe9 [9] from 0x080044c6 in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:157 [+] ### Threads ######################################################################################################### [1] id 0 from 0x08009aa0 in _exit ### Variables ####################################################################################################### ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9900 lma 0x80001c0 Loading section .rodata, size 0x4e0 lma 0x8009ac0 Loading section .ARM, size 0x8 lma 0x8009fa0 Loading section .init_array, size 0x8 lma 0x8009fa8 Loading section .fini_array, size 0x8 lma 0x8009fb0 Loading section .data, size 0x9a8 lma 0x8009fb8 Start address 0x08004514, load size 43312 Transfer rate: 29 KB/sec, 4812 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x08009aa0 in _write () ### Assembly ######################################################################################################## 0x08009aa0 ? b.n 0x8009aa0 <_write> 0x08009aa2 ? nop 0x08009aa4 ? push {r3, r4, r5, r6, r7, lr} 0x08009aa6 ? nop 0x08009aa8 ? pop {r3, r4, r5, r6, r7} 0x08009aaa ? pop {r3} 0x08009aac ? mov lr, r3 0x08009aae ? bx lr 0x08009ab0 ? push {r3, r4, r5, r6, r7, lr} 0x08009ab2 ? nop ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007f r5 0x00004001 r10 0x00000000 pc 0x08009aa0 primask 0x00 r1 0x00000006 r6 0x00000000 r11 0x00000000 xPSR 0x21010035 basepri 0x00 r2 0x00000058 r7 0x00000000 r12 0x20000010 fpscr 0x00000000 faultmask 0x00 r3 0x00000058 r8 0x00000000 sp 0x2000fef8 msp 0x2000fef8 control 0x04 r4 0x08009bb4 r9 0x00000000 lr 0x080047a5 psp 0x00000000 ### Source ########################################################################################################## ### Stack ########################################################################################################### [0] from 0x08009aa0 in _write [1] from 0x080047a4 in __chk_fail ### Threads ######################################################################################################### [1] id 0 from 0x08009aa0 in _write ### Variables ####################################################################################################### ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9910 lma 0x80001c0 Loading section .rodata, size 0x4e8 lma 0x8009ad0 Loading section .ARM, size 0x8 lma 0x8009fb8 Loading section .init_array, size 0x8 lma 0x8009fc0 Loading section .fini_array, size 0x8 lma 0x8009fc8 Loading section .data, size 0x9a8 lma 0x8009fd0 Start address 0x08004524, load size 43336 Transfer rate: 29 KB/sec, 4815 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x08009ab0 in _exit () ### Assembly ######################################################################################################## 0x08009ab0 ? b.n 0x8009ab0 <_exit> 0x08009ab2 ? nop 0x08009ab4 ? push {r3, r4, r5, r6, r7, lr} 0x08009ab6 ? nop 0x08009ab8 ? pop {r3, r4, r5, r6, r7} 0x08009aba ? pop {r3} 0x08009abc ? mov lr, r3 0x08009abe ? bx lr 0x08009ac0 ? push {r3, r4, r5, r6, r7, lr} 0x08009ac2 ? nop ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007f r5 0x00004001 r10 0x00000000 pc 0x08009ab0 primask 0x00 r1 0x00000006 r6 0x00000000 r11 0x00000000 xPSR 0x21010035 basepri 0x00 r2 0x00000058 r7 0x00000000 r12 0x20000010 fpscr 0x00000000 faultmask 0x00 r3 0x00000058 r8 0x00000000 sp 0x2000fef8 msp 0x2000fef8 control 0x04 r4 0x08009bc8 r9 0x00000000 lr 0x080047b5 psp 0x00000000 ### Source ########################################################################################################## ### Stack ########################################################################################################### [0] from 0x08009ab0 in _exit [1] from 0x080047b4 in __chk_fail [2] from 0x080046a4 in __sprintf_chk [3] from 0x08004242 in p_uart_async_write_byte+30 at shared/util/putil.c:35 [4] from 0x080042aa in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [5] from 0x0800353e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [6] from 0x08003710 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [7] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [8] from 0xffffffe9 [9] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08009ab0 in _exit ### Variables ####################################################################################################### ##################################################################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08004524 msp: 0x20010000 Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9910 lma 0x80001c0 Loading section .rodata, size 0x4e8 lma 0x8009ad0 Loading section .ARM, size 0x8 lma 0x8009fb8 Loading section .init_array, size 0x8 lma 0x8009fc0 Loading section .fini_array, size 0x8 lma 0x8009fc8 Loading section .data, size 0x9a8 lma 0x8009fd0 Start address 0x08004524, load size 43336 Transfer rate: 29 KB/sec, 4815 bytes/write. Breakpoint 1 at 0x8004228: file shared/util/putil.c, line 34. Note: automatically using hardware breakpoints for read-only addresses. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ################################################################################################# Breakpoint 1, p_uart_async_write_byte (byte=126 '~') at shared/util/putil.c:34 34 char send[3] = {0}; ### Assembly ######################################################################################################## ~ ~ ~ 0x08004224 p_uart_async_write_byte+0 push {lr} 0x08004226 p_uart_async_write_byte+2 sub sp, #20 !0x08004228 p_uart_async_write_byte+4 ldr r3, [pc, #40] ; (0x8004254 ) 0x0800422a p_uart_async_write_byte+6 ldrh r3, [r3, #0] 0x0800422c p_uart_async_write_byte+8 strh.w r3, [sp, #12] 0x08004230 p_uart_async_write_byte+12 movs r1, #0 0x08004232 p_uart_async_write_byte+14 strb.w r1, [sp, #14] ### Breakpoints ##################################################################################################### [1] break at 0x08004228 in shared/util/putil.c:34 for putil.c:34 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007e r5 0x00004001 r10 0x00000000 pc 0x08004228 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00 r2 0x40013808 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x20001612 r8 0x00000000 sp 0x2000ff48 msp 0x2000ff48 control 0x00 r4 0x20000a60 r9 0x00000000 lr 0x080042ab psp 0x00000000 ### Source ########################################################################################################## 24 return 0; 25 } 26 void p_uart_init(UART_HandleTypeDef *huart) 27 { 28 huart_inst = huart; 29 PDEBUG("...\n"); 30 PDEBUG("UART2 Initialized\n"); 31 } 32 void p_uart_async_write_byte(uint8_t byte) 33 { !34 char send[3] = {0}; 35 sprintf(send, "%02x\n", byte); 36 HAL_UART_Transmit_IT(huart_inst, send, 2); 37 } ~ ~ ~ ~ ~ ~ ### Stack ########################################################################################################### [0] from 0x08004228 in p_uart_async_write_byte+4 at shared/util/putil.c:34 [1] from 0x080042aa in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [2] from 0x0800353e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [3] from 0x08003710 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [4] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [5] from 0xffffffe9 [6] from 0x080044da in p_serial_mgr_service+10 at shared/drivers/p_serial_mgr.c:157 [7] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08004228 in p_uart_async_write_byte+4 at shared/util/putil.c:34 ### Variables ####################################################################################################### arg byte = 126 '~' loc send = "\000\000" ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x0800422a halted: PC: 0x0800422c halted: PC: 0x08004230 halted: PC: 0x08004232 halted: PC: 0x08004236 35 sprintf(send, "%02x\n", byte); ### Assembly ######################################################################################################## !0x08004228 p_uart_async_write_byte+4 ldr r3, [pc, #40] ; (0x8004254 ) 0x0800422a p_uart_async_write_byte+6 ldrh r3, [r3, #0] 0x0800422c p_uart_async_write_byte+8 strh.w r3, [sp, #12] 0x08004230 p_uart_async_write_byte+12 movs r1, #0 0x08004232 p_uart_async_write_byte+14 strb.w r1, [sp, #14] 0x08004236 p_uart_async_write_byte+18 str r0, [sp, #0] 0x08004238 p_uart_async_write_byte+20 ldr r3, [pc, #28] ; (0x8004258 ) 0x0800423a p_uart_async_write_byte+22 movs r2, #3 0x0800423c p_uart_async_write_byte+24 add r0, sp, #12 0x0800423e p_uart_async_write_byte+26 bl 0x8004664 <__sprintf_chk> ### Breakpoints ##################################################################################################### [1] break at 0x08004228 in shared/util/putil.c:34 for putil.c:34 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007e r5 0x00004001 r10 0x00000000 pc 0x08004236 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x41000035 basepri 0x00 r2 0x40013808 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000000 r8 0x00000000 sp 0x2000ff48 msp 0x2000ff48 control 0x00 r4 0x20000a60 r9 0x00000000 lr 0x080042ab psp 0x00000000 ### Source ########################################################################################################## 25 } 26 void p_uart_init(UART_HandleTypeDef *huart) 27 { 28 huart_inst = huart; 29 PDEBUG("...\n"); 30 PDEBUG("UART2 Initialized\n"); 31 } 32 void p_uart_async_write_byte(uint8_t byte) 33 { !34 char send[3] = {0}; 35 sprintf(send, "%02x\n", byte); 36 HAL_UART_Transmit_IT(huart_inst, send, 2); 37 } ~ ~ ~ ~ ~ ~ ~ ### Stack ########################################################################################################### [0] from 0x08004236 in p_uart_async_write_byte+18 at shared/util/putil.c:35 [1] from 0x080042aa in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [2] from 0x0800353e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [3] from 0x08003710 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [4] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [5] from 0xffffffe9 [6] from 0x080044da in p_serial_mgr_service+10 at shared/drivers/p_serial_mgr.c:157 [7] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08004236 in p_uart_async_write_byte+18 at shared/util/putil.c:35 ### Variables ####################################################################################################### arg byte = 126 '~' loc send = "\000\000" ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x08004238 halted: PC: 0x0800423a halted: PC: 0x0800423c halted: PC: 0x0800423e halted: PC: 0x08004664 Program received signal SIGINT, Interrupt. 0x08009ab0 in _exit () ### Assembly ######################################################################################################## 0x08009ab0 ? b.n 0x8009ab0 <_exit> 0x08009ab2 ? nop 0x08009ab4 ? push {r3, r4, r5, r6, r7, lr} 0x08009ab6 ? nop 0x08009ab8 ? pop {r3, r4, r5, r6, r7} 0x08009aba ? pop {r3} 0x08009abc ? mov lr, r3 0x08009abe ? bx lr 0x08009ac0 ? push {r3, r4, r5, r6, r7, lr} 0x08009ac2 ? nop ### Breakpoints ##################################################################################################### [1] break at 0x08004228 in shared/util/putil.c:34 for putil.c:34 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007f r5 0x00004001 r10 0x00000000 pc 0x08009ab0 primask 0x00 r1 0x00000006 r6 0x00000000 r11 0x00000000 xPSR 0x21010035 basepri 0x00 r2 0x00000058 r7 0x00000000 r12 0x20000010 fpscr 0x00000000 faultmask 0x00 r3 0x00000058 r8 0x00000000 sp 0x2000fef8 msp 0x2000fef8 control 0x04 r4 0x08009bc8 r9 0x00000000 lr 0x080047b5 psp 0x00000000 ### Source ########################################################################################################## ### Stack ########################################################################################################### [0] from 0x08009ab0 in _exit [1] from 0x080047b4 in __chk_fail [2] from 0x080046a4 in __sprintf_chk [3] from 0x08004242 in p_uart_async_write_byte+30 at shared/util/putil.c:35 [4] from 0x080042aa in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [5] from 0x0800353e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [6] from 0x08003710 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [7] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [8] from 0xffffffe9 [9] from 0x080044da in p_serial_mgr_service+10 at shared/drivers/p_serial_mgr.c:157 [+] ### Threads ######################################################################################################### [1] id 0 from 0x08009ab0 in _exit ### Variables ####################################################################################################### ##################################################################################################################### `/storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf' has changed; re-reading symbols. Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9910 lma 0x80001c0 Loading section .rodata, size 0x4e8 lma 0x8009ad0 Loading section .ARM, size 0x8 lma 0x8009fb8 Loading section .init_array, size 0x8 lma 0x8009fc0 Loading section .fini_array, size 0x8 lma 0x8009fc8 Loading section .data, size 0x9a8 lma 0x8009fd0 Start address 0x08004528, load size 43336 Transfer rate: 29 KB/sec, 4815 bytes/write. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ################################################################################################# Breakpoint 1, p_uart_async_write_byte (byte=126 '~') at shared/util/putil.c:34 34 char send[3] = {0}; ### Assembly ######################################################################################################## ~ ~ ~ 0x08004224 p_uart_async_write_byte+0 push {lr} 0x08004226 p_uart_async_write_byte+2 sub sp, #20 !0x08004228 p_uart_async_write_byte+4 ldr r3, [pc, #44] ; (0x8004258 ) 0x0800422a p_uart_async_write_byte+6 ldrh r3, [r3, #0] 0x0800422c p_uart_async_write_byte+8 strh.w r3, [sp, #12] 0x08004230 p_uart_async_write_byte+12 movs r1, #0 0x08004232 p_uart_async_write_byte+14 strb.w r1, [sp, #14] ### Breakpoints ##################################################################################################### [1] break at 0x08004228 in shared/util/putil.c:34 for putil.c:34 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007e r5 0x00004001 r10 0x00000000 pc 0x08004228 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00 r2 0x40013808 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x20001612 r8 0x00000000 sp 0x2000ff48 msp 0x2000ff48 control 0x00 r4 0x20000a60 r9 0x00000000 lr 0x080042af psp 0x00000000 ### Source ########################################################################################################## 24 return 0; 25 } 26 void p_uart_init(UART_HandleTypeDef *huart) 27 { 28 huart_inst = huart; 29 PDEBUG("...\n"); 30 PDEBUG("UART2 Initialized\n"); 31 } 32 void p_uart_async_write_byte(uint8_t byte) 33 { !34 char send[3] = {0}; 35 sprintf(send, "%02x\n", byte); 36 asm volatile("nop"); 37 HAL_UART_Transmit_IT(huart_inst, send, 2); 38 } ~ ~ ~ ~ ~ ### Stack ########################################################################################################### [0] from 0x08004228 in p_uart_async_write_byte+4 at shared/util/putil.c:34 [1] from 0x080042ae in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [2] from 0x0800353e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [3] from 0x08003710 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [4] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [5] from 0xffffffe9 [6] from 0x080044fa in p_serial_mgr_service+38 at shared/drivers/p_serial_mgr.c:164 [7] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08004228 in p_uart_async_write_byte+4 at shared/util/putil.c:34 ### Variables ####################################################################################################### arg byte = 126 '~' loc send = "\000\000" ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x0800422a halted: PC: 0x0800422c halted: PC: 0x08004230 halted: PC: 0x08004232 halted: PC: 0x08004236 35 sprintf(send, "%02x\n", byte); ### Assembly ######################################################################################################## !0x08004228 p_uart_async_write_byte+4 ldr r3, [pc, #44] ; (0x8004258 ) 0x0800422a p_uart_async_write_byte+6 ldrh r3, [r3, #0] 0x0800422c p_uart_async_write_byte+8 strh.w r3, [sp, #12] 0x08004230 p_uart_async_write_byte+12 movs r1, #0 0x08004232 p_uart_async_write_byte+14 strb.w r1, [sp, #14] 0x08004236 p_uart_async_write_byte+18 str r0, [sp, #0] 0x08004238 p_uart_async_write_byte+20 ldr r3, [pc, #32] ; (0x800425c ) 0x0800423a p_uart_async_write_byte+22 movs r2, #3 0x0800423c p_uart_async_write_byte+24 add r0, sp, #12 0x0800423e p_uart_async_write_byte+26 bl 0x8004668 <__sprintf_chk> ### Breakpoints ##################################################################################################### [1] break at 0x08004228 in shared/util/putil.c:34 for putil.c:34 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007e r5 0x00004001 r10 0x00000000 pc 0x08004236 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x41000035 basepri 0x00 r2 0x40013808 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000000 r8 0x00000000 sp 0x2000ff48 msp 0x2000ff48 control 0x00 r4 0x20000a60 r9 0x00000000 lr 0x080042af psp 0x00000000 ### Source ########################################################################################################## 25 } 26 void p_uart_init(UART_HandleTypeDef *huart) 27 { 28 huart_inst = huart; 29 PDEBUG("...\n"); 30 PDEBUG("UART2 Initialized\n"); 31 } 32 void p_uart_async_write_byte(uint8_t byte) 33 { !34 char send[3] = {0}; 35 sprintf(send, "%02x\n", byte); 36 asm volatile("nop"); 37 HAL_UART_Transmit_IT(huart_inst, send, 2); 38 } ~ ~ ~ ~ ~ ~ ### Stack ########################################################################################################### [0] from 0x08004236 in p_uart_async_write_byte+18 at shared/util/putil.c:35 [1] from 0x080042ae in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [2] from 0x0800353e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [3] from 0x08003710 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [4] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [5] from 0xffffffe9 [6] from 0x080044fa in p_serial_mgr_service+38 at shared/drivers/p_serial_mgr.c:164 [7] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08004236 in p_uart_async_write_byte+18 at shared/util/putil.c:35 ### Variables ####################################################################################################### arg byte = 126 '~' loc send = "\000\000" ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x08004238 halted: PC: 0x0800423a halted: PC: 0x0800423c halted: PC: 0x0800423e halted: PC: 0x08004668 Program received signal SIGINT, Interrupt. 0x08009ab0 in _exit () ### Assembly ######################################################################################################## 0x08009ab0 ? b.n 0x8009ab0 <_exit> 0x08009ab2 ? nop 0x08009ab4 ? push {r3, r4, r5, r6, r7, lr} 0x08009ab6 ? nop 0x08009ab8 ? pop {r3, r4, r5, r6, r7} 0x08009aba ? pop {r3} 0x08009abc ? mov lr, r3 0x08009abe ? bx lr 0x08009ac0 ? push {r3, r4, r5, r6, r7, lr} 0x08009ac2 ? nop ### Breakpoints ##################################################################################################### [1] break at 0x08004228 in shared/util/putil.c:34 for putil.c:34 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007f r5 0x00004001 r10 0x00000000 pc 0x08009ab0 primask 0x00 r1 0x00000006 r6 0x00000000 r11 0x00000000 xPSR 0x21010035 basepri 0x00 r2 0x00000058 r7 0x00000000 r12 0x20000010 fpscr 0x00000000 faultmask 0x00 r3 0x00000058 r8 0x00000000 sp 0x2000fef8 msp 0x2000fef8 control 0x04 r4 0x08009bc8 r9 0x00000000 lr 0x080047b9 psp 0x00000000 ### Source ########################################################################################################## ### Stack ########################################################################################################### [0] from 0x08009ab0 in _exit [1] from 0x080047b8 in __chk_fail [2] from 0x080046a8 in __sprintf_chk [3] from 0x08004242 in p_uart_async_write_byte+30 at shared/util/putil.c:35 [4] from 0x080042ae in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [5] from 0x0800353e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [6] from 0x08003710 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [7] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [8] from 0xffffffe9 [9] from 0x080044fa in p_serial_mgr_service+38 at shared/drivers/p_serial_mgr.c:164 [+] ### Threads ######################################################################################################### [1] id 0 from 0x08009ab0 in _exit ### Variables ####################################################################################################### ##################################################################################################################### `/storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf' has changed; re-reading symbols. Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x97e8 lma 0x80001c0 Loading section .rodata, size 0x4e8 lma 0x80099a8 Loading section .ARM, size 0x8 lma 0x8009e90 Loading section .init_array, size 0x8 lma 0x8009e98 Loading section .fini_array, size 0x8 lma 0x8009ea0 Loading section .data, size 0x9a8 lma 0x8009ea8 Start address 0x080043fc, load size 43040 Transfer rate: 29 KB/sec, 4782 bytes/write. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ################################################################################################# Breakpoint 1, p_uart_async_write_byte (byte=126 '~') at shared/util/putil.c:34 34 char send[3] = {0}; ### Assembly ######################################################################################################## ~ ~ ~ 0x080040f8 p_uart_async_write_byte+0 push {lr} 0x080040fa p_uart_async_write_byte+2 sub sp, #20 !0x080040fc p_uart_async_write_byte+4 ldr r3, [pc, #44] ; (0x800412c ) 0x080040fe p_uart_async_write_byte+6 ldrh r3, [r3, #0] 0x08004100 p_uart_async_write_byte+8 strh.w r3, [sp, #12] 0x08004104 p_uart_async_write_byte+12 movs r1, #0 0x08004106 p_uart_async_write_byte+14 strb.w r1, [sp, #14] ### Breakpoints ##################################################################################################### [1] break at 0x080040fc in shared/util/putil.c:34 for putil.c:34 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007e r5 0x00004001 r10 0x00000000 pc 0x080040fc primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00 r2 0x40013808 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x20001612 r8 0x00000000 sp 0x2000ff48 msp 0x2000ff48 control 0x00 r4 0x20000a60 r9 0x00000000 lr 0x08004183 psp 0x00000000 ### Source ########################################################################################################## 24 return 0; 25 } 26 void p_uart_init(UART_HandleTypeDef *huart) 27 { 28 huart_inst = huart; 29 PDEBUG("...\n"); 30 PDEBUG("UART2 Initialized\n"); 31 } 32 void p_uart_async_write_byte(uint8_t byte) 33 { !34 char send[3] = {0}; 35 sprintf(send, "%02x\n", byte); 36 asm volatile("nop"); 37 HAL_UART_Transmit(huart_inst, send, 2, 100); 38 } ~ ~ ~ ~ ~ ### Stack ########################################################################################################### [0] from 0x080040fc in p_uart_async_write_byte+4 at shared/util/putil.c:34 [1] from 0x08004182 in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [2] from 0x08003492 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [3] from 0x080035e4 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [4] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [5] from 0xffffffe9 [6] from 0x080043d0 in p_serial_mgr_service+40 at shared/drivers/p_serial_mgr.c:165 [7] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x080040fc in p_uart_async_write_byte+4 at shared/util/putil.c:34 ### Variables ####################################################################################################### arg byte = 126 '~' loc send = "\000\000" ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x080040fe halted: PC: 0x08004100 halted: PC: 0x08004104 halted: PC: 0x08004106 halted: PC: 0x0800410a 35 sprintf(send, "%02x\n", byte); ### Assembly ######################################################################################################## !0x080040fc p_uart_async_write_byte+4 ldr r3, [pc, #44] ; (0x800412c ) 0x080040fe p_uart_async_write_byte+6 ldrh r3, [r3, #0] 0x08004100 p_uart_async_write_byte+8 strh.w r3, [sp, #12] 0x08004104 p_uart_async_write_byte+12 movs r1, #0 0x08004106 p_uart_async_write_byte+14 strb.w r1, [sp, #14] 0x0800410a p_uart_async_write_byte+18 str r0, [sp, #0] 0x0800410c p_uart_async_write_byte+20 ldr r3, [pc, #32] ; (0x8004130 ) 0x0800410e p_uart_async_write_byte+22 movs r2, #3 0x08004110 p_uart_async_write_byte+24 add r0, sp, #12 0x08004112 p_uart_async_write_byte+26 bl 0x800453c <__sprintf_chk> ### Breakpoints ##################################################################################################### [1] break at 0x080040fc in shared/util/putil.c:34 for putil.c:34 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007e r5 0x00004001 r10 0x00000000 pc 0x0800410a primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x41000035 basepri 0x00 r2 0x40013808 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000000 r8 0x00000000 sp 0x2000ff48 msp 0x2000ff48 control 0x00 r4 0x20000a60 r9 0x00000000 lr 0x08004183 psp 0x00000000 ### Source ########################################################################################################## 25 } 26 void p_uart_init(UART_HandleTypeDef *huart) 27 { 28 huart_inst = huart; 29 PDEBUG("...\n"); 30 PDEBUG("UART2 Initialized\n"); 31 } 32 void p_uart_async_write_byte(uint8_t byte) 33 { !34 char send[3] = {0}; 35 sprintf(send, "%02x\n", byte); 36 asm volatile("nop"); 37 HAL_UART_Transmit(huart_inst, send, 2, 100); 38 } ~ ~ ~ ~ ~ ~ ### Stack ########################################################################################################### [0] from 0x0800410a in p_uart_async_write_byte+18 at shared/util/putil.c:35 [1] from 0x08004182 in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [2] from 0x08003492 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [3] from 0x080035e4 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [4] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [5] from 0xffffffe9 [6] from 0x080043d0 in p_serial_mgr_service+40 at shared/drivers/p_serial_mgr.c:165 [7] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x0800410a in p_uart_async_write_byte+18 at shared/util/putil.c:35 ### Variables ####################################################################################################### arg byte = 126 '~' loc send = "\000\000" ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x0800410c halted: PC: 0x0800410e halted: PC: 0x08004110 halted: PC: 0x08004112 halted: PC: 0x0800453c Program received signal SIGINT, Interrupt. 0x08009988 in _exit () ### Assembly ######################################################################################################## 0x08009988 ? b.n 0x8009988 <_exit> 0x0800998a ? nop 0x0800998c ? push {r3, r4, r5, r6, r7, lr} 0x0800998e ? nop 0x08009990 ? pop {r3, r4, r5, r6, r7} 0x08009992 ? pop {r3} 0x08009994 ? mov lr, r3 0x08009996 ? bx lr 0x08009998 ? push {r3, r4, r5, r6, r7, lr} 0x0800999a ? nop ### Breakpoints ##################################################################################################### [1] break at 0x080040fc in shared/util/putil.c:34 for putil.c:34 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007f r5 0x00004001 r10 0x00000000 pc 0x08009988 primask 0x00 r1 0x00000006 r6 0x00000000 r11 0x00000000 xPSR 0x21010035 basepri 0x00 r2 0x00000058 r7 0x00000000 r12 0x20000010 fpscr 0x00000000 faultmask 0x00 r3 0x00000058 r8 0x00000000 sp 0x2000fef8 msp 0x2000fef8 control 0x04 r4 0x08009aa0 r9 0x00000000 lr 0x0800468d psp 0x00000000 ### Source ########################################################################################################## ### Stack ########################################################################################################### [0] from 0x08009988 in _exit [1] from 0x0800468c in __chk_fail [2] from 0x0800457c in __sprintf_chk [3] from 0x08004116 in p_uart_async_write_byte+30 at shared/util/putil.c:35 [4] from 0x08004182 in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [5] from 0x08003492 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [6] from 0x080035e4 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [7] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [8] from 0xffffffe9 [9] from 0x080043d0 in p_serial_mgr_service+40 at shared/drivers/p_serial_mgr.c:165 [+] ### Threads ######################################################################################################### [1] id 0 from 0x08009988 in _exit ### Variables ####################################################################################################### ##################################################################################################################### Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] 0x08009988 in _exit () ### Assembly ######################################################################################################## 0x08009988 ? b.n 0x8009988 <_exit> 0x0800998a ? nop 0x0800998c ? push {r3, r4, r5, r6, r7, lr} 0x0800998e ? nop 0x08009990 ? pop {r3, r4, r5, r6, r7} 0x08009992 ? pop {r3} 0x08009994 ? mov lr, r3 0x08009996 ? bx lr 0x08009998 ? push {r3, r4, r5, r6, r7, lr} 0x0800999a ? nop ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007f r5 0x00004001 r10 0x00000000 pc 0x08009988 primask 0x00 r1 0x00000006 r6 0x00000000 r11 0x00000000 xPSR 0x21010035 basepri 0x00 r2 0x00000058 r7 0x00000000 r12 0x20000010 fpscr 0x00000000 faultmask 0x00 r3 0x00000058 r8 0x00000000 sp 0x2000fef8 msp 0x2000fef8 control 0x04 r4 0x08009aa0 r9 0x00000000 lr 0x0800468d psp 0x00000000 ### Source ########################################################################################################## ### Stack ########################################################################################################### [0] from 0x08009988 in _exit [1] from 0x0800468c in __chk_fail [2] from 0x0800457c in __sprintf_chk [3] from 0x08004116 in p_uart_async_write_byte+30 at shared/util/putil.c:35 [4] from 0x08004182 in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [5] from 0x08003492 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [6] from 0x080035e4 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [7] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [8] from 0xffffffe9 [9] from 0x080043d0 in p_serial_mgr_service+40 at shared/drivers/p_serial_mgr.c:165 [+] ### Threads ######################################################################################################### [1] id 0 from 0x08009988 in _exit ### Variables ####################################################################################################### ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x97e8 lma 0x80001c0 Loading section .rodata, size 0x4e8 lma 0x80099a8 Loading section .ARM, size 0x8 lma 0x8009e90 Loading section .init_array, size 0x8 lma 0x8009e98 Loading section .fini_array, size 0x8 lma 0x8009ea0 Loading section .data, size 0x9a8 lma 0x8009ea8 Start address 0x080043fc, load size 43040 Transfer rate: 29 KB/sec, 4782 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x08009988 in _exit () ### Assembly ######################################################################################################## 0x08009988 ? b.n 0x8009988 <_exit> 0x0800998a ? nop 0x0800998c ? push {r3, r4, r5, r6, r7, lr} 0x0800998e ? nop 0x08009990 ? pop {r3, r4, r5, r6, r7} 0x08009992 ? pop {r3} 0x08009994 ? mov lr, r3 0x08009996 ? bx lr 0x08009998 ? push {r3, r4, r5, r6, r7, lr} 0x0800999a ? nop ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007f r5 0x00004001 r10 0x00000000 pc 0x08009988 primask 0x00 r1 0x00000006 r6 0x00000000 r11 0x00000000 xPSR 0x21010035 basepri 0x00 r2 0x00000058 r7 0x00000000 r12 0x20000010 fpscr 0x00000000 faultmask 0x00 r3 0x00000058 r8 0x00000000 sp 0x2000fef8 msp 0x2000fef8 control 0x04 r4 0x08009aa0 r9 0x00000000 lr 0x0800468d psp 0x00000000 ### Source ########################################################################################################## ### Stack ########################################################################################################### [0] from 0x08009988 in _exit [1] from 0x0800468c in __chk_fail [2] from 0x0800457c in __sprintf_chk [3] from 0x08004116 in p_uart_async_write_byte+30 at shared/util/putil.c:35 [4] from 0x08004182 in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [5] from 0x08003492 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [6] from 0x080035e4 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [7] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [8] from 0xffffffe9 [9] from 0x080014ee in main+122 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08009988 in _exit ### Variables ####################################################################################################### ##################################################################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x080043fc msp: 0x20010000 Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x97e8 lma 0x80001c0 Loading section .rodata, size 0x4e8 lma 0x80099a8 Loading section .ARM, size 0x8 lma 0x8009e90 Loading section .init_array, size 0x8 lma 0x8009e98 Loading section .fini_array, size 0x8 lma 0x8009ea0 Loading section .data, size 0x9a8 lma 0x8009ea8 Start address 0x080043fc, load size 43040 Transfer rate: 29 KB/sec, 4782 bytes/write. Breakpoint 1 at 0x80040fc: file shared/util/putil.c, line 34. Note: automatically using hardware breakpoints for read-only addresses. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ################################################################################################# Breakpoint 1, p_uart_async_write_byte (byte=126 '~') at shared/util/putil.c:34 34 char send[3] = {0}; ### Assembly ######################################################################################################## ~ ~ ~ 0x080040f8 p_uart_async_write_byte+0 push {lr} 0x080040fa p_uart_async_write_byte+2 sub sp, #20 !0x080040fc p_uart_async_write_byte+4 ldr r3, [pc, #44] ; (0x800412c ) 0x080040fe p_uart_async_write_byte+6 ldrh r3, [r3, #0] 0x08004100 p_uart_async_write_byte+8 strh.w r3, [sp, #12] 0x08004104 p_uart_async_write_byte+12 movs r1, #0 0x08004106 p_uart_async_write_byte+14 strb.w r1, [sp, #14] ### Breakpoints ##################################################################################################### [1] break at 0x080040fc in shared/util/putil.c:34 for putil.c:34 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007e r5 0x00004001 r10 0x00000000 pc 0x080040fc primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00 r2 0x40013808 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x20001612 r8 0x00000000 sp 0x2000ff48 msp 0x2000ff48 control 0x00 r4 0x20000a60 r9 0x00000000 lr 0x08004183 psp 0x00000000 ### Source ########################################################################################################## 24 return 0; 25 } 26 void p_uart_init(UART_HandleTypeDef *huart) 27 { 28 huart_inst = huart; 29 PDEBUG("...\n"); 30 PDEBUG("UART2 Initialized\n"); 31 } 32 void p_uart_async_write_byte(uint8_t byte) 33 { !34 char send[3] = {0}; 35 sprintf(send, "%02x\n", byte); 36 asm volatile("nop"); 37 HAL_UART_Transmit(huart_inst, send, 2, 100); 38 } ~ ~ ~ ~ ~ ### Stack ########################################################################################################### [0] from 0x080040fc in p_uart_async_write_byte+4 at shared/util/putil.c:34 [1] from 0x08004182 in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [2] from 0x08003492 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [3] from 0x080035e4 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [4] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [5] from 0xffffffe9 [6] from 0x080043aa in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:157 [7] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x080040fc in p_uart_async_write_byte+4 at shared/util/putil.c:34 ### Variables ####################################################################################################### arg byte = 126 '~' loc send = "\000\000" ##################################################################################################################### Continuing. ### Output/messages ################################################################################################# halted: PC: 0x080040fe Program received signal SIGINT, Interrupt. 0x08009988 in _exit () ### Assembly ######################################################################################################## 0x08009988 ? b.n 0x8009988 <_exit> 0x0800998a ? nop 0x0800998c ? push {r3, r4, r5, r6, r7, lr} 0x0800998e ? nop 0x08009990 ? pop {r3, r4, r5, r6, r7} 0x08009992 ? pop {r3} 0x08009994 ? mov lr, r3 0x08009996 ? bx lr 0x08009998 ? push {r3, r4, r5, r6, r7, lr} 0x0800999a ? nop ### Breakpoints ##################################################################################################### [1] break at 0x080040fc in shared/util/putil.c:34 for putil.c:34 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007f r5 0x00004001 r10 0x00000000 pc 0x08009988 primask 0x00 r1 0x00000006 r6 0x00000000 r11 0x00000000 xPSR 0x21010035 basepri 0x00 r2 0x00000058 r7 0x00000000 r12 0x20000010 fpscr 0x00000000 faultmask 0x00 r3 0x00000058 r8 0x00000000 sp 0x2000fef8 msp 0x2000fef8 control 0x04 r4 0x08009aa0 r9 0x00000000 lr 0x0800468d psp 0x00000000 ### Source ########################################################################################################## ### Stack ########################################################################################################### [0] from 0x08009988 in _exit [1] from 0x0800468c in __chk_fail [2] from 0x0800457c in __sprintf_chk [3] from 0x08004116 in p_uart_async_write_byte+30 at shared/util/putil.c:35 [4] from 0x08004182 in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [5] from 0x08003492 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [6] from 0x080035e4 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [7] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [8] from 0xffffffe9 [9] from 0x080043aa in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:157 [+] ### Threads ######################################################################################################### [1] id 0 from 0x08009988 in _exit ### Variables ####################################################################################################### ##################################################################################################################### Continuing. ### Output/messages ################################################################################################# Program received signal SIGINT, Interrupt. 0x08009988 in _exit () ### Assembly ######################################################################################################## 0x08009988 ? b.n 0x8009988 <_exit> 0x0800998a ? nop 0x0800998c ? push {r3, r4, r5, r6, r7, lr} 0x0800998e ? nop 0x08009990 ? pop {r3, r4, r5, r6, r7} 0x08009992 ? pop {r3} 0x08009994 ? mov lr, r3 0x08009996 ? bx lr 0x08009998 ? push {r3, r4, r5, r6, r7, lr} 0x0800999a ? nop ### Breakpoints ##################################################################################################### [1] break at 0x080040fc in shared/util/putil.c:34 for putil.c:34 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007f r5 0x00004001 r10 0x00000000 pc 0x08009988 primask 0x00 r1 0x00000006 r6 0x00000000 r11 0x00000000 xPSR 0x21010035 basepri 0x00 r2 0x00000058 r7 0x00000000 r12 0x20000010 fpscr 0x00000000 faultmask 0x00 r3 0x00000058 r8 0x00000000 sp 0x2000fef8 msp 0x2000fef8 control 0x04 r4 0x08009aa0 r9 0x00000000 lr 0x0800468d psp 0x00000000 ### Source ########################################################################################################## ### Stack ########################################################################################################### [0] from 0x08009988 in _exit [1] from 0x0800468c in __chk_fail [2] from 0x0800457c in __sprintf_chk [3] from 0x08004116 in p_uart_async_write_byte+30 at shared/util/putil.c:35 [4] from 0x08004182 in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [5] from 0x08003492 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [6] from 0x080035e4 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [7] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [8] from 0xffffffe9 [9] from 0x080043aa in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:157 [+] ### Threads ######################################################################################################### [1] id 0 from 0x08009988 in _exit ### Variables ####################################################################################################### ##################################################################################################################### `/storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf' has changed; re-reading symbols. Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x97d8 lma 0x80001c0 Loading section .rodata, size 0x4e0 lma 0x8009998 Loading section .ARM, size 0x8 lma 0x8009e78 Loading section .init_array, size 0x8 lma 0x8009e80 Loading section .fini_array, size 0x8 lma 0x8009e88 Loading section .data, size 0x9a8 lma 0x8009e90 Start address 0x080043f0, load size 43016 Transfer rate: 29 KB/sec, 4779 bytes/write. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ################################################################################################# Breakpoint 1, p_uart_async_write_byte (byte=126 '~') at shared/util/putil.c:34 34 char send[6] = {'\0'}; ### Assembly ######################################################################################################## ~ ~ ~ 0x080040f8 p_uart_async_write_byte+0 push {lr} 0x080040fa p_uart_async_write_byte+2 sub sp, #20 !0x080040fc p_uart_async_write_byte+4 movs r1, #0 0x080040fe p_uart_async_write_byte+6 str r1, [sp, #8] 0x08004100 p_uart_async_write_byte+8 strh.w r1, [sp, #12] 0x08004104 p_uart_async_write_byte+12 str r0, [sp, #0] 0x08004106 p_uart_async_write_byte+14 ldr r3, [pc, #28] ; (0x8004124 ) ### Breakpoints ##################################################################################################### [1] break at 0x080040fc in shared/util/putil.c:34 for putil.c:34 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007e r5 0x00004001 r10 0x00000000 pc 0x080040fc primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00 r2 0x40013808 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x20001612 r8 0x00000000 sp 0x2000ff48 msp 0x2000ff48 control 0x00 r4 0x20000a60 r9 0x00000000 lr 0x08004177 psp 0x00000000 ### Source ########################################################################################################## 24 return 0; 25 } 26 void p_uart_init(UART_HandleTypeDef *huart) 27 { 28 huart_inst = huart; 29 PDEBUG("...\n"); 30 PDEBUG("UART2 Initialized\n"); 31 } 32 void p_uart_async_write_byte(uint8_t byte) 33 { !34 char send[6] = {'\0'}; 35 sprintf(send, "%02x\n", byte); 36 HAL_UART_Transmit(huart_inst, send, 2, 100); 37 } ~ ~ ~ ~ ~ ~ ### Stack ########################################################################################################### [0] from 0x080040fc in p_uart_async_write_byte+4 at shared/util/putil.c:34 [1] from 0x08004176 in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [2] from 0x08003492 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [3] from 0x080035e4 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [4] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [5] from 0xffffffe9 [6] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x080040fc in p_uart_async_write_byte+4 at shared/util/putil.c:34 ### Variables ####################################################################################################### arg byte = 126 '~' loc send = "\000\000\000\000\000" ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x080040fe halted: PC: 0x08004100 halted: PC: 0x08004104 35 sprintf(send, "%02x\n", byte); ### Assembly ######################################################################################################## 0x080040f8 p_uart_async_write_byte+0 push {lr} 0x080040fa p_uart_async_write_byte+2 sub sp, #20 !0x080040fc p_uart_async_write_byte+4 movs r1, #0 0x080040fe p_uart_async_write_byte+6 str r1, [sp, #8] 0x08004100 p_uart_async_write_byte+8 strh.w r1, [sp, #12] 0x08004104 p_uart_async_write_byte+12 str r0, [sp, #0] 0x08004106 p_uart_async_write_byte+14 ldr r3, [pc, #28] ; (0x8004124 ) 0x08004108 p_uart_async_write_byte+16 movs r2, #6 0x0800410a p_uart_async_write_byte+18 add r0, sp, #8 0x0800410c p_uart_async_write_byte+20 bl 0x8004530 <__sprintf_chk> ### Breakpoints ##################################################################################################### [1] break at 0x080040fc in shared/util/putil.c:34 for putil.c:34 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007e r5 0x00004001 r10 0x00000000 pc 0x08004104 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x41000035 basepri 0x00 r2 0x40013808 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x20001612 r8 0x00000000 sp 0x2000ff48 msp 0x2000ff48 control 0x00 r4 0x20000a60 r9 0x00000000 lr 0x08004177 psp 0x00000000 ### Source ########################################################################################################## 25 } 26 void p_uart_init(UART_HandleTypeDef *huart) 27 { 28 huart_inst = huart; 29 PDEBUG("...\n"); 30 PDEBUG("UART2 Initialized\n"); 31 } 32 void p_uart_async_write_byte(uint8_t byte) 33 { !34 char send[6] = {'\0'}; 35 sprintf(send, "%02x\n", byte); 36 HAL_UART_Transmit(huart_inst, send, 2, 100); 37 } ~ ~ ~ ~ ~ ~ ~ ### Stack ########################################################################################################### [0] from 0x08004104 in p_uart_async_write_byte+12 at shared/util/putil.c:35 [1] from 0x08004176 in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [2] from 0x08003492 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [3] from 0x080035e4 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [4] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [5] from 0xffffffe9 [6] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08004104 in p_uart_async_write_byte+12 at shared/util/putil.c:35 ### Variables ####################################################################################################### arg byte = 126 '~' loc send = "\000\000\000\000\000" ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x08004106 halted: PC: 0x08004108 halted: PC: 0x0800410a halted: PC: 0x0800410c halted: PC: 0x08004530 36 HAL_UART_Transmit(huart_inst, send, 2, 100); ### Assembly ######################################################################################################## 0x08004104 p_uart_async_write_byte+12 str r0, [sp, #0] 0x08004106 p_uart_async_write_byte+14 ldr r3, [pc, #28] ; (0x8004124 ) 0x08004108 p_uart_async_write_byte+16 movs r2, #6 0x0800410a p_uart_async_write_byte+18 add r0, sp, #8 0x0800410c p_uart_async_write_byte+20 bl 0x8004530 <__sprintf_chk> 0x08004110 p_uart_async_write_byte+24 movs r3, #100 ; 0x64 0x08004112 p_uart_async_write_byte+26 movs r2, #2 0x08004114 p_uart_async_write_byte+28 add r1, sp, #8 0x08004116 p_uart_async_write_byte+30 ldr r0, [pc, #16] ; (0x8004128 ) 0x08004118 p_uart_async_write_byte+32 ldr r0, [r0, #0] ### Breakpoints ##################################################################################################### [1] break at 0x080040fc in shared/util/putil.c:34 for putil.c:34 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000003 r5 0x00004001 r10 0x00000000 pc 0x08004110 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x810f0035 basepri 0x00 r2 0x00000000 r7 0x00000000 r12 0x08009a4d fpscr 0x00000000 faultmask 0x00 r3 0x2000ff53 r8 0x00000000 sp 0x2000ff48 msp 0x2000ff48 control 0x04 r4 0x20000a60 r9 0x00000000 lr 0x08004111 psp 0x00000000 ### Source ########################################################################################################## 26 void p_uart_init(UART_HandleTypeDef *huart) 27 { 28 huart_inst = huart; 29 PDEBUG("...\n"); 30 PDEBUG("UART2 Initialized\n"); 31 } 32 void p_uart_async_write_byte(uint8_t byte) 33 { !34 char send[6] = {'\0'}; 35 sprintf(send, "%02x\n", byte); 36 HAL_UART_Transmit(huart_inst, send, 2, 100); 37 } ~ ~ ~ ~ ~ ~ ~ ~ ### Stack ########################################################################################################### [0] from 0x08004110 in p_uart_async_write_byte+24 at shared/util/putil.c:36 [1] from 0x08004176 in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [2] from 0x08003492 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [3] from 0x080035e4 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [4] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [5] from 0xffffffe9 [6] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08004110 in p_uart_async_write_byte+24 at shared/util/putil.c:36 ### Variables ####################################################################################################### arg byte = loc send = "7e\n\000\000" ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x08004112 halted: PC: 0x08004114 halted: PC: 0x08004116 halted: PC: 0x08004118 halted: PC: 0x0800411a halted: PC: 0x08003cca halted: PC: 0x08004120 halted: PC: 0x08004176 UART1_RxCpltCallback (huart=) at shared/drivers/p_serial_mgr.c:43 43 switch (sstate) ### Assembly ######################################################################################################## ~ 0x0800416c UART1_RxCpltCallback+0 push {r3, lr} 0x0800416e UART1_RxCpltCallback+2 ldr r3, [pc, #472] ; (0x8004348 ) 0x08004170 UART1_RxCpltCallback+4 ldrb r0, [r3, #0] 0x08004172 UART1_RxCpltCallback+6 bl 0x80040f8 0x08004176 UART1_RxCpltCallback+10 ldr r3, [pc, #468] ; (0x800434c ) 0x08004178 UART1_RxCpltCallback+12 ldrb r3, [r3, #0] 0x0800417a UART1_RxCpltCallback+14 cmp r3, #4 0x0800417c UART1_RxCpltCallback+16 bhi.w 0x800433e 0x08004180 UART1_RxCpltCallback+20 tbb [pc, r3] ### Breakpoints ##################################################################################################### [1] break at 0x080040fc in shared/util/putil.c:34 for putil.c:34 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x00004001 r10 0x00000000 pc 0x08004176 primask 0x00 r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x210f0035 basepri 0x00 r2 0x006000d0 r7 0x00000000 r12 0x08009a4d fpscr 0x00000000 faultmask 0x00 r3 0x00000020 r8 0x00000000 sp 0x2000ff60 msp 0x2000ff60 control 0x04 r4 0x20000a60 r9 0x00000000 lr 0x08003c27 psp 0x00000000 ### Source ########################################################################################################## 33 p_cb_serial_pkt_t serial_pkt_cb; 34 35 static volatile uint8_t start_index_tracker = 0; 36 static volatile uint8_t frame_index_tracker = 0; 37 38 #pragma message(Reminder "Move away from cirular buffer to a managed queue") 39 40 void UART1_RxCpltCallback(UART_HandleTypeDef *huart) 41 { 42 p_uart_async_write_byte(rxc); 43 switch (sstate) 44 { 45 case SS_IDLE: // packet start 46 { 47 if (rxc == 0x7E) 48 { 49 sstate = SS_START; 50 } 51 } 52 break; ### Stack ########################################################################################################### [0] from 0x08004176 in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:43 [1] from 0x08003492 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035e4 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08004176 in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:43 ### Variables ####################################################################################################### arg huart = ##################################################################################################################### Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] UART1_RxCpltCallback (huart=) at shared/drivers/p_serial_mgr.c:43 43 switch (sstate) ### Assembly ######################################################################################################## ~ 0x0800416c UART1_RxCpltCallback+0 push {r3, lr} 0x0800416e UART1_RxCpltCallback+2 ldr r3, [pc, #472] ; (0x8004348 ) 0x08004170 UART1_RxCpltCallback+4 ldrb r0, [r3, #0] 0x08004172 UART1_RxCpltCallback+6 bl 0x80040f8 0x08004176 UART1_RxCpltCallback+10 ldr r3, [pc, #468] ; (0x800434c ) 0x08004178 UART1_RxCpltCallback+12 ldrb r3, [r3, #0] 0x0800417a UART1_RxCpltCallback+14 cmp r3, #4 0x0800417c UART1_RxCpltCallback+16 bhi.w 0x800433e 0x08004180 UART1_RxCpltCallback+20 tbb [pc, r3] ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x00004001 r10 0x00000000 pc 0x08004176 primask 0x00 r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x210f0035 basepri 0x00 r2 0x006000d0 r7 0x00000000 r12 0x08009a4d fpscr 0x00000000 faultmask 0x00 r3 0x00000020 r8 0x00000000 sp 0x2000ff60 msp 0x2000ff60 control 0x04 r4 0x20000a60 r9 0x00000000 lr 0x08003c27 psp 0x00000000 ### Source ########################################################################################################## 33 p_cb_serial_pkt_t serial_pkt_cb; 34 35 static volatile uint8_t start_index_tracker = 0; 36 static volatile uint8_t frame_index_tracker = 0; 37 38 #pragma message(Reminder "Move away from cirular buffer to a managed queue") 39 40 void UART1_RxCpltCallback(UART_HandleTypeDef *huart) 41 { 42 p_uart_async_write_byte(rxc); 43 switch (sstate) 44 { 45 case SS_IDLE: // packet start 46 { 47 if (rxc == 0x7E) 48 { 49 sstate = SS_START; 50 } 51 } 52 break; ### Stack ########################################################################################################### [0] from 0x08004176 in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:43 [1] from 0x08003492 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035e4 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08004176 in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:43 ### Variables ####################################################################################################### arg huart = ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x97d8 lma 0x80001c0 Loading section .rodata, size 0x4e0 lma 0x8009998 Loading section .ARM, size 0x8 lma 0x8009e78 Loading section .init_array, size 0x8 lma 0x8009e80 Loading section .fini_array, size 0x8 lma 0x8009e88 Loading section .data, size 0x9a8 lma 0x8009e90 Start address 0x080043f0, load size 43016 Transfer rate: 29 KB/sec, 4779 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x080043c2 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:164 164 return NULL; ### Assembly ######################################################################################################## 0x080043b6 p_serial_mgr_service+26 add r0, r2 0x080043b8 p_serial_mgr_service+28 ldrb.w r2, [r0, #260] ; 0x104 0x080043bc p_serial_mgr_service+32 cmp r2, #0 0x080043be p_serial_mgr_service+34 beq.n 0x80043a0 0x080043c0 p_serial_mgr_service+36 b.n 0x80043c4 0x080043c2 p_serial_mgr_service+38 movs r0, #0 0x080043c4 p_serial_mgr_service+40 bx lr 0x080043c6 p_serial_mgr_service+42 nop 0x080043c8 p_serial_mgr_service+44 asrs r4, r2, #24 0x080043ca p_serial_mgr_service+46 movs r0, #0 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080043c2 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x00000000 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014f3 psp 0x00000000 ### Source ########################################################################################################## 154 serial_pkt_t *p_serial_mgr_service(void) 155 { 156 // this will be less garbage when i switch to a queue 157 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 158 { 159 if (serial_pkt_cb.buffer[ind].b_ready) 160 { 161 return &serial_pkt_cb.buffer[ind]; 162 } 163 } 164 return NULL; 165 } 166 167 void p_serial_mgr_start() 168 { 169 HAL_UART_Receive_IT(_serial_huart_inst, &rxc, 1); 170 } ~ ~ ~ ### Stack ########################################################################################################### [0] from 0x080043c2 in p_serial_mgr_service+38 at shared/drivers/p_serial_mgr.c:164 [1] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x080043c2 in p_serial_mgr_service+38 at shared/drivers/p_serial_mgr.c:164 ### Variables ####################################################################################################### ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x97d8 lma 0x80001c0 Loading section .rodata, size 0x4e0 lma 0x8009998 Loading section .ARM, size 0x8 lma 0x8009e78 Loading section .init_array, size 0x8 lma 0x8009e80 Loading section .fini_array, size 0x8 lma 0x8009e88 Loading section .data, size 0x9a8 lma 0x8009e90 Start address 0x080043f0, load size 43016 Transfer rate: 29 KB/sec, 4779 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x08009978 in _fstat_r () ### Assembly ######################################################################################################## 0x08009978 ? b.n 0x8009978 <_fstat_r+28> 0x0800997a ? nop 0x0800997c ? push {r3, r4, r5, r6, r7, lr} 0x0800997e ? nop 0x08009980 ? pop {r3, r4, r5, r6, r7} 0x08009982 ? pop {r3} 0x08009984 ? mov lr, r3 0x08009986 ? bx lr 0x08009988 ? push {r3, r4, r5, r6, r7, lr} 0x0800998a ? nop ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007f r5 0x00004001 r10 0x00000000 pc 0x08009978 primask 0x00 r1 0x00000006 r6 0x00000000 r11 0x00000000 xPSR 0x21010035 basepri 0x00 r2 0x00000058 r7 0x00000000 r12 0x20000010 fpscr 0x00000000 faultmask 0x00 r3 0x00000058 r8 0x00000000 sp 0x2000ff00 msp 0x2000ff00 control 0x04 r4 0x08009a8c r9 0x00000000 lr 0x08004681 psp 0x00000000 ### Source ########################################################################################################## ### Stack ########################################################################################################### [0] from 0x08009978 in _fstat_r [1] from 0x08004680 in __sprintf_chk ### Threads ######################################################################################################### [1] id 0 from 0x08009978 in _fstat_r ### Variables ####################################################################################################### ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9900 lma 0x80001c0 Loading section .rodata, size 0x4e0 lma 0x8009ac0 Loading section .ARM, size 0x8 lma 0x8009fa0 Loading section .init_array, size 0x8 lma 0x8009fa8 Loading section .fini_array, size 0x8 lma 0x8009fb0 Loading section .data, size 0x9a8 lma 0x8009fb8 Start address 0x08004518, load size 43312 Transfer rate: 29 KB/sec, 4812 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x08009aa0 in _exit () ### Assembly ######################################################################################################## 0x08009aa0 ? b.n 0x8009aa0 <_exit> 0x08009aa2 ? nop 0x08009aa4 ? push {r3, r4, r5, r6, r7, lr} 0x08009aa6 ? nop 0x08009aa8 ? pop {r3, r4, r5, r6, r7} 0x08009aaa ? pop {r3} 0x08009aac ? mov lr, r3 0x08009aae ? bx lr 0x08009ab0 ? push {r3, r4, r5, r6, r7, lr} 0x08009ab2 ? nop ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007f r5 0x00004001 r10 0x00000000 pc 0x08009aa0 primask 0x00 r1 0x00000006 r6 0x00000000 r11 0x00000000 xPSR 0x21010035 basepri 0x00 r2 0x00000058 r7 0x00000000 r12 0x20000010 fpscr 0x00000000 faultmask 0x00 r3 0x00000058 r8 0x00000000 sp 0x2000ff00 msp 0x2000ff00 control 0x04 r4 0x08009bb4 r9 0x00000000 lr 0x080047a9 psp 0x00000000 ### Source ########################################################################################################## ### Stack ########################################################################################################### [0] from 0x08009aa0 in _exit [1] from 0x080047a8 in __chk_fail [2] from 0x08004698 in __sprintf_chk [3] from 0x08004238 in p_uart_async_write_byte+20 at shared/util/putil.c:35 [4] from 0x0800429e in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [5] from 0x0800353e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [6] from 0x08003710 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [7] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [8] from 0xffffffe9 [9] from 0x080014ee in main+122 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08009aa0 in _exit ### Variables ####################################################################################################### ##################################################################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08004518 msp: 0x20010000 Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9900 lma 0x80001c0 Loading section .rodata, size 0x4e0 lma 0x8009ac0 Loading section .ARM, size 0x8 lma 0x8009fa0 Loading section .init_array, size 0x8 lma 0x8009fa8 Loading section .fini_array, size 0x8 lma 0x8009fb0 Loading section .data, size 0x9a8 lma 0x8009fb8 Start address 0x08004518, load size 43312 Transfer rate: 29 KB/sec, 4812 bytes/write. Breakpoint 1 at 0x8004228: file shared/util/putil.c, line 35. Note: automatically using hardware breakpoints for read-only addresses. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ################################################################################################# Breakpoint 1, p_uart_async_write_byte (byte=126 '~') at shared/util/putil.c:35 35 sprintf(send, "%02x\n", byte); ### Assembly ######################################################################################################## ~ ~ ~ 0x08004224 p_uart_async_write_byte+0 push {r4, lr} 0x08004226 p_uart_async_write_byte+2 sub sp, #8 !0x08004228 p_uart_async_write_byte+4 ldr r4, [pc, #28] ; (0x8004248 ) 0x0800422a p_uart_async_write_byte+6 str r0, [sp, #0] 0x0800422c p_uart_async_write_byte+8 ldr r3, [pc, #28] ; (0x800424c ) 0x0800422e p_uart_async_write_byte+10 movs r2, #3 0x08004230 p_uart_async_write_byte+12 movs r1, #0 ### Breakpoints ##################################################################################################### [1] break at 0x08004228 in shared/util/putil.c:35 for putil.c:35 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007e r5 0x00004001 r10 0x00000000 pc 0x08004228 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00 r2 0x40013808 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x20001616 r8 0x00000000 sp 0x2000ff50 msp 0x2000ff50 control 0x00 r4 0x20000a60 r9 0x00000000 lr 0x0800429f psp 0x00000000 ### Source ########################################################################################################## 25 return 0; 26 } 27 void p_uart_init(UART_HandleTypeDef *huart) 28 { 29 huart_inst = huart; 30 PDEBUG("...\n"); 31 PDEBUG("UART2 Initialized\n"); 32 } 33 void p_uart_async_write_byte(uint8_t byte) 34 { !35 sprintf(send, "%02x\n", byte); 36 HAL_UART_Transmit_IT(huart_inst, send, 2); 37 } ~ ~ ~ ~ ~ ~ ~ ### Stack ########################################################################################################### [0] from 0x08004228 in p_uart_async_write_byte+4 at shared/util/putil.c:35 [1] from 0x0800429e in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [2] from 0x0800353e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [3] from 0x08003710 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [4] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [5] from 0xffffffe9 [6] from 0x080044ce in p_serial_mgr_service+10 at shared/drivers/p_serial_mgr.c:157 [7] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08004228 in p_uart_async_write_byte+4 at shared/util/putil.c:35 ### Variables ####################################################################################################### arg byte = 126 '~' ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x0800422a halted: PC: 0x0800422c halted: PC: 0x0800422e halted: PC: 0x08004230 halted: PC: 0x08004232 halted: PC: 0x08004234 halted: PC: 0x08004658 Program received signal SIGINT, Interrupt. 0x08009aa0 in _exit () ### Assembly ######################################################################################################## 0x08009aa0 ? b.n 0x8009aa0 <_exit> 0x08009aa2 ? nop 0x08009aa4 ? push {r3, r4, r5, r6, r7, lr} 0x08009aa6 ? nop 0x08009aa8 ? pop {r3, r4, r5, r6, r7} 0x08009aaa ? pop {r3} 0x08009aac ? mov lr, r3 0x08009aae ? bx lr 0x08009ab0 ? push {r3, r4, r5, r6, r7, lr} 0x08009ab2 ? nop ### Breakpoints ##################################################################################################### [1] break at 0x08004228 in shared/util/putil.c:35 for putil.c:35 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007f r5 0x00004001 r10 0x00000000 pc 0x08009aa0 primask 0x00 r1 0x00000006 r6 0x00000000 r11 0x00000000 xPSR 0x21010035 basepri 0x00 r2 0x00000058 r7 0x00000000 r12 0x20000010 fpscr 0x00000000 faultmask 0x00 r3 0x00000058 r8 0x00000000 sp 0x2000ff00 msp 0x2000ff00 control 0x04 r4 0x08009bb4 r9 0x00000000 lr 0x080047a9 psp 0x00000000 ### Source ########################################################################################################## ### Stack ########################################################################################################### [0] from 0x08009aa0 in _exit [1] from 0x080047a8 in __chk_fail [2] from 0x08004698 in __sprintf_chk [3] from 0x08004238 in p_uart_async_write_byte+20 at shared/util/putil.c:35 [4] from 0x0800429e in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [5] from 0x0800353e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [6] from 0x08003710 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [7] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [8] from 0xffffffe9 [9] from 0x080044ce in p_serial_mgr_service+10 at shared/drivers/p_serial_mgr.c:157 [+] ### Threads ######################################################################################################### [1] id 0 from 0x08009aa0 in _exit ### Variables ####################################################################################################### ##################################################################################################################### `/storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf' has changed; re-reading symbols. Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9900 lma 0x80001c0 Loading section .rodata, size 0x4e0 lma 0x8009ac0 Loading section .ARM, size 0x8 lma 0x8009fa0 Loading section .init_array, size 0x8 lma 0x8009fa8 Loading section .fini_array, size 0x8 lma 0x8009fb0 Loading section .data, size 0x9a8 lma 0x8009fb8 Start address 0x08004518, load size 43312 Transfer rate: 29 KB/sec, 4812 bytes/write. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ################################################################################################# Breakpoint 1, p_uart_async_write_byte (byte=126 '~') at shared/util/putil.c:35 35 sprintf(send, "%02x\n", byte); ### Assembly ######################################################################################################## ~ ~ ~ 0x08004224 p_uart_async_write_byte+0 push {r4, lr} 0x08004226 p_uart_async_write_byte+2 sub sp, #8 !0x08004228 p_uart_async_write_byte+4 ldr r4, [pc, #28] ; (0x8004248 ) 0x0800422a p_uart_async_write_byte+6 str r0, [sp, #0] 0x0800422c p_uart_async_write_byte+8 ldr r3, [pc, #28] ; (0x800424c ) 0x0800422e p_uart_async_write_byte+10 movs r2, #10 0x08004230 p_uart_async_write_byte+12 movs r1, #0 ### Breakpoints ##################################################################################################### [1] break at 0x08004228 in shared/util/putil.c:35 for putil.c:35 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007e r5 0x00004001 r10 0x00000000 pc 0x08004228 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00 r2 0x40013808 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x2000161e r8 0x00000000 sp 0x2000ff50 msp 0x2000ff50 control 0x00 r4 0x20000a60 r9 0x00000000 lr 0x0800429f psp 0x00000000 ### Source ########################################################################################################## 25 return 0; 26 } 27 void p_uart_init(UART_HandleTypeDef *huart) 28 { 29 huart_inst = huart; 30 PDEBUG("...\n"); 31 PDEBUG("UART2 Initialized\n"); 32 } 33 void p_uart_async_write_byte(uint8_t byte) 34 { !35 sprintf(send, "%02x\n", byte); 36 HAL_UART_Transmit_IT(huart_inst, send, 2); 37 } ~ ~ ~ ~ ~ ~ ~ ### Stack ########################################################################################################### [0] from 0x08004228 in p_uart_async_write_byte+4 at shared/util/putil.c:35 [1] from 0x0800429e in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [2] from 0x0800353e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [3] from 0x08003710 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [4] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [5] from 0xffffffe9 [6] from 0x080044ea in p_serial_mgr_service+38 at shared/drivers/p_serial_mgr.c:164 [7] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08004228 in p_uart_async_write_byte+4 at shared/util/putil.c:35 ### Variables ####################################################################################################### arg byte = 126 '~' ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x0800422a halted: PC: 0x0800422c halted: PC: 0x0800422e halted: PC: 0x08004230 halted: PC: 0x08004232 halted: PC: 0x08004234 halted: PC: 0x08004658 36 HAL_UART_Transmit_IT(huart_inst, send, 2); ### Assembly ######################################################################################################## 0x0800422c p_uart_async_write_byte+8 ldr r3, [pc, #28] ; (0x800424c ) 0x0800422e p_uart_async_write_byte+10 movs r2, #10 0x08004230 p_uart_async_write_byte+12 movs r1, #0 0x08004232 p_uart_async_write_byte+14 mov r0, r4 0x08004234 p_uart_async_write_byte+16 bl 0x8004658 <__sprintf_chk> 0x08004238 p_uart_async_write_byte+20 movs r2, #2 0x0800423a p_uart_async_write_byte+22 mov r1, r4 0x0800423c p_uart_async_write_byte+24 ldr r3, [pc, #16] ; (0x8004250 ) 0x0800423e p_uart_async_write_byte+26 ldr r0, [r3, #0] 0x08004240 p_uart_async_write_byte+28 bl 0x8003624 ### Breakpoints ##################################################################################################### [1] break at 0x08004228 in shared/util/putil.c:35 for putil.c:35 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000003 r5 0x00004001 r10 0x00000000 pc 0x08004238 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x810f0035 basepri 0x00 r2 0x00000000 r7 0x00000000 r12 0x08009b75 fpscr 0x00000000 faultmask 0x00 r3 0x20000bdb r8 0x00000000 sp 0x2000ff50 msp 0x2000ff50 control 0x04 r4 0x20000bd8 r9 0x00000000 lr 0x08004239 psp 0x00000000 ### Source ########################################################################################################## 26 } 27 void p_uart_init(UART_HandleTypeDef *huart) 28 { 29 huart_inst = huart; 30 PDEBUG("...\n"); 31 PDEBUG("UART2 Initialized\n"); 32 } 33 void p_uart_async_write_byte(uint8_t byte) 34 { !35 sprintf(send, "%02x\n", byte); 36 HAL_UART_Transmit_IT(huart_inst, send, 2); 37 } ~ ~ ~ ~ ~ ~ ~ ~ ### Stack ########################################################################################################### [0] from 0x08004238 in p_uart_async_write_byte+20 at shared/util/putil.c:36 [1] from 0x0800429e in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [2] from 0x0800353e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [3] from 0x08003710 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [4] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [5] from 0xffffffe9 [6] from 0x080044ea in p_serial_mgr_service+38 at shared/drivers/p_serial_mgr.c:164 [7] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08004238 in p_uart_async_write_byte+20 at shared/util/putil.c:36 ### Variables ####################################################################################################### arg byte = ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x0800423a halted: PC: 0x0800423c halted: PC: 0x0800423e halted: PC: 0x08004240 halted: PC: 0x08003624 halted: PC: 0x08004246 halted: PC: 0x0800429e UART1_RxCpltCallback (huart=) at shared/drivers/p_serial_mgr.c:43 43 switch (sstate) ### Assembly ######################################################################################################## ~ 0x08004294 UART1_RxCpltCallback+0 push {r3, lr} 0x08004296 UART1_RxCpltCallback+2 ldr r3, [pc, #472] ; (0x8004470 ) 0x08004298 UART1_RxCpltCallback+4 ldrb r0, [r3, #0] 0x0800429a UART1_RxCpltCallback+6 bl 0x8004224 0x0800429e UART1_RxCpltCallback+10 ldr r3, [pc, #468] ; (0x8004474 ) 0x080042a0 UART1_RxCpltCallback+12 ldrb r3, [r3, #0] 0x080042a2 UART1_RxCpltCallback+14 cmp r3, #4 0x080042a4 UART1_RxCpltCallback+16 bhi.w 0x8004466 0x080042a8 UART1_RxCpltCallback+20 tbb [pc, r3] ### Breakpoints ##################################################################################################### [1] break at 0x08004228 in shared/util/putil.c:35 for putil.c:35 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x00004001 r10 0x00000000 pc 0x0800429e primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x610f0035 basepri 0x00 r2 0x40004400 r7 0x00000000 r12 0x08009b75 fpscr 0x00000000 faultmask 0x00 r3 0x000000ad r8 0x00000000 sp 0x2000ff60 msp 0x2000ff60 control 0x04 r4 0x20000a60 r9 0x00000000 lr 0x08004245 psp 0x00000000 ### Source ########################################################################################################## 33 p_cb_serial_pkt_t serial_pkt_cb; 34 35 static volatile uint8_t start_index_tracker = 0; 36 static volatile uint8_t frame_index_tracker = 0; 37 38 #pragma message(Reminder "Move away from cirular buffer to a managed queue") 39 40 void UART1_RxCpltCallback(UART_HandleTypeDef *huart) 41 { 42 p_uart_async_write_byte(rxc); 43 switch (sstate) 44 { 45 case SS_IDLE: // packet start 46 { 47 if (rxc == 0x7E) 48 { 49 sstate = SS_START; 50 } 51 } 52 break; ### Stack ########################################################################################################### [0] from 0x0800429e in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:43 [1] from 0x0800353e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x08003710 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x080044ea in p_serial_mgr_service+38 at shared/drivers/p_serial_mgr.c:164 [6] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x0800429e in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:43 ### Variables ####################################################################################################### arg huart = ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x080042a0 halted: PC: 0x080042a2 halted: PC: 0x080042a4 halted: PC: 0x080042a8 halted: PC: 0x080042b2 47 if (rxc == 0x7E) ### Assembly ######################################################################################################## 0x080042a4 UART1_RxCpltCallback+16 bhi.w 0x8004466 0x080042a8 UART1_RxCpltCallback+20 tbb [pc, r3] 0x080042ac UART1_RxCpltCallback+24 lsrs r3, r0, #16 0x080042ae UART1_RxCpltCallback+26 ldrh r7, [r1, #42] ; 0x2a 0x080042b0 UART1_RxCpltCallback+28 lsls r0, r7, #2 0x080042b2 UART1_RxCpltCallback+30 ldr r3, [pc, #444] ; (0x8004470 ) 0x080042b4 UART1_RxCpltCallback+32 ldrb r3, [r3, #0] 0x080042b6 UART1_RxCpltCallback+34 cmp r3, #126 ; 0x7e 0x080042b8 UART1_RxCpltCallback+36 bne.w 0x8004458 0x080042bc UART1_RxCpltCallback+40 ldr r3, [pc, #436] ; (0x8004474 ) ### Breakpoints ##################################################################################################### [1] break at 0x08004228 in shared/util/putil.c:35 for putil.c:35 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x00004001 r10 0x00000000 pc 0x080042b2 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x810f0035 basepri 0x00 r2 0x40004400 r7 0x00000000 r12 0x08009b75 fpscr 0x00000000 faultmask 0x00 r3 0x00000000 r8 0x00000000 sp 0x2000ff60 msp 0x2000ff60 control 0x04 r4 0x20000a60 r9 0x00000000 lr 0x08004245 psp 0x00000000 ### Source ########################################################################################################## 37 38 #pragma message(Reminder "Move away from cirular buffer to a managed queue") 39 40 void UART1_RxCpltCallback(UART_HandleTypeDef *huart) 41 { 42 p_uart_async_write_byte(rxc); 43 switch (sstate) 44 { 45 case SS_IDLE: // packet start 46 { 47 if (rxc == 0x7E) 48 { 49 sstate = SS_START; 50 } 51 } 52 break; 53 case SS_START: 54 { 55 switch (start_index_tracker) 56 { ### Stack ########################################################################################################### [0] from 0x080042b2 in UART1_RxCpltCallback+30 at shared/drivers/p_serial_mgr.c:47 [1] from 0x0800353e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x08003710 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x080044ea in p_serial_mgr_service+38 at shared/drivers/p_serial_mgr.c:164 [6] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x080042b2 in UART1_RxCpltCallback+30 at shared/drivers/p_serial_mgr.c:47 ### Variables ####################################################################################################### arg huart = ##################################################################################################################### Continuing. ### Output/messages ################################################################################################# Breakpoint 1, p_uart_async_write_byte (byte=1 '\001') at shared/util/putil.c:35 35 sprintf(send, "%02x\n", byte); ### Assembly ######################################################################################################## ~ ~ ~ 0x08004224 p_uart_async_write_byte+0 push {r4, lr} 0x08004226 p_uart_async_write_byte+2 sub sp, #8 !0x08004228 p_uart_async_write_byte+4 ldr r4, [pc, #28] ; (0x8004248 ) 0x0800422a p_uart_async_write_byte+6 str r0, [sp, #0] 0x0800422c p_uart_async_write_byte+8 ldr r3, [pc, #28] ; (0x800424c ) 0x0800422e p_uart_async_write_byte+10 movs r2, #10 0x08004230 p_uart_async_write_byte+12 movs r1, #0 ### Breakpoints ##################################################################################################### [1] break at 0x08004228 in shared/util/putil.c:35 for putil.c:35 hit 2 times ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000001 r5 0x00004001 r10 0x00000000 pc 0x08004228 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x810f0035 basepri 0x00 r2 0x40013808 r7 0x00000000 r12 0x08009b75 fpscr 0x00000000 faultmask 0x00 r3 0x2000161e r8 0x00000000 sp 0x2000ff50 msp 0x2000ff50 control 0x00 r4 0x20000a60 r9 0x00000000 lr 0x0800429f psp 0x00000000 ### Source ########################################################################################################## 25 return 0; 26 } 27 void p_uart_init(UART_HandleTypeDef *huart) 28 { 29 huart_inst = huart; 30 PDEBUG("...\n"); 31 PDEBUG("UART2 Initialized\n"); 32 } 33 void p_uart_async_write_byte(uint8_t byte) 34 { !35 sprintf(send, "%02x\n", byte); 36 HAL_UART_Transmit_IT(huart_inst, send, 2); 37 } ~ ~ ~ ~ ~ ~ ~ ### Stack ########################################################################################################### [0] from 0x08004228 in p_uart_async_write_byte+4 at shared/util/putil.c:35 [1] from 0x0800429e in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [2] from 0x0800353e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [3] from 0x080037ba in HAL_UART_IRQHandler+278 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2427 [4] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [5] from 0xffffffe9 [6] from 0x080044ea in p_serial_mgr_service+38 at shared/drivers/p_serial_mgr.c:164 [7] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08004228 in p_uart_async_write_byte+4 at shared/util/putil.c:35 ### Variables ####################################################################################################### arg byte = 1 '\001' ##################################################################################################################### Continuing. ### Output/messages ################################################################################################# halted: PC: 0x0800422a Breakpoint 1, p_uart_async_write_byte (byte=126 '~') at shared/util/putil.c:35 35 sprintf(send, "%02x\n", byte); ### Assembly ######################################################################################################## ~ ~ ~ 0x08004224 p_uart_async_write_byte+0 push {r4, lr} 0x08004226 p_uart_async_write_byte+2 sub sp, #8 !0x08004228 p_uart_async_write_byte+4 ldr r4, [pc, #28] ; (0x8004248 ) 0x0800422a p_uart_async_write_byte+6 str r0, [sp, #0] 0x0800422c p_uart_async_write_byte+8 ldr r3, [pc, #28] ; (0x800424c ) 0x0800422e p_uart_async_write_byte+10 movs r2, #10 0x08004230 p_uart_async_write_byte+12 movs r1, #0 ### Breakpoints ##################################################################################################### [1] break at 0x08004228 in shared/util/putil.c:35 for putil.c:35 hit 3 times ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007e r5 0x00004001 r10 0x00000000 pc 0x08004228 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x810f0035 basepri 0x00 r2 0x40013808 r7 0x00000000 r12 0x08009b75 fpscr 0x00000000 faultmask 0x00 r3 0x2000161e r8 0x00000000 sp 0x2000ff50 msp 0x2000ff50 control 0x00 r4 0x20000a60 r9 0x00000000 lr 0x0800429f psp 0x00000000 ### Source ########################################################################################################## 25 return 0; 26 } 27 void p_uart_init(UART_HandleTypeDef *huart) 28 { 29 huart_inst = huart; 30 PDEBUG("...\n"); 31 PDEBUG("UART2 Initialized\n"); 32 } 33 void p_uart_async_write_byte(uint8_t byte) 34 { !35 sprintf(send, "%02x\n", byte); 36 HAL_UART_Transmit_IT(huart_inst, send, 2); 37 } ~ ~ ~ ~ ~ ~ ~ ### Stack ########################################################################################################### [0] from 0x08004228 in p_uart_async_write_byte+4 at shared/util/putil.c:35 [1] from 0x0800429e in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [2] from 0x0800353e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [3] from 0x080037ba in HAL_UART_IRQHandler+278 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2427 [4] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [5] from 0xffffffe9 [6] from 0x080044ea in p_serial_mgr_service+38 at shared/drivers/p_serial_mgr.c:164 [7] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08004228 in p_uart_async_write_byte+4 at shared/util/putil.c:35 ### Variables ####################################################################################################### arg byte = 126 '~' ##################################################################################################################### Continuing. ### Output/messages ################################################################################################# halted: PC: 0x0800422a Breakpoint 1, p_uart_async_write_byte (byte=126 '~') at shared/util/putil.c:35 35 sprintf(send, "%02x\n", byte); ### Assembly ######################################################################################################## ~ ~ ~ 0x08004224 p_uart_async_write_byte+0 push {r4, lr} 0x08004226 p_uart_async_write_byte+2 sub sp, #8 !0x08004228 p_uart_async_write_byte+4 ldr r4, [pc, #28] ; (0x8004248 ) 0x0800422a p_uart_async_write_byte+6 str r0, [sp, #0] 0x0800422c p_uart_async_write_byte+8 ldr r3, [pc, #28] ; (0x800424c ) 0x0800422e p_uart_async_write_byte+10 movs r2, #10 0x08004230 p_uart_async_write_byte+12 movs r1, #0 ### Breakpoints ##################################################################################################### [1] break at 0x08004228 in shared/util/putil.c:35 for putil.c:35 hit 4 times ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007e r5 0x00004001 r10 0x00000000 pc 0x08004228 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00 r2 0x40013808 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x2000161e r8 0x00000000 sp 0x2000ff50 msp 0x2000ff50 control 0x00 r4 0x20000a60 r9 0x00000000 lr 0x0800429f psp 0x00000000 ### Source ########################################################################################################## 25 return 0; 26 } 27 void p_uart_init(UART_HandleTypeDef *huart) 28 { 29 huart_inst = huart; 30 PDEBUG("...\n"); 31 PDEBUG("UART2 Initialized\n"); 32 } 33 void p_uart_async_write_byte(uint8_t byte) 34 { !35 sprintf(send, "%02x\n", byte); 36 HAL_UART_Transmit_IT(huart_inst, send, 2); 37 } ~ ~ ~ ~ ~ ~ ~ ### Stack ########################################################################################################### [0] from 0x08004228 in p_uart_async_write_byte+4 at shared/util/putil.c:35 [1] from 0x0800429e in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [2] from 0x0800353e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [3] from 0x08003710 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [4] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [5] from 0xffffffe9 [6] from 0x080044ea in p_serial_mgr_service+38 at shared/drivers/p_serial_mgr.c:164 [7] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08004228 in p_uart_async_write_byte+4 at shared/util/putil.c:35 ### Variables ####################################################################################################### arg byte = 126 '~' ##################################################################################################################### Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] p_uart_async_write_byte (byte=126 '~') at shared/util/putil.c:35 35 sprintf(send, "%02x\n", byte); ### Assembly ######################################################################################################## ~ ~ ~ 0x08004224 p_uart_async_write_byte+0 push {r4, lr} 0x08004226 p_uart_async_write_byte+2 sub sp, #8 0x08004228 p_uart_async_write_byte+4 ldr r4, [pc, #28] ; (0x8004248 ) 0x0800422a p_uart_async_write_byte+6 str r0, [sp, #0] 0x0800422c p_uart_async_write_byte+8 ldr r3, [pc, #28] ; (0x800424c ) 0x0800422e p_uart_async_write_byte+10 movs r2, #10 0x08004230 p_uart_async_write_byte+12 movs r1, #0 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0000007e r5 0x00004001 r10 0x00000000 pc 0x08004228 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00 r2 0x40013808 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x2000161e r8 0x00000000 sp 0x2000ff50 msp 0x2000ff50 control 0x00 r4 0x20000a60 r9 0x00000000 lr 0x0800429f psp 0x00000000 ### Source ########################################################################################################## 25 return 0; 26 } 27 void p_uart_init(UART_HandleTypeDef *huart) 28 { 29 huart_inst = huart; 30 PDEBUG("...\n"); 31 PDEBUG("UART2 Initialized\n"); 32 } 33 void p_uart_async_write_byte(uint8_t byte) 34 { 35 sprintf(send, "%02x\n", byte); 36 HAL_UART_Transmit_IT(huart_inst, send, 2); 37 } ~ ~ ~ ~ ~ ~ ~ ### Stack ########################################################################################################### [0] from 0x08004228 in p_uart_async_write_byte+4 at shared/util/putil.c:35 [1] from 0x0800429e in UART1_RxCpltCallback+10 at shared/drivers/p_serial_mgr.c:42 [2] from 0x0800353e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [3] from 0x08003710 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [4] from 0x08001588 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [5] from 0xffffffe9 [6] from 0x080044ea in p_serial_mgr_service+38 at shared/drivers/p_serial_mgr.c:164 [7] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08004228 in p_uart_async_write_byte+4 at shared/util/putil.c:35 ### Variables ####################################################################################################### arg byte = 126 '~' ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9900 lma 0x80001c0 Loading section .rodata, size 0x4e0 lma 0x8009ac0 Loading section .ARM, size 0x8 lma 0x8009fa0 Loading section .init_array, size 0x8 lma 0x8009fa8 Loading section .fini_array, size 0x8 lma 0x8009fb0 Loading section .data, size 0x9a8 lma 0x8009fb8 Start address 0x08004518, load size 43312 Transfer rate: 29 KB/sec, 4812 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x080014f2 in main () at Core/Src/main.c:146 146 if ((pkt = p_serial_mgr_service()) != NULL) ### Assembly ######################################################################################################## 0x080014e0 main+108 bl 0x8004098 0x080014e4 main+112 ldr r0, [pc, #104] ; (0x8001550 ) 0x080014e6 main+114 bl 0x80019b8 0x080014ea main+118 bl 0x80044f4 0x080014ee main+122 bl 0x80044c4 0x080014f2 main+126 mov r4, r0 0x080014f4 main+128 cmp r0, #0 0x080014f6 main+130 beq.n 0x80014ee 0x080014f8 main+132 ldrb.w r2, [r0, #257] ; 0x101 0x080014fc main+136 ldrb.w r1, [r0, #256] ; 0x100 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014f2 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x00000000 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014f3 psp 0x00000000 ### Source ########################################################################################################## 136 while (1) 137 { 138 // if (b_timer_struck) 139 // { 140 // // PDEBUG("%d\n", sys_time); 141 // b_timer_struck = false; 142 // motor_degrees = (motor_degrees + 1) % 360; 143 // mc_service(motor_degrees, 50); 144 // } 145 serial_pkt_t *pkt = NULL; 146 if ((pkt = p_serial_mgr_service()) != NULL) 147 { 148 PDEBUG("Source: %02x\n" 149 "Destination: %02x\n", 150 pkt->src_addr, pkt->dest_addr); 151 PDEBUG("Frame Data: \n"); 152 for (int ind = 0; ind < pkt->len; pkt++) 153 { 154 if (ind % 8 == 0) 155 { ### Stack ########################################################################################################### [0] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Variables ####################################################################################################### loc pkt = 0x0: {frame_data = "\000\000\001 \031E\000\bi\025\000\bk\025\000\bm\025\000\bo\025\000\bq\0… ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x97d8 lma 0x80001c0 Loading section .rodata, size 0x4e0 lma 0x8009998 Loading section .ARM, size 0x8 lma 0x8009e78 Loading section .init_array, size 0x8 lma 0x8009e80 Loading section .fini_array, size 0x8 lma 0x8009e88 Loading section .data, size 0x9a8 lma 0x8009e90 Start address 0x080043f0, load size 43016 Transfer rate: 29 KB/sec, 4779 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x080043a6 in __libc_init_array () ### Assembly ######################################################################################################## 0x080043a6 ? cmp r2, r3 0x080043a8 ? ble.n 0x80043c2 <__libc_init_array+62> 0x080043aa ? ldr r2, [pc, #28] ; (0x80043c8 <__libc_init_array+68>) 0x080043ac ? ldr r0, [r2, #0] 0x080043ae ? add.w r2, r3, r3, lsl #6 0x080043b2 ? add.w r2, r3, r2, lsl #2 0x080043b6 ? add r0, r2 0x080043b8 ? ldrb.w r2, [r0, #260] ; 0x104 0x080043bc ? cmp r2, #0 0x080043be ? beq.n 0x80043a0 <__libc_init_array+28> ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080043a6 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x00000000 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014f3 psp 0x00000000 ### Source ########################################################################################################## ### Stack ########################################################################################################### [0] from 0x080043a6 in __libc_init_array [1] from 0x080014f2 in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x080043a6 in __libc_init_array ### Variables ####################################################################################################### ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9718 lma 0x80001c0 Loading section .rodata, size 0x4c8 lma 0x80098d8 Loading section .ARM, size 0x8 lma 0x8009da0 Loading section .init_array, size 0x8 lma 0x8009da8 Loading section .fini_array, size 0x8 lma 0x8009db0 Loading section .data, size 0x9a8 lma 0x8009db8 Start address 0x08004330, load size 42800 Transfer rate: 29 KB/sec, 4755 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x080014f4 in main () at Core/Src/main.c:156 156 PDEBUG("\n"); ### Assembly ######################################################################################################## 0x080014e4 main+164 ldr r0, [pc, #104] ; (0x8001550 ) 0x080014e6 main+166 bl 0x80019b8 0x080014ea main+170 bl 0x800430c 0x080014ee main+174 bl 0x80042dc 0x080014f2 main+178 mov r4, r0 0x080014f4 main+180 cmp r0, #0 0x080014f6 main+182 beq.n 0x80014ee 0x080014f8 main+184 ldrb.w r2, [r0, #257] ; 0x101 0x080014fc main+188 ldrb.w r1, [r0, #256] ; 0x100 0x08001500 main+192 ldr r0, [pc, #80] ; (0x8001554 ) ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014f4 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x00000000 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014f3 psp 0x00000000 ### Source ########################################################################################################## 146 if ((pkt = p_serial_mgr_service()) != NULL) 147 { 148 PDEBUG("Source: %02x\n" 149 "Destination: %02x\n", 150 pkt->src_addr, pkt->dest_addr); 151 PDEBUG("Frame Data: \n"); 152 for (int ind = 0; ind < pkt->len; pkt++) 153 { 154 if (ind % 8 == 0) 155 { 156 PDEBUG("\n"); 157 } 158 PDEBUG("%02x ", pkt->frame_data[ind]); 159 } 160 PDEBUG("\nChecksum: %02x\n\n"); 161 memset(pkt, 0, sizeof(serial_pkt_t)); 162 } 163 /* USER CODE END WHILE */ 164 165 /* USER CODE BEGIN 3 */ ### Stack ########################################################################################################### [0] from 0x080014f4 in main+180 at Core/Src/main.c:156 ### Threads ######################################################################################################### [1] id 0 from 0x080014f4 in main+180 at Core/Src/main.c:156 ### Variables ####################################################################################################### loc pkt = 0x0: {frame_data = "\000\000\001 1C\000\bi\025\000\bk\025\000\bm\025\000\bo\025\000\bq\025\… ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9788 lma 0x80001c0 Loading section .rodata, size 0x4c8 lma 0x8009948 Loading section .ARM, size 0x8 lma 0x8009e10 Loading section .init_array, size 0x8 lma 0x8009e18 Loading section .fini_array, size 0x8 lma 0x8009e20 Loading section .data, size 0x9a8 lma 0x8009e28 Start address 0x080043a0, load size 42912 Transfer rate: 29 KB/sec, 4768 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x0800435c in memset () ### Assembly ######################################################################################################## 0x0800435c ? ldr r0, [r2, #0] 0x0800435e ? add.w r2, r3, r3, lsl #6 0x08004362 ? add.w r2, r3, r2, lsl #2 0x08004366 ? add r0, r2 0x08004368 ? ldrb.w r2, [r0, #260] ; 0x104 0x0800436c ? cmp r2, #0 0x0800436e ? beq.n 0x8004350 0x08004370 ? b.n 0x8004374 0x08004372 ? movs r0, #0 0x08004374 ? bx lr ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x20000ced r5 0x200009c8 r10 0x00000000 pc 0x0800435c primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00 r2 0x2000161c r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000002 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014bf psp 0x00000000 ### Source ########################################################################################################## ### Stack ########################################################################################################### [0] from 0x0800435c in memset [1] from 0x080014be in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x0800435c in memset ### Variables ####################################################################################################### ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x95d0 lma 0x80001c0 Loading section .rodata, size 0x4c0 lma 0x8009790 Loading section .ARM, size 0x8 lma 0x8009c50 Loading section .init_array, size 0x8 lma 0x8009c58 Loading section .fini_array, size 0x8 lma 0x8009c60 Loading section .data, size 0x9a8 lma 0x8009c68 Start address 0x08004228, load size 42464 Transfer rate: 29 KB/sec, 4718 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x080041ea in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:158 158 if (serial_pkt_cb.buffer[ind].b_ready) ### Assembly ######################################################################################################## 0x080041de p_serial_mgr_service+10 cmp r2, r3 0x080041e0 p_serial_mgr_service+12 ble.n 0x80041fa 0x080041e2 p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x8004200 ) 0x080041e4 p_serial_mgr_service+16 ldr r0, [r2, #0] 0x080041e6 p_serial_mgr_service+18 add.w r2, r3, r3, lsl #6 0x080041ea p_serial_mgr_service+22 add.w r2, r3, r2, lsl #2 0x080041ee p_serial_mgr_service+26 add r0, r2 0x080041f0 p_serial_mgr_service+28 ldrb.w r2, [r0, #260] ; 0x104 0x080041f4 p_serial_mgr_service+32 cmp r2, #0 0x080041f6 p_serial_mgr_service+34 beq.n 0x80041d8 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x20000bdc r5 0x200009c8 r10 0x00000000 pc 0x080041ea primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00 r2 0x00000082 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000002 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014bf psp 0x00000000 ### Source ########################################################################################################## 148 149 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 150 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 151 } 152 153 serial_pkt_t *p_serial_mgr_service(void) 154 { 155 // this will be less garbage when i switch to a queue 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) 159 { 160 return &serial_pkt_cb.buffer[ind]; 161 } 162 } 163 return NULL; 164 } 165 166 void p_serial_mgr_start() 167 { ### Stack ########################################################################################################### [0] from 0x080041ea in p_serial_mgr_service+22 at shared/drivers/p_serial_mgr.c:158 [1] from 0x080014be in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x080041ea in p_serial_mgr_service+22 at shared/drivers/p_serial_mgr.c:158 ### Variables ####################################################################################################### loc ind = 2 ##################################################################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08004228 msp: 0x20010000 Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x95d0 lma 0x80001c0 Loading section .rodata, size 0x4c0 lma 0x8009790 Loading section .ARM, size 0x8 lma 0x8009c50 Loading section .init_array, size 0x8 lma 0x8009c58 Loading section .fini_array, size 0x8 lma 0x8009c60 Loading section .data, size 0x9a8 lma 0x8009c68 Start address 0x08004228, load size 42464 Transfer rate: 29 KB/sec, 4718 bytes/write. Breakpoint 1 at 0x80014c4: file Core/Src/main.c, line 148. Note: automatically using hardware breakpoints for read-only addresses. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ################################################################################################# Program received signal SIGINT, Interrupt. 0x080041f4 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:158 158 if (serial_pkt_cb.buffer[ind].b_ready) ### Assembly ######################################################################################################## 0x080041e4 p_serial_mgr_service+16 ldr r0, [r2, #0] 0x080041e6 p_serial_mgr_service+18 add.w r2, r3, r3, lsl #6 0x080041ea p_serial_mgr_service+22 add.w r2, r3, r2, lsl #2 0x080041ee p_serial_mgr_service+26 add r0, r2 0x080041f0 p_serial_mgr_service+28 ldrb.w r2, [r0, #260] ; 0x104 0x080041f4 p_serial_mgr_service+32 cmp r2, #0 0x080041f6 p_serial_mgr_service+34 beq.n 0x80041d8 0x080041f8 p_serial_mgr_service+36 b.n 0x80041fc 0x080041fa p_serial_mgr_service+38 movs r0, #0 0x080041fc p_serial_mgr_service+40 bx lr ### Breakpoints ##################################################################################################### [1] break at 0x080014c4 in Core/Src/main.c:148 for main.c:148 ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x200012ff r5 0x200009c8 r10 0x00000000 pc 0x080041f4 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00 r2 0x00000000 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000007 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014bf psp 0x00000000 ### Source ########################################################################################################## 148 149 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 150 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 151 } 152 153 serial_pkt_t *p_serial_mgr_service(void) 154 { 155 // this will be less garbage when i switch to a queue 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) 159 { 160 return &serial_pkt_cb.buffer[ind]; 161 } 162 } 163 return NULL; 164 } 165 166 void p_serial_mgr_start() 167 { ### Stack ########################################################################################################### [0] from 0x080041f4 in p_serial_mgr_service+32 at shared/drivers/p_serial_mgr.c:158 [1] from 0x080014be in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x080041f4 in p_serial_mgr_service+32 at shared/drivers/p_serial_mgr.c:158 ### Variables ####################################################################################################### loc ind = 7 ##################################################################################################################### Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] 0x080041f4 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:158 158 if (serial_pkt_cb.buffer[ind].b_ready) ### Assembly ######################################################################################################## 0x080041e4 p_serial_mgr_service+16 ldr r0, [r2, #0] 0x080041e6 p_serial_mgr_service+18 add.w r2, r3, r3, lsl #6 0x080041ea p_serial_mgr_service+22 add.w r2, r3, r2, lsl #2 0x080041ee p_serial_mgr_service+26 add r0, r2 0x080041f0 p_serial_mgr_service+28 ldrb.w r2, [r0, #260] ; 0x104 0x080041f4 p_serial_mgr_service+32 cmp r2, #0 0x080041f6 p_serial_mgr_service+34 beq.n 0x80041d8 0x080041f8 p_serial_mgr_service+36 b.n 0x80041fc 0x080041fa p_serial_mgr_service+38 movs r0, #0 0x080041fc p_serial_mgr_service+40 bx lr ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x200012ff r5 0x200009c8 r10 0x00000000 pc 0x080041f4 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00 r2 0x00000000 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000007 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014bf psp 0x00000000 ### Source ########################################################################################################## 148 149 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 150 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 151 } 152 153 serial_pkt_t *p_serial_mgr_service(void) 154 { 155 // this will be less garbage when i switch to a queue 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) 159 { 160 return &serial_pkt_cb.buffer[ind]; 161 } 162 } 163 return NULL; 164 } 165 166 void p_serial_mgr_start() 167 { ### Stack ########################################################################################################### [0] from 0x080041f4 in p_serial_mgr_service+32 at shared/drivers/p_serial_mgr.c:158 [1] from 0x080014be in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x080041f4 in p_serial_mgr_service+32 at shared/drivers/p_serial_mgr.c:158 ### Variables ####################################################################################################### loc ind = 7 ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x95d0 lma 0x80001c0 Loading section .rodata, size 0x4c0 lma 0x8009790 Loading section .ARM, size 0x8 lma 0x8009c50 Loading section .init_array, size 0x8 lma 0x8009c58 Loading section .fini_array, size 0x8 lma 0x8009c60 Loading section .data, size 0x9a8 lma 0x8009c68 Start address 0x08004228, load size 42464 Transfer rate: 29 KB/sec, 4718 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x080041de in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:156 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ######################################################################################################## 0x080041d4 p_serial_mgr_service+0 movs r3, #0 0x080041d6 p_serial_mgr_service+2 b.n 0x80041da 0x080041d8 p_serial_mgr_service+4 adds r3, #1 0x080041da p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x8004200 ) 0x080041dc p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x080041de p_serial_mgr_service+10 cmp r2, r3 0x080041e0 p_serial_mgr_service+12 ble.n 0x80041fa 0x080041e2 p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x8004200 ) 0x080041e4 p_serial_mgr_service+16 ldr r0, [r2, #0] 0x080041e6 p_serial_mgr_service+18 add.w r2, r3, r3, lsl #6 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x20001404 r5 0x200009c8 r10 0x00000000 pc 0x080041de primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x01000000 basepri 0x00 r2 0x0000000a r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000009 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014bf psp 0x00000000 ### Source ########################################################################################################## 146 _serial_huart_inst = huart; 147 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 148 149 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 150 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 151 } 152 153 serial_pkt_t *p_serial_mgr_service(void) 154 { 155 // this will be less garbage when i switch to a queue 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) 159 { 160 return &serial_pkt_cb.buffer[ind]; 161 } 162 } 163 return NULL; 164 } 165 ### Stack ########################################################################################################### [0] from 0x080041de in p_serial_mgr_service+10 at shared/drivers/p_serial_mgr.c:156 [1] from 0x080014be in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x080041de in p_serial_mgr_service+10 at shared/drivers/p_serial_mgr.c:156 ### Variables ####################################################################################################### loc ind = 9 ##################################################################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08004228 msp: 0x20010000 Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x95d0 lma 0x80001c0 Loading section .rodata, size 0x4c0 lma 0x8009790 Loading section .ARM, size 0x8 lma 0x8009c50 Loading section .init_array, size 0x8 lma 0x8009c58 Loading section .fini_array, size 0x8 lma 0x8009c60 Loading section .data, size 0x9a8 lma 0x8009c68 Start address 0x08004228, load size 42464 Transfer rate: 29 KB/sec, 4718 bytes/write. No line 36 in file "putil.c". Quit No line 36 in file "putil.c". Breakpoint 1 (putil.c:36) pending. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ################################################################################################# Program received signal SIGINT, Interrupt. 0x080041dc in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:156 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ######################################################################################################## ~ 0x080041d4 p_serial_mgr_service+0 movs r3, #0 0x080041d6 p_serial_mgr_service+2 b.n 0x80041da 0x080041d8 p_serial_mgr_service+4 adds r3, #1 0x080041da p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x8004200 ) 0x080041dc p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x080041de p_serial_mgr_service+10 cmp r2, r3 0x080041e0 p_serial_mgr_service+12 ble.n 0x80041fa 0x080041e2 p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x8004200 ) 0x080041e4 p_serial_mgr_service+16 ldr r0, [r2, #0] ### Breakpoints ##################################################################################################### [1] break for putil.c:36 ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x20000eeb r5 0x200009c8 r10 0x00000000 pc 0x080041dc primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x01000000 basepri 0x00 r2 0x20001610 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000004 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014bf psp 0x00000000 ### Source ########################################################################################################## 146 _serial_huart_inst = huart; 147 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 148 149 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 150 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 151 } 152 153 serial_pkt_t *p_serial_mgr_service(void) 154 { 155 // this will be less garbage when i switch to a queue 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) 159 { 160 return &serial_pkt_cb.buffer[ind]; 161 } 162 } 163 return NULL; 164 } 165 ### Stack ########################################################################################################### [0] from 0x080041dc in p_serial_mgr_service+8 at shared/drivers/p_serial_mgr.c:156 [1] from 0x080014be in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x080041dc in p_serial_mgr_service+8 at shared/drivers/p_serial_mgr.c:156 ### Variables ####################################################################################################### loc ind = 4 ##################################################################################################################### A syntax error in expression, near `:161'. Breakpoint 2 at 0x80014e4: file Core/Src/main.c, line 161. Note: automatically using hardware breakpoints for read-only addresses. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ################################################################################################# Program received signal SIGINT, Interrupt. 0x080041ee in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:158 158 if (serial_pkt_cb.buffer[ind].b_ready) ### Assembly ######################################################################################################## 0x080041e0 p_serial_mgr_service+12 ble.n 0x80041fa 0x080041e2 p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x8004200 ) 0x080041e4 p_serial_mgr_service+16 ldr r0, [r2, #0] 0x080041e6 p_serial_mgr_service+18 add.w r2, r3, r3, lsl #6 0x080041ea p_serial_mgr_service+22 add.w r2, r3, r2, lsl #2 0x080041ee p_serial_mgr_service+26 add r0, r2 0x080041f0 p_serial_mgr_service+28 ldrb.w r2, [r0, #260] ; 0x104 0x080041f4 p_serial_mgr_service+32 cmp r2, #0 0x080041f6 p_serial_mgr_service+34 beq.n 0x80041d8 0x080041f8 p_serial_mgr_service+36 b.n 0x80041fc ### Breakpoints ##################################################################################################### [1] break for putil.c:36 [2] break at 0x080014e4 in Core/Src/main.c:161 for main.c:161 ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x20000bdc r5 0x200009c8 r10 0x00000000 pc 0x080041ee primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00 r2 0x0000030f r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000003 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014bf psp 0x00000000 ### Source ########################################################################################################## 148 149 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 150 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 151 } 152 153 serial_pkt_t *p_serial_mgr_service(void) 154 { 155 // this will be less garbage when i switch to a queue 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) 159 { 160 return &serial_pkt_cb.buffer[ind]; 161 } 162 } 163 return NULL; 164 } 165 166 void p_serial_mgr_start() 167 { ### Stack ########################################################################################################### [0] from 0x080041ee in p_serial_mgr_service+26 at shared/drivers/p_serial_mgr.c:158 [1] from 0x080014be in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x080041ee in p_serial_mgr_service+26 at shared/drivers/p_serial_mgr.c:158 ### Variables ####################################################################################################### loc ind = 3 ##################################################################################################################### Quit Quit Quit Breakpoint 3 at 0x8004204: file shared/drivers/p_serial_mgr.c, line 167. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ################################################################################################# Breakpoint 3, p_serial_mgr_start () at shared/drivers/p_serial_mgr.c:167 167 { ### Assembly ######################################################################################################## ~ ~ ~ ~ ~ !0x08004204 p_serial_mgr_start+0 push {r3, lr} 0x08004206 p_serial_mgr_start+2 movs r2, #1 0x08004208 p_serial_mgr_start+4 ldr r1, [pc, #8] ; (0x8004214 ) 0x0800420a p_serial_mgr_start+6 ldr r3, [pc, #12] ; (0x8004218 ) 0x0800420c p_serial_mgr_start+8 ldr r0, [r3, #0] ### Breakpoints ##################################################################################################### [3] break at 0x08004204 in shared/drivers/p_serial_mgr.c:167 for p_serial_mgr.c:161 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x08004204 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x41000000 basepri 0x00 r2 0x00000081 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x40001000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x20000b14 r9 0x00000000 lr 0x080014bb psp 0x00000000 ### Source ########################################################################################################## 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) 159 { 160 return &serial_pkt_cb.buffer[ind]; 161 } 162 } 163 return NULL; 164 } 165 166 void p_serial_mgr_start() !167 { 168 HAL_UART_Receive_IT(_serial_huart_inst, &rxc, 1); 169 } ~ ~ ~ ~ ~ ~ ~ ### Stack ########################################################################################################### [0] from 0x08004204 in p_serial_mgr_start+0 at shared/drivers/p_serial_mgr.c:167 [1] from 0x080014ba in main+122 at Core/Src/main.c:129 ### Threads ######################################################################################################### [1] id 0 from 0x08004204 in p_serial_mgr_start+0 at shared/drivers/p_serial_mgr.c:167 ### Variables ####################################################################################################### ##################################################################################################################### Continuing. ### Output/messages ################################################################################################# halted: PC: 0x08004206 Program received signal SIGINT, Interrupt. 0x080041d8 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:156 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ######################################################################################################## ~ ~ ~ 0x080041d4 p_serial_mgr_service+0 movs r3, #0 0x080041d6 p_serial_mgr_service+2 b.n 0x80041da 0x080041d8 p_serial_mgr_service+4 adds r3, #1 0x080041da p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x8004200 ) 0x080041dc p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x080041de p_serial_mgr_service+10 cmp r2, r3 0x080041e0 p_serial_mgr_service+12 ble.n 0x80041fa ### Breakpoints ##################################################################################################### [3] break at 0x08004204 in shared/drivers/p_serial_mgr.c:167 for p_serial_mgr.c:161 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x20000bdc r5 0x200009c8 r10 0x00000000 pc 0x080041d8 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x00000000 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014bf psp 0x00000000 ### Source ########################################################################################################## 146 _serial_huart_inst = huart; 147 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 148 149 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 150 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 151 } 152 153 serial_pkt_t *p_serial_mgr_service(void) 154 { 155 // this will be less garbage when i switch to a queue 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) 159 { 160 return &serial_pkt_cb.buffer[ind]; 161 } 162 } 163 return NULL; 164 } 165 ### Stack ########################################################################################################### [0] from 0x080041d8 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:156 [1] from 0x080014be in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x080041d8 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:156 ### Variables ####################################################################################################### loc ind = 0 ##################################################################################################################### Quit Breakpoint 4 at 0x80041d4: file shared/drivers/p_serial_mgr.c, line 156. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ################################################################################################# Breakpoint 3, p_serial_mgr_start () at shared/drivers/p_serial_mgr.c:167 167 { ### Assembly ######################################################################################################## ~ ~ ~ ~ ~ !0x08004204 p_serial_mgr_start+0 push {r3, lr} 0x08004206 p_serial_mgr_start+2 movs r2, #1 0x08004208 p_serial_mgr_start+4 ldr r1, [pc, #8] ; (0x8004214 ) 0x0800420a p_serial_mgr_start+6 ldr r3, [pc, #12] ; (0x8004218 ) 0x0800420c p_serial_mgr_start+8 ldr r0, [r3, #0] ### Breakpoints ##################################################################################################### [3] break at 0x08004204 in shared/drivers/p_serial_mgr.c:167 for p_serial_mgr.c:161 hit 1 time [4] break at 0x080041d4 in shared/drivers/p_serial_mgr.c:156 for p_serial_mgr_service ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x08004204 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x41000000 basepri 0x00 r2 0x00000081 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x40001000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x20000b14 r9 0x00000000 lr 0x080014bb psp 0x00000000 ### Source ########################################################################################################## 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) 159 { 160 return &serial_pkt_cb.buffer[ind]; 161 } 162 } 163 return NULL; 164 } 165 166 void p_serial_mgr_start() !167 { 168 HAL_UART_Receive_IT(_serial_huart_inst, &rxc, 1); 169 } ~ ~ ~ ~ ~ ~ ~ ### Stack ########################################################################################################### [0] from 0x08004204 in p_serial_mgr_start+0 at shared/drivers/p_serial_mgr.c:167 [1] from 0x080014ba in main+122 at Core/Src/main.c:129 ### Threads ######################################################################################################### [1] id 0 from 0x08004204 in p_serial_mgr_start+0 at shared/drivers/p_serial_mgr.c:167 ### Variables ####################################################################################################### ##################################################################################################################### Continuing. ### Output/messages ################################################################################################# halted: PC: 0x08004206 Breakpoint 4, p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:156 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ######################################################################################################## ~ ~ ~ ~ ~ !0x080041d4 p_serial_mgr_service+0 movs r3, #0 0x080041d6 p_serial_mgr_service+2 b.n 0x80041da 0x080041d8 p_serial_mgr_service+4 adds r3, #1 0x080041da p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x8004200 ) 0x080041dc p_serial_mgr_service+8 ldrh r2, [r2, #6] ### Breakpoints ##################################################################################################### [3] break at 0x08004204 in shared/drivers/p_serial_mgr.c:167 for p_serial_mgr.c:161 hit 1 time [4] break at 0x080041d4 in shared/drivers/p_serial_mgr.c:156 for p_serial_mgr_service hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080041d4 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x40013800 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x40001000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x20000b14 r9 0x00000000 lr 0x080014bf psp 0x00000000 ### Source ########################################################################################################## 146 _serial_huart_inst = huart; 147 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 148 149 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 150 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 151 } 152 153 serial_pkt_t *p_serial_mgr_service(void) 154 { 155 // this will be less garbage when i switch to a queue !156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) 159 { 160 return &serial_pkt_cb.buffer[ind]; 161 } 162 } 163 return NULL; 164 } 165 ### Stack ########################################################################################################### [0] from 0x080041d4 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:156 [1] from 0x080014be in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x080041d4 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:156 ### Variables ####################################################################################################### loc ind = 0 ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x080041d6 halted: PC: 0x080041da halted: PC: 0x080041dc halted: PC: 0x080041de halted: PC: 0x080041e0 halted: PC: 0x080041e2 158 if (serial_pkt_cb.buffer[ind].b_ready) ### Assembly ######################################################################################################## 0x080041d8 p_serial_mgr_service+4 adds r3, #1 0x080041da p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x8004200 ) 0x080041dc p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x080041de p_serial_mgr_service+10 cmp r2, r3 0x080041e0 p_serial_mgr_service+12 ble.n 0x80041fa 0x080041e2 p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x8004200 ) 0x080041e4 p_serial_mgr_service+16 ldr r0, [r2, #0] 0x080041e6 p_serial_mgr_service+18 add.w r2, r3, r3, lsl #6 0x080041ea p_serial_mgr_service+22 add.w r2, r3, r2, lsl #2 0x080041ee p_serial_mgr_service+26 add r0, r2 ### Breakpoints ##################################################################################################### [3] break at 0x08004204 in shared/drivers/p_serial_mgr.c:167 for p_serial_mgr.c:161 hit 1 time [4] break at 0x080041d4 in shared/drivers/p_serial_mgr.c:156 for p_serial_mgr_service hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080041e2 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00 r2 0x0000000a r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x20000b14 r9 0x00000000 lr 0x080014bf psp 0x00000000 ### Source ########################################################################################################## 148 149 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 150 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 151 } 152 153 serial_pkt_t *p_serial_mgr_service(void) 154 { 155 // this will be less garbage when i switch to a queue !156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) 159 { 160 return &serial_pkt_cb.buffer[ind]; 161 } 162 } 163 return NULL; 164 } 165 166 void p_serial_mgr_start() !167 { ### Stack ########################################################################################################### [0] from 0x080041e2 in p_serial_mgr_service+14 at shared/drivers/p_serial_mgr.c:158 [1] from 0x080014be in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x080041e2 in p_serial_mgr_service+14 at shared/drivers/p_serial_mgr.c:158 ### Variables ####################################################################################################### loc ind = 0 ##################################################################################################################### $1 = { frame_data = '\000' , src_addr = 0 '\000', dest_addr = 0 '\000', checksum = 0 '\000', len = 0 '\000', b_ready = false } $2 = { frame_data = '\000' , src_addr = 0 '\000', dest_addr = 0 '\000', checksum = 0 '\000', len = 0 '\000', b_ready = false } Continuing. ### Output/messages ################################################################################################# Breakpoint 4, p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:156 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ######################################################################################################## ~ ~ ~ ~ ~ !0x080041d4 p_serial_mgr_service+0 movs r3, #0 0x080041d6 p_serial_mgr_service+2 b.n 0x80041da 0x080041d8 p_serial_mgr_service+4 adds r3, #1 0x080041da p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x8004200 ) 0x080041dc p_serial_mgr_service+8 ldrh r2, [r2, #6] ### Breakpoints ##################################################################################################### [3] break at 0x08004204 in shared/drivers/p_serial_mgr.c:167 for p_serial_mgr.c:161 hit 1 time [4] break at 0x080041d4 in shared/drivers/p_serial_mgr.c:156 for p_serial_mgr_service hit 2 times ### Expressions ##################################################################################################### ### History ######################################################################################################### $$1 = {frame_data = '\000' ,src_addr = 0 '\000',dest_addr = 0 '\000',checksum = 0 '\000… $$0 = {frame_data = '\000' ,src_addr = 0 '\000',dest_addr = 0 '\000',checksum = 0 '\000… ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080041d4 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x0000000a r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x0000000a r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014bf psp 0x00000000 ### Source ########################################################################################################## 146 _serial_huart_inst = huart; 147 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 148 149 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 150 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 151 } 152 153 serial_pkt_t *p_serial_mgr_service(void) 154 { 155 // this will be less garbage when i switch to a queue !156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) 159 { 160 return &serial_pkt_cb.buffer[ind]; 161 } 162 } 163 return NULL; 164 } 165 ### Stack ########################################################################################################### [0] from 0x080041d4 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:156 [1] from 0x080014be in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x080041d4 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:156 ### Variables ####################################################################################################### loc ind = 0 ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x080041d6 halted: PC: 0x080041da halted: PC: 0x080041dc halted: PC: 0x080041de halted: PC: 0x080041e0 halted: PC: 0x080041e2 158 if (serial_pkt_cb.buffer[ind].b_ready) ### Assembly ######################################################################################################## 0x080041d8 p_serial_mgr_service+4 adds r3, #1 0x080041da p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x8004200 ) 0x080041dc p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x080041de p_serial_mgr_service+10 cmp r2, r3 0x080041e0 p_serial_mgr_service+12 ble.n 0x80041fa 0x080041e2 p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x8004200 ) 0x080041e4 p_serial_mgr_service+16 ldr r0, [r2, #0] 0x080041e6 p_serial_mgr_service+18 add.w r2, r3, r3, lsl #6 0x080041ea p_serial_mgr_service+22 add.w r2, r3, r2, lsl #2 0x080041ee p_serial_mgr_service+26 add r0, r2 ### Breakpoints ##################################################################################################### [3] break at 0x08004204 in shared/drivers/p_serial_mgr.c:167 for p_serial_mgr.c:161 hit 1 time [4] break at 0x080041d4 in shared/drivers/p_serial_mgr.c:156 for p_serial_mgr_service hit 2 times ### Expressions ##################################################################################################### ### History ######################################################################################################### $$1 = {frame_data = '\000' ,src_addr = 0 '\000',dest_addr = 0 '\000',checksum = 0 '\000… $$0 = {frame_data = '\000' ,src_addr = 0 '\000',dest_addr = 0 '\000',checksum = 0 '\000… ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080041e2 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00 r2 0x0000000a r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014bf psp 0x00000000 ### Source ########################################################################################################## 148 149 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 150 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 151 } 152 153 serial_pkt_t *p_serial_mgr_service(void) 154 { 155 // this will be less garbage when i switch to a queue !156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) 159 { 160 return &serial_pkt_cb.buffer[ind]; 161 } 162 } 163 return NULL; 164 } 165 166 void p_serial_mgr_start() !167 { ### Stack ########################################################################################################### [0] from 0x080041e2 in p_serial_mgr_service+14 at shared/drivers/p_serial_mgr.c:158 [1] from 0x080014be in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x080041e2 in p_serial_mgr_service+14 at shared/drivers/p_serial_mgr.c:158 ### Variables ####################################################################################################### loc ind = 0 ##################################################################################################################### $3 = 0 Continuing. ### Output/messages ################################################################################################# Breakpoint 4, p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:156 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ######################################################################################################## ~ ~ ~ ~ ~ !0x080041d4 p_serial_mgr_service+0 movs r3, #0 0x080041d6 p_serial_mgr_service+2 b.n 0x80041da 0x080041d8 p_serial_mgr_service+4 adds r3, #1 0x080041da p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x8004200 ) 0x080041dc p_serial_mgr_service+8 ldrh r2, [r2, #6] ### Breakpoints ##################################################################################################### [3] break at 0x08004204 in shared/drivers/p_serial_mgr.c:167 for p_serial_mgr.c:161 hit 1 time [4] break at 0x080041d4 in shared/drivers/p_serial_mgr.c:156 for p_serial_mgr_service hit 3 times ### Expressions ##################################################################################################### ### History ######################################################################################################### $$2 = {frame_data = '\000' ,src_addr = 0 '\000',dest_addr = 0 '\000',checksum = 0 '\000… $$1 = {frame_data = '\000' ,src_addr = 0 '\000',dest_addr = 0 '\000',checksum = 0 '\000… $$0 = 0 ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080041d4 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x0000000a r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x0000000a r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014bf psp 0x00000000 ### Source ########################################################################################################## 146 _serial_huart_inst = huart; 147 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 148 149 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 150 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 151 } 152 153 serial_pkt_t *p_serial_mgr_service(void) 154 { 155 // this will be less garbage when i switch to a queue !156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) 159 { 160 return &serial_pkt_cb.buffer[ind]; 161 } 162 } 163 return NULL; 164 } 165 ### Stack ########################################################################################################### [0] from 0x080041d4 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:156 [1] from 0x080014be in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x080041d4 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:156 ### Variables ####################################################################################################### loc ind = 0 ##################################################################################################################### $4 = 0 ### Output/messages ################################################################################################# halted: PC: 0x080041d6 halted: PC: 0x080041da halted: PC: 0x080041dc halted: PC: 0x080041de halted: PC: 0x080041e0 halted: PC: 0x080041e2 158 if (serial_pkt_cb.buffer[ind].b_ready) ### Assembly ######################################################################################################## 0x080041d8 p_serial_mgr_service+4 adds r3, #1 0x080041da p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x8004200 ) 0x080041dc p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x080041de p_serial_mgr_service+10 cmp r2, r3 0x080041e0 p_serial_mgr_service+12 ble.n 0x80041fa 0x080041e2 p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x8004200 ) 0x080041e4 p_serial_mgr_service+16 ldr r0, [r2, #0] 0x080041e6 p_serial_mgr_service+18 add.w r2, r3, r3, lsl #6 0x080041ea p_serial_mgr_service+22 add.w r2, r3, r2, lsl #2 0x080041ee p_serial_mgr_service+26 add r0, r2 ### Breakpoints ##################################################################################################### [3] break at 0x08004204 in shared/drivers/p_serial_mgr.c:167 for p_serial_mgr.c:161 hit 1 time [4] break at 0x080041d4 in shared/drivers/p_serial_mgr.c:156 for p_serial_mgr_service hit 3 times ### Expressions ##################################################################################################### ### History ######################################################################################################### $$2 = {frame_data = '\000' ,src_addr = 0 '\000',dest_addr = 0 '\000',checksum = 0 '\000… $$1 = 0 $$0 = 0 ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080041e2 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00 r2 0x0000000a r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014bf psp 0x00000000 ### Source ########################################################################################################## 148 149 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 150 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 151 } 152 153 serial_pkt_t *p_serial_mgr_service(void) 154 { 155 // this will be less garbage when i switch to a queue !156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) 159 { 160 return &serial_pkt_cb.buffer[ind]; 161 } 162 } 163 return NULL; 164 } 165 166 void p_serial_mgr_start() !167 { ### Stack ########################################################################################################### [0] from 0x080041e2 in p_serial_mgr_service+14 at shared/drivers/p_serial_mgr.c:158 [1] from 0x080014be in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x080041e2 in p_serial_mgr_service+14 at shared/drivers/p_serial_mgr.c:158 ### Variables ####################################################################################################### loc ind = 0 ##################################################################################################################### $5 = 0 $6 = 10 $7 = 0 ### Output/messages ################################################################################################# halted: PC: 0x080041e4 halted: PC: 0x080041e6 halted: PC: 0x080041ea halted: PC: 0x080041ee halted: PC: 0x080041f0 halted: PC: 0x080041f4 halted: PC: 0x080041f6 halted: PC: 0x080041d8 halted: PC: 0x080041da halted: PC: 0x080041dc halted: PC: 0x080041de halted: PC: 0x080041e0 halted: PC: 0x080041e2 158 if (serial_pkt_cb.buffer[ind].b_ready) ### Assembly ######################################################################################################## 0x080041d8 p_serial_mgr_service+4 adds r3, #1 0x080041da p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x8004200 ) 0x080041dc p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x080041de p_serial_mgr_service+10 cmp r2, r3 0x080041e0 p_serial_mgr_service+12 ble.n 0x80041fa 0x080041e2 p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x8004200 ) 0x080041e4 p_serial_mgr_service+16 ldr r0, [r2, #0] 0x080041e6 p_serial_mgr_service+18 add.w r2, r3, r3, lsl #6 0x080041ea p_serial_mgr_service+22 add.w r2, r3, r2, lsl #2 0x080041ee p_serial_mgr_service+26 add r0, r2 ### Breakpoints ##################################################################################################### [3] break at 0x08004204 in shared/drivers/p_serial_mgr.c:167 for p_serial_mgr.c:161 hit 1 time [4] break at 0x080041d4 in shared/drivers/p_serial_mgr.c:156 for p_serial_mgr_service hit 3 times ### Expressions ##################################################################################################### ### History ######################################################################################################### $$2 = 0 $$1 = 10 $$0 = 0 ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x20000bdc r5 0x200009c8 r10 0x00000000 pc 0x080041e2 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00 r2 0x0000000a r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000001 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014bf psp 0x00000000 ### Source ########################################################################################################## 148 149 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 150 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 151 } 152 153 serial_pkt_t *p_serial_mgr_service(void) 154 { 155 // this will be less garbage when i switch to a queue !156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) 159 { 160 return &serial_pkt_cb.buffer[ind]; 161 } 162 } 163 return NULL; 164 } 165 166 void p_serial_mgr_start() !167 { ### Stack ########################################################################################################### [0] from 0x080041e2 in p_serial_mgr_service+14 at shared/drivers/p_serial_mgr.c:158 [1] from 0x080014be in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x080041e2 in p_serial_mgr_service+14 at shared/drivers/p_serial_mgr.c:158 ### Variables ####################################################################################################### loc ind = 1 ##################################################################################################################### $8 = { frame_data = '\000' , src_addr = 0 '\000', dest_addr = 0 '\000', checksum = 0 '\000', len = 0 '\000', b_ready = false } $9 = (serial_pkt_t *) 0x20000bdc $10 = { frame_data = '\000' , src_addr = 0 '\000', dest_addr = 0 '\000', checksum = 0 '\000', len = 0 '\000', b_ready = false } $11 = { frame_data = '\000' , src_addr = 0 '\000', dest_addr = 0 '\000', checksum = 0 '\000', len = 0 '\000', b_ready = false } $12 = { frame_data = '\000' , src_addr = 0 '\000', dest_addr = 0 '\000', checksum = 0 '\000', len = 0 '\000', b_ready = false } $13 = { frame_data = '\000' , src_addr = 0 '\000', dest_addr = 0 '\000', checksum = 0 '\000', len = 0 '\000', b_ready = false } $14 = { frame_data = '\000' , src_addr = 0 '\000', dest_addr = 0 '\000', checksum = 0 '\000', len = 0 '\000', b_ready = false } Quit Breakpoint 5 at 0x80041d4: file shared/drivers/p_serial_mgr.c, line 156. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ################################################################################################# halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 halted: PC: 0x080041d6 Program received signal SIGINT, Interrupt. p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:156 156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ######################################################################################################## ~ ~ ~ ~ ~ !0x080041d4 p_serial_mgr_service+0 movs r3, #0 0x080041d6 p_serial_mgr_service+2 b.n 0x80041da 0x080041d8 p_serial_mgr_service+4 adds r3, #1 0x080041da p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x8004200 ) 0x080041dc p_serial_mgr_service+8 ldrh r2, [r2, #6] ### Breakpoints ##################################################################################################### [5] break at 0x080041d4 in shared/drivers/p_serial_mgr.c:156 for p_serial_mgr_service if serial_pkt_cb.buffer[0].frame_data[0] != 0 ### Expressions ##################################################################################################### ### History ######################################################################################################### $$2 = {frame_data = '\000' ,src_addr = 0 '\000',dest_addr = 0 '\000',checksum = 0 '\000… $$1 = {frame_data = '\000' ,src_addr = 0 '\000',dest_addr = 0 '\000',checksum = 0 '\000… $$0 = {frame_data = '\000' ,src_addr = 0 '\000',dest_addr = 0 '\000',checksum = 0 '\000… ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080041d4 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x0000000a r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x0000000a r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014bf psp 0x00000000 ### Source ########################################################################################################## 146 _serial_huart_inst = huart; 147 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 148 149 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 150 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 151 } 152 153 serial_pkt_t *p_serial_mgr_service(void) 154 { 155 // this will be less garbage when i switch to a queue !156 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 157 { 158 if (serial_pkt_cb.buffer[ind].b_ready) 159 { 160 return &serial_pkt_cb.buffer[ind]; 161 } 162 } 163 return NULL; 164 } 165 ### Stack ########################################################################################################### [0] from 0x080041d4 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:156 [1] from 0x080014be in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x080041d4 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:156 ### Variables ####################################################################################################### loc ind = 0 ##################################################################################################################### Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] 0x080041d4 in p_uart_init (huart=0x0) at shared/util/putil.c:29 29 huart_inst = huart; ### Assembly ######################################################################################################## ~ ~ ~ 0x080041d0 p_uart_init+0 asrs r0, r2, #24 0x080041d2 p_uart_init+2 movs r0, #0 0x080041d4 p_uart_init+4 movs r3, #0 0x080041d6 p_uart_init+6 b.n 0x80041da 0x080041d8 p_uart_init+8 adds r3, #1 0x080041da p_uart_init+10 ldr r2, [pc, #36] ; (0x8004200 ) 0x080041dc p_uart_init+12 ldrh r2, [r2, #6] ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080041d4 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x0000000a r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x0000000a r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014bf psp 0x00000000 ### Source ########################################################################################################## 19 memset(printf_buffer, '\0', MAX_PRINTF_BUFFER); 20 va_list args; 21 va_start(args, fmt); 22 vsprintf((char *)printf_buffer, fmt, args); 23 va_end(args); 24 HAL_UART_Transmit(huart_inst, printf_buffer, strlen(printf_buffer), 100); 25 return 0; 26 } 27 void p_uart_init(UART_HandleTypeDef *huart) 28 { 29 huart_inst = huart; 30 PDEBUG("...\n"); 31 PDEBUG("UART2 Initialized\n"); 32 } 33 void p_uart_async_write_byte(uint8_t byte) 34 { 35 sprintf(send, "%02x\n", byte); 36 HAL_UART_Transmit_IT(huart_inst, send, 2); 37 } ~ ### Stack ########################################################################################################### [0] from 0x080041d4 in p_uart_init+4 at shared/util/putil.c:29 [1] from 0x20001664 in __malloc_max_total_mem ### Threads ######################################################################################################### [1] id 0 from 0x080041d4 in p_uart_init+4 at shared/util/putil.c:29 ### Variables ####################################################################################################### arg huart = 0x0: {Instance = 0x20010000,Init = {BaudRate = 134234665,WordLength = 134223157,StopBits = … ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9788 lma 0x80001c0 Loading section .rodata, size 0x4c8 lma 0x8009948 Loading section .ARM, size 0x8 lma 0x8009e10 Loading section .init_array, size 0x8 lma 0x8009e18 Loading section .fini_array, size 0x8 lma 0x8009e20 Loading section .data, size 0x9a8 lma 0x8009e28 Start address 0x080043a0, load size 42912 Transfer rate: 29 KB/sec, 4768 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x0800436c in memset () ### Assembly ######################################################################################################## 0x0800436c ? cmp r2, #0 0x0800436e ? beq.n 0x8004350 0x08004370 ? b.n 0x8004374 0x08004372 ? movs r0, #0 0x08004374 ? bx lr 0x08004376 ? nop 0x08004378 ? asrs r4, r3, #24 0x0800437a ? movs r0, #0 0x0800437c ? push {r3, lr} 0x0800437e ? movs r2, #1 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x20001206 r5 0x200009c8 r10 0x00000000 pc 0x0800436c primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00 r2 0x00000000 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000006 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014bf psp 0x00000000 ### Source ########################################################################################################## ### Stack ########################################################################################################### [0] from 0x0800436c in memset [1] from 0x080014be in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x0800436c in memset ### Variables ####################################################################################################### ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9670 lma 0x80001c0 Loading section .rodata, size 0x4c8 lma 0x8009830 Loading section .ARM, size 0x8 lma 0x8009cf8 Loading section .init_array, size 0x8 lma 0x8009d00 Loading section .fini_array, size 0x8 lma 0x8009d08 Loading section .data, size 0x9a8 lma 0x8009d10 Start address 0x08004284, load size 42632 Transfer rate: 29 KB/sec, 4736 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x08004238 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:158 158 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ######################################################################################################## ~ 0x08004230 p_serial_mgr_service+0 movs r3, #0 0x08004232 p_serial_mgr_service+2 b.n 0x8004236 0x08004234 p_serial_mgr_service+4 adds r3, #1 0x08004236 p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x800425c ) 0x08004238 p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x0800423a p_serial_mgr_service+10 cmp r2, r3 0x0800423c p_serial_mgr_service+12 ble.n 0x8004256 0x0800423e p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x800425c ) 0x08004240 p_serial_mgr_service+16 ldr r0, [r2, #0] ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x08004238 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x2000161c r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014bf psp 0x00000000 ### Source ########################################################################################################## 148 _serial_huart_inst = huart; 149 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 150 151 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 152 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 153 } 154 155 serial_pkt_t *p_serial_mgr_service(void) 156 { 157 // this will be less garbage when i switch to a queue 158 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 159 { 160 if (serial_pkt_cb.buffer[ind].b_ready) 161 { 162 return &serial_pkt_cb.buffer[ind]; 163 } 164 } 165 return NULL; 166 } 167 ### Stack ########################################################################################################### [0] from 0x08004238 in p_serial_mgr_service+8 at shared/drivers/p_serial_mgr.c:158 [1] from 0x080014be in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08004238 in p_serial_mgr_service+8 at shared/drivers/p_serial_mgr.c:158 ### Variables ####################################################################################################### loc ind = 0 ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9670 lma 0x80001c0 Loading section .rodata, size 0x4c8 lma 0x8009830 Loading section .ARM, size 0x8 lma 0x8009cf8 Loading section .init_array, size 0x8 lma 0x8009d00 Loading section .fini_array, size 0x8 lma 0x8009d08 Loading section .data, size 0x9a8 lma 0x8009d10 Start address 0x08004284, load size 42632 Transfer rate: 29 KB/sec, 4736 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x08004236 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:158 warning: Source file is more recent than executable. 158 { ### Assembly ######################################################################################################## ~ ~ 0x08004230 p_serial_mgr_service+0 movs r3, #0 0x08004232 p_serial_mgr_service+2 b.n 0x8004236 0x08004234 p_serial_mgr_service+4 adds r3, #1 0x08004236 p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x800425c ) 0x08004238 p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x0800423a p_serial_mgr_service+10 cmp r2, r3 0x0800423c p_serial_mgr_service+12 ble.n 0x8004256 0x0800423e p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x800425c ) ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x2000130b r5 0x200009c8 r10 0x00000000 pc 0x08004236 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x01000000 basepri 0x00 r2 0x00000000 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000008 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014bf psp 0x00000000 ### Source ########################################################################################################## 148 void p_serial_mgr_init(UART_HandleTypeDef *huart) 149 { 150 _serial_huart_inst = huart; 151 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 152 153 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 154 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 155 } 156 157 serial_pkt_t *p_serial_mgr_service(void) 158 { 159 // this will be less garbage when i switch to a queue 160 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 161 { 162 if (serial_pkt_cb.buffer[ind].b_ready) 163 { 164 return &serial_pkt_cb.buffer[ind]; 165 } 166 } 167 return NULL; ### Stack ########################################################################################################### [0] from 0x08004236 in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:158 [1] from 0x080014be in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08004236 in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:158 ### Variables ####################################################################################################### loc ind = 8 ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9670 lma 0x80001c0 Loading section .rodata, size 0x4c8 lma 0x8009830 Loading section .ARM, size 0x8 lma 0x8009cf8 Loading section .init_array, size 0x8 lma 0x8009d00 Loading section .fini_array, size 0x8 lma 0x8009d08 Loading section .data, size 0x9a8 lma 0x8009d10 Start address 0x08004284, load size 42632 Transfer rate: 29 KB/sec, 4736 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] warning: No executable has been specified and target does not support determining executable automatically. Try using the "file" command. 0x08004236 in ?? () ### Assembly ######################################################################################################## 0x08004236 ? ldr r2, [pc, #36] ; (0x800425c) 0x08004238 ? ldrh r2, [r2, #6] 0x0800423a ? cmp r2, r3 0x0800423c ? ble.n 0x8004256 0x0800423e ? ldr r2, [pc, #28] ; (0x800425c) 0x08004240 ? ldr r0, [r2, #0] 0x08004242 ? add.w r2, r3, r3, lsl #6 0x08004246 ? add.w r2, r3, r2, lsl #2 0x0800424a ? add r0, r2 0x0800424c ? ldrb.w r2, [r0, #260] ; 0x104 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x20000ffc r5 0x200009c8 r10 0x00000000 pc 0x08004236 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x01000000 basepri 0x00 r2 0x00000000 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000005 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014bf psp 0x00000000 ### Source ########################################################################################################## ### Stack ########################################################################################################### [0] from 0x08004236 [1] from 0x080014be ### Threads ######################################################################################################### [1] id 0 from 0x08004236 ### Variables ####################################################################################################### ##################################################################################################################### generic_push.gdb:7: Error in sourced command file: No executable file specified. Use the "file" or "exec-file" command. Detaching from program: , Remote target [Inferior 1 (Remote target) detached] warning: No executable has been specified and target does not support determining executable automatically. Try using the "file" command. 0x08004236 in ?? () ### Assembly ######################################################################################################## 0x08004236 ? ldr r2, [pc, #36] ; (0x800425c) 0x08004238 ? ldrh r2, [r2, #6] 0x0800423a ? cmp r2, r3 0x0800423c ? ble.n 0x8004256 0x0800423e ? ldr r2, [pc, #28] ; (0x800425c) 0x08004240 ? ldr r0, [r2, #0] 0x08004242 ? add.w r2, r3, r3, lsl #6 0x08004246 ? add.w r2, r3, r2, lsl #2 0x0800424a ? add r0, r2 0x0800424c ? ldrb.w r2, [r0, #260] ; 0x104 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x20000ffc r5 0x200009c8 r10 0x00000000 pc 0x08004236 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x01000000 basepri 0x00 r2 0x00000000 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000005 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014bf psp 0x00000000 ### Source ########################################################################################################## ### Stack ########################################################################################################### [0] from 0x08004236 [1] from 0x080014be ### Threads ######################################################################################################### [1] id 0 from 0x08004236 ### Variables ####################################################################################################### ##################################################################################################################### generic_push.gdb:7: Error in sourced command file: No executable file specified. Use the "file" or "exec-file" command. Detaching from program: , Remote target [Inferior 1 (Remote target) detached] 0x08004236 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:160 160 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) ### Assembly ######################################################################################################## ~ ~ 0x08004230 p_serial_mgr_service+0 movs r3, #0 0x08004232 p_serial_mgr_service+2 b.n 0x8004236 0x08004234 p_serial_mgr_service+4 adds r3, #1 0x08004236 p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x800425c ) 0x08004238 p_serial_mgr_service+8 ldrh r2, [r2, #6] 0x0800423a p_serial_mgr_service+10 cmp r2, r3 0x0800423c p_serial_mgr_service+12 ble.n 0x8004256 0x0800423e p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x800425c ) ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x20000ffc r5 0x200009c8 r10 0x00000000 pc 0x08004236 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x01000000 basepri 0x00 r2 0x00000000 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000005 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014bf psp 0x00000000 ### Source ########################################################################################################## 150 _serial_huart_inst = huart; 151 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 152 153 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 154 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 155 } 156 157 serial_pkt_t *p_serial_mgr_service(void) 158 { 159 // this will be less garbage when i switch to a queue 160 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 161 { 162 if (serial_pkt_cb.buffer[ind].b_ready) 163 { 164 return &serial_pkt_cb.buffer[ind]; 165 } 166 } 167 return NULL; 168 } 169 ### Stack ########################################################################################################### [0] from 0x08004236 in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:160 [1] from 0x080014be in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08004236 in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:160 ### Variables ####################################################################################################### loc ind = 5 ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9670 lma 0x80001c0 Loading section .rodata, size 0x4c8 lma 0x8009830 Loading section .ARM, size 0x8 lma 0x8009cf8 Loading section .init_array, size 0x8 lma 0x8009d00 Loading section .fini_array, size 0x8 lma 0x8009d08 Loading section .data, size 0x9a8 lma 0x8009d10 Start address 0x08004284, load size 42632 Transfer rate: 29 KB/sec, 4736 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x0800424a in p_serial_mgr_start () at shared/drivers/p_serial_mgr.c:173 173 } ### Assembly ######################################################################################################## 0x0800423c p_serial_mgr_start+8 ble.n 0x8004256 0x0800423e p_serial_mgr_start+10 ldr r2, [pc, #28] ; (0x800425c ) 0x08004240 p_serial_mgr_start+12 ldr r0, [r2, #0] 0x08004242 p_serial_mgr_start+14 add.w r2, r3, r3, lsl #6 0x08004246 p_serial_mgr_start+18 add.w r2, r3, r2, lsl #2 0x0800424a p_serial_mgr_start+22 add r0, r2 0x0800424c p_serial_mgr_start+24 ldrb.w r2, [r0, #260] ; 0x104 ~ ~ ~ ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x20000be8 r5 0x200009c8 r10 0x00000000 pc 0x0800424a primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00 r2 0x00000519 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000005 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014bf psp 0x00000000 ### Source ########################################################################################################## 163 { 164 return &serial_pkt_cb.buffer[ind]; 165 } 166 } 167 return NULL; 168 } 169 170 void p_serial_mgr_start() 171 { 172 HAL_UART_Receive_IT(_serial_huart_inst, rxc, 256); 173 } ~ ~ ~ ~ ~ ~ ~ ~ ~ ### Stack ########################################################################################################### [0] from 0x0800424a in p_serial_mgr_start+22 at shared/drivers/p_serial_mgr.c:173 [1] from 0x20001684 in heap_end ### Threads ######################################################################################################### [1] id 0 from 0x0800424a in p_serial_mgr_start+22 at shared/drivers/p_serial_mgr.c:173 ### Variables ####################################################################################################### ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9668 lma 0x80001c0 Loading section .rodata, size 0x4c8 lma 0x8009828 Loading section .ARM, size 0x8 lma 0x8009cf0 Loading section .init_array, size 0x8 lma 0x8009cf8 Loading section .fini_array, size 0x8 lma 0x8009d00 Loading section .data, size 0x9a8 lma 0x8009d08 Start address 0x0800427c, load size 42624 Transfer rate: 29 KB/sec, 4736 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] HardFault_Handler () at Core/Src/stm32l4xx_it.c:91 91 while (1) ### Assembly ######################################################################################################## ~ ~ ~ ~ ~ 0x08001536 HardFault_Handler+0 b.n 0x8001536 ~ ~ ~ ~ ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x0f02017e r5 0x200009c8 r10 0x00000000 pc 0x08001536 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21070003 basepri 0x00 r2 0x00000000 r7 0x00000000 r12 0x00000004 fpscr 0x00000010 faultmask 0x00 r3 0x00000000 r8 0x00000000 sp 0x2000ff88 msp 0x2000ff88 control 0x00 r4 0x20000697 r9 0x00000000 lr 0xffffffe9 psp 0x00000000 ### Source ########################################################################################################## 81 } 82 83 /** 84 * @brief This function handles Hard fault interrupt. 85 */ 86 void HardFault_Handler(void) 87 { 88 /* USER CODE BEGIN HardFault_IRQn 0 */ 89 90 /* USER CODE END HardFault_IRQn 0 */ 91 while (1) 92 { 93 /* USER CODE BEGIN W1_HardFault_IRQn 0 */ 94 /* USER CODE END W1_HardFault_IRQn 0 */ 95 } 96 } 97 98 /** 99 * @brief This function handles Memory management fault. 100 */ ### Stack ########################################################################################################### [0] from 0x08001536 in HardFault_Handler+0 at Core/Src/stm32l4xx_it.c:91 [1] from 0xffffffe9 [2] from 0x08004220 in p_serial_mgr_service+28 at shared/drivers/p_serial_mgr.c:162 [3] from 0x080014be in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08001536 in HardFault_Handler+0 at Core/Src/stm32l4xx_it.c:91 ### Variables ####################################################################################################### ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9668 lma 0x80001c0 Loading section .rodata, size 0x4c8 lma 0x8009828 Loading section .ARM, size 0x8 lma 0x8009cf0 Loading section .init_array, size 0x8 lma 0x8009cf8 Loading section .fini_array, size 0x8 lma 0x8009d00 Loading section .data, size 0x9a8 lma 0x8009d08 Start address 0x0800427c, load size 42624 Transfer rate: 29 KB/sec, 4736 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x0800421e in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:163 163 if (serial_pkt_cb.buffer[ind].b_ready) ### Assembly ######################################################################################################## 0x08004210 p_serial_mgr_service+12 ble.n 0x800422a 0x08004212 p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x8004230 ) 0x08004214 p_serial_mgr_service+16 ldr r0, [r2, #0] 0x08004216 p_serial_mgr_service+18 add.w r2, r3, r3, lsl #6 0x0800421a p_serial_mgr_service+22 add.w r2, r3, r2, lsl #2 0x0800421e p_serial_mgr_service+26 add r0, r2 0x08004220 p_serial_mgr_service+28 ldrb.w r2, [r0, #260] ; 0x104 0x08004224 p_serial_mgr_service+32 cmp r2, #0 0x08004226 p_serial_mgr_service+34 beq.n 0x8004208 0x08004228 p_serial_mgr_service+36 b.n 0x800422c ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x20000be8 r5 0x200009c8 r10 0x00000000 pc 0x0800421e primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00 r2 0x0000061e r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000006 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014bf psp 0x00000000 ### Source ########################################################################################################## 153 154 memset(pkt_bank, 0, sizeof(serial_pkt_t) * 10); 155 p_cb_serial_pkt_init(&serial_pkt_cb, pkt_bank, 10); 156 } 157 158 serial_pkt_t *p_serial_mgr_service(void) 159 { 160 // this will be less garbage when i switch to a queue 161 for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 162 { 163 if (serial_pkt_cb.buffer[ind].b_ready) 164 { 165 return &serial_pkt_cb.buffer[ind]; 166 } 167 } 168 return NULL; 169 } 170 171 void p_serial_mgr_start() 172 { ### Stack ########################################################################################################### [0] from 0x0800421e in p_serial_mgr_service+26 at shared/drivers/p_serial_mgr.c:163 [1] from 0x080014be in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x0800421e in p_serial_mgr_service+26 at shared/drivers/p_serial_mgr.c:163 ### Variables ####################################################################################################### loc ind = 6 ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9670 lma 0x80001c0 Loading section .rodata, size 0x4c0 lma 0x8009830 Loading section .ARM, size 0x8 lma 0x8009cf0 Loading section .init_array, size 0x8 lma 0x8009cf8 Loading section .fini_array, size 0x8 lma 0x8009d00 Loading section .data, size 0x9a8 lma 0x8009d08 Start address 0x08004284, load size 42624 Transfer rate: 29 KB/sec, 4736 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] p_serial_mgr_init (huart=0x2000130b) at shared/drivers/p_serial_mgr.c:48 48 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; ### Assembly ######################################################################################################## ~ ~ ~ 0x0800421c p_serial_mgr_init+0 lsls r2, r0, #10 0x0800421e p_serial_mgr_init+2 add r0, r2 0x08004220 p_serial_mgr_init+4 ldrb.w r2, [r0, #260] ; 0x104 0x08004224 p_serial_mgr_init+8 cmp r2, #0 0x08004226 p_serial_mgr_init+10 beq.n 0x8004208 0x08004228 p_serial_mgr_init+12 b.n 0x800422c 0x0800422a p_serial_mgr_init+14 movs r0, #0 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x2000130b r5 0x200009c8 r10 0x00000000 pc 0x08004220 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00 r2 0x00000723 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x00000007 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x080014bf psp 0x00000000 ### Source ########################################################################################################## 38 for (int ind = 0; ind < 256; ind++) 39 { 40 p_uart_async_write_byte(rxb[ind]); 41 } 42 } 43 p_serial_mgr_start(); 44 } 45 void p_serial_mgr_init(UART_HandleTypeDef *huart) 46 { 47 _serial_huart_inst = huart; 48 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 49 } 50 51 serial_pkt_t *p_serial_mgr_service(void) 52 { 53 // // this will be less garbage when i switch to a queue 54 // for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 55 // { 56 // if (serial_pkt_cb.buffer[ind].b_ready) 57 // { ### Stack ########################################################################################################### [0] from 0x08004220 in p_serial_mgr_init+4 at shared/drivers/p_serial_mgr.c:48 [1] from 0x080014be in main+126 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08004220 in p_serial_mgr_init+4 at shared/drivers/p_serial_mgr.c:48 ### Variables ####################################################################################################### arg huart = 0x2000130b: {Instance = 0x0,Init = {BaudRate = 0,WordLength = 0,StopBits = 0,Parity = 0,Mod… ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9680 lma 0x80001c0 Loading section .rodata, size 0x4c0 lma 0x8009840 Loading section .ARM, size 0x8 lma 0x8009d00 Loading section .init_array, size 0x8 lma 0x8009d08 Loading section .fini_array, size 0x8 lma 0x8009d10 Loading section .data, size 0x9a8 lma 0x8009d18 Start address 0x08004298, load size 42640 Transfer rate: 29 KB/sec, 4737 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x08003bf8 in UART_WaitOnFlagUntilTimeout (huart=huart@entry=0x20000a60 , Flag=Flag@entry=32, Status=Status@entry=RESET, Tickstart=Tickstart@entry=2725, Timeout=Timeout@entry=50) at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3536 3536 if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U)) ### Assembly ######################################################################################################## 0x08003be8 UART_WaitOnFlagUntilTimeout+34 cmp.w r8, #4294967295 ; 0xffffffff 0x08003bec UART_WaitOnFlagUntilTimeout+38 beq.n 0x8003bd6 0x08003bee UART_WaitOnFlagUntilTimeout+40 bl 0x8002180 0x08003bf2 UART_WaitOnFlagUntilTimeout+44 sub.w r0, r0, r9 0x08003bf6 UART_WaitOnFlagUntilTimeout+48 cmp r0, r8 0x08003bf8 UART_WaitOnFlagUntilTimeout+50 bhi.n 0x8003c56 0x08003bfa UART_WaitOnFlagUntilTimeout+52 cmp.w r8, #0 0x08003bfe UART_WaitOnFlagUntilTimeout+56 beq.n 0x8003c56 0x08003c00 UART_WaitOnFlagUntilTimeout+58 ldr r3, [r5, #0] 0x08003c02 UART_WaitOnFlagUntilTimeout+60 ldr r2, [r3, #0] ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x20000a60 r10 0x00000000 pc 0x08003bf8 primask 0x00 r1 0x00000020 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00 r2 0x006010d0 r7 0x00000020 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x20000bd0 r8 0x00000032 sp 0x2000ff18 msp 0x2000ff18 control 0x00 r4 0x00000000 r9 0x00000aa5 lr 0x08003bf3 psp 0x00000000 ### Source ########################################################################################################## 3526 */ 3527 HAL_StatusTypeDef UART_WaitOnFlagUntilTimeout(UART_HandleTypeDef *huart, uint32_t Flag, FlagStatus Status, 3528 uint32_t Tickstart, uint32_t Timeout) 3529 { 3530 /* Wait until flag is set */ 3531 while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status) 3532 { 3533 /* Check for the Timeout */ 3534 if (Timeout != HAL_MAX_DELAY) 3535 { 3536 if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U)) 3537 { 3538 /* Disable TXE, RXNE, PE and ERR (Frame error, noise error, overrun error) 3539 interrupts for the interrupt process */ 3540 #if defined(USART_CR1_FIFOEN) 3541 ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE | 3542 USART_CR1_TXEIE_TXFNFIE)); 3543 #else 3544 ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE | USART_CR1_PEIE | USART_CR1_TXEIE)); 3545 #endif /* USART_CR1_FIFOEN */ ### Stack ########################################################################################################### [0] from 0x08003bf8 in UART_WaitOnFlagUntilTimeout+50 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3536 [1] from 0x08003e5c in HAL_UART_Receive+238 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1286 [2] from 0x0800426c in UART1_RxCpltCallback+32 at shared/drivers/p_serial_mgr.c:37 [3] from 0x0800345e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [4] from 0x080035b0 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [5] from 0x08001554 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [6] from 0xffffffe9 [7] from 0x080014ba in main+122 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08003bf8 in UART_WaitOnFlagUntilTimeout+50 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3536 ### Variables ####################################################################################################### arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…, Flag = 32, Status = RESET, Tickstart = 2725, Timeout = 50 ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9690 lma 0x80001c0 Loading section .rodata, size 0x4c0 lma 0x8009850 Loading section .ARM, size 0x8 lma 0x8009d10 Loading section .init_array, size 0x8 lma 0x8009d18 Loading section .fini_array, size 0x8 lma 0x8009d20 Loading section .data, size 0x9a8 lma 0x8009d28 Start address 0x080042a4, load size 42656 Transfer rate: 29 KB/sec, 4739 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x08003c08 in UART_WaitOnFlagUntilTimeout (huart=huart@entry=0x20000a60 , Flag=Flag@entry=32, Status=Status@entry=RESET, Tickstart=Tickstart@entry=980, Timeout=Timeout@entry=50) at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3556 3556 if (READ_BIT(huart->Instance->CR1, USART_CR1_RE) != 0U) ### Assembly ######################################################################################################## 0x08003bfa UART_WaitOnFlagUntilTimeout+52 cmp.w r8, #0 0x08003bfe UART_WaitOnFlagUntilTimeout+56 beq.n 0x8003c56 0x08003c00 UART_WaitOnFlagUntilTimeout+58 ldr r3, [r5, #0] 0x08003c02 UART_WaitOnFlagUntilTimeout+60 ldr r2, [r3, #0] 0x08003c04 UART_WaitOnFlagUntilTimeout+62 tst.w r2, #4 0x08003c08 UART_WaitOnFlagUntilTimeout+66 beq.n 0x8003bd6 0x08003c0a UART_WaitOnFlagUntilTimeout+68 ldr r2, [r3, #28] 0x08003c0c UART_WaitOnFlagUntilTimeout+70 tst.w r2, #2048 ; 0x800 0x08003c10 UART_WaitOnFlagUntilTimeout+74 beq.n 0x8003bd6 0x08003c12 UART_WaitOnFlagUntilTimeout+76 mov.w r2, #2048 ; 0x800 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x20000a60 r10 0x00000000 pc 0x08003c08 primask 0x00 r1 0x00000020 r6 0x00000000 r11 0x00000000 xPSR 0x21000035 basepri 0x00 r2 0x0000000d r7 0x00000020 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x40013800 r8 0x00000032 sp 0x2000ff18 msp 0x2000ff18 control 0x00 r4 0x00000000 r9 0x000003d4 lr 0x08003bf3 psp 0x00000000 ### Source ########################################################################################################## 3546 ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE); 3547 3548 huart->gState = HAL_UART_STATE_READY; 3549 huart->RxState = HAL_UART_STATE_READY; 3550 3551 __HAL_UNLOCK(huart); 3552 3553 return HAL_TIMEOUT; 3554 } 3555 3556 if (READ_BIT(huart->Instance->CR1, USART_CR1_RE) != 0U) 3557 { 3558 if (__HAL_UART_GET_FLAG(huart, UART_FLAG_RTOF) == SET) 3559 { 3560 /* Clear Receiver Timeout flag*/ 3561 __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_RTOF); 3562 3563 /* Disable TXE, RXNE, PE and ERR (Frame error, noise error, overrun error) 3564 interrupts for the interrupt process */ 3565 #if defined(USART_CR1_FIFOEN) ### Stack ########################################################################################################### [0] from 0x08003c08 in UART_WaitOnFlagUntilTimeout+66 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3556 [1] from 0x08003e5c in HAL_UART_Receive+238 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1286 [2] from 0x0800426c in UART1_RxCpltCallback+32 at shared/drivers/p_serial_mgr.c:37 [3] from 0x0800345e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [4] from 0x080035b0 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [5] from 0x08001554 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [6] from 0xffffffe9 [7] from 0x080014ba in main+122 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08003c08 in UART_WaitOnFlagUntilTimeout+66 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3556 ### Variables ####################################################################################################### arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…, Flag = 32, Status = RESET, Tickstart = 980, Timeout = 50 ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9698 lma 0x80001c0 Loading section .rodata, size 0x4c0 lma 0x8009858 Loading section .ARM, size 0x8 lma 0x8009d18 Loading section .init_array, size 0x8 lma 0x8009d20 Loading section .fini_array, size 0x8 lma 0x8009d28 Loading section .data, size 0x9a8 lma 0x8009d30 Start address 0x080042b0, load size 42664 Transfer rate: 29 KB/sec, 4740 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x08002184 in HAL_GetTick () at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c:341 341 } ### Assembly ######################################################################################################## ~ ~ ~ 0x08002180 HAL_GetTick+0 ldr r3, [pc, #4] ; (0x8002188 ) 0x08002182 HAL_GetTick+2 ldr r0, [r3, #0] 0x08002184 HAL_GetTick+4 bx lr 0x08002186 HAL_GetTick+6 nop 0x08002188 HAL_GetTick+8 lsrs r0, r2, #15 0x0800218a HAL_GetTick+10 movs r0, #0 ~ ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x000043b7 r5 0x20000a60 r10 0x00000000 pc 0x08002184 primask 0x00 r1 0x00000020 r6 0x00000000 r11 0x00000000 xPSR 0x01000035 basepri 0x00 r2 0x006010d0 r7 0x00000020 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x20000bd0 r8 0x00000032 sp 0x2000ff18 msp 0x2000ff18 control 0x00 r4 0x00000000 r9 0x000043b7 lr 0x08003bf3 psp 0x00000000 ### Source ########################################################################################################## 331 332 /** 333 * @brief Provide a tick value in millisecond. 334 * @note This function is declared as __weak to be overwritten in case of other 335 * implementations in user file. 336 * @retval tick value 337 */ 338 __weak uint32_t HAL_GetTick(void) 339 { 340 return uwTick; 341 } 342 343 /** 344 * @brief This function returns a tick priority. 345 * @retval tick priority 346 */ 347 uint32_t HAL_GetTickPrio(void) 348 { 349 return uwTickPrio; 350 } ### Stack ########################################################################################################### [0] from 0x08002184 in HAL_GetTick+4 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c:341 [1] from 0x08003bf2 in UART_WaitOnFlagUntilTimeout+44 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3536 [2] from 0x08003e5c in HAL_UART_Receive+238 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1286 [3] from 0x0800426c in UART1_RxCpltCallback+32 at shared/drivers/p_serial_mgr.c:37 [4] from 0x0800345e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [5] from 0x080035b0 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [6] from 0x08001554 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [7] from 0xffffffe9 [8] from 0x080014c0 in main+128 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08002184 in HAL_GetTick+4 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c:341 ### Variables ####################################################################################################### ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9698 lma 0x80001c0 Loading section .rodata, size 0x4c8 lma 0x8009858 Loading section .ARM, size 0x8 lma 0x8009d20 Loading section .init_array, size 0x8 lma 0x8009d28 Loading section .fini_array, size 0x8 lma 0x8009d30 Loading section .data, size 0x9a8 lma 0x8009d38 Start address 0x080042b0, load size 42672 Transfer rate: 29 KB/sec, 4741 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x08003bfe in UART_WaitOnFlagUntilTimeout (huart=huart@entry=0x20000b14 , Flag=Flag@entry=64, Status=Status@entry=RESET, Tickstart=Tickstart@entry=11090, Timeout=Timeout@entry=100) at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3536 3536 if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U)) ### Assembly ######################################################################################################## 0x08003bee UART_WaitOnFlagUntilTimeout+40 bl 0x8002180 0x08003bf2 UART_WaitOnFlagUntilTimeout+44 sub.w r0, r0, r9 0x08003bf6 UART_WaitOnFlagUntilTimeout+48 cmp r0, r8 0x08003bf8 UART_WaitOnFlagUntilTimeout+50 bhi.n 0x8003c56 0x08003bfa UART_WaitOnFlagUntilTimeout+52 cmp.w r8, #0 0x08003bfe UART_WaitOnFlagUntilTimeout+56 beq.n 0x8003c56 0x08003c00 UART_WaitOnFlagUntilTimeout+58 ldr r3, [r5, #0] 0x08003c02 UART_WaitOnFlagUntilTimeout+60 ldr r2, [r3, #0] 0x08003c04 UART_WaitOnFlagUntilTimeout+62 tst.w r2, #4 0x08003c08 UART_WaitOnFlagUntilTimeout+66 beq.n 0x8003bd6 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x20000b14 r10 0x00000000 pc 0x08003bfe primask 0x00 r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x210f0035 basepri 0x00 r2 0x00600010 r7 0x00000040 r12 0x0800988d fpscr 0x00000000 faultmask 0x00 r3 0x20000bd0 r8 0x00000064 sp 0x2000ff10 msp 0x2000ff10 control 0x04 r4 0x00000000 r9 0x00002b52 lr 0x08003bf3 psp 0x00000000 ### Source ########################################################################################################## 3526 */ 3527 HAL_StatusTypeDef UART_WaitOnFlagUntilTimeout(UART_HandleTypeDef *huart, uint32_t Flag, FlagStatus Status, 3528 uint32_t Tickstart, uint32_t Timeout) 3529 { 3530 /* Wait until flag is set */ 3531 while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status) 3532 { 3533 /* Check for the Timeout */ 3534 if (Timeout != HAL_MAX_DELAY) 3535 { 3536 if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U)) 3537 { 3538 /* Disable TXE, RXNE, PE and ERR (Frame error, noise error, overrun error) 3539 interrupts for the interrupt process */ 3540 #if defined(USART_CR1_FIFOEN) 3541 ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE | 3542 USART_CR1_TXEIE_TXFNFIE)); 3543 #else 3544 ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE | USART_CR1_PEIE | USART_CR1_TXEIE)); 3545 #endif /* USART_CR1_FIFOEN */ ### Stack ########################################################################################################### [0] from 0x08003bfe in UART_WaitOnFlagUntilTimeout+56 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3536 [1] from 0x08003d4a in HAL_UART_Transmit+180 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1207 [2] from 0x0800420a in p_uart_async_write_byte+34 at shared/util/putil.c:36 [3] from 0x08004278 in UART1_RxCpltCallback+44 at shared/drivers/p_serial_mgr.c:40 [4] from 0x0800345e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [5] from 0x080035b0 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [6] from 0x08001554 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [7] from 0xffffffe9 [8] from 0x080014ba in main+122 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x08003bfe in UART_WaitOnFlagUntilTimeout+56 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3536 ### Variables ####################################################################################################### arg huart = 0x20000b14 : {Instance = 0x40004400,Init = {BaudRate = 115200,WordLength = 0,StopBi…, Flag = 64, Status = RESET, Tickstart = 11090, Timeout = 100 ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9698 lma 0x80001c0 Loading section .rodata, size 0x4c8 lma 0x8009858 Loading section .ARM, size 0x8 lma 0x8009d20 Loading section .init_array, size 0x8 lma 0x8009d28 Loading section .fini_array, size 0x8 lma 0x8009d30 Loading section .data, size 0x9a8 lma 0x8009d38 Start address 0x080042b0, load size 42672 Transfer rate: 29 KB/sec, 4741 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x08003c02 in UART_WaitOnFlagUntilTimeout (huart=0x20000a60 , Flag=32, Status=, Tickstart=21542, Timeout=1) at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3536 3536 if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U)) ### Assembly ######################################################################################################## 0x08003bf6 UART_WaitOnFlagUntilTimeout+32 cmp r0, r8 0x08003bf8 UART_WaitOnFlagUntilTimeout+34 bhi.n 0x8003c56 0x08003bfa UART_WaitOnFlagUntilTimeout+36 cmp.w r8, #0 0x08003bfe UART_WaitOnFlagUntilTimeout+40 beq.n 0x8003c56 0x08003c00 UART_WaitOnFlagUntilTimeout+42 ldr r3, [r5, #0] 0x08003c02 UART_WaitOnFlagUntilTimeout+44 ldr r2, [r3, #0] 0x08003c04 UART_WaitOnFlagUntilTimeout+46 tst.w r2, #4 0x08003c08 UART_WaitOnFlagUntilTimeout+50 beq.n 0x8003bd6 0x08003c0a UART_WaitOnFlagUntilTimeout+52 ldr r2, [r3, #28] 0x08003c0c UART_WaitOnFlagUntilTimeout+54 tst.w r2, #2048 ; 0x800 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x20000a60 r10 0x00000000 pc 0x08003c02 primask 0x00 r1 0x00000020 r6 0x00000000 r11 0x00000000 xPSR 0x21000035 basepri 0x00 r2 0x006010d0 r7 0x00000020 r12 0x00001000 fpscr 0x00000010 faultmask 0x00 r3 0x40013800 r8 0x00000001 sp 0x2000ff18 msp 0x2000ff18 control 0x00 r4 0x00000000 r9 0x00005426 lr 0x08003bf3 psp 0x00000000 ### Source ########################################################################################################## 3526 */ 3527 HAL_StatusTypeDef UART_WaitOnFlagUntilTimeout(UART_HandleTypeDef *huart, uint32_t Flag, FlagStatus Status, 3528 uint32_t Tickstart, uint32_t Timeout) 3529 { 3530 /* Wait until flag is set */ 3531 while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status) 3532 { 3533 /* Check for the Timeout */ 3534 if (Timeout != HAL_MAX_DELAY) 3535 { 3536 if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U)) 3537 { 3538 /* Disable TXE, RXNE, PE and ERR (Frame error, noise error, overrun error) 3539 interrupts for the interrupt process */ 3540 #if defined(USART_CR1_FIFOEN) 3541 ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE | 3542 USART_CR1_TXEIE_TXFNFIE)); 3543 #else 3544 ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE | USART_CR1_PEIE | USART_CR1_TXEIE)); 3545 #endif /* USART_CR1_FIFOEN */ ### Stack ########################################################################################################### [0] from 0x08003c02 in UART_WaitOnFlagUntilTimeout+44 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3536 [1] from 0x08003e5c in HAL_UART_Receive+222 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1284 [2] from 0x0800426c in UART1_RxCpltCallback+16 at shared/drivers/p_serial_mgr.c:46 [3] from 0x0800345e in UART_RxISR_8BIT+114 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4397 [4] from 0x080035b0 in HAL_UART_IRQHandler+92 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2639 [5] from 0x08001554 in PendSV_Handler+2 at Core/Src/stm32l4xx_it.c:180 ### Threads ######################################################################################################### [1] id 0 from 0x08003c02 in UART_WaitOnFlagUntilTimeout+44 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3536 ### Variables ####################################################################################################### arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…, Flag = 32, Status = , Tickstart = 21542, Timeout = 1 ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x96a8 lma 0x80001c0 Loading section .rodata, size 0x4c8 lma 0x8009868 Loading section .ARM, size 0x8 lma 0x8009d30 Loading section .init_array, size 0x8 lma 0x8009d38 Loading section .fini_array, size 0x8 lma 0x8009d40 Loading section .data, size 0x9a8 lma 0x8009d48 Start address 0x080042c0, load size 42688 Transfer rate: 29 KB/sec, 4743 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x08003c1a in UART_WaitOnFlagUntilTimeout (huart=0x20000a60 , Flag=32, Status=, Tickstart=17846, Timeout=1) at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3558 3558 if (__HAL_UART_GET_FLAG(huart, UART_FLAG_RTOF) == SET) ### Assembly ######################################################################################################## 0x08003c0e UART_WaitOnFlagUntilTimeout+60 beq.n 0x8003c66 0x08003c10 UART_WaitOnFlagUntilTimeout+62 ldr r3, [r5, #0] 0x08003c12 UART_WaitOnFlagUntilTimeout+64 ldr r2, [r3, #0] 0x08003c14 UART_WaitOnFlagUntilTimeout+66 tst.w r2, #4 0x08003c18 UART_WaitOnFlagUntilTimeout+70 beq.n 0x8003be6 0x08003c1a UART_WaitOnFlagUntilTimeout+72 ldr r2, [r3, #28] 0x08003c1c UART_WaitOnFlagUntilTimeout+74 tst.w r2, #2048 ; 0x800 0x08003c20 UART_WaitOnFlagUntilTimeout+78 beq.n 0x8003be6 0x08003c22 UART_WaitOnFlagUntilTimeout+80 mov.w r2, #2048 ; 0x800 0x08003c26 UART_WaitOnFlagUntilTimeout+84 str r2, [r3, #32] ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x20000a60 r10 0x00000000 pc 0x08003c1a primask 0x00 r1 0x00000020 r6 0x00000000 r11 0x00000000 xPSR 0x21030035 basepri 0x00 r2 0x0000000d r7 0x00000020 r12 0xffffffff fpscr 0x00000010 faultmask 0x00 r3 0x40013800 r8 0x00000001 sp 0x2000fda8 msp 0x2000fda8 control 0x00 r4 0x00000000 r9 0x000045b6 lr 0x08003c03 psp 0x00000000 ### Source ########################################################################################################## 3548 huart->gState = HAL_UART_STATE_READY; 3549 huart->RxState = HAL_UART_STATE_READY; 3550 3551 __HAL_UNLOCK(huart); 3552 3553 return HAL_TIMEOUT; 3554 } 3555 3556 if (READ_BIT(huart->Instance->CR1, USART_CR1_RE) != 0U) 3557 { 3558 if (__HAL_UART_GET_FLAG(huart, UART_FLAG_RTOF) == SET) 3559 { 3560 /* Clear Receiver Timeout flag*/ 3561 __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_RTOF); 3562 3563 /* Disable TXE, RXNE, PE and ERR (Frame error, noise error, overrun error) 3564 interrupts for the interrupt process */ 3565 #if defined(USART_CR1_FIFOEN) 3566 ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE | 3567 USART_CR1_TXEIE_TXFNFIE)); ### Stack ########################################################################################################### [0] from 0x08003c1a in UART_WaitOnFlagUntilTimeout+72 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3558 [1] from 0x08003e6c in HAL_UART_Receive+242 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1290 [2] from 0x0800427c in p_serial_mgr_start+24 at shared/drivers/p_serial_mgr.c:62 [3] from 0x0800346e in UART_RxISR_8BIT+134 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4407 [4] from 0x080035c0 in HAL_UART_IRQHandler+112 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2365 [5] from 0x08001564 in USART1_IRQHandler+12 at Core/Src/stm32l4xx_it.c:215 [6] from 0xffffffe9 [7] from 0x08003c1a in UART_WaitOnFlagUntilTimeout+72 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3558 [8] from 0x08003d3c in HAL_UART_Transmit+154 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1194 [9] from 0x080041c2 in p_printf+74 at shared/util/putil.c:26 [+] ### Threads ######################################################################################################### [1] id 0 from 0x08003c1a in UART_WaitOnFlagUntilTimeout+72 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3558 ### Variables ####################################################################################################### arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…, Flag = 32, Status = , Tickstart = 17846, Timeout = 1 ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9670 lma 0x80001c0 Loading section .rodata, size 0x488 lma 0x8009830 Loading section .ARM, size 0x8 lma 0x8009cb8 Loading section .init_array, size 0x8 lma 0x8009cc0 Loading section .fini_array, size 0x8 lma 0x8009cc8 Loading section .data, size 0x9a8 lma 0x8009cd0 Start address 0x08004288, load size 42568 Transfer rate: 29 KB/sec, 4729 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] RCC_SetFlashLatencyFromMSIRange (msirange=0) at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c:1795 1795 { ### Assembly ######################################################################################################## ~ ~ ~ ~ ~ 0x0800218c RCC_SetFlashLatencyFromMSIRange+0 ldr r3, [pc, #4] ; (0x8002194 ) 0x0800218e RCC_SetFlashLatencyFromMSIRange+2 ldr r0, [r3, #0] 0x08002190 RCC_SetFlashLatencyFromMSIRange+4 bx lr 0x08002192 RCC_SetFlashLatencyFromMSIRange+6 nop 0x08002194 RCC_SetFlashLatencyFromMSIRange+8 lsrs r0, r2, #15 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x20000b14 r10 0x00000000 pc 0x0800218c primask 0x00 r1 0x00000080 r6 0x00000000 r11 0x00000000 xPSR 0x01070000 basepri 0x00 r2 0x00600010 r7 0x00000080 r12 0xffffffff fpscr 0x00000010 faultmask 0x00 r3 0x40004400 r8 0x00000064 sp 0x2000fd80 msp 0x2000fd80 control 0x04 r4 0x00000000 r9 0x00024e31 lr 0x08003bff psp 0x00000000 ### Source ########################################################################################################## 1785 /** @addtogroup RCC_Private_Functions 1786 * @{ 1787 */ 1788 /** 1789 * @brief Update number of Flash wait states in line with MSI range and current 1790 voltage range. 1791 * @param msirange MSI range value from RCC_MSIRANGE_0 to RCC_MSIRANGE_11 1792 * @retval HAL status 1793 */ 1794 static HAL_StatusTypeDef RCC_SetFlashLatencyFromMSIRange(uint32_t msirange) 1795 { 1796 uint32_t vos; 1797 uint32_t latency = FLASH_LATENCY_0; /* default value 0WS */ 1798 1799 if(__HAL_RCC_PWR_IS_CLK_ENABLED()) 1800 { 1801 vos = HAL_PWREx_GetVoltageRange(); 1802 } 1803 else 1804 { ### Stack ########################################################################################################### [0] from 0x0800218c in RCC_SetFlashLatencyFromMSIRange+0 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c:1795 [1] from 0x08003bfe in UART_WaitOnFlagUntilTimeout+56 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3536 [2] from 0x08003d38 in HAL_UART_Transmit+162 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1201 [3] from 0x080041be in p_printf+82 at shared/util/putil.c:26 ### Threads ######################################################################################################### [1] id 0 from 0x0800218c in RCC_SetFlashLatencyFromMSIRange+0 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c:1795 ### Variables ####################################################################################################### arg msirange = 0 loc vos = , latency = ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9678 lma 0x80001c0 Loading section .rodata, size 0x488 lma 0x8009838 Loading section .ARM, size 0x8 lma 0x8009cc0 Loading section .init_array, size 0x8 lma 0x8009cc8 Loading section .fini_array, size 0x8 lma 0x8009cd0 Loading section .data, size 0x9a8 lma 0x8009cd8 Start address 0x08004290, load size 42576 Transfer rate: 29 KB/sec, 4730 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x08003bd6 in UART_WaitOnFlagUntilTimeout (huart=0x20000b14 , Flag=128, Status=, Tickstart=17636, Timeout=100) at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3531 3531 while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status) ### Assembly ######################################################################################################## 0x08003bca UART_WaitOnFlagUntilTimeout+20 mov r5, r0 0x08003bcc UART_WaitOnFlagUntilTimeout+22 mov r7, r1 0x08003bce UART_WaitOnFlagUntilTimeout+24 mov r6, r2 0x08003bd0 UART_WaitOnFlagUntilTimeout+26 mov r9, r3 0x08003bd2 UART_WaitOnFlagUntilTimeout+28 ldr.w r8, [sp, #32] 0x08003bd6 UART_WaitOnFlagUntilTimeout+32 ldr r3, [r5, #0] 0x08003bd8 UART_WaitOnFlagUntilTimeout+34 ldr r4, [r3, #28] 0x08003bda UART_WaitOnFlagUntilTimeout+36 bics.w r4, r7, r4 0x08003bde UART_WaitOnFlagUntilTimeout+40 ite eq 0x08003be0 UART_WaitOnFlagUntilTimeout+42 moveq r4, #1 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x20000b14 r10 0x00000000 pc 0x08003bd6 primask 0x00 r1 0x00000080 r6 0x00000000 r11 0x00000000 xPSR 0x41030000 basepri 0x00 r2 0x00600010 r7 0x00000080 r12 0xffffffff fpscr 0x00000010 faultmask 0x00 r3 0x40004400 r8 0x00000064 sp 0x2000fd80 msp 0x2000fd80 control 0x04 r4 0x00000000 r9 0x000044e4 lr 0x08003bf3 psp 0x00000000 ### Source ########################################################################################################## 3521 * @param Flag Specifies the UART flag to check 3522 * @param Status The actual Flag status (SET or RESET) 3523 * @param Tickstart Tick start value 3524 * @param Timeout Timeout duration 3525 * @retval HAL status 3526 */ 3527 HAL_StatusTypeDef UART_WaitOnFlagUntilTimeout(UART_HandleTypeDef *huart, uint32_t Flag, FlagStatus Status, 3528 uint32_t Tickstart, uint32_t Timeout) 3529 { 3530 /* Wait until flag is set */ 3531 while ((__HAL_UART_GET_FLAG(huart, Flag) ? SET : RESET) == Status) 3532 { 3533 /* Check for the Timeout */ 3534 if (Timeout != HAL_MAX_DELAY) 3535 { 3536 if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U)) 3537 { 3538 /* Disable TXE, RXNE, PE and ERR (Frame error, noise error, overrun error) 3539 interrupts for the interrupt process */ 3540 #if defined(USART_CR1_FIFOEN) ### Stack ########################################################################################################### [0] from 0x08003bd6 in UART_WaitOnFlagUntilTimeout+32 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3531 [1] from 0x08003d2c in HAL_UART_Transmit+166 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1202 [2] from 0x080041b2 in p_printf+86 at shared/util/putil.c:16 [3] from 0x080014fa in main+186 at Core/Src/main.c:141 ### Threads ######################################################################################################### [1] id 0 from 0x08003bd6 in UART_WaitOnFlagUntilTimeout+32 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3531 ### Variables ####################################################################################################### arg huart = 0x20000b14 : {Instance = 0x40004400,Init = {BaudRate = 115200,WordLength = 0,StopBi…, Flag = 128, Status = , Tickstart = 17636, Timeout = 100 ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9668 lma 0x80001c0 Loading section .rodata, size 0x480 lma 0x8009828 Loading section .ARM, size 0x8 lma 0x8009ca8 Loading section .init_array, size 0x8 lma 0x8009cb0 Loading section .fini_array, size 0x8 lma 0x8009cb8 Loading section .data, size 0x9a8 lma 0x8009cc0 Start address 0x08004280, load size 42552 Transfer rate: 29 KB/sec, 4728 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x0800424c in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:56 56 if (b_go) ### Assembly ######################################################################################################## ~ ~ ~ 0x08004248 p_serial_mgr_service+0 ldr r3, [pc, #12] ; (0x8004258 ) 0x0800424a p_serial_mgr_service+2 ldrb r0, [r3, #0] 0x0800424c p_serial_mgr_service+4 cbnz r0, 0x8004250 0x0800424e p_serial_mgr_service+6 bx lr 0x08004250 p_serial_mgr_service+8 movs r2, #0 0x08004252 p_serial_mgr_service+10 strb r2, [r3, #0] 0x08004254 p_serial_mgr_service+12 b.n 0x800424e ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x0800424c primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x40013800 r7 0x00000000 r12 0x00000000 fpscr 0x00000010 faultmask 0x00 r3 0x20000be8 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x00000100 r9 0x00000000 lr 0x080014f3 psp 0x00000000 ### Source ########################################################################################################## 46 bool p_serial_mgr_service(void) 47 { 48 // // this will be less garbage when i switch to a queue 49 // for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 50 // { 51 // if (serial_pkt_cb.buffer[ind].b_ready) 52 // { 53 // return &serial_pkt_cb.buffer[ind]; 54 // } 55 // } 56 if (b_go) 57 { 58 b_go = false; 59 return true; 60 } 61 return false; 62 } 63 64 void p_serial_mgr_start() 65 { ### Stack ########################################################################################################### [0] from 0x0800424c in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:56 [1] from 0x080014f2 in main+178 at Core/Src/main.c:139 ### Threads ######################################################################################################### [1] id 0 from 0x0800424c in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:56 ### Variables ####################################################################################################### ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9668 lma 0x80001c0 Loading section .rodata, size 0x480 lma 0x8009828 Loading section .ARM, size 0x8 lma 0x8009ca8 Loading section .init_array, size 0x8 lma 0x8009cb0 Loading section .fini_array, size 0x8 lma 0x8009cb8 Loading section .data, size 0x9a8 lma 0x8009cc0 Start address 0x08004280, load size 42552 Transfer rate: 29 KB/sec, 4728 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x0800424c in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:56 56 return b_go; ### Assembly ######################################################################################################## ~ ~ ~ 0x08004248 p_serial_mgr_service+0 ldr r3, [pc, #12] ; (0x8004258 ) 0x0800424a p_serial_mgr_service+2 ldrb r0, [r3, #0] 0x0800424c p_serial_mgr_service+4 cbnz r0, 0x8004250 0x0800424e p_serial_mgr_service+6 bx lr 0x08004250 p_serial_mgr_service+8 movs r2, #0 0x08004252 p_serial_mgr_service+10 strb r2, [r3, #0] ~ ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x0800424c primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x40013800 r7 0x00000000 r12 0x00000000 fpscr 0x00000010 faultmask 0x00 r3 0x20000be8 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x00000100 r9 0x00000000 lr 0x080014f3 psp 0x00000000 ### Source ########################################################################################################## 46 bool p_serial_mgr_service(void) 47 { 48 // // this will be less garbage when i switch to a queue 49 // for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 50 // { 51 // if (serial_pkt_cb.buffer[ind].b_ready) 52 // { 53 // return &serial_pkt_cb.buffer[ind]; 54 // } 55 // } 56 return b_go; 57 } 58 59 void p_serial_mgr_start() 60 { 61 HAL_UART_Receive_IT(_serial_huart_inst, &rxc, 1); 62 b_go = false; 63 } ~ ~ ### Stack ########################################################################################################### [0] from 0x0800424c in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:56 [1] from 0x080014f2 in main+178 at Core/Src/main.c:139 ### Threads ######################################################################################################### [1] id 0 from 0x0800424c in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:56 ### Variables ####################################################################################################### ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9670 lma 0x80001c0 Loading section .rodata, size 0x480 lma 0x8009830 Loading section .ARM, size 0x8 lma 0x8009cb0 Loading section .init_array, size 0x8 lma 0x8009cb8 Loading section .fini_array, size 0x8 lma 0x8009cc0 Loading section .data, size 0x9a8 lma 0x8009cc8 Start address 0x08004284, load size 42560 Transfer rate: 29 KB/sec, 4728 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x0800424a in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:56 56 return b_go; ### Assembly ######################################################################################################## ~ ~ ~ ~ 0x08004248 p_serial_mgr_service+0 ldr r3, [pc, #4] ; (0x8004250 ) 0x0800424a p_serial_mgr_service+2 ldrb r0, [r3, #0] 0x0800424c p_serial_mgr_service+4 bx lr 0x0800424e p_serial_mgr_service+6 nop 0x08004250 p_serial_mgr_service+8 lsrs r0, r5, #15 0x08004252 p_serial_mgr_service+10 movs r0, #0 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x0800424a primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x00000000 r7 0x00000000 r12 0x00000000 fpscr 0x00000010 faultmask 0x00 r3 0x20000be8 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x00000100 r9 0x00000000 lr 0x080014f3 psp 0x00000000 ### Source ########################################################################################################## 46 bool p_serial_mgr_service(void) 47 { 48 // // this will be less garbage when i switch to a queue 49 // for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 50 // { 51 // if (serial_pkt_cb.buffer[ind].b_ready) 52 // { 53 // return &serial_pkt_cb.buffer[ind]; 54 // } 55 // } 56 return b_go; 57 } 58 59 void p_serial_mgr_start() 60 { 61 HAL_UART_Receive_IT(_serial_huart_inst, &rxc, 1); 62 b_go = false; 63 } ~ ~ ### Stack ########################################################################################################### [0] from 0x0800424a in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:56 [1] from 0x080014f2 in main+178 at Core/Src/main.c:139 ### Threads ######################################################################################################### [1] id 0 from 0x0800424a in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:56 ### Variables ####################################################################################################### ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9670 lma 0x80001c0 Loading section .rodata, size 0x480 lma 0x8009830 Loading section .ARM, size 0x8 lma 0x8009cb0 Loading section .init_array, size 0x8 lma 0x8009cb8 Loading section .fini_array, size 0x8 lma 0x8009cc0 Loading section .data, size 0x9a8 lma 0x8009cc8 Start address 0x08004284, load size 42560 Transfer rate: 29 KB/sec, 4728 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] main () at Core/Src/main.c:139 139 if (p_serial_mgr_service()) ### Assembly ######################################################################################################## 0x080014de main+158 mov.w r2, #256 ; 0x100 0x080014e2 main+162 movs r1, #0 0x080014e4 main+164 mov r0, sp 0x080014e6 main+166 bl 0x8004320 0x080014ea main+170 bl 0x8004254 0x080014ee main+174 bl 0x8004248 0x080014f2 main+178 cmp r0, #0 0x080014f4 main+180 beq.n 0x80014ee 0x080014f6 main+182 movs r3, #50 ; 0x32 0x080014f8 main+184 mov.w r2, #256 ; 0x100 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014ee primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x00000000 r7 0x00000000 r12 0x00000000 fpscr 0x00000010 faultmask 0x00 r3 0x20000be8 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x00000014 r9 0x00000000 lr 0x080014f3 psp 0x00000000 ### Source ########################################################################################################## 129 p_serial_mgr_start(); 130 131 uint16_t motor_degrees = 0; 132 /* USER CODE END 2 */ 133 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { 141 HAL_UART_Receive(&huart2, rxb, 256, 50); 142 for (int ind = 0; ind < 20; ind++) 143 { 144 p_uart_async_write_byte(rxb[ind]); 145 } 146 PDEBUG("\n\n\n\n"); 147 memset(rxb, 0, 256); 148 p_serial_mgr_start(); ### Stack ########################################################################################################### [0] from 0x080014ee in main+174 at Core/Src/main.c:139 ### Threads ######################################################################################################### [1] id 0 from 0x080014ee in main+174 at Core/Src/main.c:139 ### Variables ####################################################################################################### loc rxb = '\000' ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9660 lma 0x80001c0 Loading section .rodata, size 0x480 lma 0x8009820 Loading section .ARM, size 0x8 lma 0x8009ca0 Loading section .init_array, size 0x8 lma 0x8009ca8 Loading section .fini_array, size 0x8 lma 0x8009cb0 Loading section .data, size 0x9a8 lma 0x8009cb8 Start address 0x08004274, load size 42544 Transfer rate: 29 KB/sec, 4727 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x0800423a in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:53 53 return b_go; ### Assembly ######################################################################################################## ~ ~ ~ ~ 0x08004238 p_serial_mgr_service+0 ldr r3, [pc, #4] ; (0x8004240 ) 0x0800423a p_serial_mgr_service+2 ldrb r0, [r3, #0] 0x0800423c p_serial_mgr_service+4 bx lr 0x0800423e p_serial_mgr_service+6 nop 0x08004240 p_serial_mgr_service+8 lsrs r0, r5, #15 0x08004242 p_serial_mgr_service+10 movs r0, #0 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x0800423a primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x00000000 r7 0x00000000 r12 0x00000000 fpscr 0x00000010 faultmask 0x00 r3 0x20000be8 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x00000014 r9 0x00000000 lr 0x080014f3 psp 0x00000000 ### Source ########################################################################################################## 43 bool p_serial_mgr_service(void) 44 { 45 // // this will be less garbage when i switch to a queue 46 // for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 47 // { 48 // if (serial_pkt_cb.buffer[ind].b_ready) 49 // { 50 // return &serial_pkt_cb.buffer[ind]; 51 // } 52 // } 53 return b_go; 54 } 55 56 void p_serial_mgr_start() 57 { 58 HAL_UART_Receive_IT(_serial_huart_inst, &rxc, 1); 59 b_go = false; 60 } ~ ~ ### Stack ########################################################################################################### [0] from 0x0800423a in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:53 [1] from 0x080014f2 in main+178 at Core/Src/main.c:139 ### Threads ######################################################################################################### [1] id 0 from 0x0800423a in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:53 ### Variables ####################################################################################################### ##################################################################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08004274 msp: 0x20010000 Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9660 lma 0x80001c0 Loading section .rodata, size 0x480 lma 0x8009820 Loading section .ARM, size 0x8 lma 0x8009ca0 Loading section .init_array, size 0x8 lma 0x8009ca8 Loading section .fini_array, size 0x8 lma 0x8009cb0 Loading section .data, size 0x9a8 lma 0x8009cb8 Start address 0x08004274, load size 42544 Transfer rate: 29 KB/sec, 4727 bytes/write. Breakpoint 1 at 0x800420c: file shared/drivers/p_serial_mgr.c, line 34. Note: automatically using hardware breakpoints for read-only addresses. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ################################################################################################# Breakpoint 1, UART1_RxCpltCallback (huart=0x20000a60 ) at shared/drivers/p_serial_mgr.c:34 34 b_go = true; ### Assembly ######################################################################################################## ~ ~ ~ ~ ~ !0x0800420c UART1_RxCpltCallback+0 ldr r3, [pc, #4] ; (0x8004214 ) 0x0800420e UART1_RxCpltCallback+2 movs r2, #1 0x08004210 UART1_RxCpltCallback+4 strb r2, [r3, #0] 0x08004212 UART1_RxCpltCallback+6 bx lr 0x08004214 UART1_RxCpltCallback+8 lsrs r0, r5, #15 ### Breakpoints ##################################################################################################### [1] break at 0x0800420c in shared/drivers/p_serial_mgr.c:34 for UART1_RxCpltCallback hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x20000a60 r5 0x00004001 r10 0x00000000 pc 0x0800420c primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00 r2 0x40013808 r7 0x00000000 r12 0x0000000c fpscr 0x00000010 faultmask 0x00 r3 0x0800420d r8 0x00000000 sp 0x2000fe68 msp 0x2000fe68 control 0x00 r4 0x20000a60 r9 0x00000000 lr 0x0800344f psp 0x00000000 ### Source ########################################################################################################## 24 SS_ESC = 3, // get byte, dont increment number left 25 SS_CHECKSUM = 4 // done 26 } serial_state_t; 27 28 static UART_HandleTypeDef *_serial_huart_inst = NULL; 29 30 static uint8_t rxc = '\0'; 31 static bool b_go = false; 32 void UART1_RxCpltCallback(UART_HandleTypeDef *huart) 33 { !34 b_go = true; 35 } 36 void p_serial_mgr_init(UART_HandleTypeDef *huart) 37 { 38 _serial_huart_inst = huart; 39 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 40 b_go = false; 41 } 42 43 bool p_serial_mgr_service(void) ### Stack ########################################################################################################### [0] from 0x0800420c in UART1_RxCpltCallback+0 at shared/drivers/p_serial_mgr.c:34 [1] from 0x0800344e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035a0 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001544 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x080014ee in main+174 at Core/Src/main.c:139 ### Threads ######################################################################################################### [1] id 0 from 0x0800420c in UART1_RxCpltCallback+0 at shared/drivers/p_serial_mgr.c:34 ### Variables ####################################################################################################### arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi… ##################################################################################################################### Continuing. ### Output/messages ################################################################################################# halted: PC: 0x0800420e Program received signal SIGINT, Interrupt. 0x0800423c in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:53 53 return b_go; ### Assembly ######################################################################################################## ~ ~ ~ 0x08004238 p_serial_mgr_service+0 ldr r3, [pc, #4] ; (0x8004240 ) 0x0800423a p_serial_mgr_service+2 ldrb r0, [r3, #0] 0x0800423c p_serial_mgr_service+4 bx lr 0x0800423e p_serial_mgr_service+6 nop 0x08004240 p_serial_mgr_service+8 lsrs r0, r5, #15 0x08004242 p_serial_mgr_service+10 movs r0, #0 ~ ### Breakpoints ##################################################################################################### [1] break at 0x0800420c in shared/drivers/p_serial_mgr.c:34 for UART1_RxCpltCallback hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x0800423c primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x00000000 r7 0x00000000 r12 0x00000000 fpscr 0x00000010 faultmask 0x00 r3 0x20000be8 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x00000014 r9 0x00000000 lr 0x080014f3 psp 0x00000000 ### Source ########################################################################################################## 43 bool p_serial_mgr_service(void) 44 { 45 // // this will be less garbage when i switch to a queue 46 // for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 47 // { 48 // if (serial_pkt_cb.buffer[ind].b_ready) 49 // { 50 // return &serial_pkt_cb.buffer[ind]; 51 // } 52 // } 53 return b_go; 54 } 55 56 void p_serial_mgr_start() 57 { 58 HAL_UART_Receive_IT(_serial_huart_inst, &rxc, 1); 59 b_go = false; 60 } ~ ~ ### Stack ########################################################################################################### [0] from 0x0800423c in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:53 [1] from 0x080014f2 in main+178 at Core/Src/main.c:139 ### Threads ######################################################################################################### [1] id 0 from 0x0800423c in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:53 ### Variables ####################################################################################################### ##################################################################################################################### $1 = false Breakpoint 2 at 0x80014f6: file Core/Src/main.c, line 141. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ################################################################################################# Breakpoint 1, UART1_RxCpltCallback (huart=0x20000a60 ) at shared/drivers/p_serial_mgr.c:34 34 b_go = true; ### Assembly ######################################################################################################## ~ ~ ~ ~ ~ !0x0800420c UART1_RxCpltCallback+0 ldr r3, [pc, #4] ; (0x8004214 ) 0x0800420e UART1_RxCpltCallback+2 movs r2, #1 0x08004210 UART1_RxCpltCallback+4 strb r2, [r3, #0] 0x08004212 UART1_RxCpltCallback+6 bx lr 0x08004214 UART1_RxCpltCallback+8 lsrs r0, r5, #15 ### Breakpoints ##################################################################################################### [1] break at 0x0800420c in shared/drivers/p_serial_mgr.c:34 for UART1_RxCpltCallback hit 1 time [2] break at 0x080014f6 in Core/Src/main.c:141 for main.c:141 ### Expressions ##################################################################################################### ### History ######################################################################################################### $$0 = false ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x20000a60 r5 0x00004001 r10 0x00000000 pc 0x0800420c primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00 r2 0x40013808 r7 0x00000000 r12 0x0000000c fpscr 0x00000010 faultmask 0x00 r3 0x0800420d r8 0x00000000 sp 0x2000fe68 msp 0x2000fe68 control 0x00 r4 0x20000a60 r9 0x00000000 lr 0x0800344f psp 0x00000000 ### Source ########################################################################################################## 24 SS_ESC = 3, // get byte, dont increment number left 25 SS_CHECKSUM = 4 // done 26 } serial_state_t; 27 28 static UART_HandleTypeDef *_serial_huart_inst = NULL; 29 30 static uint8_t rxc = '\0'; 31 static bool b_go = false; 32 void UART1_RxCpltCallback(UART_HandleTypeDef *huart) 33 { !34 b_go = true; 35 } 36 void p_serial_mgr_init(UART_HandleTypeDef *huart) 37 { 38 _serial_huart_inst = huart; 39 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback; 40 b_go = false; 41 } 42 43 bool p_serial_mgr_service(void) ### Stack ########################################################################################################### [0] from 0x0800420c in UART1_RxCpltCallback+0 at shared/drivers/p_serial_mgr.c:34 [1] from 0x0800344e in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430 [2] from 0x080035a0 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347 [3] from 0x08001544 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211 [4] from 0xffffffe9 [5] from 0x080014f4 in main+180 at Core/Src/main.c:139 ### Threads ######################################################################################################### [1] id 0 from 0x0800420c in UART1_RxCpltCallback+0 at shared/drivers/p_serial_mgr.c:34 ### Variables ####################################################################################################### arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi… ##################################################################################################################### Continuing. ### Output/messages ################################################################################################# halted: PC: 0x0800420e Breakpoint 2, main () at Core/Src/main.c:141 141 HAL_UART_Receive(&huart2, rxb, 256, 50); ### Assembly ######################################################################################################## 0x080014e6 main+166 bl 0x8004310 0x080014ea main+170 bl 0x8004244 0x080014ee main+174 bl 0x8004238 0x080014f2 main+178 cmp r0, #0 0x080014f4 main+180 beq.n 0x80014ee !0x080014f6 main+182 movs r3, #50 ; 0x32 0x080014f8 main+184 mov.w r2, #256 ; 0x100 0x080014fc main+188 mov r1, sp 0x080014fe main+190 ldr r0, [pc, #8] ; (0x8001508 ) 0x08001500 main+192 bl 0x8003d5e ### Breakpoints ##################################################################################################### [1] break at 0x0800420c in shared/drivers/p_serial_mgr.c:34 for UART1_RxCpltCallback hit 1 time [2] break at 0x080014f6 in Core/Src/main.c:141 for main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$0 = false ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000001 r5 0x200009c8 r10 0x00000000 pc 0x080014f6 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00 r2 0x2000fff0 r7 0x00000000 r12 0x0000000c fpscr 0x00000010 faultmask 0x00 r3 0x20000be8 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000 ### Source ########################################################################################################## 131 uint16_t motor_degrees = 0; 132 /* USER CODE END 2 */ 133 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { !141 HAL_UART_Receive(&huart2, rxb, 256, 50); 142 for (int ind = 0; ind < 20; ind++) 143 { 144 p_uart_async_write_byte(rxb[ind]); 145 } 146 PDEBUG("\n\n\n\n"); 147 memset(rxb, 0, 256); 148 p_serial_mgr_start(); 149 } 150 // if (b_timer_struck) ### Stack ########################################################################################################### [0] from 0x080014f6 in main+182 at Core/Src/main.c:141 ### Threads ######################################################################################################### [1] id 0 from 0x080014f6 in main+182 at Core/Src/main.c:141 ### Variables ####################################################################################################### loc rxb = '\000' ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x080014f8 halted: PC: 0x080014fc halted: PC: 0x080014fe halted: PC: 0x08001500 halted: PC: 0x08003d5e 142 for (int ind = 0; ind < 20; ind++) ### Assembly ######################################################################################################## !0x080014f6 main+182 movs r3, #50 ; 0x32 0x080014f8 main+184 mov.w r2, #256 ; 0x100 0x080014fc main+188 mov r1, sp 0x080014fe main+190 ldr r0, [pc, #8] ; (0x8001508 ) 0x08001500 main+192 bl 0x8003d5e 0x08001504 main+196 movs r4, #0 0x08001506 main+198 b.n 0x80014d4 0x08001508 main+200 lsrs r4, r2, #12 0x0800150a main+202 movs r0, #0 0x0800150c main+204 asrs r5, r6, #4 ### Breakpoints ##################################################################################################### [1] break at 0x0800420c in shared/drivers/p_serial_mgr.c:34 for UART1_RxCpltCallback hit 1 time [2] break at 0x080014f6 in Core/Src/main.c:141 for main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$0 = false ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000002 r5 0x200009c8 r10 0x00000000 pc 0x08001504 primask 0x00 r1 0x2000fef0 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00 r2 0x00000100 r7 0x00000000 r12 0x0000000c fpscr 0x00000010 faultmask 0x00 r3 0x00000022 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x20000b14 r9 0x00000000 lr 0x08001505 psp 0x00000000 ### Source ########################################################################################################## 132 /* USER CODE END 2 */ 133 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { !141 HAL_UART_Receive(&huart2, rxb, 256, 50); 142 for (int ind = 0; ind < 20; ind++) 143 { 144 p_uart_async_write_byte(rxb[ind]); 145 } 146 PDEBUG("\n\n\n\n"); 147 memset(rxb, 0, 256); 148 p_serial_mgr_start(); 149 } 150 // if (b_timer_struck) 151 // { ### Stack ########################################################################################################### [0] from 0x08001504 in main+196 at Core/Src/main.c:142 ### Threads ######################################################################################################### [1] id 0 from 0x08001504 in main+196 at Core/Src/main.c:142 ### Variables ####################################################################################################### loc ind = 0, rxb = '\000' ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x08001506 halted: PC: 0x080014d4 halted: PC: 0x080014d6 halted: PC: 0x080014ca 144 p_uart_async_write_byte(rxb[ind]); ### Assembly ######################################################################################################## 0x080014be main+126 str r1, [sp, #0] 0x080014c0 main+128 movs r2, #252 ; 0xfc 0x080014c2 main+130 add r0, sp, #4 0x080014c4 main+132 bl 0x8004310 0x080014c8 main+136 b.n 0x80014ee 0x080014ca main+138 ldrb.w r0, [sp, r4] 0x080014ce main+142 bl 0x80041d8 0x080014d2 main+146 adds r4, #1 0x080014d4 main+148 cmp r4, #19 0x080014d6 main+150 ble.n 0x80014ca ### Breakpoints ##################################################################################################### [1] break at 0x0800420c in shared/drivers/p_serial_mgr.c:34 for UART1_RxCpltCallback hit 1 time [2] break at 0x080014f6 in Core/Src/main.c:141 for main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$0 = false ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000002 r5 0x200009c8 r10 0x00000000 pc 0x080014ca primask 0x00 r1 0x2000fef0 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00 r2 0x00000100 r7 0x00000000 r12 0x0000000c fpscr 0x00000010 faultmask 0x00 r3 0x00000022 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x08001505 psp 0x00000000 ### Source ########################################################################################################## 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { !141 HAL_UART_Receive(&huart2, rxb, 256, 50); 142 for (int ind = 0; ind < 20; ind++) 143 { 144 p_uart_async_write_byte(rxb[ind]); 145 } 146 PDEBUG("\n\n\n\n"); 147 memset(rxb, 0, 256); 148 p_serial_mgr_start(); 149 } 150 // if (b_timer_struck) 151 // { 152 // // PDEBUG("%d\n", sys_time); 153 // b_timer_struck = false; ### Stack ########################################################################################################### [0] from 0x080014ca in main+138 at Core/Src/main.c:144 ### Threads ######################################################################################################### [1] id 0 from 0x080014ca in main+138 at Core/Src/main.c:144 ### Variables ####################################################################################################### loc ind = 0, rxb = '\000' ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x080014ce halted: PC: 0x080041d8 142 for (int ind = 0; ind < 20; ind++) ### Assembly ######################################################################################################## 0x080014c2 main+130 add r0, sp, #4 0x080014c4 main+132 bl 0x8004310 0x080014c8 main+136 b.n 0x80014ee 0x080014ca main+138 ldrb.w r0, [sp, r4] 0x080014ce main+142 bl 0x80041d8 0x080014d2 main+146 adds r4, #1 0x080014d4 main+148 cmp r4, #19 0x080014d6 main+150 ble.n 0x80014ca 0x080014d8 main+152 ldr r0, [pc, #68] ; (0x8001520 ) 0x080014da main+154 bl 0x800415c ### Breakpoints ##################################################################################################### [1] break at 0x0800420c in shared/drivers/p_serial_mgr.c:34 for UART1_RxCpltCallback hit 1 time [2] break at 0x080014f6 in Core/Src/main.c:141 for main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$0 = false ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014d2 primask 0x00 r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x210f0000 basepri 0x00 r2 0x006000d0 r7 0x00000000 r12 0x08009891 fpscr 0x00000010 faultmask 0x00 r3 0x00000020 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x08003be3 psp 0x00000000 ### Source ########################################################################################################## 132 /* USER CODE END 2 */ 133 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { !141 HAL_UART_Receive(&huart2, rxb, 256, 50); 142 for (int ind = 0; ind < 20; ind++) 143 { 144 p_uart_async_write_byte(rxb[ind]); 145 } 146 PDEBUG("\n\n\n\n"); 147 memset(rxb, 0, 256); 148 p_serial_mgr_start(); 149 } 150 // if (b_timer_struck) 151 // { ### Stack ########################################################################################################### [0] from 0x080014d2 in main+146 at Core/Src/main.c:142 ### Threads ######################################################################################################### [1] id 0 from 0x080014d2 in main+146 at Core/Src/main.c:142 ### Variables ####################################################################################################### loc ind = 0, rxb = '\000' ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x080014d4 halted: PC: 0x080014d6 halted: PC: 0x080014ca 144 p_uart_async_write_byte(rxb[ind]); ### Assembly ######################################################################################################## 0x080014be main+126 str r1, [sp, #0] 0x080014c0 main+128 movs r2, #252 ; 0xfc 0x080014c2 main+130 add r0, sp, #4 0x080014c4 main+132 bl 0x8004310 0x080014c8 main+136 b.n 0x80014ee 0x080014ca main+138 ldrb.w r0, [sp, r4] 0x080014ce main+142 bl 0x80041d8 0x080014d2 main+146 adds r4, #1 0x080014d4 main+148 cmp r4, #19 0x080014d6 main+150 ble.n 0x80014ca ### Breakpoints ##################################################################################################### [1] break at 0x0800420c in shared/drivers/p_serial_mgr.c:34 for UART1_RxCpltCallback hit 1 time [2] break at 0x080014f6 in Core/Src/main.c:141 for main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$0 = false ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014ca primask 0x00 r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x810f0000 basepri 0x00 r2 0x006000d0 r7 0x00000000 r12 0x08009891 fpscr 0x00000010 faultmask 0x00 r3 0x00000020 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x00000001 r9 0x00000000 lr 0x08003be3 psp 0x00000000 ### Source ########################################################################################################## 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { !141 HAL_UART_Receive(&huart2, rxb, 256, 50); 142 for (int ind = 0; ind < 20; ind++) 143 { 144 p_uart_async_write_byte(rxb[ind]); 145 } 146 PDEBUG("\n\n\n\n"); 147 memset(rxb, 0, 256); 148 p_serial_mgr_start(); 149 } 150 // if (b_timer_struck) 151 // { 152 // // PDEBUG("%d\n", sys_time); 153 // b_timer_struck = false; ### Stack ########################################################################################################### [0] from 0x080014ca in main+138 at Core/Src/main.c:144 ### Threads ######################################################################################################### [1] id 0 from 0x080014ca in main+138 at Core/Src/main.c:144 ### Variables ####################################################################################################### loc ind = 1, rxb = '\000' ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x080014ce halted: PC: 0x080041d8 142 for (int ind = 0; ind < 20; ind++) ### Assembly ######################################################################################################## 0x080014c2 main+130 add r0, sp, #4 0x080014c4 main+132 bl 0x8004310 0x080014c8 main+136 b.n 0x80014ee 0x080014ca main+138 ldrb.w r0, [sp, r4] 0x080014ce main+142 bl 0x80041d8 0x080014d2 main+146 adds r4, #1 0x080014d4 main+148 cmp r4, #19 0x080014d6 main+150 ble.n 0x80014ca 0x080014d8 main+152 ldr r0, [pc, #68] ; (0x8001520 ) 0x080014da main+154 bl 0x800415c ### Breakpoints ##################################################################################################### [1] break at 0x0800420c in shared/drivers/p_serial_mgr.c:34 for UART1_RxCpltCallback hit 1 time [2] break at 0x080014f6 in Core/Src/main.c:141 for main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$0 = false ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014d2 primask 0x00 r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x210f0000 basepri 0x00 r2 0x006000d0 r7 0x00000000 r12 0x08009891 fpscr 0x00000010 faultmask 0x00 r3 0x00000020 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x00000001 r9 0x00000000 lr 0x08003be3 psp 0x00000000 ### Source ########################################################################################################## 132 /* USER CODE END 2 */ 133 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { !141 HAL_UART_Receive(&huart2, rxb, 256, 50); 142 for (int ind = 0; ind < 20; ind++) 143 { 144 p_uart_async_write_byte(rxb[ind]); 145 } 146 PDEBUG("\n\n\n\n"); 147 memset(rxb, 0, 256); 148 p_serial_mgr_start(); 149 } 150 // if (b_timer_struck) 151 // { ### Stack ########################################################################################################### [0] from 0x080014d2 in main+146 at Core/Src/main.c:142 ### Threads ######################################################################################################### [1] id 0 from 0x080014d2 in main+146 at Core/Src/main.c:142 ### Variables ####################################################################################################### loc ind = 1, rxb = '\000' ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x080014d4 halted: PC: 0x080014d6 halted: PC: 0x080014ca 144 p_uart_async_write_byte(rxb[ind]); ### Assembly ######################################################################################################## 0x080014be main+126 str r1, [sp, #0] 0x080014c0 main+128 movs r2, #252 ; 0xfc 0x080014c2 main+130 add r0, sp, #4 0x080014c4 main+132 bl 0x8004310 0x080014c8 main+136 b.n 0x80014ee 0x080014ca main+138 ldrb.w r0, [sp, r4] 0x080014ce main+142 bl 0x80041d8 0x080014d2 main+146 adds r4, #1 0x080014d4 main+148 cmp r4, #19 0x080014d6 main+150 ble.n 0x80014ca ### Breakpoints ##################################################################################################### [1] break at 0x0800420c in shared/drivers/p_serial_mgr.c:34 for UART1_RxCpltCallback hit 1 time [2] break at 0x080014f6 in Core/Src/main.c:141 for main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$0 = false ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014ca primask 0x00 r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x810f0000 basepri 0x00 r2 0x006000d0 r7 0x00000000 r12 0x08009891 fpscr 0x00000010 faultmask 0x00 r3 0x00000020 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x00000002 r9 0x00000000 lr 0x08003be3 psp 0x00000000 ### Source ########################################################################################################## 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { !141 HAL_UART_Receive(&huart2, rxb, 256, 50); 142 for (int ind = 0; ind < 20; ind++) 143 { 144 p_uart_async_write_byte(rxb[ind]); 145 } 146 PDEBUG("\n\n\n\n"); 147 memset(rxb, 0, 256); 148 p_serial_mgr_start(); 149 } 150 // if (b_timer_struck) 151 // { 152 // // PDEBUG("%d\n", sys_time); 153 // b_timer_struck = false; ### Stack ########################################################################################################### [0] from 0x080014ca in main+138 at Core/Src/main.c:144 ### Threads ######################################################################################################### [1] id 0 from 0x080014ca in main+138 at Core/Src/main.c:144 ### Variables ####################################################################################################### loc ind = 2, rxb = '\000' ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x080014ce halted: PC: 0x080041d8 p_uart_async_write_byte (byte=0 '\000') at shared/util/putil.c:34 34 { ### Assembly ######################################################################################################## ~ ~ ~ ~ ~ 0x080041d8 p_uart_async_write_byte+0 push {r4, lr} 0x080041da p_uart_async_write_byte+2 sub sp, #8 0x080041dc p_uart_async_write_byte+4 ldr r4, [pc, #32] ; (0x8004200 ) 0x080041de p_uart_async_write_byte+6 str r0, [sp, #0] 0x080041e0 p_uart_async_write_byte+8 ldr r3, [pc, #32] ; (0x8004204 ) ### Breakpoints ##################################################################################################### [1] break at 0x0800420c in shared/drivers/p_serial_mgr.c:34 for UART1_RxCpltCallback hit 1 time [2] break at 0x080014f6 in Core/Src/main.c:141 for main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$0 = false ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080041d8 primask 0x00 r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x810f0000 basepri 0x00 r2 0x006000d0 r7 0x00000000 r12 0x08009891 fpscr 0x00000010 faultmask 0x00 r3 0x00000020 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x00000002 r9 0x00000000 lr 0x080014d3 psp 0x00000000 ### Source ########################################################################################################## 24 HAL_UART_Transmit(huart_inst, printf_buffer, strlen(printf_buffer), 100); 25 return 0; 26 } 27 void p_uart_init(UART_HandleTypeDef *huart) 28 { 29 huart_inst = huart; 30 PDEBUG("...\n"); 31 PDEBUG("UART2 Initialized\n"); 32 } 33 void p_uart_async_write_byte(uint8_t byte) 34 { 35 sprintf(send, "%02x\n", byte); 36 HAL_UART_Transmit(huart_inst, send, 3, 100); 37 } ~ ~ ~ ~ ~ ~ ### Stack ########################################################################################################### [0] from 0x080041d8 in p_uart_async_write_byte+0 at shared/util/putil.c:34 [1] from 0x080014d2 in main+146 at Core/Src/main.c:144 ### Threads ######################################################################################################### [1] id 0 from 0x080041d8 in p_uart_async_write_byte+0 at shared/util/putil.c:34 ### Variables ####################################################################################################### arg byte = 0 '\000' ##################################################################################################################### #0 p_uart_async_write_byte (byte=0 '\000') at shared/util/putil.c:34 34 { Run till exit from #0 p_uart_async_write_byte (byte=0 '\000') at shared/util/putil.c:34 ### Output/messages ################################################################################################# main () at Core/Src/main.c:142 142 for (int ind = 0; ind < 20; ind++) ### Assembly ######################################################################################################## 0x080014c2 main+130 add r0, sp, #4 0x080014c4 main+132 bl 0x8004310 0x080014c8 main+136 b.n 0x80014ee 0x080014ca main+138 ldrb.w r0, [sp, r4] 0x080014ce main+142 bl 0x80041d8 0x080014d2 main+146 adds r4, #1 0x080014d4 main+148 cmp r4, #19 0x080014d6 main+150 ble.n 0x80014ca 0x080014d8 main+152 ldr r0, [pc, #68] ; (0x8001520 ) 0x080014da main+154 bl 0x800415c ### Breakpoints ##################################################################################################### [1] break at 0x0800420c in shared/drivers/p_serial_mgr.c:34 for UART1_RxCpltCallback hit 1 time [2] break at 0x080014f6 in Core/Src/main.c:141 for main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$0 = false ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014d2 primask 0x00 r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x210f0000 basepri 0x00 r2 0x006000d0 r7 0x00000000 r12 0x08009891 fpscr 0x00000010 faultmask 0x00 r3 0x00000020 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x00000002 r9 0x00000000 lr 0x08003be3 psp 0x00000000 ### Source ########################################################################################################## 132 /* USER CODE END 2 */ 133 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { !141 HAL_UART_Receive(&huart2, rxb, 256, 50); 142 for (int ind = 0; ind < 20; ind++) 143 { 144 p_uart_async_write_byte(rxb[ind]); 145 } 146 PDEBUG("\n\n\n\n"); 147 memset(rxb, 0, 256); 148 p_serial_mgr_start(); 149 } 150 // if (b_timer_struck) 151 // { ### Stack ########################################################################################################### [0] from 0x080014d2 in main+146 at Core/Src/main.c:142 ### Threads ######################################################################################################### [1] id 0 from 0x080014d2 in main+146 at Core/Src/main.c:142 ### Variables ####################################################################################################### loc ind = 2, rxb = '\000' ##################################################################################################################### "finish" not meaningful in the outermost frame. ### Output/messages ################################################################################################# halted: PC: 0x080014d4 halted: PC: 0x080014d6 halted: PC: 0x080014ca 144 p_uart_async_write_byte(rxb[ind]); ### Assembly ######################################################################################################## 0x080014be main+126 str r1, [sp, #0] 0x080014c0 main+128 movs r2, #252 ; 0xfc 0x080014c2 main+130 add r0, sp, #4 0x080014c4 main+132 bl 0x8004310 0x080014c8 main+136 b.n 0x80014ee 0x080014ca main+138 ldrb.w r0, [sp, r4] 0x080014ce main+142 bl 0x80041d8 0x080014d2 main+146 adds r4, #1 0x080014d4 main+148 cmp r4, #19 0x080014d6 main+150 ble.n 0x80014ca ### Breakpoints ##################################################################################################### [1] break at 0x0800420c in shared/drivers/p_serial_mgr.c:34 for UART1_RxCpltCallback hit 1 time [2] break at 0x080014f6 in Core/Src/main.c:141 for main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$0 = false ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014ca primask 0x00 r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x810f0000 basepri 0x00 r2 0x006000d0 r7 0x00000000 r12 0x08009891 fpscr 0x00000010 faultmask 0x00 r3 0x00000020 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x00000003 r9 0x00000000 lr 0x08003be3 psp 0x00000000 ### Source ########################################################################################################## 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { !141 HAL_UART_Receive(&huart2, rxb, 256, 50); 142 for (int ind = 0; ind < 20; ind++) 143 { 144 p_uart_async_write_byte(rxb[ind]); 145 } 146 PDEBUG("\n\n\n\n"); 147 memset(rxb, 0, 256); 148 p_serial_mgr_start(); 149 } 150 // if (b_timer_struck) 151 // { 152 // // PDEBUG("%d\n", sys_time); 153 // b_timer_struck = false; ### Stack ########################################################################################################### [0] from 0x080014ca in main+138 at Core/Src/main.c:144 ### Threads ######################################################################################################### [1] id 0 from 0x080014ca in main+138 at Core/Src/main.c:144 ### Variables ####################################################################################################### loc ind = 3, rxb = '\000' ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x080014ce halted: PC: 0x080041d8 142 for (int ind = 0; ind < 20; ind++) ### Assembly ######################################################################################################## 0x080014c2 main+130 add r0, sp, #4 0x080014c4 main+132 bl 0x8004310 0x080014c8 main+136 b.n 0x80014ee 0x080014ca main+138 ldrb.w r0, [sp, r4] 0x080014ce main+142 bl 0x80041d8 0x080014d2 main+146 adds r4, #1 0x080014d4 main+148 cmp r4, #19 0x080014d6 main+150 ble.n 0x80014ca 0x080014d8 main+152 ldr r0, [pc, #68] ; (0x8001520 ) 0x080014da main+154 bl 0x800415c ### Breakpoints ##################################################################################################### [1] break at 0x0800420c in shared/drivers/p_serial_mgr.c:34 for UART1_RxCpltCallback hit 1 time [2] break at 0x080014f6 in Core/Src/main.c:141 for main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$0 = false ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014d2 primask 0x00 r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x210f0000 basepri 0x00 r2 0x006000d0 r7 0x00000000 r12 0x08009891 fpscr 0x00000010 faultmask 0x00 r3 0x00000020 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x00000003 r9 0x00000000 lr 0x08003be3 psp 0x00000000 ### Source ########################################################################################################## 132 /* USER CODE END 2 */ 133 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { !141 HAL_UART_Receive(&huart2, rxb, 256, 50); 142 for (int ind = 0; ind < 20; ind++) 143 { 144 p_uart_async_write_byte(rxb[ind]); 145 } 146 PDEBUG("\n\n\n\n"); 147 memset(rxb, 0, 256); 148 p_serial_mgr_start(); 149 } 150 // if (b_timer_struck) 151 // { ### Stack ########################################################################################################### [0] from 0x080014d2 in main+146 at Core/Src/main.c:142 ### Threads ######################################################################################################### [1] id 0 from 0x080014d2 in main+146 at Core/Src/main.c:142 ### Variables ####################################################################################################### loc ind = 3, rxb = '\000' ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x080014d4 halted: PC: 0x080014d6 halted: PC: 0x080014ca 144 p_uart_async_write_byte(rxb[ind]); ### Assembly ######################################################################################################## 0x080014be main+126 str r1, [sp, #0] 0x080014c0 main+128 movs r2, #252 ; 0xfc 0x080014c2 main+130 add r0, sp, #4 0x080014c4 main+132 bl 0x8004310 0x080014c8 main+136 b.n 0x80014ee 0x080014ca main+138 ldrb.w r0, [sp, r4] 0x080014ce main+142 bl 0x80041d8 0x080014d2 main+146 adds r4, #1 0x080014d4 main+148 cmp r4, #19 0x080014d6 main+150 ble.n 0x80014ca ### Breakpoints ##################################################################################################### [1] break at 0x0800420c in shared/drivers/p_serial_mgr.c:34 for UART1_RxCpltCallback hit 1 time [2] break at 0x080014f6 in Core/Src/main.c:141 for main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$0 = false ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014ca primask 0x00 r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x810f0000 basepri 0x00 r2 0x006000d0 r7 0x00000000 r12 0x08009891 fpscr 0x00000010 faultmask 0x00 r3 0x00000020 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x00000004 r9 0x00000000 lr 0x08003be3 psp 0x00000000 ### Source ########################################################################################################## 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { !141 HAL_UART_Receive(&huart2, rxb, 256, 50); 142 for (int ind = 0; ind < 20; ind++) 143 { 144 p_uart_async_write_byte(rxb[ind]); 145 } 146 PDEBUG("\n\n\n\n"); 147 memset(rxb, 0, 256); 148 p_serial_mgr_start(); 149 } 150 // if (b_timer_struck) 151 // { 152 // // PDEBUG("%d\n", sys_time); 153 // b_timer_struck = false; ### Stack ########################################################################################################### [0] from 0x080014ca in main+138 at Core/Src/main.c:144 ### Threads ######################################################################################################### [1] id 0 from 0x080014ca in main+138 at Core/Src/main.c:144 ### Variables ####################################################################################################### loc ind = 4, rxb = '\000' ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x080014ce halted: PC: 0x080041d8 142 for (int ind = 0; ind < 20; ind++) ### Assembly ######################################################################################################## 0x080014c2 main+130 add r0, sp, #4 0x080014c4 main+132 bl 0x8004310 0x080014c8 main+136 b.n 0x80014ee 0x080014ca main+138 ldrb.w r0, [sp, r4] 0x080014ce main+142 bl 0x80041d8 0x080014d2 main+146 adds r4, #1 0x080014d4 main+148 cmp r4, #19 0x080014d6 main+150 ble.n 0x80014ca 0x080014d8 main+152 ldr r0, [pc, #68] ; (0x8001520 ) 0x080014da main+154 bl 0x800415c ### Breakpoints ##################################################################################################### [1] break at 0x0800420c in shared/drivers/p_serial_mgr.c:34 for UART1_RxCpltCallback hit 1 time [2] break at 0x080014f6 in Core/Src/main.c:141 for main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$0 = false ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014d2 primask 0x00 r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x210f0000 basepri 0x00 r2 0x006000d0 r7 0x00000000 r12 0x08009891 fpscr 0x00000010 faultmask 0x00 r3 0x00000020 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x00000004 r9 0x00000000 lr 0x08003be3 psp 0x00000000 ### Source ########################################################################################################## 132 /* USER CODE END 2 */ 133 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { !141 HAL_UART_Receive(&huart2, rxb, 256, 50); 142 for (int ind = 0; ind < 20; ind++) 143 { 144 p_uart_async_write_byte(rxb[ind]); 145 } 146 PDEBUG("\n\n\n\n"); 147 memset(rxb, 0, 256); 148 p_serial_mgr_start(); 149 } 150 // if (b_timer_struck) 151 // { ### Stack ########################################################################################################### [0] from 0x080014d2 in main+146 at Core/Src/main.c:142 ### Threads ######################################################################################################### [1] id 0 from 0x080014d2 in main+146 at Core/Src/main.c:142 ### Variables ####################################################################################################### loc ind = 4, rxb = '\000' ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x080014d4 halted: PC: 0x080014d6 halted: PC: 0x080014ca 144 p_uart_async_write_byte(rxb[ind]); ### Assembly ######################################################################################################## 0x080014be main+126 str r1, [sp, #0] 0x080014c0 main+128 movs r2, #252 ; 0xfc 0x080014c2 main+130 add r0, sp, #4 0x080014c4 main+132 bl 0x8004310 0x080014c8 main+136 b.n 0x80014ee 0x080014ca main+138 ldrb.w r0, [sp, r4] 0x080014ce main+142 bl 0x80041d8 0x080014d2 main+146 adds r4, #1 0x080014d4 main+148 cmp r4, #19 0x080014d6 main+150 ble.n 0x80014ca ### Breakpoints ##################################################################################################### [1] break at 0x0800420c in shared/drivers/p_serial_mgr.c:34 for UART1_RxCpltCallback hit 1 time [2] break at 0x080014f6 in Core/Src/main.c:141 for main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$0 = false ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014ca primask 0x00 r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x810f0000 basepri 0x00 r2 0x006000d0 r7 0x00000000 r12 0x08009891 fpscr 0x00000010 faultmask 0x00 r3 0x00000020 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x00000005 r9 0x00000000 lr 0x08003be3 psp 0x00000000 ### Source ########################################################################################################## 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { !141 HAL_UART_Receive(&huart2, rxb, 256, 50); 142 for (int ind = 0; ind < 20; ind++) 143 { 144 p_uart_async_write_byte(rxb[ind]); 145 } 146 PDEBUG("\n\n\n\n"); 147 memset(rxb, 0, 256); 148 p_serial_mgr_start(); 149 } 150 // if (b_timer_struck) 151 // { 152 // // PDEBUG("%d\n", sys_time); 153 // b_timer_struck = false; ### Stack ########################################################################################################### [0] from 0x080014ca in main+138 at Core/Src/main.c:144 ### Threads ######################################################################################################### [1] id 0 from 0x080014ca in main+138 at Core/Src/main.c:144 ### Variables ####################################################################################################### loc ind = 5, rxb = '\000' ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x080014ce halted: PC: 0x080041d8 142 for (int ind = 0; ind < 20; ind++) ### Assembly ######################################################################################################## 0x080014c2 main+130 add r0, sp, #4 0x080014c4 main+132 bl 0x8004310 0x080014c8 main+136 b.n 0x80014ee 0x080014ca main+138 ldrb.w r0, [sp, r4] 0x080014ce main+142 bl 0x80041d8 0x080014d2 main+146 adds r4, #1 0x080014d4 main+148 cmp r4, #19 0x080014d6 main+150 ble.n 0x80014ca 0x080014d8 main+152 ldr r0, [pc, #68] ; (0x8001520 ) 0x080014da main+154 bl 0x800415c ### Breakpoints ##################################################################################################### [1] break at 0x0800420c in shared/drivers/p_serial_mgr.c:34 for UART1_RxCpltCallback hit 1 time [2] break at 0x080014f6 in Core/Src/main.c:141 for main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$0 = false ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014d2 primask 0x00 r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x210f0000 basepri 0x00 r2 0x006000d0 r7 0x00000000 r12 0x08009891 fpscr 0x00000010 faultmask 0x00 r3 0x00000020 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x00000005 r9 0x00000000 lr 0x08003be3 psp 0x00000000 ### Source ########################################################################################################## 132 /* USER CODE END 2 */ 133 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { !141 HAL_UART_Receive(&huart2, rxb, 256, 50); 142 for (int ind = 0; ind < 20; ind++) 143 { 144 p_uart_async_write_byte(rxb[ind]); 145 } 146 PDEBUG("\n\n\n\n"); 147 memset(rxb, 0, 256); 148 p_serial_mgr_start(); 149 } 150 // if (b_timer_struck) 151 // { ### Stack ########################################################################################################### [0] from 0x080014d2 in main+146 at Core/Src/main.c:142 ### Threads ######################################################################################################### [1] id 0 from 0x080014d2 in main+146 at Core/Src/main.c:142 ### Variables ####################################################################################################### loc ind = 5, rxb = '\000' ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x080014d4 halted: PC: 0x080014d6 halted: PC: 0x080014ca 144 p_uart_async_write_byte(rxb[ind]); ### Assembly ######################################################################################################## 0x080014be main+126 str r1, [sp, #0] 0x080014c0 main+128 movs r2, #252 ; 0xfc 0x080014c2 main+130 add r0, sp, #4 0x080014c4 main+132 bl 0x8004310 0x080014c8 main+136 b.n 0x80014ee 0x080014ca main+138 ldrb.w r0, [sp, r4] 0x080014ce main+142 bl 0x80041d8 0x080014d2 main+146 adds r4, #1 0x080014d4 main+148 cmp r4, #19 0x080014d6 main+150 ble.n 0x80014ca ### Breakpoints ##################################################################################################### [1] break at 0x0800420c in shared/drivers/p_serial_mgr.c:34 for UART1_RxCpltCallback hit 1 time [2] break at 0x080014f6 in Core/Src/main.c:141 for main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$0 = false ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014ca primask 0x00 r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x810f0000 basepri 0x00 r2 0x006000d0 r7 0x00000000 r12 0x08009891 fpscr 0x00000010 faultmask 0x00 r3 0x00000020 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x00000006 r9 0x00000000 lr 0x08003be3 psp 0x00000000 ### Source ########################################################################################################## 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { !141 HAL_UART_Receive(&huart2, rxb, 256, 50); 142 for (int ind = 0; ind < 20; ind++) 143 { 144 p_uart_async_write_byte(rxb[ind]); 145 } 146 PDEBUG("\n\n\n\n"); 147 memset(rxb, 0, 256); 148 p_serial_mgr_start(); 149 } 150 // if (b_timer_struck) 151 // { 152 // // PDEBUG("%d\n", sys_time); 153 // b_timer_struck = false; ### Stack ########################################################################################################### [0] from 0x080014ca in main+138 at Core/Src/main.c:144 ### Threads ######################################################################################################### [1] id 0 from 0x080014ca in main+138 at Core/Src/main.c:144 ### Variables ####################################################################################################### loc ind = 6, rxb = '\000' ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x080014ce halted: PC: 0x080041d8 142 for (int ind = 0; ind < 20; ind++) ### Assembly ######################################################################################################## 0x080014c2 main+130 add r0, sp, #4 0x080014c4 main+132 bl 0x8004310 0x080014c8 main+136 b.n 0x80014ee 0x080014ca main+138 ldrb.w r0, [sp, r4] 0x080014ce main+142 bl 0x80041d8 0x080014d2 main+146 adds r4, #1 0x080014d4 main+148 cmp r4, #19 0x080014d6 main+150 ble.n 0x80014ca 0x080014d8 main+152 ldr r0, [pc, #68] ; (0x8001520 ) 0x080014da main+154 bl 0x800415c ### Breakpoints ##################################################################################################### [1] break at 0x0800420c in shared/drivers/p_serial_mgr.c:34 for UART1_RxCpltCallback hit 1 time [2] break at 0x080014f6 in Core/Src/main.c:141 for main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$0 = false ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014d2 primask 0x00 r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x210f0000 basepri 0x00 r2 0x006000d0 r7 0x00000000 r12 0x08009891 fpscr 0x00000010 faultmask 0x00 r3 0x00000020 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x00000006 r9 0x00000000 lr 0x08003be3 psp 0x00000000 ### Source ########################################################################################################## 132 /* USER CODE END 2 */ 133 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { !141 HAL_UART_Receive(&huart2, rxb, 256, 50); 142 for (int ind = 0; ind < 20; ind++) 143 { 144 p_uart_async_write_byte(rxb[ind]); 145 } 146 PDEBUG("\n\n\n\n"); 147 memset(rxb, 0, 256); 148 p_serial_mgr_start(); 149 } 150 // if (b_timer_struck) 151 // { ### Stack ########################################################################################################### [0] from 0x080014d2 in main+146 at Core/Src/main.c:142 ### Threads ######################################################################################################### [1] id 0 from 0x080014d2 in main+146 at Core/Src/main.c:142 ### Variables ####################################################################################################### loc ind = 6, rxb = '\000' ##################################################################################################################### "finish" not meaningful in the outermost frame. ### Output/messages ################################################################################################# halted: PC: 0x080014d4 halted: PC: 0x080014d6 halted: PC: 0x080014ca 144 p_uart_async_write_byte(rxb[ind]); ### Assembly ######################################################################################################## 0x080014be main+126 str r1, [sp, #0] 0x080014c0 main+128 movs r2, #252 ; 0xfc 0x080014c2 main+130 add r0, sp, #4 0x080014c4 main+132 bl 0x8004310 0x080014c8 main+136 b.n 0x80014ee 0x080014ca main+138 ldrb.w r0, [sp, r4] 0x080014ce main+142 bl 0x80041d8 0x080014d2 main+146 adds r4, #1 0x080014d4 main+148 cmp r4, #19 0x080014d6 main+150 ble.n 0x80014ca ### Breakpoints ##################################################################################################### [1] break at 0x0800420c in shared/drivers/p_serial_mgr.c:34 for UART1_RxCpltCallback hit 1 time [2] break at 0x080014f6 in Core/Src/main.c:141 for main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$0 = false ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014ca primask 0x00 r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x810f0000 basepri 0x00 r2 0x006000d0 r7 0x00000000 r12 0x08009891 fpscr 0x00000010 faultmask 0x00 r3 0x00000020 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x00000007 r9 0x00000000 lr 0x08003be3 psp 0x00000000 ### Source ########################################################################################################## 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { !141 HAL_UART_Receive(&huart2, rxb, 256, 50); 142 for (int ind = 0; ind < 20; ind++) 143 { 144 p_uart_async_write_byte(rxb[ind]); 145 } 146 PDEBUG("\n\n\n\n"); 147 memset(rxb, 0, 256); 148 p_serial_mgr_start(); 149 } 150 // if (b_timer_struck) 151 // { 152 // // PDEBUG("%d\n", sys_time); 153 // b_timer_struck = false; ### Stack ########################################################################################################### [0] from 0x080014ca in main+138 at Core/Src/main.c:144 ### Threads ######################################################################################################### [1] id 0 from 0x080014ca in main+138 at Core/Src/main.c:144 ### Variables ####################################################################################################### loc ind = 7, rxb = '\000' ##################################################################################################################### "finish" not meaningful in the outermost frame. Not stopped at any breakpoint; argument ignored. Continuing. ### Output/messages ################################################################################################# Program received signal SIGINT, Interrupt. 0x0800423c in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:53 53 return b_go; ### Assembly ######################################################################################################## ~ ~ ~ 0x08004238 p_serial_mgr_service+0 ldr r3, [pc, #4] ; (0x8004240 ) 0x0800423a p_serial_mgr_service+2 ldrb r0, [r3, #0] 0x0800423c p_serial_mgr_service+4 bx lr 0x0800423e p_serial_mgr_service+6 nop 0x08004240 p_serial_mgr_service+8 lsrs r0, r5, #15 0x08004242 p_serial_mgr_service+10 movs r0, #0 ~ ### Breakpoints ##################################################################################################### [1] break at 0x0800420c in shared/drivers/p_serial_mgr.c:34 for UART1_RxCpltCallback hit 1 time [2] break at 0x080014f6 in Core/Src/main.c:141 for main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$0 = false ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x0800423c primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x00000000 r7 0x00000000 r12 0x00000000 fpscr 0x00000010 faultmask 0x00 r3 0x20000be8 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x00000014 r9 0x00000000 lr 0x080014f3 psp 0x00000000 ### Source ########################################################################################################## 43 bool p_serial_mgr_service(void) 44 { 45 // // this will be less garbage when i switch to a queue 46 // for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 47 // { 48 // if (serial_pkt_cb.buffer[ind].b_ready) 49 // { 50 // return &serial_pkt_cb.buffer[ind]; 51 // } 52 // } 53 return b_go; 54 } 55 56 void p_serial_mgr_start() 57 { 58 HAL_UART_Receive_IT(_serial_huart_inst, &rxc, 1); 59 b_go = false; 60 } ~ ~ ### Stack ########################################################################################################### [0] from 0x0800423c in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:53 [1] from 0x080014f2 in main+178 at Core/Src/main.c:139 ### Threads ######################################################################################################### [1] id 0 from 0x0800423c in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:53 ### Variables ####################################################################################################### ##################################################################################################################### $2 = false Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] 0x0800423c in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:53 53 return b_go; ### Assembly ######################################################################################################## ~ ~ ~ 0x08004238 p_serial_mgr_service+0 ldr r3, [pc, #4] ; (0x8004240 ) 0x0800423a p_serial_mgr_service+2 ldrb r0, [r3, #0] 0x0800423c p_serial_mgr_service+4 bx lr 0x0800423e p_serial_mgr_service+6 nop 0x08004240 p_serial_mgr_service+8 lsrs r0, r5, #15 0x08004242 p_serial_mgr_service+10 movs r0, #0 ~ ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x0800423c primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x00000000 r7 0x00000000 r12 0x00000000 fpscr 0x00000010 faultmask 0x00 r3 0x20000be8 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x00000014 r9 0x00000000 lr 0x080014f3 psp 0x00000000 ### Source ########################################################################################################## 43 bool p_serial_mgr_service(void) 44 { 45 // // this will be less garbage when i switch to a queue 46 // for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 47 // { 48 // if (serial_pkt_cb.buffer[ind].b_ready) 49 // { 50 // return &serial_pkt_cb.buffer[ind]; 51 // } 52 // } 53 return b_go; 54 } 55 56 void p_serial_mgr_start() 57 { 58 b_go = false; 59 HAL_UART_Receive_IT(_serial_huart_inst, &rxc, 1); 60 } ~ ~ ### Stack ########################################################################################################### [0] from 0x0800423c in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:53 [1] from 0x080014f2 in main+178 at Core/Src/main.c:139 ### Threads ######################################################################################################### [1] id 0 from 0x0800423c in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:53 ### Variables ####################################################################################################### ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9660 lma 0x80001c0 Loading section .rodata, size 0x480 lma 0x8009820 Loading section .ARM, size 0x8 lma 0x8009ca0 Loading section .init_array, size 0x8 lma 0x8009ca8 Loading section .fini_array, size 0x8 lma 0x8009cb0 Loading section .data, size 0x9a8 lma 0x8009cb8 Start address 0x08004274, load size 42544 Transfer rate: 29 KB/sec, 4727 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] main () at Core/Src/main.c:139 139 if (p_serial_mgr_service()) ### Assembly ######################################################################################################## 0x080014de main+158 mov.w r2, #256 ; 0x100 0x080014e2 main+162 movs r1, #0 0x080014e4 main+164 mov r0, sp 0x080014e6 main+166 bl 0x8004310 0x080014ea main+170 bl 0x8004244 0x080014ee main+174 bl 0x8004238 0x080014f2 main+178 cmp r0, #0 0x080014f4 main+180 beq.n 0x80014ee 0x080014f6 main+182 movs r3, #50 ; 0x32 0x080014f8 main+184 mov.w r2, #256 ; 0x100 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014ee primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x40013800 r7 0x00000000 r12 0x00000000 fpscr 0x00000010 faultmask 0x00 r3 0x20000be8 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x00000014 r9 0x00000000 lr 0x080014f3 psp 0x00000000 ### Source ########################################################################################################## 129 p_serial_mgr_start(); 130 131 uint16_t motor_degrees = 0; 132 /* USER CODE END 2 */ 133 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { 141 HAL_StatusTypeDef ret = HAL_UART_Receive(&huart2, rxb, 256, 50); 142 143 for (int ind = 0; ind < 20; ind++) 144 { 145 p_uart_async_write_byte(rxb[ind]); 146 } 147 PDEBUG("\n\n\n\n"); 148 memset(rxb, 0, 256); ### Stack ########################################################################################################### [0] from 0x080014ee in main+174 at Core/Src/main.c:139 ### Threads ######################################################################################################### [1] id 0 from 0x080014ee in main+174 at Core/Src/main.c:139 ### Variables ####################################################################################################### loc rxb = '\000' ##################################################################################################################### Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz target halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x08004274 msp: 0x20010000 Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9660 lma 0x80001c0 Loading section .rodata, size 0x480 lma 0x8009820 Loading section .ARM, size 0x8 lma 0x8009ca0 Loading section .init_array, size 0x8 lma 0x8009ca8 Loading section .fini_array, size 0x8 lma 0x8009cb0 Loading section .data, size 0x9a8 lma 0x8009cb8 Start address 0x08004274, load size 42544 Transfer rate: 29 KB/sec, 4727 bytes/write. Breakpoint 1 at 0x80014f6: file Core/Src/main.c, line 141. Note: automatically using hardware breakpoints for read-only addresses. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ################################################################################################# Breakpoint 1, main () at Core/Src/main.c:141 141 HAL_StatusTypeDef ret = HAL_UART_Receive(&huart2, rxb, 256, 50); ### Assembly ######################################################################################################## 0x080014e6 main+166 bl 0x8004310 0x080014ea main+170 bl 0x8004244 0x080014ee main+174 bl 0x8004238 0x080014f2 main+178 cmp r0, #0 0x080014f4 main+180 beq.n 0x80014ee !0x080014f6 main+182 movs r3, #50 ; 0x32 0x080014f8 main+184 mov.w r2, #256 ; 0x100 0x080014fc main+188 mov r1, sp 0x080014fe main+190 ldr r0, [pc, #8] ; (0x8001508 ) 0x08001500 main+192 bl 0x8003d5e ### Breakpoints ##################################################################################################### [1] break at 0x080014f6 in Core/Src/main.c:141 for /storage/Shared/Projects/Penguinator/motor_controller/Core/Src/main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000001 r5 0x200009c8 r10 0x00000000 pc 0x080014f6 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00 r2 0x2000fff0 r7 0x00000000 r12 0x0000000c fpscr 0x00000010 faultmask 0x00 r3 0x20000be8 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000 ### Source ########################################################################################################## 131 uint16_t motor_degrees = 0; 132 /* USER CODE END 2 */ 133 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { !141 HAL_StatusTypeDef ret = HAL_UART_Receive(&huart2, rxb, 256, 50); 142 143 for (int ind = 0; ind < 20; ind++) 144 { 145 p_uart_async_write_byte(rxb[ind]); 146 } 147 PDEBUG("\n\n\n\n"); 148 memset(rxb, 0, 256); 149 p_serial_mgr_start(); 150 } ### Stack ########################################################################################################### [0] from 0x080014f6 in main+182 at Core/Src/main.c:141 ### Threads ######################################################################################################### [1] id 0 from 0x080014f6 in main+182 at Core/Src/main.c:141 ### Variables ####################################################################################################### loc rxb = '\000' ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x080014f8 halted: PC: 0x080014fc halted: PC: 0x080014fe halted: PC: 0x08001500 halted: PC: 0x08003d5e 143 for (int ind = 0; ind < 20; ind++) ### Assembly ######################################################################################################## !0x080014f6 main+182 movs r3, #50 ; 0x32 0x080014f8 main+184 mov.w r2, #256 ; 0x100 0x080014fc main+188 mov r1, sp 0x080014fe main+190 ldr r0, [pc, #8] ; (0x8001508 ) 0x08001500 main+192 bl 0x8003d5e 0x08001504 main+196 movs r4, #0 0x08001506 main+198 b.n 0x80014d4 0x08001508 main+200 lsrs r4, r2, #12 0x0800150a main+202 movs r0, #0 0x0800150c main+204 asrs r5, r6, #4 ### Breakpoints ##################################################################################################### [1] break at 0x080014f6 in Core/Src/main.c:141 for /storage/Shared/Projects/Penguinator/motor_controller/Core/Src/main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000002 r5 0x200009c8 r10 0x00000000 pc 0x08001504 primask 0x00 r1 0x2000fef0 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00 r2 0x00000100 r7 0x00000000 r12 0x0000000c fpscr 0x00000010 faultmask 0x00 r3 0x00000022 r8 0x00000000 sp 0x2000fef0 msp 0x2000fef0 control 0x04 r4 0x20000b14 r9 0x00000000 lr 0x08001505 psp 0x00000000 ### Source ########################################################################################################## 133 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { !141 HAL_StatusTypeDef ret = HAL_UART_Receive(&huart2, rxb, 256, 50); 142 143 for (int ind = 0; ind < 20; ind++) 144 { 145 p_uart_async_write_byte(rxb[ind]); 146 } 147 PDEBUG("\n\n\n\n"); 148 memset(rxb, 0, 256); 149 p_serial_mgr_start(); 150 } 151 // if (b_timer_struck) 152 // { ### Stack ########################################################################################################### [0] from 0x08001504 in main+196 at Core/Src/main.c:143 ### Threads ######################################################################################################### [1] id 0 from 0x08001504 in main+196 at Core/Src/main.c:143 ### Variables ####################################################################################################### loc ind = 0, rxb = '\000' ##################################################################################################################### $1 = `/storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf' has changed; re-reading symbols. Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9660 lma 0x80001c0 Loading section .rodata, size 0x480 lma 0x8009820 Loading section .ARM, size 0x8 lma 0x8009ca0 Loading section .init_array, size 0x8 lma 0x8009ca8 Loading section .fini_array, size 0x8 lma 0x8009cb0 Loading section .data, size 0x9a8 lma 0x8009cb8 Start address 0x08004278, load size 42544 Transfer rate: 29 KB/sec, 4727 bytes/write. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ################################################################################################# Breakpoint 1, main () at Core/Src/main.c:141 141 volatile HAL_StatusTypeDef ret = HAL_UART_Receive(&huart2, rxb, 256, 50); ### Assembly ######################################################################################################## 0x080014e6 main+166 bl 0x8004314 0x080014ea main+170 bl 0x8004248 0x080014ee main+174 bl 0x800423c 0x080014f2 main+178 cmp r0, #0 0x080014f4 main+180 beq.n 0x80014ee !0x080014f6 main+182 movs r3, #50 ; 0x32 0x080014f8 main+184 mov.w r2, #256 ; 0x100 0x080014fc main+188 add r1, sp, #8 0x080014fe main+190 ldr r0, [pc, #12] ; (0x800150c ) 0x08001500 main+192 bl 0x8003d62 ### Breakpoints ##################################################################################################### [1] break at 0x080014f6 in Core/Src/main.c:141 for /storage/Shared/Projects/Penguinator/motor_controller/Core/Src/main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$0 = ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000001 r5 0x200009c8 r10 0x00000000 pc 0x080014f6 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00 r2 0x2000fff0 r7 0x00000000 r12 0x0000000c fpscr 0x00000010 faultmask 0x00 r3 0x20000be8 r8 0x00000000 sp 0x2000fee8 msp 0x2000fee8 control 0x04 r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000 ### Source ########################################################################################################## 131 uint16_t motor_degrees = 0; 132 /* USER CODE END 2 */ 133 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { !141 volatile HAL_StatusTypeDef ret = HAL_UART_Receive(&huart2, rxb, 256, 50); 142 143 for (int ind = 0; ind < 20; ind++) 144 { 145 p_uart_async_write_byte(rxb[ind]); 146 } 147 PDEBUG("\n\n\n\n"); 148 memset(rxb, 0, 256); 149 p_serial_mgr_start(); 150 } ### Stack ########################################################################################################### [0] from 0x080014f6 in main+182 at Core/Src/main.c:141 ### Threads ######################################################################################################### [1] id 0 from 0x080014f6 in main+182 at Core/Src/main.c:141 ### Variables ####################################################################################################### loc ret = 8, rxb = '\000' ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x080014f8 halted: PC: 0x080014fc halted: PC: 0x080014fe halted: PC: 0x08001500 halted: PC: 0x08003d62 halted: PC: 0x08001508 143 for (int ind = 0; ind < 20; ind++) ### Assembly ######################################################################################################## 0x080014f8 main+184 mov.w r2, #256 ; 0x100 0x080014fc main+188 add r1, sp, #8 0x080014fe main+190 ldr r0, [pc, #12] ; (0x800150c ) 0x08001500 main+192 bl 0x8003d62 0x08001504 main+196 strb.w r0, [sp, #7] 0x08001508 main+200 movs r4, #0 0x0800150a main+202 b.n 0x80014d4 0x0800150c main+204 lsrs r4, r2, #12 0x0800150e main+206 movs r0, #0 0x08001510 main+208 asrs r5, r6, #4 ### Breakpoints ##################################################################################################### [1] break at 0x080014f6 in Core/Src/main.c:141 for /storage/Shared/Projects/Penguinator/motor_controller/Core/Src/main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$0 = ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000002 r5 0x200009c8 r10 0x00000000 pc 0x08001508 primask 0x00 r1 0x2000fef0 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00 r2 0x00000100 r7 0x00000000 r12 0x0000000c fpscr 0x00000010 faultmask 0x00 r3 0x00000022 r8 0x00000000 sp 0x2000fee8 msp 0x2000fee8 control 0x04 r4 0x20000b14 r9 0x00000000 lr 0x08001505 psp 0x00000000 ### Source ########################################################################################################## 133 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { !141 volatile HAL_StatusTypeDef ret = HAL_UART_Receive(&huart2, rxb, 256, 50); 142 143 for (int ind = 0; ind < 20; ind++) 144 { 145 p_uart_async_write_byte(rxb[ind]); 146 } 147 PDEBUG("\n\n\n\n"); 148 memset(rxb, 0, 256); 149 p_serial_mgr_start(); 150 } 151 // if (b_timer_struck) 152 // { ### Stack ########################################################################################################### [0] from 0x08001508 in main+200 at Core/Src/main.c:143 ### Threads ######################################################################################################### [1] id 0 from 0x08001508 in main+200 at Core/Src/main.c:143 ### Variables ####################################################################################################### loc ind = 0, ret = HAL_BUSY, rxb = '\000' ##################################################################################################################### $2 = HAL_BUSY Quit `/storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf' has changed; re-reading symbols. Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9668 lma 0x80001c0 Loading section .rodata, size 0x480 lma 0x8009828 Loading section .ARM, size 0x8 lma 0x8009ca8 Loading section .init_array, size 0x8 lma 0x8009cb0 Loading section .fini_array, size 0x8 lma 0x8009cb8 Loading section .data, size 0x9a8 lma 0x8009cc0 Start address 0x0800427c, load size 42552 Transfer rate: 29 KB/sec, 4728 bytes/write. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ################################################################################################# Breakpoint 1, main () at Core/Src/main.c:141 141 volatile HAL_StatusTypeDef ret = HAL_UART_Receive(&huart2, rxb, 256, 1000); ### Assembly ######################################################################################################## 0x080014e6 main+166 bl 0x8004318 0x080014ea main+170 bl 0x800424c 0x080014ee main+174 bl 0x8004240 0x080014f2 main+178 cmp r0, #0 0x080014f4 main+180 beq.n 0x80014ee !0x080014f6 main+182 mov.w r3, #1000 ; 0x3e8 0x080014fa main+186 mov.w r2, #256 ; 0x100 0x080014fe main+190 add r1, sp, #8 0x08001500 main+192 ldr r0, [pc, #12] ; (0x8001510 ) 0x08001502 main+194 bl 0x8003d66 ### Breakpoints ##################################################################################################### [1] break at 0x080014f6 in Core/Src/main.c:141 for /storage/Shared/Projects/Penguinator/motor_controller/Core/Src/main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$1 = $$0 = HAL_BUSY ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000001 r5 0x200009c8 r10 0x00000000 pc 0x080014f6 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00 r2 0x2000fff0 r7 0x00000000 r12 0x0000000c fpscr 0x00000010 faultmask 0x00 r3 0x20000be8 r8 0x00000000 sp 0x2000fee8 msp 0x2000fee8 control 0x04 r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000 ### Source ########################################################################################################## 131 uint16_t motor_degrees = 0; 132 /* USER CODE END 2 */ 133 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { !141 volatile HAL_StatusTypeDef ret = HAL_UART_Receive(&huart2, rxb, 256, 1000); 142 143 for (int ind = 0; ind < 20; ind++) 144 { 145 p_uart_async_write_byte(rxb[ind]); 146 } 147 PDEBUG("\n\n\n\n"); 148 memset(rxb, 0, 256); 149 p_serial_mgr_start(); 150 } ### Stack ########################################################################################################### [0] from 0x080014f6 in main+182 at Core/Src/main.c:141 ### Threads ######################################################################################################### [1] id 0 from 0x080014f6 in main+182 at Core/Src/main.c:141 ### Variables ####################################################################################################### loc ret = HAL_BUSY, rxb = '\000' ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x080014fa halted: PC: 0x080014fe halted: PC: 0x08001500 halted: PC: 0x08001502 halted: PC: 0x08003d66 halted: PC: 0x0800150a 143 for (int ind = 0; ind < 20; ind++) ### Assembly ######################################################################################################## 0x080014fa main+186 mov.w r2, #256 ; 0x100 0x080014fe main+190 add r1, sp, #8 0x08001500 main+192 ldr r0, [pc, #12] ; (0x8001510 ) 0x08001502 main+194 bl 0x8003d66 0x08001506 main+198 strb.w r0, [sp, #7] 0x0800150a main+202 movs r4, #0 0x0800150c main+204 b.n 0x80014d4 0x0800150e main+206 nop 0x08001510 main+208 lsrs r4, r2, #12 0x08001512 main+210 movs r0, #0 ### Breakpoints ##################################################################################################### [1] break at 0x080014f6 in Core/Src/main.c:141 for /storage/Shared/Projects/Penguinator/motor_controller/Core/Src/main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$1 = $$0 = HAL_BUSY ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000002 r5 0x200009c8 r10 0x00000000 pc 0x0800150a primask 0x00 r1 0x2000fef0 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00 r2 0x00000100 r7 0x00000000 r12 0x0000000c fpscr 0x00000010 faultmask 0x00 r3 0x00000022 r8 0x00000000 sp 0x2000fee8 msp 0x2000fee8 control 0x04 r4 0x20000b14 r9 0x00000000 lr 0x08001507 psp 0x00000000 ### Source ########################################################################################################## 133 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { !141 volatile HAL_StatusTypeDef ret = HAL_UART_Receive(&huart2, rxb, 256, 1000); 142 143 for (int ind = 0; ind < 20; ind++) 144 { 145 p_uart_async_write_byte(rxb[ind]); 146 } 147 PDEBUG("\n\n\n\n"); 148 memset(rxb, 0, 256); 149 p_serial_mgr_start(); 150 } 151 // if (b_timer_struck) 152 // { ### Stack ########################################################################################################### [0] from 0x0800150a in main+202 at Core/Src/main.c:143 ### Threads ######################################################################################################### [1] id 0 from 0x0800150a in main+202 at Core/Src/main.c:143 ### Variables ####################################################################################################### loc ind = 0, ret = HAL_BUSY, rxb = '\000' ##################################################################################################################### `/storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf' has changed; re-reading symbols. Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9668 lma 0x80001c0 Loading section .rodata, size 0x480 lma 0x8009828 Loading section .ARM, size 0x8 lma 0x8009ca8 Loading section .init_array, size 0x8 lma 0x8009cb0 Loading section .fini_array, size 0x8 lma 0x8009cb8 Loading section .data, size 0x9a8 lma 0x8009cc0 Start address 0x08004280, load size 42552 Transfer rate: 29 KB/sec, 4728 bytes/write. Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf ### Output/messages ################################################################################################# Breakpoint 1, main () at Core/Src/main.c:142 142 while ((ret = HAL_UART_Receive(&huart2, rxb, 256, 1000)) != HAL_BUSY) ### Assembly ######################################################################################################## 0x080014e6 main+166 bl 0x800431c 0x080014ea main+170 bl 0x8004250 0x080014ee main+174 bl 0x8004244 0x080014f2 main+178 cmp r0, #0 0x080014f4 main+180 beq.n 0x80014ee !0x080014f6 main+182 mov.w r3, #1000 ; 0x3e8 0x080014fa main+186 mov.w r2, #256 ; 0x100 0x080014fe main+190 add r1, sp, #8 0x08001500 main+192 ldr r0, [pc, #16] ; (0x8001514 ) 0x08001502 main+194 bl 0x8003d6a ### Breakpoints ##################################################################################################### [1] break at 0x080014f6 in Core/Src/main.c:142 for /storage/Shared/Projects/Penguinator/motor_controller/Core/Src/main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$1 = $$0 = HAL_BUSY ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000001 r5 0x200009c8 r10 0x00000000 pc 0x080014f6 primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00 r2 0x2000fff0 r7 0x00000000 r12 0x0000000c fpscr 0x00000010 faultmask 0x00 r3 0x20000be8 r8 0x00000000 sp 0x2000fee8 msp 0x2000fee8 control 0x04 r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000 ### Source ########################################################################################################## 132 /* USER CODE END 2 */ 133 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { 141 volatile HAL_StatusTypeDef ret; !142 while ((ret = HAL_UART_Receive(&huart2, rxb, 256, 1000)) != HAL_BUSY) 143 ; 144 145 for (int ind = 0; ind < 20; ind++) 146 { 147 p_uart_async_write_byte(rxb[ind]); 148 } 149 PDEBUG("\n\n\n\n"); 150 memset(rxb, 0, 256); 151 p_serial_mgr_start(); ### Stack ########################################################################################################### [0] from 0x080014f6 in main+182 at Core/Src/main.c:142 ### Threads ######################################################################################################### [1] id 0 from 0x080014f6 in main+182 at Core/Src/main.c:142 ### Variables ####################################################################################################### loc ret = HAL_BUSY, rxb = '\000' ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x080014fa halted: PC: 0x080014fe halted: PC: 0x08001500 halted: PC: 0x08001502 halted: PC: 0x08003d6a halted: PC: 0x0800150a halted: PC: 0x0800150c halted: PC: 0x0800150e halted: PC: 0x08001510 halted: PC: 0x080014d4 halted: PC: 0x080014d6 halted: PC: 0x080014ca 147 p_uart_async_write_byte(rxb[ind]); ### Assembly ######################################################################################################## 0x080014be main+126 str r1, [sp, #8] 0x080014c0 main+128 movs r2, #252 ; 0xfc 0x080014c2 main+130 add r0, sp, #12 0x080014c4 main+132 bl 0x800431c 0x080014c8 main+136 b.n 0x80014ee 0x080014ca main+138 add r3, sp, #8 0x080014cc main+140 ldrb r0, [r3, r4] 0x080014ce main+142 bl 0x80041e4 0x080014d2 main+146 adds r4, #1 0x080014d4 main+148 cmp r4, #19 ### Breakpoints ##################################################################################################### [1] break at 0x080014f6 in Core/Src/main.c:142 for /storage/Shared/Projects/Penguinator/motor_controller/Core/Src/main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$1 = $$0 = HAL_BUSY ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000002 r5 0x200009c8 r10 0x00000000 pc 0x080014ca primask 0x00 r1 0x2000fef0 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00 r2 0x00000100 r7 0x00000000 r12 0x0000000c fpscr 0x00000010 faultmask 0x00 r3 0x00000022 r8 0x00000000 sp 0x2000fee8 msp 0x2000fee8 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x08001507 psp 0x00000000 ### Source ########################################################################################################## 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { 141 volatile HAL_StatusTypeDef ret; !142 while ((ret = HAL_UART_Receive(&huart2, rxb, 256, 1000)) != HAL_BUSY) 143 ; 144 145 for (int ind = 0; ind < 20; ind++) 146 { 147 p_uart_async_write_byte(rxb[ind]); 148 } 149 PDEBUG("\n\n\n\n"); 150 memset(rxb, 0, 256); 151 p_serial_mgr_start(); 152 } 153 // if (b_timer_struck) 154 // { 155 // // PDEBUG("%d\n", sys_time); 156 // b_timer_struck = false; ### Stack ########################################################################################################### [0] from 0x080014ca in main+138 at Core/Src/main.c:147 ### Threads ######################################################################################################### [1] id 0 from 0x080014ca in main+138 at Core/Src/main.c:147 ### Variables ####################################################################################################### loc ind = 0, ret = HAL_BUSY, rxb = '\000' ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x080014cc halted: PC: 0x080014ce halted: PC: 0x080041e4 145 for (int ind = 0; ind < 20; ind++) ### Assembly ######################################################################################################## 0x080014c4 main+132 bl 0x800431c 0x080014c8 main+136 b.n 0x80014ee 0x080014ca main+138 add r3, sp, #8 0x080014cc main+140 ldrb r0, [r3, r4] 0x080014ce main+142 bl 0x80041e4 0x080014d2 main+146 adds r4, #1 0x080014d4 main+148 cmp r4, #19 0x080014d6 main+150 ble.n 0x80014ca 0x080014d8 main+152 ldr r0, [pc, #80] ; (0x800152c ) 0x080014da main+154 bl 0x8004168 ### Breakpoints ##################################################################################################### [1] break at 0x080014f6 in Core/Src/main.c:142 for /storage/Shared/Projects/Penguinator/motor_controller/Core/Src/main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$1 = $$0 = HAL_BUSY ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014d2 primask 0x00 r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x210f0000 basepri 0x00 r2 0x006000d0 r7 0x00000000 r12 0x08009899 fpscr 0x00000010 faultmask 0x00 r3 0x00000020 r8 0x00000000 sp 0x2000fee8 msp 0x2000fee8 control 0x04 r4 0x00000000 r9 0x00000000 lr 0x08003bef psp 0x00000000 ### Source ########################################################################################################## 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { 141 volatile HAL_StatusTypeDef ret; !142 while ((ret = HAL_UART_Receive(&huart2, rxb, 256, 1000)) != HAL_BUSY) 143 ; 144 145 for (int ind = 0; ind < 20; ind++) 146 { 147 p_uart_async_write_byte(rxb[ind]); 148 } 149 PDEBUG("\n\n\n\n"); 150 memset(rxb, 0, 256); 151 p_serial_mgr_start(); 152 } 153 // if (b_timer_struck) 154 // { ### Stack ########################################################################################################### [0] from 0x080014d2 in main+146 at Core/Src/main.c:145 ### Threads ######################################################################################################### [1] id 0 from 0x080014d2 in main+146 at Core/Src/main.c:145 ### Variables ####################################################################################################### loc ind = 0, ret = HAL_BUSY, rxb = '\000' ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x080014d4 halted: PC: 0x080014d6 halted: PC: 0x080014ca 147 p_uart_async_write_byte(rxb[ind]); ### Assembly ######################################################################################################## 0x080014be main+126 str r1, [sp, #8] 0x080014c0 main+128 movs r2, #252 ; 0xfc 0x080014c2 main+130 add r0, sp, #12 0x080014c4 main+132 bl 0x800431c 0x080014c8 main+136 b.n 0x80014ee 0x080014ca main+138 add r3, sp, #8 0x080014cc main+140 ldrb r0, [r3, r4] 0x080014ce main+142 bl 0x80041e4 0x080014d2 main+146 adds r4, #1 0x080014d4 main+148 cmp r4, #19 ### Breakpoints ##################################################################################################### [1] break at 0x080014f6 in Core/Src/main.c:142 for /storage/Shared/Projects/Penguinator/motor_controller/Core/Src/main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$1 = $$0 = HAL_BUSY ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014ca primask 0x00 r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x810f0000 basepri 0x00 r2 0x006000d0 r7 0x00000000 r12 0x08009899 fpscr 0x00000010 faultmask 0x00 r3 0x00000020 r8 0x00000000 sp 0x2000fee8 msp 0x2000fee8 control 0x04 r4 0x00000001 r9 0x00000000 lr 0x08003bef psp 0x00000000 ### Source ########################################################################################################## 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { 141 volatile HAL_StatusTypeDef ret; !142 while ((ret = HAL_UART_Receive(&huart2, rxb, 256, 1000)) != HAL_BUSY) 143 ; 144 145 for (int ind = 0; ind < 20; ind++) 146 { 147 p_uart_async_write_byte(rxb[ind]); 148 } 149 PDEBUG("\n\n\n\n"); 150 memset(rxb, 0, 256); 151 p_serial_mgr_start(); 152 } 153 // if (b_timer_struck) 154 // { 155 // // PDEBUG("%d\n", sys_time); 156 // b_timer_struck = false; ### Stack ########################################################################################################### [0] from 0x080014ca in main+138 at Core/Src/main.c:147 ### Threads ######################################################################################################### [1] id 0 from 0x080014ca in main+138 at Core/Src/main.c:147 ### Variables ####################################################################################################### loc ind = 1, ret = HAL_BUSY, rxb = '\000' ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x080014cc halted: PC: 0x080014ce halted: PC: 0x080041e4 145 for (int ind = 0; ind < 20; ind++) ### Assembly ######################################################################################################## 0x080014c4 main+132 bl 0x800431c 0x080014c8 main+136 b.n 0x80014ee 0x080014ca main+138 add r3, sp, #8 0x080014cc main+140 ldrb r0, [r3, r4] 0x080014ce main+142 bl 0x80041e4 0x080014d2 main+146 adds r4, #1 0x080014d4 main+148 cmp r4, #19 0x080014d6 main+150 ble.n 0x80014ca 0x080014d8 main+152 ldr r0, [pc, #80] ; (0x800152c ) 0x080014da main+154 bl 0x8004168 ### Breakpoints ##################################################################################################### [1] break at 0x080014f6 in Core/Src/main.c:142 for /storage/Shared/Projects/Penguinator/motor_controller/Core/Src/main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$1 = $$0 = HAL_BUSY ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014d2 primask 0x00 r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x210f0000 basepri 0x00 r2 0x006000d0 r7 0x00000000 r12 0x08009899 fpscr 0x00000010 faultmask 0x00 r3 0x00000020 r8 0x00000000 sp 0x2000fee8 msp 0x2000fee8 control 0x04 r4 0x00000001 r9 0x00000000 lr 0x08003bef psp 0x00000000 ### Source ########################################################################################################## 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { 141 volatile HAL_StatusTypeDef ret; !142 while ((ret = HAL_UART_Receive(&huart2, rxb, 256, 1000)) != HAL_BUSY) 143 ; 144 145 for (int ind = 0; ind < 20; ind++) 146 { 147 p_uart_async_write_byte(rxb[ind]); 148 } 149 PDEBUG("\n\n\n\n"); 150 memset(rxb, 0, 256); 151 p_serial_mgr_start(); 152 } 153 // if (b_timer_struck) 154 // { ### Stack ########################################################################################################### [0] from 0x080014d2 in main+146 at Core/Src/main.c:145 ### Threads ######################################################################################################### [1] id 0 from 0x080014d2 in main+146 at Core/Src/main.c:145 ### Variables ####################################################################################################### loc ind = 1, ret = HAL_BUSY, rxb = '\000' ##################################################################################################################### ### Output/messages ################################################################################################# halted: PC: 0x080014d4 halted: PC: 0x080014d6 halted: PC: 0x080014ca 147 p_uart_async_write_byte(rxb[ind]); ### Assembly ######################################################################################################## 0x080014be main+126 str r1, [sp, #8] 0x080014c0 main+128 movs r2, #252 ; 0xfc 0x080014c2 main+130 add r0, sp, #12 0x080014c4 main+132 bl 0x800431c 0x080014c8 main+136 b.n 0x80014ee 0x080014ca main+138 add r3, sp, #8 0x080014cc main+140 ldrb r0, [r3, r4] 0x080014ce main+142 bl 0x80041e4 0x080014d2 main+146 adds r4, #1 0x080014d4 main+148 cmp r4, #19 ### Breakpoints ##################################################################################################### [1] break at 0x080014f6 in Core/Src/main.c:142 for /storage/Shared/Projects/Penguinator/motor_controller/Core/Src/main.c:141 hit 1 time ### Expressions ##################################################################################################### ### History ######################################################################################################### $$1 = $$0 = HAL_BUSY ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014ca primask 0x00 r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x810f0000 basepri 0x00 r2 0x006000d0 r7 0x00000000 r12 0x08009899 fpscr 0x00000010 faultmask 0x00 r3 0x00000020 r8 0x00000000 sp 0x2000fee8 msp 0x2000fee8 control 0x04 r4 0x00000002 r9 0x00000000 lr 0x08003bef psp 0x00000000 ### Source ########################################################################################################## 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { 141 volatile HAL_StatusTypeDef ret; !142 while ((ret = HAL_UART_Receive(&huart2, rxb, 256, 1000)) != HAL_BUSY) 143 ; 144 145 for (int ind = 0; ind < 20; ind++) 146 { 147 p_uart_async_write_byte(rxb[ind]); 148 } 149 PDEBUG("\n\n\n\n"); 150 memset(rxb, 0, 256); 151 p_serial_mgr_start(); 152 } 153 // if (b_timer_struck) 154 // { 155 // // PDEBUG("%d\n", sys_time); 156 // b_timer_struck = false; ### Stack ########################################################################################################### [0] from 0x080014ca in main+138 at Core/Src/main.c:147 ### Threads ######################################################################################################### [1] id 0 from 0x080014ca in main+138 at Core/Src/main.c:147 ### Variables ####################################################################################################### loc ind = 2, ret = HAL_BUSY, rxb = '\000' ##################################################################################################################### $3 = HAL_BUSY Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target [Inferior 1 (Remote target) detached] main () at Core/Src/main.c:146 146 p_uart_async_write_byte(rxb[ind]); ### Assembly ######################################################################################################## 0x080014be main+126 str r1, [sp, #8] 0x080014c0 main+128 movs r2, #252 ; 0xfc 0x080014c2 main+130 add r0, sp, #12 0x080014c4 main+132 bl 0x800431c 0x080014c8 main+136 b.n 0x80014ee 0x080014ca main+138 add r3, sp, #8 0x080014cc main+140 ldrb r0, [r3, r4] 0x080014ce main+142 bl 0x80041e4 0x080014d2 main+146 adds r4, #1 0x080014d4 main+148 cmp r4, #19 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014ca primask 0x00 r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x810f0000 basepri 0x00 r2 0x006000d0 r7 0x00000000 r12 0x08009899 fpscr 0x00000010 faultmask 0x00 r3 0x00000020 r8 0x00000000 sp 0x2000fee8 msp 0x2000fee8 control 0x04 r4 0x00000002 r9 0x00000000 lr 0x08003bef psp 0x00000000 ### Source ########################################################################################################## 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { 141 volatile HAL_StatusTypeDef ret; 142 while ((ret = HAL_UART_Receive(&huart2, rxb, 256, 1000)) != HAL_BUSY) {} 143 144 for (int ind = 0; ind < 20; ind++) 145 { 146 p_uart_async_write_byte(rxb[ind]); 147 } 148 PDEBUG("\n\n\n\n"); 149 memset(rxb, 0, 256); 150 p_serial_mgr_start(); 151 } 152 // if (b_timer_struck) 153 // { 154 // // PDEBUG("%d\n", sys_time); 155 // b_timer_struck = false; ### Stack ########################################################################################################### [0] from 0x080014ca in main+138 at Core/Src/main.c:146 ### Threads ######################################################################################################### [1] id 0 from 0x080014ca in main+138 at Core/Src/main.c:146 ### Variables ####################################################################################################### loc ind = 2, ret = HAL_BUSY, rxb = '\000' ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9668 lma 0x80001c0 Loading section .rodata, size 0x480 lma 0x8009828 Loading section .ARM, size 0x8 lma 0x8009ca8 Loading section .init_array, size 0x8 lma 0x8009cb0 Loading section .fini_array, size 0x8 lma 0x8009cb8 Loading section .data, size 0x9a8 lma 0x8009cc0 Start address 0x08004280, load size 42552 Transfer rate: 29 KB/sec, 4728 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] main () at Core/Src/main.c:139 139 if (p_serial_mgr_service()) ### Assembly ######################################################################################################## 0x080014de main+158 mov.w r2, #256 ; 0x100 0x080014e2 main+162 movs r1, #0 0x080014e4 main+164 add r0, sp, #8 0x080014e6 main+166 bl 0x800431c 0x080014ea main+170 bl 0x8004250 0x080014ee main+174 bl 0x8004244 0x080014f2 main+178 cmp r0, #0 0x080014f4 main+180 beq.n 0x80014ee 0x080014f6 main+182 mov.w r3, #1000 ; 0x3e8 0x080014fa main+186 mov.w r2, #256 ; 0x100 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014ee primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x40013800 r7 0x00000000 r12 0x00000000 fpscr 0x00000010 faultmask 0x00 r3 0x20000be8 r8 0x00000000 sp 0x2000fee8 msp 0x2000fee8 control 0x04 r4 0x00000014 r9 0x00000000 lr 0x080014f3 psp 0x00000000 ### Source ########################################################################################################## 129 p_serial_mgr_start(); 130 131 uint16_t motor_degrees = 0; 132 /* USER CODE END 2 */ 133 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { 141 volatile HAL_StatusTypeDef ret; 142 while ((ret = HAL_UART_Receive(&huart1, rxb, 256, 1000)) != HAL_BUSY) {} 143 144 for (int ind = 0; ind < 20; ind++) 145 { 146 p_uart_async_write_byte(rxb[ind]); 147 } 148 PDEBUG("\n\n\n\n"); ### Stack ########################################################################################################### [0] from 0x080014ee in main+174 at Core/Src/main.c:139 ### Threads ######################################################################################################### [1] id 0 from 0x080014ee in main+174 at Core/Src/main.c:139 ### Variables ####################################################################################################### loc rxb = '\000' ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9668 lma 0x80001c0 Loading section .rodata, size 0x480 lma 0x8009828 Loading section .ARM, size 0x8 lma 0x8009ca8 Loading section .init_array, size 0x8 lma 0x8009cb0 Loading section .fini_array, size 0x8 lma 0x8009cb8 Loading section .data, size 0x9a8 lma 0x8009cc0 Start address 0x08004280, load size 42552 Transfer rate: 29 KB/sec, 4728 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x08003c04 in UART_WaitOnFlagUntilTimeout (huart=0x20000a60 , Flag=32, Status=, Tickstart=31862, Timeout=1000) at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3558 3558 if (__HAL_UART_GET_FLAG(huart, UART_FLAG_RTOF) == SET) ### Assembly ######################################################################################################## 0x08003bf6 UART_WaitOnFlagUntilTimeout+60 cmp.w r8, #0 0x08003bfa UART_WaitOnFlagUntilTimeout+64 beq.n 0x8003c52 0x08003bfc UART_WaitOnFlagUntilTimeout+66 ldr r3, [r5, #0] 0x08003bfe UART_WaitOnFlagUntilTimeout+68 ldr r2, [r3, #0] 0x08003c00 UART_WaitOnFlagUntilTimeout+70 tst.w r2, #4 0x08003c04 UART_WaitOnFlagUntilTimeout+74 beq.n 0x8003bd2 0x08003c06 UART_WaitOnFlagUntilTimeout+76 ldr r2, [r3, #28] 0x08003c08 UART_WaitOnFlagUntilTimeout+78 tst.w r2, #2048 ; 0x800 0x08003c0c UART_WaitOnFlagUntilTimeout+82 beq.n 0x8003bd2 0x08003c0e UART_WaitOnFlagUntilTimeout+84 mov.w r2, #2048 ; 0x800 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000016 r5 0x20000a60 r10 0x00000000 pc 0x08003c04 primask 0x00 r1 0x00000020 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00 r2 0x0000000d r7 0x00000020 r12 0x0000000c fpscr 0x00000010 faultmask 0x00 r3 0x40013800 r8 0x000003e8 sp 0x2000fea0 msp 0x2000fea0 control 0x04 r4 0x00000000 r9 0x00007c76 lr 0x08003bef psp 0x00000000 ### Source ########################################################################################################## 3548 huart->gState = HAL_UART_STATE_READY; 3549 huart->RxState = HAL_UART_STATE_READY; 3550 3551 __HAL_UNLOCK(huart); 3552 3553 return HAL_TIMEOUT; 3554 } 3555 3556 if (READ_BIT(huart->Instance->CR1, USART_CR1_RE) != 0U) 3557 { 3558 if (__HAL_UART_GET_FLAG(huart, UART_FLAG_RTOF) == SET) 3559 { 3560 /* Clear Receiver Timeout flag*/ 3561 __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_RTOF); 3562 3563 /* Disable TXE, RXNE, PE and ERR (Frame error, noise error, overrun error) 3564 interrupts for the interrupt process */ 3565 #if defined(USART_CR1_FIFOEN) 3566 ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE | 3567 USART_CR1_TXEIE_TXFNFIE)); ### Stack ########################################################################################################### [0] from 0x08003c04 in UART_WaitOnFlagUntilTimeout+74 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3558 [1] from 0x08003e58 in HAL_UART_Receive+246 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1297 [2] from 0x08001506 in main+198 at Core/Src/main.c:142 ### Threads ######################################################################################################### [1] id 0 from 0x08003c04 in UART_WaitOnFlagUntilTimeout+74 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3558 ### Variables ####################################################################################################### arg huart = 0x20000a60 : {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…, Flag = 32, Status = , Tickstart = 31862, Timeout = 1000 ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9660 lma 0x80001c0 Loading section .rodata, size 0x480 lma 0x8009820 Loading section .ARM, size 0x8 lma 0x8009ca0 Loading section .init_array, size 0x8 lma 0x8009ca8 Loading section .fini_array, size 0x8 lma 0x8009cb0 Loading section .data, size 0x9a8 lma 0x8009cb8 Start address 0x08004278, load size 42544 Transfer rate: 29 KB/sec, 4727 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] main () at Core/Src/main.c:139 139 if (p_serial_mgr_service()) ### Assembly ######################################################################################################## 0x080014de main+158 mov.w r2, #256 ; 0x100 0x080014e2 main+162 movs r1, #0 0x080014e4 main+164 add r0, sp, #8 0x080014e6 main+166 bl 0x8004314 0x080014ea main+170 bl 0x8004248 0x080014ee main+174 bl 0x800423c 0x080014f2 main+178 cmp r0, #0 0x080014f4 main+180 beq.n 0x80014ee 0x080014f6 main+182 movs r3, #50 ; 0x32 0x080014f8 main+184 mov.w r2, #256 ; 0x100 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014ee primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x40013800 r7 0x00000000 r12 0x00000000 fpscr 0x00000010 faultmask 0x00 r3 0x20000be8 r8 0x00000000 sp 0x2000fee8 msp 0x2000fee8 control 0x04 r4 0x00000014 r9 0x00000000 lr 0x080014f3 psp 0x00000000 ### Source ########################################################################################################## 129 p_serial_mgr_start(); 130 131 uint16_t motor_degrees = 0; 132 /* USER CODE END 2 */ 133 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { 141 volatile HAL_StatusTypeDef ret; 142 ret = HAL_UART_Receive(&huart1, rxb, 256, 1); 143 144 for (int ind = 0; ind < 20; ind++) 145 { 146 p_uart_async_write_byte(rxb[ind]); 147 } 148 PDEBUG("\n\n\n\n"); ### Stack ########################################################################################################### [0] from 0x080014ee in main+174 at Core/Src/main.c:139 ### Threads ######################################################################################################### [1] id 0 from 0x080014ee in main+174 at Core/Src/main.c:139 ### Variables ####################################################################################################### loc rxb = '\000' ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9660 lma 0x80001c0 Loading section .rodata, size 0x480 lma 0x8009820 Loading section .ARM, size 0x8 lma 0x8009ca0 Loading section .init_array, size 0x8 lma 0x8009ca8 Loading section .fini_array, size 0x8 lma 0x8009cb0 Loading section .data, size 0x9a8 lma 0x8009cb8 Start address 0x08004278, load size 42544 Transfer rate: 29 KB/sec, 4727 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] 0x0800423e in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:53 53 return b_go; ### Assembly ######################################################################################################## ~ ~ ~ ~ 0x0800423c p_serial_mgr_service+0 ldr r3, [pc, #4] ; (0x8004244 ) 0x0800423e p_serial_mgr_service+2 ldrb r0, [r3, #0] 0x08004240 p_serial_mgr_service+4 bx lr 0x08004242 p_serial_mgr_service+6 nop 0x08004244 p_serial_mgr_service+8 lsrs r0, r5, #15 0x08004246 p_serial_mgr_service+10 movs r0, #0 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x0800423e primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x40013800 r7 0x00000000 r12 0x00000000 fpscr 0x00000010 faultmask 0x00 r3 0x20000be8 r8 0x00000000 sp 0x2000fee8 msp 0x2000fee8 control 0x04 r4 0x00000014 r9 0x00000000 lr 0x080014f3 psp 0x00000000 ### Source ########################################################################################################## 43 bool p_serial_mgr_service(void) 44 { 45 // // this will be less garbage when i switch to a queue 46 // for (int ind = 0; ind < serial_pkt_cb.max_len; ind++) 47 // { 48 // if (serial_pkt_cb.buffer[ind].b_ready) 49 // { 50 // return &serial_pkt_cb.buffer[ind]; 51 // } 52 // } 53 return b_go; 54 } 55 56 void p_serial_mgr_start() 57 { 58 b_go = false; 59 HAL_UART_Receive_IT(_serial_huart_inst, &rxc, 1); 60 } ~ ~ ### Stack ########################################################################################################### [0] from 0x0800423e in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:53 [1] from 0x080014f2 in main+178 at Core/Src/main.c:139 ### Threads ######################################################################################################### [1] id 0 from 0x0800423e in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:53 ### Variables ####################################################################################################### ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9660 lma 0x80001c0 Loading section .rodata, size 0x480 lma 0x8009820 Loading section .ARM, size 0x8 lma 0x8009ca0 Loading section .init_array, size 0x8 lma 0x8009ca8 Loading section .fini_array, size 0x8 lma 0x8009cb0 Loading section .data, size 0x9a8 lma 0x8009cb8 Start address 0x08004278, load size 42544 Transfer rate: 29 KB/sec, 4727 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached] main () at Core/Src/main.c:139 139 if (p_serial_mgr_service()) ### Assembly ######################################################################################################## 0x080014de main+158 mov.w r2, #256 ; 0x100 0x080014e2 main+162 movs r1, #0 0x080014e4 main+164 add r0, sp, #8 0x080014e6 main+166 bl 0x8004314 0x080014ea main+170 bl 0x8004248 0x080014ee main+174 bl 0x800423c 0x080014f2 main+178 cmp r0, #0 0x080014f4 main+180 beq.n 0x80014ee 0x080014f6 main+182 movs r3, #10 0x080014f8 main+184 mov.w r2, #256 ; 0x100 ### Breakpoints ##################################################################################################### ### Expressions ##################################################################################################### ### History ######################################################################################################### ### Memory ########################################################################################################## ### Registers ####################################################################################################### r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014ee primask 0x00 r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00 r2 0x40013800 r7 0x00000000 r12 0x00000000 fpscr 0x00000010 faultmask 0x00 r3 0x20000be8 r8 0x00000000 sp 0x2000fee8 msp 0x2000fee8 control 0x04 r4 0x00000014 r9 0x00000000 lr 0x080014f3 psp 0x00000000 ### Source ########################################################################################################## 129 p_serial_mgr_start(); 130 131 uint16_t motor_degrees = 0; 132 /* USER CODE END 2 */ 133 134 /* Infinite loop */ 135 /* USER CODE BEGIN WHILE */ 136 uint8_t rxb[256] = {0}; 137 while (1) 138 { 139 if (p_serial_mgr_service()) 140 { 141 volatile HAL_StatusTypeDef ret; 142 ret = HAL_UART_Receive(&huart1, rxb, 256, 5); 143 144 for (int ind = 0; ind < 20; ind++) 145 { 146 p_uart_async_write_byte(rxb[ind]); 147 } 148 PDEBUG("\n\n\n\n"); ### Stack ########################################################################################################### [0] from 0x080014ee in main+174 at Core/Src/main.c:139 ### Threads ######################################################################################################### [1] id 0 from 0x080014ee in main+174 at Core/Src/main.c:139 ### Variables ####################################################################################################### loc rxb = '\000' ##################################################################################################################### Loading section .isr_vector, size 0x190 lma 0x8000000 Loading section .text, size 0x9660 lma 0x80001c0 Loading section .rodata, size 0x480 lma 0x8009820 Loading section .ARM, size 0x8 lma 0x8009ca0 Loading section .init_array, size 0x8 lma 0x8009ca8 Loading section .fini_array, size 0x8 lma 0x8009cb0 Loading section .data, size 0x9a8 lma 0x8009cb8 Start address 0x08004278, load size 42544 Transfer rate: 29 KB/sec, 4727 bytes/write. Unable to match requested speed 500 kHz, using 480 kHz Unable to match requested speed 500 kHz, using 480 kHz A debugging session is active. Inferior 1 [Remote target] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] [Inferior 1 (Remote target) detached]