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.

call cov_dumpData()

Could anybody help me with my errors:

I created library from libcov-ti.c according to the bullseye.com/help for TI 2812 and insert call cov_dumpData to end of my source code.

But call of the function cov_dumpData returns error code 28434.

Where can I be wrong?

Thanks

Max

 

------------------- project source code-------------------------------------------------------------

 

#if !_BullseyeCoverage

#define _BullseyeCoverage
#endif

#if _BullseyeCoverage

#include "BullseyeCoverage.h"

#endif

 

#include <stdio.h>

#include <stdlib.h>

#include <string.h>

 

#define O_CREAT 0

#define O_TRUNC 0

#define O_WRONLY 0

#define S_IRUSR 0

#define S_IWUSR 0

 

static FILE *fout;              

int main(void)

{

int status;

fout = fopen("TEST_PROJECT.htm", "w");

if (!fout)

{

                printf("Can't create log file\n");

}

else

{

                printf("Test PROJECT55\n");

                fprintf(fout, "<head><meta content=text/html; charset=windows-1251>\n");

                fprintf(fout, "<title>Test PROJECT77</title></head>\n");

                fprintf(fout, "<style type=\"text/css\">\n");

                fprintf(fout, "body { font-family: Verdana; font-size: 10pt; text-align: justify; background-image: url('cells.gif')}\n");

                fprintf(fout, "p    { margin-top: 4; margin-bottom: 0; text-indent: 30 } </style>\n");

                fprintf(fout, "<body>\n");

                fprintf(fout, "<p><h3>Test PROJECT11</h3>\n");

                fprintf(fout, "</p>\n");

                fclose(fout);

}

               

 

 

#if _BullseyeCoverage

status = cov_dumpData();

#endif

 

if (status == 0)

{

                               printf("Test PASS\n");

}

else

{

printf("START FINISH %d\n",status);                    

printf("cov_dumpData %d\n", cov_dumpData());                         

printf("END FINISH %d\n",status);                        

}

return 0;

}

 

 

------------------- library source code-------------------------------------------------------------

 

/* $Revision: 14428 $ $Date: 2014-01-30 16:51:42 -0800 (Thu, 30 Jan 2014) $

// Copyright (c) Bullseye Testing Technology

// This source file contains confidential proprietary information.

//

// BullseyeCoverage small footprint run-time for Texas Instruments Code Composer Studio.

// This implementation uses the low-level I/O functions described in the Compiler User's Guide section

// "Using Run-Time-Support Functions and Building Libraries" : "The C I/O Functions"

*/

 

#if _BullseyeCoverage

                #pragma BullseyeCoverage off

#endif

 

#define EINTR (-1)

#define ENOSYS (-2)

 

#define S_IRUSR 0x0100

#define S_IWUSR 0x0080

 

#include <errno.h>

#include <file.h>

#include <stddef.h>

 

#include <stdio.h>

#include <stdlib.h>

#include <stub-fcntl.h>

 

FILE* pFile;

 

int getpid(void)

{

                return 1;

}

 

int open_stub(const char* path, int oflag, int mode)

{

int fd = -1;

const char* m;

                switch (oflag & (O_CREAT | O_RDONLY | O_RDWR | O_WRONLY))

                {

                case O_RDONLY:

                default:

                               m = "r";

                               break;

                case O_RDWR:

                               m = "r+a";

                               break;

                case O_CREAT | O_WRONLY:

                               m = "w";

                               break;

                case O_CREAT | O_RDWR:

                               m = "w+a";

                               break;

                }

               

                pFile = fopen(path, m);

                if (pFile)

                {

                               fd = (int)pFile;

                }

                return fd;

}

 

int close_stub(int fildes)

{

                return fclose((FILE*)fildes);

}

 

int write_stub(int fildes, const void* buf, unsigned nbyte)

{

                fprintf(pFile,buf,nbyte);

                return 0;

}

 

 

#define open  open_stub

#define close close_stub

#define write write_stub

 

 

/*---------------------------------------------------------------------------

// BullseyeCoverage run-time code

*/

#include "atomic.h"

#include "libcov.h"

#include "version.h"

#include "libcov-core-small.h"