Closed yamaan93 closed 1 year ago
Hi. Thanks for opening up an issue! I double checked and there seems to be an error in the generated makefile. It does not include the CPU = -mcpu=cortex-m33 flag. If you add cortex-m33 to the cpu variable in the STM32-for-VSCode.config.yaml it should resolve your issue. E.g.:
# MCU settings
targetMCU: stm32u5x
cpu: cortex-m33 # type of cpu e.g. cortex-m4
fpu: fpv4-sp-d16 # Defines how floating points are defined. Can be left empty.
floatAbi: -mfloat-abi=hard
FYI: Created a bug report of this. If you could comment on it that you experience the same issue it would strengthen the case: https://community.st.com/s/question/0D53W00002DXKpjSAH/cubemx-error-when-generating-a-stm323u575zitxq-makefile-cpu-flag-is-missing
Just got a reply. For anyone experiencing a similar issue try updating to CubeMX 6.8.0 and deleting the old Makefile then regenerating. This should resolve the issue.
I will close this issue now. Should you experience any issues in the future feel free to re-open this issue or create a new one.
thanks for your response. I'll give that a go when I get the chance.
Also your VSCode extension is a life saver, I absolutely cannot stand cubeIDE but I also depend on the pre-generated files from cubeMX. I appreciate your work
Thank you very much for your kind words! I hope the extension will give you the experience you are looking for.
So, I have been attempting to start a simple new project from CubeMX. According to the readme the correct way to start the project is with the Makefile option in the toolchain selector in CubeMX. However, when I attempt to build the project, I get the following terminal output error.
I'm not actually sure what this might suggest, I haven't tried to add any external libraries or anything, just a fresh project from CubeMX. The only work around I've found has been generating a CubeIDE project instead and using the CubeIDE project importer (with generate under root disabled), then things seem to build correctly. (Although I get an annoying
command-line error: language modes specified are incompatibleC/C++(1027)
extension error when I do that but that's a separate issue.