Re: [fpc-devel] Enabling hardware floating point processor for cortex-m4f on embedded and freertos
Am 20.02.21 um 22:54 schrieb Michael Ring via fpc-devel: 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 Thanks, applied. ___ fpc-devel maillist - [email protected] https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Enabling hardware floating point processor for cortex-m4f on embedded and freertos
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 - [email protected] https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel ___ fpc-devel maillist - [email protected] https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel ___ fpc-devel maillist - [email protected] https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Enabling hardware floating point processor for cortex-m4f on embedded and freertos
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 - [email protected] https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel ___ fpc-devel maillist - [email protected] https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Enabling hardware floating point processor for cortex-m4f on embedded and freertos
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 - [email protected] https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Enabling hardware floating point processor for cortex-m4f on embedded and freertos
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
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..
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.
Michael
diff --git a/rtl/embedded/arm/cortexm4f_start.inc
b/rtl/embedded/arm/cortexm4f_start.inc
index dc2928c70a..62017d9834 100644
--- a/rtl/embedded/arm/cortexm4f_start.inc
+++ b/rtl/embedded/arm/cortexm4f_start.inc
@@ -74,3 +74,4 @@ asm
.Ltext_start:
.long _text_start
{$endif REMAP_VECTTAB}
+end;
diff --git a/rtl/freertos/arm/cortexm4f_start.inc
b/rtl/freertos/arm/cortexm4f_start.inc
index 756aeb994a..62017d9834 100644
--- a/rtl/freertos/arm/cortexm4f_start.inc
+++ b/rtl/freertos/arm/cortexm4f_start.inc
@@ -64,7 +64,7 @@ asm
.long _data
.L_edata:
.long _edata
-{$if not defined(FPUARM_HAS_VFP_EXTENSION)}
+{$if defined(FPUARM_HAS_VFP_EXTENSION)}
.Lcpacr:
.long 0xE000ED88
{$endif defined(FPUARM_HAS_VFP_EXTENSION)}
Am 19.02.21 um 22:13 schrieb Michael Ring via fpc-devel:
You are the best, thank you!
Michael
Am 19.02.21 um 22:11 schrieb Florian Klämpfl via fpc-devel:
Am 19.02.21 um 21:55 schrieb Michael Ring via fpc-devel:
When rtl for arm-embedded/arm-freertos is build with hardfloat the
fpu should also automagically get enabled, by default it is off
which causes a crash when floats are used.
This small patch fixes that problem in cortexm4f_start.inc
can you please apply this patch to trunk?
Thanks, I applied it in a modified form so the presence of an vfp
unit is checked, this should be more future and fool proof :)
___
fpc-devel maillist - [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
___
fpc-devel maillist - [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
___
fpc-devel maillist - [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Enabling hardware floating point processor for cortex-m4f on embedded and freertos
You are the best, thank you! Michael Am 19.02.21 um 22:11 schrieb Florian Klämpfl via fpc-devel: Am 19.02.21 um 21:55 schrieb Michael Ring via fpc-devel: When rtl for arm-embedded/arm-freertos is build with hardfloat the fpu should also automagically get enabled, by default it is off which causes a crash when floats are used. This small patch fixes that problem in cortexm4f_start.inc can you please apply this patch to trunk? Thanks, I applied it in a modified form so the presence of an vfp unit is checked, this should be more future and fool proof :) ___ fpc-devel maillist - [email protected] https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel ___ fpc-devel maillist - [email protected] https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
Re: [fpc-devel] Enabling hardware floating point processor for cortex-m4f on embedded and freertos
Am 19.02.21 um 21:55 schrieb Michael Ring via fpc-devel: When rtl for arm-embedded/arm-freertos is build with hardfloat the fpu should also automagically get enabled, by default it is off which causes a crash when floats are used. This small patch fixes that problem in cortexm4f_start.inc can you please apply this patch to trunk? Thanks, I applied it in a modified form so the presence of an vfp unit is checked, this should be more future and fool proof :) ___ fpc-devel maillist - [email protected] https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
