Author |
Message |
Forum: BSP (Board Support Package) Topic: 指定變數存在某個section裡的語法 |
cindy |
Posted: Wed Aug 17, 2011 11:49 am
|
|
Replies: 1 Views: 12042
|
如果要指定變數存在某個section裡,可以用下列的方式宣告。 (下面的STACK為指定的section name,您可以改為任何section name) char stack[10000] __attribute__ ((section ("STACK"))) = { 0 }; |
|
|
Forum: AndeSight MCU/RDS Topic: ld的export symbol的使用方式 |
cindy |
Posted: Wed Aug 17, 2011 11:47 am
|
|
Replies: 2 Views: 11570
|
ld的export symbol的功能,使用方式如下 Export symbol: 在 LD_FLAGS 加上 -Wl,--mgen-symbol-ld-script=<Filename> Ld 會產生 <Filename> 這個檔案, 這個檔案是一個linker script 裡面包含了一個SECTION block以及許多的assignment, 如下所示 export1.gif Assignment 左側的symbol 就是export symbol 請把您需要的symbol留下來,不要的刪去。 如果你想要加入額外的symbol 可以加額外的assignment在export symbo... |
|
|
Forum: AndeSight MCU/RDS Topic: AndeSight是否支援單一檔案的compiler option設定? |
cindy |
Posted: Tue Aug 16, 2011 4:46 pm
|
|
Replies: 0 Views: 8182
|
AndeSight是否支援單一檔案的compiler option設定? Ans: 可以的,如下面設定。
(1)在*.c檔上按右鍵-->Properties
Attachment:
p1.gif [ 13.37 KiB | Viewed 8182 times ]
可以看到settings裡有gcc option的設定
Attachment:
p2.gif [ 12.67 KiB | Viewed 8182 times ]
(2) 在source code的folder上按右鍵,可以設定整個folder的option
Attachment:
p3.gif [ 8.62 KiB | Viewed 8182 times ]
(3) .S檔按右鍵,也可以設定gcc options。 .s檔按右鍵,只能設定as的options。因為.s檔預設是用as 來compile (大寫的.S是用gcc compile) |
|
|
Forum: AndeSight MCU/RDS Topic: Debug時,改變default的breakpoint |
cindy |
Posted: Tue Aug 16, 2011 4:36 pm
|
|
Replies: 0 Views: 8178
|
AndeSight裡的debug,預設進入debug session時, 會停在main的地方。
如果要改變,可以從properties設定。如下圖
Attachment:
p1.gif [ 22.46 KiB | Viewed 8178 times ]
我們可以將main改為C程式的行號,填入 hello.c:16
或者也可以停在組合語言的行號,如 *0x3001C0
可以參考gdb的指令。 |
|
|
Forum: AndeSight MCU/RDS Topic: timer+interrupt的範例程式 |
cindy |
Posted: Fri Aug 12, 2011 2:39 pm
|
|
Replies: 0 Views: 8113
|
timer+interrupt的範例程式
程式檔
Attachment:
timer_example.7z [92.41 KiB]
Downloaded 1077 times
裡面有N8和N9 2個版本
說明如下
Attachment:
readme.pdf [186.24 KiB]
Downloaded 1115 times
|
|
|
Forum: AndeShape Topic: Android在Andes Core上demo |
cindy |
Posted: Thu Aug 04, 2011 10:42 am
|
|
Replies: 0 Views: 14231
|
|
|
Forum: BSP (Board Support Package) Topic: 用gdb寫暫存器的語法 |
cindy |
Posted: Tue Aug 02, 2011 10:34 am
|
|
Replies: 0 Views: 7945
|
有幾種方式可以寫暫存器。 (1) 用gdb寫。例如, set $r1=0x300001 寫完之後,讀出來驗證,command為 p/x $r1 (2) 用inline assembly來寫。請參考programming guide的 18.9. Inline Assembly Programming 程式的語法類似這樣 __asm__ ("add\t%0, %1, %2\n\t" "movi\t$r6, 123\n\t" "add\t%0, %0, $r6" : "=r" (ret) : "r"... |
|
|
Forum: BSP (Board Support Package) Topic: 用gdb讀寫記憶體的指令 |
cindy |
Posted: Tue Aug 02, 2011 10:32 am
|
|
Replies: 0 Views: 7870
|
用gdb寫記憶體 例如寫在0x500000的位置,如下面的指令 set *(unsigned int *) 0x500000 =0x12345678 下面是印出0x500000的10個words x/10w 0x500000 0x500000: 0x12345678 0xffffffff 0xffffffff 0xffffffff 0x500010: 0xffffffff 0xffffffff 0xffffffef 0xffffffff 0x500020: 0xffffffff 0xffffffff 從回應中看出來寫入成功 |
|
|
Forum: BSP (Board Support Package) Topic: IntelJ3在command line上燒錄flash的使用方法 |
cindy |
Posted: Thu Jul 21, 2011 9:50 am
|
|
Replies: 0 Views: 7262
|
我整理成投影片了, 請看附件。
Attachment:
IntelJ3_N8.ppt [265.5 KiB]
Downloaded 1071 times
|
|
|
Forum: AndeSight MCU/RDS Topic: GCC支援C99或C90? |
cindy |
Posted: Fri Jul 15, 2011 3:27 pm
|
|
Replies: 0 Views: 8348
|
|
|
Sort by: |