graphics - IAR 和 CubeIDE 的 STM32F746G 和 touchGFX 问题
问题描述
我想试试 TouchGFX。我创建了一个简单的示例。我使用 CubeMX 并选择 X-Cube-TouchGFX 4.13.0 作为附加软件。我配置一切都很好,使用示例和网络研讨会。然后,我使用 TouchGFX 设计器为我的示例插入了一个简单的 UI,所有这些都运行良好。
我使用 CubeIDE 使用 Application 结构生成了一个 IAR 项目:Advanced and
linker Settings : Heap = 200 ; Stack = 800;
现在,如果我编译该项目,我没有问题,但如果我Make
是该项目,我会看到此错误:
Error[Lp011]: section placement failed unable to allocate space for
sections/blocks with a total estimated minimum size of 0x17'd129 bytes
(max align 0x4) in <[0x800'0000-0x80f'ffff]> (total uncommitted space
0xf'fe38).
后来我为STM32CubeIDE生成项目,看到这个错误:
c:\st\stm32cubeide_1.2.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.7-2018-q2-update.win32_1.0.0.201904181610\tools\arm -none-eabi\bin\ld.exe:区域“FLASH”溢出 596908 字节
collect2.exe: error: ld returned 1 exit status
make: *** [makefile:74: TEST_1.elf] Error 1 "make -j8 all" terminated
with exit code 2. Build might be incomplete.
解决方案
CubeMX(和 CubeIDE)不会为您生成有效的链接描述文件,因为他们不知道您正在使用哪个闪存芯片以及资产的内存区域从哪里开始。
您可以从 TouchGFX 设计器中查看一些应用程序模板,以了解链接器脚本(对于 IAR、CubeIDE、Keil)是如何根据内存映射构建的(ExtFlashSection
对于 TouchGFX 应用程序来说,这里是重要的区域)。
您正在溢出,因为您的链接器试图将所有内容放入内部闪存中(因为链接器脚本没有定义 TouchGFX 资产公开的区域)。
推荐阅读
- terraform - 使用变量中定义的键对本地地图进行 Terraform 插值
- firebase - Firebase 云消息传递。onMessage.onListen 不起作用。(颤振机器人)
- r - 使用 R 中的 for 循环过滤掉数据帧中的零
- java - IntelliJ 使用了错误的导入路径
- automated-tests - 当我有一个包含负数的字符串时,cy.get('element').contains('text') 不起作用(例如 cy.get('element').contains('-1'))
- kali-linux - 在 Hydra 中有没有办法为每次尝试输出 HTTP 响应代码?
- python - 在 Pandas 的列中使用 apply() 函数时传递行号
- javascript - 如何读取 index.html 文件中的 .js 配置文件
- python - Python - 如何从命令打印整个输出?
- windows - 如何在启动程序之前检查 Windows 10 版本?