Skip to content

Commit 1cef4b1

Browse files
committed
add default values in svd_model.py
1 parent a138611 commit 1cef4b1

File tree

2 files changed

+105
-166
lines changed

2 files changed

+105
-166
lines changed

README.md

+1-62
Original file line numberDiff line numberDiff line change
@@ -201,37 +201,17 @@ from svdsuite import (
201201

202202
# Create an example device. Alternatevily, you can parse a CMSIS-SVD file and manipulate it.
203203
device = SVDDevice(
204-
size=None,
205-
access=None,
206-
protection=None,
207-
reset_value=None,
208-
reset_mask=None,
209204
xs_no_namespace_schema_location="CMSIS-SVD.xsd",
210205
schema_version="1.3",
211-
vendor=None,
212-
vendor_id=None,
213206
name="STM32F0",
214-
series=None,
215207
version="1.0",
216208
description="STM32F0 device",
217-
license_text=None,
218209
cpu=SVDCPU(
219210
name=CPUNameType.CM52,
220211
revision="r0p0",
221212
endian=EndianType.LITTLE,
222-
mpu_present=False,
223-
fpu_present=False,
224-
fpu_dp=False,
225-
dsp_present=False,
226-
icache_present=False,
227-
dcache_present=False,
228-
itcm_present=False,
229-
dtcm_present=False,
230-
vtor_present=False,
231213
nvic_prio_bits=2,
232214
vendor_systick_config=False,
233-
device_num_interrupts=6,
234-
sau_num_regions=2,
235215
sau_regions_config=SVDSauRegionsConfig(
236216
enabled=True,
237217
protection_when_disabled=ProtectionStringType.SECURE,
@@ -246,36 +226,13 @@ device = SVDDevice(
246226
],
247227
),
248228
),
249-
header_system_filename=None,
250-
header_definitions_prefix=None,
251229
address_unit_bits=8,
252230
width=32,
253231
peripherals=[
254232
SVDPeripheral(
255-
size=None,
256-
access=None,
257-
protection=None,
258-
reset_value=None,
259-
reset_mask=None,
260-
dim=None,
261-
dim_increment=None,
262-
dim_index=None,
263-
dim_name=None,
264-
dim_array_index=None,
265233
name="Timer1",
266-
version="1.0",
267234
description="Timer 1 is a standard timer",
268-
alternate_peripheral="Timer1_Alt",
269-
group_name="group_name",
270-
prepend_to_name="prepend",
271-
append_to_name="append",
272-
header_struct_name="headerstruct",
273-
disable_condition="discond",
274235
base_address=1073750016,
275-
address_blocks=[],
276-
interrupts=[],
277-
registers_clusters=[],
278-
derived_from="test",
279236
)
280237
],
281238
)
@@ -300,19 +257,8 @@ Output:
300257
<name>CM52</name>
301258
<revision>r0p0</revision>
302259
<endian>little</endian>
303-
<mpuPresent>false</mpuPresent>
304-
<fpuPresent>false</fpuPresent>
305-
<fpuDP>false</fpuDP>
306-
<dspPresent>false</dspPresent>
307-
<icachePresent>false</icachePresent>
308-
<dcachePresent>false</dcachePresent>
309-
<itcmPresent>false</itcmPresent>
310-
<dtcmPresent>false</dtcmPresent>
311-
<vtorPresent>false</vtorPresent>
312260
<nvicPrioBits>2</nvicPrioBits>
313261
<vendorSystickConfig>false</vendorSystickConfig>
314-
<deviceNumInterrupts>6</deviceNumInterrupts>
315-
<sauNumRegions>2</sauNumRegions>
316262
<sauRegionsConfig enabled="true" protectionWhenDisabled="s">
317263
<region enabled="true" name="Region1">
318264
<base>0x1000</base>
@@ -324,16 +270,9 @@ Output:
324270
<addressUnitBits>8</addressUnitBits>
325271
<width>32</width>
326272
<peripherals>
327-
<peripheral derivedFrom="test">
273+
<peripheral>
328274
<name>Timer1</name>
329-
<version>1.0</version>
330275
<description>Timer 1 is a standard timer</description>
331-
<alternatePeripheral>Timer1_Alt</alternatePeripheral>
332-
<groupName>group_name</groupName>
333-
<prependToName>prepend</prependToName>
334-
<appendToName>append</appendToName>
335-
<headerStructName>headerstruct</headerStructName>
336-
<disableCondition>discond</disableCondition>
337276
<baseAddress>0x40002000</baseAddress>
338277
</peripheral>
339278
</peripherals>

0 commit comments

Comments
 (0)