This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSPM0G3507: SVD file issue(s).

Part Number: MSPM0G3507

Tool/software:

  Hello,

I've found this thread about issues with MSPM0G3507 SVD: https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1398791/mspm0g3507-could-you-provide-svd-files-for-mspm0g3xxx-family

I'm attempting to compile TI's provided MSPM0G3507 SVD by svd2rust compiler in order to be able to use the MCU with Rust. Anyway, so far I've just replaced all 'read-writeonce' with `read-write' and also did this change:

@@ -74984,7 +74984,7 @@
                             <description>Bank not in read mode.
 Indicates which banks are not in READ mode.  There is 1 bit per bank.</description>
                             <bitOffset>0x0</bitOffset>
-                            <bitWidth>0x1</bitWidth>
+                            <bitWidth>0x5</bitWidth>
                             <access>read-only</access>
                             <enumeratedValues>
                                     <enumeratedValue>

in order to have Rust code produced from the SVD file.

Anyway, still I do have issues where some registers are missing from the generated code. So far I'm concentrating on ass imple as possible "blinking LED" example hence with just GPIO. The SVD GPIO definitions provide several registers defined in 'cluster'. Unfortunately this does not work well with my svd2rust and I get no code produced for those registers.

It may be just an issue with my svd2rust (0.35.0, latest release as of today), but what is interesting is that TI itself has changed problematic code (involving clusters) in MSPM0L130X.svd. In 2023 version (the file distributed as part of VS Code Cortex-Debug extension) the SVD file contains register clusters while latest code from TI rewrites this to use non-closter register sequence. The diff of header should be helpfull in order to identify the changes I'm talking here:

--- MSPM0L130X.svd      2024-05-24 13:59:22.000000000 +0200
+++ /c/Users/gardas/git/SE/TI_MSPM0L/mspm0l130x/MSPM0L130X.svd  2024-12-12 19:33:15.692204100 +0100
@@ -1,12 +1,12 @@
-<?xml version="1.0" encoding="utf-8"?>
-<device schemaVersion="1.2" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="CMSIS-SVD.xsd" >
+<?xml version='1.0' encoding='UTF-8'?>
+<device xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" schemaVersion="1.2" xs:noNamespaceSchemaLocation="CMSIS-SVD.xsd">
    <vendor>Texas Instruments</vendor>
    <vendorID>ti.com</vendorID>
    <name>MSPM0L130X</name>
-   <version>This preliminary header file does not have a version number -  build date: 2024-04-29 21:56:11</version>
+   <version>This preliminary header file does not have a version number -  build date: 2023-02-21 16:43:37</version>
    <description>ARM Device</description>
    <licenseText>
-  Copyright (C) 2024 Texas Instruments Incorporated - http://www.ti.com/
+  Copyright (C) 2023 Texas Instruments Incorporated - http://www.ti.com/

Now, while seeing this MSP-L series SVD definition change I'm curious if TI is planning to do similar change in G-series SVD files?

Thanks!
Karel

  • Hi Karel,
    Could you expand more on the specific issues you are having in the MSPM0G3507.svd file? Here's also the latest version of the MSPM0G3507 SVD file: www.keil.arm.com/.../
    Best Regards,
    Diego Abad

  • Hi Diego,

    thanks for reaching out. My svd2rust compiler complains about 'read-writeonce' declarations for registers. I'm not sure whom to blame here, but I've worked around that by changing all read-writeonce occurances to 'read-write'.

    Also the flash related information/bitWidth seems to be incorrect -- see my diff posted above. Again I do not know if this is a correct fix or not, but it makes the compiler happy as it proceed to generating actual Rust code.

    Finally clustering registers does not seems to make svd2rust compiler happy for whatever reason. It does not generate any code for such registers. I'll ask for this somewhere on Rust community and will get back to you with the info.

    Thanks!
    Karel

  • Hi Karel,

    Thanks for letting me know. I'll let the software team know about it.

    Best Regards,

    Diego Abad