UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor delvecch
Visitor
11,470 Views
Registered: ‎08-13-2008

Problems with MicroBlaze Compilation Errors

I'm trying to build an application for MicroBlaze and I keep getting vague errors regarding a few global variables and my main function brackets.  Here is the code:

 

 

// Necessary header files
#include "stdio.h"
#include "xparameters.h"
#include "xbasic_types.h"
#include "xgpio.h"
#include "gpio_header.h"
#include "xuartlite.h"
#include "uartlite_header.h"
#include "fsl.h"
#include "aes.h"
#include "datatransfer.h"

// Declare global variables
static XGpio switches, LEDS;
static XUartLite myUART;

int main (void) {
   
    // Declare local variables
    static unsigned char key[16] = "testtesttesttest";
    static unsigned char cipherout[16];
    int i = 0;
    Xuint32 UserData[4];
    Xuint32 EncryptedData[4];
   

    // Initialize System
    InitPeripherals();

    while(1)
    {
         GetUserData(UserData);
         SendToEncrypt(UserData);

        aesEncryption(key, (unsigned char) UserData, cipherout);
       
        GetEncryptResults(EncryptedData);
        SendToUser(EncryptedData);
       
    }
   
   return 0;
}

 

 

 

 

 

Here are the errors.  As you can tell, line 14-15 are the global variable definitions, line 17 is the beginning of main function, and 57 is the last line of code (curly bracket to close main function):

 

/cygdrive/c/EDK_Test_Interrupts/test_interrupts/main.c: In function 'aesEncryption':
/cygdrive/c/EDK_Test_Interrupts/test_interrupts/main.c:14: error: storage class specified for parameter 'switches'
/cygdrive/c/EDK_Test_Interrupts/test_interrupts/main.c:14: error: storage class specified for parameter 'LEDS'
/cygdrive/c/EDK_Test_Interrupts/test_interrupts/main.c:15: error: storage class specified for parameter 'myUART'
/cygdrive/c/EDK_Test_Interrupts/test_interrupts/main.c:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/cygdrive/c/EDK_Test_Interrupts/test_interrupts/main.c:57: error: old-style parameter declarations in prototyped function definition
/cygdrive/c/EDK_Test_Interrupts/test_interrupts/main.c:57: error: expected '{' at end of input

 

 

I had code that had the exact same global variables and same style as this one, which compiled fine.  I'm not really sure why this is giving me errors, but anyone has any suggestions, it would be greatly appreciated!

 

Thanks...

Tags (2)
0 Kudos
10 Replies
Contributor
Contributor
11,443 Views
Registered: ‎07-22-2009

Re: Problems with MicroBlaze Compilation Errors

Hello,

 

Did you try to delete the "static"declaration?

 

Put:

 

XGpio switches, LEDS;

XUartLite myUART;

 

In the main or other functions ?

 

Best Regards,

 

Fabien

0 Kudos
Visitor delvecch
Visitor
11,400 Views
Registered: ‎08-13-2008

Re: Problems with MicroBlaze Compilation Errors

Deleting that gets rid of the first few errors, but I still have the following errors:

 

/cygdrive/c/EDK_Test_Interrupts/test_interrupts/main.c:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
/cygdrive/c/EDK_Test_Interrupts/test_interrupts/main.c:57: error: old-style parameter declarations in prototyped function definition
/cygdrive/c/EDK_Test_Interrupts/test_interrupts/main.c:57: error: expected '{' at end of input

 

These are the first and last lines of the main function - I have no idea what these mean!  I copied and pasted the main function from a working piece of code and made a few alterations here and there, and now I'm receiving this error.

 

Any ideas why this might be the case?  What are the main causes of this type of error?

 

Thanks for your help..

 

 

0 Kudos
Xilinx Employee
Xilinx Employee
11,397 Views
Registered: ‎01-18-2008

Re: Problems with MicroBlaze Compilation Errors

There is probably something wrong with your configuration. Which version of the tools are you using?

 

Add a "-save-temps" to your gcc compile line, and post the main.i file that is generated. 

0 Kudos
Visitor delvecch
Visitor
11,389 Views
Registered: ‎08-13-2008

Re: Problems with MicroBlaze Compilation Errors

I'm using v10.1.03 of the EDK...

 

This may sound like a stupid question, but where can you change the compile line options from the XPS GUI?  I can't seem to find it...

 

Also, in which directory is the main.i file generated?  I've tried to use the EDK help and Google, but can't find much relevant information.

 

I appreciate your help.

0 Kudos
Visitor delvecch
Visitor
11,380 Views
Registered: ‎08-13-2008

Re: Problems with MicroBlaze Compilation Errors

I think I had a brain cramp for a second there earlier.

 

I went to Software -> Software Platform Settings and added -save-temps to the extra_compiler_flags option.  This did not generate main.i, however.  It did generate some other .i files for the GPIO and UART, among a few others.

 

Ideas?

0 Kudos
Contributor
Contributor
11,369 Views
Registered: ‎07-22-2009

Re: Problems with MicroBlaze Compilation Errors

Did you try to move the " { " next to the main ?

 

Put:

 

"int main(void)

{

...

}"

 

I found on the internet people who solved this problem like that, but it seems very very strange...

 

Best Regards,

 

Fabien

0 Kudos
Xilinx Employee
Xilinx Employee
11,357 Views
Registered: ‎01-18-2008

Re: Problems with MicroBlaze Compilation Errors

In XPS, you should be able to just right click on the s/w project, and then set the compiler options. The s/w platform settings option is useful only for the code that is compiled when libgen runs.
0 Kudos
Highlighted
Visitor delvecch
Visitor
11,355 Views
Registered: ‎08-13-2008

Re: Problems with MicroBlaze Compilation Errors

I tried to move the '{' down a line but that did not work.... Thanks for the tip on how to set compiler options, here is main.i:

 

# 1 "/cygdrive/c/EDK_Test_Interrupts/test_interrupts/main.c"
# 1 "/cygdrive/c/EDK_Test_Interrupts//"
# 1 "<built-in>"
# 1 "<command line>"
# 1 "/cygdrive/c/EDK_Test_Interrupts/test_interrupts/main.c"

# 1 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/stdio.h" 1 3
# 29 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/stdio.h" 3
# 1 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/_ansi.h" 1 3
# 15 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/_ansi.h" 3
# 1 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/newlib.h" 1 3
# 16 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/_ansi.h" 2 3
# 1 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/config.h" 1 3



# 1 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/machine/ieeefp.h" 1 3
# 5 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/config.h" 2 3
# 17 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/_ansi.h" 2 3
# 30 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/stdio.h" 2 3




# 1 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/include/stddef.h" 1 3 4
# 214 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/include/stddef.h" 3 4
typedef long unsigned int size_t;
# 35 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/stdio.h" 2 3


# 1 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/include/stdarg.h" 1 3 4
# 43 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/include/stdarg.h" 3 4
typedef __builtin_va_list __gnuc_va_list;
# 38 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/stdio.h" 2 3







# 1 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/reent.h" 1 3
# 13 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/reent.h" 3
# 1 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/_ansi.h" 1 3
# 14 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/reent.h" 2 3
# 1 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/_types.h" 1 3
# 12 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/_types.h" 3
# 1 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/lock.h" 1 3





typedef int _LOCK_T;
typedef int _LOCK_RECURSIVE_T;
# 13 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/_types.h" 2 3

typedef long _off_t;
__extension__ typedef long long _off64_t;


typedef int _ssize_t;





# 1 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/include/stddef.h" 1 3 4
# 355 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/include/stddef.h" 3 4
typedef unsigned int wint_t;
# 25 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/_types.h" 2 3


typedef struct
{
  int __count;
  union
  {
    wint_t __wch;
    unsigned char __wchb[4];
  } __value;
} _mbstate_t;

typedef _LOCK_RECURSIVE_T _flock_t;


typedef void *_iconv_t;
# 15 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/reent.h" 2 3






typedef unsigned long __ULong;
# 42 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/reent.h" 3
struct _Bigint
{
  struct _Bigint *_next;
  int _k, _maxwds, _sign, _wds;
  __ULong _x[1];
};


struct __tm
{
  int __tm_sec;
  int __tm_min;
  int __tm_hour;
  int __tm_mday;
  int __tm_mon;
  int __tm_year;
  int __tm_wday;
  int __tm_yday;
  int __tm_isdst;
};







struct _on_exit_args {
 void * _fnargs[32];
 void * _dso_handle[32];

 __ULong _fntypes;


 __ULong _is_cxa;
};


struct _atexit {
 struct _atexit *_next;
 int _ind;
 void (*_fns[32])(void);
        struct _on_exit_args * _on_exit_args_ptr;
};
# 103 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/reent.h" 3
struct __sbuf {
 unsigned char *_base;
 int _size;
};






typedef long _fpos_t;
# 151 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/reent.h" 3
struct __sFILE_fake {
  unsigned char *_p;
  int _r;
  int _w;
  short _flags;
  short _file;
  struct __sbuf _bf;
  int _lbfsize;

  struct _reent *_data;
};






struct __sFILE {
  unsigned char *_p;
  int _r;
  int _w;
  short _flags;
  short _file;
  struct __sbuf _bf;
  int _lbfsize;


  struct _reent *_data;



  void * _cookie;

  int (*_read) (void * _cookie, char *_buf, int _n);
  int (*_write) (void * _cookie, const char *_buf, int _n);

  _fpos_t (*_seek) (void * _cookie, _fpos_t _offset, int _whence);
  int (*_close) (void * _cookie);


  struct __sbuf _ub;
  unsigned char *_up;
  int _ur;


  unsigned char _ubuf[3];
  unsigned char _nbuf[1];


  struct __sbuf _lb;


  int _blksize;
  int _offset;






  _flock_t _lock;

};
# 261 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/reent.h" 3
typedef struct __sFILE __FILE;


struct _glue
{
  struct _glue *_next;
  int _niobs;
  __FILE *_iobs;
};
# 292 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/reent.h" 3
struct _rand48 {
  unsigned short _seed[3];
  unsigned short _mult[3];
  unsigned short _add;


  __extension__ unsigned long long _rand_next;

};
# 317 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/reent.h" 3
struct _mprec
{

  struct _Bigint *_result;
  int _result_k;
  struct _Bigint *_p5s;
  struct _Bigint **_freelist;
};


struct _misc_reent
{

  char *_strtok_last;
  _mbstate_t _mblen_state;
  _mbstate_t _wctomb_state;
  _mbstate_t _mbtowc_state;
  char _l64a_buf[8];
  int _getdate_err;
  _mbstate_t _mbrlen_state;
  _mbstate_t _mbrtowc_state;
  _mbstate_t _mbsrtowcs_state;
  _mbstate_t _wcrtomb_state;
  _mbstate_t _wcsrtombs_state;
};



struct _reent
{




  __FILE *_stdin, *_stdout, *_stderr;

  int _errno;

  int _inc;

  char *_emergency;

  int __sdidinit;

  int _current_category;
  const char *_current_locale;

  struct _mprec *_mp;

  void (*__cleanup) (struct _reent *);

  int _gamma_signgam;


  int _cvtlen;
  char *_cvtbuf;

  struct _rand48 *_r48;
  struct __tm *_localtime_buf;
  char *_asctime_buf;


  void (**(_sig_func))(int);


  struct _atexit *_atexit;
  struct _atexit _atexit0;

  struct _glue __sglue;
  __FILE *__sf;
  struct _misc_reent *_misc;
  char *_signal_buf;
};

extern const struct __sFILE_fake __sf_fake_stdin;
extern const struct __sFILE_fake __sf_fake_stdout;
extern const struct __sFILE_fake __sf_fake_stderr;
# 793 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/reent.h" 3
extern struct _reent *_impure_ptr ;
extern struct _reent *const _global_impure_ptr ;

void _reclaim_reent (struct _reent *);
# 46 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/stdio.h" 2 3
# 1 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/types.h" 1 3
# 25 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/types.h" 3
# 1 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/machine/_types.h" 1 3
# 22 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/machine/_types.h" 3
# 1 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/include/limits.h" 1 3 4
# 23 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/machine/_types.h" 2 3



typedef signed char __int8_t ;
typedef unsigned char __uint8_t ;
# 36 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/machine/_types.h" 3
typedef signed short __int16_t;
typedef unsigned short __uint16_t;
# 46 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/machine/_types.h" 3
typedef __int16_t __int_least16_t;
typedef __uint16_t __uint_least16_t;
# 58 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/machine/_types.h" 3
typedef signed int __int32_t;
typedef unsigned int __uint32_t;
# 76 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/machine/_types.h" 3
typedef __int32_t __int_least32_t;
typedef __uint32_t __uint_least32_t;
# 99 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/machine/_types.h" 3
typedef signed long long __int64_t;
typedef unsigned long long __uint64_t;
# 26 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/types.h" 2 3
# 69 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/types.h" 3
# 1 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/include/stddef.h" 1 3 4
# 152 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/include/stddef.h" 3 4
typedef long int ptrdiff_t;
# 326 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/include/stddef.h" 3 4
typedef int wchar_t;
# 70 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/types.h" 2 3
# 1 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/machine/types.h" 1 3
# 19 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/machine/types.h" 3
typedef long int __off_t;
typedef int __pid_t;

__extension__ typedef long long int __loff_t;
# 71 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/types.h" 2 3
# 92 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/types.h" 3
typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;



typedef unsigned short ushort;
typedef unsigned int uint;



typedef unsigned long clock_t;




typedef long time_t;




struct timespec {
  time_t tv_sec;
  long tv_nsec;
};

struct itimerspec {
  struct timespec it_interval;
  struct timespec it_value;
};


typedef long daddr_t;
typedef char * caddr_t;
# 135 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/types.h" 3
typedef unsigned short ino_t;
# 169 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/types.h" 3
typedef short dev_t;




typedef long off_t;

typedef unsigned short uid_t;
typedef unsigned short gid_t;





typedef int pid_t;



typedef long key_t;

typedef _ssize_t ssize_t;
# 203 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/types.h" 3
typedef unsigned int mode_t __attribute__ ((__mode__ (__SI__)));




typedef unsigned short nlink_t;
# 230 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/types.h" 3
typedef long fd_mask;







typedef struct _types_fd_set {
 fd_mask fds_bits[(((64)+(((sizeof (fd_mask) * 8))-1))/((sizeof (fd_mask) * 8)))];
} _types_fd_set;
# 261 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/types.h" 3
typedef unsigned long clockid_t;




typedef unsigned long timer_t;



typedef long useconds_t;

# 1 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/features.h" 1 3
# 273 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/types.h" 2 3
# 47 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/stdio.h" 2 3



typedef __FILE FILE;
# 59 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/stdio.h" 3
typedef _fpos_t fpos_t;





# 1 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/sys/stdio.h" 1 3
# 66 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/stdio.h" 2 3
# 170 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/stdio.h" 3
FILE * tmpfile (void);
char * tmpnam (char *);
int fclose (FILE *);
int fflush (FILE *);
FILE * freopen (const char *, const char *, FILE *);
void setbuf (FILE *, char *);
int setvbuf (FILE *, char *, int, size_t);
int fprintf (FILE *, const char *, ...);
int fscanf (FILE *, const char *, ...);
int printf (const char *, ...);
int scanf (const char *, ...);
int sscanf (const char *, const char *, ...);
int vfprintf (FILE *, const char *, __gnuc_va_list);
int vprintf (const char *, __gnuc_va_list);
int vsprintf (char *, const char *, __gnuc_va_list);
int fgetc (FILE *);
char * fgets (char *, int, FILE *);
int fputc (int, FILE *);
int fputs (const char *, FILE *);
int getc (FILE *);
int getchar (void);
char * gets (char *);
int putc (int, FILE *);
int putchar (int);
int puts (const char *);
int ungetc (int, FILE *);
size_t fread (void *, size_t _size, size_t _n, FILE *);
size_t fwrite (const void * , size_t _size, size_t _n, FILE *);



int fgetpos (FILE *, fpos_t *);

int fseek (FILE *, long, int);



int fsetpos (FILE *, const fpos_t *);

long ftell ( FILE *);
void rewind (FILE *);
void clearerr (FILE *);
int feof (FILE *);
int ferror (FILE *);
void perror (const char *);

FILE * fopen (const char *_name, const char *_type);
int sprintf (char *, const char *, ...);
int remove (const char *);
int rename (const char *, const char *);

void xil_printf (const char*, ...);
void putnum (unsigned int );
void print (char* );





int fseeko (FILE *, off_t, int);
off_t ftello ( FILE *);


int asiprintf (char **, const char *, ...);
int asprintf (char **, const char *, ...);
int dprintf (int, const char *, ...);
int fcloseall (void);
int fiprintf (FILE *, const char *, ...);
int iprintf (const char *, ...);
int siprintf (char *, const char *, ...);
int snprintf (char *, size_t, const char *, ...);
int sniprintf (char *, size_t, const char *, ...);
char * tempnam (const char *, const char *);
int vasiprintf (char **, const char *, __gnuc_va_list);
int vasprintf (char **, const char *, __gnuc_va_list);
int vdprintf (int, const char *, __gnuc_va_list);
int vsniprintf (char *, size_t, const char *, __gnuc_va_list);
int vsnprintf (char *, size_t, const char *, __gnuc_va_list);
int vfiprintf (FILE *, const char *, __gnuc_va_list);
int vfiscanf (FILE *, const char *, __gnuc_va_list);
int vfscanf (FILE *, const char *, __gnuc_va_list);
int viprintf (const char *, __gnuc_va_list);
int viscanf (const char *, __gnuc_va_list);
int vscanf (const char *, __gnuc_va_list);
int vsiscanf (const char *, const char *, __gnuc_va_list);
int vsscanf (const char *, const char *, __gnuc_va_list);
# 265 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/stdio.h" 3
FILE * fdopen (int, const char *);

int fileno (FILE *);
int getw (FILE *);
int pclose (FILE *);
FILE * popen (const char *, const char *);
int putw (int, FILE *);
void setbuffer (FILE *, char *, int);
int setlinebuf (FILE *);
int getc_unlocked (FILE *);
int getchar_unlocked (void);
void flockfile (FILE *);
int ftrylockfile (FILE *);
void funlockfile (FILE *);
int putc_unlocked (int, FILE *);
int putchar_unlocked (int);






int _asiprintf_r (struct _reent *, char **, const char *, ...);
int _asprintf_r (struct _reent *, char **, const char *, ...);
int _dprintf_r (struct _reent *, int, const char *, ...);
int _fcloseall_r (struct _reent *);
FILE * _fdopen_r (struct _reent *, int, const char *);
FILE * _fopen_r (struct _reent *, const char *, const char *);
int _fclose_r (struct _reent *, FILE *);
int _fiscanf_r (struct _reent *, FILE *, const char *, ...);
int _fscanf_r (struct _reent *, FILE *, const char *, ...);
int _fseek_r (struct _reent *, FILE *, long, int);
long _ftell_r (struct _reent *, FILE *);
int _getchar_r (struct _reent *);
char * _gets_r (struct _reent *, char *);
int _iprintf_r (struct _reent *, const char *, ...);
int _iscanf_r (struct _reent *, const char *, ...);
int _mkstemp_r (struct _reent *, char *);
char * _mktemp_r (struct _reent *, char *);
void _perror_r (struct _reent *, const char *);
int _printf_r (struct _reent *, const char *, ...);
int _putchar_r (struct _reent *, int);
int _puts_r (struct _reent *, const char *);
int _remove_r (struct _reent *, const char *);
int _rename_r (struct _reent *, const char *_old, const char *_new);

int _scanf_r (struct _reent *, const char *, ...);
int _siprintf_r (struct _reent *, char *, const char *, ...);
int _siscanf_r (struct _reent *, const char *, const char *, ...);
int _sniprintf_r (struct _reent *, char *, size_t, const char *, ...);
int _snprintf_r (struct _reent *, char *, size_t, const char *, ...);
int _sprintf_r (struct _reent *, char *, const char *, ...);
int _sscanf_r (struct _reent *, const char *, const char *, ...);
char * _tempnam_r (struct _reent *, const char *, const char *);
FILE * _tmpfile_r (struct _reent *);
char * _tmpnam_r (struct _reent *, char *);
int _ungetc_r (struct _reent *, int, FILE *);
int _vasiprintf_r (struct _reent *, char **, const char *, __gnuc_va_list);
int _vasprintf_r (struct _reent *, char **, const char *, __gnuc_va_list);
int _vdprintf_r (struct _reent *, int, const char *, __gnuc_va_list);
int _vfiprintf_r (struct _reent *, FILE *, const char *, __gnuc_va_list);
int _vfprintf_r (struct _reent *, FILE *, const char *, __gnuc_va_list);
int _viprintf_r (struct _reent *, const char *, __gnuc_va_list);
int _vprintf_r (struct _reent *, const char *, __gnuc_va_list);
int _vsiprintf_r (struct _reent *, char *, const char *, __gnuc_va_list);
int _vsprintf_r (struct _reent *, char *, const char *, __gnuc_va_list);
int _vsniprintf_r (struct _reent *, char *, size_t, const char *, __gnuc_va_list);
int _vsnprintf_r (struct _reent *, char *, size_t, const char *, __gnuc_va_list);
int _vfiscanf_r (struct _reent *, FILE *, const char *, __gnuc_va_list);
int _vfscanf_r (struct _reent *, FILE *, const char *, __gnuc_va_list);
int _viscanf_r (struct _reent *, const char *, __gnuc_va_list);
int _vscanf_r (struct _reent *, const char *, __gnuc_va_list);
int _vsscanf_r (struct _reent *, const char *, const char *, __gnuc_va_list);
int _vsiscanf_r (struct _reent *, const char *, const char *, __gnuc_va_list);

ssize_t __getdelim (char **, size_t *, int, FILE *);
ssize_t __getline (char **, size_t *, FILE *);
# 367 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/stdio.h" 3
int __srget (FILE *);
int __swbuf (int, FILE *);






FILE *funopen (const void * _cookie, int (*readfn)(void * _cookie, char *_buf, int _n), int (*writefn)(void * _cookie, const char *_buf, int _n), fpos_t (*seekfn)(void * _cookie, fpos_t _off, int _whence), int (*closefn)(void * _cookie));
# 476 "/cygdrive/c/Xilinx/10.1/EDK/gnu/microblaze/nt/bin/../lib/gcc/microblaze-xilinx-elf/4.1.1/../../../../microblaze-xilinx-elf/include/stdio.h" 3

# 3 "/cygdrive/c/EDK_Test_Interrupts/test_interrupts/main.c" 2
# 1 "./microblaze_0/include/xparameters.h" 1
# 4 "/cygdrive/c/EDK_Test_Interrupts/test_interrupts/main.c" 2
# 1 "./microblaze_0/include/xbasic_types.h" 1
# 95 "./microblaze_0/include/xbasic_types.h"
extern unsigned int XAssertStatus;
extern void XAssert(char *, int);







typedef unsigned char Xuint8;
typedef char Xint8;
typedef unsigned short Xuint16;
typedef short Xint16;
typedef unsigned long Xuint32;
typedef long Xint32;
typedef float Xfloat32;
typedef double Xfloat64;
typedef unsigned long Xboolean;

typedef struct
{
 Xuint32 Upper;
 Xuint32 Lower;
} Xuint64;






typedef Xuint32 u32;
typedef Xuint16 u16;
typedef Xuint8 u8;
# 138 "./microblaze_0/include/xbasic_types.h"
typedef void (*XInterruptHandler) (void *InstancePtr);





typedef void (*XExceptionHandler) (void *InstancePtr);





typedef void (*XAssertCallback) (char *FilenamePtr, int LineNumber);
# 289 "./microblaze_0/include/xbasic_types.h"
void XAssertSetCallback(XAssertCallback Routine);
void XNullHandler(void *NullParameter);
# 5 "/cygdrive/c/EDK_Test_Interrupts/test_interrupts/main.c" 2
# 1 "./microblaze_0/include/xgpio.h" 1
# 94 "./microblaze_0/include/xgpio.h"
# 1 "./microblaze_0/include/xbasic_types.h" 1
# 95 "./microblaze_0/include/xgpio.h" 2
# 1 "./microblaze_0/include/xstatus.h" 1
# 366 "./microblaze_0/include/xstatus.h"
typedef int XStatus;
# 96 "./microblaze_0/include/xgpio.h" 2
# 1 "./microblaze_0/include/xgpio_l.h" 1
# 67 "./microblaze_0/include/xgpio_l.h"
# 1 "./microblaze_0/include/xio.h" 1
# 72 "./microblaze_0/include/xio.h"
typedef u32 XIo_Address;
# 227 "./microblaze_0/include/xio.h"
void XIo_EndianSwap16(u16 Source, u16 *DestPtr);
void XIo_EndianSwap32(u32 Source, u32 *DestPtr);




u16 XIo_InSwap16(XIo_Address InAddress);
u32 XIo_InSwap32(XIo_Address InAddress);
void XIo_OutSwap16(XIo_Address OutAddress, u16 Value);
void XIo_OutSwap32(XIo_Address OutAddress, u32 Value);
# 68 "./microblaze_0/include/xgpio_l.h" 2
# 97 "./microblaze_0/include/xgpio.h" 2
# 105 "./microblaze_0/include/xgpio.h"
typedef struct {
 u16 DeviceId;
 u32 BaseAddress;
 int InterruptPresent;
 int IsDual;
} XGpio_Config;






typedef struct {
 u32 BaseAddress;
 u32 IsReady;
 int InterruptPresent;
 int IsDual;
} XGpio;
# 132 "./microblaze_0/include/xgpio.h"
int XGpio_Initialize(XGpio *InstancePtr, u16 DeviceId);
XGpio_Config *XGpio_LookupConfig(u16 DeviceId);




int XGpio_CfgInitialize(XGpio *InstancePtr, XGpio_Config * Config,
   u32 EffectiveAddr);
void XGpio_SetDataDirection(XGpio *InstancePtr, unsigned Channel,
       u32 DirectionMask);
u32 XGpio_GetDataDirection(XGpio *InstancePtr, unsigned Channel);
u32 XGpio_DiscreteRead(XGpio *InstancePtr, unsigned Channel);
void XGpio_DiscreteWrite(XGpio *InstancePtr, unsigned Channel, u32 Mask);





void XGpio_DiscreteSet(XGpio *InstancePtr, unsigned Channel, u32 Mask);
void XGpio_DiscreteClear(XGpio *InstancePtr, unsigned Channel, u32 Mask);




int XGpio_SelfTest(XGpio *InstancePtr);




void XGpio_InterruptGlobalEnable(XGpio *InstancePtr);
void XGpio_InterruptGlobalDisable(XGpio *InstancePtr);
void XGpio_InterruptEnable(XGpio *InstancePtr, u32 Mask);
void XGpio_InterruptDisable(XGpio *InstancePtr, u32 Mask);
void XGpio_InterruptClear(XGpio *InstancePtr, u32 Mask);
u32 XGpio_InterruptGetEnabled(XGpio *InstancePtr);
u32 XGpio_InterruptGetStatus(XGpio *InstancePtr);
# 6 "/cygdrive/c/EDK_Test_Interrupts/test_interrupts/main.c" 2
# 1 "C:/Xilinx/10.1/EDK/sw/XilinxProcessorIPLib/drivers/gpio_v2_12_a/data/gpio_header.h" 1



# 1 "./microblaze_0/include/xbasic_types.h" 1
# 5 "C:/Xilinx/10.1/EDK/sw/XilinxProcessorIPLib/drivers/gpio_v2_12_a/data/gpio_header.h" 2
# 1 "./microblaze_0/include/xstatus.h" 1
# 6 "C:/Xilinx/10.1/EDK/sw/XilinxProcessorIPLib/drivers/gpio_v2_12_a/data/gpio_header.h" 2

XStatus GpioOutputExample(Xuint16 DeviceId, Xuint32 GpioWidth);
XStatus GpioInputExample(Xuint16 DeviceId, Xuint32 *DataRead);
# 7 "/cygdrive/c/EDK_Test_Interrupts/test_interrupts/main.c" 2
# 1 "./microblaze_0/include/xuartlite.h" 1
# 134 "./microblaze_0/include/xuartlite.h"
typedef void (*XUartLite_Handler)(void *CallBackRef, unsigned int ByteCount);




typedef struct {
 u32 TransmitInterrupts;
 u32 ReceiveInterrupts;
 u32 CharactersTransmitted;
 u32 CharactersReceived;
 u32 ReceiveOverrunErrors;
 u32 ReceiveParityErrors;
 u32 ReceiveFramingErrors;
} XUartLite_Stats;






typedef struct {
 u8 *NextBytePtr;
 unsigned int RequestedBytes;
 unsigned int RemainingBytes;
} XUartLite_Buffer;




typedef struct {
 u16 DeviceId;
 u32 RegBaseAddr;
 u32 BaudRate;
 u8 UseParity;
 u8 ParityOdd;

 u8 DataBits;
} XUartLite_Config;






typedef struct {
 XUartLite_Stats Stats;
 u32 RegBaseAddress;
 u32 IsReady;

 XUartLite_Buffer SendBuffer;
 XUartLite_Buffer ReceiveBuffer;

 XUartLite_Handler RecvHandler;
 void *RecvCallBackRef;
 XUartLite_Handler SendHandler;
 void *SendCallBackRef;
} XUartLite;
# 201 "./microblaze_0/include/xuartlite.h"
int XUartLite_Initialize(XUartLite *InstancePtr, u16 DeviceId);
XUartLite_Config *XUartLite_LookupConfig(u16 DeviceId);




int XUartLite_CfgInitialize(XUartLite *InstancePtr,
    XUartLite_Config *Config,
    u32 EffectiveAddr);

void XUartLite_ResetFifos(XUartLite *InstancePtr);

unsigned int XUartLite_Send(XUartLite *InstancePtr, u8 *DataBufferPtr,
    unsigned int NumBytes);
unsigned int XUartLite_Recv(XUartLite *InstancePtr, u8 *DataBufferPtr,
    unsigned int NumBytes);

int XUartLite_IsSending(XUartLite *InstancePtr);




void XUartLite_GetStats(XUartLite *InstancePtr, XUartLite_Stats *StatsPtr);
void XUartLite_ClearStats(XUartLite *InstancePtr);




int XUartLite_SelfTest(XUartLite *InstancePtr);




void XUartLite_EnableInterrupt(XUartLite *InstancePtr);
void XUartLite_DisableInterrupt(XUartLite *InstancePtr);

void XUartLite_SetRecvHandler(XUartLite *InstancePtr, XUartLite_Handler FuncPtr,
    void *CallBackRef);
void XUartLite_SetSendHandler(XUartLite *InstancePtr, XUartLite_Handler FuncPtr,
    void *CallBackRef);

void XUartLite_InterruptHandler(XUartLite *InstancePtr);
# 8 "/cygdrive/c/EDK_Test_Interrupts/test_interrupts/main.c" 2
# 1 "C:/Xilinx/10.1/EDK/sw/XilinxProcessorIPLib/drivers/uartlite_v1_13_a/data/uartlite_header.h" 1



# 1 "./microblaze_0/include/xbasic_types.h" 1
# 5 "C:/Xilinx/10.1/EDK/sw/XilinxProcessorIPLib/drivers/uartlite_v1_13_a/data/uartlite_header.h" 2
# 1 "./microblaze_0/include/xstatus.h" 1
# 6 "C:/Xilinx/10.1/EDK/sw/XilinxProcessorIPLib/drivers/uartlite_v1_13_a/data/uartlite_header.h" 2

XStatus UartLiteSelfTestExample(Xuint16 DeviceId);
# 9 "/cygdrive/c/EDK_Test_Interrupts/test_interrupts/main.c" 2
# 1 "./microblaze_0/include/fsl.h" 1




# 1 "./microblaze_0/include/mb_interface.h" 1
# 38 "./microblaze_0/include/mb_interface.h"
extern void microblaze_enable_interrupts(void);
extern void microblaze_disable_interrupts(void);
extern void microblaze_enable_icache(void);
extern void microblaze_disable_icache(void);
extern void microblaze_enable_dcache(void);
extern void microblaze_disable_dcache(void);
extern void microblaze_enable_exceptions(void);
extern void microblaze_disable_exceptions(void);
extern void microblaze_register_handler(XInterruptHandler Handler, void *DataPtr);
extern void microblaze_register_exception_handler(Xuint8 ExceptionId, XExceptionHandler Handler, void *DataPtr);
extern void microblaze_update_icache (int , int , int );
extern void microblaze_init_icache_range (int , int );
extern void microblaze_update_dcache (int , int , int );
extern void microblaze_init_dcache_range (int , int );
# 6 "./microblaze_0/include/fsl.h" 2
# 10 "/cygdrive/c/EDK_Test_Interrupts/test_interrupts/main.c" 2
# 1 "/cygdrive/c/EDK_Test_Interrupts/test_interrupts/aes.h" 1
# 30 "/cygdrive/c/EDK_Test_Interrupts/test_interrupts/aes.h"
unsigned char Key[16], in[16], out[16], state[4][4];


unsigned char RoundKey[240];




int Rcon[255] = {
    0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a,
    0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39,
    0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a,
    0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8,
    0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef,
    0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc,
    0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b,
    0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3,
    0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94,
    0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20,
    0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35,
    0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f,
    0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04,
    0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63,
    0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd,
    0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb };



int getSBoxValue(int num);
void KeyExpansion();
void AddRoundKey(int round);

void aesEncryption(unsigned char AES_Key[16], unsigned char AES_in[16], unsigned char AES_out[16])
void SubBytes();
void ShiftRows();
void MixColumns();
void Cipher();

void aesDecryption(unsigned char AES_Key[16], unsigned char AES_in[16], unsigned char AES_out[16]);
int getSBoxInvert(int num);
void InvSubBytes();
void InvShiftRows();
void InvMixColumns();
void InvCipher();
# 11 "/cygdrive/c/EDK_Test_Interrupts/test_interrupts/main.c" 2
# 1 "/cygdrive/c/EDK_Test_Interrupts/test_interrupts/trojandetection.h" 1
# 10 "/cygdrive/c/EDK_Test_Interrupts/test_interrupts/trojandetection.h"
void InitPeripherals();
void GetUserData(Xuint32 UserData[4]);
void SendToEncrypt(Xuint32 UserData[4]);
void GetEncryptResults(Xuint32 EncryptedData[4]);
void SendToUser(Xuint32 EncryptedData[4]);
# 12 "/cygdrive/c/EDK_Test_Interrupts/test_interrupts/main.c" 2


XGpio switches, LEDS;
XUartLite myUART;

int main (void)
{


 unsigned char key[16] = "thisisthebestkey";

 unsigned char cipherout[16];

 int i = 0;
 Xuint32 UserData[4];
 Xuint32 EncryptedData[4];



 InitPeripherals();

 while(1)
 {

  GetUserData(UserData);


  SendToEncrypt(UserData);


  aesEncryption(key, (unsigned char) UserData, cipherout);


  GetEncryptResults(EncryptedData);




  if((unsigned char) EncryptedData != cipherout)
   return 0;
  else
   SendToUser(EncryptedData);

 }

   return 0;
}
 

0 Kudos
Xilinx Employee
Xilinx Employee
11,352 Views
Registered: ‎01-18-2008

Re: Problems with MicroBlaze Compilation Errors

The main issue is that in your aes.h, you've declared the function:

 

void aesDecryption(unsigned char AES_Key[16], unsigned char AES_in[16], unsigned char AES_out[16])

 

and that declaration doesn't end in a semi colon.

 

Once you fix that, you'll see a few obvious type errors. 

 

 

0 Kudos
Visitor delvecch
Visitor
2,808 Views
Registered: ‎08-13-2008

Re: Problems with MicroBlaze Compilation Errors

Wow, it's always the simplest thing that I overlook!  Thanks a lot, it's always good to have another pair of eyes looking at something...
0 Kudos