Andes Workshop

It is currently Mon Jun 26, 2017 12:44 pm

All times are UTC + 8 hours [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: 能夠將interrupt vector table放到ILM嗎?
PostPosted: Mon Apr 28, 2014 5:43 pm 
Offline

Joined: Thu Jan 23, 2014 4:18 pm
Posts: 12
我想到的作法如下:
1.crt0.o和ILM function集中放到 .ilm section
2.ilm section放在load address 0
3.因為ILM大小是64KB,所以text, RO從load address 0x10000開始放
4.開機後將ilm section複製到ILM,並將interrupt vector table指向ILM

但這樣有個問題,crt0.o會同時放到text section,造成multiple definition of '_start':
Code:
   ILM 0x00000000 0x00010000
   {
      LOADADDR __ilm_lmastart
      ADDR __ilm_start
      crt0.o (.text, +RO)
      * (.ilm)    ; functions to be put in ILM
      LOADADDR __ilm_lmaend
      ADDR __ilm_end
   }

   FLASH 0x00010000 0x00100000
   {
      * (.vector) ; program
      * (+RO)     ; const global variables
   }


另外請教一下,".vector" 和 ".text" 是一樣的嗎?


Top
 Profile  
 
 Post subject: Re: 能夠將interrupt vector table放到ILM嗎?
PostPosted: Tue Apr 29, 2014 10:58 am 
Offline

Joined: Thu Apr 03, 2014 10:09 am
Posts: 42
關於crt0.o會同時放到text section,造成multiple definition of '_start':
會造成這一個問題有可能是專案沒有設定到,請先參考圖紅框的部份,
勾選"Do not use standard start file"
Attachment:
未命名.jpg
未命名.jpg [ 184.77 KiB | Viewed 2364 times ]


.vector和.text?
這兩個不同的Section.
.text為程式段
.vector為user define section ,
這一個可以參考Demo code (demo-crt)裡vector.S
.section .vector, "ax" 在vector.S是與其它demo code不同的地方。


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group