Skip to content

Commit

Permalink
feat: Added RISC-V sparkfun red board
Browse files Browse the repository at this point in the history
Signed-off-by: Taras Drozdovskyi <[email protected]>
  • Loading branch information
tdrozdovsky committed Mar 7, 2024
1 parent 27a8219 commit b41fb48
Show file tree
Hide file tree
Showing 2,825 changed files with 1,373,578 additions and 9 deletions.
8 changes: 8 additions & 0 deletions FreeRTOS-metal/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
BasedOnStyle: LLVM
Language: Cpp

BreakBeforeBraces: Allman

IndentWidth: 4
TabWidth : 4
UseTab : Never
41 changes: 41 additions & 0 deletions FreeRTOS-metal/.github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
on:
push:
# Require one of the following patterns to match the tag
tags:
- 'v[0-9]+.[0-9]+.[0-9]+.[0-9]+' # ex. v20.00.00.00
- 'v[0-9]+.[0-9]+.RC.[0-9]+' # ex. v20.00.RC.00

name: Create Release

env:
PROJECT_NAME: FreeRTOS-metal
# Release is a prerelease if the tag contains rc
PRERELEASE: ${{ contains(github.ref, 'RC') }}

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: 'Checkout'
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: 'Create Release Notes'
uses: sifive/action-release-notes@v1
id: create-release-notes
with:
project-name: ${{ env.PROJECT_NAME }}
release: ${{ github.ref }}

- name: 'Create Release'
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ env.PROJECT_NAME }} ${{ github.ref }}
body: ${{ steps.create-release-notes.outputs.release-notes }}
draft: false
prerelease: ${{ env.PRERELEASE }}
70 changes: 70 additions & 0 deletions FreeRTOS-metal/FreeRTOS-Kernel/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
############################################################################
# freertos/Makefile
#
# Copyright (c) 2019 Samsung Electronics Co., Ltd. All Rights Reserved.
# Author: Taras Drozdovskyi [email protected]
#
# 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.
#
############################################################################

-include $(TOPDIR)/Make.defs
-include $(TOPDIR)/.config

CFLAGS += -I./include
CFLAGS += -I$(TOPDIR)/include/mtower
CFLAGS += -I$(TOPDIR)/arch/$(CONFIG_ARCH)/$(CONFIG_ARCH_FAMILY)/src/$(CONFIG_PLATFORM)
CFLAGS += -I./portable/GCC/RISC-V
CFLAGS += -I../../arch/$(subst ",,$(CONFIG_ARCH))/$(subst ",,$(CONFIG_ARCH_FAMILY))/src/$(subst ",,$(CONFIG_PLATFORM))/nonsecure
# CFLAGS += -I../arch/cortex-m23/m2351/src/Device/Nuvoton/M2351/Include
# CFLAGS += -I../arch/cortex-m23/m2351/src/CMSIS/Include
# CFLAGS += -I../arch/cortex-m23/m2351/src/StdDriver/inc
ifeq ($(WORLD), secure)
CFLAGS += -mcmse
endif

SRCS = croutine.c list.c queue.c stream_buffer.c tasks.c timers.c event_groups.c
SRCS += portable/Common/mpu_wrappers.c portable/GCC/RISC-V/port.c portable/GCC/RISC-V/pmp.c portable/MemMang/heap_4.c

ifneq ($(WORLD), secure)
CFLAGS += -DDEBUG_PORT=$(subst ",,$(CONFIG_NONSECURE_DEBUG_UART))
OBJDIR = $(TOPDIR)/build/nonsecure$(subst $(TOPDIR),,$(shell pwd))
endif

ifeq ($(WORLD), secure)
CFLAGS += -DDEBUG_PORT=$(subst ",,$(CONFIG_SECURE_DEBUG_UART))
OBJDIR = $(TOPDIR)/build/secure$(subst $(TOPDIR),,$(shell pwd))
endif

CFLAGS += -DportUSING_MPU_WRAPPERS=1

OBJS = $(addprefix $(OBJDIR)/, $(SRCS:.c=.o))

current_dir = $(subst $(TOPDIR),,$(shell pwd))

$(OBJDIR)/%.o : %.c
$(Q) mkdir -p $(OBJDIR)/$(dir $<)
@echo "CC: $<"
$(Q) $(CC) $(CFLAGS) -c -o $@ $^

libFreeRTOS_s.a: $(OBJS)
$(Q) $(AR) $(OBJDIR)/$@ $(OBJS)
$(Q) cp $(OBJDIR)/$@ $(TOPDIR)/lib/$@

libFreeRTOS_ns.a: $(OBJS)
$(Q) $(AR) $(OBJDIR)/$@ $(OBJS)
$(Q) cp $(OBJDIR)/$@ $(TOPDIR)/lib/$@

clean:
rm -f $(OBJS) libm2351_StdDriver.a

Loading

0 comments on commit b41fb48

Please sign in to comment.