Liste des Groupes | Revenir à cl c |
On 1/8/25 11:18 AM, David Brown wrote:There are very few new versions of 8-bit CISC microcontrollers being developed - the rate has been dropping steadily since the Cortex M family rose to dominance. The decay is probably approximately exponential, in terms of development of new devices, production and sale of existing devices, and development of new products using these devices. They are not /all/ gone - but you need /very/ good reason for considering them for anything new, whether it is software or hardware.For people using 8051, COP8, 68HC05, PIC16 or other long outdated brain- dead microcontrollers, you don't get standard C support at all. You program these in a device-specific variant of C full of extensions and extra restrictions - and the support is as close to the subset of C99 that I described as it is to standard C90.Just a point of reference, there are still several "brain-dead" systems in modern use today that aren't old, some being invested as late as 2019.
That being said, your comment isn't completely accurate in that, there are some modern uses of things like the 6502 that can use standards-based C. In fact, you can use ANSI C89 and C90 with the 6502.The 6502 is one of the better 8-bit cpu cores - you can get reasonable code with mostly standard C (C99 if you like) using a compiler like SDCC. You don't /need/ as many extra target-specific keywords and extensions to deal with multiple memory banks, independent address spaces for ram and constant data, long and short pointers, non-recursive functions, and so on, as you need for useable results on an 8051 or PIC. But you probably still use some of these to get efficient results, such as choosing which variables go in the fast zero page area.
I've done this for several modern pace makers as well as a smart prosthetic. So your statement is correct in 90% of cases but not all cases.I believe that goes under the category of "niche" :-) For some types of application, you stick to what you have tested - no one wants to have the first pacemaker with a new microcontroller!
(Also most car manufacturer's use the 6502 and other variants for their digital input analog gauges and warning light controls on their dashboards.)Have you a reference for that claim? I am very confident that it is not the case. The 6502 was primarily developed as a microprocessor core, not a microcontroller core - it was found in early microcomputers and games consoles. It was also used in early embedded systems, but once microcontrollers became common, they dominated quickly in numbers. (Microprocessors were used for high-end embedded systems, like embedded PC's with x86 cpus and network equipment with m68k processors.) I don't know that the 6502 was ever common in the automotive industry - but I can't believe it was ever used by "most" car manufacturers.
C89 and C90 are better for 8-bit systems then C99 and newer. Not that you can't do 8-bit on C99 but it's just not designed as well for it since C99 assumes you've moved on to at least 16-bit.My point is that almost no general-purpose software written now will ever be used on 8-bit devices, especially not 8-bit CISC cores. For most software written on these cores, standard C is not a practical option anyway. And the cores are used in very conservative situations, such as when there is a lot of legacy code or when many years or decades of field testing is important - new external software will not be used by such developers. So it makes no sense to me to restrict the code to an old standard because of the /tiny/ chance that there is someone who might want to use it on such devices.
But this is all based on the OP's specific use case for their application. I just wanted to chime in since I do primarily work on modern embedded systems that don't use "modern" microcontrollers and CPU's since they are still used in a wide range of modern devices that people don't even realize.
Les messages affichés proviennent d'usenet.