You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28249 lines
1.7 MiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

0x080015e0 in main () at Core/Src/main.c:128
128 HAL_UART_Receive_IT(&huart1, &huart1_rxc, 1);
### Assembly ########################################################################################################
0x080015d4 main+112 bl 0x8003f84 <UART_Start_Receive_IT+20>
0x080015d8 main+116 movs r4, #0
0x080015da main+118 ldr r3, [pc, #72] ; (0x8001624 <main+192>)
0x080015dc main+120 ldrb r3, [r3, #0]
0x080015de main+122 cmp r3, #0
0x080015e0 main+124 beq.n 0x80015da <main+118>
0x080015e2 main+126 ldr r3, [pc, #64] ; (0x8001624 <main+192>)
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 = <optimized out>
#####################################################################################################################
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 <HAL_TIM_Base_MspInit+56>)
0x080015e0 HAL_TIM_PWM_MspInit+8 mov r0, r6
0x080015e2 HAL_TIM_PWM_MspInit+10 bl 0x8004048 <HAL_RS485Ex_Init+136>
0x080015e6 HAL_TIM_PWM_MspInit+14 movs r4, #0
0x080015e8 HAL_TIM_PWM_MspInit+16 ldr r3, [pc, #80] ; (0x800163c <HAL_TIM_Base_MspInit+60>)
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 <HAL_TIM_PWM_MspInit+16>
0x080015f0 HAL_TIM_PWM_MspInit+24 ldr r3, [pc, #72] ; (0x800163c <HAL_TIM_Base_MspInit+60>)
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 <memset>
0x08001516 main+162 bl 0x8004298 <p_serial_mgr_service>
0x0800151a main+166 mov r4, r0
0x0800151c main+168 cmp r0, #0
0x0800151e main+170 beq.n 0x8001516 <main+162>
0x08001520 main+172 ldrb r2, [r0, #1]
0x08001522 main+174 ldrb r1, [r0, #0]
0x08001524 main+176 ldr r0, [pc, #48] ; (0x8001558 <main+228>)
### 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 <huart2>) at Core/Src/main.c:412
412 {
### Assembly ##################################################################
~
~
~
~
~
!0x08001168 UART2_RxCpltCallback+0 push {r4, lr}
0x0800116a UART2_RxCpltCallback+2 ldr r4, [pc, #24] ; (0x8001184 <UART2_RxCpltCallback+28>)
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 <huart2>: {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 <huart2>) at Core/Src/main.c:412
412 {
### Assembly ##################################################################
~
~
~
~
~
0x08001168 UART2_RxCpltCallback+0 push {r4, lr}
0x0800116a UART2_RxCpltCallback+2 ldr r4, [pc, #24] ; (0x8001184 <UART2_RxCpltCallback+28>)
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 <huart2>: {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 <p_serial_mgr_service+6>
0x0800429c p_serial_mgr_service+4 adds r3, #1
0x0800429e p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x80042c4 <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+6>
0x0800429c p_serial_mgr_service+4 adds r3, #1
0x0800429e p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x80042c4 <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+38>
0x080042a6 p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x80042c4 <p_serial_mgr_service+44>)
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 <memset>
0x08001516 main+162 bl 0x8004298 <p_serial_mgr_service>
0x0800151a main+166 mov r4, r0
0x0800151c main+168 cmp r0, #0
0x0800151e main+170 beq.n 0x8001516 <main+162>
0x08001520 main+172 ldrb r2, [r0, #1]
0x08001522 main+174 ldrb r1, [r0, #0]
0x08001524 main+176 ldr r0, [pc, #48] ; (0x8001558 <main+228>)
### 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 <p_serial_mgr_service+4>
0x080042ba p_serial_mgr_service+34 ldr r0, [pc, #8] ; (0x80042c4 <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+6>
0x0800429c p_serial_mgr_service+4 adds r3, #1
0x0800429e p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x80042c4 <p_serial_mgr_service+44>)
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 <memset>
0x08001516 main+162 bl 0x8004298 <p_serial_mgr_service>
0x0800151a main+166 mov r4, r0
0x0800151c main+168 cmp r0, #0
0x0800151e main+170 beq.n 0x8001516 <main+162>
!0x08001520 main+172 ldrb r2, [r0, #1]
0x08001522 main+174 ldrb r1, [r0, #0]
0x08001524 main+176 ldr r0, [pc, #48] ; (0x8001558 <main+228>)
### 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 <memset>
0x08001516 main+162 bl 0x8004298 <p_serial_mgr_service>
0x0800151a main+166 mov r4, r0
0x0800151c main+168 cmp r0, #0
0x0800151e main+170 beq.n 0x8001516 <main+162>
0x08001520 main+172 ldrb r2, [r0, #1]
0x08001522 main+174 ldrb r1, [r0, #0]
0x08001524 main+176 ldr r0, [pc, #48] ; (0x8001558 <main+228>)
### 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 <LoopForever+6>
0x080042d8 ? bl 0x8004060 <SystemInit>
0x080042dc ? ldr r0, [pc, #48] ; (0x8004310 <LoopForever+10>)
0x080042de ? ldr r1, [pc, #52] ; (0x8004314 <LoopForever+14>)
0x080042e0 ? ldr r2, [pc, #52] ; (0x8004318 <LoopForever+18>)
0x080042e2 ? movs r3, #0
0x080042e4 ? b.n 0x80042ec <Reset_Handler+28>
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 <p_serial_mgr_service+4>
0x080042ba p_serial_mgr_service+34 b.n 0x80042be <p_serial_mgr_service+38>
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 <p_serial_mgr_service+6>
0x0800429c p_serial_mgr_service+4 adds r3, #1
0x0800429e p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042c0 <p_serial_mgr_service+40>)
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 <p_serial_mgr_service+36>
0x080042a6 p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x80042c0 <p_serial_mgr_service+40>)
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 <p_serial_mgr_service+36>)
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 <p_serial_mgr_service+32>
0x080042a6 p_serial_mgr_service+10 ldr r2, [pc, #24] ; (0x80042c0 <p_serial_mgr_service+36>)
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=<optimized out>) 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 <p_serial_mgr_init+30>
0x080042a0 p_serial_mgr_init+28 adds r3, #1
0x080042a2 p_serial_mgr_init+30 ldr r2, [pc, #32] ; (0x80042c4 <p_serial_mgr_service+24>)
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 <p_serial_mgr_service+20>
0x080042aa p_serial_mgr_init+38 ldr r2, [pc, #24] ; (0x80042c4 <p_serial_mgr_service+24>)
### 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 = <optimized out>
###############################################################################
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 <p_serial_mgr_service+22>
0x080042b0 p_serial_mgr_service+20 adds r3, #1
0x080042b2 p_serial_mgr_service+22 ldr r2, [pc, #32] ; (0x80042d4 <p_serial_mgr_start+12>)
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 <p_serial_mgr_start+8>
0x080042ba p_serial_mgr_service+30 ldr r2, [pc, #24] ; (0x80042d4 <p_serial_mgr_start+12>)
### 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 <p_serial_mgr_service+6>
0x080042a0 p_serial_mgr_service+4 adds r3, #1
0x080042a2 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042c4 <p_serial_mgr_service+40>)
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 <p_serial_mgr_service+36>
0x080042aa p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x80042c4 <p_serial_mgr_service+40>)
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 <p_printf>
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 <memset>
!0x0800151a main+166 bl 0x800429c <p_serial_mgr_service>
0x0800151e main+170 mov r4, r0
0x08001520 main+172 cmp r0, #0
0x08001522 main+174 beq.n 0x800151a <main+166>
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 <p_serial_mgr_service+6>
0x080042a0 p_serial_mgr_service+4 adds r3, #1
0x080042a2 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042c4 <p_serial_mgr_service+40>)
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 <p_serial_mgr_service+6>
0x080042a0 p_serial_mgr_service+4 adds r3, #1
0x080042a2 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042c4 <p_serial_mgr_service+40>)
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 <p_serial_mgr_service+36>
0x080042aa p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x80042c4 <p_serial_mgr_service+40>)
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 <p_serial_mgr_service+6>
0x080042a0 p_serial_mgr_service+4 adds r3, #1
0x080042a2 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042c4 <p_serial_mgr_service+40>)
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 <p_serial_mgr_service+36>
0x080042aa p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x80042c4 <p_serial_mgr_service+40>)
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 <p_serial_mgr_service+4>
0x080042be p_serial_mgr_service+34 b.n 0x80042c2 <p_serial_mgr_service+38>
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 <p_serial_mgr_service+6>
0x080042a0 p_serial_mgr_service+4 adds r3, #1
0x080042a2 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042c4 <p_serial_mgr_service+40>)
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 <p_serial_mgr_service+36>
0x080042aa p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x80042c4 <p_serial_mgr_service+40>)
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 <huart1>) at shared/drivers/p_serial_mgr.c:46
46 if (rxc == 0x7E)
### Assembly ##################################################################
0x08004114 UART1_RxCpltCallback+8 bhi.w 0x8004250 <UART1_RxCpltCallback+324>
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 <UART1_RxCpltCallback+336>)
0x08004124 UART1_RxCpltCallback+24 ldrb r3, [r3, #0]
0x08004126 UART1_RxCpltCallback+26 cmp r3, #126 ; 0x7e
0x08004128 UART1_RxCpltCallback+28 bne.w 0x8004242 <UART1_RxCpltCallback+310>
0x0800412c UART1_RxCpltCallback+32 ldr r3, [pc, #296] ; (0x8004258 <UART1_RxCpltCallback+332>)
### 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 <huart1>: {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 <p_serial_mgr_service+6>
0x080042a0 p_serial_mgr_service+4 adds r3, #1
0x080042a2 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042c4 <p_serial_mgr_service+40>)
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 <p_serial_mgr_service+36>
0x080042aa p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x80042c4 <p_serial_mgr_service+40>)
### 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 <p_serial_mgr_service+4>
0x080042be p_serial_mgr_service+34 b.n 0x80042c2 <p_serial_mgr_service+38>
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 <memset>
0x0800151a main+166 bl 0x800429c <p_serial_mgr_service>
0x0800151e main+170 mov r4, r0
0x08001520 main+172 cmp r0, #0
0x08001522 main+174 beq.n 0x800151a <main+166>
!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 <huart1>) at shared/drivers/p_serial_mgr.c:46
46 if (rxc == 0x7E)
### Assembly ##################################################################
0x08004114 UART1_RxCpltCallback+8 bhi.w 0x8004250 <UART1_RxCpltCallback+324>
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 <UART1_RxCpltCallback+336>)
0x08004124 UART1_RxCpltCallback+24 ldrb r3, [r3, #0]
0x08004126 UART1_RxCpltCallback+26 cmp r3, #126 ; 0x7e
0x08004128 UART1_RxCpltCallback+28 bne.w 0x8004242 <UART1_RxCpltCallback+310>
0x0800412c UART1_RxCpltCallback+32 ldr r3, [pc, #296] ; (0x8004258 <UART1_RxCpltCallback+332>)
### 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 <huart1>: {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 <p_serial_mgr_service+6>
0x080042a0 p_serial_mgr_service+4 adds r3, #1
0x080042a2 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042c4 <p_serial_mgr_service+40>)
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 <p_serial_mgr_service+36>
0x080042aa p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x80042c4 <p_serial_mgr_service+40>)
### 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 <p_serial_mgr_service+6>
0x080042a0 p_serial_mgr_service+4 adds r3, #1
0x080042a2 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042c4 <p_serial_mgr_service+40>)
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 <p_serial_mgr_service+36>
0x080042aa p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x80042c4 <p_serial_mgr_service+40>)
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=<optimized out>) at shared/drivers/p_serial_mgr.c:140
140 }
### Assembly ##################################################################
0x0800429e p_serial_mgr_init+22 b.n 0x80042a2 <p_serial_mgr_init+26>
0x080042a0 p_serial_mgr_init+24 adds r3, #1
0x080042a2 p_serial_mgr_init+26 ldr r2, [pc, #32] ; (0x80042c4 <p_serial_mgr_service+20>)
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 <p_serial_mgr_service+16>
0x080042aa p_serial_mgr_init+34 ldr r2, [pc, #24] ; (0x80042c4 <p_serial_mgr_service+20>)
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 = <optimized out>
###############################################################################
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 <p_serial_mgr_service+6>
0x080042b4 p_serial_mgr_service+4 adds r3, #1
0x080042b6 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042d8 <p_serial_mgr_service+40>)
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 <huart1>) 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 <UART1_RxCpltCallback+330>
!0x08004186 UART1_RxCpltCallback+122 ldr r2, [pc, #240] ; (0x8004278 <UART1_RxCpltCallback+364>)
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 <huart1>: {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 "<string>", line 430, in on_stop
File "<string>", line 543, in render
File "<string>", line 1334, in lines
File "<string>", line 1529, in fetch_asm
File "<string>", 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 <memset>
0x0800151a main+166 bl 0x80042b0 <p_serial_mgr_service>
0x0800151e main+170 mov r4, r0
0x08001520 main+172 cmp r0, #0
0x08001522 main+174 beq.n 0x800151a <main+166>
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 <p_serial_mgr_service+6>
0x080042b4 p_serial_mgr_service+4 adds r3, #1
0x080042b6 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042d8 <p_serial_mgr_service+40>)
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 <p_serial_mgr_service+6>
0x080042b4 p_serial_mgr_service+4 adds r3, #1
0x080042b6 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042d8 <p_serial_mgr_service+40>)
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 ; <UNDEFINED> instruction: 0xffffffff
0x08004300 mc_init+4 ; <UNDEFINED> instruction: 0xffffffff
0x08004304 mc_init+8 ; <UNDEFINED> 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 <math.h>
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 <p_printf>
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 <memset>
0x0800151a main+166 bl 0x80042b8 <p_serial_mgr_service>
0x0800151e main+170 mov r4, r0
0x08001520 main+172 cmp r0, #0
0x08001522 main+174 beq.n 0x800151a <main+166>
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 <p_serial_mgr_service+6>
0x080042bc p_serial_mgr_service+4 adds r3, #1
0x080042be p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042e0 <p_serial_mgr_service+40>)
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 <p_serial_mgr_service+36>
0x080042c6 p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x80042e0 <p_serial_mgr_service+40>)
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 <p_serial_mgr_service+36>)
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 <p_serial_mgr_service+32>
0x080042c6 p_serial_mgr_service+10 ldr r2, [pc, #24] ; (0x80042e0 <p_serial_mgr_service+36>)
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 <huart1>) at shared/drivers/p_serial_mgr.c:87
87 asm volatile("nop");
### Assembly ##################################################################
0x080041de UART1_RxCpltCallback+210 bne.n 0x8004262 <UART1_RxCpltCallback+342>
0x080041e0 UART1_RxCpltCallback+212 ldr r3, [pc, #148] ; (0x8004278 <UART1_RxCpltCallback+364>)
0x080041e2 UART1_RxCpltCallback+214 movs r2, #4
0x080041e4 UART1_RxCpltCallback+216 strb r2, [r3, #0]
0x080041e6 UART1_RxCpltCallback+218 b.n 0x8004262 <UART1_RxCpltCallback+342>
!0x080041e8 UART1_RxCpltCallback+220 nop
0x080041ea UART1_RxCpltCallback+222 b.n 0x8004262 <UART1_RxCpltCallback+342>
0x080041ec UART1_RxCpltCallback+224 ldr r3, [pc, #136] ; (0x8004278 <UART1_RxCpltCallback+364>)
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 <huart1>: {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' <repeats 16 times>, "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 <huart1>) at shared/drivers/p_serial_mgr.c:87
87 asm volatile("nop");
### Assembly ##################################################################
0x080041de UART1_RxCpltCallback+210 bne.n 0x8004262 <UART1_RxCpltCallback+342>
0x080041e0 UART1_RxCpltCallback+212 ldr r3, [pc, #148] ; (0x8004278 <UART1_RxCpltCallback+364>)
0x080041e2 UART1_RxCpltCallback+214 movs r2, #4
0x080041e4 UART1_RxCpltCallback+216 strb r2, [r3, #0]
0x080041e6 UART1_RxCpltCallback+218 b.n 0x8004262 <UART1_RxCpltCallback+342>
0x080041e8 UART1_RxCpltCallback+220 nop
0x080041ea UART1_RxCpltCallback+222 b.n 0x8004262 <UART1_RxCpltCallback+342>
0x080041ec UART1_RxCpltCallback+224 ldr r3, [pc, #136] ; (0x8004278 <UART1_RxCpltCallback+364>)
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 <huart1>: {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 <p_serial_mgr_service+6>
0x080042c8 p_serial_mgr_service+4 adds r3, #1
0x080042ca p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042ec <p_serial_mgr_service+40>)
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 <htim6>) 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 <HAL_TIM_IRQHandler+354>
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 <HAL_TIM_IRQHandler+248>
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 <HAL_TIM_IRQHandler+368>
### 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 <htim6>: {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 <memset>
0x0800151a main+166 bl 0x80042d4 <p_serial_mgr_service>
0x0800151e main+170 mov r4, r0
0x08001520 main+172 cmp r0, #0
0x08001522 main+174 beq.n 0x800151a <main+166>
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 <p_serial_mgr_service+6>
0x080042d8 p_serial_mgr_service+4 adds r3, #1
0x080042da p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042fc <p_serial_mgr_service+40>)
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 <p_serial_mgr_service+6>
0x080042d8 p_serial_mgr_service+4 adds r3, #1
0x080042da p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042fc <p_serial_mgr_service+40>)
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 <p_serial_mgr_service+36>
0x080042e2 p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x80042fc <p_serial_mgr_service+40>)
### 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 <p_serial_mgr_service+6>
0x080042d8 p_serial_mgr_service+4 adds r3, #1
0x080042da p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x80042fc <p_serial_mgr_service+40>)
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 <p_serial_mgr_service+36>
0x080042e2 p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x80042fc <p_serial_mgr_service+40>)
### 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 <p_serial_mgr_init+36>
0x080042f6 p_serial_mgr_service+26 b.n 0x80042fa <p_serial_mgr_service+30>
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 <p_serial_mgr_service+6>
0x080042e0 p_serial_mgr_service+4 adds r3, #1
0x080042e2 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x8004304 <p_serial_mgr_service+40>)
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 <p_serial_mgr_service+36>
0x080042ea p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x8004304 <p_serial_mgr_service+40>)
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 <p_serial_mgr_service+6>
0x080042e0 p_serial_mgr_service+4 adds r3, #1
0x080042e2 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x8004304 <p_serial_mgr_service+40>)
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 <p_serial_mgr_service+36>
0x080042ea p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x8004304 <p_serial_mgr_service+40>)
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 <p_printf>
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 <memset>
0x0800151a main+166 bl 0x80042dc <p_serial_mgr_service>
0x0800151e main+170 mov r4, r0
0x08001520 main+172 cmp r0, #0
0x08001522 main+174 beq.n 0x800151a <main+166>
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 <p_printf>
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 <p_serial_mgr_init+36>
0x0800151e main+170 mov r4, r0
0x08001520 main+172 cmp r0, #0
0x08001522 main+174 beq.n 0x800151a <main+166>
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 <p_serial_mgr_service+6>
0x080042e4 p_serial_mgr_service+4 adds r3, #1
0x080042e6 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x8004308 <p_serial_mgr_service+40>)
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 <p_serial_mgr_service+36>
0x080042ee p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x8004308 <p_serial_mgr_service+40>)
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 <p_printf>
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 <memset>
0x0800151a main+166 bl 0x80042e0 <p_serial_mgr_service>
0x0800151e main+170 mov r4, r0
0x08001520 main+172 cmp r0, #0
0x08001522 main+174 beq.n 0x800151a <main+166>
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 <p_serial_mgr_service+6>
0x080042e4 p_serial_mgr_service+4 adds r3, #1
0x080042e6 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x8004308 <p_serial_mgr_service+40>)
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 <p_serial_mgr_service+36>
0x080042ee p_serial_mgr_service+14 ldr r2, [pc, #24] ; (0x8004308 <p_serial_mgr_service+40>)
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 <p_serial_mgr_service+6>
0x080042e4 p_serial_mgr_service+4 adds r3, #1
0x080042e6 p_serial_mgr_service+6 ldr r2, [pc, #32] ; (0x8004308 <p_serial_mgr_service+40>)
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 <huart1>) 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 <UART1_RxCpltCallback+224>
0x080041b4 UART1_RxCpltCallback+168 cmp r3, #125 ; 0x7d
0x080041b6 UART1_RxCpltCallback+170 beq.n 0x8004208 <UART1_RxCpltCallback+252>
!0x080041b8 UART1_RxCpltCallback+172 ldr r1, [pc, #236] ; (0x80042a8 <UART1_RxCpltCallback+412>)
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 <UART1_RxCpltCallback+416>)
### 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 <huart1>: {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 <memset>
0x0800151a main+166 bl 0x80042e0 <p_serial_mgr_service>
0x0800151e main+170 mov r4, r0
0x08001520 main+172 cmp r0, #0
0x08001522 main+174 beq.n 0x800151a <main+166>
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 <huart1>) 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 <UART1_RxCpltCallback+400>)
0x080041a6 UART1_RxCpltCallback+154 movs r2, #2
0x080041a8 UART1_RxCpltCallback+156 strb r2, [r3, #0]
0x080041aa UART1_RxCpltCallback+158 b.n 0x8004284 <UART1_RxCpltCallback+376>
!0x080041ac UART1_RxCpltCallback+160 ldr r3, [pc, #240] ; (0x80042a0 <UART1_RxCpltCallback+404>)
0x080041ae UART1_RxCpltCallback+162 ldrb r3, [r3, #0]
0x080041b0 UART1_RxCpltCallback+164 cmp r3, #126 ; 0x7e
0x080041b2 UART1_RxCpltCallback+166 beq.n 0x80041ec <UART1_RxCpltCallback+224>
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 <huart1>: {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' <repeats 16 times>, "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' <repeats 16 times>, "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 <repeats 16 times>, [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 <huart1>) 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 <UART1_RxCpltCallback+400>)
0x080041a6 UART1_RxCpltCallback+154 movs r2, #2
0x080041a8 UART1_RxCpltCallback+156 strb r2, [r3, #0]
0x080041aa UART1_RxCpltCallback+158 b.n 0x8004284 <UART1_RxCpltCallback+376>
0x080041ac UART1_RxCpltCallback+160 ldr r3, [pc, #240] ; (0x80042a0 <UART1_RxCpltCallback+404>)
0x080041ae UART1_RxCpltCallback+162 ldrb r3, [r3, #0]
0x080041b0 UART1_RxCpltCallback+164 cmp r3, #126 ; 0x7e
0x080041b2 UART1_RxCpltCallback+166 beq.n 0x80041ec <UART1_RxCpltCallback+224>
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 <huart1>: {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 <huart1>) at shared/drivers/p_serial_mgr.c:86
86 if (rxc == 0x7E)
### Assembly ##################################################################
0x080041a4 UART1_RxCpltCallback+152 ldr r3, [pc, #244] ; (0x800429c <UART1_RxCpltCallback+400>)
0x080041a6 UART1_RxCpltCallback+154 movs r2, #2
0x080041a8 UART1_RxCpltCallback+156 strb r2, [r3, #0]
0x080041aa UART1_RxCpltCallback+158 b.n 0x8004284 <UART1_RxCpltCallback+376>
0x080041ac UART1_RxCpltCallback+160 ldr r3, [pc, #240] ; (0x80042a0 <UART1_RxCpltCallback+404>)
!0x080041ae UART1_RxCpltCallback+162 ldrb r3, [r3, #0]
0x080041b0 UART1_RxCpltCallback+164 cmp r3, #126 ; 0x7e
0x080041b2 UART1_RxCpltCallback+166 beq.n 0x80041ec <UART1_RxCpltCallback+224>
0x080041b4 UART1_RxCpltCallback+168 cmp r3, #125 ; 0x7d
0x080041b6 UART1_RxCpltCallback+170 beq.n 0x8004208 <UART1_RxCpltCallback+252>
### 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 <huart1>: {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' <repeats 16 times>, "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 <repeats 16 times>, [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 <repeats 16 times>, [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 <huart1>) 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 <UART1_RxCpltCallback+360>)
0x080041a8 UART1_RxCpltCallback+116 movs r2, #2
0x080041aa UART1_RxCpltCallback+118 strb r2, [r3, #0]
0x080041ac UART1_RxCpltCallback+120 b.n 0x8004286 <UART1_RxCpltCallback+338>
0x080041ae UART1_RxCpltCallback+122 ldr r3, [pc, #240] ; (0x80042a0 <UART1_RxCpltCallback+364>)
0x080041b0 UART1_RxCpltCallback+124 ldrb r3, [r3, #0]
0x080041b2 UART1_RxCpltCallback+126 cmp r3, #126 ; 0x7e
0x080041b4 UART1_RxCpltCallback+128 beq.n 0x80041ee <UART1_RxCpltCallback+186>
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 <huart1>: {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 <huart1>) at shared/drivers/p_serial_mgr.c:86
86 if (rxc == 0x7E)
### Assembly ##################################################################
!0x080041d6 UART1_RxCpltCallback+162 ldr r3, [pc, #240] ; (0x80042c8 <UART1_RxCpltCallback+404>)
0x080041d8 UART1_RxCpltCallback+164 ldrb r3, [r3, #0]
0x080041da UART1_RxCpltCallback+166 cmp r3, #126 ; 0x7e
0x080041dc UART1_RxCpltCallback+168 beq.n 0x8004216 <UART1_RxCpltCallback+226>
0x080041de UART1_RxCpltCallback+170 cmp r3, #125 ; 0x7d
0x080041e0 UART1_RxCpltCallback+172 beq.n 0x8004232 <UART1_RxCpltCallback+254>
0x080041e2 UART1_RxCpltCallback+174 ldr r1, [pc, #236] ; (0x80042d0 <UART1_RxCpltCallback+412>)
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 <huart1>: {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 <repeats 16 times>, [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' <repeats 16 times>, "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 <repeats 16 times>, [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 <huart1>) 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 <UART1_RxCpltCallback+400>)
0x080041d0 UART1_RxCpltCallback+156 movs r2, #2
0x080041d2 UART1_RxCpltCallback+158 strb r2, [r3, #0]
0x080041d4 UART1_RxCpltCallback+160 b.n 0x80042ae <UART1_RxCpltCallback+378>
0x080041d6 UART1_RxCpltCallback+162 ldr r3, [pc, #240] ; (0x80042c8 <UART1_RxCpltCallback+404>)
0x080041d8 UART1_RxCpltCallback+164 ldrb r3, [r3, #0]
0x080041da UART1_RxCpltCallback+166 cmp r3, #126 ; 0x7e
0x080041dc UART1_RxCpltCallback+168 beq.n 0x8004216 <UART1_RxCpltCallback+226>
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 <huart1>: {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 <huart1>) at shared/drivers/p_serial_mgr.c:46
46 if (rxc == 0x7E)
### Assembly ##################################################################
0x0800413c UART1_RxCpltCallback+8 bhi.w 0x80042bc <UART1_RxCpltCallback+392>
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 <UART1_RxCpltCallback+404>)
0x0800414c UART1_RxCpltCallback+24 ldrb r3, [r3, #0]
0x0800414e UART1_RxCpltCallback+26 cmp r3, #126 ; 0x7e
0x08004150 UART1_RxCpltCallback+28 bne.w 0x80042ae <UART1_RxCpltCallback+378>
0x08004154 UART1_RxCpltCallback+32 ldr r3, [pc, #364] ; (0x80042c4 <UART1_RxCpltCallback+400>)
### 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 <huart1>: {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' <repeats 16 times>, "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 <repeats 16 times>, [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 <huart1>) at shared/drivers/p_serial_mgr.c:42
42 switch (sstate)
### Assembly ############################################################################################################################
0x0800413c UART1_RxCpltCallback+4 bhi.w 0x80042bc <UART1_RxCpltCallback+388>
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 <UART1_RxCpltCallback+400>)
0x0800414c UART1_RxCpltCallback+20 ldrb r3, [r3, #0]
0x0800414e UART1_RxCpltCallback+22 cmp r3, #126 ; 0x7e
0x08004150 UART1_RxCpltCallback+24 bne.w 0x80042ae <UART1_RxCpltCallback+374>
0x08004154 UART1_RxCpltCallback+28 ldr r3, [pc, #364] ; (0x80042c4 <UART1_RxCpltCallback+396>)
### 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 <huart1>: {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 <huart1>) 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 <UART1_RxCpltCallback+400>)
0x0800414c UART1_RxCpltCallback+20 ldrb r3, [r3, #0]
!0x0800414e UART1_RxCpltCallback+22 cmp r3, #126 ; 0x7e
0x08004150 UART1_RxCpltCallback+24 bne.w 0x80042ae <UART1_RxCpltCallback+374>
0x08004154 UART1_RxCpltCallback+28 ldr r3, [pc, #364] ; (0x80042c4 <UART1_RxCpltCallback+396>)
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 <huart1>: {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 <htim6>) 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 <HAL_TIM_IRQHandler+212>
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 <HAL_TIM_IRQHandler+340>
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 <HAL_TIM_IRQHandler+230>
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 <htim6>: {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 <HAL_TIM_Base_Start_IT>
0x080014ea main+118 bl 0x8004384 <p_serial_mgr_start>
0x080014ee main+122 bl 0x8004354 <p_serial_mgr_service>
0x080014f2 main+126 mov r4, r0
0x080014f4 main+128 cmp r0, #0
0x080014f6 main+130 beq.n 0x80014ee <main+122>
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 <main+224>)
0x08001502 main+142 bl 0x800407c <p_printf>
### 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 <huart1>) at shared/drivers/p_serial_mgr.c:46
46 if (rxc == 0x7E)
### Assembly ############################################################################################################################
0x08004140 UART1_RxCpltCallback+8 bhi.w 0x80042f8 <UART1_RxCpltCallback+448>
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 <UART1_RxCpltCallback+460>)
0x08004150 UART1_RxCpltCallback+24 ldrb r3, [r3, #0]
0x08004152 UART1_RxCpltCallback+26 cmp r3, #126 ; 0x7e
0x08004154 UART1_RxCpltCallback+28 bne.w 0x80042ea <UART1_RxCpltCallback+434>
0x08004158 UART1_RxCpltCallback+32 ldr r3, [pc, #420] ; (0x8004300 <UART1_RxCpltCallback+456>)
### 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 <huart1>: {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 <huart1>) at shared/drivers/p_serial_mgr.c:46
46 if (rxc == 0x7E)
### Assembly ############################################################################################################################
0x08004140 UART1_RxCpltCallback+8 bhi.w 0x80042f8 <UART1_RxCpltCallback+448>
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 <UART1_RxCpltCallback+460>)
0x08004150 UART1_RxCpltCallback+24 ldrb r3, [r3, #0]
0x08004152 UART1_RxCpltCallback+26 cmp r3, #126 ; 0x7e
0x08004154 UART1_RxCpltCallback+28 bne.w 0x80042ea <UART1_RxCpltCallback+434>
0x08004158 UART1_RxCpltCallback+32 ldr r3, [pc, #420] ; (0x8004300 <UART1_RxCpltCallback+456>)
### 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 <huart1>: {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 <HAL_UART_Receive_IT>
0x080014e4 main+112 ldr r0, [pc, #104] ; (0x8001550 <main+220>)
0x080014e6 main+114 bl 0x80019b8 <HAL_TIM_Base_Start_IT>
0x080014ea main+118 bl 0x8004384 <p_serial_mgr_service+36>
0x080014ee main+122 bl 0x8004354 <p_serial_mgr_init+44>
0x080014f2 main+126 mov r4, r0
0x080014f4 main+128 cmp r0, #0
0x080014f6 main+130 beq.n 0x80014ee <main+122>
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 <huart1>) at shared/drivers/p_serial_mgr.c:46
46 if (rxc == 0x7E)
### Assembly ############################################################################################################################
0x08004140 UART1_RxCpltCallback+8 bhi.w 0x80042f8 <UART1_RxCpltCallback+448>
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 <UART1_RxCpltCallback+460>)
0x08004150 UART1_RxCpltCallback+24 ldrb r3, [r3, #0]
0x08004152 UART1_RxCpltCallback+26 cmp r3, #126 ; 0x7e
0x08004154 UART1_RxCpltCallback+28 bne.w 0x80042ea <UART1_RxCpltCallback+434>
0x08004158 UART1_RxCpltCallback+32 ldr r3, [pc, #420] ; (0x8004300 <UART1_RxCpltCallback+456>)
### 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 <huart1>: {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 <repeats 16 times>, [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 <huart1>) 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 <UART1_RxCpltCallback+460>)
0x08004150 UART1_RxCpltCallback+24 ldrb r3, [r3, #0]
!0x08004152 UART1_RxCpltCallback+26 cmp r3, #126 ; 0x7e
0x08004154 UART1_RxCpltCallback+28 bne.w 0x80042ea <UART1_RxCpltCallback+434>
0x08004158 UART1_RxCpltCallback+32 ldr r3, [pc, #420] ; (0x8004300 <UART1_RxCpltCallback+456>)
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 <huart1>: {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 <repeats 16 times>, [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=<optimized out>) 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 <p_serial_mgr_init+8>
0x08004378 p_serial_mgr_init+40 b.n 0x800437c <p_serial_mgr_init+44>
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 = <optimized out>
#########################################################################################################################################
Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf
### Output/messages #####################################################################################################################
Breakpoint 1, UART1_RxCpltCallback (huart=0x20000a60 <huart1>) 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 <UART1_RxCpltCallback+460>)
0x08004150 UART1_RxCpltCallback+24 ldrb r3, [r3, #0]
!0x08004152 UART1_RxCpltCallback+26 cmp r3, #126 ; 0x7e
0x08004154 UART1_RxCpltCallback+28 bne.w 0x80042ea <UART1_RxCpltCallback+434>
0x08004158 UART1_RxCpltCallback+32 ldr r3, [pc, #420] ; (0x8004300 <UART1_RxCpltCallback+456>)
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 <huart1>: {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 <p_serial_mgr_init+10>
0x08004358 p_serial_mgr_init+8 adds r3, #1
0x0800435a p_serial_mgr_init+10 ldr r2, [pc, #36] ; (0x8004380 <p_serial_mgr_init+48>)
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 <p_serial_mgr_init+42>
0x08004362 p_serial_mgr_init+18 ldr r2, [pc, #28] ; (0x8004380 <p_serial_mgr_init+48>)
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 <Reset_Handler+44>
0x080043ac mc_init+4 bl 0x8004068 <SystemInit>
0x080043b0 mc_init+8 ldr r0, [pc, #48] ; (0x80043e4 <Reset_Handler+48>)
0x080043b2 mc_init+10 ldr r1, [pc, #52] ; (0x80043e8 <Reset_Handler+52>)
~
### 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 <math.h>
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 <p_serial_mgr_service+6>
0x08004364 p_serial_mgr_service+4 adds r3, #1
0x08004366 p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x800438c <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+38>
0x0800436e p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x800438c <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+92>)
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 <p_serial_mgr_service+12>
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 <HAL_UART_Receive_IT>
0x080014e4 main+112 ldr r0, [pc, #104] ; (0x8001550 <main+220>)
0x080014e6 main+114 bl 0x80019b8 <HAL_TIM_Base_Start_IT>
0x080014ea main+118 bl 0x8004390 <p_serial_mgr_start>
0x080014ee main+122 bl 0x8004360 <p_serial_mgr_service>
0x080014f2 main+126 mov r4, r0
0x080014f4 main+128 cmp r0, #0
0x080014f6 main+130 beq.n 0x80014ee <main+122>
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 <huart1>) at shared/drivers/p_serial_mgr.c:46
46 if (rxc == 0x7E)
### Assembly ############################################################################################################################
0x08004140 UART1_RxCpltCallback+8 bhi.w 0x8004302 <UART1_RxCpltCallback+458>
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 <UART1_RxCpltCallback+472>)
0x08004150 UART1_RxCpltCallback+24 ldrb r3, [r3, #0]
0x08004152 UART1_RxCpltCallback+26 cmp r3, #126 ; 0x7e
0x08004154 UART1_RxCpltCallback+28 bne.w 0x80042f4 <UART1_RxCpltCallback+444>
0x08004158 UART1_RxCpltCallback+32 ldr r3, [pc, #432] ; (0x800430c <UART1_RxCpltCallback+468>)
### 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 <huart1>: {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 <p_serial_mgr_service+4>
0x08004384 p_serial_mgr_service+36 b.n 0x8004388 <p_serial_mgr_service+40>
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 <p_serial_mgr_service+6>
0x08004364 p_serial_mgr_service+4 adds r3, #1
0x08004366 p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x800438c <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+38>
0x0800436e p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x800438c <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+6>
0x08004364 p_serial_mgr_service+4 adds r3, #1
0x08004366 p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x800438c <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+6>
0x08004364 p_serial_mgr_service+4 adds r3, #1
0x08004366 p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x800438c <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+6>
0x08004364 p_serial_mgr_service+4 adds r3, #1
0x08004366 p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x800438c <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+6>
0x08004364 p_serial_mgr_service+4 adds r3, #1
0x08004366 p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x800438c <p_serial_mgr_service+44>)
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=<optimized out>) 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 <UART1_RxCpltCallback+226>
0x08004364 UART1_RxCpltCallback+224 adds r3, #1
0x08004366 UART1_RxCpltCallback+226 ldr r2, [pc, #36] ; (0x800438c <UART1_RxCpltCallback+264>)
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 = <optimized out>
#####################################################################################################################
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 <memset+100>)
0x080044bc ? ldrh r2, [r2, #6]
0x080044be ? cmp r2, r3
0x080044c0 ? ble.n 0x80044da <memset+94>
0x080044c2 ? ldr r2, [pc, #28] ; (0x80044e0 <memset+100>)
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 <p_serial_mgr_service+6>
0x08004390 p_serial_mgr_service+4 adds r3, #1
0x08004392 p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x80043b8 <p_serial_mgr_service+44>)
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=<optimized out>) 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 <UART1_RxCpltCallback+250>
0x08004390 UART1_RxCpltCallback+248 adds r3, #1
0x08004392 UART1_RxCpltCallback+250 ldr r2, [pc, #36] ; (0x80043b8 <UART1_RxCpltCallback+288>)
0x08004394 UART1_RxCpltCallback+252 ldrh r2, [r2, #6]
0x08004396 UART1_RxCpltCallback+254 cmp r2, r3
0x08004398 UART1_RxCpltCallback+256 ble.n 0x80043b2 <UART1_RxCpltCallback+282>
0x0800439a UART1_RxCpltCallback+258 ldr r2, [pc, #28] ; (0x80043b8 <UART1_RxCpltCallback+288>)
### 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 = <optimized out>
#####################################################################################################################
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 <p_uart_async_write_byte+44>)
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 <LoopForever+2>
0x08004518 ? bl 0x8004194 <SystemInit>
0x0800451c ? ldr r0, [pc, #48] ; (0x8004550 <LoopForever+6>)
0x0800451e ? ldr r1, [pc, #52] ; (0x8004554 <LoopForever+10>)
0x08004520 ? ldr r2, [pc, #52] ; (0x8004558 <LoopForever+14>)
0x08004522 ? movs r3, #0
0x08004524 ? b.n 0x800452c <Reset_Handler+24>
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 <p_uart_async_write_byte+48>)
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 <p_uart_async_write_byte+48>)
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 <p_uart_async_write_byte+52>)
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 <p_uart_async_write_byte+52>)
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 <p_uart_async_write_byte+52>)
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 <p_uart_async_write_byte+56>)
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 <p_uart_async_write_byte+52>)
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 <p_uart_async_write_byte+52>)
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 <p_uart_async_write_byte+56>)
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 <p_uart_async_write_byte+52>)
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 <p_uart_async_write_byte+44>)
### 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 <p_uart_async_write_byte+44>)
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 <p_uart_async_write_byte+44>)
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 <p_uart_async_write_byte+48>)
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 = <optimized out>
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=<optimized out>) 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 <UART1_RxCpltCallback+476>)
0x08004170 UART1_RxCpltCallback+4 ldrb r0, [r3, #0]
0x08004172 UART1_RxCpltCallback+6 bl 0x80040f8 <p_uart_async_write_byte>
0x08004176 UART1_RxCpltCallback+10 ldr r3, [pc, #468] ; (0x800434c <UART1_RxCpltCallback+480>)
0x08004178 UART1_RxCpltCallback+12 ldrb r3, [r3, #0]
0x0800417a UART1_RxCpltCallback+14 cmp r3, #4
0x0800417c UART1_RxCpltCallback+16 bhi.w 0x800433e <UART1_RxCpltCallback+466>
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 = <optimized out>
#####################################################################################################################
Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target
[Inferior 1 (Remote target) detached]
UART1_RxCpltCallback (huart=<optimized out>) 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 <UART1_RxCpltCallback+476>)
0x08004170 UART1_RxCpltCallback+4 ldrb r0, [r3, #0]
0x08004172 UART1_RxCpltCallback+6 bl 0x80040f8 <p_uart_async_write_byte>
0x08004176 UART1_RxCpltCallback+10 ldr r3, [pc, #468] ; (0x800434c <UART1_RxCpltCallback+480>)
0x08004178 UART1_RxCpltCallback+12 ldrb r3, [r3, #0]
0x0800417a UART1_RxCpltCallback+14 cmp r3, #4
0x0800417c UART1_RxCpltCallback+16 bhi.w 0x800433e <UART1_RxCpltCallback+466>
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 = <optimized out>
#####################################################################################################################
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 <p_serial_mgr_service+4>
0x080043c0 p_serial_mgr_service+36 b.n 0x80043c4 <p_serial_mgr_service+40>
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 <p_uart_async_write_byte+36>)
0x0800422a p_uart_async_write_byte+6 str r0, [sp, #0]
0x0800422c p_uart_async_write_byte+8 ldr r3, [pc, #28] ; (0x800424c <p_uart_async_write_byte+40>)
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 <p_uart_async_write_byte+36>)
0x0800422a p_uart_async_write_byte+6 str r0, [sp, #0]
0x0800422c p_uart_async_write_byte+8 ldr r3, [pc, #28] ; (0x800424c <p_uart_async_write_byte+40>)
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 <p_uart_async_write_byte+40>)
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 <p_uart_async_write_byte+44>)
0x0800423e p_uart_async_write_byte+26 ldr r0, [r3, #0]
0x08004240 p_uart_async_write_byte+28 bl 0x8003624 <HAL_UART_Transmit_IT>
### 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 = <optimized out>
#####################################################################################################################
### 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=<optimized out>) 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 <UART1_RxCpltCallback+476>)
0x08004298 UART1_RxCpltCallback+4 ldrb r0, [r3, #0]
0x0800429a UART1_RxCpltCallback+6 bl 0x8004224 <p_uart_async_write_byte>
0x0800429e UART1_RxCpltCallback+10 ldr r3, [pc, #468] ; (0x8004474 <UART1_RxCpltCallback+480>)
0x080042a0 UART1_RxCpltCallback+12 ldrb r3, [r3, #0]
0x080042a2 UART1_RxCpltCallback+14 cmp r3, #4
0x080042a4 UART1_RxCpltCallback+16 bhi.w 0x8004466 <UART1_RxCpltCallback+466>
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 = <optimized out>
#####################################################################################################################
### 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 <UART1_RxCpltCallback+466>
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 <UART1_RxCpltCallback+476>)
0x080042b4 UART1_RxCpltCallback+32 ldrb r3, [r3, #0]
0x080042b6 UART1_RxCpltCallback+34 cmp r3, #126 ; 0x7e
0x080042b8 UART1_RxCpltCallback+36 bne.w 0x8004458 <UART1_RxCpltCallback+452>
0x080042bc UART1_RxCpltCallback+40 ldr r3, [pc, #436] ; (0x8004474 <UART1_RxCpltCallback+480>)
### 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 = <optimized out>
#####################################################################################################################
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 <p_uart_async_write_byte+36>)
0x0800422a p_uart_async_write_byte+6 str r0, [sp, #0]
0x0800422c p_uart_async_write_byte+8 ldr r3, [pc, #28] ; (0x800424c <p_uart_async_write_byte+40>)
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 <p_uart_async_write_byte+36>)
0x0800422a p_uart_async_write_byte+6 str r0, [sp, #0]
0x0800422c p_uart_async_write_byte+8 ldr r3, [pc, #28] ; (0x800424c <p_uart_async_write_byte+40>)
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 <p_uart_async_write_byte+36>)
0x0800422a p_uart_async_write_byte+6 str r0, [sp, #0]
0x0800422c p_uart_async_write_byte+8 ldr r3, [pc, #28] ; (0x800424c <p_uart_async_write_byte+40>)
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 <p_uart_async_write_byte+36>)
0x0800422a p_uart_async_write_byte+6 str r0, [sp, #0]
0x0800422c p_uart_async_write_byte+8 ldr r3, [pc, #28] ; (0x800424c <p_uart_async_write_byte+40>)
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 <p_printf+28>
0x080014e4 main+112 ldr r0, [pc, #104] ; (0x8001550 <main+220>)
0x080014e6 main+114 bl 0x80019b8 <HAL_TIM_Base_Start_IT>
0x080014ea main+118 bl 0x80044f4 <memset+104>
0x080014ee main+122 bl 0x80044c4 <memset+56>
0x080014f2 main+126 mov r4, r0
0x080014f4 main+128 cmp r0, #0
0x080014f6 main+130 beq.n 0x80014ee <main+122>
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 <USART1_IRQHandler+4>)
0x080014e6 main+166 bl 0x80019b8 <HAL_TIM_Base_Start_IT+52>
0x080014ea main+170 bl 0x800430c <UART1_RxCpltCallback+24>
0x080014ee main+174 bl 0x80042dc <p_cb_serial_pkt_init+72>
0x080014f2 main+178 mov r4, r0
0x080014f4 main+180 cmp r0, #0
0x080014f6 main+182 beq.n 0x80014ee <main+174>
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 <USART1_IRQHandler+8>)
### 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 <memset+140>
0x08004370 ? b.n 0x8004374 <vsnprintf+12>
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 <p_serial_mgr_service+38>
0x080041e2 p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x8004200 <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+4>
### 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 <p_serial_mgr_service+4>
0x080041f8 p_serial_mgr_service+36 b.n 0x80041fc <p_serial_mgr_service+40>
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 <p_serial_mgr_service+4>
0x080041f8 p_serial_mgr_service+36 b.n 0x80041fc <p_serial_mgr_service+40>
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 <p_serial_mgr_service+6>
0x080041d8 p_serial_mgr_service+4 adds r3, #1
0x080041da p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x8004200 <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+38>
0x080041e2 p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x8004200 <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+6>
0x080041d8 p_serial_mgr_service+4 adds r3, #1
0x080041da p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x8004200 <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+38>
0x080041e2 p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x8004200 <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+38>
0x080041e2 p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x8004200 <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+4>
0x080041f8 p_serial_mgr_service+36 b.n 0x80041fc <p_serial_mgr_service+40>
### 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 <p_serial_mgr_start+16>)
0x0800420a p_serial_mgr_start+6 ldr r3, [pc, #12] ; (0x8004218 <p_serial_mgr_start+20>)
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 <p_serial_mgr_service+6>
0x080041d8 p_serial_mgr_service+4 adds r3, #1
0x080041da p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x8004200 <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+38>
### 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 <p_serial_mgr_start+16>)
0x0800420a p_serial_mgr_start+6 ldr r3, [pc, #12] ; (0x8004218 <p_serial_mgr_start+20>)
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 <p_serial_mgr_service+6>
0x080041d8 p_serial_mgr_service+4 adds r3, #1
0x080041da p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x8004200 <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+38>
0x080041e2 p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x8004200 <p_serial_mgr_service+44>)
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' <repeats 255 times>,
src_addr = 0 '\000',
dest_addr = 0 '\000',
checksum = 0 '\000',
len = 0 '\000',
b_ready = false
}
$2 = {
frame_data = '\000' <repeats 255 times>,
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 <p_serial_mgr_service+6>
0x080041d8 p_serial_mgr_service+4 adds r3, #1
0x080041da p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x8004200 <p_serial_mgr_service+44>)
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' <repeats 255 times>,src_addr = 0 '\000',dest_addr = 0 '\000',checksum = 0 '\000…
$$0 = {frame_data = '\000' <repeats 255 times>,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 <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+38>
0x080041e2 p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x8004200 <p_serial_mgr_service+44>)
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' <repeats 255 times>,src_addr = 0 '\000',dest_addr = 0 '\000',checksum = 0 '\000…
$$0 = {frame_data = '\000' <repeats 255 times>,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 <p_serial_mgr_service+6>
0x080041d8 p_serial_mgr_service+4 adds r3, #1
0x080041da p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x8004200 <p_serial_mgr_service+44>)
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' <repeats 255 times>,src_addr = 0 '\000',dest_addr = 0 '\000',checksum = 0 '\000…
$$1 = {frame_data = '\000' <repeats 255 times>,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 <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+38>
0x080041e2 p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x8004200 <p_serial_mgr_service+44>)
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' <repeats 255 times>,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 <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+38>
0x080041e2 p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x8004200 <p_serial_mgr_service+44>)
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' <repeats 255 times>,
src_addr = 0 '\000',
dest_addr = 0 '\000',
checksum = 0 '\000',
len = 0 '\000',
b_ready = false
}
$9 = (serial_pkt_t *) 0x20000bdc <pkt_bank>
$10 = {
frame_data = '\000' <repeats 255 times>,
src_addr = 0 '\000',
dest_addr = 0 '\000',
checksum = 0 '\000',
len = 0 '\000',
b_ready = false
}
$11 = {
frame_data = '\000' <repeats 255 times>,
src_addr = 0 '\000',
dest_addr = 0 '\000',
checksum = 0 '\000',
len = 0 '\000',
b_ready = false
}
$12 = {
frame_data = '\000' <repeats 255 times>,
src_addr = 0 '\000',
dest_addr = 0 '\000',
checksum = 0 '\000',
len = 0 '\000',
b_ready = false
}
$13 = {
frame_data = '\000' <repeats 255 times>,
src_addr = 0 '\000',
dest_addr = 0 '\000',
checksum = 0 '\000',
len = 0 '\000',
b_ready = false
}
$14 = {
frame_data = '\000' <repeats 255 times>,
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 <p_serial_mgr_service+6>
0x080041d8 p_serial_mgr_service+4 adds r3, #1
0x080041da p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x8004200 <p_serial_mgr_service+44>)
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' <repeats 255 times>,src_addr = 0 '\000',dest_addr = 0 '\000',checksum = 0 '\000…
$$1 = {frame_data = '\000' <repeats 255 times>,src_addr = 0 '\000',dest_addr = 0 '\000',checksum = 0 '\000…
$$0 = {frame_data = '\000' <repeats 255 times>,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 <p_uart_init+10>
0x080041d8 p_uart_init+8 adds r3, #1
0x080041da p_uart_init+10 ldr r2, [pc, #36] ; (0x8004200 <p_uart_async_write_byte+16>)
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 <memset+48>
0x08004370 ? b.n 0x8004374 <memset+84>
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 <p_serial_mgr_service+6>
0x08004234 p_serial_mgr_service+4 adds r3, #1
0x08004236 p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x800425c <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+38>
0x0800423e p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x800425c <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+6>
0x08004234 p_serial_mgr_service+4 adds r3, #1
0x08004236 p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x800425c <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+38>
0x0800423e p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x800425c <p_serial_mgr_service+44>)
### 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 <p_serial_mgr_service+6>
0x08004234 p_serial_mgr_service+4 adds r3, #1
0x08004236 p_serial_mgr_service+6 ldr r2, [pc, #36] ; (0x800425c <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+38>
0x0800423e p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x800425c <p_serial_mgr_service+44>)
### 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 <UART1_RxCpltCallback+6>
0x0800423e p_serial_mgr_start+10 ldr r2, [pc, #28] ; (0x800425c <UART1_RxCpltCallback+12>)
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 <HardFault_Handler>
~
~
~
~
### 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 <p_serial_mgr_service+38>
0x08004212 p_serial_mgr_service+14 ldr r2, [pc, #28] ; (0x8004230 <p_serial_mgr_service+44>)
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 <p_serial_mgr_service+4>
0x08004228 p_serial_mgr_service+36 b.n 0x800422c <p_serial_mgr_service+40>
### 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 <p_uart_async_write_byte+32>
0x08004228 p_serial_mgr_init+12 b.n 0x800422c <p_serial_mgr_init+16>
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 <huart1>, 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 <UART_WaitOnFlagUntilTimeout+16>
0x08003bee UART_WaitOnFlagUntilTimeout+40 bl 0x8002180 <HAL_GetTick>
0x08003bf2 UART_WaitOnFlagUntilTimeout+44 sub.w r0, r0, r9
0x08003bf6 UART_WaitOnFlagUntilTimeout+48 cmp r0, r8
0x08003bf8 UART_WaitOnFlagUntilTimeout+50 bhi.n 0x8003c56 <UART_WaitOnFlagUntilTimeout+144>
0x08003bfa UART_WaitOnFlagUntilTimeout+52 cmp.w r8, #0
0x08003bfe UART_WaitOnFlagUntilTimeout+56 beq.n 0x8003c56 <UART_WaitOnFlagUntilTimeout+144>
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 <huart1>: {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 <huart1>, 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 <UART_WaitOnFlagUntilTimeout+144>
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 <UART_WaitOnFlagUntilTimeout+16>
0x08003c0a UART_WaitOnFlagUntilTimeout+68 ldr r2, [r3, #28]
0x08003c0c UART_WaitOnFlagUntilTimeout+70 tst.w r2, #2048 ; 0x800
0x08003c10 UART_WaitOnFlagUntilTimeout+74 beq.n 0x8003bd6 <UART_WaitOnFlagUntilTimeout+16>
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 <huart1>: {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 <HAL_GetTick+8>)
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 <huart2>, 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 <HAL_GetTick>
0x08003bf2 UART_WaitOnFlagUntilTimeout+44 sub.w r0, r0, r9
0x08003bf6 UART_WaitOnFlagUntilTimeout+48 cmp r0, r8
0x08003bf8 UART_WaitOnFlagUntilTimeout+50 bhi.n 0x8003c56 <UART_WaitOnFlagUntilTimeout+144>
0x08003bfa UART_WaitOnFlagUntilTimeout+52 cmp.w r8, #0
0x08003bfe UART_WaitOnFlagUntilTimeout+56 beq.n 0x8003c56 <UART_WaitOnFlagUntilTimeout+144>
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 <UART_WaitOnFlagUntilTimeout+16>
### 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 <huart2>: {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 <huart1>, Flag=32, Status=<optimized out>, 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 <UART_WaitOnFlagUntilTimeout+128>
0x08003bfa UART_WaitOnFlagUntilTimeout+36 cmp.w r8, #0
0x08003bfe UART_WaitOnFlagUntilTimeout+40 beq.n 0x8003c56 <UART_WaitOnFlagUntilTimeout+128>
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 <UART_WaitOnFlagUntilTimeout>
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 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…, Flag = 32, Status = <optimized out>, 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 <huart1>, Flag=32, Status=<optimized out>, 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 <UART_WaitOnFlagUntilTimeout+148>
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 <UART_WaitOnFlagUntilTimeout+20>
0x08003c1a UART_WaitOnFlagUntilTimeout+72 ldr r2, [r3, #28]
0x08003c1c UART_WaitOnFlagUntilTimeout+74 tst.w r2, #2048 ; 0x800
0x08003c20 UART_WaitOnFlagUntilTimeout+78 beq.n 0x8003be6 <UART_WaitOnFlagUntilTimeout+20>
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 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…, Flag = 32, Status = <optimized out>, 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 <RCC_SetFlashLatencyFromMSIRange+8>)
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 = <optimized out>, latency = <optimized out>
#####################################################################################################################
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 <huart2>, Flag=128, Status=<optimized out>, 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 <huart2>: {Instance = 0x40004400,Init = {BaudRate = 115200,WordLength = 0,StopBi…, Flag = 128, Status = <optimized out>, 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 <p_serial_mgr_service+16>)
0x0800424a p_serial_mgr_service+2 ldrb r0, [r3, #0]
0x0800424c p_serial_mgr_service+4 cbnz r0, 0x8004250 <p_serial_mgr_service+8>
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 <p_serial_mgr_service+6>
### 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 <p_serial_mgr_start+4>)
0x0800424a p_serial_mgr_service+2 ldrb r0, [r3, #0]
0x0800424c p_serial_mgr_service+4 cbnz r0, 0x8004250 <p_serial_mgr_service+8>
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 <p_serial_mgr_service+8>)
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 <memset+16>
0x080014ea main+170 bl 0x8004254 <p_serial_mgr_start+16>
0x080014ee main+174 bl 0x8004248 <p_serial_mgr_start+4>
0x080014f2 main+178 cmp r0, #0
0x080014f4 main+180 beq.n 0x80014ee <main+174>
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' <repeats 255 times>
#####################################################################################################################
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 <p_serial_mgr_service+8>)
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 <huart1>) at shared/drivers/p_serial_mgr.c:34
34 b_go = true;
### Assembly ########################################################################################################
~
~
~
~
~
!0x0800420c UART1_RxCpltCallback+0 ldr r3, [pc, #4] ; (0x8004214 <UART1_RxCpltCallback+8>)
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 <huart1>: {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 <p_serial_mgr_service+8>)
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 <huart1>) at shared/drivers/p_serial_mgr.c:34
34 b_go = true;
### Assembly ########################################################################################################
~
~
~
~
~
!0x0800420c UART1_RxCpltCallback+0 ldr r3, [pc, #4] ; (0x8004214 <UART1_RxCpltCallback+8>)
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 <huart1>: {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 <memset>
0x080014ea main+170 bl 0x8004244 <p_serial_mgr_start>
0x080014ee main+174 bl 0x8004238 <p_serial_mgr_service>
0x080014f2 main+178 cmp r0, #0
0x080014f4 main+180 beq.n 0x80014ee <main+174>
!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 <main+200>)
0x08001500 main+192 bl 0x8003d5e <HAL_UART_Receive>
### 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' <repeats 255 times>
#####################################################################################################################
### 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 <main+200>)
0x08001500 main+192 bl 0x8003d5e <HAL_UART_Receive>
0x08001504 main+196 movs r4, #0
0x08001506 main+198 b.n 0x80014d4 <main+148>
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' <repeats 255 times>
#####################################################################################################################
### 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 <memset>
0x080014c8 main+136 b.n 0x80014ee <main+174>
0x080014ca main+138 ldrb.w r0, [sp, r4]
0x080014ce main+142 bl 0x80041d8 <p_uart_async_write_byte>
0x080014d2 main+146 adds r4, #1
0x080014d4 main+148 cmp r4, #19
0x080014d6 main+150 ble.n 0x80014ca <main+138>
### 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' <repeats 255 times>
#####################################################################################################################
### 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 <memset>
0x080014c8 main+136 b.n 0x80014ee <main+174>
0x080014ca main+138 ldrb.w r0, [sp, r4]
0x080014ce main+142 bl 0x80041d8 <p_uart_async_write_byte>
0x080014d2 main+146 adds r4, #1
0x080014d4 main+148 cmp r4, #19
0x080014d6 main+150 ble.n 0x80014ca <main+138>
0x080014d8 main+152 ldr r0, [pc, #68] ; (0x8001520 <main+224>)
0x080014da main+154 bl 0x800415c <p_printf>
### 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' <repeats 255 times>
#####################################################################################################################
### 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 <memset>
0x080014c8 main+136 b.n 0x80014ee <main+174>
0x080014ca main+138 ldrb.w r0, [sp, r4]
0x080014ce main+142 bl 0x80041d8 <p_uart_async_write_byte>
0x080014d2 main+146 adds r4, #1
0x080014d4 main+148 cmp r4, #19
0x080014d6 main+150 ble.n 0x80014ca <main+138>
### 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' <repeats 255 times>
#####################################################################################################################
### 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 <memset>
0x080014c8 main+136 b.n 0x80014ee <main+174>
0x080014ca main+138 ldrb.w r0, [sp, r4]
0x080014ce main+142 bl 0x80041d8 <p_uart_async_write_byte>
0x080014d2 main+146 adds r4, #1
0x080014d4 main+148 cmp r4, #19
0x080014d6 main+150 ble.n 0x80014ca <main+138>
0x080014d8 main+152 ldr r0, [pc, #68] ; (0x8001520 <main+224>)
0x080014da main+154 bl 0x800415c <p_printf>
### 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' <repeats 255 times>
#####################################################################################################################
### 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 <memset>
0x080014c8 main+136 b.n 0x80014ee <main+174>
0x080014ca main+138 ldrb.w r0, [sp, r4]
0x080014ce main+142 bl 0x80041d8 <p_uart_async_write_byte>
0x080014d2 main+146 adds r4, #1
0x080014d4 main+148 cmp r4, #19
0x080014d6 main+150 ble.n 0x80014ca <main+138>
### 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' <repeats 255 times>
#####################################################################################################################
### 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 <p_uart_async_write_byte+40>)
0x080041de p_uart_async_write_byte+6 str r0, [sp, #0]
0x080041e0 p_uart_async_write_byte+8 ldr r3, [pc, #32] ; (0x8004204 <p_uart_async_write_byte+44>)
### 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 <memset>
0x080014c8 main+136 b.n 0x80014ee <main+174>
0x080014ca main+138 ldrb.w r0, [sp, r4]
0x080014ce main+142 bl 0x80041d8 <p_uart_async_write_byte>
0x080014d2 main+146 adds r4, #1
0x080014d4 main+148 cmp r4, #19
0x080014d6 main+150 ble.n 0x80014ca <main+138>
0x080014d8 main+152 ldr r0, [pc, #68] ; (0x8001520 <main+224>)
0x080014da main+154 bl 0x800415c <p_printf>
### 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' <repeats 255 times>
#####################################################################################################################
"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 <memset>
0x080014c8 main+136 b.n 0x80014ee <main+174>
0x080014ca main+138 ldrb.w r0, [sp, r4]
0x080014ce main+142 bl 0x80041d8 <p_uart_async_write_byte>
0x080014d2 main+146 adds r4, #1
0x080014d4 main+148 cmp r4, #19
0x080014d6 main+150 ble.n 0x80014ca <main+138>
### 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' <repeats 255 times>
#####################################################################################################################
### 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 <memset>
0x080014c8 main+136 b.n 0x80014ee <main+174>
0x080014ca main+138 ldrb.w r0, [sp, r4]
0x080014ce main+142 bl 0x80041d8 <p_uart_async_write_byte>
0x080014d2 main+146 adds r4, #1
0x080014d4 main+148 cmp r4, #19
0x080014d6 main+150 ble.n 0x80014ca <main+138>
0x080014d8 main+152 ldr r0, [pc, #68] ; (0x8001520 <main+224>)
0x080014da main+154 bl 0x800415c <p_printf>
### 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' <repeats 255 times>
#####################################################################################################################
### 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 <memset>
0x080014c8 main+136 b.n 0x80014ee <main+174>
0x080014ca main+138 ldrb.w r0, [sp, r4]
0x080014ce main+142 bl 0x80041d8 <p_uart_async_write_byte>
0x080014d2 main+146 adds r4, #1
0x080014d4 main+148 cmp r4, #19
0x080014d6 main+150 ble.n 0x80014ca <main+138>
### 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' <repeats 255 times>
#####################################################################################################################
### 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 <memset>
0x080014c8 main+136 b.n 0x80014ee <main+174>
0x080014ca main+138 ldrb.w r0, [sp, r4]
0x080014ce main+142 bl 0x80041d8 <p_uart_async_write_byte>
0x080014d2 main+146 adds r4, #1
0x080014d4 main+148 cmp r4, #19
0x080014d6 main+150 ble.n 0x80014ca <main+138>
0x080014d8 main+152 ldr r0, [pc, #68] ; (0x8001520 <main+224>)
0x080014da main+154 bl 0x800415c <p_printf>
### 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' <repeats 255 times>
#####################################################################################################################
### 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 <memset>
0x080014c8 main+136 b.n 0x80014ee <main+174>
0x080014ca main+138 ldrb.w r0, [sp, r4]
0x080014ce main+142 bl 0x80041d8 <p_uart_async_write_byte>
0x080014d2 main+146 adds r4, #1
0x080014d4 main+148 cmp r4, #19
0x080014d6 main+150 ble.n 0x80014ca <main+138>
### 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' <repeats 255 times>
#####################################################################################################################
### 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 <memset>
0x080014c8 main+136 b.n 0x80014ee <main+174>
0x080014ca main+138 ldrb.w r0, [sp, r4]
0x080014ce main+142 bl 0x80041d8 <p_uart_async_write_byte>
0x080014d2 main+146 adds r4, #1
0x080014d4 main+148 cmp r4, #19
0x080014d6 main+150 ble.n 0x80014ca <main+138>
0x080014d8 main+152 ldr r0, [pc, #68] ; (0x8001520 <main+224>)
0x080014da main+154 bl 0x800415c <p_printf>
### 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' <repeats 255 times>
#####################################################################################################################
### 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 <memset>
0x080014c8 main+136 b.n 0x80014ee <main+174>
0x080014ca main+138 ldrb.w r0, [sp, r4]
0x080014ce main+142 bl 0x80041d8 <p_uart_async_write_byte>
0x080014d2 main+146 adds r4, #1
0x080014d4 main+148 cmp r4, #19
0x080014d6 main+150 ble.n 0x80014ca <main+138>
### 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' <repeats 255 times>
#####################################################################################################################
### 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 <memset>
0x080014c8 main+136 b.n 0x80014ee <main+174>
0x080014ca main+138 ldrb.w r0, [sp, r4]
0x080014ce main+142 bl 0x80041d8 <p_uart_async_write_byte>
0x080014d2 main+146 adds r4, #1
0x080014d4 main+148 cmp r4, #19
0x080014d6 main+150 ble.n 0x80014ca <main+138>
0x080014d8 main+152 ldr r0, [pc, #68] ; (0x8001520 <main+224>)
0x080014da main+154 bl 0x800415c <p_printf>
### 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' <repeats 255 times>
#####################################################################################################################
"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 <memset>
0x080014c8 main+136 b.n 0x80014ee <main+174>
0x080014ca main+138 ldrb.w r0, [sp, r4]
0x080014ce main+142 bl 0x80041d8 <p_uart_async_write_byte>
0x080014d2 main+146 adds r4, #1
0x080014d4 main+148 cmp r4, #19
0x080014d6 main+150 ble.n 0x80014ca <main+138>
### 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' <repeats 255 times>
#####################################################################################################################
"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 <p_serial_mgr_service+8>)
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 <p_serial_mgr_service+8>)
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 <memset>
0x080014ea main+170 bl 0x8004244 <p_serial_mgr_start>
0x080014ee main+174 bl 0x8004238 <p_serial_mgr_service>
0x080014f2 main+178 cmp r0, #0
0x080014f4 main+180 beq.n 0x80014ee <main+174>
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' <repeats 255 times>
#####################################################################################################################
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 <memset>
0x080014ea main+170 bl 0x8004244 <p_serial_mgr_start>
0x080014ee main+174 bl 0x8004238 <p_serial_mgr_service>
0x080014f2 main+178 cmp r0, #0
0x080014f4 main+180 beq.n 0x80014ee <main+174>
!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 <main+200>)
0x08001500 main+192 bl 0x8003d5e <HAL_UART_Receive>
### 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' <repeats 255 times>
#####################################################################################################################
### 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 <main+200>)
0x08001500 main+192 bl 0x8003d5e <HAL_UART_Receive>
0x08001504 main+196 movs r4, #0
0x08001506 main+198 b.n 0x80014d4 <main+148>
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' <repeats 255 times>
#####################################################################################################################
$1 = <optimized out>
`/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 <memset>
0x080014ea main+170 bl 0x8004248 <p_serial_mgr_start>
0x080014ee main+174 bl 0x800423c <p_serial_mgr_service>
0x080014f2 main+178 cmp r0, #0
0x080014f4 main+180 beq.n 0x80014ee <main+174>
!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 <main+204>)
0x08001500 main+192 bl 0x8003d62 <HAL_UART_Receive>
### 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 = <optimized out>
### 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' <repeats 255 times>
#####################################################################################################################
### 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 <main+204>)
0x08001500 main+192 bl 0x8003d62 <HAL_UART_Receive>
0x08001504 main+196 strb.w r0, [sp, #7]
0x08001508 main+200 movs r4, #0
0x0800150a main+202 b.n 0x80014d4 <main+148>
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 = <optimized out>
### 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' <repeats 255 times>
#####################################################################################################################
$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 <memset>
0x080014ea main+170 bl 0x800424c <p_serial_mgr_start>
0x080014ee main+174 bl 0x8004240 <p_serial_mgr_service>
0x080014f2 main+178 cmp r0, #0
0x080014f4 main+180 beq.n 0x80014ee <main+174>
!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 <main+208>)
0x08001502 main+194 bl 0x8003d66 <HAL_UART_Receive>
### 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 = <optimized out>
$$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' <repeats 255 times>
#####################################################################################################################
### 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 <main+208>)
0x08001502 main+194 bl 0x8003d66 <HAL_UART_Receive>
0x08001506 main+198 strb.w r0, [sp, #7]
0x0800150a main+202 movs r4, #0
0x0800150c main+204 b.n 0x80014d4 <main+148>
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 = <optimized out>
$$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' <repeats 255 times>
#####################################################################################################################
`/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 <memset>
0x080014ea main+170 bl 0x8004250 <p_serial_mgr_start>
0x080014ee main+174 bl 0x8004244 <p_serial_mgr_service>
0x080014f2 main+178 cmp r0, #0
0x080014f4 main+180 beq.n 0x80014ee <main+174>
!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 <main+212>)
0x08001502 main+194 bl 0x8003d6a <HAL_UART_Receive>
### 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 = <optimized out>
$$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' <repeats 255 times>
#####################################################################################################################
### 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 <memset>
0x080014c8 main+136 b.n 0x80014ee <main+174>
0x080014ca main+138 add r3, sp, #8
0x080014cc main+140 ldrb r0, [r3, r4]
0x080014ce main+142 bl 0x80041e4 <p_uart_async_write_byte>
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 = <optimized out>
$$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' <repeats 255 times>
#####################################################################################################################
### 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 <memset>
0x080014c8 main+136 b.n 0x80014ee <main+174>
0x080014ca main+138 add r3, sp, #8
0x080014cc main+140 ldrb r0, [r3, r4]
0x080014ce main+142 bl 0x80041e4 <p_uart_async_write_byte>
0x080014d2 main+146 adds r4, #1
0x080014d4 main+148 cmp r4, #19
0x080014d6 main+150 ble.n 0x80014ca <main+138>
0x080014d8 main+152 ldr r0, [pc, #80] ; (0x800152c <main+236>)
0x080014da main+154 bl 0x8004168 <p_printf>
### 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 = <optimized out>
$$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' <repeats 255 times>
#####################################################################################################################
### 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 <memset>
0x080014c8 main+136 b.n 0x80014ee <main+174>
0x080014ca main+138 add r3, sp, #8
0x080014cc main+140 ldrb r0, [r3, r4]
0x080014ce main+142 bl 0x80041e4 <p_uart_async_write_byte>
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 = <optimized out>
$$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' <repeats 255 times>
#####################################################################################################################
### 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 <memset>
0x080014c8 main+136 b.n 0x80014ee <main+174>
0x080014ca main+138 add r3, sp, #8
0x080014cc main+140 ldrb r0, [r3, r4]
0x080014ce main+142 bl 0x80041e4 <p_uart_async_write_byte>
0x080014d2 main+146 adds r4, #1
0x080014d4 main+148 cmp r4, #19
0x080014d6 main+150 ble.n 0x80014ca <main+138>
0x080014d8 main+152 ldr r0, [pc, #80] ; (0x800152c <main+236>)
0x080014da main+154 bl 0x8004168 <p_printf>
### 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 = <optimized out>
$$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' <repeats 255 times>
#####################################################################################################################
### 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 <memset>
0x080014c8 main+136 b.n 0x80014ee <main+174>
0x080014ca main+138 add r3, sp, #8
0x080014cc main+140 ldrb r0, [r3, r4]
0x080014ce main+142 bl 0x80041e4 <p_uart_async_write_byte>
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 = <optimized out>
$$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' <repeats 255 times>
#####################################################################################################################
$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 <memset>
0x080014c8 main+136 b.n 0x80014ee <main+174>
0x080014ca main+138 add r3, sp, #8
0x080014cc main+140 ldrb r0, [r3, r4]
0x080014ce main+142 bl 0x80041e4 <p_uart_async_write_byte>
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' <repeats 255 times>
#####################################################################################################################
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 <memset>
0x080014ea main+170 bl 0x8004250 <p_serial_mgr_start>
0x080014ee main+174 bl 0x8004244 <p_serial_mgr_service>
0x080014f2 main+178 cmp r0, #0
0x080014f4 main+180 beq.n 0x80014ee <main+174>
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' <repeats 255 times>
#####################################################################################################################
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 <huart1>, Flag=32, Status=<optimized out>, 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 <UART_WaitOnFlagUntilTimeout+152>
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 <UART_WaitOnFlagUntilTimeout+24>
0x08003c06 UART_WaitOnFlagUntilTimeout+76 ldr r2, [r3, #28]
0x08003c08 UART_WaitOnFlagUntilTimeout+78 tst.w r2, #2048 ; 0x800
0x08003c0c UART_WaitOnFlagUntilTimeout+82 beq.n 0x8003bd2 <UART_WaitOnFlagUntilTimeout+24>
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 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…, Flag = 32, Status = <optimized out>, 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 <memset>
0x080014ea main+170 bl 0x8004248 <p_serial_mgr_start>
0x080014ee main+174 bl 0x800423c <p_serial_mgr_service>
0x080014f2 main+178 cmp r0, #0
0x080014f4 main+180 beq.n 0x80014ee <main+174>
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' <repeats 255 times>
#####################################################################################################################
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 <p_serial_mgr_service+8>)
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 <memset>
0x080014ea main+170 bl 0x8004248 <p_serial_mgr_start>
0x080014ee main+174 bl 0x800423c <p_serial_mgr_service>
0x080014f2 main+178 cmp r0, #0
0x080014f4 main+180 beq.n 0x80014ee <main+174>
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' <repeats 255 times>
#####################################################################################################################
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]
0x0800423c in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:42
42 {
### Assembly ########################################################################################################
0x08004232 p_serial_mgr_service+2 movs r0, #0
0x08004234 p_serial_mgr_service+4 tst r1, r2
0x08004236 p_serial_mgr_service+6 lsrs r0, r0, #32
0x08004238 p_serial_mgr_service+8 lsrs r0, r5, #15
0x0800423a p_serial_mgr_service+10 movs r0, #0
0x0800423c p_serial_mgr_service+12 ldr r3, [pc, #4] ; (0x8004244 <p_serial_mgr_service+20>)
0x0800423e p_serial_mgr_service+14 ldrb r0, [r3, #0]
0x08004240 p_serial_mgr_service+16 bx lr
0x08004242 p_serial_mgr_service+18 nop
0x08004244 p_serial_mgr_service+20 lsrs r0, r5, #15
### 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 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 ##########################################################################################################
32 sstate = SS_START;
33 }
34 }
35
36 void p_serial_mgr_init(UART_HandleTypeDef *huart)
37 {
38 _serial_huart_inst = huart;
39 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
40 }
41 void p_serial_mgr_service(void)
42 {
43 if (sstate == SS_START)
44 {
45 volatile HAL_StatusTypeDef ret;
46 ret = HAL_UART_Receive(_serial_huart_inst, rxb, MAX_MESSAGE_LEN, 10);
47
48 for (int ind = 0; ind < 20; ind++)
49 {
50 p_uart_async_write_byte(rxb[ind]);
51 }
### Stack ###########################################################################################################
[0] from 0x0800423c in p_serial_mgr_service+12 at shared/drivers/p_serial_mgr.c:42
[1] from 0x03438c00
### Threads #########################################################################################################
[1] id 0 from 0x0800423c in p_serial_mgr_service+12 at shared/drivers/p_serial_mgr.c:42
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x9688 lma 0x80001c0
Loading section .rodata, size 0x480 lma 0x8009848
Loading section .ARM, size 0x8 lma 0x8009cc8
Loading section .init_array, size 0x8 lma 0x8009cd0
Loading section .fini_array, size 0x8 lma 0x8009cd8
Loading section .data, size 0x9a8 lma 0x8009ce0
Start address 0x0800429c, load size 42584
Transfer rate: 29 KB/sec, 4731 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:43
43 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
0x08004230 p_serial_mgr_service+0 ldr r3, [pc, #76] ; (0x8004280 <p_serial_mgr_service+80>)
0x08004232 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004234 p_serial_mgr_service+4 cmp r3, #1
0x08004236 p_serial_mgr_service+6 beq.n 0x800423a <p_serial_mgr_service+10>
0x08004238 p_serial_mgr_service+8 bx lr
0x0800423a p_serial_mgr_service+10 push {r4, lr}
0x0800423c p_serial_mgr_service+12 sub sp, #8
0x0800423e p_serial_mgr_service+14 movs r3, #10
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x08004236 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000
### Source ##########################################################################################################
33 }
34 }
35
36 void p_serial_mgr_init(UART_HandleTypeDef *huart)
37 {
38 _serial_huart_inst = huart;
39 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
40 }
41 void p_serial_mgr_service(void)
42 {
43 if (sstate == SS_START)
44 {
45 volatile HAL_StatusTypeDef ret;
46 ret = HAL_UART_Receive(_serial_huart_inst, rxb, MAX_MESSAGE_LEN, 10);
47
48 for (int ind = 0; ind < 20; ind++)
49 {
50 p_uart_async_write_byte(rxb[ind]);
51 }
52 PDEBUG("\n\n\n\n");
### Stack ###########################################################################################################
[0] from 0x08004236 in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:43
[1] from 0x080014f2 in main+126 at Core/Src/main.c:138
### Threads #########################################################################################################
[1] id 0 from 0x08004236 in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:43
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x9688 lma 0x80001c0
Loading section .rodata, size 0x480 lma 0x8009848
Loading section .ARM, size 0x8 lma 0x8009cc8
Loading section .init_array, size 0x8 lma 0x8009cd0
Loading section .fini_array, size 0x8 lma 0x8009cd8
Loading section .data, size 0x9a8 lma 0x8009ce0
Start address 0x0800429c, load size 42584
Transfer rate: 29 KB/sec, 4731 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]
0x08004234 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:43
43 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
0x08004230 p_serial_mgr_service+0 ldr r3, [pc, #76] ; (0x8004280 <p_serial_mgr_service+80>)
0x08004232 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004234 p_serial_mgr_service+4 cmp r3, #1
0x08004236 p_serial_mgr_service+6 beq.n 0x800423a <p_serial_mgr_service+10>
0x08004238 p_serial_mgr_service+8 bx lr
0x0800423a p_serial_mgr_service+10 push {r4, lr}
0x0800423c p_serial_mgr_service+12 sub sp, #8
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x08004234 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000
### Source ##########################################################################################################
33 }
34 }
35
36 void p_serial_mgr_init(UART_HandleTypeDef *huart)
37 {
38 _serial_huart_inst = huart;
39 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
40 }
41 void p_serial_mgr_service(void)
42 {
43 if (sstate == SS_START)
44 {
45 volatile HAL_StatusTypeDef ret;
46 ret = HAL_UART_Receive(_serial_huart_inst, rxb, MAX_MESSAGE_LEN, 10);
47
48 for (int ind = 1; ind < 21; ind++)
49 {
50 p_uart_async_write_byte(rxb[ind]);
51 }
52 PDEBUG("\n\n\n\n");
### Stack ###########################################################################################################
[0] from 0x08004234 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:43
[1] from 0x080014f2 in main+126 at Core/Src/main.c:138
### Threads #########################################################################################################
[1] id 0 from 0x08004234 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:43
### 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: 0x0800429c msp: 0x20010000
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x9688 lma 0x80001c0
Loading section .rodata, size 0x480 lma 0x8009848
Loading section .ARM, size 0x8 lma 0x8009cc8
Loading section .init_array, size 0x8 lma 0x8009cd0
Loading section .fini_array, size 0x8 lma 0x8009cd8
Loading section .data, size 0x9a8 lma 0x8009ce0
Start address 0x0800429c, load size 42584
Transfer rate: 29 KB/sec, 4731 bytes/write.
Breakpoint 1 at 0x80014ee: file Core/Src/main.c, line 138.
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:138
138 p_serial_mgr_service();
### Assembly ########################################################################################################
0x080014de main+106 mov r0, r4
0x080014e0 main+108 bl 0x8004034 <HAL_UART_Receive_IT>
0x080014e4 main+112 ldr r0, [pc, #32] ; (0x8001508 <main+148>)
0x080014e6 main+114 bl 0x800195c <HAL_TIM_Base_Start_IT>
0x080014ea main+118 bl 0x800420c <p_serial_mgr_start>
!0x080014ee main+122 bl 0x8004230 <p_serial_mgr_service>
0x080014f2 main+126 b.n 0x80014ee <main+122>
0x080014f4 main+128 lsrs r4, r2, #12
0x080014f6 main+130 movs r0, #0
0x080014f8 main+132 asrs r1, r5, #5
### Breakpoints #####################################################################################################
[1] break at 0x080014ee in Core/Src/main.c:138 for main.c:138 hit 1 time
### 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 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x40001000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b14 r9 0x00000000 lr 0x08004079 psp 0x00000000
### Source ##########################################################################################################
128
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 while (1)
137 {
!138 p_serial_mgr_service();
139 // if (b_timer_struck)
140 // {
141 // // PDEBUG("%d\n", sys_time);
142 // b_timer_struck = false;
143 // motor_degrees = (motor_degrees + 1) % 360;
144 // mc_service(motor_degrees, 50);
145 // }
146 // serial_pkt_t *pkt = NULL;
147 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x080014ee in main+122 at Core/Src/main.c:138
### Threads #########################################################################################################
[1] id 0 from 0x080014ee in main+122 at Core/Src/main.c:138
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x08004230
p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:43
43 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
~
~
0x08004230 p_serial_mgr_service+0 ldr r3, [pc, #76] ; (0x8004280 <p_serial_mgr_service+80>)
0x08004232 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004234 p_serial_mgr_service+4 cmp r3, #1
0x08004236 p_serial_mgr_service+6 beq.n 0x800423a <p_serial_mgr_service+10>
0x08004238 p_serial_mgr_service+8 bx lr
### Breakpoints #####################################################################################################
[1] break at 0x080014ee in Core/Src/main.c:138 for main.c:138 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x08004230 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 0x080014f3 psp 0x00000000
### Source ##########################################################################################################
33 }
34 }
35
36 void p_serial_mgr_init(UART_HandleTypeDef *huart)
37 {
38 _serial_huart_inst = huart;
39 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
40 }
41 void p_serial_mgr_service(void)
42 {
43 if (sstate == SS_START)
44 {
45 volatile HAL_StatusTypeDef ret;
46 ret = HAL_UART_Receive(_serial_huart_inst, rxb, MAX_MESSAGE_LEN, 10);
47
48 for (int ind = 1; ind < 21; ind++)
49 {
50 p_uart_async_write_byte(rxb[ind]);
51 }
52 PDEBUG("\n\n\n\n");
### Stack ###########################################################################################################
[0] from 0x08004230 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:43
[1] from 0x080014f2 in main+126 at Core/Src/main.c:138
### Threads #########################################################################################################
[1] id 0 from 0x08004230 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:43
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x08004232
halted: PC: 0x08004234
halted: PC: 0x08004236
halted: PC: 0x08004238
halted: PC: 0x080014f2
main () at Core/Src/main.c:136
136 while (1)
### Assembly ########################################################################################################
0x080014e0 main+108 bl 0x8004034 <HAL_UART_Receive_IT>
0x080014e4 main+112 ldr r0, [pc, #32] ; (0x8001508 <main+148>)
0x080014e6 main+114 bl 0x800195c <HAL_TIM_Base_Start_IT>
0x080014ea main+118 bl 0x800420c <p_serial_mgr_start>
!0x080014ee main+122 bl 0x8004230 <p_serial_mgr_service>
0x080014f2 main+126 b.n 0x80014ee <main+122>
0x080014f4 main+128 lsrs r4, r2, #12
0x080014f6 main+130 movs r0, #0
0x080014f8 main+132 asrs r1, r5, #5
0x080014fa main+134 lsrs r0, r0, #32
### Breakpoints #####################################################################################################
[1] break at 0x080014ee in Core/Src/main.c:138 for main.c:138 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014f2 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000
### Source ##########################################################################################################
126 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1);
127 HAL_TIM_Base_Start_IT(&htim6);
128
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 while (1)
137 {
!138 p_serial_mgr_service();
139 // if (b_timer_struck)
140 // {
141 // // PDEBUG("%d\n", sys_time);
142 // b_timer_struck = false;
143 // motor_degrees = (motor_degrees + 1) % 360;
144 // mc_service(motor_degrees, 50);
145 // }
### Stack ###########################################################################################################
[0] from 0x080014f2 in main+126 at Core/Src/main.c:136
### Threads #########################################################################################################
[1] id 0 from 0x080014f2 in main+126 at Core/Src/main.c:136
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080014ee
Breakpoint 1, main () at Core/Src/main.c:138
138 p_serial_mgr_service();
### Assembly ########################################################################################################
0x080014de main+106 mov r0, r4
0x080014e0 main+108 bl 0x8004034 <HAL_UART_Receive_IT>
0x080014e4 main+112 ldr r0, [pc, #32] ; (0x8001508 <main+148>)
0x080014e6 main+114 bl 0x800195c <HAL_TIM_Base_Start_IT>
0x080014ea main+118 bl 0x800420c <p_serial_mgr_start>
!0x080014ee main+122 bl 0x8004230 <p_serial_mgr_service>
0x080014f2 main+126 b.n 0x80014ee <main+122>
0x080014f4 main+128 lsrs r4, r2, #12
0x080014f6 main+130 movs r0, #0
0x080014f8 main+132 asrs r1, r5, #5
### Breakpoints #####################################################################################################
[1] break at 0x080014ee in Core/Src/main.c:138 for main.c:138 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014ee primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000
### Source ##########################################################################################################
128
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 while (1)
137 {
!138 p_serial_mgr_service();
139 // if (b_timer_struck)
140 // {
141 // // PDEBUG("%d\n", sys_time);
142 // b_timer_struck = false;
143 // motor_degrees = (motor_degrees + 1) % 360;
144 // mc_service(motor_degrees, 50);
145 // }
146 // serial_pkt_t *pkt = NULL;
147 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x080014ee in main+122 at Core/Src/main.c:138
### Threads #########################################################################################################
[1] id 0 from 0x080014ee in main+122 at Core/Src/main.c:138
### Variables #######################################################################################################
#####################################################################################################################
Quit
### Output/messages #################################################################################################
halted: PC: 0x08004230
p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:43
43 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
~
~
0x08004230 p_serial_mgr_service+0 ldr r3, [pc, #76] ; (0x8004280 <p_serial_mgr_service+80>)
0x08004232 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004234 p_serial_mgr_service+4 cmp r3, #1
0x08004236 p_serial_mgr_service+6 beq.n 0x800423a <p_serial_mgr_service+10>
0x08004238 p_serial_mgr_service+8 bx lr
### Breakpoints #####################################################################################################
[1] break at 0x080014ee in Core/Src/main.c:138 for main.c:138 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x08004230 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000
### Source ##########################################################################################################
33 }
34 }
35
36 void p_serial_mgr_init(UART_HandleTypeDef *huart)
37 {
38 _serial_huart_inst = huart;
39 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
40 }
41 void p_serial_mgr_service(void)
42 {
43 if (sstate == SS_START)
44 {
45 volatile HAL_StatusTypeDef ret;
46 ret = HAL_UART_Receive(_serial_huart_inst, rxb, MAX_MESSAGE_LEN, 10);
47
48 for (int ind = 1; ind < 21; ind++)
49 {
50 p_uart_async_write_byte(rxb[ind]);
51 }
52 PDEBUG("\n\n\n\n");
### Stack ###########################################################################################################
[0] from 0x08004230 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:43
[1] from 0x080014f2 in main+126 at Core/Src/main.c:138
### Threads #########################################################################################################
[1] id 0 from 0x08004230 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:43
### Variables #######################################################################################################
#####################################################################################################################
Breakpoint 2 at 0x800423e: file shared/drivers/p_serial_mgr.c, line 45.
warning: bad breakpoint number at or near '0'
Breakpoint 3 at 0x800423e: file shared/drivers/p_serial_mgr.c, line 45.
Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf
### Output/messages #################################################################################################
Program received signal SIGINT, Interrupt.
0x08004232 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:43
43 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
~
0x08004230 p_serial_mgr_service+0 ldr r3, [pc, #76] ; (0x8004280 <p_serial_mgr_service+80>)
0x08004232 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004234 p_serial_mgr_service+4 cmp r3, #1
0x08004236 p_serial_mgr_service+6 beq.n 0x800423a <p_serial_mgr_service+10>
0x08004238 p_serial_mgr_service+8 bx lr
0x0800423a p_serial_mgr_service+10 push {r4, lr}
### Breakpoints #####################################################################################################
[3] break at 0x0800423e in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:45
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x08004232 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x20000dec r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000
### Source ##########################################################################################################
33 }
34 }
35
36 void p_serial_mgr_init(UART_HandleTypeDef *huart)
37 {
38 _serial_huart_inst = huart;
39 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
40 }
41 void p_serial_mgr_service(void)
42 {
43 if (sstate == SS_START)
44 {
45 volatile HAL_StatusTypeDef ret;
!46 ret = HAL_UART_Receive(_serial_huart_inst, rxb, MAX_MESSAGE_LEN, 10);
47
48 for (int ind = 1; ind < 21; ind++)
49 {
50 p_uart_async_write_byte(rxb[ind]);
51 }
52 PDEBUG("\n\n\n\n");
### Stack ###########################################################################################################
[0] from 0x08004232 in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:43
[1] from 0x080014f2 in main+126 at Core/Src/main.c:138
### Threads #########################################################################################################
[1] id 0 from 0x08004232 in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:43
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x08004234
halted: PC: 0x08004236
halted: PC: 0x08004238
halted: PC: 0x080014f2
main () at Core/Src/main.c:136
136 while (1)
### Assembly ########################################################################################################
0x080014e0 main+108 bl 0x8004034 <HAL_UART_Receive_IT>
0x080014e4 main+112 ldr r0, [pc, #32] ; (0x8001508 <main+148>)
0x080014e6 main+114 bl 0x800195c <HAL_TIM_Base_Start_IT>
0x080014ea main+118 bl 0x800420c <p_serial_mgr_start>
0x080014ee main+122 bl 0x8004230 <p_serial_mgr_service>
0x080014f2 main+126 b.n 0x80014ee <main+122>
0x080014f4 main+128 lsrs r4, r2, #12
0x080014f6 main+130 movs r0, #0
0x080014f8 main+132 asrs r1, r5, #5
0x080014fa main+134 lsrs r0, r0, #32
### Breakpoints #####################################################################################################
[3] break at 0x0800423e in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:45
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014f2 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000
### Source ##########################################################################################################
126 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1);
127 HAL_TIM_Base_Start_IT(&htim6);
128
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 while (1)
137 {
138 p_serial_mgr_service();
139 // if (b_timer_struck)
140 // {
141 // // PDEBUG("%d\n", sys_time);
142 // b_timer_struck = false;
143 // motor_degrees = (motor_degrees + 1) % 360;
144 // mc_service(motor_degrees, 50);
145 // }
### Stack ###########################################################################################################
[0] from 0x080014f2 in main+126 at Core/Src/main.c:136
### Threads #########################################################################################################
[1] id 0 from 0x080014f2 in main+126 at Core/Src/main.c:136
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080014ee
138 p_serial_mgr_service();
### Assembly ########################################################################################################
0x080014de main+106 mov r0, r4
0x080014e0 main+108 bl 0x8004034 <HAL_UART_Receive_IT>
0x080014e4 main+112 ldr r0, [pc, #32] ; (0x8001508 <main+148>)
0x080014e6 main+114 bl 0x800195c <HAL_TIM_Base_Start_IT>
0x080014ea main+118 bl 0x800420c <p_serial_mgr_start>
0x080014ee main+122 bl 0x8004230 <p_serial_mgr_service>
0x080014f2 main+126 b.n 0x80014ee <main+122>
0x080014f4 main+128 lsrs r4, r2, #12
0x080014f6 main+130 movs r0, #0
0x080014f8 main+132 asrs r1, r5, #5
### Breakpoints #####################################################################################################
[3] break at 0x0800423e in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:45
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014ee primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000
### Source ##########################################################################################################
128
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 while (1)
137 {
138 p_serial_mgr_service();
139 // if (b_timer_struck)
140 // {
141 // // PDEBUG("%d\n", sys_time);
142 // b_timer_struck = false;
143 // motor_degrees = (motor_degrees + 1) % 360;
144 // mc_service(motor_degrees, 50);
145 // }
146 // serial_pkt_t *pkt = NULL;
147 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x080014ee in main+122 at Core/Src/main.c:138
### Threads #########################################################################################################
[1] id 0 from 0x080014ee in main+122 at Core/Src/main.c:138
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x08004230
p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:43
43 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
~
~
0x08004230 p_serial_mgr_service+0 ldr r3, [pc, #76] ; (0x8004280 <p_serial_mgr_service+80>)
0x08004232 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004234 p_serial_mgr_service+4 cmp r3, #1
0x08004236 p_serial_mgr_service+6 beq.n 0x800423a <p_serial_mgr_service+10>
0x08004238 p_serial_mgr_service+8 bx lr
### Breakpoints #####################################################################################################
[3] break at 0x0800423e in shared/drivers/p_serial_mgr.c:46 for p_serial_mgr.c:45
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x08004230 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000
### Source ##########################################################################################################
33 }
34 }
35
36 void p_serial_mgr_init(UART_HandleTypeDef *huart)
37 {
38 _serial_huart_inst = huart;
39 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
40 }
41 void p_serial_mgr_service(void)
42 {
43 if (sstate == SS_START)
44 {
45 volatile HAL_StatusTypeDef ret;
!46 ret = HAL_UART_Receive(_serial_huart_inst, rxb, MAX_MESSAGE_LEN, 10);
47
48 for (int ind = 1; ind < 21; ind++)
49 {
50 p_uart_async_write_byte(rxb[ind]);
51 }
52 PDEBUG("\n\n\n\n");
### Stack ###########################################################################################################
[0] from 0x08004230 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:43
[1] from 0x080014f2 in main+126 at Core/Src/main.c:138
### Threads #########################################################################################################
[1] id 0 from 0x08004230 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:43
### Variables #######################################################################################################
#####################################################################################################################
$1 = SS_IDLE
`/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 0x9698 lma 0x80001c0
Loading section .rodata, size 0x480 lma 0x8009858
Loading section .ARM, size 0x8 lma 0x8009cd8
Loading section .init_array, size 0x8 lma 0x8009ce0
Loading section .fini_array, size 0x8 lma 0x8009ce8
Loading section .data, size 0x9a8 lma 0x8009cf0
Start address 0x080042b0, load size 42600
Transfer rate: 29 KB/sec, 4733 bytes/write.
Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf
### Output/messages #################################################################################################
Breakpoint 3, p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:47
47 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
~
~
!0x08004244 p_serial_mgr_service+0 ldr r3, [pc, #76] ; (0x8004294 <p_serial_mgr_service+80>)
0x08004246 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004248 p_serial_mgr_service+4 cmp r3, #1
0x0800424a p_serial_mgr_service+6 beq.n 0x800424e <p_serial_mgr_service+10>
0x0800424c p_serial_mgr_service+8 bx lr
### Breakpoints #####################################################################################################
[3] break at 0x08004244 in shared/drivers/p_serial_mgr.c:47 for p_serial_mgr.c:45 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$0 = SS_IDLE
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x08004244 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 0x080014f3 psp 0x00000000
### Source ##########################################################################################################
37 }
38 }
39
40 void p_serial_mgr_init(UART_HandleTypeDef *huart)
41 {
42 _serial_huart_inst = huart;
43 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
44 }
45 void p_serial_mgr_service(void)
46 {
!47 if (sstate == SS_START)
48 {
49 volatile HAL_StatusTypeDef ret;
50 ret = HAL_UART_Receive(_serial_huart_inst, rxb, MAX_MESSAGE_LEN, 10);
51
52 for (int ind = 1; ind < 21; ind++)
53 {
54 p_uart_async_write_byte(rxb[ind]);
55 }
56 PDEBUG("\n\n\n\n");
### Stack ###########################################################################################################
[0] from 0x08004244 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:47
[1] from 0x080014f2 in main+126 at Core/Src/main.c:138
### Threads #########################################################################################################
[1] id 0 from 0x08004244 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:47
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x08004246
halted: PC: 0x08004248
halted: PC: 0x0800424a
halted: PC: 0x0800424c
halted: PC: 0x080014f2
main () at Core/Src/main.c:136
136 while (1)
### Assembly ########################################################################################################
0x080014e0 main+108 bl 0x8004034 <HAL_UART_Receive_IT>
0x080014e4 main+112 ldr r0, [pc, #32] ; (0x8001508 <main+148>)
0x080014e6 main+114 bl 0x800195c <HAL_TIM_Base_Start_IT>
0x080014ea main+118 bl 0x8004220 <p_serial_mgr_start>
0x080014ee main+122 bl 0x8004244 <p_serial_mgr_service>
0x080014f2 main+126 b.n 0x80014ee <main+122>
0x080014f4 main+128 lsrs r4, r2, #12
0x080014f6 main+130 movs r0, #0
0x080014f8 main+132 asrs r1, r5, #5
0x080014fa main+134 lsrs r0, r0, #32
### Breakpoints #####################################################################################################
[3] break at 0x08004244 in shared/drivers/p_serial_mgr.c:47 for p_serial_mgr.c:45 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$0 = SS_IDLE
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014f2 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000
### Source ##########################################################################################################
126 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1);
127 HAL_TIM_Base_Start_IT(&htim6);
128
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 while (1)
137 {
138 p_serial_mgr_service();
139 // if (b_timer_struck)
140 // {
141 // // PDEBUG("%d\n", sys_time);
142 // b_timer_struck = false;
143 // motor_degrees = (motor_degrees + 1) % 360;
144 // mc_service(motor_degrees, 50);
145 // }
### Stack ###########################################################################################################
[0] from 0x080014f2 in main+126 at Core/Src/main.c:136
### Threads #########################################################################################################
[1] id 0 from 0x080014f2 in main+126 at Core/Src/main.c:136
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080014ee
138 p_serial_mgr_service();
### Assembly ########################################################################################################
0x080014de main+106 mov r0, r4
0x080014e0 main+108 bl 0x8004034 <HAL_UART_Receive_IT>
0x080014e4 main+112 ldr r0, [pc, #32] ; (0x8001508 <main+148>)
0x080014e6 main+114 bl 0x800195c <HAL_TIM_Base_Start_IT>
0x080014ea main+118 bl 0x8004220 <p_serial_mgr_start>
0x080014ee main+122 bl 0x8004244 <p_serial_mgr_service>
0x080014f2 main+126 b.n 0x80014ee <main+122>
0x080014f4 main+128 lsrs r4, r2, #12
0x080014f6 main+130 movs r0, #0
0x080014f8 main+132 asrs r1, r5, #5
### Breakpoints #####################################################################################################
[3] break at 0x08004244 in shared/drivers/p_serial_mgr.c:47 for p_serial_mgr.c:45 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$0 = SS_IDLE
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014ee primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000
### Source ##########################################################################################################
128
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 while (1)
137 {
138 p_serial_mgr_service();
139 // if (b_timer_struck)
140 // {
141 // // PDEBUG("%d\n", sys_time);
142 // b_timer_struck = false;
143 // motor_degrees = (motor_degrees + 1) % 360;
144 // mc_service(motor_degrees, 50);
145 // }
146 // serial_pkt_t *pkt = NULL;
147 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x080014ee in main+122 at Core/Src/main.c:138
### Threads #########################################################################################################
[1] id 0 from 0x080014ee in main+122 at Core/Src/main.c:138
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x08004244
Breakpoint 3, p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:47
47 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
~
~
!0x08004244 p_serial_mgr_service+0 ldr r3, [pc, #76] ; (0x8004294 <p_serial_mgr_service+80>)
0x08004246 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004248 p_serial_mgr_service+4 cmp r3, #1
0x0800424a p_serial_mgr_service+6 beq.n 0x800424e <p_serial_mgr_service+10>
0x0800424c p_serial_mgr_service+8 bx lr
### Breakpoints #####################################################################################################
[3] break at 0x08004244 in shared/drivers/p_serial_mgr.c:47 for p_serial_mgr.c:45 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
$$0 = SS_IDLE
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x08004244 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000
### Source ##########################################################################################################
37 }
38 }
39
40 void p_serial_mgr_init(UART_HandleTypeDef *huart)
41 {
42 _serial_huart_inst = huart;
43 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
44 }
45 void p_serial_mgr_service(void)
46 {
!47 if (sstate == SS_START)
48 {
49 volatile HAL_StatusTypeDef ret;
50 ret = HAL_UART_Receive(_serial_huart_inst, rxb, MAX_MESSAGE_LEN, 10);
51
52 for (int ind = 1; ind < 21; ind++)
53 {
54 p_uart_async_write_byte(rxb[ind]);
55 }
56 PDEBUG("\n\n\n\n");
### Stack ###########################################################################################################
[0] from 0x08004244 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:47
[1] from 0x080014f2 in main+126 at Core/Src/main.c:138
### Threads #########################################################################################################
[1] id 0 from 0x08004244 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:47
### Variables #######################################################################################################
#####################################################################################################################
$2 = SS_IDLE
Note: breakpoint 3 also set at pc 0x8004244.
Breakpoint 4 at 0x8004244: 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: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
Program received signal SIGINT, Interrupt.
0x08004246 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:47
47 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
~
!0x08004244 p_serial_mgr_service+0 ldr r3, [pc, #76] ; (0x8004294 <p_serial_mgr_service+80>)
0x08004246 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004248 p_serial_mgr_service+4 cmp r3, #1
0x0800424a p_serial_mgr_service+6 beq.n 0x800424e <p_serial_mgr_service+10>
0x0800424c p_serial_mgr_service+8 bx lr
0x0800424e p_serial_mgr_service+10 push {r4, lr}
### Breakpoints #####################################################################################################
[4] break at 0x08004244 in shared/drivers/p_serial_mgr.c:47 for p_serial_mgr.c:45 if (sstate == SS_START)
### Expressions #####################################################################################################
### History #########################################################################################################
$$1 = SS_IDLE
$$0 = SS_IDLE
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x08004246 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x20000dec r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000
### Source ##########################################################################################################
37 }
38 }
39
40 void p_serial_mgr_init(UART_HandleTypeDef *huart)
41 {
42 _serial_huart_inst = huart;
43 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
44 }
45 void p_serial_mgr_service(void)
46 {
!47 if (sstate == SS_START)
48 {
49 volatile HAL_StatusTypeDef ret;
50 ret = HAL_UART_Receive(_serial_huart_inst, rxb, MAX_MESSAGE_LEN, 10);
51
52 for (int ind = 1; ind < 21; ind++)
53 {
54 p_uart_async_write_byte(rxb[ind]);
55 }
56 PDEBUG("\n\n\n\n");
### Stack ###########################################################################################################
[0] from 0x08004246 in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:47
[1] from 0x080014f2 in main+126 at Core/Src/main.c:138
### Threads #########################################################################################################
[1] id 0 from 0x08004246 in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:47
### Variables #######################################################################################################
#####################################################################################################################
Breakpoint 5 at 0x80041f6: file shared/drivers/p_serial_mgr.c, line 30.
Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf
### Output/messages #################################################################################################
Breakpoint 5, UART1_RxCpltCallback (huart=0x20000a60 <huart1>) at shared/drivers/p_serial_mgr.c:36
36 HAL_UART_Receive_IT(_serial_huart_inst, rxb, 1);
### Assembly ########################################################################################################
~
~
~
~
0x080041f4 UART1_RxCpltCallback+0 push {r3, lr}
!0x080041f6 UART1_RxCpltCallback+2 movs r2, #1
0x080041f8 UART1_RxCpltCallback+4 ldr r1, [pc, #8] ; (0x8004204 <UART1_RxCpltCallback+16>)
0x080041fa UART1_RxCpltCallback+6 ldr r3, [pc, #12] ; (0x8004208 <UART1_RxCpltCallback+20>)
0x080041fc UART1_RxCpltCallback+8 ldr r0, [r3, #0]
0x080041fe UART1_RxCpltCallback+10 bl 0x8004034 <HAL_UART_Receive_IT>
### Breakpoints #####################################################################################################
[4] break at 0x08004244 in shared/drivers/p_serial_mgr.c:47 for p_serial_mgr.c:45 if (sstate == SS_START)
[5] break at 0x080041f6 in shared/drivers/p_serial_mgr.c:36 for p_serial_mgr.c:30 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$1 = SS_IDLE
$$0 = SS_IDLE
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000a60 r5 0x00004001 r10 0x00000000 pc 0x080041f6 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x080041f5 r8 0x00000000 sp 0x2000ff48 msp 0x2000ff48 control 0x00
r4 0x20000a60 r9 0x00000000 lr 0x08003437 psp 0x00000000
### Source ##########################################################################################################
26 static serial_state_t sstate = SS_IDLE;
27
28 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
29 {
30 if (rxc == 0x7E && sstate == SS_IDLE)
31 {
32 sstate = SS_START;
33 }
34 else
35 {
!36 HAL_UART_Receive_IT(_serial_huart_inst, rxb, 1);
37 }
38 }
39
40 void p_serial_mgr_init(UART_HandleTypeDef *huart)
41 {
42 _serial_huart_inst = huart;
43 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
44 }
45 void p_serial_mgr_service(void)
### Stack ###########################################################################################################
[0] from 0x080041f6 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:36
[1] from 0x08003436 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x08003588 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347
[3] from 0x0800152c in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211
[4] from 0xffffffe9
[5] from 0x08003ff4 in UART_Start_Receive_IT+152 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3685
[6] from 0x08004078 in HAL_UART_Receive_IT+68 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1440
[7] from 0x08004234 in p_serial_mgr_start+20 at shared/drivers/p_serial_mgr.c:65
[8] from 0x080014ee in main+122 at Core/Src/main.c:129
### Threads #########################################################################################################
[1] id 0 from 0x080041f6 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:36
### Variables #######################################################################################################
arg huart = 0x20000a60 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
#####################################################################################################################
Continuing.
### Output/messages #################################################################################################
halted: PC: 0x080041f8
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
halted: PC: 0x08004246
Breakpoint 5, UART1_RxCpltCallback (huart=0x20000a60 <huart1>) at shared/drivers/p_serial_mgr.c:36
36 HAL_UART_Receive_IT(_serial_huart_inst, rxb, 1);
### Assembly ########################################################################################################
~
~
~
~
0x080041f4 UART1_RxCpltCallback+0 push {r3, lr}
!0x080041f6 UART1_RxCpltCallback+2 movs r2, #1
0x080041f8 UART1_RxCpltCallback+4 ldr r1, [pc, #8] ; (0x8004204 <UART1_RxCpltCallback+16>)
0x080041fa UART1_RxCpltCallback+6 ldr r3, [pc, #12] ; (0x8004208 <UART1_RxCpltCallback+20>)
0x080041fc UART1_RxCpltCallback+8 ldr r0, [r3, #0]
0x080041fe UART1_RxCpltCallback+10 bl 0x8004034 <HAL_UART_Receive_IT>
### Breakpoints #####################################################################################################
[4] break at 0x08004244 in shared/drivers/p_serial_mgr.c:47 for p_serial_mgr.c:45 if (sstate == SS_START)
[5] break at 0x080041f6 in shared/drivers/p_serial_mgr.c:36 for p_serial_mgr.c:30 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
$$1 = SS_IDLE
$$0 = SS_IDLE
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000a60 r5 0x00004001 r10 0x00000000 pc 0x080041f6 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x080041f5 r8 0x00000000 sp 0x2000ff60 msp 0x2000ff60 control 0x00
r4 0x20000a60 r9 0x00000000 lr 0x08003437 psp 0x00000000
### Source ##########################################################################################################
26 static serial_state_t sstate = SS_IDLE;
27
28 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
29 {
30 if (rxc == 0x7E && sstate == SS_IDLE)
31 {
32 sstate = SS_START;
33 }
34 else
35 {
!36 HAL_UART_Receive_IT(_serial_huart_inst, rxb, 1);
37 }
38 }
39
40 void p_serial_mgr_init(UART_HandleTypeDef *huart)
41 {
42 _serial_huart_inst = huart;
43 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
44 }
45 void p_serial_mgr_service(void)
### Stack ###########################################################################################################
[0] from 0x080041f6 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:36
[1] from 0x08003436 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x08003632 in HAL_UART_IRQHandler+278 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2427
[3] from 0x0800152c in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211
[4] from 0xffffffe9
[5] from 0x08004246 in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:47
[6] from 0x080014f2 in main+126 at Core/Src/main.c:138
### Threads #########################################################################################################
[1] id 0 from 0x080041f6 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:36
### Variables #######################################################################################################
arg huart = 0x20000a60 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
#####################################################################################################################
$3 = <optimized out>
`/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 0x96b8 lma 0x80001c0
Loading section .rodata, size 0x480 lma 0x8009878
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 0x080042cc, load size 42632
Transfer rate: 29 KB/sec, 4736 bytes/write.
Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf
### Output/messages #################################################################################################
Breakpoint 5, UART1_RxCpltCallback (huart=0x20000a60 <huart1>) at shared/drivers/p_serial_mgr.c:30
30 if (rxb[0] == 0x7E && sstate == SS_IDLE)
### Assembly ########################################################################################################
~
~
~
~
0x080041f4 UART1_RxCpltCallback+0 push {r3, lr}
!0x080041f6 UART1_RxCpltCallback+2 ldr r3, [pc, #36] ; (0x800421c <UART1_RxCpltCallback+40>)
0x080041f8 UART1_RxCpltCallback+4 ldrb r3, [r3, #0]
0x080041fa UART1_RxCpltCallback+6 cmp r3, #126 ; 0x7e
0x080041fc UART1_RxCpltCallback+8 bne.n 0x800420c <UART1_RxCpltCallback+24>
0x080041fe UART1_RxCpltCallback+10 ldr r3, [pc, #32] ; (0x8004220 <UART1_RxCpltCallback+44>)
### Breakpoints #####################################################################################################
[4] break at 0x08004260 in shared/drivers/p_serial_mgr.c:47 for p_serial_mgr.c:45 if (sstate == SS_START)
[5] break at 0x080041f6 in shared/drivers/p_serial_mgr.c:30 for p_serial_mgr.c:30 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = SS_IDLE
$$1 = SS_IDLE
$$0 = <optimized out>
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000a60 r5 0x00004001 r10 0x00000000 pc 0x080041f6 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x080041f5 r8 0x00000000 sp 0x2000ff48 msp 0x2000ff48 control 0x00
r4 0x20000a60 r9 0x00000000 lr 0x08003437 psp 0x00000000
### Source ##########################################################################################################
20 SS_START = 1, // get start byte, interrupt after 4 more bytes
21 } serial_state_t;
22
23 static UART_HandleTypeDef *_serial_huart_inst = NULL;
24
25 static uint8_t rxc = '\0';
26 static serial_state_t sstate = SS_IDLE;
27
28 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
29 {
!30 if (rxb[0] == 0x7E && sstate == SS_IDLE)
31 {
32 sstate = SS_START;
33 }
34 else
35 {
36 HAL_UART_Receive_IT(_serial_huart_inst, rxb, 1);
37 }
38 }
39
### Stack ###########################################################################################################
[0] from 0x080041f6 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:30
[1] from 0x08003436 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x08003588 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347
[3] from 0x0800152c in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211
[4] from 0xffffffe9
[5] from 0x08003ff4 in UART_Start_Receive_IT+152 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3685
[6] from 0x08004078 in HAL_UART_Receive_IT+68 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1440
[7] from 0x08004250 in p_serial_mgr_start+20 at shared/drivers/p_serial_mgr.c:65
[8] from 0x080014ee in main+122 at Core/Src/main.c:129
### Threads #########################################################################################################
[1] id 0 from 0x080041f6 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:30
### Variables #######################################################################################################
arg huart = 0x20000a60 <huart1>: {Instance = 0x40013800,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]
UART1_RxCpltCallback (huart=0x20000a60 <huart1>) at shared/drivers/p_serial_mgr.c:30
30 if (rxb[0] == 0x7E && sstate == SS_IDLE)
### Assembly ########################################################################################################
~
~
~
~
0x080041f4 UART1_RxCpltCallback+0 push {r3, lr}
0x080041f6 UART1_RxCpltCallback+2 ldr r3, [pc, #36] ; (0x800421c <UART1_RxCpltCallback+40>)
0x080041f8 UART1_RxCpltCallback+4 ldrb r3, [r3, #0]
0x080041fa UART1_RxCpltCallback+6 cmp r3, #126 ; 0x7e
0x080041fc UART1_RxCpltCallback+8 bne.n 0x800420c <UART1_RxCpltCallback+24>
0x080041fe UART1_RxCpltCallback+10 ldr r3, [pc, #32] ; (0x8004220 <UART1_RxCpltCallback+44>)
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000a60 r5 0x00004001 r10 0x00000000 pc 0x080041f6 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x080041f5 r8 0x00000000 sp 0x2000ff48 msp 0x2000ff48 control 0x00
r4 0x20000a60 r9 0x00000000 lr 0x08003437 psp 0x00000000
### Source ##########################################################################################################
20 SS_START = 1, // get start byte, interrupt after 4 more bytes
21 } serial_state_t;
22
23 static UART_HandleTypeDef *_serial_huart_inst = NULL;
24
25 static uint8_t rxc = '\0';
26 static serial_state_t sstate = SS_IDLE;
27
28 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
29 {
30 if (rxb[0] == 0x7E && sstate == SS_IDLE)
31 {
32 sstate = SS_START;
33 }
34 else
35 {
36 HAL_UART_Receive_IT(_serial_huart_inst, rxb, 1);
37 }
38 }
39
### Stack ###########################################################################################################
[0] from 0x080041f6 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:30
[1] from 0x08003436 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x08003588 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347
[3] from 0x0800152c in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211
[4] from 0xffffffe9
[5] from 0x08003ff4 in UART_Start_Receive_IT+152 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3685
[6] from 0x08004078 in HAL_UART_Receive_IT+68 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1440
[7] from 0x08004250 in p_serial_mgr_start+20 at shared/drivers/p_serial_mgr.c:65
[8] from 0x080014ee in main+122 at Core/Src/main.c:129
### Threads #########################################################################################################
[1] id 0 from 0x080041f6 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:30
### Variables #######################################################################################################
arg huart = 0x20000a60 <huart1>: {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 0x480 lma 0x8009878
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 0x080042cc, 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]
p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:57
57 memset(rxb, 0, (unsigned int)MAX_MESSAGE_LEN);
### Assembly ########################################################################################################
0x0800425e p_serial_mgr_service+50 movs r0, #0
0x08004260 p_serial_mgr_service+52 ldr r3, [pc, #76] ; (0x80042b0 <Reset_Handler+20>)
0x08004262 p_serial_mgr_service+54 ldrb r3, [r3, #0]
0x08004264 p_serial_mgr_service+56 cmp r3, #1
0x08004266 p_serial_mgr_service+58 beq.n 0x800426a <p_serial_mgr_service+62>
0x08004268 p_serial_mgr_service+60 bx lr
0x0800426a p_serial_mgr_service+62 push {r4, lr}
0x0800426c p_serial_mgr_service+64 sub sp, #8
0x0800426e p_serial_mgr_service+66 movs r3, #10
0x08004270 p_serial_mgr_service+68 mov.w r2, #516 ; 0x204
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x08004268 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0x00000004 fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000
### Source ##########################################################################################################
47 if (sstate == SS_START)
48 {
49 volatile HAL_StatusTypeDef ret;
50 ret = HAL_UART_Receive(_serial_huart_inst, rxb, MAX_MESSAGE_LEN, 10);
51
52 for (int ind = 0; ind < 24; ind++)
53 {
54 PDEBUG("[%d]: %02x\n", rxb[ind]);
55 }
56 PDEBUG("\n\n\n\n");
57 memset(rxb, 0, (unsigned int)MAX_MESSAGE_LEN);
58 p_serial_mgr_start();
59 }
60 }
61
62 void p_serial_mgr_start()
63 {
64 sstate = SS_IDLE;
65 HAL_UART_Receive_IT(_serial_huart_inst, rxb, 1);
66 }
### Stack ###########################################################################################################
[0] from 0x08004268 in p_serial_mgr_service+60 at shared/drivers/p_serial_mgr.c:57
[1] from 0x08004302 in __libc_init_array
### Threads #########################################################################################################
[1] id 0 from 0x08004268 in p_serial_mgr_service+60 at shared/drivers/p_serial_mgr.c:57
### Variables #######################################################################################################
loc ret = 32
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x9648 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x8009808
Loading section .ARM, size 0x8 lma 0x8009c90
Loading section .init_array, size 0x8 lma 0x8009c98
Loading section .fini_array, size 0x8 lma 0x8009ca0
Loading section .data, size 0x9a8 lma 0x8009ca8
Start address 0x0800429c, load size 42528
Transfer rate: 29 KB/sec, 4725 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]
0x08004232 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:47
47 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
0x0800422c p_serial_mgr_service+0 ldr r3, [pc, #76] ; (0x800427c <p_serial_mgr_service+80>)
0x0800422e p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004230 p_serial_mgr_service+4 cmp r3, #1
0x08004232 p_serial_mgr_service+6 beq.n 0x8004236 <p_serial_mgr_service+10>
0x08004234 p_serial_mgr_service+8 bx lr
0x08004236 p_serial_mgr_service+10 push {r4, lr}
0x08004238 p_serial_mgr_service+12 sub sp, #8
0x0800423a p_serial_mgr_service+14 movs r3, #10
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x08004232 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0x00000004 fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000
### Source ##########################################################################################################
37 }
38 }
39
40 void p_serial_mgr_init(UART_HandleTypeDef *huart)
41 {
42 _serial_huart_inst = huart;
43 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
44 }
45 void p_serial_mgr_service(void)
46 {
47 if (sstate == SS_START)
48 {
49 volatile HAL_StatusTypeDef ret;
50 ret = HAL_UART_Receive(_serial_huart_inst, rxb, MAX_MESSAGE_LEN, 10);
51
52 for (int ind = 0; ind < 24; ind++)
53 {
54 PDEBUG("[%d]: %02x\n", ind, rxb[ind]);
55 }
56 PDEBUG("\n\n\n\n");
### Stack ###########################################################################################################
[0] from 0x08004232 in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:47
[1] from 0x080014f2 in main+126 at Core/Src/main.c:138
### Threads #########################################################################################################
[1] id 0 from 0x08004232 in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:47
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x9648 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x8009808
Loading section .ARM, size 0x8 lma 0x8009c90
Loading section .init_array, size 0x8 lma 0x8009c98
Loading section .fini_array, size 0x8 lma 0x8009ca0
Loading section .data, size 0x9a8 lma 0x8009ca8
Start address 0x080042a0, load size 42528
Transfer rate: 29 KB/sec, 4725 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:138
138 p_serial_mgr_service();
### Assembly ########################################################################################################
0x080014de main+106 mov r0, r4
0x080014e0 main+108 bl 0x8004034 <HAL_UART_Receive_IT>
0x080014e4 main+112 ldr r0, [pc, #32] ; (0x8001508 <main+148>)
0x080014e6 main+114 bl 0x800195c <HAL_TIM_Base_Start_IT>
0x080014ea main+118 bl 0x8004208 <p_serial_mgr_start>
0x080014ee main+122 bl 0x800422c <p_serial_mgr_service>
0x080014f2 main+126 b.n 0x80014ee <main+122>
0x080014f4 main+128 lsrs r4, r2, #12
0x080014f6 main+130 movs r0, #0
0x080014f8 main+132 asrs r1, r5, #5
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014ee primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0x00000004 fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000
### Source ##########################################################################################################
128
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 while (1)
137 {
138 p_serial_mgr_service();
139 // if (b_timer_struck)
140 // {
141 // // PDEBUG("%d\n", sys_time);
142 // b_timer_struck = false;
143 // motor_degrees = (motor_degrees + 1) % 360;
144 // mc_service(motor_degrees, 50);
145 // }
146 // serial_pkt_t *pkt = NULL;
147 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x080014ee in main+122 at Core/Src/main.c:138
### Threads #########################################################################################################
[1] id 0 from 0x080014ee in main+122 at Core/Src/main.c:138
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x9650 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x8009810
Loading section .ARM, size 0x8 lma 0x8009c98
Loading section .init_array, size 0x8 lma 0x8009ca0
Loading section .fini_array, size 0x8 lma 0x8009ca8
Loading section .data, size 0x9a8 lma 0x8009cb0
Start address 0x080042a4, load size 42536
Transfer rate: 29 KB/sec, 4726 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]
0x08004230 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:47
47 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
0x0800422c p_serial_mgr_service+0 ldr r3, [pc, #80] ; (0x8004280 <p_serial_mgr_service+84>)
0x0800422e p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004230 p_serial_mgr_service+4 cmp r3, #1
0x08004232 p_serial_mgr_service+6 beq.n 0x8004236 <p_serial_mgr_service+10>
0x08004234 p_serial_mgr_service+8 bx lr
0x08004236 p_serial_mgr_service+10 push {r4, lr}
0x08004238 p_serial_mgr_service+12 sub sp, #8
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x08004230 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0x00000004 fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000
### Source ##########################################################################################################
37 }
38 }
39
40 void p_serial_mgr_init(UART_HandleTypeDef *huart)
41 {
42 _serial_huart_inst = huart;
43 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
44 }
45 void p_serial_mgr_service(void)
46 {
47 if (sstate == SS_START)
48 {
49 volatile HAL_StatusTypeDef ret;
50 ret = HAL_UART_Receive(_serial_huart_inst, &rxb[1], MAX_MESSAGE_LEN, 10);
51
52 for (int ind = 0; ind < 24; ind++)
53 {
54 PDEBUG("[%d]: %02x\n", ind, rxb[ind]);
55 }
56 PDEBUG("\n\n\n\n");
### Stack ###########################################################################################################
[0] from 0x08004230 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:47
[1] from 0x080014f2 in main+126 at Core/Src/main.c:138
### Threads #########################################################################################################
[1] id 0 from 0x08004230 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:47
### 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: 0x080042a4 msp: 0x20010000
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x9650 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x8009810
Loading section .ARM, size 0x8 lma 0x8009c98
Loading section .init_array, size 0x8 lma 0x8009ca0
Loading section .fini_array, size 0x8 lma 0x8009ca8
Loading section .data, size 0x9a8 lma 0x8009cb0
Start address 0x080042a4, load size 42536
Transfer rate: 29 KB/sec, 4726 bytes/write.
Breakpoint 1 at 0x800422c: file shared/drivers/p_serial_mgr.c, line 47.
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: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
Program received signal SIGINT, Interrupt.
0x0800422e in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:47
47 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
~
!0x0800422c p_serial_mgr_service+0 ldr r3, [pc, #80] ; (0x8004280 <p_serial_mgr_service+84>)
0x0800422e p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004230 p_serial_mgr_service+4 cmp r3, #1
0x08004232 p_serial_mgr_service+6 beq.n 0x8004236 <p_serial_mgr_service+10>
0x08004234 p_serial_mgr_service+8 bx lr
0x08004236 p_serial_mgr_service+10 push {r4, lr}
### Breakpoints #####################################################################################################
[1] break at 0x0800422c in shared/drivers/p_serial_mgr.c:47 for p_serial_mgr.c:47 if sstate == SS_START
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x0800422e primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x20000de0 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000
### Source ##########################################################################################################
37 }
38 }
39
40 void p_serial_mgr_init(UART_HandleTypeDef *huart)
41 {
42 _serial_huart_inst = huart;
43 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
44 }
45 void p_serial_mgr_service(void)
46 {
!47 if (sstate == SS_START)
48 {
49 volatile HAL_StatusTypeDef ret;
50 ret = HAL_UART_Receive(_serial_huart_inst, &rxb[1], MAX_MESSAGE_LEN, 10);
51
52 for (int ind = 0; ind < 24; ind++)
53 {
54 PDEBUG("[%d]: %02x\n", ind, rxb[ind]);
55 }
56 PDEBUG("\n\n\n\n");
### Stack ###########################################################################################################
[0] from 0x0800422e in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:47
[1] from 0x080014f2 in main+126 at Core/Src/main.c:138
### Threads #########################################################################################################
[1] id 0 from 0x0800422e in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:47
### Variables #######################################################################################################
#####################################################################################################################
Breakpoint 2 at 0x80041c2: file shared/drivers/p_serial_mgr.c, line 30.
Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf
### Output/messages #################################################################################################
Breakpoint 2, UART1_RxCpltCallback (huart=0x20000a60 <huart1>) at shared/drivers/p_serial_mgr.c:30
30 if (rxb[0] == 0x7E && sstate == SS_IDLE)
### Assembly ########################################################################################################
~
~
~
~
0x080041c0 UART1_RxCpltCallback+0 push {r3, lr}
!0x080041c2 UART1_RxCpltCallback+2 ldr r3, [pc, #36] ; (0x80041e8 <UART1_RxCpltCallback+40>)
0x080041c4 UART1_RxCpltCallback+4 ldrb r3, [r3, #0]
0x080041c6 UART1_RxCpltCallback+6 cmp r3, #126 ; 0x7e
0x080041c8 UART1_RxCpltCallback+8 bne.n 0x80041d8 <UART1_RxCpltCallback+24>
0x080041ca UART1_RxCpltCallback+10 ldr r3, [pc, #32] ; (0x80041ec <UART1_RxCpltCallback+44>)
### Breakpoints #####################################################################################################
[1] break at 0x0800422c in shared/drivers/p_serial_mgr.c:47 for p_serial_mgr.c:47 if sstate == SS_START
[2] break at 0x080041c2 in shared/drivers/p_serial_mgr.c:30 for p_serial_mgr.c:30 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000a60 r5 0x00004001 r10 0x00000000 pc 0x080041c2 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x080041c1 r8 0x00000000 sp 0x2000ff48 msp 0x2000ff48 control 0x00
r4 0x20000a60 r9 0x00000000 lr 0x08003437 psp 0x00000000
### Source ##########################################################################################################
20 SS_START = 1, // get start byte, interrupt after 4 more bytes
21 } serial_state_t;
22
23 static UART_HandleTypeDef *_serial_huart_inst = NULL;
24
25 static uint8_t rxc = '\0';
26 static serial_state_t sstate = SS_IDLE;
27
28 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
29 {
!30 if (rxb[0] == 0x7E && sstate == SS_IDLE)
31 {
32 sstate = SS_START;
33 }
34 else
35 {
36 HAL_UART_Receive_IT(_serial_huart_inst, rxb, 1);
37 }
38 }
39
### Stack ###########################################################################################################
[0] from 0x080041c2 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:30
[1] from 0x08003436 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x08003588 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347
[3] from 0x0800152c in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211
[4] from 0xffffffe9
[5] from 0x08003ff4 in UART_Start_Receive_IT+152 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3685
[6] from 0x08004078 in HAL_UART_Receive_IT+68 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1440
[7] from 0x0800421c in p_serial_mgr_start+20 at shared/drivers/p_serial_mgr.c:65
[8] from 0x080014ee in main+122 at Core/Src/main.c:129
### Threads #########################################################################################################
[1] id 0 from 0x080041c2 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:30
### Variables #######################################################################################################
arg huart = 0x20000a60 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
#####################################################################################################################
$1 = 0 '\000'
Continuing.
### Output/messages #################################################################################################
halted: PC: 0x080041c4
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
Breakpoint 2, UART1_RxCpltCallback (huart=0x20000a60 <huart1>) at shared/drivers/p_serial_mgr.c:30
30 if (rxb[0] == 0x7E && sstate == SS_IDLE)
### Assembly ########################################################################################################
~
~
~
~
0x080041c0 UART1_RxCpltCallback+0 push {r3, lr}
!0x080041c2 UART1_RxCpltCallback+2 ldr r3, [pc, #36] ; (0x80041e8 <UART1_RxCpltCallback+40>)
0x080041c4 UART1_RxCpltCallback+4 ldrb r3, [r3, #0]
0x080041c6 UART1_RxCpltCallback+6 cmp r3, #126 ; 0x7e
0x080041c8 UART1_RxCpltCallback+8 bne.n 0x80041d8 <UART1_RxCpltCallback+24>
0x080041ca UART1_RxCpltCallback+10 ldr r3, [pc, #32] ; (0x80041ec <UART1_RxCpltCallback+44>)
### Breakpoints #####################################################################################################
[1] break at 0x0800422c in shared/drivers/p_serial_mgr.c:47 for p_serial_mgr.c:47 if sstate == SS_START
[2] break at 0x080041c2 in shared/drivers/p_serial_mgr.c:30 for p_serial_mgr.c:30 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
$$0 = 0 '\000'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000a60 r5 0x00000002 r10 0x00000000 pc 0x080041c2 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x080041c1 r8 0x00000000 sp 0x2000ff60 msp 0x2000ff60 control 0x00
r4 0x20000a60 r9 0x00000000 lr 0x08003437 psp 0x00000000
### Source ##########################################################################################################
20 SS_START = 1, // get start byte, interrupt after 4 more bytes
21 } serial_state_t;
22
23 static UART_HandleTypeDef *_serial_huart_inst = NULL;
24
25 static uint8_t rxc = '\0';
26 static serial_state_t sstate = SS_IDLE;
27
28 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
29 {
!30 if (rxb[0] == 0x7E && sstate == SS_IDLE)
31 {
32 sstate = SS_START;
33 }
34 else
35 {
36 HAL_UART_Receive_IT(_serial_huart_inst, rxb, 1);
37 }
38 }
39
### Stack ###########################################################################################################
[0] from 0x080041c2 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:30
[1] from 0x08003436 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x08003632 in HAL_UART_IRQHandler+278 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2427
[3] from 0x0800152c in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211
[4] from 0xffffffe9
[5] from 0x0800422e in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:47
[6] from 0x080014f2 in main+126 at Core/Src/main.c:138
### Threads #########################################################################################################
[1] id 0 from 0x080041c2 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:30
### Variables #######################################################################################################
arg huart = 0x20000a60 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
#####################################################################################################################
$2 = 5 '\005'
$3 = (UART_HandleTypeDef *) 0x20000a60 <huart1>
$4 = {
Instance = 0x40013800,
Init = {
BaudRate = 115200,
WordLength = 0,
StopBits = 0,
Parity = 0,
Mode = 12,
HwFlowCtl = 0,
OverSampling = 0,
OneBitSampling = 0
},
AdvancedInit = {
AdvFeatureInit = 0,
TxPinLevelInvert = 0,
RxPinLevelInvert = 0,
DataInvert = 0,
Swap = 0,
OverrunDisable = 0,
DMADisableonRxError = 0,
AutoBaudRateEnable = 0,
AutoBaudRateMode = 0,
MSBFirst = 0
},
pTxBuffPtr = 0x0,
TxXferSize = 0,
TxXferCount = 0,
pRxBuffPtr = 0x20000bdd <rxb+1> "",
RxXferSize = 1,
RxXferCount = 0,
Mask = 255,
ReceptionType = 0,
RxISR = 0x0,
TxISR = 0x0,
hdmatx = 0x0,
hdmarx = 0x0,
Lock = HAL_UNLOCKED,
gState = 32,
RxState = 32,
ErrorCode = 12,
TxHalfCpltCallback = 0x800331b <HAL_UART_TxHalfCpltCallback>,
TxCpltCallback = 0x8003319 <HAL_UART_TxCpltCallback>,
RxHalfCpltCallback = 0x800331f <HAL_UART_RxHalfCpltCallback>,
RxCpltCallback = 0x80041c1 <UART1_RxCpltCallback>,
ErrorCallback = 0x8003321 <HAL_UART_ErrorCallback>,
AbortCpltCallback = 0x8003323 <HAL_UART_AbortCpltCallback>,
AbortTransmitCpltCallback = 0x8003325 <HAL_UART_AbortTransmitCpltCallback>,
AbortReceiveCpltCallback = 0x8003327 <HAL_UART_AbortReceiveCpltCallback>,
WakeupCallback = 0x800412d <HAL_UARTEx_WakeupCallback>,
RxEventCallback = 0x8003329 <HAL_UARTEx_RxEventCallback>,
MspInitCallback = 0x8001639 <HAL_UART_MspInit>,
MspDeInitCallback = 0x0
}
`/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 0x9650 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x8009810
Loading section .ARM, size 0x8 lma 0x8009c98
Loading section .init_array, size 0x8 lma 0x8009ca0
Loading section .fini_array, size 0x8 lma 0x8009ca8
Loading section .data, size 0x9a8 lma 0x8009cb0
Start address 0x080042a4, load size 42536
Transfer rate: 29 KB/sec, 4726 bytes/write.
Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf
### Output/messages #################################################################################################
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
halted: PC: 0x0800422e
Program received signal SIGINT, Interrupt.
0x0800422e in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:47
47 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
~
!0x0800422c p_serial_mgr_service+0 ldr r3, [pc, #80] ; (0x8004280 <p_serial_mgr_service+84>)
0x0800422e p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004230 p_serial_mgr_service+4 cmp r3, #1
0x08004232 p_serial_mgr_service+6 beq.n 0x8004236 <p_serial_mgr_service+10>
0x08004234 p_serial_mgr_service+8 bx lr
0x08004236 p_serial_mgr_service+10 push {r4, lr}
### Breakpoints #####################################################################################################
[1] break at 0x0800422c in shared/drivers/p_serial_mgr.c:47 for p_serial_mgr.c:47 if sstate == SS_START
[2] break at 0x080041c2 in shared/drivers/p_serial_mgr.c:30 for p_serial_mgr.c:30
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 5 '\005'
$$1 = 0x20000a60 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
$$0 = {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBits = 0,Parity = 0,Mode = 12,Hw…
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x0800422e primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x20000de0 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000
### Source ##########################################################################################################
37 }
38 }
39
40 void p_serial_mgr_init(UART_HandleTypeDef *huart)
41 {
42 _serial_huart_inst = huart;
43 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
44 }
45 void p_serial_mgr_service(void)
46 {
!47 if (sstate == SS_START)
48 {
49 volatile HAL_StatusTypeDef ret;
50 ret = HAL_UART_Receive(_serial_huart_inst, &rxb[1], MAX_MESSAGE_LEN, 10);
51
52 for (int ind = 0; ind < 24; ind++)
53 {
54 PDEBUG("[%d]: %02x\n", ind, rxb[ind]);
55 }
56 PDEBUG("\n\n\n\n");
### Stack ###########################################################################################################
[0] from 0x0800422e in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:47
[1] from 0x080014f2 in main+126 at Core/Src/main.c:138
### Threads #########################################################################################################
[1] id 0 from 0x0800422e in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:47
### Variables #######################################################################################################
#####################################################################################################################
Breakpoint 3 at 0x80041c2: file shared/drivers/p_serial_mgr.c, line 30.
Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf
### Output/messages #################################################################################################
Breakpoint 3, UART1_RxCpltCallback (huart=0x20000a60 <huart1>) at shared/drivers/p_serial_mgr.c:30
30 if (rxb[0] == 0x7E && sstate == SS_IDLE)
### Assembly ########################################################################################################
~
~
~
~
0x080041c0 UART1_RxCpltCallback+0 push {r3, lr}
!0x080041c2 UART1_RxCpltCallback+2 ldr r3, [pc, #36] ; (0x80041e8 <UART1_RxCpltCallback+40>)
0x080041c4 UART1_RxCpltCallback+4 ldrb r3, [r3, #0]
0x080041c6 UART1_RxCpltCallback+6 cmp r3, #126 ; 0x7e
0x080041c8 UART1_RxCpltCallback+8 bne.n 0x80041d8 <UART1_RxCpltCallback+24>
0x080041ca UART1_RxCpltCallback+10 ldr r3, [pc, #32] ; (0x80041ec <UART1_RxCpltCallback+44>)
### Breakpoints #####################################################################################################
[3] break at 0x080041c2 in shared/drivers/p_serial_mgr.c:30 for p_serial_mgr.c:30 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 5 '\005'
$$1 = 0x20000a60 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
$$0 = {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBits = 0,Parity = 0,Mode = 12,Hw…
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000a60 r5 0x00004001 r10 0x00000000 pc 0x080041c2 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x080041c1 r8 0x00000000 sp 0x2000ff60 msp 0x2000ff60 control 0x00
r4 0x20000a60 r9 0x00000000 lr 0x08003437 psp 0x00000000
### Source ##########################################################################################################
20 SS_START = 1, // get start byte, interrupt after 4 more bytes
21 } serial_state_t;
22
23 static UART_HandleTypeDef *_serial_huart_inst = NULL;
24
25 static uint8_t rxc = '\0';
26 static serial_state_t sstate = SS_IDLE;
27
28 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
29 {
!30 if (rxb[0] == 0x7E && sstate == SS_IDLE)
31 {
32 sstate = SS_START;
33 }
34 else
35 {
36 HAL_UART_Receive_IT(_serial_huart_inst, rxb, 3);
37 }
38 }
39
### Stack ###########################################################################################################
[0] from 0x080041c2 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:30
[1] from 0x08003436 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x08003588 in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347
[3] from 0x0800152c in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211
[4] from 0xffffffe9
[5] from 0x08004232 in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:47
[6] from 0x080014f2 in main+126 at Core/Src/main.c:138
### Threads #########################################################################################################
[1] id 0 from 0x080041c2 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:30
### Variables #######################################################################################################
arg huart = 0x20000a60 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
#####################################################################################################################
$5 = "\000\005\002", '\000' <repeats 512 times>
$6 = {[0x0] = 0x0, [0x1] = 0x5, [0x2] = 0x2, [0x3] = 0x0, [0x4] = 0x0, [0x5] = 0x0, [0x6] = 0x0, [0x7] = 0x0, [0x8] = 0x0, [0x9] = 0x0}
$7 = {[0x0] = 0x0, [0x1] = 0x5, [0x2] = 0x2, [0x3] = 0x0, [0x4] = 0x0, [0x5] = 0x0, [0x6] = 0x0, [0x7] = 0x0, [0x8] = 0x0, [0x9] = 0x0}
Continuing.
### Output/messages #################################################################################################
halted: PC: 0x080041c4
Program received signal SIGINT, Interrupt.
main () at Core/Src/main.c:138
138 p_serial_mgr_service();
### Assembly ########################################################################################################
0x080014de main+106 mov r0, r4
0x080014e0 main+108 bl 0x8004034 <HAL_UART_Receive_IT>
0x080014e4 main+112 ldr r0, [pc, #32] ; (0x8001508 <main+148>)
0x080014e6 main+114 bl 0x800195c <HAL_TIM_Base_Start_IT>
0x080014ea main+118 bl 0x8004208 <p_serial_mgr_start>
0x080014ee main+122 bl 0x800422c <p_serial_mgr_service>
0x080014f2 main+126 b.n 0x80014ee <main+122>
0x080014f4 main+128 lsrs r4, r2, #12
0x080014f6 main+130 movs r0, #0
0x080014f8 main+132 asrs r1, r5, #5
### Breakpoints #####################################################################################################
[3] break at 0x080041c2 in shared/drivers/p_serial_mgr.c:30 for p_serial_mgr.c:30 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = "\000\005\002", '\000' <repeats 512 times>
$$1 = "\000\005\002\000\000\000\000\000\000"
$$0 = "\000\005\002\000\000\000\000\000\000"
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014ee primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000
### Source ##########################################################################################################
128
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 while (1)
137 {
138 p_serial_mgr_service();
139 // if (b_timer_struck)
140 // {
141 // // PDEBUG("%d\n", sys_time);
142 // b_timer_struck = false;
143 // motor_degrees = (motor_degrees + 1) % 360;
144 // mc_service(motor_degrees, 50);
145 // }
146 // serial_pkt_t *pkt = NULL;
147 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x080014ee in main+122 at Core/Src/main.c:138
### Threads #########################################################################################################
[1] id 0 from 0x080014ee in main+122 at Core/Src/main.c:138
### Variables #######################################################################################################
#####################################################################################################################
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:138
138 p_serial_mgr_service();
### Assembly ########################################################################################################
0x080014de main+106 mov r0, r4
0x080014e0 main+108 bl 0x8004034 <UART_Start_Receive_IT+56>
0x080014e4 main+112 ldr r0, [pc, #32] ; (0x8001508 <main+148>)
0x080014e6 main+114 bl 0x800195c <HAL_TIM_Base_Start_IT>
0x080014ea main+118 bl 0x8004208 <HAL_UART_Receive_DMA+40>
0x080014ee main+122 bl 0x800422c <HAL_UART_Receive_DMA+76>
0x080014f2 main+126 b.n 0x80014ee <main+122>
0x080014f4 main+128 lsrs r4, r2, #12
0x080014f6 main+130 movs r0, #0
0x080014f8 main+132 asrs r1, r5, #5
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080014ee primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000
### Source ##########################################################################################################
128
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 while (1)
137 {
138 p_serial_mgr_service();
139 // if (b_timer_struck)
140 // {
141 // // PDEBUG("%d\n", sys_time);
142 // b_timer_struck = false;
143 // motor_degrees = (motor_degrees + 1) % 360;
144 // mc_service(motor_degrees, 50);
145 // }
146 // serial_pkt_t *pkt = NULL;
147 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x080014ee in main+122 at Core/Src/main.c:138
### Threads #########################################################################################################
[1] id 0 from 0x080014ee in main+122 at Core/Src/main.c:138
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0xac70 lma 0x80001c0
Loading section .rodata, size 0x4a0 lma 0x800ae30
Loading section .ARM, size 0x8 lma 0x800b2d0
Loading section .init_array, size 0x8 lma 0x800b2d8
Loading section .fini_array, size 0x8 lma 0x800b2e0
Loading section .data, size 0x9a8 lma 0x800b2e8
Start address 0x080043fc, load size 48224
Transfer rate: 30 KB/sec, 5358 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:138
138 p_serial_mgr_service();
### Assembly ########################################################################################################
0x080014de main+106 mov r0, r4
0x080014e0 main+108 bl 0x80040d4 <HAL_UART_Receive_IT>
0x080014e4 main+112 ldr r0, [pc, #32] ; (0x8001508 <main+148>)
0x080014e6 main+114 bl 0x800195c <HAL_TIM_Base_Start_IT>
0x080014ea main+118 bl 0x80043cc <p_serial_mgr_start>
0x080014ee main+122 bl 0x80043c8 <p_serial_mgr_service>
0x080014f2 main+126 b.n 0x80014ee <main+122>
0x080014f4 main+128 lsrs r4, r2, #12
0x080014f6 main+130 movs r0, #0
0x080014f8 main+132 asrs r1, r5, #5
### 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 0x40013808 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x40001000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000
### Source ##########################################################################################################
128
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 while (1)
137 {
138 p_serial_mgr_service();
139 // if (b_timer_struck)
140 // {
141 // // PDEBUG("%d\n", sys_time);
142 // b_timer_struck = false;
143 // motor_degrees = (motor_degrees + 1) % 360;
144 // mc_service(motor_degrees, 50);
145 // }
146 // serial_pkt_t *pkt = NULL;
147 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x080014ee in main+122 at Core/Src/main.c:138
### Threads #########################################################################################################
[1] id 0 from 0x080014ee in main+122 at Core/Src/main.c:138
### 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 0xac70 lma 0x80001c0
Loading section .rodata, size 0x4a0 lma 0x800ae30
Loading section .ARM, size 0x8 lma 0x800b2d0
Loading section .init_array, size 0x8 lma 0x800b2d8
Loading section .fini_array, size 0x8 lma 0x800b2e0
Loading section .data, size 0x9a8 lma 0x800b2e8
Start address 0x080043fc, load size 48224
Transfer rate: 30 KB/sec, 5358 bytes/write.
Breakpoint 1 at 0x800436e: file shared/drivers/p_serial_mgr.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 #################################################################################################
Program received signal SIGINT, Interrupt.
p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:48
warning: Source file is more recent than executable.
48 {}
### Assembly ########################################################################################################
~
~
~
~
~
0x080043c8 p_serial_mgr_service+0 bx lr
~
~
~
~
### Breakpoints #####################################################################################################
[1] break at 0x0800436e in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080043c8 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x40001000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000
### Source ##########################################################################################################
38 }
39 HAL_UART_Receive_DMA(_serial_huart_inst, rxb, MAX_MESSAGE_LEN);
40 }
41
42 void p_serial_mgr_init(UART_HandleTypeDef *huart)
43 {
44 _serial_huart_inst = huart;
45 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
46 }
47 void p_serial_mgr_service(void)
48 {}
49
50 void p_serial_mgr_start()
51 {
52 sstate = SS_IDLE;
53 HAL_UART_Receive_DMA(_serial_huart_inst, rxb, MAX_MESSAGE_LEN);
54 }
~
~
~
### Stack ###########################################################################################################
[0] from 0x080043c8 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:48
[1] from 0x080014f2 in main+126 at Core/Src/main.c:138
### Threads #########################################################################################################
[1] id 0 from 0x080043c8 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:48
### Variables #######################################################################################################
#####################################################################################################################
Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target
[Inferior 1 (Remote target) detached]
0x080043c8 in UART_Start_Receive_DMA (huart=0x20000b14 <huart1+108>, pData=<optimized out>, Size=<optimized out>) at Drivers/CMSIS/Include/cmsis_gcc.h:1207
1207 return(result);
### Assembly ########################################################################################################
0x080043be UART_Start_Receive_DMA+102 bx lr
0x080043c0 UART_Start_Receive_DMA+104 lsrs r0, r3, #15
0x080043c2 UART_Start_Receive_DMA+106 movs r0, #0
0x080043c4 UART_Start_Receive_DMA+108 muls r5, r5
0x080043c6 UART_Start_Receive_DMA+110 lsrs r0, r0, #32
0x080043c8 UART_Start_Receive_DMA+112 bx lr
0x080043ca UART_Start_Receive_DMA+114 movs r0, r0
0x080043cc UART_Start_Receive_DMA+116 push {r3, lr}
0x080043ce UART_Start_Receive_DMA+118 ldr r3, [pc, #20] ; (0x80043e4 <UART_Start_Receive_DMA+140>)
0x080043d0 UART_Start_Receive_DMA+120 movs r2, #0
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x200009c8 r10 0x00000000 pc 0x080043c8 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x40001000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b14 r9 0x00000000 lr 0x080014f3 psp 0x00000000
### Source ##########################################################################################################
1197 \param [in] value Value to store
1198 \param [in] ptr Pointer to location
1199 \return 0 Function succeeded
1200 \return 1 Function failed
1201 */
1202 __STATIC_FORCEINLINE uint32_t __STREXW(uint32_t value, volatile uint32_t *addr)
1203 {
1204 uint32_t result;
1205
1206 __ASM volatile ("strex %0, %2, %1" : "=&r" (result), "=Q" (*addr) : "r" (value) );
1207 return(result);
1208 }
1209
1210
1211 /**
1212 \brief Remove the exclusive lock
1213 \details Removes the exclusive lock which is created by LDREX.
1214 */
1215 __STATIC_FORCEINLINE void __CLREX(void)
1216 {
### Stack ###########################################################################################################
[0] from 0x080043c8 in UART_Start_Receive_DMA+112 at Drivers/CMSIS/Include/cmsis_gcc.h:1207
[1] from 0x20002250 in sbuffer
### Threads #########################################################################################################
[1] id 0 from 0x080043c8 in UART_Start_Receive_DMA+112 at Drivers/CMSIS/Include/cmsis_gcc.h:1207
### Variables #######################################################################################################
arg huart = 0x20000b14 <huart1+108>: {Instance = 0x40004400,Init = {BaudRate = 115200,WordLength = 0,St…, pData = <optimized out>, Size = <optimized out>
loc val = 1073745920
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0xae98 lma 0x80001c0
Loading section .rodata, size 0x4a0 lma 0x800b058
Loading section .ARM, size 0x8 lma 0x800b4f8
Loading section .init_array, size 0x8 lma 0x800b500
Loading section .fini_array, size 0x8 lma 0x800b508
Loading section .data, size 0x9a8 lma 0x800b510
Start address 0x08004624, load size 48776
Transfer rate: 31 KB/sec, 5419 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 while (1)
### Assembly ########################################################################################################
0x08001518 main+112 bl 0x80042fc <HAL_UART_Receive_IT>
0x0800151c main+116 ldr r0, [pc, #32] ; (0x8001540 <main+152>)
0x0800151e main+118 bl 0x80019b8 <HAL_TIM_Base_Start_IT>
0x08001522 main+122 bl 0x80045f4 <p_serial_mgr_start>
0x08001526 main+126 bl 0x80045f0 <p_serial_mgr_service>
0x0800152a main+130 b.n 0x8001526 <main+126>
0x0800152c main+132 lsrs r4, r3, #13
0x0800152e main+134 movs r0, #0
0x08001530 main+136 asrs r1, r5, #5
0x08001532 main+138 lsrs r0, r0, #32
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x0800152a primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00000010 fpscr 0x00000010 faultmask 0x00
r3 0x40001000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
129 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1);
130 HAL_TIM_Base_Start_IT(&htim6);
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
### Stack ###########################################################################################################
[0] from 0x0800152a in main+130 at Core/Src/main.c:139
### Threads #########################################################################################################
[1] id 0 from 0x0800152a in main+130 at Core/Src/main.c:139
### 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: 0x08004624 msp: 0x20010000
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0xae98 lma 0x80001c0
Loading section .rodata, size 0x4a0 lma 0x800b058
Loading section .ARM, size 0x8 lma 0x800b4f8
Loading section .init_array, size 0x8 lma 0x800b500
Loading section .fini_array, size 0x8 lma 0x800b508
Loading section .data, size 0x9a8 lma 0x800b510
Start address 0x08004624, load size 48776
Transfer rate: 30 KB/sec, 5419 bytes/write.
Breakpoint 1 at 0x8004596: file shared/drivers/p_serial_mgr.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, UART1_RxCpltCallback (huart=0x20000aa8 <huart1>) at shared/drivers/p_serial_mgr.c:35
35 for (int ind = 0; ind < 24; ind++)
### Assembly ########################################################################################################
~
~
~
~
0x08004594 UART1_RxCpltCallback+0 push {r4, lr}
!0x08004596 UART1_RxCpltCallback+2 movs r4, #0
0x08004598 UART1_RxCpltCallback+4 b.n 0x80045b2 <UART1_RxCpltCallback+30>
0x0800459a UART1_RxCpltCallback+6 ldr r3, [pc, #44] ; (0x80045c8 <UART1_RxCpltCallback+52>)
0x0800459c UART1_RxCpltCallback+8 ldrb r3, [r3, #0]
0x0800459e UART1_RxCpltCallback+10 add.w r3, r3, r3, lsl #7
### Breakpoints #####################################################################################################
[1] break at 0x08004596 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x0000008b r10 0x00000000 pc 0x08004596 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x8100001f basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00000010 fpscr 0x00000010 faultmask 0x00
r3 0x08004595 r8 0x00000000 sp 0x2000ff60 msp 0x2000ff60 control 0x00
r4 0x40020058 r9 0x00000000 lr 0x080036d1 psp 0x00000000
### Source ##########################################################################################################
25 SS_START = 1, // get start byte, interrupt after 4 more bytes
26 } serial_state_t;
27
28 static UART_HandleTypeDef *_serial_huart_inst = NULL;
29
30 static uint8_t rxc = '\0';
31 static serial_state_t sstate = SS_IDLE;
32
33 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
34 {
!35 for (int ind = 0; ind < 24; ind++)
36 {
37 printf("[%d]: 0x%02x\n", sbuffer[active_buffer][ind]);
38 }
39 HAL_UART_Receive_DMA(_serial_huart_inst, rxb, MAX_MESSAGE_LEN);
40 }
41
42 void p_serial_mgr_init(UART_HandleTypeDef *huart)
43 {
44 _serial_huart_inst = huart;
### Stack ###########################################################################################################
[0] from 0x08004596 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
[1] from 0x080036d0 in UART_DMAReceiveCplt+110 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3907
[2] from 0x08003420 in HAL_DMA_IRQHandler+132 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c:855
[3] from 0x08001564 in DMA1_Channel5_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211
[4] from 0xffffffe9
[5] from 0x08001526 in main+126 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004596 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
### Variables #######################################################################################################
arg huart = 0x20000aa8 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
loc ind = 0
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x08004598
halted: PC: 0x080045b2
halted: PC: 0x080045b4
halted: PC: 0x0800459a
37 printf("[%d]: 0x%02x\n", sbuffer[active_buffer][ind]);
### Assembly ########################################################################################################
~
~
0x08004594 UART1_RxCpltCallback+0 push {r4, lr}
!0x08004596 UART1_RxCpltCallback+2 movs r4, #0
0x08004598 UART1_RxCpltCallback+4 b.n 0x80045b2 <UART1_RxCpltCallback+30>
0x0800459a UART1_RxCpltCallback+6 ldr r3, [pc, #44] ; (0x80045c8 <UART1_RxCpltCallback+52>)
0x0800459c UART1_RxCpltCallback+8 ldrb r3, [r3, #0]
0x0800459e UART1_RxCpltCallback+10 add.w r3, r3, r3, lsl #7
0x080045a2 UART1_RxCpltCallback+14 lsls r2, r3, #2
0x080045a4 UART1_RxCpltCallback+16 ldr r3, [pc, #36] ; (0x80045cc <UART1_RxCpltCallback+56>)
### Breakpoints #####################################################################################################
[1] break at 0x08004596 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x0000008b r10 0x00000000 pc 0x0800459a primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x8100001f basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00000010 fpscr 0x00000010 faultmask 0x00
r3 0x08004595 r8 0x00000000 sp 0x2000ff60 msp 0x2000ff60 control 0x00
r4 0x00000000 r9 0x00000000 lr 0x080036d1 psp 0x00000000
### Source ##########################################################################################################
27
28 static UART_HandleTypeDef *_serial_huart_inst = NULL;
29
30 static uint8_t rxc = '\0';
31 static serial_state_t sstate = SS_IDLE;
32
33 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
34 {
!35 for (int ind = 0; ind < 24; ind++)
36 {
37 printf("[%d]: 0x%02x\n", sbuffer[active_buffer][ind]);
38 }
39 HAL_UART_Receive_DMA(_serial_huart_inst, rxb, MAX_MESSAGE_LEN);
40 }
41
42 void p_serial_mgr_init(UART_HandleTypeDef *huart)
43 {
44 _serial_huart_inst = huart;
45 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
46 }
### Stack ###########################################################################################################
[0] from 0x0800459a in UART1_RxCpltCallback+6 at shared/drivers/p_serial_mgr.c:37
[1] from 0x080036d0 in UART_DMAReceiveCplt+110 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3907
[2] from 0x08003420 in HAL_DMA_IRQHandler+132 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c:855
[3] from 0x08001564 in DMA1_Channel5_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211
[4] from 0xffffffe9
[5] from 0x08001526 in main+126 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x0800459a in UART1_RxCpltCallback+6 at shared/drivers/p_serial_mgr.c:37
### Variables #######################################################################################################
arg huart = <optimized out>
loc ind = 0
#####################################################################################################################
Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target
[Inferior 1 (Remote target) detached]
UART1_RxCpltCallback (huart=<optimized out>) at shared/drivers/p_serial_mgr.c:37
37 PDEBUG("[%d]: 0x%02x\n", sbuffer[active_buffer][ind]);
### Assembly ########################################################################################################
~
~
0x08004594 UART1_RxCpltCallback+0 push {r4, lr}
0x08004596 UART1_RxCpltCallback+2 movs r4, #0
0x08004598 UART1_RxCpltCallback+4 b.n 0x80045b2 <UART1_RxCpltCallback+30>
0x0800459a UART1_RxCpltCallback+6 ldr r3, [pc, #44] ; (0x80045c8 <UART1_RxCpltCallback+52>)
0x0800459c UART1_RxCpltCallback+8 ldrb r3, [r3, #0]
0x0800459e UART1_RxCpltCallback+10 add.w r3, r3, r3, lsl #7
0x080045a2 UART1_RxCpltCallback+14 lsls r2, r3, #2
0x080045a4 UART1_RxCpltCallback+16 ldr r3, [pc, #36] ; (0x80045cc <UART1_RxCpltCallback+56>)
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x0000008b r10 0x00000000 pc 0x0800459a primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x8100001f basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00000010 fpscr 0x00000010 faultmask 0x00
r3 0x08004595 r8 0x00000000 sp 0x2000ff60 msp 0x2000ff60 control 0x00
r4 0x00000000 r9 0x00000000 lr 0x080036d1 psp 0x00000000
### Source ##########################################################################################################
27
28 static UART_HandleTypeDef *_serial_huart_inst = NULL;
29
30 static uint8_t rxc = '\0';
31 static serial_state_t sstate = SS_IDLE;
32
33 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
34 {
35 for (int ind = 0; ind < 24; ind++)
36 {
37 PDEBUG("[%d]: 0x%02x\n", sbuffer[active_buffer][ind]);
38 }
39 HAL_UART_Receive_DMA(_serial_huart_inst, rxb, MAX_MESSAGE_LEN);
40 }
41
42 void p_serial_mgr_init(UART_HandleTypeDef *huart)
43 {
44 _serial_huart_inst = huart;
45 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
46 }
### Stack ###########################################################################################################
[0] from 0x0800459a in UART1_RxCpltCallback+6 at shared/drivers/p_serial_mgr.c:37
[1] from 0x080036d0 in UART_DMAReceiveCplt+110 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3907
[2] from 0x08003420 in HAL_DMA_IRQHandler+132 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c:855
[3] from 0x08001564 in DMA1_Channel5_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211
[4] from 0xffffffe9
[5] from 0x08001526 in main+126 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x0800459a in UART1_RxCpltCallback+6 at shared/drivers/p_serial_mgr.c:37
### Variables #######################################################################################################
arg huart = <optimized out>
loc ind = 0
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x99d0 lma 0x80001c0
Loading section .rodata, size 0x480 lma 0x8009b90
Loading section .ARM, size 0x8 lma 0x800a010
Loading section .init_array, size 0x8 lma 0x800a018
Loading section .fini_array, size 0x8 lma 0x800a020
Loading section .data, size 0x9a8 lma 0x800a028
Start address 0x08004624, load size 43424
Transfer rate: 29 KB/sec, 4824 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:141
141 p_serial_mgr_service();
### Assembly ########################################################################################################
0x08001516 main+110 mov r0, r4
0x08001518 main+112 bl 0x80042fc <HAL_UART_Receive_IT>
0x0800151c main+116 ldr r0, [pc, #32] ; (0x8001540 <main+152>)
0x0800151e main+118 bl 0x80019b8 <HAL_TIM_Base_Start_IT>
0x08001522 main+122 bl 0x80045f4 <p_serial_mgr_start>
0x08001526 main+126 bl 0x80045f0 <p_serial_mgr_service>
0x0800152a main+130 b.n 0x8001526 <main+126>
0x0800152c main+132 lsrs r4, r3, #13
0x0800152e main+134 movs r0, #0
0x08001530 main+136 asrs r1, r5, #5
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08001526 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00000010 fpscr 0x00000010 faultmask 0x00
r3 0x40001000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
149 // serial_pkt_t *pkt = NULL;
150 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x08001526 in main+126 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08001526 in main+126 at Core/Src/main.c:141
### 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: 0x08004624 msp: 0x20010000
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x99d0 lma 0x80001c0
Loading section .rodata, size 0x480 lma 0x8009b90
Loading section .ARM, size 0x8 lma 0x800a010
Loading section .init_array, size 0x8 lma 0x800a018
Loading section .fini_array, size 0x8 lma 0x800a020
Loading section .data, size 0x9a8 lma 0x800a028
Start address 0x08004624, load size 43424
Transfer rate: 29 KB/sec, 4824 bytes/write.
Breakpoint 1 at 0x8004596: file shared/drivers/p_serial_mgr.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, UART1_RxCpltCallback (huart=0x20000aa8 <huart1>) at shared/drivers/p_serial_mgr.c:35
35 for (int ind = 0; ind < 24; ind++)
### Assembly ########################################################################################################
~
~
~
~
0x08004594 UART1_RxCpltCallback+0 push {r4, lr}
!0x08004596 UART1_RxCpltCallback+2 movs r4, #0
0x08004598 UART1_RxCpltCallback+4 b.n 0x80045b2 <UART1_RxCpltCallback+30>
0x0800459a UART1_RxCpltCallback+6 ldr r3, [pc, #44] ; (0x80045c8 <UART1_RxCpltCallback+52>)
0x0800459c UART1_RxCpltCallback+8 ldrb r3, [r3, #0]
0x0800459e UART1_RxCpltCallback+10 add.w r3, r3, r3, lsl #7
### Breakpoints #####################################################################################################
[1] break at 0x08004596 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x0000008b r10 0x00000000 pc 0x08004596 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x8100001f basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00000010 fpscr 0x00000010 faultmask 0x00
r3 0x08004595 r8 0x00000000 sp 0x2000ff60 msp 0x2000ff60 control 0x00
r4 0x40020058 r9 0x00000000 lr 0x080036d1 psp 0x00000000
### Source ##########################################################################################################
25 SS_START = 1, // get start byte, interrupt after 4 more bytes
26 } serial_state_t;
27
28 static UART_HandleTypeDef *_serial_huart_inst = NULL;
29
30 static uint8_t rxc = '\0';
31 static serial_state_t sstate = SS_IDLE;
32
33 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
34 {
!35 for (int ind = 0; ind < 24; ind++)
36 {
37 PDEBUG("[%d]: 0x%02x\n", sbuffer[active_buffer][ind]);
38 }
39 HAL_UART_Receive_DMA(_serial_huart_inst, rxb, MAX_MESSAGE_LEN);
40 }
41
42 void p_serial_mgr_init(UART_HandleTypeDef *huart)
43 {
44 _serial_huart_inst = huart;
### Stack ###########################################################################################################
[0] from 0x08004596 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
[1] from 0x080036d0 in UART_DMAReceiveCplt+110 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3907
[2] from 0x08003420 in HAL_DMA_IRQHandler+132 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c:855
[3] from 0x08001564 in DMA1_Channel5_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211
[4] from 0xffffffe9
[5] from 0x0800152a in main+130 at Core/Src/main.c:139
### Threads #########################################################################################################
[1] id 0 from 0x08004596 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
### Variables #######################################################################################################
arg huart = 0x20000aa8 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
loc ind = 0
#####################################################################################################################
No symbol "q" in current context.
Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target
[Inferior 1 (Remote target) detached]
UART1_RxCpltCallback (huart=0x20000aa8 <huart1>) at shared/drivers/p_serial_mgr.c:35
35 for (int ind = 0; ind < 24; ind++)
### Assembly ########################################################################################################
~
~
~
~
0x08004594 UART1_RxCpltCallback+0 push {r4, lr}
0x08004596 UART1_RxCpltCallback+2 movs r4, #0
0x08004598 UART1_RxCpltCallback+4 b.n 0x80045b2 <UART1_RxCpltCallback+30>
0x0800459a UART1_RxCpltCallback+6 ldr r3, [pc, #44] ; (0x80045c8 <UART1_RxCpltCallback+52>)
0x0800459c UART1_RxCpltCallback+8 ldrb r3, [r3, #0]
0x0800459e UART1_RxCpltCallback+10 add.w r3, r3, r3, lsl #7
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x0000008b r10 0x00000000 pc 0x08004596 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x8100001f basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00000010 fpscr 0x00000010 faultmask 0x00
r3 0x08004595 r8 0x00000000 sp 0x2000ff60 msp 0x2000ff60 control 0x00
r4 0x40020058 r9 0x00000000 lr 0x080036d1 psp 0x00000000
### Source ##########################################################################################################
25 SS_START = 1, // get start byte, interrupt after 4 more bytes
26 } serial_state_t;
27
28 static UART_HandleTypeDef *_serial_huart_inst = NULL;
29
30 static uint8_t rxc = '\0';
31 static serial_state_t sstate = SS_IDLE;
32
33 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
34 {
35 for (int ind = 0; ind < 24; ind++)
36 {
37 PDEBUG("[%d]: 0x%02x\n", sbuffer[active_buffer][ind]);
38 }
39 active_buffer = (active_buffer + 1) % active_buffer;
40 HAL_UART_Receive_DMA(_serial_huart_inst, sbuffer[active_buffer], MAX_MESSAGE_LEN);
41 }
42
43 void p_serial_mgr_init(UART_HandleTypeDef *huart)
44 {
### Stack ###########################################################################################################
[0] from 0x08004596 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
[1] from 0x080036d0 in UART_DMAReceiveCplt+110 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3907
[2] from 0x08003420 in HAL_DMA_IRQHandler+132 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c:855
[3] from 0x08001564 in DMA1_Channel5_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211
[4] from 0xffffffe9
[5] from 0x0800152a in main+130 at Core/Src/main.c:139
### Threads #########################################################################################################
[1] id 0 from 0x08004596 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
### Variables #######################################################################################################
arg huart = 0x20000aa8 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
loc ind = 0
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x99f0 lma 0x80001c0
Loading section .rodata, size 0x480 lma 0x8009bb0
Loading section .ARM, size 0x8 lma 0x800a030
Loading section .init_array, size 0x8 lma 0x800a038
Loading section .fini_array, size 0x8 lma 0x800a040
Loading section .data, size 0x9a8 lma 0x800a048
Start address 0x08004648, load size 43456
Transfer rate: 29 KB/sec, 4828 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:141
141 p_serial_mgr_service();
### Assembly ########################################################################################################
0x08001516 main+110 mov r0, r4
0x08001518 main+112 bl 0x80042fc <HAL_UART_Receive_IT>
0x0800151c main+116 ldr r0, [pc, #32] ; (0x8001540 <main+152>)
0x0800151e main+118 bl 0x80019b8 <HAL_TIM_Base_Start_IT>
0x08001522 main+122 bl 0x8004608 <p_serial_mgr_service>
0x08001526 main+126 bl 0x8004604 <p_serial_mgr_init+16>
0x0800152a main+130 b.n 0x8001526 <main+126>
0x0800152c main+132 lsrs r4, r3, #13
0x0800152e main+134 movs r0, #0
0x08001530 main+136 asrs r1, r5, #5
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08001526 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00000010 fpscr 0x00000010 faultmask 0x00
r3 0x40001000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
149 // serial_pkt_t *pkt = NULL;
150 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x08001526 in main+126 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08001526 in main+126 at Core/Src/main.c:141
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x99f8 lma 0x80001c0
Loading section .rodata, size 0x480 lma 0x8009bb8
Loading section .ARM, size 0x8 lma 0x800a038
Loading section .init_array, size 0x8 lma 0x800a040
Loading section .fini_array, size 0x8 lma 0x800a048
Loading section .data, size 0x9a8 lma 0x800a050
Start address 0x0800464c, load size 43464
Transfer rate: 29 KB/sec, 4829 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:141
141 p_serial_mgr_service();
### Assembly ########################################################################################################
0x08001516 main+110 mov r0, r4
0x08001518 main+112 bl 0x80042fc <HAL_UART_Receive_IT>
0x0800151c main+116 ldr r0, [pc, #32] ; (0x8001540 <main+152>)
0x0800151e main+118 bl 0x80019b8 <HAL_TIM_Base_Start_IT>
0x08001522 main+122 bl 0x800460c <p_serial_mgr_service+88>
0x08001526 main+126 bl 0x8004608 <p_serial_mgr_service+84>
0x0800152a main+130 b.n 0x8001526 <main+126>
0x0800152c main+132 lsrs r4, r3, #13
0x0800152e main+134 movs r0, #0
0x08001530 main+136 asrs r1, r5, #5
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08001526 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00000010 fpscr 0x00000010 faultmask 0x00
r3 0x40001000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
149 // serial_pkt_t *pkt = NULL;
150 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x08001526 in main+126 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08001526 in main+126 at Core/Src/main.c:141
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x9a10 lma 0x80001c0
Loading section .rodata, size 0x480 lma 0x8009bd0
Loading section .ARM, size 0x8 lma 0x800a050
Loading section .init_array, size 0x8 lma 0x800a058
Loading section .fini_array, size 0x8 lma 0x800a060
Loading section .data, size 0x9a8 lma 0x800a068
Start address 0x08004668, load size 43488
Transfer rate: 29 KB/sec, 4832 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 while (1)
### Assembly ########################################################################################################
0x08001518 main+112 bl 0x80042fc <HAL_UART_Receive_IT>
0x0800151c main+116 ldr r0, [pc, #32] ; (0x8001540 <main+152>)
0x0800151e main+118 bl 0x80019b8 <HAL_TIM_Base_Start_IT>
0x08001522 main+122 bl 0x8004628 <p_serial_mgr_service+108>
0x08001526 main+126 bl 0x80045b4 <p_serial_mgr_init+12>
0x0800152a main+130 b.n 0x8001526 <main+126>
0x0800152c main+132 lsrs r4, r3, #13
0x0800152e main+134 movs r0, #0
0x08001530 main+136 asrs r1, r5, #5
0x08001532 main+138 lsrs r0, r0, #32
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x0800152a primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00000010 fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
129 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1);
130 HAL_TIM_Base_Start_IT(&htim6);
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
### Stack ###########################################################################################################
[0] from 0x0800152a in main+130 at Core/Src/main.c:139
### Threads #########################################################################################################
[1] id 0 from 0x0800152a in main+130 at Core/Src/main.c:139
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x9a18 lma 0x80001c0
Loading section .rodata, size 0x480 lma 0x8009bd8
Loading section .ARM, size 0x8 lma 0x800a058
Loading section .init_array, size 0x8 lma 0x800a060
Loading section .fini_array, size 0x8 lma 0x800a068
Loading section .data, size 0x9a8 lma 0x800a070
Start address 0x08004670, load size 43496
Transfer rate: 29 KB/sec, 4832 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:141
141 p_serial_mgr_service();
### Assembly ########################################################################################################
0x08001516 main+110 mov r0, r4
0x08001518 main+112 bl 0x80042fc <HAL_UART_Receive_IT>
0x0800151c main+116 ldr r0, [pc, #32] ; (0x8001540 <main+152>)
0x0800151e main+118 bl 0x80019b8 <HAL_TIM_Base_Start_IT>
0x08001522 main+122 bl 0x8004630 <p_serial_mgr_start>
0x08001526 main+126 bl 0x80045bc <p_serial_mgr_service>
0x0800152a main+130 b.n 0x8001526 <main+126>
0x0800152c main+132 lsrs r4, r3, #13
0x0800152e main+134 movs r0, #0
0x08001530 main+136 asrs r1, r5, #5
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08001526 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00000010 fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
149 // serial_pkt_t *pkt = NULL;
150 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x08001526 in main+126 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08001526 in main+126 at Core/Src/main.c:141
### 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: 0x08004670 msp: 0x20010000
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x9a18 lma 0x80001c0
Loading section .rodata, size 0x480 lma 0x8009bd8
Loading section .ARM, size 0x8 lma 0x800a058
Loading section .init_array, size 0x8 lma 0x800a060
Loading section .fini_array, size 0x8 lma 0x800a068
Loading section .data, size 0x9a8 lma 0x800a070
Start address 0x08004670, load size 43496
Transfer rate: 29 KB/sec, 4832 bytes/write.
Breakpoint 1 at 0x8004594: file shared/drivers/p_serial_mgr.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, UART1_RxCpltCallback (huart=0x20000aa8 <huart1>) at shared/drivers/p_serial_mgr.c:35
35 if (sstate == SS_IDLE)
### Assembly ########################################################################################################
~
~
~
~
~
!0x08004594 UART1_RxCpltCallback+0 ldr r3, [pc, #12] ; (0x80045a4 <UART1_RxCpltCallback+16>)
0x08004596 UART1_RxCpltCallback+2 ldrb r3, [r3, #0]
0x08004598 UART1_RxCpltCallback+4 cbnz r3, 0x80045a0 <UART1_RxCpltCallback+12>
0x0800459a UART1_RxCpltCallback+6 ldr r3, [pc, #8] ; (0x80045a4 <UART1_RxCpltCallback+16>)
0x0800459c UART1_RxCpltCallback+8 movs r2, #1
### Breakpoints #####################################################################################################
[1] break at 0x08004594 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x0000008b r10 0x00000000 pc 0x08004594 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x8100001f basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00000010 fpscr 0x00000010 faultmask 0x00
r3 0x08004595 r8 0x00000000 sp 0x2000ff68 msp 0x2000ff68 control 0x00
r4 0x40020058 r9 0x00000000 lr 0x080036d1 psp 0x00000000
### Source ##########################################################################################################
25 SS_START = 1, // get start byte, interrupt after 4 more bytes
26 } serial_state_t;
27
28 static UART_HandleTypeDef *_serial_huart_inst = NULL;
29
30 static uint8_t rxc = '\0';
31 static serial_state_t sstate = SS_IDLE;
32
33 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
34 {
!35 if (sstate == SS_IDLE)
36 {
37 sstate = SS_START;
38 }
39 }
40
41 void p_serial_mgr_init(UART_HandleTypeDef *huart)
42 {
43 _serial_huart_inst = huart;
44 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
### Stack ###########################################################################################################
[0] from 0x08004594 in UART1_RxCpltCallback+0 at shared/drivers/p_serial_mgr.c:35
[1] from 0x080036d0 in UART_DMAReceiveCplt+110 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3907
[2] from 0x08003420 in HAL_DMA_IRQHandler+132 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c:855
[3] from 0x08001564 in DMA1_Channel5_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211
[4] from 0xffffffe9
[5] from 0x080045c2 in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:48
[6] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004594 in UART1_RxCpltCallback+0 at shared/drivers/p_serial_mgr.c:35
### Variables #######################################################################################################
arg huart = 0x20000aa8 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
#####################################################################################################################
$1 = {[0x0] = 0x0, [0x1] = 0x2, [0x2] = 0x9, [0x3] = 0x1, [0x4] = 0x47, [0x5] = 0x5, [0x6] = 0x0, [0x7] = 0x0, [0x8] = 0x0, [0x9] = 0x0, [0xa] = 0x0, [0xb] = 0x0, [0xc] = 0xb2, [0xd] = 0x2, [0xe] = 0x9, [0xf] = 0x1, [0x10] = 0xe0, [0x11] = 0xb, [0x12] = 0x0, [0x13] = 0x0, [0x14] = 0x0, [0x15] = 0x0, [0x16] = 0x0, [0x17] = 0x0}
Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf
### Output/messages #################################################################################################
Program received signal SIGINT, Interrupt.
0x080045c0 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:48
48 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
0x080045bc p_serial_mgr_service+0 ldr r3, [pc, #92] ; (0x800461c <p_serial_mgr_service+96>)
0x080045be p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x080045c0 p_serial_mgr_service+4 cmp r3, #1
0x080045c2 p_serial_mgr_service+6 beq.n 0x8004614 <p_serial_mgr_service+88>
0x080045c4 p_serial_mgr_service+8 bx lr
0x080045c6 p_serial_mgr_service+10 ldr r3, [pc, #88] ; (0x8004620 <p_serial_mgr_service+100>)
0x080045c8 p_serial_mgr_service+12 ldrb r3, [r3, #0]
### Breakpoints #####################################################################################################
[1] break at 0x08004594 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35
### Expressions #####################################################################################################
### History #########################################################################################################
$$0 = "\000\002\t\001G\005\000\000\000\000\000\000\262\002\t\001\340\v\000\000\000\000\000"
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x080045c0 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00000010 fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
38 }
39 }
40
41 void p_serial_mgr_init(UART_HandleTypeDef *huart)
42 {
43 _serial_huart_inst = huart;
44 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
45 }
46 void p_serial_mgr_service(void)
47 {
48 if (sstate == SS_START)
49 {
50 for (int ind = 0; ind < 24; ind++)
51 {
52 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
53 }
54 active_buffer = (active_buffer + 1) % active_buffer;
55 sstate = SS_IDLE;
56 HAL_UART_Receive_DMA(_serial_huart_inst, sbuffer[active_buffer], MAX_MESSAGE_LEN);
57 }
### Stack ###########################################################################################################
[0] from 0x080045c0 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:48
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080045c0 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:48
### Variables #######################################################################################################
#####################################################################################################################
Note: breakpoint 1 also set at pc 0x8004594.
Breakpoint 2 at 0x8004594: file shared/drivers/p_serial_mgr.c, line 35.
Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf
### Output/messages #################################################################################################
Program received signal SIGINT, Interrupt.
0x080045be in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:48
48 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
~
0x080045bc p_serial_mgr_service+0 ldr r3, [pc, #92] ; (0x800461c <p_serial_mgr_service+96>)
0x080045be p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x080045c0 p_serial_mgr_service+4 cmp r3, #1
0x080045c2 p_serial_mgr_service+6 beq.n 0x8004614 <p_serial_mgr_service+88>
0x080045c4 p_serial_mgr_service+8 bx lr
0x080045c6 p_serial_mgr_service+10 ldr r3, [pc, #88] ; (0x8004620 <p_serial_mgr_service+100>)
### Breakpoints #####################################################################################################
[1] break at 0x08004594 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35
[2] break at 0x08004594 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35
### Expressions #####################################################################################################
### History #########################################################################################################
$$0 = "\000\002\t\001G\005\000\000\000\000\000\000\262\002\t\001\340\v\000\000\000\000\000"
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x080045be primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00000010 fpscr 0x00000010 faultmask 0x00
r3 0x20002050 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
38 }
39 }
40
41 void p_serial_mgr_init(UART_HandleTypeDef *huart)
42 {
43 _serial_huart_inst = huart;
44 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
45 }
46 void p_serial_mgr_service(void)
47 {
48 if (sstate == SS_START)
49 {
50 for (int ind = 0; ind < 24; ind++)
51 {
52 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
53 }
54 active_buffer = (active_buffer + 1) % active_buffer;
55 sstate = SS_IDLE;
56 HAL_UART_Receive_DMA(_serial_huart_inst, sbuffer[active_buffer], MAX_MESSAGE_LEN);
57 }
### Stack ###########################################################################################################
[0] from 0x080045be in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:48
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080045be in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:48
### Variables #######################################################################################################
#####################################################################################################################
Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target
[Inferior 1 (Remote target) detached]
0x080045be in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:48
48 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
~
0x080045bc p_serial_mgr_service+0 ldr r3, [pc, #92] ; (0x800461c <p_serial_mgr_service+96>)
0x080045be p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x080045c0 p_serial_mgr_service+4 cmp r3, #1
0x080045c2 p_serial_mgr_service+6 beq.n 0x8004614 <p_serial_mgr_service+88>
0x080045c4 p_serial_mgr_service+8 bx lr
0x080045c6 p_serial_mgr_service+10 ldr r3, [pc, #88] ; (0x8004620 <p_serial_mgr_service+100>)
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x080045be primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00000010 fpscr 0x00000010 faultmask 0x00
r3 0x20002050 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
38 }
39 }
40
41 void p_serial_mgr_init(UART_HandleTypeDef *huart)
42 {
43 _serial_huart_inst = huart;
44 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
45 }
46 void p_serial_mgr_service(void)
47 {
48 if (sstate == SS_START)
49 {
50 for (int ind = 0; ind < 24; ind++)
51 {
52 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
53 }
54 active_buffer = (active_buffer + 1) % active_buffer;
55 sstate = SS_IDLE;
56 HAL_UART_Receive_DMA(_serial_huart_inst, sbuffer[active_buffer], MAX_MESSAGE_LEN);
57 }
### Stack ###########################################################################################################
[0] from 0x080045be in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:48
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080045be in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:48
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x9a18 lma 0x80001c0
Loading section .rodata, size 0x480 lma 0x8009bd8
Loading section .ARM, size 0x8 lma 0x800a058
Loading section .init_array, size 0x8 lma 0x800a060
Loading section .fini_array, size 0x8 lma 0x800a068
Loading section .data, size 0x9a8 lma 0x800a070
Start address 0x08004670, load size 43496
Transfer rate: 29 KB/sec, 4832 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:141
141 p_serial_mgr_service();
### Assembly ########################################################################################################
0x08001516 main+110 mov r0, r4
0x08001518 main+112 bl 0x80042fc <HAL_UART_Receive_IT>
0x0800151c main+116 ldr r0, [pc, #32] ; (0x8001540 <main+152>)
0x0800151e main+118 bl 0x80019b8 <HAL_TIM_Base_Start_IT>
0x08001522 main+122 bl 0x8004630 <p_serial_mgr_start>
0x08001526 main+126 bl 0x80045bc <p_serial_mgr_service>
0x0800152a main+130 b.n 0x8001526 <main+126>
0x0800152c main+132 lsrs r4, r3, #13
0x0800152e main+134 movs r0, #0
0x08001530 main+136 asrs r1, r5, #5
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08001526 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00000010 fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
149 // serial_pkt_t *pkt = NULL;
150 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x08001526 in main+126 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08001526 in main+126 at Core/Src/main.c:141
### 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: 0x08004670 msp: 0x20010000
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x9a18 lma 0x80001c0
Loading section .rodata, size 0x480 lma 0x8009bd8
Loading section .ARM, size 0x8 lma 0x800a058
Loading section .init_array, size 0x8 lma 0x800a060
Loading section .fini_array, size 0x8 lma 0x800a068
Loading section .data, size 0x9a8 lma 0x800a070
Start address 0x08004670, load size 43496
Transfer rate: 29 KB/sec, 4832 bytes/write.
Breakpoint 1 at 0x8004594: file shared/drivers/p_serial_mgr.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, UART1_RxCpltCallback (huart=0x20000aa8 <huart1>) at shared/drivers/p_serial_mgr.c:35
35 if (sstate == SS_IDLE)
### Assembly ########################################################################################################
~
~
~
~
~
!0x08004594 UART1_RxCpltCallback+0 ldr r3, [pc, #12] ; (0x80045a4 <UART1_RxCpltCallback+16>)
0x08004596 UART1_RxCpltCallback+2 ldrb r3, [r3, #0]
0x08004598 UART1_RxCpltCallback+4 cbnz r3, 0x80045a0 <UART1_RxCpltCallback+12>
0x0800459a UART1_RxCpltCallback+6 ldr r3, [pc, #8] ; (0x80045a4 <UART1_RxCpltCallback+16>)
0x0800459c UART1_RxCpltCallback+8 movs r2, #1
### Breakpoints #####################################################################################################
[1] break at 0x08004594 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x0000008b r10 0x00000000 pc 0x08004594 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x8100001f basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00000010 fpscr 0x00000010 faultmask 0x00
r3 0x08004595 r8 0x00000000 sp 0x2000ff68 msp 0x2000ff68 control 0x00
r4 0x40020058 r9 0x00000000 lr 0x080036d1 psp 0x00000000
### Source ##########################################################################################################
25 SS_START = 1, // get start byte, interrupt after 4 more bytes
26 } serial_state_t;
27
28 static UART_HandleTypeDef *_serial_huart_inst = NULL;
29
30 static uint8_t rxc = '\0';
31 static serial_state_t sstate = SS_IDLE;
32
33 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
34 {
!35 if (sstate == SS_IDLE)
36 {
37 sstate = SS_START;
38 }
39 }
40
41 void p_serial_mgr_init(UART_HandleTypeDef *huart)
42 {
43 _serial_huart_inst = huart;
44 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
### Stack ###########################################################################################################
[0] from 0x08004594 in UART1_RxCpltCallback+0 at shared/drivers/p_serial_mgr.c:35
[1] from 0x080036d0 in UART_DMAReceiveCplt+110 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3907
[2] from 0x08003420 in HAL_DMA_IRQHandler+132 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c:855
[3] from 0x08001564 in DMA1_Channel5_IRQHandler+8 at Core/Src/stm32l4xx_it.c:211
[4] from 0xffffffe9
[5] from 0x080045be in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:48
[6] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004594 in UART1_RxCpltCallback+0 at shared/drivers/p_serial_mgr.c:35
### Variables #######################################################################################################
arg huart = 0x20000aa8 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
#####################################################################################################################
$1 = {[0x0] = 0x0, [0x1] = 0x2, [0x2] = 0x9, [0x3] = 0x1, [0x4] = 0x83, [0x5] = 0xe, [0x6] = 0x0, [0x7] = 0x0, [0x8] = 0x61, [0x9] = 0x3b, [0xa] = 0x0, [0xb] = 0x0, [0xc] = 0xd1, [0xd] = 0x2, [0xe] = 0x9, [0xf] = 0x1, [0x10] = 0xcb, [0x11] = 0x13, [0x12] = 0x0, [0x13] = 0x0, [0x14] = 0x61, [0x15] = 0x3b, [0x16] = 0x0, [0x17] = 0x0}
Continuing.
### Output/messages #################################################################################################
halted: PC: 0x08004596
Program received signal SIGINT, Interrupt.
p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:48
48 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
~
~
0x080045bc p_serial_mgr_service+0 ldr r3, [pc, #92] ; (0x800461c <p_serial_mgr_service+96>)
0x080045be p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x080045c0 p_serial_mgr_service+4 cmp r3, #1
0x080045c2 p_serial_mgr_service+6 beq.n 0x8004614 <p_serial_mgr_service+88>
0x080045c4 p_serial_mgr_service+8 bx lr
### Breakpoints #####################################################################################################
[1] break at 0x08004594 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$0 = "\000\002\t\001\203\016\000\000a;\000\000\321\002\t\001\313\023\000\000a;\000"
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x080045bc primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00000010 fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
38 }
39 }
40
41 void p_serial_mgr_init(UART_HandleTypeDef *huart)
42 {
43 _serial_huart_inst = huart;
44 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
45 }
46 void p_serial_mgr_service(void)
47 {
48 if (sstate == SS_START)
49 {
50 for (int ind = 0; ind < 24; ind++)
51 {
52 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
53 }
54 active_buffer = (active_buffer + 1) % active_buffer;
55 sstate = SS_IDLE;
56 HAL_UART_Receive_DMA(_serial_huart_inst, sbuffer[active_buffer], MAX_MESSAGE_LEN);
57 }
### Stack ###########################################################################################################
[0] from 0x080045bc in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:48
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080045bc in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:48
### Variables #######################################################################################################
#####################################################################################################################
Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target
[Inferior 1 (Remote target) detached]
0x080045bc in memset ()
### Assembly ########################################################################################################
0x080045bc ? ldr r3, [pc, #92] ; (0x800461c <memset+128>)
0x080045be ? ldrb r3, [r3, #0]
0x080045c0 ? cmp r3, #1
0x080045c2 ? beq.n 0x8004614 <memset+120>
0x080045c4 ? bx lr
0x080045c6 ? ldr r3, [pc, #88] ; (0x8004620 <memset+132>)
0x080045c8 ? ldrb r3, [r3, #0]
0x080045ca ? add.w r3, r3, r3, lsl #7
0x080045ce ? lsls r2, r3, #2
0x080045d0 ? ldr r3, [pc, #80] ; (0x8004624 <memset+136>)
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x080045bc primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00000010 fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
### Stack ###########################################################################################################
[0] from 0x080045bc in memset
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080045bc in memset
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x98a8 lma 0x80001c0
Loading section .rodata, size 0x480 lma 0x8009a68
Loading section .ARM, size 0x8 lma 0x8009ee8
Loading section .init_array, size 0x8 lma 0x8009ef0
Loading section .fini_array, size 0x8 lma 0x8009ef8
Loading section .data, size 0x9a8 lma 0x8009f00
Start address 0x08004500, load size 43128
Transfer rate: 29 KB/sec, 4792 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]
0x08004436 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:48
48 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
~
0x08004434 p_serial_mgr_service+0 ldr r3, [pc, #116] ; (0x80044ac <p_serial_mgr_service+120>)
0x08004436 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004438 p_serial_mgr_service+4 cmp r3, #1
0x0800443a p_serial_mgr_service+6 beq.n 0x800443e <p_serial_mgr_service+10>
0x0800443c p_serial_mgr_service+8 bx lr
0x0800443e p_serial_mgr_service+10 push {r4, lr}
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08004436 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x20002050 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
38 }
39 }
40
41 void p_serial_mgr_init(UART_HandleTypeDef *huart)
42 {
43 _serial_huart_inst = huart;
44 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
45 }
46 void p_serial_mgr_service(void)
47 {
48 if (sstate == SS_START)
49 {
50 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
51 for (int ind = 0; ind < 24; ind++)
52 {
53 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
54 }
55 PDEBUG("\n\n");
56 sstate = SS_IDLE;
57 active_buffer = (active_buffer + 1) % active_buffer;
### Stack ###########################################################################################################
[0] from 0x08004436 in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:48
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004436 in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:48
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x98b8 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x8009a78
Loading section .ARM, size 0x8 lma 0x8009f00
Loading section .init_array, size 0x8 lma 0x8009f08
Loading section .fini_array, size 0x8 lma 0x8009f10
Loading section .data, size 0x9a8 lma 0x8009f18
Start address 0x0800450c, load size 43152
Transfer rate: 29 KB/sec, 4794 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]
0x08004438 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:48
48 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
0x08004434 p_serial_mgr_service+0 ldr r3, [pc, #124] ; (0x80044b4 <p_serial_mgr_service+128>)
0x08004436 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004438 p_serial_mgr_service+4 cmp r3, #1
0x0800443a p_serial_mgr_service+6 beq.n 0x800443e <p_serial_mgr_service+10>
0x0800443c p_serial_mgr_service+8 bx lr
0x0800443e p_serial_mgr_service+10 push {r4, lr}
0x08004440 p_serial_mgr_service+12 ldr r3, [pc, #116] ; (0x80044b8 <p_serial_mgr_service+132>)
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08004438 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
38 }
39 }
40
41 void p_serial_mgr_init(UART_HandleTypeDef *huart)
42 {
43 _serial_huart_inst = huart;
44 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
45 }
46 void p_serial_mgr_service(void)
47 {
48 if (sstate == SS_START)
49 {
50 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
51 for (int ind = 0; ind < 24; ind++)
52 {
53 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
54 }
55 PDEBUG("\n\n");
56 sstate = SS_IDLE;
57 active_buffer = (active_buffer + 1) % active_buffer;
### Stack ###########################################################################################################
[0] from 0x08004438 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:48
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004438 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:48
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x98b8 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x8009a78
Loading section .ARM, size 0x8 lma 0x8009f00
Loading section .init_array, size 0x8 lma 0x8009f08
Loading section .fini_array, size 0x8 lma 0x8009f10
Loading section .data, size 0x9a8 lma 0x8009f18
Start address 0x0800450c, load size 43152
Transfer rate: 29 KB/sec, 4794 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]
0x08004436 in __chk_fail ()
### Assembly ########################################################################################################
0x08004436 ? ldrb r3, [r3, #0]
0x08004438 ? cmp r3, #1
0x0800443a ? beq.n 0x800443e <__chk_fail+38>
0x0800443c ? bx lr
0x0800443e ? push {r4, lr}
0x08004440 ? ldr r3, [pc, #116] ; (0x80044b8 <_kill_r+4>)
0x08004442 ? ldrb r3, [r3, #0]
0x08004444 ? add.w r3, r3, r3, lsl #7
0x08004448 ? lsls r1, r3, #2
0x0800444a ? adds r1, #1
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08004436 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x20002050 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
### Stack ###########################################################################################################
[0] from 0x08004436 in __chk_fail
[1] from 0x0800152a in HAL_MspInit+22 at Core/Src/stm32l4xx_hal_msp.c:72
[2] from 0x0800152a in HAL_MspInit+22 at Core/Src/stm32l4xx_hal_msp.c:72
[3] from 0x0800152a in HAL_MspInit+22 at Core/Src/stm32l4xx_hal_msp.c:72
[4] from 0x0800152a in HAL_MspInit+22 at Core/Src/stm32l4xx_hal_msp.c:72
[5] from 0x0800152a in HAL_MspInit+22 at Core/Src/stm32l4xx_hal_msp.c:72
[6] from 0x0800152a in HAL_MspInit+22 at Core/Src/stm32l4xx_hal_msp.c:72
[7] from 0x0800152a in HAL_MspInit+22 at Core/Src/stm32l4xx_hal_msp.c:72
[8] from 0x0800152a in HAL_MspInit+22 at Core/Src/stm32l4xx_hal_msp.c:72
[9] from 0x0800152a in HAL_MspInit+22 at Core/Src/stm32l4xx_hal_msp.c:72
[+]
### Threads #########################################################################################################
[1] id 0 from 0x08004436 in __chk_fail
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x95b0 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x8009770
Loading section .ARM, size 0x8 lma 0x8009bf8
Loading section .init_array, size 0x8 lma 0x8009c00
Loading section .fini_array, size 0x8 lma 0x8009c08
Loading section .data, size 0x9a8 lma 0x8009c10
Start address 0x08004204, load size 42376
Transfer rate: 29 KB/sec, 4708 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]
0x0800413a in p_serial_mgr_init (huart=0x0) at shared/drivers/p_serial_mgr.c:45
45 }
### Assembly ########################################################################################################
0x08004130 p_serial_mgr_init+8 lsrs r0, r4, #16
0x08004132 p_serial_mgr_init+10 movs r0, #0
0x08004134 p_serial_mgr_init+12 asrs r1, r2
0x08004136 p_serial_mgr_init+14 lsrs r0, r0, #32
0x08004138 p_serial_mgr_init+16 ldr r3, [pc, #124] ; (0x80041b8 <p_serial_mgr_service+124>)
0x0800413a p_serial_mgr_init+18 ldrb r3, [r3, #0]
~
~
~
~
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x0800413a primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x20002050 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014a9 psp 0x00000000
### Source ##########################################################################################################
35 if (sstate == SS_IDLE)
36 {
37 sstate = SS_START;
38 }
39 }
40
41 void p_serial_mgr_init(UART_HandleTypeDef *huart)
42 {
43 _serial_huart_inst = huart;
44 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
45 }
46 void p_serial_mgr_service(void)
47 {
48 if (sstate == SS_START)
49 {
50 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
51 for (int ind = 0; ind < 24; ind++)
52 {
53 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
54 }
### Stack ###########################################################################################################
[0] from 0x0800413a in p_serial_mgr_init+18 at shared/drivers/p_serial_mgr.c:45
[1] from 0x080014a8 in main+92 at Core/Src/main.c:132
### Threads #########################################################################################################
[1] id 0 from 0x0800413a in p_serial_mgr_init+18 at shared/drivers/p_serial_mgr.c:45
### Variables #######################################################################################################
arg huart = 0x0: {Instance = 0x20010000,Init = {BaudRate = 134234629,WordLength = 134223037,StopBits = …
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x95b0 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x8009770
Loading section .ARM, size 0x8 lma 0x8009bf8
Loading section .init_array, size 0x8 lma 0x8009c00
Loading section .fini_array, size 0x8 lma 0x8009c08
Loading section .data, size 0x9a8 lma 0x8009c10
Start address 0x08004208, load size 42376
Transfer rate: 29 KB/sec, 4708 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]
0x0800413e in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:48
48 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
~
0x0800413c p_serial_mgr_service+0 ldr r3, [pc, #124] ; (0x80041bc <p_serial_mgr_service+128>)
0x0800413e p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004140 p_serial_mgr_service+4 cmp r3, #1
0x08004142 p_serial_mgr_service+6 beq.n 0x8004146 <p_serial_mgr_service+10>
0x08004144 p_serial_mgr_service+8 bx lr
0x08004146 p_serial_mgr_service+10 push {r4, lr}
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x0800413e primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x20002050 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
38 }
39 }
40
41 void p_serial_mgr_init(UART_HandleTypeDef *huart)
42 {
43 _serial_huart_inst = huart;
44 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
45 }
46 void p_serial_mgr_service(void)
47 {
48 if (sstate == SS_START)
49 {
50 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
51 for (int ind = 0; ind < 24; ind++)
52 {
53 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
54 }
55 PDEBUG("\n\n");
56 sstate = SS_IDLE;
57 active_buffer = (active_buffer + 1) % active_buffer;
### Stack ###########################################################################################################
[0] from 0x0800413e in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:48
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x0800413e in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:48
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x95b0 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x8009770
Loading section .ARM, size 0x8 lma 0x8009bf8
Loading section .init_array, size 0x8 lma 0x8009c00
Loading section .fini_array, size 0x8 lma 0x8009c08
Loading section .data, size 0x9a8 lma 0x8009c10
Start address 0x08004208, load size 42376
Transfer rate: 29 KB/sec, 4708 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 while (1)
### Assembly ########################################################################################################
0x0800149c main+80 ldr r1, [pc, #28] ; (0x80014bc <main+112>)
0x0800149e main+82 mov r0, r4
0x080014a0 main+84 bl 0x8003f88 <HAL_UART_Receive_IT>
0x080014a4 main+88 bl 0x80041d4 <p_serial_mgr_start>
0x080014a8 main+92 bl 0x800413c <p_serial_mgr_service>
0x080014ac main+96 b.n 0x80014a8 <main+92>
0x080014ae main+98 nop
0x080014b0 main+100 lsrs r4, r3, #13
0x080014b2 main+102 movs r0, #0
0x080014b4 main+104 asrs r1, r5, #5
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080014ac primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
129 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1);
130 // HAL_TIM_Base_Start_IT(&htim6);
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
### Stack ###########################################################################################################
[0] from 0x080014ac in main+96 at Core/Src/main.c:139
### Threads #########################################################################################################
[1] id 0 from 0x080014ac in main+96 at Core/Src/main.c:139
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x95b0 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x8009770
Loading section .ARM, size 0x8 lma 0x8009bf8
Loading section .init_array, size 0x8 lma 0x8009c00
Loading section .fini_array, size 0x8 lma 0x8009c08
Loading section .data, size 0x9a8 lma 0x8009c10
Start address 0x08004208, load size 42376
Transfer rate: 29 KB/sec, 4708 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:141
141 p_serial_mgr_service();
### Assembly ########################################################################################################
0x0800149a main+78 movs r2, #1
0x0800149c main+80 ldr r1, [pc, #28] ; (0x80014bc <main+112>)
0x0800149e main+82 mov r0, r4
0x080014a0 main+84 bl 0x8003f88 <HAL_UART_Receive_IT>
0x080014a4 main+88 bl 0x80041d4 <p_serial_mgr_start>
0x080014a8 main+92 bl 0x800413c <p_serial_mgr_service>
0x080014ac main+96 b.n 0x80014a8 <main+92>
0x080014ae main+98 nop
0x080014b0 main+100 lsrs r4, r3, #13
0x080014b2 main+102 movs r0, #0
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080014a8 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
149 // serial_pkt_t *pkt = NULL;
150 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x080014a8 in main+92 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080014a8 in main+92 at Core/Src/main.c:141
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x95b0 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x8009770
Loading section .ARM, size 0x8 lma 0x8009bf8
Loading section .init_array, size 0x8 lma 0x8009c00
Loading section .fini_array, size 0x8 lma 0x8009c08
Loading section .data, size 0x9a8 lma 0x8009c10
Start address 0x08004208, load size 42376
Transfer rate: 29 KB/sec, 4708 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]
0x0800413e in UART1_RxCpltCallback (huart=0x0) at shared/drivers/p_serial_mgr.c:41
41 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
### Assembly ########################################################################################################
0x08004134 UART1_RxCpltCallback+32 lsrs r0, r4, #16
0x08004136 UART1_RxCpltCallback+34 movs r0, #0
0x08004138 UART1_RxCpltCallback+36 asrs r5, r2
0x0800413a UART1_RxCpltCallback+38 lsrs r0, r0, #32
0x0800413c UART1_RxCpltCallback+40 ldr r3, [pc, #124] ; (0x80041bc <p_serial_mgr_service+72>)
0x0800413e UART1_RxCpltCallback+42 ldrb r3, [r3, #0]
0x08004140 UART1_RxCpltCallback+44 cmp r3, #1
0x08004142 UART1_RxCpltCallback+46 beq.n 0x8004146 <UART1_RxCpltCallback+50>
0x08004144 UART1_RxCpltCallback+48 bx lr
0x08004146 UART1_RxCpltCallback+50 push {r4, lr}
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x0800413e primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x20002050 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
31 static serial_state_t sstate = SS_IDLE;
32
33 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
34 {
35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
36 {
37 sstate = SS_START;
38 }
39 else
40 {
41 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
42 }
43 }
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 void p_serial_mgr_service(void)
### Stack ###########################################################################################################
[0] from 0x0800413e in UART1_RxCpltCallback+42 at shared/drivers/p_serial_mgr.c:41
[1] from 0x0800423e in p_serial_mgr_start+50 at shared/drivers/p_serial_mgr.c:70
[2] from 0x00000000
### Threads #########################################################################################################
[1] id 0 from 0x0800413e in UART1_RxCpltCallback+42 at shared/drivers/p_serial_mgr.c:41
### Variables #######################################################################################################
arg huart = 0x0: {Instance = 0x20010000,Init = {BaudRate = 134234633,WordLength = 134223041,StopBits = …
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x95e8 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x80097a8
Loading section .ARM, size 0x8 lma 0x8009c30
Loading section .init_array, size 0x8 lma 0x8009c38
Loading section .fini_array, size 0x8 lma 0x8009c40
Loading section .data, size 0x9a8 lma 0x8009c48
Start address 0x08004240, load size 42432
Transfer rate: 29 KB/sec, 4714 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 while (1)
### Assembly ########################################################################################################
0x0800149c main+80 ldr r1, [pc, #28] ; (0x80014bc <main+112>)
0x0800149e main+82 mov r0, r4
0x080014a0 main+84 bl 0x8003f88 <HAL_UART_Receive_IT>
0x080014a4 main+88 bl 0x800420c <p_serial_mgr_service+152>
0x080014a8 main+92 bl 0x8004174 <p_serial_mgr_service>
0x080014ac main+96 b.n 0x80014a8 <main+92>
0x080014ae main+98 nop
0x080014b0 main+100 lsrs r4, r3, #13
0x080014b2 main+102 movs r0, #0
0x080014b4 main+104 asrs r1, r5, #5
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080014ac primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
129 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1);
130 // HAL_TIM_Base_Start_IT(&htim6);
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
### Stack ###########################################################################################################
[0] from 0x080014ac in main+96 at Core/Src/main.c:139
### Threads #########################################################################################################
[1] id 0 from 0x080014ac in main+96 at Core/Src/main.c:139
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x95f8 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x80097b8
Loading section .ARM, size 0x8 lma 0x8009c40
Loading section .init_array, size 0x8 lma 0x8009c48
Loading section .fini_array, size 0x8 lma 0x8009c50
Loading section .data, size 0x9a8 lma 0x8009c58
Start address 0x08004250, load size 42448
Transfer rate: 29 KB/sec, 4716 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]
0x08004178 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:52
52 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
0x08004174 p_serial_mgr_service+0 ldr r3, [pc, #136] ; (0x8004200 <p_serial_mgr_service+140>)
0x08004176 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004178 p_serial_mgr_service+4 cmp r3, #1
0x0800417a p_serial_mgr_service+6 beq.n 0x800417e <p_serial_mgr_service+10>
0x0800417c p_serial_mgr_service+8 bx lr
0x0800417e p_serial_mgr_service+10 push {r4, lr}
0x08004180 p_serial_mgr_service+12 ldr r3, [pc, #128] ; (0x8004204 <p_serial_mgr_service+144>)
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x08004178 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
42 }
43 }
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 void p_serial_mgr_service(void)
51 {
52 if (sstate == SS_START)
53 {
54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
### Stack ###########################################################################################################
[0] from 0x08004178 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:52
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004178 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:52
### 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: 0x08004250 msp: 0x20010000
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x95f8 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x80097b8
Loading section .ARM, size 0x8 lma 0x8009c40
Loading section .init_array, size 0x8 lma 0x8009c48
Loading section .fini_array, size 0x8 lma 0x8009c50
Loading section .data, size 0x9a8 lma 0x8009c58
Start address 0x08004250, load size 42448
Transfer rate: 29 KB/sec, 4716 bytes/write.
Breakpoint 1 at 0x8004116: file shared/drivers/p_serial_mgr.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, UART1_RxCpltCallback (huart=0x20000aa8 <huart1>) at shared/drivers/p_serial_mgr.c:35
35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
### Assembly ########################################################################################################
~
~
~
~
0x08004114 UART1_RxCpltCallback+0 push {r3, lr}
!0x08004116 UART1_RxCpltCallback+2 ldr r3, [pc, #56] ; (0x8004150 <UART1_RxCpltCallback+60>)
0x08004118 UART1_RxCpltCallback+4 ldrb r3, [r3, #0]
0x0800411a UART1_RxCpltCallback+6 cbnz r3, 0x800412e <UART1_RxCpltCallback+26>
0x0800411c UART1_RxCpltCallback+8 ldr r3, [pc, #52] ; (0x8004154 <UART1_RxCpltCallback+64>)
0x0800411e UART1_RxCpltCallback+10 ldrb r3, [r3, #0]
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x00004001 r10 0x00000000 pc 0x08004116 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x08004115 r8 0x00000000 sp 0x2000ff50 msp 0x2000ff50 control 0x00
r4 0x20000aa8 r9 0x00000000 lr 0x0800338b psp 0x00000000
### Source ##########################################################################################################
25 SS_START = 1, // get start byte, interrupt after 4 more bytes
26 } serial_state_t;
27
28 static UART_HandleTypeDef *_serial_huart_inst = NULL;
29
30 static uint8_t rxc = '\0';
31 static serial_state_t sstate = SS_IDLE;
32
33 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
34 {
!35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
36 {
37 sstate = SS_START;
38 }
39 else
40 {
41 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
42 }
43 }
44
### Stack ###########################################################################################################
[0] from 0x08004116 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
[1] from 0x0800338a in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x080034dc in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347
[3] from 0x080014f0 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:226
[4] from 0xffffffe9
[5] from 0x08003f4a in UART_Start_Receive_IT+154 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3685
[6] from 0x08003fcc in HAL_UART_Receive_IT+68 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1440
[7] from 0x0800423c in p_serial_mgr_start+32 at shared/drivers/p_serial_mgr.c:69
[8] from 0x080014a8 in main+92 at Core/Src/main.c:132
### Threads #########################################################################################################
[1] id 0 from 0x08004116 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
### Variables #######################################################################################################
arg huart = 0x20000aa8 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
#####################################################################################################################
Quit
Quit
Undefined command: "qq". Try "help".
Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target
[Inferior 1 (Remote target) detached]
UART1_RxCpltCallback (huart=0x20000aa8 <huart1>) at shared/drivers/p_serial_mgr.c:35
35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
### Assembly ########################################################################################################
~
~
~
~
0x08004114 UART1_RxCpltCallback+0 push {r3, lr}
0x08004116 UART1_RxCpltCallback+2 ldr r3, [pc, #56] ; (0x8004150 <UART1_RxCpltCallback+60>)
0x08004118 UART1_RxCpltCallback+4 ldrb r3, [r3, #0]
0x0800411a UART1_RxCpltCallback+6 cbnz r3, 0x800412e <UART1_RxCpltCallback+26>
0x0800411c UART1_RxCpltCallback+8 ldr r3, [pc, #52] ; (0x8004154 <UART1_RxCpltCallback+64>)
0x0800411e UART1_RxCpltCallback+10 ldrb r3, [r3, #0]
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x00004001 r10 0x00000000 pc 0x08004116 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x08004115 r8 0x00000000 sp 0x2000ff50 msp 0x2000ff50 control 0x00
r4 0x20000aa8 r9 0x00000000 lr 0x0800338b psp 0x00000000
### Source ##########################################################################################################
25 SS_START = 1, // get start byte, interrupt after 4 more bytes
26 } serial_state_t;
27
28 static UART_HandleTypeDef *_serial_huart_inst = NULL;
29
30 static uint8_t rxc = '\0';
31 static serial_state_t sstate = SS_IDLE;
32
33 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
34 {
35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
36 {
37 sstate = SS_START;
38 }
39 else
40 {
41 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
42 }
43 }
44
### Stack ###########################################################################################################
[0] from 0x08004116 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
[1] from 0x0800338a in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x080034dc in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347
[3] from 0x080014f0 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:226
[4] from 0xffffffe9
[5] from 0x08003f4a in UART_Start_Receive_IT+154 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3685
[6] from 0x08003fcc in HAL_UART_Receive_IT+68 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1440
[7] from 0x0800423c in p_serial_mgr_start+32 at shared/drivers/p_serial_mgr.c:69
[8] from 0x080014a8 in main+92 at Core/Src/main.c:132
### Threads #########################################################################################################
[1] id 0 from 0x08004116 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
### Variables #######################################################################################################
arg huart = 0x20000aa8 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x95f8 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x80097b8
Loading section .ARM, size 0x8 lma 0x8009c40
Loading section .init_array, size 0x8 lma 0x8009c48
Loading section .fini_array, size 0x8 lma 0x8009c50
Loading section .data, size 0x9a8 lma 0x8009c58
Start address 0x08004250, load size 42448
Transfer rate: 29 KB/sec, 4716 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:52
52 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
~
~
0x08004174 p_serial_mgr_service+0 ldr r3, [pc, #136] ; (0x8004200 <p_serial_mgr_service+140>)
0x08004176 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004178 p_serial_mgr_service+4 cmp r3, #1
0x0800417a p_serial_mgr_service+6 beq.n 0x800417e <p_serial_mgr_service+10>
0x0800417c p_serial_mgr_service+8 bx lr
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x08004174 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
42 }
43 }
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 void p_serial_mgr_service(void)
51 {
52 if (sstate == SS_START)
53 {
54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
### Stack ###########################################################################################################
[0] from 0x08004174 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:52
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004174 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:52
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x95f8 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x80097b8
Loading section .ARM, size 0x8 lma 0x8009c40
Loading section .init_array, size 0x8 lma 0x8009c48
Loading section .fini_array, size 0x8 lma 0x8009c50
Loading section .data, size 0x9a8 lma 0x8009c58
Start address 0x08004250, load size 42448
Transfer rate: 29 KB/sec, 4716 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]
0x08004176 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:52
52 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
~
0x08004174 p_serial_mgr_service+0 ldr r3, [pc, #136] ; (0x8004200 <p_serial_mgr_service+140>)
0x08004176 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004178 p_serial_mgr_service+4 cmp r3, #1
0x0800417a p_serial_mgr_service+6 beq.n 0x800417e <p_serial_mgr_service+10>
0x0800417c p_serial_mgr_service+8 bx lr
0x0800417e p_serial_mgr_service+10 push {r4, lr}
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x08004176 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x20002050 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
42 }
43 }
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 void p_serial_mgr_service(void)
51 {
52 if (sstate == SS_START)
53 {
54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
### Stack ###########################################################################################################
[0] from 0x08004176 in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:52
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004176 in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:52
### 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: 0x08004250 msp: 0x20010000
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x95f8 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x80097b8
Loading section .ARM, size 0x8 lma 0x8009c40
Loading section .init_array, size 0x8 lma 0x8009c48
Loading section .fini_array, size 0x8 lma 0x8009c50
Loading section .data, size 0x9a8 lma 0x8009c58
Start address 0x08004250, load size 42448
Transfer rate: 29 KB/sec, 4716 bytes/write.
Breakpoint 1 at 0x8004116: file shared/drivers/p_serial_mgr.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 #################################################################################################
Program received signal SIGINT, Interrupt.
0x08004178 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:52
52 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
0x08004174 p_serial_mgr_service+0 ldr r3, [pc, #136] ; (0x8004200 <p_serial_mgr_service+140>)
0x08004176 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004178 p_serial_mgr_service+4 cmp r3, #1
0x0800417a p_serial_mgr_service+6 beq.n 0x800417e <p_serial_mgr_service+10>
0x0800417c p_serial_mgr_service+8 bx lr
0x0800417e p_serial_mgr_service+10 push {r4, lr}
0x08004180 p_serial_mgr_service+12 ldr r3, [pc, #128] ; (0x8004204 <p_serial_mgr_service+144>)
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x08004178 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
42 }
43 }
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 void p_serial_mgr_service(void)
51 {
52 if (sstate == SS_START)
53 {
54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
### Stack ###########################################################################################################
[0] from 0x08004178 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:52
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004178 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:52
### Variables #######################################################################################################
#####################################################################################################################
$1 = SS_IDLE
Continuing.
### Output/messages #################################################################################################
Program received signal SIGINT, Interrupt.
main () at Core/Src/main.c:139
139 while (1)
### Assembly ########################################################################################################
0x0800149c main+80 ldr r1, [pc, #28] ; (0x80014bc <main+112>)
0x0800149e main+82 mov r0, r4
0x080014a0 main+84 bl 0x8003f88 <HAL_UART_Receive_IT>
0x080014a4 main+88 bl 0x800421c <p_serial_mgr_start>
0x080014a8 main+92 bl 0x8004174 <p_serial_mgr_service>
0x080014ac main+96 b.n 0x80014a8 <main+92>
0x080014ae main+98 nop
0x080014b0 main+100 lsrs r4, r3, #13
0x080014b2 main+102 movs r0, #0
0x080014b4 main+104 asrs r1, r5, #5
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35
### Expressions #####################################################################################################
### History #########################################################################################################
$$0 = SS_IDLE
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080014ac primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
129 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1);
130 // HAL_TIM_Base_Start_IT(&htim6);
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
### Stack ###########################################################################################################
[0] from 0x080014ac in main+96 at Core/Src/main.c:139
### Threads #########################################################################################################
[1] id 0 from 0x080014ac in main+96 at Core/Src/main.c:139
### Variables #######################################################################################################
#####################################################################################################################
Note: breakpoint 1 also set at pc 0x8004116.
Breakpoint 2 at 0x8004116: file shared/drivers/p_serial_mgr.c, line 35.
Continuing.
### Output/messages #################################################################################################
Program received signal SIGINT, Interrupt.
p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:52
52 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
~
~
0x08004174 p_serial_mgr_service+0 ldr r3, [pc, #136] ; (0x8004200 <p_serial_mgr_service+140>)
0x08004176 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004178 p_serial_mgr_service+4 cmp r3, #1
0x0800417a p_serial_mgr_service+6 beq.n 0x800417e <p_serial_mgr_service+10>
0x0800417c p_serial_mgr_service+8 bx lr
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35
[2] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35
### Expressions #####################################################################################################
### History #########################################################################################################
$$0 = SS_IDLE
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x08004174 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
42 }
43 }
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 void p_serial_mgr_service(void)
51 {
52 if (sstate == SS_START)
53 {
54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
### Stack ###########################################################################################################
[0] from 0x08004174 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:52
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004174 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:52
### 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 0x95f8 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x80097b8
Loading section .ARM, size 0x8 lma 0x8009c40
Loading section .init_array, size 0x8 lma 0x8009c48
Loading section .fini_array, size 0x8 lma 0x8009c50
Loading section .data, size 0x9a8 lma 0x8009c58
Start address 0x08004250, load size 42448
Transfer rate: 29 KB/sec, 4716 bytes/write.
Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf
### Output/messages #################################################################################################
Breakpoint 1, UART1_RxCpltCallback (huart=0x20000aa8 <huart1>) at shared/drivers/p_serial_mgr.c:35
35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
### Assembly ########################################################################################################
~
~
~
~
0x08004114 UART1_RxCpltCallback+0 push {r3, lr}
!0x08004116 UART1_RxCpltCallback+2 ldr r3, [pc, #56] ; (0x8004150 <UART1_RxCpltCallback+60>)
0x08004118 UART1_RxCpltCallback+4 ldrb r3, [r3, #0]
0x0800411a UART1_RxCpltCallback+6 cbnz r3, 0x800412e <UART1_RxCpltCallback+26>
0x0800411c UART1_RxCpltCallback+8 ldr r3, [pc, #52] ; (0x8004154 <UART1_RxCpltCallback+64>)
0x0800411e UART1_RxCpltCallback+10 ldrb r3, [r3, #0]
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
[2] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$0 = SS_IDLE
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x00004001 r10 0x00000000 pc 0x08004116 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x08004115 r8 0x00000000 sp 0x2000ff50 msp 0x2000ff50 control 0x00
r4 0x20000aa8 r9 0x00000000 lr 0x0800338b psp 0x00000000
### Source ##########################################################################################################
25 SS_START = 1, // get start byte, interrupt after 4 more bytes
26 } serial_state_t;
27
28 static UART_HandleTypeDef *_serial_huart_inst = NULL;
29
30 static uint8_t rxc = '\0';
31 static serial_state_t sstate = SS_IDLE;
32
33 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
34 {
!35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
36 {
37 sstate = SS_START;
38 }
39 else
40 {
41 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
42 }
43 }
44
### Stack ###########################################################################################################
[0] from 0x08004116 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
[1] from 0x0800338a in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x080034dc in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347
[3] from 0x080014f0 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:226
[4] from 0xffffffe9
[5] from 0x08003f4a in UART_Start_Receive_IT+154 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3685
[6] from 0x08003fcc in HAL_UART_Receive_IT+68 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1440
[7] from 0x0800423c in p_serial_mgr_start+32 at shared/drivers/p_serial_mgr.c:69
[8] from 0x080014a8 in main+92 at Core/Src/main.c:132
### Threads #########################################################################################################
[1] id 0 from 0x08004116 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
### Variables #######################################################################################################
arg huart = 0x20000aa8 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
#####################################################################################################################
$2 = 0 '\000'
Continuing.
### Output/messages #################################################################################################
halted: PC: 0x08004118
Breakpoint 1, UART1_RxCpltCallback (huart=0x20000aa8 <huart1>) at shared/drivers/p_serial_mgr.c:35
35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
### Assembly ########################################################################################################
~
~
~
~
0x08004114 UART1_RxCpltCallback+0 push {r3, lr}
!0x08004116 UART1_RxCpltCallback+2 ldr r3, [pc, #56] ; (0x8004150 <UART1_RxCpltCallback+60>)
0x08004118 UART1_RxCpltCallback+4 ldrb r3, [r3, #0]
0x0800411a UART1_RxCpltCallback+6 cbnz r3, 0x800412e <UART1_RxCpltCallback+26>
0x0800411c UART1_RxCpltCallback+8 ldr r3, [pc, #52] ; (0x8004154 <UART1_RxCpltCallback+64>)
0x0800411e UART1_RxCpltCallback+10 ldrb r3, [r3, #0]
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 2 times
[2] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
$$1 = SS_IDLE
$$0 = 0 '\000'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x00000002 r10 0x00000000 pc 0x08004116 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x08004115 r8 0x00000000 sp 0x2000ff68 msp 0x2000ff68 control 0x00
r4 0x20000aa8 r9 0x00000000 lr 0x0800338b psp 0x00000000
### Source ##########################################################################################################
25 SS_START = 1, // get start byte, interrupt after 4 more bytes
26 } serial_state_t;
27
28 static UART_HandleTypeDef *_serial_huart_inst = NULL;
29
30 static uint8_t rxc = '\0';
31 static serial_state_t sstate = SS_IDLE;
32
33 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
34 {
!35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
36 {
37 sstate = SS_START;
38 }
39 else
40 {
41 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
42 }
43 }
44
### Stack ###########################################################################################################
[0] from 0x08004116 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
[1] from 0x0800338a in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x08003586 in HAL_UART_IRQHandler+278 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2427
[3] from 0x080014f0 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:226
[4] from 0xffffffe9
[5] from 0x080014a8 in main+92 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004116 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
### Variables #######################################################################################################
arg huart = 0x20000aa8 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
#####################################################################################################################
$3 = 5 '\005'
Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target
[Inferior 1 (Remote target) detached]
UART1_RxCpltCallback (huart=0x20000aa8 <huart1>) at shared/drivers/p_serial_mgr.c:35
35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
### Assembly ########################################################################################################
~
~
~
~
0x08004114 UART1_RxCpltCallback+0 push {r3, lr}
0x08004116 UART1_RxCpltCallback+2 ldr r3, [pc, #56] ; (0x8004150 <UART1_RxCpltCallback+60>)
0x08004118 UART1_RxCpltCallback+4 ldrb r3, [r3, #0]
0x0800411a UART1_RxCpltCallback+6 cbnz r3, 0x800412e <UART1_RxCpltCallback+26>
0x0800411c UART1_RxCpltCallback+8 ldr r3, [pc, #52] ; (0x8004154 <UART1_RxCpltCallback+64>)
0x0800411e UART1_RxCpltCallback+10 ldrb r3, [r3, #0]
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x00000002 r10 0x00000000 pc 0x08004116 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x08004115 r8 0x00000000 sp 0x2000ff68 msp 0x2000ff68 control 0x00
r4 0x20000aa8 r9 0x00000000 lr 0x0800338b psp 0x00000000
### Source ##########################################################################################################
25 SS_START = 1, // get start byte, interrupt after 4 more bytes
26 } serial_state_t;
27
28 static UART_HandleTypeDef *_serial_huart_inst = NULL;
29
30 static uint8_t rxc = '\0';
31 static serial_state_t sstate = SS_IDLE;
32
33 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
34 {
35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
36 {
37 sstate = SS_START;
38 }
39 else
40 {
41 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
42 }
43 }
44
### Stack ###########################################################################################################
[0] from 0x08004116 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
[1] from 0x0800338a in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x08003586 in HAL_UART_IRQHandler+278 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2427
[3] from 0x080014f0 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:226
[4] from 0xffffffe9
[5] from 0x080014a8 in main+92 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004116 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
### Variables #######################################################################################################
arg huart = 0x20000aa8 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x95f8 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x80097b8
Loading section .ARM, size 0x8 lma 0x8009c40
Loading section .init_array, size 0x8 lma 0x8009c48
Loading section .fini_array, size 0x8 lma 0x8009c50
Loading section .data, size 0x9a8 lma 0x8009c58
Start address 0x08004250, load size 42448
Transfer rate: 29 KB/sec, 4716 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 while (1)
### Assembly ########################################################################################################
0x0800149c main+80 ldr r1, [pc, #28] ; (0x80014bc <main+112>)
0x0800149e main+82 mov r0, r4
0x080014a0 main+84 bl 0x8003f88 <HAL_UART_Receive_IT>
0x080014a4 main+88 bl 0x800421c <p_serial_mgr_start>
0x080014a8 main+92 bl 0x8004174 <p_serial_mgr_service>
0x080014ac main+96 b.n 0x80014a8 <main+92>
0x080014ae main+98 nop
0x080014b0 main+100 lsrs r4, r3, #13
0x080014b2 main+102 movs r0, #0
0x080014b4 main+104 asrs r1, r5, #5
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080014ac primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
129 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1);
130 // HAL_TIM_Base_Start_IT(&htim6);
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
### Stack ###########################################################################################################
[0] from 0x080014ac in main+96 at Core/Src/main.c:139
### Threads #########################################################################################################
[1] id 0 from 0x080014ac in main+96 at Core/Src/main.c:139
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x95f8 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x80097b8
Loading section .ARM, size 0x8 lma 0x8009c40
Loading section .init_array, size 0x8 lma 0x8009c48
Loading section .fini_array, size 0x8 lma 0x8009c50
Loading section .data, size 0x9a8 lma 0x8009c58
Start address 0x08004250, load size 42448
Transfer rate: 29 KB/sec, 4716 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]
generic_debug.gdb:5: Error in sourced command file:
Remote connection closed
generic_debug.gdb:5: Error in sourced command file:
Remote connection closed
0x0800417c in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:52
52 if (sstate == SS_START)
### Assembly ########################################################################################################
~
0x08004174 p_serial_mgr_service+0 ldr r3, [pc, #136] ; (0x8004200 <p_serial_mgr_service+140>)
0x08004176 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004178 p_serial_mgr_service+4 cmp r3, #1
0x0800417a p_serial_mgr_service+6 beq.n 0x800417e <p_serial_mgr_service+10>
0x0800417c p_serial_mgr_service+8 bx lr
0x0800417e p_serial_mgr_service+10 push {r4, lr}
0x08004180 p_serial_mgr_service+12 ldr r3, [pc, #128] ; (0x8004204 <p_serial_mgr_service+144>)
0x08004182 p_serial_mgr_service+14 ldrb r3, [r3, #0]
0x08004184 p_serial_mgr_service+16 add.w r3, r3, r3, lsl #7
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x0800417c primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
42 }
43 }
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 void p_serial_mgr_service(void)
51 {
52 if (sstate == SS_START)
53 {
54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
### Stack ###########################################################################################################
[0] from 0x0800417c in p_serial_mgr_service+8 at shared/drivers/p_serial_mgr.c:52
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x0800417c in p_serial_mgr_service+8 at shared/drivers/p_serial_mgr.c:52
### 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: 0x08004250 msp: 0x20010000
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x95f8 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x80097b8
Loading section .ARM, size 0x8 lma 0x8009c40
Loading section .init_array, size 0x8 lma 0x8009c48
Loading section .fini_array, size 0x8 lma 0x8009c50
Loading section .data, size 0x9a8 lma 0x8009c58
Start address 0x08004250, load size 42448
Transfer rate: 29 KB/sec, 4716 bytes/write.
Breakpoint 1 at 0x8004116: file shared/drivers/p_serial_mgr.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, UART1_RxCpltCallback (huart=0x20000aa8 <huart1>) at shared/drivers/p_serial_mgr.c:35
35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
### Assembly ########################################################################################################
~
~
~
~
0x08004114 UART1_RxCpltCallback+0 push {r3, lr}
!0x08004116 UART1_RxCpltCallback+2 ldr r3, [pc, #56] ; (0x8004150 <UART1_RxCpltCallback+60>)
0x08004118 UART1_RxCpltCallback+4 ldrb r3, [r3, #0]
0x0800411a UART1_RxCpltCallback+6 cbnz r3, 0x800412e <UART1_RxCpltCallback+26>
0x0800411c UART1_RxCpltCallback+8 ldr r3, [pc, #52] ; (0x8004154 <UART1_RxCpltCallback+64>)
0x0800411e UART1_RxCpltCallback+10 ldrb r3, [r3, #0]
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x00004001 r10 0x00000000 pc 0x08004116 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x08004115 r8 0x00000000 sp 0x2000ff50 msp 0x2000ff50 control 0x00
r4 0x20000aa8 r9 0x00000000 lr 0x0800338b psp 0x00000000
### Source ##########################################################################################################
25 SS_START = 1, // get start byte, interrupt after 4 more bytes
26 } serial_state_t;
27
28 static UART_HandleTypeDef *_serial_huart_inst = NULL;
29
30 static uint8_t rxc = '\0';
31 static serial_state_t sstate = SS_IDLE;
32
33 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
34 {
!35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
36 {
37 sstate = SS_START;
38 }
39 else
40 {
41 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
42 }
43 }
44
### Stack ###########################################################################################################
[0] from 0x08004116 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
[1] from 0x0800338a in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x080034dc in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347
[3] from 0x080014f0 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:226
[4] from 0xffffffe9
[5] from 0x08003f4a in UART_Start_Receive_IT+154 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3685
[6] from 0x08003fcc in HAL_UART_Receive_IT+68 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1440
[7] from 0x0800423c in p_serial_mgr_start+32 at shared/drivers/p_serial_mgr.c:69
[8] from 0x080014a8 in main+92 at Core/Src/main.c:132
### Threads #########################################################################################################
[1] id 0 from 0x08004116 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
### Variables #######################################################################################################
arg huart = 0x20000aa8 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
#####################################################################################################################
$1 = 255 '\377'
$2 = 0xff
Continuing.
### Output/messages #################################################################################################
halted: PC: 0x08004118
Breakpoint 1, UART1_RxCpltCallback (huart=0x20000aa8 <huart1>) at shared/drivers/p_serial_mgr.c:35
35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
### Assembly ########################################################################################################
~
~
~
~
0x08004114 UART1_RxCpltCallback+0 push {r3, lr}
!0x08004116 UART1_RxCpltCallback+2 ldr r3, [pc, #56] ; (0x8004150 <UART1_RxCpltCallback+60>)
0x08004118 UART1_RxCpltCallback+4 ldrb r3, [r3, #0]
0x0800411a UART1_RxCpltCallback+6 cbnz r3, 0x800412e <UART1_RxCpltCallback+26>
0x0800411c UART1_RxCpltCallback+8 ldr r3, [pc, #52] ; (0x8004154 <UART1_RxCpltCallback+64>)
0x0800411e UART1_RxCpltCallback+10 ldrb r3, [r3, #0]
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
$$1 = 255 '\377'
$$0 = 255 '\377'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x00004001 r10 0x00000000 pc 0x08004116 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x08004115 r8 0x00000000 sp 0x2000ff68 msp 0x2000ff68 control 0x00
r4 0x20000aa8 r9 0x00000000 lr 0x0800338b psp 0x00000000
### Source ##########################################################################################################
25 SS_START = 1, // get start byte, interrupt after 4 more bytes
26 } serial_state_t;
27
28 static UART_HandleTypeDef *_serial_huart_inst = NULL;
29
30 static uint8_t rxc = '\0';
31 static serial_state_t sstate = SS_IDLE;
32
33 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
34 {
!35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
36 {
37 sstate = SS_START;
38 }
39 else
40 {
41 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
42 }
43 }
44
### Stack ###########################################################################################################
[0] from 0x08004116 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
[1] from 0x0800338a in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x080034dc in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347
[3] from 0x080014f0 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:226
[4] from 0xffffffe9
[5] from 0x0800417a in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:52
[6] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004116 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
### Variables #######################################################################################################
arg huart = 0x20000aa8 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
#####################################################################################################################
$3 = 0x7e
Continuing.
### Output/messages #################################################################################################
halted: PC: 0x08004118
Program received signal SIGINT, Interrupt.
main () at Core/Src/main.c:139
139 while (1)
### Assembly ########################################################################################################
0x0800149c main+80 ldr r1, [pc, #28] ; (0x80014bc <main+112>)
0x0800149e main+82 mov r0, r4
0x080014a0 main+84 bl 0x8003f88 <HAL_UART_Receive_IT>
0x080014a4 main+88 bl 0x800421c <p_serial_mgr_start>
0x080014a8 main+92 bl 0x8004174 <p_serial_mgr_service>
0x080014ac main+96 b.n 0x80014a8 <main+92>
0x080014ae main+98 nop
0x080014b0 main+100 lsrs r4, r3, #13
0x080014b2 main+102 movs r0, #0
0x080014b4 main+104 asrs r1, r5, #5
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 255 '\377'
$$1 = 255 '\377'
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080014ac primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
129 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1);
130 // HAL_TIM_Base_Start_IT(&htim6);
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
### Stack ###########################################################################################################
[0] from 0x080014ac in main+96 at Core/Src/main.c:139
### Threads #########################################################################################################
[1] id 0 from 0x080014ac in main+96 at Core/Src/main.c:139
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080014a8
141 p_serial_mgr_service();
### Assembly ########################################################################################################
0x0800149a main+78 movs r2, #1
0x0800149c main+80 ldr r1, [pc, #28] ; (0x80014bc <main+112>)
0x0800149e main+82 mov r0, r4
0x080014a0 main+84 bl 0x8003f88 <HAL_UART_Receive_IT>
0x080014a4 main+88 bl 0x800421c <p_serial_mgr_start>
0x080014a8 main+92 bl 0x8004174 <p_serial_mgr_service>
0x080014ac main+96 b.n 0x80014a8 <main+92>
0x080014ae main+98 nop
0x080014b0 main+100 lsrs r4, r3, #13
0x080014b2 main+102 movs r0, #0
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 255 '\377'
$$1 = 255 '\377'
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080014a8 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
149 // serial_pkt_t *pkt = NULL;
150 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x080014a8 in main+92 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080014a8 in main+92 at Core/Src/main.c:141
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x08004174
p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:52
52 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
~
~
0x08004174 p_serial_mgr_service+0 ldr r3, [pc, #136] ; (0x8004200 <p_serial_mgr_service+140>)
0x08004176 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004178 p_serial_mgr_service+4 cmp r3, #1
0x0800417a p_serial_mgr_service+6 beq.n 0x800417e <p_serial_mgr_service+10>
0x0800417c p_serial_mgr_service+8 bx lr
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 255 '\377'
$$1 = 255 '\377'
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x08004174 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
42 }
43 }
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 void p_serial_mgr_service(void)
51 {
52 if (sstate == SS_START)
53 {
54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
### Stack ###########################################################################################################
[0] from 0x08004174 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:52
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004174 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:52
### Variables #######################################################################################################
#####################################################################################################################
$4 = SS_IDLE
Continuing.
### Output/messages #################################################################################################
Program received signal SIGINT, Interrupt.
main () at Core/Src/main.c:139
139 while (1)
### Assembly ########################################################################################################
0x0800149c main+80 ldr r1, [pc, #28] ; (0x80014bc <main+112>)
0x0800149e main+82 mov r0, r4
0x080014a0 main+84 bl 0x8003f88 <HAL_UART_Receive_IT>
0x080014a4 main+88 bl 0x800421c <p_serial_mgr_start>
0x080014a8 main+92 bl 0x8004174 <p_serial_mgr_service>
0x080014ac main+96 b.n 0x80014a8 <main+92>
0x080014ae main+98 nop
0x080014b0 main+100 lsrs r4, r3, #13
0x080014b2 main+102 movs r0, #0
0x080014b4 main+104 asrs r1, r5, #5
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 255 '\377'
$$1 = 126 '~'
$$0 = SS_IDLE
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080014ac primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
129 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1);
130 // HAL_TIM_Base_Start_IT(&htim6);
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
### Stack ###########################################################################################################
[0] from 0x080014ac in main+96 at Core/Src/main.c:139
### Threads #########################################################################################################
[1] id 0 from 0x080014ac in main+96 at Core/Src/main.c:139
### Variables #######################################################################################################
#####################################################################################################################
Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf
### Output/messages #################################################################################################
Breakpoint 1, UART1_RxCpltCallback (huart=0x20000aa8 <huart1>) at shared/drivers/p_serial_mgr.c:35
35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
### Assembly ########################################################################################################
~
~
~
~
0x08004114 UART1_RxCpltCallback+0 push {r3, lr}
!0x08004116 UART1_RxCpltCallback+2 ldr r3, [pc, #56] ; (0x8004150 <UART1_RxCpltCallback+60>)
0x08004118 UART1_RxCpltCallback+4 ldrb r3, [r3, #0]
0x0800411a UART1_RxCpltCallback+6 cbnz r3, 0x800412e <UART1_RxCpltCallback+26>
0x0800411c UART1_RxCpltCallback+8 ldr r3, [pc, #52] ; (0x8004154 <UART1_RxCpltCallback+64>)
0x0800411e UART1_RxCpltCallback+10 ldrb r3, [r3, #0]
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 255 '\377'
$$1 = 126 '~'
$$0 = SS_IDLE
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x00004001 r10 0x00000000 pc 0x08004116 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x08004115 r8 0x00000000 sp 0x2000ff68 msp 0x2000ff68 control 0x00
r4 0x20000aa8 r9 0x00000000 lr 0x0800338b psp 0x00000000
### Source ##########################################################################################################
25 SS_START = 1, // get start byte, interrupt after 4 more bytes
26 } serial_state_t;
27
28 static UART_HandleTypeDef *_serial_huart_inst = NULL;
29
30 static uint8_t rxc = '\0';
31 static serial_state_t sstate = SS_IDLE;
32
33 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
34 {
!35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
36 {
37 sstate = SS_START;
38 }
39 else
40 {
41 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
42 }
43 }
44
### Stack ###########################################################################################################
[0] from 0x08004116 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
[1] from 0x0800338a in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x080034dc in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347
[3] from 0x080014f0 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:226
[4] from 0xffffffe9
[5] from 0x080014a8 in main+92 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004116 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
### Variables #######################################################################################################
arg huart = 0x20000aa8 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
#####################################################################################################################
$5 = 0x7e
### Output/messages #################################################################################################
halted: PC: 0x08004118
halted: PC: 0x0800411a
halted: PC: 0x0800411c
halted: PC: 0x0800411e
halted: PC: 0x08004120
halted: PC: 0x08004124
halted: PC: 0x08004126
halted: PC: 0x08004128
halted: PC: 0x0800412a
halted: PC: 0x0800412c
halted: PC: 0x08004148
37 sstate = SS_START;
### Assembly ########################################################################################################
0x0800413c UART1_RxCpltCallback+40 add r1, r3
0x0800413e UART1_RxCpltCallback+42 ldr r3, [pc, #28] ; (0x800415c <UART1_RxCpltCallback+72>)
0x08004140 UART1_RxCpltCallback+44 ldr r0, [r3, #0]
0x08004142 UART1_RxCpltCallback+46 bl 0x8003f88 <HAL_UART_Receive_IT>
0x08004146 UART1_RxCpltCallback+50 pop {r3, pc}
0x08004148 UART1_RxCpltCallback+52 ldr r3, [pc, #4] ; (0x8004150 <UART1_RxCpltCallback+60>)
0x0800414a UART1_RxCpltCallback+54 movs r2, #1
0x0800414c UART1_RxCpltCallback+56 strb r2, [r3, #0]
0x0800414e UART1_RxCpltCallback+58 b.n 0x8004146 <UART1_RxCpltCallback+50>
0x08004150 UART1_RxCpltCallback+60 movs r0, #80 ; 0x50
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x00004001 r10 0x00000000 pc 0x08004148 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000035 basepri 0x00
r2 0x00000000 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x0000007e r8 0x00000000 sp 0x2000ff68 msp 0x2000ff68 control 0x00
r4 0x20000aa8 r9 0x00000000 lr 0x0800338b psp 0x00000000
### Source ##########################################################################################################
27
28 static UART_HandleTypeDef *_serial_huart_inst = NULL;
29
30 static uint8_t rxc = '\0';
31 static serial_state_t sstate = SS_IDLE;
32
33 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
34 {
!35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
36 {
37 sstate = SS_START;
38 }
39 else
40 {
41 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
42 }
43 }
44
45 void p_serial_mgr_init(UART_HandleTypeDef *huart)
46 {
### Stack ###########################################################################################################
[0] from 0x08004148 in UART1_RxCpltCallback+52 at shared/drivers/p_serial_mgr.c:37
[1] from 0x0800338a in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x080034dc in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347
[3] from 0x080014f0 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:226
[4] from 0xffffffe9
[5] from 0x080014a8 in main+92 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004148 in UART1_RxCpltCallback+52 at shared/drivers/p_serial_mgr.c:37
### Variables #######################################################################################################
arg huart = 0x20000aa8 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x0800414a
halted: PC: 0x0800414c
halted: PC: 0x0800414e
halted: PC: 0x08004146
halted: PC: 0x0800338a
halted: PC: 0x08003320
halted: PC: 0x080034dc
HAL_UART_IRQHandler (huart=0x20000aa8 <huart1>) at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2349
2349 return;
### Assembly ########################################################################################################
0x080034d2 HAL_UART_IRQHandler+98 ldr r3, [r4, #100] ; 0x64
0x080034d4 HAL_UART_IRQHandler+100 cmp r3, #0
0x080034d6 HAL_UART_IRQHandler+102 beq.n 0x80034d0 <HAL_UART_IRQHandler+96>
0x080034d8 HAL_UART_IRQHandler+104 mov r0, r4
0x080034da HAL_UART_IRQHandler+106 blx r3
0x080034dc HAL_UART_IRQHandler+108 b.n 0x80034d0 <HAL_UART_IRQHandler+96>
0x080034de HAL_UART_IRQHandler+110 tst.w r3, #1
0x080034e2 HAL_UART_IRQHandler+114 beq.n 0x80034f8 <HAL_UART_IRQHandler+136>
0x080034e4 HAL_UART_IRQHandler+116 tst.w r0, #256 ; 0x100
0x080034e8 HAL_UART_IRQHandler+120 beq.n 0x80034f8 <HAL_UART_IRQHandler+136>
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x00004001 r10 0x00000000 pc 0x080034dc primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21000035 basepri 0x00
r2 0x00000001 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x08003309 r8 0x00000000 sp 0x2000ff78 msp 0x2000ff78 control 0x00
r4 0x20000aa8 r9 0x00000000 lr 0x0800338b psp 0x00000000
### Source ##########################################################################################################
2339 || ((cr3its & USART_CR3_RXFTIE) != 0U)))
2340 #else
2341 if (((isrflags & USART_ISR_RXNE) != 0U)
2342 && ((cr1its & USART_CR1_RXNEIE) != 0U))
2343 #endif /* USART_CR1_FIFOEN */
2344 {
2345 if (huart->RxISR != NULL)
2346 {
2347 huart->RxISR(huart);
2348 }
2349 return;
2350 }
2351 }
2352
2353 /* If some errors occur */
2354 #if defined(USART_CR1_FIFOEN)
2355 if ((errorflags != 0U)
2356 && ((((cr3its & (USART_CR3_RXFTIE | USART_CR3_EIE)) != 0U)
2357 || ((cr1its & (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE | USART_CR1_RTOIE)) != 0U))))
2358 #else
### Stack ###########################################################################################################
[0] from 0x080034dc in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2349
[1] from 0x080014f0 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:226
[2] from 0xffffffe9
[3] from 0x080014a8 in main+92 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080034dc in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2349
### Variables #######################################################################################################
arg huart = 0x20000aa8 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
loc isrflags = <optimized out>, cr1its = <optimized out>, cr3its = 16385, errorflags = <optimized out>, errorcode = <optimized out>
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080034d0
halted: PC: 0x080014f0
halted: PC: 0x080014a8
main () at Core/Src/main.c:141
141 p_serial_mgr_service();
### Assembly ########################################################################################################
0x0800149a main+78 movs r2, #1
0x0800149c main+80 ldr r1, [pc, #28] ; (0x80014bc <main+112>)
0x0800149e main+82 mov r0, r4
0x080014a0 main+84 bl 0x8003f88 <HAL_UART_Receive_IT>
0x080014a4 main+88 bl 0x800421c <p_serial_mgr_start>
0x080014a8 main+92 bl 0x8004174 <p_serial_mgr_service>
0x080014ac main+96 b.n 0x80014a8 <main+92>
0x080014ae main+98 nop
0x080014b0 main+100 lsrs r4, r3, #13
0x080014b2 main+102 movs r0, #0
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080014a8 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
149 // serial_pkt_t *pkt = NULL;
150 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x080014a8 in main+92 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080014a8 in main+92 at Core/Src/main.c:141
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x08004174
p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:52
52 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
~
~
0x08004174 p_serial_mgr_service+0 ldr r3, [pc, #136] ; (0x8004200 <p_serial_mgr_service+140>)
0x08004176 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004178 p_serial_mgr_service+4 cmp r3, #1
0x0800417a p_serial_mgr_service+6 beq.n 0x800417e <p_serial_mgr_service+10>
0x0800417c p_serial_mgr_service+8 bx lr
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x08004174 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
42 }
43 }
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 void p_serial_mgr_service(void)
51 {
52 if (sstate == SS_START)
53 {
54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
### Stack ###########################################################################################################
[0] from 0x08004174 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:52
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004174 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:52
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x08004176
halted: PC: 0x08004178
halted: PC: 0x0800417a
halted: PC: 0x0800417e
halted: PC: 0x08004180
54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
### Assembly ########################################################################################################
0x08004176 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004178 p_serial_mgr_service+4 cmp r3, #1
0x0800417a p_serial_mgr_service+6 beq.n 0x800417e <p_serial_mgr_service+10>
0x0800417c p_serial_mgr_service+8 bx lr
0x0800417e p_serial_mgr_service+10 push {r4, lr}
0x08004180 p_serial_mgr_service+12 ldr r3, [pc, #128] ; (0x8004204 <p_serial_mgr_service+144>)
0x08004182 p_serial_mgr_service+14 ldrb r3, [r3, #0]
0x08004184 p_serial_mgr_service+16 add.w r3, r3, r3, lsl #7
0x08004188 p_serial_mgr_service+20 lsls r1, r3, #2
0x0800418a p_serial_mgr_service+22 adds r1, #1
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x08004180 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000001 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
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 void p_serial_mgr_service(void)
51 {
52 if (sstate == SS_START)
53 {
54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
62 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
63 }
### Stack ###########################################################################################################
[0] from 0x08004180 in p_serial_mgr_service+12 at shared/drivers/p_serial_mgr.c:54
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004180 in p_serial_mgr_service+12 at shared/drivers/p_serial_mgr.c:54
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x08004182
halted: PC: 0x08004184
halted: PC: 0x08004188
halted: PC: 0x0800418a
halted: PC: 0x0800418c
halted: PC: 0x0800418e
halted: PC: 0x08004192
halted: PC: 0x08004194
halted: PC: 0x08004196
halted: PC: 0x08004198
halted: PC: 0x0800419a
halted: PC: 0x08003c9a
55 for (int ind = 0; ind < 24; ind++)
### Assembly ########################################################################################################
0x08004192 p_serial_mgr_service+30 ldr r0, [pc, #116] ; (0x8004208 <p_serial_mgr_service+148>)
0x08004194 p_serial_mgr_service+32 add r1, r0
0x08004196 p_serial_mgr_service+34 ldr r0, [pc, #116] ; (0x800420c <p_serial_mgr_service+152>)
0x08004198 p_serial_mgr_service+36 ldr r0, [r0, #0]
0x0800419a p_serial_mgr_service+38 bl 0x8003c9a <HAL_UART_Receive>
0x0800419e p_serial_mgr_service+42 movs r4, #0
0x080041a0 p_serial_mgr_service+44 b.n 0x80041bc <p_serial_mgr_service+72>
0x080041a2 p_serial_mgr_service+46 ldr r3, [pc, #96] ; (0x8004204 <p_serial_mgr_service+144>)
0x080041a4 p_serial_mgr_service+48 ldrb r3, [r3, #0]
0x080041a6 p_serial_mgr_service+50 add.w r3, r3, r3, lsl #7
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000003 r5 0x00000000 r10 0x00000000 pc 0x0800419e primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x000007b8 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x08003b1f psp 0x00000000
### Source ##########################################################################################################
45 void p_serial_mgr_init(UART_HandleTypeDef *huart)
46 {
47 _serial_huart_inst = huart;
48 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
49 }
50 void p_serial_mgr_service(void)
51 {
52 if (sstate == SS_START)
53 {
54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
62 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
63 }
64 }
### Stack ###########################################################################################################
[0] from 0x0800419e in p_serial_mgr_service+42 at shared/drivers/p_serial_mgr.c:55
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x0800419e in p_serial_mgr_service+42 at shared/drivers/p_serial_mgr.c:55
### Variables #######################################################################################################
loc ind = 0
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080041a0
halted: PC: 0x080041bc
halted: PC: 0x080041be
halted: PC: 0x080041a2
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
### Assembly ########################################################################################################
0x08004196 p_serial_mgr_service+34 ldr r0, [pc, #116] ; (0x800420c <p_serial_mgr_service+152>)
0x08004198 p_serial_mgr_service+36 ldr r0, [r0, #0]
0x0800419a p_serial_mgr_service+38 bl 0x8003c9a <HAL_UART_Receive>
0x0800419e p_serial_mgr_service+42 movs r4, #0
0x080041a0 p_serial_mgr_service+44 b.n 0x80041bc <p_serial_mgr_service+72>
0x080041a2 p_serial_mgr_service+46 ldr r3, [pc, #96] ; (0x8004204 <p_serial_mgr_service+144>)
0x080041a4 p_serial_mgr_service+48 ldrb r3, [r3, #0]
0x080041a6 p_serial_mgr_service+50 add.w r3, r3, r3, lsl #7
0x080041aa p_serial_mgr_service+54 lsls r2, r3, #2
0x080041ac p_serial_mgr_service+56 ldr r3, [pc, #88] ; (0x8004208 <p_serial_mgr_service+148>)
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000003 r5 0x00000000 r10 0x00000000 pc 0x080041a2 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x000007b8 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x00000000 r9 0x00000000 lr 0x08003b1f psp 0x00000000
### Source ##########################################################################################################
47 _serial_huart_inst = huart;
48 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
49 }
50 void p_serial_mgr_service(void)
51 {
52 if (sstate == SS_START)
53 {
54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
62 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
63 }
64 }
65
66 void p_serial_mgr_start()
### Stack ###########################################################################################################
[0] from 0x080041a2 in p_serial_mgr_service+46 at shared/drivers/p_serial_mgr.c:57
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080041a2 in p_serial_mgr_service+46 at shared/drivers/p_serial_mgr.c:57
### Variables #######################################################################################################
loc ind = 0
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080041a4
halted: PC: 0x080041a6
halted: PC: 0x080041aa
halted: PC: 0x080041ac
halted: PC: 0x080041ae
halted: PC: 0x080041b0
halted: PC: 0x080041b2
halted: PC: 0x080041b4
halted: PC: 0x080041b6
halted: PC: 0x08004098
55 for (int ind = 0; ind < 24; ind++)
### Assembly ########################################################################################################
0x080041ae p_serial_mgr_service+58 add r3, r2
0x080041b0 p_serial_mgr_service+60 ldrb r2, [r3, r4]
0x080041b2 p_serial_mgr_service+62 mov r1, r4
0x080041b4 p_serial_mgr_service+64 ldr r0, [pc, #88] ; (0x8004210 <p_serial_mgr_service+156>)
0x080041b6 p_serial_mgr_service+66 bl 0x8004098 <p_printf>
0x080041ba p_serial_mgr_service+70 adds r4, #1
0x080041bc p_serial_mgr_service+72 cmp r4, #23
0x080041be p_serial_mgr_service+74 ble.n 0x80041a2 <p_serial_mgr_service+46>
0x080041c0 p_serial_mgr_service+76 ldr r0, [pc, #80] ; (0x8004214 <p_serial_mgr_service+160>)
0x080041c2 p_serial_mgr_service+78 bl 0x8004098 <p_printf>
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080041ba primask 0x00
r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x006000d0 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000020 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x00000000 r9 0x00000000 lr 0x080041bb psp 0x00000000
### Source ##########################################################################################################
45 void p_serial_mgr_init(UART_HandleTypeDef *huart)
46 {
47 _serial_huart_inst = huart;
48 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
49 }
50 void p_serial_mgr_service(void)
51 {
52 if (sstate == SS_START)
53 {
54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
62 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
63 }
64 }
### Stack ###########################################################################################################
[0] from 0x080041ba in p_serial_mgr_service+70 at shared/drivers/p_serial_mgr.c:55
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080041ba in p_serial_mgr_service+70 at shared/drivers/p_serial_mgr.c:55
### Variables #######################################################################################################
loc ind = 0
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080041bc
halted: PC: 0x080041be
halted: PC: 0x080041a2
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
### Assembly ########################################################################################################
0x08004196 p_serial_mgr_service+34 ldr r0, [pc, #116] ; (0x800420c <p_serial_mgr_service+152>)
0x08004198 p_serial_mgr_service+36 ldr r0, [r0, #0]
0x0800419a p_serial_mgr_service+38 bl 0x8003c9a <HAL_UART_Receive>
0x0800419e p_serial_mgr_service+42 movs r4, #0
0x080041a0 p_serial_mgr_service+44 b.n 0x80041bc <p_serial_mgr_service+72>
0x080041a2 p_serial_mgr_service+46 ldr r3, [pc, #96] ; (0x8004204 <p_serial_mgr_service+144>)
0x080041a4 p_serial_mgr_service+48 ldrb r3, [r3, #0]
0x080041a6 p_serial_mgr_service+50 add.w r3, r3, r3, lsl #7
0x080041aa p_serial_mgr_service+54 lsls r2, r3, #2
0x080041ac p_serial_mgr_service+56 ldr r3, [pc, #88] ; (0x8004208 <p_serial_mgr_service+148>)
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080041a2 primask 0x00
r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x006000d0 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000020 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x00000001 r9 0x00000000 lr 0x080041bb psp 0x00000000
### Source ##########################################################################################################
47 _serial_huart_inst = huart;
48 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
49 }
50 void p_serial_mgr_service(void)
51 {
52 if (sstate == SS_START)
53 {
54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
62 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
63 }
64 }
65
66 void p_serial_mgr_start()
### Stack ###########################################################################################################
[0] from 0x080041a2 in p_serial_mgr_service+46 at shared/drivers/p_serial_mgr.c:57
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080041a2 in p_serial_mgr_service+46 at shared/drivers/p_serial_mgr.c:57
### Variables #######################################################################################################
loc ind = 1
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080041a4
halted: PC: 0x080041a6
halted: PC: 0x080041aa
halted: PC: 0x080041ac
halted: PC: 0x080041ae
halted: PC: 0x080041b0
halted: PC: 0x080041b2
halted: PC: 0x080041b4
halted: PC: 0x080041b6
halted: PC: 0x08004098
55 for (int ind = 0; ind < 24; ind++)
### Assembly ########################################################################################################
0x080041ae p_serial_mgr_service+58 add r3, r2
0x080041b0 p_serial_mgr_service+60 ldrb r2, [r3, r4]
0x080041b2 p_serial_mgr_service+62 mov r1, r4
0x080041b4 p_serial_mgr_service+64 ldr r0, [pc, #88] ; (0x8004210 <p_serial_mgr_service+156>)
0x080041b6 p_serial_mgr_service+66 bl 0x8004098 <p_printf>
0x080041ba p_serial_mgr_service+70 adds r4, #1
0x080041bc p_serial_mgr_service+72 cmp r4, #23
0x080041be p_serial_mgr_service+74 ble.n 0x80041a2 <p_serial_mgr_service+46>
0x080041c0 p_serial_mgr_service+76 ldr r0, [pc, #80] ; (0x8004214 <p_serial_mgr_service+160>)
0x080041c2 p_serial_mgr_service+78 bl 0x8004098 <p_printf>
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080041ba primask 0x00
r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x006000d0 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000020 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x00000001 r9 0x00000000 lr 0x080041bb psp 0x00000000
### Source ##########################################################################################################
45 void p_serial_mgr_init(UART_HandleTypeDef *huart)
46 {
47 _serial_huart_inst = huart;
48 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
49 }
50 void p_serial_mgr_service(void)
51 {
52 if (sstate == SS_START)
53 {
54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
62 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
63 }
64 }
### Stack ###########################################################################################################
[0] from 0x080041ba in p_serial_mgr_service+70 at shared/drivers/p_serial_mgr.c:55
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080041ba in p_serial_mgr_service+70 at shared/drivers/p_serial_mgr.c:55
### Variables #######################################################################################################
loc ind = 1
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080041bc
halted: PC: 0x080041be
halted: PC: 0x080041a2
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
### Assembly ########################################################################################################
0x08004196 p_serial_mgr_service+34 ldr r0, [pc, #116] ; (0x800420c <p_serial_mgr_service+152>)
0x08004198 p_serial_mgr_service+36 ldr r0, [r0, #0]
0x0800419a p_serial_mgr_service+38 bl 0x8003c9a <HAL_UART_Receive>
0x0800419e p_serial_mgr_service+42 movs r4, #0
0x080041a0 p_serial_mgr_service+44 b.n 0x80041bc <p_serial_mgr_service+72>
0x080041a2 p_serial_mgr_service+46 ldr r3, [pc, #96] ; (0x8004204 <p_serial_mgr_service+144>)
0x080041a4 p_serial_mgr_service+48 ldrb r3, [r3, #0]
0x080041a6 p_serial_mgr_service+50 add.w r3, r3, r3, lsl #7
0x080041aa p_serial_mgr_service+54 lsls r2, r3, #2
0x080041ac p_serial_mgr_service+56 ldr r3, [pc, #88] ; (0x8004208 <p_serial_mgr_service+148>)
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080041a2 primask 0x00
r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x006000d0 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000020 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x00000002 r9 0x00000000 lr 0x080041bb psp 0x00000000
### Source ##########################################################################################################
47 _serial_huart_inst = huart;
48 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
49 }
50 void p_serial_mgr_service(void)
51 {
52 if (sstate == SS_START)
53 {
54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
62 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
63 }
64 }
65
66 void p_serial_mgr_start()
### Stack ###########################################################################################################
[0] from 0x080041a2 in p_serial_mgr_service+46 at shared/drivers/p_serial_mgr.c:57
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080041a2 in p_serial_mgr_service+46 at shared/drivers/p_serial_mgr.c:57
### Variables #######################################################################################################
loc ind = 2
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080041a4
halted: PC: 0x080041a6
halted: PC: 0x080041aa
halted: PC: 0x080041ac
halted: PC: 0x080041ae
halted: PC: 0x080041b0
halted: PC: 0x080041b2
halted: PC: 0x080041b4
halted: PC: 0x080041b6
halted: PC: 0x08004098
55 for (int ind = 0; ind < 24; ind++)
### Assembly ########################################################################################################
0x080041ae p_serial_mgr_service+58 add r3, r2
0x080041b0 p_serial_mgr_service+60 ldrb r2, [r3, r4]
0x080041b2 p_serial_mgr_service+62 mov r1, r4
0x080041b4 p_serial_mgr_service+64 ldr r0, [pc, #88] ; (0x8004210 <p_serial_mgr_service+156>)
0x080041b6 p_serial_mgr_service+66 bl 0x8004098 <p_printf>
0x080041ba p_serial_mgr_service+70 adds r4, #1
0x080041bc p_serial_mgr_service+72 cmp r4, #23
0x080041be p_serial_mgr_service+74 ble.n 0x80041a2 <p_serial_mgr_service+46>
0x080041c0 p_serial_mgr_service+76 ldr r0, [pc, #80] ; (0x8004214 <p_serial_mgr_service+160>)
0x080041c2 p_serial_mgr_service+78 bl 0x8004098 <p_printf>
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080041ba primask 0x00
r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x006000d0 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000020 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x00000002 r9 0x00000000 lr 0x080041bb psp 0x00000000
### Source ##########################################################################################################
45 void p_serial_mgr_init(UART_HandleTypeDef *huart)
46 {
47 _serial_huart_inst = huart;
48 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
49 }
50 void p_serial_mgr_service(void)
51 {
52 if (sstate == SS_START)
53 {
54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
62 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
63 }
64 }
### Stack ###########################################################################################################
[0] from 0x080041ba in p_serial_mgr_service+70 at shared/drivers/p_serial_mgr.c:55
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080041ba in p_serial_mgr_service+70 at shared/drivers/p_serial_mgr.c:55
### Variables #######################################################################################################
loc ind = 2
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080041bc
halted: PC: 0x080041be
halted: PC: 0x080041a2
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
### Assembly ########################################################################################################
0x08004196 p_serial_mgr_service+34 ldr r0, [pc, #116] ; (0x800420c <p_serial_mgr_service+152>)
0x08004198 p_serial_mgr_service+36 ldr r0, [r0, #0]
0x0800419a p_serial_mgr_service+38 bl 0x8003c9a <HAL_UART_Receive>
0x0800419e p_serial_mgr_service+42 movs r4, #0
0x080041a0 p_serial_mgr_service+44 b.n 0x80041bc <p_serial_mgr_service+72>
0x080041a2 p_serial_mgr_service+46 ldr r3, [pc, #96] ; (0x8004204 <p_serial_mgr_service+144>)
0x080041a4 p_serial_mgr_service+48 ldrb r3, [r3, #0]
0x080041a6 p_serial_mgr_service+50 add.w r3, r3, r3, lsl #7
0x080041aa p_serial_mgr_service+54 lsls r2, r3, #2
0x080041ac p_serial_mgr_service+56 ldr r3, [pc, #88] ; (0x8004208 <p_serial_mgr_service+148>)
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080041a2 primask 0x00
r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x006000d0 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000020 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x00000003 r9 0x00000000 lr 0x080041bb psp 0x00000000
### Source ##########################################################################################################
47 _serial_huart_inst = huart;
48 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
49 }
50 void p_serial_mgr_service(void)
51 {
52 if (sstate == SS_START)
53 {
54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
62 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
63 }
64 }
65
66 void p_serial_mgr_start()
### Stack ###########################################################################################################
[0] from 0x080041a2 in p_serial_mgr_service+46 at shared/drivers/p_serial_mgr.c:57
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080041a2 in p_serial_mgr_service+46 at shared/drivers/p_serial_mgr.c:57
### Variables #######################################################################################################
loc ind = 3
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080041a4
halted: PC: 0x080041a6
halted: PC: 0x080041aa
halted: PC: 0x080041ac
halted: PC: 0x080041ae
halted: PC: 0x080041b0
halted: PC: 0x080041b2
halted: PC: 0x080041b4
halted: PC: 0x080041b6
halted: PC: 0x08004098
55 for (int ind = 0; ind < 24; ind++)
### Assembly ########################################################################################################
0x080041ae p_serial_mgr_service+58 add r3, r2
0x080041b0 p_serial_mgr_service+60 ldrb r2, [r3, r4]
0x080041b2 p_serial_mgr_service+62 mov r1, r4
0x080041b4 p_serial_mgr_service+64 ldr r0, [pc, #88] ; (0x8004210 <p_serial_mgr_service+156>)
0x080041b6 p_serial_mgr_service+66 bl 0x8004098 <p_printf>
0x080041ba p_serial_mgr_service+70 adds r4, #1
0x080041bc p_serial_mgr_service+72 cmp r4, #23
0x080041be p_serial_mgr_service+74 ble.n 0x80041a2 <p_serial_mgr_service+46>
0x080041c0 p_serial_mgr_service+76 ldr r0, [pc, #80] ; (0x8004214 <p_serial_mgr_service+160>)
0x080041c2 p_serial_mgr_service+78 bl 0x8004098 <p_printf>
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080041ba primask 0x00
r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x006000d0 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000020 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x00000003 r9 0x00000000 lr 0x080041bb psp 0x00000000
### Source ##########################################################################################################
45 void p_serial_mgr_init(UART_HandleTypeDef *huart)
46 {
47 _serial_huart_inst = huart;
48 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
49 }
50 void p_serial_mgr_service(void)
51 {
52 if (sstate == SS_START)
53 {
54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
62 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
63 }
64 }
### Stack ###########################################################################################################
[0] from 0x080041ba in p_serial_mgr_service+70 at shared/drivers/p_serial_mgr.c:55
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080041ba in p_serial_mgr_service+70 at shared/drivers/p_serial_mgr.c:55
### Variables #######################################################################################################
loc ind = 3
#####################################################################################################################
Run till exit from #0 p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:55
### Output/messages #################################################################################################
main () at Core/Src/main.c:139
139 while (1)
### Assembly ########################################################################################################
0x0800149c main+80 ldr r1, [pc, #28] ; (0x80014bc <main+112>)
0x0800149e main+82 mov r0, r4
0x080014a0 main+84 bl 0x8003f88 <HAL_UART_Receive_IT>
0x080014a4 main+88 bl 0x800421c <p_serial_mgr_start>
0x080014a8 main+92 bl 0x8004174 <p_serial_mgr_service>
0x080014ac main+96 b.n 0x80014a8 <main+92>
0x080014ae main+98 nop
0x080014b0 main+100 lsrs r4, r3, #13
0x080014b2 main+102 movs r0, #0
0x080014b4 main+104 asrs r1, r5, #5
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080014ac primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x20000c20 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x08003fcd psp 0x00000000
### Source ##########################################################################################################
129 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1);
130 // HAL_TIM_Base_Start_IT(&htim6);
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
### Stack ###########################################################################################################
[0] from 0x080014ac in main+96 at Core/Src/main.c:139
### Threads #########################################################################################################
[1] id 0 from 0x080014ac in main+96 at Core/Src/main.c:139
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080014a8
141 p_serial_mgr_service();
### Assembly ########################################################################################################
0x0800149a main+78 movs r2, #1
0x0800149c main+80 ldr r1, [pc, #28] ; (0x80014bc <main+112>)
0x0800149e main+82 mov r0, r4
0x080014a0 main+84 bl 0x8003f88 <HAL_UART_Receive_IT>
0x080014a4 main+88 bl 0x800421c <p_serial_mgr_start>
0x080014a8 main+92 bl 0x8004174 <p_serial_mgr_service>
0x080014ac main+96 b.n 0x80014a8 <main+92>
0x080014ae main+98 nop
0x080014b0 main+100 lsrs r4, r3, #13
0x080014b2 main+102 movs r0, #0
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080014a8 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x20000c20 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x08003fcd psp 0x00000000
### Source ##########################################################################################################
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
149 // serial_pkt_t *pkt = NULL;
150 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x080014a8 in main+92 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080014a8 in main+92 at Core/Src/main.c:141
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x08004174
p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:52
52 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
~
~
0x08004174 p_serial_mgr_service+0 ldr r3, [pc, #136] ; (0x8004200 <p_serial_mgr_service+140>)
0x08004176 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004178 p_serial_mgr_service+4 cmp r3, #1
0x0800417a p_serial_mgr_service+6 beq.n 0x800417e <p_serial_mgr_service+10>
0x0800417c p_serial_mgr_service+8 bx lr
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x08004174 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x20000c20 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
42 }
43 }
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 void p_serial_mgr_service(void)
51 {
52 if (sstate == SS_START)
53 {
54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
### Stack ###########################################################################################################
[0] from 0x08004174 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:52
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004174 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:52
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x08004176
halted: PC: 0x08004178
halted: PC: 0x0800417a
halted: PC: 0x0800417c
halted: PC: 0x080014ac
main () at Core/Src/main.c:139
139 while (1)
### Assembly ########################################################################################################
0x0800149c main+80 ldr r1, [pc, #28] ; (0x80014bc <main+112>)
0x0800149e main+82 mov r0, r4
0x080014a0 main+84 bl 0x8003f88 <HAL_UART_Receive_IT>
0x080014a4 main+88 bl 0x800421c <p_serial_mgr_start>
0x080014a8 main+92 bl 0x8004174 <p_serial_mgr_service>
0x080014ac main+96 b.n 0x80014a8 <main+92>
0x080014ae main+98 nop
0x080014b0 main+100 lsrs r4, r3, #13
0x080014b2 main+102 movs r0, #0
0x080014b4 main+104 asrs r1, r5, #5
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080014ac primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
129 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1);
130 // HAL_TIM_Base_Start_IT(&htim6);
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
### Stack ###########################################################################################################
[0] from 0x080014ac in main+96 at Core/Src/main.c:139
### Threads #########################################################################################################
[1] id 0 from 0x080014ac in main+96 at Core/Src/main.c:139
### Variables #######################################################################################################
#####################################################################################################################
Continuing.
### Output/messages #################################################################################################
Program received signal SIGINT, Interrupt.
main () at Core/Src/main.c:139
139 while (1)
### Assembly ########################################################################################################
0x0800149c main+80 ldr r1, [pc, #28] ; (0x80014bc <main+112>)
0x0800149e main+82 mov r0, r4
0x080014a0 main+84 bl 0x8003f88 <HAL_UART_Receive_IT>
0x080014a4 main+88 bl 0x800421c <p_serial_mgr_start>
0x080014a8 main+92 bl 0x8004174 <p_serial_mgr_service>
0x080014ac main+96 b.n 0x80014a8 <main+92>
0x080014ae main+98 nop
0x080014b0 main+100 lsrs r4, r3, #13
0x080014b2 main+102 movs r0, #0
0x080014b4 main+104 asrs r1, r5, #5
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080014ac primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
129 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1);
130 // HAL_TIM_Base_Start_IT(&htim6);
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
### Stack ###########################################################################################################
[0] from 0x080014ac in main+96 at Core/Src/main.c:139
### Threads #########################################################################################################
[1] id 0 from 0x080014ac in main+96 at Core/Src/main.c:139
### Variables #######################################################################################################
#####################################################################################################################
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:52
52 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
~
~
0x08004174 p_serial_mgr_service+0 ldr r3, [pc, #136] ; (0x8004200 <p_serial_mgr_service+140>)
0x08004176 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004178 p_serial_mgr_service+4 cmp r3, #1
0x0800417a p_serial_mgr_service+6 beq.n 0x800417e <p_serial_mgr_service+10>
0x0800417c p_serial_mgr_service+8 bx lr
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x08004174 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
42 }
43 }
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 void p_serial_mgr_service(void)
51 {
52 if (sstate == SS_START)
53 {
54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
### Stack ###########################################################################################################
[0] from 0x08004174 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:52
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004174 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:52
### Variables #######################################################################################################
#####################################################################################################################
Breakpoint 2 at 0x8004174: file shared/drivers/p_serial_mgr.c, line 52.
Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf
### Output/messages #################################################################################################
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
Program received signal SIGINT, Interrupt.
p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:52
52 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
~
~
!0x08004174 p_serial_mgr_service+0 ldr r3, [pc, #136] ; (0x8004200 <p_serial_mgr_service+140>)
0x08004176 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004178 p_serial_mgr_service+4 cmp r3, #1
0x0800417a p_serial_mgr_service+6 beq.n 0x800417e <p_serial_mgr_service+10>
0x0800417c p_serial_mgr_service+8 bx lr
### Breakpoints #####################################################################################################
[2] break at 0x08004174 in shared/drivers/p_serial_mgr.c:52 for p_serial_mgr.c:52 if sstate == SS_START
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x08004174 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
42 }
43 }
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 void p_serial_mgr_service(void)
51 {
!52 if (sstate == SS_START)
53 {
54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
### Stack ###########################################################################################################
[0] from 0x08004174 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:52
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004174 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:52
### Variables #######################################################################################################
#####################################################################################################################
Breakpoint 3 at 0x8004180: file shared/drivers/p_serial_mgr.c, line 54.
Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf
### Output/messages #################################################################################################
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
Breakpoint 3, p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:54
54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
### Assembly ########################################################################################################
0x08004176 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004178 p_serial_mgr_service+4 cmp r3, #1
0x0800417a p_serial_mgr_service+6 beq.n 0x800417e <p_serial_mgr_service+10>
0x0800417c p_serial_mgr_service+8 bx lr
0x0800417e p_serial_mgr_service+10 push {r4, lr}
!0x08004180 p_serial_mgr_service+12 ldr r3, [pc, #128] ; (0x8004204 <p_serial_mgr_service+144>)
0x08004182 p_serial_mgr_service+14 ldrb r3, [r3, #0]
0x08004184 p_serial_mgr_service+16 add.w r3, r3, r3, lsl #7
0x08004188 p_serial_mgr_service+20 lsls r1, r3, #2
0x0800418a p_serial_mgr_service+22 adds r1, #1
### Breakpoints #####################################################################################################
[2] break at 0x08004174 in shared/drivers/p_serial_mgr.c:52 for p_serial_mgr.c:52 if sstate == SS_START
[3] break at 0x08004180 in shared/drivers/p_serial_mgr.c:54 for p_serial_mgr.c:53 if sstate == SS_START hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x08004180 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000001 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
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 void p_serial_mgr_service(void)
51 {
!52 if (sstate == SS_START)
53 {
!54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
62 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
63 }
### Stack ###########################################################################################################
[0] from 0x08004180 in p_serial_mgr_service+12 at shared/drivers/p_serial_mgr.c:54
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004180 in p_serial_mgr_service+12 at shared/drivers/p_serial_mgr.c:54
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x08004182
halted: PC: 0x08004184
halted: PC: 0x08004188
halted: PC: 0x0800418a
halted: PC: 0x0800418c
halted: PC: 0x0800418e
halted: PC: 0x08004192
halted: PC: 0x08004194
halted: PC: 0x08004196
halted: PC: 0x08004198
halted: PC: 0x0800419a
halted: PC: 0x08003c9a
55 for (int ind = 0; ind < 24; ind++)
### Assembly ########################################################################################################
0x08004192 p_serial_mgr_service+30 ldr r0, [pc, #116] ; (0x8004208 <p_serial_mgr_service+148>)
0x08004194 p_serial_mgr_service+32 add r1, r0
0x08004196 p_serial_mgr_service+34 ldr r0, [pc, #116] ; (0x800420c <p_serial_mgr_service+152>)
0x08004198 p_serial_mgr_service+36 ldr r0, [r0, #0]
0x0800419a p_serial_mgr_service+38 bl 0x8003c9a <HAL_UART_Receive>
0x0800419e p_serial_mgr_service+42 movs r4, #0
0x080041a0 p_serial_mgr_service+44 b.n 0x80041bc <p_serial_mgr_service+72>
0x080041a2 p_serial_mgr_service+46 ldr r3, [pc, #96] ; (0x8004204 <p_serial_mgr_service+144>)
0x080041a4 p_serial_mgr_service+48 ldrb r3, [r3, #0]
0x080041a6 p_serial_mgr_service+50 add.w r3, r3, r3, lsl #7
### Breakpoints #####################################################################################################
[2] break at 0x08004174 in shared/drivers/p_serial_mgr.c:52 for p_serial_mgr.c:52 if sstate == SS_START
[3] break at 0x08004180 in shared/drivers/p_serial_mgr.c:54 for p_serial_mgr.c:53 if sstate == SS_START hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000003 r5 0x00000000 r10 0x00000000 pc 0x0800419e primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000002 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x08003b1f psp 0x00000000
### Source ##########################################################################################################
45 void p_serial_mgr_init(UART_HandleTypeDef *huart)
46 {
47 _serial_huart_inst = huart;
48 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
49 }
50 void p_serial_mgr_service(void)
51 {
!52 if (sstate == SS_START)
53 {
!54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
62 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
63 }
64 }
### Stack ###########################################################################################################
[0] from 0x0800419e in p_serial_mgr_service+42 at shared/drivers/p_serial_mgr.c:55
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x0800419e in p_serial_mgr_service+42 at shared/drivers/p_serial_mgr.c:55
### Variables #######################################################################################################
loc ind = 0
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080041a0
halted: PC: 0x080041bc
halted: PC: 0x080041be
halted: PC: 0x080041a2
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
### Assembly ########################################################################################################
0x08004196 p_serial_mgr_service+34 ldr r0, [pc, #116] ; (0x800420c <p_serial_mgr_service+152>)
0x08004198 p_serial_mgr_service+36 ldr r0, [r0, #0]
0x0800419a p_serial_mgr_service+38 bl 0x8003c9a <HAL_UART_Receive>
0x0800419e p_serial_mgr_service+42 movs r4, #0
0x080041a0 p_serial_mgr_service+44 b.n 0x80041bc <p_serial_mgr_service+72>
0x080041a2 p_serial_mgr_service+46 ldr r3, [pc, #96] ; (0x8004204 <p_serial_mgr_service+144>)
0x080041a4 p_serial_mgr_service+48 ldrb r3, [r3, #0]
0x080041a6 p_serial_mgr_service+50 add.w r3, r3, r3, lsl #7
0x080041aa p_serial_mgr_service+54 lsls r2, r3, #2
0x080041ac p_serial_mgr_service+56 ldr r3, [pc, #88] ; (0x8004208 <p_serial_mgr_service+148>)
### Breakpoints #####################################################################################################
[2] break at 0x08004174 in shared/drivers/p_serial_mgr.c:52 for p_serial_mgr.c:52 if sstate == SS_START
[3] break at 0x08004180 in shared/drivers/p_serial_mgr.c:54 for p_serial_mgr.c:53 if sstate == SS_START hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000003 r5 0x00000000 r10 0x00000000 pc 0x080041a2 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000002 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x00000000 r9 0x00000000 lr 0x08003b1f psp 0x00000000
### Source ##########################################################################################################
47 _serial_huart_inst = huart;
48 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
49 }
50 void p_serial_mgr_service(void)
51 {
!52 if (sstate == SS_START)
53 {
!54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
62 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
63 }
64 }
65
66 void p_serial_mgr_start()
### Stack ###########################################################################################################
[0] from 0x080041a2 in p_serial_mgr_service+46 at shared/drivers/p_serial_mgr.c:57
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080041a2 in p_serial_mgr_service+46 at shared/drivers/p_serial_mgr.c:57
### Variables #######################################################################################################
loc ind = 0
#####################################################################################################################
Run till exit from #0 p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:57
### Output/messages #################################################################################################
main () at Core/Src/main.c:139
139 while (1)
### Assembly ########################################################################################################
0x0800149c main+80 ldr r1, [pc, #28] ; (0x80014bc <main+112>)
0x0800149e main+82 mov r0, r4
0x080014a0 main+84 bl 0x8003f88 <HAL_UART_Receive_IT>
0x080014a4 main+88 bl 0x800421c <p_serial_mgr_start>
0x080014a8 main+92 bl 0x8004174 <p_serial_mgr_service>
0x080014ac main+96 b.n 0x80014a8 <main+92>
0x080014ae main+98 nop
0x080014b0 main+100 lsrs r4, r3, #13
0x080014b2 main+102 movs r0, #0
0x080014b4 main+104 asrs r1, r5, #5
### Breakpoints #####################################################################################################
[2] break at 0x08004174 in shared/drivers/p_serial_mgr.c:52 for p_serial_mgr.c:52 if sstate == SS_START
[3] break at 0x08004180 in shared/drivers/p_serial_mgr.c:54 for p_serial_mgr.c:53 if sstate == SS_START hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080014ac primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x20000c20 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x08003fcd psp 0x00000000
### Source ##########################################################################################################
129 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1);
130 // HAL_TIM_Base_Start_IT(&htim6);
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
### Stack ###########################################################################################################
[0] from 0x080014ac in main+96 at Core/Src/main.c:139
### Threads #########################################################################################################
[1] id 0 from 0x080014ac in main+96 at Core/Src/main.c:139
### Variables #######################################################################################################
#####################################################################################################################
Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf
### Output/messages #################################################################################################
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
Breakpoint 3, p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:54
54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
### Assembly ########################################################################################################
0x08004176 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004178 p_serial_mgr_service+4 cmp r3, #1
0x0800417a p_serial_mgr_service+6 beq.n 0x800417e <p_serial_mgr_service+10>
0x0800417c p_serial_mgr_service+8 bx lr
0x0800417e p_serial_mgr_service+10 push {r4, lr}
!0x08004180 p_serial_mgr_service+12 ldr r3, [pc, #128] ; (0x8004204 <p_serial_mgr_service+144>)
0x08004182 p_serial_mgr_service+14 ldrb r3, [r3, #0]
0x08004184 p_serial_mgr_service+16 add.w r3, r3, r3, lsl #7
0x08004188 p_serial_mgr_service+20 lsls r1, r3, #2
0x0800418a p_serial_mgr_service+22 adds r1, #1
### Breakpoints #####################################################################################################
[2] break at 0x08004174 in shared/drivers/p_serial_mgr.c:52 for p_serial_mgr.c:52 if sstate == SS_START
[3] break at 0x08004180 in shared/drivers/p_serial_mgr.c:54 for p_serial_mgr.c:53 if sstate == SS_START hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x08004180 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000001 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
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 void p_serial_mgr_service(void)
51 {
!52 if (sstate == SS_START)
53 {
!54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
62 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
63 }
### Stack ###########################################################################################################
[0] from 0x08004180 in p_serial_mgr_service+12 at shared/drivers/p_serial_mgr.c:54
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004180 in p_serial_mgr_service+12 at shared/drivers/p_serial_mgr.c:54
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x08004182
halted: PC: 0x08004184
halted: PC: 0x08004188
halted: PC: 0x0800418a
halted: PC: 0x0800418c
halted: PC: 0x0800418e
halted: PC: 0x08004192
halted: PC: 0x08004194
halted: PC: 0x08004196
halted: PC: 0x08004198
halted: PC: 0x0800419a
halted: PC: 0x08003c9a
55 for (int ind = 0; ind < 24; ind++)
### Assembly ########################################################################################################
0x08004192 p_serial_mgr_service+30 ldr r0, [pc, #116] ; (0x8004208 <p_serial_mgr_service+148>)
0x08004194 p_serial_mgr_service+32 add r1, r0
0x08004196 p_serial_mgr_service+34 ldr r0, [pc, #116] ; (0x800420c <p_serial_mgr_service+152>)
0x08004198 p_serial_mgr_service+36 ldr r0, [r0, #0]
0x0800419a p_serial_mgr_service+38 bl 0x8003c9a <HAL_UART_Receive>
0x0800419e p_serial_mgr_service+42 movs r4, #0
0x080041a0 p_serial_mgr_service+44 b.n 0x80041bc <p_serial_mgr_service+72>
0x080041a2 p_serial_mgr_service+46 ldr r3, [pc, #96] ; (0x8004204 <p_serial_mgr_service+144>)
0x080041a4 p_serial_mgr_service+48 ldrb r3, [r3, #0]
0x080041a6 p_serial_mgr_service+50 add.w r3, r3, r3, lsl #7
### Breakpoints #####################################################################################################
[2] break at 0x08004174 in shared/drivers/p_serial_mgr.c:52 for p_serial_mgr.c:52 if sstate == SS_START
[3] break at 0x08004180 in shared/drivers/p_serial_mgr.c:54 for p_serial_mgr.c:53 if sstate == SS_START hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000003 r5 0x00000000 r10 0x00000000 pc 0x0800419e primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000002 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x08003b1f psp 0x00000000
### Source ##########################################################################################################
45 void p_serial_mgr_init(UART_HandleTypeDef *huart)
46 {
47 _serial_huart_inst = huart;
48 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
49 }
50 void p_serial_mgr_service(void)
51 {
!52 if (sstate == SS_START)
53 {
!54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
62 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
63 }
64 }
### Stack ###########################################################################################################
[0] from 0x0800419e in p_serial_mgr_service+42 at shared/drivers/p_serial_mgr.c:55
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x0800419e in p_serial_mgr_service+42 at shared/drivers/p_serial_mgr.c:55
### Variables #######################################################################################################
loc ind = 0
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080041a0
halted: PC: 0x080041bc
halted: PC: 0x080041be
halted: PC: 0x080041a2
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
### Assembly ########################################################################################################
0x08004196 p_serial_mgr_service+34 ldr r0, [pc, #116] ; (0x800420c <p_serial_mgr_service+152>)
0x08004198 p_serial_mgr_service+36 ldr r0, [r0, #0]
0x0800419a p_serial_mgr_service+38 bl 0x8003c9a <HAL_UART_Receive>
0x0800419e p_serial_mgr_service+42 movs r4, #0
0x080041a0 p_serial_mgr_service+44 b.n 0x80041bc <p_serial_mgr_service+72>
0x080041a2 p_serial_mgr_service+46 ldr r3, [pc, #96] ; (0x8004204 <p_serial_mgr_service+144>)
0x080041a4 p_serial_mgr_service+48 ldrb r3, [r3, #0]
0x080041a6 p_serial_mgr_service+50 add.w r3, r3, r3, lsl #7
0x080041aa p_serial_mgr_service+54 lsls r2, r3, #2
0x080041ac p_serial_mgr_service+56 ldr r3, [pc, #88] ; (0x8004208 <p_serial_mgr_service+148>)
### Breakpoints #####################################################################################################
[2] break at 0x08004174 in shared/drivers/p_serial_mgr.c:52 for p_serial_mgr.c:52 if sstate == SS_START
[3] break at 0x08004180 in shared/drivers/p_serial_mgr.c:54 for p_serial_mgr.c:53 if sstate == SS_START hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000003 r5 0x00000000 r10 0x00000000 pc 0x080041a2 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000002 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x00000000 r9 0x00000000 lr 0x08003b1f psp 0x00000000
### Source ##########################################################################################################
47 _serial_huart_inst = huart;
48 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
49 }
50 void p_serial_mgr_service(void)
51 {
!52 if (sstate == SS_START)
53 {
!54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
62 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
63 }
64 }
65
66 void p_serial_mgr_start()
### Stack ###########################################################################################################
[0] from 0x080041a2 in p_serial_mgr_service+46 at shared/drivers/p_serial_mgr.c:57
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080041a2 in p_serial_mgr_service+46 at shared/drivers/p_serial_mgr.c:57
### Variables #######################################################################################################
loc ind = 0
#####################################################################################################################
Argument required (a location).
### Output/messages #################################################################################################
p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:59
59 PDEBUG("\n\n");
### Assembly ########################################################################################################
0x080041b4 p_serial_mgr_service+64 ldr r0, [pc, #88] ; (0x8004210 <p_serial_mgr_service+156>)
0x080041b6 p_serial_mgr_service+66 bl 0x8004098 <p_printf>
0x080041ba p_serial_mgr_service+70 adds r4, #1
0x080041bc p_serial_mgr_service+72 cmp r4, #23
0x080041be p_serial_mgr_service+74 ble.n 0x80041a2 <p_serial_mgr_service+46>
0x080041c0 p_serial_mgr_service+76 ldr r0, [pc, #80] ; (0x8004214 <p_serial_mgr_service+160>)
0x080041c2 p_serial_mgr_service+78 bl 0x8004098 <p_printf>
0x080041c6 p_serial_mgr_service+82 ldr r3, [pc, #56] ; (0x8004200 <p_serial_mgr_service+140>)
0x080041c8 p_serial_mgr_service+84 movs r2, #0
0x080041ca p_serial_mgr_service+86 strb r2, [r3, #0]
### Breakpoints #####################################################################################################
[2] break at 0x08004174 in shared/drivers/p_serial_mgr.c:52 for p_serial_mgr.c:52 if sstate == SS_START
[3] break at 0x08004180 in shared/drivers/p_serial_mgr.c:54 for p_serial_mgr.c:53 if sstate == SS_START hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080041c0 primask 0x00
r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00
r2 0x006000d0 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000020 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x00000018 r9 0x00000000 lr 0x080041bb psp 0x00000000
### Source ##########################################################################################################
49 }
50 void p_serial_mgr_service(void)
51 {
!52 if (sstate == SS_START)
53 {
!54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
62 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
63 }
64 }
65
66 void p_serial_mgr_start()
67 {
68 sstate = SS_IDLE;
### Stack ###########################################################################################################
[0] from 0x080041c0 in p_serial_mgr_service+76 at shared/drivers/p_serial_mgr.c:59
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080041c0 in p_serial_mgr_service+76 at shared/drivers/p_serial_mgr.c:59
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080041c2
halted: PC: 0x08004098
60 sstate = SS_IDLE;
### Assembly ########################################################################################################
0x080041ba p_serial_mgr_service+70 adds r4, #1
0x080041bc p_serial_mgr_service+72 cmp r4, #23
0x080041be p_serial_mgr_service+74 ble.n 0x80041a2 <p_serial_mgr_service+46>
0x080041c0 p_serial_mgr_service+76 ldr r0, [pc, #80] ; (0x8004214 <p_serial_mgr_service+160>)
0x080041c2 p_serial_mgr_service+78 bl 0x8004098 <p_printf>
0x080041c6 p_serial_mgr_service+82 ldr r3, [pc, #56] ; (0x8004200 <p_serial_mgr_service+140>)
0x080041c8 p_serial_mgr_service+84 movs r2, #0
0x080041ca p_serial_mgr_service+86 strb r2, [r3, #0]
0x080041cc p_serial_mgr_service+88 ldr r0, [pc, #52] ; (0x8004204 <p_serial_mgr_service+144>)
0x080041ce p_serial_mgr_service+90 ldrb r3, [r0, #0]
### Breakpoints #####################################################################################################
[2] break at 0x08004174 in shared/drivers/p_serial_mgr.c:52 for p_serial_mgr.c:52 if sstate == SS_START
[3] break at 0x08004180 in shared/drivers/p_serial_mgr.c:54 for p_serial_mgr.c:53 if sstate == SS_START hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080041c6 primask 0x00
r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x006000d0 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000020 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x00000018 r9 0x00000000 lr 0x080041c7 psp 0x00000000
### Source ##########################################################################################################
50 void p_serial_mgr_service(void)
51 {
!52 if (sstate == SS_START)
53 {
!54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
62 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
63 }
64 }
65
66 void p_serial_mgr_start()
67 {
68 sstate = SS_IDLE;
69 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
### Stack ###########################################################################################################
[0] from 0x080041c6 in p_serial_mgr_service+82 at shared/drivers/p_serial_mgr.c:60
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080041c6 in p_serial_mgr_service+82 at shared/drivers/p_serial_mgr.c:60
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080041c8
halted: PC: 0x080041ca
halted: PC: 0x080041cc
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
### Assembly ########################################################################################################
0x080041c0 p_serial_mgr_service+76 ldr r0, [pc, #80] ; (0x8004214 <p_serial_mgr_service+160>)
0x080041c2 p_serial_mgr_service+78 bl 0x8004098 <p_printf>
0x080041c6 p_serial_mgr_service+82 ldr r3, [pc, #56] ; (0x8004200 <p_serial_mgr_service+140>)
0x080041c8 p_serial_mgr_service+84 movs r2, #0
0x080041ca p_serial_mgr_service+86 strb r2, [r3, #0]
0x080041cc p_serial_mgr_service+88 ldr r0, [pc, #52] ; (0x8004204 <p_serial_mgr_service+144>)
0x080041ce p_serial_mgr_service+90 ldrb r3, [r0, #0]
0x080041d0 p_serial_mgr_service+92 adds r3, #1
0x080041d2 p_serial_mgr_service+94 ldr r1, [pc, #68] ; (0x8004218 <p_serial_mgr_service+164>)
0x080041d4 p_serial_mgr_service+96 smull r2, r1, r1, r3
### Breakpoints #####################################################################################################
[2] break at 0x08004174 in shared/drivers/p_serial_mgr.c:52 for p_serial_mgr.c:52 if sstate == SS_START
[3] break at 0x08004180 in shared/drivers/p_serial_mgr.c:54 for p_serial_mgr.c:53 if sstate == SS_START hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080041cc primask 0x00
r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x00000000 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x20002050 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x00000018 r9 0x00000000 lr 0x080041c7 psp 0x00000000
### Source ##########################################################################################################
51 {
!52 if (sstate == SS_START)
53 {
!54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
62 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
63 }
64 }
65
66 void p_serial_mgr_start()
67 {
68 sstate = SS_IDLE;
69 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
70 }
### Stack ###########################################################################################################
[0] from 0x080041cc in p_serial_mgr_service+88 at shared/drivers/p_serial_mgr.c:61
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080041cc in p_serial_mgr_service+88 at shared/drivers/p_serial_mgr.c:61
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080041ce
halted: PC: 0x080041d0
halted: PC: 0x080041d2
halted: PC: 0x080041d4
halted: PC: 0x080041d8
halted: PC: 0x080041dc
halted: PC: 0x080041e0
halted: PC: 0x080041e2
halted: PC: 0x080041e4
halted: PC: 0x080041e6
halted: PC: 0x080041e8
62 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
### Assembly ########################################################################################################
0x080041dc p_serial_mgr_service+104 add.w r2, r2, r1, asr #2
0x080041e0 p_serial_mgr_service+108 lsls r1, r2, #1
0x080041e2 p_serial_mgr_service+110 subs r3, r3, r1
0x080041e4 p_serial_mgr_service+112 uxtb r3, r3
0x080041e6 p_serial_mgr_service+114 strb r3, [r0, #0]
0x080041e8 p_serial_mgr_service+116 add.w r3, r3, r3, lsl #7
0x080041ec p_serial_mgr_service+120 lsls r1, r3, #2
0x080041ee p_serial_mgr_service+122 movs r2, #1
0x080041f0 p_serial_mgr_service+124 ldr r3, [pc, #20] ; (0x8004208 <p_serial_mgr_service+148>)
0x080041f2 p_serial_mgr_service+126 add r1, r3
### Breakpoints #####################################################################################################
[2] break at 0x08004174 in shared/drivers/p_serial_mgr.c:52 for p_serial_mgr.c:52 if sstate == SS_START
[3] break at 0x08004180 in shared/drivers/p_serial_mgr.c:54 for p_serial_mgr.c:53 if sstate == SS_START hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = SS_IDLE
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000c24 r5 0x00000000 r10 0x00000000 pc 0x080041e8 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00
r2 0x00000000 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000001 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x00000018 r9 0x00000000 lr 0x080041c7 psp 0x00000000
### Source ##########################################################################################################
!52 if (sstate == SS_START)
53 {
!54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
62 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
63 }
64 }
65
66 void p_serial_mgr_start()
67 {
68 sstate = SS_IDLE;
69 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
70 }
~
### Stack ###########################################################################################################
[0] from 0x080041e8 in p_serial_mgr_service+116 at shared/drivers/p_serial_mgr.c:62
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080041e8 in p_serial_mgr_service+116 at shared/drivers/p_serial_mgr.c:62
### Variables #######################################################################################################
#####################################################################################################################
$6 = 1 '\001'
### Output/messages #################################################################################################
halted: PC: 0x080041ec
halted: PC: 0x080041ee
halted: PC: 0x080041f0
halted: PC: 0x080041f2
halted: PC: 0x080041f4
halted: PC: 0x080041f6
halted: PC: 0x080041f8
halted: PC: 0x08003f88
halted: PC: 0x080014ac
main () at Core/Src/main.c:139
139 while (1)
### Assembly ########################################################################################################
0x0800149c main+80 ldr r1, [pc, #28] ; (0x80014bc <main+112>)
0x0800149e main+82 mov r0, r4
0x080014a0 main+84 bl 0x8003f88 <HAL_UART_Receive_IT>
0x080014a4 main+88 bl 0x800421c <p_serial_mgr_start>
0x080014a8 main+92 bl 0x8004174 <p_serial_mgr_service>
0x080014ac main+96 b.n 0x80014a8 <main+92>
0x080014ae main+98 nop
0x080014b0 main+100 lsrs r4, r3, #13
0x080014b2 main+102 movs r0, #0
0x080014b4 main+104 asrs r1, r5, #5
### Breakpoints #####################################################################################################
[2] break at 0x08004174 in shared/drivers/p_serial_mgr.c:52 for p_serial_mgr.c:52 if sstate == SS_START
[3] break at 0x08004180 in shared/drivers/p_serial_mgr.c:54 for p_serial_mgr.c:53 if sstate == SS_START hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = SS_IDLE
$$1 = 126 '~'
$$0 = 1 '\001'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080014ac primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x20000c20 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x08003fcd psp 0x00000000
### Source ##########################################################################################################
129 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1);
130 // HAL_TIM_Base_Start_IT(&htim6);
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
### Stack ###########################################################################################################
[0] from 0x080014ac in main+96 at Core/Src/main.c:139
### Threads #########################################################################################################
[1] id 0 from 0x080014ac in main+96 at Core/Src/main.c:139
### Variables #######################################################################################################
#####################################################################################################################
Continuing.
### Output/messages #################################################################################################
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
halted: PC: 0x08004176
Program received signal SIGINT, Interrupt.
p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:52
52 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
~
~
!0x08004174 p_serial_mgr_service+0 ldr r3, [pc, #136] ; (0x8004200 <p_serial_mgr_service+140>)
0x08004176 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004178 p_serial_mgr_service+4 cmp r3, #1
0x0800417a p_serial_mgr_service+6 beq.n 0x800417e <p_serial_mgr_service+10>
0x0800417c p_serial_mgr_service+8 bx lr
### Breakpoints #####################################################################################################
[2] break at 0x08004174 in shared/drivers/p_serial_mgr.c:52 for p_serial_mgr.c:52 if sstate == SS_START
[3] break at 0x08004180 in shared/drivers/p_serial_mgr.c:54 for p_serial_mgr.c:53 if sstate == SS_START hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = SS_IDLE
$$1 = 126 '~'
$$0 = 1 '\001'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x08004174 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
42 }
43 }
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 void p_serial_mgr_service(void)
51 {
!52 if (sstate == SS_START)
53 {
!54 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
55 for (int ind = 0; ind < 24; ind++)
56 {
57 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
58 }
59 PDEBUG("\n\n");
60 sstate = SS_IDLE;
61 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
### Stack ###########################################################################################################
[0] from 0x08004174 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:52
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004174 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:52
### Variables #######################################################################################################
#####################################################################################################################
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:53
53 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
~
~
0x08004174 p_serial_mgr_service+0 ldr r3, [pc, #136] ; (0x8004200 <p_serial_mgr_start>)
0x08004176 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004178 p_serial_mgr_service+4 cmp r3, #1
0x0800417a p_serial_mgr_service+6 beq.n 0x800417e <p_serial_mgr_service+10>
0x0800417c p_serial_mgr_service+8 bx lr
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x08004174 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
43 }
44 }
45
46 void p_serial_mgr_init(UART_HandleTypeDef *huart)
47 {
48 _serial_huart_inst = huart;
49 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
50 }
51 void p_serial_mgr_service(void)
52 {
53 if (sstate == SS_START)
54 {
55 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
56 for (int ind = 0; ind < 24; ind++)
57 {
58 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
59 }
60 PDEBUG("\n\n");
61 sstate = SS_IDLE;
62 // active_buffer = (active_buffer + 1) % NUM_BUFFERS;
### Stack ###########################################################################################################
[0] from 0x08004174 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:53
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004174 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:53
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x95e0 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x80097a0
Loading section .ARM, size 0x8 lma 0x8009c28
Loading section .init_array, size 0x8 lma 0x8009c30
Loading section .fini_array, size 0x8 lma 0x8009c38
Loading section .data, size 0x9a8 lma 0x8009c40
Start address 0x08004234, load size 42424
Transfer rate: 29 KB/sec, 4713 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 while (1)
### Assembly ########################################################################################################
0x0800149c main+80 ldr r1, [pc, #28] ; (0x80014bc <main+112>)
0x0800149e main+82 mov r0, r4
0x080014a0 main+84 bl 0x8003f88 <HAL_UART_Receive_IT>
0x080014a4 main+88 bl 0x8004200 <p_serial_mgr_start>
0x080014a8 main+92 bl 0x8004174 <p_serial_mgr_service>
0x080014ac main+96 b.n 0x80014a8 <main+92>
0x080014ae main+98 nop
0x080014b0 main+100 lsrs r4, r3, #13
0x080014b2 main+102 movs r0, #0
0x080014b4 main+104 asrs r1, r5, #5
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080014ac primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
129 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1);
130 // HAL_TIM_Base_Start_IT(&htim6);
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
### Stack ###########################################################################################################
[0] from 0x080014ac in main+96 at Core/Src/main.c:139
### Threads #########################################################################################################
[1] id 0 from 0x080014ac in main+96 at Core/Src/main.c:139
### 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: 0x08004234 msp: 0x20010000
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x95e0 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x80097a0
Loading section .ARM, size 0x8 lma 0x8009c28
Loading section .init_array, size 0x8 lma 0x8009c30
Loading section .fini_array, size 0x8 lma 0x8009c38
Loading section .data, size 0x9a8 lma 0x8009c40
Start address 0x08004234, load size 42424
Transfer rate: 29 KB/sec, 4713 bytes/write.
Breakpoint 1 at 0x8004116: file shared/drivers/p_serial_mgr.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, UART1_RxCpltCallback (huart=0x20000aa8 <huart1>) at shared/drivers/p_serial_mgr.c:35
35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
### Assembly ########################################################################################################
~
~
~
~
0x08004114 UART1_RxCpltCallback+0 push {r3, lr}
!0x08004116 UART1_RxCpltCallback+2 ldr r3, [pc, #56] ; (0x8004150 <UART1_RxCpltCallback+60>)
0x08004118 UART1_RxCpltCallback+4 ldrb r3, [r3, #0]
0x0800411a UART1_RxCpltCallback+6 cbnz r3, 0x800412e <UART1_RxCpltCallback+26>
0x0800411c UART1_RxCpltCallback+8 ldr r3, [pc, #52] ; (0x8004154 <UART1_RxCpltCallback+64>)
0x0800411e UART1_RxCpltCallback+10 ldrb r3, [r3, #0]
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x00004001 r10 0x00000000 pc 0x08004116 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x08004115 r8 0x00000000 sp 0x2000ff50 msp 0x2000ff50 control 0x00
r4 0x20000aa8 r9 0x00000000 lr 0x0800338b psp 0x00000000
### Source ##########################################################################################################
25 SS_START = 1, // get start byte, interrupt after 4 more bytes
26 } serial_state_t;
27
28 static UART_HandleTypeDef *_serial_huart_inst = NULL;
29
30 static uint8_t rxc = '\0';
31 static serial_state_t sstate = SS_IDLE;
32
33 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
34 {
!35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
36 {
37 sstate = SS_START;
38 return;
39 }
40 else
41 {
42 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
43 }
44 }
### Stack ###########################################################################################################
[0] from 0x08004116 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
[1] from 0x0800338a in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x080034dc in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347
[3] from 0x080014f0 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:226
[4] from 0xffffffe9
[5] from 0x08003f4a in UART_Start_Receive_IT+154 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3685
[6] from 0x08003fcc in HAL_UART_Receive_IT+68 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1440
[7] from 0x08004220 in p_serial_mgr_start+32 at shared/drivers/p_serial_mgr.c:70
[8] from 0x080014a8 in main+92 at Core/Src/main.c:132
### Threads #########################################################################################################
[1] id 0 from 0x08004116 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
### Variables #######################################################################################################
arg huart = 0x20000aa8 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
#####################################################################################################################
Quit
$1 = 0xff
Continuing.
### Output/messages #################################################################################################
halted: PC: 0x08004118
Breakpoint 1, UART1_RxCpltCallback (huart=0x20000aa8 <huart1>) at shared/drivers/p_serial_mgr.c:35
35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
### Assembly ########################################################################################################
~
~
~
~
0x08004114 UART1_RxCpltCallback+0 push {r3, lr}
!0x08004116 UART1_RxCpltCallback+2 ldr r3, [pc, #56] ; (0x8004150 <UART1_RxCpltCallback+60>)
0x08004118 UART1_RxCpltCallback+4 ldrb r3, [r3, #0]
0x0800411a UART1_RxCpltCallback+6 cbnz r3, 0x800412e <UART1_RxCpltCallback+26>
0x0800411c UART1_RxCpltCallback+8 ldr r3, [pc, #52] ; (0x8004154 <UART1_RxCpltCallback+64>)
0x0800411e UART1_RxCpltCallback+10 ldrb r3, [r3, #0]
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
$$0 = 255 '\377'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x00004001 r10 0x00000000 pc 0x08004116 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x08004115 r8 0x00000000 sp 0x2000ff68 msp 0x2000ff68 control 0x00
r4 0x20000aa8 r9 0x00000000 lr 0x0800338b psp 0x00000000
### Source ##########################################################################################################
25 SS_START = 1, // get start byte, interrupt after 4 more bytes
26 } serial_state_t;
27
28 static UART_HandleTypeDef *_serial_huart_inst = NULL;
29
30 static uint8_t rxc = '\0';
31 static serial_state_t sstate = SS_IDLE;
32
33 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
34 {
!35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
36 {
37 sstate = SS_START;
38 return;
39 }
40 else
41 {
42 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
43 }
44 }
### Stack ###########################################################################################################
[0] from 0x08004116 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
[1] from 0x0800338a in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x080034dc in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347
[3] from 0x080014f0 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:226
[4] from 0xffffffe9
[5] from 0x080014a8 in main+92 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004116 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
### Variables #######################################################################################################
arg huart = 0x20000aa8 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
#####################################################################################################################
$2 = 0x7e
### Output/messages #################################################################################################
halted: PC: 0x08004118
halted: PC: 0x0800411a
halted: PC: 0x0800411c
halted: PC: 0x0800411e
halted: PC: 0x08004120
halted: PC: 0x08004124
halted: PC: 0x08004126
halted: PC: 0x08004128
halted: PC: 0x0800412a
halted: PC: 0x0800412c
halted: PC: 0x08004148
37 sstate = SS_START;
### Assembly ########################################################################################################
0x0800413c UART1_RxCpltCallback+40 add r1, r3
0x0800413e UART1_RxCpltCallback+42 ldr r3, [pc, #28] ; (0x800415c <UART1_RxCpltCallback+72>)
0x08004140 UART1_RxCpltCallback+44 ldr r0, [r3, #0]
0x08004142 UART1_RxCpltCallback+46 bl 0x8003f88 <HAL_UART_Receive_IT>
0x08004146 UART1_RxCpltCallback+50 pop {r3, pc}
0x08004148 UART1_RxCpltCallback+52 ldr r3, [pc, #4] ; (0x8004150 <UART1_RxCpltCallback+60>)
0x0800414a UART1_RxCpltCallback+54 movs r2, #1
0x0800414c UART1_RxCpltCallback+56 strb r2, [r3, #0]
0x0800414e UART1_RxCpltCallback+58 b.n 0x8004146 <UART1_RxCpltCallback+50>
0x08004150 UART1_RxCpltCallback+60 movs r0, #80 ; 0x50
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
$$1 = 255 '\377'
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x00004001 r10 0x00000000 pc 0x08004148 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000035 basepri 0x00
r2 0x00000000 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x0000007e r8 0x00000000 sp 0x2000ff68 msp 0x2000ff68 control 0x00
r4 0x20000aa8 r9 0x00000000 lr 0x0800338b psp 0x00000000
### Source ##########################################################################################################
27
28 static UART_HandleTypeDef *_serial_huart_inst = NULL;
29
30 static uint8_t rxc = '\0';
31 static serial_state_t sstate = SS_IDLE;
32
33 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
34 {
!35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
36 {
37 sstate = SS_START;
38 return;
39 }
40 else
41 {
42 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
43 }
44 }
45
46 void p_serial_mgr_init(UART_HandleTypeDef *huart)
### Stack ###########################################################################################################
[0] from 0x08004148 in UART1_RxCpltCallback+52 at shared/drivers/p_serial_mgr.c:37
[1] from 0x0800338a in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x080034dc in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347
[3] from 0x080014f0 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:226
[4] from 0xffffffe9
[5] from 0x080014a8 in main+92 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004148 in UART1_RxCpltCallback+52 at shared/drivers/p_serial_mgr.c:37
### Variables #######################################################################################################
arg huart = 0x20000aa8 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x0800414a
halted: PC: 0x0800414c
halted: PC: 0x0800414e
38 return;
### Assembly ########################################################################################################
0x08004142 UART1_RxCpltCallback+46 bl 0x8003f88 <HAL_UART_Receive_IT>
0x08004146 UART1_RxCpltCallback+50 pop {r3, pc}
0x08004148 UART1_RxCpltCallback+52 ldr r3, [pc, #4] ; (0x8004150 <UART1_RxCpltCallback+60>)
0x0800414a UART1_RxCpltCallback+54 movs r2, #1
0x0800414c UART1_RxCpltCallback+56 strb r2, [r3, #0]
0x0800414e UART1_RxCpltCallback+58 b.n 0x8004146 <UART1_RxCpltCallback+50>
0x08004150 UART1_RxCpltCallback+60 movs r0, #80 ; 0x50
0x08004152 UART1_RxCpltCallback+62 movs r0, #0
0x08004154 UART1_RxCpltCallback+64 lsrs r4, r4, #16
0x08004156 UART1_RxCpltCallback+66 movs r0, #0
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
$$1 = 255 '\377'
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x00004001 r10 0x00000000 pc 0x0800414e primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21000035 basepri 0x00
r2 0x00000001 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x20002050 r8 0x00000000 sp 0x2000ff68 msp 0x2000ff68 control 0x00
r4 0x20000aa8 r9 0x00000000 lr 0x0800338b psp 0x00000000
### Source ##########################################################################################################
28 static UART_HandleTypeDef *_serial_huart_inst = NULL;
29
30 static uint8_t rxc = '\0';
31 static serial_state_t sstate = SS_IDLE;
32
33 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
34 {
!35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
36 {
37 sstate = SS_START;
38 return;
39 }
40 else
41 {
42 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
43 }
44 }
45
46 void p_serial_mgr_init(UART_HandleTypeDef *huart)
47 {
### Stack ###########################################################################################################
[0] from 0x0800414e in UART1_RxCpltCallback+58 at shared/drivers/p_serial_mgr.c:38
[1] from 0x0800338a in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x080034dc in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347
[3] from 0x080014f0 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:226
[4] from 0xffffffe9
[5] from 0x080014a8 in main+92 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x0800414e in UART1_RxCpltCallback+58 at shared/drivers/p_serial_mgr.c:38
### Variables #######################################################################################################
arg huart = 0x20000aa8 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x08004146
halted: PC: 0x0800338a
halted: PC: 0x08003320
halted: PC: 0x080034dc
HAL_UART_IRQHandler (huart=0x20000aa8 <huart1>) at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2349
2349 return;
### Assembly ########################################################################################################
0x080034d2 HAL_UART_IRQHandler+98 ldr r3, [r4, #100] ; 0x64
0x080034d4 HAL_UART_IRQHandler+100 cmp r3, #0
0x080034d6 HAL_UART_IRQHandler+102 beq.n 0x80034d0 <HAL_UART_IRQHandler+96>
0x080034d8 HAL_UART_IRQHandler+104 mov r0, r4
0x080034da HAL_UART_IRQHandler+106 blx r3
0x080034dc HAL_UART_IRQHandler+108 b.n 0x80034d0 <HAL_UART_IRQHandler+96>
0x080034de HAL_UART_IRQHandler+110 tst.w r3, #1
0x080034e2 HAL_UART_IRQHandler+114 beq.n 0x80034f8 <HAL_UART_IRQHandler+136>
0x080034e4 HAL_UART_IRQHandler+116 tst.w r0, #256 ; 0x100
0x080034e8 HAL_UART_IRQHandler+120 beq.n 0x80034f8 <HAL_UART_IRQHandler+136>
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
$$1 = 255 '\377'
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x00004001 r10 0x00000000 pc 0x080034dc primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21000035 basepri 0x00
r2 0x00000001 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x08003309 r8 0x00000000 sp 0x2000ff78 msp 0x2000ff78 control 0x00
r4 0x20000aa8 r9 0x00000000 lr 0x0800338b psp 0x00000000
### Source ##########################################################################################################
2339 || ((cr3its & USART_CR3_RXFTIE) != 0U)))
2340 #else
2341 if (((isrflags & USART_ISR_RXNE) != 0U)
2342 && ((cr1its & USART_CR1_RXNEIE) != 0U))
2343 #endif /* USART_CR1_FIFOEN */
2344 {
2345 if (huart->RxISR != NULL)
2346 {
2347 huart->RxISR(huart);
2348 }
2349 return;
2350 }
2351 }
2352
2353 /* If some errors occur */
2354 #if defined(USART_CR1_FIFOEN)
2355 if ((errorflags != 0U)
2356 && ((((cr3its & (USART_CR3_RXFTIE | USART_CR3_EIE)) != 0U)
2357 || ((cr1its & (USART_CR1_RXNEIE_RXFNEIE | USART_CR1_PEIE | USART_CR1_RTOIE)) != 0U))))
2358 #else
### Stack ###########################################################################################################
[0] from 0x080034dc in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2349
[1] from 0x080014f0 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:226
[2] from 0xffffffe9
[3] from 0x080014a8 in main+92 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080034dc in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2349
### Variables #######################################################################################################
arg huart = 0x20000aa8 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
loc isrflags = <optimized out>, cr1its = <optimized out>, cr3its = 16385, errorflags = <optimized out>, errorcode = <optimized out>
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080034d0
halted: PC: 0x080014f0
halted: PC: 0x080014a8
main () at Core/Src/main.c:141
141 p_serial_mgr_service();
### Assembly ########################################################################################################
0x0800149a main+78 movs r2, #1
0x0800149c main+80 ldr r1, [pc, #28] ; (0x80014bc <main+112>)
0x0800149e main+82 mov r0, r4
0x080014a0 main+84 bl 0x8003f88 <HAL_UART_Receive_IT>
0x080014a4 main+88 bl 0x8004200 <p_serial_mgr_start>
0x080014a8 main+92 bl 0x8004174 <p_serial_mgr_service>
0x080014ac main+96 b.n 0x80014a8 <main+92>
0x080014ae main+98 nop
0x080014b0 main+100 lsrs r4, r3, #13
0x080014b2 main+102 movs r0, #0
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
$$1 = 255 '\377'
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080014a8 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
149 // serial_pkt_t *pkt = NULL;
150 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x080014a8 in main+92 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080014a8 in main+92 at Core/Src/main.c:141
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x08004174
p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:53
53 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
~
~
0x08004174 p_serial_mgr_service+0 ldr r3, [pc, #112] ; (0x80041e8 <p_serial_mgr_service+116>)
0x08004176 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004178 p_serial_mgr_service+4 cmp r3, #1
0x0800417a p_serial_mgr_service+6 beq.n 0x800417e <p_serial_mgr_service+10>
0x0800417c p_serial_mgr_service+8 bx lr
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
$$1 = 255 '\377'
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x08004174 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
43 }
44 }
45
46 void p_serial_mgr_init(UART_HandleTypeDef *huart)
47 {
48 _serial_huart_inst = huart;
49 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
50 }
51 void p_serial_mgr_service(void)
52 {
53 if (sstate == SS_START)
54 {
55 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
56 for (int ind = 0; ind < 24; ind++)
57 {
58 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
59 }
60 PDEBUG("\n\n");
61 sstate = SS_IDLE;
62 // active_buffer = (active_buffer + 1) % NUM_BUFFERS;
### Stack ###########################################################################################################
[0] from 0x08004174 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:53
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004174 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:53
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x08004176
halted: PC: 0x08004178
halted: PC: 0x0800417a
halted: PC: 0x0800417e
halted: PC: 0x08004180
55 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
### Assembly ########################################################################################################
0x08004176 p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004178 p_serial_mgr_service+4 cmp r3, #1
0x0800417a p_serial_mgr_service+6 beq.n 0x800417e <p_serial_mgr_service+10>
0x0800417c p_serial_mgr_service+8 bx lr
0x0800417e p_serial_mgr_service+10 push {r4, lr}
0x08004180 p_serial_mgr_service+12 ldr r3, [pc, #104] ; (0x80041ec <p_serial_mgr_service+120>)
0x08004182 p_serial_mgr_service+14 ldrb r3, [r3, #0]
0x08004184 p_serial_mgr_service+16 add.w r3, r3, r3, lsl #7
0x08004188 p_serial_mgr_service+20 lsls r1, r3, #2
0x0800418a p_serial_mgr_service+22 adds r1, #1
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
$$1 = 255 '\377'
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x08004180 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000001 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080014ad psp 0x00000000
### Source ##########################################################################################################
45
46 void p_serial_mgr_init(UART_HandleTypeDef *huart)
47 {
48 _serial_huart_inst = huart;
49 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
50 }
51 void p_serial_mgr_service(void)
52 {
53 if (sstate == SS_START)
54 {
55 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
56 for (int ind = 0; ind < 24; ind++)
57 {
58 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
59 }
60 PDEBUG("\n\n");
61 sstate = SS_IDLE;
62 // active_buffer = (active_buffer + 1) % NUM_BUFFERS;
63 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
64 }
### Stack ###########################################################################################################
[0] from 0x08004180 in p_serial_mgr_service+12 at shared/drivers/p_serial_mgr.c:55
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004180 in p_serial_mgr_service+12 at shared/drivers/p_serial_mgr.c:55
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x08004182
halted: PC: 0x08004184
halted: PC: 0x08004188
halted: PC: 0x0800418a
halted: PC: 0x0800418c
halted: PC: 0x0800418e
halted: PC: 0x08004192
halted: PC: 0x08004194
halted: PC: 0x08004196
halted: PC: 0x08004198
halted: PC: 0x0800419a
halted: PC: 0x08003c9a
56 for (int ind = 0; ind < 24; ind++)
### Assembly ########################################################################################################
0x08004192 p_serial_mgr_service+30 ldr r0, [pc, #92] ; (0x80041f0 <p_serial_mgr_service+124>)
0x08004194 p_serial_mgr_service+32 add r1, r0
0x08004196 p_serial_mgr_service+34 ldr r0, [pc, #92] ; (0x80041f4 <p_serial_mgr_service+128>)
0x08004198 p_serial_mgr_service+36 ldr r0, [r0, #0]
0x0800419a p_serial_mgr_service+38 bl 0x8003c9a <HAL_UART_Receive>
0x0800419e p_serial_mgr_service+42 movs r4, #0
0x080041a0 p_serial_mgr_service+44 b.n 0x80041bc <p_serial_mgr_service+72>
0x080041a2 p_serial_mgr_service+46 ldr r3, [pc, #72] ; (0x80041ec <p_serial_mgr_service+120>)
0x080041a4 p_serial_mgr_service+48 ldrb r3, [r3, #0]
0x080041a6 p_serial_mgr_service+50 add.w r3, r3, r3, lsl #7
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
$$1 = 255 '\377'
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000003 r5 0x00000000 r10 0x00000000 pc 0x0800419e primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x21000000 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000790 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x08003b1f psp 0x00000000
### Source ##########################################################################################################
46 void p_serial_mgr_init(UART_HandleTypeDef *huart)
47 {
48 _serial_huart_inst = huart;
49 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
50 }
51 void p_serial_mgr_service(void)
52 {
53 if (sstate == SS_START)
54 {
55 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
56 for (int ind = 0; ind < 24; ind++)
57 {
58 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
59 }
60 PDEBUG("\n\n");
61 sstate = SS_IDLE;
62 // active_buffer = (active_buffer + 1) % NUM_BUFFERS;
63 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
64 }
65 }
### Stack ###########################################################################################################
[0] from 0x0800419e in p_serial_mgr_service+42 at shared/drivers/p_serial_mgr.c:56
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x0800419e in p_serial_mgr_service+42 at shared/drivers/p_serial_mgr.c:56
### Variables #######################################################################################################
loc ind = 0
#####################################################################################################################
### Output/messages #################################################################################################
p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:61
61 sstate = SS_IDLE;
### Assembly ########################################################################################################
0x080041ba p_serial_mgr_service+70 adds r4, #1
0x080041bc p_serial_mgr_service+72 cmp r4, #23
0x080041be p_serial_mgr_service+74 ble.n 0x80041a2 <p_serial_mgr_service+46>
0x080041c0 p_serial_mgr_service+76 ldr r0, [pc, #56] ; (0x80041fc <p_serial_mgr_service+136>)
0x080041c2 p_serial_mgr_service+78 bl 0x8004098 <p_printf>
0x080041c6 p_serial_mgr_service+82 ldr r3, [pc, #32] ; (0x80041e8 <p_serial_mgr_service+116>)
0x080041c8 p_serial_mgr_service+84 movs r2, #0
0x080041ca p_serial_mgr_service+86 strb r2, [r3, #0]
0x080041cc p_serial_mgr_service+88 ldr r3, [pc, #28] ; (0x80041ec <p_serial_mgr_service+120>)
0x080041ce p_serial_mgr_service+90 ldrb r3, [r3, #0]
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
$$1 = 255 '\377'
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080041c6 primask 0x00
r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x006000d0 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000020 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x00000018 r9 0x00000000 lr 0x080041c7 psp 0x00000000
### Source ##########################################################################################################
51 void p_serial_mgr_service(void)
52 {
53 if (sstate == SS_START)
54 {
55 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
56 for (int ind = 0; ind < 24; ind++)
57 {
58 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
59 }
60 PDEBUG("\n\n");
61 sstate = SS_IDLE;
62 // active_buffer = (active_buffer + 1) % NUM_BUFFERS;
63 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
64 }
65 }
66
67 void p_serial_mgr_start()
68 {
69 sstate = SS_IDLE;
70 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
### Stack ###########################################################################################################
[0] from 0x080041c6 in p_serial_mgr_service+82 at shared/drivers/p_serial_mgr.c:61
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080041c6 in p_serial_mgr_service+82 at shared/drivers/p_serial_mgr.c:61
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080041c8
halted: PC: 0x080041ca
halted: PC: 0x080041cc
63 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
### Assembly ########################################################################################################
0x080041c0 p_serial_mgr_service+76 ldr r0, [pc, #56] ; (0x80041fc <p_serial_mgr_service+136>)
0x080041c2 p_serial_mgr_service+78 bl 0x8004098 <p_printf>
0x080041c6 p_serial_mgr_service+82 ldr r3, [pc, #32] ; (0x80041e8 <p_serial_mgr_service+116>)
0x080041c8 p_serial_mgr_service+84 movs r2, #0
0x080041ca p_serial_mgr_service+86 strb r2, [r3, #0]
0x080041cc p_serial_mgr_service+88 ldr r3, [pc, #28] ; (0x80041ec <p_serial_mgr_service+120>)
0x080041ce p_serial_mgr_service+90 ldrb r3, [r3, #0]
0x080041d0 p_serial_mgr_service+92 add.w r3, r3, r3, lsl #7
0x080041d4 p_serial_mgr_service+96 lsls r1, r3, #2
0x080041d6 p_serial_mgr_service+98 movs r2, #1
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
$$1 = 255 '\377'
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080041cc primask 0x00
r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x00000000 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x20002050 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x00000018 r9 0x00000000 lr 0x080041c7 psp 0x00000000
### Source ##########################################################################################################
53 if (sstate == SS_START)
54 {
55 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN, 10);
56 for (int ind = 0; ind < 24; ind++)
57 {
58 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
59 }
60 PDEBUG("\n\n");
61 sstate = SS_IDLE;
62 // active_buffer = (active_buffer + 1) % NUM_BUFFERS;
63 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
64 }
65 }
66
67 void p_serial_mgr_start()
68 {
69 sstate = SS_IDLE;
70 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
71 }
~
### Stack ###########################################################################################################
[0] from 0x080041cc in p_serial_mgr_service+88 at shared/drivers/p_serial_mgr.c:63
[1] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080041cc in p_serial_mgr_service+88 at shared/drivers/p_serial_mgr.c:63
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080041ce
halted: PC: 0x080041d0
halted: PC: 0x080041d4
halted: PC: 0x080041d6
halted: PC: 0x080041d8
halted: PC: 0x080041da
halted: PC: 0x080041dc
halted: PC: 0x080041de
halted: PC: 0x080041e0
halted: PC: 0x08003f88
halted: PC: 0x080014ac
main () at Core/Src/main.c:139
139 while (1)
### Assembly ########################################################################################################
0x0800149c main+80 ldr r1, [pc, #28] ; (0x80014bc <main+112>)
0x0800149e main+82 mov r0, r4
0x080014a0 main+84 bl 0x8003f88 <HAL_UART_Receive_IT>
0x080014a4 main+88 bl 0x8004200 <p_serial_mgr_start>
0x080014a8 main+92 bl 0x8004174 <p_serial_mgr_service>
0x080014ac main+96 b.n 0x80014a8 <main+92>
0x080014ae main+98 nop
0x080014b0 main+100 lsrs r4, r3, #13
0x080014b2 main+102 movs r0, #0
0x080014b4 main+104 asrs r1, r5, #5
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
$$1 = 255 '\377'
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080014ac primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x20000c20 r8 0x00000000 sp 0x2000fff8 msp 0x2000fff8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x08003fcd psp 0x00000000
### Source ##########################################################################################################
129 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1);
130 // HAL_TIM_Base_Start_IT(&htim6);
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
### Stack ###########################################################################################################
[0] from 0x080014ac in main+96 at Core/Src/main.c:139
### Threads #########################################################################################################
[1] id 0 from 0x080014ac in main+96 at Core/Src/main.c:139
### Variables #######################################################################################################
#####################################################################################################################
Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf
### Output/messages #################################################################################################
Breakpoint 1, UART1_RxCpltCallback (huart=0x20000aa8 <huart1>) at shared/drivers/p_serial_mgr.c:35
35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
### Assembly ########################################################################################################
~
~
~
~
0x08004114 UART1_RxCpltCallback+0 push {r3, lr}
!0x08004116 UART1_RxCpltCallback+2 ldr r3, [pc, #56] ; (0x8004150 <UART1_RxCpltCallback+60>)
0x08004118 UART1_RxCpltCallback+4 ldrb r3, [r3, #0]
0x0800411a UART1_RxCpltCallback+6 cbnz r3, 0x800412e <UART1_RxCpltCallback+26>
0x0800411c UART1_RxCpltCallback+8 ldr r3, [pc, #52] ; (0x8004154 <UART1_RxCpltCallback+64>)
0x0800411e UART1_RxCpltCallback+10 ldrb r3, [r3, #0]
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$1 = 255 '\377'
$$0 = 126 '~'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x00004001 r10 0x00000000 pc 0x08004116 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x08004115 r8 0x00000000 sp 0x2000ff68 msp 0x2000ff68 control 0x00
r4 0x20000aa8 r9 0x00000000 lr 0x0800338b psp 0x00000000
### Source ##########################################################################################################
25 SS_START = 1, // get start byte, interrupt after 4 more bytes
26 } serial_state_t;
27
28 static UART_HandleTypeDef *_serial_huart_inst = NULL;
29
30 static uint8_t rxc = '\0';
31 static serial_state_t sstate = SS_IDLE;
32
33 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
34 {
!35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
36 {
37 sstate = SS_START;
38 return;
39 }
40 else
41 {
42 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
43 }
44 }
### Stack ###########################################################################################################
[0] from 0x08004116 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
[1] from 0x0800338a in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x080034dc in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347
[3] from 0x080014f0 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:226
[4] from 0xffffffe9
[5] from 0x08004174 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:53
[6] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004116 in UART1_RxCpltCallback+2 at shared/drivers/p_serial_mgr.c:35
### Variables #######################################################################################################
arg huart = 0x20000aa8 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
#####################################################################################################################
$3 = 0x7e
$4 = {[0x0] = 0x7e, [0x1] = 0x0 <repeats 515 times>}
### Output/messages #################################################################################################
halted: PC: 0x08004118
halted: PC: 0x0800411a
halted: PC: 0x0800411c
halted: PC: 0x0800411e
halted: PC: 0x08004120
halted: PC: 0x08004124
halted: PC: 0x08004126
halted: PC: 0x08004128
halted: PC: 0x0800412a
halted: PC: 0x0800412c
halted: PC: 0x08004148
37 sstate = SS_START;
### Assembly ########################################################################################################
0x0800413c UART1_RxCpltCallback+40 add r1, r3
0x0800413e UART1_RxCpltCallback+42 ldr r3, [pc, #28] ; (0x800415c <UART1_RxCpltCallback+72>)
0x08004140 UART1_RxCpltCallback+44 ldr r0, [r3, #0]
0x08004142 UART1_RxCpltCallback+46 bl 0x8003f88 <HAL_UART_Receive_IT>
0x08004146 UART1_RxCpltCallback+50 pop {r3, pc}
0x08004148 UART1_RxCpltCallback+52 ldr r3, [pc, #4] ; (0x8004150 <UART1_RxCpltCallback+60>)
0x0800414a UART1_RxCpltCallback+54 movs r2, #1
0x0800414c UART1_RxCpltCallback+56 strb r2, [r3, #0]
0x0800414e UART1_RxCpltCallback+58 b.n 0x8004146 <UART1_RxCpltCallback+50>
0x08004150 UART1_RxCpltCallback+60 movs r0, #80 ; 0x50
### Breakpoints #####################################################################################################
[1] break at 0x08004116 in shared/drivers/p_serial_mgr.c:35 for p_serial_mgr.c:35 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$2 = 126 '~'
$$1 = 126 '~'
$$0 = "~", '\000' <repeats 514 times>
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x00004001 r10 0x00000000 pc 0x08004148 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000035 basepri 0x00
r2 0x00000000 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x0000007e r8 0x00000000 sp 0x2000ff68 msp 0x2000ff68 control 0x00
r4 0x20000aa8 r9 0x00000000 lr 0x0800338b psp 0x00000000
### Source ##########################################################################################################
27
28 static UART_HandleTypeDef *_serial_huart_inst = NULL;
29
30 static uint8_t rxc = '\0';
31 static serial_state_t sstate = SS_IDLE;
32
33 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
34 {
!35 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
36 {
37 sstate = SS_START;
38 return;
39 }
40 else
41 {
42 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
43 }
44 }
45
46 void p_serial_mgr_init(UART_HandleTypeDef *huart)
### Stack ###########################################################################################################
[0] from 0x08004148 in UART1_RxCpltCallback+52 at shared/drivers/p_serial_mgr.c:37
[1] from 0x0800338a in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x080034dc in HAL_UART_IRQHandler+108 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347
[3] from 0x080014f0 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:226
[4] from 0xffffffe9
[5] from 0x08004174 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:53
[6] from 0x080014ac in main+96 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004148 in UART1_RxCpltCallback+52 at shared/drivers/p_serial_mgr.c:37
### Variables #######################################################################################################
arg huart = 0x20000aa8 <huart1>: {Instance = 0x40013800,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]
0x08004148 in HAL_UART_Init (huart=0x20000aa8 <huart1>) at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:372
372 if (UART_SetConfig(huart) == HAL_ERROR)
### Assembly ########################################################################################################
0x0800413c HAL_UART_Init+20 add r1, r3
0x0800413e HAL_UART_Init+22 ldr r3, [pc, #28] ; (0x800415c <HAL_UART_Init+52>)
0x08004140 HAL_UART_Init+24 ldr r0, [r3, #0]
0x08004142 HAL_UART_Init+26 bl 0x8003f88 <HAL_UART_Transmit+206>
0x08004146 HAL_UART_Init+30 pop {r3, pc}
0x08004148 HAL_UART_Init+32 ldr r3, [pc, #4] ; (0x8004150 <HAL_UART_Init+40>)
0x0800414a HAL_UART_Init+34 movs r2, #1
0x0800414c HAL_UART_Init+36 strb r2, [r3, #0]
0x0800414e HAL_UART_Init+38 b.n 0x8004146 <HAL_UART_Init+30>
0x08004150 HAL_UART_Init+40 movs r0, #80 ; 0x50
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x00004001 r10 0x00000000 pc 0x08004148 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000035 basepri 0x00
r2 0x00000000 r7 0x00000000 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x0000007e r8 0x00000000 sp 0x2000ff68 msp 0x2000ff68 control 0x00
r4 0x20000aa8 r9 0x00000000 lr 0x0800338b psp 0x00000000
### Source ##########################################################################################################
362 /* Init the low level hardware : GPIO, CLOCK */
363 HAL_UART_MspInit(huart);
364 #endif /* (USE_HAL_UART_REGISTER_CALLBACKS) */
365 }
366
367 huart->gState = HAL_UART_STATE_BUSY;
368
369 __HAL_UART_DISABLE(huart);
370
371 /* Set the UART Communication parameters */
372 if (UART_SetConfig(huart) == HAL_ERROR)
373 {
374 return HAL_ERROR;
375 }
376
377 if (huart->AdvancedInit.AdvFeatureInit != UART_ADVFEATURE_NO_INIT)
378 {
379 UART_AdvFeatureConfig(huart);
380 }
381
### Stack ###########################################################################################################
[0] from 0x08004148 in HAL_UART_Init+32 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:372
[1] from 0x0800338a in HAL_DMA_IRQHandler+116 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c:847
[2] from 0x00000000
### Threads #########################################################################################################
[1] id 0 from 0x08004148 in HAL_UART_Init+32 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:372
### Variables #######################################################################################################
arg huart = 0x20000aa8 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x98e0 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x8009aa0
Loading section .ARM, size 0x8 lma 0x8009f28
Loading section .init_array, size 0x8 lma 0x8009f30
Loading section .fini_array, size 0x8 lma 0x8009f38
Loading section .data, size 0x9a8 lma 0x8009f40
Start address 0x08004538, load size 43192
Transfer rate: 29 KB/sec, 4799 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 while (1)
### Assembly ########################################################################################################
0x08001518 main+112 bl 0x8004280 <HAL_UART_Receive_IT>
0x0800151c main+116 ldr r0, [pc, #32] ; (0x8001540 <main+152>)
0x0800151e main+118 bl 0x80019d8 <HAL_TIM_Base_Start_IT>
0x08001522 main+122 bl 0x80044f8 <p_serial_mgr_start>
0x08001526 main+126 bl 0x800446c <p_serial_mgr_service>
0x0800152a main+130 b.n 0x8001526 <main+126>
0x0800152c main+132 lsrs r4, r3, #13
0x0800152e main+134 movs r0, #0
0x08001530 main+136 asrs r1, r5, #5
0x08001532 main+138 lsrs r0, r0, #32
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x0800152a primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
129 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1);
130 HAL_TIM_Base_Start_IT(&htim6);
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
### Stack ###########################################################################################################
[0] from 0x0800152a in main+130 at Core/Src/main.c:139
### Threads #########################################################################################################
[1] id 0 from 0x0800152a in main+130 at Core/Src/main.c:139
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x98e0 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x8009aa0
Loading section .ARM, size 0x8 lma 0x8009f28
Loading section .init_array, size 0x8 lma 0x8009f30
Loading section .fini_array, size 0x8 lma 0x8009f38
Loading section .data, size 0x9a8 lma 0x8009f40
Start address 0x08004538, load size 43192
Transfer rate: 29 KB/sec, 4799 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:53
53 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
~
~
0x0800446c p_serial_mgr_service+0 ldr r3, [pc, #112] ; (0x80044e0 <p_serial_mgr_service+116>)
0x0800446e p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004470 p_serial_mgr_service+4 cmp r3, #1
0x08004472 p_serial_mgr_service+6 beq.n 0x8004476 <p_serial_mgr_service+10>
0x08004474 p_serial_mgr_service+8 bx lr
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x0800446c primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
43 }
44 }
45
46 void p_serial_mgr_init(UART_HandleTypeDef *huart)
47 {
48 _serial_huart_inst = huart;
49 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
50 }
51 void p_serial_mgr_service(void)
52 {
53 if (sstate == SS_START)
54 {
55 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN - 2, 20);
56 for (int ind = 0; ind < 24; ind++)
57 {
58 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
59 }
60 PDEBUG("\n\n");
61 sstate = SS_IDLE;
62 // active_buffer = (active_buffer + 1) % NUM_BUFFERS;
### Stack ###########################################################################################################
[0] from 0x0800446c in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:53
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x0800446c in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:53
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x98f8 lma 0x80001c0
Loading section .rodata, size 0x488 lma 0x8009ab8
Loading section .ARM, size 0x8 lma 0x8009f40
Loading section .init_array, size 0x8 lma 0x8009f48
Loading section .fini_array, size 0x8 lma 0x8009f50
Loading section .data, size 0x9a8 lma 0x8009f58
Start address 0x08004550, load size 43216
Transfer rate: 29 KB/sec, 4801 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 while (1)
### Assembly ########################################################################################################
0x08001518 main+112 bl 0x8004280 <HAL_UART_Receive_IT>
0x0800151c main+116 ldr r0, [pc, #32] ; (0x8001540 <main+152>)
0x0800151e main+118 bl 0x80019d8 <HAL_TIM_Base_Start_IT>
0x08001522 main+122 bl 0x8004510 <p_serial_mgr_service+164>
0x08001526 main+126 bl 0x800446c <p_serial_mgr_service>
0x0800152a main+130 b.n 0x8001526 <main+126>
0x0800152c main+132 lsrs r4, r3, #13
0x0800152e main+134 movs r0, #0
0x08001530 main+136 asrs r1, r5, #5
0x08001532 main+138 lsrs r0, r0, #32
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x0800152a primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
129 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1);
130 HAL_TIM_Base_Start_IT(&htim6);
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
### Stack ###########################################################################################################
[0] from 0x0800152a in main+130 at Core/Src/main.c:139
### Threads #########################################################################################################
[1] id 0 from 0x0800152a in main+130 at Core/Src/main.c:139
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x9900 lma 0x80001c0
Loading section .rodata, size 0x490 lma 0x8009ac0
Loading section .ARM, size 0x8 lma 0x8009f50
Loading section .init_array, size 0x8 lma 0x8009f58
Loading section .fini_array, size 0x8 lma 0x8009f60
Loading section .data, size 0x9a8 lma 0x8009f68
Start address 0x08004554, load size 43232
Transfer rate: 29 KB/sec, 4803 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]
0x08004472 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:53
53 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
0x0800446c p_serial_mgr_service+0 ldr r3, [pc, #136] ; (0x80044f8 <p_serial_mgr_service+140>)
0x0800446e p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004470 p_serial_mgr_service+4 cmp r3, #1
0x08004472 p_serial_mgr_service+6 beq.n 0x8004476 <p_serial_mgr_service+10>
0x08004474 p_serial_mgr_service+8 bx lr
0x08004476 p_serial_mgr_service+10 push {r4, lr}
0x08004478 p_serial_mgr_service+12 sub sp, #16
0x0800447a p_serial_mgr_service+14 ldr r3, [pc, #128] ; (0x80044fc <p_serial_mgr_service+144>)
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08004472 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
43 }
44 }
45
46 void p_serial_mgr_init(UART_HandleTypeDef *huart)
47 {
48 _serial_huart_inst = huart;
49 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
50 }
51 void p_serial_mgr_service(void)
52 {
53 if (sstate == SS_START)
54 {
55 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN - 2, 20);
56 for (int ind = 0; ind < 24; ind++)
57 {
58 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
59 }
60 PDEBUG("\n\n");
61 sstate = SS_IDLE;
62 // active_buffer = (active_buffer + 1) % NUM_BUFFERS;
### Stack ###########################################################################################################
[0] from 0x08004472 in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:53
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004472 in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:53
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x9900 lma 0x80001c0
Loading section .rodata, size 0x490 lma 0x8009ac0
Loading section .ARM, size 0x8 lma 0x8009f50
Loading section .init_array, size 0x8 lma 0x8009f58
Loading section .fini_array, size 0x8 lma 0x8009f60
Loading section .data, size 0x9a8 lma 0x8009f68
Start address 0x08004554, load size 43232
Transfer rate: 29 KB/sec, 4803 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]
0x08004470 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:53
53 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
0x0800446c p_serial_mgr_service+0 ldr r3, [pc, #136] ; (0x80044f8 <p_serial_mgr_service+140>)
0x0800446e p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x08004470 p_serial_mgr_service+4 cmp r3, #1
0x08004472 p_serial_mgr_service+6 beq.n 0x8004476 <p_serial_mgr_service+10>
0x08004474 p_serial_mgr_service+8 bx lr
0x08004476 p_serial_mgr_service+10 push {r4, lr}
0x08004478 p_serial_mgr_service+12 sub sp, #16
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08004470 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
43 }
44 }
45
46 void p_serial_mgr_init(UART_HandleTypeDef *huart)
47 {
48 _serial_huart_inst = huart;
49 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
50 }
51 void p_serial_mgr_service(void)
52 {
53 if (sstate == SS_START)
54 {
55 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN - 2, 20);
56 for (int ind = 0; ind < 24; ind++)
57 {
58 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
59 }
60 PDEBUG("\n\n");
61 sstate = SS_IDLE;
62 // active_buffer = (active_buffer + 1) % NUM_BUFFERS;
### Stack ###########################################################################################################
[0] from 0x08004470 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:53
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004470 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 0x9900 lma 0x80001c0
Loading section .rodata, size 0x490 lma 0x8009ac0
Loading section .ARM, size 0x8 lma 0x8009f50
Loading section .init_array, size 0x8 lma 0x8009f58
Loading section .fini_array, size 0x8 lma 0x8009f60
Loading section .data, size 0x9a8 lma 0x8009f68
Start address 0x08004554, load size 43232
Transfer rate: 29 KB/sec, 4803 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=0x0) at shared/drivers/p_serial_mgr.c:50
50 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
### Assembly ########################################################################################################
~
~
~
0x0800446c p_serial_mgr_init+0 ldr r3, [pc, #136] ; (0x80044f8 <p_serial_mgr_service+120>)
0x0800446e p_serial_mgr_init+2 ldrb r3, [r3, #0]
0x08004470 p_serial_mgr_init+4 cmp r3, #1
0x08004472 p_serial_mgr_init+6 beq.n 0x8004476 <p_serial_mgr_init+10>
0x08004474 p_serial_mgr_init+8 bx lr
0x08004476 p_serial_mgr_init+10 push {r4, lr}
0x08004478 p_serial_mgr_init+12 sub sp, #16
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08004470 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
40 else
41 {
42 PDEBUG("0x%02x\n", sbuffer[active_buffer][0]);
43 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
44 }
45 }
46
47 void p_serial_mgr_init(UART_HandleTypeDef *huart)
48 {
49 _serial_huart_inst = huart;
50 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
51 }
52 void p_serial_mgr_service(void)
53 {
54 if (sstate == SS_START)
55 {
56 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN - 2, 20);
57 for (int ind = 0; ind < 24; ind++)
58 {
59 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
### Stack ###########################################################################################################
[0] from 0x08004470 in p_serial_mgr_init+4 at shared/drivers/p_serial_mgr.c:50
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004470 in p_serial_mgr_init+4 at shared/drivers/p_serial_mgr.c:50
### Variables #######################################################################################################
arg huart = 0x0: {Instance = 0x20010000,Init = {BaudRate = 134235477,WordLength = 134223173,StopBits = …
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x9910 lma 0x80001c0
Loading section .rodata, size 0x498 lma 0x8009ad0
Loading section .ARM, size 0x8 lma 0x8009f68
Loading section .init_array, size 0x8 lma 0x8009f70
Loading section .fini_array, size 0x8 lma 0x8009f78
Loading section .data, size 0x9a8 lma 0x8009f80
Start address 0x08004568, load size 43256
Transfer rate: 29 KB/sec, 4806 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:141
141 p_serial_mgr_service();
### Assembly ########################################################################################################
0x08001516 main+110 mov r0, r4
0x08001518 main+112 bl 0x8004280 <HAL_UART_Receive_IT>
0x0800151c main+116 ldr r0, [pc, #32] ; (0x8001540 <main+152>)
0x0800151e main+118 bl 0x80019d8 <HAL_TIM_Base_Start_IT>
0x08001522 main+122 bl 0x8004528 <p_serial_mgr_service+160>
0x08001526 main+126 bl 0x8004480 <p_serial_mgr_start+44>
0x0800152a main+130 b.n 0x8001526 <main+126>
0x0800152c main+132 lsrs r4, r3, #13
0x0800152e main+134 movs r0, #0
0x08001530 main+136 asrs r1, r5, #5
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08001526 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
149 // serial_pkt_t *pkt = NULL;
150 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x08001526 in main+126 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08001526 in main+126 at Core/Src/main.c:141
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x98f0 lma 0x80001c0
Loading section .rodata, size 0x490 lma 0x8009ab0
Loading section .ARM, size 0x8 lma 0x8009f40
Loading section .init_array, size 0x8 lma 0x8009f48
Loading section .fini_array, size 0x8 lma 0x8009f50
Loading section .data, size 0x9a8 lma 0x8009f58
Start address 0x08004548, load size 43216
Transfer rate: 29 KB/sec, 4801 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]
0x08004492 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:54
54 if (sstate == SS_START)
### Assembly ########################################################################################################
0x08004488 p_serial_mgr_service+0 push {r4, lr}
0x0800448a p_serial_mgr_service+2 sub sp, #16
0x0800448c p_serial_mgr_service+4 ldr r3, [pc, #144] ; (0x8004520 <p_serial_mgr_service+152>)
0x0800448e p_serial_mgr_service+6 ldrb r3, [r3, #0]
0x08004490 p_serial_mgr_service+8 cmp r3, #1
0x08004492 p_serial_mgr_service+10 beq.n 0x800449c <p_serial_mgr_service+20>
0x08004494 p_serial_mgr_service+12 cmp r3, #2
0x08004496 p_serial_mgr_service+14 beq.n 0x8004518 <p_serial_mgr_service+144>
0x08004498 p_serial_mgr_service+16 add sp, #16
0x0800449a p_serial_mgr_service+18 pop {r4, pc}
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08004492 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000ffd8 msp 0x2000ffd8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
44 }
45 }
46
47 void p_serial_mgr_init(UART_HandleTypeDef *huart)
48 {
49 _serial_huart_inst = huart;
50 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
51 }
52 void p_serial_mgr_service(void)
53 {
54 if (sstate == SS_START)
55 {
56 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN - 2, 20);
57 for (int ind = 0; ind < 24; ind++)
58 {
59 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
60 }
61 PDEBUG("\n\n");
62 sstate = SS_IDLE;
63 // active_buffer = (active_buffer + 1) % NUM_BUFFERS;
### Stack ###########################################################################################################
[0] from 0x08004492 in p_serial_mgr_service+10 at shared/drivers/p_serial_mgr.c:54
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004492 in p_serial_mgr_service+10 at shared/drivers/p_serial_mgr.c:54
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x98f0 lma 0x80001c0
Loading section .rodata, size 0x490 lma 0x8009ab0
Loading section .ARM, size 0x8 lma 0x8009f40
Loading section .init_array, size 0x8 lma 0x8009f48
Loading section .fini_array, size 0x8 lma 0x8009f50
Loading section .data, size 0x9a8 lma 0x8009f58
Start address 0x08004548, load size 43216
Transfer rate: 29 KB/sec, 4801 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]
0x0800449a in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:73
73 }
### Assembly ########################################################################################################
0x08004490 p_serial_mgr_service+8 cmp r3, #1
0x08004492 p_serial_mgr_service+10 beq.n 0x800449c <p_serial_mgr_service+20>
0x08004494 p_serial_mgr_service+12 cmp r3, #2
0x08004496 p_serial_mgr_service+14 beq.n 0x8004518 <p_serial_mgr_service+144>
0x08004498 p_serial_mgr_service+16 add sp, #16
0x0800449a p_serial_mgr_service+18 pop {r4, pc}
0x0800449c p_serial_mgr_service+20 ldr r3, [pc, #132] ; (0x8004524 <p_serial_mgr_service+156>)
0x0800449e p_serial_mgr_service+22 ldrb r3, [r3, #0]
0x080044a0 p_serial_mgr_service+24 add.w r3, r3, r3, lsl #7
0x080044a4 p_serial_mgr_service+28 lsls r1, r3, #2
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x0800449a primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000ffe8 msp 0x2000ffe8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
63 // active_buffer = (active_buffer + 1) % NUM_BUFFERS;
64 uint8_t sendbuffer[9] = {0x7E, DEVICE_ADDR, MASTER_ADDR, 4, 0x01, 0x02, 0x03, 0x04, 0xFF};
65 HAL_UART_Transmit(_serial_huart_inst, sendbuffer, 9, 10);
66 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
67 }
68 else if (sstate == SS_ERR)
69 {
70 PDEBUG("MISSED BYTE 0x%02x\n", sbuffer[active_buffer][0]);
71 p_serial_mgr_start();
72 }
73 }
74
75 void p_serial_mgr_start()
76 {
77 sstate = SS_IDLE;
78 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
79 }
~
~
~
### Stack ###########################################################################################################
[0] from 0x0800449a in p_serial_mgr_service+18 at shared/drivers/p_serial_mgr.c:73
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x0800449a in p_serial_mgr_service+18 at shared/drivers/p_serial_mgr.c:73
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x9908 lma 0x80001c0
Loading section .rodata, size 0x4a8 lma 0x8009ac8
Loading section .ARM, size 0x8 lma 0x8009f70
Loading section .init_array, size 0x8 lma 0x8009f78
Loading section .fini_array, size 0x8 lma 0x8009f80
Loading section .data, size 0x9a8 lma 0x8009f88
Start address 0x08004560, load size 43264
Transfer rate: 29 KB/sec, 4807 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]
0x08004498 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:73
73 }
### Assembly ########################################################################################################
0x0800448e p_serial_mgr_service+6 ldrb r3, [r3, #0]
0x08004490 p_serial_mgr_service+8 cmp r3, #1
0x08004492 p_serial_mgr_service+10 beq.n 0x800449c <p_serial_mgr_service+20>
0x08004494 p_serial_mgr_service+12 cmp r3, #2
0x08004496 p_serial_mgr_service+14 beq.n 0x8004518 <p_serial_mgr_service+144>
0x08004498 p_serial_mgr_service+16 add sp, #16
0x0800449a p_serial_mgr_service+18 pop {r4, pc}
0x0800449c p_serial_mgr_service+20 ldr r3, [pc, #152] ; (0x8004538 <p_serial_mgr_service+176>)
0x0800449e p_serial_mgr_service+22 ldrb r3, [r3, #0]
0x080044a0 p_serial_mgr_service+24 add.w r3, r3, r3, lsl #7
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08004498 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000ffd8 msp 0x2000ffd8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
63 // active_buffer = (active_buffer + 1) % NUM_BUFFERS;
64 uint8_t sendbuffer[9] = {0x7E, DEVICE_ADDR, MASTER_ADDR, 4, 0x01, 0x02, 0x03, 0x04, 0xFF};
65 HAL_UART_Transmit(_serial_huart_inst, sendbuffer, 9, 10);
66 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
67 }
68 else if (sstate == SS_ERR)
69 {
70 PDEBUG("MISSED BYTE 0x%02x\n", sbuffer[active_buffer][0]);
71 p_serial_mgr_start();
72 }
73 }
74
75 void p_serial_mgr_start()
76 {
77 sstate = SS_IDLE;
78 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
79 }
~
~
~
### Stack ###########################################################################################################
[0] from 0x08004498 in p_serial_mgr_service+16 at shared/drivers/p_serial_mgr.c:73
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004498 in p_serial_mgr_service+16 at shared/drivers/p_serial_mgr.c:73
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x9908 lma 0x80001c0
Loading section .rodata, size 0x4a8 lma 0x8009ac8
Loading section .ARM, size 0x8 lma 0x8009f70
Loading section .init_array, size 0x8 lma 0x8009f78
Loading section .fini_array, size 0x8 lma 0x8009f80
Loading section .data, size 0x9a8 lma 0x8009f88
Start address 0x08004560, load size 43264
Transfer rate: 29 KB/sec, 4807 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]
0x0800448e in p_serial_mgr_start () at shared/drivers/p_serial_mgr.c:83
83 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
### Assembly ########################################################################################################
0x08004484 p_serial_mgr_start+4 lsrs r0, r4, #16
0x08004486 p_serial_mgr_start+6 movs r0, #0
0x08004488 p_serial_mgr_start+8 push {r4, lr}
0x0800448a p_serial_mgr_start+10 sub sp, #16
0x0800448c p_serial_mgr_start+12 ldr r3, [pc, #164] ; (0x8004534 <p_serial_mgr_service+128>)
0x0800448e p_serial_mgr_start+14 ldrb r3, [r3, #0]
0x08004490 p_serial_mgr_start+16 cmp r3, #1
0x08004492 p_serial_mgr_start+18 beq.n 0x800449c <p_serial_mgr_start+28>
0x08004494 p_serial_mgr_start+20 cmp r3, #2
0x08004496 p_serial_mgr_start+22 beq.n 0x8004518 <p_serial_mgr_service+100>
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x0800448e primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x20002050 r8 0x00000000 sp 0x2000ffd8 msp 0x2000ffd8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
73 {
74 PDEBUG("MISSED BYTE 0x%02x\n", sbuffer[active_buffer][0]);
75 p_serial_mgr_flush();
76 p_serial_mgr_start();
77 }
78 }
79
80 void p_serial_mgr_start()
81 {
82 sstate = SS_IDLE;
83 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
84 }
~
~
~
~
~
~
~
~
### Stack ###########################################################################################################
[0] from 0x0800448e in p_serial_mgr_start+14 at shared/drivers/p_serial_mgr.c:83
[1] from 0x0401027e
### Threads #########################################################################################################
[1] id 0 from 0x0800448e in p_serial_mgr_start+14 at shared/drivers/p_serial_mgr.c:83
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x9938 lma 0x80001c0
Loading section .rodata, size 0x4a8 lma 0x8009af8
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 0x08004590, 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]
main () at Core/Src/main.c:141
141 p_serial_mgr_service();
### Assembly ########################################################################################################
0x08001516 main+110 mov r0, r4
0x08001518 main+112 bl 0x8004280 <HAL_UART_Receive_IT>
0x0800151c main+116 ldr r0, [pc, #32] ; (0x8001540 <main+152>)
0x0800151e main+118 bl 0x80019d8 <HAL_TIM_Base_Start_IT>
0x08001522 main+122 bl 0x8004480 <p_serial_mgr_start>
0x08001526 main+126 bl 0x80044b4 <p_serial_mgr_service>
0x0800152a main+130 b.n 0x8001526 <main+126>
0x0800152c main+132 lsrs r4, r3, #13
0x0800152e main+134 movs r0, #0
0x08001530 main+136 asrs r1, r5, #5
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08001526 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
149 // serial_pkt_t *pkt = NULL;
150 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x08001526 in main+126 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08001526 in main+126 at Core/Src/main.c:141
### 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: 0x08004590 msp: 0x20010000
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x9938 lma 0x80001c0
Loading section .rodata, size 0x4a8 lma 0x8009af8
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 0x08004590, 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 #################################################################################################
Program received signal SIGINT, Interrupt.
0x080044c6 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:78
78 }
### Assembly ########################################################################################################
0x080044bc p_serial_mgr_service+8 cmp r3, #1
0x080044be p_serial_mgr_service+10 beq.n 0x80044c8 <p_serial_mgr_service+20>
0x080044c0 p_serial_mgr_service+12 cmp r3, #2
0x080044c2 p_serial_mgr_service+14 beq.n 0x8004544 <p_serial_mgr_service+144>
0x080044c4 p_serial_mgr_service+16 add sp, #16
0x080044c6 p_serial_mgr_service+18 pop {r4, pc}
0x080044c8 p_serial_mgr_service+20 ldr r3, [pc, #156] ; (0x8004568 <p_serial_mgr_service+180>)
0x080044ca p_serial_mgr_service+22 ldrb r3, [r3, #0]
0x080044cc p_serial_mgr_service+24 add.w r3, r3, r3, lsl #7
0x080044d0 p_serial_mgr_service+28 lsls r1, r3, #2
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x080044c6 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000ffe8 msp 0x2000ffe8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
68 uint8_t sendbuffer[9] = {0x7E, DEVICE_ADDR, MASTER_ADDR, 4, 0x01, 0x02, 0x03, 0x04, 0xFF};
69 HAL_UART_Transmit(_serial_huart_inst, sendbuffer, 9, 10);
70 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
71 }
72 else if (sstate == SS_ERR)
73 {
74 PDEBUG("MISSED BYTE 0x%02x\n", sbuffer[active_buffer][0]);
75 p_serial_mgr_flush();
76 p_serial_mgr_start();
77 }
78 }
79
80 void p_serial_mgr_start()
81 {
82 sstate = SS_IDLE;
83 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
84 }
~
~
~
### Stack ###########################################################################################################
[0] from 0x080044c6 in p_serial_mgr_service+18 at shared/drivers/p_serial_mgr.c:78
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080044c6 in p_serial_mgr_service+18 at shared/drivers/p_serial_mgr.c:78
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x0800152a
main () at Core/Src/main.c:139
139 while (1)
### Assembly ########################################################################################################
0x08001518 main+112 bl 0x8004280 <HAL_UART_Receive_IT>
0x0800151c main+116 ldr r0, [pc, #32] ; (0x8001540 <main+152>)
0x0800151e main+118 bl 0x80019d8 <HAL_TIM_Base_Start_IT>
0x08001522 main+122 bl 0x8004480 <p_serial_mgr_start>
0x08001526 main+126 bl 0x80044b4 <p_serial_mgr_service>
0x0800152a main+130 b.n 0x8001526 <main+126>
0x0800152c main+132 lsrs r4, r3, #13
0x0800152e main+134 movs r0, #0
0x08001530 main+136 asrs r1, r5, #5
0x08001532 main+138 lsrs r0, r0, #32
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x0800152a primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
129 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1);
130 HAL_TIM_Base_Start_IT(&htim6);
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
### Stack ###########################################################################################################
[0] from 0x0800152a in main+130 at Core/Src/main.c:139
### Threads #########################################################################################################
[1] id 0 from 0x0800152a in main+130 at Core/Src/main.c:139
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x08001526
141 p_serial_mgr_service();
### Assembly ########################################################################################################
0x08001516 main+110 mov r0, r4
0x08001518 main+112 bl 0x8004280 <HAL_UART_Receive_IT>
0x0800151c main+116 ldr r0, [pc, #32] ; (0x8001540 <main+152>)
0x0800151e main+118 bl 0x80019d8 <HAL_TIM_Base_Start_IT>
0x08001522 main+122 bl 0x8004480 <p_serial_mgr_start>
0x08001526 main+126 bl 0x80044b4 <p_serial_mgr_service>
0x0800152a main+130 b.n 0x8001526 <main+126>
0x0800152c main+132 lsrs r4, r3, #13
0x0800152e main+134 movs r0, #0
0x08001530 main+136 asrs r1, r5, #5
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08001526 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
149 // serial_pkt_t *pkt = NULL;
150 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x08001526 in main+126 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08001526 in main+126 at Core/Src/main.c:141
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080044b4
Note: automatically using hardware breakpoints for read-only addresses.
p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:58
58 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
0x080044b4 p_serial_mgr_service+0 push {r4, lr}
0x080044b6 p_serial_mgr_service+2 sub sp, #16
0x080044b8 p_serial_mgr_service+4 ldr r3, [pc, #168] ; (0x8004564 <p_serial_mgr_service+176>)
0x080044ba p_serial_mgr_service+6 ldrb r3, [r3, #0]
0x080044bc p_serial_mgr_service+8 cmp r3, #1
0x080044be p_serial_mgr_service+10 beq.n 0x80044c8 <p_serial_mgr_service+20>
0x080044c0 p_serial_mgr_service+12 cmp r3, #2
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x080044b8 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000ffd8 msp 0x2000ffd8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
48 }
49 }
50
51 void p_serial_mgr_init(UART_HandleTypeDef *huart)
52 {
53 _serial_huart_inst = huart;
54 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
55 }
56 void p_serial_mgr_service(void)
57 {
58 if (sstate == SS_START)
59 {
60 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN - 2, 20);
61 for (int ind = 0; ind < 24; ind++)
62 {
63 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
64 }
65 PDEBUG("\n\n");
66 sstate = SS_IDLE;
67 // active_buffer = (active_buffer + 1) % NUM_BUFFERS;
### Stack ###########################################################################################################
[0] from 0x080044b8 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:58
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080044b8 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:58
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080044ba
halted: PC: 0x080044bc
halted: PC: 0x080044be
halted: PC: 0x080044c0
72 else if (sstate == SS_ERR)
### Assembly ########################################################################################################
0x080044b6 p_serial_mgr_service+2 sub sp, #16
0x080044b8 p_serial_mgr_service+4 ldr r3, [pc, #168] ; (0x8004564 <p_serial_mgr_service+176>)
0x080044ba p_serial_mgr_service+6 ldrb r3, [r3, #0]
0x080044bc p_serial_mgr_service+8 cmp r3, #1
0x080044be p_serial_mgr_service+10 beq.n 0x80044c8 <p_serial_mgr_service+20>
0x080044c0 p_serial_mgr_service+12 cmp r3, #2
0x080044c2 p_serial_mgr_service+14 beq.n 0x8004544 <p_serial_mgr_service+144>
0x080044c4 p_serial_mgr_service+16 add sp, #16
0x080044c6 p_serial_mgr_service+18 pop {r4, pc}
0x080044c8 p_serial_mgr_service+20 ldr r3, [pc, #156] ; (0x8004568 <p_serial_mgr_service+180>)
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x080044c0 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000ffd8 msp 0x2000ffd8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
62 {
63 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
64 }
65 PDEBUG("\n\n");
66 sstate = SS_IDLE;
67 // active_buffer = (active_buffer + 1) % NUM_BUFFERS;
68 uint8_t sendbuffer[9] = {0x7E, DEVICE_ADDR, MASTER_ADDR, 4, 0x01, 0x02, 0x03, 0x04, 0xFF};
69 HAL_UART_Transmit(_serial_huart_inst, sendbuffer, 9, 10);
70 HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
71 }
72 else if (sstate == SS_ERR)
73 {
74 PDEBUG("MISSED BYTE 0x%02x\n", sbuffer[active_buffer][0]);
75 p_serial_mgr_flush();
76 p_serial_mgr_start();
77 }
78 }
79
80 void p_serial_mgr_start()
81 {
### Stack ###########################################################################################################
[0] from 0x080044c0 in p_serial_mgr_service+12 at shared/drivers/p_serial_mgr.c:72
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080044c0 in p_serial_mgr_service+12 at shared/drivers/p_serial_mgr.c:72
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080044c2
halted: PC: 0x080044c4
halted: PC: 0x080044c6
halted: PC: 0x0800152a
main () at Core/Src/main.c:139
139 while (1)
### Assembly ########################################################################################################
0x08001518 main+112 bl 0x8004280 <HAL_UART_Receive_IT>
0x0800151c main+116 ldr r0, [pc, #32] ; (0x8001540 <main+152>)
0x0800151e main+118 bl 0x80019d8 <HAL_TIM_Base_Start_IT>
0x08001522 main+122 bl 0x8004480 <p_serial_mgr_start>
0x08001526 main+126 bl 0x80044b4 <p_serial_mgr_service>
0x0800152a main+130 b.n 0x8001526 <main+126>
0x0800152c main+132 lsrs r4, r3, #13
0x0800152e main+134 movs r0, #0
0x08001530 main+136 asrs r1, r5, #5
0x08001532 main+138 lsrs r0, r0, #32
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x0800152a primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
129 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1);
130 HAL_TIM_Base_Start_IT(&htim6);
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
### Stack ###########################################################################################################
[0] from 0x0800152a in main+130 at Core/Src/main.c:139
### Threads #########################################################################################################
[1] id 0 from 0x0800152a in main+130 at Core/Src/main.c:139
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x08001526
141 p_serial_mgr_service();
### Assembly ########################################################################################################
0x08001516 main+110 mov r0, r4
0x08001518 main+112 bl 0x8004280 <HAL_UART_Receive_IT>
0x0800151c main+116 ldr r0, [pc, #32] ; (0x8001540 <main+152>)
0x0800151e main+118 bl 0x80019d8 <HAL_TIM_Base_Start_IT>
0x08001522 main+122 bl 0x8004480 <p_serial_mgr_start>
0x08001526 main+126 bl 0x80044b4 <p_serial_mgr_service>
0x0800152a main+130 b.n 0x8001526 <main+126>
0x0800152c main+132 lsrs r4, r3, #13
0x0800152e main+134 movs r0, #0
0x08001530 main+136 asrs r1, r5, #5
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08001526 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
149 // serial_pkt_t *pkt = NULL;
150 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x08001526 in main+126 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08001526 in main+126 at Core/Src/main.c:141
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080044b4
p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:58
58 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
0x080044b4 p_serial_mgr_service+0 push {r4, lr}
0x080044b6 p_serial_mgr_service+2 sub sp, #16
0x080044b8 p_serial_mgr_service+4 ldr r3, [pc, #168] ; (0x8004564 <p_serial_mgr_service+176>)
0x080044ba p_serial_mgr_service+6 ldrb r3, [r3, #0]
0x080044bc p_serial_mgr_service+8 cmp r3, #1
0x080044be p_serial_mgr_service+10 beq.n 0x80044c8 <p_serial_mgr_service+20>
0x080044c0 p_serial_mgr_service+12 cmp r3, #2
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x080044b8 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000ffd8 msp 0x2000ffd8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
48 }
49 }
50
51 void p_serial_mgr_init(UART_HandleTypeDef *huart)
52 {
53 _serial_huart_inst = huart;
54 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
55 }
56 void p_serial_mgr_service(void)
57 {
58 if (sstate == SS_START)
59 {
60 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN - 2, 20);
61 for (int ind = 0; ind < 24; ind++)
62 {
63 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
64 }
65 PDEBUG("\n\n");
66 sstate = SS_IDLE;
67 // active_buffer = (active_buffer + 1) % NUM_BUFFERS;
### Stack ###########################################################################################################
[0] from 0x080044b8 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:58
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080044b8 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:58
### Variables #######################################################################################################
#####################################################################################################################
$1 = SS_IDLE
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:58
58 {
### Assembly ########################################################################################################
~
~
~
~
~
0x080044b8 p_serial_mgr_service+0 ldr r3, [pc, #168] ; (0x8004564 <p_serial_mgr_service+172>)
0x080044ba p_serial_mgr_service+2 ldrb r3, [r3, #0]
0x080044bc p_serial_mgr_service+4 cmp r3, #1
0x080044be p_serial_mgr_service+6 beq.n 0x80044c8 <p_serial_mgr_service+16>
0x080044c0 p_serial_mgr_service+8 cmp r3, #2
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x080044b8 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000ffd8 msp 0x2000ffd8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
48 sstate = SS_ERR;
49 }
50 }
51
52 void p_serial_mgr_init(UART_HandleTypeDef *huart)
53 {
54 _serial_huart_inst = huart;
55 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
56 }
57 void p_serial_mgr_service(void)
58 {
59 if (sstate == SS_START)
60 {
61 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN - 2, 20);
62 for (int ind = 0; ind < 24; ind++)
63 {
64 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
65 }
66 PDEBUG("\n\n");
67 sstate = SS_IDLE;
### Stack ###########################################################################################################
[0] from 0x080044b8 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:58
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080044b8 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:58
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x9940 lma 0x80001c0
Loading section .rodata, size 0x4a8 lma 0x8009b00
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 0x08004594, 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]
main () at Core/Src/main.c:141
141 p_serial_mgr_service();
### Assembly ########################################################################################################
0x08001516 main+110 mov r0, r4
0x08001518 main+112 bl 0x8004280 <HAL_UART_Receive_IT>
0x0800151c main+116 ldr r0, [pc, #32] ; (0x8001540 <main+152>)
0x0800151e main+118 bl 0x80019d8 <HAL_TIM_Base_Start_IT>
0x08001522 main+122 bl 0x8004480 <p_serial_mgr_start>
0x08001526 main+126 bl 0x80044b8 <p_serial_mgr_start+56>
0x0800152a main+130 b.n 0x8001526 <main+126>
0x0800152c main+132 lsrs r4, r3, #13
0x0800152e main+134 movs r0, #0
0x08001530 main+136 asrs r1, r5, #5
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08001526 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
149 // serial_pkt_t *pkt = NULL;
150 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x08001526 in main+126 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08001526 in main+126 at Core/Src/main.c:141
### 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: 0x08004594 msp: 0x20010000
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x9928 lma 0x80001c0
Loading section .rodata, size 0x4a8 lma 0x8009ae8
Loading section .ARM, size 0x8 lma 0x8009f90
Loading section .init_array, size 0x8 lma 0x8009f98
Loading section .fini_array, size 0x8 lma 0x8009fa0
Loading section .data, size 0x9a8 lma 0x8009fa8
Start address 0x08004580, load size 43296
Transfer rate: 29 KB/sec, 4810 bytes/write.
Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf
### Output/messages #################################################################################################
Program received signal SIGINT, Interrupt.
0x080044ce in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:78
78 }
### Assembly ########################################################################################################
0x080044c4 p_serial_mgr_service+8 cmp r3, #1
0x080044c6 p_serial_mgr_service+10 beq.n 0x80044d0 <p_serial_mgr_service+20>
0x080044c8 p_serial_mgr_service+12 cmp r3, #2
0x080044ca p_serial_mgr_service+14 beq.n 0x8004534 <p_serial_mgr_service+120>
0x080044cc p_serial_mgr_service+16 add sp, #16
0x080044ce p_serial_mgr_service+18 pop {r4, pc}
0x080044d0 p_serial_mgr_service+20 ldr r3, [pc, #132] ; (0x8004558 <p_serial_mgr_service+156>)
0x080044d2 p_serial_mgr_service+22 ldrb r3, [r3, #0]
0x080044d4 p_serial_mgr_service+24 add.w r3, r3, r3, lsl #7
0x080044d8 p_serial_mgr_service+28 lsls r1, r3, #2
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x080044ce primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000ffe8 msp 0x2000ffe8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
68 uint8_t sendbuffer[9] = {0x7E, DEVICE_ADDR, MASTER_ADDR, 4, 0x01, 0x02, 0x03, 0x04, 0xFF};
69 HAL_UART_Transmit(_serial_huart_inst, sendbuffer, 9, 10);
70 p_serial_mgr_start();
71 }
72 else if (sstate == SS_ERR)
73 {
74 PDEBUG("MISSED BYTE 0x%02x\n", sbuffer[active_buffer][0]);
75 p_serial_mgr_flush();
76 p_serial_mgr_start();
77 }
78 }
79
80 void p_serial_mgr_start()
81 {
82 sstate = SS_IDLE;
83 volatile HAL_StatusTypeDef ret = HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
84 }
~
~
~
### Stack ###########################################################################################################
[0] from 0x080044ce in p_serial_mgr_service+18 at shared/drivers/p_serial_mgr.c:78
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080044ce in p_serial_mgr_service+18 at shared/drivers/p_serial_mgr.c:78
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x0800152a
main () at Core/Src/main.c:139
139 while (1)
### Assembly ########################################################################################################
0x08001518 main+112 bl 0x8004280 <HAL_UART_Receive_IT>
0x0800151c main+116 ldr r0, [pc, #32] ; (0x8001540 <main+152>)
0x0800151e main+118 bl 0x80019d8 <HAL_TIM_Base_Start_IT>
0x08001522 main+122 bl 0x8004480 <p_serial_mgr_start>
0x08001526 main+126 bl 0x80044bc <p_serial_mgr_service>
0x0800152a main+130 b.n 0x8001526 <main+126>
0x0800152c main+132 lsrs r4, r3, #13
0x0800152e main+134 movs r0, #0
0x08001530 main+136 asrs r1, r5, #5
0x08001532 main+138 lsrs r0, r0, #32
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x0800152a primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
129 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1);
130 HAL_TIM_Base_Start_IT(&htim6);
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
### Stack ###########################################################################################################
[0] from 0x0800152a in main+130 at Core/Src/main.c:139
### Threads #########################################################################################################
[1] id 0 from 0x0800152a in main+130 at Core/Src/main.c:139
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x08001526
141 p_serial_mgr_service();
### Assembly ########################################################################################################
0x08001516 main+110 mov r0, r4
0x08001518 main+112 bl 0x8004280 <HAL_UART_Receive_IT>
0x0800151c main+116 ldr r0, [pc, #32] ; (0x8001540 <main+152>)
0x0800151e main+118 bl 0x80019d8 <HAL_TIM_Base_Start_IT>
0x08001522 main+122 bl 0x8004480 <p_serial_mgr_start>
0x08001526 main+126 bl 0x80044bc <p_serial_mgr_service>
0x0800152a main+130 b.n 0x8001526 <main+126>
0x0800152c main+132 lsrs r4, r3, #13
0x0800152e main+134 movs r0, #0
0x08001530 main+136 asrs r1, r5, #5
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08001526 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
149 // serial_pkt_t *pkt = NULL;
150 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x08001526 in main+126 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08001526 in main+126 at Core/Src/main.c:141
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080044bc
Note: automatically using hardware breakpoints for read-only addresses.
p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:59
59 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
0x080044bc p_serial_mgr_service+0 push {r4, lr}
0x080044be p_serial_mgr_service+2 sub sp, #16
0x080044c0 p_serial_mgr_service+4 ldr r3, [pc, #144] ; (0x8004554 <p_serial_mgr_service+152>)
0x080044c2 p_serial_mgr_service+6 ldrb r3, [r3, #0]
0x080044c4 p_serial_mgr_service+8 cmp r3, #1
0x080044c6 p_serial_mgr_service+10 beq.n 0x80044d0 <p_serial_mgr_service+20>
0x080044c8 p_serial_mgr_service+12 cmp r3, #2
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x080044c0 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000ffd8 msp 0x2000ffd8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
49 }
50 }
51
52 void p_serial_mgr_init(UART_HandleTypeDef *huart)
53 {
54 _serial_huart_inst = huart;
55 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
56 }
57 void p_serial_mgr_service(void)
58 {
59 if (sstate == SS_START)
60 {
61 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN - 2, 20);
62 for (int ind = 0; ind < 24; ind++)
63 {
64 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
65 }
66 PDEBUG("\n\n");
67 // active_buffer = (active_buffer + 1) % NUM_BUFFERS;
68 uint8_t sendbuffer[9] = {0x7E, DEVICE_ADDR, MASTER_ADDR, 4, 0x01, 0x02, 0x03, 0x04, 0xFF};
### Stack ###########################################################################################################
[0] from 0x080044c0 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:59
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080044c0 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:59
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080044c2
halted: PC: 0x080044c4
halted: PC: 0x080044c6
halted: PC: 0x080044c8
72 else if (sstate == SS_ERR)
### Assembly ########################################################################################################
0x080044be p_serial_mgr_service+2 sub sp, #16
0x080044c0 p_serial_mgr_service+4 ldr r3, [pc, #144] ; (0x8004554 <p_serial_mgr_service+152>)
0x080044c2 p_serial_mgr_service+6 ldrb r3, [r3, #0]
0x080044c4 p_serial_mgr_service+8 cmp r3, #1
0x080044c6 p_serial_mgr_service+10 beq.n 0x80044d0 <p_serial_mgr_service+20>
0x080044c8 p_serial_mgr_service+12 cmp r3, #2
0x080044ca p_serial_mgr_service+14 beq.n 0x8004534 <p_serial_mgr_service+120>
0x080044cc p_serial_mgr_service+16 add sp, #16
0x080044ce p_serial_mgr_service+18 pop {r4, pc}
0x080044d0 p_serial_mgr_service+20 ldr r3, [pc, #132] ; (0x8004558 <p_serial_mgr_service+156>)
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x080044c8 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000ffd8 msp 0x2000ffd8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
62 for (int ind = 0; ind < 24; ind++)
63 {
64 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
65 }
66 PDEBUG("\n\n");
67 // active_buffer = (active_buffer + 1) % NUM_BUFFERS;
68 uint8_t sendbuffer[9] = {0x7E, DEVICE_ADDR, MASTER_ADDR, 4, 0x01, 0x02, 0x03, 0x04, 0xFF};
69 HAL_UART_Transmit(_serial_huart_inst, sendbuffer, 9, 10);
70 p_serial_mgr_start();
71 }
72 else if (sstate == SS_ERR)
73 {
74 PDEBUG("MISSED BYTE 0x%02x\n", sbuffer[active_buffer][0]);
75 p_serial_mgr_flush();
76 p_serial_mgr_start();
77 }
78 }
79
80 void p_serial_mgr_start()
81 {
### Stack ###########################################################################################################
[0] from 0x080044c8 in p_serial_mgr_service+12 at shared/drivers/p_serial_mgr.c:72
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080044c8 in p_serial_mgr_service+12 at shared/drivers/p_serial_mgr.c:72
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080044ca
halted: PC: 0x080044cc
halted: PC: 0x080044ce
halted: PC: 0x0800152a
main () at Core/Src/main.c:139
139 while (1)
### Assembly ########################################################################################################
0x08001518 main+112 bl 0x8004280 <HAL_UART_Receive_IT>
0x0800151c main+116 ldr r0, [pc, #32] ; (0x8001540 <main+152>)
0x0800151e main+118 bl 0x80019d8 <HAL_TIM_Base_Start_IT>
0x08001522 main+122 bl 0x8004480 <p_serial_mgr_start>
0x08001526 main+126 bl 0x80044bc <p_serial_mgr_service>
0x0800152a main+130 b.n 0x8001526 <main+126>
0x0800152c main+132 lsrs r4, r3, #13
0x0800152e main+134 movs r0, #0
0x08001530 main+136 asrs r1, r5, #5
0x08001532 main+138 lsrs r0, r0, #32
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x0800152a primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
129 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1);
130 HAL_TIM_Base_Start_IT(&htim6);
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
### Stack ###########################################################################################################
[0] from 0x0800152a in main+130 at Core/Src/main.c:139
### Threads #########################################################################################################
[1] id 0 from 0x0800152a in main+130 at Core/Src/main.c:139
### Variables #######################################################################################################
#####################################################################################################################
Quit
### Output/messages #################################################################################################
halted: PC: 0x08001526
141 p_serial_mgr_service();
### Assembly ########################################################################################################
0x08001516 main+110 mov r0, r4
0x08001518 main+112 bl 0x8004280 <HAL_UART_Receive_IT>
0x0800151c main+116 ldr r0, [pc, #32] ; (0x8001540 <main+152>)
0x0800151e main+118 bl 0x80019d8 <HAL_TIM_Base_Start_IT>
0x08001522 main+122 bl 0x8004480 <p_serial_mgr_start>
0x08001526 main+126 bl 0x80044bc <p_serial_mgr_service>
0x0800152a main+130 b.n 0x8001526 <main+126>
0x0800152c main+132 lsrs r4, r3, #13
0x0800152e main+134 movs r0, #0
0x08001530 main+136 asrs r1, r5, #5
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08001526 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
149 // serial_pkt_t *pkt = NULL;
150 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x08001526 in main+126 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08001526 in main+126 at Core/Src/main.c:141
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x080044bc
p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:59
59 if (sstate == SS_START)
### Assembly ########################################################################################################
~
~
~
0x080044bc p_serial_mgr_service+0 push {r4, lr}
0x080044be p_serial_mgr_service+2 sub sp, #16
0x080044c0 p_serial_mgr_service+4 ldr r3, [pc, #144] ; (0x8004554 <p_serial_mgr_service+152>)
0x080044c2 p_serial_mgr_service+6 ldrb r3, [r3, #0]
0x080044c4 p_serial_mgr_service+8 cmp r3, #1
0x080044c6 p_serial_mgr_service+10 beq.n 0x80044d0 <p_serial_mgr_service+20>
0x080044c8 p_serial_mgr_service+12 cmp r3, #2
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x080044c0 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000ffd8 msp 0x2000ffd8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
49 }
50 }
51
52 void p_serial_mgr_init(UART_HandleTypeDef *huart)
53 {
54 _serial_huart_inst = huart;
55 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
56 }
57 void p_serial_mgr_service(void)
58 {
59 if (sstate == SS_START)
60 {
61 HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN - 2, 20);
62 for (int ind = 0; ind < 24; ind++)
63 {
64 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
65 }
66 PDEBUG("\n\n");
67 // active_buffer = (active_buffer + 1) % NUM_BUFFERS;
68 uint8_t sendbuffer[9] = {0x7E, DEVICE_ADDR, MASTER_ADDR, 4, 0x01, 0x02, 0x03, 0x04, 0xFF};
### Stack ###########################################################################################################
[0] from 0x080044c0 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:59
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080044c0 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:59
### Variables #######################################################################################################
#####################################################################################################################
No symbol "p_serial_mgr" in current context.
Breakpoint 1 at 0x800440c: file shared/drivers/p_serial_mgr.c, line 41.
Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf
### Output/messages #################################################################################################
Breakpoint 1, UART1_RxCpltCallback (huart=0x20000aa8 <huart1>) at shared/drivers/p_serial_mgr.c:41
41 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
### Assembly ########################################################################################################
~
~
~
~
~
!0x0800440c UART1_RxCpltCallback+0 ldr r3, [pc, #36] ; (0x8004434 <UART1_RxCpltCallback+40>)
0x0800440e UART1_RxCpltCallback+2 ldrb r3, [r3, #0]
0x08004410 UART1_RxCpltCallback+4 cbnz r3, 0x8004424 <UART1_RxCpltCallback+24>
0x08004412 UART1_RxCpltCallback+6 ldr r3, [pc, #36] ; (0x8004438 <UART1_RxCpltCallback+44>)
0x08004414 UART1_RxCpltCallback+8 ldrb r3, [r3, #0]
### Breakpoints #####################################################################################################
[1] break at 0x0800440c in shared/drivers/p_serial_mgr.c:41 for p_serial_mgr.c:41 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x00000002 r10 0x00000000 pc 0x0800440c primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x0800440d r8 0x00000000 sp 0x2000ff68 msp 0x2000ff68 control 0x00
r4 0x20000aa8 r9 0x00000000 lr 0x08003683 psp 0x00000000
### Source ##########################################################################################################
31
32 static uint8_t rxc = '\0';
33 static serial_state_t sstate = SS_IDLE;
34
35 static void p_serial_mgr_flush()
36 {
37 HAL_UART_Receive(_serial_huart_inst, sbuffer[active_buffer], MAX_MESSAGE_LEN, 10);
38 }
39 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
40 {
!41 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
42 {
43 sstate = SS_START;
44 return;
45 }
46 else
47 {
48 sstate = SS_ERR;
49 }
50 }
### Stack ###########################################################################################################
[0] from 0x0800440c in UART1_RxCpltCallback+0 at shared/drivers/p_serial_mgr.c:41
[1] from 0x08003682 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x0800387e in HAL_UART_IRQHandler+278 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2427
[3] from 0x08001574 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:226
[4] from 0xffffffe9
[5] from 0x080044bc in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:58
[6] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x0800440c in UART1_RxCpltCallback+0 at shared/drivers/p_serial_mgr.c:41
### Variables #######################################################################################################
arg huart = 0x20000aa8 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
#####################################################################################################################
$1 = 0x0
Continuing.
### Output/messages #################################################################################################
halted: PC: 0x0800440e
Breakpoint 1, UART1_RxCpltCallback (huart=0x20000aa8 <huart1>) at shared/drivers/p_serial_mgr.c:41
41 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
### Assembly ########################################################################################################
~
~
~
~
~
!0x0800440c UART1_RxCpltCallback+0 ldr r3, [pc, #36] ; (0x8004434 <UART1_RxCpltCallback+40>)
0x0800440e UART1_RxCpltCallback+2 ldrb r3, [r3, #0]
0x08004410 UART1_RxCpltCallback+4 cbnz r3, 0x8004424 <UART1_RxCpltCallback+24>
0x08004412 UART1_RxCpltCallback+6 ldr r3, [pc, #36] ; (0x8004438 <UART1_RxCpltCallback+44>)
0x08004414 UART1_RxCpltCallback+8 ldrb r3, [r3, #0]
### Breakpoints #####################################################################################################
[1] break at 0x0800440c in shared/drivers/p_serial_mgr.c:41 for p_serial_mgr.c:41 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
$$0 = 0 '\000'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000aa8 r5 0x00000002 r10 0x00000000 pc 0x0800440c primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000035 basepri 0x00
r2 0x40013808 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x0800440d r8 0x00000000 sp 0x2000ff68 msp 0x2000ff68 control 0x00
r4 0x20000aa8 r9 0x00000000 lr 0x08003683 psp 0x00000000
### Source ##########################################################################################################
31
32 static uint8_t rxc = '\0';
33 static serial_state_t sstate = SS_IDLE;
34
35 static void p_serial_mgr_flush()
36 {
37 HAL_UART_Receive(_serial_huart_inst, sbuffer[active_buffer], MAX_MESSAGE_LEN, 10);
38 }
39 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
40 {
!41 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
42 {
43 sstate = SS_START;
44 return;
45 }
46 else
47 {
48 sstate = SS_ERR;
49 }
50 }
### Stack ###########################################################################################################
[0] from 0x0800440c in UART1_RxCpltCallback+0 at shared/drivers/p_serial_mgr.c:41
[1] from 0x08003682 in UART_RxISR_8BIT+130 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x0800387e in HAL_UART_IRQHandler+278 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2427
[3] from 0x08001574 in USART1_IRQHandler+8 at Core/Src/stm32l4xx_it.c:226
[4] from 0xffffffe9
[5] from 0x0800152a in main+130 at Core/Src/main.c:139
### Threads #########################################################################################################
[1] id 0 from 0x0800440c in UART1_RxCpltCallback+0 at shared/drivers/p_serial_mgr.c:41
### Variables #######################################################################################################
arg huart = 0x20000aa8 <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
#####################################################################################################################
Continuing.
### Output/messages #################################################################################################
halted: PC: 0x0800440e
Program received signal SIGINT, Interrupt.
0x080044ce in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:78
78 }
### Assembly ########################################################################################################
0x080044c4 p_serial_mgr_service+8 cmp r3, #1
0x080044c6 p_serial_mgr_service+10 beq.n 0x80044d0 <p_serial_mgr_service+20>
0x080044c8 p_serial_mgr_service+12 cmp r3, #2
0x080044ca p_serial_mgr_service+14 beq.n 0x8004534 <p_serial_mgr_service+120>
0x080044cc p_serial_mgr_service+16 add sp, #16
0x080044ce p_serial_mgr_service+18 pop {r4, pc}
0x080044d0 p_serial_mgr_service+20 ldr r3, [pc, #132] ; (0x8004558 <p_serial_mgr_service+156>)
0x080044d2 p_serial_mgr_service+22 ldrb r3, [r3, #0]
0x080044d4 p_serial_mgr_service+24 add.w r3, r3, r3, lsl #7
0x080044d8 p_serial_mgr_service+28 lsls r1, r3, #2
### Breakpoints #####################################################################################################
[1] break at 0x0800440c in shared/drivers/p_serial_mgr.c:41 for p_serial_mgr.c:41 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
$$0 = 0 '\000'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x080044ce primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000ffe8 msp 0x2000ffe8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
68 uint8_t sendbuffer[9] = {0x7E, DEVICE_ADDR, MASTER_ADDR, 4, 0x01, 0x02, 0x03, 0x04, 0xFF};
69 HAL_UART_Transmit(_serial_huart_inst, sendbuffer, 9, 10);
70 p_serial_mgr_start();
71 }
72 else if (sstate == SS_ERR)
73 {
74 PDEBUG("MISSED BYTE 0x%02x\n", sbuffer[active_buffer][0]);
75 p_serial_mgr_flush();
76 p_serial_mgr_start();
77 }
78 }
79
80 void p_serial_mgr_start()
81 {
82 sstate = SS_IDLE;
83 volatile HAL_StatusTypeDef ret = HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
84 }
~
~
~
### Stack ###########################################################################################################
[0] from 0x080044ce in p_serial_mgr_service+18 at shared/drivers/p_serial_mgr.c:78
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080044ce in p_serial_mgr_service+18 at shared/drivers/p_serial_mgr.c:78
### Variables #######################################################################################################
#####################################################################################################################
Quit
Breakpoint 2 at 0x8004534: file shared/drivers/p_serial_mgr.c, line 74.
Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf
### Output/messages #################################################################################################
Breakpoint 2, p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:74
74 PDEBUG("MISSED BYTE 0x%02x\n", sbuffer[active_buffer][0]);
### Assembly ########################################################################################################
0x08004526 p_serial_mgr_service+106 ldr r0, [pc, #56] ; (0x8004560 <p_serial_mgr_service+164>)
0x08004528 p_serial_mgr_service+108 ldr r0, [r0, #0]
0x0800452a p_serial_mgr_service+110 bl 0x8003eba <HAL_UART_Transmit>
0x0800452e p_serial_mgr_service+114 bl 0x8004480 <p_serial_mgr_start>
0x08004532 p_serial_mgr_service+118 b.n 0x80044cc <p_serial_mgr_service+16>
!0x08004534 p_serial_mgr_service+120 ldr r3, [pc, #32] ; (0x8004558 <p_serial_mgr_service+156>)
0x08004536 p_serial_mgr_service+122 ldrb r3, [r3, #0]
0x08004538 p_serial_mgr_service+124 add.w r3, r3, r3, lsl #7
0x0800453c p_serial_mgr_service+128 lsls r2, r3, #2
0x0800453e p_serial_mgr_service+130 ldr r3, [pc, #28] ; (0x800455c <p_serial_mgr_service+160>)
### Breakpoints #####################################################################################################
[2] break at 0x08004534 in shared/drivers/p_serial_mgr.c:74 for p_serial_mgr.c:73 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$0 = 0 '\000'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08004534 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x00000002 r8 0x00000000 sp 0x2000ffd8 msp 0x2000ffd8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
64 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
65 }
66 PDEBUG("\n\n");
67 // active_buffer = (active_buffer + 1) % NUM_BUFFERS;
68 uint8_t sendbuffer[9] = {0x7E, DEVICE_ADDR, MASTER_ADDR, 4, 0x01, 0x02, 0x03, 0x04, 0xFF};
69 HAL_UART_Transmit(_serial_huart_inst, sendbuffer, 9, 10);
70 p_serial_mgr_start();
71 }
72 else if (sstate == SS_ERR)
73 {
!74 PDEBUG("MISSED BYTE 0x%02x\n", sbuffer[active_buffer][0]);
75 p_serial_mgr_flush();
76 p_serial_mgr_start();
77 }
78 }
79
80 void p_serial_mgr_start()
81 {
82 sstate = SS_IDLE;
83 volatile HAL_StatusTypeDef ret = HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
### Stack ###########################################################################################################
[0] from 0x08004534 in p_serial_mgr_service+120 at shared/drivers/p_serial_mgr.c:74
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004534 in p_serial_mgr_service+120 at shared/drivers/p_serial_mgr.c:74
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x08004536
halted: PC: 0x08004538
halted: PC: 0x0800453c
halted: PC: 0x0800453e
halted: PC: 0x08004540
halted: PC: 0x08004542
halted: PC: 0x08004544
halted: PC: 0x08004390
75 p_serial_mgr_flush();
### Assembly ########################################################################################################
0x0800453c p_serial_mgr_service+128 lsls r2, r3, #2
0x0800453e p_serial_mgr_service+130 ldr r3, [pc, #28] ; (0x800455c <p_serial_mgr_service+160>)
0x08004540 p_serial_mgr_service+132 ldrb r1, [r3, r2]
0x08004542 p_serial_mgr_service+134 ldr r0, [pc, #44] ; (0x8004570 <p_serial_mgr_service+180>)
0x08004544 p_serial_mgr_service+136 bl 0x8004390 <p_printf>
0x08004548 p_serial_mgr_service+140 bl 0x8004440 <p_serial_mgr_flush>
0x0800454c p_serial_mgr_service+144 bl 0x8004480 <p_serial_mgr_start>
0x08004550 p_serial_mgr_service+148 b.n 0x80044cc <p_serial_mgr_service+16>
0x08004552 p_serial_mgr_service+150 nop
0x08004554 p_serial_mgr_service+152 movs r0, #80 ; 0x50
### Breakpoints #####################################################################################################
[2] break at 0x08004534 in shared/drivers/p_serial_mgr.c:74 for p_serial_mgr.c:73 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
$$0 = 0 '\000'
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08004548 primask 0x00
r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x006000d0 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000020 r8 0x00000000 sp 0x2000ffd8 msp 0x2000ffd8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x08004549 psp 0x00000000
### Source ##########################################################################################################
65 }
66 PDEBUG("\n\n");
67 // active_buffer = (active_buffer + 1) % NUM_BUFFERS;
68 uint8_t sendbuffer[9] = {0x7E, DEVICE_ADDR, MASTER_ADDR, 4, 0x01, 0x02, 0x03, 0x04, 0xFF};
69 HAL_UART_Transmit(_serial_huart_inst, sendbuffer, 9, 10);
70 p_serial_mgr_start();
71 }
72 else if (sstate == SS_ERR)
73 {
!74 PDEBUG("MISSED BYTE 0x%02x\n", sbuffer[active_buffer][0]);
75 p_serial_mgr_flush();
76 p_serial_mgr_start();
77 }
78 }
79
80 void p_serial_mgr_start()
81 {
82 sstate = SS_IDLE;
83 volatile HAL_StatusTypeDef ret = HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
84 }
### Stack ###########################################################################################################
[0] from 0x08004548 in p_serial_mgr_service+140 at shared/drivers/p_serial_mgr.c:75
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004548 in p_serial_mgr_service+140 at shared/drivers/p_serial_mgr.c:75
### Variables #######################################################################################################
#####################################################################################################################
Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target
[Inferior 1 (Remote target) detached]
0x08004548 in mc_init (tim=0x0) at shared/devices/motor_controller.c:10
10 }
### Assembly ########################################################################################################
~
~
~
~
0x08004544 mc_init+0 bl 0x8004390 <p_printf>
0x08004548 mc_init+4 bl 0x8004440 <p_serial_mgr_init>
0x0800454c mc_init+8 bl 0x8004480 <p_serial_mgr_start+44>
~
~
~
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08004548 primask 0x00
r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x006000d0 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000020 r8 0x00000000 sp 0x2000ffd8 msp 0x2000ffd8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x08004549 psp 0x00000000
### Source ##########################################################################################################
~
1 #include "motor_controller.h"
2 #include "putil.h"
3 #include "stm32l4xx_hal_tim.h"
4 #include <math.h>
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 0x08004548 in mc_init+4 at shared/devices/motor_controller.c:10
### Threads #########################################################################################################
[1] id 0 from 0x08004548 in mc_init+4 at shared/devices/motor_controller.c:10
### Variables #######################################################################################################
arg tim = 0x0: {Instance = 0x20010000,Init = {Prescaler = 134235521,CounterMode = 134223173,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: 0x08004580 msp: 0x20010000
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x98f8 lma 0x80001c0
Loading section .rodata, size 0x4a8 lma 0x8009ab8
Loading section .ARM, size 0x8 lma 0x8009f60
Loading section .init_array, size 0x8 lma 0x8009f68
Loading section .fini_array, size 0x8 lma 0x8009f70
Loading section .data, size 0x9a8 lma 0x8009f78
Start address 0x08004550, load size 43248
Transfer rate: 29 KB/sec, 4805 bytes/write.
Breakpoint 1 at 0x8004508: file shared/drivers/p_serial_mgr.c, line 73.
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_serial_mgr_service () at shared/drivers/p_serial_mgr.c:73
73 PDEBUG("MISSED BYTE 0x%02x\n", sbuffer[active_buffer][0]);
### Assembly ########################################################################################################
0x080044fa p_serial_mgr_service+106 ldr r0, [pc, #52] ; (0x8004530 <p_serial_mgr_service+160>)
0x080044fc p_serial_mgr_service+108 ldr r0, [r0, #0]
0x080044fe p_serial_mgr_service+110 bl 0x8003eba <HAL_UART_Transmit>
0x08004502 p_serial_mgr_service+114 bl 0x8004454 <p_serial_mgr_start>
0x08004506 p_serial_mgr_service+118 b.n 0x80044a0 <p_serial_mgr_service+16>
!0x08004508 p_serial_mgr_service+120 ldr r3, [pc, #28] ; (0x8004528 <p_serial_mgr_service+152>)
0x0800450a p_serial_mgr_service+122 ldrb r3, [r3, #0]
0x0800450c p_serial_mgr_service+124 add.w r3, r3, r3, lsl #7
0x08004510 p_serial_mgr_service+128 lsls r2, r3, #2
0x08004512 p_serial_mgr_service+130 ldr r3, [pc, #24] ; (0x800452c <p_serial_mgr_service+156>)
### Breakpoints #####################################################################################################
[1] break at 0x08004508 in shared/drivers/p_serial_mgr.c:73 for p_serial_mgr.c:73 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08004508 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0x00001000 fpscr 0x00000010 faultmask 0x00
r3 0x00000002 r8 0x00000000 sp 0x2000ffd8 msp 0x2000ffd8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
63 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
64 }
65 PDEBUG("\n\n");
66 // active_buffer = (active_buffer + 1) % NUM_BUFFERS;
67 uint8_t sendbuffer[9] = {0x7E, DEVICE_ADDR, MASTER_ADDR, 4, 0x01, 0x02, 0x03, 0x04, 0xFF};
68 HAL_UART_Transmit(_serial_huart_inst, sendbuffer, 9, 10);
69 p_serial_mgr_start();
70 }
71 else if (sstate == SS_ERR)
72 {
!73 PDEBUG("MISSED BYTE 0x%02x\n", sbuffer[active_buffer][0]);
74 p_serial_mgr_start();
75 }
76 }
77
78 void p_serial_mgr_start()
79 {
80 sstate = SS_IDLE;
81 volatile HAL_StatusTypeDef ret = HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
82 }
### Stack ###########################################################################################################
[0] from 0x08004508 in p_serial_mgr_service+120 at shared/drivers/p_serial_mgr.c:73
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004508 in p_serial_mgr_service+120 at shared/drivers/p_serial_mgr.c:73
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x0800450a
halted: PC: 0x0800450c
halted: PC: 0x08004510
halted: PC: 0x08004512
halted: PC: 0x08004514
halted: PC: 0x08004516
halted: PC: 0x08004518
halted: PC: 0x08004390
74 p_serial_mgr_start();
### Assembly ########################################################################################################
0x08004510 p_serial_mgr_service+128 lsls r2, r3, #2
0x08004512 p_serial_mgr_service+130 ldr r3, [pc, #24] ; (0x800452c <p_serial_mgr_service+156>)
0x08004514 p_serial_mgr_service+132 ldrb r1, [r3, r2]
0x08004516 p_serial_mgr_service+134 ldr r0, [pc, #40] ; (0x8004540 <p_serial_mgr_service+176>)
0x08004518 p_serial_mgr_service+136 bl 0x8004390 <p_printf>
0x0800451c p_serial_mgr_service+140 bl 0x8004454 <p_serial_mgr_start>
0x08004520 p_serial_mgr_service+144 b.n 0x80044a0 <p_serial_mgr_service+16>
0x08004522 p_serial_mgr_service+146 nop
0x08004524 p_serial_mgr_service+148 movs r0, #80 ; 0x50
0x08004526 p_serial_mgr_service+150 movs r0, #0
### Breakpoints #####################################################################################################
[1] break at 0x08004508 in shared/drivers/p_serial_mgr.c:73 for p_serial_mgr.c:73 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x0800451c primask 0x00
r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x006000d0 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000020 r8 0x00000000 sp 0x2000ffd8 msp 0x2000ffd8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800451d psp 0x00000000
### Source ##########################################################################################################
64 }
65 PDEBUG("\n\n");
66 // active_buffer = (active_buffer + 1) % NUM_BUFFERS;
67 uint8_t sendbuffer[9] = {0x7E, DEVICE_ADDR, MASTER_ADDR, 4, 0x01, 0x02, 0x03, 0x04, 0xFF};
68 HAL_UART_Transmit(_serial_huart_inst, sendbuffer, 9, 10);
69 p_serial_mgr_start();
70 }
71 else if (sstate == SS_ERR)
72 {
!73 PDEBUG("MISSED BYTE 0x%02x\n", sbuffer[active_buffer][0]);
74 p_serial_mgr_start();
75 }
76 }
77
78 void p_serial_mgr_start()
79 {
80 sstate = SS_IDLE;
81 volatile HAL_StatusTypeDef ret = HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
82 }
~
### Stack ###########################################################################################################
[0] from 0x0800451c in p_serial_mgr_service+140 at shared/drivers/p_serial_mgr.c:74
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x0800451c in p_serial_mgr_service+140 at shared/drivers/p_serial_mgr.c:74
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x08004454
halted: PC: 0x080044a0
halted: PC: 0x080044a2
halted: PC: 0x0800152a
main () at Core/Src/main.c:139
139 while (1)
### Assembly ########################################################################################################
0x08001518 main+112 bl 0x8004280 <HAL_UART_Receive_IT>
0x0800151c main+116 ldr r0, [pc, #32] ; (0x8001540 <main+152>)
0x0800151e main+118 bl 0x80019d8 <HAL_TIM_Base_Start_IT>
0x08001522 main+122 bl 0x8004454 <p_serial_mgr_start>
0x08001526 main+126 bl 0x8004490 <p_serial_mgr_service>
0x0800152a main+130 b.n 0x8001526 <main+126>
0x0800152c main+132 lsrs r4, r3, #13
0x0800152e main+134 movs r0, #0
0x08001530 main+136 asrs r1, r5, #5
0x08001532 main+138 lsrs r0, r0, #32
### Breakpoints #####################################################################################################
[1] break at 0x08004508 in shared/drivers/p_serial_mgr.c:73 for p_serial_mgr.c:73 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x0800152a primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x20000c20 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x080042c5 psp 0x00000000
### Source ##########################################################################################################
129 HAL_UART_Receive_IT(&huart2, &huart2_rxc, 1);
130 HAL_TIM_Base_Start_IT(&htim6);
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
### Stack ###########################################################################################################
[0] from 0x0800152a in main+130 at Core/Src/main.c:139
### Threads #########################################################################################################
[1] id 0 from 0x0800152a in main+130 at Core/Src/main.c:139
### Variables #######################################################################################################
#####################################################################################################################
Continuing.
### Output/messages #################################################################################################
Breakpoint 1, p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:73
73 PDEBUG("MISSED BYTE 0x%02x\n", sbuffer[active_buffer][0]);
### Assembly ########################################################################################################
0x080044fa p_serial_mgr_service+106 ldr r0, [pc, #52] ; (0x8004530 <p_serial_mgr_service+160>)
0x080044fc p_serial_mgr_service+108 ldr r0, [r0, #0]
0x080044fe p_serial_mgr_service+110 bl 0x8003eba <HAL_UART_Transmit>
0x08004502 p_serial_mgr_service+114 bl 0x8004454 <p_serial_mgr_start>
0x08004506 p_serial_mgr_service+118 b.n 0x80044a0 <p_serial_mgr_service+16>
!0x08004508 p_serial_mgr_service+120 ldr r3, [pc, #28] ; (0x8004528 <p_serial_mgr_service+152>)
0x0800450a p_serial_mgr_service+122 ldrb r3, [r3, #0]
0x0800450c p_serial_mgr_service+124 add.w r3, r3, r3, lsl #7
0x08004510 p_serial_mgr_service+128 lsls r2, r3, #2
0x08004512 p_serial_mgr_service+130 ldr r3, [pc, #24] ; (0x800452c <p_serial_mgr_service+156>)
### Breakpoints #####################################################################################################
[1] break at 0x08004508 in shared/drivers/p_serial_mgr.c:73 for p_serial_mgr.c:73 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08004508 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x61000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000002 r8 0x00000000 sp 0x2000ffd8 msp 0x2000ffd8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
63 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
64 }
65 PDEBUG("\n\n");
66 // active_buffer = (active_buffer + 1) % NUM_BUFFERS;
67 uint8_t sendbuffer[9] = {0x7E, DEVICE_ADDR, MASTER_ADDR, 4, 0x01, 0x02, 0x03, 0x04, 0xFF};
68 HAL_UART_Transmit(_serial_huart_inst, sendbuffer, 9, 10);
69 p_serial_mgr_start();
70 }
71 else if (sstate == SS_ERR)
72 {
!73 PDEBUG("MISSED BYTE 0x%02x\n", sbuffer[active_buffer][0]);
74 p_serial_mgr_start();
75 }
76 }
77
78 void p_serial_mgr_start()
79 {
80 sstate = SS_IDLE;
81 volatile HAL_StatusTypeDef ret = HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
82 }
### Stack ###########################################################################################################
[0] from 0x08004508 in p_serial_mgr_service+120 at shared/drivers/p_serial_mgr.c:73
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004508 in p_serial_mgr_service+120 at shared/drivers/p_serial_mgr.c:73
### Variables #######################################################################################################
#####################################################################################################################
### Output/messages ############################################################################################################################################################################################################################
halted: PC: 0x0800450a
halted: PC: 0x0800450c
halted: PC: 0x08004510
halted: PC: 0x08004512
halted: PC: 0x08004514
halted: PC: 0x08004516
halted: PC: 0x08004518
halted: PC: 0x08004390
74 p_serial_mgr_start();
### Assembly ###################################################################################################################################################################################################################################
0x08004510 p_serial_mgr_service+128 lsls r2, r3, #2
0x08004512 p_serial_mgr_service+130 ldr r3, [pc, #24] ; (0x800452c <p_serial_mgr_service+156>)
0x08004514 p_serial_mgr_service+132 ldrb r1, [r3, r2]
0x08004516 p_serial_mgr_service+134 ldr r0, [pc, #40] ; (0x8004540 <p_serial_mgr_service+176>)
0x08004518 p_serial_mgr_service+136 bl 0x8004390 <p_printf>
0x0800451c p_serial_mgr_service+140 bl 0x8004454 <p_serial_mgr_start>
0x08004520 p_serial_mgr_service+144 b.n 0x80044a0 <p_serial_mgr_service+16>
0x08004522 p_serial_mgr_service+146 nop
0x08004524 p_serial_mgr_service+148 movs r0, #80 ; 0x50
0x08004526 p_serial_mgr_service+150 movs r0, #0
### Breakpoints ################################################################################################################################################################################################################################
[1] break at 0x08004508 in shared/drivers/p_serial_mgr.c:73 for p_serial_mgr.c:73 hit 2 times
### Expressions ################################################################################################################################################################################################################################
### History ####################################################################################################################################################################################################################################
### Memory #####################################################################################################################################################################################################################################
### Registers ##################################################################################################################################################################################################################################
r0 0x00000000 r3 0x00000020 r6 0x00000000 r9 0x00000000 r12 0xffffffff pc 0x0800451c msp 0x2000ffd8 basepri 0x00
r1 0x00000040 r4 0x20000b5c r7 0x00000000 r10 0x00000000 sp 0x2000ffd8 xPSR 0x61000000 psp 0x00000000 faultmask 0x00
r2 0x006000d0 r5 0x20000a10 r8 0x00000000 r11 0x00000000 lr 0x0800451d fpscr 0x00000010 primask 0x00 control 0x04
### Source #####################################################################################################################################################################################################################################
64 }
65 PDEBUG("\n\n");
66 // active_buffer = (active_buffer + 1) % NUM_BUFFERS;
67 uint8_t sendbuffer[9] = {0x7E, DEVICE_ADDR, MASTER_ADDR, 4, 0x01, 0x02, 0x03, 0x04, 0xFF};
68 HAL_UART_Transmit(_serial_huart_inst, sendbuffer, 9, 10);
69 p_serial_mgr_start();
70 }
71 else if (sstate == SS_ERR)
72 {
!73 PDEBUG("MISSED BYTE 0x%02x\n", sbuffer[active_buffer][0]);
74 p_serial_mgr_start();
75 }
76 }
77
78 void p_serial_mgr_start()
79 {
80 sstate = SS_IDLE;
81 volatile HAL_StatusTypeDef ret = HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
82 }
~
### Stack ######################################################################################################################################################################################################################################
[0] from 0x0800451c in p_serial_mgr_service+140 at shared/drivers/p_serial_mgr.c:74
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads ####################################################################################################################################################################################################################################
[1] id 0 from 0x0800451c in p_serial_mgr_service+140 at shared/drivers/p_serial_mgr.c:74
### Variables ##################################################################################################################################################################################################################################
################################################################################################################################################################################################################################################
Continuing.
### Output/messages #################################################################################################
Program received signal SIGINT, Interrupt.
0x08004492 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:57
57 {
### Assembly ########################################################################################################
~
~
~
~
0x08004490 p_serial_mgr_service+0 push {r4, lr}
0x08004492 p_serial_mgr_service+2 sub sp, #16
0x08004494 p_serial_mgr_service+4 ldr r3, [pc, #140] ; (0x8004524 <p_serial_mgr_service+148>)
0x08004496 p_serial_mgr_service+6 ldrb r3, [r3, #0]
0x08004498 p_serial_mgr_service+8 cmp r3, #1
0x0800449a p_serial_mgr_service+10 beq.n 0x80044a4 <p_serial_mgr_service+20>
### Breakpoints #####################################################################################################
[1] break at 0x08004508 in shared/drivers/p_serial_mgr.c:73 for p_serial_mgr.c:73 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08004492 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000ffe8 msp 0x2000ffe8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
47 sstate = SS_ERR;
48 }
49 }
50
51 void p_serial_mgr_init(UART_HandleTypeDef *huart)
52 {
53 _serial_huart_inst = huart;
54 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
55 }
56 void p_serial_mgr_service(void)
57 {
58 if (sstate == SS_START)
59 {
60 while (HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN - 2, 20) != HAL_OK) {}
61 for (int ind = 0; ind < 24; ind++)
62 {
63 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
64 }
65 PDEBUG("\n\n");
66 // active_buffer = (active_buffer + 1) % NUM_BUFFERS;
### Stack ###########################################################################################################
[0] from 0x08004492 in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:57
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004492 in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:57
### Variables #######################################################################################################
#####################################################################################################################
Detaching from program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf, Remote target
[Inferior 1 (Remote target) detached]
0x08004492 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:57
57 {
### Assembly ########################################################################################################
~
~
~
~
0x08004490 p_serial_mgr_service+0 push {r4, lr}
0x08004492 p_serial_mgr_service+2 sub sp, #16
0x08004494 p_serial_mgr_service+4 ldr r3, [pc, #140] ; (0x8004524 <p_serial_mgr_service+148>)
0x08004496 p_serial_mgr_service+6 ldrb r3, [r3, #0]
0x08004498 p_serial_mgr_service+8 cmp r3, #1
0x0800449a p_serial_mgr_service+10 beq.n 0x80044a4 <p_serial_mgr_service+20>
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08004492 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000ffe8 msp 0x2000ffe8 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
47 sstate = SS_ERR;
48 }
49 }
50
51 void p_serial_mgr_init(UART_HandleTypeDef *huart)
52 {
53 _serial_huart_inst = huart;
54 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
55 }
56 void p_serial_mgr_service(void)
57 {
58 if (sstate == SS_START)
59 {
60 while (HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN - 2, 20) != HAL_OK) {}
61 for (int ind = 0; ind < 24; ind++)
62 {
63 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
64 }
65 PDEBUG("\n\n");
66 // active_buffer = (active_buffer + 1) % NUM_BUFFERS;
### Stack ###########################################################################################################
[0] from 0x08004492 in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:57
[1] from 0x0800152a in main+130 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08004492 in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:57
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x9900 lma 0x80001c0
Loading section .rodata, size 0x4a8 lma 0x8009ac0
Loading section .ARM, size 0x8 lma 0x8009f68
Loading section .init_array, size 0x8 lma 0x8009f70
Loading section .fini_array, size 0x8 lma 0x8009f78
Loading section .data, size 0x9a8 lma 0x8009f80
Start address 0x08004554, load size 43256
Transfer rate: 29 KB/sec, 4806 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:141
141 p_serial_mgr_service();
### Assembly ########################################################################################################
0x08001516 main+110 mov r0, r4
0x08001518 main+112 bl 0x8004280 <HAL_UART_Receive_IT>
0x0800151c main+116 ldr r0, [pc, #32] ; (0x8001540 <main+152>)
0x0800151e main+118 bl 0x80019d8 <HAL_TIM_Base_Start_IT>
0x08001522 main+122 bl 0x8004454 <p_serial_mgr_start>
0x08001526 main+126 bl 0x8004490 <p_serial_mgr_service>
0x0800152a main+130 b.n 0x8001526 <main+126>
0x0800152c main+132 lsrs r4, r3, #13
0x0800152e main+134 movs r0, #0
0x08001530 main+136 asrs r1, r5, #5
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08001526 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
149 // serial_pkt_t *pkt = NULL;
150 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x08001526 in main+126 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08001526 in main+126 at Core/Src/main.c:141
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x9930 lma 0x80001c0
Loading section .rodata, size 0x4a8 lma 0x8009af0
Loading section .ARM, size 0x8 lma 0x8009f98
Loading section .init_array, size 0x8 lma 0x8009fa0
Loading section .fini_array, size 0x8 lma 0x8009fa8
Loading section .data, size 0x9a8 lma 0x8009fb0
Start address 0x08004584, load size 43304
Transfer rate: 29 KB/sec, 4811 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:141
141 p_serial_mgr_service();
### Assembly ########################################################################################################
0x08001516 main+110 mov r0, r4
0x08001518 main+112 bl 0x8004280 <HAL_UART_Receive_IT>
0x0800151c main+116 ldr r0, [pc, #32] ; (0x8001540 <main+152>)
0x0800151e main+118 bl 0x80019d8 <HAL_TIM_Base_Start_IT>
0x08001522 main+122 bl 0x8004454 <p_serial_mgr_start>
0x08001526 main+126 bl 0x8004490 <p_serial_mgr_service>
0x0800152a main+130 b.n 0x8001526 <main+126>
0x0800152c main+132 lsrs r4, r3, #13
0x0800152e main+134 movs r0, #0
0x08001530 main+136 asrs r1, r5, #5
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x08001526 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fff0 msp 0x2000fff0 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
149 // serial_pkt_t *pkt = NULL;
150 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###########################################################################################################
[0] from 0x08001526 in main+126 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08001526 in main+126 at Core/Src/main.c:141
### Variables #######################################################################################################
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0x9920 lma 0x80001c0
Loading section .rodata, size 0x4a8 lma 0x8009ae0
Loading section .ARM, size 0x8 lma 0x8009f88
Loading section .init_array, size 0x8 lma 0x8009f90
Loading section .fini_array, size 0x8 lma 0x8009f98
Loading section .data, size 0x9a8 lma 0x8009fa0
Start address 0x08004578, load size 43288
Transfer rate: 29 KB/sec, 4809 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]
HAL_DMA_IRQHandler (hdma=0x8004579 <HAL_PWREx_ControlVoltageScaling+112>) at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c:874
874 hdma->State = HAL_DMA_STATE_READY;
### Assembly ########################################################################################################
0x08004498 HAL_DMA_IRQHandler+298 cmp r3, #1
0x0800449a HAL_DMA_IRQHandler+300 beq.n 0x80044a4 <HAL_DMA_IRQHandler+310>
0x0800449c HAL_DMA_IRQHandler+302 cmp r3, #2
0x0800449e HAL_DMA_IRQHandler+304 beq.n 0x800452c <HAL_PWREx_ControlVoltageScaling+36>
0x080044a0 HAL_DMA_IRQHandler+306 add sp, #20
0x080044a2 HAL_DMA_IRQHandler+308 pop {r4, r5, pc}
0x080044a4 HAL_DMA_IRQHandler+310 ldr r3, [pc, #164] ; (0x800454c <HAL_PWREx_ControlVoltageScaling+68>)
0x080044a6 HAL_DMA_IRQHandler+312 ldrb r1, [r3, #0]
0x080044a8 HAL_DMA_IRQHandler+314 add.w r1, r1, r1, lsl #7
0x080044ac HAL_DMA_IRQHandler+318 lsls r1, r1, #2
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x20000a10 r10 0x00000000 pc 0x080044a2 primask 0x00
r1 0x00000000 r6 0x00000000 r11 0x00000000 xPSR 0x81000000 basepri 0x00
r2 0x40013800 r7 0x00000000 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000ffe4 msp 0x2000ffe4 control 0x04
r4 0x20000b5c r9 0x00000000 lr 0x0800152b psp 0x00000000
### Source ##########################################################################################################
864 /* Disable ALL DMA IT */
865 __HAL_DMA_DISABLE_IT(hdma, (DMA_IT_TC | DMA_IT_HT | DMA_IT_TE));
866
867 /* Clear all flags */
868 hdma->DmaBaseAddress->IFCR = (DMA_ISR_GIF1 << (hdma->ChannelIndex & 0x1CU));
869
870 /* Update error code */
871 hdma->ErrorCode = HAL_DMA_ERROR_TE;
872
873 /* Change the DMA state */
874 hdma->State = HAL_DMA_STATE_READY;
875
876 /* Process Unlocked */
877 __HAL_UNLOCK(hdma);
878
879 if (hdma->XferErrorCallback != NULL)
880 {
881 /* Transfer error callback */
882 hdma->XferErrorCallback(hdma);
883 }
### Stack ###########################################################################################################
[0] from 0x080044a2 in HAL_DMA_IRQHandler+308 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c:874
[1] from 0x0800154a in MX_GPIO_Init+66 at Core/Src/main.c:417
[2] from 0x024802b4
### Threads #########################################################################################################
[1] id 0 from 0x080044a2 in HAL_DMA_IRQHandler+308 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_dma.c:874
### Variables #######################################################################################################
arg hdma = 0x8004579 <HAL_PWREx_ControlVoltageScaling+112>: {Instance = 0xffd034f8,Init = {Request = 2…
loc flag_it = 134223175, source_it = 134223173
#####################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0xb720 lma 0x80001c0
Loading section .rodata, size 0x480 lma 0x800b8e0
Loading section .ARM, size 0x8 lma 0x800bd60
Loading section .init_array, size 0x8 lma 0x800bd68
Loading section .fini_array, size 0x8 lma 0x800bd70
Loading section .data, size 0x9a8 lma 0x800bd78
Start address 0x08006470, load size 50928
Transfer rate: 31 KB/sec, 5658 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]
0x080063dc in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:77
77 }
### Assembly ########################################################################################################
0x080063ce p_serial_mgr_service+222 mov r1, r3
0x080063d0 p_serial_mgr_service+224 ldr r0, [pc, #48] ; (0x8006404 <p_serial_mgr_service+276>)
0x080063d2 p_serial_mgr_service+226 bl 0x80061c0 <p_printf>
0x080063d6 p_serial_mgr_service+230 bl 0x8006408 <p_serial_mgr_start>
0x080063da p_serial_mgr_service+234 nop
0x080063dc p_serial_mgr_service+236 adds r7, #16
0x080063de p_serial_mgr_service+238 mov sp, r7
0x080063e0 p_serial_mgr_service+240 pop {r7, pc}
0x080063e2 p_serial_mgr_service+242 nop
0x080063e4 p_serial_mgr_service+244 movs r0, #80 ; 0x50
### Breakpoints #####################################################################################################
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080063dc primask 0x00
r1 0x40013800 r6 0x00000000 r11 0x00000000 xPSR 0x81010000 basepri 0x00
r2 0x0000002d r7 0x2000ffd8 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000ffd8 msp 0x2000ffd8 control 0x04
r4 0x20002094 r9 0x00000000 lr 0x080011f1 psp 0x00000000
### Source ##########################################################################################################
67 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
68 uint8_t sendbuffer[9] = {0x7E, DEVICE_ADDR, MASTER_ADDR, 4, 0x01, 0x02, 0x03, 0x04, 0xFF};
69 // HAL_UART_Transmit(_serial_huart_inst, sendbuffer, 9, 10);
70 p_serial_mgr_start();
71 }
72 else if (sstate == SS_ERR)
73 {
74 PDEBUG("MISSED BYTE 0x%02x\n", sbuffer[active_buffer][0]);
75 p_serial_mgr_start();
76 }
77 }
78
79 void p_serial_mgr_start()
80 {
81 sstate = SS_IDLE;
82 volatile HAL_StatusTypeDef ret = HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
83 }
~
~
~
### Stack ###########################################################################################################
[0] from 0x080063dc in p_serial_mgr_service+236 at shared/drivers/p_serial_mgr.c:77
[1] from 0x080011f0 in main+136 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080063dc in p_serial_mgr_service+236 at shared/drivers/p_serial_mgr.c:77
### 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: 0x08006470 msp: 0x20010000
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0xb720 lma 0x80001c0
Loading section .rodata, size 0x480 lma 0x800b8e0
Loading section .ARM, size 0x8 lma 0x800bd60
Loading section .init_array, size 0x8 lma 0x800bd68
Loading section .fini_array, size 0x8 lma 0x800bd70
Loading section .data, size 0x9a8 lma 0x800bd78
Start address 0x08006470, load size 50928
Transfer rate: 31 KB/sec, 5658 bytes/write.
Breakpoint 1 at 0x8006414: file shared/drivers/p_serial_mgr.c, line 82.
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_serial_mgr_start () at shared/drivers/p_serial_mgr.c:82
82 volatile HAL_StatusTypeDef ret = HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
### Assembly ########################################################################################################
0x0800640a p_serial_mgr_start+2 sub sp, #8
0x0800640c p_serial_mgr_start+4 add r7, sp, #0
0x0800640e p_serial_mgr_start+6 ldr r3, [pc, #48] ; (0x8006440 <p_serial_mgr_start+56>)
0x08006410 p_serial_mgr_start+8 movs r2, #0
0x08006412 p_serial_mgr_start+10 strb r2, [r3, #0]
!0x08006414 p_serial_mgr_start+12 ldr r3, [pc, #44] ; (0x8006444 <p_serial_mgr_start+60>)
0x08006416 p_serial_mgr_start+14 ldr r0, [r3, #0]
0x08006418 p_serial_mgr_start+16 ldr r3, [pc, #44] ; (0x8006448 <p_serial_mgr_start+64>)
0x0800641a p_serial_mgr_start+18 ldrb r3, [r3, #0]
0x0800641c p_serial_mgr_start+20 mov r2, r3
### Breakpoints #####################################################################################################
[1] break at 0x08006414 in shared/drivers/p_serial_mgr.c:82 for p_serial_mgr.c:82 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x08006414 primask 0x00
r1 0x40004400 r6 0x00000000 r11 0x00000000 xPSR 0x41030000 basepri 0x00
r2 0x00000000 r7 0x2000ffe0 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x20002050 r8 0x00000000 sp 0x2000ffe0 msp 0x2000ffe0 control 0x04
r4 0x20002094 r9 0x00000000 lr 0x080011e9 psp 0x00000000
### Source ##########################################################################################################
72 else if (sstate == SS_ERR)
73 {
74 PDEBUG("MISSED BYTE 0x%02x\n", sbuffer[active_buffer][0]);
75 p_serial_mgr_start();
76 }
77 }
78
79 void p_serial_mgr_start()
80 {
81 sstate = SS_IDLE;
!82 volatile HAL_StatusTypeDef ret = HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
83 }
~
~
~
~
~
~
~
~
### Stack ###########################################################################################################
[0] from 0x08006414 in p_serial_mgr_start+12 at shared/drivers/p_serial_mgr.c:82
[1] from 0x080011e8 in main+128 at Core/Src/main.c:132
### Threads #########################################################################################################
[1] id 0 from 0x08006414 in p_serial_mgr_start+12 at shared/drivers/p_serial_mgr.c:82
### Variables #######################################################################################################
loc ret = 32
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x08006416
halted: PC: 0x08006418
halted: PC: 0x0800641a
halted: PC: 0x0800641c
halted: PC: 0x0800641e
halted: PC: 0x08006420
halted: PC: 0x08006422
halted: PC: 0x08006424
halted: PC: 0x08006426
halted: PC: 0x08006428
halted: PC: 0x0800642a
halted: PC: 0x0800642c
halted: PC: 0x0800642e
halted: PC: 0x08004b60
HAL_UART_Receive_IT (huart=0x20000a5c <huart1>, pData=0x20000c20 <sbuffer> "", Size=1) at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1418
1418 if (huart->RxState == HAL_UART_STATE_READY)
### Assembly ########################################################################################################
0x08004b64 HAL_UART_Receive_IT+4 add r7, sp, #0
0x08004b66 HAL_UART_Receive_IT+6 str r0, [r7, #12]
0x08004b68 HAL_UART_Receive_IT+8 str r1, [r7, #8]
0x08004b6a HAL_UART_Receive_IT+10 mov r3, r2
0x08004b6c HAL_UART_Receive_IT+12 strh r3, [r7, #6]
0x08004b6e HAL_UART_Receive_IT+14 ldr r3, [r7, #12]
0x08004b70 HAL_UART_Receive_IT+16 ldr r3, [r3, #124] ; 0x7c
0x08004b72 HAL_UART_Receive_IT+18 cmp r3, #32
0x08004b74 HAL_UART_Receive_IT+20 bne.n 0x8004bfc <HAL_UART_Receive_IT+156>
0x08004b76 HAL_UART_Receive_IT+22 ldr r3, [r7, #8]
### Breakpoints #####################################################################################################
[1] break at 0x08006414 in shared/drivers/p_serial_mgr.c:82 for p_serial_mgr.c:82 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000a5c r5 0x00000000 r10 0x00000000 pc 0x08004b6e primask 0x00
r1 0x20000c20 r6 0x00000000 r11 0x00000000 xPSR 0x01030000 basepri 0x00
r2 0x00000001 r7 0x2000ffb0 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000001 r8 0x00000000 sp 0x2000ffb0 msp 0x2000ffb0 control 0x04
r4 0x20002094 r9 0x00000000 lr 0x08006433 psp 0x00000000
### Source ##########################################################################################################
1408 * the received data is handled as a set of u16. In this case, Size must indicate the number
1409 * of u16 available through pData.
1410 * @param huart UART handle.
1411 * @param pData Pointer to data buffer (u8 or u16 data elements).
1412 * @param Size Amount of data elements (u8 or u16) to be received.
1413 * @retval HAL status
1414 */
1415 HAL_StatusTypeDef HAL_UART_Receive_IT(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size)
1416 {
1417 /* Check that a Rx process is not already ongoing */
1418 if (huart->RxState == HAL_UART_STATE_READY)
1419 {
1420 if ((pData == NULL) || (Size == 0U))
1421 {
1422 return HAL_ERROR;
1423 }
1424
1425 __HAL_LOCK(huart);
1426
1427 /* Set Reception type to Standard reception */
### Stack ###########################################################################################################
[0] from 0x08004b6e in HAL_UART_Receive_IT+14 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1418
[1] from 0x08006432 in p_serial_mgr_start+42 at shared/drivers/p_serial_mgr.c:82
[2] from 0x080011e8 in main+128 at Core/Src/main.c:132
### Threads #########################################################################################################
[1] id 0 from 0x08004b6e in HAL_UART_Receive_IT+14 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1418
### Variables #######################################################################################################
arg huart = 0x20000a5c <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…, pData = 0x20000c20 <sbuffer> "": 0 '\000', Size = 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 0xb720 lma 0x80001c0
Loading section .rodata, size 0x480 lma 0x800b8e0
Loading section .ARM, size 0x8 lma 0x800bd60
Loading section .init_array, size 0x8 lma 0x800bd68
Loading section .fini_array, size 0x8 lma 0x800bd70
Loading section .data, size 0x9a8 lma 0x800bd78
Start address 0x08006470, load size 50928
Transfer rate: 31 KB/sec, 5658 bytes/write.
Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf
### Output/messages #################################################################################################
Breakpoint 1, p_serial_mgr_start () at shared/drivers/p_serial_mgr.c:82
82 volatile HAL_StatusTypeDef ret = HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
### Assembly ########################################################################################################
0x0800640a p_serial_mgr_start+2 sub sp, #8
0x0800640c p_serial_mgr_start+4 add r7, sp, #0
0x0800640e p_serial_mgr_start+6 ldr r3, [pc, #48] ; (0x8006440 <p_serial_mgr_start+56>)
0x08006410 p_serial_mgr_start+8 movs r2, #0
0x08006412 p_serial_mgr_start+10 strb r2, [r3, #0]
!0x08006414 p_serial_mgr_start+12 ldr r3, [pc, #44] ; (0x8006444 <p_serial_mgr_start+60>)
0x08006416 p_serial_mgr_start+14 ldr r0, [r3, #0]
0x08006418 p_serial_mgr_start+16 ldr r3, [pc, #44] ; (0x8006448 <p_serial_mgr_start+64>)
0x0800641a p_serial_mgr_start+18 ldrb r3, [r3, #0]
0x0800641c p_serial_mgr_start+20 mov r2, r3
### Breakpoints #####################################################################################################
[1] break at 0x08006414 in shared/drivers/p_serial_mgr.c:82 for p_serial_mgr.c:82 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x08006414 primask 0x00
r1 0x40004400 r6 0x00000000 r11 0x00000000 xPSR 0x41030000 basepri 0x00
r2 0x00000000 r7 0x2000ffe0 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x20002050 r8 0x00000000 sp 0x2000ffe0 msp 0x2000ffe0 control 0x04
r4 0x20002094 r9 0x00000000 lr 0x080011e9 psp 0x00000000
### Source ##########################################################################################################
72 else if (sstate == SS_ERR)
73 {
74 PDEBUG("MISSED BYTE 0x%02x\n", sbuffer[active_buffer][0]);
75 p_serial_mgr_start();
76 }
77 }
78
79 void p_serial_mgr_start()
80 {
81 sstate = SS_IDLE;
!82 volatile HAL_StatusTypeDef ret = HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
83 asm volatile("nop");
84 }
~
~
~
~
~
~
~
### Stack ###########################################################################################################
[0] from 0x08006414 in p_serial_mgr_start+12 at shared/drivers/p_serial_mgr.c:82
[1] from 0x080011e8 in main+128 at Core/Src/main.c:132
### Threads #########################################################################################################
[1] id 0 from 0x08006414 in p_serial_mgr_start+12 at shared/drivers/p_serial_mgr.c:82
### Variables #######################################################################################################
loc ret = 32
#####################################################################################################################
### Output/messages #################################################################################################
halted: PC: 0x08006416
halted: PC: 0x08006418
halted: PC: 0x0800641a
halted: PC: 0x0800641c
halted: PC: 0x0800641e
halted: PC: 0x08006420
halted: PC: 0x08006422
halted: PC: 0x08006424
halted: PC: 0x08006426
halted: PC: 0x08006428
halted: PC: 0x0800642a
halted: PC: 0x0800642c
halted: PC: 0x0800642e
halted: PC: 0x08004b60
HAL_UART_Receive_IT (huart=0x20000a5c <huart1>, pData=0x20000c20 <sbuffer> "", Size=1) at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1418
1418 if (huart->RxState == HAL_UART_STATE_READY)
### Assembly ########################################################################################################
0x08004b64 HAL_UART_Receive_IT+4 add r7, sp, #0
0x08004b66 HAL_UART_Receive_IT+6 str r0, [r7, #12]
0x08004b68 HAL_UART_Receive_IT+8 str r1, [r7, #8]
0x08004b6a HAL_UART_Receive_IT+10 mov r3, r2
0x08004b6c HAL_UART_Receive_IT+12 strh r3, [r7, #6]
0x08004b6e HAL_UART_Receive_IT+14 ldr r3, [r7, #12]
0x08004b70 HAL_UART_Receive_IT+16 ldr r3, [r3, #124] ; 0x7c
0x08004b72 HAL_UART_Receive_IT+18 cmp r3, #32
0x08004b74 HAL_UART_Receive_IT+20 bne.n 0x8004bfc <HAL_UART_Receive_IT+156>
0x08004b76 HAL_UART_Receive_IT+22 ldr r3, [r7, #8]
### Breakpoints #####################################################################################################
[1] break at 0x08006414 in shared/drivers/p_serial_mgr.c:82 for p_serial_mgr.c:82 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x20000a5c r5 0x00000000 r10 0x00000000 pc 0x08004b6e primask 0x00
r1 0x20000c20 r6 0x00000000 r11 0x00000000 xPSR 0x01030000 basepri 0x00
r2 0x00000001 r7 0x2000ffb0 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000001 r8 0x00000000 sp 0x2000ffb0 msp 0x2000ffb0 control 0x04
r4 0x20002094 r9 0x00000000 lr 0x08006433 psp 0x00000000
### Source ##########################################################################################################
1408 * the received data is handled as a set of u16. In this case, Size must indicate the number
1409 * of u16 available through pData.
1410 * @param huart UART handle.
1411 * @param pData Pointer to data buffer (u8 or u16 data elements).
1412 * @param Size Amount of data elements (u8 or u16) to be received.
1413 * @retval HAL status
1414 */
1415 HAL_StatusTypeDef HAL_UART_Receive_IT(UART_HandleTypeDef *huart, uint8_t *pData, uint16_t Size)
1416 {
1417 /* Check that a Rx process is not already ongoing */
1418 if (huart->RxState == HAL_UART_STATE_READY)
1419 {
1420 if ((pData == NULL) || (Size == 0U))
1421 {
1422 return HAL_ERROR;
1423 }
1424
1425 __HAL_LOCK(huart);
1426
1427 /* Set Reception type to Standard reception */
### Stack ###########################################################################################################
[0] from 0x08004b6e in HAL_UART_Receive_IT+14 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1418
[1] from 0x08006432 in p_serial_mgr_start+42 at shared/drivers/p_serial_mgr.c:82
[2] from 0x080011e8 in main+128 at Core/Src/main.c:132
### Threads #########################################################################################################
[1] id 0 from 0x08004b6e in HAL_UART_Receive_IT+14 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1418
### Variables #######################################################################################################
arg huart = 0x20000a5c <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…, pData = 0x20000c20 <sbuffer> "": 0 '\000', Size = 1
#####################################################################################################################
Breakpoint 2 at 0x8006436: file shared/drivers/p_serial_mgr.c, line 83.
Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf
### Output/messages #################################################################################################
Breakpoint 2, p_serial_mgr_start () at shared/drivers/p_serial_mgr.c:83
83 asm volatile("nop");
### Assembly ########################################################################################################
0x0800642a p_serial_mgr_start+34 movs r2, #1
0x0800642c p_serial_mgr_start+36 mov r1, r3
0x0800642e p_serial_mgr_start+38 bl 0x8004b60 <HAL_UART_Receive_IT>
0x08006432 p_serial_mgr_start+42 mov r3, r0
0x08006434 p_serial_mgr_start+44 strb r3, [r7, #7]
!0x08006436 p_serial_mgr_start+46 nop
0x08006438 p_serial_mgr_start+48 nop
0x0800643a p_serial_mgr_start+50 adds r7, #8
0x0800643c p_serial_mgr_start+52 mov sp, r7
0x0800643e p_serial_mgr_start+54 pop {r7, pc}
### Breakpoints #####################################################################################################
[2] break at 0x08006436 in shared/drivers/p_serial_mgr.c:83 for p_serial_mgr.c:83 hit 1 time
### Expressions #####################################################################################################
### History #########################################################################################################
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x08006436 primask 0x00
r1 0x40013800 r6 0x00000000 r11 0x00000000 xPSR 0x01030000 basepri 0x00
r2 0x0000002d r7 0x2000ffe0 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000ffe0 msp 0x2000ffe0 control 0x04
r4 0x20002094 r9 0x00000000 lr 0x08004bf9 psp 0x00000000
### Source ##########################################################################################################
73 {
74 PDEBUG("MISSED BYTE 0x%02x\n", sbuffer[active_buffer][0]);
75 p_serial_mgr_start();
76 }
77 }
78
79 void p_serial_mgr_start()
80 {
81 sstate = SS_IDLE;
82 volatile HAL_StatusTypeDef ret = HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
!83 asm volatile("nop");
84 }
~
~
~
~
~
~
~
~
### Stack ###########################################################################################################
[0] from 0x08006436 in p_serial_mgr_start+46 at shared/drivers/p_serial_mgr.c:83
[1] from 0x080011e8 in main+128 at Core/Src/main.c:132
### Threads #########################################################################################################
[1] id 0 from 0x08006436 in p_serial_mgr_start+46 at shared/drivers/p_serial_mgr.c:83
### Variables #######################################################################################################
loc ret = HAL_OK
#####################################################################################################################
$1 = HAL_OK
Continuing.
### Output/messages #################################################################################################
halted: PC: 0x08006438
Breakpoint 2, p_serial_mgr_start () at shared/drivers/p_serial_mgr.c:83
83 asm volatile("nop");
### Assembly ########################################################################################################
0x0800642a p_serial_mgr_start+34 movs r2, #1
0x0800642c p_serial_mgr_start+36 mov r1, r3
0x0800642e p_serial_mgr_start+38 bl 0x8004b60 <HAL_UART_Receive_IT>
0x08006432 p_serial_mgr_start+42 mov r3, r0
0x08006434 p_serial_mgr_start+44 strb r3, [r7, #7]
!0x08006436 p_serial_mgr_start+46 nop
0x08006438 p_serial_mgr_start+48 nop
0x0800643a p_serial_mgr_start+50 adds r7, #8
0x0800643c p_serial_mgr_start+52 mov sp, r7
0x0800643e p_serial_mgr_start+54 pop {r7, pc}
### Breakpoints #####################################################################################################
[2] break at 0x08006436 in shared/drivers/p_serial_mgr.c:83 for p_serial_mgr.c:83 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
$$0 = HAL_OK
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x08006436 primask 0x00
r1 0x40013800 r6 0x00000000 r11 0x00000000 xPSR 0x01010000 basepri 0x00
r2 0x0000002d r7 0x2000ffc8 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000ffc8 msp 0x2000ffc8 control 0x04
r4 0x20002094 r9 0x00000000 lr 0x08004bf9 psp 0x00000000
### Source ##########################################################################################################
73 {
74 PDEBUG("MISSED BYTE 0x%02x\n", sbuffer[active_buffer][0]);
75 p_serial_mgr_start();
76 }
77 }
78
79 void p_serial_mgr_start()
80 {
81 sstate = SS_IDLE;
82 volatile HAL_StatusTypeDef ret = HAL_UART_Receive_IT(_serial_huart_inst, sbuffer[active_buffer], 1);
!83 asm volatile("nop");
84 }
~
~
~
~
~
~
~
~
### Stack ###########################################################################################################
[0] from 0x08006436 in p_serial_mgr_start+46 at shared/drivers/p_serial_mgr.c:83
[1] from 0x080063da in p_serial_mgr_service+234 at shared/drivers/p_serial_mgr.c:75
[2] from 0x080011f0 in main+136 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08006436 in p_serial_mgr_start+46 at shared/drivers/p_serial_mgr.c:83
### Variables #######################################################################################################
loc ret = HAL_OK
#####################################################################################################################
$2 = HAL_OK
Continuing.
### Output/messages #################################################################################################
halted: PC: 0x08006438
Program received signal SIGINT, Interrupt.
0x08002bb8 in HAL_GetTick () at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c:341
341 }
### Assembly ########################################################################################################
0x08002bac HAL_GetTick+4 ldr r3, [pc, #12] ; (0x8002bbc <HAL_GetTick+20>)
0x08002bae HAL_GetTick+6 ldr r3, [r3, #0]
0x08002bb0 HAL_GetTick+8 mov r0, r3
0x08002bb2 HAL_GetTick+10 mov sp, r7
0x08002bb4 HAL_GetTick+12 ldr.w r7, [sp], #4
0x08002bb8 HAL_GetTick+16 bx lr
0x08002bba HAL_GetTick+18 nop
0x08002bbc HAL_GetTick+20 lsrs r0, r3, #16
0x08002bbe HAL_GetTick+22 movs r0, #0
~
### Breakpoints #####################################################################################################
[2] break at 0x08006436 in shared/drivers/p_serial_mgr.c:83 for p_serial_mgr.c:83 hit 2 times
### Expressions #####################################################################################################
### History #########################################################################################################
$$1 = HAL_OK
$$0 = HAL_OK
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00007080 r5 0x00000000 r10 0x00000000 pc 0x08002bb8 primask 0x00
r1 0x00000020 r6 0x00000000 r11 0x00000000 xPSR 0x01010000 basepri 0x00
r2 0x00000000 r7 0x2000ff30 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00007080 r8 0x00000000 sp 0x2000ff30 msp 0x2000ff30 control 0x04
r4 0x20002094 r9 0x00000000 lr 0x0800597b 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 0x08002bb8 in HAL_GetTick+16 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c:341
[1] from 0x0800597a in UART_WaitOnFlagUntilTimeout+32 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3536
[2] from 0x08004ae6 in HAL_UART_Receive+298 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1286
[3] from 0x08006322 in p_serial_mgr_service+50 at shared/drivers/p_serial_mgr.c:60
[4] from 0x080011f0 in main+136 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x08002bb8 in HAL_GetTick+16 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c:341
### Variables #######################################################################################################
#####################################################################################################################
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 0xb720 lma 0x80001c0
Loading section .rodata, size 0x480 lma 0x800b8e0
Loading section .ARM, size 0x8 lma 0x800bd60
Loading section .init_array, size 0x8 lma 0x800bd68
Loading section .fini_array, size 0x8 lma 0x800bd70
Loading section .data, size 0x9a8 lma 0x800bd78
Start address 0x08006470, load size 50928
Transfer rate: 31 KB/sec, 5658 bytes/write.
Breakpoint 3 at 0x8006436: file shared/drivers/p_serial_mgr.c, line 83.
Starting program: /storage/Shared/Projects/Penguinator/motor_controller/build/motor_controller.elf
### Output/messages #################################################################################################
halted: PC: 0x08006438
halted: PC: 0x08006438
halted: PC: 0x08006438
Program received signal SIGINT, Interrupt.
0x080063de in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:77
77 }
### Assembly ########################################################################################################
0x080063d0 p_serial_mgr_service+224 ldr r0, [pc, #48] ; (0x8006404 <p_serial_mgr_service+276>)
0x080063d2 p_serial_mgr_service+226 bl 0x80061c0 <p_printf>
0x080063d6 p_serial_mgr_service+230 bl 0x8006408 <p_serial_mgr_start>
0x080063da p_serial_mgr_service+234 nop
0x080063dc p_serial_mgr_service+236 adds r7, #16
0x080063de p_serial_mgr_service+238 mov sp, r7
0x080063e0 p_serial_mgr_service+240 pop {r7, pc}
0x080063e2 p_serial_mgr_service+242 nop
0x080063e4 p_serial_mgr_service+244 movs r0, #80 ; 0x50
0x080063e6 p_serial_mgr_service+246 movs r0, #0
### Breakpoints #####################################################################################################
[3] break at 0x08006436 in shared/drivers/p_serial_mgr.c:83 for p_serial_mgr.c:83 if ret != HAL_OK
### Expressions #####################################################################################################
### History #########################################################################################################
$$1 = HAL_OK
$$0 = HAL_OK
### Memory ##########################################################################################################
### Registers #######################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080063de primask 0x00
r1 0x40013800 r6 0x00000000 r11 0x00000000 xPSR 0x01010000 basepri 0x00
r2 0x0000002d r7 0x2000ffe8 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000ffd8 msp 0x2000ffd8 control 0x04
r4 0x20002094 r9 0x00000000 lr 0x080011f1 psp 0x00000000
### Source ##########################################################################################################
67 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
68 uint8_t sendbuffer[9] = {0x7E, DEVICE_ADDR, MASTER_ADDR, 4, 0x01, 0x02, 0x03, 0x04, 0xFF};
69 // HAL_UART_Transmit(_serial_huart_inst, sendbuffer, 9, 10);
70 p_serial_mgr_start();
71 }
72 else if (sstate == SS_ERR)
73 {
74 PDEBUG("MISSED BYTE 0x%02x\n", sbuffer[active_buffer][0]);
75 p_serial_mgr_start();
76 }
77 }
78
79 void p_serial_mgr_start()
80 {
81 sstate = SS_IDLE;
82 volatile HAL_StatusTypeDef ret = HAL_UART_Receive_IT(_serial_huart_inst, &sbuffer[active_buffer][0], 1);
!83 asm volatile("nop");
84 }
~
~
### Stack ###########################################################################################################
[0] from 0x080063de in p_serial_mgr_service+238 at shared/drivers/p_serial_mgr.c:77
[1] from 0x080011f0 in main+136 at Core/Src/main.c:141
### Threads #########################################################################################################
[1] id 0 from 0x080063de in p_serial_mgr_service+238 at shared/drivers/p_serial_mgr.c:77
### Variables #######################################################################################################
#####################################################################################################################
$3 = 32
$4 = 0x20
Size letters are meaningless in "print" command.
$5 = 040
$6 = 0x20
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:58
58 if (sstate == SS_START)
### Assembly ############################################################################################################################################################################################################################
~
~
0x080062f4 p_serial_mgr_service+0 add r7, sp, #0
0x080062f6 p_serial_mgr_service+2 ldr r3, [pc, #236] ; (0x80063e4 <p_serial_mgr_service+240>)
0x080062f8 p_serial_mgr_service+4 ldrb r3, [r3, #0]
0x080062fa p_serial_mgr_service+6 cmp r3, #1
0x080062fc p_serial_mgr_service+8 bne.n 0x80063b2 <p_serial_mgr_service+190>
0x080062fe p_serial_mgr_service+10 nop
0x08006300 p_serial_mgr_service+12 ldr r3, [pc, #228] ; (0x80063e8 <p_serial_mgr_service+244>)
0x08006302 p_serial_mgr_service+14 ldr r0, [r3, #0]
### Breakpoints #########################################################################################################################################################################################################################
### Expressions #########################################################################################################################################################################################################################
### History #############################################################################################################################################################################################################################
### Memory ##############################################################################################################################################################################################################################
### Registers ###########################################################################################################################################################################################################################
r0 0x00000000 r3 0x00000000 r6 0x00000000 r9 0x00000000 r12 0xffffffff pc 0x080062fa msp 0x2000ffd8 basepri 0x00
r1 0x40013800 r4 0x20002094 r7 0x2000ffd8 r10 0x00000000 sp 0x2000ffd8 xPSR 0x01010000 psp 0x00000000 faultmask 0x00
r2 0x0000002d r5 0x00000000 r8 0x00000000 r11 0x00000000 lr 0x080011f1 fpscr 0x00000010 primask 0x00 control 0x04
### Source ##############################################################################################################################################################################################################################
48 }
49 }
50
51 void p_serial_mgr_init(UART_HandleTypeDef *huart)
52 {
53 _serial_huart_inst = huart;
54 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
55 }
56 void p_serial_mgr_service(void)
57 {
58 if (sstate == SS_START)
59 {
60 while (HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN - 2, 20) != HAL_OK) {}
61 for (int ind = 0; ind < 24; ind++)
62 {
63 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
64 }
65 PDEBUG("\n\n");
66 memset(sbuffer[active_buffer], 0, MAX_MESSAGE_LEN);
67 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
### Stack ###############################################################################################################################################################################################################################
[0] from 0x080062fa in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:58
[1] from 0x080011f0 in main+136 at Core/Src/main.c:141
### Threads #############################################################################################################################################################################################################################
[1] id 0 from 0x080062fa in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:58
### Variables ###########################################################################################################################################################################################################################
#########################################################################################################################################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0xb728 lma 0x80001c0
Loading section .rodata, size 0x480 lma 0x800b8e8
Loading section .ARM, size 0x8 lma 0x800bd68
Loading section .init_array, size 0x8 lma 0x800bd70
Loading section .fini_array, size 0x8 lma 0x800bd78
Loading section .data, size 0x9a8 lma 0x800bd80
Start address 0x08006474, load size 50936
Transfer rate: 31 KB/sec, 5659 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]
0x080062fa in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:62
62 while (HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN - 2, 20) != HAL_OK) {}
### Assembly ########################################################################################################################################################################################################
0x080062f0 p_serial_mgr_service+20 str r1, [r7, #36] ; 0x24
0x080062f2 p_serial_mgr_service+22 lsrs r0, r0, #32
0x080062f4 p_serial_mgr_service+24 push {r7, lr}
0x080062f6 p_serial_mgr_service+26 sub sp, #16
0x080062f8 p_serial_mgr_service+28 add r7, sp, #0
0x080062fa p_serial_mgr_service+30 ldr r3, [pc, #236] ; (0x80063e8 <p_serial_mgr_service+268>)
0x080062fc p_serial_mgr_service+32 ldrb r3, [r3, #0]
0x080062fe p_serial_mgr_service+34 cmp r3, #1
0x08006300 p_serial_mgr_service+36 bne.n 0x80063b6 <p_serial_mgr_service+218>
0x08006302 p_serial_mgr_service+38 nop
### Breakpoints #####################################################################################################################################################################################################
### Expressions #####################################################################################################################################################################################################
### History #########################################################################################################################################################################################################
### Memory ##########################################################################################################################################################################################################
### Registers #######################################################################################################################################################################################################
r0 0x00000000 r3 0x00000000 r6 0x00000000 r9 0x00000000 r12 0xffffffff pc 0x080062fa msp 0x2000ffd8 basepri 0x00
r1 0x40013800 r4 0x20002094 r7 0x2000ffd8 r10 0x00000000 sp 0x2000ffd8 xPSR 0x01030000 psp 0x00000000 faultmask 0x00
r2 0x0000002d r5 0x00000000 r8 0x00000000 r11 0x00000000 lr 0x080011f1 fpscr 0x00000010 primask 0x00 control 0x04
### Source ##########################################################################################################################################################################################################
52
53 void p_serial_mgr_init(UART_HandleTypeDef *huart)
54 {
55 _serial_huart_inst = huart;
56 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
57 }
58 void p_serial_mgr_service(void)
59 {
60 if (sstate == SS_START)
61 {
62 while (HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN - 2, 20) != HAL_OK) {}
63 for (int ind = 0; ind < 24; ind++)
64 {
65 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
66 }
67 PDEBUG("\n\n");
68 memset(sbuffer[active_buffer], 0, MAX_MESSAGE_LEN);
69 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
70 uint8_t sendbuffer[9] = {0x7E, DEVICE_ADDR, MASTER_ADDR, 4, 0x01, 0x02, 0x03, 0x04, 0xFF};
71 // HAL_UART_Transmit(_serial_huart_inst, sendbuffer, 9, 10);
### Stack ###########################################################################################################################################################################################################
[0] from 0x080062fa in p_serial_mgr_service+30 at shared/drivers/p_serial_mgr.c:62
[1] from 0x080011f0 in main+136 at Core/Src/main.c:141
### Threads #########################################################################################################################################################################################################
[1] id 0 from 0x080062fa in p_serial_mgr_service+30 at shared/drivers/p_serial_mgr.c:62
### Variables #######################################################################################################################################################################################################
loc sendbuffer = "\340\377\000 7d\000\b"
#####################################################################################################################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0xb710 lma 0x80001c0
Loading section .rodata, size 0x480 lma 0x800b8d0
Loading section .ARM, size 0x8 lma 0x800bd50
Loading section .init_array, size 0x8 lma 0x800bd58
Loading section .fini_array, size 0x8 lma 0x800bd60
Loading section .data, size 0x9a8 lma 0x800bd68
Start address 0x0800645c, load size 50912
Transfer rate: 31 KB/sec, 5656 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]
0x080063c8 in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:78
78 p_serial_mgr_start();
### Assembly ########################################################################################################################################################################################################
0x080063ba p_serial_mgr_service+218 mov r1, r3
0x080063bc p_serial_mgr_service+220 ldr r0, [pc, #48] ; (0x80063f0 <p_serial_mgr_service+272>)
0x080063be p_serial_mgr_service+222 bl 0x80061c4 <p_printf>
0x080063c2 p_serial_mgr_service+226 bl 0x80063f4 <p_serial_mgr_service+276>
0x080063c6 p_serial_mgr_service+230 nop
0x080063c8 p_serial_mgr_service+232 adds r7, #16
0x080063ca p_serial_mgr_service+234 mov sp, r7
0x080063cc p_serial_mgr_service+236 pop {r7, pc}
0x080063ce p_serial_mgr_service+238 nop
0x080063d0 p_serial_mgr_service+240 movs r0, #80 ; 0x50
### Breakpoints #####################################################################################################################################################################################################
### Expressions #####################################################################################################################################################################################################
### History #########################################################################################################################################################################################################
### Memory ##########################################################################################################################################################################################################
### Registers #######################################################################################################################################################################################################
r0 0x00000000 r3 0x00000000 r6 0x00000000 r9 0x00000000 r12 0xffffffff pc 0x080063c8 msp 0x2000ffd8 basepri 0x00
r1 0x40013800 r4 0x20002094 r7 0x2000ffd8 r10 0x00000000 sp 0x2000ffd8 xPSR 0x81030000 psp 0x00000000 faultmask 0x00
r2 0x0000002d r5 0x00000000 r8 0x00000000 r11 0x00000000 lr 0x080011f1 fpscr 0x00000010 primask 0x00 control 0x04
### Source ##########################################################################################################################################################################################################
68 PDEBUG("\n\n");
69 memset(sbuffer[active_buffer], 0, MAX_MESSAGE_LEN);
70 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
71 uint8_t sendbuffer[9] = {0x7E, DEVICE_ADDR, MASTER_ADDR, 4, 0x01, 0x02, 0x03, 0x04, 0xFF};
72 // HAL_UART_Transmit(_serial_huart_inst, sendbuffer, 9, 10);
73 p_serial_mgr_start();
74 }
75 else if (sstate == SS_ERR)
76 {
77 PDEBUG("MISSED BYTE 0x%02x\n", sbuffer[active_buffer][0]);
78 p_serial_mgr_start();
79 }
80 }
81
82 void p_serial_mgr_start()
83 {
84 sstate = SS_IDLE;
85 volatile HAL_StatusTypeDef ret = HAL_UART_Receive_IT(_serial_huart_inst, &sbuffer[active_buffer][0], 1);
86 asm volatile("nop");
87 }
### Stack ###########################################################################################################################################################################################################
[0] from 0x080063c8 in p_serial_mgr_service+232 at shared/drivers/p_serial_mgr.c:78
[1] from 0x080011f0 in main+136 at Core/Src/main.c:141
### Threads #########################################################################################################################################################################################################
[1] id 0 from 0x080063c8 in p_serial_mgr_service+232 at shared/drivers/p_serial_mgr.c:78
### Variables #######################################################################################################################################################################################################
#####################################################################################################################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0xb710 lma 0x80001c0
Loading section .rodata, size 0x480 lma 0x800b8d0
Loading section .ARM, size 0x8 lma 0x800bd50
Loading section .init_array, size 0x8 lma 0x800bd58
Loading section .fini_array, size 0x8 lma 0x800bd60
Loading section .data, size 0x9a8 lma 0x800bd68
Start address 0x08006460, load size 50912
Transfer rate: 31 KB/sec, 5656 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:75
75 else if (sstate == SS_ERR)
### Assembly ######################################################################################################
0x0800639a p_serial_mgr_service+186 strb r2, [r3, #0]
0x0800639c p_serial_mgr_service+188 bl 0x80063f8 <p_serial_mgr_start>
0x080063a0 p_serial_mgr_service+192 b.n 0x80063ca <p_serial_mgr_service+234>
0x080063a2 p_serial_mgr_service+194 ldr r3, [pc, #48] ; (0x80063d4 <p_serial_mgr_service+244>)
0x080063a4 p_serial_mgr_service+196 ldrb r3, [r3, #0]
0x080063a6 p_serial_mgr_service+198 cmp r3, #2
0x080063a8 p_serial_mgr_service+200 bne.n 0x80063ca <p_serial_mgr_service+234>
0x080063aa p_serial_mgr_service+202 ldr r3, [pc, #48] ; (0x80063dc <p_serial_mgr_service+252>)
0x080063ac p_serial_mgr_service+204 ldrb r3, [r3, #0]
0x080063ae p_serial_mgr_service+206 mov r1, r3
### Breakpoints ###################################################################################################
### Expressions ###################################################################################################
### History #######################################################################################################
### Memory ########################################################################################################
### Registers #####################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x080063a6 primask 0x00
r1 0x40013800 r6 0x00000000 r11 0x00000000 xPSR 0x81030000 basepri 0x00
r2 0x0000002d r7 0x2000ffd8 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000ffd8 msp 0x2000ffd8 control 0x04
r4 0x20002094 r9 0x00000000 lr 0x080011f1 psp 0x00000000
### Source ########################################################################################################
65 {
66 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
67 }
68 PDEBUG("\n\n");
69 memset(sbuffer[active_buffer], 0, MAX_MESSAGE_LEN);
70 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
71 uint8_t sendbuffer[9] = {0x7E, DEVICE_ADDR, MASTER_ADDR, 4, 0x01, 0x02, 0x03, 0x04, 0xFF};
72 // HAL_UART_Transmit(_serial_huart_inst, sendbuffer, 9, 10);
73 p_serial_mgr_start();
74 }
75 else if (sstate == SS_ERR)
76 {
77 PDEBUG("MISSED BYTE 0x%02x\n", sbuffer[active_buffer][0]);
78 p_serial_mgr_start();
79 }
80 }
81
82 void p_serial_mgr_start()
83 {
84 sstate = SS_IDLE;
### Stack #########################################################################################################
[0] from 0x080063a6 in p_serial_mgr_service+198 at shared/drivers/p_serial_mgr.c:75
[1] from 0x080011f0 in main+136 at Core/Src/main.c:141
### Threads #######################################################################################################
[1] id 0 from 0x080063a6 in p_serial_mgr_service+198 at shared/drivers/p_serial_mgr.c:75
### 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: 0x08006460 msp: 0x20010000
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0xb710 lma 0x80001c0
Loading section .rodata, size 0x480 lma 0x800b8d0
Loading section .ARM, size 0x8 lma 0x800bd50
Loading section .init_array, size 0x8 lma 0x800bd58
Loading section .fini_array, size 0x8 lma 0x800bd60
Loading section .data, size 0x9a8 lma 0x800bd68
Start address 0x08006460, load size 50912
Transfer rate: 31 KB/sec, 5656 bytes/write.
Function "UART1RxCpltCallback" not defined.
Quit
Breakpoint 1 at 0x8006280: file shared/drivers/p_serial_mgr.c, line 41.
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=0x20000a5c <huart1>) at shared/drivers/p_serial_mgr.c:41
41 PDEBUG("%c", sbuffer[active_buffer][0]);
### Assembly ######################################################################################################
~
0x08006278 UART1_RxCpltCallback+0 push {r7, lr}
0x0800627a UART1_RxCpltCallback+2 sub sp, #8
0x0800627c UART1_RxCpltCallback+4 add r7, sp, #0
0x0800627e UART1_RxCpltCallback+6 str r0, [r7, #4]
!0x08006280 UART1_RxCpltCallback+8 ldr r3, [pc, #36] ; (0x80062a8 <UART1_RxCpltCallback+48>)
0x08006282 UART1_RxCpltCallback+10 ldrb r3, [r3, #0]
0x08006284 UART1_RxCpltCallback+12 mov r1, r3
0x08006286 UART1_RxCpltCallback+14 ldr r2, [pc, #36] ; (0x80062ac <UART1_RxCpltCallback+52>)
0x08006288 UART1_RxCpltCallback+16 mov r3, r1
### Breakpoints ###################################################################################################
[1] break at 0x08006280 in shared/drivers/p_serial_mgr.c:41 for UART1_RxCpltCallback hit 1 time
### Expressions ###################################################################################################
### History #######################################################################################################
### Memory ########################################################################################################
### Registers #####################################################################################################
r0 0x20000a5c r5 0x00000000 r10 0x00000000 pc 0x08006280 primask 0x00
r1 0x40013808 r6 0x00000000 r11 0x00000000 xPSR 0x81030035 basepri 0x00
r2 0x00000000 r7 0x2000fe18 r12 0xffffffff fpscr 0x00000010 faultmask 0x00
r3 0x08006279 r8 0x00000000 sp 0x2000fe18 msp 0x2000fe18 control 0x00
r4 0x20002094 r9 0x00000000 lr 0x08005f15 psp 0x00000000
### Source ########################################################################################################
31
32 static uint8_t rxc = '\0';
33 static serial_state_t sstate = SS_IDLE;
34
35 static void p_serial_mgr_flush()
36 {
37 HAL_UART_Receive(_serial_huart_inst, sbuffer[active_buffer], MAX_MESSAGE_LEN, 10);
38 }
39 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
40 {
!41 PDEBUG("%c", sbuffer[active_buffer][0]);
42 p_serial_mgr_start();
43 return;
44 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
45 {
46 sstate = SS_START;
47 }
48 else
49 {
50 sstate = SS_ERR;
### Stack #########################################################################################################
[0] from 0x08006280 in UART1_RxCpltCallback+8 at shared/drivers/p_serial_mgr.c:41
[1] from 0x08005f14 in UART_RxISR_8BIT+330 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x08004c76 in HAL_UART_IRQHandler+102 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347
[3] from 0x08001702 in USART1_IRQHandler+10 at Core/Src/stm32l4xx_it.c:226
[4] from 0xffffffe9
[5] from 0x080062e0 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:60
[6] from 0x080011f0 in main+136 at Core/Src/main.c:141
### Threads #######################################################################################################
[1] id 0 from 0x08006280 in UART1_RxCpltCallback+8 at shared/drivers/p_serial_mgr.c:41
### Variables #####################################################################################################
arg huart = 0x20000a5c <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
###################################################################################################################
### Output/messages ###############################################################################################
halted: PC: 0x08006282
halted: PC: 0x08006284
halted: PC: 0x08006286
halted: PC: 0x08006288
halted: PC: 0x0800628a
halted: PC: 0x0800628c
halted: PC: 0x0800628e
halted: PC: 0x08006290
halted: PC: 0x08006292
halted: PC: 0x08006294
halted: PC: 0x08006296
halted: PC: 0x08006298
halted: PC: 0x080061c4
42 p_serial_mgr_start();
### Assembly ######################################################################################################
0x08006290 UART1_RxCpltCallback+24 add r3, r2
0x08006292 UART1_RxCpltCallback+26 ldrb r3, [r3, #0]
0x08006294 UART1_RxCpltCallback+28 mov r1, r3
0x08006296 UART1_RxCpltCallback+30 ldr r0, [pc, #24] ; (0x80062b0 <UART1_RxCpltCallback+56>)
0x08006298 UART1_RxCpltCallback+32 bl 0x80061c4 <p_printf>
0x0800629c UART1_RxCpltCallback+36 bl 0x80063f8 <p_serial_mgr_start>
0x080062a0 UART1_RxCpltCallback+40 nop
0x080062a2 UART1_RxCpltCallback+42 adds r7, #8
0x080062a4 UART1_RxCpltCallback+44 mov sp, r7
0x080062a6 UART1_RxCpltCallback+46 pop {r7, pc}
### Breakpoints ###################################################################################################
[1] break at 0x08006280 in shared/drivers/p_serial_mgr.c:41 for UART1_RxCpltCallback hit 1 time
### Expressions ###################################################################################################
### History #######################################################################################################
### Memory ########################################################################################################
### Registers #####################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x0800629c primask 0x00
r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x41010035 basepri 0x00
r2 0x00000020 r7 0x2000fe18 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fe18 msp 0x2000fe18 control 0x04
r4 0x20002094 r9 0x00000000 lr 0x0800629d psp 0x00000000
### Source ########################################################################################################
32 static uint8_t rxc = '\0';
33 static serial_state_t sstate = SS_IDLE;
34
35 static void p_serial_mgr_flush()
36 {
37 HAL_UART_Receive(_serial_huart_inst, sbuffer[active_buffer], MAX_MESSAGE_LEN, 10);
38 }
39 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
40 {
!41 PDEBUG("%c", sbuffer[active_buffer][0]);
42 p_serial_mgr_start();
43 return;
44 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
45 {
46 sstate = SS_START;
47 }
48 else
49 {
50 sstate = SS_ERR;
51 }
### Stack #########################################################################################################
[0] from 0x0800629c in UART1_RxCpltCallback+36 at shared/drivers/p_serial_mgr.c:42
[1] from 0x08005f14 in UART_RxISR_8BIT+330 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x08004c76 in HAL_UART_IRQHandler+102 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347
[3] from 0x08001702 in USART1_IRQHandler+10 at Core/Src/stm32l4xx_it.c:226
[4] from 0xffffffe9
[5] from 0x080062e0 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:60
[6] from 0x080011f0 in main+136 at Core/Src/main.c:141
### Threads #######################################################################################################
[1] id 0 from 0x0800629c in UART1_RxCpltCallback+36 at shared/drivers/p_serial_mgr.c:42
### Variables #####################################################################################################
arg huart = 0x20000a5c <huart1>: {Instance = 0x40013800,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]
UART1_RxCpltCallback (huart=0x20000a5c <huart1>) at shared/drivers/p_serial_mgr.c:42
42 p_serial_mgr_start();
### Assembly ######################################################################################################
0x08006290 UART1_RxCpltCallback+24 add r3, r2
0x08006292 UART1_RxCpltCallback+26 ldrb r3, [r3, #0]
0x08006294 UART1_RxCpltCallback+28 mov r1, r3
0x08006296 UART1_RxCpltCallback+30 ldr r0, [pc, #24] ; (0x80062b0 <UART1_RxCpltCallback+56>)
0x08006298 UART1_RxCpltCallback+32 bl 0x80061c4 <p_printf>
0x0800629c UART1_RxCpltCallback+36 bl 0x80063f8 <p_serial_mgr_start>
0x080062a0 UART1_RxCpltCallback+40 nop
0x080062a2 UART1_RxCpltCallback+42 adds r7, #8
0x080062a4 UART1_RxCpltCallback+44 mov sp, r7
0x080062a6 UART1_RxCpltCallback+46 pop {r7, pc}
### Breakpoints ###################################################################################################
### Expressions ###################################################################################################
### History #######################################################################################################
### Memory ########################################################################################################
### Registers #####################################################################################################
r0 0x00000000 r5 0x00000000 r10 0x00000000 pc 0x0800629c primask 0x00
r1 0x00000040 r6 0x00000000 r11 0x00000000 xPSR 0x41010035 basepri 0x00
r2 0x00000020 r7 0x2000fe18 r12 0xffffffff fpscr 0x00000000 faultmask 0x00
r3 0x00000000 r8 0x00000000 sp 0x2000fe18 msp 0x2000fe18 control 0x04
r4 0x20002094 r9 0x00000000 lr 0x0800629d psp 0x00000000
### Source ########################################################################################################
32 static uint8_t rxc = '\0';
33 static serial_state_t sstate = SS_IDLE;
34
35 static void p_serial_mgr_flush()
36 {
37 HAL_UART_Receive(_serial_huart_inst, sbuffer[active_buffer], MAX_MESSAGE_LEN, 10);
38 }
39 void UART1_RxCpltCallback(UART_HandleTypeDef *huart)
40 {
41 PDEBUG("%c", sbuffer[active_buffer][0]);
42 p_serial_mgr_start();
43 return;
44 if (sstate == SS_IDLE && sbuffer[active_buffer][0] == 0x7E)
45 {
46 sstate = SS_START;
47 }
48 else
49 {
50 sstate = SS_ERR;
51 }
### Stack #########################################################################################################
[0] from 0x0800629c in UART1_RxCpltCallback+36 at shared/drivers/p_serial_mgr.c:42
[1] from 0x08005f14 in UART_RxISR_8BIT+330 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4430
[2] from 0x08004c76 in HAL_UART_IRQHandler+102 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:2347
[3] from 0x08001702 in USART1_IRQHandler+10 at Core/Src/stm32l4xx_it.c:226
[4] from 0xffffffe9
[5] from 0x080062e0 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:60
[6] from 0x080011f0 in main+136 at Core/Src/main.c:141
### Threads #######################################################################################################
[1] id 0 from 0x0800629c in UART1_RxCpltCallback+36 at shared/drivers/p_serial_mgr.c:42
### Variables #####################################################################################################
arg huart = 0x20000a5c <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…
###################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0xb710 lma 0x80001c0
Loading section .rodata, size 0x480 lma 0x800b8d0
Loading section .ARM, size 0x8 lma 0x800bd50
Loading section .init_array, size 0x8 lma 0x800bd58
Loading section .fini_array, size 0x8 lma 0x800bd60
Loading section .data, size 0x9a8 lma 0x800bd68
Start address 0x08006460, load size 50912
Transfer rate: 31 KB/sec, 5656 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]
0x080062e8 in p_serial_mgr_init (huart=0x20000b10 <huart2>) at shared/drivers/p_serial_mgr.c:55
55 }
### Assembly ############################################################################################################################################################################################################################
0x080062de p_serial_mgr_init+26 lsrs r0, r0, #32
0x080062e0 p_serial_mgr_init+28 push {r7, lr}
0x080062e2 p_serial_mgr_init+30 sub sp, #16
0x080062e4 p_serial_mgr_init+32 add r7, sp, #0
0x080062e6 p_serial_mgr_init+34 ldr r3, [pc, #236] ; (0x80063d4 <p_serial_mgr_service+228>)
0x080062e8 p_serial_mgr_init+36 ldrb r3, [r3, #0]
0x080062ea p_serial_mgr_init+38 cmp r3, #1
0x080062ec p_serial_mgr_init+40 bne.n 0x80063a2 <p_serial_mgr_service+178>
0x080062ee p_serial_mgr_init+42 nop
~
### Breakpoints #########################################################################################################################################################################################################################
### Expressions #########################################################################################################################################################################################################################
### History #############################################################################################################################################################################################################################
### Memory ##############################################################################################################################################################################################################################
### Registers ###########################################################################################################################################################################################################################
r0 0x00000000 r3 0x20002050 r6 0x00000000 r9 0x00000000 r12 0xffffffff pc 0x080062e8 msp 0x2000ffd8 basepri 0x00
r1 0x40013800 r4 0x20002094 r7 0x2000ffd8 r10 0x00000000 sp 0x2000ffd8 xPSR 0x01030000 psp 0x00000000 faultmask 0x00
r2 0x0000002d r5 0x00000000 r8 0x00000000 r11 0x00000000 lr 0x080011f1 fpscr 0x00000010 primask 0x00 control 0x04
### Source ##############################################################################################################################################################################################################################
45 else
46 {
47 sstate = SS_ERR;
48 }
49 }
50
51 void p_serial_mgr_init(UART_HandleTypeDef *huart)
52 {
53 _serial_huart_inst = huart;
54 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
55 }
56 void p_serial_mgr_service(void)
57 {
58 if (sstate == SS_START)
59 {
60 while (HAL_UART_Receive(_serial_huart_inst, &sbuffer[active_buffer][1], MAX_MESSAGE_LEN - 2, 20) != HAL_OK) {}
61 for (int ind = 0; ind < 24; ind++)
62 {
63 PDEBUG("[%d]: 0x%02x\n", ind, sbuffer[active_buffer][ind]);
64 }
### Stack ###############################################################################################################################################################################################################################
[0] from 0x080062e8 in p_serial_mgr_init+36 at shared/drivers/p_serial_mgr.c:55
[1] from 0x080011f0 in main+136 at Core/Src/main.c:141
### Threads #############################################################################################################################################################################################################################
[1] id 0 from 0x080062e8 in p_serial_mgr_init+36 at shared/drivers/p_serial_mgr.c:55
### Variables ###########################################################################################################################################################################################################################
arg huart = 0x20000b10 <huart2>: {Instance = 0x40004400,Init = {BaudRate = 115200,WordLength = 0,StopBi…
#########################################################################################################################################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0xb720 lma 0x80001c0
Loading section .rodata, size 0x480 lma 0x800b8e0
Loading section .ARM, size 0x8 lma 0x800bd60
Loading section .init_array, size 0x8 lma 0x800bd68
Loading section .fini_array, size 0x8 lma 0x800bd70
Loading section .data, size 0x9a8 lma 0x800bd78
Start address 0x08006470, load size 50928
Transfer rate: 31 KB/sec, 5658 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]
UART_WaitOnFlagUntilTimeout (huart=0x20000a5c <huart1>, Flag=32, Status=RESET, Tickstart=1018847, Timeout=20) at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3536
3536 if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U))
### Assembly ############################################################################################################################################################################################################################
0x08005972 UART_WaitOnFlagUntilTimeout+24 beq.w 0x8005ab8 <UART_WaitOnFlagUntilTimeout+350>
0x08005976 UART_WaitOnFlagUntilTimeout+28 bl 0x8002ba8 <HAL_GetTick>
0x0800597a UART_WaitOnFlagUntilTimeout+32 mov r2, r0
0x0800597c UART_WaitOnFlagUntilTimeout+34 ldr r3, [r7, #0]
0x0800597e UART_WaitOnFlagUntilTimeout+36 subs r3, r2, r3
0x08005980 UART_WaitOnFlagUntilTimeout+38 ldr r2, [r7, #120] ; 0x78
0x08005982 UART_WaitOnFlagUntilTimeout+40 cmp r2, r3
0x08005984 UART_WaitOnFlagUntilTimeout+42 bcc.n 0x800598c <UART_WaitOnFlagUntilTimeout+50>
0x08005986 UART_WaitOnFlagUntilTimeout+44 ldr r3, [r7, #120] ; 0x78
0x08005988 UART_WaitOnFlagUntilTimeout+46 cmp r3, #0
### Breakpoints #########################################################################################################################################################################################################################
### Expressions #########################################################################################################################################################################################################################
### History #############################################################################################################################################################################################################################
### Memory ##############################################################################################################################################################################################################################
### Registers ###########################################################################################################################################################################################################################
r0 0x000f8be6 r3 0x00000007 r6 0x00000000 r9 0x00000000 r12 0xffffffff pc 0x08005980 msp 0x2000ff30 basepri 0x00
r1 0x00000020 r4 0x20002094 r7 0x2000ff30 r10 0x00000000 sp 0x2000ff30 xPSR 0x21010000 psp 0x00000000 faultmask 0x00
r2 0x000f8be6 r5 0x00000000 r8 0x00000000 r11 0x00000000 lr 0x0800597b fpscr 0x00000010 primask 0x00 control 0x04
### 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 0x08005980 in UART_WaitOnFlagUntilTimeout+38 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3536
[1] from 0x08004ae6 in HAL_UART_Receive+298 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1286
[2] from 0x08006322 in p_serial_mgr_service+50 at shared/drivers/p_serial_mgr.c:60
[3] from 0x080011f0 in main+136 at Core/Src/main.c:141
### Threads #############################################################################################################################################################################################################################
[1] id 0 from 0x08005980 in UART_WaitOnFlagUntilTimeout+38 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3536
### Variables ###########################################################################################################################################################################################################################
arg huart = 0x20000a5c <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…, Flag = 32, Status = RESET, Tickstart = 1018847, Timeout = 20
#########################################################################################################################################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0xb730 lma 0x80001c0
Loading section .rodata, size 0x480 lma 0x800b8f0
Loading section .ARM, size 0x8 lma 0x800bd70
Loading section .init_array, size 0x8 lma 0x800bd78
Loading section .fini_array, size 0x8 lma 0x800bd80
Loading section .data, size 0x9a8 lma 0x800bd88
Start address 0x0800647c, load size 50944
Transfer rate: 31 KB/sec, 5660 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]
0x08005abe in UART_WaitOnFlagUntilTimeout (huart=0x20000a5c <huart1>, Flag=32, Status=RESET, Tickstart=1171099, Timeout=20) at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3569
3569 ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE | USART_CR1_PEIE | USART_CR1_TXEIE));
### Assembly ############################################################################################################################################################################################################################
0x08005ab4 UART_WaitOnFlagUntilTimeout+230 movs r3, #3
0x08005ab6 UART_WaitOnFlagUntilTimeout+232 b.n 0x8005ada <UART_WaitOnFlagUntilTimeout+268>
0x08005ab8 UART_WaitOnFlagUntilTimeout+234 ldr r3, [r7, #12]
0x08005aba UART_WaitOnFlagUntilTimeout+236 ldr r3, [r3, #0]
0x08005abc UART_WaitOnFlagUntilTimeout+238 ldr r2, [r3, #28]
0x08005abe UART_WaitOnFlagUntilTimeout+240 ldr r3, [r7, #8]
0x08005ac0 UART_WaitOnFlagUntilTimeout+242 ands r3, r2
0x08005ac2 UART_WaitOnFlagUntilTimeout+244 ldr r2, [r7, #8]
0x08005ac4 UART_WaitOnFlagUntilTimeout+246 cmp r2, r3
0x08005ac6 UART_WaitOnFlagUntilTimeout+248 ite eq
### Breakpoints #########################################################################################################################################################################################################################
### Expressions #########################################################################################################################################################################################################################
### History #############################################################################################################################################################################################################################
### Memory ##############################################################################################################################################################################################################################
### Registers ###########################################################################################################################################################################################################################
r0 0x0011de9b r3 0x40013800 r6 0x00000000 r9 0x00000000 r12 0xffffffff pc 0x08005abe msp 0x2000ff30 basepri 0x00
r1 0x00000020 r4 0x20002094 r7 0x2000ff30 r10 0x00000000 sp 0x2000ff30 xPSR 0x81030000 psp 0x00000000 faultmask 0x00
r2 0x006210d0 r5 0x00000000 r8 0x00000000 r11 0x00000000 lr 0x0800597b fpscr 0x00000010 primask 0x00 control 0x04
### Source ##############################################################################################################################################################################################################################
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));
3568 #else
3569 ATOMIC_CLEAR_BIT(huart->Instance->CR1, (USART_CR1_RXNEIE | USART_CR1_PEIE | USART_CR1_TXEIE));
3570 #endif
3571 ATOMIC_CLEAR_BIT(huart->Instance->CR3, USART_CR3_EIE);
3572
3573 huart->gState = HAL_UART_STATE_READY;
3574 huart->RxState = HAL_UART_STATE_READY;
3575 huart->ErrorCode = HAL_UART_ERROR_RTO;
3576
3577 /* Process Unlocked */
3578 __HAL_UNLOCK(huart);
### Stack ###############################################################################################################################################################################################################################
[0] from 0x08005abe in UART_WaitOnFlagUntilTimeout+240 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3569
[1] from 0x08004ae6 in HAL_UART_Transmit+230 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:1204
[2] from 0x08006322 in UART_RxISR_8BIT+356 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4443
[3] from 0x00000000
### Threads #############################################################################################################################################################################################################################
[1] id 0 from 0x08005abe in UART_WaitOnFlagUntilTimeout+240 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:3569
### Variables ###########################################################################################################################################################################################################################
arg huart = 0x20000a5c <huart1>: {Instance = 0x40013800,Init = {BaudRate = 115200,WordLength = 0,StopBi…, Flag = 32, Status = RESET, Tickstart = 1171099, Timeout = 20
loc val = 134222321
#########################################################################################################################################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0xba20 lma 0x80001c0
Loading section .rodata, size 0x450 lma 0x800bbe0
Loading section .ARM, size 0x8 lma 0x800c030
Loading section .init_array, size 0x8 lma 0x800c038
Loading section .fini_array, size 0x8 lma 0x800c040
Loading section .data, size 0x9a8 lma 0x800c048
Start address 0x08006770, load size 51648
Transfer rate: 31 KB/sec, 5738 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]
0x08002bac in HAL_IncTick () at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c:330
330 }
### Assembly ############################################################################################################################################################################################################################
0x08002ba2 HAL_IncTick+26 nop
0x08002ba4 HAL_IncTick+28 movs r4, r0
0x08002ba6 HAL_IncTick+30 movs r0, #0
0x08002ba8 HAL_IncTick+32 lsrs r0, r3, #16
0x08002baa HAL_IncTick+34 movs r0, #0
0x08002bac HAL_IncTick+36 push {r7}
0x08002bae HAL_IncTick+38 add r7, sp, #0
~
~
~
### Breakpoints #########################################################################################################################################################################################################################
### Expressions #########################################################################################################################################################################################################################
### History #############################################################################################################################################################################################################################
### Memory ##############################################################################################################################################################################################################################
### Registers ###########################################################################################################################################################################################################################
r0 0x00009d7f r3 0x00000012 r6 0x00000000 r9 0x00000000 r12 0xffffffff pc 0x08002bac msp 0x2000ffd0 basepri 0x00
r1 0x00000040 r4 0x2000206c r7 0x2000ffd0 r10 0x00000000 sp 0x2000ffd0 xPSR 0x21000000 psp 0x00000000 faultmask 0x00
r2 0x00000065 r5 0x00000000 r8 0x00000000 r11 0x00000000 lr 0x08002bf1 fpscr 0x00000010 primask 0x00 control 0x04
### Source ##############################################################################################################################################################################################################################
320 * used as application time base.
321 * @note In the default implementation, this variable is incremented each 1ms
322 * in SysTick ISR.
323 * @note This function is declared as __weak to be overwritten in case of other
324 * implementations in user file.
325 * @retval None
326 */
327 __weak void HAL_IncTick(void)
328 {
329 uwTick += (uint32_t)uwTickFreq;
330 }
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 {
### Stack ###############################################################################################################################################################################################################################
[0] from 0x08002bac in HAL_IncTick+36 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c:330
[1] from 0x08002bf0 in HAL_Delay+40 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c:413
[2] from 0x08006706 in p_serial_mgr_service+6 at shared/drivers/p_serial_mgr.c:56
[3] from 0x080011f2 in main+138 at Core/Src/main.c:141
### Threads #############################################################################################################################################################################################################################
[1] id 0 from 0x08002bac in HAL_IncTick+36 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c:330
### Variables ###########################################################################################################################################################################################################################
#########################################################################################################################################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0xba28 lma 0x80001c0
Loading section .rodata, size 0x450 lma 0x800bbe8
Loading section .ARM, size 0x8 lma 0x800c038
Loading section .init_array, size 0x8 lma 0x800c040
Loading section .fini_array, size 0x8 lma 0x800c048
Loading section .data, size 0x9a8 lma 0x800c050
Start address 0x08006774, load size 51656
Transfer rate: 31 KB/sec, 5739 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]
HAL_Delay (Delay=100) at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c:410
410 wait += (uint32_t)uwTickFreq;
### Assembly ############################################################################################################################################################################################################################
0x08002be8 HAL_Delay+20 ldr r3, [r7, #12]
0x08002bea HAL_Delay+22 add r3, r2
0x08002bec HAL_Delay+24 str r3, [r7, #12]
0x08002bee HAL_Delay+26 nop
0x08002bf0 HAL_Delay+28 bl 0x8002bb0 <HAL_IncTick+28>
0x08002bf4 HAL_Delay+32 mov r2, r0
0x08002bf6 HAL_Delay+34 ldr r3, [r7, #8]
0x08002bf8 HAL_Delay+36 subs r3, r2, r3
0x08002bfa HAL_Delay+38 ldr r2, [r7, #12]
0x08002bfc HAL_Delay+40 cmp r2, r3
### Breakpoints #########################################################################################################################################################################################################################
### Expressions #########################################################################################################################################################################################################################
### History #############################################################################################################################################################################################################################
### Memory ##############################################################################################################################################################################################################################
### Registers ###########################################################################################################################################################################################################################
r0 0x00034038 r3 0x00034038 r6 0x00000000 r9 0x00000000 r12 0xffffffff pc 0x08002bf4 msp 0x2000ffd0 basepri 0x00
r1 0x00000040 r4 0x2000206c r7 0x2000ffd0 r10 0x00000000 sp 0x2000ffd0 xPSR 0x21000000 psp 0x00000000 faultmask 0x00
r2 0x00000065 r5 0x00000000 r8 0x00000000 r11 0x00000000 lr 0x08002bf5 fpscr 0x00000010 primask 0x00 control 0x04
### Source ##############################################################################################################################################################################################################################
400 * @retval None
401 */
402 __weak void HAL_Delay(uint32_t Delay)
403 {
404 uint32_t tickstart = HAL_GetTick();
405 uint32_t wait = Delay;
406
407 /* Add a period to guaranty minimum wait */
408 if (wait < HAL_MAX_DELAY)
409 {
410 wait += (uint32_t)uwTickFreq;
411 }
412
413 while ((HAL_GetTick() - tickstart) < wait)
414 {
415 }
416 }
417
418 /**
419 * @brief Suspend Tick increment.
### Stack ###############################################################################################################################################################################################################################
[0] from 0x08002bf4 in HAL_Delay+32 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c:410
[1] from 0x0800670a in p_serial_mgr_init+54 at shared/drivers/p_serial_mgr.c:53
### Threads #############################################################################################################################################################################################################################
[1] id 0 from 0x08002bf4 in HAL_Delay+32 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c:410
### Variables ###########################################################################################################################################################################################################################
arg Delay = 100
loc tickstart = 213011, wait = 101
#########################################################################################################################################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0xba30 lma 0x80001c0
Loading section .rodata, size 0x458 lma 0x800bbf0
Loading section .ARM, size 0x8 lma 0x800c048
Loading section .init_array, size 0x8 lma 0x800c050
Loading section .fini_array, size 0x8 lma 0x800c058
Loading section .data, size 0x9a8 lma 0x800c060
Start address 0x08006780, load size 51672
Transfer rate: 31 KB/sec, 5741 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]
0x08002bc2 in HAL_GetTick () at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c:340
340 return uwTick;
### Assembly ############################################################################################################################################################################################################################
~
~
0x08002bbc HAL_GetTick+0 push {r7}
0x08002bbe HAL_GetTick+2 add r7, sp, #0
0x08002bc0 HAL_GetTick+4 ldr r3, [pc, #12] ; (0x8002bd0 <HAL_GetTick+20>)
0x08002bc2 HAL_GetTick+6 ldr r3, [r3, #0]
0x08002bc4 HAL_GetTick+8 mov r0, r3
0x08002bc6 HAL_GetTick+10 mov sp, r7
0x08002bc8 HAL_GetTick+12 ldr.w r7, [sp], #4
0x08002bcc HAL_GetTick+16 bx lr
### Breakpoints #########################################################################################################################################################################################################################
### Expressions #########################################################################################################################################################################################################################
### History #############################################################################################################################################################################################################################
### Memory ##############################################################################################################################################################################################################################
### Registers ###########################################################################################################################################################################################################################
r0 0x000041b6 r3 0x20000c18 r6 0x00000000 r9 0x00000000 r12 0xffffffff pc 0x08002bc2 msp 0x2000ffcc basepri 0x00
r1 0x00000040 r4 0x2000206c r7 0x2000ffcc r10 0x00000000 sp 0x2000ffcc xPSR 0x21000000 psp 0x00000000 faultmask 0x00
r2 0x00000065 r5 0x00000000 r8 0x00000000 r11 0x00000000 lr 0x08002c01 fpscr 0x00000010 primask 0x00 control 0x04
### Source ##############################################################################################################################################################################################################################
330 }
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;
### Stack ###############################################################################################################################################################################################################################
[0] from 0x08002bc2 in HAL_GetTick+6 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c:340
[1] from 0x08002c00 in HAL_RCC_OscConfig+44 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_rcc.c:422
[2] from 0x00000000
### Threads #############################################################################################################################################################################################################################
[1] id 0 from 0x08002bc2 in HAL_GetTick+6 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal.c:340
### Variables ###########################################################################################################################################################################################################################
#########################################################################################################################################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0xb9d0 lma 0x80001c0
Loading section .rodata, size 0x450 lma 0x800bb90
Loading section .ARM, size 0x8 lma 0x800bfe0
Loading section .init_array, size 0x8 lma 0x800bfe8
Loading section .fini_array, size 0x8 lma 0x800bff0
Loading section .data, size 0x9a8 lma 0x800bff8
Start address 0x08006720, load size 51568
Transfer rate: 31 KB/sec, 5729 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]
0x080011f2 in main () at Core/Src/main.c:141
141 p_serial_mgr_service();
### Assembly ############################################################################################################################################################################################################################
0x080011e2 main+122 bl 0x8001af8 <HAL_TIM_Base_Start_IT>
0x080011e6 main+126 bl 0x80066d4 <p_serial_mgr_start>
0x080011ea main+130 movs r3, #0
0x080011ec main+132 strh r3, [r7, #6]
0x080011ee main+134 bl 0x80066c4 <p_serial_mgr_service>
0x080011f2 main+138 b.n 0x80011ee <main+134>
0x080011f4 main+140 lsrs r0, r2, #12
0x080011f6 main+142 movs r0, #0
0x080011f8 main+144 asrs r1, r1, #22
0x080011fa main+146 lsrs r0, r0, #32
### Breakpoints #########################################################################################################################################################################################################################
### Expressions #########################################################################################################################################################################################################################
### History #############################################################################################################################################################################################################################
### Memory ##############################################################################################################################################################################################################################
### Registers ###########################################################################################################################################################################################################################
r0 0x00000000 r3 0x00000000 r6 0x00000000 r9 0x00000000 r12 0xffffffff pc 0x080011f2 msp 0x2000fff0 basepri 0x00
r1 0x40013808 r4 0x2000206c r7 0x2000fff0 r10 0x00000000 sp 0x2000fff0 xPSR 0x41030000 psp 0x00000000 faultmask 0x00
r2 0x00004041 r5 0x00000000 r8 0x00000000 r11 0x00000000 lr 0x080011f3 fpscr 0x00000010 primask 0x00 control 0x04
### Source ##############################################################################################################################################################################################################################
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
149 // serial_pkt_t *pkt = NULL;
150 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###############################################################################################################################################################################################################################
[0] from 0x080011f2 in main+138 at Core/Src/main.c:141
### Threads #############################################################################################################################################################################################################################
[1] id 0 from 0x080011f2 in main+138 at Core/Src/main.c:141
### Variables ###########################################################################################################################################################################################################################
loc motor_degrees = 0
#########################################################################################################################################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0xb9d0 lma 0x80001c0
Loading section .rodata, size 0x450 lma 0x800bb90
Loading section .ARM, size 0x8 lma 0x800bfe0
Loading section .init_array, size 0x8 lma 0x800bfe8
Loading section .fini_array, size 0x8 lma 0x800bff0
Loading section .data, size 0x9a8 lma 0x800bff8
Start address 0x08006720, load size 51568
Transfer rate: 31 KB/sec, 5729 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]
0x080011f2 in main () at Core/Src/main.c:141
141 p_serial_mgr_service();
### Assembly ############################################################################################################################################################################################################################
0x080011e2 main+122 bl 0x8001af8 <HAL_TIM_Base_Start_IT+8>
0x080011e6 main+126 bl 0x80066d4 <p_serial_mgr_start+8>
0x080011ea main+130 movs r3, #0
0x080011ec main+132 strh r3, [r7, #6]
0x080011ee main+134 bl 0x80066c4 <p_serial_mgr_service+8>
0x080011f2 main+138 b.n 0x80011ee <main+134>
0x080011f4 main+140 lsrs r0, r2, #12
0x080011f6 main+142 movs r0, #0
0x080011f8 main+144 asrs r1, r1, #22
0x080011fa main+146 lsrs r0, r0, #32
### Breakpoints #########################################################################################################################################################################################################################
### Expressions #########################################################################################################################################################################################################################
### History #############################################################################################################################################################################################################################
### Memory ##############################################################################################################################################################################################################################
### Registers ###########################################################################################################################################################################################################################
r0 0x00000000 r3 0x00000000 r6 0x00000000 r9 0x00000000 r12 0xffffffff pc 0x080011f2 msp 0x2000fff0 basepri 0x00
r1 0x40013808 r4 0x2000206c r7 0x2000fff0 r10 0x00000000 sp 0x2000fff0 xPSR 0x41030000 psp 0x00000000 faultmask 0x00
r2 0x00004041 r5 0x00000000 r8 0x00000000 r11 0x00000000 lr 0x080011f3 fpscr 0x00000010 primask 0x00 control 0x04
### Source ##############################################################################################################################################################################################################################
131
132 p_serial_mgr_start();
133
134 uint16_t motor_degrees = 0;
135 /* USER CODE END 2 */
136
137 /* Infinite loop */
138 /* USER CODE BEGIN WHILE */
139 while (1)
140 {
141 p_serial_mgr_service();
142 // if (b_timer_struck)
143 // {
144 // // PDEBUG("%d\n", sys_time);
145 // b_timer_struck = false;
146 // motor_degrees = (motor_degrees + 1) % 360;
147 // mc_service(motor_degrees, 50);
148 // }
149 // serial_pkt_t *pkt = NULL;
150 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###############################################################################################################################################################################################################################
[0] from 0x080011f2 in main+138 at Core/Src/main.c:141
### Threads #############################################################################################################################################################################################################################
[1] id 0 from 0x080011f2 in main+138 at Core/Src/main.c:141
### Variables ###########################################################################################################################################################################################################################
loc motor_degrees = 0
#########################################################################################################################################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0xb9c8 lma 0x80001c0
Loading section .rodata, size 0x450 lma 0x800bb88
Loading section .ARM, size 0x8 lma 0x800bfd8
Loading section .init_array, size 0x8 lma 0x800bfe0
Loading section .fini_array, size 0x8 lma 0x800bfe8
Loading section .data, size 0x9a8 lma 0x800bff0
Start address 0x08006718, load size 51560
Transfer rate: 31 KB/sec, 5728 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]
UART_RxISR_16BIT (huart=0x2000206c <sbuffer+4780>) at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4493
4493 ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE);
### Assembly ############################################################################################################################################################################################################################
0x080066b8 UART_RxISR_16BIT+234 str r5, [r5, #96] ; 0x60
0x080066ba UART_RxISR_16BIT+236 lsrs r0, r0, #32
0x080066bc UART_RxISR_16BIT+238 push {r7}
0x080066be UART_RxISR_16BIT+240 add r7, sp, #0
0x080066c0 UART_RxISR_16BIT+242 nop
0x080066c2 UART_RxISR_16BIT+244 mov sp, r7
0x080066c4 UART_RxISR_16BIT+246 ldr.w r7, [sp], #4
0x080066c8 UART_RxISR_16BIT+250 bx lr
0x080066ca UART_RxISR_16BIT+252 movs r0, r0
0x080066cc UART_RxISR_16BIT+254 push {r7, lr}
### Breakpoints #########################################################################################################################################################################################################################
### Expressions #########################################################################################################################################################################################################################
### History #############################################################################################################################################################################################################################
### Memory ##############################################################################################################################################################################################################################
### Registers ###########################################################################################################################################################################################################################
r0 0x00000000 r3 0x00000000 r6 0x00000000 r9 0x00000000 r12 0xffffffff pc 0x080066c2 msp 0x2000ffec basepri 0x00
r1 0x40013808 r4 0x2000206c r7 0x2000ffec r10 0x00000000 sp 0x2000ffec xPSR 0x41030000 psp 0x00000000 faultmask 0x00
r2 0x00004041 r5 0x00000000 r8 0x00000000 r11 0x00000000 lr 0x080011f3 fpscr 0x00000010 primask 0x00 control 0x04
### Source ##############################################################################################################################################################################################################################
4483 huart->RxISR = NULL;
4484
4485 /* Check current reception Mode :
4486 If Reception till IDLE event has been selected : */
4487 if (huart->ReceptionType == HAL_UART_RECEPTION_TOIDLE)
4488 {
4489 /* Set reception type to Standard */
4490 huart->ReceptionType = HAL_UART_RECEPTION_STANDARD;
4491
4492 /* Disable IDLE interrupt */
4493 ATOMIC_CLEAR_BIT(huart->Instance->CR1, USART_CR1_IDLEIE);
4494
4495 if (__HAL_UART_GET_FLAG(huart, UART_FLAG_IDLE) == SET)
4496 {
4497 /* Clear IDLE Flag */
4498 __HAL_UART_CLEAR_FLAG(huart, UART_CLEAR_IDLEF);
4499 }
4500 #if (USE_HAL_UART_REGISTER_CALLBACKS == 1)
4501 /*Call registered Rx Event callback*/
4502 huart->RxEventCallback(huart, huart->RxXferSize);
### Stack ###############################################################################################################################################################################################################################
[0] from 0x080066c2 in UART_RxISR_16BIT+244 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4493
[1] from 0x00000000
### Threads #############################################################################################################################################################################################################################
[1] id 0 from 0x080066c2 in UART_RxISR_16BIT+244 at Drivers/STM32L4xx_HAL_Driver/Src/stm32l4xx_hal_uart.c:4493
### Variables ###########################################################################################################################################################################################################################
arg huart = 0x2000206c <sbuffer+4780>: {Instance = 0x444b0301,Init = {BaudRate = 34140576,WordLength = …
loc val = 0, tmp = 0x0: 0, uhMask = 0, uhdata = 0
#########################################################################################################################################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0xbcb0 lma 0x80001c0
Loading section .rodata, size 0x460 lma 0x800be70
Loading section .ARM, size 0x8 lma 0x800c2d0
Loading section .init_array, size 0x8 lma 0x800c2d8
Loading section .fini_array, size 0x8 lma 0x800c2e0
Loading section .data, size 0x9a8 lma 0x800c2e8
Start address 0x08006a00, load size 52320
Transfer rate: 31 KB/sec, 5232 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:55
55 {
### Assembly ############################################################################################################################################################################################################################
~
~
~
~
~
0x080069a4 p_serial_mgr_service+0 push {r7}
0x080069a6 p_serial_mgr_service+2 add r7, sp, #0
0x080069a8 p_serial_mgr_service+4 nop
0x080069aa p_serial_mgr_service+6 mov sp, r7
0x080069ac p_serial_mgr_service+8 ldr.w r7, [sp], #4
### Breakpoints #########################################################################################################################################################################################################################
### Expressions #########################################################################################################################################################################################################################
### History #############################################################################################################################################################################################################################
### Memory ##############################################################################################################################################################################################################################
### Registers ###########################################################################################################################################################################################################################
r0 0x00000000 r3 0x00000000 r6 0x00000000 r9 0x00000000 r12 0xffffffff pc 0x080069a4 msp 0x2000fff0 basepri 0x00
r1 0x40013808 r4 0x2000220c r7 0x2000fff0 r10 0x00000000 sp 0x2000fff0 xPSR 0x41030000 psp 0x00000000 faultmask 0x00
r2 0x00004041 r5 0x00000000 r8 0x00000000 r11 0x00000000 lr 0x080011f7 fpscr 0x00000010 primask 0x00 control 0x04
### Source ##############################################################################################################################################################################################################################
45 p_serial_mgr_start();
46 }
47
48 void p_serial_mgr_init(UART_HandleTypeDef *huart, DMA_HandleTypeDef *hdma)
49 {
50 _serial_huart_inst = huart;
51 _serial_dma_inst = hdma;
52 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
53 }
54 void p_serial_mgr_service(void)
55 {
56 // HAL_Delay(100);
57 // PDEBUG("%d\n", __HAL_DMA_GET_COUNTER(_serial_dma_inst));
58 }
59
60 void p_serial_mgr_start()
61 {
62 HAL_UART_Receive_DMA(_serial_huart_inst, sbuffer[active_buffer], MAX_DMA_BUFFER_LEN);
63 }
~
### Stack ###############################################################################################################################################################################################################################
[0] from 0x080069a4 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:55
[1] from 0x080011f6 in main+142 at Core/Src/main.c:147
### Threads #############################################################################################################################################################################################################################
[1] id 0 from 0x080069a4 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:55
### Variables ###########################################################################################################################################################################################################################
#########################################################################################################################################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0xbcb0 lma 0x80001c0
Loading section .rodata, size 0x460 lma 0x800be70
Loading section .ARM, size 0x8 lma 0x800c2d0
Loading section .init_array, size 0x8 lma 0x800c2d8
Loading section .fini_array, size 0x8 lma 0x800c2e0
Loading section .data, size 0x9a8 lma 0x800c2e8
Start address 0x08006a00, load size 52320
Transfer rate: 31 KB/sec, 5232 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:55
55 {
### Assembly ############################################################################################################################################################################################################################
~
~
~
~
~
0x080069a4 p_serial_mgr_service+0 push {r7}
0x080069a6 p_serial_mgr_service+2 add r7, sp, #0
0x080069a8 p_serial_mgr_service+4 nop
0x080069aa p_serial_mgr_service+6 mov sp, r7
0x080069ac p_serial_mgr_service+8 ldr.w r7, [sp], #4
### Breakpoints #########################################################################################################################################################################################################################
### Expressions #########################################################################################################################################################################################################################
### History #############################################################################################################################################################################################################################
### Memory ##############################################################################################################################################################################################################################
### Registers ###########################################################################################################################################################################################################################
r0 0x00000000 r3 0x00000000 r6 0x00000000 r9 0x00000000 r12 0xffffffff pc 0x080069a4 msp 0x2000fff0 basepri 0x00
r1 0x40013808 r4 0x2000220c r7 0x2000fff0 r10 0x00000000 sp 0x2000fff0 xPSR 0x41030000 psp 0x00000000 faultmask 0x00
r2 0x00004041 r5 0x00000000 r8 0x00000000 r11 0x00000000 lr 0x080011f7 fpscr 0x00000010 primask 0x00 control 0x04
### Source ##############################################################################################################################################################################################################################
45 p_serial_mgr_start();
46 }
47
48 void p_serial_mgr_init(UART_HandleTypeDef *huart, DMA_HandleTypeDef *hdma)
49 {
50 _serial_huart_inst = huart;
51 _serial_dma_inst = hdma;
52 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
53 }
54 void p_serial_mgr_service(void)
55 {
56 // HAL_Delay(100);
57 // PDEBUG("%d\n", __HAL_DMA_GET_COUNTER(_serial_dma_inst));
58 }
59
60 void p_serial_mgr_start()
61 {
62 HAL_UART_Receive_DMA(_serial_huart_inst, sbuffer[active_buffer], MAX_DMA_BUFFER_LEN);
63 }
~
### Stack ###############################################################################################################################################################################################################################
[0] from 0x080069a4 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:55
[1] from 0x080011f6 in main+142 at Core/Src/main.c:147
### Threads #############################################################################################################################################################################################################################
[1] id 0 from 0x080069a4 in p_serial_mgr_service+0 at shared/drivers/p_serial_mgr.c:55
### Variables ###########################################################################################################################################################################################################################
#########################################################################################################################################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0xbcb0 lma 0x80001c0
Loading section .rodata, size 0x460 lma 0x800be70
Loading section .ARM, size 0x8 lma 0x800c2d0
Loading section .init_array, size 0x8 lma 0x800c2d8
Loading section .fini_array, size 0x8 lma 0x800c2e0
Loading section .data, size 0x9a8 lma 0x800c2e8
Start address 0x08006a00, load size 52320
Transfer rate: 31 KB/sec, 5232 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]
0x080069aa in p_serial_mgr_service () at shared/drivers/p_serial_mgr.c:55
55 {
### Assembly ############################################################################################################################################################################################################################
~
~
~
~
0x080069a8 p_serial_mgr_service+0 nop
0x080069aa p_serial_mgr_service+2 mov sp, r7
0x080069ac p_serial_mgr_service+4 ldr.w r7, [sp], #4
0x080069b0 p_serial_mgr_service+8 bx lr
0x080069b2 p_serial_mgr_service+10 movs r0, r0
0x080069b4 p_serial_mgr_service+12 push {r7, lr}
### Breakpoints #########################################################################################################################################################################################################################
### Expressions #########################################################################################################################################################################################################################
### History #############################################################################################################################################################################################################################
### Memory ##############################################################################################################################################################################################################################
### Registers ###########################################################################################################################################################################################################################
r0 0x00000000 r3 0x00000000 r6 0x00000000 r9 0x00000000 r12 0xffffffff pc 0x080069aa msp 0x2000ffec basepri 0x00
r1 0x40013808 r4 0x2000220c r7 0x2000ffec r10 0x00000000 sp 0x2000ffec xPSR 0x41030000 psp 0x00000000 faultmask 0x00
r2 0x00004041 r5 0x00000000 r8 0x00000000 r11 0x00000000 lr 0x080011f7 fpscr 0x00000010 primask 0x00 control 0x04
### Source ##############################################################################################################################################################################################################################
45 p_serial_mgr_start();
46 }
47
48 void p_serial_mgr_init(UART_HandleTypeDef *huart, DMA_HandleTypeDef *hdma)
49 {
50 _serial_huart_inst = huart;
51 _serial_dma_inst = hdma;
52 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
53 }
54 void p_serial_mgr_service(void)
55 {
56 // HAL_Delay(100);
57 // PDEBUG("%d\n", __HAL_DMA_GET_COUNTER(_serial_dma_inst));
58 }
59
60 void p_serial_mgr_start()
61 {
62 HAL_UART_Receive_DMA(_serial_huart_inst, sbuffer[active_buffer], MAX_DMA_BUFFER_LEN);
63 }
~
### Stack ###############################################################################################################################################################################################################################
[0] from 0x080069aa in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:55
[1] from 0x080011f6 in main+142 at Core/Src/main.c:147
### Threads #############################################################################################################################################################################################################################
[1] id 0 from 0x080069aa in p_serial_mgr_service+2 at shared/drivers/p_serial_mgr.c:55
### Variables ###########################################################################################################################################################################################################################
#########################################################################################################################################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0xbcb8 lma 0x80001c0
Loading section .rodata, size 0x460 lma 0x800be78
Loading section .ARM, size 0x8 lma 0x800c2d8
Loading section .init_array, size 0x8 lma 0x800c2e0
Loading section .fini_array, size 0x8 lma 0x800c2e8
Loading section .data, size 0x9a8 lma 0x800c2f0
Start address 0x08006a04, load size 52328
Transfer rate: 31 KB/sec, 5232 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:58
58 }
### Assembly ############################################################################################################################################################################################################################
~
~
~
0x080069a4 p_serial_mgr_service+0 ldr r1, [r3, #16]
0x080069a6 p_serial_mgr_service+2 lsrs r0, r0, #32
0x080069a8 p_serial_mgr_service+4 push {r7}
0x080069aa p_serial_mgr_service+6 add r7, sp, #0
0x080069ac p_serial_mgr_service+8 nop
0x080069ae p_serial_mgr_service+10 mov sp, r7
0x080069b0 p_serial_mgr_service+12 ldr.w r7, [sp], #4
### Breakpoints #########################################################################################################################################################################################################################
### Expressions #########################################################################################################################################################################################################################
### History #############################################################################################################################################################################################################################
### Memory ##############################################################################################################################################################################################################################
### Registers ###########################################################################################################################################################################################################################
r0 0x00000000 r3 0x00000000 r6 0x00000000 r9 0x00000000 r12 0xffffffff pc 0x080069a8 msp 0x2000fff0 basepri 0x00
r1 0x40013808 r4 0x2000220c r7 0x2000fff0 r10 0x00000000 sp 0x2000fff0 xPSR 0x41030000 psp 0x00000000 faultmask 0x00
r2 0x00004041 r5 0x00000000 r8 0x00000000 r11 0x00000000 lr 0x080011f7 fpscr 0x00000010 primask 0x00 control 0x04
### Source ##############################################################################################################################################################################################################################
48 void p_serial_mgr_init(UART_HandleTypeDef *huart, DMA_HandleTypeDef *hdma)
49 {
50 _serial_huart_inst = huart;
51 _serial_dma_inst = hdma;
52 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
53 }
54 void p_serial_mgr_service(void)
55 {
56 // HAL_Delay(100);
57 // PDEBUG("%d\n", __HAL_DMA_GET_COUNTER(_serial_dma_inst));
58 }
59
60 void p_serial_mgr_start()
61 {
62 HAL_UART_Receive_DMA(_serial_huart_inst, sbuffer[active_buffer], MAX_DMA_BUFFER_LEN);
63 }
~
~
~
~
### Stack ###############################################################################################################################################################################################################################
[0] from 0x080069a8 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:58
[1] from 0x080011f6 in main+142 at Core/Src/main.c:147
### Threads #############################################################################################################################################################################################################################
[1] id 0 from 0x080069a8 in p_serial_mgr_service+4 at shared/drivers/p_serial_mgr.c:58
### Variables ###########################################################################################################################################################################################################################
#########################################################################################################################################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0xbcb0 lma 0x80001c0
Loading section .rodata, size 0x460 lma 0x800be70
Loading section .ARM, size 0x8 lma 0x800c2d0
Loading section .init_array, size 0x8 lma 0x800c2d8
Loading section .fini_array, size 0x8 lma 0x800c2e0
Loading section .data, size 0x9a8 lma 0x800c2e8
Start address 0x08006a00, load size 52320
Transfer rate: 31 KB/sec, 5232 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]
0x080069aa in p_serial_mgr_init (huart=0x4642ec00, hdma=0x42c80000) at shared/drivers/p_serial_mgr.c:53
53 }
### Assembly ############################################################################################################################################################################################################################
0x080069a0 p_serial_mgr_init+36 ldr r5, [r2, #16]
0x080069a2 p_serial_mgr_init+38 lsrs r0, r0, #32
0x080069a4 p_serial_mgr_init+40 push {r7}
0x080069a6 p_serial_mgr_init+42 add r7, sp, #0
0x080069a8 p_serial_mgr_init+44 nop
0x080069aa p_serial_mgr_init+46 mov sp, r7
0x080069ac p_serial_mgr_init+48 ldr.w r7, [sp], #4
0x080069b0 p_serial_mgr_init+52 bx lr
0x080069b2 p_serial_mgr_init+54 movs r0, r0
~
### Breakpoints #########################################################################################################################################################################################################################
### Expressions #########################################################################################################################################################################################################################
### History #############################################################################################################################################################################################################################
### Memory ##############################################################################################################################################################################################################################
### Registers ###########################################################################################################################################################################################################################
r0 0x00000000 r3 0x00000000 r6 0x00000000 r9 0x00000000 r12 0xffffffff pc 0x080069aa msp 0x2000ffec basepri 0x00
r1 0x40013808 r4 0x2000220c r7 0x2000ffec r10 0x00000000 sp 0x2000ffec xPSR 0x41030000 psp 0x00000000 faultmask 0x00
r2 0x00004041 r5 0x00000000 r8 0x00000000 r11 0x00000000 lr 0x080011f7 fpscr 0x00000010 primask 0x00 control 0x04
### Source ##############################################################################################################################################################################################################################
43 PDEBUG("%s\n", sbuffer[active_buffer]);
44 active_buffer = (active_buffer + 1) % NUM_BUFFERS;
45 p_serial_mgr_start();
46 }
47
48 void p_serial_mgr_init(UART_HandleTypeDef *huart, DMA_HandleTypeDef *hdma)
49 {
50 _serial_huart_inst = huart;
51 _serial_dma_inst = hdma;
52 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
53 }
54 void p_serial_mgr_service(void)
55 {
56 // HAL_Delay(100);
57 // PDEBUG("%d\n", __HAL_DMA_GET_COUNTER(_serial_dma_inst));
58 }
59
60 void p_serial_mgr_start()
61 {
62 HAL_UART_Receive_DMA(_serial_huart_inst, sbuffer[active_buffer], MAX_DMA_BUFFER_LEN);
### Stack ###############################################################################################################################################################################################################################
[0] from 0x080069aa in p_serial_mgr_init+46 at shared/drivers/p_serial_mgr.c:53
[1] from 0x080011f6 in main+142 at Core/Src/main.c:141
### Threads #############################################################################################################################################################################################################################
[1] id 0 from 0x080069aa in p_serial_mgr_init+46 at shared/drivers/p_serial_mgr.c:53
### Variables ###########################################################################################################################################################################################################################
arg huart = 0x4642ec00: {Instance = 0x0,Init = {BaudRate = 0,WordLength = 0,StopBits = 0,Parity = 0,Mod…, hdma = 0x42c80000: {Instance = 0x0,Init = {Request = 0,Direction = 0,PeriphInc = 0,MemInc = 0,Peri…
#########################################################################################################################################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0xbcc0 lma 0x80001c0
Loading section .rodata, size 0x460 lma 0x800be80
Loading section .ARM, size 0x8 lma 0x800c2e0
Loading section .init_array, size 0x8 lma 0x800c2e8
Loading section .fini_array, size 0x8 lma 0x800c2f0
Loading section .data, size 0x9a8 lma 0x800c2f8
Start address 0x08006a10, load size 52336
Transfer rate: 31 KB/sec, 5233 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_start () at shared/drivers/p_serial_mgr.c:62
62 HAL_UART_Receive_DMA(_serial_huart_inst, sbuffer[active_buffer], MAX_DMA_BUFFER_LEN);
### Assembly ############################################################################################################################################################################################################################
~
~
~
~
0x080069bc p_serial_mgr_start+0 ldr.w r7, [sp], #4
0x080069c0 p_serial_mgr_start+4 bx lr
0x080069c2 p_serial_mgr_start+6 movs r0, r0
0x080069c4 p_serial_mgr_start+8 push {r7, lr}
0x080069c6 p_serial_mgr_start+10 add r7, sp, #0
0x080069c8 p_serial_mgr_start+12 ldr r3, [pc, #24] ; (0x80069e4 <p_serial_mgr_start+40>)
### Breakpoints #########################################################################################################################################################################################################################
### Expressions #########################################################################################################################################################################################################################
### History #############################################################################################################################################################################################################################
### Memory ##############################################################################################################################################################################################################################
### Registers ###########################################################################################################################################################################################################################
r0 0x00000000 r3 0x00000000 r6 0x00000000 r9 0x00000000 r12 0xffffffff pc 0x080069c0 msp 0x2000fff0 basepri 0x00
r1 0x40013808 r4 0x2000220c r7 0x2000fff0 r10 0x00000000 sp 0x2000fff0 xPSR 0x41030000 psp 0x00000000 faultmask 0x00
r2 0x00004041 r5 0x00000000 r8 0x00000000 r11 0x00000000 lr 0x080011fd fpscr 0x00000010 primask 0x00 control 0x04
### Source ##############################################################################################################################################################################################################################
52 _serial_huart_inst->RxCpltCallback = UART1_RxCpltCallback;
53 }
54 void p_serial_mgr_service(void)
55 {
56 // HAL_Delay(100);
57 // PDEBUG("%d\n", __HAL_DMA_GET_COUNTER(_serial_dma_inst));
58 }
59
60 void p_serial_mgr_start()
61 {
62 HAL_UART_Receive_DMA(_serial_huart_inst, sbuffer[active_buffer], MAX_DMA_BUFFER_LEN);
63 }
~
~
~
~
~
~
~
~
### Stack ###############################################################################################################################################################################################################################
[0] from 0x080069c0 in p_serial_mgr_start+4 at shared/drivers/p_serial_mgr.c:62
[1] from 0x00000000
### Threads #############################################################################################################################################################################################################################
[1] id 0 from 0x080069c0 in p_serial_mgr_start+4 at shared/drivers/p_serial_mgr.c:62
### Variables ###########################################################################################################################################################################################################################
#########################################################################################################################################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0xbcb8 lma 0x80001c0
Loading section .rodata, size 0x460 lma 0x800be78
Loading section .ARM, size 0x8 lma 0x800c2d8
Loading section .init_array, size 0x8 lma 0x800c2e0
Loading section .fini_array, size 0x8 lma 0x800c2e8
Loading section .data, size 0x9a8 lma 0x800c2f0
Start address 0x08006a08, load size 52328
Transfer rate: 31 KB/sec, 5232 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]
0x080011fc in main () at Core/Src/main.c:148
148 p_serial_mgr_service();
### Assembly ############################################################################################################################################################################################################################
0x080011ec main+132 bl 0x8001c3c <HAL_TIM_Base_Start_IT>
0x080011f0 main+136 bl 0x80069bc <p_serial_mgr_start>
0x080011f4 main+140 movs r3, #0
0x080011f6 main+142 strh r3, [r7, #6]
0x080011f8 main+144 bl 0x80069ac <p_serial_mgr_service>
0x080011fc main+148 b.n 0x80011f8 <main+144>
0x080011fe main+150 nop
0x08001200 main+152 lsrs r4, r5, #18
0x08001202 main+154 movs r0, #0
0x08001204 main+156 asrs r1, r4, #24
### Breakpoints #########################################################################################################################################################################################################################
### Expressions #########################################################################################################################################################################################################################
### History #############################################################################################################################################################################################################################
### Memory ##############################################################################################################################################################################################################################
### Registers ###########################################################################################################################################################################################################################
r0 0x00000000 r3 0x00000000 r6 0x00000000 r9 0x00000000 r12 0xffffffff pc 0x080011fc msp 0x2000fff0 basepri 0x00
r1 0x40013808 r4 0x2000220c r7 0x2000fff0 r10 0x00000000 sp 0x2000fff0 xPSR 0x41030000 psp 0x00000000 faultmask 0x00
r2 0x00004041 r5 0x00000000 r8 0x00000000 r11 0x00000000 lr 0x080011fd fpscr 0x00000010 primask 0x00 control 0x04
### Source ##############################################################################################################################################################################################################################
138
139 p_serial_mgr_start();
140
141 uint16_t motor_degrees = 0;
142 /* USER CODE END 2 */
143
144 /* Infinite loop */
145 /* USER CODE BEGIN WHILE */
146 while (1)
147 {
148 p_serial_mgr_service();
149 // if (b_timer_struck)
150 // {
151 // // PDEBUG("%d\n", sys_time);
152 // b_timer_struck = false;
153 // motor_degrees = (motor_degrees + 1) % 360;
154 // mc_service(motor_degrees, 50);
155 // }
156 // serial_pkt_t *pkt = NULL;
157 // if ((pkt = p_serial_mgr_service()) != NULL)
### Stack ###############################################################################################################################################################################################################################
[0] from 0x080011fc in main+148 at Core/Src/main.c:148
### Threads #############################################################################################################################################################################################################################
[1] id 0 from 0x080011fc in main+148 at Core/Src/main.c:148
### Variables ###########################################################################################################################################################################################################################
loc motor_degrees = 0
#########################################################################################################################################################################################################################################
Loading section .isr_vector, size 0x190 lma 0x8000000
Loading section .text, size 0xbcb8 lma 0x80001c0
Loading section .rodata, size 0x460 lma 0x800be78
Loading section .ARM, size 0x8 lma 0x800c2d8
Loading section .init_array, size 0x8 lma 0x800c2e0
Loading section .fini_array, size 0x8 lma 0x800c2e8
Loading section .data, size 0x9a8 lma 0x800c2f0
Start address 0x08006a08, load size 52328
Transfer rate: 31 KB/sec, 5232 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]