[fpc-devel] Enabling hardware floating point processor for cortex-m4f on embedded and freertos

Michael Ring mail at michael-ring.org
Sat Feb 20 22:54:55 CET 2021


the lm4f120 was the only unit that did not fit. funny enough it was 
already defined for armv7em so this patch only removes it from armv7m


diff --git a/rtl/embedded/Makefile b/rtl/embedded/Makefile
index 1b39161b56..e3242e2a2b 100644
--- a/rtl/embedded/Makefile
+++ b/rtl/embedded/Makefile
@@ -374,7 +374,7 @@ CPU_SPECIFIC_COMMON_UNITS=
  ifeq ($(ARCH),arm)
  CPU_SPECIFIC_COMMON_UNITS=sysutils math classes fgl macpas typinfo 
types rtlconsts getopts lineinfo
  ifeq ($(SUBARCH),armv7m)
-CPU_UNITS=lm3fury lm3tempest stm32f10x_ld stm32f10x_md stm32f10x_hd 
stm32f10x_xl stm32f10x_conn stm32f10x_cl lpc13xx lpc1768 lm4f120 sam3x8e 
xmc4500 cortexm3 cortexm4 # thumb2_bare
+CPU_UNITS=lm3fury lm3tempest stm32f10x_ld stm32f10x_md stm32f10x_hd 
stm32f10x_xl stm32f10x_conn stm32f10x_cl lpc13xx lpc1768 sam3x8e xmc4500 
cortexm3 cortexm4 # thumb2_bare
  CPU_UNITS_DEFINED=1
  endif
  ifeq ($(SUBARCH),armv7em)
diff --git a/rtl/embedded/Makefile.fpc b/rtl/embedded/Makefile.fpc
index ff89dc336c..8817d786bd 100644
--- a/rtl/embedded/Makefile.fpc
+++ b/rtl/embedded/Makefile.fpc
@@ -71,7 +71,7 @@ CPU_SPECIFIC_COMMON_UNITS=
  ifeq ($(ARCH),arm)
  CPU_SPECIFIC_COMMON_UNITS=sysutils math classes fgl macpas typinfo 
types rtlconsts getopts lineinfo
  ifeq ($(SUBARCH),armv7m)
-CPU_UNITS=lm3fury lm3tempest stm32f10x_ld stm32f10x_md stm32f10x_hd 
stm32f10x_xl stm32f10x_conn stm32f10x_cl lpc13xx lpc1768 lm4f120 sam3x8e 
xmc4500 cortexm3 cortexm4 # thumb2_bare
+CPU_UNITS=lm3fury lm3tempest stm32f10x_ld stm32f10x_md stm32f10x_hd 
stm32f10x_xl stm32f10x_conn stm32f10x_cl lpc13xx lpc1768 sam3x8e xmc4500 
cortexm3 cortexm4 # thumb2_bare
  CPU_UNITS_DEFINED=1
  endif
  ifeq ($(SUBARCH),armv7em)

Am 20.02.21 um 22:26 schrieb Michael Ring via fpc-devel:
> lm4f120: yes, it should be moved in the makefile. But let me dig a 
> little big, perhaps there are more files that are wrong, will come 
> back to you.
>
> Michael
>
>
> Am 20.02.21 um 21:51 schrieb Florian Klämpfl via fpc-devel:
>> Am 20.02.21 um 10:35 schrieb Michael Ring via fpc-devel:
>>> I have created an issue with this patch for ermbedded target, for 
>>> unknown reason the 'end;' at the end of the patch for 
>>> rtl/embedded/arm/cortexm4f_start.inc is missing, likely when I 
>>> copy/pasted I lost that line. Sorry for this....
>>
>> I committed it.
>>
>>>
>>> Will there in the future be a way to provide pull-requests via 
>>> github (or does this already work??) I guess that would reduce the 
>>> likelyhood of such a stupid error..
>>
>> Most likely yes, however, so far nobody really found the time for the 
>> switch to git.
>>
>>>
>>> And then I also found another small mishap in 
>>> rtl/freertos/arm/cortexm4f_start.inc, there a 'not' was left over 
>>> after you changed the logic for fpu detection.
>>>
>>> When Investigating I saw that lm4f120 is built as armv7m but is 
>>> actually armv7em (plus it uses m4f include). Not sure if it is woth 
>>> fixing a seven years old file, so I left things as they are.
>>
>> This doesn't matter imo, it should be fixed. So you mean just moving 
>> it to another subarch in the makefile?
>> _______________________________________________
>> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
>> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


More information about the fpc-devel mailing list