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

Declare function that doesn't automatically save register when called.

Hi all, In Keil C51 compiler, is there any way to declare a function that doesn't automatically save registers (acc, b, dptr, r0-r7...) when called? I want to do it manually. In SDCC, I can use the attribute "_naked" or use #pragma callee_saves". Thanks,

Parents
  • "My project is not only on 8051 MCU but also on other architecture such as ARM, 68HC, AVR... So I need the RTOS that can port to alot MCU architect"

    I think you missed the point there!

    I said, "In most cases of most projects suited to an 8051, an RTOS is overkill"

    That can generally be re-stated as, "In most cases of most projects suited to a small 8-bit microntroller, an RTOS is overkill"

    I think 68HC, AVR, and 8051 all count as "small 8-bit microntrollers".

    Therefore the question is, do the parts of your project that run on the 68HC, AVR, and/or 8051 really need any RTOS at all?

    Yes, it's quite likely that the ARM-based part(s) could warrant an RTOS; but a lot less likely for the 8-bitters.

Reply
  • "My project is not only on 8051 MCU but also on other architecture such as ARM, 68HC, AVR... So I need the RTOS that can port to alot MCU architect"

    I think you missed the point there!

    I said, "In most cases of most projects suited to an 8051, an RTOS is overkill"

    That can generally be re-stated as, "In most cases of most projects suited to a small 8-bit microntroller, an RTOS is overkill"

    I think 68HC, AVR, and 8051 all count as "small 8-bit microntrollers".

    Therefore the question is, do the parts of your project that run on the 68HC, AVR, and/or 8051 really need any RTOS at all?

    Yes, it's quite likely that the ARM-based part(s) could warrant an RTOS; but a lot less likely for the 8-bitters.

Children