aboutsummaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
Diffstat (limited to 'demos')
-rw-r--r--demos/various/NIL-ARMCM0-GENERIC/Makefile7
-rw-r--r--demos/various/NIL-ARMCM0-GENERIC/ch.ld23
-rw-r--r--demos/various/NIL-ARMCM0-GENERIC/cmparams.h66
-rw-r--r--demos/various/NIL-ARMCM4-GENERIC/Makefile7
-rw-r--r--demos/various/NIL-ARMCM4-GENERIC/ch.ld25
-rw-r--r--demos/various/NIL-ARMCM4-GENERIC/cmparams.h66
-rw-r--r--demos/various/RT-ARM7-GENERIC/Makefile3
-rw-r--r--demos/various/RT-ARM7-GENERIC/armparams.h65
-rw-r--r--demos/various/RT-ARMCM0-GENERIC/Makefile7
-rw-r--r--demos/various/RT-ARMCM0-GENERIC/ch.ld23
-rw-r--r--demos/various/RT-ARMCM0-GENERIC/cmparams.h66
-rw-r--r--demos/various/RT-ARMCM4-GENERIC/Makefile7
-rw-r--r--demos/various/RT-ARMCM4-GENERIC/ch.ld25
-rw-r--r--demos/various/RT-ARMCM4-GENERIC/cmparams.h66
14 files changed, 109 insertions, 347 deletions
diff --git a/demos/various/NIL-ARMCM0-GENERIC/Makefile b/demos/various/NIL-ARMCM0-GENERIC/Makefile
index ded63b68a..fde34f683 100644
--- a/demos/various/NIL-ARMCM0-GENERIC/Makefile
+++ b/demos/various/NIL-ARMCM0-GENERIC/Makefile
@@ -117,8 +117,9 @@ ASMSRC = $(PORTASM)
INCDIR = $(PORTINC) $(KERNINC)
-# Make this point to your CMSIS device file.
-INCDIR += $(CHIBIOS)/os/ext/CMSIS/ST
+# Make this point to your CMSIS and chparams.h headers.
+INCDIR += $(CHIBIOS)/os/ext/CMSIS/ST \
+ $(CHIBIOS)/os/common/ports/ARMCMx/devices/STM32F0xx
#
# Project, sources and paths
@@ -168,7 +169,7 @@ CPPWARN = -Wall -Wextra
#
# List all user C define here, like -D_DEBUG=1
-UDEFS =
+UDEFS = -DSTM32F051x8
# Define ASM defines here
UADEFS =
diff --git a/demos/various/NIL-ARMCM0-GENERIC/ch.ld b/demos/various/NIL-ARMCM0-GENERIC/ch.ld
index 2acdc3297..d04a6c4ed 100644
--- a/demos/various/NIL-ARMCM0-GENERIC/ch.ld
+++ b/demos/various/NIL-ARMCM0-GENERIC/ch.ld
@@ -20,7 +20,28 @@
MEMORY
{
flash : org = 0x08000000, len = 64k
- ram : org = 0x20000000, len = 8k
+ ram0 : org = 0x20000000, len = 8k
+ ram1 : org = 0x00000000, len = 0
+ ram2 : org = 0x00000000, len = 0
+ ram3 : org = 0x00000000, len = 0
+ ram4 : org = 0x00000000, len = 0
+ ram5 : org = 0x00000000, len = 0
+ ram6 : org = 0x00000000, len = 0
+ ram7 : org = 0x00000000, len = 0
}
+/* RAM region to be used for Main stack. This stack accommodates the processing
+ of all exceptions and interrupts*/
+REGION_ALIAS("MAIN_STACK_RAM", ram0);
+
+/* RAM region to be used for the process stack. This is the stack used by
+ the main() function.*/
+REGION_ALIAS("PROCESS_STACK_RAM", ram0);
+
+/* RAM region to be used for data segment.*/
+REGION_ALIAS("DATA_RAM", ram0);
+
+/* RAM region to be used for BSS segment.*/
+REGION_ALIAS("BSS_RAM", ram0);
+
INCLUDE rules.ld
diff --git a/demos/various/NIL-ARMCM0-GENERIC/cmparams.h b/demos/various/NIL-ARMCM0-GENERIC/cmparams.h
deleted file mode 100644
index 420f49dda..000000000
--- a/demos/various/NIL-ARMCM0-GENERIC/cmparams.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-
-/**
- * @file cmparams.h
- * @brief ARM Cortex-M4 parameters.
- *
- * @defgroup ARMCMx_ARMCM4 ARM Cortex-M4 Specific Parameters
- * @ingroup ARMCMx_SPECIFIC
- * @details This file contains the Cortex-M4 specific parameters for a
- * generic platform.
- * @{
- */
-
-#ifndef _CMPARAMS_H_
-#define _CMPARAMS_H_
-
-/**
- * @brief Cortex core model.
- */
-#define CORTEX_MODEL CORTEX_M0
-
-/**
- * @brief Floating Point unit presence.
- */
-#define CORTEX_HAS_FPU 0
-
-/**
- * @brief Number of bits in priority masks.
- */
-#define CORTEX_PRIORITY_BITS 2
-
-/**
- * @brief Number of interrupt vectors.
- * @note This number does not include the 16 system vectors and must be
- * rounded to a multiple of 8.
- */
-#define CORTEX_NUM_VECTORS 32
-
-#if !defined(_FROM_ASM_)
-
-/*
- * Replace the following inclusion with your vendor-provided CMSIS
- * device file.
- */
-#define STM32F051x8
-#include "stm32f0xx.h"
-
-#endif /* !defined(_FROM_ASM_) */
-
-#endif /* _CMPARAMS_H_ */
-
-/** @} */
diff --git a/demos/various/NIL-ARMCM4-GENERIC/Makefile b/demos/various/NIL-ARMCM4-GENERIC/Makefile
index 9e795d437..4a21e8cbc 100644
--- a/demos/various/NIL-ARMCM4-GENERIC/Makefile
+++ b/demos/various/NIL-ARMCM4-GENERIC/Makefile
@@ -122,8 +122,9 @@ ASMSRC = $(PORTASM)
INCDIR = $(PORTINC) $(KERNINC)
-# Make this point to your CMSIS device file.
-INCDIR += $(CHIBIOS)/os/ext/CMSIS/ST
+# Make this point to your CMSIS and chparams.h headers.
+INCDIR += $(CHIBIOS)/os/ext/CMSIS/ST \
+ $(CHIBIOS)/os/common/ports/ARMCMx/devices/STM32F4xx
#
# Project, sources and paths
@@ -173,7 +174,7 @@ CPPWARN = -Wall -Wextra
#
# List all user C define here, like -D_DEBUG=1
-UDEFS =
+UDEFS = -DSTM32F407xx
# Define ASM defines here
UADEFS =
diff --git a/demos/various/NIL-ARMCM4-GENERIC/ch.ld b/demos/various/NIL-ARMCM4-GENERIC/ch.ld
index cb367b8ae..d04a6c4ed 100644
--- a/demos/various/NIL-ARMCM4-GENERIC/ch.ld
+++ b/demos/various/NIL-ARMCM4-GENERIC/ch.ld
@@ -19,8 +19,29 @@
*/
MEMORY
{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 32k
+ flash : org = 0x08000000, len = 64k
+ ram0 : org = 0x20000000, len = 8k
+ ram1 : org = 0x00000000, len = 0
+ ram2 : org = 0x00000000, len = 0
+ ram3 : org = 0x00000000, len = 0
+ ram4 : org = 0x00000000, len = 0
+ ram5 : org = 0x00000000, len = 0
+ ram6 : org = 0x00000000, len = 0
+ ram7 : org = 0x00000000, len = 0
}
+/* RAM region to be used for Main stack. This stack accommodates the processing
+ of all exceptions and interrupts*/
+REGION_ALIAS("MAIN_STACK_RAM", ram0);
+
+/* RAM region to be used for the process stack. This is the stack used by
+ the main() function.*/
+REGION_ALIAS("PROCESS_STACK_RAM", ram0);
+
+/* RAM region to be used for data segment.*/
+REGION_ALIAS("DATA_RAM", ram0);
+
+/* RAM region to be used for BSS segment.*/
+REGION_ALIAS("BSS_RAM", ram0);
+
INCLUDE rules.ld
diff --git a/demos/various/NIL-ARMCM4-GENERIC/cmparams.h b/demos/various/NIL-ARMCM4-GENERIC/cmparams.h
deleted file mode 100644
index f7c0b8895..000000000
--- a/demos/various/NIL-ARMCM4-GENERIC/cmparams.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-
-/**
- * @file cmparams.h
- * @brief ARM Cortex-M4 parameters.
- *
- * @defgroup ARMCMx_ARMCM4 ARM Cortex-M4 Specific Parameters
- * @ingroup ARMCMx_SPECIFIC
- * @details This file contains the Cortex-M4 specific parameters for a
- * generic platform.
- * @{
- */
-
-#ifndef _CMPARAMS_H_
-#define _CMPARAMS_H_
-
-/**
- * @brief Cortex core model.
- */
-#define CORTEX_MODEL CORTEX_M4
-
-/**
- * @brief Floating Point unit presence.
- */
-#define CORTEX_HAS_FPU 1
-
-/**
- * @brief Number of bits in priority masks.
- */
-#define CORTEX_PRIORITY_BITS 4
-
-/**
- * @brief Number of interrupt vectors.
- * @note This number does not include the 16 system vectors and must be
- * rounded to a multiple of 8.
- */
-#define CORTEX_NUM_VECTORS 96
-
-#if !defined(_FROM_ASM_)
-
-/*
- * Replace the following inclusion with your vendor-provided CMSIS
- * device file.
- */
-#define STM32F407xx
-#include "stm32f4xx.h"
-
-#endif /* !defined(__FROM_ASM__) */
-
-#endif /* _CMPARAMS_H_ */
-
-/** @} */
diff --git a/demos/various/RT-ARM7-GENERIC/Makefile b/demos/various/RT-ARM7-GENERIC/Makefile
index 1560b36e7..4244d8c9f 100644
--- a/demos/various/RT-ARM7-GENERIC/Makefile
+++ b/demos/various/RT-ARM7-GENERIC/Makefile
@@ -147,6 +147,9 @@ ASMSRC = $(PORTASM)
# List of the standard inclusion directories.
INCDIR = $(PORTINC) $(KERNINC)
+# Make this point to your armparams.h header.
+INCDIR += $(CHIBIOS)/os/common/ports/ARM/devices/LPC214x
+
#
# Project, sources and paths
##############################################################################
diff --git a/demos/various/RT-ARM7-GENERIC/armparams.h b/demos/various/RT-ARM7-GENERIC/armparams.h
deleted file mode 100644
index 6bbc42af9..000000000
--- a/demos/various/RT-ARM7-GENERIC/armparams.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio.
-
- This file is part of ChibiOS.
-
- ChibiOS 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 Software Foundation; either version 3 of the License, or
- (at your option) any later version.
-
- ChibiOS is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-*/
-
-/**
- * @file armparams.h
- * @brief Generic ARM parameters.
- *
- * @defgroup ARM_GENERIC Generic ARM Parameters
- * @ingroup ARM_SPECIFIC
- * @details This file contains the ARM specific parameters for the
- * a generic platform.
- * @{
- */
-
-#ifndef _ARMPARAMS_H_
-#define _ARMPARAMS_H_
-
-/**
- * @brief ARM core model.
- */
-#define ARM_CORE ARM_CORE_ARM7TDMI
-
-/**
- * @brief Thumb-capable.
- */
-#define ARM_SUPPORTS_THUMB 1
-
-/**
- * @brief Thumb2-capable.
- */
-#define ARM_SUPPORTS_THUMB2 0
-
-/**
- * @brief Implementation of the wait-for-interrupt state enter.
- */
-#define ARM_WFI_IMPL
-
-#if !defined(_FROM_ASM_) || defined(__DOXYGEN__)
-/**
- * @brief Address of the IRQ vector register in the interrupt controller.
- */
-#define ARM_IRQ_VECTOR_REG 0xFFFFF030U
-#else
-#define ARM_IRQ_VECTOR_REG 0xFFFFF030
-#endif
-
-#endif /* _ARMPARAMS_H_ */
-
-/** @} */
diff --git a/demos/various/RT-ARMCM0-GENERIC/Makefile b/demos/various/RT-ARMCM0-GENERIC/Makefile
index 320fb1e76..dfd7b0106 100644
--- a/demos/various/RT-ARMCM0-GENERIC/Makefile
+++ b/demos/various/RT-ARMCM0-GENERIC/Makefile
@@ -118,8 +118,9 @@ ASMSRC = $(PORTASM)
# List of the standard inclusion directories.
INCDIR = $(PORTINC) $(KERNINC)
-# Make this point to your CMSIS device file.
-INCDIR += $(CHIBIOS)/os/ext/CMSIS/ST
+# Make this point to your CMSIS and chparams.h headers.
+INCDIR += $(CHIBIOS)/os/ext/CMSIS/ST \
+ $(CHIBIOS)/os/common/ports/ARMCMx/devices/STM32F0xx
#
# Project, sources and paths
@@ -169,7 +170,7 @@ CPPWARN = -Wall -Wextra
#
# List all user C define here, like -D_DEBUG=1
-UDEFS =
+UDEFS = -DSTM32F051x8
# Define ASM defines here
UADEFS =
diff --git a/demos/various/RT-ARMCM0-GENERIC/ch.ld b/demos/various/RT-ARMCM0-GENERIC/ch.ld
index 2acdc3297..d04a6c4ed 100644
--- a/demos/various/RT-ARMCM0-GENERIC/ch.ld
+++ b/demos/various/RT-ARMCM0-GENERIC/ch.ld
@@ -20,7 +20,28 @@
MEMORY
{
flash : org = 0x08000000, len = 64k
- ram : org = 0x20000000, len = 8k
+ ram0 : org = 0x20000000, len = 8k
+ ram1 : org = 0x00000000, len = 0
+ ram2 : org = 0x00000000, len = 0
+ ram3 : org = 0x00000000, len = 0
+ ram4 : org = 0x00000000, len = 0
+ ram5 : org = 0x00000000, len = 0
+ ram6 : org = 0x00000000, len = 0
+ ram7 : org = 0x00000000, len = 0
}
+/* RAM region to be used for Main stack. This stack accommodates the processing
+ of all exceptions and interrupts*/
+REGION_ALIAS("MAIN_STACK_RAM", ram0);
+
+/* RAM region to be used for the process stack. This is the stack used by
+ the main() function.*/
+REGION_ALIAS("PROCESS_STACK_RAM", ram0);
+
+/* RAM region to be used for data segment.*/
+REGION_ALIAS("DATA_RAM", ram0);
+
+/* RAM region to be used for BSS segment.*/
+REGION_ALIAS("BSS_RAM", ram0);
+
INCLUDE rules.ld
diff --git a/demos/various/RT-ARMCM0-GENERIC/cmparams.h b/demos/various/RT-ARMCM0-GENERIC/cmparams.h
deleted file mode 100644
index 420f49dda..000000000
--- a/demos/various/RT-ARMCM0-GENERIC/cmparams.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-
-/**
- * @file cmparams.h
- * @brief ARM Cortex-M4 parameters.
- *
- * @defgroup ARMCMx_ARMCM4 ARM Cortex-M4 Specific Parameters
- * @ingroup ARMCMx_SPECIFIC
- * @details This file contains the Cortex-M4 specific parameters for a
- * generic platform.
- * @{
- */
-
-#ifndef _CMPARAMS_H_
-#define _CMPARAMS_H_
-
-/**
- * @brief Cortex core model.
- */
-#define CORTEX_MODEL CORTEX_M0
-
-/**
- * @brief Floating Point unit presence.
- */
-#define CORTEX_HAS_FPU 0
-
-/**
- * @brief Number of bits in priority masks.
- */
-#define CORTEX_PRIORITY_BITS 2
-
-/**
- * @brief Number of interrupt vectors.
- * @note This number does not include the 16 system vectors and must be
- * rounded to a multiple of 8.
- */
-#define CORTEX_NUM_VECTORS 32
-
-#if !defined(_FROM_ASM_)
-
-/*
- * Replace the following inclusion with your vendor-provided CMSIS
- * device file.
- */
-#define STM32F051x8
-#include "stm32f0xx.h"
-
-#endif /* !defined(_FROM_ASM_) */
-
-#endif /* _CMPARAMS_H_ */
-
-/** @} */
diff --git a/demos/various/RT-ARMCM4-GENERIC/Makefile b/demos/various/RT-ARMCM4-GENERIC/Makefile
index 383f60b98..719585ddc 100644
--- a/demos/various/RT-ARMCM4-GENERIC/Makefile
+++ b/demos/various/RT-ARMCM4-GENERIC/Makefile
@@ -123,8 +123,9 @@ ASMSRC = $(PORTASM)
# List of the standard inclusion directories.
INCDIR = $(PORTINC) $(KERNINC)
-# Make this point to your CMSIS device file.
-INCDIR += $(CHIBIOS)/os/ext/CMSIS/ST
+# Make this point to your CMSIS and chparams.h headers.
+INCDIR += $(CHIBIOS)/os/ext/CMSIS/ST \
+ $(CHIBIOS)/os/common/ports/ARMCMx/devices/STM32F4xx
#
# Project, sources and paths
@@ -174,7 +175,7 @@ CPPWARN = -Wall -Wextra
#
# List all user C define here, like -D_DEBUG=1
-UDEFS =
+UDEFS = -DSTM32F407xx
# Define ASM defines here
UADEFS =
diff --git a/demos/various/RT-ARMCM4-GENERIC/ch.ld b/demos/various/RT-ARMCM4-GENERIC/ch.ld
index cb367b8ae..d04a6c4ed 100644
--- a/demos/various/RT-ARMCM4-GENERIC/ch.ld
+++ b/demos/various/RT-ARMCM4-GENERIC/ch.ld
@@ -19,8 +19,29 @@
*/
MEMORY
{
- flash : org = 0x08000000, len = 128k
- ram : org = 0x20000000, len = 32k
+ flash : org = 0x08000000, len = 64k
+ ram0 : org = 0x20000000, len = 8k
+ ram1 : org = 0x00000000, len = 0
+ ram2 : org = 0x00000000, len = 0
+ ram3 : org = 0x00000000, len = 0
+ ram4 : org = 0x00000000, len = 0
+ ram5 : org = 0x00000000, len = 0
+ ram6 : org = 0x00000000, len = 0
+ ram7 : org = 0x00000000, len = 0
}
+/* RAM region to be used for Main stack. This stack accommodates the processing
+ of all exceptions and interrupts*/
+REGION_ALIAS("MAIN_STACK_RAM", ram0);
+
+/* RAM region to be used for the process stack. This is the stack used by
+ the main() function.*/
+REGION_ALIAS("PROCESS_STACK_RAM", ram0);
+
+/* RAM region to be used for data segment.*/
+REGION_ALIAS("DATA_RAM", ram0);
+
+/* RAM region to be used for BSS segment.*/
+REGION_ALIAS("BSS_RAM", ram0);
+
INCLUDE rules.ld
diff --git a/demos/various/RT-ARMCM4-GENERIC/cmparams.h b/demos/various/RT-ARMCM4-GENERIC/cmparams.h
deleted file mode 100644
index f7c0b8895..000000000
--- a/demos/various/RT-ARMCM4-GENERIC/cmparams.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-
-/**
- * @file cmparams.h
- * @brief ARM Cortex-M4 parameters.
- *
- * @defgroup ARMCMx_ARMCM4 ARM Cortex-M4 Specific Parameters
- * @ingroup ARMCMx_SPECIFIC
- * @details This file contains the Cortex-M4 specific parameters for a
- * generic platform.
- * @{
- */
-
-#ifndef _CMPARAMS_H_
-#define _CMPARAMS_H_
-
-/**
- * @brief Cortex core model.
- */
-#define CORTEX_MODEL CORTEX_M4
-
-/**
- * @brief Floating Point unit presence.
- */
-#define CORTEX_HAS_FPU 1
-
-/**
- * @brief Number of bits in priority masks.
- */
-#define CORTEX_PRIORITY_BITS 4
-
-/**
- * @brief Number of interrupt vectors.
- * @note This number does not include the 16 system vectors and must be
- * rounded to a multiple of 8.
- */
-#define CORTEX_NUM_VECTORS 96
-
-#if !defined(_FROM_ASM_)
-
-/*
- * Replace the following inclusion with your vendor-provided CMSIS
- * device file.
- */
-#define STM32F407xx
-#include "stm32f4xx.h"
-
-#endif /* !defined(__FROM_ASM__) */
-
-#endif /* _CMPARAMS_H_ */
-
-/** @} */