1 Memory Usage for PIC18F

Program and data memory consumption for the diagnostic modules for PIC18F devices.

This memory usage is captured with the below toolchain versions and device:

  • MPLAB X IDE: v6.20
  • XC8 Compiler: v2.49
  • Device: PIC18F57Q43
No. Module Name Module Version Configurations Optimization Level

(-Os / -O0)

Program Memory (Bytes) Data Memory (Bytes)
1. SW_CPU_REGISTER_RESET_STATE_CHECK_01 1.1.3 N/A -Os 344 5
-O0 706 14
2. SW_CPU_REGISTER_TEST_01 2.0.2 N/A -Os 822 6
-O0 1416 15
3. SW_CPU_SELF_TEST_LIB_01 1.0.1 All Subsets -Os 1900 20
All Subsets -O0 2250 29
Subset 1 -Os 1030 16
Subset 1 -O0 1272 27
Subset 2 -Os 570 10
Subset 2 -O0 752 27
Subset 3 -Os 842 10
Subset 3 -O0 1026 27
4. SW_FLASH_MEMORY_CHECKSUM_CRC_TEST_01 2.0.1 CRC16 Direct -Os 1762 329
CRC16 Direct -O0 2714 338
CRC16 Lookup -Os 2280 330
CRC16 Lookup -O0 3194 339
CRC32 Direct -Os 2054 353
CRC32 Direct -O0 3080 362
CRC32 Lookup -Os 3074 356
CRC32 Lookup -O0 4042 365
5. SW_EEPROM_MEMORY_CHECKSUM_CRC_TEST_01 2.0.1 CRC16 Direct -Os 1194 45
CRC16 Direct -O0 1914 57
CRC16 Lookup -Os 1712 46
CRC16 Lookup -O0 2394 58
CRC32 Direct -Os 1534 75
CRC32 Direct -O0 2386 87
CRC32 Lookup -Os 2552 78
CRC32 Lookup -O0 3348 90
6. SW_SRAM_MARCH_TEST_01 3.0.2 N/A -Os 1422 300
-O0 1N/A 1N/A
7. SW_WATCHDOG_SIMPLE_TIMER_STARTUP_TEST_01 2.1.0 N/A -Os 490 12
-O0 776 21
8. SW_WATCHDOG_WINDOWED_TIMER_STARTUP_TEST_01 2.0.1 N/A -Os 668 14
-O0 1026 23
9. SW_CLOCK_PERIODIC_MONITOR_01 2.0.1 N/A -Os 1182 71
-O0 1626 80
10. SW_CLOCK_PERIODIC_MONITOR_02 2.0.1 N/A -Os 1174 113
-O0 1674 128
11. SW_INTERRUPT_FREQUENCY_TEST_01 2.0.1 N/A -Os 634 24
-O0 940 33
Note: The values in the above table also include the memory consumption for the dependent peripheral drivers and system modules necessary for the expected functionality of each diagnostic module.
  1. SW_SRAM_MARCH_TEST_01 requires the compiler optimization level set to 's'.