Compute the Register Address (absolute) and add it to the new ABS_ADDR_SVD as register.address
C:circle rad 40px "$(UNFOLDED_SVD)" fit arrow right 100% E:box rad 10px "$(XSL_PROC)" fit arrow right 100% G: circle rad 40px "$(ABS_ADDR_SVD)" fit F:circle rad 40px "$(ABS_ADDR_STY)" fit at 1.5 s of C arrow from F.e \ then right until even with E \ then to E.s→ /pikchrshow
The CMSIS design contains a register base and offset which are summed by Forth using the on-mcu compiler to derive the register absolute address.
As FURS was designed for small Cortex-M mcu's such as the Cortex-M0 series, I decided to move this function to the PC which has thousands of times more computing power and memory than a slow embedded mcu. I also believe this saves time compiling Forth source code on the same slow mcu.
But is this method efficient compared to the MCU doing the computations ?
Furthermore, this computation need only be done once (on the PC) as the result is then saved in a file or database for any further use.
Makefile
$(ABS_ADDR_SVD): $(UNFOLDED_SVD) $(XSL_PROC) -o $(ABS_ADDR_SVD) $(ABS_ADDR_STY) $(UNFOLDED_SVD) $(XMLLINT) --format $(ABS_ADDR_SVD) > temp1.tmp && mv temp1.tmp $(ABS_ADDR_SVD) || rm -f temp1.tmp
Example:
<register>
<name>ARR</name>
<displayName>ARR</displayName>
<description>auto-reload register</description>
<addressOffset>$2C</addressOffset>
<size>$20</size>
<access>read-write</access>
<resetValue>$00000000</resetValue>
<address>$4001482C</address> <---- ADDITION