Re: feedback on Re: [PATCH v3] BSP for TMS570LS31x Hercules Development Kit from TI (TMS570LS3137)

2014-08-21 Thread Sebastian Huber

On 21/08/14 11:21, Pavel Pisa wrote:

Hello Sebastian,

On Thursday 21 of August 2014 08:59:15 Sebastian Huber wrote:

On 20/08/14 20:17, Joel Sherrill wrote:

Hi

Initial quick feedback.  I build normally with --enable-rtems-debug
and the tms570ls3137_hdk variant failed to build with this
failure:

arm-rtems4.11-gcc --pipe -DHAVE_CONFIG_H   -I../../..
-I../../../../cpukit/../../../tms570ls3137_hdk/lib/include  -DASM
-march=armv7-r -mthumb -mbig-endian -O2 -ggdb3 -DNDEBUG -Wall
-Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes
-Wnested-externs -march=armv7-r -mthumb -mbig-endian -O2 -ggdb3 -DNDEBUG


Why do we have this -ggdb3 -NDEBUG set?


May be, we have not understood right flags intended use.
I my understanding is, that CFLAGS_OPTIMIZE_V are used for
build without --enable-rtems-debug and flags CFLAGS_DEBUG_V
when --enable-rtems-debug is present.

Then BSP defines in preferred way. We have build with default
options (without internal debug). This means that RTEMS
binary should be optimized and without internal self debug
code (NDEBUG). But want to have as much debug information
for external debugger as possible. This is -ggdb/-ggdb3.


Such options should be set in a BSP independent way.  This NDEBUG is currently 
not controlled by configure options.




In the fact the settings has been taken from other boards.
Actually from
   arm/lpc176x/make/custom/lpc1768_mbed.cfg
but rtl22xx.cfg is the same and -g is in almost every other ARM *.cfg.


Looks like we have to clean this up.

[...]


--
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail  : sebastian.hu...@embedded-brains.de
PGP : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: feedback on Re: [PATCH v3] BSP for TMS570LS31x Hercules Development Kit from TI (TMS570LS3137)

2014-08-20 Thread Joel Sherrill

On 8/20/2014 1:45 PM, Pavel Pisa wrote:
 On Wednesday 20 of August 2014 20:17:47 Joel Sherrill wrote:
 Hi

 Initial quick feedback.  I build normally with --enable-rtems-debug
 and the tms570ls3137_hdk variant failed to build with this
 failure:

 arm-rtems4.11-gcc --pipe -DHAVE_CONFIG_H   -I../../..
 -I../../../../cpukit/../../../tms570ls3137_hdk/lib/include  -DASM
 -march=armv7-r -mthumb -mbig-endian -O2 -ggdb3 -DNDEBUG -Wall
 -Wmissing-prototypes -Wimplicit-function-declaration -Wstrict-prototypes
 -Wnested-externs -march=armv7-r -mthumb -mbig-endian -O2 -ggdb3 -DNDEBUG
 -Wall -Wmissing-prototypes -Wimplicit-function-declaration
 -Wstrict-prototypes -Wnested-externs -MT
 libscorecpu_a-arm-context-volatile-clobber.o -MD -MP -MF
 .deps/libscorecpu_a-arm-context-volatile-clobber.Tpo -c -o
 libscorecpu_a-arm-context-volatile-clobber.o `test -f
 'arm-context-volatile-clobber.S' || echo
 '../../../../../../../../rtems/c/src/../../cpukit/score/cpu/arm/'`arm-conte
 xt-volatile-clobber.S mv -f
 .deps/libscorecpu_a-arm-context-volatile-clobber.Tpo
 .deps/libscorecpu_a-arm-context-volatile-clobber.Po
 In file included from
 ../../../../cpukit/../../../tms570ls3137_hdk/lib/include/rtems/score/percpu
 .h:25:0, from
 ../../../../cpukit/../../../tms570ls3137_hdk/lib/include/rtems/system.h:23,
  from
 ../../../../../../../../rtems/c/src/../../cpukit/score/cpu/arm/cpu.c:29:
 ../../../../cpukit/../../../tms570ls3137_hdk/lib/include/rtems/score/isrloc
 k.h: In function '_ISR_lock_ISR_disable_and_acquire':
 ../../../../cpukit/../../../tms570ls3137_hdk/lib/include/rtems/score/assert
 .h:38:46: error: '__ASSERT_FUNC' undeclared (first use in this function)
__assert_func( __FILE__, __LINE__, __ASSERT_FUNC, #_e ) )
   ^

 Since there was some work to add a new ARM variant, I am suspicious that
 a .h file is missing when this is compiled for Rx ARM variants.

 I didn't build other variants and am trying again with debug disabled.
 Hello Joel,

 we need to recheck that.

 We have been using optimized build and our target is build for SDRAM.
 We tested internal RAM as well. The flashing to start RTEMS image
 from address 0 has not been checked yet and cannot work with additional
 initial code implementation.

 There would be problem to build some larger test for internal
 RAM variant because they overflow.
I expect that and the list of tests which do not fit can be put in the
.tcfg file
for the variant.
 I have run ticker test on the board compiled from actual RTEMS mainline
 with next configuration options and everything seems OK for this setup
 on real HW

 ../../../git/rtems/configure --target=arm-rtems4.11 --prefix=/opt/rtems4.11 \
   --enable-rtems-inlines --disable-multiprocessing --enable-cxx \
   --enable-rdbg --enable-maintainer-mode --enable-tests=samples \
   --enable-networking --enable-posix --enable-itron --disable-ada \
   --disable-expada --disable-multilib --disable-docs \
   --enable-rtemsbsp=tms570ls3137_hdk_sdram
Hmmm... tms570ls3137_hdk_sdram also fails on ticker with this:

arm-rtems4.11-gcc -B../../../../../tms570ls3137_hdk_sdram/lib/ -specs
bsp_specs -qrtems -march=armv7-r -mthumb -mbig-endian -O2 -ggdb3
-DNDEBUG -Wall -Wmissing-prototypes -Wimplicit-function-declaration
-Wstrict-prototypes -Wnested-externs-march=armv7-r -mthumb
-mbig-endian   -o ticker.exe init.o tasks.o
../../../../../tms570ls3137_hdk_sdram/lib/start.o: In function
`bsp_start_vector_table_end':
/users/joel/rtems-4.11-work/b-tms570ls3137_hdk_sdram/arm-rtems4.11/c/tms570ls3137_hdk_sdram/lib/libbsp/arm/tms570/../../../../../../../../rtems/c/src/lib/libbsp/arm/tms570/../shared/start/start.S:229:(.bsp_start_text+0x94):
relocation truncated to fit: R_ARM_THM_JUMP11 against symbol
`bsp_start_hook_0' defined in .text section in
../../../../../tms570ls3137_hdk_sdram/lib/librtemsbsp.a(libbsp_a-bspstarthooks.o)
collect2: error: ld returned 1 exit status

 I expect that inclusion of of assert.h or something similar world help
 to debug case. I look at it now or tomorrow.
I suspect this is just a conditional path that misses an include. Easy
to fix.
 As for regular RTEMS build it would worth to limit it/enable only
 tms570ls3137_hdk_sdram, other variants are more or less
 waste of compilation time for now. On the other hand,
 tms570ls3137_hdk_intram has its use to be tested on board
 without SDRAM and there are many other smaller variants
 of TMS570 MCUs which are suitable for RTEMS in future but
 again these are without external bus interface.
Well it is merged so we all have a common ground to work from.
We could have different tools or something minor could be different
in the two bsps. Who knows? We will find it. :)
 Best wishes,

  Pavel

-- 
Joel Sherrill, Ph.D. Director of Research  Development
joel.sherr...@oarcorp.comOn-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available