TMRh20 / nrf_to_nrf

OSI Layer 2 (ESB) Radio Driver for NRF52x
https://tmrh20.github.io/nrf_to_nrf/html
GNU General Public License v3.0
20 stars 4 forks source link

basic example does not compile on platformio on nRF52-DK Board #24

Closed mkoenings closed 2 months ago

mkoenings commented 2 months ago

Hello, I have used the nrf24 library successfully, on different hardware, thank you so much for this brilliant library! Now I want to connect a stm32 with a nrf24 with a nrf52-DK, with this library, but no luck.. Its the SDK too new maybe? Some member names are not valid. Thanks!

the example does not compile on platformio using the latest version of the nrf_to_nrf library with platform nrf52 version 10.5.0 build log:

`|-- nrf_to_nrf @ 1.2.11+sha.bf0c860

Building in release mode Compiling .pio\build\nrf52_dk\libcee\nrf_to_nrf\nrf_to_nrf.cpp.o .pio\libdeps\nrf52_dk\nrf_to_nrf\src\nrf_to_nrf.cpp: In constructor 'nrf_to_nrf::nrf_to_nrf()': .pio\libdeps\nrf52_dk\nrf_to_nrf\src\nrf_to_nrf.cpp:86:14: error: 'struct NRF_CCM_Type' has no member named 'MAXPACKETSIZE'
NRF_CCM->MAXPACKETSIZE = MAX_PACKET_SIZE; ^~~~~ .pio\libdeps\nrf52_dk\nrf_to_nrf\src\nrf_to_nrf.cpp: In member function 'bool nrf_to_nrf::write(void, uint8_t, bool, bool)': .pio\libdeps\nrf52_dk\nrf_to_nrf\src\nrf_to_nrf.cpp:455:24: error: 'struct NRF_RADIO_Type' has no member named 'EVENTS_TXREADY'; did you mean 'EVENTS_READY'? NRF_RADIO->EVENTS_TXREADY = 0; ^~~~~~ EVENTS_READY .pio\libdeps\nrf52_dk\nrf_to_nrf\src\nrf_to_nrf.cpp:457:31: error: 'struct NRF_RADIO_Type' has no member named 'EVENTS_TXREADY'; did you mean 'EVENTS_READY'? while (NRF_RADIO->EVENTS_TXREADY == 0) { ^~~~~~ EVENTS_READY .pio\libdeps\nrf52_dk\nrf_to_nrf\src\nrf_to_nrf.cpp:459:24: error: 'struct NRF_RADIO_Type' has no member named 'EVENTS_TXREADY'; did you mean 'EVENTS_READY'? NRF_RADIO->EVENTS_TXREADY = 0; ^~~~~~ EVENTS_READY .pio\libdeps\nrf52_dk\nrf_to_nrf\src\nrf_to_nrf.cpp: In member function 'bool nrf_to_nrf::startWrite(void, uint8_t, bool, bool)': .pio\libdeps\nrf52_dk\nrf_to_nrf\src\nrf_to_nrf.cpp:647:20: error: 'struct NRF_RADIO_Type' has no member named 'EVENTS_TXREADY'; did you mean 'EVENTS_READY'? NRF_RADIO->EVENTS_TXREADY = 0; ^~~~~~ EVENTS_READY .pio\libdeps\nrf52_dk\nrf_to_nrf\src\nrf_to_nrf.cpp:649:27: error: 'struct NRF_RADIO_Type' has no member named 'EVENTS_TXREADY'; did you mean 'EVENTS_READY'? while (NRF_RADIO->EVENTS_TXREADY == 0) { ^~~~~~ EVENTS_READY .pio\libdeps\nrf52_dk\nrf_to_nrf\src\nrf_to_nrf.cpp:651:20: error: 'struct NRF_RADIO_Type' has no member named 'EVENTS_TXREADY'; did you mean 'EVENTS_READY'? NRF_RADIO->EVENTS_TXREADY = 0; ^~~~~~ EVENTS_READY .pio\libdeps\nrf52_dk\nrf_to_nrf\src\nrf_to_nrf.cpp: In member function 'void nrf_to_nrf::startListening(bool)': .pio\libdeps\nrf52_dk\nrf_to_nrf\src\nrf_to_nrf.cpp:729:16: error: 'struct NRF_RADIO_Type' has no member named 'EVENTS_RXREADY'; did you mean 'EVENTS_READY'? NRF_RADIO->EVENTS_RXREADY = 0; ^~~~~~ EVENTS_READY *** [.pio\build\nrf52_dk\libcee\nrf_to_nrf\nrf_to_nrf.cpp.o] Error 1 `

2bndy5 commented 2 months ago

https://github.com/TMRh20/nrf_to_nrf/blob/bf0c86054f65bbe832be3e85ba2f0c2d5d3788a9/library.json#L16

Are you using the Arduino framework? Which nRF52 DK are you using?

This lib may be rather "new", but the nRF SDK certainly is not.

mkoenings commented 2 months ago

thanks for the quick reply. yes, the arduino framework. I am using the board called nrf52-DK with the nRF52832 SoC https://docs.platformio.org/en/latest/boards/nordicnrf52/nrf52_dk.html#board-nordicnrf52-nrf52-dk I tried the same on Arduino , fresh download of the platform, fresh installation of the nrf_to_nrf lib via zip. I get the same error messages. What can I try ? thanks

2bndy5 commented 2 months ago

I would first attempt to get it compiling in Arduino IDE (this is an Arduino library after all).

Notes from sandeepmistry Arduino core's README

There's an [extra step about flashing the softdevice to the board first](https://github.com/sandeepmistry/arduino-nRF5#selecting-a-softdevice). Despite the fact that this lib disallows BLE functionality, it still uses the softdevice API to access NRF_RADIO peripheral. There's also some [notes about the bootloader needing to be updated](https://github.com/sandeepmistry/arduino-nRF5?tab=readme-ov-file#nrf52).

I was able to reproduce this in Arduino IDE (despite setting the softdevice in the tools menu) and PlatformIO.

Full compiler output (Arduino IDE)

``` FQBN: sandeepmistry:nRF5:nRF52DK:softdevice=s132 Using board 'nRF52DK' from platform in folder: C:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0 Using core 'nRF5' from platform in folder: C:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0 Detecting libraries used... C:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\tools\gcc-arm-none-eabi\5_2-2015q4/bin/arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -c -g -Os -w -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=16000000 -DARDUINO=10607 -DARDUINO_NRF52_DK -DARDUINO_ARCH_NRF5 -DNRF52 -DS132 -DNRF51_S132 -DNRF5 -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5/SDK/components/toolchain/ -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5/SDK/components/toolchain/CMSIS/Include -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5/SDK/components/toolchain/gcc/ -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5/SDK/components/device/ -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5/SDK/components/drivers_nrf/delay/ -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5/SDK/components/softdevice/s132/headers/ -DUSE_LFXO -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5 -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\variants\nRF52DK C:\Users\ytreh\AppData\Local\Temp\arduino\sketches\9C15DCBE3C71E0236B8913C72712F8B8\sketch\GettingStarted.ino.cpp -o nul Alternatives for nrf_to_nrf.h: [nrf_to_nrf@1.2.11] ResolveLibrary(nrf_to_nrf.h) -> candidates: [nrf_to_nrf@1.2.11] C:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\tools\gcc-arm-none-eabi\5_2-2015q4/bin/arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -c -g -Os -w -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=16000000 -DARDUINO=10607 -DARDUINO_NRF52_DK -DARDUINO_ARCH_NRF5 -DNRF52 -DS132 -DNRF51_S132 -DNRF5 -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5/SDK/components/toolchain/ -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5/SDK/components/toolchain/CMSIS/Include -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5/SDK/components/toolchain/gcc/ -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5/SDK/components/device/ -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5/SDK/components/drivers_nrf/delay/ -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5/SDK/components/softdevice/s132/headers/ -DUSE_LFXO -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5 -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\variants\nRF52DK -Ic:\Users\ytreh\Documents\Arduino\libraries\nrf_to_nrf\src C:\Users\ytreh\AppData\Local\Temp\arduino\sketches\9C15DCBE3C71E0236B8913C72712F8B8\sketch\GettingStarted.ino.cpp -o nul C:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\tools\gcc-arm-none-eabi\5_2-2015q4/bin/arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -c -g -Os -w -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=16000000 -DARDUINO=10607 -DARDUINO_NRF52_DK -DARDUINO_ARCH_NRF5 -DNRF52 -DS132 -DNRF51_S132 -DNRF5 -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5/SDK/components/toolchain/ -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5/SDK/components/toolchain/CMSIS/Include -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5/SDK/components/toolchain/gcc/ -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5/SDK/components/device/ -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5/SDK/components/drivers_nrf/delay/ -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5/SDK/components/softdevice/s132/headers/ -DUSE_LFXO -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5 -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\variants\nRF52DK -Ic:\Users\ytreh\Documents\Arduino\libraries\nrf_to_nrf\src c:\Users\ytreh\Documents\Arduino\libraries\nrf_to_nrf\src\nrf_to_nrf.cpp -o nul WARNING: library nrf_to_nrf claims to run on nordicnrf52, nrf52 architecture(s) and may be incompatible with your current board which runs on nRF5 architecture(s). Generating function prototypes... C:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\tools\gcc-arm-none-eabi\5_2-2015q4/bin/arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -c -g -Os -w -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=16000000 -DARDUINO=10607 -DARDUINO_NRF52_DK -DARDUINO_ARCH_NRF5 -DNRF52 -DS132 -DNRF51_S132 -DNRF5 -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5/SDK/components/toolchain/ -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5/SDK/components/toolchain/CMSIS/Include -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5/SDK/components/toolchain/gcc/ -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5/SDK/components/device/ -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5/SDK/components/drivers_nrf/delay/ -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5/SDK/components/softdevice/s132/headers/ -DUSE_LFXO -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\cores\nRF5 -IC:\Users\ytreh\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.8.0\variants\nRF52DK -Ic:\Users\ytreh\Documents\Arduino\libraries\nrf_to_nrf\src C:\Users\ytreh\AppData\Local\Temp\arduino\sketches\9C15DCBE3C71E0236B8913C72712F8B8\sketch\GettingStarted.ino.cpp -o C:\Users\ytreh\AppData\Local\Temp\4174685237\sketch_merged.cpp C:\Users\ytreh\AppData\Local\Arduino15\packages\builtin\tools\ctags\5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives C:\Users\ytreh\AppData\Local\Temp\4174685237\sketch_merged.cpp Compiling sketch... "C:\\Users\\ytreh\\AppData\\Local\\Arduino15\\packages\\sandeepmistry\\tools\\gcc-arm-none-eabi\\5_2-2015q4/bin/arm-none-eabi-g++" -mcpu=cortex-m4 -mthumb -c -g -Os -Wall -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DF_CPU=16000000 -DARDUINO=10607 -DARDUINO_NRF52_DK -DARDUINO_ARCH_NRF5 -DNRF52 -DS132 -DNRF51_S132 -DNRF5 "-IC:\\Users\\ytreh\\AppData\\Local\\Arduino15\\packages\\sandeepmistry\\hardware\\nRF5\\0.8.0\\cores\\nRF5/SDK/components/toolchain/" "-IC:\\Users\\ytreh\\AppData\\Local\\Arduino15\\packages\\sandeepmistry\\hardware\\nRF5\\0.8.0\\cores\\nRF5/SDK/components/toolchain/CMSIS/Include" "-IC:\\Users\\ytreh\\AppData\\Local\\Arduino15\\packages\\sandeepmistry\\hardware\\nRF5\\0.8.0\\cores\\nRF5/SDK/components/toolchain/gcc/" "-IC:\\Users\\ytreh\\AppData\\Local\\Arduino15\\packages\\sandeepmistry\\hardware\\nRF5\\0.8.0\\cores\\nRF5/SDK/components/device/" "-IC:\\Users\\ytreh\\AppData\\Local\\Arduino15\\packages\\sandeepmistry\\hardware\\nRF5\\0.8.0\\cores\\nRF5/SDK/components/drivers_nrf/delay/" "-IC:\\Users\\ytreh\\AppData\\Local\\Arduino15\\packages\\sandeepmistry\\hardware\\nRF5\\0.8.0\\cores\\nRF5/SDK/components/softdevice/s132/headers/" -DUSE_LFXO "-IC:\\Users\\ytreh\\AppData\\Local\\Arduino15\\packages\\sandeepmistry\\hardware\\nRF5\\0.8.0\\cores\\nRF5" "-IC:\\Users\\ytreh\\AppData\\Local\\Arduino15\\packages\\sandeepmistry\\hardware\\nRF5\\0.8.0\\variants\\nRF52DK" "-Ic:\\Users\\ytreh\\Documents\\Arduino\\libraries\\nrf_to_nrf\\src" "C:\\Users\\ytreh\\AppData\\Local\\Temp\\arduino\\sketches\\9C15DCBE3C71E0236B8913C72712F8B8\\sketch\\GettingStarted.ino.cpp" -o "C:\\Users\\ytreh\\AppData\\Local\\Temp\\arduino\\sketches\\9C15DCBE3C71E0236B8913C72712F8B8\\sketch\\GettingStarted.ino.cpp.o" Compiling libraries... Compiling library "nrf_to_nrf" "C:\\Users\\ytreh\\AppData\\Local\\Arduino15\\packages\\sandeepmistry\\tools\\gcc-arm-none-eabi\\5_2-2015q4/bin/arm-none-eabi-g++" -mcpu=cortex-m4 -mthumb -c -g -Os -Wall -mfloat-abi=hard -mfpu=fpv4-sp-d16 -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DF_CPU=16000000 -DARDUINO=10607 -DARDUINO_NRF52_DK -DARDUINO_ARCH_NRF5 -DNRF52 -DS132 -DNRF51_S132 -DNRF5 "-IC:\\Users\\ytreh\\AppData\\Local\\Arduino15\\packages\\sandeepmistry\\hardware\\nRF5\\0.8.0\\cores\\nRF5/SDK/components/toolchain/" "-IC:\\Users\\ytreh\\AppData\\Local\\Arduino15\\packages\\sandeepmistry\\hardware\\nRF5\\0.8.0\\cores\\nRF5/SDK/components/toolchain/CMSIS/Include" "-IC:\\Users\\ytreh\\AppData\\Local\\Arduino15\\packages\\sandeepmistry\\hardware\\nRF5\\0.8.0\\cores\\nRF5/SDK/components/toolchain/gcc/" "-IC:\\Users\\ytreh\\AppData\\Local\\Arduino15\\packages\\sandeepmistry\\hardware\\nRF5\\0.8.0\\cores\\nRF5/SDK/components/device/" "-IC:\\Users\\ytreh\\AppData\\Local\\Arduino15\\packages\\sandeepmistry\\hardware\\nRF5\\0.8.0\\cores\\nRF5/SDK/components/drivers_nrf/delay/" "-IC:\\Users\\ytreh\\AppData\\Local\\Arduino15\\packages\\sandeepmistry\\hardware\\nRF5\\0.8.0\\cores\\nRF5/SDK/components/softdevice/s132/headers/" -DUSE_LFXO "-IC:\\Users\\ytreh\\AppData\\Local\\Arduino15\\packages\\sandeepmistry\\hardware\\nRF5\\0.8.0\\cores\\nRF5" "-IC:\\Users\\ytreh\\AppData\\Local\\Arduino15\\packages\\sandeepmistry\\hardware\\nRF5\\0.8.0\\variants\\nRF52DK" "-Ic:\\Users\\ytreh\\Documents\\Arduino\\libraries\\nrf_to_nrf\\src" "c:\\Users\\ytreh\\Documents\\Arduino\\libraries\\nrf_to_nrf\\src\\nrf_to_nrf.cpp" -o "C:\\Users\\ytreh\\AppData\\Local\\Temp\\arduino\\sketches\\9C15DCBE3C71E0236B8913C72712F8B8\\libraries\\nrf_to_nrf\\nrf_to_nrf.cpp.o" c:\Users\ytreh\Documents\Arduino\libraries\nrf_to_nrf\src\nrf_to_nrf.cpp: In constructor 'nrf_to_nrf::nrf_to_nrf()': c:\Users\ytreh\Documents\Arduino\libraries\nrf_to_nrf\src\nrf_to_nrf.cpp:87:14: error: 'struct NRF_CCM_Type' has no member named 'MAXPACKETSIZE' NRF_CCM->MAXPACKETSIZE = MAX_PACKET_SIZE; ^ c:\Users\ytreh\Documents\Arduino\libraries\nrf_to_nrf\src\nrf_to_nrf.cpp: In member function 'bool nrf_to_nrf::write(void*, uint8_t, bool, bool)': c:\Users\ytreh\Documents\Arduino\libraries\nrf_to_nrf\src\nrf_to_nrf.cpp:449:24: error: 'struct NRF_RADIO_Type' has no member named 'EVENTS_TXREADY' NRF_RADIO->EVENTS_TXREADY = 0; ^ c:\Users\ytreh\Documents\Arduino\libraries\nrf_to_nrf\src\nrf_to_nrf.cpp:451:31: error: 'struct NRF_RADIO_Type' has no member named 'EVENTS_TXREADY' while (NRF_RADIO->EVENTS_TXREADY == 0) { ^ c:\Users\ytreh\Documents\Arduino\libraries\nrf_to_nrf\src\nrf_to_nrf.cpp:453:24: error: 'struct NRF_RADIO_Type' has no member named 'EVENTS_TXREADY' NRF_RADIO->EVENTS_TXREADY = 0; ^ c:\Users\ytreh\Documents\Arduino\libraries\nrf_to_nrf\src\nrf_to_nrf.cpp: In member function 'bool nrf_to_nrf::startWrite(void*, uint8_t, bool, bool)': c:\Users\ytreh\Documents\Arduino\libraries\nrf_to_nrf\src\nrf_to_nrf.cpp:638:24: error: 'struct NRF_RADIO_Type' has no member named 'EVENTS_TXREADY' NRF_RADIO->EVENTS_TXREADY = 0; ^ c:\Users\ytreh\Documents\Arduino\libraries\nrf_to_nrf\src\nrf_to_nrf.cpp:640:31: error: 'struct NRF_RADIO_Type' has no member named 'EVENTS_TXREADY' while (NRF_RADIO->EVENTS_TXREADY == 0) { ^ c:\Users\ytreh\Documents\Arduino\libraries\nrf_to_nrf\src\nrf_to_nrf.cpp:642:24: error: 'struct NRF_RADIO_Type' has no member named 'EVENTS_TXREADY' NRF_RADIO->EVENTS_TXREADY = 0; ^ c:\Users\ytreh\Documents\Arduino\libraries\nrf_to_nrf\src\nrf_to_nrf.cpp: In member function 'void nrf_to_nrf::startListening(bool)': c:\Users\ytreh\Documents\Arduino\libraries\nrf_to_nrf\src\nrf_to_nrf.cpp:719:16: error: 'struct NRF_RADIO_Type' has no member named 'EVENTS_RXREADY' NRF_RADIO->EVENTS_RXREADY = 0; ^ Using library nrf_to_nrf at version 1.2.11 in folder: C:\Users\ytreh\Documents\Arduino\libraries\nrf_to_nrf exit status 1 Compilation error: exit status 1 ```

Full compiler output (PlatformIO)

``` Processing nrf52_dk (platform: nordicnrf52; board: nrf52_dk; framework: arduino) ----------------------------------------------------------------------------------- Verbose mode can be enabled via `-v, --verbose` option CONFIGURATION: https://docs.platformio.org/page/boards/nordicnrf52/nrf52_dk.html PLATFORM: Nordic nRF52 (10.5.0) > Nordic nRF52-DK HARDWARE: NRF52832 64MHz, 64KB RAM, 512KB Flash DEBUG: Current (jlink) On-board (cmsis-dap, jlink) External (blackmagic, stlink) PACKAGES: - framework-arduinonordicnrf5 @ 1.800.0 (8.0) - tool-sreccat @ 1.164.0 (1.64) - toolchain-gccarmnoneeabi @ 1.70201.0 (7.2.1) LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf LDF Modes: Finder ~ chain, Compatibility ~ soft Found 3 compatible libraries Scanning dependencies... Dependency Graph |-- nrf_to_nrf @ 1.2.11 Building in release mode Compiling .pio\build\nrf52_dk\src\main.cpp.o Compiling .pio\build\nrf52_dk\lib0b5\nrf_to_nrf\nrf_to_nrf.cpp.o Compiling .pio\build\nrf52_dk\FrameworkArduinoVariant\variant.cpp.o Compiling .pio\build\nrf52_dk\FrameworkArduino\IPAddress.cpp.o Compiling .pio\build\nrf52_dk\FrameworkArduino\Print.cpp.o Compiling .pio\build\nrf52_dk\FrameworkArduino\RingBuffer.cpp.o Compiling .pio\build\nrf52_dk\FrameworkArduino\SDK\components\toolchain\gcc\gcc_startup_nrf51.S.o Compiling .pio\build\nrf52_dk\FrameworkArduino\SDK\components\toolchain\gcc\gcc_startup_nrf52.S.o .pio\libdeps\nrf52_dk\nrf_to_nrf\src\nrf_to_nrf.cpp: In constructor 'nrf_to_nrf::nrf_to_nrf()': .pio\libdeps\nrf52_dk\nrf_to_nrf\src\nrf_to_nrf.cpp:87:14: error: 'struct NRF_CCM_Type' has no member named 'MAXPACKETSIZE' NRF_CCM->MAXPACKETSIZE = MAX_PACKET_SIZE; ^~~~~~~~~~~~~ .pio\libdeps\nrf52_dk\nrf_to_nrf\src\nrf_to_nrf.cpp: In member function 'bool nrf_to_nrf::write(void*, uint8_t, bool, bool)': .pio\libdeps\nrf52_dk\nrf_to_nrf\src\nrf_to_nrf.cpp:449:24: error: 'struct NRF_RADIO_Type' has no member named 'EVENTS_TXREADY'; did you mean 'EVENTS_READY'? NRF_RADIO->EVENTS_TXREADY = 0; ^~~~~~~~~~~~~~ EVENTS_READY .pio\libdeps\nrf52_dk\nrf_to_nrf\src\nrf_to_nrf.cpp:451:31: error: 'struct NRF_RADIO_Type' has no member named 'EVENTS_TXREADY'; did you mean 'EVENTS_READY'? while (NRF_RADIO->EVENTS_TXREADY == 0) { ^~~~~~~~~~~~~~ EVENTS_READY .pio\libdeps\nrf52_dk\nrf_to_nrf\src\nrf_to_nrf.cpp:453:24: error: 'struct NRF_RADIO_Type' has no member named 'EVENTS_TXREADY'; did you mean 'EVENTS_READY'? NRF_RADIO->EVENTS_TXREADY = 0; ^~~~~~~~~~~~~~ EVENTS_READY .pio\libdeps\nrf52_dk\nrf_to_nrf\src\nrf_to_nrf.cpp: In member function 'bool nrf_to_nrf::startWrite(void*, uint8_t, bool, bool)': .pio\libdeps\nrf52_dk\nrf_to_nrf\src\nrf_to_nrf.cpp:638:24: error: 'struct NRF_RADIO_Type' has no member named 'EVENTS_TXREADY'; did you mean 'EVENTS_READY'? NRF_RADIO->EVENTS_TXREADY = 0; ^~~~~~~~~~~~~~ EVENTS_READY .pio\libdeps\nrf52_dk\nrf_to_nrf\src\nrf_to_nrf.cpp:640:31: error: 'struct NRF_RADIO_Type' has no member named 'EVENTS_TXREADY'; did you mean 'EVENTS_READY'? while (NRF_RADIO->EVENTS_TXREADY == 0) { ^~~~~~~~~~~~~~ EVENTS_READY .pio\libdeps\nrf52_dk\nrf_to_nrf\src\nrf_to_nrf.cpp:642:24: error: 'struct NRF_RADIO_Type' has no member named 'EVENTS_TXREADY'; did you mean 'EVENTS_READY'? NRF_RADIO->EVENTS_TXREADY = 0; ^~~~~~~~~~~~~~ EVENTS_READY .pio\libdeps\nrf52_dk\nrf_to_nrf\src\nrf_to_nrf.cpp: In member function 'void nrf_to_nrf::startListening(bool)': .pio\libdeps\nrf52_dk\nrf_to_nrf\src\nrf_to_nrf.cpp:719:16: error: 'struct NRF_RADIO_Type' has no member named 'EVENTS_RXREADY'; did you mean 'EVENTS_READY'? NRF_RADIO->EVENTS_RXREADY = 0; ^~~~~~~~~~~~~~ EVENTS_READY *** [.pio\build\nrf52_dk\lib0b5\nrf_to_nrf\nrf_to_nrf.cpp.o] Error 1 ```

I'm not sure what is going on here. It might be the SDK used by the Arduino core, but I haven't investigated that yet. I don't think PlatformIO uses the same Arduino core for this board when using the Arduino framework. The PlatformIO's nordicnrf52 platform package points to mbed nRF5_DK as the vendor URL in the board's json config.


WARNING: library nrf_to_nrf claims to run on nordicnrf52, nrf52 architecture(s) and may be incompatible with your current board which runs on nRF5 architecture(s).

@TMRh20 I think this might be fixed by adjusting the library.properties. This was seen in the Arduino IDE output.

2bndy5 commented 2 months ago

Please add "for nRF52_DK board" to this issue's title. We want specificity here, not a misleading generalization. This lib has been tested on various nRF52840 boards.

TMRh20 commented 2 months ago

It looks like this relates to compatibility issues between the NRF52840 and NRF52832.

For example, the registers described in the datasheet indicate there is no EVENTS_TXREADY register in the NRF52832. The same goes with CCM_MAXPACKETSIZE, it simply doesn't exist on the 52832.

In any case, the library would need some modifications to work with this device. Unfortunately without a 52832 device to test with, I'm not going to attempt to make the required changes.

If I remember correctly, from the NRF52 SDK, there is also some changes to addressing that are required for the 52832 to work with NRF24 etc. as well.

mkoenings commented 2 months ago

ok, fair point. I was hoping the NRF52832 would be more or less more compatible with the ..40, but that doesn't seem to be the case. I will get a NRF52840 board and try again. Thanks for looking into this!