Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CONST area to the program size estimation #54

Merged
merged 1 commit into from
Apr 10, 2022

Conversation

fabalthazar
Copy link
Contributor

As can be seen in the following memory map example, the CONST area is also part of the flash program memory.
It contains read-only data.
In many cases, its size is non negligible. In my example below, the error is 1775 bytes / 32768 (5.4%).
The CONST area is mentionned in the SDCC manual.

Area                                    Addr        Size        Decimal Bytes (Attributes)
--------------------------------        ----        ----        ------- ----- ------------
GSFINAL                             000080CB    00000003 =           3. bytes (REL,CON)

      Value  Global                              Global Defined In Module
      -----  --------------------------------   ------------------------
ASxxxx Linker V03.00 + NoICE + sdld,  page 19.
Hexadecimal  [32-Bits]

Area                                    Addr        Size        Decimal Bytes (Attributes)
--------------------------------        ----        ----        ------- ----- ------------
CONST                               000080CE    000006EF =        1775. bytes (REL,CON)

      Value  Global                              Global Defined In Module
      -----  --------------------------------   ------------------------
     000080CE  _long_bit                          common
     0000812E  _CRC16_tablo                       common
     0000822E  _CRC16_tabhi                       common
     0000832E  _seuil_adc_ctn                     ctn_param
     0000833E  _alpha_ctn                         ctn_param
     00008350  _beta_ctn                          ctn_param
     0000853F  _default_prog_P                    prog
     00008656  _param_variables                   variables

ASxxxx Linker V03.00 + NoICE + sdld,  page 20.
Hexadecimal  [32-Bits]

Area                                    Addr        Size        Decimal Bytes (Attributes)
--------------------------------        ----        ----        ------- ----- ------------
INITIALIZER                         000087BD    00000027 =          39. bytes (REL,CON)

@ivankravets ivankravets merged commit d7db0ed into platformio:develop Apr 10, 2022
@ivankravets
Copy link
Member

Thanks for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants