<Linking> >> warning: creating output section data_buf1 without SECTIONS specification >> warning: creating output section data_buf2 without SECTIONS specification >> warning: creating output section data_buf3 without SECTIONS specification >> warning: creating output section data_buf4 without SECTIONS specification >> warning: creating output section data_buf5 without SECTIONS specification >> warning: creating .stack section with default size of 400 (hex) words. Use -stack option to change the default size. 相关文件如下: ;这是程序,用C的写的 #include"math.h" #pragma DATA_SECTION(data1,"data_buf1") float data1; #pragma DATA_SECTION(data2,"data_buf2") float data2; #pragma DATA_SECTION(data3,"data_buf3") float data3; #pragma DATA_SECTION(data4,"data_buf4") float data4; #pragma DATA_SECTION(data5,"data_buf5") float data5; void main(void) { data1=12.7; data2=9.2; data3=data1*data2; data4=data1/data2; data5=sqrt(12.7); } ;这是中断向量程序
.sect ".vectors"
.ref _c_int00 ; C entry point
.align 0x80 ; must be aligned on page boundary
RESET: ; reset vector BD _c_int00 ; branch to C entry point STM #200,SP ; stack size of 200 nmi: RETE ; enable interrupts and return from one NOP NOP NOP ;NMI~
; software interrupts sint17 .space 4*16 sint18 .space 4*16 sint19 .space 4*16 sint20 .space 4*16 sint21 .space 4*16 sint22 .space 4*16 sint23 .space 4*16 sint24 .space 4*16 sint25 .space 4*16 sint26 .space 4*16 sint27 .space 4*16 sint28 .space 4*16 sint29 .space 4*16 sint30 .space 4*16
int0: RETE NOP NOP NOP int1: RETE NOP NOP NOP int2: RETE NOP NOP NOP tint: RETE NOP NOP NOP rint0: RETE NOP NOP NOP xint0: RETE NOP NOP NOP rint1: RETE NOP NOP NOP xint1: RETE NOP NOP NOP int3: RETE NOP NOP NOP .end ;这是CMD文件 MEMORY{ page 0: param: org=1000h, len=0efdh vect: org=0ff80h, len=80h page 1: daram: org=2000h, len=0ffffh } SECTIONS{
.text :> param page 0 .cinit :> param page 0 .vectors :> vect page 0 .data :> daram page 1 .bss :> daram page 1 .sect :> daram page1 .const :> daram page 1 .data_buf1 :> daram page 1 }
|