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

RTX Code Banking

Hi all,
In RTX we can assign a function as a task with the _task_ #NO tag.

When calling os_create_task we just pass this task number as a parameter.

Assume one has to use banking, in this case,
how does RTX identify, in which bank the function exists ?

from where does rtx get information about the banks of any task at runtime ?

regards
pachu

Parents
  • If you don't need a more powerful processor there's no benefit in using one. A more powerful processor is also likely to consume more power which for many applications is a problem.
    Timing - Timing - Timing
    what about it?
    When you overload the poor little bugger, suddenly your serial int does not get processed in ti,e and a fuse blows because you do not get a port pin pulled low fast enough.

    Of course if you suffer from tyhe misconception that the '51 is a microprocessor rather than a microcontroller, all your wrong statements will be right if that premise is accepted.

    Erik

    BTW re the statement about power consumption; for some reason '51s whatever the derivative are anything but power misers.

Reply
  • If you don't need a more powerful processor there's no benefit in using one. A more powerful processor is also likely to consume more power which for many applications is a problem.
    Timing - Timing - Timing
    what about it?
    When you overload the poor little bugger, suddenly your serial int does not get processed in ti,e and a fuse blows because you do not get a port pin pulled low fast enough.

    Of course if you suffer from tyhe misconception that the '51 is a microprocessor rather than a microcontroller, all your wrong statements will be right if that premise is accepted.

    Erik

    BTW re the statement about power consumption; for some reason '51s whatever the derivative are anything but power misers.

Children
  • "Timing - Timing - Timing
    what about it?
    When you overload the poor little bugger, suddenly your serial int does not get processed in ti,e"

    How do you figure that? Interrupts interrupt the normal flow of program execution. It doesn't matter what the foreground process is doing. But once again you seem to think that using certain tools or facilities will inevitably 'overload' the 8051. I keep trying to explain to you that this is not a Universal Truth. You may believe it, but you are wrong.

    "and a fuse blows because you do not get a port pin pulled low fast enough."

    You design circuits with the 8051 that blow fuses when port pins are high? Time for another look at the drawing board, I think.

    "Of course if you suffer from tyhe misconception that the '51 is a microprocessor rather than a microcontroller, all your wrong statements will be right if that premise is accepted."

    I don't really get this. You're saying I'm right if I call the thing by a different name?

    "BTW re the statement about power consumption; for some reason '51s whatever the derivative are anything but power misers."

    However, I take it that you can see some sort of link between more powerful processors and increased power consumption?

  • "Of course if you suffer from the misconception that the '51 is a microprocessor rather than a microcontroller, all your wrong statements will be right if that premise is accepted."

    I don't really get this. You're saying I'm right if I call the thing by a different name?


    A microprocessor is a numbercruncher that should react in less than a second, a microcontroller is a device that shall react NOW.

    If you want to mislabel the '51 as a microprocessor (which it aint) you can state all kinds of things from that premise.

  • "you seem to think that using certain tools or facilities will inevitably 'overload' the 8051."

    But there is no point in using code banking unless you've exceeded the 8051's address space - so that is inherently an "overload" of sorts!

    The real benefit of an RTOS really comes with larger systems, when the limitations of a simple "main loop" start to get in the way; so, as I said earlier, "if you've decided that a 'small' controller like an 8051 is suitable for your project, I can't really see why you should then need to use an RTOS."

  • so, as I said earlier, "if you've decided that a 'small' controller like an 8051 is suitable for your project, I can't really see why you should then need to use an RTOS."

    Here are a few reasons...

    1. The RTOS solves a problem that you can't or don't want to code (possibly incorrectly) my way around.

    2. You will save development time that you can put to better use elsewhere.

    3. The MCU has enough horsepower to run the RTOS and your application.

    4. The complexity of the 8051 (with an RTOS) is simpler than some other architecture.

    5. You have experience with the 8051 and RTOS.

    All of these sound like pretty good reasons to me.

    Jon

  • "All of these sound like pretty good reasons to me."

    Well, potentially good reasons...! ;-)

    <cynic>But you would say that - you've got an RTOS to sell...!</cynic> ;-)

    I didn't say it's impossible - just seems pretty improbable to me.

  • "A microprocessor is a numbercruncher that should react in less than a second, a microcontroller is a device that shall react NOW."

    97.3% of statistics are made up on the spot.
    98.2% of definitions of the words 'microcontroller' and 'microprocessor' also appear to be made up on the spot.

    One thing that neither a microprocessor or microcontroller can do is respond "NOW". I assume you're familiar with interrupt latency?

    "If you want to mislabel the '51 as a microprocessor (which it aint) you can state all kinds of things from that premise."

    I'm not really interested in labelling it as either as the distinction between the two has become hopelessly blurred.

  • "But there is no point in using code banking unless you've exceeded the 8051's address space - so that is inherently an "overload" of sorts!"

    Do you consider using more that 64k of NV xdata storage an 'overload'?

    "if you've decided that a 'small' controller like an 8051 is suitable for your project, I can't really see why you should then need to use an RTOS."

    You may not *need* to use an RTOS. Using one, however, may be a convenient and effective way of coding a given application.

  • OOPS
    "But there is no point in using code banking unless you've exceeded the 8051's address space - so that is inherently an "overload" of sorts!"

    Do you consider using more that 64k of NV xdata storage an 'overload'?

    Nobody said anything about data exceeding 64k. I have such, but access it by other means than Keils "banking" with associated overhead

    Erik

  • "Nobody said anything about data exceeding 64k."

    Er, yes *I* did. I was drawing a parallel between using more code space than the 8051 was designed to address and more xdata space that the 8051 was designed to address.

    "I have such, but access it by other means than Keils "banking" with associated overhead"

    You cannot access more than 64k of xdata without *some* overhead. The 8051 is not designed to address more than 64k. According to your philosophy you have used the wrong microprocessor for the job.

  • You cannot access more than 64k of xdata without *some* overhead. The 8051 is not designed to address more than 64k. According to your philosophy you have used the wrong microprocessor for the job.
    No, I have not - even by my own philosophy.
    I only need access to about 25 bytes of the >64k data about once an hour. The reason that I do not use banking with its overhead is that the rest of the time I run "true '51" aka hauling @$$. Had I needed that data more often I would not have used a '51 derivative.

    Erik

  • "No, I have not - even by my own philosophy."

    I think you have. It seems that you are quite happy to make sweeping generalisations to others along the lines of 'You must not do X because the 8051 is not the right processor for use with tool x or technique y or algorithm z', but you make an exception for yourself.

    I only need access to about 25 bytes of the >64k data about once an hour.

    "The reason that I do not use banking with its overhead is that the rest of the time I run "true '51" aka hauling @$$. Had I needed that data more often I would not have used a '51 derivative."

    So you're pushing it that close to the wire? Sounds like you should have used a faster processor.

    ""true '51" aka hauling @$$"

    Why do you have this idea that the 8051 is only 'true' when it is 'hauling @$$'?

  • Why do you have this idea that the 8051 is only 'true' when it is 'hauling @$$'?
    Staffan, Staffan, once more: because it has the features of a microcontroller and thus is great as such and pitiful for other things.

    The fact that you can hammer a nail in with a shoe does not make the shoe the right tool.

    There is a group of people that want to use "their" controller for whatever the task is (I have seen 386 equipped things that could have been done with a small PIC). How do you know that the OP is not one such?
    The point is not that it is "wrong" the point is that when the OP will not qualify ("if i am satisfied with the 8051") the use of the '51 for a particular purpose, we must assume that (s)he is applying the '51 to something where it does not belong. Thus to save the OP from spending an inordinate amount of time on something that most likely will fail Andy and I keep questioning the use of a '51.

    If this forum is to be helpful assumptions about whatever could be wrong for the OP must be refuted by the OP or left standing.

    You and I do not know that the OPs use of a '51 will ever work so why do you balk at the posts that state so when the OP does not even have the gumption to state why he insist on using a '51.


    On another note:
    So you're pushing it that close to the wire? Sounds like you should have used a faster processor.
    Not having the time to spend 3 more clock cycles for every memory access is hardly "pushing it that close to the wire". By my method, I only have overhead when accessing outside the 64k, and when that is needed, I am in "keyboard mode"

    Erik

  • "Staffan, Staffan, once more: because it has the features of a microcontroller and thus is great as such and pitiful for other things."

    So you're putting not only your favourite upper limits on what it should be used for (no floating point, code banking and RTOS) but now there is some lower limit as well? What is it, 90% CPU utilisation? 95%?

    "The fact that you can hammer a nail in with a shoe does not make the shoe the right tool."

    No, but there are a great many things to be cosidered. This analogy moves us a long way backwards in this discussion.

    "There is a group of people that want to use "their" controller for whatever the task is (I have seen 386 equipped things that could have been done with a small PIC). How do you know that the OP is not one such?"

    I don't, but you assume he is.

    "The point is not that it is "wrong" the point is that when the OP will not qualify ("if i am satisfied with the 8051") the use of the '51 for a particular purpose,"

    Why should the OP qualify his use of an 8051 to you? It would be pointless anyway - you would never accept his reasons.

    "we must assume that (s)he is applying the '51 to something where it does not belong."

    You see - there it is again. You assume that the OP must be wrong without any knowledge of his project.

    "Thus to save the OP from spending an inordinate amount of time on something that most likely will fail Andy and I keep questioning the use of a '51."

    That's most commendable.

    "If this forum is to be helpful assumptions about whatever could be wrong for the OP must be refuted by the OP or left standing."

    What assumptions have you made that he must refute?

    "You and I do not know that the OPs use of a '51 will ever work so why do you balk at the posts that state so when the OP does not even have the gumption to state why he insist on using a '51."

    I balk for the reason you have just given: I do not know his application in detail and therefore cannot say whether he is using a suitable processor and suitable tools. Neither can you, so it becomes somewhat irritating to listen to the same tired old record '8051==no RTOS, no floating point and no code banking for reasons that I just can't quite adequately explain in any other way than it is wrong, wrong, and wrong again irrespective of the circumstances'.

    "Not having the time to spend 3 more clock cycles for every memory access is hardly "pushing it that close to the wire". By my method, I only have overhead when accessing outside the 64k, and when that is needed, I am in "keyboard mode""

    I was attempting a little humour.

  • "If this forum is to be helpful assumptions about whatever could be wrong for the OP must be refuted by the OP or left standing."

    What assumptions have you made that he must refute?

    well, that is what this discussion now is about.

    I was attempting a little humour.
    sorry, missed that

    Erik