No Serial output for NS buid on nrf7002-dk

Im using an nrf7002-dk. Whenever build like this: 

"west build --pristine -b nrf7002dk/nrf5340/cpuapp/ns"

theres no serial monitor output.

Ive tried both VCOM0 and VCOM1, the print() statements ive added to main() simply dont show.

I've been around in loops with the DevZone AI chat bot, and nothing it suggests has managed to solve this problem. I've created board overlays, tfm overlays, been through many different variations of kconfigs, tried sending the output to RTT instead of VCOM, it just will not print anything to tany of the consoles when I do an _ns build.

Can somebody with an nrf7002-dk please reproduce the following and tell me a solution if you have one:

- Create a new application, copy from sample "Hello World"

- Build and flash with the following command: west build --pristine -b nrf7002dk/nrf5340/cpuapp && west flash ... you will see the "Hello World" message in the console

- Build and flash with the following command: west build --pristine -b nrf7002dk/nrf5340/cpuapp/ns && west flash ... you will see no output to the console.

I still believe that there is a solution to this, perhaps it involves mapping some pins on the device so that the tf-m virtual com is mapped to the regular uart virtual com. I have no idea, but I am not experienced enough to start remapping pins, especially when the AI chat bot is reassuring me that it isnt necessary.

  • I did a little test and I think the code is actually crashing when I run it for _NS.

    I made a light blink on the board in a loop, when I run it in the strandard board (not _NS), i see the console output and the light blinks. When I run the exact same code for _NS, not only does the console not display anything, the light doesnt blink. Maybe I amseeing no console output because the code is immediately crashing before it has time to print anything to the console? If so then how can I solve this?

  • I think I may have found a solution, it was a bit of guess work (im still a noob around here), but heres what I did:

    - I loaded the `tfm_hello_world` sample.

    - I tried to run it, there was no console output

    - I noticed there are board overlays in the boards folder, so I copied the following files: 

        nrf5340dk_nrf5340_cpuapp_ns.overlay

        nrf5340dk_nrf5340_cpuapp_ns_bootloaders.overlay

        and I renamed the new copies to:

        nrf7002dk_nrf5340_cpuapp_ns.overlay

        nrf7002dk_nrf5340_cpuapp_ns_bootloaders.overlay

    So I essentially hijacked the overlay files for the nrf5340dk and used them for my nrf7002dk. My logic was that my dev kit actually has the nrf5340 chip, so the expected overlay files cant be much different from the nrf5340dk overlay files.

    Anyway, I see console output, so my hunch that the codde was crashing before any logs hit the serial monitor seems to be correct. Now that I have the parittions setup and also the .dts file (which is included in the tfm_hello_world sample), it *appears* to be working (for now lol).

    Anybody want to ease my mind and tell me whether I did the correct thing? Or maybe you have more appropriate overlay files for my sepecifc board?

    VCOM0

    *** Booting nRF Connect SDK v3.4.0-99553055607b ***
    *** Using Zephyr OS v4.4.0-bf801e4e3d19 ***
    Hello World! nrf7002dk/nrf5340/cpuapp/ns
    Reading some secure memory that NS is allowed to read
    Approximate IPC overhead us: 67
    FICR->INFO.FLASH: 0x00000400
    Generating random number
    0x4188eef63eb6c1e8540924cdf572a6b3cc7fe343398c488a433309da7fd95137
    Example finished successfully!

    VCOM1

    [INF] Pins have been configured as secure.
    [INF] GPIO port: 0x00000001
    [INF] Pin: 0x00000000
    [INF] Pin: 0x00000001
    [NOT] Booting TF-M v2.3.0**
    [NOT] Built Sun 23 Aug 2026 11:20:20 UTC

Related