Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Assembler error in the 4.2.1 Arm toolchain: (2 Items)
   
Assembler error in the 4.2.1 Arm toolchain  
I pulled down GCC 4.2.1 yesterday and attempted to build my projects code base with it.  Everything was working until it
 attempted to assemble one of the files in our BSP.

I received the following error:

Error: junk at end of line, first unrecognized character is `L'

BTW: The code builds just fine under 3.3.5.



I did some digging and found this online at http://www.osdev.org/osfaq2/index.php/GCC%20Cross-Compiler

Error: junk at end of line, first unrecognized character is ','

This, in combination with lots of other assembly-level error messages (like, Warning: .type pseudo-op used outside of .
def/.endef ignored, or Error: unknown pseudo-op: '.local') results when you did not correctly set the --prefix=$PREFIX 
during the binutils configure.

Another possibility is that you did configure, compile and install your cross-compiler correctly, but don't actually use
 it. Check the "Usage" section above.

    If you try compiling in 64-bit windows, you will receive a "Unknown host machine type" error when running configure.
 To fix this, scroll up in your shell until right after you entered the configure command and you will see a website 
which will show you where to download updated files to guess host type. Put them in the root directory of where your 
source files are located. With GCC version 3.4.0 you will have to override the host enviroment though, as it does not 
support being compiled with x86_64-unknown-cygwin. Add the command line argument --host=i686-unknown-cygwin to the 
configure line for GCC. --CjMovie (Too many edits to get this right...)


So based on this it seems that the binutils package wasn't properly configured when making creating the arm toolchain.  
But this is just a guess on my part. 
Re: Assembler error in the 4.2.1 Arm toolchain  
In the assembly code for the BSP, there is a constant with an L suffix.

$ cat t.s
        .text
Lpaddr: .word 0x48028000L

 $ ntoarm-as t.s
t.s: Assembler messages:
t.s:2: Warning: rest of line ignored; first ignored character is `L'

$ ntoarm-as-2.17 t.s
t.s: Assembler messages:
t.s:2: Error: junk at end of line, first unrecognized character is `L'

The L suffix on the hex constant isn't valid syntax. The new assembler (from Binutils 2.17)  now produces an error 
instead of a warning. 

If you remove the L from the constant, the BSP builts without error.

Regards,

Ryan Mansfield