c - 无法使用 C30 编译器复制 PIC24FJ256GB206 中的数组

标签 c arrays memory out-of-memory mplab

我正在尝试使用 C30 编译器将数组复制到 PIC24 PIC24FJ256GB206 microcontroller 中的另一个数组。我的数组长度超过 1500 字节。 这是我的代码:-

int i=0;
int count = sizeof(rx.data.buff.fields.data);
for(i=0;i<count;i++)
{
    rec.data.data_block.data[i] = rx.data.buff.fields.data[i];
}

但是当我编译我的代码时,我得到这个错误:-

build/SINGLE_PORT_BAUD57600/production/_ext/733800733/rdso_icd_0065.o(.text+0x1604)c:\program files (x86)\microchip\mplab c30\bin\bin\..\bin/pic30-elf-ld.exe: Dwarf Error: found address size '3', this reader can only handle address sizes '2', '4' and '8'.
: In function `.LM403':
: undefined reference to `_rec'
make[2]: *** [dist/SINGLE_PORT_BAUD57600/production/StandaloneHCD.X.production.hex] Error 255
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2

显然这不是逻辑问题。但这可能是什么原因?解决方案是什么?谢谢

最佳答案

如果您的数据超过 8 KB,则必须将数据模型切换为大型:

ProjectProperties / Conf: / Memory model / Data model = Large

关于c - 无法使用 C30 编译器复制 PIC24FJ256GB206 中的数组,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51592603/

相关文章:

c - 如何正确地将元素存储在 C 的 char 数组中?

C-制作梯形矩阵?

c++ - 指向整数数组的指针

javascript - 将数组更改为小写

php - 在相等的键上组合 2 个数组

C# 如果项目不在数组中

R 内存管理建议(插入符号、模型矩阵、数据框)

python - 如何从 Linux 上当前运行的 Python 进程访问数据结构?

c - 简单程序中的 <Error> <main.c>

memory - Mathematica 中的子内核内存控制