Quantcast
Channel: Altera Forums
Viewing all articles
Browse latest Browse all 19390

In ALTERA Monitor it works, in Eclipse EDS it doesn't?

$
0
0
Hello people!

I have followed the tutorial "Introduction to Qsys" from the ALTERA University program where a very small VHDL system is created plus an instantiation of the Nios II and some switches as inputs and some LEDs as outputs assigned at the pins.

I wrote and compiled the program that justs propagates the switch values to the LEDs using the ALTERA Monitor program and it works fine.

When I try to do the same using the Nios EDS in Eclipse it compiles perfectly but when the program gets downloaded into the device the LEDS not only do they not follow the switch values but they do not light up at all.

In order to do the example in Eclipse EDS I just created an application and BSP from the template small Hello world and added the AVALON-MM addresses of the swithes and the LEDs plus the propagation command.

Code:

#include "sys/alt_stdio.h"

#define switches (volatile char *) 0x2010
#define leds (char *) 0x2000

int main()
{
  alt_putstr("Hello from Nios II!\n");

  /* Event loop never exits. */
  while (1) *leds = *switches;


  return 0;
}

What is the problem? Why isn't it working in Eclipse EDS?

Regards

Viewing all articles
Browse latest Browse all 19390

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>