Revision 5d929a9e

View differences:

modules/DiWheelDrive_1-1/Makefile
123 123
include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f1xx.mk
124 124
# HAL-OSAL files
125 125
include $(CHIBIOS)/os/hal/hal.mk
126
include $(AMIROOS)/hal/hal.mk
127 126
include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
128
include $(AMIROOS)/hal/ports/STM32/platform.mk
129 127
include ./board.mk
130 128
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
131 129
# RTOS files
modules/DiWheelDrive_1-1/STM32F103xE.ld
1
/*
2
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
3
Copyright (C) 2016..2018  Thomas Schöpping et al.
4

  
5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9

  
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
GNU General Public License for more details.
14

  
15
You should have received a copy of the GNU General Public License
16
along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
*/
18

  
19
/*
20
 * ST32F103xE memory setup.
21
 */
22
MEMORY
23
{
24
    flash0  : org = 0x08006000, len = 512k-24k
25
    flash1  : org = 0x00000000, len = 0
26
    flash2  : org = 0x00000000, len = 0
27
    flash3  : org = 0x00000000, len = 0
28
    flash4  : org = 0x00000000, len = 0
29
    flash5  : org = 0x00000000, len = 0
30
    flash6  : org = 0x00000000, len = 0
31
    flash7  : org = 0x00000000, len = 0
32
    ram0    : org = 0x20000000, len = 64k
33
    ram1    : org = 0x00000000, len = 0
34
    ram2    : org = 0x00000000, len = 0
35
    ram3    : org = 0x00000000, len = 0
36
    ram4    : org = 0x00000000, len = 0
37
    ram5    : org = 0x00000000, len = 0
38
    ram6    : org = 0x00000000, len = 0
39
    ram7    : org = 0x00000000, len = 0
40
}
41

  
42
/* For each data/text section two region are defined, a virtual region
43
   and a load region (_LMA suffix).*/
44

  
45
/* Flash region to be used for exception vectors.*/
46
REGION_ALIAS("VECTORS_FLASH", flash0);
47
REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
48

  
49
/* Flash region to be used for constructors and destructors.*/
50
REGION_ALIAS("XTORS_FLASH", flash0);
51
REGION_ALIAS("XTORS_FLASH_LMA", flash0);
52

  
53
/* Flash region to be used for code text.*/
54
REGION_ALIAS("TEXT_FLASH", flash0);
55
REGION_ALIAS("TEXT_FLASH_LMA", flash0);
56

  
57
/* Flash region to be used for read only data.*/
58
REGION_ALIAS("RODATA_FLASH", flash0);
59
REGION_ALIAS("RODATA_FLASH_LMA", flash0);
60

  
61
/* Flash region to be used for various.*/
62
REGION_ALIAS("VARIOUS_FLASH", flash0);
63
REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
64

  
65
/* Flash region to be used for RAM(n) initialization data.*/
66
REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
67

  
68
/* RAM region to be used for Main stack. This stack accommodates the processing
69
   of all exceptions and interrupts.*/
70
REGION_ALIAS("MAIN_STACK_RAM", ram0);
71

  
72
/* RAM region to be used for the process stack. This is the stack used by
73
   the main() function.*/
74
REGION_ALIAS("PROCESS_STACK_RAM", ram0);
75

  
76
/* RAM region to be used for data segment.*/
77
REGION_ALIAS("DATA_RAM", ram0);
78
REGION_ALIAS("DATA_RAM_LMA", flash0);
79

  
80
/* RAM region to be used for BSS segment.*/
81
REGION_ALIAS("BSS_RAM", ram0);
82

  
83
/* RAM region to be used for the default heap.*/
84
REGION_ALIAS("HEAP_RAM", ram0);
85

  
86
/* Generic rules inclusion.*/
87
INCLUDE ../../kernel/ChibiOS/os/common/startup/ARMCMx/compilers/GCC/ld/rules.ld
modules/DiWheelDrive_1-1/board.mk
33 33
BOARDSRC = $(BOARD_DIR)board.c
34 34

  
35 35
# linker path
36
BOARDLD = $(AMIROOS)/hal/ports
36
BOARDLD = $(BOARD_DIR)
modules/LightRing_1-0/Makefile
123 123
include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f1xx.mk
124 124
# HAL-OSAL files
125 125
include $(CHIBIOS)/os/hal/hal.mk
126
include $(AMIROOS)/hal/hal.mk
127 126
include $(CHIBIOS)/os/hal/ports/STM32/STM32F1xx/platform.mk
128
include $(AMIROOS)/hal/ports/STM32/platform.mk
129 127
include ./board.mk
130 128
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
131 129
# RTOS files
modules/LightRing_1-0/STM32F103xE.ld
1
/*
2
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
3
Copyright (C) 2016..2018  Thomas Schöpping et al.
4

  
5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9

  
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
GNU General Public License for more details.
14

  
15
You should have received a copy of the GNU General Public License
16
along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
*/
18

  
19
/*
20
 * ST32F103xE memory setup.
21
 */
22
MEMORY
23
{
24
    flash0  : org = 0x08006000, len = 512k-24k
25
    flash1  : org = 0x00000000, len = 0
26
    flash2  : org = 0x00000000, len = 0
27
    flash3  : org = 0x00000000, len = 0
28
    flash4  : org = 0x00000000, len = 0
29
    flash5  : org = 0x00000000, len = 0
30
    flash6  : org = 0x00000000, len = 0
31
    flash7  : org = 0x00000000, len = 0
32
    ram0    : org = 0x20000000, len = 64k
33
    ram1    : org = 0x00000000, len = 0
34
    ram2    : org = 0x00000000, len = 0
35
    ram3    : org = 0x00000000, len = 0
36
    ram4    : org = 0x00000000, len = 0
37
    ram5    : org = 0x00000000, len = 0
38
    ram6    : org = 0x00000000, len = 0
39
    ram7    : org = 0x00000000, len = 0
40
}
41

  
42
/* For each data/text section two region are defined, a virtual region
43
   and a load region (_LMA suffix).*/
44

  
45
/* Flash region to be used for exception vectors.*/
46
REGION_ALIAS("VECTORS_FLASH", flash0);
47
REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
48

  
49
/* Flash region to be used for constructors and destructors.*/
50
REGION_ALIAS("XTORS_FLASH", flash0);
51
REGION_ALIAS("XTORS_FLASH_LMA", flash0);
52

  
53
/* Flash region to be used for code text.*/
54
REGION_ALIAS("TEXT_FLASH", flash0);
55
REGION_ALIAS("TEXT_FLASH_LMA", flash0);
56

  
57
/* Flash region to be used for read only data.*/
58
REGION_ALIAS("RODATA_FLASH", flash0);
59
REGION_ALIAS("RODATA_FLASH_LMA", flash0);
60

  
61
/* Flash region to be used for various.*/
62
REGION_ALIAS("VARIOUS_FLASH", flash0);
63
REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
64

  
65
/* Flash region to be used for RAM(n) initialization data.*/
66
REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
67

  
68
/* RAM region to be used for Main stack. This stack accommodates the processing
69
   of all exceptions and interrupts.*/
70
REGION_ALIAS("MAIN_STACK_RAM", ram0);
71

  
72
/* RAM region to be used for the process stack. This is the stack used by
73
   the main() function.*/
74
REGION_ALIAS("PROCESS_STACK_RAM", ram0);
75

  
76
/* RAM region to be used for data segment.*/
77
REGION_ALIAS("DATA_RAM", ram0);
78
REGION_ALIAS("DATA_RAM_LMA", flash0);
79

  
80
/* RAM region to be used for BSS segment.*/
81
REGION_ALIAS("BSS_RAM", ram0);
82

  
83
/* RAM region to be used for the default heap.*/
84
REGION_ALIAS("HEAP_RAM", ram0);
85

  
86
/* Generic rules inclusion.*/
87
INCLUDE rules.ld
modules/LightRing_1-0/board.mk
33 33
BOARDSRC = $(BOARD_DIR)board.c
34 34

  
35 35
# linker path
36
BOARDLD = $(AMIROOS)/hal/ports
36
BOARDLD = $(BOARD_DIR)
modules/PowerManagement_1-1/Makefile
123 123
include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f4xx.mk
124 124
# HAL-OSAL files
125 125
include $(CHIBIOS)/os/hal/hal.mk
126
include $(AMIROOS)/hal/hal.mk
127 126
include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk
128
include $(AMIROOS)/hal/ports/STM32/platform.mk
129 127
include ./board.mk
130 128
include $(CHIBIOS)/os/hal/osal/rt/osal.mk
131 129
# RTOS files
modules/PowerManagement_1-1/STM32F405xG.ld
1
/*
2
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
3
Copyright (C) 2016..2018  Thomas Schöpping et al.
4

  
5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9

  
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
GNU General Public License for more details.
14

  
15
You should have received a copy of the GNU General Public License
16
along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
*/
18

  
19
/*
20
 * STM32F405xG memory setup.
21
 * Note: Use of ram1 and ram2 is mutually exclusive with use of ram0.
22
 */
23
MEMORY
24
{
25
    flash0  : org = 0x08008000, len = 1M-32k
26
    flash1  : org = 0x00000000, len = 0
27
    flash2  : org = 0x00000000, len = 0
28
    flash3  : org = 0x00000000, len = 0
29
    flash4  : org = 0x00000000, len = 0
30
    flash5  : org = 0x00000000, len = 0
31
    flash6  : org = 0x00000000, len = 0
32
    flash7  : org = 0x00000000, len = 0
33
    ram0    : org = 0x20000000, len = 128k      /* SRAM1 + SRAM2 */
34
    ram1    : org = 0x20000000, len = 112k      /* SRAM1 */
35
    ram2    : org = 0x2001C000, len = 16k       /* SRAM2 */
36
    ram3    : org = 0x00000000, len = 0
37
    ram4    : org = 0x10000000, len = 64k       /* CCM SRAM */
38
    ram5    : org = 0x40024000, len = 4k        /* BCKP SRAM */
39
    ram6    : org = 0x00000000, len = 0
40
    ram7    : org = 0x00000000, len = 0
41
}
42

  
43
/* For each data/text section two region are defined, a virtual region
44
   and a load region (_LMA suffix).*/
45

  
46
/* Flash region to be used for exception vectors.*/
47
REGION_ALIAS("VECTORS_FLASH", flash0);
48
REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
49

  
50
/* Flash region to be used for constructors and destructors.*/
51
REGION_ALIAS("XTORS_FLASH", flash0);
52
REGION_ALIAS("XTORS_FLASH_LMA", flash0);
53

  
54
/* Flash region to be used for code text.*/
55
REGION_ALIAS("TEXT_FLASH", flash0);
56
REGION_ALIAS("TEXT_FLASH_LMA", flash0);
57

  
58
/* Flash region to be used for read only data.*/
59
REGION_ALIAS("RODATA_FLASH", flash0);
60
REGION_ALIAS("RODATA_FLASH_LMA", flash0);
61

  
62
/* Flash region to be used for various.*/
63
REGION_ALIAS("VARIOUS_FLASH", flash0);
64
REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
65

  
66
/* Flash region to be used for RAM(n) initialization data.*/
67
REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
68

  
69
/* RAM region to be used for Main stack. This stack accommodates the processing
70
   of all exceptions and interrupts.*/
71
REGION_ALIAS("MAIN_STACK_RAM", ram0);
72

  
73
/* RAM region to be used for the process stack. This is the stack used by
74
   the main() function.*/
75
REGION_ALIAS("PROCESS_STACK_RAM", ram0);
76

  
77
/* RAM region to be used for data segment.*/
78
REGION_ALIAS("DATA_RAM", ram0);
79
REGION_ALIAS("DATA_RAM_LMA", flash0);
80

  
81
/* RAM region to be used for BSS segment.*/
82
REGION_ALIAS("BSS_RAM", ram0);
83

  
84
/* RAM region to be used for the default heap.*/
85
REGION_ALIAS("HEAP_RAM", ram0);
86

  
87
/* Generic rules inclusion.*/
88
INCLUDE rules.ld
modules/PowerManagement_1-1/board.mk
33 33
BOARDSRC = $(BOARD_DIR)board.c
34 34

  
35 35
# linker path
36
BOARDLD = $(AMIROOS)/hal/ports
36
BOARDLD = $(BOARD_DIR)
os/hal/hal.mk
1
################################################################################
2
# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
3
# (AMiRo) platform.                                                            #
4
# Copyright (C) 2016..2018  Thomas Schöpping et al.                            #
5
#                                                                              #
6
# This program is free software: you can redistribute it and/or modify         #
7
# it under the terms of the GNU General Public License as published by         #
8
# the Free Software Foundation, either version 3 of the License, or            #
9
# (at your option) any later version.                                          #
10
#                                                                              #
11
# This program is distributed in the hope that it will be useful,              #
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
14
# GNU General Public License for more details.                                 #
15
#                                                                              #
16
# You should have received a copy of the GNU General Public License            #
17
# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
18
#                                                                              #
19
# This research/work was supported by the Cluster of Excellence Cognitive      #
20
# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
21
# funded by the German Research Foundation (DFG).                              #
22
################################################################################
23

  
24

  
25

  
26
# absolute path to this directory
27
HAL_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
28

  
29
# add include path
30
HALINC += $(HAL_DIR)include
31

  
32
# add sources
33
HALSRC += 
34

  
os/hal/ports/STM32/platform.mk
1
################################################################################
2
# AMiRo-OS is an operating system designed for the Autonomous Mini Robot       #
3
# (AMiRo) platform.                                                            #
4
# Copyright (C) 2016..2018  Thomas Schöpping et al.                            #
5
#                                                                              #
6
# This program is free software: you can redistribute it and/or modify         #
7
# it under the terms of the GNU General Public License as published by         #
8
# the Free Software Foundation, either version 3 of the License, or            #
9
# (at your option) any later version.                                          #
10
#                                                                              #
11
# This program is distributed in the hope that it will be useful,              #
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of               #
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                #
14
# GNU General Public License for more details.                                 #
15
#                                                                              #
16
# You should have received a copy of the GNU General Public License            #
17
# along with this program.  If not, see <http://www.gnu.org/licenses/>.        #
18
#                                                                              #
19
# This research/work was supported by the Cluster of Excellence Cognitive      #
20
# Interaction Technology 'CITEC' (EXC 277) at Bielefeld University, which is   #
21
# funded by the German Research Foundation (DFG).                              #
22
################################################################################
23

  
24

  
25

  
26
# absolute path to this directory
27
PLATFORM_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
28

  
29
# add include path
30
PLATFORMINC += 
31

  
32
# add C sources
33
PLATFORMSRC += 
34

  
os/hal/ports/STM32F103xE.ld
1
/*
2
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
3
Copyright (C) 2016..2018  Thomas Schöpping et al.
4

  
5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9

  
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
GNU General Public License for more details.
14

  
15
You should have received a copy of the GNU General Public License
16
along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
*/
18

  
19
/*
20
 * ST32F103xE memory setup.
21
 */
22
MEMORY
23
{
24
    flash0  : org = 0x08006000, len = 512k-24k
25
    flash1  : org = 0x00000000, len = 0
26
    flash2  : org = 0x00000000, len = 0
27
    flash3  : org = 0x00000000, len = 0
28
    flash4  : org = 0x00000000, len = 0
29
    flash5  : org = 0x00000000, len = 0
30
    flash6  : org = 0x00000000, len = 0
31
    flash7  : org = 0x00000000, len = 0
32
    ram0    : org = 0x20000000, len = 64k
33
    ram1    : org = 0x00000000, len = 0
34
    ram2    : org = 0x00000000, len = 0
35
    ram3    : org = 0x00000000, len = 0
36
    ram4    : org = 0x00000000, len = 0
37
    ram5    : org = 0x00000000, len = 0
38
    ram6    : org = 0x00000000, len = 0
39
    ram7    : org = 0x00000000, len = 0
40
}
41

  
42
/* For each data/text section two region are defined, a virtual region
43
   and a load region (_LMA suffix).*/
44

  
45
/* Flash region to be used for exception vectors.*/
46
REGION_ALIAS("VECTORS_FLASH", flash0);
47
REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
48

  
49
/* Flash region to be used for constructors and destructors.*/
50
REGION_ALIAS("XTORS_FLASH", flash0);
51
REGION_ALIAS("XTORS_FLASH_LMA", flash0);
52

  
53
/* Flash region to be used for code text.*/
54
REGION_ALIAS("TEXT_FLASH", flash0);
55
REGION_ALIAS("TEXT_FLASH_LMA", flash0);
56

  
57
/* Flash region to be used for read only data.*/
58
REGION_ALIAS("RODATA_FLASH", flash0);
59
REGION_ALIAS("RODATA_FLASH_LMA", flash0);
60

  
61
/* Flash region to be used for various.*/
62
REGION_ALIAS("VARIOUS_FLASH", flash0);
63
REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
64

  
65
/* Flash region to be used for RAM(n) initialization data.*/
66
REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
67

  
68
/* RAM region to be used for Main stack. This stack accommodates the processing
69
   of all exceptions and interrupts.*/
70
REGION_ALIAS("MAIN_STACK_RAM", ram0);
71

  
72
/* RAM region to be used for the process stack. This is the stack used by
73
   the main() function.*/
74
REGION_ALIAS("PROCESS_STACK_RAM", ram0);
75

  
76
/* RAM region to be used for data segment.*/
77
REGION_ALIAS("DATA_RAM", ram0);
78
REGION_ALIAS("DATA_RAM_LMA", flash0);
79

  
80
/* RAM region to be used for BSS segment.*/
81
REGION_ALIAS("BSS_RAM", ram0);
82

  
83
/* RAM region to be used for the default heap.*/
84
REGION_ALIAS("HEAP_RAM", ram0);
85

  
86
/* Generic rules inclusion.*/
87
INCLUDE rules.ld
os/hal/ports/STM32F405xG.ld
1
/*
2
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
3
Copyright (C) 2016..2018  Thomas Schöpping et al.
4

  
5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9

  
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
GNU General Public License for more details.
14

  
15
You should have received a copy of the GNU General Public License
16
along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
*/
18

  
19
/*
20
 * STM32F405xG memory setup.
21
 * Note: Use of ram1 and ram2 is mutually exclusive with use of ram0.
22
 */
23
MEMORY
24
{
25
    flash0  : org = 0x08008000, len = 1M-32k
26
    flash1  : org = 0x00000000, len = 0
27
    flash2  : org = 0x00000000, len = 0
28
    flash3  : org = 0x00000000, len = 0
29
    flash4  : org = 0x00000000, len = 0
30
    flash5  : org = 0x00000000, len = 0
31
    flash6  : org = 0x00000000, len = 0
32
    flash7  : org = 0x00000000, len = 0
33
    ram0    : org = 0x20000000, len = 128k      /* SRAM1 + SRAM2 */
34
    ram1    : org = 0x20000000, len = 112k      /* SRAM1 */
35
    ram2    : org = 0x2001C000, len = 16k       /* SRAM2 */
36
    ram3    : org = 0x00000000, len = 0
37
    ram4    : org = 0x10000000, len = 64k       /* CCM SRAM */
38
    ram5    : org = 0x40024000, len = 4k        /* BCKP SRAM */
39
    ram6    : org = 0x00000000, len = 0
40
    ram7    : org = 0x00000000, len = 0
41
}
42

  
43
/* For each data/text section two region are defined, a virtual region
44
   and a load region (_LMA suffix).*/
45

  
46
/* Flash region to be used for exception vectors.*/
47
REGION_ALIAS("VECTORS_FLASH", flash0);
48
REGION_ALIAS("VECTORS_FLASH_LMA", flash0);
49

  
50
/* Flash region to be used for constructors and destructors.*/
51
REGION_ALIAS("XTORS_FLASH", flash0);
52
REGION_ALIAS("XTORS_FLASH_LMA", flash0);
53

  
54
/* Flash region to be used for code text.*/
55
REGION_ALIAS("TEXT_FLASH", flash0);
56
REGION_ALIAS("TEXT_FLASH_LMA", flash0);
57

  
58
/* Flash region to be used for read only data.*/
59
REGION_ALIAS("RODATA_FLASH", flash0);
60
REGION_ALIAS("RODATA_FLASH_LMA", flash0);
61

  
62
/* Flash region to be used for various.*/
63
REGION_ALIAS("VARIOUS_FLASH", flash0);
64
REGION_ALIAS("VARIOUS_FLASH_LMA", flash0);
65

  
66
/* Flash region to be used for RAM(n) initialization data.*/
67
REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0);
68

  
69
/* RAM region to be used for Main stack. This stack accommodates the processing
70
   of all exceptions and interrupts.*/
71
REGION_ALIAS("MAIN_STACK_RAM", ram0);
72

  
73
/* RAM region to be used for the process stack. This is the stack used by
74
   the main() function.*/
75
REGION_ALIAS("PROCESS_STACK_RAM", ram0);
76

  
77
/* RAM region to be used for data segment.*/
78
REGION_ALIAS("DATA_RAM", ram0);
79
REGION_ALIAS("DATA_RAM_LMA", flash0);
80

  
81
/* RAM region to be used for BSS segment.*/
82
REGION_ALIAS("BSS_RAM", ram0);
83

  
84
/* RAM region to be used for the default heap.*/
85
REGION_ALIAS("HEAP_RAM", ram0);
86

  
87
/* Generic rules inclusion.*/
88
INCLUDE rules.ld
os/hal/ports/rules.ld
1
/*
2
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
3
Copyright (C) 2016..2018  Thomas Schöpping et al.
4

  
5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9

  
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
GNU General Public License for more details.
14

  
15
You should have received a copy of the GNU General Public License
16
along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
*/
18

  
19
/* Stack rules inclusion.*/
20
INCLUDE rules_stacks.ld
21

  
22
/* Code rules inclusion.*/
23
INCLUDE rules_code.ld
24

  
25
/* Data rules inclusion.*/
26
INCLUDE rules_data.ld
27

  
os/hal/ports/rules.mk
1
# ARM Cortex-Mx common makefile scripts and rules.
2

  
3
##############################################################################
4
# Processing options coming from the upper Makefile.
5
#
6

  
7
# Output directory and files
8
SRECFILE = $(BUILDDIR)/$(PROJECT).srec
9

  
10
#
11
# Makefile rules
12
#
13

  
14
blt: $(SRECFILE)
15

  
16
MAKE_ALL_RULE_HOOK: blt
17

  
18
%.srec: %.elf $(LDSCRIPT)
19
ifeq ($(USE_VERBOSE_COMPILE),yes)
20
	$(SREC) $< $@
21
else
22
	@echo Creating $@
23
	@$(SREC) $< $@
24
endif
25

  
26
# *** EOF ***
os/hal/ports/rules_code.ld
1
/*
2
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
3
Copyright (C) 2016..2018  Thomas Schöpping et al.
4

  
5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9

  
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
GNU General Public License for more details.
14

  
15
You should have received a copy of the GNU General Public License
16
along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
*/
18

  
19
ENTRY(Reset_Handler)
20

  
21
SECTIONS
22
{
23
    .vectors : ALIGN(16)
24
    {
25
        KEEP(*(.vectors))
26
    } > VECTORS_FLASH AT > VECTORS_FLASH_LMA
27

  
28
    .xtors : ALIGN(4)
29
    {
30
        __init_array_start = .;
31
        KEEP(*(SORT(.init_array.*)))
32
        KEEP(*(.init_array))
33
        __init_array_end = .;
34
        __fini_array_start = .;
35
        KEEP(*(.fini_array))
36
        KEEP(*(SORT(.fini_array.*)))
37
        __fini_array_end = .;
38
    } > XTORS_FLASH AT > XTORS_FLASH_LMA
39

  
40
    .text ALIGN(16) : ALIGN(16)
41
    {
42
        *(.text)
43
        *(.text.*)
44
        *(.glue_7t)
45
        *(.glue_7)
46
        *(.gcc*)
47
    } > TEXT_FLASH AT > TEXT_FLASH_LMA
48

  
49
    .rodata : ALIGN(4)
50
    {
51
        . = ALIGN(4);
52
        __rodata_base__ = .;
53
        *(.rodata)
54
        *(.rodata.*)
55
        . = ALIGN(4);
56
        __rodata_end__ = .;
57
    } > RODATA_FLASH AT > RODATA_FLASH_LMA
58

  
59
    .ARM.extab :
60
    {
61
        *(.ARM.extab* .gnu.linkonce.armextab.*)
62
    } > VARIOUS_FLASH AT > VARIOUS_FLASH_LMA
63

  
64
    .ARM.exidx : {
65
        __exidx_start = .;
66
        *(.ARM.exidx* .gnu.linkonce.armexidx.*)
67
        __exidx_end = .;
68
     } > VARIOUS_FLASH AT > VARIOUS_FLASH_LMA
69

  
70
    .eh_frame_hdr :
71
    {
72
        *(.eh_frame_hdr)
73
    } > VARIOUS_FLASH AT > VARIOUS_FLASH_LMA
74

  
75
    .eh_frame : ONLY_IF_RO
76
    {
77
        *(.eh_frame)
78
    } > VARIOUS_FLASH AT > VARIOUS_FLASH_LMA
79
}
80

  
os/hal/ports/rules_data.ld
1
/*
2
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
3
Copyright (C) 2016..2018  Thomas Schöpping et al.
4

  
5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9

  
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
GNU General Public License for more details.
14

  
15
You should have received a copy of the GNU General Public License
16
along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
*/
18

  
19
__ram0_start__          = ORIGIN(ram0);
20
__ram0_size__           = LENGTH(ram0);
21
__ram0_end__            = __ram0_start__ + __ram0_size__;
22
__ram1_start__          = ORIGIN(ram1);
23
__ram1_size__           = LENGTH(ram1);
24
__ram1_end__            = __ram1_start__ + __ram1_size__;
25
__ram2_start__          = ORIGIN(ram2);
26
__ram2_size__           = LENGTH(ram2);
27
__ram2_end__            = __ram2_start__ + __ram2_size__;
28
__ram3_start__          = ORIGIN(ram3);
29
__ram3_size__           = LENGTH(ram3);
30
__ram3_end__            = __ram3_start__ + __ram3_size__;
31
__ram4_start__          = ORIGIN(ram4);
32
__ram4_size__           = LENGTH(ram4);
33
__ram4_end__            = __ram4_start__ + __ram4_size__;
34
__ram5_start__          = ORIGIN(ram5);
35
__ram5_size__           = LENGTH(ram5);
36
__ram5_end__            = __ram5_start__ + __ram5_size__;
37
__ram6_start__          = ORIGIN(ram6);
38
__ram6_size__           = LENGTH(ram6);
39
__ram6_end__            = __ram6_start__ + __ram6_size__;
40
__ram7_start__          = ORIGIN(ram7);
41
__ram7_size__           = LENGTH(ram7);
42
__ram7_end__            = __ram7_start__ + __ram7_size__;
43

  
44
ENTRY(Reset_Handler)
45

  
46
SECTIONS
47
{
48
    .data : ALIGN(4)
49
    {
50
        . = ALIGN(4);
51
        PROVIDE(_textdata = LOADADDR(.data));
52
        PROVIDE(_data = .);
53
        _textdata_start = LOADADDR(.data);
54
        _data_start = .;
55
        *(.data)
56
        *(.data.*)
57
        *(.ramtext)
58
        . = ALIGN(4);
59
        PROVIDE(_edata = .);
60
        _data_end = .;
61
    } > DATA_RAM AT > DATA_RAM_LMA
62

  
63
    .bss (NOLOAD) : ALIGN(4)
64
    {
65
        . = ALIGN(4);
66
        _bss_start = .;
67
        *(.bss)
68
        *(.bss.*)
69
        *(COMMON)
70
        . = ALIGN(4);
71
        _bss_end = .;
72
        PROVIDE(end = .);
73
    } > BSS_RAM
74

  
75
    .ram0_init : ALIGN(4)
76
    {
77
        . = ALIGN(4);
78
        __ram0_init_text__ = LOADADDR(.ram0_init);
79
        __ram0_init__ = .;
80
        KEEP(*(.ram0_init))
81
        KEEP(*(.ram0_init.*))
82
        . = ALIGN(4);
83
    } > ram0 AT > RAM_INIT_FLASH_LMA
84

  
85
    .ram0 (NOLOAD) : ALIGN(4)
86
    {
87
        . = ALIGN(4);
88
        __ram0_clear__ = .;
89
        *(.ram0_clear)
90
        *(.ram0_clear.*)
91
        . = ALIGN(4);
92
        __ram0_noinit__ = .;
93
        *(.ram0)
94
        *(.ram0.*)
95
        . = ALIGN(4);
96
        __ram0_free__ = .;
97
    } > ram0
98

  
99
    .ram1_init : ALIGN(4)
100
    {
101
        . = ALIGN(4);
102
        __ram1_init_text__ = LOADADDR(.ram1_init);
103
        __ram1_init__ = .;
104
        KEEP(*(.ram1_init))
105
        KEEP(*(.ram1_init.*))
106
        . = ALIGN(4);
107
    } > ram1 AT > RAM_INIT_FLASH_LMA
108

  
109
    .ram1 (NOLOAD) : ALIGN(4)
110
    {
111
        . = ALIGN(4);
112
        __ram1_clear__ = .;
113
        *(.ram1_clear)
114
        *(.ram1_clear.*)
115
        . = ALIGN(4);
116
        __ram1_noinit__ = .;
117
        *(.ram1)
118
        *(.ram1.*)
119
        . = ALIGN(4);
120
        __ram1_free__ = .;
121
    } > ram1
122

  
123
    .ram2_init : ALIGN(4)
124
    {
125
        . = ALIGN(4);
126
        __ram2_init_text__ = LOADADDR(.ram2_init);
127
        __ram2_init__ = .;
128
        KEEP(*(.ram2_init))
129
        KEEP(*(.ram2_init.*))
130
        . = ALIGN(4);
131
    } > ram2 AT > RAM_INIT_FLASH_LMA
132

  
133
    .ram2 (NOLOAD) : ALIGN(4)
134
    {
135
        . = ALIGN(4);
136
        __ram2_clear__ = .;
137
        *(.ram2_clear)
138
        *(.ram2_clear.*)
139
        . = ALIGN(4);
140
        __ram2_noinit__ = .;
141
        *(.ram2)
142
        *(.ram2.*)
143
        . = ALIGN(4);
144
        __ram2_free__ = .;
145
    } > ram2
146

  
147
    .ram3_init : ALIGN(4)
148
    {
149
        . = ALIGN(4);
150
        __ram3_init_text__ = LOADADDR(.ram3_init);
151
        __ram3_init__ = .;
152
        KEEP(*(.ram3_init))
153
        KEEP(*(.ram3_init.*))
154
        . = ALIGN(4);
155
    } > ram3 AT > RAM_INIT_FLASH_LMA
156

  
157
    .ram3 (NOLOAD) : ALIGN(4)
158
    {
159
        . = ALIGN(4);
160
        __ram3_clear__ = .;
161
        *(.ram3_clear)
162
        *(.ram3_clear.*)
163
        . = ALIGN(4);
164
        __ram3_noinit__ = .;
165
        *(.ram3)
166
        *(.ram3.*)
167
        . = ALIGN(4);
168
        __ram3_free__ = .;
169
    } > ram3
170

  
171
    .ram4_init : ALIGN(4)
172
    {
173
        . = ALIGN(4);
174
        __ram4_init_text__ = LOADADDR(.ram4_init);
175
        __ram4_init__ = .;
176
        KEEP(*(.ram4_init))
177
        KEEP(*(.ram4_init.*))
178
        . = ALIGN(4);
179
    } > ram4 AT > RAM_INIT_FLASH_LMA
180

  
181
    .ram4 (NOLOAD) : ALIGN(4)
182
    {
183
        . = ALIGN(4);
184
        __ram4_clear__ = .;
185
        *(.ram4_clear)
186
        *(.ram4_clear.*)
187
        . = ALIGN(4);
188
        __ram4_noinit__ = .;
189
        *(.ram4)
190
        *(.ram4.*)
191
        . = ALIGN(4);
192
        __ram4_free__ = .;
193
    } > ram4
194

  
195
    .ram5_init : ALIGN(4)
196
    {
197
        . = ALIGN(4);
198
        __ram5_init_text__ = LOADADDR(.ram5_init);
199
        __ram5_init__ = .;
200
        KEEP(*(.ram5_init))
201
        KEEP(*(.ram5_init.*))
202
        . = ALIGN(4);
203
    } > ram5 AT > RAM_INIT_FLASH_LMA
204

  
205
    .ram5 (NOLOAD) : ALIGN(4)
206
    {
207
        . = ALIGN(4);
208
        __ram5_clear__ = .;
209
        *(.ram5_clear)
210
        *(.ram5_clear.*)
211
        . = ALIGN(4);
212
        __ram5_noinit__ = .;
213
        *(.ram5)
214
        *(.ram5.*)
215
        . = ALIGN(4);
216
        __ram5_free__ = .;
217
    } > ram5
218

  
219
    .ram6_init : ALIGN(4)
220
    {
221
        . = ALIGN(4);
222
        __ram6_init_text__ = LOADADDR(.ram6_init);
223
        __ram6_init__ = .;
224
        KEEP(*(.ram6_init))
225
        KEEP(*(.ram6_init.*))
226
        . = ALIGN(4);
227
    } > ram6 AT > RAM_INIT_FLASH_LMA
228

  
229
    .ram6 (NOLOAD) : ALIGN(4)
230
    {
231
        . = ALIGN(4);
232
        __ram6_clear__ = .;
233
        *(.ram6_clear)
234
        *(.ram6_clear.*)
235
        . = ALIGN(4);
236
        __ram6_noinit__ = .;
237
        *(.ram6)
238
        *(.ram6.*)
239
        . = ALIGN(4);
240
        __ram6_free__ = .;
241
    } > ram6
242

  
243
    .ram7_init : ALIGN(4)
244
    {
245
        . = ALIGN(4);
246
        __ram7_init_text__ = LOADADDR(.ram7_init);
247
        __ram7_init__ = .;
248
        KEEP(*(.ram7_init))
249
        KEEP(*(.ram7_init.*))
250
        . = ALIGN(4);
251
    } > ram7 AT > RAM_INIT_FLASH_LMA
252

  
253
    .ram7 (NOLOAD) : ALIGN(4)
254
    {
255
        . = ALIGN(4);
256
        __ram7_clear__ = .;
257
        *(.ram7_clear)
258
        *(.ram7_clear.*)
259
        . = ALIGN(4);
260
        __ram7_noinit__ = .;
261
        *(.ram7)
262
        *(.ram7.*)
263
        . = ALIGN(4);
264
        __ram7_free__ = .;
265
    } > ram7
266

  
267
    /* The default heap uses the (statically) unused part of a RAM section.*/
268
    .heap (NOLOAD) :
269
    {
270
        . = ALIGN(8);
271
        __heap_base__ = .;
272
        . = ORIGIN(HEAP_RAM) + LENGTH(HEAP_RAM);
273
        __heap_end__ = .;
274
    } > HEAP_RAM
275
}
276

  
os/hal/ports/rules_stacks.ld
1
/*
2
AMiRo-OS is an operating system designed for the Autonomous Mini Robot (AMiRo) platform.
3
Copyright (C) 2016..2018  Thomas Schöpping et al.
4

  
5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9

  
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
GNU General Public License for more details.
14

  
15
You should have received a copy of the GNU General Public License
16
along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
*/
18

  
19
SECTIONS
20
{
21
    /* Special section for exceptions stack.*/
22
    .mstack :
23
    {
24
        . = ALIGN(8);
25
        __main_stack_base__ = .;
26
        . += __main_stack_size__;
27
        . = ALIGN(8);
28
        __main_stack_end__ = .;
29
    } > MAIN_STACK_RAM
30

  
31
    /* Special section for process stack.*/
32
    .pstack :
33
    {
34
        __process_stack_base__ = .;
35
        __main_thread_stack_base__ = .;
36
        . += __process_stack_size__;
37
        . = ALIGN(8);
38
        __process_stack_end__ = .;
39
        __main_thread_stack_end__ = .;
40
    } > PROCESS_STACK_RAM
41
}

Also available in: Unified diff