File tree 2 files changed +11
-3
lines changed
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -40,12 +40,16 @@ function run_test() {
40
40
41
41
if [ $platform == " qemu" ]; then
42
42
PATH=$HOME /qemu/bin:$PATH
43
- extra_args=" --embedded-services qemu --qemu-image-path $build_dir /$sketchname .ino.bin"
43
+ esptool.py -c $target merge_bin -o $build_dir /$sketchname .ino.merged.bin @$build_dir /qemu_flash_args
44
+ extra_args=" --embedded-services qemu --qemu-image-path $build_dir /$sketchname .ino.merged.bin"
44
45
45
46
if [ $target == " esp32" ] || [ $target == " esp32s3" ]; then
46
- extra_args+=" --target $target --qemu-prog-path qemu-system-xtensa --qemu-cli-args \" -nographic\" "
47
+ extra_args+=" --qemu-prog-path qemu-system-xtensa --qemu-cli-args=\" -machine $target -m 4M -nographic\" "
48
+ elif [ $target == " esp32c3" ]; then
49
+ extra_args+=" --qemu-prog-path qemu-system-riscv32 --qemu-cli-args=\" -machine $target -icount 3 -nographic\" "
47
50
else
48
- extra_args+=" --target $target --qemu-prog-path qemu-system-riscv32 --qemu-cli-args \" -nographic\" "
51
+ echo " Unsupported QEMU target: $target "
52
+ exit 1
49
53
fi
50
54
else
51
55
extra_args=" --embedded-services esp,arduino"
Original file line number Diff line number Diff line change @@ -160,6 +160,10 @@ recipe.objcopy.bin.pattern_args=--chip {build.mcu} elf2image --flash_mode "{buil
160
160
recipe.objcopy.bin.pattern="{tools.esptool_py.path}/{tools.esptool_py.cmd}" {recipe.objcopy.bin.pattern_args}
161
161
recipe.objcopy.bin.pattern.linux=python3 "{tools.esptool_py.path}/{tools.esptool_py.cmd}" {recipe.objcopy.bin.pattern_args}
162
162
163
+ ## Create qemu_flash_args file
164
+ qemu_flash_args.path={build.path}/qemu_flash_args
165
+ recipe.objcopy.qemu_flash_args.pattern=/usr/bin/env bash -c "(echo '--fill-flash-size {build.flash_size} --flash_mode keep --flash_freq keep --flash_size keep'; echo '{build.bootloader_addr} {build.path}/{build.project_name}.bootloader.bin'; echo '0x8000 {build.path}/{build.project_name}.partitions.bin'; echo '0xe000 {runtime.platform.path}/tools/partitions/boot_app0.bin'; echo '0x10000 {build.path}/{build.project_name}.bin') > {qemu_flash_args.path}"
166
+
163
167
## Create Insights Firmware Package
164
168
recipe.hooks.objcopy.postobjcopy.1.pattern_args={build.path} {build.project_name} "{build.source.path}"
165
169
recipe.hooks.objcopy.postobjcopy.1.pattern=/usr/bin/env bash -c "[ ! -d "{build.path}"/libraries/Insights ] || {tools.gen_insights_pkg.cmd} {recipe.hooks.objcopy.postobjcopy.1.pattern_args}"
You can’t perform that action at this time.
0 commit comments