public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Fredrik Hederstierna <fredrik.hederstierna@verisure.com>
To: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Question ARM sim target and Cortex M
Date: Sat, 24 Oct 2020 09:02:47 +0000	[thread overview]
Message-ID: <AM6PR10MB2150D8BB87507CF865F2E9A4EF1B0@AM6PR10MB2150.EURPRD10.PROD.OUTLOOK.COM> (raw)

Hi,

I have a question about using ARM target simulator and bare metal Cortex M elf.

I tried to start my arm-none-eabi with my program:

$ arm-none-eabi-gdb myprog.elf
...
(gdb) target sim
Connected to the simulator.
(gdb) load
Loading section .text, size 0x549f0 lma 0x2800
Loading section .data, size 0x934 lma 0x571f0
Loading section .ARM.exidx, size 0x8 lma 0x57b24
Start address 0x28ff
Transfer rate: 2791776 bits in <1 sec.
(gdb) run
Starting program: /home/fredrik/build/myprog.elf 
Unknown machine type '22'; please update sim_create_inferior.
[Inferior 1 (process 42000) exited normally]
(gdb) 

Looking in <sim/arm/wrapper.c> I see missing handling alot of newer targets > arm_5?
Looking in <bfd/bfd-in2.h>:

bfd/bfd-in2.h:#define bfd_mach_arm_5TEJ      14
bfd/bfd-in2.h:#define bfd_mach_arm_6         15
bfd/bfd-in2.h:#define bfd_mach_arm_6KZ       16
bfd/bfd-in2.h:#define bfd_mach_arm_6T2       17
bfd/bfd-in2.h:#define bfd_mach_arm_6K        18
bfd/bfd-in2.h:#define bfd_mach_arm_7         19
bfd/bfd-in2.h:#define bfd_mach_arm_6M        20
bfd/bfd-in2.h:#define bfd_mach_arm_6SM       21
bfd/bfd-in2.h:#define bfd_mach_arm_7EM       22
bfd/bfd-in2.h:#define bfd_mach_arm_8         23
bfd/bfd-in2.h:#define bfd_mach_arm_8R        24
bfd/bfd-in2.h:#define bfd_mach_arm_8M_BASE   25
bfd/bfd-in2.h:#define bfd_mach_arm_8M_MAIN   26
bfd/bfd-in2.h:#define bfd_mach_arm_8_1M_MAIN 27

My target is Cortex-M4 so its ID '22' meaning <bfd_mach_arm_7EM>,
cannot I run Cortex-M4 in target simulator, or what do I do wrong here?
Are there more targets that could be added in eg <sim/arm/wrapper.c>, or am I looking in the wrong place?

Thanks! BR Fredrik

             reply	other threads:[~2020-10-24  9:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-24  9:02 Fredrik Hederstierna [this message]
2020-10-26 13:55 ` Luis Machado

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM6PR10MB2150D8BB87507CF865F2E9A4EF1B0@AM6PR10MB2150.EURPRD10.PROD.OUTLOOK.COM \
    --to=fredrik.hederstierna@verisure.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).