msh />get_ipip address: 192.168.31.206同样我们看下mac,敲入命令:macmsh />macMAC address: c8-47-8c-37-4d-d30x04:编译环境Env搭建以下介绍来自于RT-Thread官网,大家看下即可: Env 是 RT-Thread 推出的开发辅助工具,针对基于 RT-Thread 操作系统的项目工程,提供编译构建环境、图形化系统配置及软件包管理...
/* Command shell */#defineRT_USING_FINSH#defineFINSH_THREAD_NAME"tshell"#defineFINSH_USING_HISTORY#defineFINSH_HISTORY_LINES 5#defineFINSH_USING_SYMTAB#defineFINSH_USING_DESCRIPTION#defineFINSH_THREAD_PRIORITY 20#defineFINSH_THREAD_STACK_SIZE 512#defineFINSH_CMD_SIZE 80#defineFINSH_USING_MSH#defineF...
char*argv[]){rt_pin_mode(56,PIN_MODE_OUTPUT);printf("Hello, world1\n");while(1){rt_pin_write(56,PIN_HIGH);rt_thread_mdelay(2000);rt_pin_write(56,PIN_LOW);rt_thread_mdelay(2000);}return0;}
6、在menu "RT-Thread Kernel -> Memory Management"下勾选Using memory heap object选项,并在子选项...
= RT_NULL) rt_thread_startup(thread); /* create t2 thread */ thread = rt_thread_create("thread2", thread_entry, (void *)20, THREAD_STACK_SIZE, THREAD_PRIORITY, THREAD_TIMESLICE); if (thread != RT_NULL) rt_thread_startup(thread); return 0; } /* export to the msh command ...
remove the executable permission of thread.c remove strnlen function add NULL check for rt_free and rt_free_align suuport perf_counter tighten size before check with mem_size_aligned Add string information for error fix a problem about finsh_set_prompt redefined msh command Unify the data type...
RT-Thread 的线程调度器是抢占式的,主要的工作就是从就绪线程列表中查找最高优先级线程,保证最高优先级的线程能够被运行,最高优先级的任务一旦就绪,总能得到 CPU 的使用权。 当调度器调度线程切换时,先将当前线程上下文保存起来,当再切回到这个线程时,线程调度器将该线程的上下文信息恢复。
/* file: hello.h */ #ifndef _HELLO_H_ #define _HELLO_H_ int hello_world(void); #endif /* _HELLO_H_ */ /* file: hello.c */ #include <stdio.h> #include <finsh.h> #include <rtthread.h> int hello_world(void) { rt_kprintf("Hello, world!\n"); return 0; } MSH_CMD_EXP...
使用scons编译,即可看到bsp/cvitek/output/milkv-duo256m/boot.sd文件,该文件为 milkv-duo256 大核 RISC-V 内核文件,更新至 SD 卡中,插上网线,上电在 msh 命令中可看到如下命令列表。 msh />help RT-Thread shell commands: tcpclient - Start a tcp client. Help: tcpclient --help ...
When enable finsh shell, rtthread.h header file includes the API file of finsh. Therefore, the application code can use command export feature without finsh.h file; Improve the comments of rtdbg.h file. In RT-Thread, just use following code to add debug log feature:#...