0

Is there any video or pdf tutorial which shows step by step guide on how to do Zephyr porting to a new SoC. I know there is a page on Zephyr website, https://docs.zephyrproject.org/latest/hardware/porting/arch.html#architecture-porting-guide but this does not give me detailed view of what files to create where and what should be their content etc.

Any reference to such a guide will be very nice. Thanks a lot in advance.

1 Answers1

0

Video or PDF - probably no. Sources of Zephyr speaks for itself.

According to tags you have Cortex-M based SoC. So Architecture Porting Guide is not for you.

First of all you shold understand what is Devicetree. There is whole folder of DTs of ARM based SoCs. Take several for reference.

Next step. Is there drivers for peripherals of your SoC? If no, you should write drivers. For reference take a look at drivers folder. While driver development you shold think about DT and use DT related macroses. If you already have HAL, you just need to write glue code.

You should "connect" driver code and Devicetree of SoC: use bindings.

SoC needs linker script and maybe SoC related initialization code. For references look at soc folder.

Now you have Zephyr for your SoC!

In the end you get on board level. Write dts for SoC featured board. Examples here.

  • Thanks a lot. I will try to follow these steps. I have been using STM32Fx using HAL, LL and my own custom bare metal code for a long time and wanted to explore Zephyr. Hopefully, these steps will help me. I will put up an update if i get stuck somewhere or get success doing so. – Sheikh Muhammad Junaid Aslam Jul 29 '22 at 22:24
  • I posted a question related to device tree parent child relation enforcement. Can you please have a look here: https://stackoverflow.com/questions/73276808/zephyr-device-tree-parent-child-device-relation-enforcement – Sheikh Muhammad Junaid Aslam Aug 08 '22 at 11:07