|
|
View previous topic :: View next topic |
Author |
Message |
mcr1981
Joined: 27 Oct 2010 Posts: 28
|
Question about the IDE and include files.... |
Posted: Wed Jul 31, 2013 11:25 pm |
|
|
Hello.
I must say I'm new to using the IDE from CCS, I almost 99% of the time use MPLAB.
I'm trying to use the option in the IDE that generates include files (structs and variables).
After it generates the include file I saw that for the TxCON registers it generates the same name for different registers.
Code: |
#word MCU_T1CON = 0x104
#bit MCU_TCS = MCU_T1CON.1
#word MCU_T2CON = 0x110
#bit MCU_TCS = MCU_T2CON.1
#word MCU_T3CON = 0x112
#bit MCU_TCS = MCU_T3CON.1
|
Shouldn't the IDE generate different names for the different registers, maybe MCU_TCS1, MCU_TCS2?
Maybe I'm missing some feature on the generating part (this is for a 24FJMC101).
Thanks in advance. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19510
|
|
Posted: Thu Aug 01, 2013 12:58 am |
|
|
Use of register names and bits is rarely needed, and generally discouraged. I'd suspect that you have found a fault in the generation, that no one else has found, because they never use it.....
In general, 99% of register/bit accesses, are now never wanted, because the compiler handles the functions for you. This ability was left present for the few 'old/odd' occasions where an antique program wanted these. Most such programs would pre-date the PIC24, and having multiple TCS bits.
Report the duplication to CCS.
If you want for a very few bits to use names, then use the SFR name ability instead (getenv). I'd doubt is 1 in 1000 of the 'old hands' with CCS, ever use the automated register naming now.
Best Wishes |
|
|
mcr1981
Joined: 27 Oct 2010 Posts: 28
|
|
Posted: Thu Aug 01, 2013 1:13 am |
|
|
Thanks Mr. Ttlemah for the super-fast response. Will report this to CCS.
Ttelmah wrote: | Use of register names and bits is rarely needed, and generally discouraged. I'd suspect that you have found a fault in the generation, that no one else has found, because they never use it.....
In general, 99% of register/bit accesses, are now never wanted, because the compiler handles the functions for you. This ability was left present for the few 'old/odd' occasions where an antique program wanted these. Most such programs would pre-date the PIC24, and having multiple TCS bits.
Report the duplication to CCS.
If you want for a very few bits to use names, then use the SFR name ability instead (getenv). I'd doubt is 1 in 1000 of the 'old hands' with CCS, ever use the automated register naming now.
Best Wishes |
Did not know this "getenv" thing (I'm kinda bad with C), but will use it. Got your info here: http://www.ccsinfo.com/forum/viewtopic.php?t=50698&highlight=getenv
Thanks. |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|