ARM GAS C:\Users\nived\AppData\Local\Temp\ccGoFqlX.s page 1 1 .cpu cortex-m4 2 .arch armv7e-m 3 .fpu fpv4-sp-d16 4 .eabi_attribute 27, 1 5 .eabi_attribute 28, 1 6 .eabi_attribute 20, 1 7 .eabi_attribute 21, 1 8 .eabi_attribute 23, 3 9 .eabi_attribute 24, 1 10 .eabi_attribute 25, 1 11 .eabi_attribute 26, 1 12 .eabi_attribute 30, 1 13 .eabi_attribute 34, 1 14 .eabi_attribute 18, 4 15 .file "CAN_Communication.c" 16 .text 17 .Ltext0: 18 .cfi_sections .debug_frame 19 .file 1 "Core/Src/CAN_Communication.c" 20 .section .text.can_init,"ax",%progbits 21 .align 1 22 .global can_init 23 .syntax unified 24 .thumb 25 .thumb_func 27 can_init: 28 .LVL0: 29 .LFB130: 1:Core/Src/CAN_Communication.c **** /* 2:Core/Src/CAN_Communication.c **** * CAN_Communication.c 3:Core/Src/CAN_Communication.c **** * 4:Core/Src/CAN_Communication.c **** * Created on: 24. April, 2024 5:Core/Src/CAN_Communication.c **** * Author: nived 6:Core/Src/CAN_Communication.c **** */ 7:Core/Src/CAN_Communication.c **** #include "CAN_Communication.h" 8:Core/Src/CAN_Communication.c **** #include "Channel_Control.h" 9:Core/Src/CAN_Communication.c **** #include "Current_Monitoring.h" 10:Core/Src/CAN_Communication.c **** 11:Core/Src/CAN_Communication.c **** rx_status_frame rxstate = {}; 12:Core/Src/CAN_Communication.c **** volatile uint8_t canmsg_received = 0; 13:Core/Src/CAN_Communication.c **** extern PortExtenderGPIO EN_Ports; 14:Core/Src/CAN_Communication.c **** extern CurrentMeasurements current_measurements_adc_val; 15:Core/Src/CAN_Communication.c **** 16:Core/Src/CAN_Communication.c **** void can_init(CAN_HandleTypeDef* hcan) { 30 .loc 1 16 40 view -0 31 .cfi_startproc 32 @ args = 0, pretend = 0, frame = 0 33 @ frame_needed = 0, uses_anonymous_args = 0 34 .loc 1 16 40 is_stmt 0 view .LVU1 35 0000 08B5 push {r3, lr} 36 .cfi_def_cfa_offset 8 37 .cfi_offset 3, -8 38 .cfi_offset 14, -4 17:Core/Src/CAN_Communication.c **** ftcan_init(hcan); 39 .loc 1 17 3 is_stmt 1 view .LVU2 40 0002 FFF7FEFF bl ftcan_init 41 .LVL1: ARM GAS C:\Users\nived\AppData\Local\Temp\ccGoFqlX.s page 2 18:Core/Src/CAN_Communication.c **** ftcan_add_filter(0x00, 0x00); // No Filter 42 .loc 1 18 3 view .LVU3 43 0006 0021 movs r1, #0 44 0008 0846 mov r0, r1 45 000a FFF7FEFF bl ftcan_add_filter 46 .LVL2: 19:Core/Src/CAN_Communication.c **** } 47 .loc 1 19 1 is_stmt 0 view .LVU4 48 000e 08BD pop {r3, pc} 49 .cfi_endproc 50 .LFE130: 52 .section .text.can_sendloop,"ax",%progbits 53 .align 1 54 .global can_sendloop 55 .syntax unified 56 .thumb 57 .thumb_func 59 can_sendloop: 60 .LFB131: 20:Core/Src/CAN_Communication.c **** 21:Core/Src/CAN_Communication.c **** void can_sendloop() { 61 .loc 1 21 21 is_stmt 1 view -0 62 .cfi_startproc 63 @ args = 0, pretend = 0, frame = 8 64 @ frame_needed = 0, uses_anonymous_args = 0 65 0000 00B5 push {lr} 66 .cfi_def_cfa_offset 4 67 .cfi_offset 14, -4 68 0002 83B0 sub sp, sp, #12 69 .cfi_def_cfa_offset 16 22:Core/Src/CAN_Communication.c **** static uint8_t additionaltxcouter = 0; 70 .loc 1 22 3 view .LVU6 23:Core/Src/CAN_Communication.c **** 24:Core/Src/CAN_Communication.c **** uint8_t status_data[7]; 71 .loc 1 24 3 view .LVU7 25:Core/Src/CAN_Communication.c **** status_data[0] = EN_Ports.porta.porta; 72 .loc 1 25 3 view .LVU8 73 .loc 1 25 34 is_stmt 0 view .LVU9 74 0004 0F4B ldr r3, .L5 75 0006 1A78 ldrb r2, [r3] @ zero_extendqisi2 76 .loc 1 25 18 view .LVU10 77 0008 8DF80020 strb r2, [sp] 26:Core/Src/CAN_Communication.c **** status_data[1] = EN_Ports.portb.portb; 78 .loc 1 26 3 is_stmt 1 view .LVU11 79 .loc 1 26 34 is_stmt 0 view .LVU12 80 000c 5B78 ldrb r3, [r3, #1] @ zero_extendqisi2 81 .loc 1 26 18 view .LVU13 82 000e 8DF80130 strb r3, [sp, #1] 27:Core/Src/CAN_Communication.c **** status_data[2] = rxstate.tsacfans; 83 .loc 1 27 3 is_stmt 1 view .LVU14 84 .loc 1 27 27 is_stmt 0 view .LVU15 85 0012 0D4B ldr r3, .L5+4 86 0014 DA78 ldrb r2, [r3, #3] @ zero_extendqisi2 87 .loc 1 27 18 view .LVU16 88 0016 8DF80220 strb r2, [sp, #2] 28:Core/Src/CAN_Communication.c **** status_data[3] = rxstate.radiatorfans; 89 .loc 1 28 3 is_stmt 1 view .LVU17 ARM GAS C:\Users\nived\AppData\Local\Temp\ccGoFqlX.s page 3 90 .loc 1 28 27 is_stmt 0 view .LVU18 91 001a 9A78 ldrb r2, [r3, #2] @ zero_extendqisi2 92 .loc 1 28 18 view .LVU19 93 001c 8DF80320 strb r2, [sp, #3] 29:Core/Src/CAN_Communication.c **** status_data[4] = rxstate.pwmaggregat; 94 .loc 1 29 3 is_stmt 1 view .LVU20 95 .loc 1 29 27 is_stmt 0 view .LVU21 96 0020 1A79 ldrb r2, [r3, #4] @ zero_extendqisi2 97 .loc 1 29 18 view .LVU22 98 0022 8DF80420 strb r2, [sp, #4] 30:Core/Src/CAN_Communication.c **** status_data[5] = rxstate.pwmpumps; 99 .loc 1 30 3 is_stmt 1 view .LVU23 100 .loc 1 30 27 is_stmt 0 view .LVU24 101 0026 5A79 ldrb r2, [r3, #5] @ zero_extendqisi2 102 .loc 1 30 18 view .LVU25 103 0028 8DF80520 strb r2, [sp, #5] 31:Core/Src/CAN_Communication.c **** status_data[6] = 0xFF ^ rxstate.checksum; 104 .loc 1 31 3 is_stmt 1 view .LVU26 105 .loc 1 31 34 is_stmt 0 view .LVU27 106 002c 9B79 ldrb r3, [r3, #6] @ zero_extendqisi2 107 .loc 1 31 18 view .LVU28 108 002e DB43 mvns r3, r3 109 0030 8DF80630 strb r3, [sp, #6] 32:Core/Src/CAN_Communication.c **** ftcan_transmit(TX_STATUS_MSG_ID, status_data, 7); 110 .loc 1 32 3 is_stmt 1 view .LVU29 111 0034 0722 movs r2, #7 112 0036 6946 mov r1, sp 113 0038 C920 movs r0, #201 114 003a FFF7FEFF bl ftcan_transmit 115 .LVL3: 33:Core/Src/CAN_Communication.c **** 34:Core/Src/CAN_Communication.c **** uint8_t data[8]; 116 .loc 1 34 3 view .LVU30 35:Core/Src/CAN_Communication.c **** return; 117 .loc 1 35 1 view .LVU31 36:Core/Src/CAN_Communication.c **** if (additionaltxcouter < 4) { 37:Core/Src/CAN_Communication.c **** switch (additionaltxcouter) { 38:Core/Src/CAN_Communication.c **** case 0: 39:Core/Src/CAN_Communication.c **** 40:Core/Src/CAN_Communication.c **** data[0] = current_measurements_adc_val.always_on >> 8; 41:Core/Src/CAN_Communication.c **** data[1] = current_measurements_adc_val.always_on & 0xFF; 42:Core/Src/CAN_Communication.c **** data[2] = current_measurements_adc_val.misc >> 8; 43:Core/Src/CAN_Communication.c **** data[3] = current_measurements_adc_val.misc & 0xFF; 44:Core/Src/CAN_Communication.c **** data[4] = current_measurements_adc_val.inverter >> 8; 45:Core/Src/CAN_Communication.c **** data[5] = current_measurements_adc_val.inverter & 0xFF; 46:Core/Src/CAN_Communication.c **** data[6] = current_measurements_adc_val.shutdown_circuit >> 8; 47:Core/Src/CAN_Communication.c **** data[7] = current_measurements_adc_val.shutdown_circuit & 0xFF; 48:Core/Src/CAN_Communication.c **** ftcan_transmit(CUR_CHANNELS_1_ID, data, 8); 49:Core/Src/CAN_Communication.c **** 50:Core/Src/CAN_Communication.c **** break; 51:Core/Src/CAN_Communication.c **** case 1: 52:Core/Src/CAN_Communication.c **** 53:Core/Src/CAN_Communication.c **** data[0] = current_measurements_adc_val.fans >> 8; 54:Core/Src/CAN_Communication.c **** data[1] = current_measurements_adc_val.fans & 0xFF; 55:Core/Src/CAN_Communication.c **** data[2] = current_measurements_adc_val.pumps >> 8; 56:Core/Src/CAN_Communication.c **** data[3] = current_measurements_adc_val.pumps & 0xFF; 57:Core/Src/CAN_Communication.c **** data[4] = current_measurements_adc_val.aggregat >> 8; ARM GAS C:\Users\nived\AppData\Local\Temp\ccGoFqlX.s page 4 58:Core/Src/CAN_Communication.c **** data[5] = current_measurements_adc_val.aggregat & 0xFF; 59:Core/Src/CAN_Communication.c **** data[6] = current_measurements_adc_val.steering >> 8; 60:Core/Src/CAN_Communication.c **** data[7] = current_measurements_adc_val.steering & 0xFF; 61:Core/Src/CAN_Communication.c **** ftcan_transmit(CUR_CHANNELS_2_ID, data, 8); 62:Core/Src/CAN_Communication.c **** 63:Core/Src/CAN_Communication.c **** break; 64:Core/Src/CAN_Communication.c **** case 2: 65:Core/Src/CAN_Communication.c **** 66:Core/Src/CAN_Communication.c **** data[0] = current_measurements_adc_val.ebsvalve_1 >> 8; 67:Core/Src/CAN_Communication.c **** data[1] = current_measurements_adc_val.ebsvalve_1 & 0xFF; 68:Core/Src/CAN_Communication.c **** data[2] = current_measurements_adc_val.ebsvalve_2 >> 8; 69:Core/Src/CAN_Communication.c **** data[3] = current_measurements_adc_val.ebsvalve_2 & 0xFF; 70:Core/Src/CAN_Communication.c **** data[4] = current_measurements_adc_val.modevalve_1 >> 8; 71:Core/Src/CAN_Communication.c **** data[5] = current_measurements_adc_val.modevalve_1 & 0xFF; 72:Core/Src/CAN_Communication.c **** data[6] = current_measurements_adc_val.modevalve_2 >> 8; 73:Core/Src/CAN_Communication.c **** data[7] = current_measurements_adc_val.modevalve_2 & 0xFF; 74:Core/Src/CAN_Communication.c **** ftcan_transmit(CUR_CHANNELS_3_ID, data, 8); 75:Core/Src/CAN_Communication.c **** 76:Core/Src/CAN_Communication.c **** break; 77:Core/Src/CAN_Communication.c **** case 3: 78:Core/Src/CAN_Communication.c **** 79:Core/Src/CAN_Communication.c **** data[0] = current_measurements_adc_val.sensorbox >> 8; 80:Core/Src/CAN_Communication.c **** data[1] = current_measurements_adc_val.sensorbox & 0xFF; 81:Core/Src/CAN_Communication.c **** data[2] = current_measurements_adc_val.servicebrake >> 8; 82:Core/Src/CAN_Communication.c **** data[3] = current_measurements_adc_val.servicebrake & 0xFF; 83:Core/Src/CAN_Communication.c **** data[4] = current_measurements_adc_val.servos >> 8; 84:Core/Src/CAN_Communication.c **** data[5] = current_measurements_adc_val.servos & 0xFF; 85:Core/Src/CAN_Communication.c **** data[6] = current_measurements_adc_val.shutdown_circuit >> 8; 86:Core/Src/CAN_Communication.c **** data[7] = current_measurements_adc_val.shutdown_circuit & 0xFF; 87:Core/Src/CAN_Communication.c **** ftcan_transmit(CUR_CHANNELS_4_ID, data, 8); 88:Core/Src/CAN_Communication.c **** 89:Core/Src/CAN_Communication.c **** break; 90:Core/Src/CAN_Communication.c **** default: 91:Core/Src/CAN_Communication.c **** break; 92:Core/Src/CAN_Communication.c **** } 93:Core/Src/CAN_Communication.c **** additionaltxcouter++; 94:Core/Src/CAN_Communication.c **** } else { 95:Core/Src/CAN_Communication.c **** additionaltxcouter = 0; 96:Core/Src/CAN_Communication.c **** } 97:Core/Src/CAN_Communication.c **** } 118 .loc 1 97 1 is_stmt 0 view .LVU32 119 003e 03B0 add sp, sp, #12 120 .cfi_def_cfa_offset 4 121 @ sp needed 122 0040 5DF804FB ldr pc, [sp], #4 123 .L6: 124 .align 2 125 .L5: 126 0044 00000000 .word EN_Ports 127 0048 00000000 .word rxstate 128 .cfi_endproc 129 .LFE131: 131 .section .text.ftcan_msg_received_cb,"ax",%progbits 132 .align 1 133 .global ftcan_msg_received_cb 134 .syntax unified 135 .thumb ARM GAS C:\Users\nived\AppData\Local\Temp\ccGoFqlX.s page 5 136 .thumb_func 138 ftcan_msg_received_cb: 139 .LVL4: 140 .LFB132: 98:Core/Src/CAN_Communication.c **** 99:Core/Src/CAN_Communication.c **** void ftcan_msg_received_cb(uint16_t id, size_t datalen, const uint8_t* data) { 141 .loc 1 99 78 is_stmt 1 view -0 142 .cfi_startproc 143 @ args = 0, pretend = 0, frame = 0 144 @ frame_needed = 0, uses_anonymous_args = 0 145 @ link register save eliminated. 100:Core/Src/CAN_Communication.c **** canmsg_received = 1; 146 .loc 1 100 3 view .LVU34 147 .loc 1 100 19 is_stmt 0 view .LVU35 148 0000 0C4B ldr r3, .L10 149 0002 4FF0010C mov ip, #1 150 0006 83F800C0 strb ip, [r3] 101:Core/Src/CAN_Communication.c **** if ((id == RX_STATUS_MSG_ID) && (datalen == 7)) { 151 .loc 1 101 3 is_stmt 1 view .LVU36 152 .loc 1 101 6 is_stmt 0 view .LVU37 153 000a C828 cmp r0, #200 154 000c 00D0 beq .L9 155 .LVL5: 156 .L7: 102:Core/Src/CAN_Communication.c **** rxstate.iostatus.porta.porta = data[0]; 103:Core/Src/CAN_Communication.c **** rxstate.iostatus.portb.portb = data[1]; 104:Core/Src/CAN_Communication.c **** rxstate.radiatorfans = data[2]; 105:Core/Src/CAN_Communication.c **** rxstate.tsacfans = data[3]; 106:Core/Src/CAN_Communication.c **** rxstate.pwmaggregat = data[4]; 107:Core/Src/CAN_Communication.c **** rxstate.pwmpumps = data[5]; 108:Core/Src/CAN_Communication.c **** rxstate.checksum = data[6]; 109:Core/Src/CAN_Communication.c **** } 110:Core/Src/CAN_Communication.c **** } 157 .loc 1 110 1 view .LVU38 158 000e 7047 bx lr 159 .LVL6: 160 .L9: 101:Core/Src/CAN_Communication.c **** if ((id == RX_STATUS_MSG_ID) && (datalen == 7)) { 161 .loc 1 101 32 discriminator 1 view .LVU39 162 0010 0729 cmp r1, #7 163 0012 FCD1 bne .L7 102:Core/Src/CAN_Communication.c **** rxstate.iostatus.porta.porta = data[0]; 164 .loc 1 102 5 is_stmt 1 view .LVU40 102:Core/Src/CAN_Communication.c **** rxstate.iostatus.porta.porta = data[0]; 165 .loc 1 102 40 is_stmt 0 view .LVU41 166 0014 1178 ldrb r1, [r2] @ zero_extendqisi2 167 .LVL7: 102:Core/Src/CAN_Communication.c **** rxstate.iostatus.porta.porta = data[0]; 168 .loc 1 102 34 view .LVU42 169 0016 084B ldr r3, .L10+4 170 0018 1970 strb r1, [r3] 103:Core/Src/CAN_Communication.c **** rxstate.radiatorfans = data[2]; 171 .loc 1 103 5 is_stmt 1 view .LVU43 103:Core/Src/CAN_Communication.c **** rxstate.radiatorfans = data[2]; 172 .loc 1 103 40 is_stmt 0 view .LVU44 173 001a 5178 ldrb r1, [r2, #1] @ zero_extendqisi2 103:Core/Src/CAN_Communication.c **** rxstate.radiatorfans = data[2]; ARM GAS C:\Users\nived\AppData\Local\Temp\ccGoFqlX.s page 6 174 .loc 1 103 34 view .LVU45 175 001c 5970 strb r1, [r3, #1] 104:Core/Src/CAN_Communication.c **** rxstate.tsacfans = data[3]; 176 .loc 1 104 5 is_stmt 1 view .LVU46 104:Core/Src/CAN_Communication.c **** rxstate.tsacfans = data[3]; 177 .loc 1 104 32 is_stmt 0 view .LVU47 178 001e 9178 ldrb r1, [r2, #2] @ zero_extendqisi2 104:Core/Src/CAN_Communication.c **** rxstate.tsacfans = data[3]; 179 .loc 1 104 26 view .LVU48 180 0020 9970 strb r1, [r3, #2] 105:Core/Src/CAN_Communication.c **** rxstate.pwmaggregat = data[4]; 181 .loc 1 105 5 is_stmt 1 view .LVU49 105:Core/Src/CAN_Communication.c **** rxstate.pwmaggregat = data[4]; 182 .loc 1 105 28 is_stmt 0 view .LVU50 183 0022 D178 ldrb r1, [r2, #3] @ zero_extendqisi2 105:Core/Src/CAN_Communication.c **** rxstate.pwmaggregat = data[4]; 184 .loc 1 105 22 view .LVU51 185 0024 D970 strb r1, [r3, #3] 106:Core/Src/CAN_Communication.c **** rxstate.pwmpumps = data[5]; 186 .loc 1 106 5 is_stmt 1 view .LVU52 106:Core/Src/CAN_Communication.c **** rxstate.pwmpumps = data[5]; 187 .loc 1 106 31 is_stmt 0 view .LVU53 188 0026 1179 ldrb r1, [r2, #4] @ zero_extendqisi2 106:Core/Src/CAN_Communication.c **** rxstate.pwmpumps = data[5]; 189 .loc 1 106 25 view .LVU54 190 0028 1971 strb r1, [r3, #4] 107:Core/Src/CAN_Communication.c **** rxstate.checksum = data[6]; 191 .loc 1 107 5 is_stmt 1 view .LVU55 107:Core/Src/CAN_Communication.c **** rxstate.checksum = data[6]; 192 .loc 1 107 28 is_stmt 0 view .LVU56 193 002a 5179 ldrb r1, [r2, #5] @ zero_extendqisi2 107:Core/Src/CAN_Communication.c **** rxstate.checksum = data[6]; 194 .loc 1 107 22 view .LVU57 195 002c 5971 strb r1, [r3, #5] 108:Core/Src/CAN_Communication.c **** } 196 .loc 1 108 5 is_stmt 1 view .LVU58 108:Core/Src/CAN_Communication.c **** } 197 .loc 1 108 28 is_stmt 0 view .LVU59 198 002e 9279 ldrb r2, [r2, #6] @ zero_extendqisi2 199 .LVL8: 108:Core/Src/CAN_Communication.c **** } 200 .loc 1 108 22 view .LVU60 201 0030 9A71 strb r2, [r3, #6] 202 .loc 1 110 1 view .LVU61 203 0032 ECE7 b .L7 204 .L11: 205 .align 2 206 .L10: 207 0034 00000000 .word canmsg_received 208 0038 00000000 .word rxstate 209 .cfi_endproc 210 .LFE132: 212 .global canmsg_received 213 .section .bss.canmsg_received,"aw",%nobits 216 canmsg_received: 217 0000 00 .space 1 218 .global rxstate ARM GAS C:\Users\nived\AppData\Local\Temp\ccGoFqlX.s page 7 219 .section .bss.rxstate,"aw",%nobits 220 .align 2 223 rxstate: 224 0000 00000000 .space 8 224 00000000 225 .text 226 .Letext0: 227 .file 2 "c:\\users\\nived\\appdata\\roaming\\code\\user\\globalstorage\\bmd.stm32-for-vscode\\@xpa 228 .file 3 "c:\\users\\nived\\appdata\\roaming\\code\\user\\globalstorage\\bmd.stm32-for-vscode\\@xpa 229 .file 4 "Drivers/CMSIS/Device/ST/STM32F3xx/Include/stm32f302xc.h" 230 .file 5 "Drivers/CMSIS/Device/ST/STM32F3xx/Include/stm32f3xx.h" 231 .file 6 "c:\\users\\nived\\appdata\\roaming\\code\\user\\globalstorage\\bmd.stm32-for-vscode\\@xpa 232 .file 7 "Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_def.h" 233 .file 8 "Drivers/STM32F3xx_HAL_Driver/Inc/stm32f3xx_hal_can.h" 234 .file 9 "Core/Inc/Channel_Control.h" 235 .file 10 "Core/Inc/CAN_Communication.h" 236 .file 11 "Core/Inc/can-halal.h" ARM GAS C:\Users\nived\AppData\Local\Temp\ccGoFqlX.s page 8 DEFINED SYMBOLS *ABS*:00000000 CAN_Communication.c C:\Users\nived\AppData\Local\Temp\ccGoFqlX.s:21 .text.can_init:00000000 $t C:\Users\nived\AppData\Local\Temp\ccGoFqlX.s:27 .text.can_init:00000000 can_init C:\Users\nived\AppData\Local\Temp\ccGoFqlX.s:53 .text.can_sendloop:00000000 $t C:\Users\nived\AppData\Local\Temp\ccGoFqlX.s:59 .text.can_sendloop:00000000 can_sendloop C:\Users\nived\AppData\Local\Temp\ccGoFqlX.s:126 .text.can_sendloop:00000044 $d C:\Users\nived\AppData\Local\Temp\ccGoFqlX.s:223 .bss.rxstate:00000000 rxstate C:\Users\nived\AppData\Local\Temp\ccGoFqlX.s:132 .text.ftcan_msg_received_cb:00000000 $t C:\Users\nived\AppData\Local\Temp\ccGoFqlX.s:138 .text.ftcan_msg_received_cb:00000000 ftcan_msg_received_cb C:\Users\nived\AppData\Local\Temp\ccGoFqlX.s:207 .text.ftcan_msg_received_cb:00000034 $d C:\Users\nived\AppData\Local\Temp\ccGoFqlX.s:216 .bss.canmsg_received:00000000 canmsg_received C:\Users\nived\AppData\Local\Temp\ccGoFqlX.s:217 .bss.canmsg_received:00000000 $d C:\Users\nived\AppData\Local\Temp\ccGoFqlX.s:220 .bss.rxstate:00000000 $d UNDEFINED SYMBOLS ftcan_init ftcan_add_filter ftcan_transmit EN_Ports