Skip to content

Commit fc4c08f

Browse files
dspic: SOC and Board init hooks (zephyrproject-rtos#89)
-Implemented a empty function for soc_early_init_hook and board_ealry_init_hook Signed-off-by: Udhayanandhan Jayakumar <[email protected]>
1 parent f743a39 commit fc4c08f

File tree

5 files changed

+26
-5
lines changed

5 files changed

+26
-5
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
zephyr_library()
2+
zephyr_library_sources(board.c)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
* Copyright (c) 2025, Microchip Technology Inc.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#include <zephyr/init.h>
7+
#include <zephyr/kernel.h>
8+
9+
void board_early_init_hook(void)
10+
{
11+
}

kernel/init.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -555,14 +555,10 @@ FUNC_NORETURN void z_cstart(void)
555555
z_device_state_init();
556556

557557
#if CONFIG_SOC_EARLY_INIT_HOOK
558-
#ifndef CONFIG_DSPIC
559558
soc_early_init_hook();
560559
#endif
561-
#endif
562560
#if CONFIG_BOARD_EARLY_INIT_HOOK
563-
#ifndef CONFIG_DSPIC
564561
board_early_init_hook();
565-
#endif
566562
#endif
567563
/* perform basic hardware initialization */
568564
z_sys_init_run_level(INIT_LEVEL_PRE_KERNEL_1);

soc/microchip/dspic33/dspic33a/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
zephyr_include_directories(.)
22
zephyr_include_directories(${DFP_ROOT}/support/generic/h)
33
zephyr_sources_ifdef(CONFIG_PM power.c )
4+
zephyr_sources(soc.c)
45

56
set(SOC_LINKER_SCRIPT
67
${ZEPHYR_BASE}/include/zephyr/arch/dspic/linker.ld
@@ -11,4 +12,4 @@ if(CONFIG_BOARD_DSPIC33A_CURIOSITY_P33AK128MC106)
1112
zephyr_ld_options(-T ${ZEPHYR_BASE}/soc/microchip/dspic33/dspic33a/p33ak128mc106_regs.ld)
1213
elseif(CONFIG_BOARD_DSPIC33A_CURIOSITY_P33AK512MPS512)
1314
zephyr_ld_options(-T ${ZEPHYR_BASE}/soc/microchip/dspic33/dspic33a/p33ak512mps512_regs.ld)
14-
endif()
15+
endif()
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
* Copyright (c) 2025, Microchip Technology Inc.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#include <zephyr/device.h>
7+
#include <zephyr/init.h>
8+
9+
void soc_early_init_hook(void)
10+
{
11+
}

0 commit comments

Comments
 (0)