gcc flags: m5200 vs m5206e vs m5208

Discussion to talk about software related topics only.
Post Reply
greengene
Posts: 164
Joined: Wed May 14, 2008 11:20 am
Location: Lakeside, CA

gcc flags: m5200 vs m5206e vs m5208

Post by greengene »

does it matter?

also, why/what diff with use of MCF5282 and MOD5282?

enquiring minds want to know.
User avatar
lgitlitz
Posts: 331
Joined: Wed Apr 23, 2008 11:43 am
Location: San Diego, CA
Contact:

Re: gcc flags: m5200 vs m5206e vs m5208

Post by lgitlitz »

These m52xx flags tell the assembler things about the processor core hardware... does it have hardware divide, what type of multiply accumulator, the instruction set, if there is an FPU... ect. The processors used by NetBurner either have a MAC (5213, 5272, L2E) and all others have the eMAC. The 5272 is the only processor that uses instruction set ISA_A, all the others use ISA_A+. The A+ only adds 4 instructions, BITREV, BYTEREV, FF1, STRLDSR. The compiler does not make use of either MAC. The compiler rarely makes use of the extra instructions but they do add more uses once in awhile in gcc updates. The main use of these flags are to give you the ability to manually use these features in an assembly file. The NNDK is set up so each platform allows for all its instructions and correct MAC to be used in your application.

The MCF5282 and MOD5282 will define the platform and processor you are using for some common source files. The MCF5270 is a better example since it has many products such as the SB70, SB70LC, PK70, MOD5270. The MCF5270 definition will be used when defining code that is common to a processor type, such as the Ethernet driver. The MOD5270 definition will be used to define code that belongs to that single platform, such as controlling a specific pin since the pin-out varies between products. This can also be useful in your own application if you are developing code for multiple NetBurner platforms:
#ifdef MCF5282
... mcf5282 processor specific code
#endif

#ifdef SB70LC
...sb70lc product specific code
#endif
greengene
Posts: 164
Joined: Wed May 14, 2008 11:20 am
Location: Lakeside, CA

Re: gcc flags: m5200 vs m5206e vs m5208

Post by greengene »

we've currently deployed with 2.2rc2 which seems to use MOD5282 much more
than 2.4 which uses MCF5282 more. for example, in the qspi.cpp, it looks like
MOD5282 was replaced enmasse with MCF5282.
since we get into the libraries some i was trying to determine whether NB uses
them interchangably or whether we really need to look for the distinctions.

as for the m52xx flags, 5206 and 5208 are used in different makefiles and
wondered if they should always be one or the other for 5282 and/or 5270?
i think i've gotten errors trying to use 5208 in the past. is this just a gcc
version issue?
Post Reply