cmake_cpputest_template/issues.md

936 B

Issues

This is to track my blockers and issues with getting the ch32fun repo to work under cmake and with cpputest.

Q: why isn't it working?

It's giving a riscv internal compiler error. ch32fun.c:114:1 I don't think it's actually a code issue as it's the OG file and the repo worked fine.

Q: What is different from the repo?

  1. I don't dynamically generate the linker script.
  2. I'm missing some of the defines.
  3. My flags/options look different.
  4. Directory layout.
  5. Missing the LD file for ch32fun dir.

Q: what steps should I take to reduce the differnces?

  • Re-copy the source files.
  • Use the same directory structure(mostly)
  • Use the ./src/ch32fun/ch32fun.ld script to generate linker scripts?

Figured out issue,

I needed to ensure the same flags were applied accross the main.c, ch32fun.c and the linking step.

Otherwise they pretty much got ignored.

Seems like the toolchain file did jackshit as well.