使用gcc 4.7.x的Avrstudio 4.19工具链 [英] Avrstudio 4.19 toolchain using gcc 4.7.x

查看:173
本文介绍了使用gcc 4.7.x的Avrstudio 4.19工具链的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用ATMEGA项目的makefile样式编译.作为Arduino IDE的传统,开发工具链主要针对gcc 4.3.2. Avrstudio 4.19 + Jtagice MKII CN + gcc 4.3.2 + make 可以通过某种方式工作.但是我的问题是gcc 4.3.2相当有问题.我看到例如与非易失性变量优化相关的随机错误,寄存器缓存的值并不总是写回到内存中,而且错误警告也很烦人.因此,使用 gcc 4.7.0 解决了问题,但我无法将任何此类程序加载到Avrstudio 4.19中,加载十六进制时,Avrstudio总是崩溃.是否有人尝试并成功使用了此工具链?

I'm using makefile style compiling of my ATMEGA projects. As legacy of Arduino IDE, develepment toolchain is mostly aimed to gcc 4.3.2. Avrstudio 4.19 + Jtagice MKII CN + gcc 4.3.2 + make works somehow. But my problem is that gcc 4.3.2 is rather buggy. I see e.g. random bugs related to optimization of non-volatile variables, register cached values are not always written back to memory and also wrong warning are annoying. Hence using gcc 4.7.0 solves problem but I cannot load any such a program into Avrstudio 4.19, Avrstudio always crashes when loading hex. Does anybody tried and suceeded with this toolchain ?

注意:我不希望使用更高版本的Avrstudio,因为尺寸会增加并且可能会带来新的问题.

Note: I don't want go to higher Avrstudio version because size grows and probably brings new problems.

谢谢

推荐答案

Erasmus 的答案可能有用对于avr-gcc 4.7.x;但是我在Atmel AVR工具链的最新版本提供的avr-gcc 4.8.1中发现,AvrStudio4没有加载任何调试符号.

The A Erasmus answer may have worked for avr-gcc 4.7.x; but I found in avr-gcc 4.8.1 provided by recent versions of the Atmel AVR Toolchain that AvrStudio4 didn't load any debugging symbols.

我注意到avr-gcc 4.8.1生成的ELF文件中缺少.debug-pubnames部分,并且使用-gdwarf-2 -gstrict-dwarf -gpubnames调试选项恢复了缺少的部分,然后允许AvrStudio4显示调试符号.

I noticed that the .debug-pubnames section was missing from the ELF file generated by avr-gcc 4.8.1 and that using the -gdwarf-2 -gstrict-dwarf -gpubnames debug options reinstated the missing section which then allowed AvrStudio4 to show debugging symbols.

这篇关于使用gcc 4.7.x的Avrstudio 4.19工具链的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆