• R/O
  • HTTP
  • SSH
  • HTTPS

cpu2010: Commit

サブCPU2010のPICプログラム
ADデータ取得とGPS時刻付けを行いLinux部にデータを出力します。


Commit MetaInfo

Revisão1c4165bd18c1db88e8e61d4eb4dee1da8f684023 (tree)
Hora2011-12-06 20:19:39
AutorNaoya Takamura <ntaka206@user...>
CommiterNaoya Takamura

Mensagem de Log

myint.h int2 add
myuart.c uart2 int rcv add.

Mudança Sumário

Diff

--- a/main.c
+++ b/main.c
@@ -181,6 +181,99 @@ static char pps_intf;
181181 #define pps_is_intf_enable() (pps_intf != 0)
182182
183183 /*
184+ * SPI FLAG test
185+ */
186+void test_spi_flag(void)
187+{
188+ char sz[128];
189+ int in;
190+ unsigned char txc = 0;
191+ unsigned char rxc;
192+
193+ spi2_int_disable();
194+ cnint_int_disable();
195+ while(1) {
196+ delay_ms(1000);
197+ sprintf(sz, "SPI2STAT=%04X "
198+ "SPIBEC=%d SRMPT=%d SPIROV=%d SRXMPT=%d TBF=%d RBF=%d\r\n"
199+ , SPI2STAT
200+ , SPI2STATbits.SPIBEC
201+ , SPI2STATbits.SRMPT
202+ , SPI2STATbits.SPIROV
203+ , SPI2STATbits.SRXMPT
204+ , SPI2STATbits.SPITBF
205+ , SPI2STATbits.SPIRBF
206+ );
207+ PDEBUG(sz);
208+ if ((in = uart2_rcvbuf_getc()) >= 0) {
209+ uart2_myputc(in);
210+ uart2_puts("\r\n");
211+
212+ switch(in) {
213+ case 'r':
214+ rxc = spi2_getc();
215+ sprintf(sz, "RX=%02X\r\n", rxc);
216+ uart2_puts(sz);
217+ break;
218+ case 't':
219+ spi2_putc(txc++);
220+ sprintf(sz, "TX=%02X\r\n", txc);
221+ uart2_puts(sz);
222+ break;
223+ case 'v':
224+ spi2_rx_overrun_clear();
225+ break;
226+ case 'x':
227+ SPI2STATbits.SRXMPT = 0;
228+ break;
229+ case 'y':
230+ SPI2STATbits.SRXMPT = 1;
231+ break;
232+ }
233+ }
234+ }
235+}
236+/*
237+ * polling send/rcv
238+ */
239+void test_spi_send(void)
240+{
241+ unsigned char txc = 1;
242+ unsigned char rxc;
243+ char sz[128];
244+
245+ spi2_int_disable();
246+ cnint_int_disable();
247+// SPI2BUF = txc++;
248+// rxc = SPI2BUF;
249+ while(1) {
250+ while(SPI2STATbits.SPITBF == 0) {
251+ // TX
252+ SPI2BUF = txc++;
253+ }
254+ if (SPI2STATbits.SRXMPT == 0) {
255+ while(SPI2STATbits.SRXMPT == 0) {
256+ // RX FIFO読み出し
257+ rxc = SPI2BUF;
258+ }
259+#if 0
260+ sprintf(sz, "SPI2STAT=%04X "
261+ "SPIBEC=%d SRMPT=%d SPIROV=%d SRXMPT=%d TBF=%d RBF=%d\r\n"
262+ , SPI2STAT
263+ , SPI2STATbits.SPIBEC
264+ , SPI2STATbits.SRMPT
265+ , SPI2STATbits.SPIROV
266+ , SPI2STATbits.SRXMPT
267+ , SPI2STATbits.SPITBF
268+ , SPI2STATbits.SPIRBF
269+ );
270+ PDEBUG(sz);
271+#endif
272+ }
273+ }
274+
275+}
276+/*
184277 * main()
185278 */
186279 int main(int argc, char** argv) {
@@ -199,6 +292,8 @@ int main(int argc, char** argv) {
199292 /**** 割り込み禁止 ****/
200293 SET_CPU_IPL( 7 );
201294 __builtin_write_OSCCONL(OSCCON & 0xbf); //clear the bit 6 of OSCCONL to unlock Pin Re-map
295+ // 割り込みネストenable
296+ int_nest_enable();
202297
203298 // UART1ピン割り当て
204299 RPINR18bits.U1RXR = 6; // UART1 RX to RP6
@@ -226,13 +321,21 @@ int main(int argc, char** argv) {
226321 CLKDIV = 0; // CPU Peripheral Clock Ratio=1:1
227322 AD1PCFG = 0xFFFF; // AN1-12input pin = Digital mode
228323
229- // INT1(RP12 RB12) AD -DRDY0 Int enable
324+ // INT1(RP12 RB12) AD -DRDY0 setup
230325 RPINR0bits.INT1R = 12; // RP12(RB12)
326+ int1_int_disable();
231327 int1_level_set(4); // Int priority
232328 int1_edge_neg(); // Negative Edge
233- // INT0(RB7) GPS +PPS Int enable
329+ // INT0(RB7) GPS +PPS setup
330+ int0_int_disable();
234331 int0_level_set(4); // INT Priority
235332 int0_edge_pos(); // Positive Edge
333+ // ChangeNotification INT, CN20(RC8), SPI2(Overo) CS0
334+ cnint_int_disable();
335+ CNEN2bits.CN20IE = 1;
336+ CNPU2bits.CN20PUE = 1; // Pullup ON
337+ cnint_level_set(4);
338+
236339
237340 adint_cnt = 0;
238341 ad_cs_dis();
@@ -256,6 +359,8 @@ int main(int argc, char** argv) {
256359
257360 spi1_init();
258361 spi2_init();
362+ spi1_int_disable();
363+ spi2_int_disable();
259364
260365 PDEBUG("START\r\n");
261366 puts("START debug\r\n");
@@ -271,9 +376,9 @@ int main(int argc, char** argv) {
271376 // GPS UART1 受信割り込み許可
272377 uart1_rx_int_enable();
273378 uart1_set_int_level(4); // 割り込みレベル デフォルト4
274- // DataOut SPI2 割り込み許可
275-// spi2_int_enable();
276-// spi2_set_int_level(4);
379+ // DebugOut UART2 受信割り込み許可
380+ uart2_rx_int_enable();
381+ uart2_set_int_level(4); // 割り込みレベル デフォルト4
277382
278383 //**** 割り込み許可 **************************************************
279384 // CPU割り込み優先レベル デフォルト0 ペリフェラルはデフォルト4
@@ -317,6 +422,16 @@ int main(int argc, char** argv) {
317422 // INT0割り込み許可
318423 int0_intf_clear();
319424 int0_int_enable(); // Int enable
425+ // DataOut SPI2 割り込み許可しない CSのCN INTで許可するので
426+ spi2_intf_clear();
427+ spi2_set_int_level(4);
428+// spi2_int_enable();
429+ // ChangeNotification INT許可 SPI2(Overo) CS
430+ cnint_intf_clear();
431+ cnint_int_enable();
432+/****!!!!!!!!!!!!!!!!!!!!!!!!*/
433+// test_spi_flag();
434+test_spi_send();
320435
321436 while(1) {
322437 // GPSから受信してデコード
@@ -446,8 +561,8 @@ void __attribute__((interrupt, auto_psv)) _SPI1Interrupt(void)
446561 unsigned char c;
447562 long l;
448563
564+ spi1_intf_clear();
449565 c = spi1_getc();
450-// spi1_intf_clear();
451566 spi1_rx_overrun_clear();
452567 //spi1_int_disable();
453568 //ad_cs_dis();
@@ -514,20 +629,23 @@ void __attribute__((interrupt, auto_psv)) _SPI1Interrupt(void)
514629 * DataOut SPI2 Interrupt Handler
515630 * TX FIFOに1byteの空きが出来ると発生
516631 */
517-void __attribute__((interrupt, no_auto_psv)) _SPI2Interrupt(void)
518-{
519632 static unsigned char spi2c;
633+void __attribute__((interrupt, auto_psv)) _SPI2Interrupt(void)
634+{
520635 unsigned char rx;
521636 static unsigned int txlen = 512;
522-/*
637+ spi2_intf_clear();
638+#if 1
639+// static unsigned char c=0;
523640 while(!spi2_tx_fifo_is_full())
524- spi2_putc(c++);
641+ spi2_putc(spi2c++);
525642 while(!spi2_rx_fifo_is_empty()) {
526643 rx = spi2_getc();
527- if (rx == '$') c = 0;
644+// if (rx == '$') c = 0;
528645 }
529-*/
530-//spi2c = 123;
646+#endif
647+#if 0
648+ //spi2c = 123;
531649 // RX FIFOから読み出し
532650 // while(!spi2_rx_fifo_is_empty() || (!spi2_tx_fifo_is_full() && txlen > 0)) {
533651 while(!spi2_rx_fifo_is_empty()) {
@@ -546,6 +664,7 @@ static unsigned char spi2c;
546664 }
547665 }
548666 }
667+#endif
549668 // オーバーランエラーならばクリアする
550669 // spi2_rx_is_overrun()
551670 if (SPI2STATbits.SPIROV == 1) SPI2STATbits.SPIROV = 0;
@@ -553,31 +672,32 @@ static unsigned char spi2c;
553672 // TODO:Interrupt Flag@IEC Clear
554673 }
555674 /*
556-void test_ad1()
675+ * Overo SPI2 CS Input Change Notification
676+ * Interrupt Handler
677+ *
678+ */
679+#define SPI2CSpin (PORTCbits.RC8)
680+void __attribute__((interrupt, auto_psv)) _CNInterrupt(void)
557681 {
558- unsigned char in[3];
559- long l[6];
560- char cs;
561- while(!ad_is_drdy0_enable());
562-// PDEBUG("AD\r\n");
563- for(cs=0; cs<6; cs++) {
564- ad_cs(cs);
565- in[2] = ad_spi_rcv();
566- in[1] = ad_spi_rcv();
567- in[0] = ad_spi_rcv();
568- ad_cs_dis();
569- l[cs] = byte3_to_long(in);
570-// sprintf(sz, "%02X %02X %02X", in[2], in[1], in[0]);
571-// PDEBUG(sz);
572- }
573- for(cs=0; cs<6; cs++) {
574- sprintf(sz, "%+7ld,", l[cs]);
575- PDEBUG(sz);
576- }
577- PDEBUG("\r\n");
578-
682+ cnint_intf_clear();
683+ if (SPI2CSpin == 1) {
684+ // CS=H
685+ // SPI2割り込みOFF
686+ spi2_int_disable();
687+
688+ } else {
689+ // CS=L
690+ // SPI送信の一番最初なので
691+ spi2c = 0;
692+
693+// SPI2 RX FIFOクリア
694+// SPI2 TX FIFOクリア
695+// リングバッファ読み込み位置get?
696+// SPI2 TX FIFOに送信データ書き込み?
697+ // SPI2割り込みON
698+ spi2_int_enable();
699+ }
579700 }
580- */
581701 /*
582702 * CS0〜15順番にenable
583703 */
@@ -647,3 +767,29 @@ void test_spi2()
647767 // delay();
648768 }
649769 }
770+/*
771+void test_ad1()
772+{
773+ unsigned char in[3];
774+ long l[6];
775+ char cs;
776+ while(!ad_is_drdy0_enable());
777+// PDEBUG("AD\r\n");
778+ for(cs=0; cs<6; cs++) {
779+ ad_cs(cs);
780+ in[2] = ad_spi_rcv();
781+ in[1] = ad_spi_rcv();
782+ in[0] = ad_spi_rcv();
783+ ad_cs_dis();
784+ l[cs] = byte3_to_long(in);
785+// sprintf(sz, "%02X %02X %02X", in[2], in[1], in[0]);
786+// PDEBUG(sz);
787+ }
788+ for(cs=0; cs<6; cs++) {
789+ sprintf(sz, "%+7ld,", l[cs]);
790+ PDEBUG(sz);
791+ }
792+ PDEBUG("\r\n");
793+
794+}
795+ */
--- a/myint.h
+++ b/myint.h
@@ -4,16 +4,35 @@
44
55 #include <p24FJ64GA004.h>
66
7+#define int_nest_enable() INTCON1bits.NSTDIS = 0
8+#define int_nest_disable() INTCON1bits.NSTDIS = 1
9+
710 #define int0_intf_clear() IFS0bits.INT0IF = 0
8-#define int0_level_set(i) IPC0bits.INT0IP = i
11+#define int0_level_set(i) IPC0bits.INT0IP = (i)
912 #define int0_int_enable() IEC0bits.INT0IE = 1
13+#define int0_int_disable() IEC0bits.INT0IE = 0
1014 #define int0_edge_pos() INTCON2bits.INT0EP = 0
1115 #define int0_edge_neg() INTCON2bits.INT0EP = 1
1216
1317 #define int1_intf_clear() IFS1bits.INT1IF = 0
14-#define int1_level_set(i) IPC5bits.INT1IP = i
18+#define int1_level_set(i) IPC5bits.INT1IP = (i)
1519 #define int1_int_enable() IEC1bits.INT1IE = 1
20+#define int1_int_disable() IEC1bits.INT1IE = 0
1621 #define int1_edge_pos() INTCON2bits.INT1EP = 0
1722 #define int1_edge_neg() INTCON2bits.INT1EP = 1
1823
24+#define int2_intf_clear() IFS1bits.INT2IF = 0
25+#define int2_level_set(i) IPC7bits.INT2IP = (i)
26+#define int2_int_enable() IEC1bits.INT2IE = 1
27+#define int2_int_disable() IEC1bits.INT2IE = 0
28+#define int2_edge_pos() INTCON2bits.INT2EP = 0
29+#define int2_edge_neg() INTCON2bits.INT2EP = 1
30+
31+// Input Change Notification IFS1<3> IEC1<3> IPC4<14:12>
32+#define cnint_intf_clear() IFS1bits.CNIF = 0
33+#define cnint_level_set(i) IPC4bits.CNIP = (i)
34+#define cnint_int_enable() IEC1bits.CNIE = 1
35+#define cnint_int_disable() IEC1bits.CNIE = 0
36+
37+
1938 #endif
--- a/myspi.c
+++ b/myspi.c
@@ -58,9 +58,11 @@ int spi1_init(void)
5858
5959 }
6060 /*
61- DataOut SPI2 Init
62- Enhanced Buffer ON
63- Slave mode
61+ * DataOut SPI2 Init
62+ * Enhanced Buffer ON
63+ * Slave mode
64+ * SSpin enable
65+ * INT:
6466 */
6567 int spi2_init(void)
6668 {
--- a/myspi.h
+++ b/myspi.h
@@ -5,28 +5,30 @@
55 int spi1_init(void);
66 int spi2_init(void);
77
8-#define spi1_tx_fifo_is_full() (SPI1STATbits.SPITBF == 1) // true=full(Transmit not yet started, SPIxTXB is full)
9-#define spi1_rx_fifo_is_full() (SPI1STATbits.SPIRBF == 1) // true=full(Receive complete)
10-#define spi1_rx_fifo_is_empty() (SPI1STATbits.SRXMPT == 1) // true=empty, SRXMPT: Receive FIFO Empty bit (valid in Enhanced Buffer mode)
8+#define spi1_tx_fifo_is_full() (SPI1STATbits.SPITBF == 1) // true=full(Transmit not yet started, SPIxTXB is full)
9+#define spi1_rx_fifo_is_full() (SPI1STATbits.SPIRBF == 1) // true=full(Receive complete)
10+#define spi1_rx_fifo_is_empty() (SPI1STATbits.SRXMPT == 1) // true=empty, SRXMPT: Receive FIFO Empty bit (valid in Enhanced Buffer mode)
1111 #define spi1_rx_overrun_clear() SPI1STATbits.SPIROV = 0;
1212
1313 #define spi1_putc(c) SPI1BUF = (c & 0xFF)
1414 #define spi1_getc() (SPI1BUF & 0xFF)
1515
1616 #define spi1_set_int_level(i) IPC2bits.SPI1IP = (i)
17-#define spi1_int_enable() IEC0bits.SPI1IE = 1
17+#define spi1_int_enable() IEC0bits.SPI1IE = 1
1818 #define spi1_int_disable() IEC0bits.SPI1IE = 0
1919 #define spi1_intf_clear() IFS0bits.SPI1IF = 0
2020
21-#define spi2_tx_fifo_is_full() (SPI2STATbits.SPITBF == 1) // true=full
22-#define spi2_rx_fifo_is_full() (SPI2STATbits.SPIRBF == 1) // true=full
23-#define spi2_rx_fifo_is_empty() (SPI2STATbits.SRXMPT == 1) // true=empty
21+#define spi2_tx_fifo_is_full() (SPI2STATbits.SPITBF == 1) // true=full
22+#define spi2_rx_fifo_is_full() (SPI2STATbits.SPIRBF == 1) // true=full
23+#define spi2_rx_fifo_is_empty() (SPI2STATbits.SRXMPT == 1) // true=empty
24+#define spi2_rx_overrun_clear() SPI2STATbits.SPIROV = 0;
2425
2526 #define spi2_putc(c) SPI2BUF = (c & 0xFF)
26-#define spi2_getc() (SPI2BUF & 0xFF)
27+#define spi2_getc() (SPI2BUF & 0xFF)
2728
2829 #define spi2_set_int_level(i) IPC8bits.SPI2IP = (i)
29-#define spi2_int_enable() IEC2bits.SPI2IE = 1
30+#define spi2_int_enable() IEC2bits.SPI2IE = 1
31+#define spi2_int_disable() IEC2bits.SPI2IE = 0
3032 #define spi2_intf_clear() IFS2bits.SPI2IF = 0
3133
3234 #endif
--- a/myuart.c
+++ b/myuart.c
@@ -5,6 +5,11 @@
55 static unsigned char ubx_w, ubx_r;
66 static unsigned char ubx_buf[256];
77
8+// UART2
9+#define UART2_BUFF_SIZE 16
10+static unsigned char uart2_w, uart2_r;
11+static unsigned char uart2_buf[UART2_BUFF_SIZE];
12+
813 void __attribute__((interrupt, no_auto_psv)) _U1RXInterrupt(void)
914 {
1015 // 割り込みフラグクリア
@@ -14,6 +19,17 @@ void __attribute__((interrupt, no_auto_psv)) _U1RXInterrupt(void)
1419 }
1520 if (U1STAbits.OERR == 1) U1STAbits.OERR = 0;
1621 }
22+void __attribute__((interrupt, no_auto_psv)) _U2RXInterrupt(void)
23+{
24+ // 割り込みフラグクリア
25+ uart2_rx_intf_clear();
26+ while(uart2_rx_is_rdy()) {
27+ uart2_buf[uart2_w++] = uart2_getc();
28+ if (uart2_w >= UART2_BUFF_SIZE) uart2_w = 0;
29+ }
30+ if (U2STAbits.OERR == 1) U2STAbits.OERR = 0;
31+}
32+// polling send
1733 void uart1_puts(char *s)
1834 {
1935 while(*s != 0) {
@@ -28,28 +44,57 @@ void uart2_puts(char *s)
2844 U2TXREG = *s++;
2945 }
3046 }
47+void uart1_myputc(char c)
48+{
49+ while(uart1_tx_is_full());
50+ U1TXREG = c;
51+}
52+void uart2_myputc(char c)
53+{
54+ while(uart2_tx_is_full());
55+ U2TXREG = c;
56+}
3157 /*
32-return 0=なし 1=あり
58+ * 受信バッファにデータあるか?
59+ * return 0=なし 1=あり
3360 */
3461 int uart1_rcvbuf_is_data(void)
3562 {
3663 if (ubx_r == ubx_w) return 0;
3764 return 1;
3865 }
66+int uart2_rcvbuf_is_data(void)
67+{
68+ if (uart2_r == uart2_w) return 0;
69+ return 1;
70+}
3971 /*
40- return データ -1=データ無し
72+ * 受信バッファから1byte get
73+ * return データ -1=データ無し
4174 */
4275 int uart1_rcvbuf_getc(void)
4376 {
4477 if (ubx_r == ubx_w) return -1;
4578 return ubx_buf[ubx_r++];
4679 }
80+int uart2_rcvbuf_getc(void)
81+{
82+ int out;
83+ if (uart2_r == uart2_w) return -1;
84+ out = uart2_buf[uart2_r++];
85+ if (uart2_r >= UART2_BUFF_SIZE) uart2_r = 0;
86+ return out;
87+}
4788
4889 void uart1_rcvbuf_clear(void)
4990 {
5091 ubx_r = ubx_w;
5192 }
5293
94+void uart2_rcvbuf_clear(void)
95+{
96+ uart2_r = uart2_w;
97+}
5398 void uart1_init(unsigned int mode, unsigned int sts, unsigned int baud)
5499 {
55100 U1MODE = mode;
@@ -63,4 +108,6 @@ void uart2_init(unsigned int mode, unsigned int sts, unsigned int baud)
63108 U2MODE = mode;
64109 U2STA = sts;
65110 U2BRG = baud;
111+ uart2_w = 0;
112+ uart2_r = 0;
66113 }
--- a/myuart.h
+++ b/myuart.h
@@ -31,10 +31,15 @@
3131
3232 void uart1_puts(char *s);
3333 void uart2_puts(char *s);
34+void uart1_myputc(char c);
35+void uart2_myputc(char c);
3436
3537 int uart1_rcvbuf_is_data(void);
38+int uart2_rcvbuf_is_data(void);
3639 int uart1_rcvbuf_getc(void);
40+int uart2_rcvbuf_getc(void);
3741 void uart1_rcvbuf_clear(void);
42+void uart2_rcvbuf_clear(void);
3843
3944 void uart1_init(unsigned int mode, unsigned int sts, unsigned int baud);
4045 void uart2_init(unsigned int mode, unsigned int sts, unsigned int baud);
--- a/nbproject/Makefile-default.mk
+++ b/nbproject/Makefile-default.mk
@@ -22,10 +22,10 @@ CP=cp
2222 CND_CONF=default
2323 ifeq ($(TYPE_IMAGE), DEBUG_RUN)
2424 IMAGE_TYPE=debug
25-FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/ad2010.${IMAGE_TYPE}.out
25+FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/cpu2010.${IMAGE_TYPE}.out
2626 else
2727 IMAGE_TYPE=production
28-FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/ad2010.${IMAGE_TYPE}.out
28+FINAL_IMAGE=dist/${CND_CONF}/${IMAGE_TYPE}/cpu2010.${IMAGE_TYPE}.out
2929 endif
3030
3131 # Object Directory
@@ -70,7 +70,7 @@ MP_AR_DIR="/opt/microchip/mplabc30/v3.30c/bin"
7070 # MP_BC_DIR is not defined
7171
7272 .build-conf: ${BUILD_SUBPROJECTS}
73- ${MAKE} -f nbproject/Makefile-default.mk dist/${CND_CONF}/${IMAGE_TYPE}/ad2010.${IMAGE_TYPE}.out
73+ ${MAKE} -f nbproject/Makefile-default.mk dist/${CND_CONF}/${IMAGE_TYPE}/cpu2010.${IMAGE_TYPE}.out
7474
7575 MP_PROCESSOR_OPTION=24FJ64GA004
7676 MP_LINKER_FILE_OPTION=,-Tp24FJ64GA004.gld
@@ -203,14 +203,14 @@ endif
203203 # ------------------------------------------------------------------------------------
204204 # Rules for buildStep: link
205205 ifeq ($(TYPE_IMAGE), DEBUG_RUN)
206-dist/${CND_CONF}/${IMAGE_TYPE}/ad2010.${IMAGE_TYPE}.out: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
206+dist/${CND_CONF}/${IMAGE_TYPE}/cpu2010.${IMAGE_TYPE}.out: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
207207 @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE}
208- ${MP_CC} $(MP_EXTRA_LD_PRE) -omf=elf -mcpu=$(MP_PROCESSOR_OPTION) -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -o dist/${CND_CONF}/${IMAGE_TYPE}/ad2010.${IMAGE_TYPE}.out ${OBJECTFILES_QUOTED_IF_SPACED} -Wl,--defsym=__MPLAB_BUILD=1,--heap=40,--no-check-sections$(MP_EXTRA_LD_POST)$(MP_LINKER_FILE_OPTION),--defsym=__MPLAB_DEBUG=1,--defsym=__ICD2RAM=1,--defsym=__DEBUG=1,--defsym=__MPLAB_DEBUGGER_ICD3=1
208+ ${MP_CC} $(MP_EXTRA_LD_PRE) -omf=elf -mcpu=$(MP_PROCESSOR_OPTION) -D__DEBUG -D__MPLAB_DEBUGGER_ICD3=1 -o dist/${CND_CONF}/${IMAGE_TYPE}/cpu2010.${IMAGE_TYPE}.out ${OBJECTFILES_QUOTED_IF_SPACED} -Wl,--defsym=__MPLAB_BUILD=1,--heap=40,--no-check-sections$(MP_EXTRA_LD_POST)$(MP_LINKER_FILE_OPTION),--defsym=__MPLAB_DEBUG=1,--defsym=__ICD2RAM=1,--defsym=__DEBUG=1,--defsym=__MPLAB_DEBUGGER_ICD3=1
209209 else
210-dist/${CND_CONF}/${IMAGE_TYPE}/ad2010.${IMAGE_TYPE}.out: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
210+dist/${CND_CONF}/${IMAGE_TYPE}/cpu2010.${IMAGE_TYPE}.out: ${OBJECTFILES} nbproject/Makefile-${CND_CONF}.mk
211211 @${MKDIR} dist/${CND_CONF}/${IMAGE_TYPE}
212- ${MP_CC} $(MP_EXTRA_LD_PRE) -omf=elf -mcpu=$(MP_PROCESSOR_OPTION) -o dist/${CND_CONF}/${IMAGE_TYPE}/ad2010.${IMAGE_TYPE}.out ${OBJECTFILES_QUOTED_IF_SPACED} -Wl,--defsym=__MPLAB_BUILD=1,--heap=40,--no-check-sections$(MP_EXTRA_LD_POST)$(MP_LINKER_FILE_OPTION)
213- ${MP_CC_DIR}/pic30-bin2hex dist/${CND_CONF}/${IMAGE_TYPE}/ad2010.${IMAGE_TYPE}.out -omf=elf
212+ ${MP_CC} $(MP_EXTRA_LD_PRE) -omf=elf -mcpu=$(MP_PROCESSOR_OPTION) -o dist/${CND_CONF}/${IMAGE_TYPE}/cpu2010.${IMAGE_TYPE}.out ${OBJECTFILES_QUOTED_IF_SPACED} -Wl,--defsym=__MPLAB_BUILD=1,--heap=40,--no-check-sections$(MP_EXTRA_LD_POST)$(MP_LINKER_FILE_OPTION)
213+ ${MP_CC_DIR}/pic30-bin2hex dist/${CND_CONF}/${IMAGE_TYPE}/cpu2010.${IMAGE_TYPE}.out -omf=elf
214214 endif
215215
216216
--- a/nbproject/Makefile-genesis.properties
+++ b/nbproject/Makefile-genesis.properties
@@ -1,5 +1,5 @@
11 #
2-#Mon Nov 28 11:11:47 JST 2011
2+#Sat Dec 03 14:49:06 JST 2011
33 default.languagetoolchain.dir=/opt/microchip/mplabc30/v3.30c/bin
44 com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=11bb82e71763925c87fa30f6c65473b1
55 default.languagetoolchain.version=3_30
--- a/nbproject/Makefile-impl.mk
+++ b/nbproject/Makefile-impl.mk
@@ -24,7 +24,7 @@ CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}}
2424
2525
2626 # Project Name
27-PROJECTNAME=ad2010
27+PROJECTNAME=cpu2010
2828
2929 # Active Configuration
3030 DEFAULTCONF=default
--- a/nbproject/Makefile-variables.mk
+++ b/nbproject/Makefile-variables.mk
@@ -6,8 +6,8 @@
66 CND_BASEDIR=`pwd`
77 # default configuration
88 CND_ARTIFACT_DIR_default=dist/default/production
9-CND_ARTIFACT_NAME_default=ad2010.production.out
10-CND_ARTIFACT_PATH_default=dist/default/production/ad2010.production.out
9+CND_ARTIFACT_NAME_default=cpu2010.production.out
10+CND_ARTIFACT_PATH_default=dist/default/production/cpu2010.production.out
1111 CND_PACKAGE_DIR_default=${CND_DISTDIR}/default/package
12-CND_PACKAGE_NAME_default=ad2010.tar
13-CND_PACKAGE_PATH_default=${CND_DISTDIR}/default/package/ad2010.tar
12+CND_PACKAGE_NAME_default=cpu2010.tar
13+CND_PACKAGE_PATH_default=${CND_DISTDIR}/default/package/cpu2010.tar
--- a/nbproject/Package-default.bash
+++ b/nbproject/Package-default.bash
@@ -10,9 +10,9 @@ CND_CONF=default
1010 CND_DISTDIR=dist
1111 TMPDIR=build/${CND_CONF}/${IMAGE_TYPE}/tmp-packaging
1212 TMPDIRNAME=tmp-packaging
13-OUTPUT_PATH=dist/${CND_CONF}/${IMAGE_TYPE}/ad2010.${IMAGE_TYPE}.out
14-OUTPUT_BASENAME=ad2010.${IMAGE_TYPE}.out
15-PACKAGE_TOP_DIR=ad2010/
13+OUTPUT_PATH=dist/${CND_CONF}/${IMAGE_TYPE}/cpu2010.${IMAGE_TYPE}.out
14+OUTPUT_BASENAME=cpu2010.${IMAGE_TYPE}.out
15+PACKAGE_TOP_DIR=cpu2010/
1616
1717 # Functions
1818 function checkReturnCode
@@ -57,15 +57,15 @@ mkdir -p ${TMPDIR}
5757
5858 # Copy files and create directories and links
5959 cd "${TOP}"
60-makeDirectory ${TMPDIR}/ad2010/bin
60+makeDirectory ${TMPDIR}/cpu2010/bin
6161 copyFileToTmpDir "${OUTPUT_PATH}" "${TMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755
6262
6363
6464 # Generate tar file
6565 cd "${TOP}"
66-rm -f ${CND_DISTDIR}/${CND_CONF}/package/ad2010.tar
66+rm -f ${CND_DISTDIR}/${CND_CONF}/package/cpu2010.tar
6767 cd ${TMPDIR}
68-tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/package/ad2010.tar *
68+tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/package/cpu2010.tar *
6969 checkReturnCode
7070
7171 # Cleanup
--- a/nbproject/configurations.xml
+++ b/nbproject/configurations.xml
@@ -186,14 +186,14 @@
186186 <property key="TIMER4" value="true"/>
187187 <property key="TIMER3" value="true"/>
188188 <property key="SPI 2" value="true"/>
189- <property key="SPI 1" value="true"/>
190189 <property key="TIMER2" value="true"/>
190+ <property key="SPI 1" value="true"/>
191191 <property key="TIMER1" value="true"/>
192192 <property key="CRC" value="true"/>
193193 <property key="I2C2" value="true"/>
194194 <property key="I2C1" value="true"/>
195- <property key="programoptions.preserveprogramrange.end" value="0xff"/>
196195 <property key="Freeze All Other Peripherals" value="true"/>
196+ <property key="programoptions.preserveprogramrange.end" value="0xff"/>
197197 </ICD3PlatformTool>
198198 </conf>
199199 </confs>
--- a/nbproject/project.xml
+++ b/nbproject/project.xml
@@ -3,7 +3,7 @@
33 <type>com.microchip.mplab.nbide.embedded.makeproject</type>
44 <configuration>
55 <data xmlns="http://www.netbeans.org/ns/make-project/1">
6- <name>AD2010</name>
6+ <name>CPU2010</name>
77 <make-project-type>0</make-project-type>
88 <c-extensions>c</c-extensions>
99 <cpp-extensions/>
Show on old repository browser