This topic has been beaten to death over the years and I'm here again to gain some clarification.
I have a project using the ATtiny404 and and the code size is at the critical limit. I am not using any eeprom in this project.
Using the Avr-Size -B option and the Avr-objdump tool, I am getting what appears as different results.
Here is the Avr-Size -B option output:
text data bss dec hex filename
4135 14 42 4191 105f ATtiny404_PS2_V6_1 Beta.elf
I read this as:
Flash = .text + .data = 4149 bytes
Ram = .data + .bss = 56 bytes
Am I interpreting this correctly?
Here is the Avr-objdump output:
Program: 4092 bytes (99.9% Full) <<< I've purposely pushed this to the limit as an experiment.
(.text + .data + .bootloader)
Data: 46 bytes (18.0% Full)
(.data + .bss + .noinit)
Why doesn't this agree with the reported Avr-Size -B ? Are there unreported 'stored strings' causing the discrepancy?
I've always been under the assumption that this report is to be trusted.
In addition, when I attempt to program the the part (using Atmel ICE + Studio), I get an error claiming that my Flash memory has been exceeded.
The programming tool appears to be using the Avr-size -B report as the error source.
Timestamp: 2020-04-23 11:07:32.372
ModuleName: TCF (TCF command: Processes:launch failed.)
Loading executable to device failed. Segment 0xff8:0x1026 outside device limits. For more details, please check the elf file in the project folderLoading executable to device failed. Segment 0x1027:0x102a outside device limits. For more details, please check the elf file in the project folder
Any clarification would be appreciated.