0

I am trying to cross compile a FreeRTOS application for the an ARM Cortex A8 (beaglebone black) and i am getting errors from an assembly source code which is unfamiliar with the @ symbol. It seems that the original author used it as a comment but its produces this error when i try to compile it on debian 10 with the arm-linux-gnueabihf-gcc compiler i get the following error:

/ported_amm335x_init.S:1:Error: junk at the end of the line, first unrecognized character is '@'

This error repeats for each line of code since its used for comments through out. The code can be found here:https://github.com/kryochronic/AM335X-FreeRTOS-lwip/blob/master/src/portable/AM335X/ported_amm335x_init.S

I'm i using the wrong compiler? I usually use this compiler when cross compiling for the beaglebone black so i would like to stick with it. Any help will be appreciated, thank you.

9
  • If that's all of your problems, do a text replace. Or, since it seems to be preprocessed assembly, it might work with a #define or a -D command line argument.
    – Jester
    Dec 30, 2020 at 18:40
  • Stack Overflow questions must be self contained. Please add a minimal reproducible example to the question and state exact tool versions and how you invoke them.
    – fuz
    Dec 30, 2020 at 18:49
  • assembly language is defined by the tool not the target. gnu assembler sadly uses the at sign to indicate a comment from that point to the end of line, where most of the other assembly languages for all targets for all time have used a semicolon. This would imply a non-gnu assembler is being used. But you say that you are using gcc which of course is not an assembler and is in fact yet another assembly langauge different from gas, but still similar or for some reason your gcc is using a different assembler, but that would break completely as gcc generates gas asm not armasm, etc.
    – old_timer
    Dec 30, 2020 at 20:24
  • since you are feeding the assembly language to a compiler not an assembler, gcc in particular, then try replacing the at symbols with the C++ style double forward slash. I suspect you have some much more systemic or fundamental problem here as gcc has no problem with the at symbol used as a comment. YMMV, try even changing one line or doing a targetted experiment with just gcc and a .S file that you create with just a few lines in it
    – old_timer
    Dec 30, 2020 at 20:26
  • while doing that check the command line arguments for gcc the solution may be one of those arguments is causing this.
    – old_timer
    Dec 30, 2020 at 20:28

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.