Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SITL: add AP_MOTORS_FRAME_xxx_ENABLED guards #28885

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

srmainwaring
Copy link
Contributor

Add AP_MOTORS_FRAME_xxx_ENABLED guards to SIM_Frame.cpp as they are applied in AP_Motors_Matrix.cpp. This does not change default behaviour and allows the majority of the motor mixes to be disabled in the esp32xxempty boards which frees up RAM.

Related

Testing

esp32empty

Before

Total sizes:
Used static DRAM:  147848 bytes (  32888 remain, 81.8% used)
      .data size:   19368 bytes
      .bss  size:  128480 bytes
Used static IRAM:  113718 bytes (  17354 remain, 86.8% used)
      .text size:  112691 bytes
   .vectors size:    1027 bytes
Used Flash size : 1856264 bytes
           .text: 1548788 bytes
         .rodata:  307220 bytes
Total image size: 1989350 bytes (.bin may be padded larger)

After

Total sizes:
Used static DRAM:  120488 bytes (  60248 remain, 66.7% used)
      .data size:   19368 bytes
      .bss  size:  101120 bytes
Used static IRAM:  113718 bytes (  17354 remain, 86.8% used)
      .text size:  112691 bytes
   .vectors size:    1027 bytes
Used Flash size : 1849596 bytes
           .text: 1545128 bytes
         .rodata:  304212 bytes
Total image size: 1982682 bytes (.bin may be padded larger)

esp32s3empty

Before

Total sizes:
Used stat D/IRAM:  236610 bytes ( 105150 remain, 69.2% used)
      .data size:   21960 bytes
      .bss  size:  109784 bytes
      .text size:  103839 bytes
   .vectors size:    1027 bytes
Used Flash size : 1636580 bytes
           .text: 1354860 bytes
         .rodata:  281464 bytes
Total image size: 1763406 bytes (.bin may be padded larger)

After

Total sizes:
Used stat D/IRAM:  209250 bytes ( 132510 remain, 61.2% used)
      .data size:   21960 bytes
      .bss  size:   82424 bytes
      .text size:  103839 bytes
   .vectors size:    1027 bytes
Used Flash size : 1629848 bytes
           .text: 1351152 bytes
         .rodata:  278440 bytes
Total image size: 1756674 bytes (.bin may be padded larger)

Copy link
Member

@IamPete1 IamPete1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


#if AP_MOTORS_FRAME_OCTA_ENABLED
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, you're mixing the streams here!

We try not to rely on stuff from the "other side" here. ie. you should be able to compile support for the frame out in ArduPilot but havesim support for it - and support it in AP nbut not in SIM.

That measn creating AP_SIM_MOTORS_FRAME_OCTAQUAD_ENABLED etc

Copy link
Collaborator

@davidbuzz davidbuzz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks ok to me, if u can convince peter its ok. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants