Hi, I have a .axf file how to debug it using gdb for qemu-system-arm?
Thanks, Abhijeet. On Wed, Jul 7, 2021, 12:09 abhijeet inamdar <abhijeetinamdar3...@gmail.com> wrote: > I rectified it. Some headers were missing. > > Thanks, > Abhijeet. > > On Wed, Jul 7, 2021, 11:24 abhijeet inamdar <abhijeetinamdar3...@gmail.com> > wrote: > >> Hi, I tried to implement from the example of stellaris.c but I'm getting >> some more warnings as follows: >> >> warning: implicit declaration of function 'qdev_prop_set_uint32' >> [-Wimplicit-function-declaration] >> qdev_prop_set_uint32(nvic, "num-irq", NUM_IRQ_LINES); >> >> warning: implicit declaration of function 'qdev_prop_set_string' >> [-Wimplicit-function-declaration] >> qdev_prop_set_string(nvic, "cpu-type", ms->cpu_type); >> >> warning: implicit declaration of function 'qemu_system_reset_request' >> [-Wimplicit-function-declaration] >> qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET); >> >> >> >> Thanks, >> Abhijeet. >> >> On Tue, Jul 6, 2021, 17:35 Peter Maydell <peter.mayd...@linaro.org> >> wrote: >> >>> On Tue, 6 Jul 2021 at 16:14, abhijeet inamdar >>> <abhijeetinamdar3...@gmail.com> wrote: >>> > >>> > The warnings are as follows: >>> > >>> > warning: implicit declaration of function 'armv7m_init' >>> [-Wimplicit-function-declaration] >>> > nvic = armv7m_init(systemMemory, memsz, NUM_IRQ_LINES, >>> kernel_filename, cpu_type); >>> >>> This function was removed as part of a refactoring. Board code >>> should instead create the ARMV7M device like any other, and >>> then call armv7m_load_kernel() at the end of their init function. >>> See commit f04d44654d85e25f7 for an example of the change to the >>> stellaris board. >>> >>> > In addition to this in armv7m.c >>> > >>> > warning: no previous prototype for 'armv7m_init'[-Wmissing-prototypes] >>> > >>> > DeviceState *armv7m_init(Memory region *system_memory, int mem_size, >>> int num_irq, >>> >>> This sounds like your source tree is in a confused state where it >>> has some changes from 4.2.0 but is not a complete 4.2.0 tree. >>> In upstream 4.2.0 this file does not have this function in it at all. >>> You should start with a clean 4.2.0 upstream and then apply your >>> changes to it; don't try to hold onto pre-4.2 versions of any >>> upstrema source files. >>> >>> > warning: implicit declaration of function 'qemu_allocate_irq' >>> [-Wimplicit-function-declaration] >>> > qdev_connect_gpio_out_named(nvic, "SYSRESETREQ", 0, >>> qemu_allocate_irq(&do_sys_reset, NULL, 0)); >>> >>> This function's prototype is in include/hw/irq.h (as "git grep" >>> will tell you). A cleanup in 4.2.0 reduced the number of other >>> headers that implicitly pull in irq.h, which means your .c file >>> now needs to explicitly "#include "hw/irq.h"". (This was done >>> for the tree in general in 64552b6be4758d3a77.) >>> >>> If you look at the 'git log' for some upstream M-profile board (eg >>> if there is one you have copied for your own implementation) then >>> you will see the commit messages for changes to that board, which >>> is a good place to start in tracking down this kind of thing. >>> >>> -- PMM >>> >>