Module that uses c28x's peripherals [message #720706] |
Wed, 31 August 2011 01:57  |
Eclipse User |
|
|
|
Hello,
What should I do if I want to create a module that be able to use C28x's peripherals such as GPIO's, ePWMs, eCAN and SCI's?
Any help would be appreciated. Thanks.
[Updated on: Wed, 31 August 2011 09:15] by Moderator
|
|
|
|
Re: Module that uses c28x's peripherals [message #722855 is a reply to message #721800] |
Tue, 06 September 2011 19:55   |
Eclipse User |
|
|
|
Sebastian,
in one of the previous threads you posted, I described how to add some content to the generated linker command file using templates and getSects(). You can use that same example to include the non-BIOS linker command file. As for the C file, we recently (in XDCtools 3.22) added a new module, xdc.cfg.SourceDir that allows you to specify that you want to add some C source files to an executable build. However, you would also need to create a makefile template that will build GlobalVariableDefs.c.
Right now, I don't have a simple example for SourceDir, and if I remember correctly you are using 3.20, but I'll try to create one and post it here, or ask Dave Russo to do it.
|
|
|
|
Re: Module that uses c28x's peripherals [message #753826 is a reply to message #722863] |
Fri, 28 October 2011 22:35  |
Eclipse User |
|
|
|
Sebastian,
I don't know if you still need it, but I attached an example for the use of xdc.cfg.SourceDir. The attached file consists of two packages. One package (basic.srcDir.pkgA) delivers a C source file and a Makefile. In your case, that would be the package that would deliver GlobalVariableDefs.c. The client package (basic.srcDir) only loads the package basic.srcDir.pkgA. The example is simpler than what your implementation would have to be because it's meant to be the simplest example we can come up with. But I think if you start with this example, and with some additional help, you should be able to apply this to your project.
This is a relatively new feature, and we are actively working on it for 3.23 release sometimes in November. Since you are using 3.22, you'll have to manually delete the directory in which the delivered sources are built. In this example, the name of that directory is 'sources' and it's located in the client's package.
Attachment: srcDir.zip
(Size: 3.10KB, Downloaded 483 times)
|
|
|
Powered by
FUDForum. Page generated in 0.07348 seconds