未验证 提交 da56076b 编写于 作者: B Bernard Xiong 提交者: GitHub

Merge pull request #2028 from aozima/bsp_dev

修复一系列BSP编译错误
...@@ -100,8 +100,14 @@ ...@@ -100,8 +100,14 @@
/* Enable DHCP */ /* Enable DHCP */
// #define RT_LWIP_DHCP // #define RT_LWIP_DHCP
/* the number of simulatenously active TCP connections*/ #define RT_MEMP_NUM_NETCONN 12
#define RT_LWIP_TCP_PCB_NUM 3 #define RT_LWIP_PBUF_NUM 3
#define RT_LWIP_RAW_PCB_NUM 2
#define RT_LWIP_UDP_PCB_NUM 4
#define RT_LWIP_TCP_PCB_NUM 8
#define RT_LWIP_TCP_SEG_NUM 40
#define RT_LWIP_TCP_SND_BUF 4380
#define RT_LWIP_TCP_WND 4380
/* ip address of target */ /* ip address of target */
#define RT_LWIP_IPADDR "192.168.1.30" #define RT_LWIP_IPADDR "192.168.1.30"
......
...@@ -15,8 +15,10 @@ elif CROSS_TOOL == 'keil': ...@@ -15,8 +15,10 @@ elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc' PLATFORM = 'armcc'
EXEC_PATH = 'C:/Keil' EXEC_PATH = 'C:/Keil'
elif CROSS_TOOL == 'iar': elif CROSS_TOOL == 'iar':
PLATFORM = 'iar' print('================ERROR============================')
EXEC_PATH = 'C:/Program Files/IAR Systems/Embedded Workbench 6.0 Evaluation' print('Not support iar yet!')
print('=================================================')
exit(0)
if os.getenv('RTT_EXEC_PATH'): if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH') EXEC_PATH = os.getenv('RTT_EXEC_PATH')
...@@ -64,15 +66,14 @@ elif PLATFORM == 'armcc': ...@@ -64,15 +66,14 @@ elif PLATFORM == 'armcc':
LINK = 'armlink' LINK = 'armlink'
TARGET_EXT = 'axf' TARGET_EXT = 'axf'
DEVICE = ' --cortex-m3' DEVICE = ' --cpu Cortex-M3'
CFLAGS = DEVICE + ' --c99 --apcs=interwork' CFLAGS = DEVICE + ' --c99 --apcs=interwork'
AFLAGS = DEVICE AFLAGS = DEVICE
LFLAGS = DEVICE + ' --info sizes --info totals --info unused --info veneers --list rtthread.map --scatter nuc472_flash.sct' LFLAGS = DEVICE + ' --info sizes --info totals --info unused --info veneers --list rtthread.map --scatter CME_M7.sct'
CFLAGS += ' -I' + EXEC_PATH + '/ARM/RV31/INC' LFLAGS += ' --keep *.o(.rti_fn.*) --keep *.o(FSymTab) --keep *.o(VSymTab)'
LFLAGS += ' --libpath ' + EXEC_PATH + '/ARM/RV31/LIB'
EXEC_PATH += '/arm/bin40/' EXEC_PATH += '/ARM/ARMCC/bin'
if BUILD == 'debug': if BUILD == 'debug':
CFLAGS += ' -g -O0' CFLAGS += ' -g -O0'
......
...@@ -64,16 +64,14 @@ elif PLATFORM == 'armcc': ...@@ -64,16 +64,14 @@ elif PLATFORM == 'armcc':
LINK = 'armlink' LINK = 'armlink'
TARGET_EXT = 'axf' TARGET_EXT = 'axf'
DEVICE = ' --device DARMSTM' DEVICE = ' --cpu Cortex-M4'
CFLAGS = DEVICE + ' --apcs=interwork' CFLAGS = DEVICE + ' --c99 --apcs=interwork'
AFLAGS = DEVICE AFLAGS = DEVICE
LFLAGS = DEVICE + ' --info sizes --info totals --info unused --info veneers --list rtthread-apollo2.map --scatter rtthread-apollo2.sct' LFLAGS = DEVICE + ' --info sizes --info totals --info unused --info veneers --list rtthread-apollo2.map --scatter rtthread.sct'
CFLAGS += ' --c99' LFLAGS += ' --keep *.o(.rti_fn.*) --keep *.o(FSymTab) --keep *.o(VSymTab)'
CFLAGS += ' -I' + EXEC_PATH + '/ARM/RV31/INC'
LFLAGS += ' --libpath ' + EXEC_PATH + '/ARM/RV31/LIB'
EXEC_PATH += '/arm/bin40/' EXEC_PATH += '/ARM/ARMCC/bin'
if BUILD == 'debug': if BUILD == 'debug':
CFLAGS += ' -g -O0' CFLAGS += ' -g -O0'
......
...@@ -7,7 +7,7 @@ LR_IROM1 0x00000000 0x100000 { ; load region size_region (1000k) ...@@ -7,7 +7,7 @@ LR_IROM1 0x00000000 0x100000 { ; load region size_region (1000k)
} }
; 8_byte_aligned(62 vect * 4 bytes) = 8_byte_aligned(0x194) = 0x198 ; 8_byte_aligned(62 vect * 4 bytes) = 8_byte_aligned(0x194) = 0x198
; 0x40000 - 0x198 = 0x3FE68 ; 0x40000 - 0x198 = 0x3FE68
RW_IRAM1 0x1FFF0198 0x3FE68 { RW_IRAM2 0x20000000 0x30000 {
.ANY (+RW +ZI) .ANY (+RW +ZI)
} }
} }
......
...@@ -64,17 +64,16 @@ elif PLATFORM == 'armcc': ...@@ -64,17 +64,16 @@ elif PLATFORM == 'armcc':
TARGET_EXT = 'axf' TARGET_EXT = 'axf'
DEVICE = ' --cpu Cortex-M4.fp ' DEVICE = ' --cpu Cortex-M4.fp '
CFLAGS = DEVICE + ' --apcs=interwork' CFLAGS = DEVICE + ' --c99 --apcs=interwork'
AFLAGS = DEVICE AFLAGS = DEVICE
LFLAGS = DEVICE + ' --info sizes --info totals --info unused --info veneers --list rtthread-k64f.map --scatter MK64F.sct' LFLAGS = DEVICE + ' --info sizes --info totals --info unused --info veneers --list rtthread-k64f.map --scatter MK64F.sct'
CFLAGS += ' -I' + EXEC_PATH + '/ARM/RV31/INC' LFLAGS += ' --keep *.o(.rti_fn.*) --keep *.o(FSymTab) --keep *.o(VSymTab)'
LFLAGS += ' --libpath ' + EXEC_PATH + '/ARM/RV31/LIB'
EXEC_PATH += '/arm/bin40/' EXEC_PATH += '/ARM/ARMCC/bin'
if BUILD == 'debug': if BUILD == 'debug':
CFLAGS += ' --c99 -g -O0' CFLAGS += ' -g -O0'
AFLAGS += ' -g' AFLAGS += ' -g'
else: else:
CFLAGS += ' -O2' CFLAGS += ' -O2'
......
...@@ -14,7 +14,6 @@ TARGET = 'rtthread-lpc17xx.' + rtconfig.TARGET_EXT ...@@ -14,7 +14,6 @@ TARGET = 'rtthread-lpc17xx.' + rtconfig.TARGET_EXT
env = Environment(tools = ['mingw'], env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS, AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS, CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc', AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
......
...@@ -18,8 +18,10 @@ elif CROSS_TOOL == 'keil': ...@@ -18,8 +18,10 @@ elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc' PLATFORM = 'armcc'
EXEC_PATH = 'C:/Keil' EXEC_PATH = 'C:/Keil'
elif CROSS_TOOL == 'iar': elif CROSS_TOOL == 'iar':
PLATFORM = 'iar' print('================ERROR============================')
EXEC_PATH = 'C:/Program Files/IAR Systems/Embedded Workbench 6.0 Evaluation' print('Not support iar yet!')
print('=================================================')
exit(0)
if os.getenv('RTT_EXEC_PATH'): if os.getenv('RTT_EXEC_PATH'):
EXEC_PATH = os.getenv('RTT_EXEC_PATH') EXEC_PATH = os.getenv('RTT_EXEC_PATH')
......
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
/* SECTION: Device System */ /* SECTION: Device System */
/* Using Device System */ /* Using Device System */
#define RT_USING_DEVICE #define RT_USING_DEVICE
#define RT_USING_DEVICE_IPC
/* SECTION: Console options */ /* SECTION: Console options */
/* the buffer size of console */ /* the buffer size of console */
......
...@@ -11,11 +11,13 @@ if os.getenv('RTT_CC'): ...@@ -11,11 +11,13 @@ if os.getenv('RTT_CC'):
# cross_tool provides the cross compiler # cross_tool provides the cross compiler
# EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR # EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR
if CROSS_TOOL == 'gcc': if CROSS_TOOL == 'gcc':
PLATFORM = 'gcc' print('================ERROR============================')
EXEC_PATH = 'G:/iot/camera_studio-win32-20160903/camera_studio/tools/arm-2014.05/bin' print('Not support gcc yet!')
print('=================================================')
exit(0)
elif CROSS_TOOL == 'keil': elif CROSS_TOOL == 'keil':
print('================ERROR============================') print('================ERROR============================')
print('Not support iar yet!') print('Not support keil yet!')
print('=================================================') print('=================================================')
exit(0) exit(0)
elif CROSS_TOOL == 'iar': elif CROSS_TOOL == 'iar':
......
...@@ -14,6 +14,10 @@ if CROSS_TOOL == 'gcc': ...@@ -14,6 +14,10 @@ if CROSS_TOOL == 'gcc':
elif CROSS_TOOL == 'keil': elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc' PLATFORM = 'armcc'
EXEC_PATH = 'C:/Keil' EXEC_PATH = 'C:/Keil'
print('================ERROR============================')
print('Not support keil yet!')
print('=================================================')
exit(0)
elif CROSS_TOOL == 'iar': elif CROSS_TOOL == 'iar':
print('================ERROR============================') print('================ERROR============================')
print('Not support IAR yet!') print('Not support IAR yet!')
......
...@@ -18,6 +18,10 @@ DEVICE_TYPE = '__SAMD21J18A__' ...@@ -18,6 +18,10 @@ DEVICE_TYPE = '__SAMD21J18A__'
if CROSS_TOOL == 'gcc': if CROSS_TOOL == 'gcc':
PLATFORM = 'gcc' PLATFORM = 'gcc'
EXEC_PATH = 'C:/Program Files/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin' EXEC_PATH = 'C:/Program Files/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin'
print('================ERROR============================')
print('Not support gcc yet!')
print('=================================================')
exit(0)
elif CROSS_TOOL == 'keil': elif CROSS_TOOL == 'keil':
PLATFORM = 'armcc' PLATFORM = 'armcc'
EXEC_PATH = 'C:/Keil' EXEC_PATH = 'C:/Keil'
......
...@@ -31,12 +31,18 @@ if rtconfig.DEVICE_SERIES == 'SAMD20': ...@@ -31,12 +31,18 @@ if rtconfig.DEVICE_SERIES == 'SAMD20':
path += [cwd + '/sam0/', cwd + '/sam0/utils/cmsis/samd20/include/'] path += [cwd + '/sam0/', cwd + '/sam0/utils/cmsis/samd20/include/']
path += [cwd + '/sam0/utils/cmsis/samd20/source/'] path += [cwd + '/sam0/utils/cmsis/samd20/source/']
src += Glob('./sam0/utils/cmsis/samd20/source/*.c') src += Glob('./sam0/utils/cmsis/samd20/source/*.c')
if rtconfig.CROSS_TOOL == 'gcc':
src += Glob('./sam0/utils/cmsis/samd20/source/gcc/*.s')
elif rtconfig.CROSS_TOOL == 'keil':
src += Glob('./sam0/utils/cmsis/samd20/source/arm/*.s') src += Glob('./sam0/utils/cmsis/samd20/source/arm/*.s')
elif rtconfig.DEVICE_SERIES == 'SAMD21': elif rtconfig.DEVICE_SERIES == 'SAMD21':
#D21 #D21
path += [cwd + '/sam0/utils/cmsis/samd21/include/'] path += [cwd + '/sam0/utils/cmsis/samd21/include/']
path += [cwd + '/sam0/utils/cmsis/samd21/source/'] path += [cwd + '/sam0/utils/cmsis/samd21/source/']
src += Glob('./sam0/utils/cmsis/samd21/source/*.c') src += Glob('./sam0/utils/cmsis/samd21/source/*.c')
if rtconfig.CROSS_TOOL == 'gcc':
src += Glob('./sam0/utils/cmsis/samd21/source/gcc/*.s')
elif rtconfig.CROSS_TOOL == 'keil':
src += Glob('./sam0/utils/cmsis/samd21/source/arm/*.s') src += Glob('./sam0/utils/cmsis/samd21/source/arm/*.s')
#sam0/drivers/system #sam0/drivers/system
...@@ -68,8 +74,8 @@ elif rtconfig.DEVICE_SERIES == 'SAMD21': ...@@ -68,8 +74,8 @@ elif rtconfig.DEVICE_SERIES == 'SAMD21':
path += [cwd + '/sam0/drivers/sercom', cwd + '/sam0/drivers/sercom/usart'] path += [cwd + '/sam0/drivers/sercom', cwd + '/sam0/drivers/sercom/usart']
src += Glob('./sam0/drivers/sercom/*.c') src += Glob('./sam0/drivers/sercom/*.c')
src += Glob('./sam0/drivers/sercom/usart/*.c') src += Glob('./sam0/drivers/sercom/usart/*.c')
SrcRemove(src, 'sercom_interrupt.c') SrcRemove(src, './sam0/drivers/sercom/sercom_interrupt.c')
SrcRemove(src, 'usart_interrupt.c') SrcRemove(src, './sam0/drivers/sercom/usart/usart_interrupt.c')
CPPDEFINES += ['USART_CALLBACK_MODE=false'] CPPDEFINES += ['USART_CALLBACK_MODE=false']
#sam0/drivers/port #sam0/drivers/port
......
...@@ -3141,7 +3141,7 @@ static void register_multicast_address(struct rt_stm32_eth *stm32_eth, const uin ...@@ -3141,7 +3141,7 @@ static void register_multicast_address(struct rt_stm32_eth *stm32_eth, const uin
#endif /* (LWIP_IPV4 && LWIP_IGMP) || (LWIP_IPV6 && LWIP_IPV6_MLD) */ #endif /* (LWIP_IPV4 && LWIP_IGMP) || (LWIP_IPV6 && LWIP_IPV6_MLD) */
#if LWIP_IPV4 && LWIP_IGMP #if LWIP_IPV4 && LWIP_IGMP
static err_t igmp_mac_filter( struct netif *netif, const ip4_addr_t *ip4_addr, u8_t action ) static err_t igmp_mac_filter( struct netif *netif, const ip4_addr_t *ip4_addr, enum netif_mac_filter_action action )
{ {
uint8_t mac[6]; uint8_t mac[6];
const uint8_t *p = (const uint8_t *)ip4_addr; const uint8_t *p = (const uint8_t *)ip4_addr;
...@@ -3167,7 +3167,7 @@ static err_t igmp_mac_filter( struct netif *netif, const ip4_addr_t *ip4_addr, u ...@@ -3167,7 +3167,7 @@ static err_t igmp_mac_filter( struct netif *netif, const ip4_addr_t *ip4_addr, u
#endif /* LWIP_IPV4 && LWIP_IGMP */ #endif /* LWIP_IPV4 && LWIP_IGMP */
#if LWIP_IPV6 && LWIP_IPV6_MLD #if LWIP_IPV6 && LWIP_IPV6_MLD
static err_t mld_mac_filter( struct netif *netif, const ip6_addr_t *ip6_addr, u8_t action ) static err_t mld_mac_filter( struct netif *netif, const ip6_addr_t *ip6_addr, enum netif_mac_filter_action action )
{ {
uint8_t mac[6]; uint8_t mac[6];
const uint8_t *p = (const uint8_t *)&ip6_addr->addr[3]; const uint8_t *p = (const uint8_t *)&ip6_addr->addr[3];
......
...@@ -3467,7 +3467,7 @@ static void register_multicast_address(struct rt_stm32_eth *stm32_eth, const uin ...@@ -3467,7 +3467,7 @@ static void register_multicast_address(struct rt_stm32_eth *stm32_eth, const uin
#endif /* (LWIP_IPV4 && LWIP_IGMP) || (LWIP_IPV6 && LWIP_IPV6_MLD) */ #endif /* (LWIP_IPV4 && LWIP_IGMP) || (LWIP_IPV6 && LWIP_IPV6_MLD) */
#if LWIP_IPV4 && LWIP_IGMP #if LWIP_IPV4 && LWIP_IGMP
static err_t igmp_mac_filter( struct netif *netif, const ip4_addr_t *ip4_addr, u8_t action ) static err_t igmp_mac_filter( struct netif *netif, const ip4_addr_t *ip4_addr, enum netif_mac_filter_action action )
{ {
uint8_t mac[6]; uint8_t mac[6];
const uint8_t *p = (const uint8_t *)ip4_addr; const uint8_t *p = (const uint8_t *)ip4_addr;
...@@ -3493,7 +3493,7 @@ static err_t igmp_mac_filter( struct netif *netif, const ip4_addr_t *ip4_addr, u ...@@ -3493,7 +3493,7 @@ static err_t igmp_mac_filter( struct netif *netif, const ip4_addr_t *ip4_addr, u
#endif /* LWIP_IPV4 && LWIP_IGMP */ #endif /* LWIP_IPV4 && LWIP_IGMP */
#if LWIP_IPV6 && LWIP_IPV6_MLD #if LWIP_IPV6 && LWIP_IPV6_MLD
static err_t mld_mac_filter( struct netif *netif, const ip6_addr_t *ip6_addr, u8_t action ) static err_t mld_mac_filter( struct netif *netif, const ip6_addr_t *ip6_addr, enum netif_mac_filter_action action )
{ {
uint8_t mac[6]; uint8_t mac[6];
const uint8_t *p = (const uint8_t *)&ip6_addr->addr[3]; const uint8_t *p = (const uint8_t *)&ip6_addr->addr[3];
......
...@@ -919,8 +919,6 @@ FINSH_FUNCTION_EXPORT(lcd_blit_line, draw blit line in lcd display); ...@@ -919,8 +919,6 @@ FINSH_FUNCTION_EXPORT(lcd_blit_line, draw blit line in lcd display);
static int rt_hw_lcd_init(void) static int rt_hw_lcd_init(void)
{ {
_lcd_low_level_init();
static struct rt_device lcd_device; static struct rt_device lcd_device;
static struct rt_device_graphic_ops ili9341_ops = static struct rt_device_graphic_ops ili9341_ops =
...@@ -932,6 +930,8 @@ static int rt_hw_lcd_init(void) ...@@ -932,6 +930,8 @@ static int rt_hw_lcd_init(void)
ili9341_lcd_blit_line ili9341_lcd_blit_line
}; };
_lcd_low_level_init();
/* register lcd device */ /* register lcd device */
lcd_device.type = RT_Device_Class_Graphic; lcd_device.type = RT_Device_Class_Graphic;
lcd_device.init = lcd_init; lcd_device.init = lcd_init;
......
...@@ -67,7 +67,10 @@ static int32_t touch_read (uint8_t reg, uint8_t *val) ...@@ -67,7 +67,10 @@ static int32_t touch_read (uint8_t reg, uint8_t *val)
static int32_t touch_write(uint8_t reg, uint8_t val) static int32_t touch_write(uint8_t reg, uint8_t val)
{ {
struct rt_i2c_msg msgs; struct rt_i2c_msg msgs;
rt_uint8_t buf[2] = {reg, val}; rt_uint8_t buf[2];
buf[0] = reg;
buf[1] = val;
msgs.addr = TSC_I2C_ADDR; msgs.addr = TSC_I2C_ADDR;
msgs.flags = RT_I2C_WR; msgs.flags = RT_I2C_WR;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册