summaryrefslogtreecommitdiffstats
path: root/make/custom/gensh2.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'make/custom/gensh2.cfg')
-rw-r--r--make/custom/gensh2.cfg17
1 files changed, 10 insertions, 7 deletions
diff --git a/make/custom/gensh2.cfg b/make/custom/gensh2.cfg
index 4ef24d80f5..09299bba6f 100644
--- a/make/custom/gensh2.cfg
+++ b/make/custom/gensh2.cfg
@@ -28,9 +28,12 @@ BSP_CPPFLAGS=-DHZ=$(HZ)
#
CPU_CFLAGS= -m2
-# debug flags: typically none, but we use -O1 as it produces better code
-
-CFLAGS_DEBUG_V = -O1
+# debug flags: opt. is needed to fit in RAM. '-O1' has shown bad side-
+# effects by failing to set up some hardware I/O registers in
+# c/src/lib/libbsp/sh/gensh2/startup/hw_init.c (and perhaps elsewhere),
+# which prevented proper chip initialization and muted SCI1 output.
+# CFLAGS_DEBUG_V = -O4 --save-temps
+CFLAGS_DEBUG_V = -O4 -g
# optimize flag: typically -0, could use -O4 or -fast
# -O4 is ok for RTEMS
@@ -52,8 +55,8 @@ CFLAGS_OPTIMIZE_V = -O4
# This switch compiles code to jump-start from FLASH, without a monitor
#
# START_HW_INIT
-# This switch selects whether 'hw_initialize()' is called from
-# 'start.S' or from 'bsp_start()'
+# This switch selects whether 'early_hw_init()' is called from
+# 'start.S'; 'bsp_hw_init()' is always called from 'bspstart.c'
#
define make-target-options
@@ -61,7 +64,7 @@ define make-target-options
@echo "#define RTEMS_TEST_NO_PAUSE 1" >>$@
@echo "#define RTEMS_TEST_IO_STREAM 1" >>$@
@echo "/* #define STANDALONE_EVB 1 */" >>$@
- @echo "/* #define START_HW_INIT 1 */" >>$@
+ @echo "#define START_HW_INIT 1" >>$@
@echo "/* #define RTEMS_DEBUG 1 */" >>$@
endef
@@ -81,7 +84,7 @@ define make-exe
endef
else
define make-exe
- $(LINK.c) -Wl,-Map,$(basename $@).map \
+ $(LINK.c) $(AM_CFLAGS) $(AM_LDFLAGS) -Wl,-Map,$(basename $@).map \
$(LDLIBS) -o $@ \
$(LINK_OBJS) $(LINK_LIBS) -lstdc++
$(NM) -n $@ > $(basename $@).num