Jump to content
Sign in to follow this  
mramos

Program Works In Ide, Not In Mplabs

Recommended Posts

I have a program that works in the IDE.

 

I modded the files so I have the SouceBASIC in the MPLABS and loaded it. I see the program, all looks good.. Then if I build it, I get this error:

 

Clean: Deleting intermediary and output files.
Clean: Deleted file "D:\pic\sbasic\ldr675office.mcs".
Clean: Done.
Executing: "C:\Program Files\SourceBoost\boostbasic.pic16.exe" ldr675office.bas -O1  -W1  -t 12F675
BoostBasic Optimizing Basic Compiler Version 6.60 Beta (for PIC16 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2006 Pavel Baranov
Copyright(C) 2004-2006 David Hobday

Beta version. No limitations. Expire date: 2007.05.01


ldr675office.bas
D:\pic\sbasic\ldr675office.bas(7): warning: unknown or invalid pragma (ignored)
D:\pic\sbasic\ldr675office.bas(11): error: missing fixed address

failure
BUILD FAILED: Fri Mar 23 14:08:09 2007

Share this post


Link to post
Share on other sites

mramos,

I have a program that works in the IDE.

 

I modded the files so I have the SouceBASIC in the MPLABS and loaded it.  I see the program, all looks good..  Then if I build it, I get this error: 

 

Clean: Deleting intermediary and output files.
Clean: Deleted file "D:\pic\sbasic\ldr675office.mcs".
Clean: Done.
Executing: "C:\Program Files\SourceBoost\boostbasic.pic16.exe" ldr675office.bas -O1  -W1  -t 12F675
BoostBasic Optimizing Basic Compiler Version 6.60 Beta (for PIC16 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2006 Pavel Baranov
Copyright(C) 2004-2006 David Hobday

Beta version. No limitations. Expire date: 2007.05.01


ldr675office.bas
D:\pic\sbasic\ldr675office.bas(7): warning: unknown or invalid pragma (ignored)
D:\pic\sbasic\ldr675office.bas(11): error: missing fixed address

failure
BUILD FAILED: Fri Mar 23 14:08:09 2007

What code is on the lines in question (lines 7 and 11) ?

 

Regards

Dave

Share this post


Link to post
Share on other sites
What code is on the lines in question (lines 7 and 11) ?

 

 

7 = #pragma DATA _CONFIG, _WDT_OFF & _CP_OFF & _PWRTE_OFF

 

11 = dim ldr@GPIO.0 as bit

 

Any help? It works in the IDE. Is there a release coming soon that will hook into MPLABS? I would really like to debug in BASIC and program via MPLABS.

 

Thanks

Share this post


Link to post
Share on other sites

Well, it has been some time now and no response?

 

Did Boost BASIC get parked? Or is there a release close (my hopes) and everyone if busy working on it?

 

No one has answered my post and it has been some time.

Share this post


Link to post
Share on other sites

mramos,

No one has answered my post and it has been some time.

Thanks for bumping this topic.

 

 

Using SourceBoost package V6.70 with the BoostBasic compiler selected in MPLABs this code compiles and links:

#include <basic/system.bas>

#pragma DATA _CONFIG, _WDT_OFF & _CP_OFF & _PWRTE_OFF

dim ldr@GPIO.0 as bit

sub main()

end sub

 

Compiler output:

Clean: Deleting intermediary and output files.

Clean: Deleted file "testbas.OBJ".

Clean: Deleted file "C:\C2C_work\CVS_sandbox\compiler\picantc\test\dhTest\test\testbas.HEX".

Clean: Done.

Executing: "C:\Program Files\SourceBoost\boostbasic.pic16.exe" testbas.bas -O1  -W1  -t 12F629

BoostBasic Optimizing Basic Compiler Version 6.70 Beta (for PIC16 architecture)

http://www.sourceboost.com

Copyright© 2004-2007 Pavel Baranov

Copyright© 2004-2007 David Hobday

 

Beta version. No limitations. Expire date: 2007.08.01

 

 

testbas.bas

 

success

Executing: "C:\Program Files\SourceBoost\boostlink.pic.exe"  "C:\C2C_work\CVS_sandbox\compiler\picantc\test\dhTest\test\testbas.obj" -O1  -p "testbas" -t 12F629

BoostLink Optimizing Linker Version 6.70

http://www.sourceboost.com

Copyright© 2004-2007 Pavel Baranov

Copyright© 2004-2007 David Hobday

 

 

Optimisation level:1

Building CASM file

 

Memory Usage Report

===================

RAM available:64 bytes, used:0 bytes (0.0%), free:64 bytes (100.0%),

Heap size:64 bytes, Heap max single alloc:63 bytes

ROM available:1024 words, used:5 words (0.5%), free:1019 words (99.5%)

 

 

success

Loaded C:\C2C_work\CVS_sandbox\compiler\picantc\test\dhTest\test\testbas.COF.

BUILD SUCCEEDED: Sun Apr 15 14:54:28 2007

 

Regards

Dave

Share this post


Link to post
Share on other sites

mramos,

No one has answered my post and it has been some time.

Thanks for bumping this topic.

 

 

Using SourceBoost package V6.70 with the BoostBasic compiler selected in MPLABs this code compiles and links:

#include <basic/system.bas>

#pragma DATA _CONFIG, _WDT_OFF & _CP_OFF & _PWRTE_OFF

dim ldr@GPIO.0 as bit

sub main()

end sub

 

That seemed to work?

 

 

Clean: Deleting intermediary and output files.

Clean: Deleted file "D:\pic\sbasic\davetest.mcs".

Clean: Done.

Executing: "C:\Program Files\SourceBoost\boostbasic.pic16.exe" testdave.bas -O1 -W1 -t 12F675

BoostBasic Optimizing Basic Compiler Version 6.60 Beta (for PIC16 architecture)

http://www.sourceboost.com

Copyright© 2004-2006 Pavel Baranov

Copyright© 2004-2006 David Hobday

 

Beta version. No limitations. Expire date: 2007.05.01

 

 

testdave.bas

 

success

Executing: "C:\Program Files\SourceBoost\boostlink.pic.exe" "D:\pic\sbasic\testdave.obj" -O1 -p "davetest" -t 12F675

BoostLink Optimizing Linker Version 6.60

http://www.sourceboost.com

Copyright© 2004-2006 Pavel Baranov

Copyright© 2004-2006 David Hobday

 

 

Optimisation level:1

Building CASM file

 

Memory Usage Report

===================

RAM available:64 bytes, used:0 bytes (0.0%), free:64 bytes (100.0%),

Heap size:64 bytes, Heap max single alloc:63 bytes

ROM available:1024 words, used:7 words (0.7%), free:1017 words (99.3%)

 

 

Successful

Loaded D:\pic\sbasic\davetest.COF.

BUILD SUCCEEDED: Thu Apr 19 20:20:43 2007

Share this post


Link to post
Share on other sites

The code that fails

 

' LDR on GPIO0
' LED on GPIO1
' RELAY on GPIO2
'
'#pragma DATA _CONFIG, _WDT_OFF & _CP_OFF & _PWRTE_OFF
'#pragma CLOCK_FREQ 4000000
'#pragma OPTIMIZE "0"
' init ADC port
dim ldr@GPIO.0 as bit
dim led@GPIO.1 as bit
dim relay@GPIO.2 as bit
dim a as char

sub adc_init()
trisio  = 00000001b          'pin A0 is for analog input
'	adcon1 = 10001110b           'setting for only AN0 and ref of vss and vdd, Fosc/8
adcon0 = 01000001b           'setting for channel AN0 and Fosc/8 for 4Mhz, start AD
end sub
' read ADC port

function adc_read() as byte
adcon0.2 = 1
call delay_ms(1)
adcon0.2 = 0
call delay_ms(1)
adc_read = adresl
end function

' MAIN
Sub main()
   trisio = ( 00000001b )       'pin A0 as input for analog input
   call adc_init()              'initialize the adc port
   
   Do while 1 
	a = call adc_read()
	if a < 50 then
	   relay = 0
	else
	   relay = 1
	end if
	led=1					'light LED					
       call delay_ms(500)      'delay to take readings after 1/2 seconds
	led = 0 				'off LED
       call delay_ms(500)      'delay to take readings after 1/2 seconds
   Loop
end Sub

Share this post


Link to post
Share on other sites

mramos,

The code that fails

....

Add to the top of the source file:

#include <basic/system.bas>

 

Regards

Dave

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...