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

Asset Tracker Program hangs before main on Thingy91

Hi,

We are having trouble getting the Thingy91 firmware running as is. We have achieved this in the past but I had made too many modifications and I decided to scrap it and start over. But I didn't realise that I could've just reused the cmake file so I uninstalled and reinstalled the SDK. 

We are trying to run the Asset Tracker project from the 1.3.0 toolchain.

So what happens is that when I build and debug instead of going to main() it stops here:

Then when it runs it hangs here:

I have tried to modify it to change the floating point configuration but I changed it back. I didn't try running it before the modifications

  • Please go through the following steps:

    • Extract it the BSEC library and put it into C:\Users\<username>\ncs\v1.3.1\nrf\ext
      • Make sure to not double the folders like this: C:\Users\<username>\ncs\v1.3.1\nrf\ext\bsec_1-4-7-4_generic_release\BSEC_1.4.7.4_Generic_Release, which may happen after you extract it
    • Then modified C:\Users\<username>\ncs\v1.3.1\nrf\applications\asset_tracker\prj_thingy91_nrf9160ns.conf accordingly: 

    -CONFIG_BME680=y
    -CONFIG_USE_BME680_BSEC=n
    +CONFIG_BME680=n
    +CONFIG_USE_BME680_BSEC=y

    • Remove the folder in C:\Users\<username>\ncs\v1.3.1\nrf\applications\asset_tracker\build_thingy91_nrf9160ns if present
    • Open SES from the Toolchain Manager and choose the followin settings:

    First time I run this I got a "Did not finish cmake", however I did it again with the same settings as above and it worked. I'll look into why this is.

    • Open C:\Users\<username>\ncs\v1.3.1\nrf\applications\asset_tracker\build_thingy91_nrf9160ns\zephyr\.config and make sure CONFIG_BME680 and CONFIG_USE_BME680_BSEC are set correctly. And that CONFIG_BOSCH_BSEC_LIBRARY_PATH points to the correct path
    • Next build the project:

    That worked for me.

    Best regards,

    Simon

  • Thanks. It seems that for some reason it must've not registered the folder. But I just redid the last steps that I did and now it compiles the config file without any issues. So now it's working and I get the air_quality

    It seems that the deciding factor was probably changing 1.4.8.0 to 1.4.7.4  and perhaps performing a restart of my system.

  • I have another question, I tried to run my Thingy91 off the battery but it shuts off instantly. My questions is if the battery charging functionality is in the firmware or hardware? Trying to figure out if it's a faulty batter or if I can flash something else on for it to charge then change back and run this version.

  • I'm happy you were able to build and run it eventually Slight smile

    I'm not sure about this question.

    Could you open a new ticket and ask the question there? In that way we can keep the forum more organized. If you're not sharing any confidential information, please create a public ticket. Then more users can benefit from the answers and you may get inputs from other developers.

    Best regards,

    Simon

Related