support GCC compiler
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@371 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
c05af1b737
commit
95fd101d51
@ -100,9 +100,11 @@ static void key_thread_entry(void *parameter)
|
||||
|
||||
void rt_hw_key_init()
|
||||
{
|
||||
#if 0
|
||||
rt_thread_t key_tid;
|
||||
key_tid = rt_thread_create("key",
|
||||
key_thread_entry, RT_NULL,
|
||||
512, 30, 5);
|
||||
if (key_tid != RT_NULL) rt_thread_startup(key_tid);
|
||||
#endif
|
||||
}
|
||||
|
@ -70,9 +70,6 @@
|
||||
/* SECTION: finsh, a C-Express shell */
|
||||
/* Using FinSH as Shell*/
|
||||
#define RT_USING_FINSH
|
||||
/* Using symbol table */
|
||||
#define FINSH_USING_SYMTAB
|
||||
#define FINSH_USING_DESCRIPTION
|
||||
|
||||
/* SECTION: a runtime libc library */
|
||||
/* a runtime libc library */
|
||||
@ -94,7 +91,7 @@
|
||||
#define RT_USING_DFS_EFSL
|
||||
#define RT_USING_DFS_YAFFS2
|
||||
|
||||
#define RT_USING_WORKDIR
|
||||
/* #define DFS_USING_WORKDIR */
|
||||
|
||||
/* the max number of mounted filesystem */
|
||||
#define DFS_FILESYSTEMS_MAX 2
|
||||
|
@ -25,10 +25,10 @@ ARCH='arm'
|
||||
CPU='s3c24x0'
|
||||
TextBase='0x30000000'
|
||||
|
||||
#PLATFORM = 'gcc'
|
||||
#EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin'
|
||||
PLATFORM = 'armcc'
|
||||
EXEC_PATH = 'E:/Keil'
|
||||
PLATFORM = 'gcc'
|
||||
EXEC_PATH = 'E:/Program Files/CodeSourcery/Sourcery G++ Lite/bin'
|
||||
#PLATFORM = 'armcc'
|
||||
#EXEC_PATH = 'E:/Keil'
|
||||
BUILD = 'debug'
|
||||
|
||||
if PLATFORM == 'gcc':
|
||||
@ -38,15 +38,15 @@ if PLATFORM == 'gcc':
|
||||
AS = PREFIX + 'gcc'
|
||||
AR = PREFIX + 'ar'
|
||||
LINK = PREFIX + 'gcc'
|
||||
TARGET_EXT = 'elf'
|
||||
TARGET_EXT = 'axf'
|
||||
SIZE = PREFIX + 'size'
|
||||
OBJDUMP = PREFIX + 'objdump'
|
||||
OBJCPY = PREFIX + 'objcopy'
|
||||
|
||||
DEVICE = ' -mcpu=arm920t'
|
||||
CFLAGS = DEVICE + ' -Dsourcerygxx' + ' -nostdinc'
|
||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp'
|
||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=main.elf.map,-cref,-u,Reset_Handler -T mini2440_ram.ld'
|
||||
CFLAGS = DEVICE + ' -DRT_USING_MINILIBC' + ' -nostdinc -nostdlib -fno-builtin'
|
||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp' + ' -DTEXT_BASE=' + TextBase
|
||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=main.elf.map,-cref,-u,_start -T mini2440_ram.ld' + ' -Ttext ' + TextBase
|
||||
|
||||
CPATH = ''
|
||||
LPATH = ''
|
||||
@ -89,6 +89,7 @@ elif PLATFORM == 'armcc':
|
||||
|
||||
RT_USING_MINILIBC = False
|
||||
if RT_USING_FINSH:
|
||||
CFLAGS += ' -D FINSH_USING_SYMTAB -DFINSH_USING_DESCRIPTION'
|
||||
LFLAGS += ' --keep __fsym_* --keep __vsym_*'
|
||||
if RT_USING_WEBSERVER:
|
||||
CFLAGS += ' -DWEBS -DUEMF -DRTT -D__NO_FCNTL=1 -DRT_USING_WEBSERVER'
|
||||
|
@ -48,10 +48,34 @@ extern struct rt_device uart0_device;
|
||||
extern int Image$$ER_ZI$$ZI$$Base;
|
||||
extern int Image$$ER_ZI$$ZI$$Length;
|
||||
extern int Image$$ER_ZI$$ZI$$Limit;
|
||||
#else
|
||||
#elif (defined (__GNUC__))
|
||||
rt_uint8_t _irq_stack_start[1024];
|
||||
rt_uint8_t _fiq_stack_start[1024];
|
||||
rt_uint8_t _undefined_stack_start[512];
|
||||
rt_uint8_t _abort_stack_start[512];
|
||||
rt_uint8_t _svc_stack_start[1024] SECTION(".nobss");
|
||||
extern int __bss_end;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Fix me
|
||||
*/
|
||||
#if (defined (__GNUC__))
|
||||
void *_sbrk (int incr)
|
||||
{
|
||||
extern int __bss_end; /* Set by linker. */
|
||||
static char * heap_end;
|
||||
char * prev_heap_end;
|
||||
|
||||
if (heap_end == 0)
|
||||
heap_end = & __bss_end;
|
||||
|
||||
prev_heap_end = heap_end;
|
||||
heap_end += incr;
|
||||
|
||||
return (void *) prev_heap_end;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_FINSH
|
||||
extern void finsh_system_init(void);
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <rtthread.h>
|
||||
#include <dfs_posix.h>
|
||||
#include <lwip/sockets.h>
|
||||
#include <time.h>
|
||||
|
||||
#define FTP_PORT 21
|
||||
#define FTP_SRV_ROOT "/"
|
||||
|
@ -59,6 +59,11 @@ typedef rt_uint32_t mem_ptr_t;
|
||||
#define LWIP_PROVIDE_ERRNO
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_MINILIBC
|
||||
#include <time.h>
|
||||
#define LWIP_TIMEVAL_PRIVATE 0
|
||||
#endif
|
||||
|
||||
#if defined(__CC_ARM) /* ARMCC compiler */
|
||||
#define PACK_STRUCT_FIELD(x) x
|
||||
#define PACK_STRUCT_STRUCT __attribute__ ((__packed__))
|
||||
|
@ -23,6 +23,7 @@ common/image_hdc.c
|
||||
common/region.c
|
||||
common/hz12font.c
|
||||
common/hz16font.c
|
||||
common/font_hz_bmp.c
|
||||
""")
|
||||
|
||||
server_src = Split("""
|
||||
|
@ -1,6 +1,9 @@
|
||||
|
||||
#include <rtgui/dc.h>
|
||||
#include <rtgui/font.h>
|
||||
|
||||
#ifdef RTGUI_USING_HZ_BMP
|
||||
|
||||
static void rtgui_hz_bitmap_font_draw_text(struct rtgui_font* font, struct rtgui_dc* dc, const rt_uint8_t* text, rt_ubase_t len, struct rtgui_rect* rect);
|
||||
static void rtgui_hz_bitmap_font_get_metrics(struct rtgui_font* font, const rt_uint8_t* text, rtgui_rect_t* rect);
|
||||
struct rtgui_font_engine hz_bmp_font_engine =
|
||||
@ -69,3 +72,5 @@ static void rtgui_hz_bitmap_font_get_metrics(struct rtgui_font* font, const rt_u
|
||||
rect->x2 = (rt_int16_t)(bmp_font->width * rt_strlen((const char*)text));
|
||||
rect->y2 = bmp_font->height;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -16746,7 +16746,7 @@ struct rtgui_font rtgui_font_hz16 =
|
||||
16, /* height */
|
||||
1, /* refer count */
|
||||
&hz_bmp_font_engine,/* font engine */
|
||||
&hz16, /* font private data */
|
||||
(void *)&hz16, /* font private data */
|
||||
};
|
||||
|
||||
/* size = 267616 bytes */
|
||||
|
@ -343,8 +343,8 @@ rt_err_t rtgui_thread_send(rt_thread_t tid, rtgui_event_t* event, rt_size_t even
|
||||
struct rtgui_thread* thread;
|
||||
|
||||
rtgui_event_dump(tid, event);
|
||||
if (event->type != RTGUI_EVENT_TIMER)
|
||||
rt_kprintf("event size: %d\n", event_size);
|
||||
/* if (event->type != RTGUI_EVENT_TIMER)
|
||||
rt_kprintf("event size: %d\n", event_size); */
|
||||
|
||||
/* find rtgui_thread */
|
||||
thread = (struct rtgui_thread*) (tid->user_data);
|
||||
|
@ -29,11 +29,12 @@
|
||||
#define RTGUI_USING_STDIO_FILERW
|
||||
#define RTGUI_IMAGE_PNG
|
||||
#define RTGUI_IMAGE_JPEG
|
||||
|
||||
#define RTGUI_USING_FONT12
|
||||
#else
|
||||
#define RTGUI_USING_DFS_FILERW
|
||||
#define RTGUI_USING_HZ_FILE
|
||||
//#define RTGUI_USING_HZ_FILE
|
||||
#define RTGUI_USING_HZ_BMP
|
||||
#define RTGUI_USING_FONT12
|
||||
#endif
|
||||
|
||||
// #define RTGUI_USING_SMALL_SIZE
|
||||
|
@ -457,7 +457,7 @@ rt_bool_t rtgui_filelist_view_event_handler(struct rtgui_widget* widget, struct
|
||||
if (strcmp(view->items[view->current_item].name, ".") == 0) return RT_FALSE;
|
||||
if (strcmp(view->items[view->current_item].name, "..") == 0)
|
||||
{
|
||||
char *ptr;
|
||||
rt_uint8_t *ptr;
|
||||
ptr = strrchr(view->current_directory, PATH_SEPARATOR);
|
||||
|
||||
if (ptr == RT_NULL) return RT_FALSE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user