Blame view

RIOT/cpu/kinetis_common/ldscripts/kinetis.ld 1.55 KB
a752c7ab   elopes   add first test an...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
  /*
   * Copyright (C) 2015 PHYTEC Messtechnik GmbH
   * Copyright (C) 2015 Eistec AB
   *
   * This file is subject to the terms and conditions of the GNU Lesser
   * General Public License v2.1. See the file LICENSE in the top level
   * directory for more details.
   */
  
  /**
   * @addtogroup      cpu_kinetis
   * @{
   *
   * @file
   * @brief           Sections definitions for the Freescale Kinetis MCUs
   *
   * @author          Johann Fischer <j.fischer@phytec.de>
   * @author          Joakim NohlgÄrd <joakim.nohlgard@eistec.se>
   *
   * @}
   */
  
  SECTIONS
  {
      /* Interrupt vectors 0x00-0x3ff. */
      .vector :
      {
          _isr_vectors = .;
          KEEP(*(SORT(.vector*)))
      } > vectors
      ASSERT (SIZEOF(.vector) == 0x400, "Interrupt vector table of invalid size.")
      ASSERT (ADDR(.vector) == 0x00000000, "Interrupt vector table at invalid location (linker-script error?)")
      ASSERT (LOADADDR(.vector) == 0x00000000, "Interrupt vector table at invalid location (linker-script error?)")
  
      /* Flash configuration field, very important in order to not accidentally lock the device */
      /* Flash configuration field 0x400-0x40f. */
      .fcfield :
      {
          . = ALIGN(4);
          KEEP(*(.fcfield))
          . = ALIGN(4);
      } > flashsec
      ASSERT (SIZEOF(.fcfield) == 0x10, "Flash configuration field of invalid size (linker-script error?)")
      ASSERT (ADDR(.fcfield) == 0x400, "Flash configuration field at invalid position (linker-script error?)")
      ASSERT (LOADADDR(.fcfield) == 0x400, "Flash configuration field at invalid position (linker-script error?)")
  }
  
  INCLUDE cortexm_base.ld