Welcome, Guest
Username: Password: Secret Key Remember me

TOPIC: Microchip XC compilers

Re: Microchip XC compilers 5 years 2 months ago #14228

  • lespic
  • lespic's Avatar
  • Offline
  • Junior Boarder
  • Posts: 36
  • Thanks received: 35
Yes didn't explain well , If i type U1MODEbits. the list does NOT pop up ? only if I type U1MODEBITS. do I get the list ? I think its in the 24F32KA304.h file but not clever enough to find out.

Re: Microchip XC compilers 5 years 2 months ago #14229

  • Baldor
  • Baldor's Avatar
  • Offline
  • Expert Boarder
  • Posts: 135
  • Thanks received: 91
I have no experience with 24F , only 12, 16 and 18F. When I type the dot, the list apears.

I think the IDE uses the definitions in the include file for the popup. You should find something like:
typedef {
    struct {
       PORTAbits.RA1  :1;
       PORTAbits.RA2  :1;
            .
            .
       PORTAbits.RA7  :1;
           }
            .
            .    
       }

Search the include with upper and lower case, see what you find.

I know that for structs I defined, the IDE finds and shows the bits I defined. And is case sensitive, if I type BUTTONSbits. the list apears, if I type BUTTONSBITS. nothing apears.
Aprendiz de mucho, maestro de casi nada.

Re: Microchip XC compilers 5 years 2 months ago #14240

  • Baldor
  • Baldor's Avatar
  • Offline
  • Expert Boarder
  • Posts: 135
  • Thanks received: 91
What error you get when you left it upercase?
Aprendiz de mucho, maestro de casi nada.

Re: Microchip XC compilers 5 years 2 months ago #14241

  • lespic
  • lespic's Avatar
  • Offline
  • Junior Boarder
  • Posts: 36
  • Thanks received: 35
Baldor, It's not a big problem just seems like it should work either way...
With U1MODEBITS. etc. this error report;

C:/A-LAPY/KA_platform/main_GREEN_KA.c: In function 'UART_init':
C:/A-LAPY/KA_platform/main_GREEN_KA.c:1109:15: error: expected identifier or '(' before '.' token
make[2]]: Leaving directory `C:/A-LAPY/KA_platform/KA24_green.X'
make[2]] Error 255
make[1]] Error 2
make: *** [.build-impl] Error 2

BUILD FAILED (exit value 2, total time: 5s)

Re: Microchip XC compilers 5 years 2 months ago #14242

  • Baldor
  • Baldor's Avatar
  • Offline
  • Expert Boarder
  • Posts: 135
  • Thanks received: 91
Seems an IDE error more than a compiler error.

Happens the same, for example, with pins (PORTAbits.RA1 or whatever pins are addresed in XC16 )?

I must install XC16 and try to reproduce the error.

And now that we are jumping topics... What do you think, PIC32 or ARM? If ARM... Some sugestion about chip and how to program it? (Not devboard, just bare chip)
Aprendiz de mucho, maestro de casi nada.

Re: Microchip XC compilers 5 years 2 months ago #14243

  • jmessina
  • jmessina's Avatar
  • Offline
  • Senior Boarder
  • Posts: 44
  • Thanks received: 189
U1MODEBITS is a typedef (all capitals).

U1MODEbits is a variable... an instance of struct U1MODEBITS

You shouldn't be able to use all capitals in an expression, but it wouldn't surprise me if MPLABX gets it wrong while trying to fill in the autocomplete. Using 'U1MODEBITS.anything' should cause a compile error.
Time to create page: 0.254 seconds