To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.nxt.nxthackingOpen lugnet.robotics.nxt.nxthacking in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / NXT / NXT Firmware Hacking / 106
105  |  107
Subject: 
Re: ARM Assembly Language Programming on NXT?
Newsgroups: 
lugnet.robotics.nxt.nxthacking
Date: 
Tue, 16 Oct 2007 02:27:35 GMT
Viewed: 
21260 times
  
Hi Juergen,

Thanks for replying.

In lugnet.robotics.nxt.nxthacking, Juergen Stuber wrote:
Hi T.C.,

"TC Wan" <tcwan99@gmail.com> writes:

You're right, I've come across several ARM-based SBC and
SDK boards previously.  I haven't found any SDK solutions
that I'm fully satisfied with at the moment, due to the
provided development environment (most are Windows based)
and limited bundled interfacing options.

I have an AT91SAM7S-EK here, it has 4 LEDs and 4 touch buttons.
It should also be fairly easy to write a driver for one of the
serial ports (polling would suffice for a start).


On the NXT the only I/O that is easy to use with the standard parts
is the LED on the light sensor (it is on a GPIO port of the ARM).

The motor encoders are also directly accessible, but it wouldn't
be easy to control them, since they would switch quite rapidly
when the motor is turned.  You could try some counting,
e.g. toggling the LED for every n degrees.


Thanks for the info. My goal is to run and debug ARM assembly language programs
executing in RAM. I was not familiar with the NXT, so currently I'm looking at
the on-board capabilities. I realized after some offline discussions with
members of this newsgroup that interfacing on the NXT is going to be
challenging, especially at the ARM Assembly Language level. While it is not an
insurmountable problem given appropriate I/O libraries, currently the more
pressing issue is the availability of a single-stepping debugger in firmware.


I was reading a little into the ARM architecture, which indicates that the BRKPT
instruction is only available on ARM-5 architecture whereas the ATMEL part is
AFAIK, ARM-4T only. I'm still new to the ARM architecture so I'm not sure if
software breakpoint emulation unsing the Undefined Instruction Exception (while
keeping binary compatibility with the BRKPT opcode) would be the best way to
solve this problem. Else a SWI trigger could be used, depending on the interrupt
level prioritization.

For a teaching environment, I'd prefer a Linux based platform.

You mentioned in your previous post that you found GNU assembler
difficult to use, can you elaborate on what exactly is the problem?
In my experience the assembler itself is quite easy to use,
but setting up the linking and loading was difficult.


The difficulty I have with GNU as is when I read books on ARM assembly language
programming, and then trying to figure out how to map them to equivalent GNU as
directives, syntax, etc.

I believe GNU was designed primarily to be the backend to machine generated
code, so fast execution was more important than human readability. One example
is in the macro definition and conditional control directives.

In addition, it is platform agnostic, so the documentation is pretty lacking
when it comes to ARM specific opcodes, operands and issues.
The reference I found was:
http://www.gnu.org/software/binutils/manual/gas-2.9.1/html_mono/as.html
I haven't investigated linking and loading issues yet.

Thanks for all your help,
T.C.



Message has 2 Replies:
  Re: ARM Assembly Language Programming on NXT?
 
(...) Sorry, I found a more recent version, but it's still missing some parts on the ARM architecture: (URL) also found the following Intro guide (which is better than nothing): (URL) (17 years ago, 16-Oct-07, to lugnet.robotics.nxt.nxthacking)
  Re: ARM Assembly Language Programming on NXT?
 
Hi T.C. (...) aha. I just programmed some startup and interrupt wrapper code (the rest is C), so I didn't get into the higher reaches of macros etc. Jürgen (17 years ago, 16-Oct-07, to lugnet.robotics.nxt.nxthacking)

Message is in Reply To:
  Re: ARM Assembly Language Programming on NXT?
 
Hi T.C., (...) I have an AT91SAM7S-EK here, it has 4 LEDs and 4 touch buttons. It should also be fairly easy to write a driver for one of the serial ports (polling would suffice for a start). On the NXT the only I/O that is easy to use with the (...) (17 years ago, 14-Oct-07, to lugnet.robotics.nxt.nxthacking)

8 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR