Skip to content

test pr to run CI #85

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

Merged
merged 29 commits into from
Mar 26, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
aa0fca4
Nano 33 BLE - enable the SPI1 sensors
KurtE Feb 5, 2025
03a7fce
Add call to initVariant in main move ble sense to variant.cpp
KurtE Mar 5, 2025
e831260
GIGA: Remove Arduino pins 11-13 from PWM list to fix SPI1
KurtE Feb 2, 2025
8428b9a
Comment out pins we removed to allow SPI1 to work
KurtE Mar 5, 2025
587b322
Merge pull request #65 from KurtE/GIGA_M7_fix_spi5
facchinm Mar 6, 2025
7fdcd38
Merge pull request #67 from KurtE/nano_sense_spi1_enable_pin
facchinm Mar 6, 2025
ac05eb3
Merge remote-tracking branch 'origin/fully_linked' into arduino
pillo79 Mar 21, 2025
87f323b
platform: common extension mapping
pillo79 Mar 4, 2025
43f2d5a
boards: merge common zephyr flags to platform.txt
pillo79 Mar 4, 2025
e48e3af
variants: generate cflags.txt and includes.txt from llext-edk
pillo79 Mar 4, 2025
887577b
build.sh: get the variant name from the Zephyr build system
pillo79 Mar 13, 2025
55eeab3
llext_exports: remove dropped net_buf_get
pillo79 Mar 20, 2025
a255a36
main: fix enable_shell_usb warnings
pillo79 Mar 20, 2025
751d5f6
loader: enable the Arduino API module
pillo79 Mar 20, 2025
a81cbb0
west: use post_4.1 branch for zephyr
pillo79 Mar 20, 2025
d1f9c0d
boards.txt: fix prelinked flag for post_build_tool
facchinm Mar 21, 2025
77ce198
loader: fix loading of prelinked sketch
facchinm Mar 21, 2025
f6effd0
bootstrap: export Zephyr install directory
pillo79 Mar 21, 2025
5477b89
mass rebuild
pillo79 Mar 24, 2025
0ba9bf0
variants: fix multiple USB definition issues
pillo79 Mar 24, 2025
804ccc1
nano33ble: disable stack canaries
facchinm Mar 26, 2025
3bb2f23
SocketWrapper: start restucturing lib
facchinm Mar 26, 2025
30f1330
gh: fix usage as module
facchinm Mar 26, 2025
ec9326e
Ethernet: compile only if enabled in dts
facchinm Mar 26, 2025
45a735b
loader: fix offset for CONFIG_LLEXT_STORAGE_WRITABLE
facchinm Mar 26, 2025
33706ae
loader: add exports for wifiAP
facchinm Mar 26, 2025
253cde8
rw612: enable wifi AP support
facchinm Mar 26, 2025
e85a95d
platform.txt: provide clean BOARDNAME defines
facchinm Mar 26, 2025
79fc9e2
loader: move dhcp server in own ifdef
facchinm Mar 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
variants: generate cflags.txt and includes.txt from llext-edk
  • Loading branch information
pillo79 committed Mar 21, 2025
commit e48e3af861f2262aeb90bc3c844fa9bd0da93daf
16 changes: 0 additions & 16 deletions boards.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ giga.build.extra_flags=
giga.build.postbuild.cmd="{tools.imgtool.path}/{tools.imgtool.cmd}" exit
giga.build.architecture=cortex-m7
giga.build.board=GIGA
giga.compiler.zephyr.defines=-DLL_EXTENSION_BUILD -DCONFIG_ARDUINO_API_SERIAL_BUFFER_SIZE=256 -DHSE_VALUE=16000000 -DKERNEL -DK_HEAP_MEM_POOL_SIZE=16384 -DPICOLIBC_LONG_LONG_PRINTF_SCANF -DSTM32H747xx -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -imacros{build.variant.path}/llext-edk/include/zephyr/include/generated/zephyr/autoconf.h -imacros{build.variant.path}/llext-edk/include/zephyr/include/zephyr/toolchain/zephyr_stdint.h
giga.compiler.zephyr.cflags=-fno-strict-aliasing -fno-printf-return-value -fno-common -mcpu=cortex-m7 -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft -Wall -Wformat -Wformat-security -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 -mlong-calls -nodefaultlibs
giga.compiler.zephyr=
giga.vid.0=0x2341
giga.pid.0=0x0066
Expand Down Expand Up @@ -92,8 +90,6 @@ nano33ble.build.extra_flags=
nano33ble.build.postbuild.cmd="{tools.imgtool.path}/{tools.imgtool.cmd}" exit
nano33ble.build.architecture=cortex-m4
nano33ble.build.board=ARDUINO_NANO33BLE
nano33ble.compiler.zephyr.defines=-DLL_EXTENSION_BUILD -DCONFIG_ARDUINO_API_SERIAL_BUFFER_SIZE=256 -DNRF52840_XXAA -DKERNEL -DK_HEAP_MEM_POOL_SIZE=32768 -DPICOLIBC_LONG_LONG_PRINTF_SCANF -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -imacros{build.variant.path}/llext-edk/include/zephyr/include/generated/zephyr/autoconf.h -imacros{build.variant.path}/llext-edk/include/zephyr/include/zephyr/toolchain/zephyr_stdint.h
nano33ble.compiler.zephyr.cflags=-fno-strict-aliasing -fno-printf-return-value -fno-common -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft -Wall -Wformat -Wformat-security -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 -mlong-calls -nodefaultlibs
nano33ble.compiler.zephyr=
nano33ble.vid.0=0x2341
nano33ble.pid.0=0x035a
Expand Down Expand Up @@ -158,8 +154,6 @@ ek_ra8d1.build.postbuild.cmd="{tools.imgtool.path}/{tools.imgtool.cmd}" exit
ek_ra8d1.build.architecture=cortex-m85+nomve
ek_ra8d1.build.board=ek_ra8d1
ek_ra8d1.compiler.zephyr.arch.define=
ek_ra8d1.compiler.zephyr.defines=-DLL_EXTENSION_BUILD -DCONFIG_ARDUINO_API_SERIAL_BUFFER_SIZE=256 -DHSE_VALUE=16000000 -DKERNEL -DK_HEAP_MEM_POOL_SIZE=16384 -DPICOLIBC_LONG_LONG_PRINTF_SCANF -DSTM32H747xx -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -imacros{build.variant.path}/llext-edk/include/zephyr/include/generated/zephyr/autoconf.h -imacros{build.variant.path}/llext-edk/include/zephyr/include/zephyr/toolchain/zephyr_stdint.h
ek_ra8d1.compiler.zephyr.cflags=-fno-strict-aliasing -fno-printf-return-value -fno-common -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft -Wall -Wformat -Wformat-security -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 -mlong-calls -nodefaultlibs

#ek_ra8d1.recipe.hooks.objcopy.postobjcopy.4.pattern=cp {build.variant.path}/flasher.jlink "{build.path}/flasher.jlink"
#ek_ra8d1.recipe.hooks.objcopy.postobjcopy.5.pattern=sed -i 's|SKETCH|"{build.path}/{build.project_name}.llext.dfu.bin"|g' "{build.path}/flasher.jlink"
Expand Down Expand Up @@ -217,8 +211,6 @@ frdm_mcxn947.build.extra_flags=
frdm_mcxn947.build.postbuild.cmd="{tools.imgtool.path}/{tools.imgtool.cmd}" exit
frdm_mcxn947.build.board=frdm_mcxn947
frdm_mcxn947.compiler.zephyr.arch.define=
frdm_mcxn947.compiler.zephyr.defines=-DLL_EXTENSION_BUILD -DCONFIG_ARDUINO_API_SERIAL_BUFFER_SIZE=256 -DCPU_MCXN947VDF_cm33_core0 -DKERNEL -DK_HEAP_MEM_POOL_SIZE=16384 -DLPFLEXCOMM_INIT_NOT_USED_IN_DRIVER=1 -DNDEBUG -DPICOLIBC_DOUBLE_PRINTF_SCANF -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -imacros{build.variant.path}/llext-edk/include/zephyr/include/generated/zephyr/autoconf.h -imacros{build.variant.path}/llext-edk/include/zephyr/include/zephyr/toolchain/zephyr_stdint.h
frdm_mcxn947.compiler.zephyr.cflags=-fno-strict-aliasing -fno-printf-return-value -fno-common -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft -Wall -Wformat -Wformat-security -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 -mlong-calls -nodefaultlibs
frdm_mcxn947.compiler.zephyr=
frdm_mcxn947.vid.0=0x1fc9
frdm_mcxn947.pid.0=0x0143
Expand Down Expand Up @@ -272,8 +264,6 @@ portentah7.build.extra_flags=
portentah7.build.postbuild.cmd="{tools.imgtool.path}/{tools.imgtool.cmd}" exit
portentah7.build.architecture=cortex-m7
portentah7.build.board=PORTENTA_H7
portentah7.compiler.zephyr.defines=-DLL_EXTENSION_BUILD -DCONFIG_ARDUINO_API_SERIAL_BUFFER_SIZE=256 -DHSE_VALUE=25000000 -DKERNEL -DK_HEAP_MEM_POOL_SIZE=16384 -DPICOLIBC_LONG_LONG_PRINTF_SCANF -DSTM32H747xx -DUSE_FULL_LL_DRIVER -DUSE_HAL_DRIVER -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -imacros{build.variant.path}/llext-edk/include/zephyr/include/generated/zephyr/autoconf.h -imacros{build.variant.path}/llext-edk/include/zephyr/include/zephyr/toolchain/zephyr_stdint.h
portentah7.compiler.zephyr.cflags=-fno-strict-aliasing -fno-printf-return-value -fno-common -mcpu=cortex-m7 -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft -Wall -Wformat -Wformat-security -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 -mlong-calls -nodefaultlibs
portentah7.compiler.zephyr=
portentah7.vid.0=0x2341
portentah7.pid.0=0x005b
Expand Down Expand Up @@ -339,8 +329,6 @@ frdm_rw612.build.extra_flags=
frdm_rw612.build.postbuild.cmd="{tools.imgtool.path}/{tools.imgtool.cmd}" exit
frdm_rw612.build.board=frdm_rw612
frdm_rw612.compiler.zephyr.arch.define=
frdm_rw612.compiler.zephyr.defines=-DLL_EXTENSION_BUILD -DCONFIG_ARDUINO_API_SERIAL_BUFFER_SIZE=256 -DCPU_RW612ETA2I -DRW610 -DKERNEL -DK_HEAP_MEM_POOL_SIZE=122880 -DLPFLEXCOMM_INIT_NOT_USED_IN_DRIVER=1 -DNDEBUG -DPICOLIBC_DOUBLE_PRINTF_SCANF -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -imacros{build.variant.path}/llext-edk/include/zephyr/include/generated/zephyr/autoconf.h -imacros{build.variant.path}/llext-edk/include/zephyr/include/zephyr/toolchain/zephyr_stdint.h
frdm_rw612.compiler.zephyr.cflags=-fno-strict-aliasing -fno-printf-return-value -fno-common -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft -Wall -Wformat -Wformat-security -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 -mlong-calls -nodefaultlibs
frdm_rw612.compiler.zephyr=
frdm_rw612.vid.0=0x1fc9
frdm_rw612.pid.0=0x0143
Expand Down Expand Up @@ -393,8 +381,6 @@ niclasense.build.extra_flags=
niclasense.build.postbuild.cmd="{tools.imgtool.path}/{tools.imgtool.cmd}" exit
niclasense.build.architecture=cortex-m4
niclasense.build.board=ARDUINO_NICLA_SENSE_ME
niclasense.compiler.zephyr.defines=-DLL_EXTENSION_BUILD -DCONFIG_ARDUINO_API_SERIAL_BUFFER_SIZE=256 -DNRF52832_XXAA -DK_HEAP_MEM_POOL_SIZE=1024 -DKERNEL -DPICOLIBC_LONG_LONG_PRINTF_SCANF -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -imacros{build.variant.path}/llext-edk/include/zephyr/include/generated/zephyr/autoconf.h -imacros{build.variant.path}/llext-edk/include/zephyr/include/zephyr/toolchain/zephyr_stdint.h
niclasense.compiler.zephyr.cflags=-fno-strict-aliasing -fno-printf-return-value -fno-common -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft -Wall -Wformat -Wformat-security -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 -mlong-calls -nodefaultlibs
niclasense.compiler.zephyr=
niclasense.vid.0=0x2341
niclasense.pid.0=0x0360
Expand Down Expand Up @@ -474,8 +460,6 @@ portentac33.build.extra_flags=
portentac33.build.postbuild.cmd="{tools.imgtool.path}/{tools.imgtool.cmd}" exit
portentac33.build.board=arduino_portenta_c33
portentac33.compiler.zephyr.arch.define=
portentac33.compiler.zephyr.defines=-DLL_EXTENSION_BUILD -DCONFIG_ARDUINO_API_SERIAL_BUFFER_SIZE=256 -DKERNEL -DK_HEAP_MEM_POOL_SIZE=122880 -DNDEBUG -DPICOLIBC_DOUBLE_PRINTF_SCANF -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -imacros{build.variant.path}/llext-edk/include/zephyr/include/generated/zephyr/autoconf.h -imacros{build.variant.path}/llext-edk/include/zephyr/include/zephyr/toolchain/zephyr_stdint.h
portentac33.compiler.zephyr.cflags=-fno-strict-aliasing -fno-printf-return-value -fno-common -mthumb -mabi=aapcs -mfp16-format=ieee -mtp=soft -Wall -Wformat -Wformat-security -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 -mlong-calls -nodefaultlibs
portentac33.compiler.zephyr=
portentac33.vid.0=0x2341
portentac33.pid.0=0x0068
Expand Down
18 changes: 14 additions & 4 deletions extra/build.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
if [ x$ZEPHYR_SDK_INSTALL_DIR == x"" ]; then
export ZEPHYR_SDK_INSTALL_DIR=/ssd/zephyr-sdk-0.16.8/
fi
#!/bin/bash

set -e

if [ x$ZEPHYR_SDK_INSTALL_DIR == x"" ]; then
SDK_PATH=$(west sdk list | grep path | tail -n 1 | cut -d ':' -f 2 | tr -d ' ')
if [ x$SDK_PATH == x ]; then
echo "ZEPHYR_SDK_INSTALL_DIR not set and no SDK found"
exit 1
fi
echo "ZEPHYR_SDK_INSTALL_DIR not set, using $SDK_PATH"
export ZEPHYR_SDK_INSTALL_DIR=${SDK_PATH}
fi

board=$1
variant=$2
third_arg=$3
Expand All @@ -21,7 +29,7 @@ if [ "$third_arg" != "" ]; then
fi

(west build loader -b $board -p $extra_args && west build -t llext-edk)
(tar xfp build/zephyr/llext-edk.tar.xz --directory variants/$variant/)
(rm -rf variants/$variant/* && tar xfp build/zephyr/llext-edk.tar.xz --directory variants/$variant/)

(cp build/zephyr/zephyr.elf firmwares/zephyr-$variant.elf)
if [ -f build/zephyr/zephyr.bin ]; then
Expand All @@ -47,3 +55,5 @@ sed -i 's/PROVIDE(free =/PROVIDE(__wrap_free =/g' variants/$variant/provides.ld
sed -i 's/PROVIDE(realloc =/PROVIDE(__wrap_realloc =/g' variants/$variant/provides.ld
sed -i 's/PROVIDE(calloc =/PROVIDE(__wrap_calloc =/g' variants/$variant/provides.ld
sed -i 's/PROVIDE(random =/PROVIDE(__wrap_random =/g' variants/$variant/provides.ld

cmake -P extra/gen_arduino_files.cmake $variant
61 changes: 61 additions & 0 deletions extra/gen_arduino_files.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# get root dir for the project
cmake_path(SET TOP_DIR NORMALIZE ${CMAKE_CURRENT_LIST_DIR}/..)

# get list of variants to be applied
if(CMAKE_ARGC GREATER 3)
# cmake -P <script> <variant> ...
foreach(index RANGE 4 ${CMAKE_ARGC})
math(EXPR index "${index} - 1")
list(APPEND VARIANTS "${CMAKE_ARGV${index}}")
endforeach()
list(TRANSFORM VARIANTS REPLACE "/$" "")
list(TRANSFORM VARIANTS REPLACE ".*/" "")
else()
# build for all valid variants
file(GLOB VARIANTS RELATIVE ${TOP_DIR}/variants variants/*)
list(REMOVE_ITEM VARIANTS llext linked)
endif()

foreach(variant ${VARIANTS})
if(NOT IS_DIRECTORY variants/${variant})
continue()
endif()

cmake_path(SET dir ${TOP_DIR}/variants/${variant})
if(NOT EXISTS ${dir}/llext-edk/cmake.cflags)
continue()
endif()

message(STATUS "Processing ${variant}")
include(${dir}/llext-edk/cmake.cflags)

list(TRANSFORM LLEXT_ALL_INCLUDE_CFLAGS REPLACE "-I${dir}" "-iwithprefixbefore")
list(JOIN LLEXT_ALL_INCLUDE_CFLAGS "\n" EDK_INCLUDES)
file(WRITE ${dir}/includes.txt "${EDK_INCLUDES}")

# exclude -imacros entries in platform from the list, make sure no others are present
list(FILTER LLEXT_BASE_CFLAGS EXCLUDE REGEX "-imacros.*autoconf.h")
list(FILTER LLEXT_BASE_CFLAGS EXCLUDE REGEX "-imacros.*zephyr_stdint.h")
set(other_imacros "${LLEXT_BASE_CFLAGS}")
list(FILTER other_imacros INCLUDE REGEX "-imacros.*")
if(other_imacros)
message(FATAL_ERROR "Unexpected -imacros in LLEXT_BASE_CFLAGS: ${other_imacros}")
endif()

# exclude other problematic macros shared between C and C++
list(FILTER LLEXT_BASE_CFLAGS EXCLUDE REGEX "-fdiagnostics-color=always")

# (temp) generate C++ flags from C flags
set(LLEXT_BASE_CXXFLAGS ${LLEXT_BASE_CFLAGS})
list(FILTER LLEXT_BASE_CXXFLAGS EXCLUDE REGEX "-Wno-pointer-sign")
list(FILTER LLEXT_BASE_CXXFLAGS EXCLUDE REGEX "-Werror=implicit-int")
list(FILTER LLEXT_BASE_CXXFLAGS EXCLUDE REGEX "-std=c.*")

# save flag files
list(JOIN LLEXT_BASE_CFLAGS "\n" EDK_CFLAGS)
file(WRITE ${dir}/cflags.txt "${EDK_CFLAGS}")


list(JOIN LLEXT_BASE_CXXFLAGS "\n" EDK_CXXFLAGS)
file(WRITE ${dir}/cxxflags.txt "${EDK_CXXFLAGS}")
endforeach()
11 changes: 7 additions & 4 deletions platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ compiler.warning_flags.all=-Wall -Wextra

compiler.path={build.compiler_path}
compiler.c.cmd={build.crossprefix}gcc
compiler.c.flags=-g -c {compiler.warning_flags} {compiler.zephyr.defines} {compiler.zephyr.cflags} {compiler.zephyr.arch.define} -MMD -mcpu={build.mcu} {build.float-abi} {build.fpu}
compiler.c.flags=-g -c {compiler.warning_flags} {compiler.zephyr.macros} "@{compiler.zephyr.cflags}" {compiler.zephyr.arch.define} -MMD -mcpu={build.mcu} {build.float-abi} {build.fpu}
compiler.c.elf.cmd={build.crossprefix}g++
compiler.c.elf.flags={build.llext_link_flags} -Wl,--gc-sections -mcpu={build.mcu} {build.float-abi} {build.fpu} -std=c++17
compiler.S.cmd={build.crossprefix}g++
compiler.S.flags=-c -x assembler-with-cpp -mcpu={build.mcu} {build.fpu}
compiler.cpp.cmd={build.crossprefix}g++
compiler.cpp.flags=-g -Os -std=c++17 -c {compiler.warning_flags} {compiler.zephyr.defines} {compiler.zephyr.common_ldflags} {compiler.zephyr.extra_ldflags} {compiler.zephyr.cflags} {compiler.zephyr.common_cxxflags} {compiler.zephyr.extra_cxxflags} {compiler.zephyr.arch.define} -MMD -mcpu={build.mcu} {build.float-abi} {build.fpu}
compiler.cpp.flags=-g -Os -std=c++17 -c {compiler.warning_flags} {compiler.zephyr.macros} "@{compiler.zephyr.cxxflags}" {compiler.zephyr.common_ldflags} {compiler.zephyr.extra_ldflags} {compiler.zephyr.common_cxxflags} {compiler.zephyr.extra_cxxflags} {compiler.zephyr.arch.define} -MMD -mcpu={build.mcu} {build.float-abi} {build.fpu}
compiler.ar.cmd={build.crossprefix}ar
compiler.ar.flags=rcs
compiler.objcopy.cmd=
Expand All @@ -36,7 +36,10 @@ compiler.libraries.ldflags=
compiler.size.cmd={build.crossprefix}size
compiler.define=-DARDUINO=

compiler.zephyr.includes={board.variant.path}/includes.txt
compiler.zephyr.includes={build.variant.path}/includes.txt
compiler.zephyr.cflags={build.variant.path}/cflags.txt
compiler.zephyr.cxxflags={build.variant.path}/cxxflags.txt
compiler.zephyr.macros=-imacros{build.variant.path}/llext-edk/include/zephyr/include/generated/zephyr/autoconf.h -imacros{build.variant.path}/llext-edk/include/zephyr/include/zephyr/toolchain/zephyr_stdint.h
compiler.zephyr.common_cxxflags=-fdata-sections -ffunction-sections -fno-unwind-tables
compiler.zephyr.common_ldflags=-fno-exceptions -fno-rtti -fno-threadsafe-statics -fno-unwind-tables -fno-use-cxa-atexit -lstdc++ -lsupc++ -lnosys -nostdlib

Expand Down Expand Up @@ -96,7 +99,7 @@ recipe.S.o.pattern="{compiler.path}{compiler.S.cmd}" {compiler.S.flags} -DARDUIN
recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}"

## Combine gc-sections, archives, and objects
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} {build.extra_flags} {build.extra_ldflags} {compiler.zephyr.ldflags} "-T{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=picolibc.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}_debug.elf" {object_files} "{build.path}/{archive_file}" {compiler.zephyr} {compiler.zephyr.extra_ldflags} {compiler.libraries.ldflags}
recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" "-L{build.path}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} {build.extra_flags} {build.extra_ldflags} {compiler.zephyr.common_ldflags} "-T{build.ldscript}" "-Wl,-Map,{build.path}/{build.project_name}.map" --specs=picolibc.specs --specs=nosys.specs {compiler.ldflags} -o "{build.path}/{build.project_name}_debug.elf" {object_files} "{build.path}/{archive_file}" {compiler.zephyr} {compiler.zephyr.extra_ldflags} {compiler.libraries.ldflags}
recipe.hooks.linking.postlink.1.pattern="{compiler.path}{build.crossprefix}strip" --strip-debug {build.path}/{build.project_name}_debug.elf -o{build.path}/{build.project_name}.elf

## Create eeprom
Expand Down
44 changes: 44 additions & 0 deletions variants/arduino_giga_r1_m7/cflags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
-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=65536
-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
3 changes: 2 additions & 1 deletion variants/arduino_giga_r1_m7/includes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
-iwithprefixbefore/llext-edk/include/zephyr/soc/st/stm32
-iwithprefixbefore/llext-edk/include/zephyr/lib/libc/common/include
-iwithprefixbefore/llext-edk/include/zephyr/lib/posix/options/getopt/
-iwithprefixbefore/llext-edk/include/zephyr/lib/cpp/minimal/include
-iwithprefixbefore/llext-edk/include/zephyr/soc/st/stm32/common/.
-iwithprefixbefore/llext-edk/include/zephyr/drivers
-iwithprefixbefore/llext-edk/include/zephyr/soc/st/stm32/stm32h7x/.
-iwithprefixbefore/llext-edk/include/zephyr/subsys/usb/device
-iwithprefixbefore/llext-edk/include/zephyr-arduino-core/include
-iwithprefixbefore/llext-edk/include/zephyr/subsys/shell/modules/kernel_service/thread/../
-iwithprefixbefore/llext-edk/include/modules/hal/cmsis/CMSIS/Core/Include
-iwithprefixbefore/llext-edk/include/zephyr/modules/cmsis/.
-iwithprefixbefore/llext-edk/include/modules/hal/stm32/stm32cube/stm32h7xx/soc
Expand Down
43 changes: 43 additions & 0 deletions variants/arduino_nano_33_ble_sense/cflags.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
-DKERNEL
-D__ZEPHYR__=1
-D__LINUX_ERRNO_EXTENSIONS__
-DPICOLIBC_DOUBLE_PRINTF_SCANF
-D__PROGRAM_START
-DNRF52840_XXAA
-DK_HEAP_MEM_POOL_SIZE=16384
-DLL_EXTENSION_BUILD
-fno-strict-aliasing
-fstack-protector
-mstack-protector-guard=global
-fno-common
-fdiagnostics-color=always
-mcpu=cortex-m4
-mthumb
-mabi=aapcs
-mfpu=fpv4-sp-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
-fstack-usage
-specs=picolibc.specs
-D_POSIX_THREADS
-std=c99
-mlong-calls
-mthumb
-nodefaultlibs
Loading