I am getting the only warning when compiling my code in the MSP430FR5739
#10229-D output section ".data" refers to load symbol "_nop" and hence cannot be compressed; compression "rle" is ignored
Below are the functions for the Circle Buffer. I have found that when I remove these functions, the warning goes away. If I can guess, it has something to do with how I am making the CircleBuffer data type. However, I'm not sure how to fix it.
/*************CIRCULAR BUFFER*************/
typedef struct { unsigned char value; } ElemType;
// Circular buffer object //
typedef struct
{
int size; // maximum number of elements
int start; // index of oldest element
int end; // index at which to write new element
ElemType *elems; // vector of elements
} CircularBuffer;
CircularBuffer cb;
ElemType elem = {0};
int testBufferSize = 0xFFF; // arbitrary size //
void cbInit(CircularBuffer *cb, int size)
{
cb->size = size + 1; // include empty elem //
cb->start = 0;
cb->end = 0;
cb->elems = (ElemType *)calloc(cb->size, sizeof(ElemType));
}
void cbFree(CircularBuffer *cb)
{
free(cb->elems); // OK if null //
}
int cbIsFull(CircularBuffer *cb) {
return (cb->end + 1) % cb->size == cb->start; }
int cbIsEmpty(CircularBuffer *cb) {
return cb->end == cb->start; }
// Write an element, overwriting oldest element if buffer is full. App can
// choose to avoid the overwrite by checking cbIsFull(). //
void cbWrite(CircularBuffer *cb, ElemType *elem) {
cb->elems[cb->end] = *elem;
cb->end = (cb->end + 1) % cb->size;
if (cb->end == cb->start)
cb->start = (cb->start + 1) % cb->size; // full, overwrite //
}
// Read oldest element. App must ensure !cbIsEmpty() first. //
void cbRead(CircularBuffer *cb, ElemType *elem) {
*elem = cb->elems[cb->start];
cb->start = (cb->start + 1) % cb->size;
}
Any suggestions on how I can revise this would be appreciated. I've already looked into the following two posts:
- http://e2e.ti.com/support/development_tools/compiler/f/343/p/86954/307716.aspx#307716
- http://e2e.ti.com/support/development_tools/compiler/f/343/p/247239/864915.aspx