This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Porting TI-RTOS examples

Other Parts Discussed in Thread: LM3S6965, SYSBIOS

Hi,

I am currently using SYS/BIOS for my project.  I would like to use the TCP/IP stack from TI-RTOS in my application.  The given examples are for the DK_LM3S9D96 board, however, I am currently using the EK_LM3S6965 board.  What changes are necessary to correctly port from one to the other? (i.e. I am trying to the DK_LM3S9D96_tcpEcho to work on my  EK_LM3S6965 board).

thanks

  • Hi Luke,

    There are a few steps to port an example to a different board.

    1. Update the board.c/.h/.cmd files as needed (e.g. EK_LM3S9D96.c/.h/.cmd).

    2. Open the Project's Properties and change the General->RTSC->Platform to the desire board (e.g. ti.platforms.stellaris:LM3S9D96 -> ti.platforms.stellaris:LM3S6965)

    3. Also in the Project's Properties, in the Build->Compiler->Advanced Settings->Predefined Symbols, change the PART_LM3S9D96 to PART_LM3S6965.

    4. Open the .cfg file and change the SYS/BIOS CPU clock frequency (Graphically look at SYS/BIOS->Basic Runtime Options or textually "BIOS.cpuFreq.lo = <value>;"

    5. In your case, adjust the SYS/BIOS M3 Boot/Startup Options as needed in the .cfg file

    FYI: We are working on a porting guide to include in the User Guide.

  • That's great, those tips are really helpful.  I had actually done all but step 3.

    Now that they're done though, I've receieved a few compilation errors in EK_LM3S6965.c

    /* Set up the ethernet LEDs */

    //GPIOPinConfigure(GPIO_PF2_LED1);

    //GPIOPinConfigure(GPIO_PF3_LED0);

    /* Configure the appropriate pins to be I2C instead of GPIO. */

    //GPIOPinConfigure(GPIO_PB2_I2C0SCL);

    //GPIOPinConfigure(GPIO_PB3_I2C0SDA);

    /* Configure the appropriate pins to be I2C instead of GPIO. */

    //GPIOPinConfigure(GPIO_PJ0_I2C1SCL);

    //GPIOPinConfigure(GPIO_PJ1_I2C1SDA);

    /* Enable and configure the peripherals used by the uart. */

    //GPIOPinConfigure(GPIO_PA0_U0RX);

    //GPIOPinConfigure(GPIO_PA1_U0TX);

    /* Configure the pins needed */

    //GPIOPinConfigure(GPIO_PA6_USB0EPEN);

    //GPIOPinConfigure(GPIO_PA7_USB0PFLT);

    As you can see, I've commented out the erronious lines, now it compiles just fine.  However, when I try to debug the program, I get the error message

    "ti_sysbios_family_arm_m3__Hwi__execHandlerMax_I(unsigned int*, unsinged int) at ...

    Can't find a source file at "/db/vtree/library/trees/mcusdk/mcusdk-a68/product/mcusdk_1_00_00_68/products/bios_6_33_04_39/packages/ti/sysbios/family/arm/m3/Hwi.c" Locate the file or edit the source lookup path to include its location."

    Any thoughts?

     

    thanks

  • So, I think I've partially solved the above error.

    In the MCU SDK->SYS/BIOS->BIOS section of the config, I changed the SYS/BIOS library type from the default 'Instrumented" to "Custom" and it is now working.  However, when I pause execution I end up in the

    Hwi_excHandlerMax routine of Hwi.c

    If I inspect any of the Viewable Modules in the ROV, they all have the error message

    "Target memory read failed at address: 0xxxxxxxxx, length: 8, This read is at a VALID address according to the application's section map, but the DebugServer memory read failed."

    One thing I find odd, if I modify the *.cmd linker file to resemble those of the other samples for my board (EK_LM3S6965) by changing the line

    SRAM (RWX) : origin = 0x20000000, length = 0x00018000

    to

    length = 0x00010000 (which is how it is setup in all other *.cfg's)

    I get the compile time error #10099-D run placement fails for object on the line

    Sections

    {

         .......

         .bss     :     > SRAM

    }

     

    thanks

     

     

  • Hi Luke,

    The EK_LM3S6965 only has 64MB of SRAM (0x10000). The linker file should have 0x10000 for the length. The error is that you are running out of RAM.

    Todd

  • Thanks,

    How come when I attempt to change the value in *.cmd file it will not complie?  Should there be another change elsewhere I am missing?

  • Can you attach your .map file and .cfg?

  • 1050.EK_LM3S6965_tcpEcho.txt

    3386.tcpEcho.cfg

     

    I had to rename the .map to a .txt

     

    thanks

  • Hi Luke,

    It looks like you got the size down based on the other thread (http://e2e.ti.com/support/embedded/bios/f/355/p/232850/817190.aspx#817190). Can we close this one out and just work on the other thread?

    Todd