forked from xuos/xiuos
Merge pull request 'merge code' (#40) from prepare_for_master into jerryscript
This commit is contained in:
commit
544b0bcba4
|
@ -91,8 +91,8 @@ git clone https://gitlink.org.cn/xuos/xiuos.git
|
|||
|
||||
使用VScode打开代码,具体操作步骤为:在源码文件夹下打开系统终端,输入`code .`即可打开VScode开发环境,如下图所示:
|
||||
|
||||
<div align= "center">
|
||||
<img src = img/vscode.jpg width =1000>
|
||||
<div align= "center">
|
||||
<img src="img/vscode.jpg" width =1000>
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -145,14 +145,14 @@ make BOARD=cortex-m4-emulator menuconfig
|
|||
|
||||
2.在menuconfig界面配置需要关闭和开启的功能,按回车键进入下级菜单,按Y键选中需要开启的功能,按N键选中需要关闭的功能,配置结束后保存并退出(本例旨在演示简单的输出例程,所以没有需要配置的选项,双击快捷键ESC退出配置)
|
||||
|
||||
<div align= "center">
|
||||
<img src = img/menuconfig.png width =1000>
|
||||
<div align= "center">
|
||||
<img src="img/menuconfig.png" width =1000>
|
||||
</div>
|
||||
|
||||
退出时选择`yes`保存上面所配置的内容,如下图所示:
|
||||
|
||||
<div align= "center">
|
||||
<img src = img/menuconfig1.png width =1000>
|
||||
<div align= "center">
|
||||
<img src="img/menuconfig1.png" width =1000>
|
||||
</div>
|
||||
|
||||
3.继续执行以下命令,进行编译
|
||||
|
@ -183,8 +183,8 @@ qemu-system-arm -machine netduinoplus2 -nographic -kernel build/XiZi-cortex-m4-
|
|||
|
||||
QEMU运行起来后将会在终端上看到信息打印输出
|
||||
|
||||
<div align= "center">
|
||||
<img src = img/terminal.png width =1000>
|
||||
<div align= "center">
|
||||
<img src="img/terminal.png" width =1000>
|
||||
</div>
|
||||
|
||||
### 4.3 调试
|
||||
|
@ -204,5 +204,5 @@ qemu-system-arm -machine netduinoplus2 -nographic -kernel build/XiZi-cortex-m4-
|
|||
然后要重新开启另一个linux系统终端一个终端,执行`riscv-none-embed-gdb`命令
|
||||
|
||||
```
|
||||
gdb-multiarch build/XiZi-cortex-m4-emulator.elf -ex "target remote localhost:1234"
|
||||
gdb-multiarch build/XiZi-cortex-m4-emulator.elf -ex "target remote localhost:1234"
|
||||
```
|
|
@ -20,10 +20,10 @@
|
|||
#include "board.h"
|
||||
#include "sys_arch.h"
|
||||
#include "lwip/udp.h"
|
||||
#include "lwip/sockets.h"
|
||||
#include <shell.h>
|
||||
#include <sys.h>
|
||||
#include <xizi.h>
|
||||
#include "lwip/sockets.h"
|
||||
|
||||
|
||||
#define PBUF_SIZE 27
|
||||
|
@ -102,8 +102,8 @@ void *LwipUdpSendTest(int argc, char *argv[])
|
|||
udp_interval = 100;
|
||||
} else {
|
||||
strncpy(udp_demo_msg, argv[1], strlen(argv[1]));
|
||||
strncat(udp_demo_msg, "\r\n", 2);
|
||||
if(argc == 3) {
|
||||
strncat(udp_demo_msg, "\r\n", 3);
|
||||
if(argc >= 3) {
|
||||
sscanf(argv[2], "%d.%d.%d.%d:%d", &udp_server_ip[0], &udp_server_ip[1], &udp_server_ip[2], &udp_server_ip[3], &udp_server_port);
|
||||
}
|
||||
if(argc > 3) {
|
||||
|
@ -119,7 +119,7 @@ void *LwipUdpSendTest(int argc, char *argv[])
|
|||
sys_thread_new("udp send", LwipUDPSendTask, NULL, LWIP_TASK_STACK_SIZE, LWIP_DEMO_TASK_PRIO);
|
||||
}
|
||||
|
||||
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0) | SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN) | SHELL_CMD_PARAM_NUM(3),
|
||||
SHELL_EXPORT_CMD(SHELL_CMD_PERMISSION(0) | SHELL_CMD_TYPE(SHELL_TYPE_CMD_MAIN) | SHELL_CMD_PARAM_NUM(5),
|
||||
UDPSend, LwipUdpSendTest, UDPSend msg [ip:port [num [interval]]]);
|
||||
|
||||
void LwipUdpRecvTest(void)
|
||||
|
|
Loading…
Reference in New Issue