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

[SVDConv] runs in infinit loop when using generate partion on SVD file without <sauNumRegions> element under <cpu> #1082

Open
pablaasmo opened this issue Aug 3, 2023 · 1 comment
Assignees
Labels
bug Something isn't working fixed Issue is fixed, please verify.

Comments

@pablaasmo
Copy link

Describe the bug
Given an SVD file without <device>/<CPU>/<sauNumRegions> then running svdconv --generate partition runs in loop "forever"

To Reproduce
svdconv -v --generate partition ARMCM4.svd

Expected behavior
Either generate a minimum partition_<device>.h header file, or give a warning off missing element, or do not generate header file at all.

Environment (please complete the following information):

  • Tool: svdconv
  • Version: v3.3.45
  • OS: Linux

Additional context
Example of "runaway" generated code:

    #if defined (SAU_INIT_REGION4036008) && (SAU_INIT_REGION4036008 == 1U)
      SAU_INIT_REGION(4036008);
    #endif
    #if defined (SAU_INIT_REGION4036009) && (SAU_INIT_REGION4036009 == 1U)
      SAU_INIT_REGION(4036009);
    #endif
    #if defined (SAU_INIT_REGION4036010) && (SAU_INIT_REGION4036010 == 1U)
      SAU_INIT_REGION(4036010);

A possible cause may be that in SvdCpu.cpp the default value is set to m_sauNumRegions(SvdItem::VALUE32_NOT_INIT) where const uint32_t SvdItem::VALUE32_NOT_INIT = (uint32_t)-1;

@pablaasmo pablaasmo added the bug Something isn't working label Aug 3, 2023
@thorstendb-ARM
Copy link
Collaborator

thorstendb-ARM commented Aug 8, 2023

Fixed code, thank you for the hint. Now this number gets checked also when set. Added checks / code skip and error messages where this is used.
#error "SAU Setup: Number of SAU regions not set"

see #1086

grasci-arm pushed a commit to ARM-software/devtools that referenced this issue Aug 8, 2023
…file without <sauNumRegions> element under <cpu> Open-CMSIS-Pack#1082 (Open-CMSIS-Pack#671)

fixed:
- check for initialized value of sau num regions
JonatanAntoni pushed a commit to ARM-software/devtools that referenced this issue Aug 9, 2023
…file without <sauNumRegions> element under <cpu> Open-CMSIS-Pack#1082 (Open-CMSIS-Pack#671)

fixed:
- check for initialized value of sau num regions
JonatanAntoni pushed a commit that referenced this issue Aug 9, 2023
…file without <sauNumRegions> element under <cpu> #1082 (#671)

fixed:
- check for initialized value of sau num regions
@thorstendb-ARM thorstendb-ARM added the fixed Issue is fixed, please verify. label Aug 28, 2023
@thorstendb-ARM thorstendb-ARM removed their assignment Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed Issue is fixed, please verify.
Projects
None yet
Development

No branches or pull requests

2 participants