-
Notifications
You must be signed in to change notification settings - Fork 102
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
failed to generate peripherals for nrf52.svd #1
Comments
I have rethrown the exception in the code to see it and it fails with
so I guess register._size is not there |
OK, register._size is optional, default is in peripheral.size so I have fixed it like this
However then I didn't get very far. Some peripherals still fail since they are overlapping which is intentional as they really share same space (how to solve this?) but even for those not overlapping it prints no error but the namespace does not look so rich as on video and analyzed code still looks almost same as before. |
Heya, thanks for the feedback! I'll try to look at this in the next days and see what I can figure out! |
Yea so this is an issue - for those overlaps we might just create names instead of structures.. |
Hello, sorry for being late to the party. May I know if there is any solutions to this issue? Because I got the same exact error @fanoush had. |
@Calvin69 did you try my patch above to at least get rid of exception because of missing register._size value (which seems to be optional but the code expected it to be always present)? Another isue is overlapping of address spaces. Just to explain how it is with nrf52 - there are 3 reasons for using same address space:
Type is selected by writing specific value to ENABLE 0x500 register. Typically this selection for specific decompiled code is static so in theory it could be automagically detected from code writing specific value to ENABLE register however the easiest would be to simply set a preference at decompile/loading time which one is preferred and ignore the others. |
Heya, Yea so I have a basic solution working for overlapping address spaces, however I didn't get to fully test it yet unfortunately. In my basic solution I just generate a pspec for the processor, which then will not have structures but at least labels... However your solution with having the user select the right way sounds interesting! Cheers and thanks for investigating, Thomas |
Hello guys, I just realized that the errors on my console is different that @fanoush . Here's mine:
It doesn't seems to be an overlapping issue, isn't it? I have never modified any SVD Loader files. I had only modified a Ghidra file which is the @nezza are you GhidraNinja? If so, I'd like to say thanks for uploading videos on YT. Really helped me learn a lot. UPDATE: Looking at the first line of error, I uploaded a .xml file and now I get the same error. Will try fanoush's method and will update again. UPDATE 2: Just tried fanoush's patch and still get the same thing. No change. |
Hello, I have a similar problem when generating the peripherals but this time it is on the nrf51 platform. As this is an issue which is shared between the nrf51 and nrf52 processor, may I suggest changing the title of the issue to integrate nrf51 as well? Other than that, the overlap seems to be the only issue on my side. EDIT: I double checked for the nrf51.svd file and indeed, some are requesting the same region. The alternatePeripheral tag references other failing peripherals. In my case for instance the peripheral CLOCK has the alternatePeripheral POWER, which has its own definition somewhere else. |
Awesome, I'll try to review on the weekend! |
Yeah, I just encountered this as well with the |
I do have similar problems with rp2040.svd. |
Hi, this is great stuff. However I tried it with https://github.com/posborne/cmsis-svd/blob/master/data/Nordic/nrf52.svd and it only creates memory areas but nothing in Peripherals namespace. The output is:
The text was updated successfully, but these errors were encountered: