* msp430/Makefile.in (CRT_OBJS): Add crt_high_bss.o.

* msp430/crt0.S (high_bss): Add.
	* msp430/msp430-sim.ld: Add error message if .upper sections are
	detected.
	* msp430/msp430xl-sim.ld (MEMORY): Adjust to better mimic real
	life MCUs.  Add support for upper and lower sections.
This commit is contained in:
Nick Clifton
2014-11-13 10:18:57 +00:00
parent 58d35b961e
commit b7d6a7c805
5 changed files with 129 additions and 51 deletions

View File

@@ -54,6 +54,24 @@ __crt0_init_bss:
call_ #memset
#endif
#ifdef __MSP430X_LARGE__
#if Lhigh_bss
;; Note - this section is only included in the
;; startup code of the application if it is needed.
.section ".crt_0150high_bss", "ax", @progbits
.global __crt0_init_high_bss
__crt0_init_high_bss:
mov_ #llo(__high_bssstart), R12
mov_ #lhi(__high_bssstart), R13
mov.w #llo(__high_bsssize), R14
mov.w #lhi(__high_bsssize), R15
call_ #memset
#endif /* Lhigh_bss */
#endif /* __MSP430X_LARGE__ */
#if Lmovedata
.section ".crt_0200movedata", "ax", @progbits