avr_nrf_ancs_library
avr_nrf_ancs_library copied to clipboard
Compile error - fresh checkout
I have an compile error on a fresh checkout:
/Arduino/libraries/avr_nrf_ancs_library/notif.cpp -o /var/folders/b4/3lk6k8j555bcg1dl08t56sn00000gn/T/build5927702850562884119.tmp/avr_nrf_ancs_library/notif.cpp.o /Arduino/libraries/avr_nrf_ancs_library/notif.cpp:53:23: error: setup_msgs causes a section type conflict with c static hal_aci_data_t setup_msgs[NB_SETUP_MESSAGES] PROGMEM = SETUP_MESSAGES_CONTENT; ^ In file included from Arduino/libraries/avr_nrf_ancs_library/notif.cpp:14:0: /Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/avr/cores/arduino/WString.h:38:74: note: '__c' was declared here
define F(string_literal) (reinterpret_cast(PSTR(string_literal)))
^ /Arduino/libraries/avr_nrf_ancs_library/utilities.h:13:43: note: in definition of macro 'debug_println'
define debug_println(...) Serial.println(__VA_ARGS)
^ /Arduino/libraries/avr_nrf_ancs_library/notif.cpp:769:27: note: in expansion of macro 'F' debug_println(F(" - Succesfully setup nRF8001")); ^ Have you an Idea?
Hi,
this is due to the F()
macros that enables the code to access the string literals directly from the Flash memory, instead of keeping them in RAM. You can safely comment out all the debug_println()
stuff, or change into Serial.println
, though it should work.
Though, I'm a bit lost in current code base as I merged blindly @robotastic 's code in, because I don't have anymore the hardware to test the code on. He even broke my Makefile
:-s (I hate the arduino UI ;-) )
If I can get my hands on a redbearlab BLE shield, I'd be glad to look at it again.