mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-02-06 00:45:22 +08:00
Re-normalizing the repo
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
import rtconfig
|
||||
Import('RTT_ROOT')
|
||||
from building import *
|
||||
|
||||
src_bsp = ['application.c', 'startup.c', 'board.c']
|
||||
src_drv = ['console.c']
|
||||
|
||||
if GetDepend('RT_USING_LED'):
|
||||
src_drv += ['led.c']
|
||||
|
||||
if GetDepend('RT_USING_SDIO'):
|
||||
src_drv += ['at91_mci.c']
|
||||
|
||||
if GetDepend('RT_USING_LWIP'):
|
||||
src_drv += ['macb.c']
|
||||
|
||||
if GetDepend('RT_USING_I2C') and GetDepend('RT_USING_I2C_BITOPS'):
|
||||
src_drv += ['at91_i2c_gpio.c']
|
||||
|
||||
src = File(src_bsp + src_drv)
|
||||
CPPPATH = [RTT_ROOT + '/bsp/at91sam9260']
|
||||
group = DefineGroup('Startup', src, depend = [''], CPPPATH = CPPPATH)
|
||||
|
||||
Return('group')
|
||||
import rtconfig
|
||||
Import('RTT_ROOT')
|
||||
from building import *
|
||||
|
||||
src_bsp = ['application.c', 'startup.c', 'board.c']
|
||||
src_drv = ['console.c']
|
||||
|
||||
if GetDepend('RT_USING_LED'):
|
||||
src_drv += ['led.c']
|
||||
|
||||
if GetDepend('RT_USING_SDIO'):
|
||||
src_drv += ['at91_mci.c']
|
||||
|
||||
if GetDepend('RT_USING_LWIP'):
|
||||
src_drv += ['macb.c']
|
||||
|
||||
if GetDepend('RT_USING_I2C') and GetDepend('RT_USING_I2C_BITOPS'):
|
||||
src_drv += ['at91_i2c_gpio.c']
|
||||
|
||||
src = File(src_bsp + src_drv)
|
||||
CPPPATH = [RTT_ROOT + '/bsp/at91sam9260']
|
||||
group = DefineGroup('Startup', src, depend = [''], CPPPATH = CPPPATH)
|
||||
|
||||
Return('group')
|
||||
|
||||
@@ -1,41 +1,41 @@
|
||||
import os
|
||||
import sys
|
||||
import rtconfig
|
||||
|
||||
if os.getenv('RTT_ROOT'):
|
||||
RTT_ROOT = os.getenv('RTT_ROOT')
|
||||
else:
|
||||
RTT_ROOT = os.path.normpath(os.getcwd() + '/../..')
|
||||
|
||||
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
|
||||
from building import *
|
||||
|
||||
TARGET = 'rtthread-at91sam9260.' + rtconfig.TARGET_EXT
|
||||
|
||||
env = Environment(tools = ['mingw'],
|
||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||
|
||||
Export('RTT_ROOT')
|
||||
Export('rtconfig')
|
||||
|
||||
# prepare building environment
|
||||
objs = PrepareBuilding(env, RTT_ROOT)
|
||||
|
||||
if GetDepend('RT_USING_WEBSERVER'):
|
||||
objs = objs + SConscript(RTT_ROOT + '/components/net/webserver/SConscript', variant_dir='build/net/webserver', duplicate=0)
|
||||
|
||||
if GetDepend('RT_USING_RTGUI'):
|
||||
objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript', variant_dir='build/examples/gui', duplicate=0)
|
||||
|
||||
# libc testsuite
|
||||
objs = objs + SConscript(RTT_ROOT + '/examples/libc/SConscript', variant_dir='build/examples/libc', duplicate=0)
|
||||
|
||||
# build program
|
||||
env.Program(TARGET, objs)
|
||||
|
||||
# end building
|
||||
EndBuilding(TARGET)
|
||||
import os
|
||||
import sys
|
||||
import rtconfig
|
||||
|
||||
if os.getenv('RTT_ROOT'):
|
||||
RTT_ROOT = os.getenv('RTT_ROOT')
|
||||
else:
|
||||
RTT_ROOT = os.path.normpath(os.getcwd() + '/../..')
|
||||
|
||||
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
|
||||
from building import *
|
||||
|
||||
TARGET = 'rtthread-at91sam9260.' + rtconfig.TARGET_EXT
|
||||
|
||||
env = Environment(tools = ['mingw'],
|
||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||
|
||||
Export('RTT_ROOT')
|
||||
Export('rtconfig')
|
||||
|
||||
# prepare building environment
|
||||
objs = PrepareBuilding(env, RTT_ROOT)
|
||||
|
||||
if GetDepend('RT_USING_WEBSERVER'):
|
||||
objs = objs + SConscript(RTT_ROOT + '/components/net/webserver/SConscript', variant_dir='build/net/webserver', duplicate=0)
|
||||
|
||||
if GetDepend('RT_USING_RTGUI'):
|
||||
objs = objs + SConscript(RTT_ROOT + '/examples/gui/SConscript', variant_dir='build/examples/gui', duplicate=0)
|
||||
|
||||
# libc testsuite
|
||||
objs = objs + SConscript(RTT_ROOT + '/examples/libc/SConscript', variant_dir='build/examples/libc', duplicate=0)
|
||||
|
||||
# build program
|
||||
env.Program(TARGET, objs)
|
||||
|
||||
# end building
|
||||
EndBuilding(TARGET)
|
||||
|
||||
@@ -1,232 +1,232 @@
|
||||
/*
|
||||
* File : application.c
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2006, RT-Thread Development Team
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rt-thread.org/license/LICENSE
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2011-01-13 weety first version
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup at91sam9260
|
||||
*/
|
||||
/*@{*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <rtdevice.h>
|
||||
|
||||
#ifdef RT_USING_DFS
|
||||
/* dfs init */
|
||||
#include <dfs_init.h>
|
||||
/* dfs filesystem:ELM FatFs filesystem init */
|
||||
#include <dfs_elm.h>
|
||||
/* dfs Filesystem APIs */
|
||||
#include <dfs_fs.h>
|
||||
#ifdef RT_USING_DFS_UFFS
|
||||
/* dfs filesystem:UFFS filesystem init */
|
||||
#include <dfs_uffs.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(RT_USING_DFS_DEVFS)
|
||||
#include <devfs.h>
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_SDIO
|
||||
#include <drivers/mmcsd_core.h>
|
||||
#include "at91_mci.h"
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_LWIP
|
||||
#include <netif/ethernetif.h>
|
||||
//#include <arch/sys_arch_init.h>
|
||||
#include "macb.h"
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_LED
|
||||
#include "led.h"
|
||||
#endif
|
||||
|
||||
#define RT_INIT_THREAD_STACK_SIZE (2*1024)
|
||||
|
||||
#ifdef RT_USING_DFS_ROMFS
|
||||
#include <dfs_romfs.h>
|
||||
#endif
|
||||
|
||||
void rt_init_thread_entry(void* parameter)
|
||||
{
|
||||
/* Filesystem Initialization */
|
||||
#ifdef RT_USING_DFS
|
||||
{
|
||||
/* init the device filesystem */
|
||||
dfs_init();
|
||||
|
||||
#if defined(RT_USING_DFS_ELMFAT)
|
||||
/* init the elm chan FatFs filesystam*/
|
||||
elm_init();
|
||||
#endif
|
||||
|
||||
#if defined(RT_USING_DFS_ROMFS)
|
||||
dfs_romfs_init();
|
||||
if (dfs_mount(RT_NULL, "/rom", "rom", 0, &romfs_root) == 0)
|
||||
{
|
||||
rt_kprintf("ROM File System initialized!\n");
|
||||
}
|
||||
else
|
||||
rt_kprintf("ROM File System initialzation failed!\n");
|
||||
#endif
|
||||
|
||||
#if defined(RT_USING_DFS_DEVFS)
|
||||
devfs_init();
|
||||
if (dfs_mount(RT_NULL, "/dev", "devfs", 0, 0) == 0)
|
||||
rt_kprintf("Device File System initialized!\n");
|
||||
else
|
||||
rt_kprintf("Device File System initialzation failed!\n");
|
||||
|
||||
#ifdef RT_USING_NEWLIB
|
||||
/* init libc */
|
||||
libc_system_init("uart0");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(RT_USING_DFS_UFFS)
|
||||
{
|
||||
/* init the uffs filesystem */
|
||||
dfs_uffs_init();
|
||||
|
||||
/* mount flash device as flash directory */
|
||||
if(dfs_mount("nand0", "/nand0", "uffs", 0, 0) == 0)
|
||||
rt_kprintf("UFFS File System initialized!\n");
|
||||
else
|
||||
rt_kprintf("UFFS File System initialzation failed!\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_SDIO
|
||||
rt_mmcsd_core_init();
|
||||
rt_mmcsd_blk_init();
|
||||
at91_mci_init();
|
||||
rt_thread_delay(RT_TICK_PER_SECOND*2);
|
||||
/* mount sd card fat partition 1 as root directory */
|
||||
if (dfs_mount("sd0", "/", "elm", 0, 0) == 0)
|
||||
{
|
||||
rt_kprintf("File System initialized!\n");
|
||||
}
|
||||
else
|
||||
rt_kprintf("File System initialzation failed!\n");
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_LWIP
|
||||
{
|
||||
/* register ethernetif device */
|
||||
eth_system_device_init();
|
||||
rt_hw_macb_init();
|
||||
/* re-init device driver */
|
||||
rt_device_init_all();
|
||||
/* init lwip system */
|
||||
lwip_sys_init();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_I2C
|
||||
{
|
||||
rt_i2c_core_init();
|
||||
at91_i2c_init();
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#ifdef RT_USING_LED
|
||||
void rt_led_thread_entry(void* parameter)
|
||||
{
|
||||
rt_uint8_t cnt = 0;
|
||||
led_init();
|
||||
while(1)
|
||||
{
|
||||
/* light on leds for one second */
|
||||
rt_thread_delay(40);
|
||||
cnt++;
|
||||
if (cnt&0x01)
|
||||
led_on(1);
|
||||
else
|
||||
led_off(1);
|
||||
if (cnt&0x02)
|
||||
led_on(2);
|
||||
else
|
||||
led_off(2);
|
||||
if (cnt&0x04)
|
||||
led_on(3);
|
||||
else
|
||||
led_off(3);
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
int rt_application_init()
|
||||
{
|
||||
rt_thread_t init_thread;
|
||||
#ifdef RT_USING_LED
|
||||
rt_thread_t led_thread;
|
||||
#endif
|
||||
|
||||
#if (RT_THREAD_PRIORITY_MAX == 32)
|
||||
init_thread = rt_thread_create("init",
|
||||
rt_init_thread_entry, RT_NULL,
|
||||
RT_INIT_THREAD_STACK_SIZE, 8, 20);
|
||||
#ifdef RT_USING_LED
|
||||
led_thread = rt_thread_create("led",
|
||||
rt_led_thread_entry, RT_NULL,
|
||||
512, 20, 20);
|
||||
#endif
|
||||
|
||||
#else
|
||||
init_thread = rt_thread_create("init",
|
||||
rt_init_thread_entry, RT_NULL,
|
||||
RT_INIT_THREAD_STACK_SIZE, 80, 20);
|
||||
#ifdef RT_USING_LED
|
||||
led_thread = rt_thread_create("led",
|
||||
rt_led_thread_entry, RT_NULL,
|
||||
512, 200, 20);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
if (init_thread != RT_NULL)
|
||||
rt_thread_startup(init_thread);
|
||||
#ifdef RT_USING_LED
|
||||
if(led_thread != RT_NULL)
|
||||
rt_thread_startup(led_thread);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* NFSv3 Initialization */
|
||||
#if defined(RT_USING_DFS) && defined(RT_USING_LWIP) && defined(RT_USING_DFS_NFS)
|
||||
#include <dfs_nfs.h>
|
||||
void nfs_start(void)
|
||||
{
|
||||
nfs_init();
|
||||
|
||||
if (dfs_mount(RT_NULL, "/nfs", "nfs", 0, RT_NFS_HOST_EXPORT) == 0)
|
||||
{
|
||||
rt_kprintf("NFSv3 File System initialized!\n");
|
||||
}
|
||||
else
|
||||
rt_kprintf("NFSv3 File System initialzation failed!\n");
|
||||
}
|
||||
|
||||
#include "finsh.h"
|
||||
FINSH_FUNCTION_EXPORT(nfs_start, start net filesystem);
|
||||
#endif
|
||||
|
||||
/*@}*/
|
||||
/*
|
||||
* File : application.c
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2006, RT-Thread Development Team
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rt-thread.org/license/LICENSE
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2011-01-13 weety first version
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup at91sam9260
|
||||
*/
|
||||
/*@{*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <rtdevice.h>
|
||||
|
||||
#ifdef RT_USING_DFS
|
||||
/* dfs init */
|
||||
#include <dfs_init.h>
|
||||
/* dfs filesystem:ELM FatFs filesystem init */
|
||||
#include <dfs_elm.h>
|
||||
/* dfs Filesystem APIs */
|
||||
#include <dfs_fs.h>
|
||||
#ifdef RT_USING_DFS_UFFS
|
||||
/* dfs filesystem:UFFS filesystem init */
|
||||
#include <dfs_uffs.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(RT_USING_DFS_DEVFS)
|
||||
#include <devfs.h>
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_SDIO
|
||||
#include <drivers/mmcsd_core.h>
|
||||
#include "at91_mci.h"
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_LWIP
|
||||
#include <netif/ethernetif.h>
|
||||
//#include <arch/sys_arch_init.h>
|
||||
#include "macb.h"
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_LED
|
||||
#include "led.h"
|
||||
#endif
|
||||
|
||||
#define RT_INIT_THREAD_STACK_SIZE (2*1024)
|
||||
|
||||
#ifdef RT_USING_DFS_ROMFS
|
||||
#include <dfs_romfs.h>
|
||||
#endif
|
||||
|
||||
void rt_init_thread_entry(void* parameter)
|
||||
{
|
||||
/* Filesystem Initialization */
|
||||
#ifdef RT_USING_DFS
|
||||
{
|
||||
/* init the device filesystem */
|
||||
dfs_init();
|
||||
|
||||
#if defined(RT_USING_DFS_ELMFAT)
|
||||
/* init the elm chan FatFs filesystam*/
|
||||
elm_init();
|
||||
#endif
|
||||
|
||||
#if defined(RT_USING_DFS_ROMFS)
|
||||
dfs_romfs_init();
|
||||
if (dfs_mount(RT_NULL, "/rom", "rom", 0, &romfs_root) == 0)
|
||||
{
|
||||
rt_kprintf("ROM File System initialized!\n");
|
||||
}
|
||||
else
|
||||
rt_kprintf("ROM File System initialzation failed!\n");
|
||||
#endif
|
||||
|
||||
#if defined(RT_USING_DFS_DEVFS)
|
||||
devfs_init();
|
||||
if (dfs_mount(RT_NULL, "/dev", "devfs", 0, 0) == 0)
|
||||
rt_kprintf("Device File System initialized!\n");
|
||||
else
|
||||
rt_kprintf("Device File System initialzation failed!\n");
|
||||
|
||||
#ifdef RT_USING_NEWLIB
|
||||
/* init libc */
|
||||
libc_system_init("uart0");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(RT_USING_DFS_UFFS)
|
||||
{
|
||||
/* init the uffs filesystem */
|
||||
dfs_uffs_init();
|
||||
|
||||
/* mount flash device as flash directory */
|
||||
if(dfs_mount("nand0", "/nand0", "uffs", 0, 0) == 0)
|
||||
rt_kprintf("UFFS File System initialized!\n");
|
||||
else
|
||||
rt_kprintf("UFFS File System initialzation failed!\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_SDIO
|
||||
rt_mmcsd_core_init();
|
||||
rt_mmcsd_blk_init();
|
||||
at91_mci_init();
|
||||
rt_thread_delay(RT_TICK_PER_SECOND*2);
|
||||
/* mount sd card fat partition 1 as root directory */
|
||||
if (dfs_mount("sd0", "/", "elm", 0, 0) == 0)
|
||||
{
|
||||
rt_kprintf("File System initialized!\n");
|
||||
}
|
||||
else
|
||||
rt_kprintf("File System initialzation failed!\n");
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_LWIP
|
||||
{
|
||||
/* register ethernetif device */
|
||||
eth_system_device_init();
|
||||
rt_hw_macb_init();
|
||||
/* re-init device driver */
|
||||
rt_device_init_all();
|
||||
/* init lwip system */
|
||||
lwip_sys_init();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_I2C
|
||||
{
|
||||
rt_i2c_core_init();
|
||||
at91_i2c_init();
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#ifdef RT_USING_LED
|
||||
void rt_led_thread_entry(void* parameter)
|
||||
{
|
||||
rt_uint8_t cnt = 0;
|
||||
led_init();
|
||||
while(1)
|
||||
{
|
||||
/* light on leds for one second */
|
||||
rt_thread_delay(40);
|
||||
cnt++;
|
||||
if (cnt&0x01)
|
||||
led_on(1);
|
||||
else
|
||||
led_off(1);
|
||||
if (cnt&0x02)
|
||||
led_on(2);
|
||||
else
|
||||
led_off(2);
|
||||
if (cnt&0x04)
|
||||
led_on(3);
|
||||
else
|
||||
led_off(3);
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
int rt_application_init()
|
||||
{
|
||||
rt_thread_t init_thread;
|
||||
#ifdef RT_USING_LED
|
||||
rt_thread_t led_thread;
|
||||
#endif
|
||||
|
||||
#if (RT_THREAD_PRIORITY_MAX == 32)
|
||||
init_thread = rt_thread_create("init",
|
||||
rt_init_thread_entry, RT_NULL,
|
||||
RT_INIT_THREAD_STACK_SIZE, 8, 20);
|
||||
#ifdef RT_USING_LED
|
||||
led_thread = rt_thread_create("led",
|
||||
rt_led_thread_entry, RT_NULL,
|
||||
512, 20, 20);
|
||||
#endif
|
||||
|
||||
#else
|
||||
init_thread = rt_thread_create("init",
|
||||
rt_init_thread_entry, RT_NULL,
|
||||
RT_INIT_THREAD_STACK_SIZE, 80, 20);
|
||||
#ifdef RT_USING_LED
|
||||
led_thread = rt_thread_create("led",
|
||||
rt_led_thread_entry, RT_NULL,
|
||||
512, 200, 20);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
if (init_thread != RT_NULL)
|
||||
rt_thread_startup(init_thread);
|
||||
#ifdef RT_USING_LED
|
||||
if(led_thread != RT_NULL)
|
||||
rt_thread_startup(led_thread);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* NFSv3 Initialization */
|
||||
#if defined(RT_USING_DFS) && defined(RT_USING_LWIP) && defined(RT_USING_DFS_NFS)
|
||||
#include <dfs_nfs.h>
|
||||
void nfs_start(void)
|
||||
{
|
||||
nfs_init();
|
||||
|
||||
if (dfs_mount(RT_NULL, "/nfs", "nfs", 0, RT_NFS_HOST_EXPORT) == 0)
|
||||
{
|
||||
rt_kprintf("NFSv3 File System initialized!\n");
|
||||
}
|
||||
else
|
||||
rt_kprintf("NFSv3 File System initialzation failed!\n");
|
||||
}
|
||||
|
||||
#include "finsh.h"
|
||||
FINSH_FUNCTION_EXPORT(nfs_start, start net filesystem);
|
||||
#endif
|
||||
|
||||
/*@}*/
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
/*
|
||||
* File : board.h
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2006, RT-Thread Develop Team
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rt-thread.org/license/LICENSE
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2011-01-13 weety add board.h to this bsp
|
||||
*/
|
||||
|
||||
#ifndef __BOARD_H__
|
||||
#define __BOARD_H__
|
||||
|
||||
#include <at91sam926x.h>
|
||||
#include <serial.h>
|
||||
|
||||
void rt_hw_board_init(void);
|
||||
//void rt_hw_sdcard_init(void);
|
||||
|
||||
#endif
|
||||
/*
|
||||
* File : board.h
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2006, RT-Thread Develop Team
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rt-thread.org/license/LICENSE
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2011-01-13 weety add board.h to this bsp
|
||||
*/
|
||||
|
||||
#ifndef __BOARD_H__
|
||||
#define __BOARD_H__
|
||||
|
||||
#include <at91sam926x.h>
|
||||
#include <serial.h>
|
||||
|
||||
void rt_hw_board_init(void);
|
||||
//void rt_hw_sdcard_init(void);
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,84 +1,84 @@
|
||||
import os
|
||||
|
||||
# toolchains options
|
||||
ARCH = 'arm'
|
||||
CPU = 'at91sam926x'
|
||||
TextBase = '0x20000000'
|
||||
|
||||
CROSS_TOOL = 'gcc'
|
||||
|
||||
if os.getenv('RTT_CC'):
|
||||
CROSS_TOOL = os.getenv('RTT_CC')
|
||||
|
||||
if CROSS_TOOL == 'gcc':
|
||||
PLATFORM = 'gcc'
|
||||
EXEC_PATH = '/opt/arm-2010q1/bin/'
|
||||
elif CROSS_TOOL == 'keil':
|
||||
PLATFORM = 'armcc'
|
||||
EXEC_PATH = 'C:/Keil'
|
||||
elif CROSS_TOOL == 'iar':
|
||||
print '================ERROR============================'
|
||||
print 'Not support yet!'
|
||||
print '================================================='
|
||||
exit(0)
|
||||
|
||||
if os.getenv('RTT_EXEC_PATH'):
|
||||
EXEC_PATH = os.getenv('RTT_EXEC_PATH')
|
||||
|
||||
#BUILD = 'debug'
|
||||
BUILD = 'release'
|
||||
|
||||
if PLATFORM == 'gcc':
|
||||
# toolchains
|
||||
PREFIX = 'arm-none-eabi-'
|
||||
#PREFIX = 'arm-none-linux-gnueabi-'
|
||||
CC = PREFIX + 'gcc'
|
||||
AS = PREFIX + 'gcc'
|
||||
AR = PREFIX + 'ar'
|
||||
LINK = PREFIX + 'gcc'
|
||||
TARGET_EXT = 'axf'
|
||||
SIZE = PREFIX + 'size'
|
||||
OBJDUMP = PREFIX + 'objdump'
|
||||
OBJCPY = PREFIX + 'objcopy'
|
||||
|
||||
DEVICE = ' -mcpu=arm926ej-s'
|
||||
CFLAGS = DEVICE
|
||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp' + ' -DTEXT_BASE=' + TextBase
|
||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread_at91sam9260.map,-cref,-u,_start -T at91sam9260_ram.ld' + ' -Ttext ' + TextBase
|
||||
|
||||
CPATH = ''
|
||||
LPATH = ''
|
||||
|
||||
if BUILD == 'debug':
|
||||
CFLAGS += ' -O0 -gdwarf-2'
|
||||
AFLAGS += ' -gdwarf-2'
|
||||
else:
|
||||
CFLAGS += ' -O2'
|
||||
|
||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||
|
||||
elif PLATFORM == 'armcc':
|
||||
# toolchains
|
||||
CC = 'armcc'
|
||||
AS = 'armasm'
|
||||
AR = 'armar'
|
||||
LINK = 'armlink'
|
||||
TARGET_EXT = 'axf'
|
||||
|
||||
DEVICE = ' --device DARMATS9'
|
||||
CFLAGS = DEVICE + ' --apcs=interwork --diag_suppress=870'
|
||||
AFLAGS = DEVICE
|
||||
LFLAGS = DEVICE + ' --strict --info sizes --info totals --info unused --info veneers --list rtthread-at91sam9260.map --ro-base 0x20000000 --entry Entry_Point --first Entry_Point'
|
||||
|
||||
CFLAGS += ' -I"' + EXEC_PATH + '/ARM/RV31/INC"'
|
||||
LFLAGS += ' --libpath "' + EXEC_PATH + '/ARM/RV31/LIB"'
|
||||
|
||||
EXEC_PATH += '/arm/bin40/'
|
||||
|
||||
if BUILD == 'debug':
|
||||
CFLAGS += ' -g -O0'
|
||||
AFLAGS += ' -g'
|
||||
else:
|
||||
CFLAGS += ' -O2'
|
||||
|
||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||
import os
|
||||
|
||||
# toolchains options
|
||||
ARCH = 'arm'
|
||||
CPU = 'at91sam926x'
|
||||
TextBase = '0x20000000'
|
||||
|
||||
CROSS_TOOL = 'gcc'
|
||||
|
||||
if os.getenv('RTT_CC'):
|
||||
CROSS_TOOL = os.getenv('RTT_CC')
|
||||
|
||||
if CROSS_TOOL == 'gcc':
|
||||
PLATFORM = 'gcc'
|
||||
EXEC_PATH = '/opt/arm-2010q1/bin/'
|
||||
elif CROSS_TOOL == 'keil':
|
||||
PLATFORM = 'armcc'
|
||||
EXEC_PATH = 'C:/Keil'
|
||||
elif CROSS_TOOL == 'iar':
|
||||
print '================ERROR============================'
|
||||
print 'Not support yet!'
|
||||
print '================================================='
|
||||
exit(0)
|
||||
|
||||
if os.getenv('RTT_EXEC_PATH'):
|
||||
EXEC_PATH = os.getenv('RTT_EXEC_PATH')
|
||||
|
||||
#BUILD = 'debug'
|
||||
BUILD = 'release'
|
||||
|
||||
if PLATFORM == 'gcc':
|
||||
# toolchains
|
||||
PREFIX = 'arm-none-eabi-'
|
||||
#PREFIX = 'arm-none-linux-gnueabi-'
|
||||
CC = PREFIX + 'gcc'
|
||||
AS = PREFIX + 'gcc'
|
||||
AR = PREFIX + 'ar'
|
||||
LINK = PREFIX + 'gcc'
|
||||
TARGET_EXT = 'axf'
|
||||
SIZE = PREFIX + 'size'
|
||||
OBJDUMP = PREFIX + 'objdump'
|
||||
OBJCPY = PREFIX + 'objcopy'
|
||||
|
||||
DEVICE = ' -mcpu=arm926ej-s'
|
||||
CFLAGS = DEVICE
|
||||
AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp' + ' -DTEXT_BASE=' + TextBase
|
||||
LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rtthread_at91sam9260.map,-cref,-u,_start -T at91sam9260_ram.ld' + ' -Ttext ' + TextBase
|
||||
|
||||
CPATH = ''
|
||||
LPATH = ''
|
||||
|
||||
if BUILD == 'debug':
|
||||
CFLAGS += ' -O0 -gdwarf-2'
|
||||
AFLAGS += ' -gdwarf-2'
|
||||
else:
|
||||
CFLAGS += ' -O2'
|
||||
|
||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||
|
||||
elif PLATFORM == 'armcc':
|
||||
# toolchains
|
||||
CC = 'armcc'
|
||||
AS = 'armasm'
|
||||
AR = 'armar'
|
||||
LINK = 'armlink'
|
||||
TARGET_EXT = 'axf'
|
||||
|
||||
DEVICE = ' --device DARMATS9'
|
||||
CFLAGS = DEVICE + ' --apcs=interwork --diag_suppress=870'
|
||||
AFLAGS = DEVICE
|
||||
LFLAGS = DEVICE + ' --strict --info sizes --info totals --info unused --info veneers --list rtthread-at91sam9260.map --ro-base 0x20000000 --entry Entry_Point --first Entry_Point'
|
||||
|
||||
CFLAGS += ' -I"' + EXEC_PATH + '/ARM/RV31/INC"'
|
||||
LFLAGS += ' --libpath "' + EXEC_PATH + '/ARM/RV31/LIB"'
|
||||
|
||||
EXEC_PATH += '/arm/bin40/'
|
||||
|
||||
if BUILD == 'debug':
|
||||
CFLAGS += ' -g -O0'
|
||||
AFLAGS += ' -g'
|
||||
else:
|
||||
CFLAGS += ' -O2'
|
||||
|
||||
POST_ACTION = 'fromelf --bin $TARGET --output rtthread.bin \nfromelf -z $TARGET'
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import rtconfig
|
||||
Import('RTT_ROOT')
|
||||
from building import *
|
||||
|
||||
src_bsp = ['application.c', 'startup.c', 'board.c']
|
||||
|
||||
src = File(src_bsp)
|
||||
CPPPATH = [RTT_ROOT + '/bsp/avr32uc3b0']
|
||||
group = DefineGroup('Startup', src, depend = [''], CPPPATH = CPPPATH)
|
||||
|
||||
Return('group')
|
||||
import rtconfig
|
||||
Import('RTT_ROOT')
|
||||
from building import *
|
||||
|
||||
src_bsp = ['application.c', 'startup.c', 'board.c']
|
||||
|
||||
src = File(src_bsp)
|
||||
CPPPATH = [RTT_ROOT + '/bsp/avr32uc3b0']
|
||||
group = DefineGroup('Startup', src, depend = [''], CPPPATH = CPPPATH)
|
||||
|
||||
Return('group')
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
import os
|
||||
import sys
|
||||
import rtconfig
|
||||
|
||||
if os.getenv('RTT_ROOT'):
|
||||
RTT_ROOT = os.getenv('RTT_ROOT')
|
||||
else:
|
||||
RTT_ROOT = os.path.normpath(os.getcwd() + '/../..')
|
||||
|
||||
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
|
||||
from building import *
|
||||
|
||||
TARGET = 'rtthread-' + rtconfig.ARCH + '.' + rtconfig.TARGET_EXT
|
||||
|
||||
env = Environment(tools = ['mingw'],
|
||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||
|
||||
Export('RTT_ROOT')
|
||||
Export('rtconfig')
|
||||
|
||||
# prepare building environment
|
||||
objs = PrepareBuilding(env, RTT_ROOT)
|
||||
|
||||
# AVR32 software framework building script
|
||||
objs = objs + SConscript(RTT_ROOT + '/bsp/avr32uc3b0/SOFTWARE_FRAMEWORK/SConscript', variant_dir='bsp/SOFTWARE_FRAMEWORK', duplicate=0)
|
||||
|
||||
# build program
|
||||
env.Program(TARGET, objs)
|
||||
|
||||
# end building
|
||||
import os
|
||||
import sys
|
||||
import rtconfig
|
||||
|
||||
if os.getenv('RTT_ROOT'):
|
||||
RTT_ROOT = os.getenv('RTT_ROOT')
|
||||
else:
|
||||
RTT_ROOT = os.path.normpath(os.getcwd() + '/../..')
|
||||
|
||||
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
|
||||
from building import *
|
||||
|
||||
TARGET = 'rtthread-' + rtconfig.ARCH + '.' + rtconfig.TARGET_EXT
|
||||
|
||||
env = Environment(tools = ['mingw'],
|
||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||
|
||||
Export('RTT_ROOT')
|
||||
Export('rtconfig')
|
||||
|
||||
# prepare building environment
|
||||
objs = PrepareBuilding(env, RTT_ROOT)
|
||||
|
||||
# AVR32 software framework building script
|
||||
objs = objs + SConscript(RTT_ROOT + '/bsp/avr32uc3b0/SOFTWARE_FRAMEWORK/SConscript', variant_dir='bsp/SOFTWARE_FRAMEWORK', duplicate=0)
|
||||
|
||||
# build program
|
||||
env.Program(TARGET, objs)
|
||||
|
||||
# end building
|
||||
EndBuilding(TARGET)
|
||||
@@ -1,121 +1,121 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief Standard board header file.
|
||||
*
|
||||
* This file includes the appropriate board header file according to the
|
||||
* defined board.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _BOARD_H_
|
||||
#define _BOARD_H_
|
||||
|
||||
#include <avr32/io.h>
|
||||
|
||||
/*! \name Base Boards
|
||||
*/
|
||||
//! @{
|
||||
#define EVK1100 1 //!< AT32UC3A EVK1100 board.
|
||||
#define EVK1101 2 //!< AT32UC3B EVK1101 board.
|
||||
#define UC3C_EK 3 //!< AT32UC3C UC3C_EK board.
|
||||
#define EVK1104 4 //!< AT32UC3A3 EVK1104 board.
|
||||
#define EVK1105 5 //!< AT32UC3A EVK1105 board.
|
||||
#define STK1000 6 //!< AT32AP7000 STK1000 board.
|
||||
#define NGW100 7 //!< AT32AP7000 NGW100 board.
|
||||
#define STK600_RCUC3L0 8 //!< STK600 RCUC3L0 board.
|
||||
#define UC3L_EK 9 //!< AT32UC3L-EK board.
|
||||
#define USER_BOARD 99 //!< User-reserved board (if any).
|
||||
//! @}
|
||||
|
||||
/*! \name Extension Boards
|
||||
*/
|
||||
//! @{
|
||||
#define EXT1102 1 //!< AT32UC3B EXT1102 board.
|
||||
#define MC300 2 //!< AT32UC3 MC300 board.
|
||||
#define USER_EXT_BOARD 99 //!< User-reserved extension board (if any).
|
||||
//! @}
|
||||
|
||||
#if BOARD == EVK1100
|
||||
#include "EVK1100/evk1100.h"
|
||||
#elif BOARD == EVK1101
|
||||
#include "EVK1101/evk1101.h"
|
||||
#elif BOARD == UC3C_EK
|
||||
#include "UC3C_EK/uc3c_ek.h"
|
||||
#elif BOARD == EVK1104
|
||||
#include "EVK1104/evk1104.h"
|
||||
#elif BOARD == EVK1105
|
||||
#include "EVK1105/evk1105.h"
|
||||
#elif BOARD == STK1000
|
||||
#include "STK1000/stk1000.h"
|
||||
#elif BOARD == NGW100
|
||||
#include "NGW100/ngw100.h"
|
||||
#elif BOARD == STK600_RCUC3L0
|
||||
#include "STK600/RCUC3L0/stk600_rcuc3l0.h"
|
||||
#elif BOARD == UC3L_EK
|
||||
#include "UC3L_EK/uc3l_ek.h"
|
||||
#elif BOARD == USER_BOARD
|
||||
// User-reserved area: #include the header file of your board here (if any).
|
||||
#include "user_board.h"
|
||||
#else
|
||||
#error No known AVR32 board defined
|
||||
#endif
|
||||
|
||||
#if (defined EXT_BOARD)
|
||||
#if EXT_BOARD == EXT1102
|
||||
#include "EXT1102/ext1102.h"
|
||||
#elif EXT_BOARD == MC300
|
||||
#include "MC300/mc300.h"
|
||||
#elif EXT_BOARD == USER_EXT_BOARD
|
||||
// User-reserved area: #include the header file of your extension board here
|
||||
// (if any).
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef FRCOSC
|
||||
#define FRCOSC AVR32_PM_RCOSC_FREQUENCY //!< Default RCOsc frequency.
|
||||
#endif
|
||||
|
||||
|
||||
#endif // _BOARD_H_
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief Standard board header file.
|
||||
*
|
||||
* This file includes the appropriate board header file according to the
|
||||
* defined board.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _BOARD_H_
|
||||
#define _BOARD_H_
|
||||
|
||||
#include <avr32/io.h>
|
||||
|
||||
/*! \name Base Boards
|
||||
*/
|
||||
//! @{
|
||||
#define EVK1100 1 //!< AT32UC3A EVK1100 board.
|
||||
#define EVK1101 2 //!< AT32UC3B EVK1101 board.
|
||||
#define UC3C_EK 3 //!< AT32UC3C UC3C_EK board.
|
||||
#define EVK1104 4 //!< AT32UC3A3 EVK1104 board.
|
||||
#define EVK1105 5 //!< AT32UC3A EVK1105 board.
|
||||
#define STK1000 6 //!< AT32AP7000 STK1000 board.
|
||||
#define NGW100 7 //!< AT32AP7000 NGW100 board.
|
||||
#define STK600_RCUC3L0 8 //!< STK600 RCUC3L0 board.
|
||||
#define UC3L_EK 9 //!< AT32UC3L-EK board.
|
||||
#define USER_BOARD 99 //!< User-reserved board (if any).
|
||||
//! @}
|
||||
|
||||
/*! \name Extension Boards
|
||||
*/
|
||||
//! @{
|
||||
#define EXT1102 1 //!< AT32UC3B EXT1102 board.
|
||||
#define MC300 2 //!< AT32UC3 MC300 board.
|
||||
#define USER_EXT_BOARD 99 //!< User-reserved extension board (if any).
|
||||
//! @}
|
||||
|
||||
#if BOARD == EVK1100
|
||||
#include "EVK1100/evk1100.h"
|
||||
#elif BOARD == EVK1101
|
||||
#include "EVK1101/evk1101.h"
|
||||
#elif BOARD == UC3C_EK
|
||||
#include "UC3C_EK/uc3c_ek.h"
|
||||
#elif BOARD == EVK1104
|
||||
#include "EVK1104/evk1104.h"
|
||||
#elif BOARD == EVK1105
|
||||
#include "EVK1105/evk1105.h"
|
||||
#elif BOARD == STK1000
|
||||
#include "STK1000/stk1000.h"
|
||||
#elif BOARD == NGW100
|
||||
#include "NGW100/ngw100.h"
|
||||
#elif BOARD == STK600_RCUC3L0
|
||||
#include "STK600/RCUC3L0/stk600_rcuc3l0.h"
|
||||
#elif BOARD == UC3L_EK
|
||||
#include "UC3L_EK/uc3l_ek.h"
|
||||
#elif BOARD == USER_BOARD
|
||||
// User-reserved area: #include the header file of your board here (if any).
|
||||
#include "user_board.h"
|
||||
#else
|
||||
#error No known AVR32 board defined
|
||||
#endif
|
||||
|
||||
#if (defined EXT_BOARD)
|
||||
#if EXT_BOARD == EXT1102
|
||||
#include "EXT1102/ext1102.h"
|
||||
#elif EXT_BOARD == MC300
|
||||
#include "MC300/mc300.h"
|
||||
#elif EXT_BOARD == USER_EXT_BOARD
|
||||
// User-reserved area: #include the header file of your extension board here
|
||||
// (if any).
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef FRCOSC
|
||||
#define FRCOSC AVR32_PM_RCOSC_FREQUENCY //!< Default RCOsc frequency.
|
||||
#endif
|
||||
|
||||
|
||||
#endif // _BOARD_H_
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,214 +1,214 @@
|
||||
/* This source file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
/* This source file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief INTC driver for AVR32 UC3.
|
||||
*
|
||||
* AVR32 Interrupt Controller driver module.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices with an INTC module can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#include <avr32/io.h>
|
||||
#include "compiler.h"
|
||||
#include "preprocessor.h"
|
||||
#include "intc.h"
|
||||
|
||||
// define _evba from exception.S
|
||||
extern void _evba;
|
||||
|
||||
//! Values to store in the interrupt priority registers for the various interrupt priority levels.
|
||||
extern const unsigned int ipr_val[AVR32_INTC_NUM_INT_LEVELS];
|
||||
|
||||
//! Creates a table of interrupt line handlers per interrupt group in order to optimize RAM space.
|
||||
//! Each line handler table contains a set of pointers to interrupt handlers.
|
||||
#if (defined __GNUC__)
|
||||
#define DECL_INT_LINE_HANDLER_TABLE(GRP, unused) \
|
||||
static volatile __int_handler _int_line_handler_table_##GRP[Max(AVR32_INTC_NUM_IRQS_PER_GRP##GRP, 1)];
|
||||
#elif (defined __ICCAVR32__)
|
||||
#define DECL_INT_LINE_HANDLER_TABLE(GRP, unused) \
|
||||
static volatile __no_init __int_handler _int_line_handler_table_##GRP[Max(AVR32_INTC_NUM_IRQS_PER_GRP##GRP, 1)];
|
||||
#endif
|
||||
MREPEAT(AVR32_INTC_NUM_INT_GRPS, DECL_INT_LINE_HANDLER_TABLE, ~);
|
||||
#undef DECL_INT_LINE_HANDLER_TABLE
|
||||
|
||||
//! Table containing for each interrupt group the number of interrupt request
|
||||
//! lines and a pointer to the table of interrupt line handlers.
|
||||
static const struct
|
||||
{
|
||||
unsigned int num_irqs;
|
||||
volatile __int_handler *_int_line_handler_table;
|
||||
} _int_handler_table[AVR32_INTC_NUM_INT_GRPS] =
|
||||
{
|
||||
#define INSERT_INT_LINE_HANDLER_TABLE(GRP, unused) \
|
||||
{AVR32_INTC_NUM_IRQS_PER_GRP##GRP, _int_line_handler_table_##GRP},
|
||||
MREPEAT(AVR32_INTC_NUM_INT_GRPS, INSERT_INT_LINE_HANDLER_TABLE, ~)
|
||||
#undef INSERT_INT_LINE_HANDLER_TABLE
|
||||
};
|
||||
|
||||
|
||||
/*! \brief Default interrupt handler.
|
||||
*
|
||||
* \note Taken and adapted from Newlib.
|
||||
*/
|
||||
#if (defined __GNUC__)
|
||||
__attribute__((__interrupt__))
|
||||
#elif (defined __ICCAVR32__)
|
||||
__interrupt
|
||||
#endif
|
||||
static void _unhandled_interrupt(void)
|
||||
{
|
||||
// Catch unregistered interrupts.
|
||||
while (TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*! \brief Gets the interrupt handler of the current event at the \a int_level
|
||||
* interrupt priority level (called from exception.S).
|
||||
*
|
||||
* \param int_level Interrupt priority level to handle.
|
||||
*
|
||||
* \return Interrupt handler to execute.
|
||||
*
|
||||
* \note Taken and adapted from Newlib.
|
||||
*/
|
||||
__int_handler _get_interrupt_handler(unsigned int int_level)
|
||||
{
|
||||
// ICR3 is mapped first, ICR0 last.
|
||||
// Code in exception.S puts int_level in R12 which is used by AVR32-GCC to
|
||||
// pass a single argument to a function.
|
||||
unsigned int int_grp = AVR32_INTC.icr[AVR32_INTC_INT3 - int_level];
|
||||
unsigned int int_req = AVR32_INTC.irr[int_grp];
|
||||
|
||||
// As an interrupt may disappear while it is being fetched by the CPU
|
||||
// (spurious interrupt caused by a delayed response from an MCU peripheral to
|
||||
// an interrupt flag clear or interrupt disable instruction), check if there
|
||||
// are remaining interrupt lines to process.
|
||||
// If a spurious interrupt occurs, the status register (SR) contains an
|
||||
// execution mode and interrupt level masks corresponding to a level 0
|
||||
// interrupt, whatever the interrupt priority level causing the spurious
|
||||
// event. This behavior has been chosen because a spurious interrupt has not
|
||||
// to be a priority one and because it may not cause any trouble to other
|
||||
// interrupts.
|
||||
// However, these spurious interrupts place the hardware in an unstable state
|
||||
// and could give problems in other/future versions of the CPU, so the
|
||||
// software has to be written so that they never occur. The only safe way of
|
||||
// achieving this is to always clear or disable peripheral interrupts with the
|
||||
// following sequence:
|
||||
// 1: Mask the interrupt in the CPU by setting GM (or IxM) in SR.
|
||||
// 2: Perform the bus access to the peripheral register that clears or
|
||||
// disables the interrupt.
|
||||
// 3: Wait until the interrupt has actually been cleared or disabled by the
|
||||
// peripheral. This is usually performed by reading from a register in the
|
||||
// same peripheral (it DOES NOT have to be the same register that was
|
||||
// accessed in step 2, but it MUST be in the same peripheral), what takes
|
||||
// bus system latencies into account, but peripheral internal latencies
|
||||
// (generally 0 cycle) also have to be considered.
|
||||
// 4: Unmask the interrupt in the CPU by clearing GM (or IxM) in SR.
|
||||
// Note that steps 1 and 4 are useless inside interrupt handlers as the
|
||||
// corresponding interrupt level is automatically masked by IxM (unless IxM is
|
||||
// explicitly cleared by the software).
|
||||
//
|
||||
// Get the right IRQ handler.
|
||||
//
|
||||
// If several interrupt lines are active in the group, the interrupt line with
|
||||
// the highest number is selected. This is to be coherent with the
|
||||
// prioritization of interrupt groups performed by the hardware interrupt
|
||||
// controller.
|
||||
//
|
||||
// If no handler has been registered for the pending interrupt,
|
||||
// _unhandled_interrupt will be selected thanks to the initialization of
|
||||
// _int_line_handler_table_x by INTC_init_interrupts.
|
||||
//
|
||||
// exception.S will provide the interrupt handler with a clean interrupt stack
|
||||
// frame, with nothing more pushed onto the stack. The interrupt handler must
|
||||
// manage the `rete' instruction, what can be done thanks to pure assembly,
|
||||
// inline assembly or the `__attribute__((__interrupt__))' C function
|
||||
// attribute.
|
||||
return (int_req) ? _int_handler_table[int_grp]._int_line_handler_table[32 - clz(int_req) - 1] : NULL;
|
||||
}
|
||||
|
||||
//! Init EVBA address. This sequence might also be done in the UTILS/STARTUP/GCC/crt0.S
|
||||
static __inline__ void INTC_init_evba(void)
|
||||
{
|
||||
Set_system_register(AVR32_EVBA, (int)&_evba );
|
||||
}
|
||||
|
||||
void INTC_init_interrupts(void)
|
||||
{
|
||||
unsigned int int_grp, int_req;
|
||||
|
||||
INTC_init_evba();
|
||||
|
||||
// For all interrupt groups,
|
||||
for (int_grp = 0; int_grp < AVR32_INTC_NUM_INT_GRPS; int_grp++)
|
||||
{
|
||||
// For all interrupt request lines of each group,
|
||||
for (int_req = 0; int_req < _int_handler_table[int_grp].num_irqs; int_req++)
|
||||
{
|
||||
// Assign _unhandled_interrupt as default interrupt handler.
|
||||
_int_handler_table[int_grp]._int_line_handler_table[int_req] = &_unhandled_interrupt;
|
||||
}
|
||||
|
||||
// Set the interrupt group priority register to its default value.
|
||||
// By default, all interrupt groups are linked to the interrupt priority
|
||||
// level 0 and to the interrupt vector _int0.
|
||||
AVR32_INTC.ipr[int_grp] = ipr_val[AVR32_INTC_INT0];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void INTC_register_interrupt(__int_handler handler, unsigned int irq, unsigned int int_level)
|
||||
{
|
||||
// Determine the group of the IRQ.
|
||||
unsigned int int_grp = irq / AVR32_INTC_MAX_NUM_IRQS_PER_GRP;
|
||||
|
||||
// Store in _int_line_handler_table_x the pointer to the interrupt handler, so
|
||||
// that _get_interrupt_handler can retrieve it when the interrupt is vectored.
|
||||
_int_handler_table[int_grp]._int_line_handler_table[irq % AVR32_INTC_MAX_NUM_IRQS_PER_GRP] = handler;
|
||||
|
||||
// Program the corresponding IPRX register to set the interrupt priority level
|
||||
// and the interrupt vector offset that will be fetched by the core interrupt
|
||||
// system.
|
||||
// NOTE: The _intx functions are intermediate assembly functions between the
|
||||
// core interrupt system and the user interrupt handler.
|
||||
AVR32_INTC.ipr[int_grp] = ipr_val[int_level & (AVR32_INTC_IPR_INTLEVEL_MASK >> AVR32_INTC_IPR_INTLEVEL_OFFSET)];
|
||||
}
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief INTC driver for AVR32 UC3.
|
||||
*
|
||||
* AVR32 Interrupt Controller driver module.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices with an INTC module can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#include <avr32/io.h>
|
||||
#include "compiler.h"
|
||||
#include "preprocessor.h"
|
||||
#include "intc.h"
|
||||
|
||||
// define _evba from exception.S
|
||||
extern void _evba;
|
||||
|
||||
//! Values to store in the interrupt priority registers for the various interrupt priority levels.
|
||||
extern const unsigned int ipr_val[AVR32_INTC_NUM_INT_LEVELS];
|
||||
|
||||
//! Creates a table of interrupt line handlers per interrupt group in order to optimize RAM space.
|
||||
//! Each line handler table contains a set of pointers to interrupt handlers.
|
||||
#if (defined __GNUC__)
|
||||
#define DECL_INT_LINE_HANDLER_TABLE(GRP, unused) \
|
||||
static volatile __int_handler _int_line_handler_table_##GRP[Max(AVR32_INTC_NUM_IRQS_PER_GRP##GRP, 1)];
|
||||
#elif (defined __ICCAVR32__)
|
||||
#define DECL_INT_LINE_HANDLER_TABLE(GRP, unused) \
|
||||
static volatile __no_init __int_handler _int_line_handler_table_##GRP[Max(AVR32_INTC_NUM_IRQS_PER_GRP##GRP, 1)];
|
||||
#endif
|
||||
MREPEAT(AVR32_INTC_NUM_INT_GRPS, DECL_INT_LINE_HANDLER_TABLE, ~);
|
||||
#undef DECL_INT_LINE_HANDLER_TABLE
|
||||
|
||||
//! Table containing for each interrupt group the number of interrupt request
|
||||
//! lines and a pointer to the table of interrupt line handlers.
|
||||
static const struct
|
||||
{
|
||||
unsigned int num_irqs;
|
||||
volatile __int_handler *_int_line_handler_table;
|
||||
} _int_handler_table[AVR32_INTC_NUM_INT_GRPS] =
|
||||
{
|
||||
#define INSERT_INT_LINE_HANDLER_TABLE(GRP, unused) \
|
||||
{AVR32_INTC_NUM_IRQS_PER_GRP##GRP, _int_line_handler_table_##GRP},
|
||||
MREPEAT(AVR32_INTC_NUM_INT_GRPS, INSERT_INT_LINE_HANDLER_TABLE, ~)
|
||||
#undef INSERT_INT_LINE_HANDLER_TABLE
|
||||
};
|
||||
|
||||
|
||||
/*! \brief Default interrupt handler.
|
||||
*
|
||||
* \note Taken and adapted from Newlib.
|
||||
*/
|
||||
#if (defined __GNUC__)
|
||||
__attribute__((__interrupt__))
|
||||
#elif (defined __ICCAVR32__)
|
||||
__interrupt
|
||||
#endif
|
||||
static void _unhandled_interrupt(void)
|
||||
{
|
||||
// Catch unregistered interrupts.
|
||||
while (TRUE);
|
||||
}
|
||||
|
||||
|
||||
/*! \brief Gets the interrupt handler of the current event at the \a int_level
|
||||
* interrupt priority level (called from exception.S).
|
||||
*
|
||||
* \param int_level Interrupt priority level to handle.
|
||||
*
|
||||
* \return Interrupt handler to execute.
|
||||
*
|
||||
* \note Taken and adapted from Newlib.
|
||||
*/
|
||||
__int_handler _get_interrupt_handler(unsigned int int_level)
|
||||
{
|
||||
// ICR3 is mapped first, ICR0 last.
|
||||
// Code in exception.S puts int_level in R12 which is used by AVR32-GCC to
|
||||
// pass a single argument to a function.
|
||||
unsigned int int_grp = AVR32_INTC.icr[AVR32_INTC_INT3 - int_level];
|
||||
unsigned int int_req = AVR32_INTC.irr[int_grp];
|
||||
|
||||
// As an interrupt may disappear while it is being fetched by the CPU
|
||||
// (spurious interrupt caused by a delayed response from an MCU peripheral to
|
||||
// an interrupt flag clear or interrupt disable instruction), check if there
|
||||
// are remaining interrupt lines to process.
|
||||
// If a spurious interrupt occurs, the status register (SR) contains an
|
||||
// execution mode and interrupt level masks corresponding to a level 0
|
||||
// interrupt, whatever the interrupt priority level causing the spurious
|
||||
// event. This behavior has been chosen because a spurious interrupt has not
|
||||
// to be a priority one and because it may not cause any trouble to other
|
||||
// interrupts.
|
||||
// However, these spurious interrupts place the hardware in an unstable state
|
||||
// and could give problems in other/future versions of the CPU, so the
|
||||
// software has to be written so that they never occur. The only safe way of
|
||||
// achieving this is to always clear or disable peripheral interrupts with the
|
||||
// following sequence:
|
||||
// 1: Mask the interrupt in the CPU by setting GM (or IxM) in SR.
|
||||
// 2: Perform the bus access to the peripheral register that clears or
|
||||
// disables the interrupt.
|
||||
// 3: Wait until the interrupt has actually been cleared or disabled by the
|
||||
// peripheral. This is usually performed by reading from a register in the
|
||||
// same peripheral (it DOES NOT have to be the same register that was
|
||||
// accessed in step 2, but it MUST be in the same peripheral), what takes
|
||||
// bus system latencies into account, but peripheral internal latencies
|
||||
// (generally 0 cycle) also have to be considered.
|
||||
// 4: Unmask the interrupt in the CPU by clearing GM (or IxM) in SR.
|
||||
// Note that steps 1 and 4 are useless inside interrupt handlers as the
|
||||
// corresponding interrupt level is automatically masked by IxM (unless IxM is
|
||||
// explicitly cleared by the software).
|
||||
//
|
||||
// Get the right IRQ handler.
|
||||
//
|
||||
// If several interrupt lines are active in the group, the interrupt line with
|
||||
// the highest number is selected. This is to be coherent with the
|
||||
// prioritization of interrupt groups performed by the hardware interrupt
|
||||
// controller.
|
||||
//
|
||||
// If no handler has been registered for the pending interrupt,
|
||||
// _unhandled_interrupt will be selected thanks to the initialization of
|
||||
// _int_line_handler_table_x by INTC_init_interrupts.
|
||||
//
|
||||
// exception.S will provide the interrupt handler with a clean interrupt stack
|
||||
// frame, with nothing more pushed onto the stack. The interrupt handler must
|
||||
// manage the `rete' instruction, what can be done thanks to pure assembly,
|
||||
// inline assembly or the `__attribute__((__interrupt__))' C function
|
||||
// attribute.
|
||||
return (int_req) ? _int_handler_table[int_grp]._int_line_handler_table[32 - clz(int_req) - 1] : NULL;
|
||||
}
|
||||
|
||||
//! Init EVBA address. This sequence might also be done in the UTILS/STARTUP/GCC/crt0.S
|
||||
static __inline__ void INTC_init_evba(void)
|
||||
{
|
||||
Set_system_register(AVR32_EVBA, (int)&_evba );
|
||||
}
|
||||
|
||||
void INTC_init_interrupts(void)
|
||||
{
|
||||
unsigned int int_grp, int_req;
|
||||
|
||||
INTC_init_evba();
|
||||
|
||||
// For all interrupt groups,
|
||||
for (int_grp = 0; int_grp < AVR32_INTC_NUM_INT_GRPS; int_grp++)
|
||||
{
|
||||
// For all interrupt request lines of each group,
|
||||
for (int_req = 0; int_req < _int_handler_table[int_grp].num_irqs; int_req++)
|
||||
{
|
||||
// Assign _unhandled_interrupt as default interrupt handler.
|
||||
_int_handler_table[int_grp]._int_line_handler_table[int_req] = &_unhandled_interrupt;
|
||||
}
|
||||
|
||||
// Set the interrupt group priority register to its default value.
|
||||
// By default, all interrupt groups are linked to the interrupt priority
|
||||
// level 0 and to the interrupt vector _int0.
|
||||
AVR32_INTC.ipr[int_grp] = ipr_val[AVR32_INTC_INT0];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void INTC_register_interrupt(__int_handler handler, unsigned int irq, unsigned int int_level)
|
||||
{
|
||||
// Determine the group of the IRQ.
|
||||
unsigned int int_grp = irq / AVR32_INTC_MAX_NUM_IRQS_PER_GRP;
|
||||
|
||||
// Store in _int_line_handler_table_x the pointer to the interrupt handler, so
|
||||
// that _get_interrupt_handler can retrieve it when the interrupt is vectored.
|
||||
_int_handler_table[int_grp]._int_line_handler_table[irq % AVR32_INTC_MAX_NUM_IRQS_PER_GRP] = handler;
|
||||
|
||||
// Program the corresponding IPRX register to set the interrupt priority level
|
||||
// and the interrupt vector offset that will be fetched by the core interrupt
|
||||
// system.
|
||||
// NOTE: The _intx functions are intermediate assembly functions between the
|
||||
// core interrupt system and the user interrupt handler.
|
||||
AVR32_INTC.ipr[int_grp] = ipr_val[int_level & (AVR32_INTC_IPR_INTLEVEL_MASK >> AVR32_INTC_IPR_INTLEVEL_OFFSET)];
|
||||
}
|
||||
|
||||
@@ -1,100 +1,100 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief INTC driver for AVR32 UC3.
|
||||
*
|
||||
* AVR32 Interrupt Controller driver module.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices with an INTC module can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _INTC_H_
|
||||
#define _INTC_H_
|
||||
|
||||
#include "compiler.h"
|
||||
|
||||
|
||||
//! Maximal number of interrupt request lines per group.
|
||||
#define AVR32_INTC_MAX_NUM_IRQS_PER_GRP 32
|
||||
|
||||
//! Number of interrupt priority levels.
|
||||
#define AVR32_INTC_NUM_INT_LEVELS (1 << AVR32_INTC_IPR_INTLEVEL_SIZE)
|
||||
|
||||
|
||||
#ifdef __AVR32_ABI_COMPILER__ // Automatically defined when compiling for AVR32, not when assembling.
|
||||
|
||||
//! Pointer to interrupt handler.
|
||||
#if (defined __GNUC__)
|
||||
typedef void (*__int_handler)(void);
|
||||
#elif (defined __ICCAVR32__)
|
||||
typedef void (__interrupt *__int_handler)(void);
|
||||
#endif
|
||||
|
||||
|
||||
/*! \brief Initializes the hardware interrupt controller driver.
|
||||
*
|
||||
* \note Taken and adapted from Newlib.
|
||||
*/
|
||||
extern void INTC_init_interrupts(void);
|
||||
|
||||
/*! \brief Registers an interrupt handler.
|
||||
*
|
||||
* \param handler Interrupt handler to register.
|
||||
* \param irq IRQ of the interrupt handler to register.
|
||||
* \param int_level Interrupt priority level to assign to the group of this IRQ.
|
||||
*
|
||||
* \warning The interrupt handler must manage the `rete' instruction, what can
|
||||
* be done thanks to pure assembly, inline assembly or the
|
||||
* `__attribute__((__interrupt__))' C function attribute.
|
||||
*
|
||||
* \warning If several interrupt handlers of a same group are registered with
|
||||
* different priority levels, only the latest priority level set will
|
||||
* be effective.
|
||||
*
|
||||
* \note Taken and adapted from Newlib.
|
||||
*/
|
||||
extern void INTC_register_interrupt(__int_handler handler, unsigned int irq, unsigned int int_level);
|
||||
|
||||
#endif // __AVR32_ABI_COMPILER__
|
||||
|
||||
|
||||
#endif // _INTC_H_
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief INTC driver for AVR32 UC3.
|
||||
*
|
||||
* AVR32 Interrupt Controller driver module.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices with an INTC module can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _INTC_H_
|
||||
#define _INTC_H_
|
||||
|
||||
#include "compiler.h"
|
||||
|
||||
|
||||
//! Maximal number of interrupt request lines per group.
|
||||
#define AVR32_INTC_MAX_NUM_IRQS_PER_GRP 32
|
||||
|
||||
//! Number of interrupt priority levels.
|
||||
#define AVR32_INTC_NUM_INT_LEVELS (1 << AVR32_INTC_IPR_INTLEVEL_SIZE)
|
||||
|
||||
|
||||
#ifdef __AVR32_ABI_COMPILER__ // Automatically defined when compiling for AVR32, not when assembling.
|
||||
|
||||
//! Pointer to interrupt handler.
|
||||
#if (defined __GNUC__)
|
||||
typedef void (*__int_handler)(void);
|
||||
#elif (defined __ICCAVR32__)
|
||||
typedef void (__interrupt *__int_handler)(void);
|
||||
#endif
|
||||
|
||||
|
||||
/*! \brief Initializes the hardware interrupt controller driver.
|
||||
*
|
||||
* \note Taken and adapted from Newlib.
|
||||
*/
|
||||
extern void INTC_init_interrupts(void);
|
||||
|
||||
/*! \brief Registers an interrupt handler.
|
||||
*
|
||||
* \param handler Interrupt handler to register.
|
||||
* \param irq IRQ of the interrupt handler to register.
|
||||
* \param int_level Interrupt priority level to assign to the group of this IRQ.
|
||||
*
|
||||
* \warning The interrupt handler must manage the `rete' instruction, what can
|
||||
* be done thanks to pure assembly, inline assembly or the
|
||||
* `__attribute__((__interrupt__))' C function attribute.
|
||||
*
|
||||
* \warning If several interrupt handlers of a same group are registered with
|
||||
* different priority levels, only the latest priority level set will
|
||||
* be effective.
|
||||
*
|
||||
* \note Taken and adapted from Newlib.
|
||||
*/
|
||||
extern void INTC_register_interrupt(__int_handler handler, unsigned int irq, unsigned int int_level);
|
||||
|
||||
#endif // __AVR32_ABI_COMPILER__
|
||||
|
||||
|
||||
#endif // _INTC_H_
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,30 +1,30 @@
|
||||
import rtconfig
|
||||
Import('RTT_ROOT')
|
||||
from building import *
|
||||
|
||||
cwd = GetCurrentDir()
|
||||
|
||||
src = Split("""
|
||||
DRIVERS/FLASHC/flashc.c
|
||||
DRIVERS/GPIO/gpio.c
|
||||
DRIVERS/INTC/intc.c
|
||||
DRIVERS/PM/pm.c
|
||||
DRIVERS/PM/pm_conf_clocks.c
|
||||
DRIVERS/PM/power_clocks_lib.c
|
||||
DRIVERS/USART/usart.c
|
||||
""")
|
||||
|
||||
CPPPATH = [
|
||||
cwd + '/BOARDS',
|
||||
cwd + '/UTILS',
|
||||
cwd + '/UTILS/PREPROCESSOR',
|
||||
cwd + '/DRIVERS/FLASHC',
|
||||
cwd + '/DRIVERS/GPIO',
|
||||
cwd + '/DRIVERS/INTC',
|
||||
cwd + '/DRIVERS/PM',
|
||||
cwd + '/DRIVERS/USART',
|
||||
]
|
||||
|
||||
group = DefineGroup('Startup', src, depend = [''], CPPPATH = CPPPATH)
|
||||
|
||||
Return('group')
|
||||
import rtconfig
|
||||
Import('RTT_ROOT')
|
||||
from building import *
|
||||
|
||||
cwd = GetCurrentDir()
|
||||
|
||||
src = Split("""
|
||||
DRIVERS/FLASHC/flashc.c
|
||||
DRIVERS/GPIO/gpio.c
|
||||
DRIVERS/INTC/intc.c
|
||||
DRIVERS/PM/pm.c
|
||||
DRIVERS/PM/pm_conf_clocks.c
|
||||
DRIVERS/PM/power_clocks_lib.c
|
||||
DRIVERS/USART/usart.c
|
||||
""")
|
||||
|
||||
CPPPATH = [
|
||||
cwd + '/BOARDS',
|
||||
cwd + '/UTILS',
|
||||
cwd + '/UTILS/PREPROCESSOR',
|
||||
cwd + '/DRIVERS/FLASHC',
|
||||
cwd + '/DRIVERS/GPIO',
|
||||
cwd + '/DRIVERS/INTC',
|
||||
cwd + '/DRIVERS/PM',
|
||||
cwd + '/DRIVERS/USART',
|
||||
]
|
||||
|
||||
group = DefineGroup('Startup', src, depend = [''], CPPPATH = CPPPATH)
|
||||
|
||||
Return('group')
|
||||
|
||||
@@ -1,63 +1,63 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief NEWLIB_ADDONS CPU include file for AVR32.
|
||||
*
|
||||
* - Compiler: GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __AVR32_NEWLIB_ADDONS_CPU_H__
|
||||
#define __AVR32_NEWLIB_ADDONS_CPU_H__
|
||||
|
||||
#include <_ansi.h>
|
||||
|
||||
_BEGIN_STD_C
|
||||
|
||||
#define CPU_HZ get_cpu_hz()
|
||||
|
||||
void udelay(unsigned long usec);
|
||||
void set_cpu_hz(unsigned int clk_hz);
|
||||
unsigned int get_cpu_hz();
|
||||
|
||||
_END_STD_C
|
||||
|
||||
#endif
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief NEWLIB_ADDONS CPU include file for AVR32.
|
||||
*
|
||||
* - Compiler: GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __AVR32_NEWLIB_ADDONS_CPU_H__
|
||||
#define __AVR32_NEWLIB_ADDONS_CPU_H__
|
||||
|
||||
#include <_ansi.h>
|
||||
|
||||
_BEGIN_STD_C
|
||||
|
||||
#define CPU_HZ get_cpu_hz()
|
||||
|
||||
void udelay(unsigned long usec);
|
||||
void set_cpu_hz(unsigned int clk_hz);
|
||||
unsigned int get_cpu_hz();
|
||||
|
||||
_END_STD_C
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,120 +1,120 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief NEWLIB_ADDONS exceptions include file for AVR32.
|
||||
*
|
||||
* - Compiler: GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __AVR32_NEWLIB_ADDONS_EXCEPTIONS_H__
|
||||
#define __AVR32_NEWLIB_ADDONS_EXCEPTIONS_H__
|
||||
|
||||
#include <_ansi.h>
|
||||
|
||||
_BEGIN_STD_C
|
||||
|
||||
/*
|
||||
Exception vector offsets
|
||||
*/
|
||||
#define EVBA_UNRECOVERABLE 0x000
|
||||
#define EVBA_TLB_MULTIPLE 0x004
|
||||
#define EVBA_BUS_ERROR_DATA 0x008
|
||||
#define EVBA_BUS_ERROR_INSTR 0x00C
|
||||
#define EVBA_NMI 0x010
|
||||
#define EVBA_INSTR_ADDR 0x014
|
||||
#define EVBA_ITLB_MISS 0x050
|
||||
#define EVBA_ITLB_PROT 0x018
|
||||
#define EVBA_BREAKPOINT 0x01C
|
||||
#define EVBA_ILLEGAL_OPCODE 0x020
|
||||
#define EVBA_UNIMPLEMENTED 0x024
|
||||
#define EVBA_PRIVILEGE_VIOL 0x028
|
||||
#define EVBA_FLOATING_POINT 0x02C
|
||||
#define EVBA_COP_ABSENT 0x030
|
||||
#define EVBA_SCALL 0x100
|
||||
#define EVBA_DATA_ADDR_R 0x034
|
||||
#define EVBA_DATA_ADDR_W 0x038
|
||||
#define EVBA_DTLB_MISS_R 0x060
|
||||
#define EVBA_DTLB_MISS_W 0x070
|
||||
#define EVBA_DTLB_PROT_R 0x03C
|
||||
#define EVBA_DTLB_PROT_W 0x040
|
||||
#define EVBA_DTLB_MODIFIED 0x044
|
||||
|
||||
|
||||
/*
|
||||
Define the form of the function used when registering exceptions.
|
||||
The function should return the address which the exception should
|
||||
return to after the exception processing.
|
||||
*/
|
||||
|
||||
typedef unsigned int (*__exception_handler)(int /*evba_offset*/, int /*return address*/);
|
||||
|
||||
/*
|
||||
Define the form of the function used when registering a scall handler.
|
||||
*/
|
||||
|
||||
typedef void (*__scall_handler)(int /*code*/, int /*p1*/, int /*p2*/
|
||||
, int /*p3*/, int /*p4*/);
|
||||
|
||||
/*
|
||||
Function for registering an exception handler for the exception with
|
||||
offset given by evba_offset.
|
||||
*/
|
||||
void _register_exception_handler(__exception_handler handler, int evba_offset);
|
||||
|
||||
/*
|
||||
Function for registering a scall handler which can be a arbirary
|
||||
function which uses r8-r12 for parameters.
|
||||
*/
|
||||
void _register_scall_handler(__scall_handler handler);
|
||||
|
||||
/*
|
||||
Initialize exceptions. Must be called before registering exception handlers
|
||||
and needed to enable exceptions. 'evba' is the pointer to the exception
|
||||
vector. 'handler_table' is a pointer to an array where the pointers to
|
||||
the exception handlers are stored. This array must be at least 0x104 bytes
|
||||
and word aligned.
|
||||
*/
|
||||
void init_exceptions(void *evba, void *handler_table);
|
||||
|
||||
_END_STD_C
|
||||
|
||||
#endif
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief NEWLIB_ADDONS exceptions include file for AVR32.
|
||||
*
|
||||
* - Compiler: GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __AVR32_NEWLIB_ADDONS_EXCEPTIONS_H__
|
||||
#define __AVR32_NEWLIB_ADDONS_EXCEPTIONS_H__
|
||||
|
||||
#include <_ansi.h>
|
||||
|
||||
_BEGIN_STD_C
|
||||
|
||||
/*
|
||||
Exception vector offsets
|
||||
*/
|
||||
#define EVBA_UNRECOVERABLE 0x000
|
||||
#define EVBA_TLB_MULTIPLE 0x004
|
||||
#define EVBA_BUS_ERROR_DATA 0x008
|
||||
#define EVBA_BUS_ERROR_INSTR 0x00C
|
||||
#define EVBA_NMI 0x010
|
||||
#define EVBA_INSTR_ADDR 0x014
|
||||
#define EVBA_ITLB_MISS 0x050
|
||||
#define EVBA_ITLB_PROT 0x018
|
||||
#define EVBA_BREAKPOINT 0x01C
|
||||
#define EVBA_ILLEGAL_OPCODE 0x020
|
||||
#define EVBA_UNIMPLEMENTED 0x024
|
||||
#define EVBA_PRIVILEGE_VIOL 0x028
|
||||
#define EVBA_FLOATING_POINT 0x02C
|
||||
#define EVBA_COP_ABSENT 0x030
|
||||
#define EVBA_SCALL 0x100
|
||||
#define EVBA_DATA_ADDR_R 0x034
|
||||
#define EVBA_DATA_ADDR_W 0x038
|
||||
#define EVBA_DTLB_MISS_R 0x060
|
||||
#define EVBA_DTLB_MISS_W 0x070
|
||||
#define EVBA_DTLB_PROT_R 0x03C
|
||||
#define EVBA_DTLB_PROT_W 0x040
|
||||
#define EVBA_DTLB_MODIFIED 0x044
|
||||
|
||||
|
||||
/*
|
||||
Define the form of the function used when registering exceptions.
|
||||
The function should return the address which the exception should
|
||||
return to after the exception processing.
|
||||
*/
|
||||
|
||||
typedef unsigned int (*__exception_handler)(int /*evba_offset*/, int /*return address*/);
|
||||
|
||||
/*
|
||||
Define the form of the function used when registering a scall handler.
|
||||
*/
|
||||
|
||||
typedef void (*__scall_handler)(int /*code*/, int /*p1*/, int /*p2*/
|
||||
, int /*p3*/, int /*p4*/);
|
||||
|
||||
/*
|
||||
Function for registering an exception handler for the exception with
|
||||
offset given by evba_offset.
|
||||
*/
|
||||
void _register_exception_handler(__exception_handler handler, int evba_offset);
|
||||
|
||||
/*
|
||||
Function for registering a scall handler which can be a arbirary
|
||||
function which uses r8-r12 for parameters.
|
||||
*/
|
||||
void _register_scall_handler(__scall_handler handler);
|
||||
|
||||
/*
|
||||
Initialize exceptions. Must be called before registering exception handlers
|
||||
and needed to enable exceptions. 'evba' is the pointer to the exception
|
||||
vector. 'handler_table' is a pointer to an array where the pointers to
|
||||
the exception handlers are stored. This array must be at least 0x104 bytes
|
||||
and word aligned.
|
||||
*/
|
||||
void init_exceptions(void *evba, void *handler_table);
|
||||
|
||||
_END_STD_C
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,82 +1,82 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief NEWLIB_ADDONS interrupts include file for AVR32.
|
||||
*
|
||||
* - Compiler: GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __AVR32_NEWLIB_ADDONS_INTERRUPTS_H__
|
||||
#define __AVR32_NEWLIB_ADDONS_INTERRUPTS_H__
|
||||
|
||||
#include <_ansi.h>
|
||||
|
||||
_BEGIN_STD_C
|
||||
|
||||
#define INT_GRPS 64
|
||||
#define INT_LINES 32
|
||||
#define INTPR_BASE (__intc_base__ + 0x0000)
|
||||
#define INTREQ_BASE (__intc_base__ + 64*4)
|
||||
#define INTCAUSE_BASE (__intc_base__ + 2*64*4)
|
||||
|
||||
//Register offsets
|
||||
#define INTLEVEL 30
|
||||
#define AUTOVECTOR 0
|
||||
#define AUTOVECTOR_BITS 14
|
||||
|
||||
//Priorities
|
||||
#define INT0 0
|
||||
#define INT1 1
|
||||
#define INT2 2
|
||||
#define INT3 3
|
||||
|
||||
|
||||
typedef void (*__newlib_int_handler)(int /* int_grp*/, void */*user_handle*/);
|
||||
|
||||
__newlib_int_handler register_interrupt(__newlib_int_handler handler, int int_grp, int line, int priority,
|
||||
.../* void *user_handle*/);
|
||||
void init_interrupts();
|
||||
void set_interrupts_base(void *base);
|
||||
|
||||
_END_STD_C
|
||||
|
||||
#endif
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief NEWLIB_ADDONS interrupts include file for AVR32.
|
||||
*
|
||||
* - Compiler: GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __AVR32_NEWLIB_ADDONS_INTERRUPTS_H__
|
||||
#define __AVR32_NEWLIB_ADDONS_INTERRUPTS_H__
|
||||
|
||||
#include <_ansi.h>
|
||||
|
||||
_BEGIN_STD_C
|
||||
|
||||
#define INT_GRPS 64
|
||||
#define INT_LINES 32
|
||||
#define INTPR_BASE (__intc_base__ + 0x0000)
|
||||
#define INTREQ_BASE (__intc_base__ + 64*4)
|
||||
#define INTCAUSE_BASE (__intc_base__ + 2*64*4)
|
||||
|
||||
//Register offsets
|
||||
#define INTLEVEL 30
|
||||
#define AUTOVECTOR 0
|
||||
#define AUTOVECTOR_BITS 14
|
||||
|
||||
//Priorities
|
||||
#define INT0 0
|
||||
#define INT1 1
|
||||
#define INT2 2
|
||||
#define INT3 3
|
||||
|
||||
|
||||
typedef void (*__newlib_int_handler)(int /* int_grp*/, void */*user_handle*/);
|
||||
|
||||
__newlib_int_handler register_interrupt(__newlib_int_handler handler, int int_grp, int line, int priority,
|
||||
.../* void *user_handle*/);
|
||||
void init_interrupts();
|
||||
void set_interrupts_base(void *base);
|
||||
|
||||
_END_STD_C
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,174 +1,174 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief NEWLIB_ADDONS miscellaneous macros include file for AVR32.
|
||||
*
|
||||
* - Compiler: GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __AVR32_NEWLIB_ADDONS_IO_H__
|
||||
#define __AVR32_NEWLIB_ADDONS_IO_H__
|
||||
|
||||
#include <_ansi.h>
|
||||
|
||||
_BEGIN_STD_C
|
||||
|
||||
typedef char u8;
|
||||
typedef unsigned int u32;
|
||||
|
||||
#define __raw_writeb(v,a) (*(volatile unsigned char *)(a) = (v))
|
||||
#define __raw_writew(v,a) (*(volatile unsigned short *)(a) = (v))
|
||||
#define __raw_writel(v,a) (*(volatile unsigned int *)(a) = (v))
|
||||
|
||||
#define __raw_readb(a) (*(volatile unsigned char *)(a))
|
||||
#define __raw_readw(a) (*(volatile unsigned short *)(a))
|
||||
#define __raw_readl(a) (*(volatile unsigned int *)(a))
|
||||
|
||||
/* As long as I/O is only performed in P4 (or possibly P3), we're safe */
|
||||
#define writeb(v,a) __raw_writeb(v,a)
|
||||
#define writew(v,a) __raw_writew(v,a)
|
||||
#define writel(v,a) __raw_writel(v,a)
|
||||
|
||||
#define readb(a) __raw_readb(a)
|
||||
#define readw(a) __raw_readw(a)
|
||||
#define readl(a) __raw_readl(a)
|
||||
|
||||
/* Memory segments when segmentation is enabled */
|
||||
#define P0SEG 0x00000000
|
||||
#define P1SEG 0x80000000
|
||||
#define P2SEG 0xa0000000
|
||||
#define P3SEG 0xc0000000
|
||||
#define P4SEG 0xe0000000
|
||||
|
||||
/* Returns the privileged segment base of a given address */
|
||||
#define PXSEG(a) (((unsigned long)(a)) & 0xe0000000)
|
||||
|
||||
/* Returns the physical address of a PnSEG (n=1,2) address */
|
||||
#define PHYSADDR(a) (((unsigned long)(a)) & 0x1fffffff)
|
||||
|
||||
/*
|
||||
* Map an address to a certain privileged segment
|
||||
*/
|
||||
#define P1SEGADDR(a) ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P1SEG))
|
||||
#define P2SEGADDR(a) ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P2SEG))
|
||||
#define P3SEGADDR(a) ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P3SEG))
|
||||
#define P4SEGADDR(a) ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P4SEG))
|
||||
|
||||
|
||||
#define cached(addr) P1SEGADDR(addr)
|
||||
#define uncached(addr) P2SEGADDR(addr)
|
||||
#define physaddr(addr) PHYSADDR(addr)
|
||||
|
||||
#define BF(field, value) \
|
||||
({ union { \
|
||||
struct { \
|
||||
unsigned : 32 - field ## _OFFSET - field ## _SIZE ; \
|
||||
unsigned long __val: field ## _SIZE ; \
|
||||
}; \
|
||||
unsigned long __ul; \
|
||||
} __tmp; \
|
||||
__tmp.__ul = 0; \
|
||||
__tmp.__val = value; \
|
||||
__tmp.__ul;})
|
||||
|
||||
#define BF_D(field, value) \
|
||||
({ union { \
|
||||
struct { \
|
||||
unsigned long long : 64 - field ## _OFFSET - field ## _SIZE ; \
|
||||
unsigned long long __val: field ## _SIZE ; \
|
||||
}; \
|
||||
unsigned long long __ul; \
|
||||
} __tmp; \
|
||||
__tmp.__ul = 0; \
|
||||
__tmp.__val = value; \
|
||||
__tmp.__ul;})
|
||||
|
||||
#define BFINS(var, field, value) \
|
||||
{ union {\
|
||||
struct { \
|
||||
unsigned : 32 - field ## _OFFSET - field ## _SIZE ; \
|
||||
unsigned long __val: field ## _SIZE ; \
|
||||
}; \
|
||||
unsigned long __ul; \
|
||||
} __tmp; \
|
||||
__tmp.__ul = var; \
|
||||
__tmp.__val = value; \
|
||||
var = __tmp.__ul;}
|
||||
|
||||
#define BFEXT(var, field) \
|
||||
({ union {\
|
||||
struct { \
|
||||
unsigned : 32 - field ## _OFFSET - field ## _SIZE ; \
|
||||
unsigned long __val: field ## _SIZE ; \
|
||||
}; \
|
||||
unsigned long __ul; \
|
||||
} __tmp; \
|
||||
__tmp.__ul = var; \
|
||||
__tmp.__val; })
|
||||
|
||||
#define BFINS_D(var, field, value) \
|
||||
{ union {\
|
||||
struct { \
|
||||
unsigned long long : 64 - field ## _OFFSET - field ## _SIZE ; \
|
||||
unsigned long long __val: field ## _SIZE ; \
|
||||
}; \
|
||||
unsigned long long __ul; \
|
||||
} __tmp; \
|
||||
__tmp.__ul = var; \
|
||||
__tmp.__val = value; \
|
||||
var = __tmp.__ul;}
|
||||
|
||||
#define BFEXT_D(var, field) \
|
||||
({ union {\
|
||||
struct { \
|
||||
unsigned long long : 64 - field ## _OFFSET - field ## _SIZE ; \
|
||||
unsigned long long __val: field ## _SIZE ; \
|
||||
}; \
|
||||
unsigned long long __ul; \
|
||||
} __tmp; \
|
||||
__tmp.__ul = var; \
|
||||
__tmp.__val; })
|
||||
|
||||
|
||||
_END_STD_C
|
||||
|
||||
#endif
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief NEWLIB_ADDONS miscellaneous macros include file for AVR32.
|
||||
*
|
||||
* - Compiler: GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __AVR32_NEWLIB_ADDONS_IO_H__
|
||||
#define __AVR32_NEWLIB_ADDONS_IO_H__
|
||||
|
||||
#include <_ansi.h>
|
||||
|
||||
_BEGIN_STD_C
|
||||
|
||||
typedef char u8;
|
||||
typedef unsigned int u32;
|
||||
|
||||
#define __raw_writeb(v,a) (*(volatile unsigned char *)(a) = (v))
|
||||
#define __raw_writew(v,a) (*(volatile unsigned short *)(a) = (v))
|
||||
#define __raw_writel(v,a) (*(volatile unsigned int *)(a) = (v))
|
||||
|
||||
#define __raw_readb(a) (*(volatile unsigned char *)(a))
|
||||
#define __raw_readw(a) (*(volatile unsigned short *)(a))
|
||||
#define __raw_readl(a) (*(volatile unsigned int *)(a))
|
||||
|
||||
/* As long as I/O is only performed in P4 (or possibly P3), we're safe */
|
||||
#define writeb(v,a) __raw_writeb(v,a)
|
||||
#define writew(v,a) __raw_writew(v,a)
|
||||
#define writel(v,a) __raw_writel(v,a)
|
||||
|
||||
#define readb(a) __raw_readb(a)
|
||||
#define readw(a) __raw_readw(a)
|
||||
#define readl(a) __raw_readl(a)
|
||||
|
||||
/* Memory segments when segmentation is enabled */
|
||||
#define P0SEG 0x00000000
|
||||
#define P1SEG 0x80000000
|
||||
#define P2SEG 0xa0000000
|
||||
#define P3SEG 0xc0000000
|
||||
#define P4SEG 0xe0000000
|
||||
|
||||
/* Returns the privileged segment base of a given address */
|
||||
#define PXSEG(a) (((unsigned long)(a)) & 0xe0000000)
|
||||
|
||||
/* Returns the physical address of a PnSEG (n=1,2) address */
|
||||
#define PHYSADDR(a) (((unsigned long)(a)) & 0x1fffffff)
|
||||
|
||||
/*
|
||||
* Map an address to a certain privileged segment
|
||||
*/
|
||||
#define P1SEGADDR(a) ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P1SEG))
|
||||
#define P2SEGADDR(a) ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P2SEG))
|
||||
#define P3SEGADDR(a) ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P3SEG))
|
||||
#define P4SEGADDR(a) ((__typeof__(a))(((unsigned long)(a) & 0x1fffffff) | P4SEG))
|
||||
|
||||
|
||||
#define cached(addr) P1SEGADDR(addr)
|
||||
#define uncached(addr) P2SEGADDR(addr)
|
||||
#define physaddr(addr) PHYSADDR(addr)
|
||||
|
||||
#define BF(field, value) \
|
||||
({ union { \
|
||||
struct { \
|
||||
unsigned : 32 - field ## _OFFSET - field ## _SIZE ; \
|
||||
unsigned long __val: field ## _SIZE ; \
|
||||
}; \
|
||||
unsigned long __ul; \
|
||||
} __tmp; \
|
||||
__tmp.__ul = 0; \
|
||||
__tmp.__val = value; \
|
||||
__tmp.__ul;})
|
||||
|
||||
#define BF_D(field, value) \
|
||||
({ union { \
|
||||
struct { \
|
||||
unsigned long long : 64 - field ## _OFFSET - field ## _SIZE ; \
|
||||
unsigned long long __val: field ## _SIZE ; \
|
||||
}; \
|
||||
unsigned long long __ul; \
|
||||
} __tmp; \
|
||||
__tmp.__ul = 0; \
|
||||
__tmp.__val = value; \
|
||||
__tmp.__ul;})
|
||||
|
||||
#define BFINS(var, field, value) \
|
||||
{ union {\
|
||||
struct { \
|
||||
unsigned : 32 - field ## _OFFSET - field ## _SIZE ; \
|
||||
unsigned long __val: field ## _SIZE ; \
|
||||
}; \
|
||||
unsigned long __ul; \
|
||||
} __tmp; \
|
||||
__tmp.__ul = var; \
|
||||
__tmp.__val = value; \
|
||||
var = __tmp.__ul;}
|
||||
|
||||
#define BFEXT(var, field) \
|
||||
({ union {\
|
||||
struct { \
|
||||
unsigned : 32 - field ## _OFFSET - field ## _SIZE ; \
|
||||
unsigned long __val: field ## _SIZE ; \
|
||||
}; \
|
||||
unsigned long __ul; \
|
||||
} __tmp; \
|
||||
__tmp.__ul = var; \
|
||||
__tmp.__val; })
|
||||
|
||||
#define BFINS_D(var, field, value) \
|
||||
{ union {\
|
||||
struct { \
|
||||
unsigned long long : 64 - field ## _OFFSET - field ## _SIZE ; \
|
||||
unsigned long long __val: field ## _SIZE ; \
|
||||
}; \
|
||||
unsigned long long __ul; \
|
||||
} __tmp; \
|
||||
__tmp.__ul = var; \
|
||||
__tmp.__val = value; \
|
||||
var = __tmp.__ul;}
|
||||
|
||||
#define BFEXT_D(var, field) \
|
||||
({ union {\
|
||||
struct { \
|
||||
unsigned long long : 64 - field ## _OFFSET - field ## _SIZE ; \
|
||||
unsigned long long __val: field ## _SIZE ; \
|
||||
}; \
|
||||
unsigned long long __ul; \
|
||||
} __tmp; \
|
||||
__tmp.__ul = var; \
|
||||
__tmp.__val; })
|
||||
|
||||
|
||||
_END_STD_C
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,208 +1,208 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief NEWLIB_ADDONS USART include file for AVR32.
|
||||
*
|
||||
* - Compiler: GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __AVR32_NEWLIB_ADDONS_USART_H__
|
||||
#define __AVR32_NEWLIB_ADDONS_USART_H__
|
||||
|
||||
#include <_ansi.h>
|
||||
|
||||
#include "nlao_io.h"
|
||||
|
||||
_BEGIN_STD_C
|
||||
|
||||
struct usart3 {
|
||||
volatile u32 us_cr;
|
||||
volatile u32 us_mr;
|
||||
volatile u32 us_ier;
|
||||
volatile u32 us_idr;
|
||||
volatile u32 us_imr;
|
||||
volatile u32 us_csr;
|
||||
volatile u32 us_rhr;
|
||||
volatile u32 us_thr;
|
||||
volatile u32 us_brgr;
|
||||
volatile u32 us_rtor;
|
||||
volatile u32 us_ttgr;
|
||||
volatile u32 us_reserved[5];
|
||||
volatile u32 us_fidi;
|
||||
volatile u32 us_ner;
|
||||
volatile u32 us_xxr;
|
||||
volatile u32 us_if;
|
||||
};
|
||||
|
||||
/* Register offsets */
|
||||
#define US_CR 0x0000
|
||||
#define US_MR 0x0004
|
||||
#define US_IER 0x0008
|
||||
#define US_IDR 0x000c
|
||||
#define US_IMR 0x0010
|
||||
#define US_CSR 0x0014
|
||||
#define US_RHR 0x0018
|
||||
#define US_THR 0x001c
|
||||
#define US_BRGR 0x0020
|
||||
#define US_RTOR 0x0024
|
||||
#define US_TTGR 0x0028
|
||||
|
||||
#define US_FIDI 0x0040
|
||||
#define US_NER 0x0044
|
||||
#define US_XXR 0x0048
|
||||
#define US_IF 0x004c
|
||||
|
||||
#define US_RPR 0x0100
|
||||
#define US_RCR 0x0104
|
||||
#define US_TPR 0x0108
|
||||
#define US_TCR 0x010c
|
||||
#define US_RNPR 0x0110
|
||||
#define US_RNCR 0x0114
|
||||
#define US_TNPR 0x0118
|
||||
#define US_TNCR 0x011c
|
||||
#define US_PTCR 0x0120
|
||||
#define US_PTSR 0x0124
|
||||
|
||||
|
||||
|
||||
|
||||
/* USART3 Control Register */
|
||||
#define US_CR_RSTRX (1 << 2)
|
||||
#define US_CR_RSTTX (1 << 3)
|
||||
#define US_CR_RXEN (1 << 4)
|
||||
#define US_CR_RXDIS (1 << 5)
|
||||
#define US_CR_TXEN (1 << 6)
|
||||
#define US_CR_TXDIS (1 << 7)
|
||||
#define US_CR_RSTSTA (1 << 8)
|
||||
#define US_CR_STTBRK (1 << 9)
|
||||
#define US_CR_STPBRK (1 << 10)
|
||||
|
||||
#define US_CR_DTREN (1 << 16)
|
||||
#define US_CR_DTRDIS (1 << 17)
|
||||
#define US_CR_RTSEN (1 << 18)
|
||||
#define US_CR_RTSDIS (1 << 19)
|
||||
|
||||
/* USART3 Mode Register */
|
||||
#define US_MR_MODE (15 << 0)
|
||||
#define US_MR_MODE_NORMAL ( 0 << 0)
|
||||
#define US_MR_MODE_HWFLOW ( 2 << 0)
|
||||
#define US_MR_CLKS ( 3 << 4)
|
||||
#define US_MR_CLKS_CLOCK ( 0 << 4)
|
||||
#define US_MR_CLKS_FDIV1 ( 1 << 4)
|
||||
#define US_MR_CLKS_SLOW ( 2 << 4)
|
||||
#define US_MR_CLKS_EXT ( 3 << 4)
|
||||
#define US_MR_CHRL_5BITS ( 0 << 6)
|
||||
#define US_MR_CHRL_6BITS ( 1 << 6)
|
||||
#define US_MR_CHRL_7BITS ( 2 << 6)
|
||||
#define US_MR_CHRL_8BITS ( 3 << 6)
|
||||
#define US_MR_SYNC ( 1 << 8)
|
||||
#define US_MR_PAR_EVEN ( 0 << 9)
|
||||
#define US_MR_PAR_ODD ( 1 << 9)
|
||||
#define US_MR_PAR_SPACE ( 2 << 9)
|
||||
#define US_MR_PAR_MARK ( 3 << 9)
|
||||
#define US_MR_PAR_NONE ( 4 << 9)
|
||||
#define US_MR_PAR_MDROP ( 6 << 9)
|
||||
#define US_MR_NBSTOP_1BIT ( 0 << 12)
|
||||
#define US_MR_NBSTOP_1_5BIT ( 1 << 12)
|
||||
#define US_MR_NBSTOP_2BITS ( 2 << 12)
|
||||
#define US_MR_OVER ( 1 << 19)
|
||||
#define US_MR_OVER_X16 ( 0 << 19)
|
||||
#define US_MR_OVER_X8 ( 1 << 19)
|
||||
|
||||
/* USART3 Channel Status Register */
|
||||
#define US_CSR_RXRDY (1 << 0)
|
||||
#define US_CSR_TXRDY (1 << 1)
|
||||
#define US_CSR_RXBRK (1 << 2)
|
||||
#define US_CSR_ENDRX (1 << 3)
|
||||
#define US_CSR_ENDTX (1 << 4)
|
||||
|
||||
|
||||
#define US_CSR_OVRE (1 << 5)
|
||||
#define US_CSR_FRAME (1 << 6)
|
||||
#define US_CSR_PARE (1 << 7)
|
||||
|
||||
#define US_CSR_TXEMPTY (1 << 9)
|
||||
|
||||
#define US_CSR_TXBUFE (1 << 11)
|
||||
#define US_CSR_RXBUFF (1 << 12)
|
||||
#define US_CSR_RIIC (1 << 16)
|
||||
#define US_CSR_DSRIC (1 << 17)
|
||||
#define US_CSR_DCDIC (1 << 18)
|
||||
#define US_CSR_CTSIC (1 << 19)
|
||||
#define US_CSR_RI (1 << 20)
|
||||
#define US_CSR_DSR (1 << 21)
|
||||
#define US_CSR_DCD (1 << 22)
|
||||
#define US_CSR_CTS (1 << 23)
|
||||
|
||||
/* USART3 Baud Rate Generator Register */
|
||||
#define US_BRGR_CD_OFFSET 0
|
||||
#define US_BRGR_FP_OFFSET 16
|
||||
|
||||
#define US_BRGR_CD_SIZE 16
|
||||
#define US_BRGR_FP_SIZE 3
|
||||
|
||||
#define US_BRGR_CD (0xFFFF << 0)
|
||||
#define US_BRGR_FP ( 7 << 16)
|
||||
|
||||
/*USART3 PDC Transfer Control Register */
|
||||
#define US_PTCR_RXTEN (1 << 0)
|
||||
#define US_PTCR_RXTDIS (1 << 1)
|
||||
#define US_PTCR_TXTEN (1 << 8)
|
||||
#define US_PTCR_TXTDIS (1 << 9)
|
||||
|
||||
/*USART3 PDC Transfer Status Register */
|
||||
#define US_PTSR_RXTEN (1 << 0)
|
||||
#define US_PTSR_TXTEN (1 << 8)
|
||||
|
||||
|
||||
int usart_init(int baudrate);
|
||||
void usart_putc(char c);
|
||||
void usart_puts(const char *s);
|
||||
int usart_getc(void);
|
||||
int usart_tstc(void);
|
||||
void usart_setbrg(int baudrate, int cpu_clock);
|
||||
void set_usart_base(void *usart_base);
|
||||
|
||||
|
||||
_END_STD_C
|
||||
|
||||
#endif /* MERLIN_USART3_H */
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief NEWLIB_ADDONS USART include file for AVR32.
|
||||
*
|
||||
* - Compiler: GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __AVR32_NEWLIB_ADDONS_USART_H__
|
||||
#define __AVR32_NEWLIB_ADDONS_USART_H__
|
||||
|
||||
#include <_ansi.h>
|
||||
|
||||
#include "nlao_io.h"
|
||||
|
||||
_BEGIN_STD_C
|
||||
|
||||
struct usart3 {
|
||||
volatile u32 us_cr;
|
||||
volatile u32 us_mr;
|
||||
volatile u32 us_ier;
|
||||
volatile u32 us_idr;
|
||||
volatile u32 us_imr;
|
||||
volatile u32 us_csr;
|
||||
volatile u32 us_rhr;
|
||||
volatile u32 us_thr;
|
||||
volatile u32 us_brgr;
|
||||
volatile u32 us_rtor;
|
||||
volatile u32 us_ttgr;
|
||||
volatile u32 us_reserved[5];
|
||||
volatile u32 us_fidi;
|
||||
volatile u32 us_ner;
|
||||
volatile u32 us_xxr;
|
||||
volatile u32 us_if;
|
||||
};
|
||||
|
||||
/* Register offsets */
|
||||
#define US_CR 0x0000
|
||||
#define US_MR 0x0004
|
||||
#define US_IER 0x0008
|
||||
#define US_IDR 0x000c
|
||||
#define US_IMR 0x0010
|
||||
#define US_CSR 0x0014
|
||||
#define US_RHR 0x0018
|
||||
#define US_THR 0x001c
|
||||
#define US_BRGR 0x0020
|
||||
#define US_RTOR 0x0024
|
||||
#define US_TTGR 0x0028
|
||||
|
||||
#define US_FIDI 0x0040
|
||||
#define US_NER 0x0044
|
||||
#define US_XXR 0x0048
|
||||
#define US_IF 0x004c
|
||||
|
||||
#define US_RPR 0x0100
|
||||
#define US_RCR 0x0104
|
||||
#define US_TPR 0x0108
|
||||
#define US_TCR 0x010c
|
||||
#define US_RNPR 0x0110
|
||||
#define US_RNCR 0x0114
|
||||
#define US_TNPR 0x0118
|
||||
#define US_TNCR 0x011c
|
||||
#define US_PTCR 0x0120
|
||||
#define US_PTSR 0x0124
|
||||
|
||||
|
||||
|
||||
|
||||
/* USART3 Control Register */
|
||||
#define US_CR_RSTRX (1 << 2)
|
||||
#define US_CR_RSTTX (1 << 3)
|
||||
#define US_CR_RXEN (1 << 4)
|
||||
#define US_CR_RXDIS (1 << 5)
|
||||
#define US_CR_TXEN (1 << 6)
|
||||
#define US_CR_TXDIS (1 << 7)
|
||||
#define US_CR_RSTSTA (1 << 8)
|
||||
#define US_CR_STTBRK (1 << 9)
|
||||
#define US_CR_STPBRK (1 << 10)
|
||||
|
||||
#define US_CR_DTREN (1 << 16)
|
||||
#define US_CR_DTRDIS (1 << 17)
|
||||
#define US_CR_RTSEN (1 << 18)
|
||||
#define US_CR_RTSDIS (1 << 19)
|
||||
|
||||
/* USART3 Mode Register */
|
||||
#define US_MR_MODE (15 << 0)
|
||||
#define US_MR_MODE_NORMAL ( 0 << 0)
|
||||
#define US_MR_MODE_HWFLOW ( 2 << 0)
|
||||
#define US_MR_CLKS ( 3 << 4)
|
||||
#define US_MR_CLKS_CLOCK ( 0 << 4)
|
||||
#define US_MR_CLKS_FDIV1 ( 1 << 4)
|
||||
#define US_MR_CLKS_SLOW ( 2 << 4)
|
||||
#define US_MR_CLKS_EXT ( 3 << 4)
|
||||
#define US_MR_CHRL_5BITS ( 0 << 6)
|
||||
#define US_MR_CHRL_6BITS ( 1 << 6)
|
||||
#define US_MR_CHRL_7BITS ( 2 << 6)
|
||||
#define US_MR_CHRL_8BITS ( 3 << 6)
|
||||
#define US_MR_SYNC ( 1 << 8)
|
||||
#define US_MR_PAR_EVEN ( 0 << 9)
|
||||
#define US_MR_PAR_ODD ( 1 << 9)
|
||||
#define US_MR_PAR_SPACE ( 2 << 9)
|
||||
#define US_MR_PAR_MARK ( 3 << 9)
|
||||
#define US_MR_PAR_NONE ( 4 << 9)
|
||||
#define US_MR_PAR_MDROP ( 6 << 9)
|
||||
#define US_MR_NBSTOP_1BIT ( 0 << 12)
|
||||
#define US_MR_NBSTOP_1_5BIT ( 1 << 12)
|
||||
#define US_MR_NBSTOP_2BITS ( 2 << 12)
|
||||
#define US_MR_OVER ( 1 << 19)
|
||||
#define US_MR_OVER_X16 ( 0 << 19)
|
||||
#define US_MR_OVER_X8 ( 1 << 19)
|
||||
|
||||
/* USART3 Channel Status Register */
|
||||
#define US_CSR_RXRDY (1 << 0)
|
||||
#define US_CSR_TXRDY (1 << 1)
|
||||
#define US_CSR_RXBRK (1 << 2)
|
||||
#define US_CSR_ENDRX (1 << 3)
|
||||
#define US_CSR_ENDTX (1 << 4)
|
||||
|
||||
|
||||
#define US_CSR_OVRE (1 << 5)
|
||||
#define US_CSR_FRAME (1 << 6)
|
||||
#define US_CSR_PARE (1 << 7)
|
||||
|
||||
#define US_CSR_TXEMPTY (1 << 9)
|
||||
|
||||
#define US_CSR_TXBUFE (1 << 11)
|
||||
#define US_CSR_RXBUFF (1 << 12)
|
||||
#define US_CSR_RIIC (1 << 16)
|
||||
#define US_CSR_DSRIC (1 << 17)
|
||||
#define US_CSR_DCDIC (1 << 18)
|
||||
#define US_CSR_CTSIC (1 << 19)
|
||||
#define US_CSR_RI (1 << 20)
|
||||
#define US_CSR_DSR (1 << 21)
|
||||
#define US_CSR_DCD (1 << 22)
|
||||
#define US_CSR_CTS (1 << 23)
|
||||
|
||||
/* USART3 Baud Rate Generator Register */
|
||||
#define US_BRGR_CD_OFFSET 0
|
||||
#define US_BRGR_FP_OFFSET 16
|
||||
|
||||
#define US_BRGR_CD_SIZE 16
|
||||
#define US_BRGR_FP_SIZE 3
|
||||
|
||||
#define US_BRGR_CD (0xFFFF << 0)
|
||||
#define US_BRGR_FP ( 7 << 16)
|
||||
|
||||
/*USART3 PDC Transfer Control Register */
|
||||
#define US_PTCR_RXTEN (1 << 0)
|
||||
#define US_PTCR_RXTDIS (1 << 1)
|
||||
#define US_PTCR_TXTEN (1 << 8)
|
||||
#define US_PTCR_TXTDIS (1 << 9)
|
||||
|
||||
/*USART3 PDC Transfer Status Register */
|
||||
#define US_PTSR_RXTEN (1 << 0)
|
||||
#define US_PTSR_TXTEN (1 << 8)
|
||||
|
||||
|
||||
int usart_init(int baudrate);
|
||||
void usart_putc(char c);
|
||||
void usart_puts(const char *s);
|
||||
int usart_getc(void);
|
||||
int usart_tstc(void);
|
||||
void usart_setbrg(int baudrate, int cpu_clock);
|
||||
void set_usart_base(void *usart_base);
|
||||
|
||||
|
||||
_END_STD_C
|
||||
|
||||
#endif /* MERLIN_USART3_H */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,55 +1,55 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief Preprocessor utils.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices can be used.
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _PREPROCESSOR_H_
|
||||
#define _PREPROCESSOR_H_
|
||||
|
||||
#include "tpaste.h"
|
||||
#include "stringz.h"
|
||||
#include "mrepeat.h"
|
||||
|
||||
|
||||
#endif // _PREPROCESSOR_H_
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief Preprocessor utils.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices can be used.
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _PREPROCESSOR_H_
|
||||
#define _PREPROCESSOR_H_
|
||||
|
||||
#include "tpaste.h"
|
||||
#include "stringz.h"
|
||||
#include "mrepeat.h"
|
||||
|
||||
|
||||
#endif // _PREPROCESSOR_H_
|
||||
|
||||
@@ -1,75 +1,75 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief Preprocessor stringizing utils.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices can be used.
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _STRINGZ_H_
|
||||
#define _STRINGZ_H_
|
||||
|
||||
|
||||
/*! \brief Stringize.
|
||||
*
|
||||
* Stringize a preprocessing token, this token being allowed to be \#defined.
|
||||
*
|
||||
* May be used only within macros with the token passed as an argument if the token is \#defined.
|
||||
*
|
||||
* For example, writing STRINGZ(PIN) within a macro \#defined by PIN_NAME(PIN)
|
||||
* and invoked as PIN_NAME(PIN0) with PIN0 \#defined as A0 is equivalent to
|
||||
* writing "A0".
|
||||
*/
|
||||
#define STRINGZ(x) #x
|
||||
|
||||
/*! \brief Absolute stringize.
|
||||
*
|
||||
* Stringize a preprocessing token, this token being allowed to be \#defined.
|
||||
*
|
||||
* No restriction of use if the token is \#defined.
|
||||
*
|
||||
* For example, writing ASTRINGZ(PIN0) anywhere with PIN0 \#defined as A0 is
|
||||
* equivalent to writing "A0".
|
||||
*/
|
||||
#define ASTRINGZ(x) STRINGZ(x)
|
||||
|
||||
|
||||
#endif // _STRINGZ_H_
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief Preprocessor stringizing utils.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices can be used.
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _STRINGZ_H_
|
||||
#define _STRINGZ_H_
|
||||
|
||||
|
||||
/*! \brief Stringize.
|
||||
*
|
||||
* Stringize a preprocessing token, this token being allowed to be \#defined.
|
||||
*
|
||||
* May be used only within macros with the token passed as an argument if the token is \#defined.
|
||||
*
|
||||
* For example, writing STRINGZ(PIN) within a macro \#defined by PIN_NAME(PIN)
|
||||
* and invoked as PIN_NAME(PIN0) with PIN0 \#defined as A0 is equivalent to
|
||||
* writing "A0".
|
||||
*/
|
||||
#define STRINGZ(x) #x
|
||||
|
||||
/*! \brief Absolute stringize.
|
||||
*
|
||||
* Stringize a preprocessing token, this token being allowed to be \#defined.
|
||||
*
|
||||
* No restriction of use if the token is \#defined.
|
||||
*
|
||||
* For example, writing ASTRINGZ(PIN0) anywhere with PIN0 \#defined as A0 is
|
||||
* equivalent to writing "A0".
|
||||
*/
|
||||
#define ASTRINGZ(x) STRINGZ(x)
|
||||
|
||||
|
||||
#endif // _STRINGZ_H_
|
||||
|
||||
@@ -1,95 +1,95 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief Preprocessor token pasting utils.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices can be used.
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _TPASTE_H_
|
||||
#define _TPASTE_H_
|
||||
|
||||
|
||||
/*! \name Token Paste
|
||||
*
|
||||
* Paste N preprocessing tokens together, these tokens being allowed to be \#defined.
|
||||
*
|
||||
* May be used only within macros with the tokens passed as arguments if the tokens are \#defined.
|
||||
*
|
||||
* For example, writing TPASTE2(U, WIDTH) within a macro \#defined by
|
||||
* UTYPE(WIDTH) and invoked as UTYPE(UL_WIDTH) with UL_WIDTH \#defined as 32 is
|
||||
* equivalent to writing U32.
|
||||
*/
|
||||
//! @{
|
||||
#define TPASTE2( a, b) a##b
|
||||
#define TPASTE3( a, b, c) a##b##c
|
||||
#define TPASTE4( a, b, c, d) a##b##c##d
|
||||
#define TPASTE5( a, b, c, d, e) a##b##c##d##e
|
||||
#define TPASTE6( a, b, c, d, e, f) a##b##c##d##e##f
|
||||
#define TPASTE7( a, b, c, d, e, f, g) a##b##c##d##e##f##g
|
||||
#define TPASTE8( a, b, c, d, e, f, g, h) a##b##c##d##e##f##g##h
|
||||
#define TPASTE9( a, b, c, d, e, f, g, h, i) a##b##c##d##e##f##g##h##i
|
||||
#define TPASTE10(a, b, c, d, e, f, g, h, i, j) a##b##c##d##e##f##g##h##i##j
|
||||
//! @}
|
||||
|
||||
/*! \name Absolute Token Paste
|
||||
*
|
||||
* Paste N preprocessing tokens together, these tokens being allowed to be \#defined.
|
||||
*
|
||||
* No restriction of use if the tokens are \#defined.
|
||||
*
|
||||
* For example, writing ATPASTE2(U, UL_WIDTH) anywhere with UL_WIDTH \#defined
|
||||
* as 32 is equivalent to writing U32.
|
||||
*/
|
||||
//! @{
|
||||
#define ATPASTE2( a, b) TPASTE2( a, b)
|
||||
#define ATPASTE3( a, b, c) TPASTE3( a, b, c)
|
||||
#define ATPASTE4( a, b, c, d) TPASTE4( a, b, c, d)
|
||||
#define ATPASTE5( a, b, c, d, e) TPASTE5( a, b, c, d, e)
|
||||
#define ATPASTE6( a, b, c, d, e, f) TPASTE6( a, b, c, d, e, f)
|
||||
#define ATPASTE7( a, b, c, d, e, f, g) TPASTE7( a, b, c, d, e, f, g)
|
||||
#define ATPASTE8( a, b, c, d, e, f, g, h) TPASTE8( a, b, c, d, e, f, g, h)
|
||||
#define ATPASTE9( a, b, c, d, e, f, g, h, i) TPASTE9( a, b, c, d, e, f, g, h, i)
|
||||
#define ATPASTE10(a, b, c, d, e, f, g, h, i, j) TPASTE10(a, b, c, d, e, f, g, h, i, j)
|
||||
//! @}
|
||||
|
||||
|
||||
#endif // _TPASTE_H_
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief Preprocessor token pasting utils.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices can be used.
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _TPASTE_H_
|
||||
#define _TPASTE_H_
|
||||
|
||||
|
||||
/*! \name Token Paste
|
||||
*
|
||||
* Paste N preprocessing tokens together, these tokens being allowed to be \#defined.
|
||||
*
|
||||
* May be used only within macros with the tokens passed as arguments if the tokens are \#defined.
|
||||
*
|
||||
* For example, writing TPASTE2(U, WIDTH) within a macro \#defined by
|
||||
* UTYPE(WIDTH) and invoked as UTYPE(UL_WIDTH) with UL_WIDTH \#defined as 32 is
|
||||
* equivalent to writing U32.
|
||||
*/
|
||||
//! @{
|
||||
#define TPASTE2( a, b) a##b
|
||||
#define TPASTE3( a, b, c) a##b##c
|
||||
#define TPASTE4( a, b, c, d) a##b##c##d
|
||||
#define TPASTE5( a, b, c, d, e) a##b##c##d##e
|
||||
#define TPASTE6( a, b, c, d, e, f) a##b##c##d##e##f
|
||||
#define TPASTE7( a, b, c, d, e, f, g) a##b##c##d##e##f##g
|
||||
#define TPASTE8( a, b, c, d, e, f, g, h) a##b##c##d##e##f##g##h
|
||||
#define TPASTE9( a, b, c, d, e, f, g, h, i) a##b##c##d##e##f##g##h##i
|
||||
#define TPASTE10(a, b, c, d, e, f, g, h, i, j) a##b##c##d##e##f##g##h##i##j
|
||||
//! @}
|
||||
|
||||
/*! \name Absolute Token Paste
|
||||
*
|
||||
* Paste N preprocessing tokens together, these tokens being allowed to be \#defined.
|
||||
*
|
||||
* No restriction of use if the tokens are \#defined.
|
||||
*
|
||||
* For example, writing ATPASTE2(U, UL_WIDTH) anywhere with UL_WIDTH \#defined
|
||||
* as 32 is equivalent to writing U32.
|
||||
*/
|
||||
//! @{
|
||||
#define ATPASTE2( a, b) TPASTE2( a, b)
|
||||
#define ATPASTE3( a, b, c) TPASTE3( a, b, c)
|
||||
#define ATPASTE4( a, b, c, d) TPASTE4( a, b, c, d)
|
||||
#define ATPASTE5( a, b, c, d, e) TPASTE5( a, b, c, d, e)
|
||||
#define ATPASTE6( a, b, c, d, e, f) TPASTE6( a, b, c, d, e, f)
|
||||
#define ATPASTE7( a, b, c, d, e, f, g) TPASTE7( a, b, c, d, e, f, g)
|
||||
#define ATPASTE8( a, b, c, d, e, f, g, h) TPASTE8( a, b, c, d, e, f, g, h)
|
||||
#define ATPASTE9( a, b, c, d, e, f, g, h, i) TPASTE9( a, b, c, d, e, f, g, h, i)
|
||||
#define ATPASTE10(a, b, c, d, e, f, g, h, i, j) TPASTE10(a, b, c, d, e, f, g, h, i, j)
|
||||
//! @}
|
||||
|
||||
|
||||
#endif // _TPASTE_H_
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,203 +1,203 @@
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
/* This header file is part of the ATMEL AVR-UC3-SoftwareFramework-1.7.0 Release */
|
||||
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief Arch file for AVR32.
|
||||
*
|
||||
* This file defines common AVR32 UC3 series.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _ARCH_H_
|
||||
#define _ARCH_H_
|
||||
|
||||
// UC3 A Series
|
||||
#define UC3A0 ( defined (__GNUC__) && \
|
||||
( defined (__AVR32_UC3A0128__) || \
|
||||
defined (__AVR32_UC3A0256__) || \
|
||||
defined (__AVR32_UC3A0512__) || \
|
||||
defined (__AVR32_UC3A0512ES__))) \
|
||||
||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
|
||||
( defined (__AT32UC3A0128__) || \
|
||||
defined (__AT32UC3A0256__) || \
|
||||
defined (__AT32UC3A0512__) || \
|
||||
defined (__AT32UC3A0512ES__)))
|
||||
|
||||
#define UC3A1 ( defined (__GNUC__) && \
|
||||
( defined (__AVR32_UC3A1128__) || \
|
||||
defined (__AVR32_UC3A1256__) || \
|
||||
defined (__AVR32_UC3A1512__) || \
|
||||
defined (__AVR32_UC3A1512ES__))) \
|
||||
||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
|
||||
( defined (__AT32UC3A1128__) || \
|
||||
defined (__AT32UC3A1256__) || \
|
||||
defined (__AT32UC3A1512__) || \
|
||||
defined (__AT32UC3A1512ES__)))
|
||||
|
||||
#define UC3A3 ( defined (__GNUC__) && \
|
||||
( defined (__AVR32_UC3A364__) || \
|
||||
defined (__AVR32_UC3A364S__) || \
|
||||
defined (__AVR32_UC3A3128__) || \
|
||||
defined (__AVR32_UC3A3128S__) || \
|
||||
defined (__AVR32_UC3A3256__) || \
|
||||
defined (__AVR32_UC3A3256S__))) \
|
||||
||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
|
||||
( defined (__AT32UC3A364__) || \
|
||||
defined (__AT32UC3A364S__) || \
|
||||
defined (__AT32UC3A3128__) || \
|
||||
defined (__AT32UC3A3128S__) || \
|
||||
defined (__AT32UC3A3256__) || \
|
||||
defined (__AT32UC3A3256S__)))
|
||||
|
||||
#define UC3A (UC3A0 || UC3A1 || UC3A3)
|
||||
|
||||
// UC3 B Series
|
||||
#define UC3B0 ( defined (__GNUC__) && \
|
||||
( defined (__AVR32_UC3B064__) || \
|
||||
defined (__AVR32_UC3B0128__) || \
|
||||
defined (__AVR32_UC3B0256__) || \
|
||||
defined (__AVR32_UC3B0256ES__) || \
|
||||
defined (__AVR32_UC3B0512__) || \
|
||||
defined (__AVR32_UC3B0512REVC_))) \
|
||||
||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
|
||||
( defined (__AT32UC3B064__) || \
|
||||
defined (__AT32UC3B0128__) || \
|
||||
defined (__AT32UC3B0256__) || \
|
||||
defined (__AT32UC3B0256ES__) || \
|
||||
defined (__AT32UC3B0512__) || \
|
||||
defined (__AT32UC3B0512REVC__)))
|
||||
|
||||
#define UC3B1 ( defined (__GNUC__) && \
|
||||
( defined (__AVR32_UC3B164__) || \
|
||||
defined (__AVR32_UC3B1128__) || \
|
||||
defined (__AVR32_UC3B1256__) || \
|
||||
defined (__AVR32_UC3B1256ES__) || \
|
||||
defined (__AVR32_UC3B1512__) || \
|
||||
defined (__AVR32_UC3B1512ES__))) \
|
||||
||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
|
||||
( defined (__AT32UC3B164__) || \
|
||||
defined (__AT32UC3B1128__) || \
|
||||
defined (__AT32UC3B1256__) || \
|
||||
defined (__AT32UC3B1256ES__) || \
|
||||
defined (__AT32UC3B1512__) || \
|
||||
defined (__AT32UC3B1512REVC__)))
|
||||
|
||||
#define UC3B (UC3B0 || UC3B1 )
|
||||
|
||||
// UC3 C Series
|
||||
#define UC3C0 ( defined (__GNUC__) && \
|
||||
( defined (__AVR32_UC3C064C__) || \
|
||||
defined (__AVR32_UC3C0128C__) || \
|
||||
defined (__AVR32_UC3C0256C__) || \
|
||||
defined (__AVR32_UC3C0512CREVC__))) \
|
||||
||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
|
||||
( defined (__AT32UC3C064C__) || \
|
||||
defined (__AT32UC3C0128C__) || \
|
||||
defined (__AT32UC3C0256C__) || \
|
||||
defined (__AT32UC3C0512C__)))
|
||||
|
||||
#define UC3C1 ( defined (__GNUC__) && \
|
||||
( defined (__AVR32_UC3C164C__) || \
|
||||
defined (__AVR32_UC3C1128C__) || \
|
||||
defined (__AVR32_UC3C1256C__) || \
|
||||
defined (__AVR32_UC3C1512CREVC__))) \
|
||||
||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
|
||||
( defined (__AT32UC3C164C__) || \
|
||||
defined (__AT32UC3C1128C__) || \
|
||||
defined (__AT32UC3C1256C__) || \
|
||||
defined (__AT32UC3C1512C__)))
|
||||
|
||||
#define UC3C2 ( defined (__GNUC__) && \
|
||||
( defined (__AVR32_UC3C264C__) || \
|
||||
defined (__AVR32_UC3C2128C__) || \
|
||||
defined (__AVR32_UC3C2256C__) || \
|
||||
defined (__AVR32_UC3C2512CREVC__))) \
|
||||
||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
|
||||
( defined (__AT32UC3C264C__) || \
|
||||
defined (__AT32UC3C2128C__) || \
|
||||
defined (__AT32UC3C2256C__) || \
|
||||
defined (__AT32UC3C2512C__)))
|
||||
|
||||
#define UC3C (UC3C0 || UC3C1 || UC3C2)
|
||||
|
||||
// UC3 L Device series
|
||||
#define UC3L0 ( defined (__GNUC__) && \
|
||||
( defined (__AVR32_UC3L016__) || \
|
||||
defined (__AVR32_UC3L032__) || \
|
||||
defined (__AVR32_UC3L064__) || \
|
||||
defined (__AVR32_UC3L064REVB__))) \
|
||||
||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
|
||||
( defined (__AT32UC3L016__) || \
|
||||
defined (__AT32UC3L032__) || \
|
||||
defined (__AT32UC3L064__) || \
|
||||
defined (__AT32UC3L064REVB__)))
|
||||
|
||||
#define UC3L1 ( defined (__GNUC__) && \
|
||||
( defined (__AVR32_UC3L116__) || \
|
||||
defined (__AVR32_UC3L132__) || \
|
||||
defined (__AVR32_UC3L164__))) \
|
||||
||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
|
||||
( defined (__AT32UC3L116__) || \
|
||||
defined (__AT32UC3L132__) || \
|
||||
defined (__AT32UC3L164__)))
|
||||
|
||||
#define UC3L2 ( defined (__GNUC__) && \
|
||||
( defined (__AVR32_UC3L216__) || \
|
||||
defined (__AVR32_UC3L232__) || \
|
||||
defined (__AVR32_UC3L264__))) \
|
||||
||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
|
||||
( defined (__AT32UC3L216__) || \
|
||||
defined (__AT32UC3L232__) || \
|
||||
defined (__AT32UC3L264__)))
|
||||
|
||||
#define UC3L3 ( defined (__GNUC__) && \
|
||||
( defined (__AVR32_UC3L316__) || \
|
||||
defined (__AVR32_UC3L332__) || \
|
||||
defined (__AVR32_UC3L364__))) \
|
||||
||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
|
||||
( defined (__AT32UC3L316__) || \
|
||||
defined (__AT32UC3L332__) || \
|
||||
defined (__AT32UC3L364__)))
|
||||
|
||||
#define UC3L (UC3L0 || UC3L1 || UC3L2 || UC3L3)
|
||||
|
||||
#endif // _ARCH_H_
|
||||
/*This file is prepared for Doxygen automatic documentation generation.*/
|
||||
/*! \file *********************************************************************
|
||||
*
|
||||
* \brief Arch file for AVR32.
|
||||
*
|
||||
* This file defines common AVR32 UC3 series.
|
||||
*
|
||||
* - Compiler: IAR EWAVR32 and GNU GCC for AVR32
|
||||
* - Supported devices: All AVR32 devices can be used.
|
||||
* - AppNote:
|
||||
*
|
||||
* \author Atmel Corporation: http://www.atmel.com \n
|
||||
* Support and FAQ: http://support.atmel.no/
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
/* Copyright (c) 2009 Atmel Corporation. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. The name of Atmel may not be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* 4. This software may only be redistributed and used in connection with an Atmel
|
||||
* AVR product.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
* EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR
|
||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _ARCH_H_
|
||||
#define _ARCH_H_
|
||||
|
||||
// UC3 A Series
|
||||
#define UC3A0 ( defined (__GNUC__) && \
|
||||
( defined (__AVR32_UC3A0128__) || \
|
||||
defined (__AVR32_UC3A0256__) || \
|
||||
defined (__AVR32_UC3A0512__) || \
|
||||
defined (__AVR32_UC3A0512ES__))) \
|
||||
||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
|
||||
( defined (__AT32UC3A0128__) || \
|
||||
defined (__AT32UC3A0256__) || \
|
||||
defined (__AT32UC3A0512__) || \
|
||||
defined (__AT32UC3A0512ES__)))
|
||||
|
||||
#define UC3A1 ( defined (__GNUC__) && \
|
||||
( defined (__AVR32_UC3A1128__) || \
|
||||
defined (__AVR32_UC3A1256__) || \
|
||||
defined (__AVR32_UC3A1512__) || \
|
||||
defined (__AVR32_UC3A1512ES__))) \
|
||||
||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
|
||||
( defined (__AT32UC3A1128__) || \
|
||||
defined (__AT32UC3A1256__) || \
|
||||
defined (__AT32UC3A1512__) || \
|
||||
defined (__AT32UC3A1512ES__)))
|
||||
|
||||
#define UC3A3 ( defined (__GNUC__) && \
|
||||
( defined (__AVR32_UC3A364__) || \
|
||||
defined (__AVR32_UC3A364S__) || \
|
||||
defined (__AVR32_UC3A3128__) || \
|
||||
defined (__AVR32_UC3A3128S__) || \
|
||||
defined (__AVR32_UC3A3256__) || \
|
||||
defined (__AVR32_UC3A3256S__))) \
|
||||
||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
|
||||
( defined (__AT32UC3A364__) || \
|
||||
defined (__AT32UC3A364S__) || \
|
||||
defined (__AT32UC3A3128__) || \
|
||||
defined (__AT32UC3A3128S__) || \
|
||||
defined (__AT32UC3A3256__) || \
|
||||
defined (__AT32UC3A3256S__)))
|
||||
|
||||
#define UC3A (UC3A0 || UC3A1 || UC3A3)
|
||||
|
||||
// UC3 B Series
|
||||
#define UC3B0 ( defined (__GNUC__) && \
|
||||
( defined (__AVR32_UC3B064__) || \
|
||||
defined (__AVR32_UC3B0128__) || \
|
||||
defined (__AVR32_UC3B0256__) || \
|
||||
defined (__AVR32_UC3B0256ES__) || \
|
||||
defined (__AVR32_UC3B0512__) || \
|
||||
defined (__AVR32_UC3B0512REVC_))) \
|
||||
||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
|
||||
( defined (__AT32UC3B064__) || \
|
||||
defined (__AT32UC3B0128__) || \
|
||||
defined (__AT32UC3B0256__) || \
|
||||
defined (__AT32UC3B0256ES__) || \
|
||||
defined (__AT32UC3B0512__) || \
|
||||
defined (__AT32UC3B0512REVC__)))
|
||||
|
||||
#define UC3B1 ( defined (__GNUC__) && \
|
||||
( defined (__AVR32_UC3B164__) || \
|
||||
defined (__AVR32_UC3B1128__) || \
|
||||
defined (__AVR32_UC3B1256__) || \
|
||||
defined (__AVR32_UC3B1256ES__) || \
|
||||
defined (__AVR32_UC3B1512__) || \
|
||||
defined (__AVR32_UC3B1512ES__))) \
|
||||
||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
|
||||
( defined (__AT32UC3B164__) || \
|
||||
defined (__AT32UC3B1128__) || \
|
||||
defined (__AT32UC3B1256__) || \
|
||||
defined (__AT32UC3B1256ES__) || \
|
||||
defined (__AT32UC3B1512__) || \
|
||||
defined (__AT32UC3B1512REVC__)))
|
||||
|
||||
#define UC3B (UC3B0 || UC3B1 )
|
||||
|
||||
// UC3 C Series
|
||||
#define UC3C0 ( defined (__GNUC__) && \
|
||||
( defined (__AVR32_UC3C064C__) || \
|
||||
defined (__AVR32_UC3C0128C__) || \
|
||||
defined (__AVR32_UC3C0256C__) || \
|
||||
defined (__AVR32_UC3C0512CREVC__))) \
|
||||
||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
|
||||
( defined (__AT32UC3C064C__) || \
|
||||
defined (__AT32UC3C0128C__) || \
|
||||
defined (__AT32UC3C0256C__) || \
|
||||
defined (__AT32UC3C0512C__)))
|
||||
|
||||
#define UC3C1 ( defined (__GNUC__) && \
|
||||
( defined (__AVR32_UC3C164C__) || \
|
||||
defined (__AVR32_UC3C1128C__) || \
|
||||
defined (__AVR32_UC3C1256C__) || \
|
||||
defined (__AVR32_UC3C1512CREVC__))) \
|
||||
||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
|
||||
( defined (__AT32UC3C164C__) || \
|
||||
defined (__AT32UC3C1128C__) || \
|
||||
defined (__AT32UC3C1256C__) || \
|
||||
defined (__AT32UC3C1512C__)))
|
||||
|
||||
#define UC3C2 ( defined (__GNUC__) && \
|
||||
( defined (__AVR32_UC3C264C__) || \
|
||||
defined (__AVR32_UC3C2128C__) || \
|
||||
defined (__AVR32_UC3C2256C__) || \
|
||||
defined (__AVR32_UC3C2512CREVC__))) \
|
||||
||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
|
||||
( defined (__AT32UC3C264C__) || \
|
||||
defined (__AT32UC3C2128C__) || \
|
||||
defined (__AT32UC3C2256C__) || \
|
||||
defined (__AT32UC3C2512C__)))
|
||||
|
||||
#define UC3C (UC3C0 || UC3C1 || UC3C2)
|
||||
|
||||
// UC3 L Device series
|
||||
#define UC3L0 ( defined (__GNUC__) && \
|
||||
( defined (__AVR32_UC3L016__) || \
|
||||
defined (__AVR32_UC3L032__) || \
|
||||
defined (__AVR32_UC3L064__) || \
|
||||
defined (__AVR32_UC3L064REVB__))) \
|
||||
||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
|
||||
( defined (__AT32UC3L016__) || \
|
||||
defined (__AT32UC3L032__) || \
|
||||
defined (__AT32UC3L064__) || \
|
||||
defined (__AT32UC3L064REVB__)))
|
||||
|
||||
#define UC3L1 ( defined (__GNUC__) && \
|
||||
( defined (__AVR32_UC3L116__) || \
|
||||
defined (__AVR32_UC3L132__) || \
|
||||
defined (__AVR32_UC3L164__))) \
|
||||
||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
|
||||
( defined (__AT32UC3L116__) || \
|
||||
defined (__AT32UC3L132__) || \
|
||||
defined (__AT32UC3L164__)))
|
||||
|
||||
#define UC3L2 ( defined (__GNUC__) && \
|
||||
( defined (__AVR32_UC3L216__) || \
|
||||
defined (__AVR32_UC3L232__) || \
|
||||
defined (__AVR32_UC3L264__))) \
|
||||
||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
|
||||
( defined (__AT32UC3L216__) || \
|
||||
defined (__AT32UC3L232__) || \
|
||||
defined (__AT32UC3L264__)))
|
||||
|
||||
#define UC3L3 ( defined (__GNUC__) && \
|
||||
( defined (__AVR32_UC3L316__) || \
|
||||
defined (__AVR32_UC3L332__) || \
|
||||
defined (__AVR32_UC3L364__))) \
|
||||
||((defined(__ICCAVR32__) || defined(__AAVR32__)) && \
|
||||
( defined (__AT32UC3L316__) || \
|
||||
defined (__AT32UC3L332__) || \
|
||||
defined (__AT32UC3L364__)))
|
||||
|
||||
#define UC3L (UC3L0 || UC3L1 || UC3L2 || UC3L3)
|
||||
|
||||
#endif // _ARCH_H_
|
||||
|
||||
@@ -1,76 +1,76 @@
|
||||
/*
|
||||
* File : application.c
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2010, RT-Thread Development Team
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rt-thread.org/license/LICENSE
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2010-03-30 Kyle First version
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#include "compiler.h"
|
||||
#include "gpio.h"
|
||||
|
||||
char thread_led1_stack[1024];
|
||||
struct rt_thread thread_led1;
|
||||
static void rt_thread_entry_led1(void* parameter)
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
/* led on */
|
||||
rt_kprintf("LED1 on\r\n");
|
||||
gpio_tgl_gpio_pin(AVR32_PIN_PA08);
|
||||
rt_thread_delay(RT_TICK_PER_SECOND / 2); /* sleep 0.5 second and switch to other thread */
|
||||
|
||||
/* led off */
|
||||
rt_kprintf("LED1 off\r\n");
|
||||
gpio_tgl_gpio_pin(AVR32_PIN_PA08);
|
||||
rt_thread_delay(RT_TICK_PER_SECOND / 2);
|
||||
}
|
||||
}
|
||||
|
||||
char thread_led2_stack[1024];
|
||||
struct rt_thread thread_led2;
|
||||
void rt_thread_entry_led2(void* parameter)
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
/* led on */
|
||||
rt_kprintf("LED2 on");
|
||||
gpio_tgl_gpio_pin(AVR32_PIN_PA07);
|
||||
rt_thread_delay(RT_TICK_PER_SECOND);
|
||||
|
||||
/* led off */
|
||||
rt_kprintf("LED2 off\r\n");
|
||||
gpio_tgl_gpio_pin(AVR32_PIN_PA07);
|
||||
rt_thread_delay(RT_TICK_PER_SECOND);
|
||||
}
|
||||
}
|
||||
|
||||
int rt_application_init()
|
||||
{
|
||||
/* create led1 thread */
|
||||
rt_thread_init(&thread_led1,
|
||||
"led1",
|
||||
rt_thread_entry_led1,
|
||||
RT_NULL,
|
||||
&thread_led1_stack[0],
|
||||
sizeof(thread_led1_stack), 5, 5);
|
||||
rt_thread_startup(&thread_led1);
|
||||
|
||||
//------- init led2 thread
|
||||
rt_thread_init(&thread_led2,
|
||||
"led2",
|
||||
rt_thread_entry_led2,
|
||||
RT_NULL,
|
||||
&thread_led2_stack[0],
|
||||
sizeof(thread_led2_stack),5,10);
|
||||
rt_thread_startup(&thread_led2);
|
||||
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
* File : application.c
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2010, RT-Thread Development Team
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rt-thread.org/license/LICENSE
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2010-03-30 Kyle First version
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#include "compiler.h"
|
||||
#include "gpio.h"
|
||||
|
||||
char thread_led1_stack[1024];
|
||||
struct rt_thread thread_led1;
|
||||
static void rt_thread_entry_led1(void* parameter)
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
/* led on */
|
||||
rt_kprintf("LED1 on\r\n");
|
||||
gpio_tgl_gpio_pin(AVR32_PIN_PA08);
|
||||
rt_thread_delay(RT_TICK_PER_SECOND / 2); /* sleep 0.5 second and switch to other thread */
|
||||
|
||||
/* led off */
|
||||
rt_kprintf("LED1 off\r\n");
|
||||
gpio_tgl_gpio_pin(AVR32_PIN_PA08);
|
||||
rt_thread_delay(RT_TICK_PER_SECOND / 2);
|
||||
}
|
||||
}
|
||||
|
||||
char thread_led2_stack[1024];
|
||||
struct rt_thread thread_led2;
|
||||
void rt_thread_entry_led2(void* parameter)
|
||||
{
|
||||
while (1)
|
||||
{
|
||||
/* led on */
|
||||
rt_kprintf("LED2 on");
|
||||
gpio_tgl_gpio_pin(AVR32_PIN_PA07);
|
||||
rt_thread_delay(RT_TICK_PER_SECOND);
|
||||
|
||||
/* led off */
|
||||
rt_kprintf("LED2 off\r\n");
|
||||
gpio_tgl_gpio_pin(AVR32_PIN_PA07);
|
||||
rt_thread_delay(RT_TICK_PER_SECOND);
|
||||
}
|
||||
}
|
||||
|
||||
int rt_application_init()
|
||||
{
|
||||
/* create led1 thread */
|
||||
rt_thread_init(&thread_led1,
|
||||
"led1",
|
||||
rt_thread_entry_led1,
|
||||
RT_NULL,
|
||||
&thread_led1_stack[0],
|
||||
sizeof(thread_led1_stack), 5, 5);
|
||||
rt_thread_startup(&thread_led1);
|
||||
|
||||
//------- init led2 thread
|
||||
rt_thread_init(&thread_led2,
|
||||
"led2",
|
||||
rt_thread_entry_led2,
|
||||
RT_NULL,
|
||||
&thread_led2_stack[0],
|
||||
sizeof(thread_led2_stack),5,10);
|
||||
rt_thread_startup(&thread_led2);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,101 +1,101 @@
|
||||
/*
|
||||
* File : board.c
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2010, RT-Thread Development Team
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rt-thread.org/license/LICENSE
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2010-03-30 Kyle First version
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#include "compiler.h"
|
||||
#include "pm.h"
|
||||
#include "gpio.h"
|
||||
#include "usart.h"
|
||||
#include "intc.h"
|
||||
#include "serial.h"
|
||||
|
||||
#define FOSC0 12000000
|
||||
#define FCPU 60000000
|
||||
#define FHSB FCPU
|
||||
#define FPBA FCPU
|
||||
#define FPBB FCPU
|
||||
|
||||
extern void rt_hw_serial_isr(void);
|
||||
extern void rt_hw_usart_init(void);
|
||||
|
||||
/**
|
||||
/*
|
||||
* File : board.c
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2010, RT-Thread Development Team
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rt-thread.org/license/LICENSE
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2010-03-30 Kyle First version
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#include "compiler.h"
|
||||
#include "pm.h"
|
||||
#include "gpio.h"
|
||||
#include "usart.h"
|
||||
#include "intc.h"
|
||||
#include "serial.h"
|
||||
|
||||
#define FOSC0 12000000
|
||||
#define FCPU 60000000
|
||||
#define FHSB FCPU
|
||||
#define FPBA FCPU
|
||||
#define FPBB FCPU
|
||||
|
||||
extern void rt_hw_serial_isr(void);
|
||||
extern void rt_hw_usart_init(void);
|
||||
|
||||
/**
|
||||
* System tick interrupt handler.
|
||||
*/
|
||||
static void rt_hw_timer_handler(void)
|
||||
{
|
||||
// Clears the interrupt request.
|
||||
Set_system_register(AVR32_COMPARE, FCPU / RT_TICK_PER_SECOND);
|
||||
|
||||
rt_tick_increase();
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
static void rt_hw_timer_handler(void)
|
||||
{
|
||||
// Clears the interrupt request.
|
||||
Set_system_register(AVR32_COMPARE, FCPU / RT_TICK_PER_SECOND);
|
||||
|
||||
rt_tick_increase();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize system clock and all peripherals.
|
||||
*/
|
||||
static void peripherals_init(void)
|
||||
{
|
||||
/*
|
||||
* PM initialization: OSC0 = 12MHz XTAL, PLL0 = 60MHz System Clock
|
||||
*/
|
||||
pm_freq_param_t pm_freq_param =
|
||||
{
|
||||
.cpu_f = FCPU,
|
||||
.pba_f = FPBA,
|
||||
.osc0_f = FOSC0,
|
||||
.osc0_startup = AVR32_PM_OSCCTRL0_STARTUP_2048_RCOSC
|
||||
};
|
||||
pm_configure_clocks(&pm_freq_param);
|
||||
|
||||
/*
|
||||
* USART1 initialization
|
||||
*/
|
||||
gpio_enable_module_pin(AVR32_USART1_TXD_0_1_PIN, AVR32_USART1_TXD_0_1_FUNCTION);
|
||||
gpio_enable_module_pin(AVR32_USART1_RXD_0_1_PIN, AVR32_USART1_RXD_0_1_FUNCTION);
|
||||
static const usart_options_t usartOptions = {
|
||||
.baudrate = 115200,
|
||||
.charlength = 8,
|
||||
.paritytype = USART_NO_PARITY,
|
||||
.stopbits = USART_1_STOPBIT,
|
||||
.channelmode = USART_NORMAL_CHMODE
|
||||
};
|
||||
usart_init_rs232(&AVR32_USART1, &usartOptions, FCPU);
|
||||
|
||||
INTC_init_interrupts();
|
||||
INTC_register_interrupt(&rt_hw_serial_isr, AVR32_USART1_IRQ, AVR32_INTC_INT0);
|
||||
AVR32_USART1.ier = AVR32_USART_IER_RXRDY_MASK;
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
static void peripherals_init(void)
|
||||
{
|
||||
/*
|
||||
* PM initialization: OSC0 = 12MHz XTAL, PLL0 = 60MHz System Clock
|
||||
*/
|
||||
pm_freq_param_t pm_freq_param =
|
||||
{
|
||||
.cpu_f = FCPU,
|
||||
.pba_f = FPBA,
|
||||
.osc0_f = FOSC0,
|
||||
.osc0_startup = AVR32_PM_OSCCTRL0_STARTUP_2048_RCOSC
|
||||
};
|
||||
pm_configure_clocks(&pm_freq_param);
|
||||
|
||||
/*
|
||||
* USART1 initialization
|
||||
*/
|
||||
gpio_enable_module_pin(AVR32_USART1_TXD_0_1_PIN, AVR32_USART1_TXD_0_1_FUNCTION);
|
||||
gpio_enable_module_pin(AVR32_USART1_RXD_0_1_PIN, AVR32_USART1_RXD_0_1_FUNCTION);
|
||||
static const usart_options_t usartOptions = {
|
||||
.baudrate = 115200,
|
||||
.charlength = 8,
|
||||
.paritytype = USART_NO_PARITY,
|
||||
.stopbits = USART_1_STOPBIT,
|
||||
.channelmode = USART_NORMAL_CHMODE
|
||||
};
|
||||
usart_init_rs232(&AVR32_USART1, &usartOptions, FCPU);
|
||||
|
||||
INTC_init_interrupts();
|
||||
INTC_register_interrupt(&rt_hw_serial_isr, AVR32_USART1_IRQ, AVR32_INTC_INT0);
|
||||
AVR32_USART1.ier = AVR32_USART_IER_RXRDY_MASK;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize CPU cycle counter for system tick.
|
||||
*/
|
||||
static void cpu_counter_init(void)
|
||||
{
|
||||
INTC_register_interrupt(&rt_hw_timer_handler, AVR32_CORE_COMPARE_IRQ, AVR32_INTC_INT3);
|
||||
Set_system_register(AVR32_COMPARE, FCPU / RT_TICK_PER_SECOND);
|
||||
Set_system_register(AVR32_COUNT, 0);
|
||||
}
|
||||
|
||||
void rt_hw_board_init(void)
|
||||
{
|
||||
extern struct rt_device _rt_usart_device;
|
||||
extern struct avr32_serial_device uart;
|
||||
|
||||
Disable_global_interrupt();
|
||||
|
||||
peripherals_init();
|
||||
cpu_counter_init();
|
||||
|
||||
rt_hw_serial_register(&_rt_usart_device, "uart1", RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX | RT_DEVICE_FLAG_STREAM, &uart);
|
||||
rt_console_set_device("uart1");
|
||||
}
|
||||
*/
|
||||
static void cpu_counter_init(void)
|
||||
{
|
||||
INTC_register_interrupt(&rt_hw_timer_handler, AVR32_CORE_COMPARE_IRQ, AVR32_INTC_INT3);
|
||||
Set_system_register(AVR32_COMPARE, FCPU / RT_TICK_PER_SECOND);
|
||||
Set_system_register(AVR32_COUNT, 0);
|
||||
}
|
||||
|
||||
void rt_hw_board_init(void)
|
||||
{
|
||||
extern struct rt_device _rt_usart_device;
|
||||
extern struct avr32_serial_device uart;
|
||||
|
||||
Disable_global_interrupt();
|
||||
|
||||
peripherals_init();
|
||||
cpu_counter_init();
|
||||
|
||||
rt_hw_serial_register(&_rt_usart_device, "uart1", RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX | RT_DEVICE_FLAG_STREAM, &uart);
|
||||
rt_console_set_device("uart1");
|
||||
}
|
||||
|
||||
@@ -1,121 +1,121 @@
|
||||
/*
|
||||
* File : rtconfig.h
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2010, RT-Thread Development Team
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rt-thread.org/license/LICENSE
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2010-03-30 Kyle First version
|
||||
*/
|
||||
|
||||
#ifndef RTCONFIG_H_
|
||||
#define RTCONFIG_H_
|
||||
|
||||
/* RT_NAME_MAX*/
|
||||
#define RT_NAME_MAX 8
|
||||
|
||||
/* RT_ALIGN_SIZE*/
|
||||
#define RT_ALIGN_SIZE 4
|
||||
|
||||
/* PRIORITY_MAX*/
|
||||
#define RT_THREAD_PRIORITY_MAX 32
|
||||
|
||||
/* Tick per Second*/
|
||||
#define RT_TICK_PER_SECOND 100
|
||||
|
||||
/* SECTION: RT_DEBUG */
|
||||
/* Thread Debug*/
|
||||
//#define RT_DEBUG
|
||||
/* #define RT_THREAD_DEBUG */
|
||||
|
||||
#define RT_USING_OVERFLOW_CHECK
|
||||
|
||||
/* Using Hook*/
|
||||
//#define RT_USING_HOOK
|
||||
|
||||
/* SECTION: IPC */
|
||||
/* Using Semaphore*/
|
||||
#define RT_USING_SEMAPHORE
|
||||
|
||||
/* Using Mutex*/
|
||||
//#define RT_USING_MUTEX
|
||||
|
||||
/* Using Event*/
|
||||
//#define RT_USING_EVENT
|
||||
|
||||
/* Using MailBox*/
|
||||
//#define RT_USING_MAILBOX
|
||||
|
||||
/* Using Message Queue*/
|
||||
//#define RT_USING_MESSAGEQUEUE
|
||||
|
||||
/* SECTION: Memory Management */
|
||||
/* Using Memory Pool Management*/
|
||||
#define RT_USING_MEMPOOL
|
||||
|
||||
/* Using Dynamic Heap Management*/
|
||||
#define RT_USING_HEAP
|
||||
|
||||
/* Using Small MM*/
|
||||
#define RT_USING_SMALL_MEM
|
||||
|
||||
/* Using SLAB Allocator*/
|
||||
/* #define RT_USING_SLAB */
|
||||
|
||||
/* SECTION: Device System */
|
||||
/* Using Device System*/
|
||||
#define RT_USING_DEVICE
|
||||
|
||||
/* SECTION: Console options */
|
||||
/* the buffer size of console*/
|
||||
#define RT_USING_CONSOLE
|
||||
#define RT_CONSOLEBUF_SIZE 128
|
||||
|
||||
/* SECTION: FinSH shell options */
|
||||
/* Using FinSH as Shell*/
|
||||
#define RT_USING_FINSH
|
||||
/* Using symbol table */
|
||||
#define FINSH_USING_SYMTAB
|
||||
#define FINSH_USING_DESCRIPTION
|
||||
#define FINSH_DEVICE_NAME "uart1"
|
||||
|
||||
/* SECTION: RT-Thread/GUI */
|
||||
//#define RT_USING_DFS
|
||||
|
||||
#define RT_USING_DFS_ELMFAT
|
||||
#define RT_DFS_ELM_WORD_ACCESS
|
||||
#define RT_DFS_ELM_DRIVES 2
|
||||
|
||||
/* SECTION: DFS options */
|
||||
/* the max number of mounted filesystem */
|
||||
#define DFS_FILESYSTEMS_MAX 2
|
||||
/* the max number of opened files */
|
||||
#define DFS_FD_MAX 8
|
||||
/* the max number of cached sector */
|
||||
#define DFS_CACHE_MAX_NUM 4
|
||||
|
||||
/* SECTION: RT-Thread/GUI */
|
||||
//#define RT_USING_RTGUI
|
||||
|
||||
/* name length of RTGUI object */
|
||||
#define RTGUI_NAME_MAX 12
|
||||
/* support 16 weight font */
|
||||
#define RTGUI_USING_FONT16
|
||||
/* support Chinese font */
|
||||
#define RTGUI_USING_FONTHZ
|
||||
/* use DFS as file interface */
|
||||
#define RTGUI_USING_DFS_FILERW
|
||||
/* use font file as Chinese font */
|
||||
#define RTGUI_USING_HZ_FILE
|
||||
/* use small size in RTGUI */
|
||||
#define RTGUI_USING_SMALL_SIZE
|
||||
/* use mouse cursor */
|
||||
/* #define RTGUI_USING_MOUSE_CURSOR */
|
||||
/* default font size in RTGUI */
|
||||
#define RTGUI_DEFAULT_FONT_SIZE 16
|
||||
|
||||
#endif /* RTCONFIG_H_ */
|
||||
/*
|
||||
* File : rtconfig.h
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2010, RT-Thread Development Team
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rt-thread.org/license/LICENSE
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2010-03-30 Kyle First version
|
||||
*/
|
||||
|
||||
#ifndef RTCONFIG_H_
|
||||
#define RTCONFIG_H_
|
||||
|
||||
/* RT_NAME_MAX*/
|
||||
#define RT_NAME_MAX 8
|
||||
|
||||
/* RT_ALIGN_SIZE*/
|
||||
#define RT_ALIGN_SIZE 4
|
||||
|
||||
/* PRIORITY_MAX*/
|
||||
#define RT_THREAD_PRIORITY_MAX 32
|
||||
|
||||
/* Tick per Second*/
|
||||
#define RT_TICK_PER_SECOND 100
|
||||
|
||||
/* SECTION: RT_DEBUG */
|
||||
/* Thread Debug*/
|
||||
//#define RT_DEBUG
|
||||
/* #define RT_THREAD_DEBUG */
|
||||
|
||||
#define RT_USING_OVERFLOW_CHECK
|
||||
|
||||
/* Using Hook*/
|
||||
//#define RT_USING_HOOK
|
||||
|
||||
/* SECTION: IPC */
|
||||
/* Using Semaphore*/
|
||||
#define RT_USING_SEMAPHORE
|
||||
|
||||
/* Using Mutex*/
|
||||
//#define RT_USING_MUTEX
|
||||
|
||||
/* Using Event*/
|
||||
//#define RT_USING_EVENT
|
||||
|
||||
/* Using MailBox*/
|
||||
//#define RT_USING_MAILBOX
|
||||
|
||||
/* Using Message Queue*/
|
||||
//#define RT_USING_MESSAGEQUEUE
|
||||
|
||||
/* SECTION: Memory Management */
|
||||
/* Using Memory Pool Management*/
|
||||
#define RT_USING_MEMPOOL
|
||||
|
||||
/* Using Dynamic Heap Management*/
|
||||
#define RT_USING_HEAP
|
||||
|
||||
/* Using Small MM*/
|
||||
#define RT_USING_SMALL_MEM
|
||||
|
||||
/* Using SLAB Allocator*/
|
||||
/* #define RT_USING_SLAB */
|
||||
|
||||
/* SECTION: Device System */
|
||||
/* Using Device System*/
|
||||
#define RT_USING_DEVICE
|
||||
|
||||
/* SECTION: Console options */
|
||||
/* the buffer size of console*/
|
||||
#define RT_USING_CONSOLE
|
||||
#define RT_CONSOLEBUF_SIZE 128
|
||||
|
||||
/* SECTION: FinSH shell options */
|
||||
/* Using FinSH as Shell*/
|
||||
#define RT_USING_FINSH
|
||||
/* Using symbol table */
|
||||
#define FINSH_USING_SYMTAB
|
||||
#define FINSH_USING_DESCRIPTION
|
||||
#define FINSH_DEVICE_NAME "uart1"
|
||||
|
||||
/* SECTION: RT-Thread/GUI */
|
||||
//#define RT_USING_DFS
|
||||
|
||||
#define RT_USING_DFS_ELMFAT
|
||||
#define RT_DFS_ELM_WORD_ACCESS
|
||||
#define RT_DFS_ELM_DRIVES 2
|
||||
|
||||
/* SECTION: DFS options */
|
||||
/* the max number of mounted filesystem */
|
||||
#define DFS_FILESYSTEMS_MAX 2
|
||||
/* the max number of opened files */
|
||||
#define DFS_FD_MAX 8
|
||||
/* the max number of cached sector */
|
||||
#define DFS_CACHE_MAX_NUM 4
|
||||
|
||||
/* SECTION: RT-Thread/GUI */
|
||||
//#define RT_USING_RTGUI
|
||||
|
||||
/* name length of RTGUI object */
|
||||
#define RTGUI_NAME_MAX 12
|
||||
/* support 16 weight font */
|
||||
#define RTGUI_USING_FONT16
|
||||
/* support Chinese font */
|
||||
#define RTGUI_USING_FONTHZ
|
||||
/* use DFS as file interface */
|
||||
#define RTGUI_USING_DFS_FILERW
|
||||
/* use font file as Chinese font */
|
||||
#define RTGUI_USING_HZ_FILE
|
||||
/* use small size in RTGUI */
|
||||
#define RTGUI_USING_SMALL_SIZE
|
||||
/* use mouse cursor */
|
||||
/* #define RTGUI_USING_MOUSE_CURSOR */
|
||||
/* default font size in RTGUI */
|
||||
#define RTGUI_DEFAULT_FONT_SIZE 16
|
||||
|
||||
#endif /* RTCONFIG_H_ */
|
||||
|
||||
@@ -1,60 +1,60 @@
|
||||
import os
|
||||
|
||||
# toolchains options
|
||||
ARCH = 'avr32'
|
||||
CPU = 'uc3'
|
||||
PART = 'uc3b0256'
|
||||
BOARD = 'USERBOARD'
|
||||
|
||||
CROSS_TOOL = 'gcc'
|
||||
|
||||
if os.getenv('RTT_CC'):
|
||||
CROSS_TOOL = os.getenv('RTT_CC')
|
||||
|
||||
if CROSS_TOOL == 'gcc':
|
||||
PLATFORM = 'gcc'
|
||||
EXEC_PATH = 'C:/Program Files/Atmel/AVR Tools/AVR Toolchain/bin'
|
||||
elif CROSS_TOOL == 'keil':
|
||||
print '================ERROR============================'
|
||||
print 'Not support keil yet!'
|
||||
print '================================================='
|
||||
exit(0)
|
||||
elif CROSS_TOOL == 'iar':
|
||||
print '================ERROR============================'
|
||||
print 'Not support iar yet!'
|
||||
print '================================================='
|
||||
exit(0)
|
||||
|
||||
if os.getenv('RTT_EXEC_PATH'):
|
||||
EXEC_PATH = os.getenv('RTT_EXEC_PATH')
|
||||
|
||||
#BUILD = 'debug'
|
||||
BUILD = 'release'
|
||||
|
||||
if PLATFORM == 'gcc':
|
||||
# toolchains
|
||||
PREFIX = 'avr32-'
|
||||
CC = PREFIX + 'gcc'
|
||||
AS = PREFIX + 'gcc'
|
||||
AR = PREFIX + 'ar'
|
||||
LINK = PREFIX + 'gcc'
|
||||
TARGET_EXT = 'elf'
|
||||
SIZE = PREFIX + 'size'
|
||||
OBJDUMP = PREFIX + 'objdump'
|
||||
OBJCPY = PREFIX + 'objcopy'
|
||||
|
||||
DEVICE = ' -mpart=' + PART
|
||||
CFLAGS = DEVICE + ' -DBOARD=' + BOARD + ' -fmessage-length=0 -ffunction-sections -masm-addr-pseudos'
|
||||
AFLAGS = ' -c -x assembler-with-cpp' + DEVICE
|
||||
LFLAGS = DEVICE + ' -Wl,--gc-sections --rodata-writable -Wl,--direct-data -LSOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS -T avr32elf_uc3b0256.lds'
|
||||
|
||||
CPATH = ''
|
||||
LPATH = ''
|
||||
|
||||
if BUILD == 'debug':
|
||||
CFLAGS += ' -O0 -g3 -Wall'
|
||||
AFLAGS += ' -g3'
|
||||
else:
|
||||
CFLAGS += ' -O2 -Wall'
|
||||
|
||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||
import os
|
||||
|
||||
# toolchains options
|
||||
ARCH = 'avr32'
|
||||
CPU = 'uc3'
|
||||
PART = 'uc3b0256'
|
||||
BOARD = 'USERBOARD'
|
||||
|
||||
CROSS_TOOL = 'gcc'
|
||||
|
||||
if os.getenv('RTT_CC'):
|
||||
CROSS_TOOL = os.getenv('RTT_CC')
|
||||
|
||||
if CROSS_TOOL == 'gcc':
|
||||
PLATFORM = 'gcc'
|
||||
EXEC_PATH = 'C:/Program Files/Atmel/AVR Tools/AVR Toolchain/bin'
|
||||
elif CROSS_TOOL == 'keil':
|
||||
print '================ERROR============================'
|
||||
print 'Not support keil yet!'
|
||||
print '================================================='
|
||||
exit(0)
|
||||
elif CROSS_TOOL == 'iar':
|
||||
print '================ERROR============================'
|
||||
print 'Not support iar yet!'
|
||||
print '================================================='
|
||||
exit(0)
|
||||
|
||||
if os.getenv('RTT_EXEC_PATH'):
|
||||
EXEC_PATH = os.getenv('RTT_EXEC_PATH')
|
||||
|
||||
#BUILD = 'debug'
|
||||
BUILD = 'release'
|
||||
|
||||
if PLATFORM == 'gcc':
|
||||
# toolchains
|
||||
PREFIX = 'avr32-'
|
||||
CC = PREFIX + 'gcc'
|
||||
AS = PREFIX + 'gcc'
|
||||
AR = PREFIX + 'ar'
|
||||
LINK = PREFIX + 'gcc'
|
||||
TARGET_EXT = 'elf'
|
||||
SIZE = PREFIX + 'size'
|
||||
OBJDUMP = PREFIX + 'objdump'
|
||||
OBJCPY = PREFIX + 'objcopy'
|
||||
|
||||
DEVICE = ' -mpart=' + PART
|
||||
CFLAGS = DEVICE + ' -DBOARD=' + BOARD + ' -fmessage-length=0 -ffunction-sections -masm-addr-pseudos'
|
||||
AFLAGS = ' -c -x assembler-with-cpp' + DEVICE
|
||||
LFLAGS = DEVICE + ' -Wl,--gc-sections --rodata-writable -Wl,--direct-data -LSOFTWARE_FRAMEWORK/UTILS/LIBS/NEWLIB_ADDONS -T avr32elf_uc3b0256.lds'
|
||||
|
||||
CPATH = ''
|
||||
LPATH = ''
|
||||
|
||||
if BUILD == 'debug':
|
||||
CFLAGS += ' -O0 -g3 -Wall'
|
||||
AFLAGS += ' -g3'
|
||||
else:
|
||||
CFLAGS += ' -O2 -Wall'
|
||||
|
||||
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
|
||||
|
||||
@@ -1,55 +1,55 @@
|
||||
/*
|
||||
* File : startup.c
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2010, RT-Thread Development Team
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rt-thread.org/license/LICENSE
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2010-03-30 Kyle First version
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
|
||||
extern void rt_hw_board_init(void);
|
||||
extern void rt_application_init(void);
|
||||
|
||||
#ifdef RT_USING_FINSH
|
||||
extern void finsh_system_init(void);
|
||||
extern void finsh_set_device(const char* device);
|
||||
#endif
|
||||
|
||||
int main(void)
|
||||
{
|
||||
#ifdef RT_USING_HEAP
|
||||
extern void __heap_start__;
|
||||
extern void __heap_end__;
|
||||
#endif
|
||||
|
||||
rt_hw_board_init();
|
||||
rt_system_tick_init();
|
||||
rt_system_object_init();
|
||||
rt_system_timer_init();
|
||||
|
||||
#ifdef RT_USING_HEAP
|
||||
rt_system_heap_init(&__heap_start__, &__heap_end__);
|
||||
#endif
|
||||
|
||||
rt_system_scheduler_init();
|
||||
rt_device_init_all();
|
||||
rt_application_init();
|
||||
|
||||
#ifdef RT_USING_FINSH
|
||||
/* init finsh */
|
||||
finsh_system_init();
|
||||
finsh_set_device(FINSH_DEVICE_NAME);
|
||||
#endif
|
||||
|
||||
rt_thread_idle_init();
|
||||
rt_system_scheduler_start();
|
||||
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
* File : startup.c
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2010, RT-Thread Development Team
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rt-thread.org/license/LICENSE
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2010-03-30 Kyle First version
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
|
||||
extern void rt_hw_board_init(void);
|
||||
extern void rt_application_init(void);
|
||||
|
||||
#ifdef RT_USING_FINSH
|
||||
extern void finsh_system_init(void);
|
||||
extern void finsh_set_device(const char* device);
|
||||
#endif
|
||||
|
||||
int main(void)
|
||||
{
|
||||
#ifdef RT_USING_HEAP
|
||||
extern void __heap_start__;
|
||||
extern void __heap_end__;
|
||||
#endif
|
||||
|
||||
rt_hw_board_init();
|
||||
rt_system_tick_init();
|
||||
rt_system_object_init();
|
||||
rt_system_timer_init();
|
||||
|
||||
#ifdef RT_USING_HEAP
|
||||
rt_system_heap_init(&__heap_start__, &__heap_end__);
|
||||
#endif
|
||||
|
||||
rt_system_scheduler_init();
|
||||
rt_device_init_all();
|
||||
rt_application_init();
|
||||
|
||||
#ifdef RT_USING_FINSH
|
||||
/* init finsh */
|
||||
finsh_system_init();
|
||||
finsh_set_device(FINSH_DEVICE_NAME);
|
||||
#endif
|
||||
|
||||
rt_thread_idle_init();
|
||||
rt_system_scheduler_start();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,41 +1,41 @@
|
||||
/*
|
||||
* File : application.c
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2012, RT-Thread Development Team
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rt-thread.org/license/LICENSE
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2012-02-13 mojingxian first version
|
||||
*/
|
||||
|
||||
#include "application.h"
|
||||
#include "board.h"
|
||||
#include "rtthread.h"
|
||||
|
||||
void app_init_entry(void *parg)
|
||||
{
|
||||
parg = parg;
|
||||
|
||||
rt_hw_core_timer_init();//start system tick in first thread.
|
||||
|
||||
rt_hw_isr_install();
|
||||
}
|
||||
|
||||
|
||||
void rt_application_init(void)
|
||||
{
|
||||
rt_thread_t led_thread;
|
||||
|
||||
#ifdef RT_USING_HEAP
|
||||
led_thread = rt_thread_create("init", app_init_entry, RT_NULL, 512, 200, 20);
|
||||
#endif
|
||||
|
||||
if (led_thread != RT_NULL)
|
||||
{
|
||||
rt_thread_startup(led_thread);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* File : application.c
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2012, RT-Thread Development Team
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rt-thread.org/license/LICENSE
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2012-02-13 mojingxian first version
|
||||
*/
|
||||
|
||||
#include "application.h"
|
||||
#include "board.h"
|
||||
#include "rtthread.h"
|
||||
|
||||
void app_init_entry(void *parg)
|
||||
{
|
||||
parg = parg;
|
||||
|
||||
rt_hw_core_timer_init();//start system tick in first thread.
|
||||
|
||||
rt_hw_isr_install();
|
||||
}
|
||||
|
||||
|
||||
void rt_application_init(void)
|
||||
{
|
||||
rt_thread_t led_thread;
|
||||
|
||||
#ifdef RT_USING_HEAP
|
||||
led_thread = rt_thread_create("init", app_init_entry, RT_NULL, 512, 200, 20);
|
||||
#endif
|
||||
|
||||
if (led_thread != RT_NULL)
|
||||
{
|
||||
rt_thread_startup(led_thread);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
/*
|
||||
* File : application.c
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2012, RT-Thread Development Team
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rt-thread.org/license/LICENSE
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2012-02-13 mojingxian first version
|
||||
*/
|
||||
|
||||
#ifndef __APPLICATION_H__
|
||||
#define __APPLICATION_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void rt_application_init(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __APPLICATION_H__ */
|
||||
/*
|
||||
* File : application.c
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2012, RT-Thread Development Team
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rt-thread.org/license/LICENSE
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2012-02-13 mojingxian first version
|
||||
*/
|
||||
|
||||
#ifndef __APPLICATION_H__
|
||||
#define __APPLICATION_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void rt_application_init(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __APPLICATION_H__ */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,94 +1,94 @@
|
||||
/*
|
||||
* File : board.h
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2012, RT-Thread Development Team
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rt-thread.org/license/LICENSE
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2012-02-13 mojingxian first version
|
||||
*/
|
||||
|
||||
#ifndef _BOARD_H_
|
||||
#define _BOARD_H_
|
||||
|
||||
#define CLKIN 33333000LL
|
||||
#define SPEED_MULTIPLE 16
|
||||
#define BUS_DIVISOR 4
|
||||
#define CCLKSPEED (CLKIN * SPEED_MULTIPLE)
|
||||
#define SCLKSPEED (CLKIN * BUS_DIVISOR)
|
||||
#define CLOCKS_PER_SECD CCLKSPEED
|
||||
#define SCLOCKS_PER_SEC SCLKSPEED
|
||||
|
||||
//SIC_IMASK¼Ä´æÆ÷
|
||||
#define PLL_WAKEUP_INT_MASK 0x00000001
|
||||
#define DMA_ERROR_INT_MASK 0x00000002
|
||||
#define PPI_ERROR_INT_MASK 0x00000004
|
||||
#define SPORT0_ERROR_INT_MASK 0x00000008
|
||||
#define SPORT1_ERROR_INT_MASK 0x00000010
|
||||
#define SPI_ERROR_INT_MASK 0x00000020
|
||||
#define UART_ERROR_INT_MASK 0x00000040
|
||||
#define RTC_INT_MASK 0x00000080
|
||||
#define DMA0_PPI_INT_MASK 0x00000100
|
||||
#define DMA1_SPORT0_RX_INT_MASK 0x00000200
|
||||
#define DMA2_SPORT0_TX_INT_MASK 0x00000400
|
||||
#define DMA3_SPORT1_RX_INT_MASK 0x00000800
|
||||
#define DMA4_SPORT1_TX_INT_MASK 0x00001000
|
||||
#define DMA5_SPI_INT_MASK 0x00002000
|
||||
#define DMA6_UART_RX_INT_MASK 0x00004000
|
||||
#define DMA7_UART_TX_INT_MASK 0x00008000
|
||||
#define TIMER0_INT_MASK 0x00010000
|
||||
#define TIMER1_INT_MASK 0x00020000
|
||||
#define TIMER2_INT_MASK 0x00040000
|
||||
#define PF_INTA_MASK 0x00080000
|
||||
#define PF_INTB_MASK 0x00100000
|
||||
#define MEM_DMA_STREAM0_MASK 0x00200000
|
||||
#define MEM_DMA_STREAM1_MASK 0x00400000
|
||||
#define SOFT_WATCHDOG_TMER_MASK 0x00800000
|
||||
|
||||
//SIC_IAR0
|
||||
#define IAR0_PLL_WAKEUP_INT_IVG 0x00
|
||||
#define IAR0_DMA_ERROR_INT_IVG 0x01
|
||||
#define IAR0_PPI_ERROR_INT_IVG 0x02
|
||||
#define IAR0_SPORT0_ERROR_INT_IVG 0x03
|
||||
#define IAR0_SPORT1_ERROR_INT_IVG 0x04
|
||||
#define IAR0_SPI_ERROR_INT_IVG 0x05
|
||||
#define IAR0_UART_ERROR_INT_IVG 0x06
|
||||
#define IAR0_RTC_INT_IVG 0x07
|
||||
|
||||
//SIC_IAR1
|
||||
#define IAR1_DMA0_PPI_INT_IVG 0x00
|
||||
#define IAR1_DMA1_SPORT0RX_IVG 0x01
|
||||
#define IAR1_DMA2_SPORT0TX_IVG 0x02
|
||||
#define IAR1_DMA3_SPORT1RX_IVG 0x03
|
||||
#define IAR1_DMA4_SPORT1TX_IVG 0x04
|
||||
#define IAR1_DMA5_SPI_INT_IVG 0x05
|
||||
#define IAR1_DMA6_UARTRX_IVG 0x06
|
||||
#define IAR1_DMA7_UARTTX_IVG 0x07
|
||||
|
||||
//SIC_IAR2
|
||||
#define IAR2_TIMER0_INT_IVG 0x00
|
||||
#define IAR2_TIMER1_INT_IVG 0x01
|
||||
#define IAR2_TIMER2_INT_IVG 0x02
|
||||
#define IAR2_PF_A_INT_IVG 0x03
|
||||
#define IAR2_PF_B_INT_IVG 0x04
|
||||
#define IAR2_MEM_DMA_STREAM0_INT_IVG 0x05
|
||||
#define IAR2_MEM_DMA_STREAM1_INT_IVG 0x06
|
||||
#define IAR2_SWATCHDOG_TIMER_INT_IVG 0x07
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void rt_hw_core_timer_init(void);
|
||||
void rt_hw_board_init(void);
|
||||
void rt_hw_isr_install(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _BSP_H_ */
|
||||
/*
|
||||
* File : board.h
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2012, RT-Thread Development Team
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rt-thread.org/license/LICENSE
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2012-02-13 mojingxian first version
|
||||
*/
|
||||
|
||||
#ifndef _BOARD_H_
|
||||
#define _BOARD_H_
|
||||
|
||||
#define CLKIN 33333000LL
|
||||
#define SPEED_MULTIPLE 16
|
||||
#define BUS_DIVISOR 4
|
||||
#define CCLKSPEED (CLKIN * SPEED_MULTIPLE)
|
||||
#define SCLKSPEED (CLKIN * BUS_DIVISOR)
|
||||
#define CLOCKS_PER_SECD CCLKSPEED
|
||||
#define SCLOCKS_PER_SEC SCLKSPEED
|
||||
|
||||
//SIC_IMASK¼Ä´æÆ÷
|
||||
#define PLL_WAKEUP_INT_MASK 0x00000001
|
||||
#define DMA_ERROR_INT_MASK 0x00000002
|
||||
#define PPI_ERROR_INT_MASK 0x00000004
|
||||
#define SPORT0_ERROR_INT_MASK 0x00000008
|
||||
#define SPORT1_ERROR_INT_MASK 0x00000010
|
||||
#define SPI_ERROR_INT_MASK 0x00000020
|
||||
#define UART_ERROR_INT_MASK 0x00000040
|
||||
#define RTC_INT_MASK 0x00000080
|
||||
#define DMA0_PPI_INT_MASK 0x00000100
|
||||
#define DMA1_SPORT0_RX_INT_MASK 0x00000200
|
||||
#define DMA2_SPORT0_TX_INT_MASK 0x00000400
|
||||
#define DMA3_SPORT1_RX_INT_MASK 0x00000800
|
||||
#define DMA4_SPORT1_TX_INT_MASK 0x00001000
|
||||
#define DMA5_SPI_INT_MASK 0x00002000
|
||||
#define DMA6_UART_RX_INT_MASK 0x00004000
|
||||
#define DMA7_UART_TX_INT_MASK 0x00008000
|
||||
#define TIMER0_INT_MASK 0x00010000
|
||||
#define TIMER1_INT_MASK 0x00020000
|
||||
#define TIMER2_INT_MASK 0x00040000
|
||||
#define PF_INTA_MASK 0x00080000
|
||||
#define PF_INTB_MASK 0x00100000
|
||||
#define MEM_DMA_STREAM0_MASK 0x00200000
|
||||
#define MEM_DMA_STREAM1_MASK 0x00400000
|
||||
#define SOFT_WATCHDOG_TMER_MASK 0x00800000
|
||||
|
||||
//SIC_IAR0
|
||||
#define IAR0_PLL_WAKEUP_INT_IVG 0x00
|
||||
#define IAR0_DMA_ERROR_INT_IVG 0x01
|
||||
#define IAR0_PPI_ERROR_INT_IVG 0x02
|
||||
#define IAR0_SPORT0_ERROR_INT_IVG 0x03
|
||||
#define IAR0_SPORT1_ERROR_INT_IVG 0x04
|
||||
#define IAR0_SPI_ERROR_INT_IVG 0x05
|
||||
#define IAR0_UART_ERROR_INT_IVG 0x06
|
||||
#define IAR0_RTC_INT_IVG 0x07
|
||||
|
||||
//SIC_IAR1
|
||||
#define IAR1_DMA0_PPI_INT_IVG 0x00
|
||||
#define IAR1_DMA1_SPORT0RX_IVG 0x01
|
||||
#define IAR1_DMA2_SPORT0TX_IVG 0x02
|
||||
#define IAR1_DMA3_SPORT1RX_IVG 0x03
|
||||
#define IAR1_DMA4_SPORT1TX_IVG 0x04
|
||||
#define IAR1_DMA5_SPI_INT_IVG 0x05
|
||||
#define IAR1_DMA6_UARTRX_IVG 0x06
|
||||
#define IAR1_DMA7_UARTTX_IVG 0x07
|
||||
|
||||
//SIC_IAR2
|
||||
#define IAR2_TIMER0_INT_IVG 0x00
|
||||
#define IAR2_TIMER1_INT_IVG 0x01
|
||||
#define IAR2_TIMER2_INT_IVG 0x02
|
||||
#define IAR2_PF_A_INT_IVG 0x03
|
||||
#define IAR2_PF_B_INT_IVG 0x04
|
||||
#define IAR2_MEM_DMA_STREAM0_INT_IVG 0x05
|
||||
#define IAR2_MEM_DMA_STREAM1_INT_IVG 0x06
|
||||
#define IAR2_SWATCHDOG_TIMER_INT_IVG 0x07
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void rt_hw_core_timer_init(void);
|
||||
void rt_hw_board_init(void);
|
||||
void rt_hw_isr_install(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _BSP_H_ */
|
||||
|
||||
@@ -1,243 +1,243 @@
|
||||
/* RT-Thread config file */
|
||||
#ifndef __RTTHREAD_CFG_H__
|
||||
#define __RTTHREAD_CFG_H__
|
||||
|
||||
//add by mojingxian.defualt idle stack is too small.
|
||||
#define IDLE_THREAD_STACK_SIZE 512
|
||||
|
||||
/* RT_NAME_MAX*/
|
||||
#define RT_NAME_MAX 32
|
||||
|
||||
/* RT_ALIGN_SIZE*/
|
||||
#define RT_ALIGN_SIZE 4
|
||||
|
||||
/* PRIORITY_MAX */
|
||||
#define RT_THREAD_PRIORITY_MAX 256
|
||||
|
||||
/* Tick per Second */
|
||||
#define RT_TICK_PER_SECOND 1000
|
||||
|
||||
/* SECTION: RT_DEBUG */
|
||||
/* Thread Debug */
|
||||
/* #define RT_DEBUG */
|
||||
/* #define RT_THREAD_DEBUG */
|
||||
|
||||
#define RT_USING_OVERFLOW_CHECK
|
||||
|
||||
/* Using Hook */
|
||||
#define RT_USING_HOOK
|
||||
|
||||
/* Using Software Timer */
|
||||
//#define RT_USING_TIMER_SOFT
|
||||
#define RT_TIMER_THREAD_PRIO 8
|
||||
#define RT_TIMER_THREAD_STACK_SIZE 512
|
||||
#define RT_TIMER_TICK_PER_SECOND 1000
|
||||
|
||||
/* SECTION: IPC */
|
||||
/* Using Semaphore */
|
||||
#define RT_USING_SEMAPHORE
|
||||
|
||||
/* Using Mutex */
|
||||
#define RT_USING_MUTEX
|
||||
|
||||
/* Using Event */
|
||||
#define RT_USING_EVENT
|
||||
|
||||
/* Using MailBox */
|
||||
#define RT_USING_MAILBOX
|
||||
|
||||
/* Using Message Queue */
|
||||
#define RT_USING_MESSAGEQUEUE
|
||||
|
||||
/* SECTION: Memory Management */
|
||||
/* Using Memory Pool Management*/
|
||||
#define RT_USING_MEMPOOL
|
||||
|
||||
/* Using Dynamic Heap Management */
|
||||
#define RT_USING_HEAP
|
||||
|
||||
/* Using Small MM */
|
||||
#define RT_USING_SMALL_MEM
|
||||
|
||||
/* Using SLAB Allocator */
|
||||
//#define RT_USING_SLAB
|
||||
|
||||
/* SECTION: Device System */
|
||||
/* Using Device System */
|
||||
#define RT_USING_DEVICE
|
||||
|
||||
/* Using Module System */
|
||||
//#define RT_USING_MODULE
|
||||
#define RT_USING_LIBDL
|
||||
|
||||
/* SECTION: Console options */
|
||||
#define RT_USING_CONSOLE
|
||||
|
||||
/* the buffer size of console */
|
||||
#define RT_CONSOLEBUF_SIZE 128
|
||||
|
||||
/* 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
|
||||
#define FINSH_THREAD_STACK_SIZE 1024
|
||||
|
||||
/* SECTION: a runtime libc library */
|
||||
/* a runtime libc library */
|
||||
//#define RT_USING_NEWLIB
|
||||
//#define RT_USING_PTHREADS
|
||||
|
||||
/* SECTION: C++ support */
|
||||
/* Using C++ support */
|
||||
/* #define RT_USING_CPLUSPLUS */
|
||||
|
||||
/* SECTION: Device filesystem support */
|
||||
/* using DFS support */
|
||||
//#define RT_USING_DFS
|
||||
#define RT_USING_DFS_ELMFAT
|
||||
/* use long file name feature */
|
||||
#define RT_DFS_ELM_USE_LFN 1
|
||||
/* the max number of file length */
|
||||
#define RT_DFS_ELM_MAX_LFN 128
|
||||
/* #define RT_USING_DFS_YAFFS2 */
|
||||
/* #define RT_USING_DFS_UFFS */
|
||||
#define RT_USING_DFS_DEVFS
|
||||
|
||||
/* #define RT_USING_DFS_NFS */
|
||||
#define RT_NFS_HOST_EXPORT "192.168.1.5:/"
|
||||
|
||||
#define DFS_USING_WORKDIR
|
||||
|
||||
/* the max number of mounted filesystem */
|
||||
#define DFS_FILESYSTEMS_MAX 4
|
||||
/* the max number of opened files */
|
||||
#define DFS_FD_MAX 16
|
||||
/* the max number of cached sector */
|
||||
#define DFS_CACHE_MAX_NUM 4
|
||||
|
||||
/* Enable freemodbus protocal stack*/
|
||||
/* #define RT_USING_MODBUS */
|
||||
|
||||
/* SECTION: lwip, a lighwight TCP/IP protocol stack */
|
||||
/* Using lighweight TCP/IP protocol stack */
|
||||
/* #define RT_USING_LWIP */
|
||||
//#define RT_LWIP_DNS
|
||||
|
||||
/* Trace LwIP protocol */
|
||||
/* #define RT_LWIP_DEBUG */
|
||||
|
||||
/* Enable ICMP protocol */
|
||||
#define RT_LWIP_ICMP
|
||||
|
||||
/* Enable IGMP protocol */
|
||||
#define RT_LWIP_IGMP
|
||||
|
||||
/* Enable UDP protocol */
|
||||
#define RT_LWIP_UDP
|
||||
|
||||
/* Enable TCP protocol */
|
||||
#define RT_LWIP_TCP
|
||||
|
||||
/* the number of simulatenously active TCP connections*/
|
||||
#define RT_LWIP_TCP_PCB_NUM 5
|
||||
|
||||
/* TCP sender buffer space */
|
||||
#define RT_LWIP_TCP_SND_BUF 1024*8
|
||||
|
||||
/* TCP receive window. */
|
||||
#define RT_LWIP_TCP_WND 1024*8
|
||||
|
||||
/* Enable SNMP protocol */
|
||||
/* #define RT_LWIP_SNMP */
|
||||
|
||||
/* Using DHCP */
|
||||
/* #define RT_LWIP_DHCP */
|
||||
|
||||
/* ip address of target */
|
||||
#define RT_LWIP_IPADDR0 192
|
||||
#define RT_LWIP_IPADDR1 168
|
||||
#define RT_LWIP_IPADDR2 1
|
||||
#define RT_LWIP_IPADDR3 30
|
||||
|
||||
/* gateway address of target */
|
||||
#define RT_LWIP_GWADDR0 192
|
||||
#define RT_LWIP_GWADDR1 168
|
||||
#define RT_LWIP_GWADDR2 1
|
||||
#define RT_LWIP_GWADDR3 1
|
||||
|
||||
/* mask address of target */
|
||||
#define RT_LWIP_MSKADDR0 255
|
||||
#define RT_LWIP_MSKADDR1 255
|
||||
#define RT_LWIP_MSKADDR2 255
|
||||
#define RT_LWIP_MSKADDR3 0
|
||||
|
||||
/* the number of blocks for pbuf */
|
||||
#define RT_LWIP_PBUF_NUM 16
|
||||
|
||||
/* the number of simultaneously queued TCP */
|
||||
#define RT_LWIP_TCP_SEG_NUM 40
|
||||
|
||||
/* thread priority of tcpip thread */
|
||||
#define RT_LWIP_TCPTHREAD_PRIORITY 128
|
||||
|
||||
/* mail box size of tcpip thread to wait for */
|
||||
#define RT_LWIP_TCPTHREAD_MBOX_SIZE 32
|
||||
|
||||
/* thread stack size of tcpip thread */
|
||||
#define RT_LWIP_TCPTHREAD_STACKSIZE 4096
|
||||
|
||||
/* thread priority of ethnetif thread */
|
||||
#define RT_LWIP_ETHTHREAD_PRIORITY 144
|
||||
|
||||
/* mail box size of ethnetif thread to wait for */
|
||||
#define RT_LWIP_ETHTHREAD_MBOX_SIZE 32
|
||||
|
||||
/* thread stack size of ethnetif thread */
|
||||
#define RT_LWIP_ETHTHREAD_STACKSIZE 1024
|
||||
|
||||
/* SECTION: RTGUI support */
|
||||
/* using RTGUI support */
|
||||
#define RT_USING_RTGUI
|
||||
|
||||
/* name length of RTGUI object */
|
||||
#define RTGUI_NAME_MAX 16
|
||||
/* support 16 weight font */
|
||||
#define RTGUI_USING_FONT16
|
||||
/* support 16 weight font */
|
||||
#define RTGUI_USING_FONT12
|
||||
/* support Chinese font */
|
||||
#define RTGUI_USING_FONTHZ
|
||||
/* use DFS as file interface */
|
||||
#define RTGUI_USING_DFS_FILERW
|
||||
/* use font file as Chinese font */
|
||||
/* #define RTGUI_USING_HZ_FILE */
|
||||
/* use Chinese bitmap font */
|
||||
#define RTGUI_USING_HZ_BMP
|
||||
/* use small size in RTGUI */
|
||||
/* #define RTGUI_USING_SMALL_SIZE */
|
||||
/* use mouse cursor */
|
||||
/* #define RTGUI_USING_MOUSE_CURSOR */
|
||||
/* RTGUI image options */
|
||||
//#define RTGUI_IMAGE_XPM
|
||||
//#define RTGUI_IMAGE_JPEG
|
||||
//#define RTGUI_IMAGE_PNG
|
||||
//#define RTGUI_IMAGE_BMP
|
||||
|
||||
/* SECTION: FTK support */
|
||||
/* using FTK support */
|
||||
/* #define RT_USING_FTK */
|
||||
|
||||
/*
|
||||
* Note on FTK:
|
||||
*
|
||||
* FTK depends :
|
||||
* #define RT_USING_NEWLIB
|
||||
* #define DFS_USING_WORKDIR
|
||||
*
|
||||
* And the maximal length must great than 64
|
||||
* #define RT_DFS_ELM_MAX_LFN 128
|
||||
*/
|
||||
|
||||
#endif
|
||||
/* RT-Thread config file */
|
||||
#ifndef __RTTHREAD_CFG_H__
|
||||
#define __RTTHREAD_CFG_H__
|
||||
|
||||
//add by mojingxian.defualt idle stack is too small.
|
||||
#define IDLE_THREAD_STACK_SIZE 512
|
||||
|
||||
/* RT_NAME_MAX*/
|
||||
#define RT_NAME_MAX 32
|
||||
|
||||
/* RT_ALIGN_SIZE*/
|
||||
#define RT_ALIGN_SIZE 4
|
||||
|
||||
/* PRIORITY_MAX */
|
||||
#define RT_THREAD_PRIORITY_MAX 256
|
||||
|
||||
/* Tick per Second */
|
||||
#define RT_TICK_PER_SECOND 1000
|
||||
|
||||
/* SECTION: RT_DEBUG */
|
||||
/* Thread Debug */
|
||||
/* #define RT_DEBUG */
|
||||
/* #define RT_THREAD_DEBUG */
|
||||
|
||||
#define RT_USING_OVERFLOW_CHECK
|
||||
|
||||
/* Using Hook */
|
||||
#define RT_USING_HOOK
|
||||
|
||||
/* Using Software Timer */
|
||||
//#define RT_USING_TIMER_SOFT
|
||||
#define RT_TIMER_THREAD_PRIO 8
|
||||
#define RT_TIMER_THREAD_STACK_SIZE 512
|
||||
#define RT_TIMER_TICK_PER_SECOND 1000
|
||||
|
||||
/* SECTION: IPC */
|
||||
/* Using Semaphore */
|
||||
#define RT_USING_SEMAPHORE
|
||||
|
||||
/* Using Mutex */
|
||||
#define RT_USING_MUTEX
|
||||
|
||||
/* Using Event */
|
||||
#define RT_USING_EVENT
|
||||
|
||||
/* Using MailBox */
|
||||
#define RT_USING_MAILBOX
|
||||
|
||||
/* Using Message Queue */
|
||||
#define RT_USING_MESSAGEQUEUE
|
||||
|
||||
/* SECTION: Memory Management */
|
||||
/* Using Memory Pool Management*/
|
||||
#define RT_USING_MEMPOOL
|
||||
|
||||
/* Using Dynamic Heap Management */
|
||||
#define RT_USING_HEAP
|
||||
|
||||
/* Using Small MM */
|
||||
#define RT_USING_SMALL_MEM
|
||||
|
||||
/* Using SLAB Allocator */
|
||||
//#define RT_USING_SLAB
|
||||
|
||||
/* SECTION: Device System */
|
||||
/* Using Device System */
|
||||
#define RT_USING_DEVICE
|
||||
|
||||
/* Using Module System */
|
||||
//#define RT_USING_MODULE
|
||||
#define RT_USING_LIBDL
|
||||
|
||||
/* SECTION: Console options */
|
||||
#define RT_USING_CONSOLE
|
||||
|
||||
/* the buffer size of console */
|
||||
#define RT_CONSOLEBUF_SIZE 128
|
||||
|
||||
/* 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
|
||||
#define FINSH_THREAD_STACK_SIZE 1024
|
||||
|
||||
/* SECTION: a runtime libc library */
|
||||
/* a runtime libc library */
|
||||
//#define RT_USING_NEWLIB
|
||||
//#define RT_USING_PTHREADS
|
||||
|
||||
/* SECTION: C++ support */
|
||||
/* Using C++ support */
|
||||
/* #define RT_USING_CPLUSPLUS */
|
||||
|
||||
/* SECTION: Device filesystem support */
|
||||
/* using DFS support */
|
||||
//#define RT_USING_DFS
|
||||
#define RT_USING_DFS_ELMFAT
|
||||
/* use long file name feature */
|
||||
#define RT_DFS_ELM_USE_LFN 1
|
||||
/* the max number of file length */
|
||||
#define RT_DFS_ELM_MAX_LFN 128
|
||||
/* #define RT_USING_DFS_YAFFS2 */
|
||||
/* #define RT_USING_DFS_UFFS */
|
||||
#define RT_USING_DFS_DEVFS
|
||||
|
||||
/* #define RT_USING_DFS_NFS */
|
||||
#define RT_NFS_HOST_EXPORT "192.168.1.5:/"
|
||||
|
||||
#define DFS_USING_WORKDIR
|
||||
|
||||
/* the max number of mounted filesystem */
|
||||
#define DFS_FILESYSTEMS_MAX 4
|
||||
/* the max number of opened files */
|
||||
#define DFS_FD_MAX 16
|
||||
/* the max number of cached sector */
|
||||
#define DFS_CACHE_MAX_NUM 4
|
||||
|
||||
/* Enable freemodbus protocal stack*/
|
||||
/* #define RT_USING_MODBUS */
|
||||
|
||||
/* SECTION: lwip, a lighwight TCP/IP protocol stack */
|
||||
/* Using lighweight TCP/IP protocol stack */
|
||||
/* #define RT_USING_LWIP */
|
||||
//#define RT_LWIP_DNS
|
||||
|
||||
/* Trace LwIP protocol */
|
||||
/* #define RT_LWIP_DEBUG */
|
||||
|
||||
/* Enable ICMP protocol */
|
||||
#define RT_LWIP_ICMP
|
||||
|
||||
/* Enable IGMP protocol */
|
||||
#define RT_LWIP_IGMP
|
||||
|
||||
/* Enable UDP protocol */
|
||||
#define RT_LWIP_UDP
|
||||
|
||||
/* Enable TCP protocol */
|
||||
#define RT_LWIP_TCP
|
||||
|
||||
/* the number of simulatenously active TCP connections*/
|
||||
#define RT_LWIP_TCP_PCB_NUM 5
|
||||
|
||||
/* TCP sender buffer space */
|
||||
#define RT_LWIP_TCP_SND_BUF 1024*8
|
||||
|
||||
/* TCP receive window. */
|
||||
#define RT_LWIP_TCP_WND 1024*8
|
||||
|
||||
/* Enable SNMP protocol */
|
||||
/* #define RT_LWIP_SNMP */
|
||||
|
||||
/* Using DHCP */
|
||||
/* #define RT_LWIP_DHCP */
|
||||
|
||||
/* ip address of target */
|
||||
#define RT_LWIP_IPADDR0 192
|
||||
#define RT_LWIP_IPADDR1 168
|
||||
#define RT_LWIP_IPADDR2 1
|
||||
#define RT_LWIP_IPADDR3 30
|
||||
|
||||
/* gateway address of target */
|
||||
#define RT_LWIP_GWADDR0 192
|
||||
#define RT_LWIP_GWADDR1 168
|
||||
#define RT_LWIP_GWADDR2 1
|
||||
#define RT_LWIP_GWADDR3 1
|
||||
|
||||
/* mask address of target */
|
||||
#define RT_LWIP_MSKADDR0 255
|
||||
#define RT_LWIP_MSKADDR1 255
|
||||
#define RT_LWIP_MSKADDR2 255
|
||||
#define RT_LWIP_MSKADDR3 0
|
||||
|
||||
/* the number of blocks for pbuf */
|
||||
#define RT_LWIP_PBUF_NUM 16
|
||||
|
||||
/* the number of simultaneously queued TCP */
|
||||
#define RT_LWIP_TCP_SEG_NUM 40
|
||||
|
||||
/* thread priority of tcpip thread */
|
||||
#define RT_LWIP_TCPTHREAD_PRIORITY 128
|
||||
|
||||
/* mail box size of tcpip thread to wait for */
|
||||
#define RT_LWIP_TCPTHREAD_MBOX_SIZE 32
|
||||
|
||||
/* thread stack size of tcpip thread */
|
||||
#define RT_LWIP_TCPTHREAD_STACKSIZE 4096
|
||||
|
||||
/* thread priority of ethnetif thread */
|
||||
#define RT_LWIP_ETHTHREAD_PRIORITY 144
|
||||
|
||||
/* mail box size of ethnetif thread to wait for */
|
||||
#define RT_LWIP_ETHTHREAD_MBOX_SIZE 32
|
||||
|
||||
/* thread stack size of ethnetif thread */
|
||||
#define RT_LWIP_ETHTHREAD_STACKSIZE 1024
|
||||
|
||||
/* SECTION: RTGUI support */
|
||||
/* using RTGUI support */
|
||||
#define RT_USING_RTGUI
|
||||
|
||||
/* name length of RTGUI object */
|
||||
#define RTGUI_NAME_MAX 16
|
||||
/* support 16 weight font */
|
||||
#define RTGUI_USING_FONT16
|
||||
/* support 16 weight font */
|
||||
#define RTGUI_USING_FONT12
|
||||
/* support Chinese font */
|
||||
#define RTGUI_USING_FONTHZ
|
||||
/* use DFS as file interface */
|
||||
#define RTGUI_USING_DFS_FILERW
|
||||
/* use font file as Chinese font */
|
||||
/* #define RTGUI_USING_HZ_FILE */
|
||||
/* use Chinese bitmap font */
|
||||
#define RTGUI_USING_HZ_BMP
|
||||
/* use small size in RTGUI */
|
||||
/* #define RTGUI_USING_SMALL_SIZE */
|
||||
/* use mouse cursor */
|
||||
/* #define RTGUI_USING_MOUSE_CURSOR */
|
||||
/* RTGUI image options */
|
||||
//#define RTGUI_IMAGE_XPM
|
||||
//#define RTGUI_IMAGE_JPEG
|
||||
//#define RTGUI_IMAGE_PNG
|
||||
//#define RTGUI_IMAGE_BMP
|
||||
|
||||
/* SECTION: FTK support */
|
||||
/* using FTK support */
|
||||
/* #define RT_USING_FTK */
|
||||
|
||||
/*
|
||||
* Note on FTK:
|
||||
*
|
||||
* FTK depends :
|
||||
* #define RT_USING_NEWLIB
|
||||
* #define DFS_USING_WORKDIR
|
||||
*
|
||||
* And the maximal length must great than 64
|
||||
* #define RT_DFS_ELM_MAX_LFN 128
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,102 +1,102 @@
|
||||
/*
|
||||
* File : startup.c
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2012, RT-Thread Development Team
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rt-thread.org/license/LICENSE
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2012-02-13 mojingxian first version
|
||||
*/
|
||||
|
||||
#include <rthw.h>
|
||||
#include <rtthread.h>
|
||||
#include "application.h"
|
||||
#include "board.h"
|
||||
#include "serial.h"
|
||||
#include "finsh.h"
|
||||
|
||||
extern "asm" int rtt_heap_start;
|
||||
extern "asm" int rtt_heap_end;
|
||||
extern struct serial_device uart0;
|
||||
extern struct rt_device uart0_device;
|
||||
|
||||
void rtthread_startup(void)
|
||||
{
|
||||
/* init hardware interrupt */
|
||||
rt_hw_interrupt_init();
|
||||
|
||||
/* init board */
|
||||
rt_hw_board_init();
|
||||
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
#ifdef RT_USING_HEAP
|
||||
rt_system_heap_init((void*)&rtt_heap_start, (void*)&rtt_heap_end);
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_MODULE
|
||||
/* init module system*/
|
||||
rt_system_module_init();
|
||||
#endif
|
||||
|
||||
/* init scheduler system */
|
||||
rt_system_scheduler_init();
|
||||
|
||||
#ifdef RT_USING_DEVICE
|
||||
/* register uart0 */
|
||||
rt_hw_serial_register(&uart0_device, "uart0",
|
||||
RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX | RT_DEVICE_FLAG_STREAM,
|
||||
&uart0);
|
||||
|
||||
/* init all device */
|
||||
rt_device_init_all();
|
||||
|
||||
rt_console_set_device("uart0");
|
||||
#endif
|
||||
|
||||
/* init application */
|
||||
rt_application_init();
|
||||
|
||||
#ifdef RT_USING_FINSH
|
||||
/* init finsh */
|
||||
extern void finsh_system_init(void);
|
||||
finsh_system_init();
|
||||
finsh_set_device("uart0");
|
||||
#endif
|
||||
|
||||
rt_system_timer_thread_init();
|
||||
|
||||
/* init idle thread */
|
||||
rt_thread_idle_init();
|
||||
|
||||
/* start scheduler */
|
||||
rt_system_scheduler_start();
|
||||
|
||||
/* never reach here */
|
||||
return ;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
/* disable interrupt first */
|
||||
rt_hw_interrupt_disable();
|
||||
|
||||
/* startup RT-Thread RTOS */
|
||||
rtthread_startup();
|
||||
|
||||
return 0;
|
||||
}
|
||||
/*
|
||||
* File : startup.c
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2012, RT-Thread Development Team
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rt-thread.org/license/LICENSE
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2012-02-13 mojingxian first version
|
||||
*/
|
||||
|
||||
#include <rthw.h>
|
||||
#include <rtthread.h>
|
||||
#include "application.h"
|
||||
#include "board.h"
|
||||
#include "serial.h"
|
||||
#include "finsh.h"
|
||||
|
||||
extern "asm" int rtt_heap_start;
|
||||
extern "asm" int rtt_heap_end;
|
||||
extern struct serial_device uart0;
|
||||
extern struct rt_device uart0_device;
|
||||
|
||||
void rtthread_startup(void)
|
||||
{
|
||||
/* init hardware interrupt */
|
||||
rt_hw_interrupt_init();
|
||||
|
||||
/* init board */
|
||||
rt_hw_board_init();
|
||||
|
||||
/* show version */
|
||||
rt_show_version();
|
||||
|
||||
/* init tick */
|
||||
rt_system_tick_init();
|
||||
|
||||
/* init kernel object */
|
||||
rt_system_object_init();
|
||||
|
||||
/* init timer system */
|
||||
rt_system_timer_init();
|
||||
|
||||
#ifdef RT_USING_HEAP
|
||||
rt_system_heap_init((void*)&rtt_heap_start, (void*)&rtt_heap_end);
|
||||
#endif
|
||||
|
||||
#ifdef RT_USING_MODULE
|
||||
/* init module system*/
|
||||
rt_system_module_init();
|
||||
#endif
|
||||
|
||||
/* init scheduler system */
|
||||
rt_system_scheduler_init();
|
||||
|
||||
#ifdef RT_USING_DEVICE
|
||||
/* register uart0 */
|
||||
rt_hw_serial_register(&uart0_device, "uart0",
|
||||
RT_DEVICE_FLAG_RDWR | RT_DEVICE_FLAG_INT_RX | RT_DEVICE_FLAG_STREAM,
|
||||
&uart0);
|
||||
|
||||
/* init all device */
|
||||
rt_device_init_all();
|
||||
|
||||
rt_console_set_device("uart0");
|
||||
#endif
|
||||
|
||||
/* init application */
|
||||
rt_application_init();
|
||||
|
||||
#ifdef RT_USING_FINSH
|
||||
/* init finsh */
|
||||
extern void finsh_system_init(void);
|
||||
finsh_system_init();
|
||||
finsh_set_device("uart0");
|
||||
#endif
|
||||
|
||||
rt_system_timer_thread_init();
|
||||
|
||||
/* init idle thread */
|
||||
rt_thread_idle_init();
|
||||
|
||||
/* start scheduler */
|
||||
rt_system_scheduler_start();
|
||||
|
||||
/* never reach here */
|
||||
return ;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
/* disable interrupt first */
|
||||
rt_hw_interrupt_disable();
|
||||
|
||||
/* startup RT-Thread RTOS */
|
||||
rtthread_startup();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,244 +1,244 @@
|
||||
# Generated by the VisualDSP++ IDDE
|
||||
|
||||
# Note: Any changes made to this Makefile will be lost the next time the
|
||||
# matching project file is loaded into the IDDE. If you wish to preserve
|
||||
# changes, rename this file and run it externally to the IDDE.
|
||||
|
||||
# The syntax of this Makefile is such that GNU Make v3.77 or higher is
|
||||
# required.
|
||||
|
||||
# The current working directory should be the directory in which this
|
||||
# Makefile resides.
|
||||
|
||||
# Supported targets:
|
||||
# bf533_Debug
|
||||
# bf533_Debug_clean
|
||||
|
||||
# Define this variable if you wish to run this Makefile on a host
|
||||
# other than the host that created it and VisualDSP++ may be installed
|
||||
# in a different directory.
|
||||
|
||||
ADI_DSP=C:\Program Files (x86)\Analog Devices\VisualDSP 5.0
|
||||
|
||||
|
||||
# $VDSP is a gmake-friendly version of ADI_DIR
|
||||
|
||||
empty:=
|
||||
space:= $(empty) $(empty)
|
||||
VDSP_INTERMEDIATE=$(subst \,/,$(ADI_DSP))
|
||||
VDSP=$(subst $(space),\$(space),$(VDSP_INTERMEDIATE))
|
||||
|
||||
RM=cmd /C del /F /Q
|
||||
|
||||
#
|
||||
# Begin "bf533_Debug" configuration
|
||||
#
|
||||
|
||||
ifeq ($(MAKECMDGOALS),bf533_Debug)
|
||||
|
||||
bf533_Debug : ./Debug/bf533.ldr
|
||||
|
||||
./Debug/application.doj :../application.c ../application.h ../board.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h
|
||||
@echo "..\application.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\application.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\application.doj -MM
|
||||
|
||||
./Debug/bf533_basiccrt.doj :./bf533_basiccrt.s $(VDSP)/Blackfin/include/cplb.h $(VDSP)/Blackfin/include/defBF532.h $(VDSP)/Blackfin/include/defBF533.h $(VDSP)/Blackfin/include/def_LPBlackfin.h $(VDSP)/Blackfin/include/sys/_adi_platform.h $(VDSP)/Blackfin/include/sys/anomaly_macros_rtl.h $(VDSP)/Blackfin/include/sys/platform.h
|
||||
@echo ".\bf533_basiccrt.s"
|
||||
$(VDSP)/easmblkfn.exe .\bf533_basiccrt.s -proc ADSP-BF533 -file-attr ProjectName=bf533 -g -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -o .\Debug\bf533_basiccrt.doj -MM
|
||||
|
||||
./Debug/bf533_heaptab.doj :bf533_heaptab.c
|
||||
@echo ".\bf533_heaptab.c"
|
||||
$(VDSP)/ccblkfn.exe -c .\bf533_heaptab.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\bf533_heaptab.doj -MM
|
||||
|
||||
./Debug/board.doj :../board.c ../board.h ../rtconfig.h ../../../include/rtdef.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rthw.h ../../../include/rtthread.h ../../../include/rtdebug.h ../../../include/rtservice.h ../../../libcpu/blackfin/bf53x/serial.h $(VDSP)/Blackfin/include/signal.h $(VDSP)/Blackfin/include/sys/signal_bf.h $(VDSP)/Blackfin/include/sys/platform.h $(VDSP)/Blackfin/include/sys/_adi_platform.h $(VDSP)/Blackfin/include/cdefBF533.h $(VDSP)/Blackfin/include/cdefBF532.h $(VDSP)/Blackfin/include/defBF532.h $(VDSP)/Blackfin/include/def_LPBlackfin.h $(VDSP)/Blackfin/include/cdef_LPBlackfin.h $(VDSP)/Blackfin/include/ccblkfn.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/builtins.h $(VDSP)/Blackfin/include/sys/builtins_support.h $(VDSP)/Blackfin/include/fract_typedef.h $(VDSP)/Blackfin/include/fr2x16_typedef.h $(VDSP)/Blackfin/include/r2x16_typedef.h $(VDSP)/Blackfin/include/raw_typedef.h $(VDSP)/Blackfin/include/sys/anomaly_macros_rtl.h $(VDSP)/Blackfin/include/sys/mc_typedef.h $(VDSP)/Blackfin/include/sysreg.h $(VDSP)/Blackfin/include/string.h $(VDSP)/Blackfin/include/sys/exception.h $(VDSP)/Blackfin/include/stdio.h $(VDSP)/Blackfin/include/sys/stdio_bf.h
|
||||
@echo "..\board.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\board.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\board.doj -MM
|
||||
|
||||
./Debug/clock.doj :../../../src/clock.c ../../../include/rthw.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h
|
||||
@echo "..\..\..\src\clock.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\clock.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\clock.doj -MM
|
||||
|
||||
./Debug/cmd.doj :../../../components/finsh/cmd.c ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h ../../../components/finsh/finsh.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h
|
||||
@echo "..\..\..\components\finsh\cmd.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\components\finsh\cmd.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\cmd.doj -MM
|
||||
|
||||
./Debug/context_vdsp.doj :../../../libcpu/blackfin/bf53x/context_vdsp.S
|
||||
@echo "..\..\..\libcpu\blackfin\bf53x\context_vdsp.S"
|
||||
$(VDSP)/easmblkfn.exe ..\..\..\libcpu\blackfin\bf53x\context_vdsp.S -proc ADSP-BF533 -file-attr ProjectName=bf533 -g -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -o .\Debug\context_vdsp.doj -MM
|
||||
|
||||
./Debug/cpuport.doj :../../../libcpu/blackfin/bf53x/cpuport.c ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h
|
||||
@echo "..\..\..\libcpu\blackfin\bf53x\cpuport.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\libcpu\blackfin\bf53x\cpuport.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\cpuport.doj -MM
|
||||
|
||||
./Debug/device.doj :../../../src/device.c ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h
|
||||
@echo "..\..\..\src\device.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\device.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\device.doj -MM
|
||||
|
||||
./Debug/finsh_compiler.doj :../../../components/finsh/finsh_compiler.c ../../../components/finsh/finsh.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h ../../../components/finsh/finsh_node.h ../../../components/finsh/finsh_error.h ../../../components/finsh/finsh_var.h ../../../components/finsh/finsh_ops.h ../../../components/finsh/finsh_vm.h
|
||||
@echo "..\..\..\components\finsh\finsh_compiler.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\components\finsh\finsh_compiler.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\finsh_compiler.doj -MM
|
||||
|
||||
./Debug/finsh_error.doj :../../../components/finsh/finsh_error.c ../../../components/finsh/finsh_error.h ../../../components/finsh/finsh.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h
|
||||
@echo "..\..\..\components\finsh\finsh_error.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\components\finsh\finsh_error.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\finsh_error.doj -MM
|
||||
|
||||
./Debug/finsh_heap.doj :../../../components/finsh/finsh_heap.c ../../../components/finsh/finsh.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h ../../../components/finsh/finsh_var.h
|
||||
@echo "..\..\..\components\finsh\finsh_heap.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\components\finsh\finsh_heap.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\finsh_heap.doj -MM
|
||||
|
||||
./Debug/finsh_init.doj :../../../components/finsh/finsh_init.c ../../../components/finsh/finsh.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h ../../../components/finsh/finsh_node.h ../../../components/finsh/finsh_vm.h ../../../components/finsh/finsh_var.h ../../../components/finsh/finsh_parser.h ../../../components/finsh/finsh_error.h ../../../components/finsh/finsh_heap.h
|
||||
@echo "..\..\..\components\finsh\finsh_init.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\components\finsh\finsh_init.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\finsh_init.doj -MM
|
||||
|
||||
./Debug/finsh_node.doj :../../../components/finsh/finsh_node.c ../../../components/finsh/finsh.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h ../../../components/finsh/finsh_node.h ../../../components/finsh/finsh_error.h ../../../components/finsh/finsh_var.h ../../../components/finsh/finsh_heap.h
|
||||
@echo "..\..\..\components\finsh\finsh_node.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\components\finsh\finsh_node.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\finsh_node.doj -MM
|
||||
|
||||
./Debug/finsh_ops.doj :../../../components/finsh/finsh_ops.c ../../../components/finsh/finsh_ops.h ../../../components/finsh/finsh_vm.h ../../../components/finsh/finsh.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h ../../../components/finsh/finsh_var.h
|
||||
@echo "..\..\..\components\finsh\finsh_ops.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\components\finsh\finsh_ops.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\finsh_ops.doj -MM
|
||||
|
||||
./Debug/finsh_parser.doj :../../../components/finsh/finsh_parser.c ../../../components/finsh/finsh.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h ../../../components/finsh/finsh_token.h ../../../components/finsh/finsh_node.h ../../../components/finsh/finsh_error.h ../../../components/finsh/finsh_parser.h ../../../components/finsh/finsh_var.h
|
||||
@echo "..\..\..\components\finsh\finsh_parser.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\components\finsh\finsh_parser.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\finsh_parser.doj -MM
|
||||
|
||||
./Debug/finsh_token.doj :../../../components/finsh/finsh_token.c ../../../components/finsh/finsh.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h ../../../components/finsh/finsh_token.h ../../../components/finsh/finsh_error.h
|
||||
@echo "..\..\..\components\finsh\finsh_token.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\components\finsh\finsh_token.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\finsh_token.doj -MM
|
||||
|
||||
./Debug/finsh_var.doj :../../../components/finsh/finsh_var.c ../../../components/finsh/finsh.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h ../../../components/finsh/finsh_var.h
|
||||
@echo "..\..\..\components\finsh\finsh_var.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\components\finsh\finsh_var.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\finsh_var.doj -MM
|
||||
|
||||
./Debug/finsh_vm.doj :../../../components/finsh/finsh_vm.c ../../../components/finsh/finsh.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h ../../../components/finsh/finsh_vm.h ../../../components/finsh/finsh_var.h ../../../components/finsh/finsh_ops.h
|
||||
@echo "..\..\..\components\finsh\finsh_vm.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\components\finsh\finsh_vm.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\finsh_vm.doj -MM
|
||||
|
||||
./Debug/idle.doj :../../../src/idle.c ../../../include/rthw.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h
|
||||
@echo "..\..\..\src\idle.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\idle.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\idle.doj -MM
|
||||
|
||||
./Debug/ipc.doj :../../../src/ipc.c ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h ../../../include/rthw.h
|
||||
@echo "..\..\..\src\ipc.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\ipc.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\ipc.doj -MM
|
||||
|
||||
./Debug/irq.doj :../../../src/irq.c ../../../include/rthw.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h
|
||||
@echo "..\..\..\src\irq.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\irq.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\irq.doj -MM
|
||||
|
||||
./Debug/kservice.doj :../../../src/kservice.c ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h ../../../include/rthw.h
|
||||
@echo "..\..\..\src\kservice.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\kservice.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\kservice.doj -MM
|
||||
|
||||
./Debug/mem.doj :../../../src/mem.c ../../../include/rthw.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h ../../../components/finsh/finsh.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h
|
||||
@echo "..\..\..\src\mem.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\mem.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\mem.doj -MM
|
||||
|
||||
./Debug/mempool.doj :../../../src/mempool.c ../../../include/rthw.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h
|
||||
@echo "..\..\..\src\mempool.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\mempool.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\mempool.doj -MM
|
||||
|
||||
./Debug/module.doj :../../../src/module.c ../../../include/rthw.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h ../../../include/rtm.h $(VDSP)/Blackfin/include/string.h
|
||||
@echo "..\..\..\src\module.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\module.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\module.doj -MM
|
||||
|
||||
./Debug/object.doj :../../../src/object.c ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h ../../../include/rthw.h
|
||||
@echo "..\..\..\src\object.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\object.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\object.doj -MM
|
||||
|
||||
./Debug/rtm.doj :../../../src/rtm.c ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h $(VDSP)/Blackfin/include/assert.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h $(VDSP)/Blackfin/include/stdio.h $(VDSP)/Blackfin/include/sys/stdio_bf.h
|
||||
@echo "..\..\..\src\rtm.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\rtm.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\rtm.doj -MM
|
||||
|
||||
./Debug/scheduler.doj :../../../src/scheduler.c ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h ../../../include/rthw.h
|
||||
@echo "..\..\..\src\scheduler.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\scheduler.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\scheduler.doj -MM
|
||||
|
||||
./Debug/serial.doj :../../../libcpu/blackfin/bf53x/serial.c ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h ../../../libcpu/blackfin/bf53x/serial.h ../../../include/rthw.h
|
||||
@echo "..\..\..\libcpu\blackfin\bf53x\serial.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\libcpu\blackfin\bf53x\serial.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\serial.doj -MM
|
||||
|
||||
./Debug/shell.doj :../../../components/finsh/shell.c ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h ../../../include/rthw.h ../../../components/finsh/finsh.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h ../../../components/finsh/shell.h
|
||||
@echo "..\..\..\components\finsh\shell.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\components\finsh\shell.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\shell.doj -MM
|
||||
|
||||
./Debug/slab.doj :../../../src/slab.c ../../../include/rthw.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h
|
||||
@echo "..\..\..\src\slab.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\slab.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\slab.doj -MM
|
||||
|
||||
./Debug/startup.doj :../startup.c ../../../include/rthw.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h ../application.h ../board.h ../../../libcpu/blackfin/bf53x/serial.h ../../../components/finsh/finsh.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h
|
||||
@echo "..\startup.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\startup.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\startup.doj -MM
|
||||
|
||||
./Debug/symbol.doj :../../../components/finsh/symbol.c ../../../components/finsh/finsh.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h
|
||||
@echo "..\..\..\components\finsh\symbol.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\components\finsh\symbol.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\symbol.doj -MM
|
||||
|
||||
./Debug/thread.doj :../../../src/thread.c ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h ../../../include/rthw.h
|
||||
@echo "..\..\..\src\thread.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\thread.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\thread.doj -MM
|
||||
|
||||
./Debug/timer.doj :../../../src/timer.c ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h ../../../include/rthw.h
|
||||
@echo "..\..\..\src\timer.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\timer.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\timer.doj -MM
|
||||
|
||||
./Debug/bf533.dxe :./bf533_ram.ldf ./Debug/bf533_basiccrt.doj $(VDSP)/Blackfin/lib/bf532_rev_0.5/libprofile532y.dlb ./Debug/application.doj ./Debug/bf533_heaptab.doj ./Debug/board.doj ./Debug/clock.doj ./Debug/cmd.doj ./Debug/context_vdsp.doj ./Debug/cpuport.doj ./Debug/device.doj ./Debug/finsh_compiler.doj ./Debug/finsh_error.doj ./Debug/finsh_heap.doj ./Debug/finsh_init.doj ./Debug/finsh_node.doj ./Debug/finsh_ops.doj ./Debug/finsh_parser.doj ./Debug/finsh_token.doj ./Debug/finsh_var.doj ./Debug/finsh_vm.doj ./Debug/idle.doj ./Debug/ipc.doj ./Debug/irq.doj ./Debug/kservice.doj ./Debug/mem.doj ./Debug/mempool.doj ./Debug/module.doj ./Debug/object.doj ./Debug/rtm.doj ./Debug/scheduler.doj ./Debug/serial.doj ./Debug/shell.doj ./Debug/slab.doj ./Debug/startup.doj ./Debug/symbol.doj ./Debug/thread.doj ./Debug/timer.doj $(VDSP)/Blackfin/lib/cplbtab533.doj $(VDSP)/Blackfin/lib/bf532_rev_0.5/crtn532y.doj $(VDSP)/Blackfin/lib/bf532_rev_0.5/libsmall532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/libio532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/libc532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/libevent532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/libx532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/libcpp532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/libcpprt532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/libf64ieee532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/libdsp532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/libsftflt532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/libetsi532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/Debug/libssl532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/Debug/libdrv532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/Debug/libusb532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/idle532mty.doj $(VDSP)/Blackfin/lib/bf532_rev_0.5/librt_fileio532y.dlb
|
||||
@echo "Linking..."
|
||||
$(VDSP)/ccblkfn.exe .\Debug\application.doj .\Debug\bf533_basiccrt.doj .\Debug\bf533_heaptab.doj .\Debug\board.doj .\Debug\clock.doj .\Debug\cmd.doj .\Debug\context_vdsp.doj .\Debug\cpuport.doj .\Debug\device.doj .\Debug\finsh_compiler.doj .\Debug\finsh_error.doj .\Debug\finsh_heap.doj .\Debug\finsh_init.doj .\Debug\finsh_node.doj .\Debug\finsh_ops.doj .\Debug\finsh_parser.doj .\Debug\finsh_token.doj .\Debug\finsh_var.doj .\Debug\finsh_vm.doj .\Debug\idle.doj .\Debug\ipc.doj .\Debug\irq.doj .\Debug\kservice.doj .\Debug\mem.doj .\Debug\mempool.doj .\Debug\module.doj .\Debug\object.doj .\Debug\rtm.doj .\Debug\scheduler.doj .\Debug\serial.doj .\Debug\shell.doj .\Debug\slab.doj .\Debug\startup.doj .\Debug\symbol.doj .\Debug\thread.doj .\Debug\timer.doj -map .\Debug\bf533.map.xml -L .\Debug -flags-link -MDUSE_FILEIO,-MD__cplusplus,-MDUSER_CRT=ADI_QUOTEbf533_basiccrt.dojADI_QUOTE,-MDUSE_CACHE,-MDUSE_INSTRUCTION_CACHE -flags-link -e -add-debug-libpaths -flags-link -od,.\Debug -o .\Debug\bf533.dxe -proc ADSP-BF533 -flags-link -T,./bf533_ram.ldf -MM
|
||||
|
||||
./Debug/bf533.ldr :./Debug/bf533.dxe
|
||||
@echo "Creating loader file..."
|
||||
$(VDSP)/elfloader.exe .\Debug\bf533.dxe -b Flash -f BINARY -Width 16 -init ./bf533_init.dxe -o .\Debug\bf533.ldr -proc ADSP-BF533 -MM
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(MAKECMDGOALS),bf533_Debug_clean)
|
||||
|
||||
bf533_Debug_clean:
|
||||
-$(RM) ".\Debug\application.doj"
|
||||
-$(RM) ".\Debug\bf533_basiccrt.doj"
|
||||
-$(RM) ".\Debug\bf533_heaptab.doj"
|
||||
-$(RM) ".\Debug\board.doj"
|
||||
-$(RM) ".\Debug\clock.doj"
|
||||
-$(RM) ".\Debug\cmd.doj"
|
||||
-$(RM) ".\Debug\context_vdsp.doj"
|
||||
-$(RM) ".\Debug\cpuport.doj"
|
||||
-$(RM) ".\Debug\device.doj"
|
||||
-$(RM) ".\Debug\finsh_compiler.doj"
|
||||
-$(RM) ".\Debug\finsh_error.doj"
|
||||
-$(RM) ".\Debug\finsh_heap.doj"
|
||||
-$(RM) ".\Debug\finsh_init.doj"
|
||||
-$(RM) ".\Debug\finsh_node.doj"
|
||||
-$(RM) ".\Debug\finsh_ops.doj"
|
||||
-$(RM) ".\Debug\finsh_parser.doj"
|
||||
-$(RM) ".\Debug\finsh_token.doj"
|
||||
-$(RM) ".\Debug\finsh_var.doj"
|
||||
-$(RM) ".\Debug\finsh_vm.doj"
|
||||
-$(RM) ".\Debug\idle.doj"
|
||||
-$(RM) ".\Debug\ipc.doj"
|
||||
-$(RM) ".\Debug\irq.doj"
|
||||
-$(RM) ".\Debug\kservice.doj"
|
||||
-$(RM) ".\Debug\mem.doj"
|
||||
-$(RM) ".\Debug\mempool.doj"
|
||||
-$(RM) ".\Debug\module.doj"
|
||||
-$(RM) ".\Debug\object.doj"
|
||||
-$(RM) ".\Debug\rtm.doj"
|
||||
-$(RM) ".\Debug\scheduler.doj"
|
||||
-$(RM) ".\Debug\serial.doj"
|
||||
-$(RM) ".\Debug\shell.doj"
|
||||
-$(RM) ".\Debug\slab.doj"
|
||||
-$(RM) ".\Debug\startup.doj"
|
||||
-$(RM) ".\Debug\symbol.doj"
|
||||
-$(RM) ".\Debug\thread.doj"
|
||||
-$(RM) ".\Debug\timer.doj"
|
||||
-$(RM) ".\Debug\bf533.dxe"
|
||||
-$(RM) ".\Debug\bf533.ldr"
|
||||
-$(RM) ".\Debug\*.ipa"
|
||||
-$(RM) ".\Debug\*.opa"
|
||||
-$(RM) ".\Debug\*.ti"
|
||||
-$(RM) ".\Debug\*.pgi"
|
||||
-$(RM) ".\*.rbld"
|
||||
|
||||
endif
|
||||
|
||||
|
||||
# Generated by the VisualDSP++ IDDE
|
||||
|
||||
# Note: Any changes made to this Makefile will be lost the next time the
|
||||
# matching project file is loaded into the IDDE. If you wish to preserve
|
||||
# changes, rename this file and run it externally to the IDDE.
|
||||
|
||||
# The syntax of this Makefile is such that GNU Make v3.77 or higher is
|
||||
# required.
|
||||
|
||||
# The current working directory should be the directory in which this
|
||||
# Makefile resides.
|
||||
|
||||
# Supported targets:
|
||||
# bf533_Debug
|
||||
# bf533_Debug_clean
|
||||
|
||||
# Define this variable if you wish to run this Makefile on a host
|
||||
# other than the host that created it and VisualDSP++ may be installed
|
||||
# in a different directory.
|
||||
|
||||
ADI_DSP=C:\Program Files (x86)\Analog Devices\VisualDSP 5.0
|
||||
|
||||
|
||||
# $VDSP is a gmake-friendly version of ADI_DIR
|
||||
|
||||
empty:=
|
||||
space:= $(empty) $(empty)
|
||||
VDSP_INTERMEDIATE=$(subst \,/,$(ADI_DSP))
|
||||
VDSP=$(subst $(space),\$(space),$(VDSP_INTERMEDIATE))
|
||||
|
||||
RM=cmd /C del /F /Q
|
||||
|
||||
#
|
||||
# Begin "bf533_Debug" configuration
|
||||
#
|
||||
|
||||
ifeq ($(MAKECMDGOALS),bf533_Debug)
|
||||
|
||||
bf533_Debug : ./Debug/bf533.ldr
|
||||
|
||||
./Debug/application.doj :../application.c ../application.h ../board.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h
|
||||
@echo "..\application.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\application.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\application.doj -MM
|
||||
|
||||
./Debug/bf533_basiccrt.doj :./bf533_basiccrt.s $(VDSP)/Blackfin/include/cplb.h $(VDSP)/Blackfin/include/defBF532.h $(VDSP)/Blackfin/include/defBF533.h $(VDSP)/Blackfin/include/def_LPBlackfin.h $(VDSP)/Blackfin/include/sys/_adi_platform.h $(VDSP)/Blackfin/include/sys/anomaly_macros_rtl.h $(VDSP)/Blackfin/include/sys/platform.h
|
||||
@echo ".\bf533_basiccrt.s"
|
||||
$(VDSP)/easmblkfn.exe .\bf533_basiccrt.s -proc ADSP-BF533 -file-attr ProjectName=bf533 -g -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -o .\Debug\bf533_basiccrt.doj -MM
|
||||
|
||||
./Debug/bf533_heaptab.doj :bf533_heaptab.c
|
||||
@echo ".\bf533_heaptab.c"
|
||||
$(VDSP)/ccblkfn.exe -c .\bf533_heaptab.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\bf533_heaptab.doj -MM
|
||||
|
||||
./Debug/board.doj :../board.c ../board.h ../rtconfig.h ../../../include/rtdef.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rthw.h ../../../include/rtthread.h ../../../include/rtdebug.h ../../../include/rtservice.h ../../../libcpu/blackfin/bf53x/serial.h $(VDSP)/Blackfin/include/signal.h $(VDSP)/Blackfin/include/sys/signal_bf.h $(VDSP)/Blackfin/include/sys/platform.h $(VDSP)/Blackfin/include/sys/_adi_platform.h $(VDSP)/Blackfin/include/cdefBF533.h $(VDSP)/Blackfin/include/cdefBF532.h $(VDSP)/Blackfin/include/defBF532.h $(VDSP)/Blackfin/include/def_LPBlackfin.h $(VDSP)/Blackfin/include/cdef_LPBlackfin.h $(VDSP)/Blackfin/include/ccblkfn.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/builtins.h $(VDSP)/Blackfin/include/sys/builtins_support.h $(VDSP)/Blackfin/include/fract_typedef.h $(VDSP)/Blackfin/include/fr2x16_typedef.h $(VDSP)/Blackfin/include/r2x16_typedef.h $(VDSP)/Blackfin/include/raw_typedef.h $(VDSP)/Blackfin/include/sys/anomaly_macros_rtl.h $(VDSP)/Blackfin/include/sys/mc_typedef.h $(VDSP)/Blackfin/include/sysreg.h $(VDSP)/Blackfin/include/string.h $(VDSP)/Blackfin/include/sys/exception.h $(VDSP)/Blackfin/include/stdio.h $(VDSP)/Blackfin/include/sys/stdio_bf.h
|
||||
@echo "..\board.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\board.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\board.doj -MM
|
||||
|
||||
./Debug/clock.doj :../../../src/clock.c ../../../include/rthw.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h
|
||||
@echo "..\..\..\src\clock.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\clock.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\clock.doj -MM
|
||||
|
||||
./Debug/cmd.doj :../../../components/finsh/cmd.c ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h ../../../components/finsh/finsh.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h
|
||||
@echo "..\..\..\components\finsh\cmd.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\components\finsh\cmd.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\cmd.doj -MM
|
||||
|
||||
./Debug/context_vdsp.doj :../../../libcpu/blackfin/bf53x/context_vdsp.S
|
||||
@echo "..\..\..\libcpu\blackfin\bf53x\context_vdsp.S"
|
||||
$(VDSP)/easmblkfn.exe ..\..\..\libcpu\blackfin\bf53x\context_vdsp.S -proc ADSP-BF533 -file-attr ProjectName=bf533 -g -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -o .\Debug\context_vdsp.doj -MM
|
||||
|
||||
./Debug/cpuport.doj :../../../libcpu/blackfin/bf53x/cpuport.c ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h
|
||||
@echo "..\..\..\libcpu\blackfin\bf53x\cpuport.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\libcpu\blackfin\bf53x\cpuport.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\cpuport.doj -MM
|
||||
|
||||
./Debug/device.doj :../../../src/device.c ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h
|
||||
@echo "..\..\..\src\device.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\device.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\device.doj -MM
|
||||
|
||||
./Debug/finsh_compiler.doj :../../../components/finsh/finsh_compiler.c ../../../components/finsh/finsh.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h ../../../components/finsh/finsh_node.h ../../../components/finsh/finsh_error.h ../../../components/finsh/finsh_var.h ../../../components/finsh/finsh_ops.h ../../../components/finsh/finsh_vm.h
|
||||
@echo "..\..\..\components\finsh\finsh_compiler.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\components\finsh\finsh_compiler.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\finsh_compiler.doj -MM
|
||||
|
||||
./Debug/finsh_error.doj :../../../components/finsh/finsh_error.c ../../../components/finsh/finsh_error.h ../../../components/finsh/finsh.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h
|
||||
@echo "..\..\..\components\finsh\finsh_error.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\components\finsh\finsh_error.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\finsh_error.doj -MM
|
||||
|
||||
./Debug/finsh_heap.doj :../../../components/finsh/finsh_heap.c ../../../components/finsh/finsh.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h ../../../components/finsh/finsh_var.h
|
||||
@echo "..\..\..\components\finsh\finsh_heap.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\components\finsh\finsh_heap.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\finsh_heap.doj -MM
|
||||
|
||||
./Debug/finsh_init.doj :../../../components/finsh/finsh_init.c ../../../components/finsh/finsh.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h ../../../components/finsh/finsh_node.h ../../../components/finsh/finsh_vm.h ../../../components/finsh/finsh_var.h ../../../components/finsh/finsh_parser.h ../../../components/finsh/finsh_error.h ../../../components/finsh/finsh_heap.h
|
||||
@echo "..\..\..\components\finsh\finsh_init.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\components\finsh\finsh_init.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\finsh_init.doj -MM
|
||||
|
||||
./Debug/finsh_node.doj :../../../components/finsh/finsh_node.c ../../../components/finsh/finsh.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h ../../../components/finsh/finsh_node.h ../../../components/finsh/finsh_error.h ../../../components/finsh/finsh_var.h ../../../components/finsh/finsh_heap.h
|
||||
@echo "..\..\..\components\finsh\finsh_node.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\components\finsh\finsh_node.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\finsh_node.doj -MM
|
||||
|
||||
./Debug/finsh_ops.doj :../../../components/finsh/finsh_ops.c ../../../components/finsh/finsh_ops.h ../../../components/finsh/finsh_vm.h ../../../components/finsh/finsh.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h ../../../components/finsh/finsh_var.h
|
||||
@echo "..\..\..\components\finsh\finsh_ops.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\components\finsh\finsh_ops.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\finsh_ops.doj -MM
|
||||
|
||||
./Debug/finsh_parser.doj :../../../components/finsh/finsh_parser.c ../../../components/finsh/finsh.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h ../../../components/finsh/finsh_token.h ../../../components/finsh/finsh_node.h ../../../components/finsh/finsh_error.h ../../../components/finsh/finsh_parser.h ../../../components/finsh/finsh_var.h
|
||||
@echo "..\..\..\components\finsh\finsh_parser.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\components\finsh\finsh_parser.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\finsh_parser.doj -MM
|
||||
|
||||
./Debug/finsh_token.doj :../../../components/finsh/finsh_token.c ../../../components/finsh/finsh.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h ../../../components/finsh/finsh_token.h ../../../components/finsh/finsh_error.h
|
||||
@echo "..\..\..\components\finsh\finsh_token.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\components\finsh\finsh_token.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\finsh_token.doj -MM
|
||||
|
||||
./Debug/finsh_var.doj :../../../components/finsh/finsh_var.c ../../../components/finsh/finsh.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h ../../../components/finsh/finsh_var.h
|
||||
@echo "..\..\..\components\finsh\finsh_var.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\components\finsh\finsh_var.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\finsh_var.doj -MM
|
||||
|
||||
./Debug/finsh_vm.doj :../../../components/finsh/finsh_vm.c ../../../components/finsh/finsh.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h ../../../components/finsh/finsh_vm.h ../../../components/finsh/finsh_var.h ../../../components/finsh/finsh_ops.h
|
||||
@echo "..\..\..\components\finsh\finsh_vm.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\components\finsh\finsh_vm.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\finsh_vm.doj -MM
|
||||
|
||||
./Debug/idle.doj :../../../src/idle.c ../../../include/rthw.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h
|
||||
@echo "..\..\..\src\idle.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\idle.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\idle.doj -MM
|
||||
|
||||
./Debug/ipc.doj :../../../src/ipc.c ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h ../../../include/rthw.h
|
||||
@echo "..\..\..\src\ipc.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\ipc.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\ipc.doj -MM
|
||||
|
||||
./Debug/irq.doj :../../../src/irq.c ../../../include/rthw.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h
|
||||
@echo "..\..\..\src\irq.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\irq.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\irq.doj -MM
|
||||
|
||||
./Debug/kservice.doj :../../../src/kservice.c ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h ../../../include/rthw.h
|
||||
@echo "..\..\..\src\kservice.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\kservice.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\kservice.doj -MM
|
||||
|
||||
./Debug/mem.doj :../../../src/mem.c ../../../include/rthw.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h ../../../components/finsh/finsh.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h
|
||||
@echo "..\..\..\src\mem.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\mem.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\mem.doj -MM
|
||||
|
||||
./Debug/mempool.doj :../../../src/mempool.c ../../../include/rthw.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h
|
||||
@echo "..\..\..\src\mempool.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\mempool.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\mempool.doj -MM
|
||||
|
||||
./Debug/module.doj :../../../src/module.c ../../../include/rthw.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h ../../../include/rtm.h $(VDSP)/Blackfin/include/string.h
|
||||
@echo "..\..\..\src\module.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\module.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\module.doj -MM
|
||||
|
||||
./Debug/object.doj :../../../src/object.c ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h ../../../include/rthw.h
|
||||
@echo "..\..\..\src\object.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\object.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\object.doj -MM
|
||||
|
||||
./Debug/rtm.doj :../../../src/rtm.c ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h $(VDSP)/Blackfin/include/assert.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h $(VDSP)/Blackfin/include/stdio.h $(VDSP)/Blackfin/include/sys/stdio_bf.h
|
||||
@echo "..\..\..\src\rtm.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\rtm.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\rtm.doj -MM
|
||||
|
||||
./Debug/scheduler.doj :../../../src/scheduler.c ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h ../../../include/rthw.h
|
||||
@echo "..\..\..\src\scheduler.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\scheduler.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\scheduler.doj -MM
|
||||
|
||||
./Debug/serial.doj :../../../libcpu/blackfin/bf53x/serial.c ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h ../../../libcpu/blackfin/bf53x/serial.h ../../../include/rthw.h
|
||||
@echo "..\..\..\libcpu\blackfin\bf53x\serial.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\libcpu\blackfin\bf53x\serial.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\serial.doj -MM
|
||||
|
||||
./Debug/shell.doj :../../../components/finsh/shell.c ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h ../../../include/rthw.h ../../../components/finsh/finsh.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h ../../../components/finsh/shell.h
|
||||
@echo "..\..\..\components\finsh\shell.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\components\finsh\shell.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\shell.doj -MM
|
||||
|
||||
./Debug/slab.doj :../../../src/slab.c ../../../include/rthw.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h
|
||||
@echo "..\..\..\src\slab.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\slab.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\slab.doj -MM
|
||||
|
||||
./Debug/startup.doj :../startup.c ../../../include/rthw.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h ../application.h ../board.h ../../../libcpu/blackfin/bf53x/serial.h ../../../components/finsh/finsh.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h
|
||||
@echo "..\startup.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\startup.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\startup.doj -MM
|
||||
|
||||
./Debug/symbol.doj :../../../components/finsh/symbol.c ../../../components/finsh/finsh.h ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h $(VDSP)/Blackfin/include/ctype.h $(VDSP)/Blackfin/include/stdlib.h $(VDSP)/Blackfin/include/stdlib_bf.h $(VDSP)/Blackfin/include/string.h
|
||||
@echo "..\..\..\components\finsh\symbol.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\components\finsh\symbol.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\symbol.doj -MM
|
||||
|
||||
./Debug/thread.doj :../../../src/thread.c ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h ../../../include/rthw.h
|
||||
@echo "..\..\..\src\thread.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\thread.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\thread.doj -MM
|
||||
|
||||
./Debug/timer.doj :../../../src/timer.c ../../../include/rtthread.h ../../../include/rtdef.h ../rtconfig.h $(VDSP)/Blackfin/include/stdarg.h $(VDSP)/Blackfin/include/yvals.h ../../../include/rtdebug.h ../../../include/rtservice.h ../../../include/rthw.h
|
||||
@echo "..\..\..\src\timer.c"
|
||||
$(VDSP)/ccblkfn.exe -c ..\..\..\src\timer.c -file-attr ProjectName=bf533 -g -structs-do-not-overlap -no-multiline -I ../../../include -I ../ -I ../../../components/finsh -I ../../../libcpu/blackfin/bf53x -I ../../../src -double-size-64 -decls-strong -warn-protos -proc ADSP-BF533 -o .\Debug\timer.doj -MM
|
||||
|
||||
./Debug/bf533.dxe :./bf533_ram.ldf ./Debug/bf533_basiccrt.doj $(VDSP)/Blackfin/lib/bf532_rev_0.5/libprofile532y.dlb ./Debug/application.doj ./Debug/bf533_heaptab.doj ./Debug/board.doj ./Debug/clock.doj ./Debug/cmd.doj ./Debug/context_vdsp.doj ./Debug/cpuport.doj ./Debug/device.doj ./Debug/finsh_compiler.doj ./Debug/finsh_error.doj ./Debug/finsh_heap.doj ./Debug/finsh_init.doj ./Debug/finsh_node.doj ./Debug/finsh_ops.doj ./Debug/finsh_parser.doj ./Debug/finsh_token.doj ./Debug/finsh_var.doj ./Debug/finsh_vm.doj ./Debug/idle.doj ./Debug/ipc.doj ./Debug/irq.doj ./Debug/kservice.doj ./Debug/mem.doj ./Debug/mempool.doj ./Debug/module.doj ./Debug/object.doj ./Debug/rtm.doj ./Debug/scheduler.doj ./Debug/serial.doj ./Debug/shell.doj ./Debug/slab.doj ./Debug/startup.doj ./Debug/symbol.doj ./Debug/thread.doj ./Debug/timer.doj $(VDSP)/Blackfin/lib/cplbtab533.doj $(VDSP)/Blackfin/lib/bf532_rev_0.5/crtn532y.doj $(VDSP)/Blackfin/lib/bf532_rev_0.5/libsmall532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/libio532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/libc532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/libevent532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/libx532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/libcpp532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/libcpprt532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/libf64ieee532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/libdsp532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/libsftflt532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/libetsi532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/Debug/libssl532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/Debug/libdrv532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/Debug/libusb532y.dlb $(VDSP)/Blackfin/lib/bf532_rev_0.5/idle532mty.doj $(VDSP)/Blackfin/lib/bf532_rev_0.5/librt_fileio532y.dlb
|
||||
@echo "Linking..."
|
||||
$(VDSP)/ccblkfn.exe .\Debug\application.doj .\Debug\bf533_basiccrt.doj .\Debug\bf533_heaptab.doj .\Debug\board.doj .\Debug\clock.doj .\Debug\cmd.doj .\Debug\context_vdsp.doj .\Debug\cpuport.doj .\Debug\device.doj .\Debug\finsh_compiler.doj .\Debug\finsh_error.doj .\Debug\finsh_heap.doj .\Debug\finsh_init.doj .\Debug\finsh_node.doj .\Debug\finsh_ops.doj .\Debug\finsh_parser.doj .\Debug\finsh_token.doj .\Debug\finsh_var.doj .\Debug\finsh_vm.doj .\Debug\idle.doj .\Debug\ipc.doj .\Debug\irq.doj .\Debug\kservice.doj .\Debug\mem.doj .\Debug\mempool.doj .\Debug\module.doj .\Debug\object.doj .\Debug\rtm.doj .\Debug\scheduler.doj .\Debug\serial.doj .\Debug\shell.doj .\Debug\slab.doj .\Debug\startup.doj .\Debug\symbol.doj .\Debug\thread.doj .\Debug\timer.doj -map .\Debug\bf533.map.xml -L .\Debug -flags-link -MDUSE_FILEIO,-MD__cplusplus,-MDUSER_CRT=ADI_QUOTEbf533_basiccrt.dojADI_QUOTE,-MDUSE_CACHE,-MDUSE_INSTRUCTION_CACHE -flags-link -e -add-debug-libpaths -flags-link -od,.\Debug -o .\Debug\bf533.dxe -proc ADSP-BF533 -flags-link -T,./bf533_ram.ldf -MM
|
||||
|
||||
./Debug/bf533.ldr :./Debug/bf533.dxe
|
||||
@echo "Creating loader file..."
|
||||
$(VDSP)/elfloader.exe .\Debug\bf533.dxe -b Flash -f BINARY -Width 16 -init ./bf533_init.dxe -o .\Debug\bf533.ldr -proc ADSP-BF533 -MM
|
||||
|
||||
endif
|
||||
|
||||
ifeq ($(MAKECMDGOALS),bf533_Debug_clean)
|
||||
|
||||
bf533_Debug_clean:
|
||||
-$(RM) ".\Debug\application.doj"
|
||||
-$(RM) ".\Debug\bf533_basiccrt.doj"
|
||||
-$(RM) ".\Debug\bf533_heaptab.doj"
|
||||
-$(RM) ".\Debug\board.doj"
|
||||
-$(RM) ".\Debug\clock.doj"
|
||||
-$(RM) ".\Debug\cmd.doj"
|
||||
-$(RM) ".\Debug\context_vdsp.doj"
|
||||
-$(RM) ".\Debug\cpuport.doj"
|
||||
-$(RM) ".\Debug\device.doj"
|
||||
-$(RM) ".\Debug\finsh_compiler.doj"
|
||||
-$(RM) ".\Debug\finsh_error.doj"
|
||||
-$(RM) ".\Debug\finsh_heap.doj"
|
||||
-$(RM) ".\Debug\finsh_init.doj"
|
||||
-$(RM) ".\Debug\finsh_node.doj"
|
||||
-$(RM) ".\Debug\finsh_ops.doj"
|
||||
-$(RM) ".\Debug\finsh_parser.doj"
|
||||
-$(RM) ".\Debug\finsh_token.doj"
|
||||
-$(RM) ".\Debug\finsh_var.doj"
|
||||
-$(RM) ".\Debug\finsh_vm.doj"
|
||||
-$(RM) ".\Debug\idle.doj"
|
||||
-$(RM) ".\Debug\ipc.doj"
|
||||
-$(RM) ".\Debug\irq.doj"
|
||||
-$(RM) ".\Debug\kservice.doj"
|
||||
-$(RM) ".\Debug\mem.doj"
|
||||
-$(RM) ".\Debug\mempool.doj"
|
||||
-$(RM) ".\Debug\module.doj"
|
||||
-$(RM) ".\Debug\object.doj"
|
||||
-$(RM) ".\Debug\rtm.doj"
|
||||
-$(RM) ".\Debug\scheduler.doj"
|
||||
-$(RM) ".\Debug\serial.doj"
|
||||
-$(RM) ".\Debug\shell.doj"
|
||||
-$(RM) ".\Debug\slab.doj"
|
||||
-$(RM) ".\Debug\startup.doj"
|
||||
-$(RM) ".\Debug\symbol.doj"
|
||||
-$(RM) ".\Debug\thread.doj"
|
||||
-$(RM) ".\Debug\timer.doj"
|
||||
-$(RM) ".\Debug\bf533.dxe"
|
||||
-$(RM) ".\Debug\bf533.ldr"
|
||||
-$(RM) ".\Debug\*.ipa"
|
||||
-$(RM) ".\Debug\*.opa"
|
||||
-$(RM) ".\Debug\*.ti"
|
||||
-$(RM) ".\Debug\*.pgi"
|
||||
-$(RM) ".\*.rbld"
|
||||
|
||||
endif
|
||||
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
Import('RTT_ROOT')
|
||||
from building import *
|
||||
|
||||
src_bsp = ['application.c', 'startup.c', 'board.c']
|
||||
if GetDepend('RT_USING_NEWLIB'):
|
||||
src_bsp = src_bsp + ['newlib_stub.c']
|
||||
|
||||
src_drv = ['uart.c', 'lnn800x480.c']
|
||||
src = File(src_bsp + src_drv)
|
||||
CPPPATH = [GetCurrentDir()]
|
||||
group = DefineGroup('Startup', src, depend = [''], CPPPATH = CPPPATH)
|
||||
|
||||
Return('group')
|
||||
Import('RTT_ROOT')
|
||||
from building import *
|
||||
|
||||
src_bsp = ['application.c', 'startup.c', 'board.c']
|
||||
if GetDepend('RT_USING_NEWLIB'):
|
||||
src_bsp = src_bsp + ['newlib_stub.c']
|
||||
|
||||
src_drv = ['uart.c', 'lnn800x480.c']
|
||||
src = File(src_bsp + src_drv)
|
||||
CPPPATH = [GetCurrentDir()]
|
||||
group = DefineGroup('Startup', src, depend = [''], CPPPATH = CPPPATH)
|
||||
|
||||
Return('group')
|
||||
|
||||
@@ -1,32 +1,32 @@
|
||||
import os
|
||||
import sys
|
||||
import rtconfig
|
||||
|
||||
if os.getenv('RTT_ROOT'):
|
||||
RTT_ROOT = os.getenv('RTT_ROOT')
|
||||
else:
|
||||
RTT_ROOT = os.path.normpath(os.getcwd() + '/../..')
|
||||
|
||||
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
|
||||
from building import *
|
||||
|
||||
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
|
||||
|
||||
env = Environment(tools = ['mingw'],
|
||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||
|
||||
Export('RTT_ROOT')
|
||||
Export('rtconfig')
|
||||
|
||||
# prepare building environment
|
||||
objs = PrepareBuilding(env, RTT_ROOT)
|
||||
|
||||
# build program
|
||||
env.Program(TARGET, objs)
|
||||
|
||||
# end building
|
||||
EndBuilding(TARGET)
|
||||
import os
|
||||
import sys
|
||||
import rtconfig
|
||||
|
||||
if os.getenv('RTT_ROOT'):
|
||||
RTT_ROOT = os.getenv('RTT_ROOT')
|
||||
else:
|
||||
RTT_ROOT = os.path.normpath(os.getcwd() + '/../..')
|
||||
|
||||
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
|
||||
from building import *
|
||||
|
||||
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
|
||||
|
||||
env = Environment(tools = ['mingw'],
|
||||
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
|
||||
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||
|
||||
Export('RTT_ROOT')
|
||||
Export('rtconfig')
|
||||
|
||||
# prepare building environment
|
||||
objs = PrepareBuilding(env, RTT_ROOT)
|
||||
|
||||
# build program
|
||||
env.Program(TARGET, objs)
|
||||
|
||||
# end building
|
||||
EndBuilding(TARGET)
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
# download script for boot loader
|
||||
ifaddr dmfe0 192.168.1.100
|
||||
load tftp://192.168.1.5/boot_3210 0x80200000
|
||||
|
||||
# download script for RT-Thread
|
||||
ifaddr dmfe0 192.168.1.100
|
||||
load tftp://192.168.1.5/rtthread.elf
|
||||
|
||||
# burn script for RT-Thread
|
||||
ifaddr dmfe0 192.168.1.100
|
||||
devcp tftp://192.168.1.5/rtthread.elf /dev/mtd0
|
||||
# download script for boot loader
|
||||
ifaddr dmfe0 192.168.1.100
|
||||
load tftp://192.168.1.5/boot_3210 0x80200000
|
||||
|
||||
# download script for RT-Thread
|
||||
ifaddr dmfe0 192.168.1.100
|
||||
load tftp://192.168.1.5/rtthread.elf
|
||||
|
||||
# burn script for RT-Thread
|
||||
ifaddr dmfe0 192.168.1.100
|
||||
devcp tftp://192.168.1.5/rtthread.elf /dev/mtd0
|
||||
|
||||
@@ -1,102 +1,102 @@
|
||||
/*
|
||||
* File : lnn800x480.c
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2010 - 2012, RT-Thread Development Team
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rt-thread.org/license/LICENSE
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2010-01-01 bernard first version from QiuYi's driver
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <soc3210.h>
|
||||
|
||||
/* LCD driver for 800x480 16bit */
|
||||
#define RT_HW_LCD_WIDTH 800
|
||||
#define RT_HW_LCD_HEIGHT 480
|
||||
|
||||
#define K1BASE 0xA0000000
|
||||
#define KSEG1(addr) ((void *)(K1BASE | (rt_uint32_t)(addr)))
|
||||
#define HW_FB_ADDR KSEG1(_rt_framebuffer)
|
||||
#define HW_FB_PIXEL(x, y) *(volatile rt_uint16_t*)((rt_uint8_t*)HW_FB_ADDR + (y * RT_HW_LCD_WIDTH * 2) + x * 2)
|
||||
|
||||
ALIGN(4)
|
||||
volatile rt_uint16_t _rt_framebuffer[RT_HW_LCD_HEIGHT][RT_HW_LCD_WIDTH];
|
||||
static struct rt_device_graphic_info _lcd_info;
|
||||
|
||||
static rt_err_t rt_lcd_init (rt_device_t dev)
|
||||
{
|
||||
/* disable LCD controller */
|
||||
LCD_CTRL = LCD_CTRL & 0xfffe;
|
||||
|
||||
/* set LCD clock */
|
||||
HSB_MISC_REG = (HSB_MISC_REG & 0xFFFD01FF) |
|
||||
(0x01 << 17) | /* enable LCD */
|
||||
(0x05 << 9); /* clock */
|
||||
|
||||
LCD_VBARA = (rt_uint32_t)_rt_framebuffer - 0x80000000;
|
||||
LCD_VBARB = (rt_uint32_t)_rt_framebuffer - 0x80000000;
|
||||
|
||||
LCD_HTIM = 0x12c031f;
|
||||
LCD_VTIM = 0x11501df;
|
||||
LCD_HVLEN = 0x41e0279;
|
||||
|
||||
LCD_CTRL = 0x8709;
|
||||
|
||||
rt_kprintf("VBARA 0x%08x\n", LCD_VBARA);
|
||||
rt_kprintf("CTRL 0x%08x\n", LCD_CTRL);
|
||||
rt_kprintf("HTIM 0x%08x\n", LCD_HTIM);
|
||||
rt_kprintf("VTIM 0x%08x\n", LCD_VTIM);
|
||||
rt_kprintf("HVLEN 0x%08x\n", LCD_HVLEN);
|
||||
rt_kprintf("HSB_MISC 0x%08x\n", HSB_MISC_REG);
|
||||
|
||||
return RT_EOK;
|
||||
}
|
||||
|
||||
static rt_err_t rt_lcd_control (rt_device_t dev, rt_uint8_t cmd, void *args)
|
||||
{
|
||||
switch (cmd)
|
||||
{
|
||||
case RTGRAPHIC_CTRL_RECT_UPDATE:
|
||||
break;
|
||||
case RTGRAPHIC_CTRL_POWERON:
|
||||
break;
|
||||
case RTGRAPHIC_CTRL_POWEROFF:
|
||||
break;
|
||||
case RTGRAPHIC_CTRL_GET_INFO:
|
||||
rt_memcpy(args, &_lcd_info, sizeof(_lcd_info));
|
||||
break;
|
||||
case RTGRAPHIC_CTRL_SET_MODE:
|
||||
break;
|
||||
}
|
||||
|
||||
return RT_EOK;
|
||||
}
|
||||
|
||||
void rt_hw_lcd_init(void)
|
||||
{
|
||||
rt_device_t lcd = rt_malloc(sizeof(struct rt_device));
|
||||
if (lcd == RT_NULL)
|
||||
return; /* no memory yet */
|
||||
|
||||
_lcd_info.bits_per_pixel = 16;
|
||||
_lcd_info.pixel_format = RTGRAPHIC_PIXEL_FORMAT_RGB565P;
|
||||
_lcd_info.framebuffer = (rt_uint8_t*)HW_FB_ADDR;
|
||||
_lcd_info.width = RT_HW_LCD_WIDTH;
|
||||
_lcd_info.height = RT_HW_LCD_HEIGHT;
|
||||
|
||||
/* init device structure */
|
||||
lcd->type = RT_Device_Class_Graphic;
|
||||
lcd->init = rt_lcd_init;
|
||||
lcd->open = RT_NULL;
|
||||
lcd->close = RT_NULL;
|
||||
lcd->control = rt_lcd_control;
|
||||
lcd->user_data = (void*)&_lcd_info;
|
||||
|
||||
/* register lcd device to RT-Thread */
|
||||
rt_device_register(lcd, "lcd", RT_DEVICE_FLAG_RDWR);
|
||||
}
|
||||
/*
|
||||
* File : lnn800x480.c
|
||||
* This file is part of RT-Thread RTOS
|
||||
* COPYRIGHT (C) 2010 - 2012, RT-Thread Development Team
|
||||
*
|
||||
* The license and distribution terms for this file may be
|
||||
* found in the file LICENSE in this distribution or at
|
||||
* http://www.rt-thread.org/license/LICENSE
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2010-01-01 bernard first version from QiuYi's driver
|
||||
*/
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <soc3210.h>
|
||||
|
||||
/* LCD driver for 800x480 16bit */
|
||||
#define RT_HW_LCD_WIDTH 800
|
||||
#define RT_HW_LCD_HEIGHT 480
|
||||
|
||||
#define K1BASE 0xA0000000
|
||||
#define KSEG1(addr) ((void *)(K1BASE | (rt_uint32_t)(addr)))
|
||||
#define HW_FB_ADDR KSEG1(_rt_framebuffer)
|
||||
#define HW_FB_PIXEL(x, y) *(volatile rt_uint16_t*)((rt_uint8_t*)HW_FB_ADDR + (y * RT_HW_LCD_WIDTH * 2) + x * 2)
|
||||
|
||||
ALIGN(4)
|
||||
volatile rt_uint16_t _rt_framebuffer[RT_HW_LCD_HEIGHT][RT_HW_LCD_WIDTH];
|
||||
static struct rt_device_graphic_info _lcd_info;
|
||||
|
||||
static rt_err_t rt_lcd_init (rt_device_t dev)
|
||||
{
|
||||
/* disable LCD controller */
|
||||
LCD_CTRL = LCD_CTRL & 0xfffe;
|
||||
|
||||
/* set LCD clock */
|
||||
HSB_MISC_REG = (HSB_MISC_REG & 0xFFFD01FF) |
|
||||
(0x01 << 17) | /* enable LCD */
|
||||
(0x05 << 9); /* clock */
|
||||
|
||||
LCD_VBARA = (rt_uint32_t)_rt_framebuffer - 0x80000000;
|
||||
LCD_VBARB = (rt_uint32_t)_rt_framebuffer - 0x80000000;
|
||||
|
||||
LCD_HTIM = 0x12c031f;
|
||||
LCD_VTIM = 0x11501df;
|
||||
LCD_HVLEN = 0x41e0279;
|
||||
|
||||
LCD_CTRL = 0x8709;
|
||||
|
||||
rt_kprintf("VBARA 0x%08x\n", LCD_VBARA);
|
||||
rt_kprintf("CTRL 0x%08x\n", LCD_CTRL);
|
||||
rt_kprintf("HTIM 0x%08x\n", LCD_HTIM);
|
||||
rt_kprintf("VTIM 0x%08x\n", LCD_VTIM);
|
||||
rt_kprintf("HVLEN 0x%08x\n", LCD_HVLEN);
|
||||
rt_kprintf("HSB_MISC 0x%08x\n", HSB_MISC_REG);
|
||||
|
||||
return RT_EOK;
|
||||
}
|
||||
|
||||
static rt_err_t rt_lcd_control (rt_device_t dev, rt_uint8_t cmd, void *args)
|
||||
{
|
||||
switch (cmd)
|
||||
{
|
||||
case RTGRAPHIC_CTRL_RECT_UPDATE:
|
||||
break;
|
||||
case RTGRAPHIC_CTRL_POWERON:
|
||||
break;
|
||||
case RTGRAPHIC_CTRL_POWEROFF:
|
||||
break;
|
||||
case RTGRAPHIC_CTRL_GET_INFO:
|
||||
rt_memcpy(args, &_lcd_info, sizeof(_lcd_info));
|
||||
break;
|
||||
case RTGRAPHIC_CTRL_SET_MODE:
|
||||
break;
|
||||
}
|
||||
|
||||
return RT_EOK;
|
||||
}
|
||||
|
||||
void rt_hw_lcd_init(void)
|
||||
{
|
||||
rt_device_t lcd = rt_malloc(sizeof(struct rt_device));
|
||||
if (lcd == RT_NULL)
|
||||
return; /* no memory yet */
|
||||
|
||||
_lcd_info.bits_per_pixel = 16;
|
||||
_lcd_info.pixel_format = RTGRAPHIC_PIXEL_FORMAT_RGB565P;
|
||||
_lcd_info.framebuffer = (rt_uint8_t*)HW_FB_ADDR;
|
||||
_lcd_info.width = RT_HW_LCD_WIDTH;
|
||||
_lcd_info.height = RT_HW_LCD_HEIGHT;
|
||||
|
||||
/* init device structure */
|
||||
lcd->type = RT_Device_Class_Graphic;
|
||||
lcd->init = rt_lcd_init;
|
||||
lcd->open = RT_NULL;
|
||||
lcd->close = RT_NULL;
|
||||
lcd->control = rt_lcd_control;
|
||||
lcd->user_data = (void*)&_lcd_info;
|
||||
|
||||
/* register lcd device to RT-Thread */
|
||||
rt_device_register(lcd, "lcd", RT_DEVICE_FLAG_RDWR);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user