This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF52832 GCC Issues

Hello,

I'm trying to prototype an application on the nRf52 DK (PCA10040) using the GCC toolchain. I followed all of the tutorial for setting things up and I can build and flash things fine, but I don't think the application is working correctly.

I'm starting with the HID keyboard example as a baseline. I have not modified any of the source and it builds without errors. The application comes up, the light blinks, but my phone (galaxy S8) cannot see the device. I can occasionally see the device in nRF connect, but the advertisment frequency nRF connect shows does not jive with the configured advertising intervals of 25ms / 2 seconds in the example.

If I flash the board with the hex files provided with the examples everything works nicely. I'm guessing the examples were not built with GCC? I'm thinking this may be the problem may be with the tool chain. I, perhaps foolishly, grabbed the newest version of the GNU ARM (6 2017-q2-update). Are there any known issues with this version? Or is there an older version that is recommended?

I've tried SDK versions 12.3 and 14.2, with the same results

Thanks, Josh

Edit 1: Here is the hex file I referenced in the comment below, couldn't attach to a comment for some reason. Hex file

Parents
  • After a lot of trial and error last night I finally got things to work, and was able to zero in on the issue, but would like some help help understanding it.

    It all comes down to how I do the programming, as you suggested Matt, I've tried a lot of different ways to program the application, soft device (S132 v3 that was bundled with SKD 12.3), and combined hex files containing both. What eventually worked was programming the combined hex file with the command line tools (nrfjprog).

    If I command a --sectorerase the flashing goes fine but the application does not behave correctly, if I combine my application hex file and soft device and program them with a --chiperase things work perfectly. I also did some experimenting with programming the precompiled example (via nrfjprog), same behavior, --chiperase fails to pair, --sectorerase works. When I was originally troubleshooting I was programming my compiled hex files via the make file, which commands --sectorerase, and I was dropping the combined precompiled hex file into the USB mass storage device for the devboard and letting it do the programming. I'm guessing that the USB mass storage programming results in a chip erase, because things always seemed to work when I programmed the precompiled examples this way.

    Any thoughts on what could be causing this? Seems like a problem with the programming tool?

Reply
  • After a lot of trial and error last night I finally got things to work, and was able to zero in on the issue, but would like some help help understanding it.

    It all comes down to how I do the programming, as you suggested Matt, I've tried a lot of different ways to program the application, soft device (S132 v3 that was bundled with SKD 12.3), and combined hex files containing both. What eventually worked was programming the combined hex file with the command line tools (nrfjprog).

    If I command a --sectorerase the flashing goes fine but the application does not behave correctly, if I combine my application hex file and soft device and program them with a --chiperase things work perfectly. I also did some experimenting with programming the precompiled example (via nrfjprog), same behavior, --chiperase fails to pair, --sectorerase works. When I was originally troubleshooting I was programming my compiled hex files via the make file, which commands --sectorerase, and I was dropping the combined precompiled hex file into the USB mass storage device for the devboard and letting it do the programming. I'm guessing that the USB mass storage programming results in a chip erase, because things always seemed to work when I programmed the precompiled examples this way.

    Any thoughts on what could be causing this? Seems like a problem with the programming tool?

Children
No Data
Related