Skip to content

Commit 321ee60

Browse files
committed
added sdram support
1 parent 870c5f9 commit 321ee60

File tree

16 files changed

+1076
-1000
lines changed

16 files changed

+1076
-1000
lines changed

Diff for: firmwares/zephyr-arduino_giga_r1_m7.bin

3 KB
Binary file not shown.

Diff for: firmwares/zephyr-arduino_giga_r1_m7.elf

52.2 KB
Binary file not shown.

Diff for: loader/boards/arduino_giga_r1_m7.overlay

+41
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,47 @@
261261
};
262262
};
263263

264+
265+
&fmc {
266+
status = "okay";
267+
pinctrl-0 = <&fmc_nbl0_pe0 &fmc_nbl1_pe1
268+
&fmc_sdclk_pg8 &fmc_sdnwe_ph5 &fmc_sdcke0_ph2
269+
&fmc_sdne0_ph3 &fmc_sdnras_pf11 &fmc_sdncas_pg15
270+
271+
&fmc_a0_pf0 &fmc_a1_pf1 &fmc_a2_pf2 &fmc_a3_pf3 &fmc_a4_pf4
272+
&fmc_a5_pf5 &fmc_a6_pf12 &fmc_a7_pf13 &fmc_a8_pf14
273+
&fmc_a9_pf15 &fmc_a10_pg0 &fmc_a11_pg1 &fmc_a12_pg2
274+
&fmc_a14_pg4 &fmc_a15_pg5
275+
276+
&fmc_d0_pd14 &fmc_d1_pd15 &fmc_d2_pd0 &fmc_d3_pd1
277+
&fmc_d4_pe7 &fmc_d5_pe8 &fmc_d6_pe9 &fmc_d7_pe10
278+
&fmc_d8_pe11 &fmc_d9_pe12 &fmc_d10_pe13 &fmc_d11_pe14
279+
&fmc_d12_pe15 &fmc_d13_pd8 &fmc_d14_pd9 &fmc_d15_pd10>;
280+
pinctrl-names = "default";
281+
282+
sdram {
283+
status = "okay";
284+
285+
power-up-delay = <100>;
286+
num-auto-refresh = <8>;
287+
mode-register = <0x220>;
288+
refresh-rate = <603>;
289+
290+
bank@0 {
291+
reg = <0>;
292+
st,sdram-control = <STM32_FMC_SDRAM_NC_8
293+
STM32_FMC_SDRAM_NR_12
294+
STM32_FMC_SDRAM_MWID_16
295+
STM32_FMC_SDRAM_NB_4
296+
STM32_FMC_SDRAM_CAS_2
297+
STM32_FMC_SDRAM_SDCLK_PERIOD_2
298+
STM32_FMC_SDRAM_RBURST_ENABLE
299+
STM32_FMC_SDRAM_RPIPE_0>;
300+
st,sdram-timing = <2 6 4 6 2 2 2>;
301+
};
302+
};
303+
};
304+
264305
/{
265306
chosen {
266307
zephyr,camera = &dcmi;

Diff for: loader/llext_exports.c

+5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ EXPORT_SYMBOL(strcmp);
2222
EXPORT_SYMBOL(strlen);
2323
EXPORT_SYMBOL(strchr);
2424
EXPORT_SYMBOL(strcat);
25+
EXPORT_SYMBOL(strtok);
26+
EXPORT_SYMBOL(strtol);
27+
2528
EXPORT_SYMBOL(memmove);
29+
EXPORT_SYMBOL(memcpy);
30+
EXPORT_SYMBOL(memset);
2631

2732
EXPORT_SYMBOL(k_malloc);
2833
EXPORT_SYMBOL(malloc);
+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
LLEXT_CFLAGS = -DKERNEL -D__ZEPHYR__=1 -D__LINUX_ERRNO_EXTENSIONS__ -DPICOLIBC_DOUBLE_PRINTF_SCANF -D__PROGRAM_START -DSTM32H747xx -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER -DCORE_CM7 -DHSE_VALUE=16000000 -DK_HEAP_MEM_POOL_SIZE=32768 -DLL_EXTENSION_BUILD -fno-strict-aliasing -fno-common -fdiagnostics-color=always -mcpu=cortex-m7 -mthumb -mabi=aapcs -mfpu=fpv5-d16 -mfloat-abi=hard -mfp16-format=ieee -mtp=soft -Wall -Wformat -Wformat-security -Wformat -Wno-format-zero-length -Wdouble-promotion -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -specs=picolibc.specs -D_POSIX_THREADS -std=c99 -mlong-calls -mthumb -nodefaultlibs -imacros$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/include/zephyr/toolchain/zephyr_stdint.h -imacros$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/include/generated/zephyr/autoconf.h -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/include/generated/zephyr -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/include -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/include/generated -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/soc/st/stm32 -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/lib/libc/common/include -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/lib/posix/options/getopt/ -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/soc/st/stm32/common/. -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/drivers -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/soc/st/stm32/stm32h7x/. -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/subsys/usb/device -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/subsys/shell/modules/kernel_service/thread/../ -I$(LLEXT_EDK_INSTALL_DIR)/include/modules/hal/cmsis/CMSIS/Core/Include -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/modules/cmsis/. -I$(LLEXT_EDK_INSTALL_DIR)/include/modules/hal/stm32/stm32cube/stm32h7xx/soc -I$(LLEXT_EDK_INSTALL_DIR)/include/modules/hal/stm32/stm32cube/stm32h7xx/drivers/include -I$(LLEXT_EDK_INSTALL_DIR)/include/modules/hal/stm32/stm32cube/common_ll/include
1+
LLEXT_CFLAGS = -DKERNEL -D__ZEPHYR__=1 -D__LINUX_ERRNO_EXTENSIONS__ -DPICOLIBC_DOUBLE_PRINTF_SCANF -D__PROGRAM_START -DSTM32H747xx -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER -DCORE_CM7 -DHSE_VALUE=16000000 -DK_HEAP_MEM_POOL_SIZE=2048 -DLL_EXTENSION_BUILD -fno-strict-aliasing -fno-common -fdiagnostics-color=always -mcpu=cortex-m7 -mthumb -mabi=aapcs -mfpu=fpv5-d16 -mfloat-abi=hard -mfp16-format=ieee -mtp=soft -Wall -Wformat -Wformat-security -Wformat -Wno-format-zero-length -Wdouble-promotion -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -specs=picolibc.specs -D_POSIX_THREADS -std=c99 -mlong-calls -mthumb -nodefaultlibs -imacros$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/include/zephyr/toolchain/zephyr_stdint.h -imacros$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/include/generated/zephyr/autoconf.h -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/include/generated/zephyr -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/include -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/include/generated -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/soc/st/stm32 -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/lib/libc/common/include -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/lib/posix/options/getopt/ -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/lib/cpp/minimal/include -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/soc/st/stm32/common/. -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/drivers -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/soc/st/stm32/stm32h7x/. -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/subsys/usb/device -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/subsys/shell/modules/kernel_service/thread/../ -I$(LLEXT_EDK_INSTALL_DIR)/include/modules/hal/cmsis/CMSIS/Core/Include -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/modules/cmsis/. -I$(LLEXT_EDK_INSTALL_DIR)/include/modules/hal/stm32/stm32cube/stm32h7xx/soc -I$(LLEXT_EDK_INSTALL_DIR)/include/modules/hal/stm32/stm32cube/stm32h7xx/drivers/include -I$(LLEXT_EDK_INSTALL_DIR)/include/modules/hal/stm32/stm32cube/common_ll/include
22

3-
LLEXT_ALL_INCLUDE_CFLAGS = -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/include/generated/zephyr -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/include -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/include/generated -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/soc/st/stm32 -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/lib/libc/common/include -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/lib/posix/options/getopt/ -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/soc/st/stm32/common/. -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/drivers -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/soc/st/stm32/stm32h7x/. -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/subsys/usb/device -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/subsys/shell/modules/kernel_service/thread/../ -I$(LLEXT_EDK_INSTALL_DIR)/include/modules/hal/cmsis/CMSIS/Core/Include -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/modules/cmsis/. -I$(LLEXT_EDK_INSTALL_DIR)/include/modules/hal/stm32/stm32cube/stm32h7xx/soc -I$(LLEXT_EDK_INSTALL_DIR)/include/modules/hal/stm32/stm32cube/stm32h7xx/drivers/include -I$(LLEXT_EDK_INSTALL_DIR)/include/modules/hal/stm32/stm32cube/common_ll/include
3+
LLEXT_ALL_INCLUDE_CFLAGS = -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/include/generated/zephyr -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/include -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/include/generated -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/soc/st/stm32 -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/lib/libc/common/include -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/lib/posix/options/getopt/ -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/lib/cpp/minimal/include -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/soc/st/stm32/common/. -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/drivers -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/soc/st/stm32/stm32h7x/. -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/subsys/usb/device -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/subsys/shell/modules/kernel_service/thread/../ -I$(LLEXT_EDK_INSTALL_DIR)/include/modules/hal/cmsis/CMSIS/Core/Include -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/modules/cmsis/. -I$(LLEXT_EDK_INSTALL_DIR)/include/modules/hal/stm32/stm32cube/stm32h7xx/soc -I$(LLEXT_EDK_INSTALL_DIR)/include/modules/hal/stm32/stm32cube/stm32h7xx/drivers/include -I$(LLEXT_EDK_INSTALL_DIR)/include/modules/hal/stm32/stm32cube/common_ll/include
44

5-
LLEXT_INCLUDE_CFLAGS = -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/include -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/soc/st/stm32 -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/lib/libc/common/include -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/lib/posix/options/getopt/ -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/soc/st/stm32/common/. -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/drivers -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/soc/st/stm32/stm32h7x/. -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/subsys/usb/device -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/subsys/shell/modules/kernel_service/thread/../ -I$(LLEXT_EDK_INSTALL_DIR)/include/modules/hal/cmsis/CMSIS/Core/Include -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/modules/cmsis/. -I$(LLEXT_EDK_INSTALL_DIR)/include/modules/hal/stm32/stm32cube/stm32h7xx/soc -I$(LLEXT_EDK_INSTALL_DIR)/include/modules/hal/stm32/stm32cube/stm32h7xx/drivers/include -I$(LLEXT_EDK_INSTALL_DIR)/include/modules/hal/stm32/stm32cube/common_ll/include
5+
LLEXT_INCLUDE_CFLAGS = -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/include -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/soc/st/stm32 -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/lib/libc/common/include -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/lib/posix/options/getopt/ -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/lib/cpp/minimal/include -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/soc/st/stm32/common/. -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/drivers -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/soc/st/stm32/stm32h7x/. -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/subsys/usb/device -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/subsys/shell/modules/kernel_service/thread/../ -I$(LLEXT_EDK_INSTALL_DIR)/include/modules/hal/cmsis/CMSIS/Core/Include -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/modules/cmsis/. -I$(LLEXT_EDK_INSTALL_DIR)/include/modules/hal/stm32/stm32cube/stm32h7xx/soc -I$(LLEXT_EDK_INSTALL_DIR)/include/modules/hal/stm32/stm32cube/stm32h7xx/drivers/include -I$(LLEXT_EDK_INSTALL_DIR)/include/modules/hal/stm32/stm32cube/common_ll/include
66

77
LLEXT_GENERATED_INCLUDE_CFLAGS = -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/include/generated/zephyr -I$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/include/generated
88

9-
LLEXT_BASE_CFLAGS = -DKERNEL -D__ZEPHYR__=1 -D__LINUX_ERRNO_EXTENSIONS__ -DPICOLIBC_DOUBLE_PRINTF_SCANF -D__PROGRAM_START -DSTM32H747xx -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER -DCORE_CM7 -DHSE_VALUE=16000000 -DK_HEAP_MEM_POOL_SIZE=32768 -DLL_EXTENSION_BUILD -fno-strict-aliasing -fno-common -fdiagnostics-color=always -mcpu=cortex-m7 -mthumb -mabi=aapcs -mfpu=fpv5-d16 -mfloat-abi=hard -mfp16-format=ieee -mtp=soft -Wall -Wformat -Wformat-security -Wformat -Wno-format-zero-length -Wdouble-promotion -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -specs=picolibc.specs -D_POSIX_THREADS -std=c99 -mlong-calls -mthumb -nodefaultlibs -imacros$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/include/zephyr/toolchain/zephyr_stdint.h
9+
LLEXT_BASE_CFLAGS = -DKERNEL -D__ZEPHYR__=1 -D__LINUX_ERRNO_EXTENSIONS__ -DPICOLIBC_DOUBLE_PRINTF_SCANF -D__PROGRAM_START -DSTM32H747xx -DUSE_HAL_DRIVER -DUSE_FULL_LL_DRIVER -DCORE_CM7 -DHSE_VALUE=16000000 -DK_HEAP_MEM_POOL_SIZE=2048 -DLL_EXTENSION_BUILD -fno-strict-aliasing -fno-common -fdiagnostics-color=always -mcpu=cortex-m7 -mthumb -mabi=aapcs -mfpu=fpv5-d16 -mfloat-abi=hard -mfp16-format=ieee -mtp=soft -Wall -Wformat -Wformat-security -Wformat -Wno-format-zero-length -Wdouble-promotion -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -ftls-model=local-exec -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -specs=picolibc.specs -D_POSIX_THREADS -std=c99 -mlong-calls -mthumb -nodefaultlibs -imacros$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/include/zephyr/toolchain/zephyr_stdint.h
1010

1111
LLEXT_GENERATED_IMACROS_CFLAGS = -imacros$(LLEXT_EDK_INSTALL_DIR)/include/zephyr/include/generated/zephyr/autoconf.h

0 commit comments

Comments
 (0)