aboutsummaryrefslogtreecommitdiffstats
path: root/demos/various/NIL-ARMCM4-GENERIC
diff options
context:
space:
mode:
Diffstat (limited to 'demos/various/NIL-ARMCM4-GENERIC')
-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
3 files changed, 27 insertions, 71 deletions
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_ */
-
-/** @} */