px4 RAM and flash overflow occur
조회 수: 8 (최근 30일)
이전 댓글 표시
Hello,
I am trying to upload my controller which includes some optimization code to pixhawk cube orange, But below error occurs.
Memory region Used Size Region Size %age Used
ITCM_RAM: 0 GB 64 KB 0.00%
FLASH: 2047201 B 1920 KB 104.13%
DTCM1_RAM: 0 GB 64 KB 0.00%
DTCM2_RAM: 0 GB 64 KB 0.00%
AXI_SRAM: 147237348 B 512 KB 28083.30%
SRAM1: 0 GB 128 KB 0.00%
SRAM2: 0 GB 128 KB 0.00%
SRAM3: 0 GB 32 KB 0.00%
SRAM4: 0 GB 64 KB 0.00%
BKPRAM: 0 GB 4 KB 0.00c:/p/toolchain/gcc-arm/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: cubepilot_cubeorange_default.elf section `.text' will not fit in region `FLASH'
c:/p/toolchain/gcc-arm/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: cubepilot_cubeorange_default.elf section `.bss' will not fit in region `AXI_SRAM'
c:/p/toolchain/gcc-arm/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: region `FLASH' overflowed by 81121 bytes
c:/p/toolchain/gcc-arm/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: region `AXI_SRAM' overflowed by 146713060 bytes
collect2.exe: error: ld returned 1 exit status
As you can see, flash and ram is overflowed, and I cannot upload it.
https://www.mathworks.com/matlabcentral/answers/1809440-pixhawk-6x-5x-6c-support-by-simulink?s_tid=srchtitle
I know I have to delete some useless module in CMake File, but I am not sure in which file I should modificate exactly.
Also, as you can see SRAM is very highly overflowed, i am not sure I can solve the problem by deleting modules. Is there any method I can do to solve overflow issue except for deleting modules?
Thank you!
댓글 수: 0
채택된 답변
Arun Mathamkode
2023년 6월 14일
Yeah for the flash issue, you can consider removing modules. For example, if you are working with a multi-copter, you can consider removing fixed-wing controllers and related modules. But I don't think that's going to solve the RAM issue. Since it overflowed highly, I believe you need to review the signals and data used inside your controller module. For example, if you are using large look-up tables that can cause RAM issues. To debug, you can selectively disable different blocks or modules and see how that is impacting the RAM. This should give you an idea of which part of your modeling is causing the issue.
댓글 수: 2
Arun Mathamkode
2023년 6월 15일
You can edit the <PX4 Dir>\Firmware\boards\cubepilot\cubeorange\default.cmake' file. If you are focusing on quadcopter you can remove fixed wing modules 'fw_att_control ' and 'fw_pos_control_l1' by commenting out those lines.
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!