avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Error: Instruction sbrc not recognised


From: Vandana Bhasin
Subject: [avr-gcc-list] Error: Instruction sbrc not recognised
Date: Thu, 15 Jan 2015 10:19:06 +0530

Hi All,

I am currently working on Tinyos platform. I running code on TOSSIM - tinyos simulator. This code is contained in HPLAt45dbIOP.nc file. My code basically wants to write data to flash memory for micaz sensors. But in TOSSIM it is unable to recognise the instructions of the avr assembler. I have attached only the part of code which is giving error. Please guide as I am stuck with this for a long time and my submission deadline is very near.


#define BITINIT \
  uint8_t clrClkAndData = PORTD & ~0x28

#define BIT(n) \
    PORTD = clrClkAndData; \
    asm __volatile__ \
        (  "sbrc %2," #n "\n" \
     "\tsbi 18,3\n" \
     "\tsbi 18,5\n" \
     "\tsbic 16,2\n" \
     "\tori %0,1<<" #n "\n" \
     : "=d" (spiIn) : "0" (spiIn), "r" (spiOut))

  async command uint8_t FlashSpi.write(uint8_t spiOut) {
    uint8_t spiIn = 0;

    // This atomic ensures integrity at the hardware level...
    atomic
      {
    BITINIT;

    BIT(7);
    BIT(6);
    BIT(5);
    BIT(4);
    BIT(3);
    BIT(2);
    BIT(1);
    BIT(0);
      }

    return spiIn;
  }
opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc: Assembler messages:
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:150: Error: no such instruction: `sbrc %cl,7'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:151: Error: no such instruction: `sbi 18,3'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:152: Error: no such instruction: `sbi 18,5'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:153: Error: no such instruction: `sbic 16,2'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:154: Error: no such instruction: `ori %dl,1<<7'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:151: Error: no such instruction: `sbrc %cl,6'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:152: Error: no such instruction: `sbi 18,3'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:153: Error: no such instruction: `sbi 18,5'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:154: Error: no such instruction: `sbic 16,2'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:155: Error: no such instruction: `ori %dl,1<<6'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:152: Error: no such instruction: `sbrc %cl,5'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:153: Error: no such instruction: `sbi 18,3'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:154: Error: no such instruction: `sbi 18,5'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:155: Error: no such instruction: `sbic 16,2'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:156: Error: no such instruction: `ori %dl,1<<5'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:153: Error: no such instruction: `sbrc %cl,4'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:154: Error: no such instruction: `sbi 18,3'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:155: Error: no such instruction: `sbi 18,5'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:156: Error: no such instruction: `sbic 16,2'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:157: Error: no such instruction: `ori %dl,1<<4'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:154: Error: no such instruction: `sbrc %cl,3'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:155: Error: no such instruction: `sbi 18,3'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:156: Error: no such instruction: `sbi 18,5'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:157: Error: no such instruction: `sbic 16,2'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:158: Error: no such instruction: `ori %dl,1<<3'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:155: Error: no such instruction: `sbrc %cl,2'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:156: Error: no such instruction: `sbi 18,3'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:157: Error: no such instruction: `sbi 18,5'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:158: Error: no such instruction: `sbic 16,2'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:159: Error: no such instruction: `ori %dl,1<<2'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:156: Error: no such instruction: `sbrc %cl,1'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:157: Error: no such instruction: `sbi 18,3'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:158: Error: no such instruction: `sbi 18,5'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:159: Error: no such instruction: `sbic 16,2'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:160: Error: no such instruction: `ori %dl,1<<1'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:157: Error: no such instruction: `sbrc %cl,0'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:158: Error: no such instruction: `sbi 18,3'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:159: Error: no such instruction: `sbi 18,5'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:160: Error: no such instruction: `sbic 16,2'
/opt/tinyos-2.1.2/tos/platforms/micaz/chips/at45db/HplAt45dbIOP.nc:161: Error: no such instruction: `ori %dl,1<<0'
make: *** [sim-exe] Error 1


Regards

Vandana

reply via email to

[Prev in Thread] Current Thread [Next in Thread]