Commit 45d5091d by Georg-Johann Lay Committed by Georg-Johann Lay

avr-arch.h (avr_mcu_t): Remove field.

	* config/avr/avr-arch.h (avr_mcu_t) [n_flash]: Remove field.
	* config/avr/avr-devices.c (AVR_MCU): Remove N_FLASH macro argument.
	* config/avr/avr-mcus.def (AVR_MCU): Remove initializer for n_flash.
	* config/avr/avr.c (avr_set_core_architecture) [avr_n_flash]: Use
	avr_mcu_types.flash_size to compute default value.
	* config/avr/gen-avr-mmcu-specs.c (print_mcu) [cc1_n_flash]: Use
	mcu->flash_size to compute value for spec.

From-SVN: r243171
parent 46f87aa3
2016-12-02 Georg-Johann Lay <avr@gjlay.de>
* config/avr/avr-arch.h (avr_mcu_t) [n_flash]: Remove field.
* config/avr/avr-devices.c (AVR_MCU): Remove N_FLASH macro argument.
* config/avr/avr-mcus.def (AVR_MCU): Remove initializer for n_flash.
* config/avr/avr.c (avr_set_core_architecture) [avr_n_flash]: Use
avr_mcu_types.flash_size to compute default value.
* config/avr/gen-avr-mmcu-specs.c (print_mcu) [cc1_n_flash]: Use
mcu->flash_size to compute value for spec.
2016-12-02 Georg-Johann Lay <avr@gjlay.de>
* doc/invoke.texi (AVR Options) [-mabsdata]: Point to absdata.
* doc/extend.texi (AVR Variable Attributes) [progmem]: Hint
about linker description to avoid progmem altogether.
......@@ -120,9 +120,6 @@ typedef struct
/* Start of text section. */
int text_section_start;
/* Number of 64k segments in the flash. */
int n_flash;
/* Flash size in bytes. */
int flash_size;
} avr_mcu_t;
......
......@@ -111,12 +111,12 @@ avr_texinfo[] =
const avr_mcu_t
avr_mcu_types[] =
{
#define AVR_MCU(NAME, ARCH, DEV_ATTRIBUTE, MACRO, DATA_SEC, TEXT_SEC, N_FLASH, FLASH_SIZE)\
{ NAME, ARCH, DEV_ATTRIBUTE, MACRO, DATA_SEC, TEXT_SEC, N_FLASH, FLASH_SIZE },
#define AVR_MCU(NAME, ARCH, DEV_ATTRIBUTE, MACRO, DATA_SEC, TEXT_SEC, FLASH_SIZE)\
{ NAME, ARCH, DEV_ATTRIBUTE, MACRO, DATA_SEC, TEXT_SEC, FLASH_SIZE },
#include "avr-mcus.def"
#undef AVR_MCU
/* End of list. */
{ NULL, ARCH_UNKNOWN, AVR_ISA_NONE, NULL, 0, 0, 0, 0 }
{ NULL, ARCH_UNKNOWN, AVR_ISA_NONE, NULL, 0, 0, 0 }
};
......
......@@ -707,7 +707,7 @@ avr_set_core_architecture (void)
{
avr_arch = &avr_arch_types[mcu->arch_id];
if (avr_n_flash < 0)
avr_n_flash = mcu->n_flash;
avr_n_flash = 1 + (mcu->flash_size - 1) / 0x10000;
return true;
}
......
......@@ -179,8 +179,10 @@ print_mcu (const avr_mcu_t *mcu)
// avr-gcc specific specs for the compilation / the compiler proper.
int n_flash = 1 + (mcu->flash_size - 1) / 0x10000;
fprintf (f, "*cc1_n_flash:\n"
"\t%%{!mn-flash=*:-mn-flash=%d}\n\n", mcu->n_flash);
"\t%%{!mn-flash=*:-mn-flash=%d}\n\n", n_flash);
fprintf (f, "*cc1_rmw:\n%s\n\n", rmw
? "\t%{!mno-rmw: -mrmw}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment