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: 
Highlighted
Observer m_nabil1974
Observer
7,200 Views
Registered: ‎08-01-2008

Assembly code

Jump to solution

hi guys;

I am new in the MicroBlaze world.

I read the Microblaze manuals and I can say that now I can write an assembly code for the MicroBlaze.

My problem is how can I use the EDK 9.2 tool to debug and compile my assembly code?

 

cheers

0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
8,415 Views
Registered: ‎08-06-2007

Re: Assembly code

Jump to solution

Hi,

 

To create an assembler application in XPS do the following:

1. Create a new software application project in XPS

2. Right click on the Software Project and choose "Set Compiler Options"

3. In the ´"Environment" tab, set the "Program Start Address" to 0x0

4. In the "Path and Options" tab, add -nostdlib for "Other Compiler Options to Append"

 

Now you can just add your assemble files as sources to your project and compile your application.

Make sure that you have "Mark to Initialize BRAM" on your software project.

The compiler option added in step 4, is to prevent the compiler for adding all C code initialization routines which would have messed up your assembler project.

if you have the extension ".S" for your assembler files, GCC preprocessing will occur and with a ".s" no preprocessing is perfomed.

 

 

Göran

 

5 Replies
Xilinx Employee
Xilinx Employee
7,190 Views
Registered: ‎08-07-2007

Re: Assembly code

Jump to solution

May I know why are you going for assembly rather than C code?

 

-XF

0 Kudos
Xilinx Employee
Xilinx Employee
7,176 Views
Registered: ‎08-13-2007

Re: Assembly code

Jump to solution

You may find this useful:

http://forums.xilinx.com/xlnx/board/message?board.id=EDK&message.id=7706 (May I use MacroBlaze Assembly in SDK)

As XF implies, there are multiple reasons why C is generally recommended if you are just starting with MicroBlaze.

 

bt

Observer m_nabil1974
Observer
7,136 Views
Registered: ‎08-01-2008

Re: Assembly code

Jump to solution
Many thanks for the valuable replies.Dear xiaofeip: actually, the reason behind using the assembly is my prior knowledge with the assembly programming from 8051 and PIC and of course the PicoBlaze.So I find it easier to manage my application with it eventhought I know it is very tedious way for many programmers.Dear timpe :I followed most of your links that you gave to me. Really, they are very helpful.  Regarding the compiler links, my questions are; Should I download the complier and then compile my assembly file with extension x.s?If so, what are the output files of this process?Or in other words, how can I include the assembler output into the EDK tool?Sorry for my lengthy questions.  Kind regards;

 

0 Kudos
Xilinx Employee
Xilinx Employee
8,416 Views
Registered: ‎08-06-2007

Re: Assembly code

Jump to solution

Hi,

 

To create an assembler application in XPS do the following:

1. Create a new software application project in XPS

2. Right click on the Software Project and choose "Set Compiler Options"

3. In the ´"Environment" tab, set the "Program Start Address" to 0x0

4. In the "Path and Options" tab, add -nostdlib for "Other Compiler Options to Append"

 

Now you can just add your assemble files as sources to your project and compile your application.

Make sure that you have "Mark to Initialize BRAM" on your software project.

The compiler option added in step 4, is to prevent the compiler for adding all C code initialization routines which would have messed up your assembler project.

if you have the extension ".S" for your assembler files, GCC preprocessing will occur and with a ".s" no preprocessing is perfomed.

 

 

Göran

 

Observer m_nabil1974
Observer
7,090 Views
Registered: ‎08-01-2008

Re: Assembly code

Jump to solution

dear goran_bilski :

 

Thanks for the helpful reply.But I have a couple of questions.What kind of compilers do you suggest me to use?After the compilation is done; are there any additional files in addition to the file ".s" should be included to my project files?

 

0 Kudos