반응형
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' 카테고리의 다른 글
nuvoton (offline) download (1) | 2023.12.08 |
---|---|
FYDK- avr 오프라인 다운로더 (3) | 2023.12.08 |
Nuvoton M483 i2c + RV3028 (RTC) IRQ , 고정밀 RTC 비교, sample source (0) | 2023.08.07 |
Nuvoton M483 i2c + TLC59116 (Led Drv) IRQ MultyByte RW방식, sample source (0) | 2023.08.02 |
Nuvoton printf debug uart 변경 (0) | 2023.08.02 |