on embedded…

by barracobarner

coba cek nih board dan programmer, apa kurang adapter?

kita lihat dulu dspicdem 1.1+ gpdb: kalo ngelihat webnya, yg sedikit bikin ribet adlh adanya 2 jenis dsp: dspic-30f6014a dan -33fj256gp710. mana yg dipake? klo lihat plug-in module supported disebutkan bhw dia dukung dspic-30f6014a, -30f6010a, dan -33fj256gp710, dg demikian krn jelas2 yg terpasang adlh yg pertama, kt jd gnkan yg prtma jg.
source antara .s atau .c lalu tambahkan linker script .gld yg dukung spesifik board, abis itu jadi hex dan cof. hex berisi data diperlukan utk memrogram divais dan cof berisi info tambahan yg bs bantu debug pd source code level, perbandingan cof 60ribu dan hex 4rb aka 16x lipat ukurannya.

Executing: “C:\Program Files (x86)\Microchip\MPLAB ASM30 Suite\bin\pic30-ld.exe” “contoh.o” –script=”..\..\Program Files (x86)\Microchip\MPLAB ASM30 Suite\Support\dsPIC30F\gld\p30F6014A.gld” –defsym=__MPLAB_BUILD=1 –defsym=__MPLAB_DEBUG=1 -o”kedua.cof” -Map=”kedua.map” –report-mem

Program Memory  [Origin = 0x100, Length = 0x17efe]

section                    address   length (PC units)   length (bytes) (dec)
——-                    ——-   —————–   ——————–
.text                        0x100                 0x2             0x3  (3)
.text                        0x102                0xe2           0x153  (339)
.myconst                0x1e4                0xbe           0x11d  (285)
.dinit                       0x2a2                 0x8             0xc  (12)

Total program memory used (bytes):          0x27f  (639) <1%

Data Memory  [Origin = 0x800, Length = 0x2000]

section                    address      alignment gaps    total length  (dec)
——-                    ——-      ————–    ——————-
.nbss                        0x800                   0             0x2  (2)

Total data memory used (bytes):            0x2  (2) <1%

Dynamic Memory Usage

region                     address                      maximum length  (dec)
——                     ——-                      ———————
heap                             0                                   0  (0)
stack                        0x802                              0x1ffe  (8190)

Maximum dynamic memory (bytes):         0x1ffe  (8190)

Executing: “C:\Program Files (x86)\Microchip\MPLAB ASM30 Suite\bin\pic30-bin2hex.exe” “C:\training\microchip\kedua.cof”
Loaded C:\training\microchip\kedua.cof.
———————————————————————-
Debug build of project `C:\training\microchip\kedua.mcp’ succeeded.
Language tool versions: pic30-as.exe v3.30, pic30-ld.exe v3.30, pic30-ar.exe v3.30
Preprocessor symbol `__DEBUG’ is defined.
Tue Apr 22 17:17:32 2014
———————————————————————-
BUILD SUCCEEDED

stlh selesai dg urusan hex dan cof selanjutnya adlh mrogram dan debug. Configure | Configuration bits kita lihat:
alamat, nilai di alamat tsb, field (satu alamat bs 1+ fields), kategori utk tiap field, settingan utk tiap field
selanjutnya adlh hubungkan programmer atau debugger ke PC dan board
* configure programmer/debugger (jumper setting dsb)
* configure board (tegangan, jumper setting dsb)
* pastikan DSP module sudah terpasang di board
* koneksikan programmer/debugger ke PC
* koneksikan programmer/debugger ke board
* kasih power tuh board
selanjutnya koneksi antara programmer/debugger dengan mplab
*** pertama select device -> kita pilih keluarga 30f6014a.
* jk Debugger
Select tool |
mplab icd 2, pickit 3, mplab ice 4000, mplab sim, mplab ice 2000, real ice, pickit 2, mplab icd 3, pic32 starter kit, starter kits, licensed debugger
Clear memory |
all memory, program memory, general purpose registers, eeprom, flash data, configuration bits
==> setelah memilih akan ada menu tambahan di bawah debugger: run, animate, halt, step … dst
* jk Programmer
Select programmer |
picstart plus, mplab icd 2, licensed debugger, starter kits, pickit 3, mplab icd 3, an851 quick programmer beta, pickit 2, mplab pm 3, real ice, pro mate ii, pickit 1

==> setelah memilih programmer akan muncul menu tambahan di bawah programmer: program, verify, read, blank check all, erase flash device, release from reset, hold in reset, abort operation, reconnect, settings

jk menggunakan mplab x:
klik kanan proyek, make & program device -> hardware tools:
icd 3, pickit2, pickit3, pm3, real ice, simulator, microchip starter kits, other tools: licensed debugger.
atau project properties: hardware tool … compiler toolchain … dst
dan utk jalankan: debug | run debugger/programmer self test

skrg bcr icsp, mengenai spec dsp prosesornya.

30f6014a

Advertisements