when compiling code with gcc-3.4.0
The bug when compiling msp430-libc in libm/sf-rint.c causes this
internal error
[peter_...@sts-cvs src]$ msp430-gcc -mmcu=msp1 -I./../include -I. -Wall
-O2 -g -c libm/sf_rint.c -o msp1/sf_rint.o -save-temps -v
Reading specs from /usr/local/lib/gcc/msp430/3.4.0/specs
Configured with: ../gcc-3.4.0/configure --target=msp430
Thread model: single
gcc version 3.4.0
/usr/local/libexec/gcc/msp430/3.4.0/cc1 -E -quiet -v -I./../include
-I. libm/sf_rint.c -mmcu=msp1 -Wall -fworking-directory -O2 -o sf_rint.i
ignoring nonexistent directory
"/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/sys-include"
#include "..." search starts here:
#include <...> search starts here:
./../include
.
/usr/local/lib/gcc/msp430/3.4.0/include
/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include
End of search list.
/usr/local/libexec/gcc/msp430/3.4.0/cc1 -fpreprocessed sf_rint.i
-quiet -dumpbase sf_rint.c -mmcu=msp1 -auxbase-strip msp1/sf_rint.o -g
-O2 -Wall -version -o sf_rint.s
GNU C version 3.4.0 (msp430)
compiled by GNU C version 3.2 20020903 (Red Hat Linux 8.0 3.2-7).
GGC heuristics: --param ggc-min-expand=38 --param ggc-min-heapsize=15772
In file included from libm/fdlibm.h:16,
from libm/sf_rint.c:16:
/../include/math.h:112: warning: conflicting types for built-in
function 'cabs'
/../include/math.h:190: warning: conflicting types for built-in
function 'cabsf'
libm/sf_rint.c: In function `rintf':
libm/sf_rint.c:70: error: unrecognizable insn:
(insn 370 369 101 5 libm/sf_rint.c:51 (set (subreg:HI (mem/v/f:SF
(reg/f:HI 4 r4) [3 w+0 S4 A32]) 2)
(subreg:HI (reg:SF 58) 2)) -1 (nil)
(expr_list:REG_DEAD (reg:SF 58)
(nil)))
libm/sf_rint.c:70: internal compiler error: in extract_insn, at recog.c:2083
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
attached is the sf_rint.i file, this is fixed by removing the volatile
in line 38 of libm/sf_rint.c
Compiling code I have I get this fault, attached is the main.i output
[peter_...@sts-cvs AWS2003.1.0.C169]$ msp430-gcc -O2 -DTARGET
-mmcu=msp430x149 -g -Wno-main -Wall -Werror -Wno-format
-mmcu=msp430x149 -I./include -Ibl/include -Iblbl/include
-Iblblbl/include -c bl/argosSeimac/main.c -o
argosSeimac/msp430x149/main.o --save-temps -v
Reading specs from /usr/local/lib/gcc/msp430/3.4.0/specs
Configured with: ../gcc-3.4.0/configure --target=msp430
Thread model: single
gcc version 3.4.0
/usr/local/libexec/gcc/msp430/3.4.0/cc1 -E -quiet -v -I./include
-Ibl/include -Iblbl/include -Iblblbl/include -D__MSP430_149__ -DTARGET
bl/argosSeimac/main.c -mmcu=msp430x149 -mmcu=msp430x149 -Wno-main -Wall
-Werror -Wno-format -fworking-directory -O2 -o main.i
ignoring nonexistent directory
"/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/sys-include"
ignoring nonexistent directory "blbl/include"
ignoring nonexistent directory "blblbl/include"
#include "..." search starts here:
#include <...> search starts here:
./include
bl/include
/usr/local/lib/gcc/msp430/3.4.0/include
/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include
End of search list.
/usr/local/libexec/gcc/msp430/3.4.0/cc1 -fpreprocessed main.i -quiet
-dumpbase main.c -mmcu=msp430x149 -mmcu=msp430x149 -auxbase-strip
argosSeimac/msp430x149/main.o -g -O2 -Wno-main -Wall -Werror -Wno-format
-version -o main.s
GNU C version 3.4.0 (msp430)
compiled by GNU C version 3.2 20020903 (Red Hat Linux 8.0 3.2-7).
GGC heuristics: --param ggc-min-expand=38 --param ggc-min-heapsize=15772
bl/argosSeimac/main.c: In function `main':
bl/argosSeimac/main.c:236: internal compiler error: in
subreg_highpart_offset, at emit-rtl.c:1328
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Any ideas?
--
Peter Jansen
STS
Australian Antarctic Division
Channel Highway
Kingston
TAS 7050
AUSTRALIA
Ph (03) 62 323 533
Fax (03) 62 323 351
# 1 "bl/argosSeimac/main.c"
# 1 "/home/peter_jan/aegis/AWS2003.1.0.C169//"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "bl/argosSeimac/main.c"
# 9 "bl/argosSeimac/main.c"
# 1 "bl/include/stdio.h" 1
# 32 "bl/include/stdio.h"
# 1 "/usr/local/lib/gcc/msp430/3.4.0/include/stddef.h" 1 3 4
# 151 "/usr/local/lib/gcc/msp430/3.4.0/include/stddef.h" 3 4
typedef int ptrdiff_t;
# 213 "/usr/local/lib/gcc/msp430/3.4.0/include/stddef.h" 3 4
typedef unsigned int size_t;
# 325 "/usr/local/lib/gcc/msp430/3.4.0/include/stddef.h" 3 4
typedef int wchar_t;
# 33 "bl/include/stdio.h" 2
# 1 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/sys/types.h" 1 3
# 36 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/sys/types.h" 3
# 1 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/sys/cdefs.h" 1 3
# 37 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/sys/types.h" 2
3
# 1 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/sys/inttypes.h"
1 3
# 38
"/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/sys/inttypes.h" 3
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef int int16_t;
typedef unsigned int uint16_t;
typedef long int32_t;
typedef unsigned long uint32_t;
typedef long long int64_t;
typedef unsigned long long uint64_t;
typedef int16_t intptr_t;
typedef uint16_t uintptr_t;
# 38 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/sys/types.h" 2
3
typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef uint8_t u_int8_t;
typedef uint16_t u_int16_t;
typedef uint32_t u_int32_t;
typedef uint64_t u_int64_t;
typedef u_int64_t u_quad_t;
typedef int64_t quad_t;
typedef quad_t * qaddr_t;
typedef char * caddr_t;
typedef const char * c_caddr_t;
typedef volatile char *v_caddr_t;
typedef u_int32_t fixpt_t;
typedef u_int32_t gid_t;
typedef u_int32_t in_addr_t;
typedef u_int16_t in_port_t;
typedef u_int32_t ino_t;
typedef long key_t;
typedef u_int16_t mode_t;
typedef u_int16_t nlink_t;
typedef quad_t rlim_t;
typedef int32_t segsz_t;
typedef int32_t swblk_t;
typedef int32_t ufs_daddr_t;
typedef int32_t ufs_time_t;
typedef u_int32_t uid_t;
# 34 "bl/include/stdio.h" 2
# 1 "/usr/local/lib/gcc/msp430/3.4.0/include/stdarg.h" 1 3 4
# 43 "/usr/local/lib/gcc/msp430/3.4.0/include/stdarg.h" 3 4
typedef __builtin_va_list __gnuc_va_list;
# 105 "/usr/local/lib/gcc/msp430/3.4.0/include/stdarg.h" 3 4
typedef __gnuc_va_list va_list;
# 37 "bl/include/stdio.h" 2
# 47 "bl/include/stdio.h"
# 1 "/usr/local/msp430/include/stdio.h" 1
# 32 "/usr/local/msp430/include/stdio.h"
# 1 "/usr/local/lib/gcc/msp430/3.4.0/include/stddef.h" 1 3 4
# 33 "/usr/local/msp430/include/stdio.h" 2
# 49 "/usr/local/msp430/include/stdio.h"
int __attribute__((format (printf, 2, 3))) uprintf(int (*func)(int c), const
char *fmt, ...);
int __attribute__((format (printf, 3, 4))) snprintf (char *buf, size_t size,
const char *fmt, ...);
int __attribute__((format (printf, 2, 3))) sprintf (char *buf, const char *fmt,
...);
int __attribute__((format (printf, 1, 2))) printf(const char *string, ...);
int vuprintf(int (*func)(int c), const char *fmt0, va_list ap);
int vsnprintf(char *dest, size_t maxlen, const char *string, va_list ap);
int vsprintf(char *dest, const char *string, va_list ap);
int vprintf(const char *string, va_list ap);
int puts(const char *s);
int putchar(int c);
# 48 "bl/include/stdio.h" 2
# 10 "bl/argosSeimac/main.c" 2
# 1 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/stdlib.h" 1 3
# 32 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/stdlib.h" 3
# 1 "/usr/local/lib/gcc/msp430/3.4.0/include/stddef.h" 1 3 4
# 33 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/stdlib.h" 2 3
# 52 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/stdlib.h" 3
extern void exit(int) __asm__("__stop_progExec__") __attribute__((__const__));
typedef struct {
int quot;
int rem;
} div_t;
extern div_t div(int num, int denom);
typedef struct {
long quot;
long rem;
} ldiv_t;
extern ldiv_t ldiv(long num, long denom);
extern __inline__ int abs(int __x) __attribute__((__const__));
extern __inline__ int
abs(int __x)
{
return (__x < 0) ? -__x : __x;
}
extern __inline__ long labs(long __x) __attribute__((__const__));
extern __inline__ long
labs(long __x)
{
return (__x < 0) ? -__x : __x;
}
long strtol(const char *, char **, int);
unsigned long strtoul(const char *, char **, int);
int atoi(const char *p);
long atol(const char *p);
void *malloc(size_t size);
void free (void *p);
void * bsearch(const void *, const void *, size_t, size_t, register int
(*compar)(const void *, const void *));
int rand(void);
void srand(unsigned __seed);
int rand_r(unsigned *__seed);
# 11 "bl/argosSeimac/main.c" 2
# 1 "bl/include/version.h" 1
# 12 "bl/include/version.h"
extern const char FirmwareVersion[];
extern const char FirmwareDate[];
# 13 "bl/argosSeimac/main.c" 2
# 1 "bl/include/nmea.h" 1
# 12 "bl/include/nmea.h"
# 1 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/stdint.h" 1 3
# 52 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/stdint.h" 3
typedef signed char int_least8_t;
typedef int int_least16_t;
typedef long int int_least32_t;
__extension__ typedef long long int int_least64_t;
typedef unsigned char uint_least8_t;
typedef unsigned int uint_least16_t;
typedef unsigned long int uint_least32_t;
__extension__ typedef unsigned long long int uint_least64_t;
typedef signed char int_fast8_t;
typedef int int_fast16_t;
typedef long int int_fast32_t;
__extension__ typedef long long int int_fast64_t;
typedef unsigned char uint_fast8_t;
typedef unsigned int uint_fast16_t;
typedef unsigned long int uint_fast32_t;
__extension__ typedef unsigned long long int uint_fast64_t;
# 88 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/stdint.h" 3
__extension__ typedef long long int intmax_t;
__extension__ typedef unsigned long long int uintmax_t;
# 13 "bl/include/nmea.h" 2
extern char strMasterID[3];
extern char strSlaveID[3];
extern int8_t NmeaCheckString(char *String);
extern uint8_t NmeaCheckSum;
void NmeaPrintf(const char *fmt, ...);
extern int NmeaPutch(int ch);
extern void NmeaPacketStart(char *cmd);
extern void NmeaPacketEnd(void);
# 14 "bl/argosSeimac/main.c" 2
# 1 "bl/include/cmd.h" 1
# 26 "bl/include/cmd.h"
typedef struct CmdTableStruct
{
const char Command[10];
void (*const Function)(void);
} CmdTable;
extern char Line[];
extern const CmdTable CmdTab[];
extern int8_t FindCommand(char *);
int8_t Cmd(void);
char *getNextParameter();
char *getFirstParameter(register char *p);
# 15 "bl/argosSeimac/main.c" 2
# 1 "./include/aws.h" 1
# 40 "./include/aws.h"
extern unsigned int instrumentErrorCode;
# 185 "./include/aws.h"
struct DCOTuneStruct
{
volatile uint8_t u8Control;
volatile uint16_t u16Ticks;
volatile uint16_t u16Last;
volatile uint16_t u16Period;
volatile int16_t i16Error;
volatile int16_t i16NewDCO;
volatile uint8_t u8Rsel;
};
extern struct DCOTuneStruct DCOTune;
extern volatile unsigned int uiSleep;
# 16 "bl/argosSeimac/main.c" 2
# 1 "bl/include/argos.h" 1
# 12 "bl/include/argos.h"
# 1 "bl/include/ucosii.h" 1
# 14 "bl/include/ucosii.h"
# 1 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/string.h" 1 3
# 33 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/string.h" 3
# 1 "/usr/local/lib/gcc/msp430/3.4.0/include/stddef.h" 1 3 4
# 34 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/string.h" 2 3
extern void *memccpy(void *, const void *, int, size_t);
extern void *memchr(const void *, int, size_t);
extern int memcmp(const void *, const void *, size_t);
extern void *memcpy(void *, const void *, size_t);
extern void *memmove(void *, const void *, size_t);
extern void *memset(void *, int, size_t);
extern char *strcat(char *, const char *);
extern char *strchr(const char *, int);
extern int strcmp(const char *, const char *);
extern char *strcpy(char *, const char *);
extern int strcasecmp(const char *, const char *);
extern size_t strlen(const char *);
extern char *strlwr(char *);
extern char *strncat(char *, const char *, size_t);
extern int strncmp(const char *, const char *, size_t);
extern char *strncpy(char *, const char *, size_t) ;
extern int strncasecmp(const char *, const char *, size_t);
extern size_t strnlen(const char *, size_t);
extern char *strrchr(const char *, int);
extern char *strrev(char *);
extern char *strstr(const char *, const char *);
extern char *strupr(char *);
extern int bcmp(const void *b1, const void *b2, size_t length);
extern char *strsep(char **, const char *);
extern void bcopy(const void *, void *, size_t);
extern size_t strlcat(char *, const char *, size_t);
extern void * memset(void *, int, size_t);
extern void bzero(void *, size_t);
extern size_t strlcpy(char *, const char *, size_t);
extern char * strdup(const char *);
extern void swab(const void *, void *, size_t);
extern char * strtok_r(char *s, const char *delim, char **last);
extern char * strtok(char *s, const char *delim);
# 15 "bl/include/ucosii.h" 2
# 1 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/ctype.h" 1 3
extern inline int isalpha(int c) { return ((c>='A'&&c<='Z')||(c>='a'&&c<='z'));
}
extern inline int iscntrl(int c) { return ((c>=0&&c<=27)||c==127);}
extern inline int isdigit(int c) { return (((c)>='0')&&((c)<='9'));}
extern inline int isalnum(int c) { return (isalpha(c)||isdigit(c));}
extern inline int isspace(int c) { return ((c) == ' ' || ((c) >= '\t' && (c) <=
'\r'));}
extern inline int isascii(int c) { return (((c) & ~0x7f) == 0);}
extern inline int isupper(int c) { return ((c) >= 'A' && (c) <= 'Z');}
extern inline int islower(int c) { return ((c) >= 'a' && (c) <= 'z');}
extern inline int isprint(int c) { return (c>23 && c<127);}
extern inline int isblank(int c) { return (c=='\t' || c==' ');}
extern inline int isxdigit(int c)
{
return (isdigit(c)|| ((c) >= 'A' && (c) <= 'F') || ((c) >= 'a' && (c) <= 'f'));
}
extern inline int ispunct(int c)
{
return (isprint (c) && !islower(c) && !isupper(c) && c != ' ' && !isdigit(c));
}
extern inline int toupper(int c) { return ((c) - 0x20 * (((c) >= 'a') && ((c)
<= 'z')));}
extern inline int tolower(int c) { return ((c) + 0x20 * (((c) >= 'A') && ((c)
<= 'Z'))) ;}
extern inline int toascii(int c) { return (c&0x7f);}
# 16 "bl/include/ucosii.h" 2
# 1 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/signal.h" 1 3
# 33 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/signal.h" 3
# 1 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/iomacros.h" 1 3
# 124 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/iomacros.h" 3
extern void __bis_sr_irq(int);
extern void __bic_sr_irq(int);
extern void *__get_frame_address(void);
# 34 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/signal.h" 2 3
# 19 "bl/include/ucosii.h" 2
# 1 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430x14x.h" 1
3
# 26 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430x14x.h" 3
# 1 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/mpy.h" 1
3
# 18 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/mpy.h" 3
volatile unsigned int MPY asm("0x0130");
volatile unsigned int MPYS asm("0x0132");
volatile unsigned int MAC asm("0x0134");
volatile unsigned int MACS asm("0x0136");
volatile unsigned int OP2 asm("0x0138");
volatile unsigned int RESLO asm("0x013A");
volatile unsigned int RESHI asm("0x013C");
volatile unsigned int SUMEXT asm("0x013E");
# 27 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430x14x.h"
2 3
# 1 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/gpio.h"
1 3
# 1
"/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/iostructures.h"
1 3
# 27
"/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/iostructures.h"
3
typedef union port {
volatile unsigned char reg_p;
volatile struct {
unsigned char __p0:1,
__p1:1,
__p2:1,
__p3:1,
__p4:1,
__p5:1,
__p6:1,
__p7:1;
} __pin;
} __attribute__ ((packed)) ioregister_t;
# 106
"/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/iostructures.h"
3
struct port_full_t {
ioregister_t in;
ioregister_t out;
ioregister_t dir;
ioregister_t ifg;
ioregister_t ies;
ioregister_t ie;
ioregister_t sel;
};
struct port_simple_t {
ioregister_t in;
ioregister_t out;
ioregister_t dir;
ioregister_t sel;
};
struct port_full_t port1 asm("0x0020");
struct port_full_t port2 asm("0x0028");
struct port_simple_t port3 asm("0x0018");
struct port_simple_t port4 asm("0x001c");
struct port_simple_t port5 asm("0x0030");
struct port_simple_t port6 asm("0x0034");
# 2 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/gpio.h"
2 3
# 101
"/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/gpio.h" 3
volatile unsigned char P1IN asm("0x0020");
volatile unsigned char P1OUT asm("0x0021");
volatile unsigned char P1DIR asm("0x0022");
volatile unsigned char P1IFG asm("0x0023");
volatile unsigned char P1IES asm("0x0024");
volatile unsigned char P1IE asm("0x0025");
volatile unsigned char P1SEL asm("0x0026");
volatile unsigned char P2IN asm("0x0028");
volatile unsigned char P2OUT asm("0x0029");
volatile unsigned char P2DIR asm("0x002A");
volatile unsigned char P2IFG asm("0x002B");
volatile unsigned char P2IES asm("0x002C");
volatile unsigned char P2IE asm("0x002D");
volatile unsigned char P2SEL asm("0x002E");
volatile unsigned char P3IN asm("0x0018");
volatile unsigned char P3OUT asm("0x0019");
volatile unsigned char P3DIR asm("0x001A");
volatile unsigned char P3SEL asm("0x001B");
volatile unsigned char P4IN asm("0x001C");
volatile unsigned char P4OUT asm("0x001D");
volatile unsigned char P4DIR asm("0x001E");
volatile unsigned char P4SEL asm("0x001F");
volatile unsigned char P5IN asm("0x0030");
volatile unsigned char P5OUT asm("0x0031");
volatile unsigned char P5DIR asm("0x0032");
volatile unsigned char P5SEL asm("0x0033");
volatile unsigned char P6IN asm("0x0034");
volatile unsigned char P6OUT asm("0x0035");
volatile unsigned char P6DIR asm("0x0036");
volatile unsigned char P6SEL asm("0x0037");
# 28 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430x14x.h"
2 3
# 1 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/usart.h"
1 3
# 85
"/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/usart.h" 3
volatile unsigned char U0CTL asm("0x0070");
volatile unsigned char U0TCTL asm("0x0071");
volatile unsigned char U0RCTL asm("0x0072");
volatile unsigned char U0MCTL asm("0x0073");
volatile unsigned char U0BR0 asm("0x0074");
volatile unsigned char U0BR1 asm("0x0075");
volatile unsigned char U0RXBUF asm("0x0076");
volatile unsigned char U0TXBUF asm("0x0077");
volatile unsigned char UCTL asm("0x0070");
volatile unsigned char UTCTL asm("0x0071");
volatile unsigned char URCTL asm("0x0072");
volatile unsigned char UMCTL asm("0x0073");
volatile unsigned char UBR0 asm("0x0074");
volatile unsigned char UBR1 asm("0x0075");
volatile unsigned char RXBUF asm("0x0076");
volatile unsigned char TXBUF asm("0x0077");
volatile unsigned char UCTL0 asm("0x0070");
volatile unsigned char UTCTL0 asm("0x0071");
volatile unsigned char URCTL0 asm("0x0072");
volatile unsigned char UMCTL0 asm("0x0073");
volatile unsigned char UBR00 asm("0x0074");
volatile unsigned char UBR10 asm("0x0075");
volatile unsigned char RXBUF0 asm("0x0076");
volatile unsigned char TXBUF0 asm("0x0077");
volatile unsigned char UCTL_0 asm("0x0070");
volatile unsigned char UTCTL_0 asm("0x0071");
volatile unsigned char URCTL_0 asm("0x0072");
volatile unsigned char UMCTL_0 asm("0x0073");
volatile unsigned char UBR0_0 asm("0x0074");
volatile unsigned char UBR1_0 asm("0x0075");
volatile unsigned char RXBUF_0 asm("0x0076");
volatile unsigned char TXBUF_0 asm("0x0077");
# 253
"/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/usart.h" 3
volatile unsigned char U1CTL asm("0x0078");
volatile unsigned char U1TCTL asm("0x0079");
volatile unsigned char U1RCTL asm("0x007A");
volatile unsigned char U1MCTL asm("0x007B");
volatile unsigned char U1BR0 asm("0x007C");
volatile unsigned char U1BR1 asm("0x007D");
volatile unsigned char U1RXBUF asm("0x007E");
volatile unsigned char U1TXBUF asm("0x007F");
volatile unsigned char UCTL1 asm("0x0078");
volatile unsigned char UTCTL1 asm("0x0079");
volatile unsigned char URCTL1 asm("0x007A");
volatile unsigned char UMCTL1 asm("0x007B");
volatile unsigned char UBR01 asm("0x007C");
volatile unsigned char UBR11 asm("0x007D");
volatile unsigned char RXBUF1 asm("0x007E");
volatile unsigned char TXBUF1 asm("0x007F");
volatile unsigned char UCTL_1 asm("0x0078");
volatile unsigned char UTCTL_1 asm("0x0079");
volatile unsigned char URCTL_1 asm("0x007A");
volatile unsigned char UMCTL_1 asm("0x007B");
volatile unsigned char UBR0_1 asm("0x007C");
volatile unsigned char UBR1_1 asm("0x007D");
volatile unsigned char RXBUF_1 asm("0x007E");
volatile unsigned char TXBUF_1 asm("0x007F");
# 29 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430x14x.h"
2 3
# 1
"/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/timera.h" 1 3
# 22
"/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/timera.h" 3
volatile unsigned int TAIV asm("0x012E");
volatile unsigned int TACTL asm("0x0160");
volatile unsigned int TACCTL0 asm("0x0162");
volatile unsigned int TACCTL1 asm("0x0164");
volatile unsigned int TACCTL2 asm("0x0166");
volatile unsigned int TAR asm("0x0170");
volatile unsigned int TACCR0 asm("0x0172");
volatile unsigned int TACCR1 asm("0x0174");
volatile unsigned int TACCR2 asm("0x0176");
volatile unsigned int CCTL0 asm("0x0162");
volatile unsigned int CCTL1 asm("0x0164");
volatile unsigned int CCTL2 asm("0x0166");
volatile unsigned int CCR0 asm("0x0172");
volatile unsigned int CCR1 asm("0x0174");
volatile unsigned int CCR2 asm("0x0176");
# 85
"/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/timera.h" 3
typedef struct {
volatile unsigned
taifg:1,
taie:1,
taclr:1,
dummy:1,
tamc:2,
taid:2,
tassel:2;
} __attribute__ ((packed)) tactl_t;
typedef struct {
volatile unsigned
ccifg:1,
cov:1,
out:1,
cci:1,
ccie:1,
outmod:3,
cap:1,
dummy:1,
scci:1,
scs:1,
ccis:2,
cm:2;
} __attribute__ ((packed)) tacctl_t;
struct timera_t {
tactl_t ctl;
tacctl_t cctl0;
tacctl_t cctl1;
tacctl_t cctl2;
volatile unsigned dummy[4];
volatile unsigned tar;
volatile unsigned taccr0;
volatile unsigned taccr1;
volatile unsigned taccr2;
};
struct timera_t timera asm("0x0160");
# 30 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430x14x.h"
2 3
# 1
"/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/timerb.h" 1 3
# 22
"/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/timerb.h" 3
volatile unsigned int TBIV asm("0x011E");
volatile unsigned int TBCTL asm("0x0180");
volatile unsigned int TBCCTL0 asm("0x0182");
volatile unsigned int TBCCTL1 asm("0x0184");
volatile unsigned int TBCCTL2 asm("0x0186");
volatile unsigned int TBR asm("0x0190");
volatile unsigned int TBCCR0 asm("0x0192");
volatile unsigned int TBCCR1 asm("0x0194");
volatile unsigned int TBCCR2 asm("0x0196");
volatile unsigned int TBCCTL3 asm("0x0188");
volatile unsigned int TBCCTL4 asm("0x018A");
volatile unsigned int TBCCTL5 asm("0x018C");
volatile unsigned int TBCCTL6 asm("0x018E");
volatile unsigned int TBCCR3 asm("0x0198");
volatile unsigned int TBCCR4 asm("0x019A");
volatile unsigned int TBCCR5 asm("0x019C");
volatile unsigned int TBCCR6 asm("0x019E");
typedef struct {
volatile unsigned
tbifg:1,
tbie:1,
tbclr:1,
dummy1:1,
tbmc:2,
tbid:2,
tbssel:2,
dummy2:1,
tbcntl:2,
tbclgrp:2;
} __attribute__ ((packed)) tbctl_t;
typedef struct {
volatile unsigned
ccifg:1,
cov:1,
out:1,
cci:1,
ccie:1,
outmod:3,
cap:1,
clld:2,
scs:1,
ccis:2,
cm:2;
} __attribute__ ((packed)) tbcctl_t;
struct timerb_t {
tbctl_t ctl;
tbcctl_t cctl0;
tbcctl_t cctl1;
tbcctl_t cctl2;
tbcctl_t cctl3;
tbcctl_t cctl4;
tbcctl_t cctl5;
tbcctl_t cctl6;
volatile unsigned tbr;
volatile unsigned tbccr0;
volatile unsigned tbccr1;
volatile unsigned tbccr2;
volatile unsigned tbccr3;
volatile unsigned tbccr4;
volatile unsigned tbccr5;
volatile unsigned tbccr6;
};
struct timerb_t timerb asm("0x0180");
# 31 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430x14x.h"
2 3
# 1
"/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/basic_clock.h"
1 3
# 18
"/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/basic_clock.h"
3
volatile unsigned char DCOCTL asm("0x0056");
volatile unsigned char BCSCTL1 asm("0x0057");
volatile unsigned char BCSCTL2 asm("0x0058");
# 32 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430x14x.h"
2 3
# 1 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/flash.h"
1 3
# 18
"/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/flash.h" 3
volatile unsigned int FCTL1 asm("0x0128");
volatile unsigned int FCTL2 asm("0x012A");
volatile unsigned int FCTL3 asm("0x012C");
# 33 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430x14x.h"
2 3
# 1 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/compa.h"
1 3
# 18
"/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/compa.h" 3
volatile unsigned char CACTL1 asm("0x0059");
volatile unsigned char CACTL2 asm("0x005A");
volatile unsigned char CAPD asm("0x005B");
# 34 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430x14x.h"
2 3
# 1 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/adc12.h"
1 3
# 18
"/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/adc12.h" 3
volatile unsigned int ADC12CTL0 asm("0x01A0");
volatile unsigned int ADC12CTL1 asm("0x01A2");
volatile unsigned int ADC12IFG asm("0x01A4");
volatile unsigned int ADC12IE asm("0x01A6");
volatile unsigned int ADC12IV asm("0x01A8");
typedef struct {
volatile unsigned
adc12sc:1,
enc:1,
adc12tovie:1,
adc12ovie:1,
adc12on:1,
refon:1,
r2_5v:1,
msc:1,
sht0:4,
sht1:4;
} __attribute__ ((packed)) adc12ctl0_t;
typedef struct {
volatile unsigned
adc12busy:1,
conseq:2,
adc12ssel:2,
adc12div:3,
issh:1,
shp:1,
shs:2,
cstartadd:4;
} __attribute__ ((packed)) adc12ctl1_t;
typedef struct {
volatile unsigned
bit0:1,
bit1:1,
bit2:1,
bit3:1,
bit4:1,
bit5:1,
bit6:1,
bit7:1,
bit8:1,
bit9:1,
bit10:1,
bit11:1,
bit12:1,
bit13:1,
bit14:1,
bit15:1;
} __attribute__ ((packed)) adc12xflg_t;
struct adc12_t {
adc12ctl0_t ctl0;
adc12ctl1_t ctl1;
adc12xflg_t ifg;
adc12xflg_t ie;
adc12xflg_t iv;
};
struct adc12_t adc12 asm("0x01A0");
# 100
"/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/adc12.h" 3
volatile unsigned int ADC12MEM0 asm("0x0140");
volatile unsigned int ADC12MEM1 asm("0x0142");
volatile unsigned int ADC12MEM2 asm("0x0144");
volatile unsigned int ADC12MEM3 asm("0x0146");
volatile unsigned int ADC12MEM4 asm("0x0148");
volatile unsigned int ADC12MEM5 asm("0x014A");
volatile unsigned int ADC12MEM6 asm("0x014C");
volatile unsigned int ADC12MEM7 asm("0x014E");
volatile unsigned int ADC12MEM8 asm("0x0150");
volatile unsigned int ADC12MEM9 asm("0x0152");
volatile unsigned int ADC12MEM10 asm("0x0154");
volatile unsigned int ADC12MEM11 asm("0x0156");
volatile unsigned int ADC12MEM12 asm("0x0158");
volatile unsigned int ADC12MEM13 asm("0x015A");
volatile unsigned int ADC12MEM14 asm("0x015C");
volatile unsigned int ADC12MEM15 asm("0x015E");
# 139
"/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/adc12.h" 3
volatile unsigned char ADC12MCTL0 asm("0x0080");
volatile unsigned char ADC12MCTL1 asm("0x0081");
volatile unsigned char ADC12MCTL2 asm("0x0082");
volatile unsigned char ADC12MCTL3 asm("0x0083");
volatile unsigned char ADC12MCTL4 asm("0x0084");
volatile unsigned char ADC12MCTL5 asm("0x0085");
volatile unsigned char ADC12MCTL6 asm("0x0086");
volatile unsigned char ADC12MCTL7 asm("0x0087");
volatile unsigned char ADC12MCTL8 asm("0x0088");
volatile unsigned char ADC12MCTL9 asm("0x0089");
volatile unsigned char ADC12MCTL10 asm("0x008A");
volatile unsigned char ADC12MCTL11 asm("0x008B");
volatile unsigned char ADC12MCTL12 asm("0x008C");
volatile unsigned char ADC12MCTL13 asm("0x008D");
volatile unsigned char ADC12MCTL14 asm("0x008E");
volatile unsigned char ADC12MCTL15 asm("0x008F");
# 35 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430x14x.h"
2 3
# 1
"/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/common.h" 1 3
# 71
"/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430/common.h" 3
volatile unsigned int WDTCTL asm("0x0120");
# 37 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430x14x.h"
2 3
volatile unsigned char IE1 asm("0x0000");
# 48 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/msp430x14x.h" 3
volatile unsigned char IFG1 asm("0x0002");
volatile unsigned char ME1 asm("0x0004");
volatile unsigned char IE2 asm("0x0001");
volatile unsigned char IFG2 asm("0x0003");
volatile unsigned char ME2 asm("0x0005");
# 22 "bl/include/ucosii.h" 2
# 1 "bl/include/os_cpu.h" 1
# 39 "bl/include/os_cpu.h"
typedef unsigned char BOOLEAN;
typedef unsigned char INT8U;
typedef signed char INT8S;
typedef unsigned int INT16U;
typedef signed int INT16S;
typedef unsigned long INT32U;
typedef signed long INT32S;
typedef float FP32;
typedef double FP64;
typedef unsigned int OS_STK;
typedef unsigned int OS_CPU_SR;
# 113 "bl/include/os_cpu.h"
extern OS_STK *OSISRStkPtr;
OS_CPU_SR OSCPUSaveSR(void);
void OSCPURestoreSR(OS_CPU_SR cpu_sr);
# 25 "bl/include/ucosii.h" 2
# 1 "bl/include/os_cfg.h" 1
# 26 "bl/include/ucosii.h" 2
# 249 "bl/include/ucosii.h"
typedef struct os_event {
INT8U OSEventType;
INT8U OSEventGrp;
INT16U OSEventCnt;
void *OSEventPtr;
INT8U OSEventTbl[(((7 +1)) / 8 + 1)];
} OS_EVENT;
# 346 "bl/include/ucosii.h"
typedef struct os_mutex_data {
INT8U OSEventTbl[(((7 +1)) / 8 + 1)];
INT8U OSEventGrp;
INT8U OSValue;
INT8U OSOwnerPrio;
INT8U OSMutexPIP;
} OS_MUTEX_DATA;
# 389 "bl/include/ucosii.h"
typedef struct os_sem_data {
INT16U OSCnt;
INT8U OSEventTbl[(((7 +1)) / 8 + 1)];
INT8U OSEventGrp;
} OS_SEM_DATA;
# 403 "bl/include/ucosii.h"
typedef struct os_stk_data {
INT32U OSFree;
INT32U OSUsed;
} OS_STK_DATA;
# 416 "bl/include/ucosii.h"
typedef struct os_tcb {
OS_STK *OSTCBStkPtr;
void *OSTCBExtPtr;
OS_STK *OSTCBStkBottom;
INT32U OSTCBStkSize;
INT16U OSTCBOpt;
INT16U OSTCBId;
struct os_tcb *OSTCBNext;
struct os_tcb *OSTCBPrev;
OS_EVENT *OSTCBEventPtr;
# 445 "bl/include/ucosii.h"
INT16U OSTCBDly;
INT8U OSTCBStat;
INT8U OSTCBPrio;
INT8U OSTCBX;
INT8U OSTCBY;
INT8U OSTCBBitX;
INT8U OSTCBBitY;
# 469 "bl/include/ucosii.h"
} OS_TCB;
# 478 "bl/include/ucosii.h"
extern INT32U OSCtxSwCtr;
extern OS_EVENT *OSEventFreeList;
extern OS_EVENT OSEventTbl[3];
# 491 "bl/include/ucosii.h"
extern INT8S OSCPUUsage;
extern INT32U OSIdleCtrMax;
extern INT32U OSIdleCtrRun;
extern BOOLEAN OSStatRdy;
extern OS_STK OSTaskStatStk[(64)];
extern INT8U OSIntNesting;
extern INT8U OSIntExitY;
extern INT8U OSLockNesting;
extern INT8U OSPrioCur;
extern INT8U OSPrioHighRdy;
extern INT8U OSRdyGrp;
extern INT8U OSRdyTbl[(((7 +1)) / 8 + 1)];
extern BOOLEAN OSRunning;
extern INT8U OSTaskCtr;
extern volatile INT32U OSIdleCtr;
extern OS_STK OSTaskIdleStk[(64)];
extern OS_TCB *OSTCBCur;
extern OS_TCB *OSTCBFreeList;
extern OS_TCB *OSTCBHighRdy;
extern OS_TCB *OSTCBList;
extern OS_TCB *OSTCBPrioTbl[(7 +1) + 1];
extern OS_TCB OSTCBTbl[7 + 2];
# 540 "bl/include/ucosii.h"
extern volatile INT32U OSTime;
extern INT8U const OSMapTbl[8];
extern INT8U const OSUnMapTbl[256];
# 662 "bl/include/ucosii.h"
INT8U OSMutexAccept(OS_EVENT *pevent, INT8U *err);
OS_EVENT *OSMutexCreate(INT8U prio, INT8U *err);
OS_EVENT *OSMutexDel(OS_EVENT *pevent, INT8U opt, INT8U *err);
void OSMutexPend(OS_EVENT *pevent, INT16U timeout, INT8U *err);
INT8U OSMutexPost(OS_EVENT *pevent);
INT8U OSMutexQuery(OS_EVENT *pevent, OS_MUTEX_DATA *pdata);
# 732 "bl/include/ucosii.h"
INT16U OSSemAccept(OS_EVENT *pevent);
OS_EVENT *OSSemCreate(INT16U cnt);
OS_EVENT *OSSemDel(OS_EVENT *pevent, INT8U opt, INT8U *err);
void OSSemPend(OS_EVENT *pevent, INT16U timeout, INT8U *err);
INT8U OSSemPost(OS_EVENT *pevent);
INT8U OSSemQuery(OS_EVENT *pevent, OS_SEM_DATA *pdata);
# 769 "bl/include/ucosii.h"
INT8U OSTaskCreate(void (*task)(void *pd), void *pdata, OS_STK *ptos, INT8U
prio);
INT8U OSTaskCreateExt(void (*task)(void *pd),
void *pdata,
OS_STK *ptos,
INT8U prio,
INT16U id,
OS_STK *pbos,
INT32U stk_size,
void *pext,
INT16U opt);
# 800 "bl/include/ucosii.h"
INT8U OSTaskStkChk(INT8U prio, OS_STK_DATA *pdata);
# 814 "bl/include/ucosii.h"
void OSTimeDly(INT16U ticks);
INT8U OSTimeDlyHMSM(INT8U hours, INT8U minutes, INT8U seconds, INT16U milli);
INT8U OSTimeDlyResume(INT8U prio);
INT32U OSTimeGet(void);
void OSTimeSet(INT32U ticks);
void OSTimeTick(void);
void OSInit(void);
void OSIntEnter(void);
void OSIntExit(void);
void OSStart(void);
void OSStatInit(void);
INT16U OSVersion(void);
# 866 "bl/include/ucosii.h"
INT8U OS_EventTaskRdy(OS_EVENT *pevent, void *msg, INT8U msk);
void OS_EventTaskWait(OS_EVENT *pevent);
void OS_EventTO(OS_EVENT *pevent);
void OS_EventWaitListInit(OS_EVENT *pevent);
# 885 "bl/include/ucosii.h"
void OS_Sched(void);
void OS_TaskIdle(void *data);
void OS_TaskStat(void *data);
void OS_TaskStkClr(OS_STK *ptos, INT32U size, INT16U opt);
INT8U OS_TCBInit(INT8U prio, OS_STK *ptos, OS_STK *pbos, INT16U id, INT32U
stk_size, void *pext, INT16U opt);
# 912 "bl/include/ucosii.h"
void OSInitHookBegin(void);
void OSInitHookEnd(void);
void OSIntCtxSw(void);
void OSStartHighRdy(void);
void OSTaskCreateHook(OS_TCB *ptcb);
void OSTaskDelHook(OS_TCB *ptcb);
void OSTaskIdleHook(void);
void OSTaskStatHook(void);
OS_STK *OSTaskStkInit(void (*task)(void *pd), void *pdata, OS_STK *ptos, INT16U
opt);
void OSTCBInitHook(OS_TCB *ptcb);
void OSTimeTickHook(void);
# 950 "bl/include/ucosii.h"
void OSCtxSw(void);
void OSTickISR(void);
# 13 "bl/include/argos.h" 2
# 22 "bl/include/argos.h"
typedef struct argosParam
{
unsigned int length;
unsigned int start;
char conversion[20];
} argosParam;
typedef struct
{
unsigned int length;
char string[4];
argosParam param[30];
} argosString;
struct configTableStruct
{
char strMasterID[3];
char strSlaveID[3];
char sno[40];
unsigned long defaultCmdPeriod;
uint8_t u8Messages;
char defaultCommands[5];
char calDate[80];
argosString strings[5];
};
extern __attribute__((section(".calTab"))) struct configTableStruct configTable;
extern OS_EVENT *argosTxSem;
extern unsigned int messageLength;
extern unsigned char stringsReceived;
extern unsigned char message[64];
extern void argos(char *string);
# 17 "bl/argosSeimac/main.c" 2
# 33 "bl/argosSeimac/main.c"
# 1 "/usr/local/lib/gcc/msp430/3.4.0/../../../../msp430/include/io.h" 1 3
# 34 "bl/argosSeimac/main.c" 2
# 1 "bl/include/usart0.h" 1
# 138 "bl/include/usart0.h"
void usart0Init(uint16_t baudDiv, uint8_t baudMod, uint8_t mode);
# 158 "bl/include/usart0.h"
void usart0Baud(uint16_t baudDiv, uint8_t baudMod, uint8_t mode);
# 175 "bl/include/usart0.h"
int usart0Putch(char ch);
# 193 "bl/include/usart0.h"
int usart0TxEmpty(void);
# 210 "bl/include/usart0.h"
void usart0TxFlush(void);
# 227 "bl/include/usart0.h"
void usart0RxFlush(void);
# 243 "bl/include/usart0.h"
int usart0Getch(void);
# 259 "bl/include/usart0.h"
int usart0GetchTimeout(unsigned int uiTimeout);
# 35 "bl/argosSeimac/main.c" 2
# 1 "bl/include/usart1.h" 1
# 139 "bl/include/usart1.h"
void usart1Init(uint16_t baudDiv, uint8_t baudMod, uint8_t mode);
# 159 "bl/include/usart1.h"
void usart1Baud(uint16_t baudDiv, uint8_t baudMod, uint8_t mode);
# 176 "bl/include/usart1.h"
int usart1Putch(char ch);
# 194 "bl/include/usart1.h"
int usart1TxEmpty(void);
# 211 "bl/include/usart1.h"
void usart1TxFlush(void);
# 228 "bl/include/usart1.h"
void usart1RxFlush(void);
# 244 "bl/include/usart1.h"
int usart1Getch(void);
# 260 "bl/include/usart1.h"
int usart1GetchTimeout(int iTimeout);
# 36 "bl/argosSeimac/main.c" 2
# 1 "bl/include/argosSeimac/main.h" 1
# 28 "bl/include/argosSeimac/main.h"
typedef struct {
char TaskName[16];
unsigned int TaskCtr;
unsigned int TaskExecTime;
unsigned long TaskTotExecTime;
} TASK_USER_DATA;
extern int sensorPutchar(char ch);
extern int sensorGetchar(int timeout);
extern void CmdTask(void *p);
# 39 "bl/argosSeimac/main.c" 2
# 1 "bl/include/argosSeimac/argos.h" 1
# 15 "bl/include/argosSeimac/argos.h"
void argos(char *line);
void argosTask(void *pdata);
# 40 "bl/argosSeimac/main.c" 2
__attribute__((section(".calTab"))) struct configTableStruct configTable =
{
"00", "10", "Argos IF Serial number not set", 1, 200, {-1, -1, -1, -1, -1},
"",
};
unsigned int instrumentErrorCode;
OS_STK CmdTaskStk[(64) + 30];
OS_STK ArgosTaskStk[(64) + 30];
void devTableSetup(void);
TASK_USER_DATA TaskUserData[2];
OS_STK_DATA OSStackData[2];
volatile unsigned int uiSleep;
struct DCOTuneStruct DCOTune;
inline int sensorPutchar(char ch)
{
return usart0Putch(ch);
# 79 "bl/argosSeimac/main.c"
}
inline int sensorGetchar(int timeout)
{
return usart0GetchTimeout(timeout);
# 100 "bl/argosSeimac/main.c"
}
inline int putchar(int ch)
{
char c;
int i;
P4OUT |= 0x03;
c = usart1Putch(ch);
while ((i = usart1TxEmpty()) == 0);
P4OUT &= ~0x03;
return c;
}
inline int getchar(void)
{
return usart1Getch();
}
int main (void)
{
unsigned char status;
WDTCTL = 0x5A00 | 0x0080;
BCSCTL1 = 0;
P1SEL = 0x00;
P1DIR = 0x00;
P1OUT = 0x00;
P4SEL = 0x00;
P4DIR = 0x02 | 0x01 | 0x40 | 0x80;
P4OUT &= ~0x03;
P6SEL &= ~(0x80 | 0x40);
P6DIR |= 0x40;
P6DIR &= ~0x80;
P6OUT |= 0x40;
register int delay;
for (IFG1 &= ~(1<<1), delay = 255; delay; )
{
if (IFG1 & (1<<1))
{
IFG1 &= ~(1<<1);
delay = 255;
}
else
--delay;
}
BCSCTL2 = (2<<1) | (2<<6) | 0x08;
# 197 "bl/argosSeimac/main.c"
OSInit();
usart1Init((uint16_t)(((2000000)/2) / ((19200))),
(uint8_t)((uint8_t)(((int)((((((((((((2000000)/2) / ((19200))) -
(uint16_t)(((2000000)/2) / ((19200)))) + ((((2000000)/2) / ((19200))) -
(uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) / ((19200))) -
(uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) / ((19200))) -
(uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) / ((19200))) -
(uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) / ((19200))) -
(uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) / ((19200))) -
(uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) / ((19200))) -
(uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) / ((19200))) -
(uint16_t)(((2000000)/2) / ((19200))))) - (int)(((((((((((2000000)/2) /
((19200))) - (uint16_t)(((2000000)/2) / ((19200)))) + ((((2000000)/2) /
((19200))) - (uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) /
((19200))) - (uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) /
((19200))) - (uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) /
((19200))) - (uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) /
((19200))) - (uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) /
((19200))) - (uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) /
((19200))) - (uint16_t)(((2000000)/2) / ((19200)))))) ? (1 << (7)) : 0) +
(uint8_t)(((int)(((((((((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2)
/ ((19200)))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200))))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200))))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200))))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200))))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200))))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200))))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200))))) - (int)((((((((((2000000)/2) / ((19200))) -
(uint16_t)(((2000000)/2) / ((19200)))) + ((((2000000)/2) / ((19200))) -
(uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) / ((19200))) -
(uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) / ((19200))) -
(uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) / ((19200))) -
(uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) / ((19200))) -
(uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) / ((19200))) -
(uint16_t)(((2000000)/2) / ((19200)))))) ? (1 << (6)) : 0) +
(uint8_t)(((int)((((((((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200)))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200))))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200))))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200))))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200))))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200))))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200))))) - (int)(((((((((2000000)/2) / ((19200))) -
(uint16_t)(((2000000)/2) / ((19200)))) + ((((2000000)/2) / ((19200))) -
(uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) / ((19200))) -
(uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) / ((19200))) -
(uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) / ((19200))) -
(uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) / ((19200))) -
(uint16_t)(((2000000)/2) / ((19200)))))) ? (1 << (5)) : 0) +
(uint8_t)(((int)(((((((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200)))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200))))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200))))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200))))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200))))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200))))) - (int)((((((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2)
/ ((19200)))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200))))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200))))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200))))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200)))))) ? (1 << (4)) : 0) + (uint8_t)(((int)((((((((2000000)/2) /
((19200))) - (uint16_t)(((2000000)/2) / ((19200)))) + ((((2000000)/2) /
((19200))) - (uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) /
((19200))) - (uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) /
((19200))) - (uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) /
((19200))) - (uint16_t)(((2000000)/2) / ((19200))))) - (int)(((((((2000000)/2)
/ ((19200))) - (uint16_t)(((2000000)/2) / ((19200)))) + ((((2000000)/2) /
((19200))) - (uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) /
((19200))) - (uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) /
((19200))) - (uint16_t)(((2000000)/2) / ((19200)))))) ? (1 << (3)) : 0) +
(uint8_t)(((int)(((((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200)))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200))))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200))))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200))))) - (int)((((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200)))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200))))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200)))))) ? (1 << (2)) : 0) + (uint8_t)(((int)((((((2000000)/2) /
((19200))) - (uint16_t)(((2000000)/2) / ((19200)))) + ((((2000000)/2) /
((19200))) - (uint16_t)(((2000000)/2) / ((19200))))) + ((((2000000)/2) /
((19200))) - (uint16_t)(((2000000)/2) / ((19200))))) - (int)(((((2000000)/2) /
((19200))) - (uint16_t)(((2000000)/2) / ((19200)))) + ((((2000000)/2) /
((19200))) - (uint16_t)(((2000000)/2) / ((19200)))))) ? (1 << (1)) : 0) +
(uint8_t)((int)(((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200)))) + ((((2000000)/2) / ((19200))) - (uint16_t)(((2000000)/2) /
((19200))))) ? (1 << (0)) : 0)), (uint8_t)((0x10) + (0) + (0)));
usart0Init((uint16_t)(((2000000)/2) / (4800)),
(uint8_t)((uint8_t)(((int)((((((((((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800))) + ((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800)))) + ((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800)))) + ((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800)))) + ((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800)))) + ((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800)))) + ((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800)))) + ((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800)))) + ((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800)))) - (int)(((((((((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800))) + ((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800)))) + ((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800)))) + ((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800)))) + ((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800)))) + ((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800)))) + ((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800)))) + ((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800))))) ? (1 << (7)) : 0) +
(uint8_t)(((int)(((((((((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) /
(4800))) + ((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) -
(int)((((((((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800))))) ? (1 << (6))
: 0) + (uint8_t)(((int)((((((((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800))) + ((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800)))) + ((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800)))) + ((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800)))) + ((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800)))) + ((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800)))) + ((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800)))) - (int)(((((((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800))) + ((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800)))) + ((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800)))) + ((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800)))) + ((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800)))) + ((((2000000)/2) / (4800)) -
(uint16_t)(((2000000)/2) / (4800))))) ? (1 << (5)) : 0) +
(uint8_t)(((int)(((((((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) /
(4800))) + ((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) -
(int)((((((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800))))) ? (1 << (4))
: 0) + (uint8_t)(((int)((((((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2)
/ (4800))) + ((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) -
(int)(((((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800))))) ? (1 << (3))
: 0) + (uint8_t)(((int)(((((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2)
/ (4800))) + ((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) -
(int)((((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800))))) ? (1 << (2))
: 0) + (uint8_t)(((int)((((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) /
(4800))) + ((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) -
(int)(((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800))) +
((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800))))) ? (1 << (1))
: 0) + (uint8_t)((int)(((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) /
(4800))) + ((((2000000)/2) / (4800)) - (uint16_t)(((2000000)/2) / (4800)))) ?
(1 << (0)) : 0)), (uint8_t)((0x10) + (0) + (0)));
strcpy(strSlaveID, configTable.strSlaveID);
strcpy(TaskUserData[4 - 4].TaskName, "Cmd Task");
TaskUserData[4 - 4].TaskCtr = 0;
if (configTable.u8Messages != 0)
printf("%s - ", TaskUserData[4 - 4].TaskName);
status = OSTaskCreateExt(CmdTask,
(void *)0,
&CmdTaskStk[(64) + 30 - 1],
4,
4 - 4,
&CmdTaskStk[0],
(64) + 30,
&TaskUserData[4 - 4],
0x0001 + 0x0002
);
if (configTable.u8Messages != 0)
printf("created, status %d\r\n", status);
OSStart();
return 0;
}
void CmdTask (void *pdata)
{
unsigned char status;
char c;
pdata = pdata;
if (configTable.u8Messages != 0)
printf("CmdTask - Started\r\n");
__asm__ __volatile__("dint"::);
WDTCTL = (0x5A00|0x0010|0x0008|0x0004|0x0002);
IE1 |= (1<<0);
__asm__ __volatile__("eint"::);
OSStatInit();
strcpy(TaskUserData[4 + 1 - 4].TaskName, "Argos Task");
TaskUserData[4 + 1 - 4].TaskCtr = 0;
if (configTable.u8Messages != 0)
printf("%s - ", TaskUserData[4 + 1 - 4].TaskName);
status = OSTaskCreateExt(argosTask,
(void *)0,
&ArgosTaskStk[(64) + 30 - 1],
4 + 1,
4 + 1 - 4,
&ArgosTaskStk[0],
(64) + 30,
&TaskUserData[4 + 1 - 4],
0x0001 + 0x0002
);
if (configTable.u8Messages != 0)
printf("created, status %d\r\n", status);
if (configTable.u8Messages != 0)
printf("AWS2003 argosSeimac V%s\r\n", FirmwareVersion);
OSTimeDly(1);
for(;;)
{
c = Cmd();
}
}
# 1 "libm/sf_rint.c"
# 1 "/home/peter_jan/msp/msp430-libc/src//"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "libm/sf_rint.c"
# 16 "libm/sf_rint.c"
# 1 "libm/fdlibm.h" 1
# 15 "libm/fdlibm.h"
# 1 "./../include/sys/config.h" 1
# 122 "./../include/sys/config.h"
typedef long int __int32_t;
typedef unsigned long int __uint32_t;
# 16 "libm/fdlibm.h" 2
# 1 "./../include/math.h" 1
# 9 "./../include/math.h"
# 1 "./../include/sys/reent.h" 1
# 13 "./../include/sys/reent.h"
# 1 "./../include/sys/_ansi.h" 1
# 14 "./../include/sys/reent.h" 2
# 1 "./../include/sys/_types.h" 1
# 12 "./../include/sys/_types.h"
typedef long _off_t;
typedef long _ssize_t;
# 15 "./../include/sys/reent.h" 2
typedef unsigned long __ULong;
# 31 "./../include/sys/reent.h"
struct _glue
{
struct _glue *_next;
int _niobs;
struct __sFILE *_iobs;
};
struct _Bigint
{
struct _Bigint *_next;
int _k, _maxwds, _sign, _wds;
__ULong _x[1];
};
struct __tm
{
int __tm_sec;
int __tm_min;
int __tm_hour;
int __tm_mday;
int __tm_mon;
int __tm_year;
int __tm_wday;
int __tm_yday;
int __tm_isdst;
};
struct _atexit {
struct _atexit *_next;
int _ind;
void (*_fns[32])(void);
};
# 78 "./../include/sys/reent.h"
struct __sbuf {
unsigned char *_base;
int _size;
};
typedef long _fpos_t;
# 116 "./../include/sys/reent.h"
struct __sFILE {
unsigned char *_p;
int _r;
int _w;
short _flags;
short _file;
struct __sbuf _bf;
int _lbfsize;
void * _cookie;
int (*_read) (void * _cookie, char *_buf, int _n);
int (*_write) (void * _cookie, const char *_buf, int _n);
_fpos_t (*_seek) (void * _cookie, _fpos_t _offset, int _whence);
int (*_close) (void * _cookie);
struct __sbuf _ub;
unsigned char *_up;
int _ur;
unsigned char _ubuf[3];
unsigned char _nbuf[1];
struct __sbuf _lb;
int _blksize;
int _offset;
struct _reent *_data;
};
# 174 "./../include/sys/reent.h"
struct _rand48 {
unsigned short _seed[3];
unsigned short _mult[3];
unsigned short _add;
};
# 188 "./../include/sys/reent.h"
struct _reent
{
int _errno;
struct __sFILE *_stdin, *_stdout, *_stderr;
int _inc;
char _emergency[25];
int _current_category;
const char *_current_locale;
int __sdidinit;
void (*__cleanup) (struct _reent *);
struct _Bigint *_result;
int _result_k;
struct _Bigint *_p5s;
struct _Bigint **_freelist;
int _cvtlen;
char *_cvtbuf;
union
{
struct
{
unsigned int _unused_rand;
char * _strtok_last;
char _asctime_buf[26];
struct __tm _localtime_buf;
int _gamma_signgam;
__extension__ unsigned long long _rand_next;
struct _rand48 _r48;
} _reent;
struct
{
unsigned char * _nextf[30];
unsigned int _nmalloc[30];
} _unused;
} _new;
struct _atexit *_atexit;
struct _atexit _atexit0;
void (**(_sig_func))(int);
struct _glue __sglue;
struct __sFILE __sf[3];
};
# 273 "./../include/sys/reent.h"
extern struct _reent *_impure_ptr ;
void _reclaim_reent (struct _reent *);
# 10 "./../include/math.h" 2
# 1 "./../include/sys/ieeefp.h" 1
# 11 "./../include/math.h" 2
union __dmath
{
__uint32_t i[2];
double d;
};
extern const union __dmath __infinity[];
# 36 "./../include/math.h"
extern double atan (double);
extern double cos (double);
extern double sin (double);
extern double tan (double);
extern double tanh (double);
extern double frexp (double, int *);
extern double modf (double, double *);
extern double ceil (double);
extern double fabs (double);
extern double floor (double);
extern double acos (double);
extern double asin (double);
extern double atan2 (double, double);
extern double cosh (double);
extern double sinh (double);
extern double exp (double);
extern double ldexp (double, int);
extern double log (double);
extern double log10 (double);
extern double pow (double, double);
extern double sqrt (double);
extern double fmod (double, double);
extern double infinity (void);
extern double nan (void);
extern int isnan (double);
extern int isinf (double);
extern int finite (double);
extern double copysign (double, double);
extern int ilogb (double);
extern double asinh (double);
extern double cbrt (double);
extern double nextafter (double, double);
extern double rint (double);
extern double scalbn (double, int);
extern double log1p (double);
extern double expm1 (double);
extern double acosh (double);
extern double atanh (double);
extern double remainder (double, double);
extern double gamma (double);
extern double gamma_r (double, int *);
extern double lgamma (double);
extern double lgamma_r (double, int *);
extern double erf (double);
extern double erfc (double);
extern double y0 (double);
extern double y1 (double);
extern double yn (int, double);
extern double j0 (double);
extern double j1 (double);
extern double jn (int, double);
extern double hypot (double, double);
extern double cabs (void);
extern double drem (double, double);
# 123 "./../include/math.h"
extern float atanf (float);
extern float cosf (float);
extern float sinf (float);
extern float tanf (float);
extern float tanhf (float);
extern float frexpf (float, int *);
extern float modff (float, float *);
extern float ceilf (float);
extern float fabsf (float);
extern float floorf (float);
extern float acosf (float);
extern float asinf (float);
extern float atan2f (float, float);
extern float coshf (float);
extern float sinhf (float);
extern float expf (float);
extern float ldexpf (float, int);
extern float logf (float);
extern float log10f (float);
extern float powf (float, float);
extern float sqrtf (float);
extern float fmodf (float, float);
# 155 "./../include/math.h"
extern float infinityf (void);
extern float nanf (void);
extern int isnanf (float);
extern int isinff (float);
extern int finitef (float);
extern float copysignf (float, float);
extern int ilogbf (float);
extern float asinhf (float);
extern float cbrtf (float);
extern float nextafterf (float, float);
extern float rintf (float);
extern float scalbnf (float, int);
extern float log1pf (float);
extern float expm1f (float);
extern float acoshf (float);
extern float atanhf (float);
extern float remainderf (float, float);
extern float gammaf (float);
extern float gammaf_r (float, int *);
extern float lgammaf (float);
extern float lgammaf_r (float, int *);
extern float erff (float);
extern float erfcf (float);
extern float y0f (float);
extern float y1f (float);
extern float ynf (int, float);
extern float j0f (float);
extern float j1f (float);
extern float jnf (int, float);
extern float hypotf (float, float);
extern float cabsf (void);
extern float dremf (float, float);
extern int *__signgam (void);
# 208 "./../include/math.h"
struct exception
{
int type;
char *name;
double arg1;
double arg2;
double retval;
int err;
};
extern int matherr (struct exception *e);
# 261 "./../include/math.h"
enum __fdlibm_version
{
__fdlibm_ieee = -1,
__fdlibm_svid,
__fdlibm_xopen,
__fdlibm_posix
};
extern const enum __fdlibm_version __fdlib_version;
# 17 "libm/fdlibm.h" 2
# 1 "./../include/sys/ieeefp.h" 1
# 18 "libm/fdlibm.h" 2
# 143 "libm/fdlibm.h"
extern double logb (double);
extern double scalb (double, double);
extern double significand (double);
extern double __ieee754_sqrt (double);
extern double __ieee754_acos (double);
extern double __ieee754_acosh (double);
extern double __ieee754_log (double);
extern double __ieee754_atanh (double);
extern double __ieee754_asin (double);
extern double __ieee754_atan2 (double,double);
extern double __ieee754_exp (double);
extern double __ieee754_cosh (double);
extern double __ieee754_fmod (double,double);
extern double __ieee754_pow (double,double);
extern double __ieee754_lgamma_r (double,int *);
extern double __ieee754_gamma_r (double,int *);
extern double __ieee754_log10 (double);
extern double __ieee754_sinh (double);
extern double __ieee754_hypot (double,double);
extern double __ieee754_j0 (double);
extern double __ieee754_j1 (double);
extern double __ieee754_y0 (double);
extern double __ieee754_y1 (double);
extern double __ieee754_jn (int,double);
extern double __ieee754_yn (int,double);
extern double __ieee754_remainder (double,double);
extern __int32_t __ieee754_rem_pio2 (double,double*);
extern double __ieee754_scalb (double,double);
extern double __kernel_standard (double,double,int);
extern double __kernel_sin (double,double,int);
extern double __kernel_cos (double,double);
extern double __kernel_tan (double,double,int);
extern int __kernel_rem_pio2 (double*,double*,int,int,int,const __int32_t*);
extern float logbf (float);
extern float scalbf (float, float);
extern float significandf (float);
extern float __ieee754_sqrtf (float);
extern float __ieee754_acosf (float);
extern float __ieee754_acoshf (float);
extern float __ieee754_logf (float);
extern float __ieee754_atanhf (float);
extern float __ieee754_asinf (float);
extern float __ieee754_atan2f (float,float);
extern float __ieee754_expf (float);
extern float __ieee754_coshf (float);
extern float __ieee754_fmodf (float,float);
extern float __ieee754_powf (float,float);
extern float __ieee754_lgammaf_r (float,int *);
extern float __ieee754_gammaf_r (float,int *);
extern float __ieee754_log10f (float);
extern float __ieee754_sinhf (float);
extern float __ieee754_hypotf (float,float);
extern float __ieee754_j0f (float);
extern float __ieee754_j1f (float);
extern float __ieee754_y0f (float);
extern float __ieee754_y1f (float);
extern float __ieee754_jnf (int,float);
extern float __ieee754_ynf (int,float);
extern float __ieee754_remainderf (float,float);
extern __int32_t __ieee754_rem_pio2f (float,float*);
extern float __ieee754_scalbf (float,float);
extern float __kernel_sinf (float,float,int);
extern float __kernel_cosf (float,float);
extern float __kernel_tanf (float,float,int);
extern int __kernel_rem_pio2f (float*,float*,int,int,int,const __int32_t*);
# 271 "libm/fdlibm.h"
typedef union
{
double value;
struct
{
__uint32_t lsw;
__uint32_t msw;
} parts;
} ieee_double_shape_type;
# 344 "libm/fdlibm.h"
typedef union
{
float value;
__uint32_t word;
} ieee_float_shape_type;
# 17 "libm/sf_rint.c" 2
static const float
TWO23[2]={
8.3886080000e+06,
-8.3886080000e+06,
};
float rintf(float x)
{
__int32_t i0,j0,sx;
__uint32_t i,i1,ix;
float t;
volatile float w;
do { ieee_float_shape_type gf_u; gf_u.value = (x); (i0) = gf_u.word; } while
(0);
sx = (i0>>31)&1;
ix = (i0&0x7fffffff);
j0 = (ix>>23)-0x7f;
if(j0<23) {
if(((ix)==0))
return x;
if(j0<0) {
i1 = (i0&0x07fffff);
i0 &= 0xfff00000;
i0 |= ((i1|-i1)>>9)&0x400000;
do { ieee_float_shape_type sf_u; sf_u.word = (i0); (x) = sf_u.value; } while
(0);
w = TWO23[sx]+x;
t = w-TWO23[sx];
do { ieee_float_shape_type gf_u; gf_u.value = (t); (i0) = gf_u.word; } while
(0);
do { ieee_float_shape_type sf_u; sf_u.word = ((i0&0x7fffffff)|(sx<<31)); (t)
= sf_u.value; } while (0);
return t;
} else {
i = (0x007fffff)>>j0;
if((i0&i)==0) return x;
i>>=1;
if((i0&i)!=0) i0 = (i0&(~i))|((0x100000)>>j0);
}
} else {
if(!((ix)<0x7f800000L)) return x+x;
else
return x;
}
do { ieee_float_shape_type sf_u; sf_u.word = (i0); (x) = sf_u.value; } while
(0);
w = TWO23[sx]+x;
return w-TWO23[sx];
}
double rint(double x)
{
return (double) rintf((float) x);
}