Skip to content

Conversation

@cibomahto
Copy link
Contributor

This pull request addresses #4608 , and also updates the cmsis-svd library to bring in the rp2350 svd file for #4452. I've grouped them together because the offending condition only seems to be present in the updated cmsis-svd library.

I wrote a python script to check that all of the generated .go files are syntactically correct, however i have not managed to check the .s files.

import pathlib
import subprocess
import sys

def check_go_files(target_dir):
    issues = []

    src = pathlib.Path(target_dir)
    for go_file in list(src.rglob('*.go')):
        command = f'gofmt -e {go_file}'

        output = subprocess.run(command.split(), capture_output=True)
        if output.returncode != 0:
            issues.append(go_file)

    return issues

target_dir = 'tinygo/src/device'

issues = []
issues.extend(check_go_files(target_dir))

if len(issues) > 0:
    print("the folling files have issues:", file=sys.stderr)
    for issue in issues:
        print(issue.as_posix())
    exit(1)

This updates the version of the cmsis-svd library, to include a version
that supports rp2350. This is in support of tinygo-org#4452
@cibomahto cibomahto changed the title Fix output of gen-device-svd for svd files with multi-line descriptions Update cmsis-svd library, and fix incompatiblitiy with gen-device-svd Nov 21, 2024
Copy link
Member

@aykevl aykevl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
@deadprogram any comments from you?

@deadprogram
Copy link
Member

Thanks for the update and fix for the generator @cibomahto now merging.

@deadprogram deadprogram merged commit 7847f4e into tinygo-org:dev Nov 22, 2024
17 checks passed
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

Successfully merging this pull request may close these issues.

3 participants