我想知道在Arduino草图中编译时这些库会导致此错误:
c:/users/dmcar/appdata/local/arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe: address 0x200042c4 of C:\Users\DMCar\AppData\Local\Temp\arduino_build_482614/CytonRadio.ino.elf section `.bss' is not within region `ram'
c:/users/dmcar/appdata/local/arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe: address 0x200042c4 of C:\Users\DMCar\AppData\Local\Temp\arduino_build_482614/CytonRadio.ino.elf section `.bss' is not within region `ram'
c:/users/dmcar/appdata/local/arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe: address 0x200042c4 of C:\Users\DMCar\AppData\Local\Temp\arduino_build_482614/CytonRadio.ino.elf section `.bss' is not within region `ram'
collect2.exe: error: ld returned 1 exit status
这是我的代码
#include <RFduinoBLE.h>
#include <RFduinoGZLL.h>
#include "OpenBCI_Radios.h"
int blePin = 4;
bool isBle = false;
void setup() {
pinMode(blePin, INPUT);
isBle = digitalRead(blePin);
if (isBle) {
// do ble setup
RFduinoBLE.deviceName = "WEEGi";
RFduinoBLE.advertisementInterval = 333;
RFduinoBLE.txPowerLevel = -8;
RFduinoBLE.advertisementData = "cyton";
RFduinoBLE.begin();
} else {
// do gzll setup
radio.begin(OPENBCI_MODE_DEVICE,20);
}
}
void loop() {
}
我知道问题是由RFduinoBLE库的使用引起的。我只是不确定为什么。我尝试删除代码的不同部分,但似乎唯一可以使其工作的是评论行RFduinoBLE.begin();
或删除radio.begin();
行并删除#include "OpenBCI_Radios.h"
。
因此,这两个库之间会发生一些事情,导致链接时出现故障。我似乎无法找到它是什么。任何建议都值得赞赏,这里是查看源代码的回购: