Closed lujnan closed 5 years ago
where is the bug?
--mcu STM32F407VG -d unimp,guest_errors \
**-global sram-size-kb=512 \**
--nographic --image mytest.elf \
--semihosting-config enable=on,target=native \
--semihosting-cmdline mytest ```
the option '-global sram-size-kb' is not available. how can i run and debug demo on qemu that need more memory?
The list of supported command line options is: https://gnu-mcu-eclipse.github.io/qemu/options/
Where does the -global
option come from?
-global driver.property=value
-global driver=driver,property=property,value=value
set a global default for a driver property
from mcu.c
source file.
Ah, ok, I'll check what happened to -global
, and if still legal, I'll fix it and add to the documentation.
Hi, @ilg-ul I see 'qemu' has another option
-m[emory] [size=]megs[,slots=n,maxmem=size]
configure guest RAM
size: initial amount of guest memory
slots: number of hotplug slots (default: none)
maxmem: maximum amount of guest memory (default: none)
thank you @lujnan for the hint, qemu has lots of options, some contradictory, I'm not sure which one were available when I added the Cortex-M code.
if you are comfortable with checking the source code, any additional help to identify the best solution will be highly appreciated.
and a short comment/advice:
although it is possible in emulators to extend the memory size, this is generally not recommended, since one of the usual requirements is to validate the image intended for emulation by running it on a physical board.
as long as everything works just fine you do not face this, but as soon as something breaks, you'll question/suspect the emulator and probably want to run the image on a physical board.
@ilg-ul Is it possible to create a specific board like the android does. (google's android emulator base on qemu, the board named 'goldfish'.)
probably it is possible, but the focus of this project is Cortex-M, so for Linux devices you should use the 'standard' QEMU.
@ilg-ul I have resolved my question by using the following sample. I now to close this issue. Thank you very much!
qemu-system-gnuarmeclipse --verbose --verbose --board generic \
--mcu STM32F429ZI --gdb tcp::1234 -d unimp,guest_errors \
--semihosting-config enable=on \
--semihosting-cmdline blinky
yes, using a board with larger memory is the correct solution.
however, I'll reopen this ticket, since I still need to check why -global failed.
-global sram-size-kb=512
is not legal, the correct syntax is -global driver.property=value
, and does not apply to memory size.
-memory size=kb
is legal, but the current code ignores it; to be fixed shortly.
Fixed in 2019-02-26.
-memory size=kb
sets the value into the machine object, and now the mcu object reads it from there.
TODO after publishing release: update the documentation.
Fixed in 2.8.0-5.
Description
I want to resize the sram size, The project about Neural net that need more memory. how to config sram size?
Versions