Problem running software on Cyclone 3 board.

Thread Starter

koundinya

Joined Apr 9, 2013
9
Hi all,
I'm currently developing software application to run on my nios processor using Nios2 SBT.
I have designed my board to glow the LED's depending on the values it reads from the register. I'm developing software to write into the register through Avalon bus interface. But, to get the BSP's and other files required i used an existing example from the templates( Hello world small) and generated BSP's and built the project. So out of curiosity i tried running Hello world small .elf file generated on my board. But i get the following message when i download the .elf on my board
" Pausing target processor : Not responding
Resetting and trying again : OK
Initiating CPU cache <if present>
OK
Downloaded 1KB 0.0s\Verified OK
Starting processor at address 0x00008020"
Then when i try and run it it does not work but terminates.
So my question is "Is it because my board is designed to function differently from the developed software or is there any other problem"
Please help.
 

tshuck

Joined Oct 18, 2012
3,534
Not sure, but the *.elf could have been made for a different version of the processor, or you may not have the required configuration as what the file was compiled against.

The Altera forums would probably be of better use for this question.
 

Brownout

Joined Jan 10, 2012
2,390
Did you build your nios system using SOPC builder or Qsys? If so, then you export your system to the software using your SOPC_info file ( or whatever the analog is in Qsys) That is part of setting up your software. Doing this insures your BSP is right for you system, and you shouldn't have any problems.

I suggest going back to your 'hello world' and adding the rest of the code a little at a time. Or post your code and we can take a look at it. I think you simply open the device as a file and write to the pointer that is returned from the open statement. This should work very simply.
 

Thread Starter

koundinya

Joined Apr 9, 2013
9
I created the SOPC using Qsys.
Hello World message was not displayed because i had connected cpu instruction master to Jtag module instead of cpu data master. After i made the change
its working and message gets displayed.
Thank you.

But now i'm facing another problem on how to scan characters from the console and writing into the register.
Should i create a pointer to the Jtag module..?
Please help.
 

Brownout

Joined Jan 10, 2012
2,390
Not that I know of. You'll need a library function to do console I/O. If you can't include the libraries, then I dont' have another solution.
 

Thread Starter

koundinya

Joined Apr 9, 2013
9
altera_avalon_jtag_uart_regs.h i came across this library but i couldn't find any details on how to use this library and the functions it supports..
 

Brownout

Joined Jan 10, 2012
2,390
I think you need the standard C libraries, stdio and conio to use scanf. There might be a small C library option, I can't remember anymore. I only ever compiled 1 program with small RAM.
 
Top