[ell-i-developers] Re: Emulating uint32_t -- not an option, will define preg32_t and preg16_t instead.

  • From: Pekka Nikander <pekka.nikander@xxxxxx>
  • To: "ell-i-developers@xxxxxxxxxxxxx" <ell-i-developers@xxxxxxxxxxxxx>
  • Date: Mon, 17 Feb 2014 21:34:19 +0200

> Instead, my current plan is to introduce a couple of new data types, preg32_t 
> and preg16_t, for peripherial registers, 32 and 16 bits wide.  On the real 
> hardware those would be simply volatile uint32_t and volatile uint16_t.  On 
> the emulator, however, those would be objects that keep track of which 
> register there is.  Hence, in the emulator a reference through a preg32_t 
> would trigger the emulator code, spitting out traces, so that we can better 
> keep track of what's going on also when the peripheral registers are accessed 
> indirectly.

I have now implemented this.  I found also a couple of bugs in the latest, 
refactored system_init code.  

I will commit and push the code tomorrow morning.  In that way the quality will 
be somewhat higher, as I will look at the code with new eyes in the morning.


Other related posts: