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

error: cast increases required alignment of target type in rv32m1.c #51

Open
telkamp opened this issue Jun 15, 2022 · 0 comments
Open

Comments

@telkamp
Copy link

telkamp commented Jun 15, 2022

Building the default branch (zephyr-20220611) using a GCC 10.2.1 on a Raspberry Pi gives me the errors shown below.
Because I don't need the related architecture, It was sufficient for me to commented these lines out.

src/target/rv32m1/rv32m1.c: In function ‘rv32m1_get_core_reg’:
src/target/rv32m1/rv32m1.c:281:36: error: cast increases required alignment of target type [-Werror=cast-align]
  281 |   buf_set_u32(reg->value, 0, 32, *((uint32_t*)target->reg_cache->reg_list[reg->number].value));
      |                                    ^
src/target/rv32m1/rv32m1.c: In function ‘rv32m1_restore_context’:
src/target/rv32m1/rv32m1.c:236:66: error: cast increases required alignment of target type [-Werror=cast-align]
  236 | G_DEBUG("%s: 0x%08x", target->reg_cache->reg_list[i].name, *(uint32_t*)(target->reg_cache->reg_list[i].value));
      |                                                             ^

./src/helper/log.h:126:5: note: in definition of macro ‘LOG_DEBUG’
  126 |     expr); \
      |     ^~
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