DSP:CCS V6 TMS320F2812 使用printf函数

使用Code Composer Studio  Version: 6.1.1.00022,建立TMS320F2812工程。

1 /*
2  * main.c
3  */
4 #include <stdio.h>
5 
6 int main(void) {
7     printf("Hello DSP!\r\n");
8     return 0;
9 }

添加了printf函数想测试一下,然后编译出错。

1 #10099-D</a> program will not fit into available memory. placement with alignment/blocking fails for section ".text" size 0x1be0 page 0. Available memory ranges:    2812_RAM_lnk.cmd    /2812Test    line 86    C/C++ Problem

查阅资料,应该调整-stack和-heap的大小,并且工程库文件必须选择rts2800_ml.lib而不是rts2800.lib。不过我修改-stack和-heap如下图,无效。

更改工程库文件为rts2800_ml.lib也无效,最后在Project-Properties-Build-Advanced Options-Library Function Assumptions下,Level of printf/scanf support required(--printf_support)选择minimal,如下图。编译通过。

 

posted @ 2015-11-20 15:56  BG8LY  阅读(2125)  评论(0)    收藏  举报