I would like to try changing the mcpu option for the NANO54415 so that I can use the BYTEREV instruction. In another thread, I received the following advice:
This is a cpu flags problem to the assembler problem...
from a make file add
CPUFLAG=mcpu=54455
under elcipse you need to modify the project settings in c/c++ settings -> gnuc and c++ compiler
CPUFLAG=mcpu=54455
The instructions are
byterev %d0
byterev.l %d0
For the life of me, I can't figure out how to set this option. I tried adding "-mcpu=54455" to the Miscellaneous options for GNU C++ Compiler, but then it did not replace the default -mcpu=5206e option so I got an error. I tried modifying the PROPERTIES file under the NBEclipse/NANO54415 folder to include the CPUFLAG=mcpu=54415, but it had no effect. Can someone please direct me through the process of replacing the -mcpu=5206e with -mcpu=54455? I do not see in the GUI where this value is defined.
Changing -mcpu option for compiler/assembler/etc
Re: Changing -mcpu option for compiler/assembler/etc
Hello,
There is three things you will need to do.
1)
Build nb-crt0.s for the m54455. This is done by going to nburn/gcc-m68k/m68k-elf/lib and building it with
2)
Open nburn/NANO54415/PROPERTIES
edit DASHM variable to be -mcpu=54455
3) Right click on project in NBEclipse and select properties. Under NetBurner options, click Reload selection platforms properties file and click ok.
I did not test this, but that is the normal process when adding new platforms.
There is three things you will need to do.
1)
Build nb-crt0.s for the m54455. This is done by going to nburn/gcc-m68k/m68k-elf/lib and building it with
Code: Select all
m68k-elf-as -mcpu=54455 nb-crt0.s -om54455/nb-crt0.o
Open nburn/NANO54415/PROPERTIES
edit DASHM variable to be -mcpu=54455
3) Right click on project in NBEclipse and select properties. Under NetBurner options, click Reload selection platforms properties file and click ok.
I did not test this, but that is the normal process when adding new platforms.
Forrest Stanley
Project Engineer
NetBurner, Inc
NetBurner Learn Articles: http://www.netburner.com/learn
Project Engineer
NetBurner, Inc
NetBurner Learn Articles: http://www.netburner.com/learn
Re: Changing -mcpu option for compiler/assembler/etc
That appears to have done the trick - my endian swap macro using BYTEREV is now working. Thanks, Forrest!