Skip to content

Update to 4.2.0-rc3 #154

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 8 commits into from
Jul 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/package_core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- name: Initialize Zephyr environment
run: |
./extra/bootstrap.sh -o=--filter=tree:0
yes | ./extra/bootstrap.sh -o=--filter=tree:0
echo "CORE_TAG=$(git describe --always)" >> "$GITHUB_ENV"
echo "CORE_ARTIFACT=ArduinoCore-zephyr-$(git describe --always)" >> "$GITHUB_ENV"
echo "BOARD_VARIANTS=$(extra/get_board_details.sh | jq -cr 'sort_by(.variant)')" >> "$GITHUB_ENV"
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ llext-edk/
cflags.txt
cxxflags.txt
includes.txt
provides.ld
syms-dynamic.ld
syms-static.ld
43 changes: 8 additions & 35 deletions boards.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
menu.debug=Debug
menu.mode=Mode
menu.link_mode=Link mode

##########################################################################################

giga.name=Arduino Giga R1
giga.build.core=arduino
Expand All @@ -19,14 +21,12 @@ giga.build.variant=arduino_giga_r1_stm32h747xx_m7
giga.build.mcu=cortex-m7
giga.build.fpu=-mfpu=fpv5-d16
giga.build.architecture=cortex-m7
giga.compiler.zephyr.arch.define=-DCORE_CM7

giga.build.float-abi=-mfloat-abi=softfp
giga.build.extra_flags=
giga.build.postbuild.cmd="{tools.imgtool.path}/{tools.imgtool.cmd}" exit
giga.build.architecture=cortex-m7
giga.build.board=ARDUINO_GIGA
giga.compiler.zephyr=
giga.vid.0=0x2341
giga.pid.0=0x0066
giga.upload_port.0.vid=0x2341
Expand Down Expand Up @@ -85,14 +85,12 @@ nano33ble.build.variant=arduino_nano_33_ble_nrf52840_sense
nano33ble.build.mcu=cortex-m4
nano33ble.build.fpu=-mfpu=fpv4-sp-d16
nano33ble.build.architecture=cortex-m4
nano33ble.compiler.zephyr.arch.define=

nano33ble.build.float-abi=-mfloat-abi=hard
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=
nano33ble.vid.0=0x2341
nano33ble.pid.0=0x035a
nano33ble.upload_port.0.vid=0x2341
Expand Down Expand Up @@ -149,19 +147,16 @@ ek_ra8d1.build.variant=ek_ra8d1_r7fa8d1bhecbd
ek_ra8d1.build.mcu=cortex-m85+nomve
ek_ra8d1.build.fpu=-mfpu=fpv5-d16
ek_ra8d1.build.architecture=cortex-m85+nomve
ek_ra8d1.compiler.zephyr.arch.define=

ek_ra8d1.build.float-abi=-mfloat-abi=hard
ek_ra8d1.build.extra_flags=
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.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"

ek_ra8d1.compiler.zephyr=
ek_ra8d1.vid.0=0x2341
ek_ra8d1.pid.0=0x0077
ek_ra8d1.upload_port.0.vid=0x2341
Expand Down Expand Up @@ -208,14 +203,11 @@ frdm_mcxn947.build.variant=frdm_mcxn947_mcxn947_cpu0
frdm_mcxn947.build.mcu=cortex-m33
frdm_mcxn947.build.fpu=-mfpu=fpv5-sp-d16
frdm_mcxn947.build.architecture=cortex-m33
frdm_mcxn947.compiler.zephyr.arch.define=

frdm_mcxn947.build.float-abi=-mfloat-abi=hard
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=
frdm_mcxn947.vid.0=0x1fc9
frdm_mcxn947.pid.0=0x0143
frdm_mcxn947.upload_port.0.vid=0x1fc9
Expand Down Expand Up @@ -262,14 +254,12 @@ portentah7.build.variant=arduino_portenta_h7_stm32h747xx_m7
portentah7.build.mcu=cortex-m7
portentah7.build.fpu=-mfpu=fpv5-d16
portentah7.build.architecture=cortex-m7
portentah7.compiler.zephyr.arch.define=-DCORE_CM7

portentah7.build.float-abi=-mfloat-abi=softfp
portentah7.build.extra_flags=
portentah7.build.postbuild.cmd="{tools.imgtool.path}/{tools.imgtool.cmd}" exit
portentah7.build.architecture=cortex-m7
portentah7.build.board=ARDUINO_PORTENTA_H7
portentah7.compiler.zephyr=
portentah7.vid.0=0x2341
portentah7.pid.0=0x005b
portentah7.upload_port.0.vid=0x2341
Expand Down Expand Up @@ -328,14 +318,11 @@ frdm_rw612.build.variant=frdm_rw612_rw612
frdm_rw612.build.mcu=cortex-m33+nodsp
frdm_rw612.build.fpu=-mfpu=fpv5-sp-d16
frdm_rw612.build.architecture=cortex-m33+nodsp
frdm_rw612.compiler.zephyr.arch.define=

frdm_rw612.build.float-abi=-mfloat-abi=hard
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=
frdm_rw612.vid.0=0x1fc9
frdm_rw612.pid.0=0x0143
frdm_rw612.upload_port.0.vid=0x1fc9
Expand Down Expand Up @@ -381,14 +368,12 @@ niclasense.build.variant=arduino_nicla_sense_me_nrf52832
niclasense.build.mcu=cortex-m4
niclasense.build.fpu=-mfpu=fpv4-sp-d16
niclasense.build.architecture=cortex-m4
niclasense.compiler.zephyr.arch.define=

niclasense.build.float-abi=-mfloat-abi=hard
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=
niclasense.vid.0=0x2341
niclasense.pid.0=0x0360
niclasense.upload_port.0.vid=0x2341
Expand Down Expand Up @@ -440,19 +425,12 @@ portentac33.build.compiler_path={runtime.tools.arm-zephyr-eabi-0.16.8.path}/bin/

portentac33.menu.debug.false=Standard
portentac33.menu.debug.true=Debug
portentac33.menu.debug.true.build.zsk_args.debug=-debug

portentac33.menu.debug.false.postbuild_debug=
portentac33.menu.debug.true.postbuild_debug=-debug

portentac33.menu.mode.llext=llext
portentac33.menu.mode.linked=linked

portentac33.menu.mode.linked.build.extra_ldflags=-lc -lm -lgcc -L{build.variant.path} -Wl,--wrap=random -Wl,--wrap=calloc -Wl,--wrap=free -Wl,--wrap=malloc -Wl,--wrap=realloc
portentac33.menu.mode.linked.build.llext_link_flags=
portentac33.menu.mode.linked.build.suffix=_linked
portentac33.menu.mode.linked.build.ldscript={runtime.platform.path}/variants/_linked/linker_script.ld
portentac33.menu.mode.linked.upload.extension=bin-zsk.bin
portentac33.menu.mode.linked.postbuild_mode=-prelinked
portentac33.menu.link_mode.dynamic=Dynamic
portentac33.menu.link_mode.static=Static
portentac33.menu.link_mode.static.build.link_mode=static
portentac33.menu.link_mode.static.upload.extension=bin-zsk.bin

portentac33.build.zephyr_target=arduino_portenta_c33
portentac33.build.zephyr_args=
Expand All @@ -461,14 +439,11 @@ portentac33.build.variant=arduino_portenta_c33_r7fa6m5bh3cfc
portentac33.build.mcu=cortex-m33
portentac33.build.fpu=-mfpu=fpv5-sp-d16
portentac33.build.architecture=cortex-m33
portentac33.compiler.zephyr.arch.define=

portentac33.build.float-abi=-mfloat-abi=hard
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=
portentac33.vid.0=0x2341
portentac33.pid.0=0x0068
portentac33.upload_port.0.vid=0x2341
Expand Down Expand Up @@ -517,14 +492,12 @@ opta.build.variant=arduino_opta_stm32h747xx_m7
opta.build.mcu=cortex-m7
opta.build.fpu=-mfpu=fpv5-d16
opta.build.architecture=cortex-m7
opta.compiler.zephyr.arch.define=-DCORE_CM7

opta.build.float-abi=-mfloat-abi=softfp
opta.build.extra_flags=
opta.build.postbuild.cmd="{tools.imgtool.path}/{tools.imgtool.cmd}" exit
opta.build.architecture=cortex-m7
opta.build.board=ARDUINO_OPTA
opta.compiler.zephyr=
opta.vid.0=0x2341
opta.pid.0=0x0064
opta.upload_port.0.vid=0x2341
Expand Down
30 changes: 12 additions & 18 deletions extra/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,23 +90,17 @@ for ext in elf bin hex; do
done

# Generate the provides.ld file for linked builds
echo "Exporting provides.ld"
READELF=${ZEPHYR_SDK_INSTALL_DIR}/arm-zephyr-eabi/bin/arm-zephyr-eabi-readelf
GDB=${ZEPHYR_SDK_INSTALL_DIR}/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb
$READELF --wide -s ${BUILD_DIR}/zephyr/zephyr.elf | grep FUNC | awk -F' ' '{print "PROVIDE("$8" = 0x"$2");"}' > ${VARIANT_DIR}/provides.ld
$READELF --wide -s ${BUILD_DIR}/zephyr/zephyr.elf | grep kheap_llext_heap | awk -F' ' '{print "PROVIDE("$8" = 0x"$2");"}' >> ${VARIANT_DIR}/provides.ld
$READELF --wide -s ${BUILD_DIR}/zephyr/zephyr.elf | grep kheap_llext_heap | awk -F' ' '{print "PROVIDE(kheap_llext_heap_size = "$3");"}' >> ${VARIANT_DIR}/provides.ld
$READELF --wide -s ${BUILD_DIR}/zephyr/zephyr.elf | grep kheap__system_heap | awk -F' ' '{print "PROVIDE("$8" = 0x"$2");"}' >> ${VARIANT_DIR}/provides.ld
$READELF --wide -s ${BUILD_DIR}/zephyr/zephyr.elf | grep kheap__system_heap | awk -F' ' '{print "PROVIDE(kheap__system_heap_size = "$3");"}' >> ${VARIANT_DIR}/provides.ld
cat ${BUILD_DIR}/zephyr/zephyr.map | grep __device_dts_ord | grep -v rodata | grep -v llext_const_symbol | awk -F' ' '{print "PROVIDE("$2" = "$1");"}' >> ${VARIANT_DIR}/provides.ld
#TEXT_START=`cat variants/$variant/$variant.overlay | grep user_sketch: | cut -f2 -d"@" | cut -f1 -d"{"`
TEXT_START=`$GDB --quiet -ex "p/x sketch_base_addr" ${BUILD_DIR}/zephyr/zephyr.elf -ex "exit" | grep "= 0x" | cut -f 2 -d"="`
echo "PROVIDE(_sketch_start = $TEXT_START);" >> ${VARIANT_DIR}/provides.ld

sed -i 's/PROVIDE(malloc =/PROVIDE(__wrap_malloc =/g' ${VARIANT_DIR}/provides.ld
sed -i 's/PROVIDE(free =/PROVIDE(__wrap_free =/g' ${VARIANT_DIR}/provides.ld
sed -i 's/PROVIDE(realloc =/PROVIDE(__wrap_realloc =/g' ${VARIANT_DIR}/provides.ld
sed -i 's/PROVIDE(calloc =/PROVIDE(__wrap_calloc =/g' ${VARIANT_DIR}/provides.ld
sed -i 's/PROVIDE(random =/PROVIDE(__wrap_random =/g' ${VARIANT_DIR}/provides.ld
echo "Generating exported symbol scripts"
extra/gen_provides.py "${BUILD_DIR}/zephyr/zephyr.elf" -L > ${VARIANT_DIR}/syms-dynamic.ld
extra/gen_provides.py "${BUILD_DIR}/zephyr/zephyr.elf" -LF \
"+kheap_llext_heap" \
"+kheap__system_heap" \
"*sketch_base_addr=_sketch_start" \
"*sketch_max_size=_sketch_max_size" \
"malloc=__wrap_malloc" \
"free=__wrap_free" \
"realloc=__wrap_realloc" \
"calloc=__wrap_calloc" \
"random=__wrap_random" > ${VARIANT_DIR}/syms-static.ld

cmake -P extra/gen_arduino_files.cmake $variant
Loading