basic - how to run first app and get printk output

Hello, I know it's a bit basic, but running through all the docs for thingy91:x I got a bit lost.

https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/device_guides/thingy91x/thingy91x_updating_fw_programmer.html

I have set up VS Code, managed to get autocomplete going, also to build app, and to flash it. It's very basic hello world with blinking LED and outputing to printk.

$ nrfutil device program --firmware build/dfu_application.zip --serial-number THINGY91X_46EEE983CDD --traits mcuBoot --x-family nrf91 --core Application
[00:00:07] ###### 100% [4/4 THINGY91X_46EE...] Programmed    

When I connect to the board with Serial Terminal app I get

ttyACM0:
*** Booting nRF Connect SDK v2.7.99-cfb2a11d0139 ***
*** Using Zephyr OS v3.6.99-2fb756ef5c41 ***
Attempting to boot slot 0.
Attempting to boot from address 0x8200.
I: Verifying signature against key 0.
I: Hash: 0x3e...f9
I: Firmware signature verified.
Firmware version 2
*** Booting nRF Connect SDK v3.0.2-89ba1294ac9b ***
*** Using Zephyr OS v4.0.99-f791c49f492c ***

ttyACM1:
All pins have been configured as non-secure
Booting TF-M v2.1.1-ncs4-2
[Sec Thread] Secure image initializing!

Board is connected through USB directly to computer.

So - I can not see any printk I added to main(), also LED is not blinking. Please help me what did I miss

Parents
  • Hi,

    $ nrfutil device program --firmware build/dfu_application.zip --serial-number THINGY91X_46EEE983CDD --traits mcuBoot --x-family nrf91 --core Application
    [00:00:07] ###### 100% [4/4 THINGY91X_46EE...] Programmed    

    Which specific firmware did you flash to your board?
    Have you put your device into DFU mode before flashing? You can look at this nrfutil guide for reference.

    Best regards,
    Dejan

Reply
  • Hi,

    $ nrfutil device program --firmware build/dfu_application.zip --serial-number THINGY91X_46EEE983CDD --traits mcuBoot --x-family nrf91 --core Application
    [00:00:07] ###### 100% [4/4 THINGY91X_46EE...] Programmed    

    Which specific firmware did you flash to your board?
    Have you put your device into DFU mode before flashing? You can look at this nrfutil guide for reference.

    Best regards,
    Dejan

Children
  • Hello Dejan,

    thank you for taking time and reply.

    I see there are many different firmwares that are mentioned in documentation, and this part is probably the most confusing until now Slight smile

    I did not enter any DFU mode. Firmware is the one that gets built by visual studio code - dfu_application.zip when i Build application. Build configuration is set for board thingy91x/nrf9151/ns.

    I will take a look, I hope I gave some information to guide me where I did mistake.

    I will now take a look at nrfutil guide.

    Best regards
    Simon

  • Hello again,

    I did take a look and at https://youtu.be/S-w3-cut2E0?t=607 this timestamp, I can see commad takes app_signed.hex as firmware file. I don't see this file, below is list of all .hex files in build directory. Is any of this correct?

    As first time user of this platform is really confusing for me, i'm sorry.

    248 Jul 9 15:01 ./app_provision.hex
    74K Jul 9 15:01 ./b0_container.hex
    76K Jul 9 15:01 ./b0/zephyr/zephyr.hex
    69K Jul 9 15:01 ./hello/tfm/api_ns/bin/tfm_s.hex
    69K Jul 9 15:01 ./hello/tfm/bin/tfm_s.hex
    210K Jul 9 15:01 ./hello/zephyr/tfm_merged.hex
    146K Jul 9 15:01 ./hello/zephyr/zephyr.hex
    231K Jul 9 15:01 ./hello/zephyr/zephyr.signed.hex
    131K Jul 9 15:01 ./mcuboot/zephyr/zephyr.hex
    560K Jul 9 15:01 ./merged.hex
    128K Jul 9 15:01 ./s0.hex
    128K Jul 9 15:01 ./s0_image.hex
    128K Jul 9 15:01 ./s1.hex
    131K Jul 9 15:01 ./s1_image/zephyr/zephyr.hex
    128K Jul 9 15:01 ./signed_by_b0_mcuboot.hex
    128K Jul 9 15:01 ./signed_by_b0_s1_image.hex
    130K Jul 9 15:01 ./signed_by_mcuboot_and_b0_mcuboot.hex
    130K Jul 9 15:01 ./signed_by_mcuboot_and_b0_s1_image.hex
  • Hello

    I followed https://www.hackster.io/Salmanfarisvp/2-makertrain-introduction-to-thingy-91x-nrf-connect-241425 - I have added 

    CONFIG_BOOTLOADER_MCUBOOT=y to prj.conf
    I have also deleted build folder and add build config ... Then I was able to see printk that I added to code in Serial Terminal app on ttyACM0 port.
    Would you maybe know what caused the problem in a first place? was CONFIG_BOOTLOADER_MCUBOOT=y the soluton?
Related