Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove setting stack sizes in defconfig files #85368

Open
44 tasks
nordicjm opened this issue Feb 7, 2025 · 2 comments
Open
44 tasks

Remove setting stack sizes in defconfig files #85368

nordicjm opened this issue Feb 7, 2025 · 2 comments
Assignees
Labels
area: Board/SoC configuration Meta A collection of features, enhancements or bugs

Comments

@nordicjm
Copy link
Collaborator

nordicjm commented Feb 7, 2025

Stack sizes should have defaults that can be set by applications, boards should not set values for these symbols in *_defconfig files, the following is a list of where this is currently done which should be moved to Kconfig.defconfig files:

@erwango

  • boards/st/stm32g0316_disco/stm32g0316_disco_defconfig
  • boards/st/stm32f0_disco/stm32f0_disco_defconfig
  • boards/st/nucleo_l053r8/nucleo_l053r8_defconfig
  • boards/st/nucleo_l031k6/nucleo_l031k6_defconfig
  • boards/st/nucleo_l011k4/nucleo_l011k4_defconfig
  • boards/st/nucleo_g031k8/nucleo_g031k8_defconfig
  • boards/st/nucleo_f031k6/nucleo_f031k6_defconfig
  • boards/st/nucleo_f030r8/nucleo_f030r8_defconfig
  • boards/others/stm32f030_demo/stm32f030_demo_defconfig
  • boards/seagate/faze/faze_defconfig

@dleach02 @mmahadevan108

  • boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu1_defconfig
  • boards/nxp/s32z2xxdc2/s32z2xxdc2_s32z270_rtu0_defconfig
  • boards/nxp/lpcxpresso11u68/lpcxpresso11u68_defconfig
  • boards/nxp/imx8qxp_mek/imx8qxp_mek_mimx8qx6_adsp_defconfig
  • boards/nxp/imx8qm_mek/imx8qm_mek_mimx8qm6_adsp_defconfig
  • boards/nxp/imx8mp_evk/imx8mp_evk_mimx8ml8_adsp_defconfig

@dcpleung

  • boards/intel/adsp/intel_adsp_cavs25_tgph_defconfig
  • boards/intel/adsp/intel_adsp_cavs25_defconfig
  • boards/intel/adsp/intel_adsp_ace30_ptl_sim_defconfig
  • boards/intel/adsp/intel_adsp_ace30_ptl_defconfig
  • boards/intel/adsp/intel_adsp_ace30_defconfig
  • boards/intel/adsp/intel_adsp_ace20_lnl_sim_defconfig
  • boards/intel/adsp/intel_adsp_ace20_lnl_defconfig
  • boards/intel/adsp/intel_adsp_ace15_mtpm_sim_defconfig
  • boards/intel/adsp/intel_adsp_ace15_mtpm_defconfig

@ifyall

  • boards/infineon/cyw920829m2evk_02/cyw920829m2evk_02_defconfig
  • boards/infineon/cy8cproto_063_ble/cy8cproto_063_ble_defconfig
  • boards/infineon/cy8cproto_062_4343w/cy8cproto_062_4343w_defconfig

@jhedberg


@nordicjm

  • boards/renode/cortex_r8_virtual/cortex_r8_virtual_defconfig
  • boards/qemu/cortex_r5/qemu_cortex_r5_defconfig
  • boards/qemu/cortex_a9/qemu_cortex_a9_defconfig
  • boards/qemu/xtensa/qemu_xtensa_sample_controller32_mpu_defconfig
  • boards/qemu/xtensa/qemu_xtensa_dc233c_mmu_defconfig
  • boards/qemu/xtensa/qemu_xtensa_dc233c_defconfig
  • boards/qemu/riscv64/qemu_riscv64_qemu_virt_riscv64_smp_defconfig
  • boards/qemu/riscv64/qemu_riscv64_defconfig
  • boards/qemu/riscv32/qemu_riscv32_qemu_virt_riscv32_smp_defconfig
  • boards/cdns/xt-sim/xt-sim_defconfig
  • boards/aspeed/ast1030_evb/ast1030_evb_defconfig
  • boards/arm/fvp_baser_aemv8r/fvp_baser_aemv8r_fvp_aemv8r_aarch32_smp_defconfig
  • boards/arm/fvp_baser_aemv8r/fvp_baser_aemv8r_fvp_aemv8r_aarch32_defconfig
  • boards/amd/kv260_r5/kv260_r5_defconfig

For the above, if this is something that should be defaulted for all boards based on those SoCs then please move to soc/<soc>/*/Kconfig.default file e.g.

config MAIN_STACK_SIZE
        default 2048

config IDLE_STACK_SIZE
        default 512 if SOC_SERIES_blah

If it is a board requirements then move to boards/<board>/Kconfig.defconfig file e.g.

config MAIN_STACK_SIZE
        default 2048

config IDLE_STACK_SIZE
        default 512 if BOARD_blah_cpucluster_blah

See https://github.com/zephyrproject-rtos/zephyr/pull/85364/files for an example

  • Additionally check compliance needs to be updated to specify if disallowed symbols apply to board defconfig files only or also SoC Kconfig.defconfig files too
@nordicjm nordicjm added the Meta A collection of features, enhancements or bugs label Feb 7, 2025
@nordicjm nordicjm self-assigned this Feb 7, 2025
@nashif
Copy link
Member

nashif commented Feb 7, 2025

Agree with this effort. is this documented somewhere as a guideline? Would be great to have this somewhere.
Would also be nice to start catching this in CI somewhere, so we do not end up with new ones being added.

Some simulators and special variants of those probably need that, but can be done in the SoC as suggested above.

@nordicjm
Copy link
Collaborator Author

nordicjm commented Feb 7, 2025

Agree with this effort. is this documented somewhere as a guideline? Would be great to have this somewhere. Would also be nice to start catching this in CI somewhere, so we do not end up with new ones being added.

Some simulators and special variants of those probably need that, but can be done in the SoC as suggested above.

Not documented, once cleaned up will add to the disallowed defconfig compliance check though so will fail CI (like currently with PINCTRL) if present in a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Board/SoC configuration Meta A collection of features, enhancements or bugs
Projects
None yet
Development

No branches or pull requests

3 participants