Hi !
Iām using the evaluation board based on STM32F446RET and uploaded PX4 F/W.
However, there is a problem on memory (maybe).
Firstly, I removed a lot of part in ānuttx_px4fmu-v4_default.cmakeā file and just executed ānshā in terminal.
After that I added sensor parts such as MPU9250, MS5611 and so on. It was initialized but I cannot check the sensorās value.
When I debug on eclipse, the program stopped at āmm_mallinfoā function in āmm_mallinfo.cā file.
I think that I have to configure 'Stack and heap informationā in āpx4fmu-v4/nsh/defconfigā file. (753 line)
What value should I change and how can I know it?
@DoEon_Lee: This wonāt quite answer your question, but I think it will give you some additional information that you should find useful.
Before tweaking the Stack allocation, make sure the linker script has the correct flash, and memory allocations set. The linker script ld.script
can be found in nuttx-configs/px4fmu-v4/scripts
.
If you search for āstackā in the defconfig
file, you will see a number of stack allocation sizes for various threads/processes.
When you start a daemon with px4_task_spawn_cmd()
, one of the arguments that is passed to the function is the stack to be allocated to that process. You can see how much stack is allocated and currently being used by a process by running top
from the NSH shell.
To see how much heap you have used, run free
from the NSH shell.