mramos 0 Posted February 5, 2007 Report Share Posted February 5, 2007 Dave, I see the CASM is a LST file with the commented BoostBASIC lines in it. I wrote a Win32 program that will take the CASM and move the comments to the .ASM file (sub main only right now, the full version is about done, I have to do functions and subs as multipasses since they are in reverse order in the .CASM file from the BoostBASIC). I load in MPLABS and see my lines with the ASM. I love it.. Anyway, it states you can do Source level debugging in MPLABS with BoostC. I went to do that and do not see BoostC in the MPLABS list or BoostBASIC either as a compiler interface. Can I do Source level debugging with BoostBASIC (my goal)? If so, did the Boost installer not tell MLPABS I loaded Boost? Also, can I see the ASM as well, that helps me see mistakes as well. If I can get that working, I will get the externs working to call the C libs. And pulls in the link libs I need. Thanks for the help. I hope you guys work on the BASIC soon. It is great syntax wise.. Thanks again Dave and gang. Quote Link to post Share on other sites
Dave 0 Posted February 6, 2007 Report Share Posted February 6, 2007 Dave, I see the CASM is a LST file with the commented BoostBASIC lines in it. I wrote a Win32 program that will take the CASM and move the comments to the .ASM file(sub main only right now, the full version is about done, I have to do functions and subs as multipasses since they are in reverse order in the .CASM file from the BoostBASIC). The end result sounds like the CASM file which contains source and ASM interleaved, so I don't quite understand what this is for? I load in MPLABS and see my lines with the ASM. I love it.. Anyway, it states you can do Source level debugging in MPLABS with BoostC. I went to do that and do not see BoostC in the MPLABS list or BoostBASIC either as a compiler interface. Can I do Source level debugging with BoostBASIC (my goal)? If so, did the Boost installer not tell MLPABS I loaded Boost? Also, can I see the ASM as well, that helps me see mistakes as well. If I can get that working, I will get the externs working to call the C libs. And pulls in the link libs I need. Thanks for the help. I hope you guys work on the BASIC soon. It is great syntax wise.. Thanks again Dave and gang. <{POST_SNAPBACK}> Maybe I get it now, you are assembling the code under MPLABs, so you want an ASM file with commented source code? Regards Dave Quote Link to post Share on other sites
mramos 0 Posted February 8, 2007 Author Report Share Posted February 8, 2007 (edited) Dave, I see the CASM is a LST file with the commented BoostBASIC lines in it. I wrote a Win32 program that will take the CASM and move the comments to the .ASM file(sub main only right now, the full version is about done, I have to do functions and subs as multipasses since they are in reverse order in the .CASM file from the BoostBASIC). The end result sounds like the CASM file which contains source and ASM interleaved, so I don't quite understand what this is for? I load in MPLABS and see my lines with the ASM. I love it.. Anyway, it states you can do Source level debugging in MPLABS with BoostC. I went to do that and do not see BoostC in the MPLABS list or BoostBASIC either as a compiler interface. Can I do Source level debugging with BoostBASIC (my goal)? If so, did the Boost installer not tell MLPABS I loaded Boost? Also, can I see the ASM as well, that helps me see mistakes as well. If I can get that working, I will get the externs working to call the C libs. And pulls in the link libs I need. Thanks for the help. I hope you guys work on the BASIC soon. It is great syntax wise.. Thanks again Dave and gang. <{POST_SNAPBACK}> Maybe I get it now, you are assembling the code under MPLABs, so you want an ASM file with commented source code? Regards Dave <{POST_SNAPBACK}> Right. The CASM is a list file .LST. I want get the ASM file with the source commented and bring it in MPLABS and work from there. I know I miss the linker, but with no real SourceBASIC libs, that is not a problem. Is there a way to make the ASM with the BASIC lines commented? OR is there a hook to make MPLABS take the SourceBASIC in and use it. Even better, then I can do the externs to the C libs. Edited February 10, 2007 by mramos Quote Link to post Share on other sites
mramos 0 Posted February 10, 2007 Author Report Share Posted February 10, 2007 Dave? Did you see my last post? Can I use BoostBASIC native in MPLABS? Quote Link to post Share on other sites
Dave 0 Posted February 10, 2007 Report Share Posted February 10, 2007 mramos, Dave? Did you see my last post? Can I use BoostBASIC native in MPLABS? <{POST_SNAPBACK}> Its not currently support, and there are a few problems to. SourceBoost IDE generates a _.bas file that is the file actually compiled by the BoostBasic compiler. With MPLABs it won't do that. Anyway here is the hack, please note this stops the BoostC compiler from working as it redirects the compiler used to be the BoostBasic one: 1) Install SourceBoost package and use integrate with MPLAB option. 1a) Create a BoostBasic project in SourceBoost IDE, and click compile to generate the _.bas file. 2) Open the C:\Program Files\Microchip\MPLAB IDE\Core\MTC Suites (this assumes standard installation path used). 3) Open boostc.mtc in a text editor. 4) Replace: SourceExtension=C HeaderExtension=H with: SourceExtension=BAS HeaderExtension=BAS 5) Save .mtc file 6) Open tlboostc.ini in a text editor 5) Replace Source=C Header=H with: Source=BAS Header=BAS 6) Save .ini file 6a) Repeat steps 3 to 6 with boostc18.mtc and tlboostc18.ini for PIC18 support. 7) Run up MPLAB and Create a new project (suggest in the same location as you BoostBasic project). 8) Select Language Toolsuit "BoostC Compiler for PIC16". 9) Set the Boostc Compiler location to C:\Program Files\SourceBoost\boostbasic.pic16.exe 10) Set the BoostLink linker location to C:\Program Files\SourceBoost\boostlink.pic.exe 10a) Repeat Steps 8,9,10 for PIC18 if PIC18 support required. 11) Write click on the source files folder and select filters, add *.bas to the filter list. 12) Add the desired _.bas file to the project. 13) Compiler and source level debug in MPLAB. If you add files to the project you will need to do this in SourceBoost IDE so it re-generates the _.bas file. Hopefully I don't foget anything This is a total hack, so use at your own risk !! Regards Dave Quote Link to post Share on other sites
mramos 0 Posted February 12, 2007 Author Report Share Posted February 12, 2007 (edited) Dave, I did not see the .mtc files in MPLABS IDE directory. Also when I go in MPLABS I do not see BoostC or BASIC, I see the others though. So I reinstalled and it still is not there. I searched the drive and found the .mtc files in Program Files\SourceBoost\mplab Also, on a side note, I have done a couple of programs in BoostBASIC and I do not have any _.bas files. I do have an .__c files though. Edited February 12, 2007 by mramos Quote Link to post Share on other sites
Dave 0 Posted February 12, 2007 Report Share Posted February 12, 2007 I did not see the .mtc files in MPLABS IDE directory. Also when I go in MPLABS I do not see BoostC or BASIC, I see the others though. So I reinstalled and it still is not there. I searched the drive and found the .mtc files in Program Files\SourceBoost\mplab Sounds like the MPLAB integration process during installations is not happening. Are you pressing the integrate button? Is the MicroChip directory correctly selecct (before pressing the integrate button)? Also, on a side note, I have done a couple of programs in BoostBASIC and I do not have any _.bas files. I do have an .__c files though. <{POST_SNAPBACK}> The _.bas file is only created when you start the BoostBasic project build under SourceBoost IDE. Regards Dave Quote Link to post Share on other sites
mramos 0 Posted February 18, 2007 Author Report Share Posted February 18, 2007 Dave, just had time to play.. This is going to me cool if I can run the ICD2 with BoostBASIC.. I did not see the integrate button the first time, got that part. Moded the .mts and .ini files Created a project and pointed the compiler and linker, opened a project and all looks good.. When I build I get a parameter error.. I made the project in MPLABS, not BoostBASIC IDE.. Clean: Deleting intermediary and output files. Clean: Done. Executing: "C:\Program Files\SourceBoost\boostbasic.pic16.exe" -O1 -p "ldr675office" -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 warning: unrecognized command line agrument '-p', skipped ldr675office FATAL: Unable to open input file: D:\pic\sbasic\ldr675office Error: preprocessing error failure Link step failed. BUILD FAILED: Sun Feb 18 10:00:56 2007 Quote Link to post Share on other sites
mramos 0 Posted February 18, 2007 Author Report Share Posted February 18, 2007 (edited) Dave, I notice the compiler and linker were flipped. Flipped them to normal. Probably me excited setting it up. Also, the linker is first in the pull down list? It is possible it is running the linker first. I did not flip them far as I know. ****** THE ERROR IN MPLABS --------------------------------------------------------------------- Clean: Deleting intermediary and output files. Clean: Deleted file "D:\pic\sbasic\ldr675office.HEX". Clean: Done. Executing: "C:\Program Files\SourceBoost\boostlink.pic.exe" -O1 -p "ldr675office" -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 Couldn't find function/label by name:main Failure BUILD SUCCEEDED: Sun Feb 18 10:28:32 2007 AND a ERROR it could not find the .COF file. Probably why if thinks it was successful. **** THE CODE #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 Edited February 18, 2007 by mramos Quote Link to post Share on other sites
Dave 0 Posted February 18, 2007 Report Share Posted February 18, 2007 mramos, I notice the compiler and linker were flipped. Flipped them to normal. Probably me excited setting it up. Also, the linker is first in the pull down list? It is possible it is running the linker first. I did not flip them far as I know. <{POST_SNAPBACK}> Its looks like linker is running first. When setting up under MPLAB .exe associated with compiler toolsuite component is run first, then .exe associate with linker is run secondly after successful compilation. Regards Dave Quote Link to post Share on other sites
mramos 0 Posted February 18, 2007 Author Report Share Posted February 18, 2007 (edited) mramos,I notice the compiler and linker were flipped. Flipped them to normal. Probably me excited setting it up. Also, the linker is first in the pull down list? It is possible it is running the linker first. I did not flip them far as I know. <{POST_SNAPBACK}> Its looks like linker is running first. When setting up under MPLAB .exe associated with compiler toolsuite component is run first, then .exe associate with linker is run secondly after successful compilation. Regards Dave <{POST_SNAPBACK}> I uninstalled and reinstalled. All working now. Edited February 18, 2007 by mramos Quote Link to post Share on other sites
Recommended Posts
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.