我正在使用Eclipse kepler进行AVR开发.我拥有的代码是C(开源),我已经调整它以便它完美运行.我的目标是ATmega2560,采用arduino mega2560的形式.使用arduino板严格用于硬件方便; 我们正在开发硬件作为定制板,其中包含大多数核心arduino mega2560组件.
我需要在这个项目中使用几个库,它们只能用作arduino库,即电子纸屏幕库(来自seeedstudio)和Nordic的BLE nRF8001.
如果我在eclipse中使用插件创建一个新的arduino项目,我可以完美地构建和运行arduino库的测试.
当我尝试将两个代码库合并在一起时,我似乎无法调用添加的arduino库中的函数 - 如果我调用它们,编译器会抛出链接错误.
Building target: Virgin2ManualArdInsert.elf
Invoking: AVR C Linker
avr-gcc -Wl,-Map,Virgin2ManualArdInsert.map -mmcu=atmega2560 -o "Virgin2ManualArdInsert.elf" ./avr/adc.o ./avr/eeprom.o ./avr/lcd_and_input.o ./avr/main.o ./avr/strings.o ./avr/unimplemented.o ./avr/usart.o ./aes.o ./baseconv.o ./bignum256.o ./ecdsa.o ./endian.o ./fft.o ./fix16.o ./hash.o ./hmac_sha512.o ./messages.pb.o ./p2sh_addr_gen.o ./pb_decode.o ./pb_encode.o ./pbkdf2.o ./prandom.o ./ripemd160.o ./sha256.o ./statistics.o ./stream_comm.o ./test_helpers.o ./transaction.o ./wallet.o ./xex.o
./avr/main.o: In function `main':
main.c:(.text.startup.main+0xc): undefined reference to `writeEink'
collect2: error: ld returned 1 exit status
makefile:53: recipe for target 'Virgin2ManualArdInsert.elf' failed
make: *** [Virgin2ManualArdInsert.elf] Error 1 …Run Code Online (Sandbox Code Playgroud)