[英]Error when using MSP430 driver library: "Only large data model supported for this ROM."
I'm relatively new to MSP430-programming and want to use the driver lib ( https://www.ti.com/tool/MSPDRIVERLIB ) for the MSP430FR2355.我对 MSP430 编程比较陌生,想使用 MSP430FR2355 的驱动程序库 ( https://www.ti.com/tool/MSPDRIVERLIB )。 I included the library
"driverlib.h"
in an new empty project with the following code:我使用以下代码将库
"driverlib.h"
包含在一个新的空项目中:
#include <msp430.h>
#include "driverlib.h"
/**
* main.c
*/
int main(void)
{
WDTCTL = WDTPW | WDTHOLD; // stop watchdog timer
return 0;
}
Unfortunately when compiling I get the following error message:不幸的是,在编译时我收到以下错误消息:
"{path}\TestLaunchPad\driverlib\MSP430FR2xx_4xx\rom_headers/rom_driverlib_fr235x.h", line 39: fatal error #35: #error directive: "Only large data model supported for this ROM."
, where {path}
is the location of the project on my computer. ,其中
{path}
是我计算机上项目的位置。
The affected part in the file rom_driverlib_fr235x.h
of the library is the following:库文件
rom_driverlib_fr235x.h
中受影响的部分如下:
#if (defined(__TI_COMPILER_VERSION__) && !defined(__LARGE_DATA_MODEL__)) || \
(defined(__IAR_SYSTEMS_ICC__) && (__DATA_MODEL__!=__DATA_MODEL_LARGE__))
#error "Only large data model supported for this ROM."
#endif
I don't understand, what I am doing wrong or how I could specify the large data model, respectively.我不明白,我做错了什么或如何分别指定大数据 model。
Does anyone know how to solve this problem?有谁知道如何解决这个问题?
Thanks for your support.谢谢你的支持。
I got an answer on another forum.我在另一个论坛上得到了答案。 Maybe someone else faces the same problem, so I'll post the solution here:
也许其他人面临同样的问题,所以我将在此处发布解决方案:
In Code Composer Studio go to Properties -> Processor Options and try the settings as shown in this screenshot .在 Code Composer Studio go 到Properties -> Processor Options并尝试设置如此屏幕截图所示。
Many thanks to Johnson, who provided this answer ( https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1001359/mspdriverlib-error-when-using-msp430-driver-library-only-large-data-model-supported-for-this-rom )!非常感谢约翰逊,他提供了这个答案( https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/1001359/ mspdriverlib-error-when-using-msp430-driver-library-only-large-data-model-supported-for-this-rom )!
Best regards.此致。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.