Guide to submitting tickets

Follow

Comments

1 comment

  • Avatar
    Willie Steyn

    Hi

     (Questions marked with ------>)

    We have a problem with code that loads and then uses a CAN Open Object Dictionary. It is code that has run perfectly before on another micro and compiled with an older version of the gcc compile. NONE of the code access any on chip hardware, so really it comes as a surprise that the code compiled for the new micro with the later version of the gcc compiler does not function.

     Basically in the new micro the Object Dictionary (which is built in RAM) does not contain valid objects (either after the write or when they are read).

     I have looked at the optimiser settings, but optimisation is at None. There are some compile directives in the new project (CrossStudio 2.3, Release 2.3.2. 2013053101.18474) , that are not in the old project. They are:

    -ffunction-sections -fdata-sections -fno-common

     

    ------> I could see where to turn off -fno-common, but where do I turn off -ffunction-sections -fdata-sections? There seems to be no place in the project properties.

     

    ------> The old project compiled with "arm-unknown-elf", but the new project uses "arm-unknown-eabi". I tried to switch to using "arm-unknown-elf", but the Rowley libraries to link this version is not available (i.e. <libs of type ...\_v7em\_t\_le.a>. Can this be done? Is this a potential source of the problem?

     

    ------> Can you please give any other ideas where to look? Below are more details given:

     

    Thanks you.

     

    Previous working project info:

     - Source code is in C and C++

     - CrossStudio 1.7 Build 18 was used with the gcc compiler that came with it

     - Code was compiled for ATSAM7A3 

     - Compile command line contains among other: 

           Compile:

    ........arm 1.7/gcc/bin/cc1 -fmessage-length=0 -mcpu=arm7tdmi -mthumb-interwork -mlittle-endian -mfpu=vfp -mfloat-abi=soft -nostdinc <some includes> -D__ARM_ARCH_4T__ -D__CROSSWORKS_ARM -D__TARGET_PROCESSOR=AT91SAM7A3 -DOSCILLATOR_CLOCK_FREQUENCY=18432000 -DBUILD_NUMBER=318 -D__ARM -D__FLASH_BUILD -DDEBUG -MD ARM Flash Debug/objects.d -MQ ARM Flash Debug/objects.o -quiet -gdwarf-2 -fno-builtin

     

          Link:

     arm 1.7/gcc/bin/ld -X -nostdlib -ereset_handler --omagic --fatal-warnings -EL -u_vectors -o  <objects> <libs of type ...\_v4t\_a\_le\_mt.a>

     - 

     

    Current problem project Info:

     - Source is in C and C++

     - CrossStudio 2.3, Release 2.3.2. 2013053101.18474

     - Code is compiled for ATSAM4E

     - Compile command line contains among other:

           Compile:

    ........ARM 2.3/gcc/arm-unknown-eabi/bin/cc1" -fmessage-length=0 -mcpu=cortex-m4 -mthumb -mlittle-endian -mfpu=fpv4-sp-d16 -mfloat-abi=soft -nostdinc 

    <some includes> -D__ARM_ARCH_7EM__ -D__CROSSWORKS_ARM -D__CROSSWORKS_MAJOR_VERSION=2 -D__CROSSWORKS_MINOR_VERSION=3 -D__CROSSWORKS_REVISION=2 -D__TARGET_PROCESSOR=SAM4E8C -D__SAM4E8C__= -D__USE_CRYSTAL_OSCILLATOR__= -DNESTED_INTERRUPTS -DCTL_TASKING -DUSE_PROCESS_STACK -D__THUMB -D__FLASH_BUILD -DDEBUG -MD "THUMB Flash Debug/objects.d" -MQ "THUMB Flash Debug/objects.o" -quiet -gdwarf-2 -g2 -std=c99 -fno-dwarf2-cfi-asm -fno-builtin -ffunction-sections -fdata-sections -fno-common

     

          Link:

    ARM 2.3/gcc/arm-unknown-eabi/bin/ld" -X -ereset_handler --omagic -defsym=__do_debug_operation=__do_debug_operation_mempoll -u__do_debug_operation_mempoll -defsym=__vfprintf=__vfprintf_int -u__vfprintf_int -defsym=__vfscanf=__vfscanf_int -u__vfscanf_int --fatal-warnings -EL --gc-sections -u_vectors -o <objects> <libs of type ...\_v7em\_t\_le\_eabi.a>

    End of mail.

Please sign in to leave a comment.