This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

8bit Atmel Project not building in Keil for Cortex M3

Hello!
I have a project of 8bit Atmel Microcontroller.
I want this project to be compiled in Keil for Cortex M3 Microcontroller.
But I have some issues.

1. I have an error "SFR undefined identifier". The compiler does not understand what SFR means .

2. There are 2 files with assembler code. The compiler displays a lot of mistakes in all these files.

How to compile this project?

Parents
  • I don't know where you got the idea that this should be possible - but it isn't.

    Embedded microcontroller code tends to be very target specific, especially at the lower end - such as 8-bit.

    You cannot just take code written for one microcontroller and expect it to "just work" on another entirely different microcontroller.

    Sorry.

    "The compiler does not understand what SFR means"

    Generically, "SFR" means "Special Function Register" - which refers to the registers which directly control the special hardware functions of the chip.
    It should come as no surprise that these are not portable.

    Specifically, the Keil C51 compiler has "sfr" as a proprietary language extension - so that is clearly not going to be portable.

    http://www.keil.com/support/man/docs/c51/c51_le_sfrs.htm

    "There are 2 files with assembler code. The compiler displays a lot of mistakes in all these files"

    Of course it does - Assembler is inherently target-specific and, thus, not portable

Reply
  • I don't know where you got the idea that this should be possible - but it isn't.

    Embedded microcontroller code tends to be very target specific, especially at the lower end - such as 8-bit.

    You cannot just take code written for one microcontroller and expect it to "just work" on another entirely different microcontroller.

    Sorry.

    "The compiler does not understand what SFR means"

    Generically, "SFR" means "Special Function Register" - which refers to the registers which directly control the special hardware functions of the chip.
    It should come as no surprise that these are not portable.

    Specifically, the Keil C51 compiler has "sfr" as a proprietary language extension - so that is clearly not going to be portable.

    http://www.keil.com/support/man/docs/c51/c51_le_sfrs.htm

    "There are 2 files with assembler code. The compiler displays a lot of mistakes in all these files"

    Of course it does - Assembler is inherently target-specific and, thus, not portable

Children