> On 19 Jun 2015, at 00:43, Peter Maydell <peter.mayd...@linaro.org> wrote: > > On 18 June 2015 at 17:00, Leon Alrae <leon.al...@imgtec.com> wrote: >> Just a rebase of v4 as there were changes in qemu_opt_foreach API. >> >> Regards, >> Leon > > Thanks; applied to target-arm.next.
I merged target-arm.next to my branch and I'm not sure the current approach is very correct. if (semihosting_enabled() && !semihosting_get_argc() && kernel_filename) { /* fall back to the -kernel/-append */ semihosting_arg_fallback(kernel_filename, kernel_cmdline); } this code in vl.c automatically falls back to -kernel/-append, which, for Cortex-M might be a problem. without defining semihosting arguments, an example run for my case would look like: GNU ARM Eclipse 64-bits QEMU v2.3.50 (qemu-system-gnuarmeclipse). Board: 'STM32-H103' (Olimex Header Board for STM32F103RBT6). Device: 'STM32F103RB' (Cortex-M3, MPU), Flash: 128 KB, RAM: 20 KB. Image: '/Users/ilg/My Files/MacBookPro Projects/GNU ARM Eclipse/Eclipse Workspaces/qemu-images-44-osx/f1-h103-blink-sh-shd/Debug/f1-h103-blink-sh-shd.elf'. Command line: '/Users/ilg/My Files/MacBookPro Projects/GNU ARM Eclipse/Eclipse Workspaces/qemu-images-44-osx/f1-h103-blink-sh-shd/Debug/f1-h103-blink-sh-shd.elf' (145 bytes). Load 10016 bytes at 0x08000000-0x0800271F. Load 132 bytes at 0x08002720-0x080027A3. Load 704 bytes at 0x20000084-0x20000343. as you can see, it tries to use the kernel name as command line, which exceeds the application small buffer size. unless you have a better idea, since for my use case the -kernel command line options is not only inappropriate and confusing, but also a cause of troubles, in my branch I have to enable again the -image option, which will also avoid this problem. regards, Liviu