diff --git a/Makefile b/Makefile index a77a374..38993dc 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,7 @@ SIZE = $(CROSS_COMPILE)size SDK_SRC_BASE_PATH = sdk/src vpath %.c ./src +vpath %.c $(SDK_SRC_BASE_PATH)/targets/hal/target_rtk/target_8195a vpath %.c $(SDK_SRC_BASE_PATH)/targets/cmsis/target_rtk/target_8195a vpath %.cc ./src @@ -56,6 +57,10 @@ CPPFLAGS += -O2 $(INCLUDES) -D$(CHIP) ASFLAGS = -mcpu=cortex-m3 -mthumb -Wall -a -g $(INCLUDES) +ifeq ($(SDRAM), true) +else +C_SRC+=$(wildcard $(SDK_SRC_BASE_PATH)/targets/hal/target_rtk/target_8195a/hal_sdr_controller.c) +endif C_SRC+=$(wildcard $(SDK_SRC_BASE_PATH)/targets/cmsis/target_rtk/target_8195a/app_start.c) C_SRC+=$(wildcard src/*.c) CPP_SRC=$(wildcard src/*.cc) @@ -74,7 +79,11 @@ ELF_FLAGS= -O2 -Wl,--gc-sections -mcpu=cortex-m3 -mthumb --specs=nano.specs ELF_FLAGS+= -Lsdk/lib -Lsdk/scripts -Tsdk/scripts/rlx8195a.ld -Wl,-Map=$(OUTPUT_PATH)/target.map ELF_FLAGS+= -Wl,--cref -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--no-enum-size-warning +ifeq ($(SDRAM), true) +ELF_LDLIBS= sdk/lib/startup.o sdk/lib/hal_sdr_controller.o -l_platform -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys +else ELF_LDLIBS= sdk/lib/startup.o -l_platform -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys +endif all: makebin/ram_all.bin diff --git a/README.md b/README.md index edc116b..bb9511b 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,15 @@ $ make ... genrate makebin/ram_all.bin ``` + +* When use SDRAM (for RTL8195AM or RTL8711AM) + +``` +$ make SDRAM=true +... +genrate makebin/ram_all.bin +``` + program ram_all.bin to ameba. ( [Programming the RTL8710 via DAP](https://github.com/eggman/RTL8710_DOC/blob/master/ProgrammingRTL8710.md) ) @@ -35,7 +44,7 @@ program ram_all.bin to ameba. ( [Programming the RTL8710 via DAP](https://github * ADC (RTL8195AM only) * DAC (RTL8195AM only) * SDRAM (RTL8195AM and RTL8711AM only) -* I2S (HAL only) +* I2S (only HAL support) ## not support * Wi-Fi diff --git a/sdk/lib/hal_sdr_controller.o b/sdk/lib/hal_sdr_controller.o new file mode 100644 index 0000000..98883ec Binary files /dev/null and b/sdk/lib/hal_sdr_controller.o differ diff --git a/sdk/lib/lib_platform.a b/sdk/lib/lib_platform.a index d843b94..82a8e9b 100644 Binary files a/sdk/lib/lib_platform.a and b/sdk/lib/lib_platform.a differ diff --git a/sdk/src/targets/hal/target_rtk/target_8195a/hal_sdr_controller.c b/sdk/src/targets/hal/target_rtk/target_8195a/hal_sdr_controller.c new file mode 100644 index 0000000..73833ec --- /dev/null +++ b/sdk/src/targets/hal/target_rtk/target_8195a/hal_sdr_controller.c @@ -0,0 +1,9 @@ +#include "rtl8195a.h" + +uint32_t SdrControllerInit(void) __attribute__((section(".hal.ram.text"))); + +uint32_t SdrControllerInit(void) +{ + return FALSE; +} +