nuttx: Tiva board won't boot when FPU is enabled

This board works fine with all default configurations. I’m using it regularly without issues.

However, by simply enabling FPU Support (ARCH_FPU) causes the board to not event turn the LEDs on. I also tried enabling all kinds of debug statements, and nothing shows on serial port. Compilation and flashing all complete without errors.

I would appreciate any indications on where I could look for issues. So far I tried tracking CONFIG_ARCH_FPU but no success.

Board: Tiva-C TM4C1294-XL

Thanks!

Update: I’ve mapped to this point, where it remains stuck:

File: nuttx/arch/arm/src/armv7-m/arm_saveusercontext.S

#ifdef CONFIG_ARCH_FPU
	add		r1, r0, #(4*REG_S0)
	vstmia		r1!, {s0-s15}       ----> stuck here
	vmrs		r2, fpscr
	str		r2, [r1]
#endif

It seems to get there when running the ‘tiva_configgpio’ function on tiva_lowput.c. As soon as it enters the configuration for the UART GPIO pin, it fails and falls to ‘arm_saveusercontext’.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 16 (16 by maintainers)

Most upvoted comments

Here is a patch that corrects the issue

diff --git a/arch/arm/src/tiva/common/lmxx_tm4c_start.c b/arch/arm/src/tiva/common/lmxx_tm4c_start.c
index 3b04c8aba3..ed7e6b8955 100644
--- a/arch/arm/src/tiva/common/lmxx_tm4c_start.c
+++ b/arch/arm/src/tiva/common/lmxx_tm4c_start.c
@@ -108,9 +108,9 @@ void __start(void)
 
   /* Configure the UART so that we can get debug output as soon as possible */
 
+  arm_fpuconfig();
   tiva_clock_configure();
   tiva_lowsetup();
-  arm_fpuconfig();
   showprogress('A');
 
   /* Clear .bss.  We'll do this inline (vs. calling memset) just to be