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.

FreeRTOS on EKS-LM3S1968 help requested

Other Parts Discussed in Thread: EK-LM3S8962, LM3S1968, EK-LM3S1968

Hi,  I am working on getting FreeRTOS running on a EKS-LM3S1968 eval board.   I found from an older post that a CCS4 port for the 1968 board was available here:

http://www.embeddedheaven.com/freertos-code-composer-studio-4-lm3sxxxx.htm

I got the code and it builds fine.  However, the OLED display does not seem to be initializing correctly nor can any data be written to it.  In main() there is this code:

    //

    // Initialize the OLED display.

    //

    RIT128x96x4Init(1000000);

When I execute this routine, I can see whatever is on the display blinks for a split second and that is all (ie, stays at original image).  The screen should clear as it does when I run the same routine with the "hello" sample application.  I believe it is something in my environment that is causing this error since if I put code from "hello" into the FreeRTOS project, the same non-clearing behavior happens.
The code attained via the above .zip file is configured to run with the EK-LM3S8962 board.  In order to build it for the LM3S1968, I changed 2 things in the project.  In the .ccxml file I configured for the LM3S1968 board as well as in Project->properties->CCS build.  I have also verified that the 1968 .gel file is being used as expected.  Everything builds fine, but then I get this strange behavior at runtime.  Have I missed any other configuration for the LM3S1968?
I also get this error in the console sometimes: CORTEX_M3_0: Warning: Debug Port error occurred.  But even when I get this I can still step thru the code.
Please let me know if you have any ideas!
Thanks
Bob Van Gulick

  • Bob,

    Did you also make sure to use the linker command file for LM3S1968 (lm3s1968.cmd) in the project? Actually, I just looked at the linker command files and the one for 1968 is the same as the one for 8962, so I would imagine that keeping the original 8962 would also be fine. But just for consistency, you may want to make that change as well. Other than that, I think you've got the other important changes needed to port from one device to another.

    Did you confirm that the "hello" example for 1968 works fine as provided on your board, to confirm that the board/display itself is ok?

    I don't have a EKS-LM3S1968 with me at the momemt, but will try to track one down and see if I can reproduce this. I did test the project with EK-LM3S8962 and it works fine.

  • Hi and thanks for the response...

    When I switched the environment to the 1968 board, the lm3s1968.cmd was automatically generated and added to the project.  

    Yes I verified that the "hello" example works fine on the board (ie, HW is fine).  I still think that I have a config problem since I removed 100% of the data in the FreeRTOS main.c file and replaced it with the exact code from the "hello" project (hello.c).  Then I did the same thing with the startup_ccs.c file.  So at this point the binary should essentially be the "hello" project.  Then I step thru the code and it is the same as the "hello" project, except that the display is broken.  Very strange.  I sounds to me like something is happening before I hit main() in the FreeRTOS project that is configuring the board incorrectly. (?)

    Does CCS do anything to init the HW before we get to main()?   Let me if you any luck reproducing this.  Very curious why it's not working right.  

     

    Thanks

    Bob

     

     

  • Bob,

    I was able to get a hold of a EK-LM3S1968 and look into this. In addition to changing project settings, you need to also add the appropriate source file (rit128x96x4.c) for the display on the LM3S1968. The file that was in the original project for 8962 does not work as-is for 1968.

    To do this, rename the rit128x96x4.c file under \Prj\Stellaris\Drivers, and copy the 1968 version of this file from the latest Stellarisware (should be under C:\StellarisWare\boards\ek-lm3s1968\drivers). Then in the CCS Project view, exclude the original .c file from the build, so only the new one is picked up. This should allow you to build and run the code successfully. Hope this helps.

  • Yes, that was the problem!  Thanks so much for the help!

     

    Bop