Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
RT-Thread一般讨论
如何裁剪rt-thread-2.01
发布于 2016-01-25 13:02:08 浏览:7077
订阅该版
如何裁剪rt-thread,我的版本是rt-thread-2.01 我照着rt-thread裁剪示例和附件里面的裁剪pdf做的,出了很多error.我用的是mdk5.15 下载附件 [实验_内核裁剪.pdf](https://oss-club.rt-thread.org/uploads/7490_ab765d29c4cee6bcff05a75341e1ec43.pdf) ![N0$9}R)A@({OKJ[Q@G3B]LD.png](https://oss-club.rt-thread.org/uploads/7490_af75eb4c0d34985203f67724321d9e0f.png) ![{DIHX7IS2UDMTI[8$)5Y4A0.png](https://oss-club.rt-thread.org/uploads/7490_63316abb644e3c6051c08b0c25d096d2.png)
查看更多
16
个回答
默认排序
按发布时间排序
aozima
2016-01-25
调网络不抓包,调I2C等时序不上逻辑分析仪,就像电工不用万用表!多用整理的好的文字,比截图更省流量,还能在整理过程中思考。
楼主是来请教问题,还是为分享经验?
筱l灬夏初eri
2016-01-29
这家伙很懒,什么也没写!
请教问题。 我照着wiki重新裁了下,这是编译出来的结果 ``` .uild tthread-stm32.axf: Warning: L6320W: Ignoring --keep command. Cannot find argument '__fsym_*'. .uild tthread-stm32.axf: Warning: L6320W: Ignoring --keep command. Cannot find argument '__vsym_*'. .uild tthread-stm32.axf: Warning: L6320W: Ignoring --keep command. Cannot find argument '__rt_init*'. ``` 报这错是什么原因啊,该如何改啊。 ``` *** Using Compiler 'V5.05 update 2 (build 169)', folder: 'D:keil_uv5ARMARMCCBin' Rebuild target 'rtthread-stm32' compiling application.c... applicationsapplication.c(145): warning: #177-D: variable "init_thread" was declared but never referenced rt_thread_t init_thread; applicationsapplication.c: 1 warning, 0 errors compiling startup.c... compiling board.c... compiling stm32f10x_it.c... compiling led.c... compiling system_stm32f10x.c... compiling stm32f10x_crc.c... compiling stm32f10x_rcc.c... compiling stm32f10x_wwdg.c... compiling stm32f10x_pwr.c... compiling stm32f10x_exti.c... compiling stm32f10x_bkp.c... compiling stm32f10x_i2c.c... compiling stm32f10x_adc.c... compiling stm32f10x_dac.c... compiling stm32f10x_rtc.c... compiling stm32f10x_fsmc.c... compiling stm32f10x_tim.c... compiling stm32f10x_iwdg.c... compiling stm32f10x_spi.c... compiling stm32f10x_flash.c... compiling stm32f10x_sdio.c... compiling stm32f10x_gpio.c... compiling stm32f10x_usart.c... compiling stm32f10x_dbgmcu.c... compiling stm32f10x_dma.c... compiling stm32f10x_can.c... compiling stm32f10x_cec.c... compiling misc.c... assembling startup_stm32f10x_md.s... compiling clock.c... compiling device.c... compiling idle.c... compiling ipc.c... compiling irq.c... compiling kservice.c... compiling mem.c... compiling mempool.c... compiling object.c... compiling scheduler.c... compiling thread.c... compiling timer.c... compiling cpuport.c... ....libcpuarmcortex-m3cpuport.c(296): warning: #177-D: variable "context" was declared but never referenced struct stack_frame* context = &exception_info->stack_frame; ....libcpuarmcortex-m3cpuport.c: 1 warning, 0 errors assembling context_rvds.S... ....libcpuarmcortex-m3context_rvds.S(206): warning: A1581W: Added 2 bytes of padding at address 0xd6 compiling backtrace.c... compiling div0.c... compiling showmem.c... linking... .uild tthread-stm32.axf: Warning: L6320W: Ignoring --keep command. Cannot find argument '__fsym_*'. .uild tthread-stm32.axf: Warning: L6320W: Ignoring --keep command. Cannot find argument '__vsym_*'. .uild tthread-stm32.axf: Warning: L6320W: Ignoring --keep command. Cannot find argument '__rt_init*'. Program Size: Code=11446 RO-data=558 RW-data=184 ZI-data=2176 Finished: 0 information, 3 warning and 0 error messages. FromELF: creating hex file... After Build - User command #1: fromelf --bin .uild tthread-stm32.axf --output rtthread.bin ".uild tthread-stm32.axf" - 0 Error(s), 6 Warning(s). Build Time Elapsed: 00:00:33 Load "F:\rtos\RT-Thread\source\rt-thread-v2.0.1\rt-thread-2.0.1\bsp\stm32f10x\build\rtthread-stm32.axf" Erase Done. Programming Done. Verify OK. Flash Load finished at 09:16:36 ```
筱l灬夏初eri
2016-01-29
这家伙很懒,什么也没写!
这是我按wiki上哪个列子配置的rtconfig.h ``` /* RT-Thread config file */ #ifndef __RTTHREAD_CFG_H__ #define __RTTHREAD_CFG_H__ /* RT_NAME_MAX*/ #define RT_NAME_MAX 8 /* RT_ALIGN_SIZE*/ #define RT_ALIGN_SIZE 4 /* PRIORITY_MAX */ #define RT_THREAD_PRIORITY_MAX 32 /* Tick per Second */ #define RT_TICK_PER_SECOND 100 /* SECTION: RT_DEBUG */ /* Thread Debug */ //#define RT_DEBUG //#define RT_THREAD_DEBUG //#define RT_USING_OVERFLOW_CHECK /* Using Hook */ //#define RT_USING_HOOK /* Using Software Timer */ /* #define RT_USING_TIMER_SOFT */ //#define RT_TIMER_THREAD_PRIO 4 //#define RT_TIMER_THREAD_STACK_SIZE 512 //#define RT_TIMER_TICK_PER_SECOND 10 /* SECTION: IPC */ /* Using Semaphore*/ #define RT_USING_SEMAPHORE /* Using Mutex */ #define RT_USING_MUTEX /* Using Event */ #define RT_USING_EVENT /* Using MailBox */ //#define RT_USING_MAILBOX ///* Using Message Queue */ //#define RT_USING_MESSAGEQUEUE ///* SECTION: Memory Management */ ///* Using Memory Pool Management*/ //#define RT_USING_MEMPOOL ///* Using Dynamic Heap Management */ //#define RT_USING_HEAP ///* Using Small MM */ //#define RT_USING_SMALL_MEM //
//#define RT_USING_COMPONENTS_INIT /* SECTION: Device System */ /* Using Device System */ //#define RT_USING_DEVICE ////
//#define RT_USING_DEVICE_IPC ////
//#define RT_USING_SERIAL /* SECTION: Console options */ //#define RT_USING_CONSOLE ///* the buffer size of console*/ //#define RT_CONSOLEBUF_SIZE 128 ////
//#define RT_CONSOLE_DEVICE_NAME "uart1" /* SECTION: finsh, a C-Express shell */ //#define RT_USING_FINSH ///* Using symbol table */ #define FINSH_USING_SYMTAB #define FINSH_USING_DESCRIPTION /* SECTION: device filesystem */ /* #define RT_USING_DFS */ #define RT_USING_DFS_ELMFAT /* Reentrancy (thread safe) of the FatFs module. */ #define RT_DFS_ELM_REENTRANT /* Number of volumes (logical drives) to be used. */ #define RT_DFS_ELM_DRIVES 2 /* #define RT_DFS_ELM_USE_LFN 1 */ /* #define RT_DFS_ELM_CODE_PAGE 936 */ #define RT_DFS_ELM_MAX_LFN 255 /* Maximum sector size to be handled. */ #define RT_DFS_ELM_MAX_SECTOR_SIZE 512 /* the max number of mounted filesystem */ #define DFS_FILESYSTEMS_MAX 2 /* the max number of opened files */ #define DFS_FD_MAX 4 /* SECTION: lwip, a lighwight TCP/IP protocol stack */ /* #define RT_USING_LWIP */ /* LwIP uses RT-Thread Memory Management */ #define RT_LWIP_USING_RT_MEM /* Enable ICMP protocol*/ #define RT_LWIP_ICMP /* Enable UDP protocol*/ #define RT_LWIP_UDP /* Enable TCP protocol*/ #define RT_LWIP_TCP /* Enable DNS */ #define RT_LWIP_DNS /* the number of simulatenously active TCP connections*/ #define RT_LWIP_TCP_PCB_NUM 5 /* Using DHCP */ /* #define RT_LWIP_DHCP */ /* ip address of target*/ #define RT_LWIP_IPADDR0 192 #define RT_LWIP_IPADDR1 168 #define RT_LWIP_IPADDR2 1 #define RT_LWIP_IPADDR3 30 /* gateway address of target*/ #define RT_LWIP_GWADDR0 192 #define RT_LWIP_GWADDR1 168 #define RT_LWIP_GWADDR2 1 #define RT_LWIP_GWADDR3 1 /* mask address of target*/ #define RT_LWIP_MSKADDR0 255 #define RT_LWIP_MSKADDR1 255 #define RT_LWIP_MSKADDR2 255 #define RT_LWIP_MSKADDR3 0 /* tcp thread options */ #define RT_LWIP_TCPTHREAD_PRIORITY 12 #define RT_LWIP_TCPTHREAD_MBOX_SIZE 10 #define RT_LWIP_TCPTHREAD_STACKSIZE 1024 /* ethernet if thread options */ #define RT_LWIP_ETHTHREAD_PRIORITY 15 #define RT_LWIP_ETHTHREAD_MBOX_SIZE 10 #define RT_LWIP_ETHTHREAD_STACKSIZE 512 /* TCP sender buffer space */ #define RT_LWIP_TCP_SND_BUF 8192 /* TCP receive window. */ #define RT_LWIP_TCP_WND 8192 /* SECTION: RT-Thread/GUI */ /* #define RT_USING_RTGUI */ /* name length of RTGUI object */ #define RTGUI_NAME_MAX 12 /* support 16 weight font */ #define RTGUI_USING_FONT16 /* support Chinese font */ #define RTGUI_USING_FONTHZ /* use DFS as file interface */ #define RTGUI_USING_DFS_FILERW /* use font file as Chinese font */ #define RTGUI_USING_HZ_FILE /* use Chinese bitmap font */ #define RTGUI_USING_HZ_BMP /* use small size in RTGUI */ #define RTGUI_USING_SMALL_SIZE /* use mouse cursor */ /* #define RTGUI_USING_MOUSE_CURSOR */ /* default font size in RTGUI */ #define RTGUI_DEFAULT_FONT_SIZE 16 /* image support */ /* #define RTGUI_IMAGE_XPM */ /* #define RTGUI_IMAGE_BMP */ //
// #define RT_USING_CMSIS_OS //
#define RT_USING_RTT_CMSIS //
// #define RT_USING_BSP_CMSIS #endif ```
bernard
2016-01-29
这家伙很懒,什么也没写!
这不是已经好了么
筱l灬夏初eri
2016-01-29
这家伙很懒,什么也没写!
>这不是已经好了么 --- 请教一下,这个警告如何解决 ``` .uild tthread-stm32.axf: Warning: L6320W: Ignoring --keep command. Cannot find argument '__fsym_*'. .uild tthread-stm32.axf: Warning: L6320W: Ignoring --keep command. Cannot find argument '__vsym_*'. .uild tthread-stm32.axf: Warning: L6320W: Ignoring --keep command. Cannot find argument '__rt_init*'. ```
bernard
2016-01-29
这家伙很懒,什么也没写!
工程设置,链接参数中移除
筱l灬夏初eri
2016-01-29
这家伙很懒,什么也没写!
>工程设置,链接参数中移除 --- [attach]2533[/attach] 谢谢,我按你说的做了就不报警告了 [attach]2534[/attach] 这几个参数的意思是什么啊,我在编程手册里 scons 这一章找到了,但不知道是什么意思啊,求教
acedox
2016-09-11
这家伙很懒,什么也没写!
如果不用MDK,直接用scons编译,在rtconfig.h注释哪些可以裁剪到最小配置?scons生成的bin文件目前只有26K最小,还能不能减少了?
aozima
2016-09-11
调网络不抓包,调I2C等时序不上逻辑分析仪,就像电工不用万用表!多用整理的好的文字,比截图更省流量,还能在整理过程中思考。
>如果不用MDK,直接用scons编译,在rtconfig.h注释哪些可以裁剪到最小配置?scons生成的bin文件目前只有26K最小,还能不能减少了? --- 用什么方式编译没太大区别,最终还是一样的编译器。建议直接使用MDK,调起来比较方便。 建议分析一下编译完成后的map文件,看看还有哪些可以裁剪的地方。 如楼上所示,一般在10多KB的样子。
acedox
2016-09-11
这家伙很懒,什么也没写!
我看了楼主那个pdf,也看了wiki上最小的裁剪方法,发现步骤中跟现在最新版本的已经不一样了。我适当修改了一些步骤,但是还是有报错。
撰写答案
登录
注册新账号
关注者
0
被浏览
7.1k
关于作者
筱l灬夏初eri
这家伙很懒,什么也没写!
提问
4
回答
10
被采纳
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】【ci】【scons】将ci.attachconfig.yml和scons结合使用
2
Rt-thread中OTA下载后,bootloader不搬程序
3
ulog 日志 LOG_HEX 输出时间改为本地日期时间
4
在RT-Thread Studio中构建前执行python命令
5
研究一了一段时间RTT,直接标准版上手太难,想用nano,但又舍不得组件
热门标签
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在线升级
cubemx
PWM
flash
freemodbus
BSP
packages_软件包
潘多拉开发板_Pandora
定时器
ADC
flashDB
GD32
socket
编译报错
中断
Debug
rt_mq_消息队列_msg_queue
SFUD
msh
keil_MDK
ulog
C++_cpp
MicroPython
本月问答贡献
出出啊
1518
个答案
343
次被采纳
小小李sunny
1444
个答案
290
次被采纳
张世争
813
个答案
177
次被采纳
crystal266
547
个答案
161
次被采纳
whj467467222
1222
个答案
149
次被采纳
本月文章贡献
出出啊
1
篇文章
5
次点赞
小小李sunny
1
篇文章
1
次点赞
张世争
1
篇文章
3
次点赞
crystal266
2
篇文章
2
次点赞
whj467467222
2
篇文章
2
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部