aboutsummaryrefslogtreecommitdiffstats
path: root/demos/various
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2018-05-15 07:04:22 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2018-05-15 07:04:22 +0000
commit30cd967c172dbdf442f6777f83f647b3d525261b (patch)
treeba3162b9a5160cc6338f78c72fe7b7e9b6078463 /demos/various
parentb228e17215a83cf2af2c51b142badc7c1011c75d (diff)
downloadChibiOS-30cd967c172dbdf442f6777f83f647b3d525261b.tar.gz
ChibiOS-30cd967c172dbdf442f6777f83f647b3d525261b.tar.bz2
ChibiOS-30cd967c172dbdf442f6777f83f647b3d525261b.zip
Updated with new makefiles, added Systick priority initialization.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12035 110e8d01-0319-4d1e-a829-52ad28d1bb01
Diffstat (limited to 'demos/various')
-rw-r--r--demos/various/RT-ARMCM0-GENERIC/Makefile81
-rw-r--r--demos/various/RT-ARMCM0-GENERIC/cfg/chconf.h (renamed from demos/various/RT-ARMCM0-GENERIC/chconf.h)0
-rw-r--r--demos/various/RT-ARMCM0-GENERIC/main.c3
3 files changed, 42 insertions, 42 deletions
diff --git a/demos/various/RT-ARMCM0-GENERIC/Makefile b/demos/various/RT-ARMCM0-GENERIC/Makefile
index cb002e13a..9e14837db 100644
--- a/demos/various/RT-ARMCM0-GENERIC/Makefile
+++ b/demos/various/RT-ARMCM0-GENERIC/Makefile
@@ -18,7 +18,7 @@ ifeq ($(USE_CPPOPT),)
USE_CPPOPT = -fno-rtti
endif
-# Enable this if you want the linker to remove unused code and data
+# Enable this if you want the linker to remove unused code and data.
ifeq ($(USE_LINK_GC),)
USE_LINK_GC = yes
endif
@@ -28,7 +28,7 @@ ifeq ($(USE_LDOPT),)
USE_LDOPT =
endif
-# Enable this if you want link time optimizations (LTO)
+# Enable this if you want link time optimizations (LTO).
ifeq ($(USE_LTO),)
USE_LTO = yes
endif
@@ -87,12 +87,18 @@ PROJECT = ch
# Imported source files and paths
CHIBIOS = ../../..
+CONFDIR := ./cfg
+BUILDDIR := ./build
+DEPDIR := ./.dep
+
+# Licensing files.
+include $(CHIBIOS)/os/license/license.mk
# Startup files.
include $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC/mk/startup_stm32f0xx.mk
# HAL-OSAL files (optional).
#include $(CHIBIOS)/os/hal/hal.mk
#include $(CHIBIOS)/os/hal/ports/STM32/STM32F0xx/platform.mk
-#include $(CHIBIOS)/os/hal/boards/ST_STM32F072B_DISCOVERY/board.mk
+#include $(CHIBIOS)/os/hal/boards/ST_STM32F0_DISCOVERY/board.mk
#include $(CHIBIOS)/os/hal/osal/rt/osal.mk
# RTOS files (optional).
include $(CHIBIOS)/os/rt/rt.mk
@@ -107,19 +113,13 @@ LDSCRIPT= $(STARTUPLD)/STM32F051x8.ld
# C sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
-CSRC = $(STARTUPSRC) \
- $(KERNSRC) \
- $(PORTSRC) \
- $(OSALSRC) \
- $(HALSRC) \
- $(PLATFORMSRC) \
- $(BOARDSRC) \
+CSRC = $(ALLCSRC) \
$(TESTSRC) \
main.c
# C++ sources that can be compiled in ARM or THUMB mode depending on the global
# setting.
-CPPSRC =
+CPPSRC = $(ALLCPPSRC)
# C sources to be compiled in ARM mode regardless of the global setting.
# NOTE: Mixing ARM and THUMB mode enables the -mthumb-interwork compiler
@@ -141,24 +141,44 @@ TCSRC =
# option that results in lower performance and larger code size.
TCPPSRC =
-# List ASM source files here
-ASMSRC =
-ASMXSRC = $(STARTUPASM) $(PORTASM) $(OSALASM)
+# List ASM source files here.
+ASMSRC = $(ALLASMSRC)
+ASMXSRC = $(ALLXASMSRC)
-INCDIR = $(CHIBIOS)/os/license \
- $(STARTUPINC) $(KERNINC) $(PORTINC) $(OSALINC) \
- $(HALINC) $(PLATFORMINC) $(BOARDINC) $(TESTINC) \
- $(CHIBIOS)/os/various
+INCDIR = $(CONFDIR) $(ALLINC) $(TESTINC)
#
# Project, sources and paths
##############################################################################
##############################################################################
+# Start of user section
+#
+
+# List all user C define here, like -D_DEBUG=1
+UDEFS = -DSTM32F051x8
+
+# Define ASM defines here
+UADEFS = -DSTM32F051x8
+
+# List all user directories here
+UINCDIR =
+
+# List the user directory to look for the libraries here
+ULIBDIR =
+
+# List all user libraries here
+ULIBS =
+
+#
+# End of user section
+##############################################################################
+
+##############################################################################
# Compiler settings
#
-MCU = cortex-m0
+MCU = cortex-m4
#TRGT = arm-elf-
TRGT = arm-none-eabi-
@@ -193,29 +213,6 @@ CPPWARN = -Wall -Wextra -Wundef
# Compiler settings
##############################################################################
-##############################################################################
-# Start of user section
-#
-
-# List all user C define here, like -D_DEBUG=1
-UDEFS = -DSTM32F051x8
-
-# Define ASM defines here
-UADEFS =
-
-# List all user directories here
-UINCDIR =
-
-# List the user directory to look for the libraries here
-ULIBDIR =
-
-# List all user libraries here
-ULIBS =
-
-#
-# End of user defines
-##############################################################################
-
RULESPATH = $(CHIBIOS)/os/common/startup/ARMCMx/compilers/GCC
include $(RULESPATH)/rules.mk
diff --git a/demos/various/RT-ARMCM0-GENERIC/chconf.h b/demos/various/RT-ARMCM0-GENERIC/cfg/chconf.h
index b1e3841a8..b1e3841a8 100644
--- a/demos/various/RT-ARMCM0-GENERIC/chconf.h
+++ b/demos/various/RT-ARMCM0-GENERIC/cfg/chconf.h
diff --git a/demos/various/RT-ARMCM0-GENERIC/main.c b/demos/various/RT-ARMCM0-GENERIC/main.c
index ded79da4d..f781b943d 100644
--- a/demos/various/RT-ARMCM0-GENERIC/main.c
+++ b/demos/various/RT-ARMCM0-GENERIC/main.c
@@ -67,6 +67,9 @@ int main(void) {
SysTick->CTRL = SysTick_CTRL_CLKSOURCE_Msk | SysTick_CTRL_ENABLE_Msk |
SysTick_CTRL_TICKINT_Msk;
+ /* IRQ enabled.*/
+ NVIC_SetPriority(SysTick_IRQn, 1);
+
/*
* System initializations.
* - Kernel initialization, the main() function becomes a thread and the