Added VisualDSP++ Compiler support.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@2137 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong@gmail.com 2012-05-30 06:50:06 +00:00
parent e86bd68278
commit 3ad6f43ff3
5 changed files with 25 additions and 3 deletions

View File

@ -59,7 +59,7 @@ typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned long u_long;
#if !defined(__CC_ARM) && !defined(__IAR_SYSTEMS_ICC__)
#if !defined(__CC_ARM) && !defined(__IAR_SYSTEMS_ICC__) && !defined(__ADSPBLACKFIN__)
typedef unsigned int size_t;
#ifndef NULL

View File

@ -53,7 +53,7 @@ char *strdup(const char *s)
}
#endif
#if !defined(__CC_ARM) && !defined(__IAR_SYSTEMS_ICC__)
#if !defined(__CC_ARM) && !defined(__IAR_SYSTEMS_ICC__) && !defined(__ADSPBLACKFIN__)
int isalpha( int ch )
{
return (unsigned int)((ch | 0x20) - 'a') < 26u;
@ -452,6 +452,13 @@ void finsh_system_var_init(const void* begin, const void* end)
#pragma section="FSymTab"
#pragma section="VSymTab"
#endif
#elif defined(__ADSPBLACKFIN__) /* for VisaulDSP++ Compiler*/
#ifdef FINSH_USING_SYMTAB
extern "asm" int __fsymtab_start;
extern "asm" int __fsymtab_end;
extern "asm" int __vsymtab_start;
extern "asm" int __vsymtab_end;
#endif
#endif
/*
@ -483,6 +490,9 @@ void finsh_system_init(void)
extern const int __vsymtab_end;
finsh_system_function_init(&__fsymtab_start, &__fsymtab_end);
finsh_system_var_init(&__vsymtab_start, &__vsymtab_end);
#elif defined(__ADSPBLACKFIN__) /* for VisualDSP++ Compiler */
finsh_system_function_init(&__fsymtab_start, &__fsymtab_end);
finsh_system_var_init(&__vsymtab_start, &__vsymtab_end);
#endif
#endif

View File

@ -126,6 +126,13 @@ typedef rt_base_t rt_off_t; /**< Type for offset
#define ALIGN(n) __attribute__((aligned(n)))
#define rt_inline static __inline
#define RTT_API
#elif defined (__ADSPBLACKFIN__) /* for VisualDSP++ Compiler */
#include <stdarg.h>
#define SECTION(x) __attribute__((section(x)))
#define UNUSED __attribute__((unused))
#define ALIGN(n) __attribute__((aligned(n)))
#define rt_inline static inline
#define RTT_API
#endif
/* event length */

View File

@ -375,6 +375,11 @@ void rt_interrupt_leave(void);
*/
rt_uint8_t rt_interrupt_get_nest(void);
/**
* application module
*/
void rt_system_module_init(void);
/**
* @addtogroup KernelService
*/

View File

@ -1022,7 +1022,7 @@ rt_device_t rt_console_set_device(const char *name)
}
#endif
#if defined(__GNUC__)
#if defined(__GNUC__) || defined(__ADSPBLACKFIN__)
void rt_hw_console_output(const char *str) __attribute__((weak));
void rt_hw_console_output(const char *str)
#elif defined(__CC_ARM)