请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
器件型号:MSPM0L1306 您好!
我们看到您最近更新了最新 SDK 中的 smbus 模块。 但是、它会增加~700B 的代码大小。 由于我们对尺寸有很大的限制、因此我们想知道是否有方法对其进行优化。
我们能否通过在 SDK 的本地编译时指定编译标志来消除任何未使用的功能?
此外、目前我们在项目中仅使用 I2C_SMBUS 控制器、我不明白为什么这里涉及"smbus 目标"相关代码。
附件:代码大小差异(仅显示多数差异、来自 smbus.A)
| 旧的 | 新内容 | DIFF (新旧) | ||||
| 尺寸(十六进制) | 模块 | 函数名称 | 尺寸(十六进制) | 模块 | 函数名称 | |
| 00000020 | SMBUS_NWK.o | (.text.SMBus_NWK_CONTROLLEerProcessNACK) | 00000020 | SMBUS_NWK.o | (.text.SMBus_NWK_CONTROLLEerProcessNACK) | 0 |
| 000000b6 | SMBUS_NWK.o | (.text.SMBus_NWK_CONTROLLEerProcessRx) | 000000b6 | SMBUS_NWK.o | (.text.SMBus_NWK_CONTROLLEerProcessRx) | 0 |
| 0000003c | SMBUS_NWK.o | (.text.SMBus_NWK_controllerProcessStop) | 00000050 | SMBUS_NWK.o | (.text.SMBus_NWK_controllerProcessStop) | 20 |
| 00000028 | SMBUS_NWK.o | (.text.SMBus_NWK_controllerProcessTimeout) | 00000028 | SMBUS_NWK.o | (.text.SMBus_NWK_controllerProcessTimeout) | 0 |
| 0000006a | SMBUS_NWK.o | (.text.SMBus_NWK_controllerProcessTx) | 0000007e | SMBUS_NWK.o | (.text.SMBus_NWK_controllerProcessTx) | 20 |
| 00000014 | SMBUS_NWK.o | (.text.SMBus_NWK_CONTROLLEerReset) | 00000014 | SMBUS_NWK.o | (.text.SMBus_NWK_CONTROLLEerReset) | 0 |
| 0000006a | SMBUS_NWK.o | (.text.SMBus_NWK_CONTROLLEerTxDone) | 0000006a | SMBUS_NWK.o | (.text.SMBus_NWK_CONTROLLEerTxDone) | 0 |
| 00000010 | SMBUS_NWK.o | (.text.SMBus_NWK_getRxPayloadSize) | 00000010 | SMBUS_NWK.o | (.text.SMBus_NWK_getRxPayloadSize) | 0 |
| 00000066 | SMBUS_NWK.o | (.text.smb_NWK_startRxTransfer) | 00000066 | SMBUS_NWK.o | (.text.smb_NWK_startRxTransfer) | 0 |
| 0000003e | SMBUS_NWK.o | (.text.smb_NWK_startTxTransfer) | 00000048 | SMBUS_NWK.o | (.text.smb_NWK_startTxTransfer) | 10 |
| 000000d4 | SMBUS_NWK.o | (.text.smb_NWK_targetProcessRx) | 212 | |||
| 0000006c | SMBUS_NWK.o | (.text.smb_NWK_targetProcessStart) | 108 | |||
| 00000058 | SMBUS_NWK.o | (.text.smb_NWK_targetProcessStop) | 88 | |||
| 00000040 | smb_phy.o | (.text.SMBus_Phy_controllerEnable) | 00000034 | smb_phy.o | (.text.SMBus_Phy_controllerEnable) | -12 |
| 00000028 | smb_phy.o | (.text.SMBus_Phy_controllerEnableInt) | -40 | |||
| 0000000a | smb_phy.o | (.text.SMBus_PHY_CONTROLLEerInit) | 0000004c | smb_phy.o | (.text.SMBus_PHY_CONTROLLEerInit) | 66 |
| 000000b4 | smb_phy.o | (.text.SMBus_PHY_CONTROLLEerProcessInt) | 00000100 | smb_phy.o | (.text.SMBus_PHY_CONTROLLEerProcessInt) | 76 |
| 00000028 | smb_phy.o | (.text.SMBus_PHY_CONTROLLEerSendStop) | 00000028 | smb_phy.o | (.text.SMBus_PHY_CONTROLLEerSendStop) | 0 |
| 000000b4 | smb_phy.o | (.text.SMBus_Phy_controllerStartRx) | 000000cc | smb_phy.o | (.text.SMBus_Phy_controllerStartRx) | 24 |
| 000000e0 | smb_phy.o | (.text.SMBus_PHY_controllerStartTx) | 000000e0 | smb_phy.o | (.text.SMBus_PHY_controllerStartTx) | 0 |
| 00000020 | smb_phy.o | (.text.SMBus_PHY_DISABLE) | 00000024 | smb_phy.o | (.text.SMBus_PHY_DISABLE) | 4 |
| 00000024 | smb_phy.o | (.text.SMBus_PHY_targetManualACK) | 36 | |||
| 求和 | 612 |

