Searching \ for '[SX] C4SX: C environment for running C programs on' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/ubicom/languages.htm?key=c
Search entire site for: 'C4SX: C environment for running C programs on'.

Exact match. Not showing close matches.
PICList Thread
'[SX] C4SX: C environment for running C programs on'
2007\07\22@185058 by rwsensern/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, rwsenser wrote:

Hello all-

This posting announces C4SX.  This is an environment (editor, compiler, and loader
for the SK-KEY) that makes it possible to compile C programs under Windows and then
run these C programs on the SX.  This NO-COST environment has been used to produce
several large, production-quality C programs and includes SXIO.H.  

The SXIO.H C header file ("library") makes it possible to use C getchar(), putchar()
and puts() functions with the SX (assuming you have a USB2SER or other serial
capability connected to you SX).  

You can view documentation, including a "Quick Start", at:
c4sx@rwsenser.com

If there is enough interest from the SX Community, C4SX with be expanded and
further refined.


printf("Thanks,\nrwsenser\n");
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=203602
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\07\22@201718 by ALTITUDEAPn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, ALTITUDEAP wrote:

RW Senser,
is this in lue of the SXC?

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=203602#m203615
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\07\22@202501 by rwsensern/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, rwsenser wrote:

Hi Brian,
Greets.  No, this is in addition to SXC.  
I've heard that a next version of SXC (the "CSC" product) will be out soon.

C4SX is different, we pulled together existing components and at no cost, have a C programming solution for the SX.

Hope this answers your question.

Thanks,
RW Senser
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=203602#m203616
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\07\22@210628 by Jared.Woolstonn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, Jared.Woolston wrote:

If its a C programming solution for the SX, i fail to see how it is not in liu of SXC. And Im not trying to be argumentative, im just trying to figure it out.

-Jared
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=203602#m203621
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\07\22@224139 by peterverkaikn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, peterverkaik wrote:

RW Senser,
I welcome this!
As a SXC betatester, I looked at the CC1B compiler a long time ago (rev.G) and even
proposed in the sxc beta forum to switch from CCS to CC1B for one major reason:
the CC1B generated an almost sasm compatible assembly file. It looks you now
finally resolved that by using an external conversion program. This means we can load
the assembly file into the sxkey IDE to assemble and, more importantly, we can use SxSim to
test generated code. The CCS generated code cannot be loaded into the sxkey
and therefore SxSim cannot be used. As CC1B is purely a commandline compiler,
I think it could even be integrated into the sxkey editor, just like SX/B.
Complete the documentation, and have some more libraries, and it will be a winner, I am sure.

regards peter
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=203602#m203639
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\07\23@055502 by rwsensern/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, rwsenser wrote:

Hi Jarid,
In further reply to your question about what C4SX is:  Yes, you are correct:  Both SXC and this C4SX can do roughly the same thing.  They both provide a C solution for the SX.   My point was that neither product/approach is in liu of the  other.

Hi peter,
Thanks for the positive feedback.  I too think this C4SX approach is a winner.   The plan is to have more C4SX documentation and code examples out soon.  
Thanks to both of you guys for the feedback/interest,
RW Senser
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=203602#m203664
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\07\23@072719 by beann/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote:

I have not received anything for the CCS compiler, so I though I would try this one.

I didn't have too much problem compiling the led flasher program.

I'm pretty impressed with the output too. I was able to program a chip with no errors or problems.

I have it attached for those who are interested.

Bean.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=203602#m203687
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\07\23@095016 by peterverkaikn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, peterverkaik wrote:

RW Senser,
I have been playing around with your suggested setup. Seems to work well.

Some remarks:
CC1B appears only to support #pragma chip CHIPTYPE
that translates into device CHIPTYPE
The other device directives are set by an (automatically) included header file.
Is it possible to use #pragma to set other directives, for example
#pragma sx_device OSCHS2, TURBO, STACKX, OPTIONX, BOR42
#pragma sx_freq 20_000_000
#pragma sx_id 'sampleid'
#pragma sx_irc_cal irc_fast
#pragma sx_reset sxinit
The idea is to let CC1B output the entire line with the leading sx_ omitted
So the above 5 lines would translate into
device OSCHS2, TURBO, STACKX, OPTIONX, BOR42
freq 20_000_000
id 'sampleid'
irc_cal irc_fast reset sxinit
The 2nd request is for the use of #asm and #endasm
#asm
 mov w,#10
#endasm
gives a compiler error on mov w,#10
Why not just let CC1B output anything between #asm and #endasm to the output file?
If there are errors, these will be detected by sasm.

I realize these requests concern CC1B and not your utilities.
Do you have contact with B. Knudsen (author of the compiler)?
These features would make it possible for a C file to have all necessary info in it,
without the need for some template header file, and to include inline assembly using sasm
assembly statements.

regards peter
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=203602#m203711
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\07\23@173040 by kvwoodn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, kvwood wrote:

>>> Do you have contact with B. Knudsen (author of the compiler)?

I know that this question wasn't directed to me, but just to let you know, they do answer email sent to the address on their site.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=203602#m203828
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\07\23@194030 by rwsensern/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, rwsenser wrote:

Hi Kevin and Peter,
As Kevin points out, B. Knudsen does respond to emails.  I asked him about the future of CC1B (since I wanted to release C4SX).  The impression I got is that he expects to keep CC1B around for the long-term but does not want to put any (more) extensions into it.  I assume if there is a big demand for something (with $$$s behind it), anything is possible.

On to Peter's points and questions:
1)  "The other device directives are set by an (automatically) included header file.
Is it possible to use #pragma to set other directives, for example..."
One of the upgrades, I have in mind, for C4SX is to make the included header files easily changeable.  This means being able to supply the name on the c4sx invocation.  This would allow all the SX-KEY Device settings to be easily set.  However, it is not as clean as the #pragma approach that you suggest.  Right now you can adjust the header file contents (CC1B2SX.HDR) and keep the adjusted header in a different directory, and compile there (if you put the C4SX directory in your Windows PATH -- I use this technique currently...).
2)  "The 2nd request is for the use of #asm and #endasm
#asm
 mov w,#10
#endasm
"
As you might have noticed, CC1B assembler support is very "PIC-ish".  I'm sure CC1B is built from PIC-based technology.  However, I have a existing thought on doing something like this:  If you have ever used PHP or Microsoft's ASP, you have seen the interweaving of  HTML and PHP/ASP code.  I'm thinking of doing something similar for C4SX.  The syntax would be a bit obtuse, something like:
/*  mov 2,#10
?> */
You can probably see the 'trick' here, these look like comments to the CC1B C compiler but the C4SX reformatter can parse these out and insert the assembler code into the ouput .src file.  As I said, this is not elegant but perhaps workable.  <>
A question to people in general:  Has anyone tried using the C4SX SXIO.H include file?  If so, is the serial support working for you?

Many thanks,
RW Senser
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=203602#m203866
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\07\23@204309 by peterverkaikn/a
flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, peterverkaik wrote:

RW Senser,
I think you can do it simpler.
Let us use #pragma sx_????? where ????? stands for the directives, as I suggested.
CC1B throws warnings that can be ignored.
When you convert the output
check if a line starts with whitespace + ";#pragma sx_"
and if it does, output the remaining of the line, else convert the line as you normally would.
For #asm and #endasm
Let us use asm statements by making them comments like
#asm
//;nop
//mov w,#10
#endasm
check if a line starts with whitespace + ";#asm"
If it does output following lines without the leading //
until you encounter a line that starts with whitespace + ";#endasm"
Note that we can simply comment out specific assembly statements by placing a ; in front of it.

regards peter
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=203602#m203884
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\07\24@091658 by rwsensern/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, rwsenser wrote:

Hi Peter,
Yes, your suggestions look good.   Let me run some of your examples through CC1B and put some additional thought into this approach.

Thanks for the great ideas!

RW Senser
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=203602#m203974
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\07\24@091934 by beann/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, bean wrote:

RW Senser,
 Now that's the kind of support we like to see ;)
Bean.

---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=203602#m203975
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\07\24@205112 by rwsensern/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, rwsenser wrote:

Hi Bean and Peter,
Bean:  Thanks for the compliment!  
Peter:  I've discussed some of the ideas posted with some other folks.  One idea surfaced that seems really nice:

In the C4SX C program any code lines that start with #prama sx would have put into the src file sent to the SX-KEY.  So for example, all of the DEVICE, FREQ, RESET, etc pnemonics could be coded as
#pragma sx DEVICE OSCHS3
#pragma sx IRC_CAL IRC_FAST
#pragma sx FREQ 50_000_000
#pragma sx reset main
This removes the need for the separate header file CC1B2SX.HDR.

In addition, it would be possible to insert assembler statements with
#pragma sx mov w,#10
What do people think?  Good, Bad, Or ???  The main thing I don't like is that each #pragma sx line will generate a warning from CC1B.  I confirmed this with some test code.  These are warnings, not errors.

Also, I used some SX assembler code in the interrupt handler in SXIO.H.  If you look in there, you can see the CC1B rr() and retiw() functions being used.  If you are thinking of mixing assembler and C, I would suggest you review the SX.TXT and HEXCODES.H files that are included in the CC1B install.  Also it is worth downloading cc5x-33.pdf from the CC1B web site and looking at sections 3 and 6.

Thoughts?

All the best,
RW Senser
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=203602#m204119
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\07\24@211910 by peterverkaikn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, peterverkaik wrote:

RW Senser,
The nice thing using the #asm / #endasm idea, is that it is a single method
that solves all possible problems on how to add something to the
assembly output. I intend to use sasm macros as well and I want to
add assembly from the C source, so having #pragma sx before any statement
is ugly and timeconsuming when typing. That's why the // is almost ideal:
it takes hardly any time to type and it does not produce warnings.
As far as cc1b is concerned, it is all comment.
I did check Hexcode.h and that is even worse, using plain numbers,
which is unsuitable for macro definitions that I plan to use.
Doing it now in a way that is invisible to cc1b, then later when cc1b
does support inline assembly using sasm mnenomics, we can simply remove
the leading //.

regards peter
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=203602#m204122
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\07\25@111826 by rwsensern/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, rwsenser wrote:

Hi peter,
Thanks for the additional feedback.  We have something "in the works" that is very close to the "#asm, #endasm" and/or //? approach you mentioned.  Basically we are thinking of using a different literal of #asm and #endasm but having the same multi-line functionality.  I need to test it some more; if no major bugs show up then I'll post it later on today.

Again, thanks for the feedback and please provide feedback on this new CC1B2SX version (to come later today).  I would describe it in detail here -- but I think the time is better spent if I test then post.

Thanks,
RW Senser
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=203602#m204217
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\07\25@112601 by peterverkaikn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, peterverkaik wrote:

RW Senser,
One thing that occured to me, is that since all C source is outputted by cc1b as comment,
there is a restriction on using //? (or whatever approach), it can only be used
outside conditional compilation. That is not a problem for the main directives like device
and also not for sasm macros, but it is a problem for inline assembly code inside
conditional compilation blocks. In that case the codes from Hexcodes.h must be
used.

regards peter
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=203602#m204219
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\07\25@191856 by rwsensern/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, rwsenser wrote:

Hi peter,
Yes, I suspect you are right about the conditional compile (#ifdefs, etc.) and the use of comments for the mechanism to pass the assembler code to the SX-KEY.  In addition, while testing I hit several issues.  Some were bugs of mine, which are in the process of getting fixed.  However, I hit one other issue that calls into question this approach of passing SX assembler through the CC1B compiler as comments.  In a nutshell, if the #asm .. #endasm (or whatever syntax. /* */ used in code below) is put at the end of the C program then the CC1B listing (used to communicate CC1B2SX and then with the SX-KEY) does not contain the comments!  I'll keep looking at this issue, but this will delay things a bit.

Anyway, for those interested, a status update.

Thanks for the feedback,
RW Senser
Here is a sample showing the issue:
C snippet:

       bank0 unsigned char hold;
       bit holdB0 @ hold.0;        
       // bank1 char c;
       TRISB = 0xfe;   // %1111 1110
       RB = 0;
       while (1) {
         delay();
         holdB0 = pinB0;
         hold++;
         pinB0 = holdB0;
       }
       
       /*        nop
       ?>*/
becomes in the CC1B output listing:

                      ;          pinB0 = holdB0;
       SB    16.holdB0
       CLRB  6.pinB0
       SNB   16.holdB0
       SETB  6.pinB0
                       ;        }
       JMP   m008
       ORG $07FF
       JMP main
       END

; *** KEY INFO ***
Notice: the /*---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=203602#m204298
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

2007\07\25@195918 by peterverkaikn/a

flavicon
face
In SX Microcontrollers, SX/B Compiler and SX-Key Tool, peterverkaik wrote:

RW Senser,
Remember that cc1b removes any code and variables that are never referenced,
or in this case, never reached (all code behind while (1) without a break inside the while).
Change the while (1) to if (1) or add a line if (pinB0) break; inside the while (1)
and the comments are where they should be.

regards peter
---------- End of Message ----------

You can view the post on-line at:
http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=203602#m204303
Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com
The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2007 (http://www.dotNetBB.com)

More... (looser matching)
- Last day of these posts
- In 2007 , 2008 only
- Today
- New search...