💬 MySensors NRF5 Platform
-
@rmtucker said in 💬 MySensors NRF5 Platform:
Where is myBoardNrf5 so i can check?
This is the better repository: https://github.com/mysensors/ArduinoHwNRF5
@neverdie said in 💬 MySensors NRF5 Platform:
@d00616 Maybe you can just make it like it was before, where there was only one pair of I2c pins, not two as in your upgraded version? Maybe then it would work again.
Please give me some time. After an debug session with @scalz and @Yveaux, I think this is a tool chain (GCC 5.3) problem. The pin mapping array is part of the binary, but the Wire constructor gets an array with 0 while the Wire instance has pin mapping information.
Yesterday, I had a try to port ArduinoHwNRF5 back to the same tool chain (GCC 4.8) used by Arduino Primo and SAMD boards. I think for compatibility, this is the best option.
If I have no luck, I either remove the option of the pin remapping table or I go back to the old version. I think going back is no good idea, because the NRF52840 has more than one 32 GPIO, which requires advanced parameters.
-
@rmtucker said in 💬 MySensors NRF5 Platform:
Where is myBoardNrf5 so i can check?
This is the better repository: https://github.com/mysensors/ArduinoHwNRF5
@neverdie said in 💬 MySensors NRF5 Platform:
@d00616 Maybe you can just make it like it was before, where there was only one pair of I2c pins, not two as in your upgraded version? Maybe then it would work again.
Please give me some time. After an debug session with @scalz and @Yveaux, I think this is a tool chain (GCC 5.3) problem. The pin mapping array is part of the binary, but the Wire constructor gets an array with 0 while the Wire instance has pin mapping information.
Yesterday, I had a try to port ArduinoHwNRF5 back to the same tool chain (GCC 4.8) used by Arduino Primo and SAMD boards. I think for compatibility, this is the best option.
If I have no luck, I either remove the option of the pin remapping table or I go back to the old version. I think going back is no good idea, because the NRF52840 has more than one 32 GPIO, which requires advanced parameters.
@d00616 said in 💬 MySensors NRF5 Platform:
Back from the compiler hell. There is no chance getting the GCC 4.8 to work without forking the arduino-nrf5 code. Compiling with GCC 4.8 has the same result.I have changed the templates a little bit and moved the code for pin mapping generation. Now it works for me. Please give me some time to clear the code and create a new package (0.3.0). With the new package, you have to add '#include <compat_pin_mapping.h>' before '#end" in MyBoardNRF5.cpp. You have to rename the '#ifdefs' and '#define' in both board files to match MYBOARDNRF5 instead of MYNRF5BOARD.
-
@d00616 said in 💬 MySensors NRF5 Platform:
Back from the compiler hell. There is no chance getting the GCC 4.8 to work without forking the arduino-nrf5 code. Compiling with GCC 4.8 has the same result.I have changed the templates a little bit and moved the code for pin mapping generation. Now it works for me. Please give me some time to clear the code and create a new package (0.3.0). With the new package, you have to add '#include <compat_pin_mapping.h>' before '#end" in MyBoardNRF5.cpp. You have to rename the '#ifdefs' and '#define' in both board files to match MYBOARDNRF5 instead of MYNRF5BOARD.
@d00616 said in 💬 MySensors NRF5 Platform:
I have changed the templates a little bit and moved the code for pin mapping generation. Now it works for me. Please give me some time to clear the code and create a new package (0.3.0). With the new package, you have to add '#include <compat_pin_mapping.h>' before '#end" in MyBoardNRF5.cpp. You have to rename the '#ifdefs' and '#define' in both board files to match MYBOARDNRF5 instead of MYNRF5BOARD.
Now, there is a new Version 0.3.0 for MyBoardNRF5 available. It can be installed via the Board Manager. Please change the templates like described above. I think, now the board definition is stable and ready to support other Arduino variants without changing the board definition.
-
@d00616 said in 💬 MySensors NRF5 Platform:
I have changed the templates a little bit and moved the code for pin mapping generation. Now it works for me. Please give me some time to clear the code and create a new package (0.3.0). With the new package, you have to add '#include <compat_pin_mapping.h>' before '#end" in MyBoardNRF5.cpp. You have to rename the '#ifdefs' and '#define' in both board files to match MYBOARDNRF5 instead of MYNRF5BOARD.
Now, there is a new Version 0.3.0 for MyBoardNRF5 available. It can be installed via the Board Manager. Please change the templates like described above. I think, now the board definition is stable and ready to support other Arduino variants without changing the board definition.
-
I think I made the changes you recommended, but now I'm getting:
Board MyBoard_nRF51822 (platform nRF5, package MySensors) is unknown Error compiling for board MyBoardNRF5 nRF51822.@neverdie said in 💬 MySensors NRF5 Platform:
I think I made the changes you recommended, but now I'm getting:
Board MyBoard_nRF51822 (platform nRF5, package MySensors) is unknownError compiling for board MyBoardNRF5 nRF51822.
I had the same message. In my case, I have uninstalled arduino-nrf5, cleared files, which are not removed from packages directory (the 0.2.1 MyBoard files) and reinstalled arduino-nrf5. After restarting Arduino it was fine.
-
@neverdie said in 💬 MySensors NRF5 Platform:
I think I made the changes you recommended, but now I'm getting:
Board MyBoard_nRF51822 (platform nRF5, package MySensors) is unknownError compiling for board MyBoardNRF5 nRF51822.
I had the same message. In my case, I have uninstalled arduino-nrf5, cleared files, which are not removed from packages directory (the 0.2.1 MyBoard files) and reinstalled arduino-nrf5. After restarting Arduino it was fine.
@d00616
I'm still getting the error. I tried deleting arduino-nrf5 library and re-installing it fresh, but I don't know how, on Windows, to clear files and remove them from the packages directory. I'm not even aware of their being a "packages directory." Sorry. -
@d00616 You mentioned that it works only with a particular version of GCC. Does that mean I need to have a particular version of the Arduino IDE installed? I'm currently running the latest version of Windows Arduino IDE, which is 1.8.5.
-
The irony of it all is that the earlier setup from 3 or so weeks ago seemed to work just fine. Unfortunately, I no longer have any idea how to get back to that. :sob:
-
@scalz said in 💬 MySensors NRF5 Platform:
@NeverDie
C:\Users...\AppData\Local\Arduino15\packages\MySensors\Thanks!
The good news is that it compiles now. Also, the pin mapping for an LED is working. However, the bad news is that pin mapping for Serial Rx and Tx doesn't seem to be working, so I can't read any serial debug messages. Therefore, not sure if I2C is working or not.
-
I did another purge and reinsatall of the boards, and now serial is working. :)
-
Unfortunately, it does not appear that I2C is working.
-
Curiously, I2c does seem to work on a nRF52 DK using the myboard board definition.
-
However, it doesn't seem to be working on the nrf51.
-
@d00616 You mentioned that it works only with a particular version of GCC. Does that mean I need to have a particular version of the Arduino IDE installed? I'm currently running the latest version of Windows Arduino IDE, which is 1.8.5.
@neverdie said in 💬 MySensors NRF5 Platform:
@d00616 You mentioned that it works only with a particular version of GCC. Does that mean I need to have a particular version of the Arduino IDE installed? I'm currently running the latest version of Windows Arduino IDE, which is 1.8.5.
The GCC version is part of the arduino-nrf5 distribution.
@neverdie said in 💬 MySensors NRF5 Platform:
Unfortunately, it does not appear that I2C is working.
I have I2C and serial running with a NRF52832.
You can try to remove the compat_pin_mapping line and add the 0.1.0 pin map at this place. Then the board definition is nearly the 0.1.0 version.@neverdie said in 💬 MySensors NRF5 Platform:
However, it doesn't seem to be working on the nrf51.
I check the NRF51 board. What do you mean with no working?
-
I hope that narrows down the likely cause of the problem. The fact that it's working on the nRF52 gives me some hope it can be made to work on the nRF51.
-
@neverdie said in 💬 MySensors NRF5 Platform:
@d00616 You mentioned that it works only with a particular version of GCC. Does that mean I need to have a particular version of the Arduino IDE installed? I'm currently running the latest version of Windows Arduino IDE, which is 1.8.5.
The GCC version is part of the arduino-nrf5 distribution.
@neverdie said in 💬 MySensors NRF5 Platform:
Unfortunately, it does not appear that I2C is working.
I have I2C and serial running with a NRF52832.
You can try to remove the compat_pin_mapping line and add the 0.1.0 pin map at this place. Then the board definition is nearly the 0.1.0 version.@neverdie said in 💬 MySensors NRF5 Platform:
However, it doesn't seem to be working on the nrf51.
I check the NRF51 board. What do you mean with no working?
@d00616 said in 💬 MySensors NRF5 Platform:
I check the NRF51 board. What do you mean with no working?
The nRF51 can't find the si7021 device, even though it's connected.
-
@neverdie said in 💬 MySensors NRF5 Platform:
@d00616 You mentioned that it works only with a particular version of GCC. Does that mean I need to have a particular version of the Arduino IDE installed? I'm currently running the latest version of Windows Arduino IDE, which is 1.8.5.
The GCC version is part of the arduino-nrf5 distribution.
@neverdie said in 💬 MySensors NRF5 Platform:
Unfortunately, it does not appear that I2C is working.
I have I2C and serial running with a NRF52832.
You can try to remove the compat_pin_mapping line and add the 0.1.0 pin map at this place. Then the board definition is nearly the 0.1.0 version.@neverdie said in 💬 MySensors NRF5 Platform:
However, it doesn't seem to be working on the nrf51.
I check the NRF51 board. What do you mean with no working?
@d00616 said in 💬 MySensors NRF5 Platform:
I have I2C and serial running with a NRF52832.
Yes, it does seem to work on the nRF52832. Just not presently on the nRF51822.
-
@neverdie said in 💬 MySensors NRF5 Platform:
@d00616 You mentioned that it works only with a particular version of GCC. Does that mean I need to have a particular version of the Arduino IDE installed? I'm currently running the latest version of Windows Arduino IDE, which is 1.8.5.
The GCC version is part of the arduino-nrf5 distribution.
@neverdie said in 💬 MySensors NRF5 Platform:
Unfortunately, it does not appear that I2C is working.
I have I2C and serial running with a NRF52832.
You can try to remove the compat_pin_mapping line and add the 0.1.0 pin map at this place. Then the board definition is nearly the 0.1.0 version.@neverdie said in 💬 MySensors NRF5 Platform:
However, it doesn't seem to be working on the nrf51.
I check the NRF51 board. What do you mean with no working?
@d00616 said in 💬 MySensors NRF5 Platform:
I check the NRF51 board. What do you mean with no working?
I'm running the sparkfun si7021 code. When I run it on the nrf52832, it yields:
Si7021 Found Temp:70.51F, Humidity:40.71%which is correct, but when I run it on the nRF51822, the result is:
No Devices Detected Temp:-51.85F, Humidity:-5.81%which is incorrect.
-
@d00616 said in 💬 MySensors NRF5 Platform:
I have I2C and serial running with a NRF52832.
Yes, it does seem to work on the nRF52832. Just not presently on the nRF51822.
@neverdie said in 💬 MySensors NRF5 Platform:
@d00616 said in 💬 MySensors NRF5 Platform:
I have I2C and serial running with a NRF52832.
Yes, it does seem to work on the nRF52832. Just not presently on the nRF51822.
Can you check, if the device works with the "Generic NRF51822" board? You can edit the variant files in the arduino-nrf5\variants directory.
C:\Users...\AppData\Local\Arduino15\packages\sandeepmistry\hardware\nRF5\0.4.0\variants\Generic