Hello,
I have been using Tiva C Launch Pad TM4C123G, my code is:
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include <math.h>
#include <invert.h>
int main (void) {
int i=0;
float p=3.141;
for(i=0;i<15;i++){
y[i]=sin(2*p*102);
}
invert(y,16);
}
in the file.c :
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <math.h>
#include <invert.h>
void invert (double x[] int m){
}
My problem is that in the debug session, at the line invert(y,16) I get an exit.c file:
#include <stdlib.h>
#include <_lock.h>
void (*__TI_cleanup_ptr)(void) = NULL;
void _DATA_ACCESS (*__TI_dtors_ptr)(int) = NULL;
/****************************************************************************/
/* */
/* LOADER_EXIT - */
/* */
/* SET C$$EXIT LABEL SO THE DEBUGGER KNOWS WHEN THE C++ PROGRAM HAS */
/* COMPLETED. THIS CAN BE REMOVED IF THE DEBUGGER IS NOT USED. */
/* */
/****************************************************************************/
static void loader_exit(void)
{
#if defined(EMBED_CIO_BP)
__asm(" .global C$$EXITE");
#if defined(__32bis__)
__asm("C$$EXITE:.word 0xDEFED0FE");
#else
__asm(" .align 4");
#if defined(__big_endian__)
__asm("C$$EXITE:.half 0xDEFE");
#else
__asm("C$$EXITE:.half 0xD0FE");
#endif /* __big_endian__ */
#endif /* __32bis__ */
#else /* !EMBED_CIO_BP */
__asm(" .global C$$EXIT");
__asm("C$$EXIT: nop");
#endif
}
/****************************************************************************/
/* EXIT() - NORMAL PROGRAM TERMINATION. */
/****************************************************************************/
extern void exit(int status)
{
/*-------------------------------------------------------------------*/
/* MUST LOCK WHEN ACCESSING GLOBALS, like __TI_dtors_ptr, */
/* __TI_cleanup_ptr */
/*-------------------------------------------------------------------*/
_lock();
/*-------------------------------------------------------------------*/
/* BOTH ATEXIT FUNCTIONS AND STATIC OBJECT DESTRUCTORS ARE */
/* REGISTERED IN A LINK LIST TO BE PROCESSED BY THE FUNCTION POINTED */
/* TO BY __TI_dtors_ptr. PROCESS THEM NOW. */
/*-------------------------------------------------------------------*/
if (__TI_dtors_ptr) (*__TI_dtors_ptr)(status);
#if defined(_C_IN_NS)
/*-------------------------------------------------------------------*/
/* _C_IN_NS IS A FLAG WE SET ONLY IN DINKUMWARE HEADERS. SO US IT TO */
/* TELL IF IT IS IN DINKUMWARE. */
/* FOR DINKUMWARE LIBRARY, CALL CLOSEALL() TO CLOSE ALL IO STREAMS. */
/* CLOSEALL() is a DINKUMWARE FUNCTION DEFINED IN FCLOSE.C TO CLOSE */
/* ALL OPENED IOSTREAMS. */
/*-------------------------------------------------------------------*/
closeall();
#else
/*-------------------------------------------------------------------*/
/* IF FILES ARE POSSIBLY OPEN, __TI_cleanup_ptr() WILL BE SETUP TO */
/* CLOSE THEM. */
/*-------------------------------------------------------------------*/
if (__TI_cleanup_ptr) (*__TI_cleanup_ptr)();
#endif
_unlock();
abort();
}
/****************************************************************************/
/* ABORT - ABNORMAL PROGRAM TERMINATION. CURRENTLY JUST HALTS EXECUTION. */
/****************************************************************************/
void abort(void)
{
loader_exit();
for (;;); /* SPINS FOREVER */
}
I also created an hearder file, invert.h :
#ifndef __INVERT_H__
#define __INVERT_H__
extern void invert (double x [], int y );
#endif
which I saved in :C\ti\Tivaware_C_Series-2.1.0.12573\inc, and add it in Properties->ARM Compiler->Include Options.
Why this is happening? What's the reason?
Thanks in advance.