Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 11 Apr 2006 07:51 AM by  kurtl@logicpd.com
Execution is slower
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages
ramakrishnan@hdmedigroup.com
New Member
New Member
Posts:


--
08 Apr 2006 12:27 AM
    I updated the lolo to newer version (2.0.5) and copied the application from flash to Ram using mem-copy command and tried to execute the application. here also application is running slow.

    Can u figure me out the reason.
    kurtl@logicpd.com
    New Member
    New Member
    Posts:


    --
    10 Apr 2006 09:54 AM
    ramakrishnan.t
    Did you link the program to run from SDRAM? It sounds like you used mem-copy to copy flash code into SDRAM. The problem is that when you begin to execute the code from RAM, it is linked for flash so it will begin to operate out of flash at the first instruction that modifies the PC.
    -K
    ramakrishnan@hdmedigroup.com
    New Member
    New Member
    Posts:


    --
    11 Apr 2006 12:33 AM
    Thank you Mr.Kurtl,
    Sorry, I didn't get what you explained in your previous reply. Kindly explain me in detail. The procedure what iam following is as follows:
    1.Iam using IAR embedded workbench and the RTOS is uC/OS-II.
    2. During linking time i linked with flash as the destination address and generated the elf file. The linker file as follows:
    //************************************************
    // Inform the linker about the CPU family used.
    //************************************************

    -carm

    //*************************************************************************
    // Read-only segments mapped to ROM.
    //*************************************************************************

    //************************************************
    // Address range for reset and exception
    // vectors (INTVEC).
    // The vector area is 32 bytes,
    // an additional 32 bytes is allocated for the
    // constant table used by ldr PC in cstartup.s79.
    //************************************************

    -Z(CODE)INTVEC=90000-9003F
    -DRAMSTART=C00C0000
    -DRAMEND=C2000000
    //************************************************
    // Startup code and exception routines (ICODE).
    //************************************************

    -Z(CODE)ICODE,DIFUNCT=90000-200000
    -Z(CODE)SWITAB=90000-200000

    //************************************************
    // Code segments may be placed anywhere.
    //************************************************

    -Z(CODE)CODE=90000-200000
    -Z(CODE)CSTACK=90000-200000
    //************************************************
    // Original ROM location for __ramfunc code copied
    // to and executed from RAM.
    //************************************************

    -Z(CONST)CODE_ID=90000-200000

    //************************************************
    // Various constants and initializers.
    //************************************************

    -Z(CONST)INITTAB,DATA_ID,DATA_C=90040-200000
    -Z(CONST)CHECKSUM=90000-200000

    //*************************************************************************
    // Read/write segments mapped to RAM.
    //*************************************************************************

    //************************************************
    // Data segments.
    //************************************************

    -Z(DATA)DATA_I,DATA_Z,DATA_N=C00C0000-C2000000

    //************************************************
    // __ramfunc code copied to and executed from RAM.
    //************************************************

    -Z(DATA)CODE_I=C00C0000-C2000000

    //************************************************
    // ICCARM produces code for __ramfunc functions in
    // CODE_I segments. The -Q XLINK command line
    // option redirects XLINK to emit the code in the
    // CODE_ID segment instead, but to keep symbol and
    // debug information associated with the CODE_I
    // segment, where the code will execute.
    //************************************************

    -QCODE_I=CODE_ID


    //**********************************************************************
    // Stack and heap segments.
    //**********************************************************************
    -D_IRQ_STACK_SIZE=800
    -D_FIQ_STACK_SIZE=400
    -D_ABT_STACK_SIZE=400
    -D_UND_STACK_SIZE=400
    -D_SYS_STACK_SIZE=2000
    -D_SVC_STACK_SIZE=2000
    -D_HEAP_SIZE=80000

    -Z(DATA)IRQ_STACK+_IRQ_STACK_SIZE=RAMSTART-RAMEND
    -Z(DATA)FIQ_STACK+_FIQ_STACK_SIZE=RAMSTART-RAMEND
    -Z(DATA)ABT_STACK+_ABT_STACK_SIZE=RAMSTART-RAMEND
    -Z(DATA)UND_STACK+_UND_STACK_SIZE=RAMSTART-RAMEND
    -Z(DATA)SYS_STACK+_SYS_STACK_SIZE=RAMSTART-RAMEND
    -Z(DATA)SVC_STACK+_SVC_STACK_SIZE=RAMSTART-RAMEND
    -Z(DATA)HEAP+_HEAP_SIZE=RAMSTART-RAMEND


    2. The same elf file i relocated with the following command in Cygwin.
    arm-elf-objcopy -O binary file.elf temp.raw
    arm-elf-ld -s -o final.elf -b binary temp.raw -Tdata 0x90000
    -Ttext 0x90000
    3. The LOLO version iam using is lolo 2.0.5.This elf file I burned into Flash.
    4.I wrote a script in eeprom as follows:
    echo "LOLOmem-copy 0x90000 0xc00c0000 size(in bytes); jump 0xc00c0000; exit\n"
    And finally i would like to tell you one more thing that my application is an infinite loop, and it requires as much speed as posible.
    Waiting for early reply.
    Thanks and regards,
    kurtl@logicpd.com
    New Member
    New Member
    Posts:


    --
    11 Apr 2006 07:51 AM
    1) You must link your application so SDRAM at the destination address.
    2) You must burn the SDRAM linked code into flash
    3) You must burn code in flash at offset 0x0 that copies the SDRAM linked code from flash into its destination address in SDRAM
    4) You must jump to the SDRAM code start address

    -Kurt
    You are not authorized to post a reply.