Skip to content

dts2repl generates unresolved types (NRF_CLOCK, NRF_USBD) for nrf52840dk when using zephyr.dts #9

@Pipoderoso

Description

@Pipoderoso

Context:

  • Zephyr Application
    • Board: nrf52840dk/nrf52840
  • Renode: v1.15.3.18516
  • dts2repl: main as of today

Description
I want my renode simulation to use a .repl file generated from the flatten zephyr.dts file. So I am calling:

dts2repl build/zephyr/zephyr.dts 

and using the generated output.repl in my resc script:

machine LoadPlatformDescription $ORIGIN/output.repl

When running the simulation I get the following error:

There was an error executing command 'machine LoadPlatformDescription @/home/user/embu/firmware/products/nrf52840-pca10056-showcase/embuz/boards/nordic/nrf52840dk/support/output.repl'
Error E04: Could not resolve type: 'Miscellaneous.NRF_CLOCK'.
At /home/user/embu/firmware/products/nrf52840-pca10056-showcase/embuz/boards/nordic/nrf52840dk/support/output.repl:94:8:
clock: Miscellaneous.NRF_CLOCK @ sysbus 0x40000000

So I noticed that the .repl file available from Renode uses Miscellaneous.NRF52840_CLOCK instead Miscellaneous.NRF_CLOCK for the clock. Once I manually change the value the problem is solved.

Next, I got the following error:

There was an error executing command 'machine LoadPlatformDescription @/home/user/embu/firmware/products/nrf52840-pca10056-showcase/embuz/boards/nordic/nrf52840dk/support/output.repl'
Error E04: Could not resolve type: 'USB.NRF_USBD'.
At /home/user/embu/firmware/products/nrf52840-pca10056-showcase/embuz/boards/nordic/nrf52840dk/support/output.repl:127:7:
usbd: USB.NRF_USBD @ sysbus 0x40027000

When I checked in the .repl file from Renode there is no usbd: USB.NRF_USBD anywhere. So I comment it out and then the simulation runs without any problem.

Conclusion

  • For the first problem it seems like the models.yml file should be updated from:
    ...
    "nordic,nrf-clock": "Miscellaneous.NRF_CLOCK",
    ...
    To:
    ...
    "nordic,nrf-clock": "Miscellaneous.NRF52840_CLOCK",
    ...
  • For the second problem it seems like usbd: USB.NRF_USBD is being added while still not available in Renode. Is that true?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions