This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

IAR cc2541

Other Parts Discussed in Thread: CC2541, BLE-STACK

Could somebody help?

IAR can't open example project. Error: "Unable to create configuration "cc2541 ..." using tool chain "8051"

  • Can you specify which BLE stack and IAR version you use? If you use BLE-STACK 1.4.1, you have to use IAR EW8051 9.10.3.
  • Thank you Chen for answer. You are right IAR version was for ARM not for 8051.
  • You are welcome.

  • Error in IAR.

    .
    I try to create a simple (almost empty prom) and copy from examples some headers.
    This error happens:
    Error[Pe077]: this declaration has no storage class or type specifier C:\Texas Instruments\BLE-CC254x-1.4.1.43908\Projects\ble\TimeApp\CC2541\ioCC2541.h 123
    Error[Pe065]: expected a ";" C:\Texas Instruments\BLE-CC254x-1.4.1.43908\Projects\ble\TimeApp\CC2541\ioCC2541.h 123

    I think that -" #ifdef __IAR_SYSTEMS_ICC__" work incorrectly, but can't find a solution.

    Here are code, till the line where this error happens:

    fndef IOCC2541_H
    #define IOCC2541_H

    /* ------------------------------------------------------------------------------------------------
     *                                      Compiler Abstraction
     * ------------------------------------------------------------------------------------------------
     */
    #ifdef __IAR_SYSTEMS_ICC__

    #pragma language=save
    #pragma language=extended
    #define SFR(name,addr)   __sfr   __no_init  volatile  unsigned char  name @ addr;
    #define SFRBIT(name, addr, bit7, bit6, bit5, bit4, bit3, bit2, bit1, bit0) \
    __sfr __no_init volatile union \
    {                              \
      unsigned char name;          \
      struct {                     \
        unsigned char bit0 : 1;    \
        unsigned char bit1 : 1;    \
        unsigned char bit2 : 1;    \
        unsigned char bit3 : 1;    \
        unsigned char bit4 : 1;    \
        unsigned char bit5 : 1;    \
        unsigned char bit6 : 1;    \
        unsigned char bit7 : 1;    \
      };                           \
    } @ addr;
    #define SBIT(name,addr) /* not in use for IAR C Compiler */
    #define XREG(addr)       ((unsigned char volatile __xdata *) 0)[addr]
    #define PXREG(addr)      ((unsigned char volatile __xdata *) addr)
    #define VECT(num,addr)   addr

    #elif defined __IAR_SYSTEMS_ASM__
    #define SFR(name,addr)   name  DEFINE  addr
    SFRBITMACRO MACRO t, addr, bit7 , bit6, bit5, bit4, bit3, bit2, bit1, bit0
    t    DEFINE addr
    bit7 DEFINE addr.7
    bit6 DEFINE addr.6
    bit5 DEFINE addr.5
    bit4 DEFINE addr.4    ;; NB: do not modify indentation of this macro
    bit3 DEFINE addr.3
    bit2 DEFINE addr.2
    bit1 DEFINE addr.1
    bit0 DEFINE addr.0
                ENDM
    #define SFRBIT(name, addr, bit7, bit6, bit5, bit4, bit3, bit2, bit1, bit0) \
        SFRBITMACRO <name>, <addr>, <bit7>, <bit6>, <bit5>, <bit4>, <bit3>, <bit2>, <bit1>, <bit0>
    #define SBIT(name,addr)  name  DEFINE  addr
    #define XREG(addr)       addr
    #define PXREG(addr)      addr
    #define VECT(num,addr)   addr

    /* IAR assembler uses some predefined registers. The following prevents name collisions. */

    #define SP   SPx
    #define ACC  ACCx
    #define B    Bx
    #define PSW  PSWx
    #define CY   CYx
    #define AC   ACx
    #define F0   F0x
    #define RS1  RS1x
    #define RS0  RS0x
    #define OV   OVx
    #define P    Px

    #else
    #error "Unrecognized compiler."
    #endif


    /* ------------------------------------------------------------------------------------------------
     *                                        Interrupt Vectors
     * ------------------------------------------------------------------------------------------------
     */
    #define  RFERR_VECTOR   VECT(  0, 0x03 )   /*  RF core error situation                     */
    #define  ADC_VECTOR     VECT(  1, 0x0B )   /*  ADC end of conversion                       */
    #define  URX0_VECTOR    VECT(  2, 0x13 )   /*  USART 0 RX complete                         */
    #define  URX1_VECTOR    VECT(  3, 0x1B )   /*  USART 1 RX complete                         */
    #define  ENC_VECTOR     VECT(  4, 0x23 )   /*  AES encryption/decryption complete          */
    #define  ST_VECTOR      VECT(  5, 0x2B )   /*  Sleep Timer Compare                         */
    #define  P2INT_VECTOR   VECT(  6, 0x33 )   /*  Port 2 Inputs and I2C                       */
    #define  UTX0_VECTOR    VECT(  7, 0x3B )   /*  USART0 TX Complete                          */
    #define  DMA_VECTOR     VECT(  8, 0x43 )   /*  DMA Transfer Complete                       */
    #define  T1_VECTOR      VECT(  9, 0x4B )   /*  Timer 1 (16-bit) Capture/Compare/Overflow   */
    #define  T2_VECTOR      VECT( 10, 0x53 )   /*  Timer 2                                     */
    #define  T3_VECTOR      VECT( 11, 0x5B )   /*  Timer 3 (8-bit) Capture/Compare/Overflow    */
    #define  T4_VECTOR      VECT( 12, 0x63 )   /*  Timer 4 (8-bit) Capture/Compare/Overflow    */
    #define  P0INT_VECTOR   VECT( 13, 0x6B )   /*  Port 0 Inputs                               */
    #define  UTX1_VECTOR    VECT( 14, 0x73 )   /*  USART1 TX Complete                          */
    #define  P1INT_VECTOR   VECT( 15, 0x7B )   /*  Port 1 Inputs                               */
    #define  RF_VECTOR      VECT( 16, 0x83 )   /*  RF General Interrupts                       */
    #define  WDT_VECTOR     VECT( 17, 0x8B )   /*  Watchdog Overflow in Timer Mode             */

    /* ------------------------------------------------------------------------------------------------
     *                                     Interrupt Alias
     * ------------------------------------------------------------------------------------------------
     */
    #define  I2C_VECTOR     P2INT_VECTOR       /*  I2C Interrupt vector, alias for P2INT_VECTOR */

    /* ------------------------------------------------------------------------------------------------
     *                                            SFRs
     * ------------------------------------------------------------------------------------------------
     */

    /*
     *   SFRs with an address ending with 0 or 8 are bit accessible.
     *   They are defined with the SFRBIT() macro that sets the name of each bit.
     */

    /* Port 0                                                                           */
     SFRBIT( P0      ,  0x80, P0_7, P0_6, P0_5, P0_4, P0_3, P0_2, P0_1, P0_0 )