rename: rename the arch directory. [1/1]
PD#SWPL-29812
Problem:
rename the arch directory.
Solution:
rename the sc2 to n200.
Verify:
build pass.
Change-Id: Iaaf06638b516d381d3dfbc767396c3fb1e702419
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
diff --git a/clean b/clean
new file mode 100755
index 0000000..2074e09
--- /dev/null
+++ b/clean
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+
+source scripts/amlogic/clean.sh $1
+
+if [ -f bl30.bin ]
+then
+ rm bl30.bin
+fi
+
diff --git a/demos/amlogic/sc2/handlers.c b/demos/amlogic/n200/handlers.c
similarity index 100%
rename from demos/amlogic/sc2/handlers.c
rename to demos/amlogic/n200/handlers.c
diff --git a/demos/amlogic/sc2/include/gpio-data.h b/demos/amlogic/n200/include/gpio-data.h
similarity index 100%
rename from demos/amlogic/sc2/include/gpio-data.h
rename to demos/amlogic/n200/include/gpio-data.h
diff --git a/demos/amlogic/sc2/include/irq.h b/demos/amlogic/n200/include/irq.h
similarity index 100%
rename from demos/amlogic/sc2/include/irq.h
rename to demos/amlogic/n200/include/irq.h
diff --git a/demos/amlogic/sc2/include/mailbox.h b/demos/amlogic/n200/include/mailbox.h
similarity index 100%
rename from demos/amlogic/sc2/include/mailbox.h
rename to demos/amlogic/n200/include/mailbox.h
diff --git a/demos/amlogic/sc2/include/n200_eclic.h b/demos/amlogic/n200/include/n200_eclic.h
similarity index 100%
rename from demos/amlogic/sc2/include/n200_eclic.h
rename to demos/amlogic/n200/include/n200_eclic.h
diff --git a/demos/amlogic/sc2/include/n200_func.h b/demos/amlogic/n200/include/n200_func.h
similarity index 100%
rename from demos/amlogic/sc2/include/n200_func.h
rename to demos/amlogic/n200/include/n200_func.h
diff --git a/demos/amlogic/sc2/include/n200_timer.h b/demos/amlogic/n200/include/n200_timer.h
similarity index 100%
rename from demos/amlogic/sc2/include/n200_timer.h
rename to demos/amlogic/n200/include/n200_timer.h
diff --git a/demos/amlogic/sc2/include/pwm_plat.h b/demos/amlogic/n200/include/pwm_plat.h
similarity index 100%
rename from demos/amlogic/sc2/include/pwm_plat.h
rename to demos/amlogic/n200/include/pwm_plat.h
diff --git a/demos/amlogic/sc2/include/register.h b/demos/amlogic/n200/include/register.h
similarity index 100%
rename from demos/amlogic/sc2/include/register.h
rename to demos/amlogic/n200/include/register.h
diff --git a/demos/amlogic/sc2/include/riscv_bits.h b/demos/amlogic/n200/include/riscv_bits.h
similarity index 100%
rename from demos/amlogic/sc2/include/riscv_bits.h
rename to demos/amlogic/n200/include/riscv_bits.h
diff --git a/demos/amlogic/sc2/include/riscv_const.h b/demos/amlogic/n200/include/riscv_const.h
similarity index 100%
rename from demos/amlogic/sc2/include/riscv_const.h
rename to demos/amlogic/n200/include/riscv_const.h
diff --git a/demos/amlogic/sc2/include/riscv_encoding.h b/demos/amlogic/n200/include/riscv_encoding.h
similarity index 100%
rename from demos/amlogic/sc2/include/riscv_encoding.h
rename to demos/amlogic/n200/include/riscv_encoding.h
diff --git a/demos/amlogic/sc2/include/soc.h b/demos/amlogic/n200/include/soc.h
similarity index 100%
rename from demos/amlogic/sc2/include/soc.h
rename to demos/amlogic/n200/include/soc.h
diff --git a/demos/amlogic/sc2/n200_func.c b/demos/amlogic/n200/n200_func.c
similarity index 100%
rename from demos/amlogic/sc2/n200_func.c
rename to demos/amlogic/n200/n200_func.c
diff --git a/demos/amlogic/sc2/sc2_ah212/FreeRTOSConfig.h b/demos/amlogic/n200/sc2_ah212/FreeRTOSConfig.h
similarity index 100%
rename from demos/amlogic/sc2/sc2_ah212/FreeRTOSConfig.h
rename to demos/amlogic/n200/sc2_ah212/FreeRTOSConfig.h
diff --git a/demos/amlogic/sc2/sc2_ah212/Makefile b/demos/amlogic/n200/sc2_ah212/Makefile
similarity index 99%
rename from demos/amlogic/sc2/sc2_ah212/Makefile
rename to demos/amlogic/n200/sc2_ah212/Makefile
index 2d5b93b..9997abd 100644
--- a/demos/amlogic/sc2/sc2_ah212/Makefile
+++ b/demos/amlogic/n200/sc2_ah212/Makefile
@@ -75,7 +75,7 @@
OBJS += $(all-y)
$(info SOC=${SOC} BOARD_DIR=$(BOARD_DIR) FREERTOS_ROOT_DIR=${FREERTOS_ROOT_DIR} RTOS_SOURCE_DIR=${RTOS_SOURCE_DIR})
-VPATH += ${RTOS_SOURCE_DIR}:${RTOS_SOURCE_DIR}/portable/MemMang:${FREERTOS_CORE_DIR}:$(FREERTOS_VENDOR_COMMON):$(FREERTOS_VENDOR)/sc2
+VPATH += ${RTOS_SOURCE_DIR}:${RTOS_SOURCE_DIR}/portable/MemMang:${FREERTOS_CORE_DIR}:$(FREERTOS_VENDOR_COMMON):$(FREERTOS_VENDOR)/n200
OBJS += ${COMPILER}/main.o \
${COMPILER}/power.o \
diff --git a/demos/amlogic/sc2/sc2_ah212/config.mk b/demos/amlogic/n200/sc2_ah212/config.mk
similarity index 100%
rename from demos/amlogic/sc2/sc2_ah212/config.mk
rename to demos/amlogic/n200/sc2_ah212/config.mk
diff --git a/demos/amlogic/sc2/sc2_ah212/main.c b/demos/amlogic/n200/sc2_ah212/main.c
similarity index 100%
rename from demos/amlogic/sc2/sc2_ah212/main.c
rename to demos/amlogic/n200/sc2_ah212/main.c
diff --git a/demos/amlogic/sc2/sc2_ah212/power.c b/demos/amlogic/n200/sc2_ah212/power.c
similarity index 100%
rename from demos/amlogic/sc2/sc2_ah212/power.c
rename to demos/amlogic/n200/sc2_ah212/power.c
diff --git a/demos/amlogic/sc2/sc2_ah212/power.h b/demos/amlogic/n200/sc2_ah212/power.h
similarity index 100%
rename from demos/amlogic/sc2/sc2_ah212/power.h
rename to demos/amlogic/n200/sc2_ah212/power.h
diff --git a/demos/amlogic/sc2/sc2_ah212/FreeRTOSConfig.h b/demos/amlogic/n200/sc2_ah219/FreeRTOSConfig.h
similarity index 100%
copy from demos/amlogic/sc2/sc2_ah212/FreeRTOSConfig.h
copy to demos/amlogic/n200/sc2_ah219/FreeRTOSConfig.h
diff --git a/demos/amlogic/sc2/sc2_ah212/Makefile b/demos/amlogic/n200/sc2_ah219/Makefile
similarity index 99%
copy from demos/amlogic/sc2/sc2_ah212/Makefile
copy to demos/amlogic/n200/sc2_ah219/Makefile
index 2d5b93b..9997abd 100644
--- a/demos/amlogic/sc2/sc2_ah212/Makefile
+++ b/demos/amlogic/n200/sc2_ah219/Makefile
@@ -75,7 +75,7 @@
OBJS += $(all-y)
$(info SOC=${SOC} BOARD_DIR=$(BOARD_DIR) FREERTOS_ROOT_DIR=${FREERTOS_ROOT_DIR} RTOS_SOURCE_DIR=${RTOS_SOURCE_DIR})
-VPATH += ${RTOS_SOURCE_DIR}:${RTOS_SOURCE_DIR}/portable/MemMang:${FREERTOS_CORE_DIR}:$(FREERTOS_VENDOR_COMMON):$(FREERTOS_VENDOR)/sc2
+VPATH += ${RTOS_SOURCE_DIR}:${RTOS_SOURCE_DIR}/portable/MemMang:${FREERTOS_CORE_DIR}:$(FREERTOS_VENDOR_COMMON):$(FREERTOS_VENDOR)/n200
OBJS += ${COMPILER}/main.o \
${COMPILER}/power.o \
diff --git a/demos/amlogic/sc2/sc2_skt/config.mk b/demos/amlogic/n200/sc2_ah219/config.mk
similarity index 98%
rename from demos/amlogic/sc2/sc2_skt/config.mk
rename to demos/amlogic/n200/sc2_ah219/config.mk
index 44bbb2a..f7643f0 100644
--- a/demos/amlogic/sc2/sc2_skt/config.mk
+++ b/demos/amlogic/n200/sc2_ah219/config.mk
@@ -25,4 +25,4 @@
#
SOC=sc2
ARCH_CPU=RISC_V_N205
-BOARD=sc2_skt
+BOARD=sc2_ah219
diff --git a/demos/amlogic/sc2/sc2_ah212/main.c b/demos/amlogic/n200/sc2_ah219/main.c
similarity index 100%
copy from demos/amlogic/sc2/sc2_ah212/main.c
copy to demos/amlogic/n200/sc2_ah219/main.c
diff --git a/demos/amlogic/sc2/sc2_ah212/power.c b/demos/amlogic/n200/sc2_ah219/power.c
similarity index 100%
copy from demos/amlogic/sc2/sc2_ah212/power.c
copy to demos/amlogic/n200/sc2_ah219/power.c
diff --git a/demos/amlogic/sc2/sc2_ah212/power.h b/demos/amlogic/n200/sc2_ah219/power.h
similarity index 100%
copy from demos/amlogic/sc2/sc2_ah212/power.h
copy to demos/amlogic/n200/sc2_ah219/power.h
diff --git a/demos/amlogic/sc2/standalone.ld b/demos/amlogic/n200/standalone.ld
similarity index 100%
rename from demos/amlogic/sc2/standalone.ld
rename to demos/amlogic/n200/standalone.ld
diff --git a/demos/amlogic/sc2/start.S b/demos/amlogic/n200/start.S
similarity index 100%
rename from demos/amlogic/sc2/start.S
rename to demos/amlogic/n200/start.S
diff --git a/demos/amlogic/sc2/vtable.S b/demos/amlogic/n200/vtable.S
similarity index 100%
rename from demos/amlogic/sc2/vtable.S
rename to demos/amlogic/n200/vtable.S
diff --git a/demos/amlogic/sc2/sc2_skt/FreeRTOSConfig.h b/demos/amlogic/sc2/sc2_skt/FreeRTOSConfig.h
deleted file mode 100644
index 95ba0b6..0000000
--- a/demos/amlogic/sc2/sc2_skt/FreeRTOSConfig.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (C) 2014-2018 Amlogic, Inc. All rights reserved.
- *
- * All information contained herein is Amlogic confidential.
- *
- * This software is provided to you pursuant to Software License Agreement
- * (SLA) with Amlogic Inc ("Amlogic"). This software may be used
- * only in accordance with the terms of this agreement.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification is strictly prohibited without prior written permission from
- * Amlogic.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef FREERTOS_CONFIG_H
-#define FREERTOS_CONFIG_H
-
-/* Here is a good place to include header files that are required across
-your application. */
-
-#define USER_MODE_TASKS 0
-
-#define configUSE_PREEMPTION 1
-#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0
-#define configUSE_TICKLESS_IDLE 0
-#define configRTC_CLOCK_HZ 24000000//32768
-#define configTICK_RATE_HZ 250
-#define configMAX_PRIORITIES 4
-#define configMINIMAL_STACK_SIZE 450
-#define configMAX_TASK_NAME_LEN 16
-#define configUSE_16_BIT_TICKS 0
-#define configIDLE_SHOULD_YIELD 1
-#define configUSE_TASK_NOTIFICATIONS 1
-#define configUSE_MUTEXES 1
-#define configUSE_RECURSIVE_MUTEXES 0
-#define configUSE_COUNTING_SEMAPHORES 1
-#define configQUEUE_REGISTRY_SIZE 10
-#define configUSE_QUEUE_SETS 0
-#define configUSE_TIME_SLICING 1
-#define configUSE_NEWLIB_REENTRANT 0
-#define configENABLE_BACKWARD_COMPATIBILITY 0
-#define configNUM_THREAD_LOCAL_STORAGE_POINTERS 5
-
-/* Memory allocation related definitions. */
-#define configSUPPORT_STATIC_ALLOCATION 0
-#define configSUPPORT_DYNAMIC_ALLOCATION 1
-#define configTOTAL_HEAP_SIZE 25*1024
-#define configAPPLICATION_ALLOCATED_HEAP 0
-
-/* Hook function related definitions. */
-#define configUSE_IDLE_HOOK 1
-#define configUSE_TICK_HOOK 0
-#define configCHECK_FOR_STACK_OVERFLOW 1
-#define configUSE_MALLOC_FAILED_HOOK 1
-#define configUSE_DAEMON_TASK_STARTUP_HOOK 0
-
-/* Run time and task stats gathering related definitions. */
-#define configGENERATE_RUN_TIME_STATS 0
-#define configUSE_TRACE_FACILITY 0
-#define configUSE_STATS_FORMATTING_FUNCTIONS 0
-
-/* Co-routine related definitions. */
-#define configUSE_CO_ROUTINES 0
-#define configMAX_CO_ROUTINE_PRIORITIES 1
-
-/* Software timer related definitions. */
-#define configUSE_TIMERS 1
-#define configTIMER_TASK_PRIORITY 1
-#define configTIMER_QUEUE_LENGTH 5
-#define configTIMER_TASK_STACK_DEPTH configMINIMAL_STACK_SIZE
-
-/* Interrupt nesting behaviour configuration. */
-#define configKERNEL_INTERRUPT_PRIORITY 1
-#define configMAX_SYSCALL_INTERRUPT_PRIORITY 6
-#define configMAX_API_CALL_INTERRUPT_PRIORITY 6
-
-
-//#define portCRITICAL_NESTING_IN_TCB 1
-//#include "uart.h"
-#include "myprintf.h"
-
-/* Define to trap errors during development. */
-#define configASSERT( x ) if( ( x ) == 0 ) {taskDISABLE_INTERRUPTS(); printf("ASSERT: %s %d\n", __FILE__, __LINE__); for( ;; );}
-
-/* FreeRTOS MPU specific definitions. */
-//#define configINCLUDE_APPLICATION_DEFINED_PRIVILEGED_FUNCTIONS 0
-
-/* Optional functions - most linkers will remove unused functions anyway. */
-#define INCLUDE_vTaskPrioritySet 1
-#define INCLUDE_uxTaskPriorityGet 1
-#define INCLUDE_vTaskDelete 1
-#define INCLUDE_vTaskSuspend 1
-#define INCLUDE_xResumeFromISR 1
-#define INCLUDE_vTaskDelayUntil 1
-#define INCLUDE_vTaskDelay 1
-#define INCLUDE_xTaskGetSchedulerState 1
-#define INCLUDE_xTaskGetCurrentTaskHandle 1
-#define INCLUDE_uxTaskGetStackHighWaterMark 1
-#define INCLUDE_xTaskGetIdleTaskHandle 1
-#define INCLUDE_eTaskGetState 0
-#define INCLUDE_xEventGroupSetBitFromISR 1
-#define INCLUDE_xTimerPendFunctionCall 1
-#define INCLUDE_xTaskAbortDelay 0
-#define INCLUDE_xTaskGetHandle 1
-#define INCLUDE_xTaskResumeFromISR 1
-
-/* A header file that defines trace macro can be included here. */
-
-#endif /* FREERTOS_CONFIG_H */
diff --git a/demos/amlogic/sc2/sc2_skt/Makefile b/demos/amlogic/sc2/sc2_skt/Makefile
deleted file mode 100644
index 2d5b93b..0000000
--- a/demos/amlogic/sc2/sc2_skt/Makefile
+++ /dev/null
@@ -1,125 +0,0 @@
-#
-# Copyright (C) 2014-2018 Amlogic, Inc. All rights reserved.
-#
-# All information contained herein is Amlogic confidential.
-#
-# This software is provided to you pursuant to Software License Agreement
-# (SLA) with Amlogic Inc ("Amlogic"). This software may be used
-# only in accordance with the terms of this agreement.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification is strictly prohibited without prior written permission from
-# Amlogic.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-include config.mk
-
-CUR_DIR := ${dir ${abspath ${lastword ${MAKEFILE_LIST}}}}
-driver_base=$(shell cd ../../;pwd)
-export FREERTOS_ROOT_DIR := ../../../..
-export FREERTOS_VENDOR :=$(FREERTOS_ROOT_DIR)/demos/amlogic
-export FREERTOS_VENDOR_DRIVER := $(driver_base)/driver
-export FREERTOS_VENDOR_COMMON := $(FREERTOS_VENDOR)/common
-export FREERTOS_LIB_DIR := $(FREERTOS_ROOT_DIR)/lib
-export FREERTOS_CORE_DIR := $(FREERTOS_LIB_DIR)/FreeRTOS/portable/GCC/$(ARCH_CPU)
-#export FREERTOS_LIB_THIRD_PARTY := $(FREERTOS_LIB_DIR)/third_party/amlogic/$(COMPILER)/libdrivers.a
-SCATTER_RTOSDemo=../standalone.ld
-BINNAME=RTOSDemo
-
-#$(info $(FREERTOS_CORE_DIR) $(CUR_DIR) $(__GNUC__))
-include $(FREERTOS_VENDOR)/makedefs
-
-RTOS_SOURCE_DIR = ${FREERTOS_LIB_DIR}/FreeRTOS
-OUTPUT := ./out_sc2
-
-CFLAGS += $(WARNINGS) -I . -I./$(FREERTOS_VENDOR)/include -I ../include -I ${FREERTOS_CORE_DIR} -I $(FREERTOS_ROOT_DIR)/lib/include -I $(FREERTOS_ROOT_DIR)/lib/third_party/amlogic/include/drivers -I $(FREERTOS_ROOT_DIR)/lib/third_party/amlogic/include -I ${FREERTOS_LIB_DIR}/include/private
-
-AFLAGS = $(CFLAGS) -D__ASM
-
-CC_PATH = $(shell which $(CC) | xargs dirname )
-CC_VERSION = $(shell $(CC) -dumpversion)
-
-LDFLAGS += -L$(CC_PATH)/../lib/gcc/riscv-none-embed/$(CC_VERSION)/rv32im/ilp32 -lgcc --gc-sections
-$(info LDFLAGS = $(LDFLAGS))
-#LDFLAGS += -L/opt/riscv-none-gcc/7.2.0-4-20180606-1631/riscv-none-embed/lib/rv32im/ilp32 -lm -lc \
- -L/opt/riscv-none-gcc/7.2.0-4-20180606-1631/lib/gcc/riscv-none-embed/7.2.0/rv32im/ilp32 -lgcc
-
--include $(FREERTOS_VENDOR_DRIVER)/uart/build.mk
--include $(FREERTOS_VENDOR_DRIVER)/gpio/build.mk
--include $(FREERTOS_VENDOR_DRIVER)/cec/build.mk
--include $(FREERTOS_VENDOR_DRIVER)/pwm/build.mk
--include $(FREERTOS_VENDOR_DRIVER)/ir/build.mk
--include $(FREERTOS_VENDOR_DRIVER)/str/build.mk
--include $(FREERTOS_VENDOR_DRIVER)/mailbox/build.mk
-
-objs_from_dir=$(sort $(foreach obj, $($(2)-y), \
- $(COMPILER)/$(1)/$(firstword $($(2)-mock-$(PROJECT)-$(obj)) $(obj))))
-
-dirs+=$(shell find $(FREERTOS_VENDOR_DRIVER) -type d)
-_dir_create := $(foreach d,$(dirs),$(shell [ -d $(COMPILER)/$(d) ] || \
- mkdir -p $(COMPILER)/$(d)))
-
-dirs=$(dir $(shell find $(FREERTOS_VENDOR_DRIVER) -name "build.mk"))
-all-y += $(foreach d,$(dirs), $(call objs_from_dir,$(d),$(lastword $(subst /, ,$(d)))))
-OBJS += $(all-y)
-
-$(info SOC=${SOC} BOARD_DIR=$(BOARD_DIR) FREERTOS_ROOT_DIR=${FREERTOS_ROOT_DIR} RTOS_SOURCE_DIR=${RTOS_SOURCE_DIR})
-VPATH += ${RTOS_SOURCE_DIR}:${RTOS_SOURCE_DIR}/portable/MemMang:${FREERTOS_CORE_DIR}:$(FREERTOS_VENDOR_COMMON):$(FREERTOS_VENDOR)/sc2
-
-OBJS += ${COMPILER}/main.o \
- ${COMPILER}/power.o \
- $(COMPILER)/list.o \
- $(COMPILER)/queue.o \
- $(COMPILER)/tasks.o \
- $(COMPILER)/timers.o \
- $(COMPILER)/port.o \
- $(COMPILER)/portasm.o \
- $(COMPILER)/heap_4.o \
- $(COMPILER)/n200_func.o \
- $(COMPILER)/handlers.o \
- $(COMPILER)/util.o \
- $(COMPILER)/myprintf.o \
- $(COMPILER)/start.o \
- $(COMPILER)/vtable.o
-
-#
-# The default rule, which causes init to be built.
-#
-all: $(COMPILER) \
- $(COMPILER)/$(BINNAME).axf
-# out
-
-#
-# The rule to clean out all the build products
-#
-
-clean:
- @rm -rf ${COMPILER} ${wildcard *.bin} RTOSDemo.axf
-
-#
-# The rule to create the target directory
-#
-${COMPILER}:
- @mkdir ${COMPILER}
-
-${COMPILER}/$(BINNAME).axf: ${OBJS}
- $(LD) $(OBJS) $(LDFLAGS) -T $(SCATTER_RTOSDemo) -Map $(COMPILER)/RTOSDemo.map -o $@
- @${OBJCOPY} -O binary ${@} ${@:.axf=.bin}
- @$(OBJDUMP) -D ${@} > ${@:.axf=.dis}
-# @$(FREERTOS_VENDOR)/tools/padfile.sh ${COMPILER}/$(BINNAME).bin
-# @$(FREERTOS_VENDOR)/tools/pack-secpu-loader.py --output=${COMPILER}/$(BINNAME)_pad.bin \
- --seg-id=0 --arb-vers=0 ${COMPILER}/$(BINNAME).bin
-
-
--include $(wildcard $(COMPILER)/*.d)
diff --git a/demos/amlogic/sc2/sc2_skt/main.c b/demos/amlogic/sc2/sc2_skt/main.c
deleted file mode 100644
index 32d6f66..0000000
--- a/demos/amlogic/sc2/sc2_skt/main.c
+++ /dev/null
@@ -1,280 +0,0 @@
-/*
- * Copyright (C) 2014-2018 Amlogic, Inc. All rights reserved.
- *
- * All information contained herein is Amlogic confidential.
- *
- * This software is provided to you pursuant to Software License Agreement
- * (SLA) with Amlogic Inc ("Amlogic"). This software may be used
- * only in accordance with the terms of this agreement.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification is strictly prohibited without prior written permission from
- * Amlogic.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-/* Kernel includes. */
-#include "FreeRTOS.h" /* Must come first. */
-#include "task.h" /* RTOS task related API prototypes. */
-#include "queue.h" /* RTOS queue related API prototypes. */
-#include "timers.h" /* Software timer related API prototypes. */
-#include "semphr.h" /* Semaphore related API prototypes. */
-#include "myprintf.h"
-
-//#include <stdio.h>
-//#include <stdlib.h>
-//#include <string.h>
-#include <unistd.h>
-
-#include "n200_eclic.h"
-#include "n200_func.h"
-#include "uart.h"
-#include "common.h"
-
-#include "riscv_encoding.h"
-
-#include "hdmi_cec.h"
-#include "suspend.h"
-#include "mailbox-api.h"
-
-//#include "printf.h"
-#define INT_TEST_NEST_DEPTH 6
-#define INT_TEST_GPIO_NUM 6
-#define INT_TEST_TASK_DELAY 50 // ms
-#define TASK_TEST_STACK_DEPTH 200
-
-//#define GPIO_INT_SOURCE(x) (SOC_PIC_INT_GPIO_BASE + x)
-
-/* Configure board type:
- * Board under test : SIGNAL_BOARD_ENABLE 0
- * Signal generation board : SIGNAL_BOARD_ENABLE 1
- */
-#define SIGNAL_BOARD_ENABLE 0
-
-#define INT_TEST_INT_WAVE_ENABLE 1
-
-#if INT_TEST_INT_WAVE_ENABLE
- #define INT_TEST_TIMER_PERIOD 500 // ms
- #define INT_TEST_INT_DELAY 10 // ms
-#else
- #define INT_TEST_TIMER_PERIOD 500 // ms
- #define INT_TEST_INT_DELAY 0x3ff // ms
-#endif
-
-#define INT_TEST_MAX_TIMER_PERIOD 100 // ms
-#define INT_TEST_MIN_TIMER_PERIOD 50 // ms
-#define INT_TEST_MUTE_TIMER_PERIOD 200 // ms
-
-/* Interrupt handler */
-void DefaultInterruptHandler(void);
-void GPIOInterruptHandler( uint32_t num, uint32_t priority );
-void vApplicationIdleHook( void );
-void config_eclic_irqs ( void );
-void vApplicationIdleHook( void );
-void vApplicationMallocFailedHook( void );
-void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName );
-void power_on_off_cpu(void);
-
-extern void create_str_task(void);
-
-/* Timer handle */
-TimerHandle_t xSoftTimer = NULL;
-
-void config_eclic_irqs (void)
-{
- eclic_init (ECLIC_NUM_INTERRUPTS);
- //time_init in port.c
- eclic_set_nlbits(0);
-}
-
-void DefaultInterruptHandler(void){}
-
-static void vPrintSystemStatus(TimerHandle_t xTimer) {
- xTimer = xTimer;
- taskENTER_CRITICAL();
- //printf("\nTimer ...\r\n");
- taskEXIT_CRITICAL();
-}
-
-void power_on_off_cpu(void)
-{
- static int state=0;
- //char source;
- //printf("\nKKKKKKKKKKKKK val=0x%x\r\n", REG32(SYSCTRL_STATUS_REG0));
- if (REG32(SYSCTRL_STATUS_REG0) == 0x12345678)
- {
- STR_Start_Sem_Give();
- REG32(SYSCTRL_STATUS_REG0) = 0;
- printf("\nPower off\r\n");
- state ++;
- } else if (state == 1)
- {
- vTaskDelay(pdMS_TO_TICKS(5000));
- //printf("\nPower on\r\n");
- //source = RTC_WAKEUP;
- //STR_Wakeup_src_Queue_Send(&source);
- state = 0;
- }
-}
-
-static void vPrintTask1( void *pvParameters )
-{
- /*make compiler happy*/
- pvParameters = pvParameters;
-
- for ( ;; )
- {
- //printf("\nvPTask1 tick=%d\n",(unsigned int)xTaskGetTickCount());
- vTaskDelay(pdMS_TO_TICKS(1000));
- //dump_fsm();
- power_on_off_cpu();
- }
-}
-
-static void vPrintTask2( void *pvParameters )
-{
- /*make compiler happy*/
- pvParameters = pvParameters;
- vTaskDelay(pdMS_TO_TICKS(500));
- for ( ;; )
- {
- // printf("\nvPTask2 tick=%d\n",(unsigned int)xTaskGetTickCount());
- vTaskDelay(pdMS_TO_TICKS(500));
- }
-}
-
-void vCEC_task(void *pvParameters)
-{
- u32 ret;
-
- pvParameters = pvParameters;
-
- ret = cec_init_config();
-
- if (!ret)
- return;
-
- for ( ;; ) {
- cec_suspend_handle();
- if (cec_get_wakup_flag())
- return;
- vTaskDelay(pdMS_TO_TICKS(5));/*500:0.5s*/
- }
-}
-
-/*
-static void stdout_putf(void *unused, char c)
-{
- unused = unused;
- vUartPutc(c);
-}
-*/
-
-void hardware_init(void);
-void hardware_init()
-{
- config_eclic_irqs();
-}
-
-// Test target board
-int main(void)
-{
- uint32_t i;
- //init_printf(NULL, stdout_putf);
-
- hardware_init();
-
- printf("\nStarting C2 RISCV FreeRTOS...\r\n");
-
- // Initialize GPIOs, PIC and timer
- //vGPIOInit();
-
- vEnableIrq(IRQ_NUM_MB_0, 147);
-
- // Delay
- for (i = 0; i < 4; ++i)
- printf("AOCPU_IRQ_SEL=0x%x\n",REG32(AOCPU_IRQ_SEL0 + i*4));
-
- vMbInit();
-
-
- // Create timer
- xSoftTimer = xTimerCreate("Timer", pdMS_TO_TICKS(100), pdTRUE, NULL, vPrintSystemStatus);
-
- printf("Starting timer ...\r\n");
- xTimerStart(xSoftTimer, 0);
-
- xTaskCreate( vPrintTask1, "Print1", configMINIMAL_STACK_SIZE, NULL, 2, NULL );
- xTaskCreate( vPrintTask2, "Print2", configMINIMAL_STACK_SIZE, NULL, 2, NULL );
- /*xTaskCreate( vCEC_task, "CECtask", configMINIMAL_STACK_SIZE, NULL, 3, NULL );*/
-
- create_str_task();
-
- printf("Starting task scheduler ...\r\n");
- vTaskStartScheduler();
-
- for (;;)
-
- return 0;
-}
-
-void test_handler(void)
-{
- printf("test_handler\r\n");
- printf("state1=0x%x\n", REG32(MAILBOX_STS_MBOX01));
- REG32(MAILBOX_CLR_MBOX01) = 0xffffffff;
-}
-DECLARE_IRQ(IRQ_NUM_MB_0, test_handler)
-
-void vApplicationIdleHook( void )
-{
- //printf("enter idle task\n");
-
- //write_csr(mie, 1); // open mstatue.mie
- asm volatile ("wfi"); // enter low power mode
-}
-/*-----------------------------------------------------------*/
-
-void vApplicationMallocFailedHook( void )
-{
- /* The malloc failed hook is enabled by setting
- configUSE_MALLOC_FAILED_HOOK to 1 in FreeRTOSConfig.h.
-
- Called if a call to pvPortMalloc() fails because there is insufficient
- free memory available in the FreeRTOS heap. pvPortMalloc() is called
- internally by FreeRTOS API functions that create tasks, queues, software
- timers, and semaphores. The size of the FreeRTOS heap is set by the
- configTOTAL_HEAP_SIZE configuration constant in FreeRTOSConfig.h. */
- //write(1,"malloc failed\n", 14);
-
- printf("vApplicationMallocFailedHook\n");
- for ( ;; );
-}
-/*-----------------------------------------------------------*/
-
-void vApplicationStackOverflowHook( TaskHandle_t xTask, signed char *pcTaskName )
-{
- ( void ) pcTaskName;
- ( void ) xTask;
-
- /* Run time stack overflow checking is performed if
- configconfigCHECK_FOR_STACK_OVERFLOW is defined to 1 or 2. This hook
- function is called if a stack overflow is detected. pxCurrentTCB can be
- inspected in the debugger if the task name passed into this function is
- corrupt. */
- //write(1, "Stack Overflow\n", 15);
- printf("vApplicationStackOverflowHook\n");
- for ( ;; );
-}
-/*-----------------------------------------------------------*/
diff --git a/demos/amlogic/sc2/sc2_skt/power.c b/demos/amlogic/sc2/sc2_skt/power.c
deleted file mode 100644
index a9fb043..0000000
--- a/demos/amlogic/sc2/sc2_skt/power.c
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (C) 2014-2018 Amlogic, Inc. All rights reserved.
- *
- * All information contained herein is Amlogic confidential.
- *
- * This software is provided to you pursuant to Software License Agreement
- * (SLA) with Amlogic Inc ("Amlogic"). This software may be used
- * only in accordance with the terms of this agreement.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification is strictly prohibited without prior written permission from
- * Amlogic.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-#include "FreeRTOS.h"
-#include "common.h"
-#include "gpio.h"
-#include "ir.h"
-#include "suspend.h"
-
-static uint32_t power_key_list[] = {
-
- 0xef10fe01, /* ref tv pwr */
- 0xba45bd02, /* small ir pwr */
- 0xef10fb04, /* old ref tv pwr */
- 0xf20dfe01,
- 0xe51afb04
- /* add more */
-};
-static void vIRHandler(void)
-{
- uint32_t buf[4] = {0};
- buf[0] = REMOTE_WAKEUP;
- printf("ir wakeup\n");
- /* do sth below to wakeup*/
- STR_Wakeup_src_Queue_Send_FromISR(buf);
-};
-
-
-void str_hw_init(void);
-void str_hw_disable(void);
-void str_power_on(void);
-void str_power_off(void);
-
-void str_hw_init(void)
-{
- /*enable device & wakeup source interrupt*/
- vIRInit(MODE_HARD_NEC, GPIOD_5, PIN_FUNC1, power_key_list, ARRAY_SIZE(power_key_list), vIRHandler);
-}
-
-
-void str_hw_disable(void)
-{
- /*disable wakeup source interrupt*/
- vIRDeint();
-}
-
-void str_power_on(void)
-{
-
-}
-
-void str_power_off(void)
-{
-
-}
-
diff --git a/demos/amlogic/sc2/sc2_skt/power.h b/demos/amlogic/sc2/sc2_skt/power.h
deleted file mode 100644
index 3c9da27..0000000
--- a/demos/amlogic/sc2/sc2_skt/power.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2014-2018 Amlogic, Inc. All rights reserved.
- *
- * All information contained herein is Amlogic confidential.
- *
- * This software is provided to you pursuant to Software License Agreement
- * (SLA) with Amlogic Inc ("Amlogic"). This software may be used
- * only in accordance with the terms of this agreement.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification is strictly prohibited without prior written permission from
- * Amlogic.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-
-extern void str_hw_init(void);
-extern void str_hw_disable(void);
-extern void str_power_on(void);
-extern void str_power_off(void);
-
diff --git a/scripts/amlogic/util.sh b/scripts/amlogic/util.sh
index 6517af0..83bf529 100644
--- a/scripts/amlogic/util.sh
+++ b/scripts/amlogic/util.sh
@@ -1,4 +1,4 @@
-ARCH_DIRS="sc2"
+ARCH_DIRS="n200"
function list_boards()
{