Hi,
I am using the TMDSEVM6678LE for the first time. In fact this is my first project using a board ever. I am a bit lost as to how to get my program running.
Here is where I am stuck: My program doesn't do the addition correctly, even though it is able to access the code properly. I mean the control is reaching every line in the main.c and vecSum.c files (see below)
I tried created an empty project with main.c to write a simple vector addition program using CCSv6.1. Following are the project properties and the files in the explorer.
This project builds fine. But my problem is that it gives the following warnings :
1) Can someone please explain what the warnings mean? I understand there are some sections in the .cmd file called MEMORY and SECTIONS. I am not clear even after reading up on this as to what it actually does.
2) I am able to connect the core0 and load the TrialProgs.out onto it and also get it running. But the vectors I have defined don't seem to be accessed. As in, I cant see The output Vector holding the sum. Is my program not able to access the correct memory? why is it not able to traverse the arrays defined or perform additions?
3) .cmd files define the memory map of the target device. Is that correct? Can i modify the .cmd file? or can I make my own .cmd file? can there be more than one .cmd files in the project in that case?
4) how does one pass data from cpu memory to dsp memory? I seem to understand that using the ccxml and cmd the .out is created and when loaded on to the connected core it uses the memory map from the cmd file to access the target core's memory. is this correct?
Also attaching my small code:
/*
* ****main.c******
*/
#include<time.h>
#include<stdio.h>
#include "vecSum.h"
#define MAX_SIZE 10
int x[MAX_SIZE] = {1,2,3,4,5,6,7,8,9,10};
int y[MAX_SIZE] = {10,20,30,40,50,60,70,80,90,100};
int main(void) {
clock_t overhead, start, run_time;
int res[MAX_SIZE];
start = clock();
overhead = clock() - start;
start = clock();
vecSum(x,y,res, MAX_SIZE);
run_time = clock() - start - overhead;
printf("run time: %d", run_time);
return 0;
}
/*
* vecSum.c
* */
#include "vecSum.h"
void vecSum(int *in1, int *in2, int *out, int size){
int i;
for (i = 0; i < size; i++) {
out[i] = in1[i] + in2[i]; // I can see in watch window i= 0 to size-1 but in1[i] and in2[i] when i>0 isn't showing correctly in watch.Also additions are not happening
}
}
Questions and the program is extremely naive, but working with a non trivial board for the first time is pretty overwhelming. Answer and corrections are eagerly awaited.
Thanks in advance.
Regards,
py.