Eigenmath ported to STM32 MCU

Well, have to mention that RAM is not sufficient for the complete self-test to run. Here is how I get that:

Delete these files

  • cmddisplay.cpp
  • draw.cpp
  • history.cpp
  • html-tool.c
  • MainXP.cpp
  • MainOSX.cpp
  • msqrt.cpp
  • prototype-tool.c
  • window.cpp

Also delete these since some mathematics libraries are missing…

  • besselj.cpp
  • bessely.cpp

Delete display if you don’t want that kind of ASCII-ART-ish MathPrint output:

  • display.cpp

Modify stack.cpp and declare the stack to be in CCM RAM ( @ “ccmram”; )

Modify N in alloc.cpp to a reasonable value so it can fit in SRAM.

Modify heap size in stm32f40x_flash.icf with “define symbol ICFEDIT_size_heap = 0x8000;”

Add support of CCM RAM:

define symbol __ICFEDIT_region_CCM_start__ = 0x10000000;
define symbol __ICFEDIT_region_CCM_end__   = 0x10010000;

define region CCM_region   = mem:[from __ICFEDIT_region_CCM_start__   to __ICFEDIT_region_CCM_end__];

Change allocation:

place in RAM_region   { readwrite, block HEAP};
place in CCM_region   { section .ccm,block CSTACK};

 

By doing so, eigenmath should be able to run on an STM32 microcontroller.

Leave a Reply