Files
squeow/squeow_sw/build/sysmem.lst
2025-06-28 00:58:29 +02:00

234 lines
10 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
ARM GAS /tmp/ccRdhNuV.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 "sysmem.c"
16 .text
17 .Ltext0:
18 .cfi_sections .debug_frame
19 .file 1 "Src/sysmem.c"
20 .section .text._sbrk,"ax",%progbits
21 .align 1
22 .global _sbrk
23 .syntax unified
24 .thumb
25 .thumb_func
27 _sbrk:
28 .LVL0:
29 .LFB0:
1:Src/sysmem.c **** /**
2:Src/sysmem.c **** ******************************************************************************
3:Src/sysmem.c **** * @file sysmem.c
4:Src/sysmem.c **** * @author Generated by STM32CubeMX
5:Src/sysmem.c **** * @brief System Memory calls file
6:Src/sysmem.c **** *
7:Src/sysmem.c **** * For more information about which C functions
8:Src/sysmem.c **** * need which of these lowlevel functions
9:Src/sysmem.c **** * please consult the newlib libc manual
10:Src/sysmem.c **** ******************************************************************************
11:Src/sysmem.c **** * @attention
12:Src/sysmem.c **** *
13:Src/sysmem.c **** * Copyright (c) 2024 STMicroelectronics.
14:Src/sysmem.c **** * All rights reserved.
15:Src/sysmem.c **** *
16:Src/sysmem.c **** * This software is licensed under terms that can be found in the LICENSE file
17:Src/sysmem.c **** * in the root directory of this software component.
18:Src/sysmem.c **** * If no LICENSE file comes with this software, it is provided AS-IS.
19:Src/sysmem.c **** *
20:Src/sysmem.c **** ******************************************************************************
21:Src/sysmem.c **** */
22:Src/sysmem.c ****
23:Src/sysmem.c **** /* Includes */
24:Src/sysmem.c **** #include <errno.h>
25:Src/sysmem.c **** #include <stdint.h>
26:Src/sysmem.c ****
27:Src/sysmem.c **** /**
28:Src/sysmem.c **** * Pointer to the current high watermark of the heap usage
29:Src/sysmem.c **** */
ARM GAS /tmp/ccRdhNuV.s page 2
30:Src/sysmem.c **** static uint8_t *__sbrk_heap_end = NULL;
31:Src/sysmem.c ****
32:Src/sysmem.c **** /**
33:Src/sysmem.c **** * @brief _sbrk() allocates memory to the newlib heap and is used by malloc
34:Src/sysmem.c **** * and others from the C library
35:Src/sysmem.c **** *
36:Src/sysmem.c **** * @verbatim
37:Src/sysmem.c **** * ############################################################################
38:Src/sysmem.c **** * # .data # .bss # newlib heap # MSP stack #
39:Src/sysmem.c **** * # # # # Reserved by _Min_Stack_Size #
40:Src/sysmem.c **** * ############################################################################
41:Src/sysmem.c **** * ^-- RAM start ^-- _end _estack, RAM end --^
42:Src/sysmem.c **** * @endverbatim
43:Src/sysmem.c **** *
44:Src/sysmem.c **** * This implementation starts allocating at the '_end' linker symbol
45:Src/sysmem.c **** * The '_Min_Stack_Size' linker symbol reserves a memory for the MSP stack
46:Src/sysmem.c **** * The implementation considers '_estack' linker symbol to be RAM end
47:Src/sysmem.c **** * NOTE: If the MSP stack, at any point during execution, grows larger than the
48:Src/sysmem.c **** * reserved size, please increase the '_Min_Stack_Size'.
49:Src/sysmem.c **** *
50:Src/sysmem.c **** * @param incr Memory size
51:Src/sysmem.c **** * @return Pointer to allocated memory
52:Src/sysmem.c **** */
53:Src/sysmem.c **** void *_sbrk(ptrdiff_t incr)
54:Src/sysmem.c **** {
30 .loc 1 54 1 view -0
31 .cfi_startproc
32 @ args = 0, pretend = 0, frame = 0
33 @ frame_needed = 0, uses_anonymous_args = 0
34 .loc 1 54 1 is_stmt 0 view .LVU1
35 0000 10B5 push {r4, lr}
36 .LCFI0:
37 .cfi_def_cfa_offset 8
38 .cfi_offset 4, -8
39 .cfi_offset 14, -4
40 0002 0346 mov r3, r0
55:Src/sysmem.c **** extern uint8_t _end; /* Symbol defined in the linker script */
41 .loc 1 55 3 is_stmt 1 view .LVU2
56:Src/sysmem.c **** extern uint8_t _estack; /* Symbol defined in the linker script */
42 .loc 1 56 3 view .LVU3
57:Src/sysmem.c **** extern uint32_t _Min_Stack_Size; /* Symbol defined in the linker script */
43 .loc 1 57 3 view .LVU4
58:Src/sysmem.c **** const uint32_t stack_limit = (uint32_t)&_estack - (uint32_t)&_Min_Stack_Size;
44 .loc 1 58 3 view .LVU5
45 .LVL1:
59:Src/sysmem.c **** const uint8_t *max_heap = (uint8_t *)stack_limit;
46 .loc 1 59 3 view .LVU6
58:Src/sysmem.c **** const uint32_t stack_limit = (uint32_t)&_estack - (uint32_t)&_Min_Stack_Size;
47 .loc 1 58 51 is_stmt 0 view .LVU7
48 0004 0C4A ldr r2, .L8
49 0006 0D49 ldr r1, .L8+4
50 .LVL2:
60:Src/sysmem.c **** uint8_t *prev_heap_end;
51 .loc 1 60 3 is_stmt 1 view .LVU8
61:Src/sysmem.c ****
62:Src/sysmem.c **** /* Initialize heap end at first call */
63:Src/sysmem.c **** if (NULL == __sbrk_heap_end)
ARM GAS /tmp/ccRdhNuV.s page 3
52 .loc 1 63 3 view .LVU9
53 .loc 1 63 12 is_stmt 0 view .LVU10
54 0008 0D48 ldr r0, .L8+8
55 .LVL3:
56 .loc 1 63 12 view .LVU11
57 000a 0068 ldr r0, [r0]
58 .loc 1 63 6 view .LVU12
59 000c 40B1 cbz r0, .L6
60 .L2:
64:Src/sysmem.c **** {
65:Src/sysmem.c **** __sbrk_heap_end = &_end;
66:Src/sysmem.c **** }
67:Src/sysmem.c ****
68:Src/sysmem.c **** /* Protect heap from growing into the reserved MSP stack */
69:Src/sysmem.c **** if (__sbrk_heap_end + incr > max_heap)
61 .loc 1 69 3 is_stmt 1 view .LVU13
62 .loc 1 69 23 is_stmt 0 view .LVU14
63 000e 0C48 ldr r0, .L8+8
64 0010 0068 ldr r0, [r0]
65 0012 0344 add r3, r3, r0
66 .LVL4:
67 .loc 1 69 6 view .LVU15
68 0014 521A subs r2, r2, r1
69 0016 9342 cmp r3, r2
70 0018 06D8 bhi .L7
70:Src/sysmem.c **** {
71:Src/sysmem.c **** errno = ENOMEM;
72:Src/sysmem.c **** return (void *)-1;
73:Src/sysmem.c **** }
74:Src/sysmem.c ****
75:Src/sysmem.c **** prev_heap_end = __sbrk_heap_end;
71 .loc 1 75 3 is_stmt 1 view .LVU16
72 .LVL5:
76:Src/sysmem.c **** __sbrk_heap_end += incr;
73 .loc 1 76 3 view .LVU17
74 .loc 1 76 19 is_stmt 0 view .LVU18
75 001a 094A ldr r2, .L8+8
76 001c 1360 str r3, [r2]
77:Src/sysmem.c ****
78:Src/sysmem.c **** return (void *)prev_heap_end;
77 .loc 1 78 3 is_stmt 1 view .LVU19
78 .LVL6:
79 .L1:
79:Src/sysmem.c **** }
80 .loc 1 79 1 is_stmt 0 view .LVU20
81 001e 10BD pop {r4, pc}
82 .LVL7:
83 .L6:
65:Src/sysmem.c **** }
84 .loc 1 65 5 is_stmt 1 view .LVU21
65:Src/sysmem.c **** }
85 .loc 1 65 21 is_stmt 0 view .LVU22
86 0020 0748 ldr r0, .L8+8
87 0022 084C ldr r4, .L8+12
88 0024 0460 str r4, [r0]
89 0026 F2E7 b .L2
90 .LVL8:
ARM GAS /tmp/ccRdhNuV.s page 4
91 .L7:
71:Src/sysmem.c **** return (void *)-1;
92 .loc 1 71 5 is_stmt 1 view .LVU23
93 0028 FFF7FEFF bl __errno
94 .LVL9:
71:Src/sysmem.c **** return (void *)-1;
95 .loc 1 71 11 is_stmt 0 discriminator 1 view .LVU24
96 002c 0C23 movs r3, #12
97 002e 0360 str r3, [r0]
72:Src/sysmem.c **** }
98 .loc 1 72 5 is_stmt 1 view .LVU25
72:Src/sysmem.c **** }
99 .loc 1 72 12 is_stmt 0 view .LVU26
100 0030 4FF0FF30 mov r0, #-1
101 0034 F3E7 b .L1
102 .L9:
103 0036 00BF .align 2
104 .L8:
105 0038 00000000 .word _estack
106 003c 00000000 .word _Min_Stack_Size
107 0040 00000000 .word __sbrk_heap_end
108 0044 00000000 .word _end
109 .cfi_endproc
110 .LFE0:
112 .section .bss.__sbrk_heap_end,"aw",%nobits
113 .align 2
116 __sbrk_heap_end:
117 0000 00000000 .space 4
118 .text
119 .Letext0:
120 .file 2 "/home/fra/bin/arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi/lib/gcc/arm-none-eabi/14.2
121 .file 3 "/home/fra/bin/arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi/arm-none-eabi/include/mach
122 .file 4 "/home/fra/bin/arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi/arm-none-eabi/include/sys/
123 .file 5 "/home/fra/bin/arm-gnu-toolchain-14.2.rel1-x86_64-arm-none-eabi/arm-none-eabi/include/sys/
ARM GAS /tmp/ccRdhNuV.s page 5
DEFINED SYMBOLS
*ABS*:00000000 sysmem.c
/tmp/ccRdhNuV.s:21 .text._sbrk:00000000 $t
/tmp/ccRdhNuV.s:27 .text._sbrk:00000000 _sbrk
/tmp/ccRdhNuV.s:105 .text._sbrk:00000038 $d
/tmp/ccRdhNuV.s:116 .bss.__sbrk_heap_end:00000000 __sbrk_heap_end
/tmp/ccRdhNuV.s:113 .bss.__sbrk_heap_end:00000000 $d
UNDEFINED SYMBOLS
__errno
_estack
_Min_Stack_Size
_end