Re: 程式碼一問,使用C30 Compiler為何編譯過不了?
|
||||
---|---|---|---|---|
版主
|
我要讀取是A/D值也可以使用PSV??
沒有必要吧! 一般 PSV 會使用在讀取 Flash 的 Table 值或 EEPROM 的值,AD 轉換後的結果是存在暫存器(RAM)裡,這樣就直接讀取就可以了,不用動到 PSV 的方式。
發表於: 2009/1/19 14:18
|
|||
|
Re: 程式碼一問,使用C30 Compiler為何編譯過不了?
|
||||
---|---|---|---|---|
新會員
|
感謝版主的指教,因為我要讀取是A/D值也可以使用PSV??
發表於: 2009/1/19 11:16
|
|||
|
Re: 程式碼一問,使用C30 Compiler為何編譯過不了?
|
||||
---|---|---|---|---|
版主
|
”無法正確地讀到固定位址的常數””
一般在 16-bit 的應用,讀取 Table 的話使用 PSV 的映射方式會比較簡單也比較好用,讀取的速度也加倍。你可以不用知道 Table 放在哪裡你只要知道 Table 的名稱就好了。
const char _EEDATA(1) sine_table[ ] = {128,152,176,198,217,233,245,252,255,252
詳細 Table REad/Write & PSV 的應用參考 dsPIC30F Peripheral 的教育訓練裡的 EEPROM 章節。 http://www.microchip.com.tw/modules/w ... glefile.php?cid=4&lid=229
發表於: 2009/1/14 11:07
|
|||
|
Re: 程式碼一問,使用C30 Compiler為何編譯過不了?
|
||||
---|---|---|---|---|
版主
|
Linker 錯誤,會不會變數及程式碼太大了,將編譯過的程式檢查一細 Code Size 及 RAM的使用量。
發表於: 2009/1/7 15:41
|
|||
|
程式碼一問,使用C30 Compiler為何編譯過不了?
|
||||
---|---|---|---|---|
新會員
|
請教各位,以下是我的程式碼編譯後出現的錯誤訊息,可是一直編譯不過??
不曉得為什麼? 錯誤訊息為: ---------------------------------------------------------------------- Release build of project `D:\prog\product\410\en_stepless\en.mcp' started. Wed Jan 07 10:58:27 2009 ---------------------------------------------------------------------- Clean: Deleting intermediary and output files. Clean: Deleted file "D:\prog\product\410\en_stepless\main.o". Clean: Deleted file "D:\prog\product\410\en_stepless\sub_adc.o". Clean: Deleted file "D:\prog\product\410\en_stepless\sub_dipsw.o". Clean: Deleted file "D:\prog\product\410\en_stepless\sub_cc1020.o". Clean: Deleted file "D:\prog\product\410\en_stepless\sub_RTSP.o". Clean: Deleted file "D:\prog\product\410\en_stepless\sub_led.o". Clean: Deleted file "D:\prog\product\410\en_stepless\sub_ichip.o". Clean: Deleted file "D:\prog\product\410\en_stepless\en.mcs". Clean: Done. Executing: "C:\Program Files\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=24FJ64GA006 -x c -c "main.c" -o"main.o" -I"C:\Program Files\Microchip\MPLAB C30\support\h" -I"C:\Program Files\Microchip\MPLAB C30\support\inc" -g -Wall main.c: In function '_SPI1Interrupt': main.c:712: warning: PSV model not specified for '_SPI1Interrupt'; assuming 'auto_psv' this may affect latency main.c: In function '_T1Interrupt': main.c:737: warning: PSV model not specified for '_T1Interrupt'; assuming 'auto_psv' this may affect latency Executing: "C:\Program Files\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=24FJ64GA006 -x c -c "sub_adc.c" -o"sub_adc.o" -I"C:\Program Files\Microchip\MPLAB C30\support\h" -I"C:\Program Files\Microchip\MPLAB C30\support\inc" -g -Wall In file included from sub_adc.c:19: sub_RTSP.h:14: warning: 'fillupper' attribute directive ignored sub_adc.c: In function 'Read_PB': sub_adc.c:51: warning: assignment discards qualifiers from pointer target type Executing: "C:\Program Files\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=24FJ64GA006 -x c -c "sub_dipsw.c" -o"sub_dipsw.o" -I"C:\Program Files\Microchip\MPLAB C30\support\h" -I"C:\Program Files\Microchip\MPLAB C30\support\inc" -g -Wall Executing: "C:\Program Files\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=24FJ64GA006 -x c -c "sub_cc1020.c" -o"sub_cc1020.o" -I"C:\Program Files\Microchip\MPLAB C30\support\h" -I"C:\Program Files\Microchip\MPLAB C30\support\inc" -g -Wall Executing: "C:\Program Files\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=24FJ64GA006 -x c -c "sub_RTSP.c" -o"sub_RTSP.o" -I"C:\Program Files\Microchip\MPLAB C30\support\h" -I"C:\Program Files\Microchip\MPLAB C30\support\inc" -g -Wall Executing: "C:\Program Files\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=24FJ64GA006 -x c -c "sub_led.c" -o"sub_led.o" -I"C:\Program Files\Microchip\MPLAB C30\support\h" -I"C:\Program Files\Microchip\MPLAB C30\support\inc" -g -Wall Executing: "C:\Program Files\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=24FJ64GA006 -x c -c "sub_ichip.c" -o"sub_ichip.o" -I"C:\Program Files\Microchip\MPLAB C30\support\h" -I"C:\Program Files\Microchip\MPLAB C30\support\inc" -g -Wall Executing: "C:\Program Files\Microchip\MPLAB C30\bin\pic30-gcc.exe" -mcpu=24FJ64GA006 "main.o" "sub_adc.o" "sub_dipsw.o" "sub_cc1020.o" "sub_RTSP.o" "sub_led.o" "sub_ichip.o" "C:\Program Files\Microchip\MPLAB C30\lib\libpPIC24Fxxx-coff.a" -o"en.cof" -Wl,-L"C:\Program Files\Microchip\MPLAB C30\lib",-L"C:\Program Files\Microchip\MPLAB C30\support\h",-L"C:\Program Files\Microchip\MPLAB C30\support\h\peripheral_24F",-L"C:\Program Files\Microchip\MPLAB C30\support\h\peripheral_30F_24H_33F",--script="C:\Program Files\Microchip\MPLAB C30\support\gld\p24FJ64GA006.gld",--defsym=__MPLAB_BUILD=1,-Map="en.map",--report-mem Link Error: Could not allocate section .cal_data at 0x800 Link Error: Could not allocate program memory Link step failed. ---------------------------------------------------------------------- Release build of project `D:\prog\product\410\en_stepless\en.mcp' failed. Wed Jan 07 10:58:33 2009 ---------------------------------------------------------------------- BUILD FAILED 但是我將主程式裡有呼叫引用到sub_adc.h & sub_adc.c 的函數和變數拿掉之後,再編譯就過了??附加檔案是我這個project的 ask.mcp檔內容. 謝謝各位相助
發表於: 2009/1/7 11:27
|
|||
|