comp.lang.ada
 help / color / mirror / Atom feed
* support for Cortex-M7 in GNAT-GPL?
@ 2015-07-16 14:22 0x00080000
  2015-07-16 16:18 ` Luke A. Guest
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: 0x00080000 @ 2015-07-16 14:22 UTC (permalink / raw)


Dear all,

a) I have the following GNAT-GPL version for ARM installed: GNAT GPL 2015 (20150428-49)

b) Before purchasing a 32F746GDISCOVERY board containing a Cortex-M7 core, I tried to figure out if this version of gnat would support this board/micro-controller.

=>

A) different files in the runtime do seem to hint that this is indeed the case as they execute different branches depending on the value 'hard-wired' in the 'MCU device ID code' register located at address 16#E004_2000#

One of the values that this registers content is compared to is defined in the file s-stm32f.ads as:

DEV_ID_STM32F7xxxx : constant := 16#449#; 

B) However, this version of the gnat compiler does not seem to support the compiler switch -mcpu=cortex-m7

=>

As such, I'm still puzzled whether this version of gnat does indeed has support for the Cortex-M7 or not. Did anybody on this forum already tried this out?
 
Side thought:
both the Cortex-M4 and Cortex-M7 are based on the ARMv7-M ISA.
As such, specifying -mcpu=cortex-m4 just might work out fine
Despite this observation, recent versions of gcc do seem to insist on using -mcpu=cortex-m7 (?)

Kind regards,
Stijn


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: support for Cortex-M7 in GNAT-GPL?
  2015-07-16 14:22 support for Cortex-M7 in GNAT-GPL? 0x00080000
@ 2015-07-16 16:18 ` Luke A. Guest
  2015-07-16 17:19 ` Jerry Petrey
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Luke A. Guest @ 2015-07-16 16:18 UTC (permalink / raw)


Any processor supported by GCC is supported by GNAT.

What you really want to know is is this processor supported by GCC and are
there lives to enable you to program it. Possibly.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: support for Cortex-M7 in GNAT-GPL?
  2015-07-16 14:22 support for Cortex-M7 in GNAT-GPL? 0x00080000
  2015-07-16 16:18 ` Luke A. Guest
@ 2015-07-16 17:19 ` Jerry Petrey
  2015-07-16 19:12 ` Simon Wright
  2015-07-17 10:25 ` 0x00080000
  3 siblings, 0 replies; 5+ messages in thread
From: Jerry Petrey @ 2015-07-16 17:19 UTC (permalink / raw)



Stijn,

I found the same issues with GNAT 2015.  While they have some implied 
support for the M7, it is not complete.  I was also unhappy about many 
of the other changes from the GNAT 2014 versions since I have so much 
work invested in that version so I have decided to stick with the 2014 
version for now.  I do have the 2014 version running on the STM32F7 
Discovery board but it was a lot of work.  Many of the peripherals and 
low level registers have changed from the M4 to the M7 implementation by 
ST, so the files like stm32f4.ads has to be changed for the M7 along 
with other low level files for GPIO, USART, RCC, etc. and the runtime 
updated accordingly.

Jerry

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: support for Cortex-M7 in GNAT-GPL?
  2015-07-16 14:22 support for Cortex-M7 in GNAT-GPL? 0x00080000
  2015-07-16 16:18 ` Luke A. Guest
  2015-07-16 17:19 ` Jerry Petrey
@ 2015-07-16 19:12 ` Simon Wright
  2015-07-17 10:25 ` 0x00080000
  3 siblings, 0 replies; 5+ messages in thread
From: Simon Wright @ 2015-07-16 19:12 UTC (permalink / raw)


0x00080000@gmail.com writes:

> As such, I'm still puzzled whether this version of gnat does indeed
> has support for the Cortex-M7 or not. Did anybody on this forum
> already tried this out?

Since it says "unrecognized argument in option '-mcpu=cortex-m7'" I
guess not.

> Side thought:
> both the Cortex-M4 and Cortex-M7 are based on the ARMv7-M ISA.
> As such, specifying -mcpu=cortex-m4 just might work out fine
> Despite this observation, recent versions of gcc do seem to insist on
> using -mcpu=cortex-m7 (?)

GCC 5.1.0 built with --with-arch=armv7 --with-mode=thumb doesn't allow
-mcpu=cortex-m7.

But you could try -march=armv7e-m; accepted on FSF and GNAT GPL, though
since my RTS is presently for cortex-m3 I got

gnat1: warning: switch -mcpu=cortex-m3 conflicts with -march=armv7e-m switch


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: support for Cortex-M7 in GNAT-GPL?
  2015-07-16 14:22 support for Cortex-M7 in GNAT-GPL? 0x00080000
                   ` (2 preceding siblings ...)
  2015-07-16 19:12 ` Simon Wright
@ 2015-07-17 10:25 ` 0x00080000
  3 siblings, 0 replies; 5+ messages in thread
From: 0x00080000 @ 2015-07-17 10:25 UTC (permalink / raw)


Dear all,

Thanks for the valuble feedback.

I succeeded in recompiling my runtime by replacing -mcpu=cortex-m4 with -march=armv7e-m; Yes, I'm aware the runtime will require considerable tweaking to make it tick properly.

For the Cortex-M7 however it seems the flag -mfpu=fpv4-sp-d16 needs to be replaced with -mfpu=-fpv5-sp-d16 to use the hardware FPU. The later option is also not supported in GNAT GPL 2015 (20150428-49) :-/

So yes, support for the Cortex-M7 overall seems to be too premature right now.

Kind regards,
Stijn

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-07-17 10:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-16 14:22 support for Cortex-M7 in GNAT-GPL? 0x00080000
2015-07-16 16:18 ` Luke A. Guest
2015-07-16 17:19 ` Jerry Petrey
2015-07-16 19:12 ` Simon Wright
2015-07-17 10:25 ` 0x00080000

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox