Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
RT-Thread一般讨论
RT-thread移植到s3c2440板子問題
发布于 2013-01-14 14:47:42 浏览:6574
订阅该版
各位好 我想要移植rtthread到S3C2440 遇到一個主要的問題就是網路卡 想請問大家有沒有什麼好改網路卡的方法 S3C2440的網路卡為CS8900 可是MINI2440的為DM9000 這我到是部清楚該怎麼修改 請各位幫個忙,謝謝。 下载附件 [cs8900a.zip](https://oss-club.rt-thread.org/uploads/2969_89a74af9ef7d86f8fab80e96b1e1eb9b.zip)
查看更多
14
个回答
默认排序
按发布时间排序
bernard
2013-01-14
这家伙很懒,什么也没写!
这个需要自行编写CS8900网卡驱动。
skype0902
2013-01-14
这家伙很懒,什么也没写!
那請問這要如何編寫呢? 是否可指點一番?
bernard
2013-01-14
这家伙很懒,什么也没写!
你可以参考下DM9000的做法,主要是实现需要的几个驱动接口。
bbstr
2013-01-15
这家伙很懒,什么也没写!
lwip原生支持cs8900 去lwip网站上下载一个下来移植一下
skype0902
2013-06-24
这家伙很懒,什么也没写!
各位高手 小弟真是不會啊 看了DM9000的作法 我還是不懂要怎麼去將cs8900a放進去RT-Thread
skype0902
2013-06-24
这家伙很懒,什么也没写!
build/examples/gui/mywidget.o application.o startup.o board.o rtc_calendar.o console.o led.o sdcard.o dm9000.o touch.o key.o lcd_t35.o application.o: In function `rt_init_thread_entry': /home/s/RT-Thread-0.3.1/bsp/mini2440/application.c:76: undefined reference to `rt_hw_cs8900a_init' collect2: ld returned 1 exit status scons: *** [rtthread-mini2440.axf] Error 1 scons: building terminated because of errors. root@s-desktop:~/RT-Thread-0.3.1/bsp/mini2440# 我是將cs8900a.c和cs8900a.h放在bsp/mini2440/ 各位,這是我目前的錯誤 不知道哪裡有問題 抓了很久
skype0902
2013-06-24
这家伙很懒,什么也没写!
上面那個錯誤是因為我在SconStruct的 ``` if rtconfig.RT_USING_LWIP: src_drv += ['dm9000.c'] src_drv += ['cs8900a.c'] # (沒加入這個) ``` 但修正完又出現下面這個錯誤 ``` root@s-desktop:~/RT-Thread-0.3.1/bsp/mini2440# scons scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... arm-none-eabi-gcc -o cs8900a.o -c -mcpu=arm920t -DRT_USING_MINILIBC -nostdinc -nostdlib -fno-builtin -O0 -gdwarf-2 -D FINSH_USING_SYMTAB -DFINSH_USING_DESCRIPTION -I. -I/home/s/RT-Thread-0.3.1/include -I/home/s/RT-Thread-0.3.1/libcpu/arm/s3c24x0 -I/home/s/RT-Thread-0.3.1/libc/minilibc -I/home/s/RT-Thread-0.3.1/finsh -I/home/s/RT-Thread-0.3.1/filesystem/dfs -I/home/s/RT-Thread-0.3.1/filesystem/dfs/include -I/home/s/RT-Thread-0.3.1/net/lwip/src -I/home/s/RT-Thread-0.3.1/net/lwip/src/include -I/home/s/RT-Thread-0.3.1/net/lwip/src/include/ipv4 -I/home/s/RT-Thread-0.3.1/net/lwip/src/arch/include -I/home/s/RT-Thread-0.3.1/net/lwip/src/include/netif -I/home/s/RT-Thread-0.3.1/net/lwip/src/netif/ppp -I/home/s/RT-Thread-0.3.1/rtgui/include -I/home/s/RT-Thread-0.3.1/rgtui/common -I/home/s/RT-Thread-0.3.1/rtgui/server -I/home/s/RT-Thread-0.3.1/rtgui/widgets -I/home/s/RT-Thread-0.3.1/filesystem/dfs -I/home/s/RT-Thread-0.3.1/filesystem/dfs/include cs8900a.c In file included from cs8900a.c:8:0: cs8900a.h:10:21: fatal error: stdbool.h: No such file or directory compilation terminated. scons: *** [cs8900a.o] Error 1 scons: building terminated because of errors. ``` 但若是我作/*#include
*/ 又會有其他如下面的錯誤 ``` root@s-desktop:~/RT-Thread-0.3.1/bsp/mini2440# scons scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... arm-none-eabi-gcc -o cs8900a.o -c -mcpu=arm920t -DRT_USING_MINILIBC -nostdinc -nostdlib -fno-builtin -O0 -gdwarf-2 -D FINSH_USING_SYMTAB -DFINSH_USING_DESCRIPTION -I. -I/home/s/RT-Thread-0.3.1/include -I/home/s/RT-Thread-0.3.1/libcpu/arm/s3c24x0 -I/home/s/RT-Thread-0.3.1/libc/minilibc -I/home/s/RT-Thread-0.3.1/finsh -I/home/s/RT-Thread-0.3.1/filesystem/dfs -I/home/s/RT-Thread-0.3.1/filesystem/dfs/include -I/home/s/RT-Thread-0.3.1/net/lwip/src -I/home/s/RT-Thread-0.3.1/net/lwip/src/include -I/home/s/RT-Thread-0.3.1/net/lwip/src/include/ipv4 -I/home/s/RT-Thread-0.3.1/net/lwip/src/arch/include -I/home/s/RT-Thread-0.3.1/net/lwip/src/include/netif -I/home/s/RT-Thread-0.3.1/net/lwip/src/netif/ppp -I/home/s/RT-Thread-0.3.1/rtgui/include -I/home/s/RT-Thread-0.3.1/rgtui/common -I/home/s/RT-Thread-0.3.1/rtgui/server -I/home/s/RT-Thread-0.3.1/rtgui/widgets -I/home/s/RT-Thread-0.3.1/filesystem/dfs -I/home/s/RT-Thread-0.3.1/filesystem/dfs/include cs8900a.c In file included from cs8900a.c:8:0: cs8900a.h:14:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'cs8900a_link' cs8900a.h:15:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'cs8900a_act' cs8900a.h:17:6: error: conflicting types for 'rt_hw_cs8900a_init' cs8900a.h:12:14: note: previous declaration of 'rt_hw_cs8900a_init' was here cs8900a.c:50:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'act' cs8900a.c:56:24: error: expected ')' before 'len' cs8900a.c:175:22: error: expected declaration specifiers or '...' before 'uint_fast16_t' cs8900a.c: In function 'push_data': cs8900a.c:185:9: error: '__packed' undeclared (first use in this function) cs8900a.c:185:9: note: each undeclared identifier is reported only once for each function it appears in cs8900a.c:185:18: error: expected ';' before 'uint16_t' cs8900a.c:191:36: error: 'uintptr_t' undeclared (first use in this function) cs8900a.c:191:46: error: expected ')' before 'src' cs8900a.c:192:17: error: 'len' undeclared (first use in this function) cs8900a.c:195:14: error: 'ptr' undeclared (first use in this function) cs8900a.c: In function 'cs8900a_output': cs8900a.c:238:27: error: 'CS8900a_TXTRIES' undeclared (first use in this function) cs8900a.c:250:25: error: too many arguments to function 'push_data' cs8900a.c:175:1: note: declared here cs8900a.c:254:25: error: too many arguments to function 'push_data' cs8900a.c:175:1: note: declared here cs8900a.c:263:9: error: 'act' undeclared (first use in this function) cs8900a.c:263:15: error: 'true' undeclared (first use in this function) cs8900a.c: At top level: cs8900a.c:328:1: error: conflicting types for 'cs8900a_input' cs8900a.c:271:1: note: previous definition of 'cs8900a_input' was here cs8900a.c: In function 'cs8900a_input': cs8900a.c:334:11: error: void value not ignored as it ought to be cs8900a.c: At top level: cs8900a.c:402:1: error: conflicting types for 'rt_hw_cs8900a_init' cs8900a.h:17:6: note: previous declaration of 'rt_hw_cs8900a_init' was here cs8900a.c: In function 'rt_hw_cs8900a_init': cs8900a.c:404:19: error: 'netif' undeclared (first use in this function) cs8900a.c:419:20: error: 'cs8900a_device' undeclared (first use in this function) cs8900a.c:425:9: error: too few arguments to function 'rt_cs8900a_init' cs8900a.c:126:1: note: declared here cs8900a.c: At top level: cs8900a.c:434:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'cs8900a_link' cs8900a.c:446:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'cs8900a_act' scons: *** [cs8900a.o] Error 1 scons: building terminated because of errors. ``` 請各位大大幫忙
bernard
2013-06-24
这家伙很懒,什么也没写!
你是不是从哪里当抓虾,抓了一个cs8900a的驱动?先好好熟悉下C语言的基础知识吧。 另外,如果选择了cs8900a,DM9000就不要再行编译了。
skype0902
2013-06-26
这家伙很懒,什么也没写!
這是我的cs8900a.c ``` #include
#include
#include "cs8900a.h" #include
#include "netif/etharp.h" #include
#include
/* Define these to match your hardware setup */ #define MEM_BASE 0x64000000 #define RXTXREG *((volatile u16_t *)(MEM_BASE)) #define TXCMD *((volatile u16_t *)(MEM_BASE + 0x04)) #define TXLENGTH *((volatile u16_t *)(MEM_BASE + 0x06)) #define ISQ *((volatile u16_t *)(MEM_BASE + 0x08)) #define PACKETPP *((volatile u16_t *)(MEM_BASE + 0x0A)) #define PPDATA *((volatile u16_t *)(MEM_BASE + 0x0C)) /* CS8900a PacketPage register offsets */ #define CS_PP_INTNUM 0x0022 /* Interrupt number (0,1,2, or 3) */ #define CS_PP_RXCFG 0x0102 /* Receiver Configuration */ #define CS_PP_RXCTL 0x0104 /* Receiver Control */ #define CS_PP_LINECTL 0x0112 /* Line Control Register offset */ #define CS_PP_BUSCTL 0x0116 /* Bus Control */ #define CS_PP_LINESTATUS 0x0134 /* Line Status */ #define CS_PP_SELFTEST 0x0136 /* Self Status */ #define CS_PP_BUSSTATUS 0x0138 /* Bus Status */ #define CS_PP_IA1 0x0158 /* Individual Address (IA) */ #define CS_PP_IA2 0x015A /* Individual Address (IA) */ #define CS_PP_IA3 0x015C /* Individual Address (IA) */ /** * Number of attempts to try when sending a packet. * Must be big enough to last while previous packet is being sent, * yet small enough to not freeze the program when transmission is impossible. */ #define CS8900A_TXTRIES 100000 /** Size of FIFO for incoming data, in 16-bit words */ #define FIFO_WORDS 2048 static struct netif *mynetif; static uint16_t fifo[FIFO_WORDS]; static uint16_t head, tail; static bool act = false; /** * Transfer data from CS8900A into rx FIFO */ static void pull_data(int_fast16_t len) { uint16_t* ptr; /* Write length of packet as first word */ fifo[head & (FIFO_WORDS - 1)] = len; head++; /* Loop unrolling optimization */ ptr = &fifo[head & (FIFO_WORDS - 1)]; while (len > 14) { /* Got at least 8 words of data to write */ if ((head & (FIFO_WORDS - 1)) < (FIFO_WORDS - 8)) { /* Got at leat 8 words in a row in FIFO */ *ptr++ = RXTXREG; *ptr++ = RXTXREG; *ptr++ = RXTXREG; *ptr++ = RXTXREG; *ptr++ = RXTXREG; *ptr++ = RXTXREG; *ptr++ = RXTXREG; *ptr++ = RXTXREG; len -= 16; head += 8; } else { /* Roll over FIFO boundary */ while ((head & (FIFO_WORDS - 1)) != 0) { fifo[head++ & (FIFO_WORDS - 1)] = RXTXREG; len -= 2; } ptr = fifo; } } /* Write the rest word-by-word */ while (len > 0) { fifo[head++ & (FIFO_WORDS - 1)] = RXTXREG; len -= 2; } } /** * CS8900A interrupt handler, pulls incoming data from chip into FIFO */ static void irq_handler(void) { while (ISQ != 0) { /* (ISQ & 0x3F) will always be 4 here (RX event) */ int16_t len; /* Discard first word: status */ len = RXTXREG; len = RXTXREG; if ((head - tail) < (FIFO_WORDS - 1 - ((len + 1) / 2))) { /* Got space for packet in FIFO */ pull_data(len); } else { /* Drop packet */ PACKETPP = CS_PP_RXCFG; PPDATA = (0x0003U | 0x0100U/*RxOKiE*/ | 0x0040U/*Skip_1*/); } } } /** * Chip initialization * * @return Always ERR_OK */ static rt_err_t rt_cs8900a_init() { /* * Initialize MCU external bus... */ /* Dummy read to switch to 16-bit mode */ (void)PPDATA; // { after full initialization of the cs8900a // the INITD bit will be set } PACKETPP = CS_PP_SELFTEST; while ((PPDATA & 0x0080U) == 0); // { INITD bit is set } /* Set MAC address */ PACKETPP = CS_PP_IA1; PPDATA = (u16_t)(mynetif->hwaddr[0]) | (u16_t)(mynetif->hwaddr[1] << 8); PACKETPP = CS_PP_IA2; PPDATA = (u16_t)(mynetif->hwaddr[2]) | (u16_t)(mynetif->hwaddr[3] << 8); PACKETPP = CS_PP_IA3; PPDATA = (u16_t)(mynetif->hwaddr[4]) | (u16_t)(mynetif->hwaddr[5] << 8); /* accept valid unicast or broadcast frames */ PACKETPP = CS_PP_RXCTL; PPDATA = (0x0005U | 0x0800U/*broadcast*/ | 0x0400U/*individual*/ | 0x0100U/*RxOK*/); /* enable receive interrupt */ PACKETPP = CS_PP_RXCFG; PPDATA = (0x0003U | 0x0100U/*RXIRQ*/); /* use interrupt number 0 */ PACKETPP = CS_PP_INTNUM; PPDATA = (0x0000U); /* enable interrupt generation */ PACKETPP = CS_PP_BUSCTL; PPDATA = (0x0017U | 0x8000U/*EnableIRQ*/); /* enable receiver, transmitter */ PACKETPP = CS_PP_LINECTL; PPDATA = (0x0013U | 0x0080U/*SerTxOn*/ | 0x0040U/*SerRxOn*/); /* * Set up external interrupt for CS8900A with irq_handler() as ISR... */ return ERR_OK; } /** * Push data to chip. Splice chunks with odd number of bytes properly. */ static void push_data(void* src, uint_fast16_t len) { /* * Variable word is used to splice chunks with odd number of bytes. * word == 0xFF00: even number of bytes in previous chunk * (word & 0xFF00) == 0: odd number of bytes in previous chunk, * last byte of that chunk is in variable word */ static uint16_t word = 0xFF00; /* Using RealView feature: unaligned pointer */ __packed uint16_t* ptr; if ((word & 0xFF00) == 0) { word |= *(uint8_t*)src << 8; RXTXREG = word; src = (void*)(1 + (uintptr_t)src); len--; word = 0xFF00; } for (ptr = src; len >= 2; len -= 2) { RXTXREG = *ptr; ptr++; } if (len > 0) { word = *(uint8_t*)ptr; } } /** * * * @return error code * - ERR_OK: packet transferred to hardware * - ERR_CONN: no link or link failure * - ERR_IF: could not transfer to link (hardware buffer full?) */ static err_t cs8900a_output(struct netif *netif, struct pbuf *p) { u16_t tries = 0; err_t result; // exit if link has failed PACKETPP = CS_PP_LINESTATUS; if ((PPDATA & 0x0080U/*LinkOK*/) == 0) { return ERR_CONN; // no Ethernet link } result = ERR_OK; /* TODO: should this occur AFTER setting TXLENGTH??? */ /* drop the padding word */ /* issue 'transmit' command to CS8900a */ TXCMD = 0x00C9U; /* send length (in bytes) of packet to send, but at least minimum frame length */ TXLENGTH = p->tot_len; PACKETPP = CS_PP_BUSSTATUS; // not ready for transmission and still within 100 retries? while (((PPDATA & 0x0100U/*Rdy4TxNOW*/) == 0) && (tries++ < CS8900a_TXTRIES)) { /* Wait */ } // ready to transmit? if ((PPDATA & 0x0100U/*Rdy4TxNOW*/) != 0) { /* q traverses through linked list of pbuf's * This list MUST consist of a single packet ONLY */ struct pbuf *q; for (q = p; q != 0; q = q->next) { push_data(q->payload, q->len); } if ((p->tot_len & 1) != 0) { push_data("", 1); } /* { the packet has been sent } */ } else { // { not ready to transmit!? } result = ERR_IF; } act = true; return result; } /** * Move a received packet from the cs8900a into a new pbuf. */ static struct pbuf* cs8900a_input(void) { if (head != tail) { /* Got packet in FIFO */ struct pbuf* p; uint16_t len; len = fifo[tail & (FIFO_WORDS - 1)]; tail++; p = pbuf_alloc(PBUF_RAW, len, PBUF_POOL); if (p != 0) { struct pbuf* q; for (q = p; q != 0; q = q->next) { uint16_t* ptr; uint16_t i; ptr = q->payload; i = (q->len + 1) / 2; while (i > 0) { *ptr = fifo[tail & (FIFO_WORDS - 1)]; tail++; ptr++; i--; } } } else { /* Could not allocate buffer for packet, discard it */ tail += (len + 1) / 2; } return p; } else { return 0; } } /** * Read a received packet from the CS8900a. * * This function should be called when a packet is received by the CS8900a * and is fully available to read. It moves the received packet to a pbuf * which is forwarded to the IP network layer or ARP module. It transmits * a resulting ARP reply or queued packet. * * @param netif The lwIP network interface to read from. * * @internal Uses cs8900a_input() to move the packet from the CS8900a to a * newly allocated pbuf. * */ static void cs8900a_input(void) { struct eth_hdr *ethhdr = NULL; struct pbuf *p = NULL; /* move received packet into a new pbuf */ p = cs8900a_input(); /* no packet could be read */ if (p == NULL) { /* silently ignore this */ return; } /* points to packet payload, which starts with an Ethernet header */ ethhdr = p->payload; switch (htons(ethhdr->type)) { /* IP packet? */ case ETHTYPE_IP: /* CSi disabled ARP table update on ingress IP packets. This seems to work but needs thorough testing. */ /* update ARP table */ etharp_ip_input(mynetif, p); /* skip Ethernet header */ pbuf_header(p, -(s16_t)sizeof(struct eth_hdr)); /* pass to network layer */ mynetif->input(p, mynetif); break; /* ARP packet? */ case ETHTYPE_ARP: /* pass p to ARP module */ etharp_arp_input(mynetif, (struct eth_addr *)&mynetif->hwaddr, p); break; /* unsupported Ethernet packet type */ default: /* free pbuf */ pbuf_free(p); p = NULL; break; } } /** * Service the CS8900a. * * Can be called in a polling manner, or only after the CS8900a has raised * an interrupt request. */ void cs8900a_poll(void) { // see if link is up PACKETPP = CS_PP_LINESTATUS; if ((PPDATA & 0x0080U/*LinkOK*/) != 0) { if (netif_is_link_up(mynetif) == 0) { netif_set_link_up(mynetif); } } else if (netif_is_link_up(mynetif) != 0) { netif_set_link_down(mynetif); } cs8900a_input(); } /** * Initialize the CS8900a Ethernet MAC/PHY and its device driver. * * @param netif The lwIP network interface data structure belonging to this device. * MAY be NULL as we do not support multiple devices yet. */ static rt_err_t rt_hw_cs8900a_init() { mynetif = netif; /* administrative details */ mynetif->name[0] = 'e'; mynetif->name[1] = 'n'; /* downward functions */ mynetif->output = etharp_output; mynetif->linkoutput = cs8900a_output; /* maximum transfer unit */ mynetif->mtu = 1500; /* broadcast capability */ mynetif->flags = NETIF_FLAG_BROADCAST; /* hardware address length */ mynetif->hwaddr_len = 6; /* * Initialize device MAC address: * memcpy(mynetif->hwaddr, my_mac_address, 6); */ /* intialize the cs8900a chip */ return rt_cs8900a_init(); } /** * See if a link is established (cable plugged) * * @return true if linked, false otherwise */ bool cs8900a_link(void) { return (netif_is_link_up(mynetif)) == 0 ? false : true; } /** * See if there has been activity since last call to this function. * Activitity is sending packets. * * @return true if linked, false otherwise */ bool cs8900a_act(void) { bool ret; ret = act; act = false; return ret; } ``` 這是我的cs8900a.h ``` #ifndef __CS8900A_H__ #define __CS8900A_H__ #include "lwip/netif.h" #include
extern rt_err_t rt_hw_cs8900a_init(); extern void cs8900a_poll(void); extern bool cs8900a_link(void); extern bool cs8900a_act(void); #endif /* CS8900A_H */ ``` 我自己加進去stdbool.h後 還有下列這些問題 ``` root@s-desktop:~/RT-Thread-0.3.1/bsp/mini2440# scons scons: Reading SConscript files ... scons: done reading SConscript files. scons: Building targets ... arm-none-eabi-gcc -o cs8900a.o -c -mcpu=arm920t -DRT_USING_MINILIBC -nostdinc -nostdlib -fno-builtin -O0 -gdwarf-2 -D FINSH_USING_SYMTAB -DFINSH_USING_DESCRIPTION -I. -I/home/s/RT-Thread-0.3.1/include -I/home/s/RT-Thread-0.3.1/libcpu/arm/s3c24x0 -I/home/s/RT-Thread-0.3.1/libc/minilibc -I/home/s/RT-Thread-0.3.1/finsh -I/home/s/RT-Thread-0.3.1/filesystem/dfs -I/home/s/RT-Thread-0.3.1/filesystem/dfs/include -I/home/s/RT-Thread-0.3.1/net/lwip/src -I/home/s/RT-Thread-0.3.1/net/lwip/src/include -I/home/s/RT-Thread-0.3.1/net/lwip/src/include/ipv4 -I/home/s/RT-Thread-0.3.1/net/lwip/src/arch/include -I/home/s/RT-Thread-0.3.1/net/lwip/src/include/netif -I/home/s/RT-Thread-0.3.1/net/lwip/src/netif/ppp -I/home/s/RT-Thread-0.3.1/rtgui/include -I/home/s/RT-Thread-0.3.1/rgtui/common -I/home/s/RT-Thread-0.3.1/rtgui/server -I/home/s/RT-Thread-0.3.1/rtgui/widgets -I/home/s/RT-Thread-0.3.1/filesystem/dfs -I/home/s/RT-Thread-0.3.1/filesystem/dfs/include cs8900a.c cs8900a.c:52:24: error: expected ')' before 'len' cs8900a.c:171:22: error: expected declaration specifiers or '...' before 'uint_fast16_t' cs8900a.c: In function 'push_data': cs8900a.c:181:9: error: '__packed' undeclared (first use in this function) cs8900a.c:181:9: note: each undeclared identifier is reported only once for each function it appears in cs8900a.c:181:18: error: expected ';' before 'uint16_t' cs8900a.c:187:36: error: 'uintptr_t' undeclared (first use in this function) cs8900a.c:187:46: error: expected ')' before 'src' cs8900a.c:188:17: error: 'len' undeclared (first use in this function) cs8900a.c:191:14: error: 'ptr' undeclared (first use in this function) cs8900a.c: In function 'cs8900a_output': cs8900a.c:234:27: error: 'CS8900a_TXTRIES' undeclared (first use in this function) cs8900a.c:246:25: error: too many arguments to function 'push_data' cs8900a.c:171:1: note: declared here cs8900a.c:250:25: error: too many arguments to function 'push_data' cs8900a.c:171:1: note: declared here cs8900a.c: At top level: cs8900a.c:324:1: error: conflicting types for 'cs8900a_input' cs8900a.c:267:1: note: previous definition of 'cs8900a_input' was here cs8900a.c: In function 'cs8900a_input': cs8900a.c:330:11: error: void value not ignored as it ought to be cs8900a.c: At top level: cs8900a.c:398:1: error: static declaration of 'rt_hw_cs8900a_init' follows non-static declaration cs8900a.h:7:17: note: previous declaration of 'rt_hw_cs8900a_init' was here cs8900a.c: In function 'rt_hw_cs8900a_init': cs8900a.c:400:19: error: 'netif' undeclared (first use in this function) scons: *** [cs8900a.o] Error 1 scons: building terminated because of errors. ``` 就拿下面這行來說 ``` cs8900a.c:400:19: error: 'netif' undeclared (first use in this function) ``` 我的cs8900a.c裡面有宣告static struct netif *mynetif; 可怎還會錯
bernard
2013-06-26
这家伙很懒,什么也没写!
问题一个个改吧,基本都是C的基本知识啊
撰写答案
登录
注册新账号
关注者
0
被浏览
6.6k
关于作者
skype0902
这家伙很懒,什么也没写!
提问
6
回答
21
被采纳
0
关注TA
发私信
相关问题
1
有关动态模块加载的一篇论文
2
最近的调程序总结
3
晕掉了,这么久都不见layer2的踪影啊
4
继续K9ii的历程
5
[GUI相关] FreeType 2
6
[GUI相关]嵌入式系统中文输入法的设计
7
20081101 RT-Thread开发者聚会总结
8
嵌入式系统基础
9
linux2.4.19在at91rm9200 上的寄存器设置
10
[转]基于嵌入式Linux的通用触摸屏校准程序
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
五分钟玩转RT-Thread新社区
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
在RT-Thread Studio中构建前执行python命令
2
研究一了一段时间RTT,直接标准版上手太难,想用nano,但又舍不得组件
3
CherryUSB开发笔记(一):FSDEV USB IP核的 HID Remote WakeUp (USB HID 远程唤醒) 2025-01-18 V1.1
4
RT-thread 缩写字典
5
RT Thread 源码分析笔记 :线程和调度器
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
USB
DMA
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
FAL
rt-smart
I2C_IIC
ESP8266
UART
WIZnet_W5500
ota在线升级
PWM
cubemx
flash
freemodbus
BSP
packages_软件包
潘多拉开发板_Pandora
定时器
ADC
GD32
flashDB
socket
编译报错
中断
Debug
rt_mq_消息队列_msg_queue
SFUD
msh
keil_MDK
ulog
C++_cpp
MicroPython
本月问答贡献
用户名由3_15位
7
个答案
1
次被采纳
bernard
4
个答案
1
次被采纳
xusiwei1236
4
个答案
1
次被采纳
踩姑娘的小蘑菇
1
个答案
1
次被采纳
张世争
1
个答案
1
次被采纳
本月文章贡献
聚散无由
2
篇文章
14
次点赞
catcatbing
2
篇文章
5
次点赞
Wade
2
篇文章
2
次点赞
Ghost_Girls
1
篇文章
6
次点赞
xiaorui
1
篇文章
1
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部