mirror of
https://github.com/eggman/rtl_ameba_gcc_sample.git
synced 2024-11-27 08:40:36 +00:00
fix #2 display SDRAM initialize error messages with RTL8710. \n add dummy SdrControllerInit() in sdk/src/targets/hal/target_rtk/target_8195a/hal_sdr_controller.c\n Makefile selects build/hal_sdr_controller.o or sdk/lib/hal_sdr_controlle.o (this file is extracted from lib_platform.a)\n modify lib_platform.a (remove hal_sdr_controller.o and startup.o)
This commit is contained in:
parent
90aaf470f8
commit
d5d2f9294a
5 changed files with 28 additions and 1 deletions
9
Makefile
9
Makefile
|
@ -17,6 +17,7 @@ SIZE = $(CROSS_COMPILE)size
|
||||||
SDK_SRC_BASE_PATH = sdk/src
|
SDK_SRC_BASE_PATH = sdk/src
|
||||||
|
|
||||||
vpath %.c ./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 %.c $(SDK_SRC_BASE_PATH)/targets/cmsis/target_rtk/target_8195a
|
||||||
vpath %.cc ./src
|
vpath %.cc ./src
|
||||||
|
|
||||||
|
@ -56,6 +57,10 @@ CPPFLAGS += -O2 $(INCLUDES) -D$(CHIP)
|
||||||
|
|
||||||
ASFLAGS = -mcpu=cortex-m3 -mthumb -Wall -a -g $(INCLUDES)
|
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 $(SDK_SRC_BASE_PATH)/targets/cmsis/target_rtk/target_8195a/app_start.c)
|
||||||
C_SRC+=$(wildcard src/*.c)
|
C_SRC+=$(wildcard src/*.c)
|
||||||
CPP_SRC=$(wildcard src/*.cc)
|
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+= -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
|
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
|
ELF_LDLIBS= sdk/lib/startup.o -l_platform -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys
|
||||||
|
endif
|
||||||
|
|
||||||
all: makebin/ram_all.bin
|
all: makebin/ram_all.bin
|
||||||
|
|
||||||
|
|
11
README.md
11
README.md
|
@ -12,6 +12,15 @@ $ make
|
||||||
...
|
...
|
||||||
genrate makebin/ram_all.bin
|
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) )
|
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)
|
* ADC (RTL8195AM only)
|
||||||
* DAC (RTL8195AM only)
|
* DAC (RTL8195AM only)
|
||||||
* SDRAM (RTL8195AM and RTL8711AM only)
|
* SDRAM (RTL8195AM and RTL8711AM only)
|
||||||
* I2S (HAL only)
|
* I2S (only HAL support)
|
||||||
|
|
||||||
## not support
|
## not support
|
||||||
* Wi-Fi
|
* Wi-Fi
|
||||||
|
|
BIN
sdk/lib/hal_sdr_controller.o
Normal file
BIN
sdk/lib/hal_sdr_controller.o
Normal file
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,9 @@
|
||||||
|
#include "rtl8195a.h"
|
||||||
|
|
||||||
|
uint32_t SdrControllerInit(void) __attribute__((section(".hal.ram.text")));
|
||||||
|
|
||||||
|
uint32_t SdrControllerInit(void)
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue