【MSPM0L1306 LaunchPad】移植rt-thread_nano系统
[复制链接]
本帖最后由 TL-LED 于 2023-10-18 11:49 编辑
这篇来学习下在MSPM0L1306 LaunchPad开发板上移植rt-thread_nano系统。
一、系统rt-thread-nano系统的pack安装
pack安装有两种方式,一是手动安装,一是IDE内安装,下面我选择IDE内安装
1.1、找到RealThread-RT-Thread,选择最新版本
1.2、点击安装
1.3、添加内核到工程文件
1.4、添加完成后的系统文件
二、修改文件
系统源文件添加完成后,需要修改和开发板相关的代码
2.1、board.c文件修改地方如下
硬件初始化和滴答定时器中断处理
修改内存堆
2.2、main.c
#include "ti_msp_dl_config.h"
#include "led/led.h"
#include "rtthread.h"
int main(void)
{
while (1)
{
led1_r_tog();
rt_thread_mdelay(100);
led2_g_tog();
rt_thread_mdelay(100);
}
}
三、程序运行
LED交替闪烁
rt-thread-nano-led
|