OpenCores
URL https://opencores.org/ocsvn/neorv32/neorv32/trunk

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [sw/] [example/] [demo_freeRTOS/] [makefile] - Blame information for rev 62

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 22 zero_gravi
#################################################################################################
2
# << NEORV32 - Application Makefile >>                                                          #
3
# ********************************************************************************************* #
4 55 zero_gravi
# Make sure to add the RISC-V GCC compiler's bin folder to your PATH environment variable.      #
5 22 zero_gravi
# ********************************************************************************************* #
6
# BSD 3-Clause License                                                                          #
7
#                                                                                               #
8 55 zero_gravi
# Copyright (c) 2021, Stephan Nolting. All rights reserved.                                     #
9 22 zero_gravi
#                                                                                               #
10
# Redistribution and use in source and binary forms, with or without modification, are          #
11
# permitted provided that the following conditions are met:                                     #
12
#                                                                                               #
13
# 1. Redistributions of source code must retain the above copyright notice, this list of        #
14
#    conditions and the following disclaimer.                                                   #
15
#                                                                                               #
16
# 2. Redistributions in binary form must reproduce the above copyright notice, this list of     #
17
#    conditions and the following disclaimer in the documentation and/or other materials        #
18
#    provided with the distribution.                                                            #
19
#                                                                                               #
20
# 3. Neither the name of the copyright holder nor the names of its contributors may be used to  #
21
#    endorse or promote products derived from this software without specific prior written      #
22
#    permission.                                                                                #
23
#                                                                                               #
24
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS   #
25
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF               #
26
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE    #
27
# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,     #
28
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE #
29
# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED    #
30
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING     #
31
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED  #
32
# OF THE POSSIBILITY OF SUCH DAMAGE.                                                            #
33
# ********************************************************************************************* #
34
# The NEORV32 Processor - https://github.com/stnolting/neorv32              (c) Stephan Nolting #
35
#################################################################################################
36
 
37
 
38
# *****************************************************************************
39
# USER CONFIGURATION
40
# *****************************************************************************
41
# User's application sources (*.c, *.cpp, *.s, *.S); add additional files here
42
APP_SRC ?= $(wildcard ./*.c) $(wildcard ./*.s) $(wildcard ./*.cpp) $(wildcard ./*.S)
43
 
44
# User's application include folders (don't forget the '-I' before each entry)
45
APP_INC ?= -I .
46
# User's application include folders - for assembly files only (don't forget the '-I' before each entry)
47
ASM_INC ?= -I .
48
 
49
# Optimization
50
EFFORT ?= -Os
51
 
52
# Compiler toolchain
53 62 zero_gravi
RISCV_PREFIX ?= riscv32-unknown-elf-
54 22 zero_gravi
 
55
# CPU architecture and ABI
56
MARCH ?= -march=rv32i
57
MABI  ?= -mabi=ilp32
58
 
59
# User flags for additional configuration (will be added to compiler flags)
60 55 zero_gravi
USER_FLAGS ?=
61 22 zero_gravi
 
62
# Relative or absolute path to the NEORV32 home folder
63
NEORV32_HOME ?= ../../..
64
# *****************************************************************************
65
 
66
 
67
 
68
# -----------------------------------------------------------------------------
69 62 zero_gravi
# FreeRTOS
70 22 zero_gravi
# -----------------------------------------------------------------------------
71 62 zero_gravi
ifneq (,$(findstring RUN_FREERTOS_DEMO,$(USER_FLAGS)))
72
# FreeRTOS home folder (adapt this!)
73
FREERTOS_HOME ?= /mnt/n/Projects/FreeRTOSv10.4.1
74 22 zero_gravi
 
75 62 zero_gravi
# FreeRTOS RISC-V specific
76
APP_SRC += $(wildcard $(FREERTOS_HOME)/FreeRTOS/Source/portable/GCC/RISC-V/*.c)
77
APP_SRC += $(FREERTOS_HOME)/FreeRTOS/Source/portable/GCC/RISC-V/portASM.S
78 22 zero_gravi
 
79 62 zero_gravi
APP_INC += -I $(FREERTOS_HOME)/FreeRTOS/Source/portable/GCC/RISC-V
80 22 zero_gravi
 
81 62 zero_gravi
# FreeRTOS core
82
APP_SRC += $(wildcard $(FREERTOS_HOME)/FreeRTOS/Source/*.c)
83
APP_SRC += $(wildcard $(FREERTOS_HOME)/FreeRTOS/Source/portable/MemMang/heap_4.c)
84 22 zero_gravi
 
85 62 zero_gravi
APP_INC += -I $(FREERTOS_HOME)/FreeRTOS/Source/include
86 22 zero_gravi
 
87 62 zero_gravi
# FreeRTOS sources for the full_demo
88
APP_SRC += $(FREERTOS_HOME)/FreeRTOS/Demo/Common/Minimal/blocktim.c
89
APP_SRC += $(FREERTOS_HOME)/FreeRTOS/Demo/Common/Minimal/dynamic.c
90
APP_SRC += $(FREERTOS_HOME)/FreeRTOS/Demo/Common/Minimal/EventGroupsDemo.c
91
APP_SRC += $(FREERTOS_HOME)/FreeRTOS/Demo/Common/Minimal/GenQTest.c
92
APP_SRC += $(FREERTOS_HOME)/FreeRTOS/Demo/Common/Minimal/recmutex.c
93
APP_SRC += $(FREERTOS_HOME)/FreeRTOS/Demo/Common/Minimal/TaskNotify.c
94
APP_SRC += $(FREERTOS_HOME)/FreeRTOS/Demo/Common/Minimal/TaskNotifyArray.c
95
APP_SRC += $(FREERTOS_HOME)/FreeRTOS/Demo/Common/Minimal/TimerDemo.c
96 22 zero_gravi
 
97 62 zero_gravi
APP_INC += -I $(FREERTOS_HOME)/FreeRTOS/Demo/Common/include
98 22 zero_gravi
 
99 62 zero_gravi
# NEORV32 specific
100
ASM_INC += -DportasmHANDLE_INTERRUPT=SystemIrqHandler
101 22 zero_gravi
 
102 62 zero_gravi
APP_INC += -I chip_specific_extensions/neorv32
103 22 zero_gravi
 
104 62 zero_gravi
ASM_INC += -I chip_specific_extensions/neorv32
105 22 zero_gravi
 
106 62 zero_gravi
# Demo application
107
APP_SRC += blinky_demo/main_blinky.c
108
APP_SRC += full_demo/main_full.c
109
APP_SRC += full_demo/RegTest.s
110
endif
111 22 zero_gravi
 
112 62 zero_gravi
# -----------------
113
# FreeRTOS-Plus-CLI
114
# -----------------
115
ifneq (,$(findstring FREERTOS_PLUS_CLI,$(USER_FLAGS)))
116
APP_SRC += $(FREERTOS_HOME)/FreeRTOS-Plus/Source/FreeRTOS-Plus-CLI/FreeRTOS_CLI.c
117 22 zero_gravi
 
118 62 zero_gravi
APP_INC += -I $(FREERTOS_HOME)/FreeRTOS-Plus/Source/FreeRTOS-Plus-CLI
119
endif
120 22 zero_gravi
 
121 62 zero_gravi
# -----------------
122
# FreeRTOS-Plus-TCP
123
# -----------------
124
ifneq (,$(findstring FREERTOS_PLUS_TCP,$(USER_FLAGS)))
125
APP_SRC += $(FREERTOS_HOME)/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_ARP.c
126
APP_SRC += $(FREERTOS_HOME)/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DHCP.c
127
APP_SRC += $(FREERTOS_HOME)/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_DNS.c
128
APP_SRC += $(FREERTOS_HOME)/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_IP.c
129
APP_SRC += $(FREERTOS_HOME)/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_Sockets.c
130
APP_SRC += $(FREERTOS_HOME)/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_Stream_Buffer.c
131
APP_SRC += $(FREERTOS_HOME)/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_IP.c
132
APP_SRC += $(FREERTOS_HOME)/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_TCP_WIN.c
133
APP_SRC += $(FREERTOS_HOME)/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/FreeRTOS_UDP_IP.c
134 22 zero_gravi
 
135 62 zero_gravi
APP_INC += -I $(FREERTOS_HOME)/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/include
136
APP_INC += -I $(FREERTOS_HOME)/FreeRTOS-Plus/Source/FreeRTOS-Plus-TCP/portable/Compiler/GCC
137 22 zero_gravi
endif
138
 
139
 
140 34 zero_gravi
 
141 62 zero_gravi
NEORV32_HOME ?= ../../..
142 34 zero_gravi
 
143 62 zero_gravi
# Include central makefile
144
include ../../common/common.mk

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.