I do not know the answer, but I have my say on the topic.
remarks
There are some interesting points in the FPGA answer, so as in comments to it about inefficiencies and complexity, but do not forget that if we talk about signal processing, which may be important for machines, robot arms, CNC, and stuff, it can do more than your typical atmega, even when if u turn it (FPGA) in an atmega it may be a half of atmega. So if one chooses to load himself with FPGA's, which may be a smart decision, he may load as well with 2-3-5 types of microcontrollers and processors for general purpose. in some cases they will overlap as what they can do, in others, they all have their niche in which they do better, but not irreplaceable.
it nice to see someone wakes up for the topic, and sad to see closers reaction on a fundamental question which is practically important so as important for hard science works if one wishes to embark on the endeavor of writing making one. There are too many soft fantasies and not enough hards sci-fi and Clarke and Asimov and Heinlein and O'Neill are ashamed of us here right at the moment.
unfortunately, the answer does not exist, as far as I know, and estimates are inevitably are based on one's skills and knowledge, and understanding of the problem. I do not have sufficient competence to encompass the whole subject, but I do know something, so I'll try, but no exact numbers for ya.
Fundamentals
Now the earth was formless and void, and darkness was over the surface of the deep. And the Spirit of God was hovering over the surface of the waters. And God said, “Let there be light,” and there was light. And God saw that the light was good, and He separated the light from the darkness.
Genesis something:something
one day we had nothing.
one day in the past we had nothing, but the next day we pick up a stone and since then our tool-making habit progressed and today we have all we have, pinnacles of technology included - and nothing of that was given by some external force. we as Humanity made it with our Hands, starting with a stone and resources available to us around on the planet, which, the resourced, didn't include a single piece of high tech available to us today.
the important conclusion here is - there is possible to have some HowTo guide from nothing to a pinnacle of any (or all) technology, for an exchange of human hours, etc.
with electronics and processors, we do not have to look that way back, to a stone age, or steam era - stuff started whopping circa 50 years ago, time flies, soon u would not be able to say it was recent enough.
And that HowTo guide does not exist, but it is sort of written in our relatively recent history indirectly, I mean is less of a mystery how to extract that data, than answering the question of how did they manage to build pyramids.
So the traces are fresh enough and it is not impossible to compile a document that leads from simple transistor logic manufacturing to making complex processor microcontrollers and such.
C: And this way if u prepare for colonization of another planer or space in general, do your homework, if u intend to expand and grow, make a growth plan. Not like using old as a solution, but using old as a starting point to get back on top of technologies.
energy is king.
energy is very essential, not only for functioning but for the development of the installation. not only it has to be available, but it has to be abundant. For technologies and for space stuff it like water for plants, and if u like to grow fast enough, it has not to drip in volumes u carefully count but it has to be sprayed from a firehose as if u extinguish a fire on an oil field.
The reason for that is as an example - whatever big enough city u see, with a million a few million people it has hundred years plus history, it has buildings and construction which do functioning since that time. Sure we modernize cities and never ended doing so and building - but it also serves us as a piggy bank in which we constantly put/used resources and energy. And if u would like to build one in a decade or so, from scratch, capable to host the same number of citizens - it would be a major project, very complex, very heavy consuming on energy and resources and making a busy good portion of people in one's country.
So establishing a presence in space or on a planet aka mars aka Elon - u have to have a thick fire hose that spits energy as if it's free.
C: So, if u like to produce electronics locally, energy resource inefficiencies in the product and in the processes aren't the greatest concern.
we do live in the future
we indeed live in the future and can use the accumulated knowledge and look back on the ways things were done from a different perspective.
we do have good progress in software development, for production, for development, so as learning algorithms, etc. Those are fruits of us having all that tech for quite some time now. Today capabilities as of software and technologies of software are way more potent in terms of capabilities than it was 20-30 years ago. So much so that it almost a trivial task to run today's software on outdated hardware. A cluster of 8086 won't make your game experience better, but it may make work done. Making a virtual machine out of 8086, Z80, and similar is possible, and we learned that clouds are good for certain tasks.
we do have automatizations, and when we have not other choices but to replace human hours we can do that with robots. sure there are some objections, I hear you - service, etc, etc - those problems aren't without solutions if u have energy and do your homework.
we can borrow power from the already existing system on the planet, as mentioned in ops q, so as in the FPGA answer - we can bring some critical components premanufactured electronics, data we need, the equipment we need. So as teleoperated expertise via digital links, even if mars isn't the best choice for that, but even then substantial information processing can be offset to the planet, in a smart way obviously, not like offsetting real-time processes monitoring to a 20min ping zone. So as problem-solving counsel service can be on the planet and use all advantages of developed infrastructure.
it not only microcontrollers, u have to bring the whole bird nest.

if u have growth in mind, and local production indeed is capable of heavily reduce required launches to establish infrastructure, and u recognize some problems of electronics production but u still have to take a wider picture and recognize that technologies are intertwined, and there is a machine which builds parts for a machine which makes some operation in your processor production setup, to which there are 2-3 other layers of machines build parts for each other, and u have a hundred few hundred of those in your line. Stuff clearly overlaps so we do not have 100 pows 100 pows 100 number, but significantly less than that and a more manageable set of devices which forms somewhat ecosystem, producing food parts for each other.
everything isn't necessarily that horrible, but it depends on goals and means and roads of development - how do u approach the problem. So as it leads us to good old von Neuman probes question - how much do we need materials for one, or legit question how to lever up a base on another celestial body.
Some works try to estimate and produce a number, mass in tons, for the equipment we may need for the task, and it was done at different times, but there are not a lot of work on that question, so as estimates vary and there are different views on the problem - so older numbers have something like 3000t of equipment in mind, more modern views on that(3d printing, additive manufacturing enthusiasm and not only that) have lesser numbers like 300-20t.
The problem
So some fundamentals are set - like we may start low on tech and may grow with some plan of growth, we need abundant energy for all stuff, we use existing achievements to make stuff easier on us, our modern perspective on old topics, and our spoilers as we do know what happens next.
energy, again
Solar panels probably won't do it, they have EROEI around 2-3 years(controversial number, more like my estimates, but yeah it murky topic of holy wars), here on earth, where sunlight is more abundant than on mars as an example, it means if u plan to grow on solar on mars in a decade u need to take half of your power and after a decade u will be ready to produce your 100th's percent of designated goal in terms of power production, and not spending that energy elsewhere before that and be ready to spend it elsewhere after that when u get to 100 percent power capacity.
unfortunately, nuclear power also isn't that great for the case, but not necessarily bad. But to start to produce 1Gwatt of electricity u need about 100-200 tonnes of uranium fuel alone, not counting the other equipment from which a nuclear plant consists. There are modular reactors designs, for planetary use so as space use, like kilo power, but the number won't change that much, because as potent nuclear fuel is, it burns quite slow, that's why it is not a blast so it is the typical situation.
So, if u stick to conventional means and have no solution for that, then u start with probably thousands of tons of energy generation equipment alone. And 1 Gwatt number is rather not that much, for colonial activity. Smelting one ton of iron(iron scrap, not ore) needs 600-900kwh per ton, so 1Gwatt gets u about 250t of iron blanks and beams and stuff like that, per day.
A helpful thing is u have access to space and extracting energy there, maybe be more productive and with faster growth rates. weightless and vacuum have a certain advantage, absence of atmosphere has certain advantages. So all in all abundance of energy can be achieved, but it is a more serious topic than u may think.
chemistry
u may think that getting pure enough silicone is a challenge, but it is not necessary, but the chemistry of reagents u need in the process of manufacturing of chips and equipment for its production may be more challenging. At least it means that we talk not only about pure silicone, but other pure reagents u may need.
Also, u need recycling, a lot a lot of recycling because it is not given that u may have easy or good sources of elements on your base. even if you would be on earth, making a base does not mean u will find all the components\elemets easily accessible close to your base, even when we know it is all here, but we gather stuff all around the world. And recycling needs energy as well, as much if not more than actual production, u can't waste anything essential.
Gather stuff together
Silicone
Have seen a proposal, which uses plasma chemistry to purify silicone, it was like a business advertisement proposal, u give us the xxx amount of gold and we in a 2-4 years build production prototype aka working setup, which certain characteristics which we do expect, based on our lab tests and findings.
They promise a setup that fits in a 20,40ft(do no recall atm which one it was) container and produces solar panels grade silicone 1kg per 50kwh, 80t per year.
So tune or two-stage it u will have your pure silicone problems solved in something like 10t of equipment.
Making wafers, or more like boules of silicone also isn't such sophisticated technology, u basically do not need to carry anything from earth, had seen some videos of crude setups for growing, reactor vessels, components of which literally were done out of used pipes and Knowledge and then those boules were sold for good money, everyone was happy.
so u probably can do reactor vessel from local materials, with a pinch of high tech vitamins, and doping elements.
All structural elements have to be subtracted, pipes and cases and vessels - u have to do it locally, to save mass, so in a first setup the most important thing is a laser, so per a million controllers per year u probably can fry down that stuff to a hundred kg of more advanced high tech stuff, which u can't produce on the spot at the start.
Lithography, and lab equipment
some people in comments have to understand about the existence of laboratory equipment which is capable to produce chips. it is more flexible for research purposes, but not fast.
its purpose is to allow you to test different schemes and help produce test chips, to test their performance and stuff, before u put them in mass production.
I do not have experience with such equipment and do not have a good impression of its exact sizes and masses and speeds and feeds, but some impression I have it isn't that big - it does no take a whole building.
Here we have 2017 article which points us in a direction of a guy who makes our dream true in a garage, and what he writes in his article First IC :):
Without further ado, I present the first home(garage)made lithographically-fabricated integrated circuit – the “Z1” PMOS dual differential amplifier chip. I say “lithographically-fabricated” because Jeri Ellsworth made the first transistors and logic gates (meticulously hand-wired with conductive epoxy) and showed the world that this is possible. Inspired by her work, I have demonstrated ICs made by a scalable, industry-standard, photolithographic process. Needless to say, this is the logical step-up from my previous replication of Jeri’s FET fabrication work.
I designed the Z1 amplifier looking for a simple chip to test and tweak my process.
....
The feature (gate) size is approximately 175μm although there are test features as small as 2μm on the chip.
...
EDIT: see update at the bottom, the transistor gate length has been reduced to <5µm (1975 tech. level) which brings an increase in device performance.
...
There are 66 individual fabrication steps to make this chip and it takes approximately 12 hours for a full run. The process yield can be as high as 80% for these large features
So as in general, u have to understand that the first technology is tested and proven in a lab before they make plans for a FAB and building it for spitting out your processors.
So there is the stuff that fits more or less on a room or a table, but unfortunately, I'm a noob in that, so would be interesting to get numbers from those who are in the field. if u give me enough Z80's I'm certain to make a cloud from them.
But in general, the topic does not look futile if u put few million bucks into it. And that hack guy is probably a measuring stick for our problem because for an expansion one needs to be able to build up the number of production nodes locally.
Speed of production is less important, the productivity of equipment is less important if u can produce replicate it locally. And here automatization is the way to go and our fiend. 1um general processor and MEMS devices are good enough to run our robots which we need for production and for pumping up production capacities. So as to improve our technological capacities from the point.
So measuring stick, that hack guy, probably gives us few tonnes of equipment and a 50 kg bag of coffee for a few microns tech process.
But obviously, we do not bring those few tons capable to produce it, we bring our high tech stuff, which is capable to produce those cells which can produce those stands which produce few micron processors, from which we clearly extract all structural elements, which we'll produce locally with help of few ready to use arms(Hands).
So it isn't unreasonable to count it as 2-3 tonnes of equipment, to start to produce chips.
chemistry
Chemistry as mentioned will be complex enough, good stuff about it is that it scales up and down, down and up. Not without problems and kinks, and u may need more than 66 steps to close chemistry cycles in that setup, but mostly because u have many different components, chains of reaction, but it all more or less boils down to scheme u mix components under some temperature catalyst function in a reaction vessel get a product, separate rinse, and repeat.
Again exporting not the vessels and reaction chambers, but the equipment which makes equipment which makes those vessels and schtuff.
so elements for catalytical reaction have to be taken too.
So would again estimate it in a few tons, mostly elements, to kickstart the situation. And later depends what prospecting of the grounds will show, so as of how fast u scale everything including elements extraction and better locations if there are any. But u may need a lot of energy to offset the poor composition of elements in a location or on the celestial body in general.
Conclusion
For your question it probably reasonable to expect 10-20-30 t of equipment which allows u to produce chips from the get-go - but we can't tell how fast it will do, and how long it will last. with decent y2020 tech processes as in the lab.
The same number is probably valid for a setup that may begin to produce equipment which may produce equipment from which u produce equipment which can produce low tech processors, so as other equipment which u needs to scale up the base and begin to climb up on the tech tree.
it will have some limitations and properties, which are unknown and so as it depends on the composition of minerals around, but if energy-producing is solved, there won't be hard limits on how much it can produce and how fast the system can spew out components u need, so as not that many limitations on the variety of components it can produce.
Development of such system can be supported from the earth more in a way of problem-solving and in what's a next step for the system - strategical stuff.
it can be envisioned that mature technology of that kind, maybe like some container which u connect to the electric grid and it starts to grow, under some light supervision from humans. But as todays reality we have almost nothing in that regard, as in good old days, good stuff we can solve that step by step, V2.0 improved extended.