I have been programming 627/628 for a while: linux sdcc k8048 board.
Does what I want.

Moved up to 4520 and the velleman 8076.  Cant even get a simple program to run. 
 
So I tried to set up internal osc with output on RA6 so I can get a scope 
involved.
No clock appears when I apply power.
 [r...@malone 4520]# sdcc -v
 SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.5.6 
#1249 (Nov 29 2009) (UNIX)

Config data:
 [r...@malone 4520]# k16 c
 [300000] [CONFIG1] c900
 [300002] [CONFIG2] 1e19
 [300004] [CONFIG3] 8500
 [300006] [CONFIG4] 0084
 [300008] [CONFIG5] c00f
 [30000A] [CONFIG6] e00f
 [30000C] [CONFIG7] 400f
 
 [CONFIG_1H]
         [OSCCEN] Enabled
         [FOSC3:FOSC0] 1001 INT RC CLKOUT
 
 [CONFIG_2L]
         [BORV1:BORV0] 2.7V
         [BOREN] Disabled
         [PWRTEN] Disabled
 
 [CONFIG_2H]
         [WDTP2:WDTP0] 1:128
         [WDTEN] Disabled
 
 [CONFIG_3H]
         [CCP2MX] RC1
 
 [CONFIG_4L]
         [DEBUG] Disabled
         [LVP] Enabled
         [STVREN] Disabled
 
 [CONFIG_5L]     [CP3]   Off     [CP2]   Off     [CP1]   Off     [CP0]   Off
 [CONFIG_5H]     [CPD]   Off     [CPB]   Off
 [CONFIG_6L]     [WRT3]  Off     [WRT2]  Off     [WRT1]  Off     [WRT0]  Off
 [CONFIG_6H]     [WRTD]  Off     [WRTB]  Off     [WRTC]  Off
 [CONFIG_7L]     [EBTR3] Off     [EBTR2] Off     [EBTR1] Off     [EBTR0] Off
 [CONFIG_7H]     [EBTRB] Off
---------
Anything obvious I have forgotten?
The beginning of the program does:
void main(void)
{
        OSCCON=2; //??
        ADCON0=0;
        TRISB=0x00;     // PORTB all outputs.
        PORTB=0xFF;     // Output a led.
        INTCON=0x0; // no interrupts
        CMCON = 0x07;   /** Disable comparators.  NEEDED FOR NORMAL PORTA
                         *  BEHAVIOR ON PIC16f628a!
                         */

The k16 v matches the k16 p

I did try to rid myself of the libraries etc and just vector to main
(prior to looking for the clock signal) - but it was no better - hence the
walk into  h/w debug!

 [r...@malone 4520]# sh stage2 test
 + "/usr/local/bin/sdcpp" -nostdinc -Wall -std=c99 -Dpic18f4520 -D__18f4520 
-DSTACK_MODEL_SMALL -obj-ext=.o -DSDCC_MODEL_SMALL -DSDCC=256 -DSDCC_pic16 
-D__pic16 -I"/usr/local/bin/../share/sdcc/include/pic16" 
-I"/usr/local/share/sdcc/include/pic16"  "./test.c"
 + "/usr/local/bin/gpasm" -DSDCC_MODEL_SMALL -Dpic18f4520 -D__18F4520 
-DSTACK_MODEL_SMALL -c "test.asm" -o "test.o"
 + "/usr/local/bin/gplink" -I"/usr/local/bin/../share/sdcc/lib/pic16" 
-I"/usr/local/share/sdcc/lib/pic16"   -o test test.o  crt0i.o pic18f4520.lib 
libsdcc.lib
 warning: processor mismatch in 
"/usr/local/bin/../share/sdcc/lib/pic16/crt0i.o"message: using default linker 
script "/usr/local/share/gputils/lkr/18f4520.lkr"warning: processor mismatch in 
"pic18f4520.o"
 
  
  
  Any input (or should that be output!) much appreciated ;-)
  
  -- 
  This email and any attached files are confidential and copyright protected.
  If you are not the addressee, any dissemination of this communication is
  strictly prohibited. Unless otherwise expressly agreed in writing, nothing
  stated in this communication shall be legally binding.
  

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to