Home arrow Support arrow Forums

Luminary Micro Forums

Xplicare

Fresh Boarder

2008/12/08 10:09

Porting RTX-kernel to LM3S1968

Hi everybody,

Our company is designing a measurement device around the Luminary LM3S1968 microcontroller. To program the device, we will use LabVIEW 8.6 for ARM (wich basically is ARM's MDK and a LabVIEW C-compiler).
Since the LM3S1968 is not part of the NI evaluation kit (that one is built around the LM3S8962), I have to create a custom target. I have read the tutorial on http://zone.ni.com/devzone/cda/tut/p/id/7152 , wich tells me I should look in c:KeilARMStartupLuminary for a RTX_conf*.c file for my device. Trouble is; this folder is nearly empty: the only file is Startup.s
Now I could follow the porting procedure on http://zone.ni.com/devzone/cda/tut/p/id/7120#toc0 , but since I'm a 'noob' when it comes to ARM devices, I'm afraid I will mess up my rtx_conf file. Can somebody please point me to a location where I can download this file? I'm probably not the first one to do this, but searching the Keil-website (http://www.keil.com/dd/chip/4305.htm) was no help.
Thanks in advance for your help.

Paul

login or register to reply

TI Joe

Platinum Boarder

2008/12/08 13:37

Re:Porting RTX-kernel to LM3S1968

The support articles you are looking at are for porting from one ARM chip to another (as in different vendors). Since you are still using a Luminary Micro part, it is fairly easy to build your project for the LM3S1968 and you dont need to worry about RTX or any of that other stuff (it is already done for you).

Before I proceed with instructions, I would like to point out that National Instruments prefers to be first line support for the Embedded LabVIEW products and if it becomes an issue specific to Luminary Micro, then they will involve us. Having said that, there is no problem with you posting here, just that it may not result in as quick a response as if you contact NI.

So, here are the instructions to create a project for the LM3S1968.


  • Create a new project, then in project explorer right-click on the project, select New "Targets and Devices" then choose "Other".

  • In project explorer, right click on "Other", then properties.

  • In the "General" category, choose the Luminary Micro target. I know it says 8962, but it will work for a 1968 as well.

  • Then OK out of that box and you should now have a "LM3Sxxxx" target.

  • If you want to use Elemental I/O, then right-click on the LM3Sxxx target, and choose "Select Elemental I/O". From that dialog, choose the Luminary Micro part (again, it will work for 1968).

  • There is one more thing you need to do to let the board support code know you are using a 1968. Once you create your application Build Specification, you need to define a couple of compiler macros as follows:

    On the "Advanced Compiling Options" page, there is a box for preprocessor
    symbols. In the box add the following:

  • Code:

     LM3S_PART_DEFINED PART_LM3S1968




You should now be able to create and build your VIs for the 1968 target. I recommend you start with something simple like a simple while loop with an indicator first just to make sure that builds and runs correctly. Then start adding more pieces from there.

login or register to reply

Xplicare

Fresh Boarder

2008/12/09 09:53

Re:Porting RTX-kernel to LM3S1968

Hi Joe,

Thanks for your reply. This was very helpful and certainly clearer than NI's documentation :-)
Is the procedure you described the same for other Luminary microcontrollers in the LM3Sxxxx series? I guess it would be sufficient to change the preprocessor symbol line to reflect the change of target?

Paul

login or register to reply

TI Joe

Platinum Boarder

2008/12/09 11:24

Re:Porting RTX-kernel to LM3S1968

Yes, in the macro just put whatever part you are using. For example: PART_LM3S6965. This macro tells the board support code how to map the pins for the various peripherals since that can change between chips. But the code to actually control the peripherals is the same for all the Stellaris microcontrollers so that is why it will work when you change chips.

You do need to watch the memory size. It presently assumes you are using a part with 256K flash and 64K RAM. If you decide to use a part with smaller memory, then you will need to manually change the memory setting in the microvision project after you create the project. And of course you need to make sure your application is not using more than that amount of memory or else it will not fit. LabVIEW likes to use a lot of heap so we allocate half the RAM for the heap. If you use a part with less RAM you will also need to adjust the heap setting.

login or register to reply