Benjamin Cabé

Zephyr Weekly Update – Participate in Zephyr Developer Survey 2023!

Zephyr Weekly Update - September 15, 2023

Zephyr Weekly Update - September 15, 2023

There is one week to go until the feature freeze for Zephyr 3.5, and also just about a week to participate in this year’s Zephyr Developer survey.

Whether you are using Zephyr for work or just for a pet project, we’d love to hear from you and understand what you love about the project and the community, and what you’d want to see improved. I promise it should take you less than 10 minutes to fill out, and your input will be incredibly useful to shape the future of the project.

Understanding and troubleshooting initialization levels

Understanding initialization levels and how all the various drivers “light up” when a Zephyr application starts can be pretty intimidating.

That’s why you will likely appreciate the introduction of a new tool making things very visual when it comes to the bootstrapping of your application.

The new initlevels target in west gives you a quick way to dump the list of init functions that are being called at each stage of the booting process. (PR #62459)

Let’s say I want to use this with the newly added LVGL demo apps, running on an M5Stack Core2.

 west build -t initlevels -p -b m5stack_core2 -s .\samples\modules\lvgl\demos\ --  -DCONFIG_LV_Z_DEMO_MUSIC=y

The output would be as follows, giving me a good overview of when each driver is kicking in, and making it easier to spot potential bugs in the bootstrap sequence of my application.

EARLY
PRE_KERNEL_1
  __init___device_dts_ord_5: clock_control_esp32_init(__device_dts_ord_5)
  __init_statics_init_pre: statics_init(NULL)
  __init___device_dts_ord_11: gpio_esp32_init(__device_dts_ord_11)
  __init___device_dts_ord_13: gpio_esp32_init(__device_dts_ord_13)
  __init___device_dts_ord_58: entropy_esp32_init(__device_dts_ord_58)
  __init___device_dts_ord_61: uart_esp32_init(__device_dts_ord_61)
  __init_uart_console_init: uart_console_init(NULL)
PRE_KERNEL_2
  __init_sys_clock_driver_init: sys_clock_driver_init(NULL)
POST_KERNEL
  __init_enable_logger: enable_logger(NULL)
  __init_enable_shell_uart: enable_shell_uart(NULL)
  __init_malloc_prepare: malloc_prepare(NULL)
  __init_k_sys_work_q_init: k_sys_work_q_init(NULL)
  __init___device_dts_ord_12: i2c_esp32_init(__device_dts_ord_12)
  __init___device_dts_ord_25: mfd_axp192_init(__device_dts_ord_25)
  __init___device_dts_ord_84: spi_esp32_init(__device_dts_ord_84)
  __init___device_dts_ord_80: regulator_axp192_init(__device_dts_ord_80)
  __init___device_dts_ord_81: regulator_axp192_init(__device_dts_ord_81)
  __init___device_dts_ord_82: regulator_axp192_init(__device_dts_ord_82)
  __init___device_dts_ord_85: regulator_axp192_init(__device_dts_ord_85)
  __init___device_dts_ord_26: gpio_axp192_init(__device_dts_ord_26)
  __init_gpio_hogs_init: gpio_hogs_init(NULL)
  __init___device_dts_ord_86: ili9xxx_init(__device_dts_ord_86)
  __init___device_dts_ord_14: ft5336_init(__device_dts_ord_14)
  __init___device_dts_ord_15: NULL(__device_dts_ord_15)
APPLICATION
  __init_lvgl_init: lvgl_init(NULL)

Running LVGL demos is now (much) easier!

Thanks to Fabian’s excellent work in PR #62904, running one of the default LVGL ‘demo’ apps has become significantly easier this week.

Check out the instructions of the newly added code sample to get started in no time. It’s really exciting to see all the improvements being made around all things GUI recently!

By the way, in case you didn’t know, LVGL code can also run in an HTML canvas, which I find really cool.

Music Player App demo. More LVGL demos here.

Boards & SoCs

Drivers

/ {
	ramdisk0 {
		compatible = "zephyr,ram-disk";
		disk-name = "RAM";
		sector-size = <512>;
		sector-count = <192>;
	};
};

Miscellaneous

settings write string foo bar
settings write hex key2 c0ffee

A big thank you to the 9 individuals who had their first pull request accepted this week, 💙 🙌: @raitraak-rrk, @kapbh, @iandmorris, @gwa-storck, @kunoh, @icsys-aal, @aaronyegx, @SawXu, and @TaiJuWu.

As always, please feel free to jump in with your thoughts or questions in the comments below. See you next week!

If you enjoyed this article, don’t forget to subscribe to this blog to be notified of upcoming publications! And of course, you can also always find me on Twitter and Mastodon.

Catch up on all previous issues of the Zephyr Weekly Update:

Exit mobile version