• slider image 442
  • slider image 483
  • slider image 484
  • slider image 485
  • slider image 486
  • slider image 487
:::


Browsing this Thread:   1 Anonymous Users






Re: 請問:如何把一個binary 字型檔加到project 且得到位址 (MCU:ATSAME70)
#3
初級會員
初級會員


查看用戶資訊
感謝Libra 老師說明

發表於: 2022/7/15 9:56
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: 請問:如何把一個binary 字型檔加到project 且得到位址 (MCU:ATSAME70)
#2
管理員
管理員


查看用戶資訊
Binary圖檔, 建議轉成 Hex Bytes 與程式一起Compiler可以方便存取
可以參考CAE空中教室教材 SAM2001中, Lab17的字型圖檔的設計方式,
Alphabet_Fonts.h 中
const unsigned char Alphabet_Fonts [] = {
0x3E, 0x51, 0x49, 0x49, 0x45, 0x3E, 0x00, 0x44, 0x42, 0x41, 0x7F, 0x40, 0x40, 0x00, 0x42, 0x61,
0x51, 0x51, 0x49, 0x46, 0x00, 0x22, 0x41, 0x49, 0x49, 0x49, 0x36, 0x00, 0x30, 0x28, 0x24, 0x22,....};

要如何取得地址?
如果是跟著程式的定義編譯在程式裡面, 則看你是用哪一種資料結構,
以陣列來看, 它的名稱即這個 Font Binary 的地址,
unsigned char Font[] = "d9ye9hdp91hd98ywedipunw98yd9hqowind[20d";
unsigned char *pFont_Address;
pFont_Address = Font;
指標 pFont_Address 即指向 Font[] 的地址;

如果是單獨燒錄到特定地址時, 既然你知道要燒到哪個地址, 那應該就不是問題.
假設你將 Binary Font 燒錄到 Flash中 0x4000的地址時,
volatile unsigned char *pFont_Address;
pFont_Address = (volatile unsigned char *)0x4000;
指標 pFont_Address 即指向 0x4000 的地址;

如果想查程式中每個變數在 RAM/Flash 中, 所配到的地址時, 可以查看跟 HEX 檔放在一起 .MAP 檔
縮圖


或是用 Debug 的 Watches 也可以看到當前變數的地址
縮圖

Attach file:



jpg  Drbug_Watch_Address.jpg (152.01 KB)
67979_62d0bd848315d.jpg 952X269 px

jpg  MAP_Address.jpg (241.32 KB)
67979_62d0be091a7b9.jpg 779X412 px

發表於: 2022/7/15 8:57

Edited by Libra on 2022年07月15日 09:18:26
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


請問:如何把一個binary 字型檔加到project 且得到位址 (MCU:ATSAME70)
#1
初級會員
初級會員


查看用戶資訊
mplab x ide v5.5 xc32 v3.01 mcu : atsame70

請問各個老師,前輩們

我需要把一個8x KB 的 binary 字型檔加到 project 裏 ,且得知啟始位址

請問在 x ide 中要如何達成這個功能 , 或是要找那些文件, 謝謝

發表於: 2022/7/14 18:16
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------