Program Size: Code=10608 RO-data=268 RW-data=80 ZI-data=1632
컴파일하면 결과가 이렇게 나오는데
싸이즈
1. ZI Data: Zero Initialized Data 0 으로 초기화 되거나 값이 할당되지 않은 변수
2. RO Data are the constants.
Total RAM Size = RW Data + ZI Data
Total ROM Size = Code + RO Data + RW Data
3. Some constants (RO data) are generated by the compiler/linker and might also be from libraries. So they will exist regardless that your program doesn't explicitly defines any constants.
1- Total RO Size (Code + RO Data) 50392 ( 49.21kB)
2- Total RW Size (RW Data + ZI Data) 52648 ( 51.41kB)
3- Total ROM Size (Code + RO Data + RW Data) 52528 ( 51.30kB)
===============================================================
Total RO Size = code size in bytes
This is the size of the code only.
Total RW Size = RAM size in bytes
This is the minimum amount of RAM necessary to run the code. This includes both the heap and the stacks because they are declared as fixed in the application image.
Total ROM Size = image size in bytes
This is the size of the code and data that needs to be stored in flash. You need at least this much flash memory available.
https://www.jkelec.co.kr/img/lecture/arm_arch/arm_arch_2.html
컴파일하면 결과가 이렇게 나오는데
싸이즈
1. ZI Data: Zero Initialized Data 0 으로 초기화 되거나 값이 할당되지 않은 변수
2. RO Data are the constants.
Total RAM Size = RW Data + ZI Data
Total ROM Size = Code + RO Data + RW Data
3. Some constants (RO data) are generated by the compiler/linker and might also be from libraries. So they will exist regardless that your program doesn't explicitly defines any constants.
1- Total RO Size (Code + RO Data) 50392 ( 49.21kB)
2- Total RW Size (RW Data + ZI Data) 52648 ( 51.41kB)
3- Total ROM Size (Code + RO Data + RW Data) 52528 ( 51.30kB)
===============================================================
Total RO Size = code size in bytes
This is the size of the code only.
Total RW Size = RAM size in bytes
This is the minimum amount of RAM necessary to run the code. This includes both the heap and the stacks because they are declared as fixed in the application image.
Total ROM Size = image size in bytes
This is the size of the code and data that needs to be stored in flash. You need at least this much flash memory available.
https://www.jkelec.co.kr/img/lecture/arm_arch/arm_arch_2.html
참조
할당 영역:
ZI(Zero-initialized) 영역 : 0 으로 초기화 되거나 값이 할당되지 않은 변수
RW(read-write) 영역 : 초기값이 전역 변수,
RO(Read only) 영역 : 코드 + 변경 불가능한 변수
RW, ZI, RO는 GCC 등에서는 각각 .data, .bss, .constdata + .text 로 불리기도 합니다.
즉 RW = .data, ZI = .bss, RO = .constdata + .text 가 됩니다.
요구 되는 메모리 크기
RAM : ZI + RW
ROM : RO + RW
'개발 > embed 기타' 카테고리의 다른 글
CMakeCache.txt: Error: unrecognized option '--major-image-version' (0) | 2025.01.21 |
---|---|
win11에 JTAGICE mkII driver설치 ( ATMega AVR Studio 4.19 ) (0) | 2024.12.10 |
c 로 trim ( white space 빈칸, 공백 등 삭제 ) 만들기, sample source (0) | 2024.08.06 |
FYDK- avr 오프라인 다운로더 (3) | 2023.12.08 |
i2c (iic) 의 간단한 이해 (0) | 2023.07.25 |