3 ms·
Back in the day, I worked on embedded systems that had memory-mapped IO. That is, there would be a hardware register at address 0xF0010010, and you would acces
by AnimalMuppet 10y ago
Back in the day, I worked on embedded systems that had memory-mapped IO. That is, there would be a hardware register at address 0xF0010010, and you would access it like it was regular memory. So you'd write:
*(unsigned long*)0xF0010010 = 0x11;
to make the hardware do some particular thing.
But if that's how you're controlling your hardware, how are you going to do it "safely"? You'd need your compiler to know which addresses are valid and which are not, which means your compiler needs to know about your custom hardware, and your compiler needs to change each time you revise a circuit board. That seems like an approach that is unlikely to be productive.
- wnoise 10y agoOr your compiler takes a specification file listing memory-mapped addresses...