搜索
bottom↓
回复: 0

codeblocks avr lgt 向导

[复制链接]

出0入0汤圆

发表于 2012-8-4 15:15:15 | 显示全部楼层 |阅读模式
使用 CB_20120721_rev8150 里面的avr向导文件修改 覆盖到share\CodeBlocks\templates\wizard\avr 即可

对LGT的支持
(选项 "LGT8F0XA Series – 8bit FLASH Based RISC Microcontroller")
+自动增加头文件
+连接选项 -Wl,--defsym=__stack=0x8002ff

对AVR的支持
(选项 "Garbage collect unused sections")
AVR/GNU compiler-Optimization: Prepare functions for garbage collection(-ffunction-sections)
AVR/GNU linker-Optimization: Garbage collect unused sections(-Wl,--gc-sections)


向导文件







上面代码编译后的lss输出文件(释放模式)内容

bin\Release\test5.elf:     file format elf32-avr

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
  0 .text         000000aa  00000000  00000000  00000054  2**1
                  CONTENTS, ALLOC, LOAD, READONLY, CODE

Disassembly of section .text:

00000000 <__vectors>:
   0:        0c 94 3e 00         jmp        0x7c        ; 0x7c <__ctors_end>
   4:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
   8:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
   c:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  10:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  14:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  18:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  1c:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  20:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  24:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  28:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  2c:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  30:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  34:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  38:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  3c:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  40:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  44:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  48:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  4c:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  50:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  54:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  58:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  5c:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  60:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  64:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  68:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  6c:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  70:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  74:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>
  78:        0c 94 48 00         jmp        0x90        ; 0x90 <__bad_interrupt>

0000007c <__ctors_end>:
  7c:        11 24               eor        r1, r1
  7e:        1f be               out        0x3f, r1        ; 63
  80:        cf ef               ldi        r28, 0xFF        ; 255
  82:        d2 e0               ldi        r29, 0x02        ; 2

  84:        de bf               out        0x3e, r29        ; 62
  86:        cd bf               out        0x3d, r28        ; 61
  88:        0e 94 4a 00         call        0x94        ; 0x94 <main>
  8c:        0c 94 53 00         jmp        0xa6        ; 0xa6 <_exit>

00000090 <__bad_interrupt>:
  90:        0c 94 00 00         jmp        0        ; 0x0 <__vectors>

00000094 <main>:
  94:        11 b8               out        0x01, r1        ; 1
  96:        8f ef               ldi        r24, 0xFF        ; 255
  98:        82 b9               out        0x02, r24        ; 2
  9a:        80 b1               in        r24, 0x00        ; 0
  9c:        80 fd               sbrc        r24, 0

  9e:        fd cf               rjmp        .-6              ; 0x9a <main+0x6>
  a0:        80 e0               ldi        r24, 0x00        ; 0
  a2:        90 e0               ldi        r25, 0x00        ; 0
  a4:        08 95               ret

000000a6 <_exit>:
  a6:        f8 94               cli

000000a8 <__stop_program>:
  a8:        ff cf               rjmp        .-2              ; 0xa8 <__stop_program>

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-5-5 07:44

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表