This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BOOSTXL-PGA460: Energia: Undefined Reference When Running GetDistance Example

Part Number: BOOSTXL-PGA460
Other Parts Discussed in Thread: ENERGIA, PGA460

I am trying to use the GetDistance example program for the BOOSTXL-PGA460 in Energia. I am stuck at the verification stage before I try to upload it to the board. When I attempt to verify the program, the first error among many is:

sketch\PGA460_USSC.cpp.o: In function `pga460::initBoostXLPGA460(unsigned char, unsigned long, unsigned char)':

PGA460_USSC.cpp:(.text._ZN6pga46017initBoostXLPGA460Ehmh+0x236): undefined reference to `spi_initialize_pga460()'

I've tried several things to get this working including putting the definition directly into the PGA460_USSC.cpp file, changing or adding includes so that the function should definitely be defined, installing the BOOST Energia files using the GUI's .zip uploader, manually installing the files, trying it on a separate computer (both Win10 x64), and more.

The problem is only when using these BOOSTXL-PGA460 example programs. I can get the general ones, such as blinking the LEDs, to work just fine.

Can anyone provide some insight into the problem I'm having? Perhaps even a simple installation guide would help in case I'm missing some simple yet critical step to getting this working since these programs are not included with the general Energia download.

Thanks for any help/advice!

  • Hi Joseph,

    There is likely an issue with how the custom PGA460 library was linked to Energia. I just successfully checked the install and setup process of Energia and the PGA460 Library/Examples on a different Win10 x64 machine to verify all of the PGA460 sketches are still compatible with the latest version of Energia. Here are the steps I took:

    1. Download and unzip the Windows Binary release version of Energia onto my Desktop
    2. Download the PGA460 Energia/Library zip into the Downloads folder (location should not matter)
    3. Run the Energia.exe file
    4. Navigate to the menu bar --> Sketch --> Include Library  --> Add.ZIP Library...
    5. Select the zipped PGA460 Energia Library file (slac741.zip)
    6. Check if "PGA460_USSC" library has been added to the Contributed library list in the menu listing from step 4.
    7. Open an Example PGA460 sketch file from the the menu bar --> File --> Examples --> PGA460_USSC (at very bottom of list) --> GetDistance.ino
    8. With the sketch open, click Verify, and the sketch should compile without error

  • Akeem,

    This solved the problem. Turns out I was making a simple mistake after all. Specifically, attempting to run the GetDistance sketch from the general list (leftover after an attempted manual install of the PGA460 Library).

    Everything works fine now, and I sincerely thank you for your patience and assistance with this problem.

    Regards,

    Joseph Summers