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.

Some confusion regarding on-chip peripheral usage with DSP/BIOS...

All,

I am interested in porting an F28335 application from a hand-written executive to the DSP/BIOS (v. 5), which I've never used, but I'm a bit confused about exactly how my "application level" code ought to communicate with the on-chip peripheral devices.  For context, I'm using CCSv5 and writing in C.  I've compiled and run several of the DSP/BIOS example projects (Hello, Clk) just to get a feel for the workflow and the controls, and I've reviewed the DSP BIOS User Guide and API reference guide for the 28335.  Also I've poked around for other information, but I seem able to find only oblique references to what I need.

Let me explain this.  My program uses interfaces to peripherals like the ADC and PWM, and a few other things that require some unique discrete I/O (GPIO), all of which I implemented with separate "device driver" modules in the original program.  So I have an "adc.c" and "adc.h" for the ADC, "pwm.c" and "pwm.h" for the PWM, etc.  These manipulate the peripherals directly, using the various TI register definition includes (e.g. "DSP2833x_Adc.h").  For example, I was interested in measuring timing so I initialized a few GPIO pins for output, setting and resetting these at the start and finish of regions of interest.

I began to realize the problem when I had link issues--the linker complained about placement of the objects declared in "DSP2833x_GlobalVariableDefs.c" which use those definitions in the header files above.  This was no problem in the context of my original hand-written executive since I also wrote my own linker configuration file.  Now, however, CCSv5 is doing this for me using the contents of the .tcf file, presumably.  So, I thought, I must need to adjust the .tcf somehow.

But how?  Succinctly, what is the intended way of using the peripherals in the context of the DSP/BIOS?  I have seen various references to PSPs, CSLs, IOMs, and even a "Device Driver Developer's Guide, SPRU-616," the link to which appears to have been broken for about a year.  I have found a copy of this elsewhere (follow the link), but the obscurity of all this suggests to me that maybe I'm barking up the wrong tree.  Annoyingly, none of the DSP/BIOS examples appears to include the sort of thing that I'd like to do, i.e. manipulate a few GPIO pins, or any other peripherals for that matter.  They seem to be focused upon the dispatching and inter-process communication functions of an OS, but not the management of shared peripheral resources.

So what is the appropriate idiom for interfacing DSP/BIOS application code to peripherals?

 

Thanks,

Mark.

  • Mark,

    You can add a linker command file to your CCS project.

    From within your CCS project, go to File->New->Other and add a C/C++ Source File.

    The Source file name should end with ".cmd" (ie link.cmd). Select <None> for the Template.

    This will add a link.cmd file to your project. You can then edit it to place your object sections as necessary.

    I'm wondering why you're not using SYS/BIOS rather than DSP/BIOS?

    Alan

  • Alan,

    Thanks for helping.  Yes, it's no problem adding a linker control file, it's just that it didn't seem to me to be the right thing to do in the context of using the DSP/BIOS, so I was asking about what would be the correct way to use the peripherals according to the intent of the DSP/BIOS system architects.

    So you have partly answered my question by asking why I'm not using SYS/BIOS.  The honest answer is that I didn't realize they were different versions of the same product until I started looking at the SYS/BIOS documentation today.  Consequently I created a new project based upon the "tsk" example for the 28335.  Thus far, I have been looking at some of the documentation available through CCSv5 Help under SYS/BIOS 6.32.  It seems that the Hardware Abstraction Layer (HAL) is the thing that I want to use now.  Still, there seem to be hooks here for caches and timers and interrupts, but I'm not seeing anything for basic discrete output via GPIO.  I haven't dug much yet, though, or had a look at the example code...

    Thanks!

    Mark.