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

Getting started with a custom nRF9160 board and Eclipse IDE instead of SEGGER

We just received a batch of custom boards containing the nRF9160. I would like to test them and start developing our actual application.

So far I have switched SW11 to match the DK voltage with our board voltage, and connected the P22 Debug Out to our board. It seems that when I flash a program, our custom board is targeted. We see its status LED blink.

Currently I am experiencing some barriers:
- Can I use Eclipse instead of SEGGER?
I have used SES for the past 2 days, and it's just not what I want to use. What are steps to take so I can use Eclipse?

- How to define our custom board so I can e.g. blink its LEDs?
The LEDs are on different pins than they are on the DK.
Besides adding a new board folder to the zephyr/boards folder, what are the actual changes I should make to these files. Currently when I tried it with Hello_world, i get "attempt to assign the value 'y' to the undefined symbol"
What other files do I need to edit?
How do I actually make the build use my custom board?

  • newUser said:
    Awesome, thank you. I will go through the steps and let you know if I got it working!

    Just let me know if anything pops up! 

    I'm not very familiar with eclipse, but I think most of the things related to building and so-forth should be quite OK to setup. Debug setup might be a bit more challenging.

    I see there is a helper plugin (I personally haven't tested) that might be beneficial to look at

    https://github.com/zephyrproject-rtos/eclipse-plugin

      

    newUser said:
    By the way, I must say that I'm quite happy with the support you are offering, phenomenal response times.

    I'm glad to hear.

    We usually respond within 24 hours, but we tend to respond quicker when the time zones align.

     

    Kind regards,

    Håkon

  • Hi Håkon, hope you had a good weekend,

    So far I can build via Eclipse, after adding the west build commands to it.
    I got some errors about include files it couldn't find, so I added those paths to the include paths.

    Currently I am still getting errors saying that it can't find types / functions declared in those header files, but if I open the header file, they are there. Any tips on this?

    Also, any thoughts on how I can flash and debug from within Eclipse?

  • Hi,

     

    newUser said:
    Currently I am still getting errors saying that it can't find types / functions declared in those header files, but if I open the header file, they are there. Any tips on this?

    That sounds like a indexing problem within eclipse. I'm not that familiar with eclipse, but have to regenerated the index after adding files?

      

    newUser said:
    Also, any thoughts on how I can flash and debug from within Eclipse?

    This is where it will be a bit complicated, and we do not have a guide on this, unfortunately.

    Did you look into the zephyr plugin? It seems to have a section on hardware debugging:

    https://github.com/zephyrproject-rtos/eclipse-plugin#debugging-on-hardware

     

    You can start the debugger via "west debug", or command line:

    JLinkGDBServer -if swd -device nrf9160_xxaa

     

    Your .gdbinit should autoconnect if you add these commands:

    target remote localhost:2331

    load

     

    But; note that if you have a multi-image build, like all project for nrf9160 are, you should first load the merged.hex file, to get SPM and other multi-build images (mcuboot for instance) loaded to flash.

     

    Kind regards,

    Håkon

Related