View previous topic :: View next topic |
Author |
Message |
Ttelmah Guest
|
|
Posted: Sun Sep 17, 2006 5:05 am |
|
|
It seems very similar at present to the existing CCS3 support.I have tried a couple of things that are normal 'C', but will not work (or have to be bodged to make work), in CCS3, and they seem to behave about the same using CCS4, in either 'CCS3' mode, or 'CCS4' mode. In 'ANSI' mode, there were some slightly hopeful signs that parts of the initialisation of variables using pointers, were 'better' (actually putting a number into a varaible that in CCS3, does not get initialised at all). However the value was wrong, and it still didn't work...
Best Wishes |
|
|
Storic
Joined: 03 Dec 2005 Posts: 182 Location: Australia SA
|
|
Posted: Thu Sep 28, 2006 3:23 pm |
|
|
I have been trying out the MODBUS library and there apears to be missing something. Undefined identifier "setup_uart". _________________ What has been learnt if you make the same mistake? |
|
|
Ttelmah Guest
|
Re: pointer to function |
Posted: Fri Oct 13, 2006 5:09 am |
|
|
kender wrote: | Hey!
Have anyone tried pointer to function in the Version 4? |
Ongoing to this question, and another earlier one about pointers to functions, some parts are internally looking 'closer' now (though still do not work). If you declare some functions, and an array of pointers to these, initialised during the compilation, in earlier releases the entries were left blank giving a 'null' address. Now in 4.011, values are put into the array (hurrah), but the values are wrong (boo). At present, the compiler seems to put the LSB of the correct address, into both the LSB, and MSB of the pointer....
It works correctly if you manually initialise the array inside the code.
So, there are signs of this being 'worked on', but it is not there yet.
Despite some oddities remaining in the IDE, 4.011, is seeming to compile V3 code quite well now.
Best Wishes |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
Re: pointer to function |
Posted: Fri Oct 13, 2006 1:47 pm |
|
|
Ttelmah wrote: | kender wrote: | Hey!
Have anyone tried pointer to function in the Version 4? | ...So, there are signs of this being 'worked on', but it is not there yet... |
That's great! I've just found out about a very neat way of making state machines with function pointers. Instead of state flags one can use a pointer to a function. So, there's a global variable, which has a pointer to a function handling the curent state. This function can be called through the pointer from anywhere in the code. The state handling function has a single (usually non-nested) switch statemen, which governs state transitions and does the useful work. This approach allows to eliminate the outer level of nested switch statements.
EDIT: I've started a separate topic about the pointer-based state machines here
http://www.ccsinfo.com/forum/viewtopic.php?t=28656
Last edited by kender on Mon Oct 23, 2006 11:52 pm; edited 1 time in total |
|
|
sjbaxter
Joined: 26 Jan 2006 Posts: 141 Location: Cheshire, UK
|
|
Posted: Fri Oct 20, 2006 11:54 am |
|
|
I must say that their 'marketing dept' is certainly way ahead of the software.
I have just read the latest news release:
Software Update: CCS C Compiler Version 4.012'
and I am amazed at how good they make the product sound !!
It's just a pity they don't provide a link on the article to the forum so that people can read about the 'suggestions for improvements' and list of 'technical issues' in the real context and fustration in which they were reported !!
Nice one CCS ... now get the software as polished as the news reports and we'll all be happy. _________________ Regards,
Simon. |
|
|
MikeW
Joined: 15 Sep 2003 Posts: 184 Location: Warrington UK
|
Kender, can you eloborate please |
Posted: Mon Oct 23, 2006 2:52 am |
|
|
Kender,
can you post some code snippets which illustrate the usage and advantages of using pointers to functions as a state machine
Mike |
|
|
Benjamin
Joined: 11 Jan 2006 Posts: 21 Location: Quebec (Canada)
|
Addressmod with Version 4 |
Posted: Mon Oct 23, 2006 2:02 pm |
|
|
If anyone gets Addressmod working for addressing exterior memory with version 4, please let me know. It still does'nt seem to work with 4.012. |
|
|
kender
Joined: 09 Aug 2004 Posts: 768 Location: Silicon Valley
|
Re: Kender, can you eloborate please |
Posted: Mon Oct 23, 2006 10:29 pm |
|
|
MikeW wrote: | Kender,
can you post some code snippets which illustrate the usage and advantages of using pointers to functions as a state machine
Mike |
I've started a separate topic about this and posted some snippets.
http://www.ccsinfo.com/forum/viewtopic.php?t=28656 |
|
|
carlos.e.carvalho
Joined: 27 Oct 2006 Posts: 2
|
Problems with compiler |
Posted: Mon Oct 30, 2006 1:36 pm |
|
|
I have the CCS PCM C Compiler, Version 4.013 and tried to use it with PIC 16F685. With ROM lower than 50%, the program works fine. But, when the ROM reaches 50% or more, my program don't starts.
Is there some kind of directive to make the program goes to the right place when the program memory bank changes ?
Thanks !!! |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
fusyon Guest
|
PCW won't remember my keyboard shortcut |
Posted: Tue Oct 31, 2006 11:52 am |
|
|
I am currently using 4.013 and it won't remember the keyboard shortcut. Every time I close PCW , all the keyboard shortcut I added are gone. This use to be very useful in 3.xx
Also, the toolbar is really bugging me. It is cute but too big. It would be nice if we coul make it disapear or at least resize it. |
|
|
Dinesh
Joined: 15 Jul 2005 Posts: 22 Location: UK
|
IDE Editor and Software Stability |
Posted: Wed Nov 01, 2006 11:14 am |
|
|
Hi All,
Editor
Since v4.013, the editor gets confused with colour scheme. This causes text to be displayed purple. Has any one else experienced this?
Run Time Exception
So I tried using the MPLAB editor to view/edit. On closing the file and starting CCS complier, I get an muliple exceptions and the CCS software will not run.
This is a serious problem. Installing the software doesn't solve the problem. I had this once before and had to completely erase the PICC directory and the install the software to get it working.
Any suggestions?
Thanks _________________ W2k sp4 512MB (Motherboard:ASUS A7S8X) |
|
|
paulc Guest
|
V4.013 issues |
Posted: Wed Nov 01, 2006 12:14 pm |
|
|
Hello all,
I'm currently trying to use V4.013 and have discovered some IDE issues. I'm sending these to CCS support.
1. Color schemes selected in Editor Properties are not consistently applied. Purple color for strings is randomly applied when scrolling through code.
2. When expanding and collapsing functions or statements, the color black is chosen to highlight collapsed code snippet. Can't see text at all. Changing editor properties does not repair issue. Must exit and re-start IDE.
3. Memory fault when scrolling through code, especially when code is collapsed. Appears to occur when collapsed code is scrolled off visible page.
Be careful, Hangs IDE.
-p |
|
|
Richard Arroyo
Joined: 04 Apr 2006 Posts: 22 Location: Sebastopol, CA
|
|
Posted: Wed Nov 01, 2006 1:13 pm |
|
|
By the time it works like a beat AMC Pacer my maintenance will expire. _________________ RAA |
|
|
Konrad
Joined: 15 Sep 2003 Posts: 34
|
DSPic support |
Posted: Thu Nov 02, 2006 7:36 pm |
|
|
I have been asking CCS about 33F and 24F support. I have a project that needs 3 external timers and 1 internal timer, and it is currently on a PIC17 using Microchip C17 compiler.
Waiting for CCS (all my other projects use CCS), I have used the C30 compiler (student version). I have just got fed up of waiting for even a beta that I have ordered the full C30.
BUT
when asking about FIR,IIR,FFT support in the new compiler I had the reply that the linker will be microchip compatible.
With the C30 GNU compiler supporting pointer to functions, pointers to constants etc, this seems a major step for CCS!
to be able to link CCS code with microchip code!
On another note I have noiced in the latest MPLAB the C30 linker no longer has a tick box for "link for ICD". The linker builds depending on whether you select ICD as debugger or programmer. This philosopy of hiding options seems to be trendy for more than CCS! |
|
|
|