Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmsis-svd crashing on getting derived registers #96

Open
Jegeva opened this issue Feb 27, 2020 · 1 comment
Open

cmsis-svd crashing on getting derived registers #96

Jegeva opened this issue Feb 27, 2020 · 1 comment

Comments

@Jegeva
Copy link

Jegeva commented Feb 27, 2020

Hello,

on :
LPC178x_7x svd
LPC178x_7x_v0.8 svd
LPC408x_7x_v0.7.svd
files that are included in the data ,
it crashes on trying to iterate on the registers,

More specifically it crashes on this element of the SVDs :

<peripheral derivedFrom="SSP0"> <name>SSP2</name> <baseAddress>0x400AC000</baseAddress> <interrupt> <name>SSP2</name> <value>36</value> </interrupt> </peripheral>

here is the TB
Traceback (most recent call last):
File "./idarm-make-regtag.py", line 241, in
data = get_data_for(args.vendor, args.chip ,args.max_segment_sz_int,args,1)
File "./idarm-make-regtag.py", line 99, in get_data_for
regs = peripheral.registers
File "./cmsis-svd/python/cmsis_svd/model.py", line 502, in registers
for reg in self._lookup_possibly_derived_attribute('registers'):
TypeError: 'NoneType' object is not iterable


digging deeper, i saw that SSP0 is derived from SSP1. changing the peripheral SSP2 is derived from to SSP1 fixes the crash which leads me to think that cmsis-svd isn't handling the daisy chaining of derivedFrom case correctly (and i don't know if this is even legal to start with but that is in the base data package and looking at http://www.keil.com/pack/doc/CMSIS/SVD/html/schema_1_2_gr.html i don't see why you couldn't chain derived elements)

@Jegeva
Copy link
Author

Jegeva commented Feb 27, 2020

see pull #97 for a data fix but not a fix of the underlying issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant