Mercurial > ecos-v3_0-branch
changeset 2774:1a58c9c41c50
Apply patch to support SRAM initialization.
Fix a few copyright notices.
| author | nickg |
|---|---|
| date | Mon, 09 Feb 2009 15:57:49 +0000 |
| parents | 4db2c98d89f8 |
| children | 0f319c78e393 |
| files | packages/hal/cortexm/arch/current/ChangeLog packages/hal/cortexm/arch/current/src/cortexm.ld packages/hal/cortexm/arch/current/src/hal_misc.c packages/hal/cortexm/stm32/stm3210e_eval/current/ChangeLog packages/hal/cortexm/stm32/stm3210e_eval/current/include/pkgconf/mlt_cortexm_stm3210e_eval_rom.ldi packages/hal/cortexm/stm32/var/current/ChangeLog packages/hal/cortexm/stm32/var/current/include/var_intr.h packages/hal/cortexm/stm32/var/current/include/var_io.h packages/hal/cortexm/stm32/var/current/src/stm32_misc.c |
| diffstat | 9 files changed, 44 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/hal/cortexm/arch/current/ChangeLog +++ b/packages/hal/cortexm/arch/current/ChangeLog @@ -1,3 +1,9 @@ +2009-02-07 Chris Holgate <chris@zynaptic.com> + + * src/hal_misc.c: + * src/cortexm.ld: + Modified SRAM linker section to support initialisation from ROM. + 2008-12-03 Nick Garnett <nickg@ecoscentric.com> * src/hal_misc.c (hal_deliver_interrupt): Fix instrumentation call
--- a/packages/hal/cortexm/arch/current/src/cortexm.ld +++ b/packages/hal/cortexm/arch/current/src/cortexm.ld @@ -235,8 +235,12 @@ OUTPUT_FORMAT(elf32-bigarm) #define SECTION_sram(_region_, _vma_, _lma_) \ .sram _vma_ : _lma_ \ - { FORCE_OUTPUT; *(.sram*) } \ - > _region_ + { __sram_data_start = ABSOLUTE (.); \ + *(.sram*) . = ALIGN (4); } \ + > _region_ \ + __srom_data_start = LOADADDR (.sram); \ + __sram_data_end = .; PROVIDE (__sram_data_end = .); \ + PROVIDE (__srom_data_end = LOADADDR (.sram) + SIZEOF(.sram)); #define SECTION_data(_region_, _vma_, _lma_) \ .data _vma_ : _lma_ \
--- a/packages/hal/cortexm/arch/current/src/hal_misc.c +++ b/packages/hal/cortexm/arch/current/src/hal_misc.c @@ -97,6 +97,9 @@ typedef cyg_uint32 cyg_isr(cyg_uint32 ve __externC cyg_uint32 __ram_data_start; __externC cyg_uint32 __ram_data_end; __externC cyg_uint32 __rom_data_start; +__externC cyg_uint32 __sram_data_start; +__externC cyg_uint32 __sram_data_end; +__externC cyg_uint32 __srom_data_start; __externC cyg_uint32 __bss_start; __externC cyg_uint32 __bss_end; @@ -197,6 +200,15 @@ void hal_reset_vsr( void ) p++, q++ ) *p = *q; } + + // Relocate data from ROM to SRAM + { + register cyg_uint32 *p, *q; + for( p = &__sram_data_start, q = &__srom_data_start; + p < &__sram_data_end; + p++, q++ ) + *p = *q; + } #endif // Clear BSS
--- a/packages/hal/cortexm/stm32/stm3210e_eval/current/ChangeLog +++ b/packages/hal/cortexm/stm32/stm3210e_eval/current/ChangeLog @@ -1,3 +1,16 @@ +2009-02-04 Nick Garnett <nickg@ecoscentric.com> + + * include/pkgconf/mlt_cortexm_stm3210e_eval_rom.ldi: + * include/pkgconf/mlt_cortexm_stm3210e_eval_ram.ldi: + * include/pkgconf/mlt_cortexm_stm3210e_eval_jtag.ldi: + * include/pkgconf/mlt_cortexm_stm3210e_eval_sram.ldi: + Add .sram section to linker scripts. + +2009-02-07 Chris Holgate <chris@zynaptic.com> + + * include/pkgconf/mlt_cortexm_stm3210e_eval_rom.ldi: + Modified SRAM section so that initialisation data is placed in ROM. + 2009-01-31 Bart Veer <bartv@ecoscentric.com> * cdl/hal_cortexm_stm32_stm3210e_eval.cdl: update compiler flags for gcc 4.x @@ -58,7 +71,7 @@ 2008-10-06 Nick Garnett <nickg@ecoscen // ####GPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. -// Copyright (C) 2008 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by
--- a/packages/hal/cortexm/stm32/stm3210e_eval/current/include/pkgconf/mlt_cortexm_stm3210e_eval_rom.ldi +++ b/packages/hal/cortexm/stm32/stm3210e_eval/current/include/pkgconf/mlt_cortexm_stm3210e_eval_rom.ldi @@ -24,8 +24,8 @@ SECTIONS SECTION_gcc_except_table (flash, ALIGN (0x8), LMA_EQ_VMA) SECTION_eh_frame (flash, ALIGN (0x8), LMA_EQ_VMA) SECTION_got (flash, ALIGN (0x8), LMA_EQ_VMA) - SECTION_sram (sram, 0x20000400, LMA_EQ_VMA) - SECTION_data (ram, 0x68000000, FOLLOWING (.got)) + SECTION_sram (sram, 0x20000400, FOLLOWING (.got)) + SECTION_data (ram, 0x68000000, FOLLOWING (.sram)) SECTION_bss (ram, ALIGN (0x8), LMA_EQ_VMA) CYG_LABEL_DEFN(__heap1) = ALIGN (0x8); SECTIONS_END
--- a/packages/hal/cortexm/stm32/var/current/ChangeLog +++ b/packages/hal/cortexm/stm32/var/current/ChangeLog @@ -73,7 +73,7 @@ 2008-10-06 Nick Garnett <nickg@ecoscen // ####GPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. -// Copyright (C) 2008 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by
--- a/packages/hal/cortexm/stm32/var/current/include/var_intr.h +++ b/packages/hal/cortexm/stm32/var/current/include/var_intr.h @@ -10,7 +10,7 @@ // ####ECOSGPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. -// Copyright (C) 2008 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. // // eCos is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free
--- a/packages/hal/cortexm/stm32/var/current/include/var_io.h +++ b/packages/hal/cortexm/stm32/var/current/include/var_io.h @@ -10,7 +10,7 @@ // ####ECOSGPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. -// Copyright (C) 2008 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. // // eCos is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free
--- a/packages/hal/cortexm/stm32/var/current/src/stm32_misc.c +++ b/packages/hal/cortexm/stm32/var/current/src/stm32_misc.c @@ -8,7 +8,7 @@ // ####ECOSGPLCOPYRIGHTBEGIN#### // ------------------------------------------- // This file is part of eCos, the Embedded Configurable Operating System. -// Copyright (C) 2008 Free Software Foundation, Inc. +// Copyright (C) 2008, 2009 Free Software Foundation, Inc. // // eCos is free software; you can redistribute it and/or modify it under // the terms of the GNU General Public License as published by the Free
